//////////////////////////////////////////////////////////////////////
// Pano2VR 6.1.8/17956 HTML5/CSS3 & WebGL Panorama Player           //
// License: BKYM.COM                                                //
// (c) 2020, Garden Gnome Software, http://ggnome.com               //
//////////////////////////////////////////////////////////////////////

var ll="function"==typeof Object.defineProperties?Object.defineProperty:function(x,p,m){x!=Array.prototype&&x!=Object.prototype&&(x[p]=m.value)},nl="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this;function ol(x,p){if(p){var m=nl;x=x.split(".");for(var d=0;d<x.length-1;d++){var c=x[d];c in m||(m[c]={});m=m[c]}x=x[x.length-1];d=m[x];p=p(d);p!=d&&null!=p&&ll(m,x,{configurable:!0,writable:!0,value:p})}}var ul;
if("function"==typeof Object.setPrototypeOf)ul=Object.setPrototypeOf;else{var vl;a:{var wl={a:!0},xl={};try{xl.__proto__=wl;vl=xl.a;break a}catch(x){}vl=!1}ul=vl?function(x,p){x.__proto__=p;if(x.__proto__!==p)throw new TypeError(x+" is not extensible");return x}:null}var yl=ul;ol("Object.setPrototypeOf",function(x){return x||yl});
ol("Array.prototype.fill",function(x){return x?x:function(p,m,d){var c=this.length||0;0>m&&(m=Math.max(0,c+m));if(null==d||d>c)d=c;d=Number(d);0>d&&(d=Math.max(0,c+d));for(m=Number(m||0);m<d;m++)this[m]=p;return this}});function zl(x){var p=0;return function(){return p<x.length?{done:!1,value:x[p++]}:{done:!0}}}function Al(){Al=function(){};nl.Symbol||(nl.Symbol=Bl)}function Cl(x,p){this.so=x;ll(this,"description",{configurable:!0,writable:!0,value:p})}Cl.prototype.toString=function(){return this.so};
var Bl=function(){function x(m){if(this instanceof x)throw new TypeError("Symbol is not a constructor");return new Cl("jscomp_symbol_"+(m||"")+"_"+p++,m)}var p=0;return x}();function Dl(){Al();var x=nl.Symbol.iterator;x||(x=nl.Symbol.iterator=nl.Symbol("Symbol.iterator"));"function"!=typeof Array.prototype[x]&&ll(Array.prototype,x,{configurable:!0,writable:!0,value:function(){return El(zl(this))}});Dl=function(){}}
function El(x){Dl();x={next:x};x[nl.Symbol.iterator]=function(){return this};return x}function Fl(x,p){Dl();x instanceof String&&(x+="");var m=0,d={next:function(){if(m<x.length){var c=m++;return{value:p(c,x[c]),done:!1}}d.next=function(){return{done:!0,value:void 0}};return d.next()}};d[Symbol.iterator]=function(){return d};return d}ol("Array.prototype.keys",function(x){return x?x:function(){return Fl(this,function(p){return p})}});
ol("Object.is",function(x){return x?x:function(p,m){return p===m?0!==p||1/p===1/m:p!==p&&m!==m}});ol("Array.prototype.includes",function(x){return x?x:function(p,m){var d=this;d instanceof String&&(d=String(d));var c=d.length;m=m||0;for(0>m&&(m=Math.max(m+c,0));m<c;m++){var a=d[m];if(a===p||Object.is(a,p))return!0}return!1}});
ol("String.prototype.includes",function(x){return x?x:function(p,m){if(null==this)throw new TypeError("The 'this' value for String.prototype.includes must not be null or undefined");if(p instanceof RegExp)throw new TypeError("First argument to String.prototype.includes must not be a regular expression");return-1!==(this+"").indexOf(p,m||0)}});
var __extends=this&&this.__extends||function(){function x(p,m){x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,c){d.__proto__=c}||function(d,c){for(var a in c)c.hasOwnProperty(a)&&(d[a]=c[a])};return x(p,m)}return function(p,m){function d(){this.constructor=p}x(p,m);p.prototype=null===m?Object.create(m):(d.prototype=m.prototype,new d)}}();
function Gl(){var x="perspective",p=["Webkit","Moz","O","ms","Ms"],m;for(m=0;m<p.length;m++)"undefined"!==typeof document.documentElement.style[p[m]+"Perspective"]&&(x=p[m]+"Perspective");"undefined"!==typeof document.documentElement.style[x]?"webkitPerspective"in document.documentElement.style?(x=document.createElement("style"),p=document.createElement("div"),m=document.head||document.getElementsByTagName("head")[0],x.textContent="@media (-webkit-transform-3d) {#ggswhtml5{height:5px}}",m.appendChild(x),
p.id="ggswhtml5",document.documentElement.appendChild(p),m=5===p.offsetHeight,x.parentNode.removeChild(x),p.parentNode.removeChild(p)):m=!0:m=!1;return m}function Hl(){var x;if(x=!!window.WebGLRenderingContext)try{var p=document.createElement("canvas");p.width=100;p.height=100;var m=p.getContext("webgl");m||(m=p.getContext("experimental-webgl"));x=!!m}catch(d){x=!1}return x}var ggP2VR;
(function(x){var p=function(){function d(c){this.m=null;this.Lg=this.wm=this.nb=!1;this.ob=!0;this.lb=this.Ka=this.Fa=0;this.fov=70;this.hb=0;this.autoplay=this.Qg=!1;this.id="";this.v=this.pan=0;this.m=c;this.ad=this.xc=100;this.Hc=1}d.prototype.Yb=function(c){var a;if(a=c.getAttributeNode("id"))this.id=a.nodeValue.toString();if(a=c.getAttributeNode("pan"))this.pan=Number(a.nodeValue);if(a=c.getAttributeNode("tilt"))this.v=Number(a.nodeValue)};d.prototype.eo=function(c){var a="",b=this.m,e=!0;if(b.xi){var f=
new x.Ga(0,0,-100);f.Fa(-this.v*Math.PI/180);f.Ka(this.pan*Math.PI/180);f.Ka(-b.pan.j*Math.PI/180);f.Fa(b.v.j*Math.PI/180);f.lb(b.U.j*Math.PI/180);.01<=f.z&&(e=!1)}b.Nc&&(a+="perspective("+c+"px) ");a=a+("translate3d(0px,0px,"+c+"px) ")+("rotateZ("+b.U.j.toFixed(10)+"deg) ");a+="rotateX("+b.v.j.toFixed(10)+"deg) ";a+="rotateY("+(-b.pan.j).toFixed(10)+"deg) ";a+="rotateY("+this.pan.toFixed(10)+"deg) ";a+="rotateX("+(-this.v).toFixed(10)+"deg) ";c=1E4;f=this.f.videoWidth;var g=this.f.videoHeight;if(0==
f||0==g)f=640,g=480;0<this.xc&&(f=this.xc);0<this.ad&&(g=this.ad);0<f&&0<g&&(this.f.width=f,this.f.height=g,this.f.style.width=f+"px",this.f.style.height=g+"px");0<this.fov&&(c=f/(2*Math.tan(this.fov/2*Math.PI/180)));a+="translate3d(0px,0px,"+(-c).toFixed(10)+"px) ";a+="rotateZ("+this.lb.toFixed(10)+"deg) ";a+="rotateY("+(-this.Ka).toFixed(10)+"deg) ";a+="rotateX("+this.Fa.toFixed(10)+"deg) ";this.Hc&&1!=this.Hc&&(a+="scaleY("+this.Hc+") ");a+="translate3d("+-f/2+"px,"+-g/2+"px,0px) ";this.f.style[b.Ua+
"Origin"]="0% 0%";this.nb&&(a="",1==this.hb&&(a+="scale("+Math.min(b.C.width/f,b.C.height/g)+") "),a+="translate3d("+-f/2+"px,"+-g/2+"px,0px) ");this.lq!=a&&(this.lq=a,this.f.style[b.Ua]=a,this.f.style.visibility=e&&this.ob?"visible":"hidden",this.Lg&&this.wm==this.nb&&(this.f.style[b.Yc]="all 0s linear 0s"),this.wm=this.nb)};d.prototype.Yf=function(c){this.f&&(this.f.style.visibility=c?"visible":"hidden")};d.prototype.df=function(){var c=this.m;c.ga?(this.f.style.left=c.C.width/2+"px",this.f.style.top=
c.C.height/2+"px"):(this.f.style.left=c.margin.left+c.C.width/2+"px",this.f.style.top=c.margin.top+c.C.height/2+"px")};return d}();x.Ls=p;var m=function(d){function c(a){a=d.call(this,a)||this;a.ua=!1;a.On=!1;a.Zm=!1;a.cg=!1;a.Tj=!1;a.Dk=!1;a.Sd=!1;a.fc=null;a.Zh=null;a.Ch=0;a.Qe=0;a.Pf=!1;a.hr=!1;a.stopped=!1;a.url=[];a.loop=0;a.level=1;a.tc=0;a.mode=1;a.hi=10;a.zb=0;a.bg=0;a.ta=1;a.Rc=0;a.Sc=0;a.Tc=0;a.Uc=0;a.Mi=-1;return a}__extends(c,d);c.prototype.Yk=function(){var a=this,b=a.f.play();if(void 0!==
b)b.then(function(){a.lg()})["catch"](function(){a.f.pause();a.On&&(a.f.muted=!0,a.f.play())})};c.prototype.Kn=function(){this.ua&&this.stopped?this.stopped=!1:0==this.loop?this.ua?(this.fc=null,this.Xd()):this.f.play():0<this.ub?(this.ub--,this.ua||(this.f.currentTime=0),this.Tj&&(this.ic&&0==this.ic.gain.value||0==this.Hb.gain.value&&0==this.Sb.gain.value&&0==this.Qb.gain.value&&0==this.Rb.gain.value)||(this.ua?(this.fc=null,this.Xd()):this.f.play())):this.ua&&(this.fc=null,this.Pf=!1)};c.prototype.lg=
function(){this.Sd=!1;var a=this.m.va;a&&(this.ua||(this.source=a.createMediaElementSource(this.f)),2==this.mode||3==this.mode||5==this.mode?(this.Bd=a.createChannelSplitter(2),this.Hb=a.createGain(),this.Qb=a.createGain(),this.Rb=a.createGain(),this.Sb=a.createGain(),this.rg=a.createChannelMerger(2),this.ua||this.source.connect(this.Bd),this.Bd.connect(this.Hb,0),this.Bd.connect(this.Qb,0),this.Bd.connect(this.Rb,1),this.Bd.connect(this.Sb,1),this.Hb.connect(this.rg,0,0),this.Qb.connect(this.rg,
0,1),this.Rb.connect(this.rg,0,0),this.Sb.connect(this.rg,0,1),this.rg.connect(a.destination),1==this.Mi&&this.Sn()):(this.ic=a.createGain(),this.ua||this.source.connect(this.ic),this.ic.connect(a.destination)))};c.prototype.Sn=function(){1!=this.Mi||this.Sd||!this.Bd||2!=this.mode&&3!=this.mode&&5!=this.mode||(this.Bd.connect(this.Rb,0),this.Bd.connect(this.Sb,0))};c.prototype.zh=function(){var a=this.m.va;this.nb||this.Dk||(this.Hb?(this.Hb.gain.setValueAtTime(this.Rc,a.currentTime),this.Sb.gain.setValueAtTime(this.Uc,
a.currentTime),this.Qb.gain.setValueAtTime(this.Sc,a.currentTime),this.Rb.gain.setValueAtTime(this.Tc,a.currentTime)):this.ic&&this.ic.gain.setValueAtTime((this.Rc+this.Uc)/2,a.currentTime+1))};c.prototype.oj=function(){if(!this.Sd||4==this.mode||6==this.mode){var a=this.m,b=this.m.va;if(this.f||this.ua){var e,f=this.pan-a.pan.j;for(e=this.v-a.v.j;-180>f;)f+=360;for(;180<f;)f-=360;var g=this.tc,h=this.hi;0==h&&(h=.01);0>h&&(h=a.fov.j);this.ac||(this.ac=new x.Ga,this.ac.Ul(this.pan,this.v));0!=this.mode&&
1!=this.mode||!b||this.ic&&this.ic.gain.setValueAtTime(this.level*a.ba*this.ta,b.currentTime);if(2==this.mode&&b){var l=.5*Math.cos(f*Math.PI/180)+.5;this.Rc=Math.sqrt(l)*this.ta*this.level*a.ba;this.Uc=Math.sqrt(l)*this.ta*this.level*a.ba;this.Sc=Math.sqrt(1-l)*this.ta*this.level*a.ba;this.Tc=Math.sqrt(1-l)*this.ta*this.level*a.ba;this.zh()}if(3==this.mode){f=0>f?f<-this.zb?f+this.zb:0:f>this.zb?f-this.zb:0;var k=this.level;e=Math.abs(e);e=e<this.bg?0:e-this.bg;var w=1-e/h;if(Math.abs(f)>h||0>w)l=
k*g*a.ba,b?(this.Rc=l*this.ta,this.Uc=l*this.ta,this.Tc=this.Sc=0,this.zh()):this.f.volume=k*g*a.ba;else if(l=1-Math.abs(f/h),b){var r=k*(g+(1-g)*w*l)*a.ba;l=k*g*a.ba;0<=f?(this.Rc=r*this.ta,this.Uc=l*this.ta):(this.Rc=l*this.ta,this.Uc=r*this.ta);2*Math.abs(f)<h?(l=1-Math.abs(2*f)/h,r=k*(g+(1-g)*w*l)*a.ba,l=.5*k*(1-g)*w*(1-l)*a.ba,0<=f?(this.Uc=r*this.ta,this.Tc=l*this.ta,this.Sc=0):(this.Rc=r*this.ta,this.Sc=l*this.ta,this.Tc=0)):(l=1-(Math.abs(2*f)-h)/h,r=.5*k*(1-g)*w*l*a.ba,0<=f?(this.Tc=r*this.ta,
this.Sc=0):(this.Sc=r*this.ta,this.Tc=0));this.zh()}else this.f.volume=k*(g+(1-g)*w*l)*a.ba}4==this.mode&&(Math.abs(f)<this.zb&&Math.abs(e)<this.bg?this.cg||(this.cg=!0,this.ub=this.loop-1,a.vf||(this.f.play(),this.Sd&&this.lg())):this.cg=!1);5==this.mode&&(e=180*Math.acos(a.Lj.Qi(this.ac))/Math.PI,e<this.zb?b?(this.Rc=this.level*a.ba*this.ta,this.Uc=this.level*a.ba*this.ta,this.Tc=this.Sc=0,this.zh()):this.f.volume=this.level*a.ba:b?(e<this.zb+h?(f=0>f?f>-this.zb?0:f+this.zb:f<this.zb?0:f-this.zb,
r=1-Math.max(e-this.zb,0)/h,l=Math.max(1-Math.abs(f)*Math.cos(this.v*Math.PI/180)/h,0),0<f?(this.Rc=this.level*(r*(1-this.tc)+this.tc)*a.ba*this.ta,this.Uc=this.level*(r*l*(1-this.tc)+this.tc)*a.ba*this.ta,this.Sc=0,this.Tc=this.level*r*(1-l)*a.ba*this.ta):(this.Rc=this.level*(r*l*(1-this.tc)+this.tc)*a.ba*this.ta,this.Uc=this.level*(r*(1-this.tc)+this.tc)*a.ba*this.ta,this.Sc=this.level*r*(1-l)*a.ba*this.ta,this.Tc=0)):(r=this.level*this.tc*a.ba,this.Rc=r*this.ta,this.Uc=r*this.ta,this.Tc=this.Sc=
0),this.zh()):(e-=this.zb,e<h&&0<h?(l=1-Math.abs(e/h),this.f.volume=this.level*(g+(1-g)*l)*a.ba):this.f.volume=g*a.ba));6==this.mode&&(e=180*Math.acos(a.Lj.Qi(this.ac))/Math.PI,Math.abs(e)<this.zb?this.cg||(this.cg=!0,this.ub=this.loop-1,this.ua?this.Pf||this.Xd():this.f.play()):this.cg=!1)}}};c.prototype.ep=function(){var a=this;a.fc=this.m.va.createBufferSource();a.fc.addEventListener("ended",function(){a.Kn()},!1);2==a.mode||3==a.mode||5==a.mode?a.fc.connect(a.Bd):a.fc.connect(a.ic)};c.prototype.Xd=
function(){var a=this.m.va,b=this.Qe;this.Zh?(null==this.fc&&(this.ep(),this.fc.buffer=this.Zh),this.Ch=a.currentTime-b,this.Qe=0,this.Pf=!0,this.stopped=!1,this.fc.start(0,b),this.m.N("buffer Source started")):(this.m.N("bufferSoundPlay() -> no audio buffer -> playWhenReady"),this.hr=!0)};c.prototype.yj=function(){var a=this.m.va.currentTime-this.Ch;this.nf();this.Qe=a};c.prototype.nf=function(){this.fc&&this.Pf&&(this.stopped=!0,this.fc.disconnect(),this.fc.stop(0),this.fc=null);this.Ch=this.Qe=
0;this.Pf=!1};c.prototype.Ro=function(){var a=this.m.va;return this.Qe?this.Qe:this.Ch?a.currentTime-this.Ch:0};c.prototype.So=function(a){this.nf();this.Qe=a;this.Xd()};c.prototype.addElement=function(){var a=-1,b=this,e=this.m,f=this.m.va;try{for(var g=!1,h=0;h<e.X.length;h++)e.X[h].id==b.id&&(a=h,null==e.X[h].f&&!e.X[h].ua||e.X[h].url.join()!=b.url.join()||e.X[h].loop!=b.loop||e.X[h].mode!=b.mode||(g=!0,e.X[h].pan=b.pan,e.X[h].v=b.v,e.X[h].level=b.level,e.X[h].tc=b.tc,e.X[h].hi=b.hi,e.X[h].zb=
b.zb,e.X[h].bg=b.bg));if(g)e.N("Keep playing "+b.id);else{if(0<=a){var l=e.X[a];if(null!=l.f||l.ua)if(f&&e.Xa.enabled)e.Xa.Ih.push(l),1!=e.J.ra&&2!=e.J.ra&&6!=e.J.ra&&e.Xa.Ql(l);else{try{l.ua?l.yj():l.f.pause()}catch(w){e.N(w)}try{l.Se()}catch(w){e.N(w)}}}f&&(this.Sd=!0);b.f=document.createElement("audio");b.f.crossOrigin=e.crossOrigin;b.f.setAttribute("class","ggmedia");e.Ef&&b.f.setAttribute("id",e.Ef+b.id);for(h=0;h<b.url.length;h++)g=void 0,g=document.createElement("source"),""!=b.url[h]&&"#"!=
b.url[h]&&(g.crossOrigin=e.crossOrigin,g.setAttribute("src",e.Pb(b.url[h])),b.f.appendChild(g));b.f.volume=b.level*e.ba;if(0<b.f.childNodes.length&&(e.$.appendChild(b.f),b.f.addEventListener("ended",function(){b.Kn()},!1),f)){b.Tj=!1;0==b.loop&&b.source&&b.source.mediaElement&&(b.source.mediaElement.loop=!0);var k=new XMLHttpRequest;k.open("GET",e.Pb(b.url[0]),!0);k.responseType="arraybuffer";k.onload=function(){f.decodeAudioData(k.response,function(w){b.Mi=w.numberOfChannels;1==b.Mi&&b.Sn()})};k.send()}1<=
b.loop&&(b.ub=b.loop-1);0<=a?e.X[a]=b:e.X.push(b);b.oj();-1!=this.m.hd.indexOf(b.id)||-1!=this.m.hd.indexOf("_main")&&-1==this.m.se.indexOf(b.id)||(1!=b.mode&&2!=b.mode&&3!=b.mode&&5!=b.mode||!(0<=b.loop)||f&&e.Xa.enabled||(b.ua||(b.f.autoplay=!0,b.Yk()),b.autoplay=!0),0==b.mode&&0<=b.loop&&(b.autoplay=!0,b.Yk()))}}catch(w){this.m.N(w)}};c.prototype.Se=function(){try{this.m.N("Remove Snd:"+this.id),this.ua||(this.m.$.removeChild(this.f),this.f=null)}catch(a){this.m.N(a)}};c.prototype.Yb=function(a){d.prototype.Yb.call(this,
a);var b;(b=a.getAttributeNode("url"))&&this.url.push(b.nodeValue.toString());if(b=a.getAttributeNode("level"))this.level=Number(b.nodeValue);if(b=a.getAttributeNode("loop"))this.loop=Number(b.nodeValue);if(b=a.getAttributeNode("mode"))this.mode=Number(b.nodeValue);if(b=a.getAttributeNode("nodechangekeep"))this.Zm=1==Number(b.nodeValue);if(b=a.getAttributeNode("field"))this.hi=Number(b.nodeValue);if(b=a.getAttributeNode("ambientlevel"))this.tc=Number(b.nodeValue);if(b=a.getAttributeNode("pansize"))this.zb=
Number(b.nodeValue);if(b=a.getAttributeNode("tiltsize"))this.bg=Number(b.nodeValue);for(a=a.firstChild;a;)"source"==a.nodeName&&(b=a.getAttributeNode("url"))&&this.url.push(b.nodeValue.toString()),a=a.nextSibling};return c}(p);x.Bo=m;m=function(d){function c(a){a=d.call(this,a)||this;a.poster="";a.Fa=0;a.Ka=0;a.lb=0;a.fov=50;a.hb=0;a.Qg=!1;a.dd=!1;return a}__extends(c,d);c.prototype.Ie=function(){1!=this.hb&&4!=this.hb||this.Ng(!this.nb);2==this.hb&&this.m.gn(this.id)};c.prototype.Ng=function(a){var b=
this.m,e=b.va;if(1==this.hb||4==this.hb)if(this.nb=a,this.m.Nb)(b=b.qa)&&b.activateSound(this.id,this.nb?1:0);else{if(this.nb)this.f.style.pointerEvents="auto",this.f.style.cursor="pointer",this.f.style.zIndex=(b.Rh+8E4).toString(),this.f.style[this.m.Yc]="all 1s ease 0s",this.m.isPlaying(this.id)||b.ge(this.id);else{this.f.style.pointerEvents="none";this.f.style.cursor="default";this.f.style.zIndex=b.Rh.toString();this.f.style[this.m.Yc]="all 1s ease 0s";this.m.isPlaying(this.id)&&b.dj(this.id);
this.Dk=!0;var f=this;setTimeout(function(){f.Dk=!1},1E3)}if(e&&(2==this.mode||3==this.mode||5==this.mode)&&(e=e.currentTime,this.Hb&&this.Sb&&this.Qb.gain&&this.Qb&&this.Rb)){var g=this.Hb.gain.value,h=this.Sb.gain.value,l=this.Qb.gain.value,k=this.Rb.gain.value;this.nb?(this.Hb.gain.linearRampToValueAtTime(g,e),this.Hb.gain.linearRampToValueAtTime(this.level*b.ba,e+1),this.Sb.gain.linearRampToValueAtTime(h,e),this.Sb.gain.linearRampToValueAtTime(this.level*b.ba,e+1),this.Qb.gain.linearRampToValueAtTime(l,
e),this.Qb.gain.linearRampToValueAtTime(0,e+1),this.Rb.gain.linearRampToValueAtTime(k,e),this.Rb.gain.linearRampToValueAtTime(0,e+1)):(this.Hb.gain.linearRampToValueAtTime(g,e),this.Hb.gain.linearRampToValueAtTime(this.Rc,e+1),this.Sb.gain.linearRampToValueAtTime(h,e),this.Sb.gain.linearRampToValueAtTime(this.Uc,e+1),this.Qb.gain.linearRampToValueAtTime(l,e),this.Qb.gain.linearRampToValueAtTime(this.Sc,e+1),this.Rb.gain.linearRampToValueAtTime(k,e),this.Rb.gain.linearRampToValueAtTime(this.Tc,e+1))}this.Lg=
!0;this.m.fo()}2==this.hb&&(a?this.m.ge(this.id):this.m.Ck(this.id))};c.prototype.Og=function(){this.Lg=!1;this.f.style[this.m.Yc]="none"};c.prototype.Cs=function(){0==this.loop?this.f.play():0<this.ub?(this.ub--,this.f.currentTime=0,this.f.play()):this.isRunning=!1};c.prototype.Yb=function(a){d.prototype.Yb.call(this,a);var b;if(b=a.getAttributeNode("poster"))this.poster=String(b.nodeValue);if(b=a.getAttributeNode("rotx"))this.Fa=Number(b.nodeValue);if(b=a.getAttributeNode("roty"))this.Ka=Number(b.nodeValue);
if(b=a.getAttributeNode("rotz"))this.lb=Number(b.nodeValue);if(b=a.getAttributeNode("fov"))this.fov=Number(b.nodeValue);if(b=a.getAttributeNode("width"))this.xc=Number(b.nodeValue);if(b=a.getAttributeNode("height"))this.ad=Number(b.nodeValue);this.Hc=(b=a.getAttributeNode("stretch"))?Number(b.nodeValue):1;if(b=a.getAttributeNode("clickmode"))this.hb=Number(b.nodeValue);if(b=a.getAttributeNode("handcursor"))this.Qg=1==Number(b.nodeValue);if(b=a.getAttributeNode("startmutedmobile"))this.On=1==Number(b.nodeValue)};
c.prototype.addElement=function(){var a=this,b=this.m,e=this.m.va;try{a.f=document.createElement("video");a.f.setAttribute("class","ggmedia");a.f.crossOrigin=b.crossOrigin;a.f.hidden=!0;a.f.addEventListener("click",function(h){h.stopPropagation()});b.Ef&&a.f.setAttribute("id",b.Ef+a.id);if(b.Nh)a.f.setAttribute("playsinline","playsinline"),a.f.setAttribute("style","display: none; max-width:none;");else if(a.f.setAttribute("style","max-width:none;pointer-events:none;"),a.f.setAttribute("playsinline",
"playsinline"),1==a.hb||4==a.hb)a.f.addEventListener(b.po(),function(){a.Og()},!1),a.f.addEventListener("transitionend",function(){a.Og()},!1);var f=void 0;for(f=0;f<a.url.length;f++){var g=void 0;g=document.createElement("source");g.crossOrigin=b.crossOrigin;g.setAttribute("src",b.Pb(a.url[f]));a.f.appendChild(g)}""!=a.poster&&(a.f.poster=b.Pb(a.poster),0>a.loop&&(a.f.preload="none"));a.f.volume=a.level*b.ba;1<=a.loop&&(a.ub=a.loop-1);e&&(this.Sd=!0);(1==a.mode||2==a.mode||3==a.mode||5==a.mode)&&
0<=a.loop&&(a.f.autoplay=!0,a.isRunning=!0,a.autoplay=!0,a.Yk());b.S.push(this);b.Nh?b.$.appendChild(a.f):(a.f.style.position="absolute",a.xc&&(a.f.width=a.xc),a.ad&&(a.f.height=a.ad),b.K.appendChild(a.f));a.f.addEventListener("ended",function(){a.Cs()},!1)}catch(h){b.N(h)}};c.prototype.registerElement=function(a,b){this.dd=!0;this.f=b;this.id=a;this.level=1;this.m.S.push(this)};c.prototype.Se=function(){var a=this.m;a.Nh&&(a.R.deleteTexture(this.texture),this.texture=0,a.$.removeChild(this.f));a.ho&&
a.K.removeChild(this.f);this.f=null};return c}(m);x.nl=m;m=function(d){function c(a){a=d.call(this,a)||this;a.url="";a.Fa=0;a.Ka=0;a.lb=0;a.fov=50;a.hb=0;a.Qg=!1;a.xc=100;a.ad=100;a.Hc=1;return a}__extends(c,d);c.prototype.Yb=function(a){d.prototype.Yb.call(this,a);var b;if(b=a.getAttributeNode("url"))this.url=b.nodeValue.toString();if(b=a.getAttributeNode("rotx"))this.Fa=Number(b.nodeValue);if(b=a.getAttributeNode("roty"))this.Ka=Number(b.nodeValue);if(b=a.getAttributeNode("rotz"))this.lb=Number(b.nodeValue);
if(b=a.getAttributeNode("fov"))this.fov=Number(b.nodeValue);if(b=a.getAttributeNode("width"))this.xc=Number(b.nodeValue);if(b=a.getAttributeNode("height"))this.ad=Number(b.nodeValue);this.Hc=(b=a.getAttributeNode("stretch"))?Number(b.nodeValue):1;if(b=a.getAttributeNode("clickmode"))this.hb=Number(b.nodeValue);if(b=a.getAttributeNode("handcursor"))this.Qg=1==Number(b.nodeValue);for(a=a.firstChild;a;)"source"==a.nodeName&&(b=a.getAttributeNode("url"))&&(this.url=b.nodeValue.toString()),a=a.nextSibling};
c.prototype.Og=function(){this.Lg=!1;this.f.style[this.m.Yc]="none"};c.prototype.Ie=function(){1!==this.hb&&4!==this.hb||this.Ng(!this.nb)};c.prototype.Ng=function(a){var b=this.m;if(1===this.hb||4===this.hb)this.nb=a,this.m.Nb?(a=this.m.qa)&&a.activateSound(this.id,this.nb?1:0):(this.nb?(this.f.style.pointerEvents="auto",this.f.style.cursor="pointer",this.f.style.zIndex=(b.Rh+8E4).toString()):(this.f.style.pointerEvents="none",this.f.style.cursor="default",this.f.style.zIndex=b.Rh.toString()),this.f.style[b.Yc]=
"all 1s ease 0s",this.Lg=!0,b.ao())};c.prototype.addElement=function(){var a=this,b=this.m;try{a.f=document.createElement("img");a.f.setAttribute("style","-webkit-user-drag:none; max-width:none; pointer-events:none;");a.f.setAttribute("class","ggmedia");a.f.hidden=!0;a.f.addEventListener("click",function(e){e.stopPropagation()});b.Ef&&a.f.setAttribute("id",b.Ef+a.id);a.f.ondragstart=function(){return!1};if(1===a.hb||4===a.hb)a.f.addEventListener(b.po(),function(){a.Og()},!1),a.f.addEventListener("transitionend",
function(){a.Og()},!1);a.f.setAttribute("src",b.Pb(a.url));a.xc&&(a.f.width=a.xc);a.ad&&(a.f.height=a.ad);b.eb.push(a);a.f.style.position="absolute";b.K.appendChild(a.f)}catch(e){b.N("Error addimage:"+e)}};c.prototype.Se=function(){this.m.K.removeChild(this.f);this.f=null};return c}(p);x.zo=m;p=function(d){function c(a){a=d.call(this,a)||this;a.vl=50;a.alpha=50;a.type=0;a.color=16777215;return a}__extends(c,d);c.prototype.Yb=function(a){d.prototype.Yb.call(this,a);var b;if(b=a.getAttributeNode("blinding"))this.vl=
Number(b.nodeValue);if(b=a.getAttributeNode("alpha"))this.alpha=Number(b.nodeValue);if(b=a.getAttributeNode("type"))this.type=Number(b.nodeValue);if(b=a.getAttributeNode("color"))this.color=1*Number(b.nodeValue)};return c}(p);x.Ao=p;p=function(){function d(c){this.m=c;this.type="empty";this.Qk=this.id=this.target=this.description=this.title=this.url="";this.w=100;this.h=20;this.rj=!1;this.f=null;this.Ab=this.Xb=this.gb=this.wa=this.distance=this.v=this.pan=0;this.visible=!0;this.ec=c.H.ec;this.cc=
c.H.cc;this.dc=c.H.dc;this.bc=c.H.bc;this.Bf=c.H.Bf;this.Xc="";this.Cd=this.Ae=0;this.eg=!1;this.fi=0;this.vertices=[]}d.prototype.uf=function(){this.id=this.id;this.pan=this.pan;this.tilt=this.v;this.url=this.url;this.target=this.target;this.title=this.title;this.distance=this.distance;this.description=this.description;this.skinid=this.Qk;this.obj=this.f;this.customimage=this.Xc;this.customimagewidth=this.Ae;this.customimageheight=this.Cd;this.use3D=this.eg;this.distance3D=this.fi;this.f&&this.f.__div&&
(this.div=this.f.__div)};d.prototype.gs=function(){var c=this.url;return"{"==c.charAt(0)?c.substr(1,c.length-2):!1};d.prototype.Yb=function(c){var a;if(a=c.getAttributeNode("url"))this.url=a.nodeValue.toString();if(a=c.getAttributeNode("target"))this.target=a.nodeValue.toString();if(a=c.getAttributeNode("title"))this.title=a.nodeValue.toString();if(a=c.getAttributeNode("description"))this.description=a.nodeValue.toString();if(a=c.getAttributeNode("id"))this.id=a.nodeValue.toString();if(a=c.getAttributeNode("skinid"))this.Qk=
a.nodeValue.toString();if(a=c.getAttributeNode("width"))this.w=Number(a.nodeValue);if(a=c.getAttributeNode("height"))this.h=Number(a.nodeValue);if(a=c.getAttributeNode("wordwrap"))this.rj=1==Number(a.nodeValue);a=c.getAttributeNode("pan");this.pan=1*(a?Number(a.nodeValue):0);a=c.getAttributeNode("tilt");this.v=1*(a?Number(a.nodeValue):0);a=c.getAttributeNode("fov");this.fov=1*(a?Number(a.nodeValue):0);a=c.getAttributeNode("distance");this.distance=1*(a?Number(a.nodeValue):0);if(a=c.getAttributeNode("bordercolor"))this.ec=
1*Number(a.nodeValue);if(a=c.getAttributeNode("backgroundcolor"))this.cc=1*Number(a.nodeValue);if(a=c.getAttributeNode("borderalpha"))this.dc=1*Number(a.nodeValue);if(a=c.getAttributeNode("backgroundalpha"))this.bc=1*Number(a.nodeValue);if(a=c.getAttributeNode("handcursor"))this.Bf=1==Number(a.nodeValue);if(a=c.getAttributeNode("customimage"))this.Xc=this.m.dm()+a.nodeValue;if(a=c.getAttributeNode("customimagewidth"))this.Ae=Number(a.nodeValue);if(a=c.getAttributeNode("customimageheight"))this.Cd=
Number(a.nodeValue);if(a=c.getAttributeNode("use3D"))this.eg=1==Number(a.nodeValue);if(a=c.getAttributeNode("distance3D"))this.fi=Number(a.nodeValue);for(c=c.firstChild;c;){if("polystring"==c.nodeName){a=c.textContent.toString().split("|");for(var b=0;b<a.length;b++){var e=a[b].split("/");if(2==e.length){var f={pan:0,v:0};f.pan=Number(e[0]);f.v=Number(e[1]);this.vertices.push(f)}}}"vertex"==c.nodeName&&(f={pan:0,v:0},a=c.getAttributeNode("pan"),f.pan=1*(a?Number(a.nodeValue):0),a=c.getAttributeNode("tilt"),
f.v=1*(a?Number(a.nodeValue):0),this.vertices.push(f));c=c.nextSibling}this.uf()};return d}();x.Uh=p})(ggP2VR||(ggP2VR={}));
(function(x){var p=function(){function m(d,c){this.x=d;this.y=c}m.prototype.init=function(d,c){this.x=d;this.y=c};m.prototype.Gd=function(d,c,a){var b=c.y-d.y;this.x=d.x+(c.x-d.x)*a;this.y=d.y+b*a};m.prototype.Qo=function(d,c,a,b,e){var f=new m;f.Gd(d,a,e);d=new m;d.Gd(a,b,e);a=new m;a.Gd(b,c,e);c=new m;c.Gd(f,d,e);f=new m;f.Gd(d,a,e);d=new m;d.Gd(c,f,e);this.x=d.x;this.y=d.y};m.prototype.wj=function(d,c,a,b,e){var f=new m,g=.5,h=.25;do{f.Qo(d,c,a,b,g);var l=f.x-e;g=0<l?g-h:g+h;h/=2}while(.01<Math.abs(l));
this.x=f.x;this.y=f.y};return m}();x.Fc=p})(ggP2VR||(ggP2VR={}));
(function(x){var p=function(){function m(d,c,a,b,e){this.x=d;this.y=c;this.z=a;this.zd=b;this.ac=e}m.prototype.init=function(d,c,a,b,e){this.x=d;this.y=c;this.z=a;this.zd=b;this.ac=e};m.prototype.toString=function(){return"("+this.x+","+this.y+","+this.z+") - ("+this.zd+","+this.ac+")"};m.prototype.Fa=function(d){var c=Math.sin(d);d=Math.cos(d);var a=this.y,b=this.z;this.y=d*a-c*b;this.z=c*a+d*b};m.prototype.pr=function(){var d=this.y;this.y=-this.z;this.z=d};m.prototype.nr=function(){var d=this.y;
this.y=this.z;this.z=-d};m.prototype.Ka=function(d){var c=Math.sin(d);d=Math.cos(d);var a=this.x,b=this.z;this.x=d*a+c*b;this.z=-c*a+d*b};m.prototype.qr=function(){var d=this.x;this.x=-this.z;this.z=d};m.prototype.lb=function(d){var c=Math.sin(d);d=Math.cos(d);var a=this.x,b=this.y;this.x=d*a-c*b;this.y=c*a+d*b};m.prototype.vn=function(){var d=this.x;this.x=-this.y;this.y=d};m.prototype.Od=function(d){this.Fa(d*Math.PI/180)};m.prototype.Ue=function(d){this.Ka(d*Math.PI/180)};m.prototype.Ve=function(d){this.lb(d*
Math.PI/180)};m.prototype.clone=function(){return new m(this.x,this.y,this.z,this.zd,this.ac)};m.prototype.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)};m.prototype.normalize=function(){var d=this.length();0<d&&(d=1/d,this.x*=d,this.y*=d,this.z*=d)};m.prototype.Qi=function(d){return this.x*d.x+this.y*d.y+this.z*d.z};m.prototype.Ul=function(d,c){var a=Math.cos(c*Math.PI/180);this.x=a*Math.sin(d*Math.PI/180);this.y=Math.sin(c*Math.PI/180);this.z=a*Math.cos(d*Math.PI/
180)};m.prototype.Mo=function(){return 180*Math.atan2(-this.x,-this.z)/Math.PI};m.prototype.No=function(){return 180*Math.asin(this.y/this.length())/Math.PI};m.prototype.Gd=function(d,c,a){this.x=d.x*a+c.x*(1-a);this.y=d.y*a+c.y*(1-a);this.z=d.z*a+c.z*(1-a);this.zd=d.zd*a+c.zd*(1-a);this.ac=d.ac*a+c.ac*(1-a)};return m}();x.Ga=p})(ggP2VR||(ggP2VR={}));
(function(x){var p=function(){function m(){this.An()}m.prototype.An=function(){this.kc=1;this.zc=this.lc=this.Kb=0;this.mc=1;this.nc=this.Ub=this.Ac=0;this.Vb=1};m.prototype.clone=function(d){this.kc=d.kc;this.Kb=d.Kb;this.lc=d.lc;this.zc=d.zc;this.mc=d.mc;this.Ac=d.Ac;this.Ub=d.Ub;this.nc=d.nc;this.Vb=d.Vb};m.prototype.Hr=function(d){var c=Math.cos(d);d=Math.sin(d);this.kc=1;this.zc=this.lc=this.Kb=0;this.mc=c;this.Ac=-d;this.Ub=0;this.nc=d;this.Vb=c};m.prototype.Ir=function(d){var c=Math.cos(d);
d=Math.sin(d);this.kc=c;this.Kb=0;this.lc=d;this.zc=0;this.mc=1;this.Ac=0;this.Ub=-d;this.nc=0;this.Vb=c};m.prototype.Jr=function(d){var c=Math.cos(d);d=Math.sin(d);this.kc=c;this.Kb=-d;this.lc=0;this.zc=d;this.mc=c;this.nc=this.Ub=this.Ac=0;this.Vb=1};m.prototype.Er=function(d){this.Hr(d*Math.PI/180)};m.prototype.Fr=function(d){this.Ir(d*Math.PI/180)};m.prototype.Gr=function(d){this.Jr(d*Math.PI/180)};m.prototype.Od=function(d){this.cd||(this.cd=new m,this.de=new m);this.cd.Er(d);this.de.clone(this);
this.multiply(this.cd,this.de)};m.prototype.Ue=function(d){this.cd||(this.cd=new m,this.de=new m);this.cd.Fr(d);this.de.clone(this);this.multiply(this.cd,this.de)};m.prototype.Ve=function(d){this.cd||(this.cd=new m,this.de=new m);this.cd.Gr(d);this.de.clone(this);this.multiply(this.cd,this.de)};m.prototype.multiply=function(d,c){this.kc=d.kc*c.kc+d.Kb*c.zc+d.lc*c.Ub;this.Kb=d.kc*c.Kb+d.Kb*c.mc+d.lc*c.nc;this.lc=d.kc*c.lc+d.Kb*c.Ac+d.lc*c.Vb;this.zc=d.zc*c.kc+d.mc*c.zc+d.Ac*c.Ub;this.mc=d.zc*c.Kb+
d.mc*c.mc+d.Ac*c.nc;this.Ac=d.zc*c.lc+d.mc*c.Ac+d.Ac*c.Vb;this.Ub=d.Ub*c.kc+d.nc*c.zc+d.Vb*c.Ub;this.nc=d.Ub*c.Kb+d.nc*c.mc+d.Vb*c.nc;this.Vb=d.Ub*c.lc+d.nc*c.Ac+d.Vb*c.Vb};m.prototype.Iq=function(d){var c=d.x;var a=d.y;var b=d.z;d.x=c*this.kc+a*this.Kb+b*this.lc;d.y=c*this.zc+a*this.mc+b*this.Ac;d.z=c*this.Ub+a*this.nc+b*this.Vb};return m}();x.jl=p})(ggP2VR||(ggP2VR={}));
(function(x){x.ja={create:function(p){var m="undefined"!=typeof Float32Array?new Float32Array(16):Array(16);p&&(m[0]=p[0],m[1]=p[1],m[2]=p[2],m[3]=p[3],m[4]=p[4],m[5]=p[5],m[6]=p[6],m[7]=p[7],m[8]=p[8],m[9]=p[9],m[10]=p[10],m[11]=p[11],m[12]=p[12],m[13]=p[13],m[14]=p[14],m[15]=p[15]);return m},set:function(p,m){m[0]=p[0];m[1]=p[1];m[2]=p[2];m[3]=p[3];m[4]=p[4];m[5]=p[5];m[6]=p[6];m[7]=p[7];m[8]=p[8];m[9]=p[9];m[10]=p[10];m[11]=p[11];m[12]=p[12];m[13]=p[13];m[14]=p[14];m[15]=p[15];return m},identity:function(p){p[0]=
1;p[1]=0;p[2]=0;p[3]=0;p[4]=0;p[5]=1;p[6]=0;p[7]=0;p[8]=0;p[9]=0;p[10]=1;p[11]=0;p[12]=0;p[13]=0;p[14]=0;p[15]=1;return p},multiply:function(p,m,d){d||(d=p);var c=p[0],a=p[1],b=p[2],e=p[3],f=p[4],g=p[5],h=p[6],l=p[7],k=p[8],w=p[9],r=p[10],y=p[11],z=p[12],ha=p[13],ua=p[14];p=p[15];var id=m[0],sh=m[1],db=m[2],gl=m[3],tf=m[4],hl=m[5],il=m[6],kl=m[7],jl=m[8],ml=m[9],pl=m[10],ql=m[11],rl=m[12],sl=m[13],tl=m[14];m=m[15];d[0]=id*c+sh*f+db*k+gl*z;d[1]=id*a+sh*g+db*w+gl*ha;d[2]=id*b+sh*h+db*r+gl*ua;d[3]=id*
e+sh*l+db*y+gl*p;d[4]=tf*c+hl*f+il*k+kl*z;d[5]=tf*a+hl*g+il*w+kl*ha;d[6]=tf*b+hl*h+il*r+kl*ua;d[7]=tf*e+hl*l+il*y+kl*p;d[8]=jl*c+ml*f+pl*k+ql*z;d[9]=jl*a+ml*g+pl*w+ql*ha;d[10]=jl*b+ml*h+pl*r+ql*ua;d[11]=jl*e+ml*l+pl*y+ql*p;d[12]=rl*c+sl*f+tl*k+m*z;d[13]=rl*a+sl*g+tl*w+m*ha;d[14]=rl*b+sl*h+tl*r+m*ua;d[15]=rl*e+sl*l+tl*y+m*p;return d},translate:function(p,m,d){var c=m[0],a=m[1];m=m[2];if(!d||p==d)return p[12]=p[0]*c+p[4]*a+p[8]*m+p[12],p[13]=p[1]*c+p[5]*a+p[9]*m+p[13],p[14]=p[2]*c+p[6]*a+p[10]*m+p[14],
p[15]=p[3]*c+p[7]*a+p[11]*m+p[15],p;var b=p[0],e=p[1],f=p[2],g=p[3],h=p[4],l=p[5],k=p[6],w=p[7],r=p[8],y=p[9],z=p[10],ha=p[11];d[0]=b;d[1]=e;d[2]=f;d[3]=g;d[4]=h;d[5]=l;d[6]=k;d[7]=w;d[8]=r;d[9]=y;d[10]=z;d[11]=ha;d[12]=b*c+h*a+r*m+p[12];d[13]=e*c+l*a+y*m+p[13];d[14]=f*c+k*a+z*m+p[14];d[15]=g*c+w*a+ha*m+p[15];return d},scale:function(p,m,d){var c=m[0],a=m[1];m=m[2];if(!d||p==d)return p[0]*=c,p[1]*=c,p[2]*=c,p[3]*=c,p[4]*=a,p[5]*=a,p[6]*=a,p[7]*=a,p[8]*=m,p[9]*=m,p[10]*=m,p[11]*=m,p;d[0]=p[0]*c;d[1]=
p[1]*c;d[2]=p[2]*c;d[3]=p[3]*c;d[4]=p[4]*a;d[5]=p[5]*a;d[6]=p[6]*a;d[7]=p[7]*a;d[8]=p[8]*m;d[9]=p[9]*m;d[10]=p[10]*m;d[11]=p[11]*m;d[12]=p[12];d[13]=p[13];d[14]=p[14];d[15]=p[15];return d},rotate:function(p,m,d,c){var a=d[0],b=d[1];d=d[2];var e=Math.sqrt(a*a+b*b+d*d);if(!e)return null;1!=e&&(e=1/e,a*=e,b*=e,d*=e);var f=Math.sin(m),g=Math.cos(m),h=1-g;m=p[0];e=p[1];var l=p[2],k=p[3],w=p[4],r=p[5],y=p[6],z=p[7],ha=p[8],ua=p[9],id=p[10],sh=p[11],db=a*a*h+g,gl=b*a*h+d*f,tf=d*a*h-b*f,hl=a*b*h-d*f,il=b*
b*h+g,kl=d*b*h+a*f,jl=a*d*h+b*f;a=b*d*h-a*f;b=d*d*h+g;c?p!=c&&(c[12]=p[12],c[13]=p[13],c[14]=p[14],c[15]=p[15]):c=p;c[0]=m*db+w*gl+ha*tf;c[1]=e*db+r*gl+ua*tf;c[2]=l*db+y*gl+id*tf;c[3]=k*db+z*gl+sh*tf;c[4]=m*hl+w*il+ha*kl;c[5]=e*hl+r*il+ua*kl;c[6]=l*hl+y*il+id*kl;c[7]=k*hl+z*il+sh*kl;c[8]=m*jl+w*a+ha*b;c[9]=e*jl+r*a+ua*b;c[10]=l*jl+y*a+id*b;c[11]=k*jl+z*a+sh*b;return c},pp:function(p,m,d,c,a,b,e){e||(e=x.ja.create());var f=m-p,g=c-d,h=b-a;e[0]=2*a/f;e[1]=0;e[2]=0;e[3]=0;e[4]=0;e[5]=2*a/g;e[6]=0;e[7]=
0;e[8]=(m+p)/f;e[9]=(c+d)/g;e[10]=-(b+a)/h;e[11]=-1;e[12]=0;e[13]=0;e[14]=-(b*a*2)/h;e[15]=0;return e},perspective:function(p,m,d,c,a){p=d*Math.tan(p*Math.PI/360);m*=p;return x.ja.pp(-m,m,-p,p,d,c,a)},Ps:function(p,m,d,c,a,b,e){e||(e=x.ja.create());var f=m-p,g=c-d,h=b-a;e[0]=2/f;e[1]=0;e[2]=0;e[3]=0;e[4]=0;e[5]=2/g;e[6]=0;e[7]=0;e[8]=0;e[9]=0;e[10]=-2/h;e[11]=0;e[12]=-(p+m)/f;e[13]=-(c+d)/g;e[14]=-(b+a)/h;e[15]=1;return e}}})(ggP2VR||(ggP2VR={}));
(function(x){var p=function(){function m(d){this.ya=x.ja.create();this.yb=x.ja.create();this.rd=0;this.ib=[];this.Yg=!1;this.Uk=this.Wj=this.Hk=1;this.qf=1E6;this.ci=[!1,!1,!1,!1,!1,!1];this.cj=!1;this.Pj=[];this.kl=8;this.Aq=new x.jl;this.Zd=[];this.m=d;if(d.Id||d.Ug)d.Fh=2}m.prototype.Tg=function(){var d=this.m.R;if(d){var c=d.createShader(d.FRAGMENT_SHADER);d.shaderSource(c,"#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}");
d.compileShader(c);d.getShaderParameter(c,d.COMPILE_STATUS)||(console&&console.log(d.getShaderInfoLog(c)),alert(d.getShaderInfoLog(c)),c=null);var a=d.createShader(d.VERTEX_SHADER);this.$c(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=d.createProgram();this.Kf(this.O,a,c);this.O.ia=d.getAttribLocation(this.O,"aVertexPosition");d.enableVertexAttribArray(this.O.ia);this.O.La=d.getAttribLocation(this.O,"aTextureCoord");d.enableVertexAttribArray(this.O.La);this.O.fe=d.getUniformLocation(this.O,"uPMatrix");this.O.oh=d.getUniformLocation(this.O,"uMVMatrix");this.O.Vf=d.getUniformLocation(this.O,"uSampler");this.O.sj=d.getUniformLocation(this.O,"uZoffset");c=d.createShader(d.VERTEX_SHADER);this.$c(c,"#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=d.createShader(d.FRAGMENT_SHADER);this.$c(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.Md=d.createProgram();this.Kf(this.Md,c,a);this.Md.ia=d.getAttribLocation(this.Md,"aVertexPosition");d.enableVertexAttribArray(this.Md.ia);a=d.createShader(d.VERTEX_SHADER);this.$c(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}");
c=d.createShader(d.FRAGMENT_SHADER);this.$c(c,"#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.Cg=d.createProgram();this.Kf(this.Cg,a,c)}};m.prototype.ui=function(){var d=this.m,c=d.R;if(c){var a=c.createShader(c.FRAGMENT_SHADER);var b=this.bk(13);this.$c(a,b);b=c.createShader(c.VERTEX_SHADER);
this.$c(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.nn=c.createProgram();this.Kf(this.nn,b,a);a=c.createShader(c.FRAGMENT_SHADER);b=this.bk(4);this.$c(a,b);b=c.createShader(c.VERTEX_SHADER);this.$c(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.pn=c.createProgram();this.Kf(this.pn,b,a);a=c.createShader(c.FRAGMENT_SHADER);b=this.bk(d.D.format);this.$c(a,b);b=c.createShader(c.VERTEX_SHADER);this.$c(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.qn=c.createProgram();this.Kf(this.qn,b,a);this.Si||(this.Si=c.createBuffer())}else this.m.N("No WebGL to initRemapShader!")};m.prototype.$c=function(d,c){var a=this.m.R;a.shaderSource(d,c);a.compileShader(d);a.getShaderParameter(d,a.COMPILE_STATUS)||(console&&console.log(a.getShaderInfoLog(d)),Il&&alert(a.getShaderInfoLog(d)))};m.prototype.Kf=function(d,c,a){var b=this.m.R;b.attachShader(d,c);b.attachShader(d,a);b.linkProgram(d);b.getProgramParameter(d,b.LINK_STATUS)||(alert("Could not initialise shader program"),
console&&console.log(b.getError()));b.useProgram(d)};m.prototype.bk=function(d){var c=this.m;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==d?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.sm(c.Ra());c.Ra()!=c.Bc&&0!=c.Bc?(c=this.sm(c.Bc),a+="vec4 direction1,direction2;\n",a+=b.replace("direction=","direction1="),a+=c.replace("direction=","direction2="),a+="direction=normalize(mix(direction1, direction2,1.0-directionBlend));\n"):a+=b;a+="direction=direction*matRotate;\n";13==d&&(a+="direction.z=-direction.z;",
a+="gl_FragColor = textureCube(cubeTexture, direction.xyz);");4==d&&(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+="  gl_FragColor = texture2D(tileTexture, texc);\n",a+="} else {\n",a+="  discard;\n",a+="}\n");1==d&&(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==d&&(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"};m.prototype.sm=function(d){var c="";switch(d){case 4:c+="direction.x=dst.x*rectDstDistance;\ndirection.y=dst.y*rectDstDistance;\ndirection.z=-1.0;\n";break;case 12:c+="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:c+="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 c+
"direction.w=0.0;\ndirection=normalize(direction);\n"};m.prototype.Dm=function(d){var c,a,b=this.m,e=this.m.R;this.Kj=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,this.Kj);var f=[-1,-1,1,1,-1,1,1,1,1,-1,1,1];for(c=0;12>c;c++)2>c%3&&(f[c]*=d);e.bufferData(e.ARRAY_BUFFER,new Float32Array(f),e.STATIC_DRAW);this.ze=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,this.ze);var g=[1,0,0,0,0,1,1,1];e.bufferData(e.ARRAY_BUFFER,new Float32Array(g),e.STATIC_DRAW);this.nd=e.createBuffer();e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,
this.nd);var h=[0,1,2,0,2,3];e.bufferData(e.ELEMENT_ARRAY_BUFFER,new Uint16Array(h),e.STATIC_DRAW);f=[];h=[];g=[];var l=new x.Ga;for(d=0;6>d;d++){var k=d%3;var w=3>d?1:0;for(a=0;4>a;a++){l.x=-1;l.y=-1;l.z=1;for(c=0;c<a;c++)l.vn();g.push((0>l.x?.33:0)+.33*k,(0>l.y?0:.5)+.5*w);if(4>d)for(c=0;c<d;c++)l.qr();else 5==d?l.pr():l.nr();f.push(l.x,l.y,l.z)}c=4*d;h.push(0+c,1+c,2+c,0+c,2+c,3+c)}b.D.el=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,b.D.el);e.bufferData(e.ARRAY_BUFFER,new Float32Array(f),e.STATIC_DRAW);
b.D.ej=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,b.D.ej);e.bufferData(e.ARRAY_BUFFER,new Float32Array(g),e.STATIC_DRAW);b.D.lk=e.createBuffer();e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,b.D.lk);e.bufferData(e.ELEMENT_ARRAY_BUFFER,new Uint16Array(h),e.STATIC_DRAW);this.oq=e.createBuffer();this.nq=e.createBuffer()};m.prototype.ek=function(d){var c=this;return function(){try{if(d.Mq)return;var a=c.m.R;a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,1);var b=!1;null!=d.Me&&d.Me.complete?d.ym||(a.bindTexture(a.TEXTURE_2D,
d),a.texImage2D(a.TEXTURE_2D,0,a.RGBA,a.RGBA,a.UNSIGNED_BYTE,d.Me),b=d.ym=!0):null!=d.Qf&&d.Qf.complete&&(a.bindTexture(a.TEXTURE_2D,d),a.texImage2D(a.TEXTURE_2D,0,a.RGBA,a.RGBA,a.UNSIGNED_BYTE,d.Qf),b=!0);b&&(d.loaded=!0);a.bindTexture(a.TEXTURE_2D,null);a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,0)}catch(e){c.m.N(e)}c.m.update(2)}};m.prototype.Em=function(){var d=this.m,c=d.R;if(this.ib)for(;0<this.ib.length;)c.deleteTexture(this.ib.pop());this.ib=[];for(var a=0;6>a;a++){var b=c.createTexture();this.rd++;
b.Qf=null;b.Me=null;b.ym=!1;c.bindTexture(c.TEXTURE_2D,b);c.texImage2D(c.TEXTURE_2D,0,c.RGB,1,1,0,c.RGB,c.UNSIGNED_BYTE,null);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MIN_FILTER,c.LINEAR);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_S,c.CLAMP_TO_EDGE);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_T,c.CLAMP_TO_EDGE);if(d.rf[a]){var e=new Image;e.crossOrigin=d.crossOrigin;e.src=d.Pb(d.rf[a]);b.Qf=e;e.addEventListener&&e.addEventListener("load",this.ek(b),!1);d.gc.push(e)}this.ib.push(b)}for(a=0;6>a;a++)d.vg[a]&&
(e=new Image,e.crossOrigin=d.crossOrigin,e.src=d.Pb(d.vg[a]),e.addEventListener?e.addEventListener("load",this.ek(this.ib[a]),!1):e.onload=this.ek(this.ib[a]),this.ib[a].Me=e,d.gc.push(e));for(a=0;a<d.S.length;a++)d.S[a].dd||(d.S[a].texture=c.createTexture(),d.rd++,c.bindTexture(c.TEXTURE_2D,d.S[a].texture),c.texImage2D(c.TEXTURE_2D,0,c.RGB,1,1,0,c.RGB,c.UNSIGNED_BYTE,null),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MIN_FILTER,c.LINEAR),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_S,c.CLAMP_TO_EDGE),c.texParameteri(c.TEXTURE_2D,
c.TEXTURE_WRAP_T,c.CLAMP_TO_EDGE));d.D.texture=c.createTexture();d.rd++;c.bindTexture(c.TEXTURE_2D,d.D.texture);c.texImage2D(c.TEXTURE_2D,0,c.RGB,1,1,0,c.RGB,c.UNSIGNED_BYTE,null);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MIN_FILTER,c.LINEAR);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_S,c.CLAMP_TO_EDGE);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_T,c.CLAMP_TO_EDGE);c.bindTexture(c.TEXTURE_2D,null)};m.prototype.Js=function(){var d=this.m;if(d.C.width!=d.K.offsetWidth||d.C.height!=d.K.offsetHeight)d.C.width=
d.K.offsetWidth,d.C.height=d.K.offsetHeight;d.Ee&&(d.bd(0),d.Qc());if(d.R){var c=d.R;this.mj();c.clear(c.DEPTH_BUFFER_BIT);c.useProgram(this.O);this.Zf(0);c.uniform1i(this.O.Vf,0);c.enableVertexAttribArray(this.O.ia);c.enableVertexAttribArray(this.O.La);c.bindBuffer(c.ARRAY_BUFFER,this.ze);c.vertexAttribPointer(this.O.La,2,c.FLOAT,!1,0,0);c.activeTexture(c.TEXTURE0);c.bindBuffer(c.ELEMENT_ARRAY_BUFFER,this.nd);c.uniform1f(this.O.sj,1E-4);c.vertexAttribPointer(this.O.ia,3,c.FLOAT,!1,0,0);x.ja.identity(this.yb);
x.ja.perspective(d.Tb(),d.xb.width/d.xb.height,.1,100,this.yb);c.uniformMatrix4fv(this.O.fe,!1,this.yb);for(d=0;6>d;d++)this.Zf(d),c.bindBuffer(c.ARRAY_BUFFER,this.Kj),c.vertexAttribPointer(this.O.ia,3,c.FLOAT,!1,0,0),c.bindBuffer(c.ARRAY_BUFFER,this.ze),c.vertexAttribPointer(this.O.La,2,c.FLOAT,!1,0,0),6<=this.ib.length&&this.ib[d].loaded&&(c.activeTexture(c.TEXTURE0),c.bindTexture(c.TEXTURE_2D,this.ib[d]),c.bindBuffer(c.ELEMENT_ARRAY_BUFFER,this.nd),c.uniform1i(this.O.Vf,0),c.uniformMatrix4fv(this.O.oh,
!1,this.ya),c.uniformMatrix4fv(this.O.fe,!1,this.yb),c.drawElements(c.TRIANGLES,6,c.UNSIGNED_SHORT,0))}};m.prototype.mj=function(){var d=this.m;if(d.u.Rf&&6<d.u.Rf.length){var c=parseInt(d.u.Rf);d.R.clearColor((c>>16&255)/255,(c>>8&255)/255,(c>>0&255)/255,1)}};m.prototype.Zf=function(d,c){void 0===c&&(c=1);var a=this.m;x.ja.identity(this.ya);x.ja.rotate(this.ya,c*-a.U.j*Math.PI/180,[0,0,1]);x.ja.rotate(this.ya,c*-a.v.j*Math.PI/180,[1,0,0]);-1==c?x.ja.rotate(this.ya,-a.pan.j*Math.PI/180,[0,1,0]):x.ja.rotate(this.ya,
(180-a.pan.j)*Math.PI/180,[0,1,0]);a.Na&&(x.ja.rotate(this.ya,-a.Na.pitch*Math.PI/180,[1,0,0]),x.ja.rotate(this.ya,a.Na.U*Math.PI/180,[0,0,1]));4>d?x.ja.rotate(this.ya,-Math.PI/2*d,[0,1,0]):x.ja.rotate(this.ya,Math.PI/2*(5==d?1:-1),[1,0,0])};m.prototype.ks=function(d){var c=this;return function(){c.Pj.push(d)}};m.prototype.jp=function(d){this.m.Ma=!0;this.m.od=!0;d.loaded=!0;d.Ik=0;d.je=0;var c=this.m.R;this.Ll();c.pixelStorei(c.UNPACK_FLIP_Y_WEBGL,1);if(null!=d.u&&d.u.complete){d.pb=c.createTexture();
this.m.rd++;c.bindTexture(c.TEXTURE_2D,d.pb);try{c.texImage2D(c.TEXTURE_2D,0,c.RGBA,c.RGBA,c.UNSIGNED_BYTE,d.u)}catch(a){c.texImage2D(c.TEXTURE_2D,0,c.RGBA,1,1,0,c.RGBA,c.UNSIGNED_BYTE,new Uint8Array([128,128,128,250])),this.m.N(a)}}this.m.update(2)};m.prototype.Ll=function(){this.m.$b&&this.m.$b--};m.prototype.kp=function(){if(0<this.Pj.length){var d=this.Pj.shift();this.jp(d)}};m.prototype.Jq=function(d){var c=this;return function(){c.m.Ma=!0;c.m.od=!0;var a=c.m.u;try{if(null!=d&&d.complete){var b=
a.levels[a.levels.length-1],e=a.Da;b.height=b.width=d.width-2*e;b.T=b.da=1;for(var f=0;6>f;f++){var g=new x.Td;g.V=document.createElement("canvas");c.m.ga?(g.V.width=b.width+2*e,g.V.height=b.height+2*e):(g.V.width=a.M+2*e,g.V.height=a.M+2*e);g.bb=g.V.getContext("2d");g.V.style[c.m.Ua+"Origin"]="0% 0%";g.V.style.overflow="hidden";g.V.style.position="absolute";g.u=d;var h=b.width+2*e,l=b.height+2*e;g.bb&&g.bb.drawImage(d,0,f*l,h,l,0,0,h,l);if(c.m.ga&&c.m.R){var k=c.m.R;k.pixelStorei(k.UNPACK_FLIP_Y_WEBGL,
1);g.pb=k.createTexture();c.m.rd++;k.bindTexture(k.TEXTURE_2D,g.pb);try{k.texImage2D(k.TEXTURE_2D,0,k.RGBA,k.RGBA,k.UNSIGNED_BYTE,g.V)}catch(w){c.m.N(w)}k.bindTexture(k.TEXTURE_2D,null);k.pixelStorei(k.UNPACK_FLIP_Y_WEBGL,0)}c.m.jd&&(g.V.ae=-1,c.m.K.insertBefore(g.V,c.m.K.firstChild));b.aa[f]=g}b.loaded=!0}}catch(w){c.m.N(w)}c.m.update(2)}};m.prototype.Wn=function(d){var c=this;return function(){c.m.Ma=!0;c.m.od=!0;c.Ll();d.u=null}};m.prototype.Hs=function(){var d=this.m,c=d.u,a=d.u.levels;d.Ee&&
(d.bd(0),d.Qc());if(d.R){var b=d.R;b.useProgram(this.O);this.mj();b.clear(b.DEPTH_BUFFER_BIT);b.enable(b.DEPTH_TEST);x.ja.identity(this.yb);x.ja.perspective(d.Tb(),d.xb.width/d.xb.height,.1,100,this.yb);b.uniformMatrix4fv(this.O.fe,!1,this.yb);d.co();d.wk();var e=d.Uj();var f=a.length-1;for(d.Dc=0;f>=e;){var g=a[f],h=1;f==a.length-1&&0==c.Da&&(h=c.M/(c.M-.5));for(var l=0;6>l;l++){var k=d.cube.faces[l];var w=k.Of;if(k.ob&&0<w.ig&&0<w.Qh&&0<w.scale||g.cache){k.Ma=!1;k.mf[f]||(k.mf[f]={jb:0,Gb:0,Ib:0,
Jb:0});var r=k.mf[f];g.cache?(r.jb=0,r.Gb=0,r.Ib=g.T-1,r.Jb=g.da-1):d.tm(g,w,r);w=!0;for(var y=r.Gb;y<=r.Jb;y++)for(var z=r.jb;z<=r.Ib;z++){var ha=z+y*g.T+l*g.T*g.da,ua=g.aa[ha];ua||(ua=g.aa[ha]=new x.Td);this.gi()?ua.u||(ua.je?ua.je--:(this.Ei(ua,g,d.oe(l,f,z,y)),d.Ma=!0)):d.Dc++;if(ua.pb){if(!ua.Af){ha=.5*f+1;ua.Af=b.createBuffer();b.bindBuffer(b.ARRAY_BUFFER,ua.Af);var id=[-1,-1,1,1,-1,1,1,1,1,-1,1,1];id[3]=z*c.M-c.Da;id[0]=Math.min((z+1)*c.M,g.width)+c.Da;id[7]=y*c.M-c.Da;id[1]=Math.min((y+1)*
c.M,g.height)+c.Da;id[4]=id[1];id[6]=id[3];id[9]=id[0];id[10]=id[7];for(var sh=0;12>sh;sh++)id[sh]=0==sh%3?h*ha*(-2*id[sh]/g.width+1):1==sh%3?h*ha*(-2*id[sh]/g.height+1):ha;b.bufferData(b.ARRAY_BUFFER,new Float32Array(id),b.STATIC_DRAW)}}else w=!1;ua.visible=k.ob}r.tk=w}}f--}for(l=0;6>l;l++)if(k=d.cube.faces[l],k.ob)for(w=k.Of,this.Zf(l),b.uniform1i(this.O.Vf,0),b.uniformMatrix4fv(this.O.fe,!1,this.yb),b.uniformMatrix4fv(this.O.oh,!1,this.ya),b.enableVertexAttribArray(this.O.ia),b.enableVertexAttribArray(this.O.La),
b.bindBuffer(b.ARRAY_BUFFER,this.ze),b.vertexAttribPointer(this.O.La,2,b.FLOAT,!1,0,0),b.activeTexture(b.TEXTURE0),b.bindBuffer(b.ELEMENT_ARRAY_BUFFER,this.nd),b.useProgram(this.O),f=e;f<=a.length-1;){g=a[f];if(k.ob&&0<w.ig&&k.mf[f]&&0<=k.mf[f].jb){r=k.mf[f];for(y=r.Gb;y<=r.Jb;y++)for(z=r.jb;z<=r.Ib;z++)ha=z+y*g.T+l*g.T*g.da,(ua=g.aa[ha])&&ua.pb&&(b.uniform1f(this.O.sj,1E-4*(z%2+y%2*2)),b.bindBuffer(b.ARRAY_BUFFER,ua.Af),b.vertexAttribPointer(this.O.ia,3,b.FLOAT,!1,0,0),b.bindTexture(b.TEXTURE_2D,
ua.pb),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)),ua.visible=k.ob;r.tk&&(f=a.length)}f++}this.Jk();d.od=!1}};m.prototype.gi=function(){return this.m.$b<this.m.Fh};m.prototype.Ei=function(d,c,a){var b=this.m;b.kk++;d.u=new Image;d.Ik++;d.je=1<<d.Ik;
d.u.onload=this.ks(d);d.u.onerror=this.Wn(d);d.u.onabort=this.Wn(d);d.u.crossOrigin=b.crossOrigin;d.u.setAttribute("src",a);b.N("load "+a);c.cache&&b.gc.push(d.u);b.$b++};m.prototype.oo=function(){var d=this.m,c=d.u;d.Ee&&(d.bd(0),d.Qc());if(d.R){var a=d.R;this.mj();Il&&a.clearColor(.2,0,0,1);a.clear(a.DEPTH_BUFFER_BIT);a.disable(a.DEPTH_TEST);a.disable(a.CULL_FACE);a.bindBuffer(a.ARRAY_BUFFER,this.Si);var b=[0,0];b[2]=d.C.width;b[3]=0;b[4]=d.C.width;b[5]=d.C.height;b[6]=0;b[7]=d.C.height;a.bufferData(a.ARRAY_BUFFER,
new Float32Array(b),a.STATIC_DRAW);this.m.Dc=0;if(!this.Ic||this.Yg)0<c.levels.length?this.hp():this.ip();d.D.vd?this.$q():(a.enable(a.DEPTH_TEST),a.depthRange(0,1),a.depthFunc(a.LESS),this.cj=!1,0<c.levels.length&&this.Is(),this.Ic&&!this.cj&&this.Zq())}};m.prototype.Sr=function(d,c,a,b,e,f,g){var h=this.m,l=h.u,k=h.C,w=a*l.M/c.width,r=(a+1)*l.M/c.width;a=b*l.M/c.height;c=(b+1)*l.M/c.height;1<r&&(e*=2,r=1);1<c&&(e*=2,c=1);e=Math.min(this.kl,e);r=(r-w)/e;var y=(c-a)/e;b=c=0;l={x:0,y:0};var z={x:0,
y:0},ha=0;d.pi=0;var ua=h.ph,id=new x.Ga,sh=this.Aq;sh.An();4>f?sh.Ue(-90*f):sh.Od(5==f?90:-90);h.Na&&(sh.Ve(h.Na.U),sh.Od(-h.Na.pitch));sh.Ue(-h.pan.j);sh.Od(h.v.j);sh.Ve(h.U.j);for(f=0;f<=e;f++)for(var db=0;db<=e;db++){var gl=2*(w+db*r)-1;var tf=2*(a+f*y)-1;id.x=1*gl;id.y=1*tf;id.z=-1;id.normalize();sh.Iq(id);gl=this.pm(id,l,h.Ra());0!=h.Bc&&1>ua&&(gl=gl&&this.pm(id,z,h.Bc),l.x=l.x*ua+z.x*(1-ua),l.y=l.y*ua+z.y*(1-ua));gl?-1E10<l.x&&1E10>l.x&&-1E10<l.y&&1E10>l.y?-2<l.x&&2>l.x&&-2<l.y&&2>l.y&&(c+=
l.x,b+=l.y,ha++):l.x=NaN:l.x=NaN;d.sd[d.pi++]=l.x;d.sd[d.pi++]=l.y}0<ha?(c/=ha,b/=ha):g=0;for(a=0;a<d.pi;a+=2)l.x=d.sd[a],l.y=d.sd[a+1],h=l.x-c,w=l.y-b,l.x+=h*g,l.y+=w*g,d.sd[a]=k.width/2+l.x*k.width/2,d.sd[a+1]=k.height/2-l.y*k.width/2;this.Tr(d,e)};m.prototype.pm=function(d,c,a){var b=!0;switch(a){case 0:case 4:a=1/(d.z*this.Hk);c.x=-d.x*a;c.y=d.y*a;0<d.z&&(b=!1);break;case 9:1==d.z&&(b=!1);a=1/((1-d.z)*this.Uk);c.x=d.x*a;c.y=-d.y*a;break;case 12:if(a=Math.sqrt(d.x*d.x+d.y*d.y),0==a)c.x=0,c.y=0;
else{var e=2*this.Wj*Math.acos(-d.z)/a;if(2<a)return!1;c.x=e*d.x;c.y=-e*d.y}}return b};m.prototype.Tr=function(d,c){for(var a=this.m,b=[],e,f=d.Fd=0;f<c;f++)for(var g=0;g<c;g++){b[0]=f+g*(c+1);b[1]=f+1+g*(c+1);b[2]=f+(g+1)*(c+1);b[3]=f+1+(g+1)*(c+1);e=!0;for(var h=0;4>h;h++)isNaN(d.sd[2*b[0]])&&(e=!1);if(e){var l=!1,k=!1,w=!1,r=!1;for(h=0;4>h;h++){var y=d.sd[2*b[h]];y<a.C.width&&(k=!0);0<=y&&(l=!0);y=d.sd[2*b[h]+1];y<a.C.height&&(w=!0);0<=y&&(r=!0)}if(e=e&&k&&l&&w&&r)d.Je[d.Fd++]=b[0],d.Je[d.Fd++]=
b[3],d.Je[d.Fd++]=b[2],d.Je[d.Fd++]=b[0],d.Je[d.Fd++]=b[1],d.Je[d.Fd++]=b[3]}}};m.prototype.Is=function(){var d=this.m,c=d.u,a=d.u.levels;d.Ee&&(d.bd(0),d.Qc());if(d.R){var b=d.R,e=this.pn;b.useProgram(e);this.$k(e);b.enable(b.CULL_FACE);b.cullFace(b.FRONT);b.enable(b.DEPTH_TEST);x.ja.identity(this.yb);x.ja.perspective(d.Tb(),d.xb.width/d.xb.height,.1,100,this.yb);b.uniformMatrix4fv(b.getUniformLocation(e,"uPMatrix"),!1,this.yb);this.m.Dc=0;d.wk();var f=d.Uj(),g=0;var h=a.length-1;for(var l={},k=
a[h];k.Re&&0<h;)h--,k=a[h];for(var w=h,r=w,y=0;6>y;y++)for(var z=0;z<k.da;z++)for(var ha=0;ha<k.T;ha++){var ua=ha+z*k.T+y*k.T*k.da;l[ua]=1}for(;h>=f;){var id={};k=a[h];var sh=null;0<h&&(sh=a[h-1]);var db=!0;for(var gl in l)if(l.hasOwnProperty(gl)){ua=Number(gl);var tf=k.aa[ua];y=Number(Math.floor(ua/(k.T*k.da)));z=Math.floor((ua-y*k.T*k.da)/k.T);ha=Math.floor(ua-(z*k.T+y*k.T*k.da));if(6<=y)console.log("Grrr...");else{var hl=this.m.cube.faces[y];hl.Ma=!1;tf||(tf=k.aa[ua]=new x.Td,d.N("create "+ua));
this.Sr(tf,k,ha,z,Math.max(1,this.kl>>w-h),y,-(0!=d.Bc)?.3:.1);tf.visible=0<tf.Fd||k.cache;tf.zi=3;tf.bh=Date.now();tf.visible&&!tf.pb&&(db=!1,this.gi()?tf.u||(tf.je?tf.je--:(this.Ei(tf,k,d.oe(y,h,ha,z)),d.Ma=!0)):this.m.Dc++);if(sh&&(tf.visible||sh.cache)){tf=(ha*c.M+1)/k.width;ha=Math.min(1,((ha+1)*c.M-1)/k.width);var il=(z*c.M+1)/k.height;z=Math.min(1,((z+1)*c.M-1)/k.height);ua=c.M/sh.width;hl=c.M/sh.height;var kl=il;il=Math.floor(il*sh.height/c.M);do{var jl=tf,ml=Math.floor(tf*sh.width/c.M);do{var pl=
ml+il*sh.T+y*sh.T*sh.da;ml<sh.T&&il<sh.da?id[pl]=1:d.N("Grrrr");ml++;jl+=ua}while(jl<ha);il++;kl+=hl}while(kl<z)}}}db&&(r=h,20>d.fov.j&&h<this.qf&&(this.cj=!0));l=id;h--}this.Jk();b.uniform1i(b.getUniformLocation(e,"tileTexture"),0);b.activeTexture(b.TEXTURE0);h=f;for(f=-1;h<=Math.min(r,this.qf-1);){k=a[h];for(gl in k.aa)if(k.aa.hasOwnProperty(gl)){l=Number(gl);tf=k.aa[l];y=Math.floor(l/(k.T*k.da));z=Math.floor((l-y*k.T*k.da)/k.T);ha=Math.floor(l-(z*k.T+y*k.T*k.da));f!=y&&(f=y,this.nj(y,e));if(g>
d.Ne){d.N("Excided painted tiles");this.cj=!1;break}tf.pb&&(l=y=c.M,ha==k.T-1&&(y=k.width-c.M*ha),z==k.da-1&&(l=k.height-c.M*z),y=(y+2*c.Da)/c.M,l=(l+2*c.Da)/c.M,b.bindTexture(b.TEXTURE_2D,tf.pb),b.uniform2f(b.getUniformLocation(e,"uCanvasDimensions"),d.C.width,d.C.height),w=b.getUniformLocation(e,"srcScale"),b.uniform2f(w,.5*k.width/c.M/y,.5*k.height/c.M/l),w=b.getUniformLocation(e,"srcOffset"),b.uniform2f(w,(.5*k.width+c.Da-c.M*ha)/c.M/y,-(.5*k.height+c.Da-c.M*z)/c.M/l+1),w=b.getUniformLocation(e,
"zOffset"),b.uniform1f(w,(h+1)/(a.length+5)),y=b.getAttribLocation(e,"aVertexPosition"),b.disableVertexAttribArray(0),b.disableVertexAttribArray(1),b.disableVertexAttribArray(2),b.enableVertexAttribArray(y),b.activeTexture(b.TEXTURE0),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MAG_FILTER,b.LINEAR),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MIN_FILTER,b.LINEAR),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_WRAP_S,b.CLAMP_TO_EDGE),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_WRAP_T,b.CLAMP_TO_EDGE),b.bindBuffer(b.ARRAY_BUFFER,
this.oq),b.vertexAttribPointer(y,2,b.FLOAT,!1,0,0),b.bufferData(b.ARRAY_BUFFER,new Float32Array(tf.sd),b.DYNAMIC_DRAW),b.bindBuffer(b.ELEMENT_ARRAY_BUFFER,this.nq),b.bufferData(b.ELEMENT_ARRAY_BUFFER,new Uint16Array(tf.Je),b.DYNAMIC_DRAW),b.drawElements(b.TRIANGLES,tf.Fd,b.UNSIGNED_SHORT,0),g++)}h++}b.disable(b.CULL_FACE);b.cullFace(b.FRONT_AND_BACK);d.od=!1}};m.prototype.nj=function(d,c){var a=this.m.R;x.ja.identity(this.ya);this.Zf(d,-1);a.uniformMatrix4fv(a.getUniformLocation(c,"matRotate"),!1,
this.ya)};m.prototype.$q=function(){var d=this.m;if(d.R){var c=d.R,a=this.qn;c.useProgram(a);this.nj(0,a);c.uniform2f(c.getUniformLocation(a,"uCanvasDimensions"),d.C.width,d.C.height);var b=c.getUniformLocation(a,"srcOffset");c.uniform2f(b,.5,.5);1==d.D.format&&(b=c.getUniformLocation(a,"srcScale"),d.Jd?(c.uniform2f(b,-.5/Math.PI,(d.D.flipY?-.5:.5)/Math.PI),b=c.getUniformLocation(a,"srcOffset"),d.Eh?c.uniform2f(b,.5,.75):c.uniform2f(b,.5,.25)):c.uniform2f(b,-.5/Math.PI,(d.D.flipY?-1:1)/Math.PI));
14==d.D.format&&(b=c.getUniformLocation(a,"srcScale"),c.uniform2f(b,1-2*d.D.kf/(d.D.width/3),1-2*d.D.kf/(d.D.height/2)));this.$k(a);b=c.getUniformLocation(a,"cubeTexture");c.uniform1i(b,0);b=c.getAttribLocation(a,"aVertexPosition");c.disableVertexAttribArray(0);c.disableVertexAttribArray(1);c.disableVertexAttribArray(2);c.enableVertexAttribArray(b);c.bindBuffer(c.ARRAY_BUFFER,this.Si);c.vertexAttribPointer(b,2,c.FLOAT,!1,0,0);c.activeTexture(c.TEXTURE0);c.bindTexture(c.TEXTURE_2D,d.D.texture);c.texParameteri(c.TEXTURE_2D,
c.TEXTURE_WRAP_S,c.CLAMP_TO_EDGE);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_T,c.CLAMP_TO_EDGE);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MIN_FILTER,c.LINEAR);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MAG_FILTER,c.LINEAR);c.bindBuffer(c.ELEMENT_ARRAY_BUFFER,this.nd);c.drawElements(c.TRIANGLES,6,c.UNSIGNED_SHORT,0)}};m.prototype.$k=function(d){var c=this.m,a=c.R,b=this.m.C,e=b.width/b.height;switch(c.fov.mode){case 1:e=1;break;case 2:e=b.width/Math.sqrt(b.width*b.width+b.height*b.height);break;case 3:4*
b.height/3<b.width&&(e=4/3)}b=a.getUniformLocation(d,"rectDstDistance");this.Hk=Math.tan(Math.min(c.fov.j,179)/2*Math.PI/180)*e;a.uniform1f(b,this.Hk);b=a.getUniformLocation(d,"fisheyeDistance");this.Wj=180/(c.fov.j*Math.PI*e);a.uniform1f(b,this.Wj);b=a.getUniformLocation(d,"stereoDistance");this.Uk=Math.tan(Math.min(c.fov.j,359)/4*Math.PI/180)*e;a.uniform1f(b,this.Uk);b=a.getUniformLocation(d,"directionBlend");a.uniform1f(b,c.ph)};m.prototype.Zq=function(){var d=this.m,c=d.R,a=this.nn;c.useProgram(a);
c.enable(c.DEPTH_TEST);this.nj(0,a);c.uniform2f(c.getUniformLocation(a,"uCanvasDimensions"),d.C.width,d.C.height);d=c.getUniformLocation(a,"srcScale");c.uniform2f(d,1,1);d=c.getUniformLocation(a,"srcOffset");c.uniform2f(d,0,0);d=c.getUniformLocation(a,"zOffset");c.uniform1f(d,.9999);this.$k(a);this.nj(0,a);d=c.getUniformLocation(a,"cubeTexture");c.uniform1i(d,0);a=c.getAttribLocation(a,"aVertexPosition");c.disableVertexAttribArray(0);c.disableVertexAttribArray(1);c.disableVertexAttribArray(2);c.enableVertexAttribArray(a);
c.bindBuffer(c.ARRAY_BUFFER,this.Si);c.vertexAttribPointer(a,2,c.FLOAT,!1,0,0);c.activeTexture(c.TEXTURE0);c.bindTexture(c.TEXTURE_CUBE_MAP,this.Ic);c.texParameteri(c.TEXTURE_CUBE_MAP,c.TEXTURE_WRAP_S,c.CLAMP_TO_EDGE);c.texParameteri(c.TEXTURE_CUBE_MAP,c.TEXTURE_WRAP_T,c.CLAMP_TO_EDGE);c.texParameteri(c.TEXTURE_CUBE_MAP,c.TEXTURE_MIN_FILTER,c.LINEAR);c.texParameteri(c.TEXTURE_CUBE_MAP,c.TEXTURE_MAG_FILTER,c.LINEAR);c.bindBuffer(c.ELEMENT_ARRAY_BUFFER,this.nd);c.drawElements(c.TRIANGLES,6,c.UNSIGNED_SHORT,
0)};m.prototype.ip=function(){for(var d=this.m,c=d.R,a=[1,3,5,4,0,2],b=!0,e=!0,f=!1,g=0;6>g;g++)this.ib[g].Me.complete?this.ci[g]||(f=!0):b=!1,this.ib[g].Qf.complete||(e=!1);if(e||b)if(!e||b||!this.Ic||f){g=Math.round(d.Ec/d.bf);e=(d.Ec-g)/2;d.N("paint cube single - isMain: "+b+" overlap: "+e);this.qf=0;this.Ic||(this.Ic=c.createTexture());d.rd++;c.bindTexture(c.TEXTURE_CUBE_MAP,this.Ic);c.texParameteri(c.TEXTURE_CUBE_MAP,c.TEXTURE_WRAP_S,c.CLAMP_TO_EDGE);c.texParameteri(c.TEXTURE_CUBE_MAP,c.TEXTURE_WRAP_T,
c.CLAMP_TO_EDGE);c.pixelStorei(c.UNPACK_FLIP_Y_WEBGL,1);f=document.createElement("canvas");f.width=g;f.height=g;var h=f.getContext("2d");for(g=0;6>g;g++){var l=a[g];this.ib[l].Me.complete?this.ci[l]||(h.drawImage(this.ib[l].Me,-e,-e),c.texImage2D(c.TEXTURE_CUBE_MAP_POSITIVE_X+g,0,c.RGBA,c.RGBA,c.UNSIGNED_BYTE,f),this.ci[l]=!0):(h.drawImage(this.ib[l].Qf,-e,-e,d.Ec,d.Ec),c.texImage2D(c.TEXTURE_CUBE_MAP_POSITIVE_X+g,0,c.RGBA,c.RGBA,c.UNSIGNED_BYTE,f))}this.Yg=!b}};m.prototype.hp=function(){var d=this.m,
c=this.m.u,a=d.u.levels,b=d.R,e;var f=a.length-1;if(!(0>f)){a[f].Re&&f--;var g=512;d.Xg&&(g=256);!d.Uf&&2<=d.devicePixelRatio&&(g=512);for((e=b.getParameter(b.MAX_CUBE_MAP_TEXTURE_SIZE))&&e<g&&(g=e);0<f&&a[f-1].width<=g;)f--;g=a[f];if(0!=g.T){e=f;var h=this.$o(f);this.Yg&&h&&(this.Yg=!1);h||(f=a.length-1,g=a[f],h||(g.Re?(h=g.loaded,this.vk(f-1)&&(--f,h=!0)):h=this.vk(f)),this.Yg=!0);this.vk(e);if(h&&this.qf>f){g=a[f];d.N("paint cube level "+f);this.qf=f;a=d.u.Da;f=0<a||1<g.T||1<g.da;h=e=void 0;f&&
(h=document.createElement("canvas"),h.width=g.width,h.height=g.height,2048>g.width&&(1500<g.width?(h.width=2048,h.height=2048):700<g.width?(h.width=1024,h.height=1024):(h.width=512,h.height=512)),e=h.getContext("2d"));this.Ic=b.createTexture();d.rd++;b.bindTexture(b.TEXTURE_CUBE_MAP,this.Ic);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 l=[1,3,5,4,0,2];c=c.M;for(var k=
0;6>k;k++){for(var w=0;w<g.da;w++)for(var r=0;r<g.T;r++){var y=r+w*g.T+l[k]*g.T*g.da,z=g.aa[y],ha=z.u;z.V&&(ha=z.V);ha?f?(y=h.width/g.width,e.drawImage(ha,y*(r*c-a),y*(w*c-a),y*ha.width,y*ha.height)):b.texImage2D(b.TEXTURE_CUBE_MAP_POSITIVE_X+k,0,b.RGBA,b.RGBA,b.UNSIGNED_BYTE,ha):(d.N("WTF?!"),d.N(y),d.N(z))}f&&b.texImage2D(b.TEXTURE_CUBE_MAP_POSITIVE_X+k,0,b.RGBA,b.RGBA,b.UNSIGNED_BYTE,h)}}}}};m.prototype.vk=function(d){var c=this.m,a=c.u.levels[d];if(0==a.T)return!1;var b=!0;a.cache=!0;for(var e=
0;6>e;e++)for(var f=0;f<a.da;f++)for(var g=0;g<a.T;g++){var h=g+f*a.T+e*a.T*a.da,l=a.aa[h];l||(l=a.aa[h]=new x.Td);this.gi()?l.u||(l.je?l.je--:(this.Ei(l,a,c.oe(e,d,g,f)),c.Ma=!0)):this.m.Dc++;l.pb||(b=!1,c.Ma=!0)}b&&(a.loaded=!0);return b};m.prototype.$o=function(d){d=this.m.u.levels[d];if(0==d.T)return!1;for(var c=0;6>c;c++)for(var a=0;a<d.da;a++)for(var b=0;b<d.T;b++){var e=d.aa[b+a*d.T+c*d.T*d.da];if(!e||!e.pb)return!1}return d.loaded=!0};m.prototype.ready=function(){return null!=this.Ic};m.prototype.Jk=
function(){for(var d=this.m,c=d.u.levels,a=d.R,b=Date.now(),e=c.length-1;0<=e;e--){var f=c[e];if(!f.cache)for(var g in f.aa)if(f.aa.hasOwnProperty(g)){var h=f.aa[g];0<h.zi&&h.zi--;h.visible||0<h.zi?(h.visible&&(h.bh=b),h=this.Zd.indexOf(h),-1!==h&&this.Zd.splice(h,1)):-1===this.Zd.indexOf(h)&&(h.level=f,this.Zd.push(h))}}if(this.Zd.length>1.1*d.Un)for(this.Zd.sort(function(l,k){return k.bh-l.bh});this.Zd.length>d.Un;)h=this.Zd.pop(),h.pb&&(a.deleteTexture(h.pb),d.rd--,h.pb=0),h.u=null,h.Af&&(a.deleteBuffer(h.Af),
h.Af=0),g=h.level.aa.indexOf(h),d.N("delete "+g+" "+(b-h.bh)),delete h.level.aa[g]};m.prototype.As=function(){var d=this.m;if(d.R){var c=this.m.R;c.disable(c.DEPTH_TEST);var a;for(a=0;a<d.S.length;a++){var b=d.S[a];if(!b.dd){x.ja.identity(this.ya);x.ja.rotate(this.ya,-d.U.j*Math.PI/180,[0,0,1]);x.ja.rotate(this.ya,-d.v.j*Math.PI/180,[1,0,0]);x.ja.rotate(this.ya,(180-d.pan.j)*Math.PI/180,[0,1,0]);x.ja.rotate(this.ya,b.pan*Math.PI/180,[0,1,0]);x.ja.rotate(this.ya,-b.v*Math.PI/180,[1,0,0]);x.ja.translate(this.ya,
[0,0,1]);x.ja.rotate(this.ya,b.lb*Math.PI/180,[0,0,1]);x.ja.rotate(this.ya,-b.Ka*Math.PI/180,[0,1,0]);x.ja.rotate(this.ya,b.Fa*Math.PI/180,[1,0,0]);var e=Math.tan(b.fov/2*Math.PI/180),f=b.aspect;f||(f=16/9);x.ja.scale(this.ya,[e,e/f,1]);x.ja.translate(this.ya,[0,0,-1]);c.bindBuffer(c.ARRAY_BUFFER,this.Kj);c.vertexAttribPointer(this.O.ia,3,c.FLOAT,!1,0,0);c.bindBuffer(c.ARRAY_BUFFER,this.ze);c.vertexAttribPointer(this.O.La,2,c.FLOAT,!1,0,0);c.activeTexture(c.TEXTURE0);c.bindTexture(c.TEXTURE_2D,b.texture);
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.ELEMENT_ARRAY_BUFFER,this.nd);c.uniform1i(this.O.Vf,0);c.uniformMatrix4fv(this.O.oh,!1,this.ya);c.uniformMatrix4fv(this.O.fe,!1,this.yb);c.drawElements(c.TRIANGLES,6,c.UNSIGNED_SHORT,0)}}c.enable(c.DEPTH_TEST)}};m.prototype.zs=function(){var d=
this.m,c;if(d.C.width!=d.K.offsetWidth||d.C.height!=d.K.offsetHeight)d.C.width=d.K.offsetWidth,d.C.height=d.K.offsetHeight;d.Ee&&(d.bd(0),d.Qc());if(d.R){var a=d.R;a.useProgram(this.O);x.ja.identity(this.yb);x.ja.perspective(d.Tb(),d.xb.width/d.xb.height,.1,100,this.yb);a.uniformMatrix4fv(this.O.fe,!1,this.yb);this.Zf(0);a.uniform1i(this.O.Vf,0);a.uniformMatrix4fv(this.O.fe,!1,this.yb);a.uniformMatrix4fv(this.O.oh,!1,this.ya);a.enableVertexAttribArray(this.O.ia);a.enableVertexAttribArray(this.O.La);
a.bindBuffer(a.ARRAY_BUFFER,this.ze);a.vertexAttribPointer(this.O.La,2,a.FLOAT,!1,0,0);a.activeTexture(a.TEXTURE0);a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,this.nd);a.uniform1f(this.O.sj,1E-4);a.vertexAttribPointer(this.O.ia,3,a.FLOAT,!1,0,0);a.bindTexture(a.TEXTURE_2D,d.D.texture);for(c=0;1>c;c++)this.Zf(0),a.bindBuffer(a.ARRAY_BUFFER,d.D.el),a.vertexAttribPointer(this.O.ia,3,a.FLOAT,!1,0,0),a.bindBuffer(a.ARRAY_BUFFER,d.D.ej),a.vertexAttribPointer(this.O.La,2,a.FLOAT,!1,0,0),a.activeTexture(a.TEXTURE0),
a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,d.D.lk),a.uniform1i(this.O.Vf,0),a.uniformMatrix4fv(this.O.oh,!1,this.ya),a.uniformMatrix4fv(this.O.fe,!1,this.yb),a.drawElements(a.TRIANGLES,36,a.UNSIGNED_SHORT,0)}};m.prototype.ys=function(){var d=this.m,c=d.R,a=d.D;if(0<d.S.length)for(var b=0;b<d.S.length;b++){var e=d.S[b];if(!e.dd&&e.isRunning&&e.oi!=e.f.currentTime&&(e.oi=e.f.currentTime,!e.aspect&&0<e.f.videoHeight&&(e.aspect=e.f.videoWidth/e.f.videoHeight),d.Nh))try{e.texture&&(c.bindTexture(c.TEXTURE_2D,
e.texture),c.texImage2D(c.TEXTURE_2D,0,c.RGB,c.RGB,c.UNSIGNED_BYTE,e.f),d.update())}catch(g){d.N(g)}}if(a.f&&(b=Number(a.f.currentTime),a.oi!=b)){a.oi=b;try{var f=0<a.f.readyState;d.xi&&a.vd&&(f=f&&0<a.f.currentTime);a.texture&&a.yi&&f&&(a.vd=!0,a.width=a.f.videoWidth,a.height=a.f.videoHeight,c.pixelStorei(c.UNPACK_FLIP_Y_WEBGL,d.D.flipY),c.bindTexture(c.TEXTURE_2D,a.texture),c.texImage2D(c.TEXTURE_2D,0,c.RGB,c.RGB,c.UNSIGNED_BYTE,a.f),a.Tn=!0,d.update())}catch(g){d.N(g)}}};m.prototype.dn=function(){var d,
c,a=this.m,b=this.m.R;a.Ia.style.visibility="hidden";a.H.$g!=a.H.mode&&(a.H.$g=a.H.mode);if((0<=a.H.mode||0<a.H.sb.length)&&!a.J.Hh){var e=1;0>=a.H.mode&&(e=0);3==a.H.mode&&(e=a.H.wa);for(d=0;d<a.W.length;d++){var f=a.W[d];if("poly"==f.type){var g=f.he,h=e;2==a.H.mode&&(h=f.wa);var l=a.H.sb.indexOf(f.id);-1!=l&&(h=a.H.Zb[l]);if(0<g.length){l=[];for(c=0;c<g.length;c++)l.push(g[c].Xb),l.push(g[c].Ab),l.push(0);b.useProgram(this.Md);b.enable(b.BLEND);b.blendFuncSeparate(b.SRC_ALPHA,b.ONE_MINUS_SRC_ALPHA,
b.SRC_ALPHA,b.ONE);b.disable(b.DEPTH_TEST);g=b.createBuffer();b.bindBuffer(b.ARRAY_BUFFER,g);b.bufferData(b.ARRAY_BUFFER,new Float32Array(l),b.STATIC_DRAW);b.uniform2f(b.getUniformLocation(this.Md,"uCanvasDimensions"),a.C.width,a.C.height);g=b.getUniformLocation(this.Md,"uColor");c=f.ec;b.uniform3f(g,(c>>16&255)/255,(c>>8&255)/255,(c&255)/255);var k=b.getUniformLocation(this.Md,"uAlpha");b.uniform1f(k,f.dc*h);b.vertexAttribPointer(this.Md.ia,3,b.FLOAT,!1,0,0);b.drawArrays(b.LINE_LOOP,0,l.length/3);
c=f.cc;b.uniform3f(g,(c>>16&255)/255,(c>>8&255)/255,(c&255)/255);b.uniform1f(k,f.bc*h);b.enable(b.STENCIL_TEST);b.clearStencil(0);b.clear(b.STENCIL_BUFFER_BIT);b.colorMask(!1,!1,!1,!1);b.stencilFunc(b.ALWAYS,1,1);b.stencilOp(b.INCR,b.INCR,b.INCR);b.drawArrays(b.TRIANGLE_FAN,0,l.length/3);b.colorMask(!0,!0,!0,!0);b.stencilFunc(b.EQUAL,1,1);b.stencilOp(b.ZERO,b.ZERO,b.ZERO);b.drawArrays(b.TRIANGLE_FAN,0,l.length/3);b.disable(b.BLEND);b.enable(b.DEPTH_TEST);b.disable(b.STENCIL_TEST);b.useProgram(this.O)}}}}};
m.prototype.Zk=function(){var d=this.m,c=d.u;if(d.C.width!=d.K.offsetWidth||d.C.height!=d.K.offsetHeight)d.C.width=d.K.offsetWidth,d.C.height=d.K.offsetHeight;d.Ee&&(d.bd(0),d.Qc());if(d.R){var a=d.R;this.mj();a.clear(a.COLOR_BUFFER_BIT|a.DEPTH_BUFFER_BIT);a.disable(a.DEPTH_TEST);a.disable(a.CULL_FACE);a.useProgram(this.Cg);var b=a.getUniformLocation(this.Cg,"uRect");a.uniform2f(a.getUniformLocation(this.Cg,"uCanvasDimensions"),d.C.width,d.C.height);a.activeTexture(a.TEXTURE0);a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,
this.nd);var e=a.getAttribLocation(this.Cg,"aVertexPosition");a.disableVertexAttribArray(0);a.disableVertexAttribArray(1);a.disableVertexAttribArray(2);a.enableVertexAttribArray(e);a.bindBuffer(a.ARRAY_BUFFER,this.ze);a.vertexAttribPointer(e,2,a.FLOAT,!1,0,0);d.Dc=0;var f=100/d.fov.j;var g=c.width/c.height;e=d.C.height*f*g;f*=d.C.height;g=(d.pan.j/100/g-.5)*e+d.C.width/2;for(var h=(d.v.j/100-.5)*f+d.C.height/2,l,k,w,r=0;c.levels.length>=r+2&&c.levels[r+1].width>e;)r++;var y;var z=[];for(y=c.levels.length-
1;y>=r;){var ha=c.levels[y];if(ha.cache){var ua={jb:0,Gb:0};ua.Ib=ha.T-1;ua.Jb=ha.da-1}else{ua={};l=-h/f*(ha.height/d.u.M);k=(-g+d.C.width)/e*(ha.width/d.u.M);var id=(-h+d.C.height)/f*(ha.height/d.u.M);ua.jb=Math.min(Math.max(0,Math.floor(-g/e*(ha.width/d.u.M))),ha.T-1);ua.Gb=Math.min(Math.max(0,Math.floor(l)),ha.da-1);ua.Ib=Math.min(Math.max(0,Math.floor(k)),ha.T-1);ua.Jb=Math.min(Math.max(0,Math.floor(id)),ha.da-1)}z[y]=ua;var sh=!0;for(k=ua.Gb;k<=ua.Jb;k++)for(l=ua.jb;l<=ua.Ib;l++)w=l+k*ha.T,id=
ha.aa[w],id||(id=new x.Td,ha.aa[w]=id),this.gi()?id.u||(this.Ei(id,ha,d.oe(0,y,l,k)),d.Ma=!0):this.m.Dc++,id.u&&id.u.complete||(sh=!1),id.visible=!0;ua.tk=sh;y--}for(y=c.levels.length-1;y>=r;){ha=c.levels[y];if(z[y]&&0<=z[y].jb)for(ua=z[y],k=ua.Gb;k<=ua.Jb;k++)for(l=ua.jb;l<=ua.Ib;l++)w=l+k*ha.T,(id=ha.aa[w])&&id.u&&id.u.complete&&(d=g+(-c.Da+c.M*l)*e/ha.width,a.uniform4f(b,d,h+(-c.Da+c.M*k)*f/ha.height,id.u.width*e/ha.width,id.u.height*f/ha.height),id&&id.pb&&(a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,
this.nd),a.bindTexture(a.TEXTURE_2D,id.pb),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,a.LINEAR),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.LINEAR),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE),a.drawElements(a.TRIANGLES,6,a.UNSIGNED_SHORT,0)));y--}this.Jk()}};m.prototype.Te=function(){var d=this.m.R;if(d&&this.ib)for(;0<this.ib.length;){var c=this.ib.pop();c.Mq=!0;d.deleteTexture(c)}this.Ic&&(d.deleteTexture(this.Ic),
this.Ic=null);this.qf=1E6;this.ci=[!1,!1,!1,!1,!1,!1]};return m}();x.Co=p})(ggP2VR||(ggP2VR={}));
(function(x){var p=function(){return function(){this.Of={Eg:1,Fg:1,ih:0,jh:0,ig:0,Qh:0,scale:1};this.ob=!0;this.mf=[]}}(),m=function(){function d(){var c;this.faces=Array(6);for(c=0;6>c;c++)this.faces[c]=new p}d.prototype.ap=function(c,a,b,e){for(var f=0;6>f;f++){var g;if(g=this.faces[f]){var h=[];h.push(new x.Ga(-1,-1,-1,0,0));h.push(new x.Ga(1,-1,-1,1,0));h.push(new x.Ga(1,1,-1,1,1));h.push(new x.Ga(-1,1,-1,0,1));for(var l=0;l<h.length;l++)4>f?h[l].Ka(-Math.PI/2*f):h[l].Fa(Math.PI/2*(4===f?-1:1)),
e&&(h[l].lb(e.U*Math.PI/180),h[l].Fa(-e.pitch*Math.PI/180)),h[l].Ka(-c*Math.PI/180),h[l].Fa(a*Math.PI/180),h[l].lb(b*Math.PI/180);g.ob=0<h.length}}};return d}();x.yo=m})(ggP2VR||(ggP2VR={}));
(function(x){x.xo=function(){return function(){this.levels=[];this.Rf="0x000000";this.hn=!1;this.Um=this.Tm=.4;this.M=512;this.Da=1;this.sk=0;this.uk="";this.sn=this.height=this.width=0}}();x.ll=function(){return function(){this.height=this.width=0;this.Re=this.cache=!1;this.da=this.T=0;this.loaded=!1;this.aa=[]}}();x.Td=function(){return function(){this.loaded=this.visible=!1;this.je=this.Ik=0;this.sd=[];this.pi=0;this.Je=[];this.zi=this.bh=this.Fd=0}}()})(ggP2VR||(ggP2VR={}));
(function(x){x.to=function(){return function(p,m){this.m=p;this.Ca=m;var d=this.__div=document.createElement("div");d.ggVisible=!0;var c=document.createElement("img");if(m.Xc){var a=m.Xc;c.setAttribute("style","position: absolute;width: "+m.Ae+"px; height: "+m.Cd+"px;top: -"+m.Cd/2+"px;left: -"+m.Ae/2+"px; "+p.Oa+"user-select: none; max-width: none;")}else a="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",
c.setAttribute("style","position: absolute;width: 28px; height: 28px;top: -14px;left: -14px; "+p.Oa+"user-select: none; max-width: none;");c.setAttribute("src",a);c.ondragstart=function(){return!1};d.appendChild(c);a="position:absolute;"+(p.Oa+"user-select: none;");a+=p.Oa+"touch-callout: none;";a+=p.Oa+"tap-highlight-color: rgba(0,0,0,0);";p.yc&&!p.ga&&(a+=p.Oa+"transform: translateZ(9999999px);");d.setAttribute("style",a);d.onclick=function(){p.Wf(m);p.Bk(m.url,m.target);p.ka&&p.ka.hotspotProxyClick&&
p.ka.hotspotProxyClick(m.id,m.url)};d.ondblclick=function(){p.ka&&p.ka.hotspotProxyDoubleClick&&p.ka.hotspotProxyDoubleClick(m.id,m.url)};var b=p.H.gj;if(b.enabled&&""!=m.title){var e=document.createElement("div");a="position:absolute;";a=m.Xc?a+("top:\t "+m.Cd/2+"px;"):a+"top:\t 20px;";a=b.rj?a+"white-space: pre-wrap;":a+"white-space: nowrap;";a+=p.Oa+"transform-origin: 50% 50%;";e.setAttribute("style",a+"visibility: hidden;overflow: hidden;padding: 0px 1px 0px 1px;");e.style.color=this.m.ea(b.hj,
b.fj);e.style.backgroundColor=b.background?this.m.ea(b.cc,b.bc):"transparent";e.style.border="solid "+this.m.ea(b.ec,b.dc)+" "+b.$h+"px";e.style.borderRadius=b.xj+"px";e.style.textAlign="center";0<b.width?(e.style.left=-b.width/2+"px",e.style.width=b.width+"px"):e.style.width="auto";e.style.height=0<b.height?b.height+"px":"auto";e.style.overflow="hidden";e.innerHTML=m.title;e.classList.add("ggskin");e.classList.add("ggdefaulthotspot");d.onmouseover=function(){0==b.width&&(e.style.left=-e.offsetWidth/
2+"px");e.style.visibility="inherit";p.ka&&p.ka.hotspotProxyOver&&p.ka.hotspotProxyOver(m.id,m.url)};d.onmouseout=function(){e.style.visibility="hidden";p.ka&&p.ka.hotspotProxyOut&&p.ka.hotspotProxyOut(m.id,m.url)};d.appendChild(e)}}}()})(ggP2VR||(ggP2VR={}));
(function(x){x.Vc=function(){return function(){this.value=this.time=0;this.dl="";this.ye=this.xe=this.we=this.ve=this.rb=this.type=this.Db=0;this.Wh=""}}();x.il=function(){return function(){this.rs=this.Lo=this.length=0}}();x.hl=function(){return function(){}}()})(ggP2VR||(ggP2VR={}));
(function(x){var p=function(){function m(d){this.m=d;this.enabled=!1;this.og=1;this.lf=0;this.type="crossdissolve";this.sc=this.ra=this.Pc=0;this.jg=5;this.te=1;this.kg=!1;this.af=this.$e=this.Tk=0;this.Rd=70;this.ro=0;this.Fb=this.qo=1;this.Th=this.Sh=.5;this.ue=!1;this.Nj=1}m.prototype.Tg=function(){var d=this.m.R,c=d.createShader(d.VERTEX_SHADER);d.shaderSource(c,"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");
d.compileShader(c);d.getShaderParameter(c,d.COMPILE_STATUS)||(alert(d.getShaderInfoLog(c)),c=null);var a=d.createShader(d.FRAGMENT_SHADER);d.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");
d.compileShader(a);d.getShaderParameter(a,d.COMPILE_STATUS)||(alert(d.getShaderInfoLog(a)),a=null);this.Aa=d.createProgram();d.attachShader(this.Aa,c);d.attachShader(this.Aa,a);d.linkProgram(this.Aa);d.getProgramParameter(this.Aa,d.LINK_STATUS)||alert("Could not initialise shaders");this.Aa.ia=d.getAttribLocation(this.Aa,"aVertexPosition");d.enableVertexAttribArray(this.Aa.ia);this.Aa.La=d.getAttribLocation(this.Aa,"aTextureCoord");d.enableVertexAttribArray(this.Aa.La);a=d.createShader(d.FRAGMENT_SHADER);
d.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");
d.compileShader(a);d.getShaderParameter(a,d.COMPILE_STATUS)||(alert(d.getShaderInfoLog(a)),a=null);this.fb=d.createProgram();d.attachShader(this.fb,c);d.attachShader(this.fb,a);d.linkProgram(this.fb);d.getProgramParameter(this.fb,d.LINK_STATUS)||alert("Could not initialise shaders");this.fb.ia=d.getAttribLocation(this.fb,"aVertexPosition");d.enableVertexAttribArray(this.fb.ia);this.fb.La=d.getAttribLocation(this.fb,"aTextureCoord");d.enableVertexAttribArray(this.fb.La);a=d.createShader(d.FRAGMENT_SHADER);
d.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");
d.compileShader(a);d.getShaderParameter(a,d.COMPILE_STATUS)||(alert(d.getShaderInfoLog(a)),a=null);this.Ta=d.createProgram();d.attachShader(this.Ta,c);d.attachShader(this.Ta,a);d.linkProgram(this.Ta);d.getProgramParameter(this.Ta,d.LINK_STATUS)||alert("Could not initialise shaders");this.Ta.ia=d.getAttribLocation(this.Ta,"aVertexPosition");d.enableVertexAttribArray(this.Ta.ia);this.Ta.La=d.getAttribLocation(this.Ta,"aTextureCoord");d.enableVertexAttribArray(this.Ta.La);a=d.createShader(d.FRAGMENT_SHADER);
d.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");
d.compileShader(a);d.getShaderParameter(a,d.COMPILE_STATUS)||(alert(d.getShaderInfoLog(a)),a=null);this.Za=d.createProgram();d.attachShader(this.Za,c);d.attachShader(this.Za,a);d.linkProgram(this.Za);d.getProgramParameter(this.Za,d.LINK_STATUS)||alert("Could not initialise shaders");this.Za.ia=d.getAttribLocation(this.Za,"aVertexPosition");d.enableVertexAttribArray(this.Za.ia);this.Za.La=d.getAttribLocation(this.Za,"aTextureCoord");d.enableVertexAttribArray(this.Za.La)};m.prototype.bd=function(){var d=
this.m.R;if(!d)return!1;if(this.rc=d.createFramebuffer()){d.bindFramebuffer(d.FRAMEBUFFER,this.rc);this.rc.width=1024;this.rc.height=1024;this.cf=d.createTexture();d.bindTexture(d.TEXTURE_2D,this.cf);d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MIN_FILTER,d.LINEAR);d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MAG_FILTER,d.LINEAR);d.texImage2D(d.TEXTURE_2D,0,d.RGBA,this.rc.width,this.rc.height,0,d.RGBA,d.UNSIGNED_BYTE,null);var c=d.createRenderbuffer();d.bindRenderbuffer(d.RENDERBUFFER,c);d.renderbufferStorage(d.RENDERBUFFER,
d.DEPTH_COMPONENT16,this.rc.width,this.rc.height);d.framebufferTexture2D(d.FRAMEBUFFER,d.COLOR_ATTACHMENT0,d.TEXTURE_2D,this.cf,0);d.framebufferRenderbuffer(d.FRAMEBUFFER,d.DEPTH_ATTACHMENT,d.RENDERBUFFER,c);d.bindTexture(d.TEXTURE_2D,null);d.bindRenderbuffer(d.RENDERBUFFER,null);d.bindFramebuffer(d.FRAMEBUFFER,null);this.qb=d.createBuffer();d.bindBuffer(d.ARRAY_BUFFER,this.qb);d.bufferData(d.ARRAY_BUFFER,new Float32Array([-1,-1,0,1,-1,0,-1,1,0,1,1,0]),d.STATIC_DRAW);this.qb.itemSize=3;this.qb.ee=
4;this.Sf=d.createBuffer();d.bindBuffer(d.ARRAY_BUFFER,this.Sf);d.bufferData(d.ARRAY_BUFFER,new Float32Array([0,0,1,0,0,1,1,1]),d.STATIC_DRAW);return!0}return!1};m.prototype.en=function(d){var c=this.m.R,a=this.m.xb;if(this.yd){c.useProgram(this.Aa);c.bindBuffer(c.ARRAY_BUFFER,this.qb);c.vertexAttribPointer(this.Aa.ia,this.qb.itemSize,c.FLOAT,!1,0,0);c.bindBuffer(c.ARRAY_BUFFER,this.Sf);c.vertexAttribPointer(this.Aa.La,2,c.FLOAT,!1,0,0);c.enableVertexAttribArray(this.Aa.ia);c.enableVertexAttribArray(this.Aa.La);
c.activeTexture(c.TEXTURE0);c.bindTexture(c.TEXTURE_2D,this.cf);a=1+(this.Fb-1)*d;var b=c.getUniformLocation(this.Aa,"uAlpha");c.uniform1f(b,1);b=c.getUniformLocation(this.Aa,"uZoomIn");c.uniform1i(b,1);b=c.getUniformLocation(this.Aa,"uZoomCenter");var e=.5+(this.Sh-.5)*Math.sqrt(d),f=.5+(this.Th-.5)*Math.sqrt(d);0>e-.5/a&&(e=.5/a);0>f-.5/a&&(f=.5/a);1<e+.5/a&&(e=1-.5/a);1<f+.5/a&&(f=1-.5/a);c.uniform2f(b,e,f);e=c.getUniformLocation(this.Aa,"uZoomFactor");c.uniform1f(e,a);c.uniform1i(c.getUniformLocation(this.Aa,
"uSampler"),0);c.drawArrays(c.TRIANGLE_STRIP,0,this.qb.ee);c.useProgram(this.m.za.O)}else{this.m.Kh();c.blendFuncSeparate(c.SRC_ALPHA,c.ONE_MINUS_SRC_ALPHA,c.SRC_ALPHA,c.ONE);c.enable(c.BLEND);c.disable(c.DEPTH_TEST);e=.5+(this.Sh-.5);f=.5+(this.Th-.5);0>e-.5/this.Fb&&(e=.5/this.Fb);0>f-.5/this.Fb&&(f=.5/this.Fb);1<e+.5/this.Fb&&(e=1-.5/this.Fb);1<f+.5/this.Fb&&(f=1-.5/this.Fb);if("crossdissolve"==this.type)c.useProgram(this.Aa),c.bindBuffer(c.ARRAY_BUFFER,this.qb),c.vertexAttribPointer(this.Aa.ia,
this.qb.itemSize,c.FLOAT,!1,0,0),c.bindBuffer(c.ARRAY_BUFFER,this.Sf),c.vertexAttribPointer(this.Aa.La,2,c.FLOAT,!1,0,0),c.activeTexture(c.TEXTURE0),c.bindTexture(c.TEXTURE_2D,this.cf),b=c.getUniformLocation(this.Aa,"uAlpha"),c.uniform1f(b,1-d),b=c.getUniformLocation(this.Aa,"uZoomIn"),c.uniform1i(b,1==this.ra||2==this.ra||6==this.ra?1:0),b=c.getUniformLocation(this.Aa,"uZoomCenter"),c.uniform2f(b,e,f),e=c.getUniformLocation(this.Aa,"uZoomFactor"),c.uniform1f(e,this.Fb),c.uniform1i(c.getUniformLocation(this.Aa,
"uSampler"),0);else if("diptocolor"==this.type)c.useProgram(this.fb),c.bindBuffer(c.ARRAY_BUFFER,this.qb),c.vertexAttribPointer(this.fb.ia,this.qb.itemSize,c.FLOAT,!1,0,0),c.bindBuffer(c.ARRAY_BUFFER,this.Sf),c.vertexAttribPointer(this.fb.La,2,c.FLOAT,!1,0,0),c.activeTexture(c.TEXTURE0),c.bindTexture(c.TEXTURE_2D,this.cf),c.uniform1f(c.getUniformLocation(this.fb,"uColorPercent"),Math.min(2*d,1)),b=c.getUniformLocation(this.fb,"uAlpha"),c.uniform1f(b,1-Math.max(2*(d-.5),0)),c.uniform3f(c.getUniformLocation(this.fb,
"uDipColor"),(this.lf>>16&255)/255,(this.lf>>8&255)/255,(this.lf&255)/255),b=c.getUniformLocation(this.fb,"uZoomIn"),c.uniform1i(b,1==this.ra||2==this.ra||6==this.ra?1:0),b=c.getUniformLocation(this.fb,"uZoomCenter"),c.uniform2f(b,e,f),e=c.getUniformLocation(this.fb,"uZoomFactor"),c.uniform1f(e,this.Fb),c.uniform1i(c.getUniformLocation(this.fb,"uSampler"),0);else if("irisround"==this.type||"irisroundcenter"==this.type||"irisrectangular"==this.type||"irisrectangularcenter"==this.type){c.useProgram(this.Ta);
c.bindBuffer(c.ARRAY_BUFFER,this.qb);c.vertexAttribPointer(this.Ta.ia,this.qb.itemSize,c.FLOAT,!1,0,0);c.bindBuffer(c.ARRAY_BUFFER,this.Sf);c.vertexAttribPointer(this.Ta.La,2,c.FLOAT,!1,0,0);c.activeTexture(c.TEXTURE0);c.bindTexture(c.TEXTURE_2D,this.cf);if(1==this.ra||2==this.ra||6==this.ra||"irisroundcenter"==this.type||"irisrectangularcenter"==this.type)var g=b=.5;else b=this.Sh,g=this.Th;var h=b*a.width,l=g*a.height;h=Math.max(h,a.width-h);l=Math.max(l,a.height-l);"irisround"==this.type||"irisroundcenter"==
this.type?c.uniform1f(c.getUniformLocation(this.Ta,"uRadius"),(Math.sqrt(h*h+l*l)+this.Pc)*d):(h>l?(l=a.height/a.width*h+this.Pc,h+=this.Pc):(h=a.width/a.height*l+this.Pc,l+=this.Pc),c.uniform2f(c.getUniformLocation(this.Ta,"uRectDim"),h*d,l*d));d=c.getUniformLocation(this.Ta,"uSoftEdge");c.uniform1f(d,this.Pc);c.uniform1i(c.getUniformLocation(this.Ta,"uRound"),"irisround"==this.type||"irisroundcenter"==this.type?1:0);c.uniform2f(c.getUniformLocation(this.Ta,"uIrisCenter"),b*a.width,g*a.height);b=
c.getUniformLocation(this.Ta,"uZoomIn");c.uniform1i(b,1==this.ra||2==this.ra||6==this.ra?1:0);b=c.getUniformLocation(this.Ta,"uZoomCenter");c.uniform2f(b,e,f);e=c.getUniformLocation(this.Ta,"uZoomFactor");c.uniform1f(e,this.Fb);c.uniform1i(c.getUniformLocation(this.Ta,"uSampler"),0)}else if("wipeleftright"==this.type||"wiperightleft"==this.type||"wipetopbottom"==this.type||"wipebottomtop"==this.type||"wiperandom"==this.type)c.useProgram(this.Za),c.bindBuffer(c.ARRAY_BUFFER,this.qb),c.vertexAttribPointer(this.Za.ia,
this.qb.itemSize,c.FLOAT,!1,0,0),c.bindBuffer(c.ARRAY_BUFFER,this.Sf),c.vertexAttribPointer(this.Za.La,2,c.FLOAT,!1,0,0),c.activeTexture(c.TEXTURE0),c.bindTexture(c.TEXTURE_2D,this.cf),c.uniform1f(c.getUniformLocation(this.Za,"uPercent"),3>this.Nj?d*(a.width+this.Pc):d*(a.height+this.Pc)),d=c.getUniformLocation(this.Za,"uSoftEdge"),c.uniform1f(d,this.Pc),c.uniform1i(c.getUniformLocation(this.Za,"uDirection"),this.Nj),c.uniform2f(c.getUniformLocation(this.Za,"uCanvasDimensions"),a.width,a.height),
b=c.getUniformLocation(this.Za,"uZoomIn"),c.uniform1i(b,1==this.ra||2==this.ra||6==this.ra?1:0),b=c.getUniformLocation(this.Za,"uZoomCenter"),c.uniform2f(b,e,f),e=c.getUniformLocation(this.Za,"uZoomFactor"),c.uniform1f(e,this.Fb),c.uniform1i(c.getUniformLocation(this.Za,"uSampler"),0);c.drawArrays(c.TRIANGLE_STRIP,0,this.qb.ee);c.useProgram(this.m.za.O);c.disable(c.BLEND);c.enable(c.DEPTH_TEST)}};return m}();x.vo=p})(ggP2VR||(ggP2VR={}));
(function(x){var p=function(){function m(d){this.Ih=[];this.m=d;this.enabled=!1;this.Db=2;this.Gl=!1}m.prototype.Ql=function(d){if(2==d.mode||3==d.mode||5==d.mode){var c=this.m.va.currentTime;if(d.Hb&&d.Hb.gain&&d.Sb&&d.Qb&&d.Rb){var a=d.Sb.gain.value,b=d.Qb.gain.value,e=d.Rb.gain.value;d.Hb.gain.linearRampToValueAtTime(d.Hb.gain.value,c);d.Hb.gain.linearRampToValueAtTime(0,c+this.Db);d.Sb.gain.linearRampToValueAtTime(a,c);d.Sb.gain.linearRampToValueAtTime(0,c+this.Db);d.Qb.gain.linearRampToValueAtTime(b,
c);d.Qb.gain.linearRampToValueAtTime(0,c+this.Db);d.Rb.gain.linearRampToValueAtTime(e,c);d.Rb.gain.linearRampToValueAtTime(0,c+this.Db)}}else c=this.m.va.currentTime,d.ic&&d.ic.gain&&(d.ic.gain.linearRampToValueAtTime(d.ic.gain.value,c),d.ic.gain.linearRampToValueAtTime(0,c+this.Db));d.Tj=!0;setTimeout(function(){d.Se()},1E3*this.Db+5)};m.prototype.ds=function(){for(var d=0;d<this.m.X.length;d++){var c=this.m.X[d];-1==this.m.hd.indexOf(c.id)&&(-1==this.m.hd.indexOf("_main")||-1!=this.m.se.indexOf(c.id))&&
!this.m.isPlaying(c.id)&&-1<c.loop&&4!=c.mode&&6!=c.mode&&(c.ua?c.Xd():(c.Sd&&c.lg(),c.f.play(),c.f.currentTime=0))}};m.prototype.np=function(){var d=(this.m.va.currentTime-this.Zr)/this.Db;d=Math.min(1,d);for(var c=0;c<this.m.X.length;c++){var a=this.m.X[c];this.m.isPlaying(a.id)&&1>a.ta&&(a.ta=d)}1==d&&clearInterval(this.Yr)};return m}();x.wo=p})(ggP2VR||(ggP2VR={}));
(function(x){var p=function(){function m(d){this.gh=[];this.ld=null;this.pc=[];this.hc=[];this.qc=[];this.Pk=!0;this.m=d;this.fp()}m.prototype.Tg=function(){var d=this.m.R,c=d.createShader(d.VERTEX_SHADER);d.shaderSource(c,"attribute vec3 aVertexPosition;\nvoid main(void) {\n gl_Position = vec4(aVertexPosition, 1.0);\n}\n");d.compileShader(c);d.getShaderParameter(c,d.COMPILE_STATUS)||(alert(d.getShaderInfoLog(c)),c=null);var a=d.createShader(d.FRAGMENT_SHADER);d.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");
d.compileShader(a);d.getShaderParameter(a,d.COMPILE_STATUS)||(alert(d.getShaderInfoLog(a)),a=null);this.uc=d.createProgram();d.attachShader(this.uc,c);d.attachShader(this.uc,a);d.linkProgram(this.uc);d.getProgramParameter(this.uc,d.LINK_STATUS)||alert("Could not initialise shaders");this.uc.ia=d.getAttribLocation(this.uc,"aVertexPosition");d.enableVertexAttribArray(this.uc.ia);a=d.createShader(d.VERTEX_SHADER);c=d.createShader(d.VERTEX_SHADER);d.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");
d.compileShader(a);d.getShaderParameter(a,d.COMPILE_STATUS)||(alert(d.getShaderInfoLog(a)),a=null);d.shaderSource(c,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nattribute vec3 aVertexPosition;\nvarying vec4 vColor;\nuniform vec2 uCirclePosition;\nuniform float uCircleRadius;\nuniform vec2 uCanvasDimensions2;\nuniform float uAspectRatio;\nvoid main(void) {\n vec2 circleOnScreen = aVertexPosition.xy * uCircleRadius + uCirclePosition;\n circleOnScreen.y = circleOnScreen.y / uAspectRatio;\n vec2 circleNorm = (circleOnScreen / uCanvasDimensions2) * 2.0 - vec2(1.0, 1.0);\n gl_Position = vec4(circleNorm.x, circleNorm.y, 0.0, 1.0);\n}\n");
d.compileShader(c);d.getShaderParameter(c,d.COMPILE_STATUS)||(alert(d.getShaderInfoLog(c)),a=null);var b=d.createShader(d.FRAGMENT_SHADER);d.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");
d.compileShader(b);d.getShaderParameter(b,d.COMPILE_STATUS)||(alert(d.getShaderInfoLog(b)),b=null);this.Ba=d.createProgram();d.attachShader(this.Ba,a);d.attachShader(this.Ba,b);d.linkProgram(this.Ba);d.getProgramParameter(this.Ba,d.LINK_STATUS)||alert("Could not initialise shaders");this.Ba.ia=d.getAttribLocation(this.Ba,"aVertexPosition");d.enableVertexAttribArray(this.Ba.ia);a=d.createShader(d.FRAGMENT_SHADER);d.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");
d.compileShader(a);d.getShaderParameter(a,d.COMPILE_STATUS)||(alert(d.getShaderInfoLog(a)),a=null);this.Cb=d.createProgram();d.attachShader(this.Cb,c);d.attachShader(this.Cb,a);d.linkProgram(this.Cb);d.getProgramParameter(this.Cb,d.LINK_STATUS)||alert("Could not initialise shaders");this.Cb.ia=d.getAttribLocation(this.Cb,"aVertexPosition")};m.prototype.bd=function(){var d=this.m.R;this.Ed=d.createBuffer();d.bindBuffer(d.ARRAY_BUFFER,this.Ed);d.bufferData(d.ARRAY_BUFFER,new Float32Array([-1,-1,0,1,
-1,0,1,1,0,-1,1,0]),d.STATIC_DRAW);this.Ed.itemSize=3;this.Ed.ee=4;this.xf=d.createBuffer();d.bindBuffer(d.ARRAY_BUFFER,this.xf);for(var c=[0,0,0],a=2*Math.PI/6,b=Math.PI/180*35,e=1,f=b;f<=b+2*Math.PI;f+=a)c.push(Math.sin(f)),c.push(-Math.cos(f)),c.push(0),e++;d.bufferData(d.ARRAY_BUFFER,new Float32Array(c),d.STATIC_DRAW);this.xf.itemSize=3;this.xf.ee=e;this.un=d.createTexture();d.bindTexture(d.TEXTURE_2D,this.un);d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MIN_FILTER,d.LINEAR);d.texParameteri(d.TEXTURE_2D,
d.TEXTURE_MAG_FILTER,d.LINEAR);d.texParameteri(d.TEXTURE_2D,d.TEXTURE_WRAP_S,d.CLAMP_TO_EDGE);d.texParameteri(d.TEXTURE_2D,d.TEXTURE_WRAP_T,d.CLAMP_TO_EDGE);c=document.createElement("canvas");c.width=100;c.height=1;a=c.getContext("2d");a.width=100;a.height=1;b=a.createLinearGradient(0,0,100,0);b.addColorStop(0,this.m.ea(16777215,0));b.addColorStop(.88,this.m.ea(0,0));b.addColorStop(.9,this.m.ea(16654848,1));b.addColorStop(.92,this.m.ea(16776448,1));b.addColorStop(.94,this.m.ea(4849466,1));b.addColorStop(.96,
this.m.ea(131071,1));b.addColorStop(.98,this.m.ea(8190,1));b.addColorStop(1,this.m.ea(0,0));a.fillStyle=b;a.fillRect(0,0,100,1);d.texImage2D(d.TEXTURE_2D,0,d.RGBA,d.RGBA,d.UNSIGNED_BYTE,c)};m.prototype.kr=function(){for(;0<this.gh.length;)this.gh.pop()};m.prototype.fp=function(){var d=[],c=[],a=[];var b={radius:14,alpha:.2,color:11390415,A:.27};d.push(b);b={radius:20,alpha:.25,color:11390415,A:.4};d.push(b);b={radius:10,alpha:.2,color:12442332,A:.6};d.push(b);b={radius:15,alpha:.2,color:11390415,
A:.8};d.push(b);b={radius:10,alpha:.2,color:12442332,A:1.5};d.push(b);b={radius:15,alpha:.2,color:11390415,A:1.8};d.push(b);b={radius:8,alpha:.2,color:12575203,G:.8,A:.7};c.push(b);b={radius:7,alpha:.4,color:12575203,G:.5,A:1.6};c.push(b);b={radius:5,alpha:.4,color:12575203,G:.6,A:.9};c.push(b);b={radius:8,alpha:.3,color:12575203,G:.4,A:1.1};c.push(b);this.pc.push(d);this.hc.push(c);this.qc.push(a);d=[];c=[];a=[];b={radius:30,alpha:.3,color:11390415,A:.5};d.push(b);b={radius:10,alpha:.3,color:11390415,
A:1};d.push(b);b={radius:20,alpha:.3,color:11390415,A:1.3};d.push(b);b={radius:10,alpha:.3,color:11390415,A:1.5};d.push(b);b={radius:15,alpha:.3,color:11390415,A:1.8};d.push(b);b={radius:10,alpha:.3,color:15506856,G:.8,A:.7};c.push(b);b={radius:20,alpha:.5,color:15506856,G:.5,A:1.6};c.push(b);b={radius:5,alpha:.5,color:15506856,G:.6,A:.9};c.push(b);b={radius:60,alpha:.4,color:15506856,G:.2,A:1.1};c.push(b);a.push({radius:220,alpha:.035,A:2});this.pc.push(d);this.hc.push(c);this.qc.push(a);d=[];c=
[];a=[];b={radius:30,alpha:.5,color:15465727,A:.5};d.push(b);b={radius:40,alpha:.28,color:15726842,A:.8};d.push(b);b={radius:25,alpha:.32,color:15726842,A:1.1};d.push(b);b={radius:15,alpha:.25,color:15726842,A:1.35};d.push(b);b={radius:10,alpha:.28,color:15465727,A:1.65};d.push(b);b={radius:10,alpha:.45,color:15465727,G:.8,A:.7};c.push(b);b={radius:7,alpha:.5,color:15465727,G:.4,A:.9};c.push(b);b={radius:40,alpha:.4,color:15465727,G:.3,A:.38};c.push(b);b={radius:50,alpha:.4,color:15465727,G:.5,A:1.25};
c.push(b);b={radius:18,alpha:.2,color:15465727,G:.5,A:1.25};c.push(b);b={radius:10,alpha:.34,color:15726842,G:.8,A:1.5};c.push(b);b={radius:38,alpha:.37,color:15465727,G:.3,A:-.5};c.push(b);this.pc.push(d);this.hc.push(c);this.qc.push(a);d=[];c=[];a=[];b={radius:16,alpha:.5,color:16363159,A:.1};d.push(b);b={radius:26,alpha:.3,color:16091819,A:.32};d.push(b);b={radius:29,alpha:.2,color:16091819,A:1.32};d.push(b);b={radius:20,alpha:.18,color:16363159,A:1.53};d.push(b);b={radius:27,alpha:.13,color:16425092,
A:1.6};d.push(b);b={radius:20,alpha:.1,color:16091819,A:1.75};d.push(b);b={radius:12,alpha:.45,color:16312238,G:.45,A:.2};c.push(b);b={radius:8,alpha:.25,color:16434209,G:.7,A:.33};c.push(b);b={radius:9,alpha:.25,color:16091819,G:.4,A:.7};c.push(b);b={radius:7,alpha:.2,color:16091819,G:.4,A:.85};c.push(b);b={radius:60,alpha:.23,color:16091819,G:.55,A:1.05};c.push(b);b={radius:37,alpha:.1,color:16091819,G:.55,A:1.22};c.push(b);b={radius:10,alpha:.25,color:16363159,G:.65,A:1.38};c.push(b);b={radius:7,
alpha:.2,color:16434209,G:.5,A:1.45};c.push(b);b={radius:3,alpha:.2,color:16416033,G:.5,A:1.78};c.push(b);b={radius:6,alpha:.18,color:16434209,G:.45,A:1.9};c.push(b);b={radius:4,alpha:.14,color:16766514,G:.45,A:2.04};c.push(b);b={radius:30,alpha:.14,color:16766514,G:.8,A:.04};c.push(b);this.pc.push(d);this.hc.push(c);this.qc.push(a);d=[];c=[];a=[];b={radius:9,alpha:.3,color:14346999,G:.3,A:.3};c.push(b);b={radius:5,alpha:.5,color:14148072,G:.8,A:.6};c.push(b);b={radius:3,alpha:.37,color:14346999,
G:.66,A:.8};c.push(b);b={radius:45,alpha:.2,color:14346999,G:.36,A:1.2};c.push(b);b={radius:13,alpha:.2,color:14346999,G:.36,A:1.23};c.push(b);b={radius:11,alpha:.2,color:14148072,G:.36,A:1.28};c.push(b);b={radius:27,alpha:.16,color:14346999,G:.36,A:1.55};c.push(b);b={radius:6,alpha:.36,color:14148072,G:.8,A:1.7};c.push(b);this.pc.push(d);this.hc.push(c);this.qc.push(a);d=[];c=[];a=[];b={radius:24,alpha:.2,color:15186464,A:.2};d.push(b);b={radius:7,alpha:.26,color:15186464,A:.35};d.push(b);b={radius:23,
alpha:.18,color:15186464,A:.65};d.push(b);b={radius:13,alpha:.2,color:15186464,A:.8};d.push(b);b={radius:11,alpha:.15,color:15186464,A:1.4};d.push(b);b={radius:15,alpha:.11,color:15451904,A:1.6};d.push(b);b={radius:6,alpha:.45,color:15579138,G:.45,A:.22};c.push(b);b={radius:3,alpha:.3,color:15451904,G:.25,A:.4};c.push(b);b={radius:4,alpha:.2,color:15451904,G:.25,A:.45};c.push(b);b={radius:65,alpha:.17,color:15186464,G:.25,A:.5};c.push(b);b={radius:5,alpha:.45,color:15579138,G:.45,A:.88};c.push(b);
b={radius:140,alpha:.18,color:15579138,G:.32,A:.95};c.push(b);b={radius:12,alpha:.22,color:15579138,G:.32,A:1.1};c.push(b);b={radius:8,alpha:.32,color:15451904,G:.72,A:1.2};c.push(b);b={radius:55,alpha:.2,color:15451904,G:.45,A:1.33};c.push(b);b={radius:4,alpha:.3,color:15451904,G:.25,A:1.42};c.push(b);this.pc.push(d);this.hc.push(c);this.qc.push(a);d=[];c=[];a=[];b={radius:16,alpha:.4,color:10933495,A:.32};d.push(b);b={radius:14,alpha:.3,color:11007484,A:.36};d.push(b);b={radius:10,alpha:.3,color:4037331,
A:.58};d.push(b);b={radius:14,alpha:.22,color:8835068,A:.68};d.push(b);b={radius:10,alpha:.27,color:11007484,A:.82};d.push(b);b={radius:11,alpha:.27,color:10867450,A:1};d.push(b);b={radius:9,alpha:.2,color:6158332,A:1.05};d.push(b);b={radius:10,alpha:.17,color:10867450,A:1.78};d.push(b);b={radius:10,alpha:.3,color:4037331,A:-.23};d.push(b);b={radius:8,alpha:.45,color:8835068,G:.45,A:.175};c.push(b);b={radius:7,alpha:.4,color:12574715,G:.55,A:.46};c.push(b);b={radius:3,alpha:.3,color:10867450,G:.35,
A:.5};c.push(b);b={radius:60,alpha:.37,color:4031699,G:.75,A:.75};c.push(b);b={radius:3,alpha:.25,color:4031699,G:.25,A:.75};c.push(b);b={radius:3,alpha:.2,color:6158332,G:.25,A:.9};c.push(b);b={radius:7,alpha:.45,color:8835068,G:.45,A:1.3};c.push(b);b={radius:32,alpha:.22,color:8835068,G:.75,A:1.62};c.push(b);b={radius:9,alpha:.45,color:4031699,G:.65,A:1.6};c.push(b);b={radius:8,alpha:.25,color:4031699,G:.65,A:1.83};c.push(b);b={radius:7,alpha:.4,color:12574715,G:.55,A:-.18};c.push(b);this.pc.push(d);
this.hc.push(c);this.qc.push(a);d=[];c=[];a=[];b={radius:16,alpha:.4,color:16389120,A:.32};d.push(b);b={radius:26,alpha:.22,color:16389120,A:.4};d.push(b);b={radius:26,alpha:.25,color:16389120,A:.65};d.push(b);b={radius:18,alpha:.3,color:16389120,A:1.23};d.push(b);b={radius:14,alpha:.26,color:16389120,A:1.33};d.push(b);b={radius:17,alpha:.18,color:16389120,A:1.7};d.push(b);b={radius:30,alpha:.16,color:16389120,A:2.15};d.push(b);b={radius:100,alpha:.25,color:16389120,G:.22,A:1.45};c.push(b);b={radius:7,
alpha:.5,color:15628151,G:.3,A:1.5};c.push(b);b={radius:3,alpha:.5,color:15628151,G:.3,A:1.52};c.push(b);b={radius:4,alpha:.5,color:16389120,G:.3,A:1.745};c.push(b);b={radius:9,alpha:.22,color:16389120,G:.3,A:1.8};c.push(b);this.pc.push(d);this.hc.push(c);this.qc.push(a);d=[];c=[];a=[];b={radius:16,alpha:.4,color:10933495,A:.32};d.push(b);b={radius:14,alpha:.3,color:11007484,A:.36};d.push(b);b={radius:10,alpha:.3,color:4037331,A:.58};d.push(b);b={radius:14,alpha:.22,color:8835068,A:.68};d.push(b);
b={radius:10,alpha:.27,color:11007484,A:.82};d.push(b);b={radius:11,alpha:.27,color:10867450,A:1};d.push(b);b={radius:9,alpha:.2,color:6158332,A:1.05};d.push(b);b={radius:10,alpha:.17,color:10867450,A:1.78};d.push(b);b={radius:10,alpha:.3,color:4037331,A:-.23};d.push(b);b={radius:8,alpha:.45,color:8835068,G:.45,A:.175};c.push(b);b={radius:7,alpha:.4,color:12574715,G:.55,A:.46};c.push(b);b={radius:3,alpha:.3,color:10867450,G:.35,A:.5};c.push(b);b={radius:60,alpha:.37,color:4031699,G:.75,A:.75};c.push(b);
b={radius:3,alpha:.25,color:4031699,G:.25,A:.75};c.push(b);b={radius:3,alpha:.2,color:6158332,G:.25,A:.9};c.push(b);b={radius:7,alpha:.45,color:8835068,G:.45,A:1.3};c.push(b);b={radius:32,alpha:.22,color:8835068,G:.75,A:1.62};c.push(b);b={radius:9,alpha:.45,color:4031699,G:.65,A:1.6};c.push(b);b={radius:8,alpha:.25,color:4031699,G:.65,A:1.83};c.push(b);b={radius:7,alpha:.4,color:12574715,G:.55,A:-.18};c.push(b);this.pc.push(d);this.hc.push(c);this.qc.push(a);d=[];c=[];a=[];b={radius:16,alpha:.4,color:16389120,
A:.32};d.push(b);b={radius:26,alpha:.22,color:16389120,A:.4};d.push(b);b={radius:26,alpha:.25,color:16389120,A:.65};d.push(b);b={radius:18,alpha:.3,color:16389120,A:1.23};d.push(b);b={radius:14,alpha:.26,color:16389120,A:1.33};d.push(b);b={radius:17,alpha:.18,color:16389120,A:1.7};d.push(b);b={radius:30,alpha:.16,color:16389120,A:2.15};d.push(b);b={radius:100,alpha:.25,color:16389120,G:.22,A:1.45};c.push(b);b={radius:7,alpha:.5,color:15628151,G:.3,A:1.5};c.push(b);b={radius:3,alpha:.5,color:15628151,
G:.3,A:1.52};c.push(b);b={radius:4,alpha:.5,color:16389120,G:.3,A:1.745};c.push(b);b={radius:9,alpha:.22,color:16389120,G:.3,A:1.8};c.push(b);this.pc.push(d);this.hc.push(c);this.qc.push(a);d=[];c=[];a=[];b={radius:24,alpha:.2,color:15186464,A:.2};d.push(b);b={radius:7,alpha:.26,color:15186464,A:.35};d.push(b);b={radius:23,alpha:.18,color:15186464,A:.65};d.push(b);b={radius:13,alpha:.2,color:15186464,A:.8};d.push(b);b={radius:11,alpha:.15,color:15186464,A:1.4};d.push(b);b={radius:15,alpha:.11,color:15451904,
A:1.6};d.push(b);b={radius:6,alpha:.45,color:15579138,G:.45,A:.22};c.push(b);b={radius:3,alpha:.3,color:15451904,G:.25,A:.4};c.push(b);b={radius:4,alpha:.2,color:15451904,G:.25,A:.45};c.push(b);b={radius:65,alpha:.17,color:15186464,G:.25,A:.5};c.push(b);b={radius:5,alpha:.45,color:15579138,G:.45,A:.88};c.push(b);b={radius:140,alpha:.18,color:15579138,G:.32,A:.95};c.push(b);b={radius:12,alpha:.22,color:15579138,G:.32,A:1.1};c.push(b);b={radius:8,alpha:.32,color:15451904,G:.72,A:1.2};c.push(b);b={radius:55,
alpha:.2,color:15451904,G:.45,A:1.33};c.push(b);b={radius:4,alpha:.3,color:15451904,G:.25,A:1.42};c.push(b);this.pc.push(d);this.hc.push(c);this.qc.push(a)};m.prototype.Xq=function(){if(this.Pk){var d=this.m.R,c,a=new x.Ga(0,0,-100),b=this.m.qd(),e=0,f=0,g=!1;if(this.m.ga){var h=this.m.xb.width;var l=this.m.xb.height;this.m.J.Hh&&(h=this.m.J.rc.width,l=this.m.J.rc.height)}else{this.Z||(this.Z=this.ld.getContext("2d"));if(this.Z.width!==this.m.C.width||this.Z.height!==this.m.C.height)this.Z.width=
this.m.C.width,this.Z.height=this.m.C.height;this.Z.clear?this.Z.clear():this.Z.clearRect(0,0,this.ld.width,this.ld.height);h=this.Z.width;l=this.Z.height}var k=Math.sqrt(h*h+l*l),w=k/800;for(c=0;c<this.gh.length;c++){var r=this.gh[c];a.init(0,0,-100);a.Fa(-r.v*Math.PI/180);a.Ka(r.pan*Math.PI/180);a.Ka(-this.m.pan.j*Math.PI/180);a.Fa(this.m.v.j*Math.PI/180);a.lb(this.m.U.j*Math.PI/180);if(-.01>a.z){f=-b/a.z;e=a.x*f;f*=a.y;var y=Math.max(h,l);Math.abs(e)<y/2+100&&Math.abs(f)<y/2+100&&(g=!0,e+=h/2,
f+=l/2)}if(g){this.m.ga&&(d.blendFunc(d.SRC_ALPHA,d.DST_ALPHA),d.enable(d.BLEND),d.disable(d.DEPTH_TEST));y=h/2;var z=l/2;var ha=Math.sqrt((y-e)*(y-e)+(z-f)*(z-f));var ua=k/2;z=h>l?h:l;y=r.vl/100*((ua-ha)/ua);0>y&&(y=0);if(this.m.ga){d.useProgram(this.uc);d.bindBuffer(d.ARRAY_BUFFER,this.m.J.qb);d.vertexAttribPointer(this.uc.ia,this.m.J.qb.itemSize,d.FLOAT,!1,0,0);var id=d.getUniformLocation(this.uc,"uCanvasDimensions");d.uniform2f(id,d.drawingBufferWidth,d.drawingBufferHeight);d.uniform2f(d.getUniformLocation(this.uc,
"uFlareCenterPosition"),d.drawingBufferWidth/h*e,l-d.drawingBufferHeight/l*f);d.uniform1f(d.getUniformLocation(this.uc,"uBlindingValue"),y);id=d.getUniformLocation(this.uc,"uAspectRatio");d.uniform1f(id,this.m.J.Hh?d.drawingBufferWidth/d.drawingBufferHeight:d.drawingBufferWidth/d.drawingBufferHeight/(h/l));d.drawArrays(d.TRIANGLE_STRIP,0,this.m.J.qb.ee)}else id=this.Z.createRadialGradient(e,f,1,e,f,z),id.addColorStop(0,"rgba(255, 255, 255, "+y+")"),id.addColorStop(.5,"rgba(255, 255, 255, "+.8*y+")"),
id.addColorStop(1,"rgba(255, 255, 255, "+.6*y+")"),this.Z.fillStyle=id,this.Z.fillRect(0,0,this.Z.width,this.Z.height);if(0!=Number(r.type)&&!this.m.J.Hh){y=h/2-e;z=l/2-f;var sh=1,db=Number(r.type)-1;ha<.35*ua&&(sh=ha/(.35*ua),sh*=sh);ha>.7*ua&&(sh=(ua-ha)/(.3*ua));sh*=r.alpha/100;if(0<this.pc[db].length)for(ha=0;ha<this.pc[db].length;ha++){var gl=this.pc[db][ha];ua=gl.radius*w;var tf=gl.alpha*sh;0>tf&&(tf=0);var hl=gl.color;if(8==db||9==db||10==db)hl=r.color;if(this.m.ga)d.useProgram(this.Ba),d.bindBuffer(d.ARRAY_BUFFER,
this.xf),d.vertexAttribPointer(this.Ba.ia,this.xf.itemSize,d.FLOAT,!1,0,0),id=d.getUniformLocation(this.Ba,"uCanvasDimensions2"),d.uniform2f(id,d.drawingBufferWidth,d.drawingBufferHeight),d.uniform2f(d.getUniformLocation(this.Ba,"uCirclePosition"),d.drawingBufferWidth/h*(e+y*gl.A),d.drawingBufferWidth/h*(l-(f+z*gl.A))),d.uniform2f(d.getUniformLocation(this.Ba,"uCircleTexturePosition"),d.drawingBufferWidth/h*(e+y*gl.A),l-(f+z*gl.A)),d.uniform1f(d.getUniformLocation(this.Ba,"uCircleRadius"),ua),d.uniform3f(d.getUniformLocation(this.Ba,
"uCircleColor"),(hl>>16&255)/255,(hl>>8&255)/255,(hl&255)/255),d.uniform1f(d.getUniformLocation(this.Ba,"uCircleAlpha"),tf),d.uniform1f(d.getUniformLocation(this.Ba,"uCircleSoftness"),.1),id=d.getUniformLocation(this.Ba,"uAspectRatio"),d.uniform1f(id,d.drawingBufferWidth/d.drawingBufferHeight/(h/l)),d.drawArrays(d.TRIANGLE_FAN,0,this.xf.ee);else{this.Z.save();this.Z.translate(e+y*gl.A,f+z*gl.A);id=this.Z.createRadialGradient(0,0,1,0,0,1.1*ua);id.addColorStop(0,this.m.ea(hl,tf));id.addColorStop(.65,
this.m.ea(hl,.9*tf));id.addColorStop(.8,this.m.ea(hl,.7*tf));id.addColorStop(1,this.m.ea(hl,.2*tf));this.Z.beginPath();hl=2*Math.PI/6;gl=Math.PI/180*35;var il=!0;for(tf=gl;tf<=gl+2*Math.PI;tf+=hl)il?(this.Z.moveTo(ua*Math.sin(tf),ua*Math.cos(tf)),il=!1):this.Z.lineTo(ua*Math.sin(tf),ua*Math.cos(tf));this.Z.closePath();this.Z.fillStyle=id;this.Z.fill();this.Z.restore()}}if(0<this.hc[db].length)for(ha=0;ha<this.hc[db].length;ha++){gl=this.hc[db][ha];ua=gl.radius*w;tf=gl.alpha*sh;0>tf&&(tf=0);hl=gl.color;
if(8==db||9==db||10==db)hl=r.color;this.m.ga?(d.useProgram(this.Ba),d.bindBuffer(d.ARRAY_BUFFER,this.Ed),d.vertexAttribPointer(this.Ba.ia,this.Ed.itemSize,d.FLOAT,!1,0,0),id=d.getUniformLocation(this.Ba,"uCanvasDimensions2"),d.uniform2f(id,d.drawingBufferWidth,d.drawingBufferHeight),id=d.getUniformLocation(this.Ba,"uCirclePosition"),d.uniform2f(id,d.drawingBufferWidth/h*(e+y*gl.A),d.drawingBufferWidth/h*(l-(f+z*gl.A))),id=d.getUniformLocation(this.Ba,"uCircleTexturePosition"),d.uniform2f(id,d.drawingBufferWidth/
h*(e+y*gl.A),l-(f+z*gl.A)),id=d.getUniformLocation(this.Ba,"uCircleRadius"),d.uniform1f(id,ua),d.uniform3f(d.getUniformLocation(this.Ba,"uCircleColor"),(hl>>16&255)/255,(hl>>8&255)/255,(hl&255)/255),d.uniform1f(d.getUniformLocation(this.Ba,"uCircleAlpha"),tf),d.uniform1f(d.getUniformLocation(this.Ba,"uCircleSoftness"),gl.G),id=d.getUniformLocation(this.Ba,"uAspectRatio"),d.uniform1f(id,d.drawingBufferWidth/d.drawingBufferHeight/(h/l)),d.drawArrays(d.TRIANGLE_FAN,0,this.Ed.ee)):(this.Z.save(),this.Z.translate(e+
y*gl.A,f+z*gl.A),id=this.Z.createRadialGradient(0,0,1,0,0,ua),id.addColorStop(0,this.m.ea(hl,tf)),id.addColorStop(1-gl.G,this.m.ea(hl,.8*tf)),id.addColorStop(1,this.m.ea(hl,0)),this.Z.beginPath(),this.Z.arc(0,0,ua,0,2*Math.PI,!1),this.Z.closePath(),this.Z.fillStyle=id,this.Z.fill(),this.Z.restore())}if(0<this.qc[db].length)for(ha=0;ha<this.qc[db].length;ha++)r=this.qc[db][ha],ua=r.radius*w,tf=r.alpha*sh,0>tf&&(tf=0),this.m.ga?(d.useProgram(this.Cb),d.activeTexture(d.TEXTURE0),d.bindTexture(d.TEXTURE_2D,
this.un),d.bindBuffer(d.ARRAY_BUFFER,this.Ed),d.vertexAttribPointer(this.Cb.ia,this.Ed.itemSize,d.FLOAT,!1,0,0),id=d.getUniformLocation(this.Cb,"uCanvasDimensions2"),d.uniform2f(id,h,l),id=d.getUniformLocation(this.Cb,"uCirclePosition"),d.uniform2f(id,e+y*r.A,l-(f+z*r.A)),id=d.getUniformLocation(this.Cb,"uRingTexturePosition"),d.uniform2f(id,d.drawingBufferWidth/h*(e+y*r.A),l-(f+z*r.A)),id=d.getUniformLocation(this.Cb,"uCircleRadius"),d.uniform1f(id,ua),d.uniform2f(d.getUniformLocation(this.Cb,"uRingPosition"),
e+y*r.A,l-(f+z*r.A)),d.uniform1f(d.getUniformLocation(this.Cb,"uRingRadius"),ua),d.uniform1f(d.getUniformLocation(this.Cb,"uRingAlpha"),tf),id=d.getUniformLocation(this.Cb,"uAspectRatio"),d.uniform1f(id,d.drawingBufferWidth/d.drawingBufferHeight/(h/l)),d.uniform1i(d.getUniformLocation(this.Cb,"uSampler"),0),d.drawArrays(d.TRIANGLE_FAN,0,this.Ed.ee)):(this.Z.save(),this.Z.translate(e+y*r.A,f+z*r.A),id=this.Z.createRadialGradient(0,0,0,0,0,ua),id.addColorStop(0,this.m.ea(16777215,0)),id.addColorStop(.88,
this.m.ea(0,0)),id.addColorStop(.9,this.m.ea(16654848,tf)),id.addColorStop(.92,this.m.ea(16776448,tf)),id.addColorStop(.94,this.m.ea(4849466,tf)),id.addColorStop(.96,this.m.ea(131071,tf)),id.addColorStop(.98,this.m.ea(8190,tf)),id.addColorStop(1,this.m.ea(0,0)),this.Z.beginPath(),this.Z.arc(0,0,ua,0,2*Math.PI,!1),this.Z.closePath(),this.Z.fillStyle=id,this.Z.fill(),this.Z.restore())}this.m.ga&&(d.useProgram(this.m.za.O),d.disable(d.BLEND),d.enable(d.DEPTH_TEST))}}}};return m}();x.uo=p})(ggP2VR||(ggP2VR=
{}));var THREE;
(function(x){var p=function(){function m(d){this.ud=[];this.oa={x:0,y:0};this.Mc={x:0,y:0};this.mh=0;this.ke=null;this.Xj=!1;this.fl=this.Pe=0;this.jk=this.cl=!1;this.m=null;this.Kk=!0;this.yf=1;this.si=[];this.frustumCulled=!1;this.Rg=0;this.zj=this.mo=!1;this.Jf=[-1,-1,-1,-1];this.Bi=[];this.Le=[];this.zm=180;this.m=d;var c=this;setTimeout(function(){if(window.WebXRPolyfill&&window.Promise){var a={cardboardConfig:{BUFFER_SCALE:1}};Il&&(a.allowCardboardOnDesktop=!0);try{new window.WebXRPolyfill(a),d.N("WebXR Polyfill loaded!")}catch(b){}}c.qq()},
0);THREE?this.ul():console.log("Three.js not available!")}m.prototype.gp=function(){this.init();this.animate()};m.prototype.ul=function(){this.Xk=new THREE.Matrix4;this.bn=new THREE.Euler};m.prototype.init=function(){"xr"in navigator||console.log("no WebXR support");if(THREE)if(this.Bb)console.log("already set up!");else{this.Xk||this.ul();var d=this,c=this.md=this.m.md,a=this.rr=new THREE.Scene,b=this.camera=new THREE.PerspectiveCamera(100,window.innerWidth/window.innerHeight,.001,2E4);108>THREE.REVISION&&
(this.frustumCulled=!0);b.position.z=-.01;b.position.y=0;b.position.x=0;this.Bb=b=new THREE.WebGLRenderer({depth:!0,logarithmicDepthBuffer:!0,alpha:!0,antialias:!0,stencil:!0});b.setClearColor(new THREE.Color(0),1);b.setPixelRatio(window.devicePixelRatio);b.setSize(window.innerWidth,window.innerHeight);b.outputEncoding=THREE.GammaEncoding;b.shadowMap.enabled=!1;c.appendChild(b.domElement);"xr"in navigator&&(b.xr.enabled=!0,b.xr.setReferenceSpaceType("local"));var e=this.Bl=new THREE.Group;c=this.Hj=
b.xr.getController(0);c.addEventListener("selectstart",function(g){d.cn(g)});c.addEventListener("selectend",function(){});c.visible=!0;e.add(c);b=this.Ij=b.xr.getController(1);b.addEventListener("selectstart",function(g){d.cn(g)});b.addEventListener("selectend",function(){});b.visible=!0;e.add(b);e.visible=!0;a.add(e);e=(new THREE.BufferGeometry).setFromPoints([new THREE.Vector3(0,0,0),new THREE.Vector3(0,0,-1)]);var f=new THREE.LineBasicMaterial({color:14737632});e=new THREE.Line(e,f);e.name="line";
e.scale.z=5;c.add(e.clone());b.add(e.clone());this.wh=new THREE.Raycaster;this.oa=new THREE.Vector2;this.Nf=new THREE.Group;this.Ff=new THREE.Group;this.td=new THREE.Group;this.Sj=new THREE.Group;this.Aj=new THREE.Group;this.Nf.add(this.td);this.Nf.add(this.Sj);this.Nf.add(this.Ff);a.add(this.Nf);a.add(this.Aj);a=document.createElement("canvas");a.width=64;a.height=64;c=a.getContext("2d");c.fillStyle="black";c.lineWidth=3;c.beginPath();c.arc(32,32,10,0,2*Math.PI);c.stroke();a=new THREE.Texture(a);
a.needsUpdate=!0;a.encoding=THREE.sRGBEncoding;e=new THREE.PlaneBufferGeometry(2,2,8);a=new THREE.MeshBasicMaterial({map:a});a.transparent=!0;a=new THREE.Mesh(e,a);a.position.z=-50;this.Aj.add(a);window.addEventListener("resize",function(){d.Uq()},!1);document.addEventListener("mouseup",function(){d.Qq()},!1);document.addEventListener("mousedown",function(g){d.Oq(g)},!1);document.addEventListener("mousemove",function(g){d.Pq(g)},!1)}else console.log("Three.js not available!")};m.prototype.Jn=function(){var d=
this.m;d.N("VR not found");d.P("vrchanged",{});d.P("playerstatechanged",{})};m.prototype.Vr=function(){this.jk=!0;var d=this.m;d.N("XR found");d.P("vrchanged",{});d.P("playerstatechanged",{})};m.prototype.qq=function(){if(!this.mo){this.mo=!0;var d=this;if("xr"in navigator)navigator.xr.isSessionSupported("immersive-vr").then(function(c){c?d.Vr():d.Jn()})["catch"](d.Jn)}};m.prototype.Wg=function(){return null!=this.ke?this.Bb.xr.isPresenting:!1};m.prototype.ik=function(){return this.jk&&THREE};m.prototype.Sq=
function(d){var c=this;this.Vh();d.addEventListener("end",function(){c.Rq()});console.log("XR Session started.");this.Bb.xr.setSession(d);this.Xj=!0;this.ke=d};m.prototype.Rq=function(){console.log("XR Session ended.");this.Xj=!1;this.ke=null;this.Gj()};m.prototype.zg=function(){var d=this.m;if(this.jk){if(null===this.ke){var c=this;navigator.xr.requestSession("immersive-vr",{optionalFeatures:["local-floor","bounded-floor"]}).then(function(b){c.Sq(b)})["catch"](function(b){console.log(b);console.warn("'immersive-vr' isn't supported, or an error occurred activating VR!");
c.Gj()})}this.td&&this.td.translateY(-this.Rg);this.Rg=0;if(1==this.yf){var a=navigator.userAgent;0<=a.indexOf("OculusBrowser")&&(0<=a.indexOf("Pacific")&&(this.yf=1.7),0<=a.indexOf("Quest")&&(this.yf=1.5))}this.Bb.xr.setFramebufferScaleFactor(this.yf);d.Kc("Enter VR - scaled "+this.yf)}else this.Vh()};m.prototype.Vq=function(){if(THREE&&this.Bb){var d=this.m;d.ef=!0;d.$.style.display="none";d.$a.style.display="none";this.Bb.domElement.style.display="inline";d.P("vrchanged",{});d.P("playerstatechanged",
{})}};m.prototype.Gj=function(){if(THREE&&this.Bb){var d=this.m;d.ef=!1;d.$.style.display="inline";d.$a.style.display="inline";this.Bb.domElement.style.display="none";d.Yi(0);d.Qc();d.update();d.P("vrchanged",{});d.P("playerstatechanged",{})}};m.prototype.tf=function(){null!=this.ke&&this.ke.end()};m.prototype.Xn=function(){this.Wg()?this.tf():this.zg()};m.prototype.Sl=function(){var d=0,c=this.m;var a=1536;this.Bb&&c.N("Canvas: "+a);a*=Math.pow(2,0);if(0<c.u.levels.length){for(;c.u.levels.length>=
d+2&&!c.u.levels[d+1].Re&&c.u.levels[d+1].width>a;)d++;c.N("Level "+d+" - width: "+c.u.levels[d].width);c.N(c.u.levels)}return d};m.prototype.om=function(d){var c=this.m,a=c.qe[d];d="";if(a){a=a.firstChild;for(var b;a;)"input"==a.nodeName&&(b=a)&&(b=0<c.u.levels.length?b.getAttributeNode("leveltileurl"):b.getAttributeNode("tilevrurl"))&&(d=b.nodeValue),a=a.nextSibling}else d=0<c.u.levels.length?c.u.uk:c.Hl;for(a=0;3>a;a++)d=c.Mb(d,"c","vr"),d=c.Mb(d,"s","vr"),d=c.Mb(d,"r",0),d=c.Mb(d,"l",0),d=c.Mb(d,
"x",0),d=c.Mb(d,"y",0),d=c.Mb(d,"v",0),d=c.Mb(d,"h",0);return c.Pb(d)};m.prototype.ceilPowerOfTwo=function(d){return Math.pow(2,Math.ceil(Math.log(d)/Math.LN2))};m.prototype.loadTexture=function(d,c,a){var b=new THREE.ImageLoader;b.setCrossOrigin(this.m.crossOrigin);var e=this;b.load(c,function(f){var g=e.ceilPowerOfTwo(f.width),h=e.ceilPowerOfTwo(f.height);d.format=THREE.RGBFormat;d.encoding=THREE.sRGBEncoding;d.needsUpdate=!0;if(g==f.width&&h==f.height||!a)d.image=f;else{e.m.N("resizing "+f.width+
"/"+f.height+" -> "+g+"/"+h);var l=document.createElement("canvas");l.width=g;l.height=h;l.getContext("2d").drawImage(f,0,0,g,h);d.image=l}d.xm=!0;d.be&&d.be.xm&&(d.Mg.visible=!0,d.be.Mg.visible=!0)});this.si.push(d)};m.prototype.Vh=function(){if(THREE){var d=this.m;if(this.zj)d.N("vr panorama aleady added!");else{this.Sl();var c=this.Ff,a=this;d.N("add vr panorama");this.Te();this.camera.layers.enable(1);c.setRotationFromEuler(this.bn);c.rotateX(d.Na.pitch*Math.PI/180);c.rotateZ(-d.Na.U*Math.PI/
180);var b=new THREE.SphereBufferGeometry(2E4/3*1.5,16,16),e=(new THREE.TextureLoader).load(this.om(d.Zj()));e.encoding=THREE.sRGBEncoding;e=new THREE.MeshBasicMaterial({map:e,side:THREE.DoubleSide});b=new THREE.Mesh(b,e);b.scale.x=-1;b.rotateZ(d.Na.U*Math.PI/180);b.rotateX(-d.Na.pitch*Math.PI/180);b.rotateY(-90*Math.PI/180);c.add(b);a.Pi=b;a.zj=!0;setTimeout(function(){d.N("Adding Main Pano");a.zj=!1;a.Ho();d.D.f?a.Ko():a.Io();a.Fo()});this.mr();this.Kk=!0}}};m.prototype.Ko=function(){var d=this.m,
c=this.Ff,a=2E4/3;if(d.Jd){var b=new THREE.VideoTexture(d.D.f);b.wrapS=THREE.ClampToEdgeWrapping;b.wrapT=THREE.ClampToEdgeWrapping;b.minFilter=THREE.LinearFilter;b.encoding=THREE.sRGBEncoding;var e=new THREE.SphereBufferGeometry(a,60,40);e.scale(-1,1,1);for(var f=e.attributes.uv.array,g=1;g<f.length;g+=2)f[g]*=.5;f=new THREE.MeshBasicMaterial({map:b});e=new THREE.Mesh(e,f);e.rotateY(-90*Math.PI/180);e.layers.set(d.Eh?1:2);c.add(e);e=new THREE.SphereBufferGeometry(a,60,40);e.scale(-1,1,1);f=e.attributes.uv.array;
for(g=1;g<f.length;g+=2)f[g]*=.5,f[g]+=.5;f=new THREE.MeshBasicMaterial({map:b});e=new THREE.Mesh(e,f);e.rotateY(-90*Math.PI/180);e.layers.set(d.Eh?2:1)}else e=new THREE.SphereBufferGeometry(a,60,40),e.scale(-1,1,1),b=new THREE.VideoTexture(d.D.f),b.encoding=THREE.sRGBEncoding,b.wrapS=THREE.ClampToEdgeWrapping,b.wrapT=THREE.ClampToEdgeWrapping,b.minFilter=THREE.LinearFilter,f=new THREE.MeshBasicMaterial({map:b}),e=new THREE.Mesh(e,f),e.rotateY(-90*Math.PI/180);c.add(e);try{d.D.f.play()}catch(h){d.Kc(h)}};
m.prototype.Io=function(){var d=this.m,c=[],a=this.Sl(),b=this.Ff,e=2E4/3,f=d.Jd?2:1;if(d.u.levels.length>a)for(var g=d.u.levels[a],h=0;6>h;h++){c[h]=new THREE.Group;for(var l=0;l<g.da;l++)for(var k=0;k<g.T;k++)for(var w=0;w<f;w++){var r=new THREE.Texture;r.encoding=THREE.sRGBEncoding;this.loadTexture(r,d.oe(h,a,k,l,1==w),!0);r.wrapS=THREE.ClampToEdgeWrapping;r.wrapT=THREE.ClampToEdgeWrapping;r.minFilter=THREE.LinearMipMapLinearFilter;r.anisotropy=1;var y=d.u.M+2*d.u.Da,z=d.u.M+2*d.u.Da;k==g.T-1&&
(y=g.width-d.u.M*(g.T-1)+2*d.u.Da);l==g.da-1&&(z=g.width-d.u.M*(g.da-1)+2*d.u.Da);var ha=new THREE.PlaneBufferGeometry(e*y/g.width,e*z/g.width,8),ua=new THREE.MeshBasicMaterial({map:r});ha=new THREE.Mesh(ha,ua);ua.transparent=!0;ua.side=THREE.FrontSide;ua=1*d.u.M;ha.position.x=e*(k*ua+y/2-d.u.Da-g.width/2)/g.width;ha.position.y=e*-(l*ua+z/2-d.u.Da-g.width/2)/g.width;ha.position.z=-.5*e;if(d.Jd)if(ha.visible=!1,ha.layers.set(1==w?1:2),r.Mg=ha,0==w)var id=ha;else y=id.material.map,r.be=y,y.be=r;c[h].add(ha);
ha.frustumCulled=this.frustumCulled}4>h?c[h].rotation.y=-h*Math.PI/2:c[h].rotation.x=(4==h?1:-1)*Math.PI/2;b.add(c[h])}else for(a=d.bf,h=0;6>h;h++)for(c[h]=new THREE.Group,w=0;w<f;w++)g=h,d.Jd&&(g=h+(1==w?6:0)),r=new THREE.Texture,r.encoding=THREE.sRGBEncoding,this.loadTexture(r,d.Pb(d.vg[g]),!1),r.wrapS=THREE.ClampToEdgeWrapping,r.wrapT=THREE.ClampToEdgeWrapping,r.minFilter=THREE.LinearFilter,ha=new THREE.PlaneBufferGeometry(a*e/2,a*e/2,64),ua=new THREE.MeshBasicMaterial({map:r}),ha=new THREE.Mesh(ha,
ua),ua.transparent=!0,ua.side=THREE.FrontSide,ha.position.x=0,ha.position.y=0,ha.position.z=-.25*e,d.Jd&&(ha.layers.set(1==w?1:2),ha.visible=!1,r.Mg=ha,0==w?id=ha:(y=id.material.map,r.be=y,y.be=r)),c[h].add(ha),4>h?c[h].rotation.y=-h*Math.PI/2:c[h].rotation.x=(4==h?1:-1)*Math.PI/2,b.add(c[h])};m.prototype.Ho=function(){var d=this.m,c=this.td;new x.Ga(0,0,-100);for(var a=d.H.gj,b=0;b<d.W.length;b++){var e=d.W[b],f=e.gs(),g=.2;if(!1!==f){var h=!e.distance||0>=e.distance?5:1>e.distance?1:5>e.distance?
e.distance:5;if(e.Xc){var l=.005,k=(new THREE.TextureLoader).load(e.Xc);k.encoding=THREE.sRGBEncoding;var w=new THREE.MeshBasicMaterial({map:k});if(e.eg){h=100;g=2*h*Math.tan(e.fov/2*Math.PI/180);var r=new THREE.PlaneBufferGeometry(g,g*e.Cd/e.Ae,1,1);w.transparent=!0;w.opacity=1}else r=new THREE.PlaneBufferGeometry(l*e.Ae,l*e.Cd,1,1),w.transparent=!0,w.opacity=.25;g=l*e.Cd/2;w.side=THREE.DoubleSide}else r=new THREE.SphereBufferGeometry(.2,16,16),k=(new THREE.TextureLoader).load(this.om(f)),k.encoding=
THREE.sRGBEncoding,w=new THREE.MeshBasicMaterial({map:k}),w.transparent=!0,w.opacity=.25;f=new THREE.Mesh(r,w);l=e.title;if(a.enabled&&""!=l){r=document.createElement("canvas");r.width=256;r.height=32;k=r.getContext("2d");this.Gh||(this.Gh=document.createElement("canvas"),this.Gh.width=r.width,this.Gh.height=r.height);var y=this.Gh.getContext("2d");y.clearRect(0,0,r.width,r.height);y.font="16px Helvetica";y.textAlign="center";y.textBaseline="top";w=y.measureText(l);var z=w.width;0<a.height&&(z=Math.min(a.width,
r.width-6),z=Math.max(z,w.width));w=z+6;a.background&&(y.fillStyle=this.m.ea(a.cc,a.bc),y.fillRect((r.width-z)/2-3,2,z+6,24));0<a.$h&&(y.strokeStyle=this.m.ea(a.ec,a.dc),y.strokeRect((r.width-z)/2-3,2,z+6,24));y.fillStyle=this.m.ea(a.hj,a.fj);y.fillText(l,r.width/2,5,r.width-6);k.drawImage(this.Gh,(r.width-w)/2,2,w,24,0,0,r.width,r.height);k=new THREE.Texture(r);k.encoding=THREE.sRGBEncoding;k.needsUpdate=!0;l=1.5;r=new THREE.PlaneBufferGeometry(1*l*w/r.width,3*l/r.height,1,1);w=new THREE.MeshBasicMaterial({map:k,
side:THREE.DoubleSide});r=new THREE.Mesh(r,w);r.translateY(-g-.125*l/2);r.frustumCulled=this.frustumCulled;f.add(r);w.transparent=!0;w.opacity=.5}f.rotateY(e.pan*Math.PI/180);f.rotateX(e.v*Math.PI/180);f.translateZ(-h);f.userData=e;f.castShadow=!1;f.receiveShadow=!1;f.frustumCulled=this.frustumCulled;c.add(f)}}};m.prototype.Fo=function(){for(var d=this.m,c=this.Sj,a=0;a<d.S.length;a++){var b=d.S[a];if(b.f&&"_videopanorama"!=b.id&&!b.dd){b.f.play();var e=new THREE.VideoTexture(b.f);e.encoding=THREE.sRGBEncoding;
e.wrapS=THREE.ClampToEdgeWrapping;e.wrapT=THREE.ClampToEdgeWrapping;e.minFilter=THREE.LinearFilter;var f=5E3*Math.tan(b.fov*Math.PI/360);var g=0<b.xc?f*b.ad/b.xc:f;b.Hc&&1!=b.Hc&&(g*=b.Hc);f=new THREE.PlaneBufferGeometry(f,g,5,5);e=new THREE.MeshBasicMaterial({map:e,side:THREE.DoubleSide});e=new THREE.Mesh(f,e);e.rotateY(b.pan*Math.PI/180);e.rotateX(b.v*Math.PI/180);e.translateY(-0);e.translateZ(-2500);e.rotateZ(-b.lb*Math.PI/180);e.rotateY(-b.Ka*Math.PI/180);e.rotateX(-b.Fa*Math.PI/180);e.userData=
b;e.castShadow=!1;e.receiveShadow=!1;c.add(e)}}};m.prototype.yg=function(d){for(var c=d.children.length-1;0<=c;c--){var a=d.children[c];this.yg(a);d.remove(a)}d.geometry&&d.geometry.dispose();d.material&&(d.material.texture&&(d.material.texture.dispose(),d.material.texture.be=null,d.material.texture.Mg=null),d.material.map&&(d.material.map.dispose(),d.material.map.be=null,d.material.map.Mg=null),d.material.dispose())};m.prototype.Te=function(){THREE&&(this.si=[],this.yg(this.Ff),this.yg(this.td),
this.yg(this.Sj),10<this.Bb.info.memory.textures&&this.m.Gs(this.Bb.info.memory))};m.prototype.Uq=function(){if(THREE){var d=this.camera;d.aspect=window.innerWidth/window.innerHeight;d.updateProjectionMatrix();this.Bb.setSize(window.innerWidth,window.innerHeight)}};m.prototype.cn=function(d){THREE&&(d=this.gm(d.target),0<d.length&&(d=d[0].object.userData,this.m.ed(d.url,d.target)))};m.prototype.gm=function(d){this.Xk.identity().extractRotation(d.matrixWorld);this.wh.ray.origin.setFromMatrixPosition(d.matrixWorld);
this.wh.ray.direction.set(0,0,-1).applyMatrix4(this.Xk);return this.wh.intersectObjects(this.td.children)};m.prototype.intersectObjects=function(d){var c=d.getObjectByName("line");d=this.gm(d);if(0<d.length){d=d[0];var a=d.object;a.selected=!0;this.ud.push(a);c.scale.z=d.distance}else c.scale.z=5};m.prototype.bp=function(){for(;this.ud.length;)this.ud.pop().selected=!1};m.prototype.Pq=function(d){d.preventDefault();var c=this.oa,a=this.Bb;c.x=d.clientX/a.domElement.clientWidth*2-1;c.y=2*-(d.clientY/
a.domElement.clientHeight)+1;1==d.buttons&&(this.mh=this.Mc.x-c.x)};m.prototype.rq=function(){var d=this.wh;d.setFromCamera(this.oa,this.camera);d=d.intersectObjects(this.td.children);0<d.length&&(d=d[0].object,d.selected=!0,this.ud.push(d))};m.prototype.sq=function(){var d=this.wh;d.setFromCamera({x:0,y:0},this.camera);d=d.intersectObjects(this.td.children);0<d.length&&(d=d[0].object,d.selected=!0,this.ud.push(d))};m.prototype.Qq=function(){this.mh=0};m.prototype.Oq=function(d){50>d.clientX&&50>
d.clientY&&this.m.tf();0<this.ud.length?this.m.ed(this.ud[0].userData.url):(this.Mc.x=this.oa.x,this.Mc.y=this.oa.y)};m.prototype.animate=function(){var d=this.Bq=this;this.Bb&&this.Bb.setAnimationLoop(function(){d.render()})};m.prototype.render=function(){if(THREE){var d=null;try{d=this.Bb.xr.getCamera(this.camera)}catch(y){console.log(y)}0==this.Rg&&d&&(this.Rg=d.position.y,this.td.translateY(this.Rg));var c=this.Bq,a=c.m;c.bp();if(a.ef){c.cl=c.Hj.visible||c.Ij.visible?!1:!0;c.Hj.visible&&c.intersectObjects(c.Hj);
c.Ij.visible&&c.intersectObjects(c.Ij);c.Xj||c.rq();if(c.cl)if(c.sq(),0<this.ud.length)if(this.qk!=this.ud[0])this.qk=this.ud[0],this.wq=Date.now();else{if(Date.now()>this.wq+1E3){var b=this.qk.userData;b&&b.url&&this.m.ed(b.url,b.target)}}else this.qk=null;var e=[],f=!0;this.ke?this.ke.inputSources.forEach(function(y){var z=y.profiles;e.push(y.gamepad);0<=z.indexOf("oculus-go")&&(f=!1);0<=z.indexOf("generic-trigger-squeeze-thumbstick")&&(f=!0);0<=z.indexOf("oculus-touch")&&(f=!0)}):e=navigator.getGamepads&&
navigator.getGamepads();b=!1;if(!c.Bl.visible&&0<e.length){var g=e[0];g&&g.id&&""!=g.id&&(0<this.zm?c.Bl.visible=!0:this.zm--)}for(var h=0;h<e.length;h++)if((g=e[h])&&0<g.buttons.length)if(g.buttons[2].touched&&2<=g.axes.length&&!f)if(b=!0,g=g.axes[0],-1==this.Jf[h])this.Jf[h]=g;else{var l=this.Jf[h]-g;-.3>l&&(this.yh(20),this.Jf[h]=g);.3<l&&(this.yh(-20),this.Jf[h]=g)}else this.Jf[h]=-1,4<=g.axes.length&&(g=g.axes[2],.8<g?(b=!0,1!=this.Le[h]&&(this.Le[h]=1,this.Bi[h]=Date.now()-1E4)):-.8>g?(b=!0,
-1!=this.Le[h]&&(this.Le[h]=-1,this.Bi[h]=Date.now()-1E4)):this.Le[h]=0,0!=this.Le[h]&&400<Date.now()-this.Bi[h]&&(this.Bi[h]=Date.now(),this.yh(20*this.Le[h])));this.Pi&&0<this.si.length&&this.si.every(function(y){return y.xm})&&(this.yg(this.Pi),this.Ff.remove(this.Pi),this.Pi=null,a.N("unload Preview Sphere"));h=this.td;for(g=h.children.length-1;0<=g;g--){l=h.children[g];var k=1,w=1;l.selected?(k=1.5,w=1):b?(k=.6,w=.7):(k=.4,w=.5);var r=l.scale.x;r+=.1*(k-r);l.material.opacity+=.1*(w-l.material.opacity);
l.userData&&l.userData.Xc?(l.userData.eg&&(r=1,l.material.opacity=1),0<l.children.length&&(l.children[0].material.opacity=l.material.opacity)):(l.rotateY(1*Math.PI/180),0<l.children.length&&(l.children[0].rotateY(-1*Math.PI/180),l.children[0].material.opacity=l.material.opacity));l.scale.x=l.scale.y=l.scale.z=r}b=c.camera.rotation.clone();b.reorder("YXZ");this.fl=180*b.y/Math.PI;this.Kk&&(this.yh(this.fl-a.pan.j),this.Kk=!1);a.Cr(this.fl-this.Pe,180*b.x/Math.PI,180*b.z/Math.PI);a=this.Aj;c.cl?d&&
(a.setRotationFromEuler(d.rotation),a.visible=!0):a.visible=!1;c.Bb.render(c.rr,c.camera);0==this.mh||isNaN(this.mh)||this.yh(this.mh)}}};m.prototype.mr=function(){this.Pe=0;this.Nf.setRotationFromEuler(this.bn)};m.prototype.yh=function(d){this.Pe+=d;this.Nf.rotateY(d*Math.PI/180)};return m}();x.Do=p})(ggP2VR||(ggP2VR={}));var Il=!1;
(function(x){var p=function(){return function(){this.fov=this.v=this.pan=0}}(),m=function(){return function(){this.Cl=-1E7}}(),d=function(){function c(a,b){this.yq="TGljZW5zZTogQktZTS5DT00=";this.pan={j:0,cb:0,min:0,max:360,d:0,Ak:0,Wc:0,open:0};this.v={j:0,cb:0,min:-90,max:90,d:0,Wc:0,open:0};this.U={j:0,cb:0,min:-180,max:180,d:0,open:0};this.Gc={pan:0,v:-90,U:0,fov:170,Lb:9};this.fov={j:70,cb:70,min:1,lh:0,max:170,xk:360,yk:270,prev:0,d:0,mode:0,Mn:0,Jl:0,open:0};this.Na={U:0,pitch:0};this.C={width:10,height:10};
this.Wa=0;this.Lj=new x.Ga;this.crossOrigin="anonymous";this.Va=this.Oi=4;this.rd=this.Rh=this.ph=this.Bc=0;this.no={};this.Eh=this.Jd=!1;this.fa={start:{x:0,y:0},na:{x:0,y:0},Ld:{x:0,y:0},j:{x:0,y:0},ma:{x:0,y:0}};this.Y={Mc:!1,Zc:!1,wi:function(){return this.Zc||this.Mc},Tl:0,startTime:0,start:{x:0,y:0},na:{x:0,y:0},Ld:{x:0,y:0},j:{x:0,y:0},ma:{x:0,y:0},th:!1};this.wf=this.vf=!0;this.Ja={enabled:!0,na:{x:0,y:0},ma:{x:0,y:0},Lk:0,fov:{active:!1,wc:0}};this.kb={alpha:0,beta:0,gamma:0,orientation:0,
Pe:0,xh:!0,fadeIn:0};this.Pg={alpha:0,beta:0,gamma:0,orientation:0};this.D={src:[],kf:4,width:640,height:480,vd:!1,yi:!1,Sk:!0,Nn:!1,De:"loop",Wk:"",f:HTMLVideoElement=null,Tn:!1,texture:WebGLTexture=null,el:WebGLBuffer=null,ej:WebGLBuffer=null,lk:WebGLBuffer=null,format:1,oi:0,flipY:1,ub:function(){return 0},yn:function(){},loop:function(){return!1}};this.Ai=0;this.qa=this.Ia=this.Qa=this.$=this.vc=this.$a=this.K=null;this.Fe="pano";this.Yj="flashcontainer";this.Mj="";this.control=null;this.gc=[];
this.Ma=!1;this.xg=1;this.sa=null;this.Ud=this.gf=this.Cf=!1;this.mg=0;this.Ad=.02;this.uj=0;this.vj=!1;this.tj=this.Xh=this.ng=this.ff=this.sl=0;this.rl=-1;this.Wb="";this.Tf=this.Nc=!1;this.rh=0;this.vg=[];this.Hl="";this.rf=[];this.bf=this.Ec=1;this.pg=1024;this.Uf=!1;this.Ne=200;this.$b=0;this.Fh=5;this.Dc=0;this.Un=50;this.kk=this.Vn=0;this.B={enabled:!1,timeout:5,active:!1,Dh:!1,speed:.4,jj:0,Li:0,an:!0,Mf:"",$m:!1,Oh:!1,gg:!1,Yh:"",Vd:"Animation01",jf:!1,Hi:!1,Vk:!1,startTime:0,wd:0,Dg:!1,
di:!1,Di:0,Kd:0,eh:0,fh:0,dh:0,Rm:0};this.F={active:!1,aborted:!1,speed:.1,pan:0,v:0,U:0,fov:70,Rd:70,eh:0,fh:0,Sm:0,dh:0,Lb:0,vh:0,rk:0,bl:!1,nh:!1,ql:0,pl:0,ti:!1};this.If={pan:-1,v:-1,fov:-1};this.Pm=0;this.ka=null;this.hg={};this.Ph={};this.Yd=[];this.Gi={};this.Lc={};this.Lf={};this.H={mode:1,$g:-1,wa:0,gb:0,kd:.05,ec:255,dc:1,cc:255,bc:.3,Bf:!0,gj:{enabled:!0,width:180,height:20,hj:0,fj:1,background:!0,cc:16777215,bc:1,ec:0,dc:1,xj:3,$h:1,rj:!0},sb:[],Zb:[],gd:[],bj:[]};this.Ha=null;this.W=
[];this.X=[];this.S=[];this.eb=[];this.qe={};this.Ya=[];this.xa=[];this.hd=[];this.se=[];this.Ze=[];this.ba=1;this.za=this.ie=this.Ob=this.md=null;this.Ag={};this.Cc={};this.Rn=this.$f="";this.Qn=-1;this.u=new x.xo;this.Wq={target:0,current:0,kd:.01,delay:2,Qj:0,ei:!1,Po:!1};this.margin={left:0,top:0,right:0,bottom:0};this.L={hh:!1,zq:!1,jc:!1,ce:!1,Hd:!0,Fm:!1,Ln:1,wn:!1,Oj:!0,ug:!0,bi:!1,Df:!1,xn:!0,sensitivity:8};this.kh=[];this.od=!0;this.oa={x:0,y:0};this.Nh=this.Nb=this.Lh=this.jd=this.ef=this.ga=
!1;this.pj=this.ho=!0;this.gk=!1;this.Ee=!0;this.fg=this.dk=this.fk=!1;this.io=!0;this.ri=!1;this.Oa=this.Wd="";this.Yc="transition";this.Ua="transform";this.Dd="perspective";this.Nl="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA5JREFUeNpiYBgeACDAAADIAAE3iTbkAAAAAElFTkSuQmCC";this.xb={width:0,height:0};this.Xl=new x.Ga;this.Wl=new x.Ga;this.Yl=new x.Ga;this.Zl=new x.Ga;this.Vl=new x.Ga;this.Gf=!1;this.Qm=this.Pa="";this.qj=
[];this.zk=[];this.ck=!1;this.lj=[];this.Xg=this.Gm=this.Ug=this.Hm=this.Id=this.Km=this.mk=this.Mk=this.yc=this.xi=this.Ke=this.nk=this.Im=this.Jm=this.Mm=!1;this.Mh=!0;this.Ti=this.vi=!1;this.Sg=[];this.devicePixelRatio=1;this.pa=this.J=null;this.qg=!1;this.Xa=null;this.wb={enabled:!1,speed:1,running:!1,Vj:!0};this.Ym=!1;this.Fi="<<LOG>>";this.cube=new x.yo;this.al=!1;this.tg=function(f,g){if(0==f.length)return f;var h;var l=[];var k=g.Qi(f[0])-0;for(h=0;h<f.length;h++){var w=h;var r=h+1;r==f.length&&
(r=0);var y=g.Qi(f[r])-0;if(0<=k&&0<=y)l.push(f[w]);else if(0<=k||0<=y){var z=y/(y-k);0>z&&(z=0);1<z&&(z=1);var ha=new x.Ga;ha.Gd(f[w],f[r],z);0>k||l.push(f[w]);l.push(ha)}k=y}return l};this.jn=new p;this.Rk=0;this.oc=!1;this.Ci=-1;this.Ig=function(f){return f?this.Vg()&&(f.clientX||f.clientY)?{x:f.clientX,y:f.clientY}:f.pageX||f.pageY?{x:f.pageX,y:f.pageY}:f.clientX||f.clientY?{x:f.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,y:f.clientY+document.body.scrollTop+document.documentElement.scrollTop}:
f.touches&&f.touches[0]?{x:f.touches[0].pageX,y:f.touches[0].pageY}:{x:0,y:0}:{x:0,y:0}};this.Ji=1;this.op=this.ki=this.Nm=this.Rj=this.Gk=this.Ri=0;this.Om=!1;this.$d=!0;this.mb=new x.Uh(this);this.mb.Bf=!1;this.Ml();if(7<this.Fi.length){var e=c.wg("bG9n");window[c.wg("Y29uc29sZQ==")][e](c.Kl(this.Fi))}this.Wf(this.mb);this.checkLoaded=this.gc;this.isLoaded=!1;b&&b.hasOwnProperty("useFlash")&&b.useFlash&&(this.Nb=!0,this.ga=this.jd=!1,b.hasOwnProperty("flashPlayerId")?this.Fe=b.flashPlayerId:this.Fe=
"pano",b.hasOwnProperty("flashContainerId")?this.Yj=b.flashContainerId:this.Yj=a+"flash");b&&b.hasOwnProperty("webGLFlags")&&b.webGLFlags&&(this.no=b.webGLFlags);this.Ea();this.Nb||(this.Sa=new x.uo(this));this.Fl(a);this.Oo();this.userdata=this.hg=this.Bg();this.emptyHotspot=this.mb;this.mouse=this.oa;this.J=new x.vo(this);this.Xa=new x.wo(this);this.za=new x.Co(this);this.Eb=new x.Do(this);this.Qc()}c.prototype.um=function(a){return-99991===a?this.yq:"6.1.8/17956"};c.prototype.Jj=function(){this.J.enabled=
this.pa.enabled;this.J.type=this.pa.type;this.J.ra=this.pa.zoomin;this.J.sc=this.pa.zoomout;this.J.og=this.pa.blendtime;this.J.kg=this.pa.zoomoutpause;this.J.jg=this.pa.zoomfov;this.J.te=this.pa.zoomspeed;this.J.lf=this.pa.blendcolor;this.J.Pc=this.pa.softedge;this.pa=null};c.prototype.Nr=function(a){this.pa={};this.pa.enabled=!0;this.pa.type=this.J.type;this.pa.zoomin=this.J.ra;this.pa.zoomout=this.J.sc;this.pa.blendtime=this.J.og;this.pa.zoomoutpause=this.J.kg;this.pa.zoomfov=this.J.jg;this.pa.zoomspeed=
this.J.te;this.pa.blendcolor=this.J.lf;this.pa.softedge=this.J.Pc;if(a.hasOwnProperty("type")){var b=a.type;if("cut"==b||"crossdissolve"==b||"diptocolor"==b||"irisround"==b||"irisrectangular"==b||"wipeleftright"==b||"wiperightleft"==b||"wipetopbottom"==b||"wipebottomtop"==b||"wiperandom"==b)this.pa.type=b}a.hasOwnProperty("before")&&(b=Number(a.before),0==b||2==b)&&(this.pa.zoomin=b);a.hasOwnProperty("after")&&(b=Number(a.after),0==b||2==b||3==b||4==b)&&(this.pa.zoomout=b);a.hasOwnProperty("transitiontime")&&
(b=Number(a.transitiontime),0<=b&&50>=b&&(this.pa.blendtime=b));a.hasOwnProperty("waitfortransition")&&(this.pa.zoomoutpause=1==a.waitfortransition);a.hasOwnProperty("zoomedfov")&&(b=Number(a.zoomedfov),.01<=b&&50>=b&&(this.pa.zoomfov=b));a.hasOwnProperty("zoomspeed")&&(b=Number(a.zoomspeed),.01<=b&&99>=b&&(this.pa.zoomspeed=b));a.hasOwnProperty("dipcolor")&&(this.pa.blendcolor=a.dipcolor);a.hasOwnProperty("softedge")&&(a=Number(a.softedge),0<=a&&1E3>=a&&(this.pa.softedge=a));this.qg||this.Jj()};
c.prototype.Oc=function(a,b,e){var f=b?Number(b):0;if(0!=a&&4!=a&&12!=a&&9!=a)this.Kc("Unsupported projection type: "+a);else if(b&&0!==f&&4!==f&&12!==f&&9!==f)this.Kc("Unsupported projection2 type: "+f);else if(a==f&&(f=0),this.ph=e?Number(e):1,this.Va!=a||this.Bc!=f)this.Va=a,this.Bc=f,this.za.ui()};c.prototype.Ra=function(){return 0==this.Va?4:this.Va};c.prototype.Dj=function(a,b){if(0!=a&&4!=a&&12!=a&&9!=a)this.Kc("Unsupported projection type: "+a);else if(this.ga||0==a||4==a||this.Kc("Projection changes require WebGL!"),
this.Ra()!=a){var e={};e.pan=this.pan.j;e.tilt=this.v.j;e.fov=this.fov.j;e.projection=a;e.timingFunction=3;e.speed=b;a=this.Hg(a);e.fov=Math.min(a,e.fov);this.Ii(e)}};c.prototype.addListener=function(a,b){(this.Ag[a]=this.Ag[a]||[]).push(b)};c.prototype.P=function(a,b){if(a=this.Ag[a])for(var e=a.length,f=0;f<e;f++)try{a[f].apply(null,[b])}catch(g){this.Kc(g)}};c.prototype.removeEventListener=function(a,b){var e=this.Ag[a];if(e){var f;var g=0;for(f=e.length;g<f;g++)if(e[g]===b){1===f?delete this.Ag[a]:
e.splice(g,1);break}}};c.prototype.lr=function(){this.Ma=!0};c.prototype.kq=function(){return this.R};c.prototype.Jo=function(a,b,e,f){if(!this.Cc.hasOwnProperty(a)){var g=new m;this.Cc[a]=g;g.type=b;"undefined"!==typeof e&&this.le(a,e);"object"===typeof f&&this.Fn(a,f);return!0}return!1};c.prototype.em=function(a){var b=document.cookie.indexOf(a+"="),e="";-1!=b&&(b=b+a.length+1,a=document.cookie.indexOf(";",b),-1==a&&(a=document.cookie.length),e=decodeURIComponent(document.cookie.substring(b,a)));
return e};c.prototype.Gn=function(a,b,e){0==b&&this.le(a,e,!1);1==b&&this.le(a,parseFloat(e),!1);2==b&&this.le(a,"true"==e,!1)};c.prototype.Fn=function(a,b){if(this.Cc.hasOwnProperty(a)&&"object"===typeof b){var e=this.Cc[a];b.hasOwnProperty("cookiePath")&&(e.Dl=String(b.cookiePath));b.hasOwnProperty("cookieExpireDays")&&(e.Cl=parseFloat(b.cookieExpireDays));b.hasOwnProperty("keep")&&(e.pk=!!b.keep,e.pk&&0<document.cookie.length&&(""!=this.$f?-1!=document.cookie.indexOf(this.$f+"=")&&(b=JSON.parse(this.em(this.$f)),
b.hasOwnProperty(a)&&this.Gn(a,e.type,b[a])):(b="ggvar_"+a,-1!=document.cookie.indexOf(b+"=")&&(b=this.em(b),this.Gn(a,e.type,b)))));return!0}return!1};c.prototype.Mr=function(a,b){this.$f=a;b&&"object"===typeof b&&(b.hasOwnProperty("cookiePath")&&(this.Rn=String(b.cookiePath)),b.hasOwnProperty("cookieExpireDays")&&(this.Qn=parseFloat(b.cookieExpireDays)))};c.prototype.tl=function(a,b,e){-1<=b&&(a+="; max-age="+86400*b);""!=e&&(a+="; path="+e);return a};c.prototype.le=function(a,b,e){void 0===e&&
(e=!0);if(this.Cc.hasOwnProperty(a)){var f=this.Cc[a];if(0==f.type&&"string"===typeof b||1==f.type&&"number"===typeof b||2==f.type&&"boolean"===typeof b){if(f.value!=b){f.value=b;if(f.pk&&e){if(""!=this.$f){f={};for(var g=0,h=Object.keys(this.Cc);g<h.length;g++)e=h[g],this.Cc[e].pk&&(f[e]=encodeURIComponent(this.Cc[e].value.toString()));e=this.$f+"="+JSON.stringify(f);e=this.tl(e,this.Qn,this.Rn)}else e="ggvar_"+a+"="+encodeURIComponent(b.toString()),e=this.tl(e,f.Cl,f.Dl?f.Dl:"");document.cookie=
e}this.P("varchanged_"+a,{value:b})}return!0}}return!1};c.prototype.eq=function(a){if(this.Cc.hasOwnProperty(a))return this.Cc[a].value};c.wg=function(a){var b="",e=0;a=a.replace(/[^A-Za-z0-9\+\/=]/g,"");do{var f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(e++));var g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(e++));var h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(e++));var l=
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(e++));f=f<<2|g>>4;g=(g&15)<<4|h>>2;var k=(h&3)<<6|l;b+=String.fromCharCode(f);64!=h&&(b+=String.fromCharCode(g));64!=l&&(b+=String.fromCharCode(k))}while(e<a.length);return b};c.fs=function(a){for(var b=[1,1,1,1,2,2,3,0],e=a.length,f="",g=0;g<e;){var h=a.charCodeAt(g++);if(h&128){var l=b[h>>3&7];if(!(h&64&&l)||g+l>e)return null;for(h&=63>>l;0<l;--l){var k=a.charCodeAt(g++);if(128!=(k&192))return null;h=h<<6|k&63}}f+=
String.fromCharCode(h)}return f};c.Kl=function(a){return c.fs(c.wg(a))};c.prototype.Ml=function(){this.devicePixelRatio=window.devicePixelRatio||1;this.Mm=!!navigator.userAgent.match(/(Windows|Win)/g);this.Jm=!!navigator.userAgent.match(/(Mac|Macintosh|Mac_powerpc)/g);this.Im=!!navigator.userAgent.match(/(Linux|Ubuntu)/g);this.nk=!!navigator.userAgent.match(/(MSIE)/g);this.Ke=!!navigator.userAgent.match(/(Edge|EdgA)/g);this.xi=!!navigator.userAgent.match(/(Firefox)/g);if(this.yc=!!navigator.userAgent.match(/(Safari)/g)){var a=
navigator.userAgent.indexOf("Safari");this.fd=navigator.userAgent.substring(a+7);a=navigator.userAgent.indexOf("Version");-1!=a&&(this.fd=navigator.userAgent.substring(a+8));this.fd=this.fd.substring(0,this.fd.indexOf(" "));this.fd=this.fd.substring(0,this.fd.indexOf("."));this.Mk=!0}this.Km=!!navigator.userAgent.match(/(SamsungBrowser)/g);if(this.mk=!!navigator.userAgent.match(/(Chrome)/g))this.yc=!1;this.Id=!!navigator.userAgent.match(/(iPad|iPhone|iPod)/g);this.Hm=!!navigator.userAgent.match(/(iPhone|iPod)/g);
this.Ug=!!navigator.userAgent.match(/(android)/i);this.Gm=!!navigator.userAgent.match(/(IEMobile)/i);this.Xg=this.Id||this.Ug||this.Gm;/iP(hone|od|ad)/.test(navigator.platform)&&(a=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/),this.Sg=[parseInt(a[1],10),parseInt(a[2],10),parseInt(a[3]||"0",10)]);this.vi=!window.requestAnimationFrame;a=["Webkit","Moz","O","ms","Ms"];this.Oa="";this.Yc="transition";this.Ua="transform";this.Dd="perspective";for(var b=0;b<a.length;b++)"undefined"!==typeof document.documentElement.style[a[b]+
"Transform"]&&(this.Oa="-"+a[b].toLowerCase()+"-",this.Yc=a[b]+"Transition",this.Ua=a[b]+"Transform",this.Dd=a[b]+"Perspective");this.gk=Gl();this.ga=Hl();this.jd=this.gk;this.ga&&(this.jd=!1);this.Nc=!0;this.Tf=!1;if(this.Id||this.Ug)this.En(80),this.Fh=2;this.Kc("Pano2VR player "+this.um()+" - Prefix:"+this.Oa+", "+(this.gk?"CSS 3D available":"CSS 3D not available")+", "+(this.ga?"WebGL available":"WebGL not available"));Il&&this.N("Pano2VR Debug version!");try{window.AudioContext=window.AudioContext||
window.webkitAudioContext,this.va=new AudioContext}catch(e){this.va=null}this.yc&&(!this.Mk||9>Number(this.fd))&&(this.va=null);this.yc&&!this.Id&&12<=Number(this.fd)&&13>Number(this.fd)&&(this.va=null);this.yc&&this.Id&&13==Number(this.Sg[0])&&(1==Number(this.Sg[1])||2<=Number(this.Sg[1]))&&(this.va=null);this.Mh=this.Hm?this.yc&&this.Mk&&10<=Number(this.fd)?!0:!1:!0};c.prototype.N=function(a){if(Il){var b=document.getElementById("gg_debug");b&&(b.innerHTML=a.toString()+"<br />");window.console&&
window.console.log(a)}};c.prototype.Gs=function(a){if(Il){var b=document.getElementById("gg_debug");b&&(b.innerHTML=a.toString()+"<br />");window.console&&window.console.warn(a)}};c.prototype.Kc=function(a){var b=document.getElementById("gg_debug");b&&(b.innerHTML=a+"<br />");window.console&&window.console.log(a)};c.prototype.En=function(a){this.Ne=a};c.prototype.setCrossOrigin=function(a){this.crossOrigin=a};c.prototype.wr=function(a){this.Ef=a};c.prototype.Vp=function(){return this.rh};c.prototype.tr=
function(a){this.Wd=a};c.prototype.dm=function(){return this.Wd};c.prototype.Dp=function(){return this.Xg};c.prototype.yp=function(){return this.ri};c.prototype.Ep=function(){return this.Gf};c.prototype.Ap=function(){return this.B.active};c.prototype.yr=function(a){this.Xg=!!a};c.prototype.li=function(){return this.isLoaded};c.prototype.Cp=function(){return!this.isLoaded};c.prototype.qd=function(){return Number(this.C.height)/(2*Math.tan(Math.PI/180*(this.Tb()/2)))};c.prototype.Hn=function(a,b){this.isFullscreen&&
(a=window.innerWidth,b=window.innerHeight);var e=a-this.margin.left-this.margin.right,f=b-this.margin.top-this.margin.bottom;if(!(10>e||10>f)){var g=window.devicePixelRatio||1;this.Uf&&(g=1);this.K.style.width=e+"px";this.K.style.height=f+"px";this.K.style.left=this.margin.left+"px";this.K.style.top=this.margin.top+"px";if(this.ga)try{this.$a&&(this.$a.style.position="absolute",this.$a.style.display="inline",this.$a.style.width=e+"px",this.$a.style.height=f+"px",this.$a.width=e*g,this.$a.height=f*
g),this.R&&(this.xb.width=e*g,this.xb.height=f*g,this.R.viewport(0,0,this.R.drawingBufferWidth,this.R.drawingBufferHeight))}catch(h){alert(h)}this.vc&&(this.vc.style.width=a+"px",this.vc.style.height=b+"px",this.vc.width=a,this.vc.height=b);this.Qa&&(this.Qa.style.width=a+"px",this.Qa.style.height=b+"px",this.Ia.style.width=a+"px",this.Ia.style.height=b+"px",this.Ia.width=a,this.Ia.height=b,this.Ia.style.left=this.margin.left+"px",this.Ia.style.top=this.margin.top+"px",this.sa&&this.sa!=this.Qa&&
(this.sa.style.width=a+"px",this.sa.style.height=b+"px"));this.Sa&&(e=this.Sa.ld,e.style.width=a+"px",e.style.height=b+"px",e.width=a,e.height=b,e.style.left=this.margin.left+"px",e.style.top=this.margin.top+"px");this.Cf&&(this.Ma=!0);e=this.K.offsetWidth;f=this.K.offsetHeight;if(this.C.width!=e||this.C.height!=f)this.C.width=e,this.C.height=f;this.Bs();this.sa&&this.sa.ggUpdateSize&&this.sa.ggUpdateSize(a,b);this.P("sizechanged",{w:a,h:b});this.P("playerstatechanged",{})}};c.prototype.df=function(){this.al=
!0};c.prototype.Qc=function(){this.Hn(this.md.offsetWidth,this.md.offsetHeight)};c.prototype.jq=function(){var a={width:0,height:0};a.width=this.C.width;a.height=this.C.height;return a};c.prototype.He=function(){var a={x:0,y:0},b=this.K;if(b.offsetParent){do a.x+=b.offsetLeft,a.y+=b.offsetTop,b=b.offsetParent;while(b)}return a};c.prototype.Kr=function(a){this.ka=a};c.prototype.zr=function(a,b,e,f){this.margin.left=a;this.margin.top=b;this.margin.right=e;this.margin.bottom=f;this.ka=this.skinObj;this.df()};
c.prototype.Xo=function(a){0==a&&(this.L.Hd=!1);1==a&&(this.L.Hd=!0);2==a&&(this.L.Hd=!this.L.Hd);this.P("viewmodechanged",{});this.P("playerstatechanged",{})};c.prototype.hq=function(){return 1==this.L.Hd?1:0};c.prototype.zl=function(a,b){this.H.mode=1==b&&0<this.H.mode?0:Math.round(a);this.update();this.qa&&(this.qa.changePolygonMode(a,b),this.qa.update());this.P("polymodechanged",{})};c.prototype.In=function(a){var b=this.H.sb.indexOf(a);-1==b?(this.H.sb.push(a),this.H.Zb.push(0),this.H.gd.push(1)):
this.H.gd[b]=1;this.update()};c.prototype.Am=function(a){var b=this.H.sb.indexOf(a);-1!=b&&(this.H.gd[b]=0,this.H.bj.push(a),this.update())};c.prototype.ms=function(a){var b=this.H.sb.indexOf(a);-1==b||-1!=b&&0==this.H.gd[b]?this.In(a):this.Am(a);this.update()};c.prototype.Vo=function(a,b,e,f,g){for(var h=0;h<this.W.length;h++){var l=this.W[h];"poly"!=l.type||l.id!=a&&""!=a||(l.cc=b,l.bc=e,l.ec=f,l.dc=g)}""==a&&(this.H.cc=b,this.H.bc=e,this.H.ec=f,this.H.dc=g);this.update()};c.prototype.To=function(a){this.Sa&&
(this.Sa.Pk=0==a?!0:1==a?!1:!this.Sa.Pk,this.update())};c.prototype.Xp=function(){return this.H.mode};c.prototype.Yo=function(){this.P("viewstatechanged",{})};c.prototype.iq=function(){return 0};c.prototype.Kp=function(a){return(a=this.Gi[a])?a.type:"web"};c.prototype.Jp=function(a){return(a=this.Gi[a])?a:{}};c.prototype.Qp=function(a,b){var e=[];a||(a=this.Pa);var f=this.Yd[a];f&&(a=f);""===a&&0<Object.keys(this.Lc).length&&(a=Object.keys(this.Lc)[0]);this.Lc[a]&&this.Lc[a][b]&&(e.push(this.Lc[a][b].y),
e.push(this.Lc[a][b].x));return e};c.prototype.Rp=function(a,b){var e=[];a||(a=this.Pa);var f=this.Yd[a];f&&(a=f);""===a&&0<Object.keys(this.Lc).length&&(a=Object.keys(this.Lc)[0]);this.Lf[a]&&this.Lf[a][b]&&(e.push(this.Lf[a][b].x),e.push(this.Lf[a][b].y));return e};c.prototype.jm=function(a){var b=this.Yd[a];b&&(a=b);b=this.im();for(var e=[],f=0;f<b.length;f++)this.Lc[a][b[f]]&&e.push(b[f]);return e};c.prototype.Ip=function(a){a=this.jm(a);return 0<a.length?a[0]:""};c.prototype.im=function(){var a=
[],b;for(b in this.Gi)a.push(b);return a};c.prototype.Cm=function(a,b,e){a=Math.atan2(a+1,e);var f=Math.atan2(b+1,e);b=Math.sin(a);e=Math.sin(f);a=Math.cos(a);f=Math.cos(f);this.Xl.init(0,0,-1);this.Wl.init(a,0,-b);this.Yl.init(-a,0,-b);this.Zl.init(0,f,-e);this.Vl.init(0,-f,-e)};c.prototype.Fj=function(a){a=this.tg(a,this.Xl);a=this.tg(a,this.Wl);a=this.tg(a,this.Yl);a=this.tg(a,this.Zl);return a=this.tg(a,this.Vl)};c.prototype.$n=function(a){if(!this.Nc&&this.xq!=a){this.xq=a;var b=this.margin.left+
this.C.width/2+"px ";b+=this.margin.top+this.C.height/2+"px ";this.Qa.style[this.Dd]=a+"px";this.Qa.style[this.Dd+"Origin"]=b;this.K.style[this.Dd]=a+"px";this.K.style[this.Dd+"Origin"]=b}};c.prototype.fm=function(){return this.J.re||this.J.yd||this.ga&&(4!=this.Va||0!=this.Bc)?!1:!0};c.prototype.Jh=function(){var a=new x.Ga(0,0,-100),b=this.qd();var e=100/this.fov.j;var f=this.u.width/this.u.height;var g=this.C.height*e*f;e*=this.C.height;for(var h=this.fm(),l=0;l<this.W.length;l++){var k=this.W[l];
if("point"==k.type){var w=!1;if(2==this.Wa){var r=(this.pan.j-k.pan)/100/f*g;var y=(this.v.j-k.v)/100*e;Math.abs(r)<this.C.width/2+500&&Math.abs(y)<this.C.height/2+500&&(w=!0)}else a.init(0,0,-100),a.Fa(-k.v*Math.PI/180),a.Ka(k.pan*Math.PI/180),a.Ka(-this.pan.j*Math.PI/180),a.Fa(this.v.j*Math.PI/180),a.lb(this.U.j*Math.PI/180),.01>a.z?(y=-b/a.z,r=a.x*y,y*=a.y,Math.abs(r)<this.C.width/2+5E3&&Math.abs(y)<this.C.height/2+5E3&&(w=!0)):y=r=0;k.Xb=r+this.C.width/2;k.Ab=y+this.C.height/2;k.visible=w;k.px=
k.Xb;k.py=k.Ab;k.visible=k.visible;if(k.f&&k.f.onUpdatePosition)k.f.onUpdatePosition(this,k);else k.f&&k.f.__div&&("none"!=k.f.__div.style[this.Yc]&&(k.f.__div.style[this.Yc]="none"),w&&h?(k.f.ggUse3d?(this.Nc||this.$n(b),2==this.Wa?(k.f.__div.style[this.Ua]="scale("+(100/this.fov.j*500/k.f.gg3dDistance).toFixed(10)+")",k.f.__div.style.left=this.margin.left+r+this.C.width/2+"px",k.f.__div.style.top=this.margin.top+y+this.C.height/2+"px"):(k.f.__div.style.width="1px",k.f.__div.style.height="1px",r=
"",this.Nc&&(r+="perspective("+b+"px) "),r+="translate3d(0px,0px,"+b+"px) ",r+="rotateZ("+this.U.j.toFixed(10)+"deg) ",r+="rotateX("+this.v.j.toFixed(10)+"deg) ",r+="rotateY("+(-this.pan.j).toFixed(10)+"deg) ",r+="rotateY("+k.pan.toFixed(10)+"deg) ",r+="rotateX("+(-k.v).toFixed(10)+"deg) ",r+="translate3d(0px,0px,"+(-1*k.f.gg3dDistance).toFixed(10)+"px) ",k.f.__div.style[this.Ua+"Origin"]="0% 0%",k.f.__div.style[this.Ua]=r,k.f.__div.style.left=this.margin.left+this.C.width/2+"px",k.f.__div.style.top=
this.margin.top+this.C.height/2+"px")):(k.f.__div.style.left=this.margin.left+r+this.C.width/2+"px",k.f.__div.style.top=this.margin.top+y+this.C.height/2+"px"),k.f.__div.ggVisible&&(k.f.__div.style.visibility="visible")):(k.f.ggUse3d&&(k.f.__div.style[this.Ua]=""),k.f.__div.style.left="-1000px",k.f.__div.style.top="-1000px",k.f.__div.style.visibility="hidden"))}if("poly"==k.type){var z=[];if(2==this.Wa)for(k.he=[],w=0;w<k.vertices.length;w++)y=k.vertices[w],r=(this.pan.j-y.pan)/100/f*g,y=(this.v.j-
y.v)/100*e,r+=this.margin.left+this.C.width/2,y+=this.margin.top+this.C.height/2,k.he.push({Xb:r,Ab:y});else{for(w=0;w<k.vertices.length;w++)y=k.vertices[w],a.init(0,0,-100),a.Fa(-y.v*Math.PI/180),a.Ka(y.pan*Math.PI/180),a.Ka(-this.pan.j*Math.PI/180),a.Fa(this.v.j*Math.PI/180),a.lb(this.U.j*Math.PI/180),z.push(a.clone());z=this.Fj(z);if(0<z.length)for(w=0;w<z.length;w++)a=z[w],.1>a.z?(y=-b/a.z,r=this.C.width/2+a.x*y,y=this.C.height/2+a.y*y):y=r=0,a.Xb=r,a.Ab=y;k.he=z}}}};c.prototype.tp=function(){for(var a=
[],b=0;b<this.W.length;b++){var e=this.W[b];"point"==e.type&&e.f&&e.f.__div&&a.push(e.f.__div)}return a};c.prototype.ea=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+")"};c.prototype.Yq=function(){var a;if(this.Ia&&(this.H.$g!=this.H.mode&&(this.H.$g=this.H.mode,this.Ia.style.visibility=0<this.H.mode?"inherit":"hidden"),0<=this.H.mode||0<this.H.sb.length)){this.la||(this.la=this.Ia.getContext("2d"));if(this.la.width!=this.C.width||
this.la.height!=this.C.height)this.la.width=this.C.width,this.la.height=this.C.height;this.la.clear?this.la.clear():this.la.clearRect(0,0,this.Ia.width,this.Ia.height);var b=1;0>=this.H.mode&&(b=0);3==this.H.mode&&(b=this.H.wa);for(a=0;a<this.W.length;a++){var e=this.W[a];var f=b;if("poly"==e.type){var g=e.he;2==this.H.mode&&(f=e.wa);var h=this.H.sb.indexOf(e.id);-1!=h&&(f=this.H.Zb[h]);this.la.fillStyle=this.ea(e.cc,e.bc*f);this.la.strokeStyle=this.ea(e.ec,e.dc*f);if(0<g.length){this.la.beginPath();
for(e=0;e<g.length;e++)f=g[e],0==e?this.la.moveTo(f.Xb,f.Ab):this.la.lineTo(f.Xb,f.Ab);this.la.closePath();this.la.stroke();this.la.fill()}}}}};c.prototype.Bm=function(a,b,e){var f,g=!1;var h=0;for(f=a.length-1;h<a.length;f=h++){var l=a[h];f=a[f];l.Ab>e!=f.Ab>e&&b<(f.Xb-l.Xb)*(e-l.Ab)/(f.Ab-l.Ab)+l.Xb&&(g=!g)}return g};c.prototype.ai=function(a,b){var e=-1;if((0<=this.H.mode||0<this.H.sb.length)&&this.tq())for(var f=0;f<this.W.length;f++){var g=this.W[f];"poly"==g.type&&g.he&&0<g.he.length&&(-1!=
this.H.mode||-1!=this.H.sb.indexOf(g.id))&&this.Bm(g.he,a,b)&&(e=f,g.Xb=a,g.Ab=b)}return 0<=e?this.W[e]:!1};c.prototype.tq=function(){return 4==this.Ra()&&0==this.Bc};c.prototype.Tb=function(){var a=0,b=this.Ra(),e=this.C;switch(this.fov.mode){case 0:a=this.fov.j/2;break;case 1:a=4==b?180*Math.atan(e.height/e.width*Math.tan(this.fov.j/2*Math.PI/180))/Math.PI:e.height/e.width*this.fov.j/2;break;case 2:a=Math.sqrt(e.width*e.width+e.height*e.height);a=4==b?180*Math.atan(e.height/a*Math.tan(this.fov.j/
2*Math.PI/180))/Math.PI:e.height/a*this.fov.j/2;break;case 3:a=4*e.height/3>e.width?this.fov.j/2:4==b?180*Math.atan(4*e.height/(3*e.width)*Math.tan(this.fov.j/2*Math.PI/180))/Math.PI:4*e.height/(3*e.width)*(this.fov.j/2)}return 2*a};c.prototype.xp=function(a,b){a||(a=this.Tb());b||(b=this.Ra());return 4==b?180*Math.atan(this.aspect()*Math.tan(a/2*Math.PI/180))/Math.PI:a*this.aspect()};c.prototype.aspect=function(){return this.C.width/this.C.height};c.prototype.wl=function(a){var b=this.fov.j;a/=2;
var e=this.Ra();switch(this.fov.mode){case 0:b=2*a;break;case 1:a=4==e?180*Math.atan(this.C.width/this.C.height*Math.tan(a*Math.PI/180))/Math.PI:this.C.width/this.C.height*a;b=2*a;break;case 2:b=Math.sqrt(this.C.width*this.C.width+this.C.height*this.C.height);a=4==e?180*Math.atan(b/this.C.height*Math.tan(a*Math.PI/180))/Math.PI:b/this.C.height*a;b=2*a;break;case 3:4*this.C.height/3>this.C.width?b=2*a:(b=3*this.C.width/(4*this.C.height),a=4==e?180*Math.atan(b*Math.tan(a*Math.PI/180))/Math.PI:b*a,b=
2*a)}return b};c.prototype.$i=function(a){this.fov.j=this.wl(a)};c.prototype.sg=function(){if(!this.ef){var a=this.jn;a.pan=this.pan.j;a.v=this.v.j;a.fov=this.fov.j;this.pf(a);this.pf(a);this.pf(a);this.pan.j=a.pan;this.v.j=a.v;this.fov.j=a.fov}};c.prototype.pf=function(a){var b=this.C.width/this.C.height;if(2==this.Wa){if(0<this.fov.lh){var e=this.Ec;this.u.levels&&0<this.u.levels.length&&(e=this.u.levels[0].height);this.fov.min=100*this.C.height/(e*this.fov.lh)}var f=a.fov/2;e=f*b;var g=this.u.width/
this.u.height*50;b=this.L.xn?2*Math.min(50,g/b):2*Math.max(50,g/b);a.fov<this.fov.min&&(a.fov=this.fov.min);a.fov>b&&(a.fov=b);50<f?a.v=0:(50<a.v+f&&(a.v=50-f),-50>a.v-f&&(a.v=-50+f));e>g?a.pan=0:(a.pan+e>g&&(a.pan=g-e,this.B.active&&(this.B.speed=-this.B.speed,this.pan.d=0)),a.pan-e<-g&&(a.pan=-g+e,this.B.active&&(this.B.speed=-this.B.speed,this.pan.d=0)))}else{0<this.fov.lh&&(e=this.Ec,this.u.levels&&0<this.u.levels.length&&(e=this.u.levels[0].height),this.fov.min=360*Math.atan2(this.C.height/2,
e/2*this.fov.lh)/Math.PI);a.fov<this.fov.min&&(a.fov=this.fov.min);g=this.fov.max;var h=179;f=this.Tb()/2;e=b*f;4==this.Ra()?e=180*Math.atan(b*Math.tan(f*Math.PI/180))/Math.PI:9==this.Ra()?(g=this.fov.yk,h=355):12==this.Ra()&&(g=this.fov.xk,h=360);this.ga||(g=Math.max(160,g));a.fov>g&&(a.fov=g);12==this.Ra()&&(2*e>h&&(a.fov=h/b),f=this.Tb()/2,2*f>h&&(a.fov=h),f=this.Tb()/2,e=b*f);2*f>this.v.max-this.v.min&&180>this.v.max-this.v.min&&(f=(this.v.max-this.v.min)/2,a.fov=this.wl(2*f));90>this.v.max?a.v+
f>this.v.max&&(a.v=this.v.max-f):a.v>this.v.max&&(a.v=this.v.max);-90<this.v.min?a.v-f<this.v.min&&(a.v=this.v.min+f):a.v<this.v.min&&(a.v=this.v.min);b=this.pan.max-this.pan.min;if(359.99>b){g=90;h=Math.tan(f*Math.PI/180);var l=Math.tan((Math.abs(a.v)+f)*Math.PI/180);l=Math.sqrt(l*l+1)/Math.sqrt(h*h+1);f=180*Math.atan(l*Math.tan(e*Math.PI/180))/Math.PI;2*f>b&&(l=Math.tan(b*Math.PI/360)/Math.tan(e*Math.PI/180),b=l*Math.sqrt(h*h+1),l=Math.sqrt(b*b-1),g=180/Math.PI*Math.atan(l));a.pan+f>this.pan.max&&
(a.pan=this.pan.max-f,this.B.active&&(this.B.speed=-this.B.speed,this.pan.d=0));a.pan-f<this.pan.min&&(a.pan=this.pan.min+f,this.B.active&&(this.B.speed=-this.B.speed,this.pan.d=0));a.v+e>g&&(a.v=g-e);a.v-e<-g&&(a.v=-g+e)}}};c.prototype.update=function(a){void 0===a&&(a=0);this.Ma=!0;a&&(this.xg=Math.max(1*a,this.xg))};c.prototype.hm=function(){return this.qa?!!this.qa.isTileLoading:0<this.$b||0<this.Dc};c.prototype.Kh=function(){var a=Date.now();if(this.Nb){if(this.qa)if(this.ts(),2===this.Wa)this.sg(),
this.Jh();else if(0===this.Wa){var b=this.qd();this.Cm(this.C.width/2,this.C.height/2,b);this.Jh()}}else 2===this.Wa?(this.Jh(),this.ga?(this.za.Zk(),this.za.dn()):this.Zk()):0===this.Wa&&(!this.ga||4==this.Va&&0==this.Bc?(b=this.qd(),this.Cm(this.C.width/2,this.C.height/2,b),this.Jh(),this.Nh?this.za.As():this.ho&&this.fo(),this.ao(),this.ga?(this.D.vd?14==this.D.format?this.za.zs():this.za.oo():0<this.u.levels.length?this.za.Hs():this.za.Js(),this.za.dn()):(this.jd?0<this.u.levels.length?this.xs():
this.ws():this.Lh&&this.ss(),this.Yq()),this.Sa&&this.Sa.Xq()):(this.za.oo(),this.Jh(),this.pq()));b=Date.now();50<b-a?(this.N("Time between frames: "+(b-a)),this.Uf||(2<this.Rk?(this.Uf=!0,this.N("disabling HighDPI rendering"),this.Qc()):this.Rk++)):this.Rk=0;this.Cf&&this.u.sn++};c.prototype.ws=function(){var a=!1;if(this.C.width!=this.K.offsetWidth||this.C.height!=this.K.offsetHeight)this.C.width=this.K.offsetWidth,this.C.height=this.K.offsetHeight,this.K.style[this.Ua+"OriginX"]=this.C.width/
2+"px",this.K.style[this.Ua+"OriginY"]=this.C.height/2+"px",a=!0;var b=Math.round(this.qd());this.ah==b&&!a||this.Nc||(this.ah=b,this.K.style[this.Dd]=b+"px");this.cube.ap(this.pan.j,this.v.j,this.U.j,this.Na);for(a=0;6>a;a++){var e;if(e=this.cube.faces[a]){var f="";this.Nc?(f+="translate3d("+this.C.width/2+"px,"+this.C.height/2+"px,0px) ",f+="perspective("+b+"px) ",f+="translate3d(0px,0px,"+b+"px) "):f+="translate3d("+this.C.width/2+"px,"+this.C.height/2+"px,"+b+"px) ";f+="rotateZ("+Number(this.U.j).toFixed(10)+
"deg) ";f+="rotateX("+Number(this.v.j).toFixed(10)+"deg) ";f+="rotateY("+Number(-this.pan.j).toFixed(10)+"deg) ";e.vm&&(f+=e.vm,e.ob||(f="translate3d(-10px,-10px,0px) scale(0.001,0.001)"),e.V.style[this.Ua]=f)}}};c.prototype.ss=function(){this.sg();var a;this.vc&&(a=this.vc.getContext("2d"));if(this.C.width!==this.K.offsetWidth||this.C.height!==this.K.offsetHeight)this.C.width=this.K.offsetWidth,this.C.height=this.K.offsetHeight;if(a){var b=a.canvas.width/2,e=a.canvas.height/2,f=a.createRadialGradient(b,
e,5,b,e,Math.max(b,e));f.addColorStop(0,"#333");f.addColorStop(1,"#fff");a.rect(0,0,a.canvas.width,a.canvas.height);a.fillStyle=f;a.fill();a.fillStyle="#f00";a.font="20px Helvetica";a.textAlign="center";a.fillText("Pan: "+this.pan.j.toFixed(1),b,e-60);a.fillText("Tilt: "+this.v.j.toFixed(1),b,e-30);a.fillText("Fov: "+this.fov.j.toFixed(1),b,e+0);a.fillText("Node: "+this.Zj(),b,e+30);a.fillText("Title: "+this.hg.title,b,e+60)}};c.prototype.ts=function(){this.sg();if(this.C.width!==this.K.offsetWidth||
this.C.height!==this.K.offsetHeight)this.C.width=this.K.offsetWidth,this.C.height=this.K.offsetHeight;this.qa&&this.qa.setPan&&(this.qa.setPan(this.pan.j),this.qa.setTilt(this.v.j),this.qa.setFov(this.fov.j))};c.prototype.Zk=function(){this.Ia.style.visibility="inherit";this.la||(this.la=this.Ia.getContext("2d"));if(this.la.width!=this.C.width||this.la.height!=this.C.height)this.la.width=this.C.width,this.la.height=this.C.height;this.la.clear?this.la.clear():this.la.clearRect(0,0,this.Ia.width,this.Ia.height);
this.Dc=0;var a=100/this.fov.j;var b=this.u.width/this.u.height;var e=this.C.height*a*b;a*=this.C.height;var f=(this.pan.j/100/b-.5)*e+this.C.width/2;for(var g=(this.v.j/100-.5)*a+this.C.height/2,h,l,k,w,r=0;this.u.levels.length>=r+2&&this.u.levels[r+1].width>e;)r++;var y;var z=[];for(y=this.u.levels.length-1;y>=r;){b=this.u.levels[y];if(b.cache){var ha={jb:0,Gb:0};ha.Ib=b.T-1;ha.Jb=b.da-1}else{ha={};var ua=-g/a*(b.height/this.u.M);h=(-f+this.C.width)/e*(b.width/this.u.M);l=(-g+this.C.height)/a*(b.height/
this.u.M);ha.jb=Math.min(Math.max(0,Math.floor(-f/e*(b.width/this.u.M))),b.T-1);ha.Gb=Math.min(Math.max(0,Math.floor(ua)),b.da-1);ha.Ib=Math.min(Math.max(0,Math.floor(h)),b.T-1);ha.Jb=Math.min(Math.max(0,Math.floor(l)),b.da-1)}z[y]=ha;var id=!0;for(l=ha.Gb;l<=ha.Jb;l++)for(h=ha.jb;h<=ha.Ib;h++)w=h+l*b.T,ua=b.aa[w],ua||(ua=new x.Td,b.aa[w]=ua),this.$b<this.Fh?ua.u||(this.kk++,ua.u=new Image,ua.u.onload=this.js(),ua.u.onerror=this.ij(ua),ua.u.onabort=this.ij(ua),ua.u.crossOrigin=this.crossOrigin,ua.u.setAttribute("src",
this.oe(0,y,h,l)),b.cache&&this.gc.push(ua.u),this.$b++,this.Ma=!0):this.Dc++,ua.u&&ua.u.complete||(id=!1),ua.visible=!0;ha.tk=id;y--}for(y=this.u.levels.length-1;y>=r;){b=this.u.levels[y];if(z[y]&&0<=z[y].jb)for(ha=z[y],l=ha.Gb;l<=ha.Jb;l++)for(h=ha.jb;h<=ha.Ib;h++)w=h+l*b.T,(ua=b.aa[w])||(ua=b.aa[w]=new x.Td),ua.u&&ua.u.complete&&(w=f+(-this.u.Da+this.u.M*h)*e/b.width,this.la.drawImage(ua.u,w,g+(-this.u.Da+this.u.M*l)*a/b.height,ua.u.width*e/b.width,ua.u.height*a/b.height)),ua.visible=!0;y--}for(e=
0;e<this.u.levels.length;e++)if(b=this.u.levels[e],!b.cache)for(k in b.aa)b.aa.hasOwnProperty(k)&&(ua=b.aa[k],ua.visible||(ua.u=null,delete b.aa[k]));if(0<=this.H.mode||0<this.H.sb.length)for(e=1,0>=this.H.mode&&(e=0),3==this.H.mode&&(e=this.H.wa),k=0;k<this.W.length;k++)if(b=this.W[k],f=e,"poly"==b.type&&(a=b.he,2==this.H.mode&&(f=b.wa),g=this.H.sb.indexOf(b.id),-1!=g&&(f=this.H.Zb[g]),0<a.length)){this.la.fillStyle=this.ea(b.cc,b.bc*f);this.la.strokeStyle=this.ea(b.ec,b.dc*f);this.la.beginPath();
for(b=0;b<a.length;b++)f=a[b],0==b?this.la.moveTo(f.Xb,f.Ab):this.la.lineTo(f.Xb,f.Ab);this.la.closePath();this.la.stroke();this.la.fill()}this.od=!1};c.prototype.hs=function(a){var b=this;return function(){b.update();b.od=!0;a.loaded=!0;a.u&&!a.V&&b.K.appendChild(a.u);b.$b&&b.$b--;a.u&&a.bb&&(a.bb.drawImage(a.u,0,0),a.u=null)}};c.prototype.js=function(){var a=this;return function(){a.Ma=!0;a.od=!0;a.$b&&a.$b--}};c.prototype.ij=function(a){var b=this;return function(){b.Ma=!0;b.od=!0;b.$b&&b.$b--;
a.u=null}};c.prototype.tm=function(a,b,e){e.jb=a.width/this.u.M*b.Eg;e.Gb=a.height/this.u.M*b.Fg;e.Ib=a.width/this.u.M*b.ih;e.Jb=a.height/this.u.M*b.jh;e.jb=Math.min(Math.max(0,Math.floor(e.jb)),a.T-1);e.Gb=Math.min(Math.max(0,Math.floor(e.Gb)),a.da-1);e.Ib=Math.min(Math.max(0,Math.floor(e.Ib)),a.T-1);e.Jb=Math.min(Math.max(0,Math.floor(e.Jb)),a.da-1)};c.prototype.Dr=function(a){a=Math.round(a);this.Nc=0<(a&1);this.Tf=0<(a&2);this.pj=0<(a&4);this.Uf=0<(a&8);4096<=a&&(this.jd=0<(a&4096),this.ga=0<
(a&8192),this.Lh=0<(a&32768))};c.prototype.$p=function(){var a=0;this.Nc&&(a|=1);this.Tf&&(a|=2);this.pj&&(a|=4);this.jd&&(a|=4096);this.ga&&(a|=8192);this.Lh&&(a|=32768);return a};c.prototype.co=function(){if(!(6>this.cube.faces.length))for(var a=0;6>a;a++){var b=this.cube.faces[a];var e=[];e.push(new x.Ga(-1,-1,-1,0,0));e.push(new x.Ga(1,-1,-1,1,0));e.push(new x.Ga(1,1,-1,1,1));e.push(new x.Ga(-1,1,-1,0,1));for(var f=0;4>f;f++)4>a?e[f].Ka(-Math.PI/2*a):e[f].Fa(Math.PI/2*(4==a?-1:1)),this.Na&&(e[f].lb(this.Na.U*
Math.PI/180),e[f].Fa(-this.Na.pitch*Math.PI/180)),e[f].Ue(-this.pan.j),e[f].Od(this.v.j),e[f].Ve(this.U.j);e=this.Fj(e);b.ob=0<e.length;if(b.ob){b=b.Of;b.Eg=e[0].zd;b.ih=e[0].zd;b.Fg=e[0].ac;b.jh=e[0].ac;for(f=1;f<e.length;f++)b.Eg=Math.min(b.Eg,e[f].zd),b.ih=Math.max(b.ih,e[f].zd),b.Fg=Math.min(b.Fg,e[f].ac),b.jh=Math.max(b.jh,e[f].ac);b.ig=b.ih-b.Eg;b.Qh=b.jh-b.Fg;b.scale=Math.max(b.ig,b.Qh)}else b.Of.ig=-1,b.Of.Qh=-1}};c.prototype.wk=function(){for(var a=0;a<this.u.levels.length;a++){var b=this.u.levels[a],
e;for(e in b.aa)b.aa.hasOwnProperty(e)&&(b.aa[e].visible=!1)}};c.prototype.Uj=function(){var a=0,b=Math.tan(Math.min(this.Tb(),175)*Math.PI/360),e=this.C.height/(2*b);e*=1+this.C.width/this.C.height*b/2;for(e*=Math.pow(2,1<this.devicePixelRatio?this.u.Um:this.u.Tm);this.u.levels.length>=a+2&&!this.u.levels[a+1].Re&&this.u.levels[a+1].width>e;)a++;return a};c.prototype.xs=function(){var a=!1,b,e,f;if(this.C.width!==this.K.offsetWidth||this.C.height!==this.K.offsetHeight)this.C.width=this.K.offsetWidth,
this.C.height=this.K.offsetHeight,this.K.style[this.Ua+"OriginX"]=this.C.width/2+"px",this.K.style[this.Ua+"OriginY"]=this.C.height/2+"px",a=!0;var g=Math.round(this.qd());if(this.ah!=g||a)this.ah=g,this.Nc||(this.K.style[this.Dd]=g+"px",this.K.style[this.Dd+"Origin"]="50% 50%");this.Dc=0;if(0<this.u.levels.length){this.co();this.wk();var h="";for(b=0;6>b;b++){var l=this.cube.faces[b];l.ob&&(h=h+b+",")}h=this.Uj();var k;for(k=this.u.levels.length-1;k>=h;){a=this.u.levels[k];var w=1;k==this.u.levels.length-
1&&0==this.u.Da&&(w=this.u.M/(this.u.M-2));for(b=0;6>b;b++){l=this.cube.faces[b];var r=l.Of;if(l.ob&&0<r.ig&&0<r.Qh&&0<r.scale||a.cache){l.Ma=!1;var y={};a.cache?(y.jb=0,y.Gb=0,y.Ib=a.T-1,y.Jb=a.da-1):this.tm(a,r,y);for(f=y.Gb;f<=y.Jb;f++)for(e=y.jb;e<=y.Ib;e++){var z=e+f*a.T+b*a.T*a.da;(r=a.aa[z])||(r=a.aa[z]=new x.Td);if(!r.V&&this.$b<this.Fh){if(0<this.lj.length){r.V=this.lj.shift();for(z=this.K.firstChild;z&&z.ae&&(-1==z.ae||z.ae>=k);)z=z.nextSibling;this.K.insertBefore(r.V,z);r.bb=r.V.getContext("2d")}else if(this.Vn<
this.Ne){this.Vn++;r.V=document.createElement("canvas");r.V.width=this.u.M+2*this.u.Da;r.V.height=this.u.M+2*this.u.Da;r.bb=r.V.getContext("2d");r.V.style[this.Ua+"Origin"]="0% 0%";r.V.style.overflow="hidden";r.V.style.position="absolute";for(z=this.K.firstChild;z&&z.ae&&(-1==z.ae||z.ae>=k);)z=z.nextSibling;this.K.insertBefore(r.V,z)}r.V&&(this.kk++,r.u=new Image,r.u.crossOrigin=this.crossOrigin,r.u.style[this.Ua+"Origin"]="0% 0%",r.u.style.position="absolute",r.u.style.overflow="hidden",r.V.ae=k,
r.u.onload=this.hs(r),r.u.onerror=this.ij(r),r.u.onabort=this.ij(r),r.u.setAttribute("src",this.oe(b,k,e,f)),a.cache&&this.gc.push(r.u),this.$b++,this.Ma=!0)}else this.Dc++;if(r.V){z="";this.Nc?(z+="translate3d("+this.C.width/2+"px,"+this.C.height/2+"px,0px) ",z+=" perspective("+g+"px) ",z+="translate3d(0px,0px,"+g+"px) "):z+="translate3d("+this.C.width/2+"px,"+this.C.height/2+"px,"+g+"px) ";z+="rotateZ("+Number(this.U.j).toFixed(10)+"deg) ";z+="rotateX("+Number(this.v.j).toFixed(10)+"deg) ";z+="rotateY("+
Number(-this.pan.j).toFixed(10)+"deg) ";this.Na&&(z+="rotateX("+Number(-this.Na.pitch).toFixed(10)+"deg) ",z+="rotateZ("+Number(this.Na.U).toFixed(10)+"deg) ");z=4>b?z+("rotateY("+-90*b+"deg) "):z+("rotateX("+(4==b?-90:90)+"deg) ");if(this.Tf){var ha=this.u.M/a.width*(2*k+1)*(this.pg/this.u.M);ha=this.yc?2/Math.tan(this.fov.j*Math.PI/360)*ha:2*ha;z+=" scale("+ha*w*w+")"}else ha=1/(w*w);z+=" translate3d("+(1/w*e*this.u.M-this.u.Da-a.width/2)+"px,";z+=1/w*f*this.u.M-this.u.Da-a.width/2+"px,";z+=-a.width*
ha/2+"px)";l.ob&&(r.visible=!0,r.V?r.V.style[this.Ua]=z:r.u&&(r.u.style[this.Ua]=z))}}}}k--}for(g=0;g<this.u.levels.length;g++){a=this.u.levels[g];for(var ua in a.aa)a.aa.hasOwnProperty(ua)&&(r=a.aa[ua],!r.visible&&r.V&&(a.cache?r.V?r.V.style[this.Ua]="translate3d(-10px,-10px,0px) scale(0.001,0.001)":r.u&&(r.u.style[this.Ua]=""):(r.bb&&r.bb.clearRect(0,0,r.bb.canvas.width,r.bb.canvas.height),this.lj.push(r.V),r.V?(h="translate3d(-10px,-10px,0px) scale(0.001,0.001)",r.V.style[this.Ua]=h,r.V.ae=-1):
r.loaded&&this.K.removeChild(r.u),r.V=null,r.u=null,r.bb=null,delete a.aa[ua])))}this.od=!1}};c.prototype.ao=function(){var a=Math.round(this.qd());this.Nc||this.$n(a);for(var b=0;b<this.eb.length;b++){var e=this.eb[b];e.eo(a);e.f.hidden=!1}};c.prototype.fo=function(){for(var a=Math.round(this.qd()),b=0;b<this.S.length;b++){var e=this.S[b];e.dd||(e.eo(a),e.f.hidden=!1)}};c.prototype.pq=function(){for(var a=0;a<this.eb.length;a++){var b=this.eb[a];b.Yf(!1)}for(a=0;a<this.S.length;a++)b=this.S[a],b.dd||
b.Yf(!1)};c.prototype.Bs=function(){for(var a=0;a<this.S.length;a++){var b=this.S[a];b.dd||b.df()}for(a=0;a<this.eb.length;a++)b=this.eb[a],b.df()};c.prototype.bd=function(a){this.Ee=!1;try{this.$a=a?a:document.createElement("canvas");var b=this.md.offsetWidth-this.margin.left-this.margin.right,e=this.md.offsetHeight-this.margin.top-this.margin.bottom;if(100>b||100>e)e=b=100;var f=window.devicePixelRatio||1;this.Uf&&(f=1);this.K.style.width=b+"px";this.K.style.height=e+"px";this.$a.style.width=b+
"px";this.$a.style.height=e+"px";this.$a.width=b*f;this.$a.height=e*f;this.$a.style.display="none";this.$a.style.touchAction="none";this.K.insertBefore(this.$a,this.K.firstChild);var g=this.no;g.stencil=!0;g.depth=!0;g.powerPreference="high-performance";g.alpha=this.yc?!0:!1;this.Id&&10<=this.Sg[0]&&(g.antialias=!1,g.alpha=!1);a={};a.flags=g;a.canvas=this.$a;this.P("beforewebglcontext",a);this.R=this.$a.getContext("webgl",g);this.R||(this.R=this.$a.getContext("experimental-webgl",g));if(this.R){var h=
this.R;this.xb.width=b*f;this.xb.height=e*f;h.clearColor(0,0,0,0);h.enable(this.R.DEPTH_TEST);h.viewport(0,0,500,500);h.clear(h.COLOR_BUFFER_BIT|h.DEPTH_BUFFER_BIT);4096<=h.getParameter(h.MAX_TEXTURE_SIZE)&&!this.Xg&&(this.Ne=1<f?4*this.Ne:2*this.Ne);this.N("Max tile cnt: "+this.Ne);this.za.Tg();this.za.ui();this.za.Dm(this.bf);this.za.Em();this.J&&(this.J.Tg(),this.J.bd());this.Sa&&(this.Sa.Tg(),this.Sa.bd())}}catch(l){this.N(l)}this.R?(this.ga=!0,this.P("webglready",{gl:this.R})):alert("Could not initialise WebGL!")};
c.prototype.Pb=function(a){return a?"{"==a.charAt(0)||"/"==a.charAt(0)||0<a.indexOf("://")||0==a.indexOf("javascript:")?a:this.Wd+a:this.Wd};c.prototype.Mb=function(a,b,e){var f=(new RegExp("%0*"+b,"i")).exec(a.toString());if(f){f=f.toString();var g=e.toString();f.charAt(f.length-1)!=b&&(g=(1+e).toString());if(!isNaN(parseFloat(e)))for(;g.length<f.length-1;)g="0"+g;a=a.replace(f,g)}return a};c.prototype.oe=function(a,b,e,f,g){var h=this.u.sk-1-b,l=this.u.uk,k="x";switch(a){case 0:k="f";break;case 1:k=
"r";break;case 2:k="b";break;case 3:k="l";break;case 4:k="u";break;case 5:k="d";break;case "vr":k="vr"}g&&(a+="l",k+="l");for(g=0;3>g;g++)l=this.Mb(l,"c",a),l=this.Mb(l,"s",k),l=this.Mb(l,"r",b),l=this.Mb(l,"l",h),l=this.Mb(l,"x",e),l=this.Mb(l,"y",f),l=this.Mb(l,"v",f),l=this.Mb(l,"h",e);return this.Pb(l)};c.prototype.Kg=function(){return this.pan.j};c.prototype.Up=function(){return this.F.pan};c.prototype.mm=function(){for(var a=this.pan.j;-180>a;)a+=360;for(;180<a;)a-=360;return a};c.prototype.Ge=
function(){for(var a=this.pan.j-this.pan.Ak;-180>a;)a+=360;for(;180<a;)a-=360;return a};c.prototype.Xe=function(a){this.Ea();isNaN(a)||(this.pan.j=Number(a));this.update()};c.prototype.Nk=function(a){this.Ea();isNaN(a)||(this.pan.j=Number(a)+this.pan.Ak);this.update()};c.prototype.yl=function(a,b){isNaN(a)||(this.Xe(this.Kg()+a),b&&(this.pan.d=a))};c.prototype.Uo=function(a,b){this.yl(a*this.ji(),b)};c.prototype.ni=function(){return this.v.j};c.prototype.aq=function(){return this.F.v};c.prototype.Ye=
function(a){this.Ea();isNaN(a)||(this.v.j=Number(a));this.update()};c.prototype.Al=function(a,b){this.Ye(this.ni()+a);b&&(this.v.d=a)};c.prototype.Wo=function(a,b){this.Al(a*this.ji(),b)};c.prototype.Yi=function(a){this.Ea();isNaN(a)||(this.U.j=Number(a));this.update()};c.prototype.qm=function(){return this.U.j};c.prototype.$j=function(){return this.fov.j};c.prototype.vp=function(){return this.F.Rd};c.prototype.We=function(a){this.Ea();switch(this.Ra()){case 4:var b=170;break;case 12:b=360;break;
case 9:b=355;break;default:b=170}2==this.Wa&&(b=9999999999);!isNaN(a)&&0<a&&a<b&&(b=this.fov.j,this.fov.j=1*a,b!=this.fov.j&&this.update())};c.prototype.xl=function(a,b){this.We(this.$j()+a);b&&(this.fov.d=a)};c.prototype.Cj=function(a,b){if(!isNaN(a)){var e=a/90*Math.cos(Math.min(this.fov.j,90)*Math.PI/360);e=this.fov.j*Math.exp(e);this.We(e);b&&(this.fov.d=a)}};c.prototype.Br=function(a,b){this.Ea();isNaN(a)||(this.pan.j=a);isNaN(b)||(this.v.j=b);this.update()};c.prototype.Cr=function(a,b,e){this.Ea();
!isNaN(a)&&1E7>a&&-1E7<a&&(this.pan.j=a);!isNaN(b)&&1E7>b&&-1E7<b&&(this.v.j=b);!isNaN(e)&&1E7>e&&-1E7<e&&(this.U.j=e);this.update()};c.prototype.Xi=function(a,b,e){this.Ea();isNaN(a)||(this.pan.j=a);isNaN(b)||(this.v.j=b);isNaN(e)||this.We(e);this.update()};c.prototype.ur=function(){this.Xi(this.pan.cb,this.v.cb,this.fov.cb)};c.prototype.setLocked=function(a){this.Cn(a);this.Dn(a);this.Bn(a)};c.prototype.Cn=function(a){this.L.jc=a};c.prototype.Bn=function(a){this.L.hh=a};c.prototype.Hp=function(){return this.L.hh};
c.prototype.Dn=function(a){this.L.ce=a};c.prototype.Vi=function(a){this.oc=a};c.prototype.wp=function(){return this.hk()?!0:this.dk};c.prototype.Or=function(a,b){void 0===b&&(b=!0);this.io=b;this.fg==!a&&(a&&this.hk()?this.tn():((this.fg=!!a)?this.kb.xh=!0:this.U.j=0,this.P("gyrochanged",{}),this.P("playerstatechanged",{})))};c.prototype.hk=function(){return window.hasOwnProperty("DeviceOrientationEvent")&&DeviceOrientationEvent.hasOwnProperty("requestPermission")&&"function"===typeof DeviceOrientationEvent.requestPermission?
!0:!1};c.prototype.tn=function(){var a=this;if(this.hk())try{DeviceOrientationEvent.requestPermission().then(function(b){"granted"===b&&(a.kb.xh=!0,a.fg=!0,a.P("gyrochanged",{}),a.P("playerstatechanged",{}))})["catch"](console.error)}catch(b){console.log(b)}};c.prototype.bq=function(){return this.fg};c.prototype.Tp=function(){return this.Ug?5:this.Id?4:this.Mm?1:this.Jm?2:this.Im?3:0};c.prototype.sp=function(){return this.nk?5:this.Ke?4:this.xi?2:this.yc?3:this.mk?1:0};c.prototype.moveTo=function(a,
b,e,f,g,h){this.Ea();if("_blank"!==a&&""!==a){this.F.active=!0;this.F.aborted=!1;this.F.bl=!1;var l=a.toString().split("/");1<l.length&&(a=Number(l[0]),f=Number(b),b=Number(l[1]),2<l.length&&(e=Number(l[2])));this.F.pan=isNaN(a)?this.pan.j:Number(a);this.F.v=isNaN(b)?this.v.j:Number(b);this.F.fov=!isNaN(e)&&0<e&&180>e?Number(e):this.fov.j;this.F.speed=!isNaN(f)&&0<f?Number(f):1;this.F.U=isNaN(g)?this.U.j:Number(g);void 0!==h?!a||4!=h&&12!=h&&9!=h||(this.F.Lb=h):this.F.Lb=this.Va}};c.prototype.Ii=
function(a){this.Ea();var b=0,e=0,f=70,g=4,h=0,l=1;a.hasOwnProperty("pan")&&(b=Number(a.pan),this.F.pan=b);a.hasOwnProperty("tilt")&&(e=Number(a.tilt),this.F.v=e);a.hasOwnProperty("fov")&&(f=Number(a.fov),this.F.fov=f);a.hasOwnProperty("projection")&&(g=Number(a.projection),this.F.Lb=g);a.hasOwnProperty("timingFunction")&&(h=Number(a.timingFunction));a.hasOwnProperty("speed")&&(l=Number(a.speed));0>=l?(this.Xi(b,e,f),this.Oc(g)):(a=new x.hl,a.ab="__AutoMove",a.me=this.mm(),a.Bh=this.v.j,a.Pd=this.fov.j,
a.Ah=this.Va,a.Qd=b,a.ne=e,a.ag=f,a.xd=g,a.sf=!1,a.Be=!1,a.Ce=!1,0==h&&(a.Be=!0),1==h&&(a.sf=!0,a.Be=!0),2==h&&(a.Ce=!0),a.speed=l,this.F.pl=this.I,this.I=this.$l(a),this.F.ql=(new Date).getTime(),this.F.bl=!0,this.F.active=!0,this.F.aborted=!1,this.F.pan=b,this.F.v=e,this.F.fov=f,this.Ud=!1)};c.prototype.Fq=function(a){this.moveTo(this.pan.cb,this.v.cb,this.fov.cb,a)};c.prototype.Gq=function(a,b){var e={};e.pan=this.pan.cb;e.tilt=this.v.cb;e.fov=this.fov.cb;e.projection=this.Oi;e.timingFunction=
b;e.speed=a;this.Ii(e)};c.prototype.Go=function(a,b,e,f){var g=new x.Uh(this);g.type="point";g.pan=b;g.v=e;g.id=a;g.f={};g.f.player=this;g.uf();g.f.hotspot=g;g.f.__div=document.createElement("div");g.f.__div.appendChild(f);this.W.push(g);g.f.__div.style.position="absolute";g.f.__div.style.left="-1000px";g.f.__div.style.top="-1000px";this.Qa.insertBefore(g.f.__div,this.Qa.firstChild);this.Ma=!0};c.prototype.us=function(a,b,e){for(var f=0;f<this.W.length;f++){var g=this.W[f];g.id==a&&(g.pan=b,g.v=e,
g.uf())}this.Ma=!0};c.prototype.jr=function(a){for(var b=-1,e,f=0;f<this.W.length;f++)e=this.W[f],e.id==a&&(b=f);-1<b&&(e=this.W.splice(b,1).pop(),e.f&&e.f.__div&&this.Qa.removeChild(e.f.__div))};c.prototype.Wp=function(){for(var a=[],b=0;b<this.W.length;b++){var e=this.W[b];"point"==e.type&&a.push(String(e.id))}return a};c.prototype.zp=function(a){for(var b=0;b<this.W.length;b++){var e=this.W[b];if(e.id==a)return b={},b.id=a,b.pan=e.pan,b.tilt=e.v,b.url=e.url,b.target=e.target,b.distance=e.distance,
b.title=e.title,b.description=e.description,b.skinid=e.Qk,e.Xc&&(b.customimage=e.Xc,b.customimagewidth=e.Ae,b.customimageheight=e.Cd,b.use3D=e.eg,b.distance3D=e.fi),e.f&&e.f.__div&&(b.div=e.f.__div),b}};c.prototype.lo=function(a,b){this.fa.start.x=a;this.fa.start.y=b;this.fa.na.x=a;this.fa.na.y=b;this.Ja.na.x=a;this.Ja.na.y=b;this.Gk++;this.pan.Wc=this.pan.j;this.v.Wc=this.v.j};c.prototype.jo=function(a,b){var e=this.Tb();this.pan.Wc+=a*e/this.C.height;this.v.Wc+=b*e/this.C.height;this.pan.j=this.pan.Wc;
this.v.j=this.v.Wc};c.prototype.ko=function(a,b){this.fa.j.x=a;this.fa.j.y=b;this.fa.ma.x=this.fa.j.x-this.fa.na.x;this.fa.ma.y=this.fa.j.y-this.fa.na.y;this.L.Hd&&(this.fa.na.x=this.fa.j.x,this.fa.na.y=this.fa.j.y,this.update())};c.prototype.Ea=function(){this.B.active&&(this.B.active=!1,this.P("autorotatechanged",{}),this.pan.d=0,this.v.d=0,this.fov.d=0);this.F.active&&(this.F.active=!1,this.pan.d=0,this.v.d=0,this.fov.d=0);this.gf=this.F.aborted=!1;this.B.Hi=!1;this.Ad=.02;this.mg=0;this.B.gg&&
(this.B.enabled=this.B.jf);this.Hf=(new Date).getTime()};c.prototype.Fp=function(){return this.Hf};c.prototype.nm=function(a,b){a||(a=this.oa.x,b=this.oa.y);var e=this.C.height/(2*Math.tan(this.fov.j*Math.PI/360));a-=this.C.width/2;b-=this.C.height/2;var f={};f.pan=180*Math.atan(a/e)/Math.PI;f.tilt=180*Math.atan(-b/Math.sqrt(a*a+e*e))/Math.PI;return f};c.prototype.Yp=function(a,b){a||(a=this.oa.x,b=this.oa.y);if(2===this.Wa){var e=this.fov.j/this.C.height;a=-(a-this.C.width/2)*e+this.pan.j;b=-(b-
this.C.height/2)*e+this.v.j}else{e=new x.Ga(0,0,1);a=this.nm(a,b);e.Od(-a.tilt);e.Ue(a.pan);e.Od(-this.v.j);e.Ue(-this.pan.j);e.Od(-this.Na.pitch);e.Ve(this.Na.U);for(a=e.Mo()-180;-180>a;)a+=360;b=e.No()}e={};e.pan=a;e.tilt=b;return e};c.prototype.Jc=function(a){return a==this.control||a&&void 0!==a.ggPermeableMap&&1==a.ggPermeableMap?!0:a&&void 0!==a.ggPermeable&&0==a.ggPermeable?!1:a&&a.ggType&&("container"==a.ggType||"cloner"==a.ggType||"timer"==a.ggType)?!0:!1};c.prototype.Ej=function(a,b){var e=
this.qd(),f,g;for(f=0;f<this.S.length+this.eb.length;f++){var h=f<this.S.length?this.S[f]:this.eb[f-this.S.length];if(h.nb)return h}for(f=0;f<this.S.length+this.eb.length;f++)if(h=f<this.S.length?this.S[f]:this.eb[f-this.S.length],!h.dd){var l=[],k=new x.Ga,w;var r=g=void 0;0<h.fov&&(g=Math.tan(h.fov/2*Math.PI/180),r=0<h.xc?g*h.ad/h.xc:g,h.Hc&&1!=h.Hc&&(r*=h.Hc));for(w=0;4>w;w++){switch(w){case 0:k.init(-g,-r,0);break;case 1:k.init(g,-r,0);break;case 2:k.init(g,r,0);break;case 3:k.init(-g,r,0)}k.Fa(h.Fa*
Math.PI/180);k.Ka(-h.Ka*Math.PI/180);k.lb(h.lb*Math.PI/180);--k.z;k.Fa(-h.v*Math.PI/180);k.Ka(h.pan*Math.PI/180);k.Ka(-this.pan.j*Math.PI/180);k.Fa(this.v.j*Math.PI/180);k.lb(this.U.j*Math.PI/180);l.push(k.clone())}l=this.Fj(l);if(0<l.length){for(w=0;w<l.length;w++)k=l[w],.1>k.z?(r=-e/k.z,g=this.C.width/2+k.x*r,r=this.C.height/2+k.y*r):r=g=0,k.Xb=g,k.Ab=r;if(this.Bm(l,a,b))return h}}return null};c.prototype.Vg=function(){return document.webkitIsFullScreen||document.mozFullScreen||document.msFullscreenElement&&
null!=document.msFullscreenElement||document.fullScreen};c.prototype.Eq=function(a){this.bo(a);if(this.pd)this.pd.onclick();(this.vf||this.wf&&this.Ke)&&this.ii();this.Ob=null;if(!this.L.jc&&!this.oc){a=a?a:window.event;if(a.which||0==a.which||1==a.which){var b=(new Date).getTime();if(this.ie){this.Ob=this.ie;this.Y.Mc=!0;this.Y.startTime=b;a.stopPropagation();return}if(this.Jc(a.target)){var e;(e=this.Ej(this.oa.x,this.oa.y))&&e.Ie&&(this.Ob=e);this.lo(a.pageX,a.pageY);this.Y.Mc=!0;this.Y.startTime=
b;a.preventDefault();this.Ea()}}this.fa.ma.x=0;this.fa.ma.y=0}};c.prototype.dg=function(a,b){var e=this.H.gj;e.enabled&&(this.Ca!=this.mb&&0<=a&&0<=b&&""!=this.Ca.title?(this.Ha.innerHTML=this.Ca.title,this.Ha.style.color=this.ea(e.hj,e.fj),this.Ha.style.backgroundColor=e.background?this.ea(e.cc,e.bc):"transparent",this.Ha.style.border="solid "+this.ea(e.ec,e.dc)+" "+e.$h+"px",this.Ha.style.borderRadius=e.xj+"px",this.Ha.style.textAlign="center",0<e.width?(this.Ha.style.left=a-e.width/2+this.margin.left+
"px",this.Ha.style.width=e.width+"px"):(this.Ha.style.width="auto",this.Ha.style.left=a-this.Ha.offsetWidth/2+this.margin.left+"px"),this.Ha.style.height=0<e.height?e.height+"px":"auto",this.Ha.style.top=b+25+ +this.margin.top+"px",this.Ha.style.visibility="inherit",this.Ha.style.overflow="hidden"):(this.Ha.style.visibility="hidden",this.Ha.innerHTML=""))};c.prototype.bo=function(a){var b=this.He();this.Vg()?(this.oa.x=a.clientX-this.margin.left,this.oa.y=a.clientY-this.margin.top):(this.oa.x=a.pageX-
b.x,this.oa.y=a.pageY-b.y);return b};c.prototype.Wf=function(a){this.Ca=a&&null!==a&&"object"==typeof a?a:this.mb;this.Ca==this.mb&&(a=this.ai(this.oa.x,this.oa.y))&&(a.gb=0);this.Ca.uf&&this.Ca.uf();this.hotspot=this.Ca;this.P("activehotspotchanged",{hotspot:this.Ca})};c.prototype.Dq=function(a){a=a?a:window.event;var b=this.bo(a);if(!this.L.jc&&!this.oc&&!this.ie){this.B.active&&(this.B.Di=(new Date).getTime());0==a.buttons&&(this.Y.Mc=!1);this.Y.Mc&&(a.preventDefault(),(a.which||0==a.which||1==
a.which)&&this.ko(a.pageX,a.pageY),this.Ea());var e=!1;if(this.Ca==this.mb||"poly"==this.Ca.type){var f=this.mb;0<this.W.length&&this.Jc(a.target)&&(f=this.ai(this.oa.x,this.oa.y));this.Ui(f);this.dg(a.pageX-b.x,a.pageY-b.y);0!=f&&f!=this.mb&&(e=!0)}b=null;!e&&this.Jc(a.target)&&(b=this.Ej(this.oa.x,this.oa.y));this.B.di&&(this.B.di=!1);this.Qa.style.cursor=this.Ca!=this.mb&&this.Ca.Bf&&e||b&&b.Qg?"pointer":"default"}};c.prototype.Ui=function(a){!1===a&&(a=this.mb);this.Ca!=a&&(this.Ca!=this.mb&&
(0<this.H.mode&&(this.Ca.gb=0),this.ka&&this.ka.hotspotProxyOut&&this.ka.hotspotProxyOut(this.Ca.id,this.Ca.url)),a!=this.mb?(this.Wf(a),this.ka&&this.ka.hotspotProxyOver&&this.ka.hotspotProxyOver(this.Ca.id,this.Ca.url),0<this.H.mode&&(this.H.gb=1,this.Ca.gb=1)):(this.Wf(this.mb),0<this.H.mode&&(this.H.gb=0)),this.qa&&this.qa.changeCurrentHotspot(this.Ca.id))};c.prototype.Cq=function(a){a=a?a:window.event;this.Ci=-1;(this.vf||this.wf&&this.Ke)&&this.ii();if(!this.L.jc&&!this.oc&&(this.Ob&&(this.Ob.Ie(),
this.ie=this.Ob.nb?this.Ob:null),this.Y.Mc)){this.Ea();a.preventDefault();this.Y.Mc=!1;a=(new Date).getTime();var b=Math.abs(this.fa.start.x-this.fa.na.x)+Math.abs(this.fa.start.y-this.fa.na.y);if(400>a-this.Y.startTime&&0<=b&&20>b){var e=this.ai(this.oa.x,this.oa.y);e&&this.Yn(e);b=Math.abs(this.fa.Ld.x-this.fa.na.x)+Math.abs(this.fa.Ld.y-this.fa.na.y);700>a-this.Zg&&0<=b&&20>b?(e?this.Zn(e):this.L.Oj&&this.kj(),this.Zg=0):this.Zg=a;this.fa.Ld.x=this.fa.na.x;this.fa.Ld.y=this.fa.na.y}}};c.prototype.Vm=
function(a){if(!this.L.ce&&!this.oc&&(a=a?a:window.event,this.Jc(a.target))){var b=a.detail?-1*a.detail:a.wheelDelta/40;this.L.Fm&&(b=-b);a.axis&&(-1==this.Ci?this.Ci=a.axis:this.Ci!=a.axis&&(b=0));var e=0<b?1:-1;a.wheelDeltaX&&a.wheelDeltaY&&Math.abs(a.wheelDeltaX)>Math.abs(a.wheelDeltaY)&&(b=0);0!=b&&(this.Cj(e*this.L.Ln,!0),this.update());a.preventDefault();this.Ea()}};c.prototype.qs=function(a){a||(a=window.event);var b=a.touches,e=this.He();this.oa.x=b[0].pageX-e.x;this.oa.y=b[0].pageY-e.y;this.pe=
this.Ob=null;this.ri||(this.ri=!0,this.P("hastouch",{}));!this.Km&&(this.vf||this.wf&&this.Ke)&&this.ii();if(!this.L.jc&&!this.oc){var f=(new Date).getTime();if(this.ie)this.Ob=this.ie,this.Y.Zc=!0,this.Y.startTime=f,a.preventDefault(),this.Y.th=!0;else{if(!this.Y.Zc&&b[0]){this.Y.startTime=f;this.Y.start.x=b[0].pageX;this.Y.start.y=b[0].pageY;this.Y.na.x=b[0].pageX;this.Y.na.y=b[0].pageY;this.tb=b[0].target;if(this.Jc(this.tb)){(f=this.Ej(this.oa.x,this.oa.y))&&f.Ie&&(this.Ob=f);if(f=this.ai(this.oa.x,
this.oa.y))this.N(f),this.pe=f,this.Ui(f),f=this.Ig(a),this.dg(f.x-e.x,f.y-e.y);this.lo(b[0].pageX,b[0].pageY);this.Y.Tl=b[0].identifier;this.Y.Zc=!0;a.preventDefault();this.Y.th=!0;this.Ea()}if(this.tb){e=this.tb;for(f=!1;e&&e!=this.control;){if(e.onmouseover)e.onmouseover();e.onmousedown&&!f&&(e.onmousedown(),f=!0);e=e.parentNode}f&&(a.preventDefault(),this.Y.th=!0)}}1<b.length&&(this.Y.Zc=!1);!this.fk&&2==b.length&&b[0]&&b[1]&&this.Jc(this.tb)&&(a=b[0].pageX-b[1].pageX,b=b[0].pageY-b[1].pageY,
this.fov.Mn=Math.sqrt(a*a+b*b),this.fov.prev=this.fov.j);this.fa.ma.x=0;this.fa.ma.y=0}}};c.prototype.ii=function(){try{this.Mh&&this.D.f&&(!this.D.vd&&this.D.Sk&&this.D.f.play(),this.D.f.muted=!1);if(this.va&&(this.va.resume(),"suspended"==this.va.state))return;if(this.Id&&this.va&&this.va.createOscillator){var a=this.va.createOscillator(),b=this.va.createGain();a.frequency.value=30;a.type="sine";a.connect(b);b.connect(this.va.destination);b.gain.value=.01;a.start(0);setTimeout(function(){a.stop()},
1E4)}for(b=0;b<this.X.length;b++){var e=this.X[b];(!this.isPlaying(e.id)||e.ua)&&0<=e.loop&&e.autoplay&&(e.ua&&e.nf(),this.ge(e.id,e.loop))}for(b=0;b<this.S.length;b++){var f=this.S[b];!this.isPlaying(f.id)&&f.autoplay&&this.Mh&&this.ge(f.id,f.loop);this.isPlaying(f.id)&&f.autoplay&&this.Mh&&(f.Sd&&(this.Ke?f.lg():this.ge(f.id)),f.f.muted=!1)}this.wf=this.vf=!1}catch(g){this.N(g)}};c.prototype.ps=function(a){a||(a=window.event);var b=a.touches,e=this.He();this.oa.x=b[0].pageX-e.x;this.oa.y=b[0].pageY-
e.y;if(this.L.jc||this.oc)(this.J.yd||this.J.re)&&a.preventDefault();else{b[0]&&(this.Y.na.x=b[0].pageX,this.Y.na.y=b[0].pageY);if(this.tb){for(var f=this.tb,g=!1;f&&f!=this.control&&!g;)"scrollarea"==f.ggType&&(g=!0),"map"==f.ggType&&(g=!0),"text"==f.ggType&&(g=!0),f=f.parentNode;g||a.preventDefault()}if(this.Y.Zc){a.preventDefault();for(f=0;f<b.length;f++)if(b[f].identifier==this.Y.Tl){this.ko(b[f].pageX,b[f].pageY);break}this.pe&&(f=this.Ig(a),this.dg(f.x-e.x,f.y-e.y));this.Ea()}2==b.length&&b[0]&&
b[1]&&(this.Y.Zc=!1,!this.fk&&this.Jc(this.tb)&&(this.L.ce||(e=b[0].pageX-b[1].pageX,b=b[0].pageY-b[1].pageY,this.fov.Jl=Math.sqrt(e*e+b*b),this.Ja.fov.active=!0,this.Ja.fov.wc=this.fov.prev*Math.sqrt(this.fov.Mn/this.fov.Jl),4==this.Ra()&&2!=this.Wa&&this.Ja.fov.wc>this.fov.max&&(this.Ja.fov.wc=this.fov.max),this.Ja.fov.wc<this.fov.min&&(this.Ja.fov.wc=this.fov.min)),this.Ea(),a.preventDefault()))}};c.prototype.os=function(a){this.Y.th&&(this.Y.th=!1,a.preventDefault());var b=this.He(),e=!1;(this.vf||
this.wf&&this.Ke)&&this.ii();if(!this.L.jc&&!this.oc){this.Y.Zc&&(a.preventDefault(),this.Ea());var f=(new Date).getTime();var g=void 0;var h=!1;g=Math.abs(this.Y.start.x-this.Y.na.x)+Math.abs(this.Y.start.y-this.Y.na.y);if(0<=g&&20>g){e=!0;this.Jc(this.tb)&&(a.preventDefault(),this.Ob&&(this.Ob.Ie(),this.ie=this.Ob.nb?this.Ob:null));if(this.tb){for(g=this.tb;g&&g!=this.control;)g.onclick&&(g.onclick(),"hotspot"!=g.Ns&&(h=!0),e=!1),g=g.parentNode;h&&a.preventDefault()}g=Math.abs(this.Y.Ld.x-this.Y.na.x)+
Math.abs(this.Y.Ld.y-this.Y.na.y);if(700>f-this.Zg&&0<=g&&20>g){if(this.Jc(this.tb))if(a.preventDefault(),this.pe)this.Zn(this.pe);else if(this.L.Oj){var l=this;setTimeout(function(){l.kj()},1)}if(this.tb){for(g=this.tb;g&&g!=this.control;)g.ondblclick&&(g.ondblclick(),h=!0,e=!1),g=g.parentNode;h&&a.preventDefault()}this.Zg=0}else this.Zg=f;this.Y.Ld.x=this.Y.na.x;this.Y.Ld.y=this.Y.na.y}if(this.tb)for(g=this.tb;g&&g!=this.control;){if(g.onmouseout)g.onmouseout();if(g.onmouseup)g.onmouseup();g=g.parentNode}a=
this.Ig(a);this.dg(a.x-b.x,a.y-b.y);this.pe&&e&&this.Yn(this.pe);this.tb=null;this.Y.Zc=!1;this.Ui(this.mb);this.pe=null}};c.prototype.ns=function(a){var b=this.He();this.L.jc||this.oc||(this.Y.Zc=!1);this.pe=null;this.Ui(this.mb);a=this.Ig(a);this.dg(a.x-b.x,a.y-b.y)};c.prototype.Lm=function(){return null!=this.tb||this.Y.Zc||this.Y.Mc};c.prototype.Wm=function(a){!this.Oe&&window.MSGesture&&(this.N("setup gesture"),this.Oe=new MSGesture,this.Oe.target=this.control);this.Oe&&this.Oe.addPointer(a.pointerId)};
c.prototype.bm=function(a){this.fk=!0;this.Ji=1;this.L.jc||this.L.ce||this.oc||(a.touches?(this.tb=a.touches.target,this.Jc(a.target)&&(a.preventDefault(),this.fov.prev=this.fov.j,this.Ea())):(a.preventDefault(),this.fov.prev=this.fov.j,this.Ea()))};c.prototype.qp=function(a){this.L.jc||this.L.ce||this.oc||!this.Jc(a.target)||(a.preventDefault(),this.Ja.fov.active=!0,this.Ja.fov.wc=this.fov.prev/Math.sqrt(a.scale),4==this.Ra()&&2!=this.Wa&&this.Ja.fov.wc>this.fov.max&&(this.Ja.fov.wc=this.fov.max),
this.update(),this.Ea())};c.prototype.Hq=function(a){this.L.jc||this.L.ce||this.oc||(a.preventDefault(),1!=a.scale&&(this.Ja.fov.active=!0,this.Ji*=a.scale,this.Ja.fov.wc=this.fov.prev/Math.sqrt(this.Ji),4==this.Ra()&&2!=this.Wa&&this.Ja.fov.wc>this.fov.max&&(this.Ja.fov.wc=this.fov.max),this.update(),this.Ea()))};c.prototype.am=function(a){this.L.jc||this.L.ce||this.oc||(this.Ja.fov.active=!1,a.preventDefault(),this.Ea(),this.Oe&&this.Oe.reset&&this.Oe.reset())};c.prototype.uq=function(a){this.L.hh||
this.oc||(this.isFullscreen&&a.preventDefault(),this.Ai=a.keyCode,this.Ea())};c.prototype.vq=function(a){this.Ai&&(this.Ai=0,a.preventDefault())};c.prototype.Nq=function(){this.Ai=0};c.prototype.Ni=function(){this.isFullscreen&&(this.Vg()||this.exitFullscreen(),this.Vg()&&(this.$.style.left="0px",this.$.style.top="0px"))};c.prototype.Tq=function(a,b,e,f){f?(this.Pg.alpha=a,this.Pg.beta=b,this.Pg.gamma=e,this.Pg.gamma+=90):(this.kb.alpha=a,this.kb.beta=b,this.kb.gamma=e,this.kb.gamma+=90);this.kb.orientation=
window.orientation?1*parseInt(""+window.orientation,10):0;e=new x.jl;a=this.kb;e.Ue(-a.alpha);e.Ve(-a.beta);e.Od(-a.gamma);e.Ve(90-a.orientation);1>e.Kb?-1<e.Kb?(b=180/Math.PI*Math.asin(-e.Kb),a=180/Math.PI*Math.atan2(e.nc,e.mc),e=180/Math.PI*Math.atan2(e.lc,e.kc)):(b=0,a=90,e=-180/Math.PI*Math.atan2(-e.Ub,e.Vb)):(b=0,a=-90,e=180/Math.PI*Math.atan2(-e.Ub,e.Vb));if(this.fg)if(this.Lm()||this.F.ti||this.kb.xh)this.kb.Pe=this.Kg()+e,this.kb.fadeIn=0,this.kb.xh=!1;else{f=this.F.active;var g=1;10>this.kb.fadeIn&&
(this.kb.fadeIn+=1,g=.1*this.kb.fadeIn);e=-e+this.kb.Pe;this.Xe(g*e+(1-g)*this.Kg());this.Ye(g*a+(1-g)*this.ni());this.io?this.Yi(g*b+(1-g)*this.qm()):this.Yi(0);this.sg();this.F.active=f}};c.prototype.Yn=function(a){this.ka&&this.ka.hotspotProxyClick&&this.ka.hotspotProxyClick(a.id,a.url);""!=a.url&&(this.Bk(a.url,a.target),this.dg(-1,-1))};c.prototype.Zn=function(a){this.ka&&this.ka.hotspotProxyDoubleClick&&this.ka.hotspotProxyDoubleClick(a.id,a.url)};c.prototype.ji=function(){return Math.min(1,
2*Math.tan(Math.PI*Math.min(this.fov.j,90)/360))};c.prototype.fn=function(){var a=this;setTimeout(function(){a.fn()},100);9!=a.Ri||a.vi||window.requestAnimationFrame(function(){a.qh();a.N("restart recover timer")});10<a.Ri&&1<a.Gk&&(a.Kc("recover timer - disabling requestAnimationFrame"),a.vi=!0,a.qh());a.Ri++};c.prototype.aj=function(a){var b={PAN:{value:0,name:"pan"},Ms:{value:1,name:"tilt"},Ks:{value:2,name:"fov"}},e=0,f=0,g=0,h;for(h in b){for(var l=b[h],k,w=Math.floor(a);!this.zf(w,l.value)&&
0<w;)w--;w=this.zf(w,l.value);var r=this.Mp(w);if(r){k=new x.Fc(w.time,w.value);var y=new x.Fc(r.time,r.value),z=(a-w.time)/(r.time-w.time);if(0!=w.type||0!=r.type&&3!=r.type)if(3==w.type)k=w.value;else{z=new x.Fc;var ha=new x.Fc,ua=r.time-w.time;0==w.type?ha.init(w.time+.3*ua,w.value):ha.init(w.xe,w.ye);0==r.type||3==r.type?z.init(r.time-.3*ua,r.value):z.init(r.ve,r.we);r=new x.Fc;r.wj(k,y,ha,z,a);k=r.y}else r=new x.Fc,r.Gd(k,y,z),k=r.y}else k=w.value;switch(l.value){case 0:l=this.pan.j;if(this.Ud&&
3!=w.type){if(2!=this.Wa){for(;360<k;)k-=360;for(;-360>k;)k+=360}e=k-l;2!=this.Wa&&(180<e&&(e-=360),-180>e&&(e+=360));this.pan.j+=e*this.Ad}else this.pan.j=k;this.B.eh=this.pan.j;break;case 1:l=this.v.j;this.Ud&&3!=w.type?(f=k-l,this.v.j+=f*this.Ad):this.v.j=k;this.B.fh=this.v.j;break;case 2:l=this.fov.j,this.Ud&&3!=w.type?(g=k-l,this.fov.j+=g*this.Ad):this.fov.j=k,this.B.dh=this.fov.j}}b=this.Ra();for(h=Math.floor(a);!this.zf(h,3)&&0<h;)h--;h=this.zf(h,3);w=a-h.time;this.Ud&&-1!=this.ng&&this.Xh+
this.tj>a?(b=this.Hg(this.ng),this.fov.j>b?this.Xh=a:(w=(a-this.Xh)/this.tj,w=Math.min(1,w),this.Oc(this.Va,this.ng,1-w))):(0==h.Db||w>h.Db-.3?this.Oc(h.value):(w/=h.Db,this.Oc(b,h.value,1-w)),this.B.Rm=h.value);this.Ud&&(e=Math.sqrt(e*e+f*f+g*g),.3>e&&(this.Ud=!1,this.Ad=.02,this.mg=0),0<this.mg&&e>this.mg&&(this.Ad+=.01,this.Ad=Math.min(this.Ad,1)),this.mg=e);h=Math.floor(a);if(h!=this.rl)for(this.rl=h,a=this.rp(h),e=0;e<a.length;e++)f=a[e],g=f.Wh,this.Cc.hasOwnProperty(g)&&(b=this.Cc[g].type,0==
b?this.le(g,f.dl):1==b?this.le(g,f.value):2==b&&this.le(g,"true"==f.dl));this.update()};c.prototype.cm=function(){if(""!=this.B.Mf){var a=this.lm(this.B.Mf);if(1==a.length&&a[0]==this.Pa)return this.Pa}a=this.Pa;do if(this.B.an){var b=1E3;do a=this.Ya[Math.floor(Math.random()*this.Ya.length)];while(b--&&a==this.Pa)}else b=this.Ya.indexOf(a),b++,b>=this.Ya.length&&(b=0),a=this.Ya[b];while(""!=this.B.Mf&&!this.Jg(a).tags.includes(this.B.Mf)&&a!=this.Pa);return a};c.prototype.ar=function(a){var b=this.F.speed;
this.F.rk&&(b=b*(a.getTime()-this.F.rk)/60,5<b&&(b=5),.2>b&&(b=.2));this.F.rk=a.getTime();this.B.Dg&&(this.za.ready()||4==this.Va)&&this.li()&&(this.B.Dg=!1,this.B.active=!0,this.wb.running=!0,this.wb.Vj=!1);if(this.F.active||0!=this.F.Lb&&this.za.ready()){if(this.F.bl&&"__AutoMove"==this.I.ab){var e=a.getTime()-this.F.ql;b=e/100;if(b>=this.I.length){if(this.aj(this.I.length),this.xa.splice(this.xa.indexOf(this.I),1),this.F.active=!1,this.I=this.F.pl,this.F.Lb=0,this.Xi(this.F.pan,this.F.v,this.F.fov),
this.pan.Wc=this.F.pan,this.v.Wc=this.F.v,this.F.nh&&(this.F.nh=!1,this.B.Hi=!0,this.B.active=!0,this.P("autorotatechanged",{})),this.onMoveComplete)this.onMoveComplete()}else this.aj(b)}else{this.pan.d=this.F.pan-this.pan.j;if(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.v.d=this.F.v-this.v.j;this.U.d=this.F.U-this.U.j;this.fov.d=this.F.fov-this.fov.j;e=b*this.ji();var f=Math.sqrt(this.pan.d*this.pan.d+this.v.d*this.v.d+this.U.d*
this.U.d+this.fov.d*this.fov.d),g=this.pan.j-this.F.eh,h=this.v.j-this.F.fh,l=this.U.j-this.F.Sm,k=this.fov.j-this.F.dh;100*Math.sqrt(g*g+h*h+l*l+k*k)<e&&0==this.F.Lb&&(this.F.aborted=!0);this.F.eh=this.pan.j;this.F.fh=this.v.j;this.F.Sm=this.U.j;this.F.dh=this.fov.j;if(100*f<e||this.F.aborted){if(this.pan.d=0,this.v.d=0,this.U.d=0,this.fov.d=0,this.F.active&&(this.F.active=!1,this.pan.j=this.F.pan,this.v.j=this.F.v,this.U.j=this.F.U,this.fov.j=this.F.fov,this.onMoveComplete))this.onMoveComplete()}else f=
f>5*e?e/f:.2,this.pan.d*=f,this.v.d*=f,this.fov.d*=f;this.pan.j+=this.pan.d;this.v.j+=this.v.d;this.U.j+=this.U.d;this.fov.j+=this.fov.d;0!=this.F.Lb&&(this.F.Lb!=this.Va?(b=this.Hg(this.F.Lb),this.$j()>b?(this.fov.j+=-Math.max((2.5-1.7*Math.min(Math.sqrt(this.pan.d*this.pan.d+this.v.d*this.v.d+this.U.d*this.U.d)/e,1))*e,this.fov.d)-this.fov.d,this.F.fov=this.fov.j):(this.Bc=this.Va,this.Va=this.F.Lb,this.N("New projection from Target:"+this.Va),this.ph=this.F.vh=0,this.za.ui())):1>this.F.vh?(this.F.vh=
Math.min(1,this.F.vh+.05*b),this.ph=this.F.vh):(this.Bc=0,this.F.Lb=0,this.za.ui()))}this.Hf=a.getTime();this.update()}else if(this.B.active){e=a.getTime()-this.B.startTime;this.B.Di<this.B.startTime&&(this.B.Di=this.B.startTime);if((this.B.gg||this.wb.running)&&0<this.xa.length){b=e/100;f=!1;if(this.Wb!=this.I.ab||""!=this.I.hf&&this.B.Vd!=this.I.hf){for(e=0;e<this.xa.length;e++)if(""==this.Wb&&this.xa[e].hf==this.B.Vd||""!=this.Wb&&this.xa[e].ab==this.Wb&&this.xa[e].hf==this.B.Vd){f=!0;this.I=this.xa[e];
this.Wb=this.I.ab;break}!f&&0<this.xa.length&&this.xa[0].hf==this.B.Vd&&(f=!0,this.I=this.xa[0],this.Wb=this.I.ab)}else f=!0;if(f)if(e=(g=this.D.f&&this.D.vd)&&this.B.Vk&&!this.wb.running,this.gf){f=b;if(e)for(this.D.f.currentTime<this.sl&&this.vj&&(this.uj++,this.vj=!1),f=10*(this.uj*this.D.f.duration+this.D.f.currentTime),this.sl=this.D.f.currentTime,.05>this.D.f.duration-this.D.f.currentTime&&(this.vj=!0);f>=10*this.ff;)f-=10*this.ff;if(!g&&b>=this.I.length||g&&!e&&b>=this.I.length||g&&e&&(this.I.ab!=
this.I.Xm||this.I.Ki!=this.Pa)&&b>=this.I.length){this.aj(this.I.length);this.B.Kd=0;this.gf=!1;if(this.wb.running){this.zn();return}this.Wb=this.I.Xm;this.Wb==this.I.ab&&this.Pa==this.I.Ki?1<this.Ya.length&&0<this.B.Li&&(e=this.cm())&&(this.ed("{"+e+"}"),this.B.startTime=a.getTime(),this.gf=!1,this.B.active=!0,this.J.ue=!0):(this.Gf&&this.I.Ki!=this.Pa&&(this.ed("{"+this.I.Ki+"}",this.I.Kq),this.J.enabled?(this.B.active=!1,this.J.ue=!0):this.B.active=!0),this.B.startTime=a.getTime())}else this.aj(f),
this.B.Kd=f}else if(b=this.I.ca[0],f=this.I.ca[1],g=this.I.ca[2],h=this.I.ca[3],3!=h.rb&&(h=0),this.B.Hi||this.F.aborted||this.wb.running||e){if(this.gf=!0,this.B.startTime=0<this.B.Kd?a.getTime()-100*this.B.Kd:a.getTime(),this.Ud=e){for(this.ff=this.uj=0;this.ff<this.I.length/10;)this.ff+=this.D.f.duration;f=10*this.D.f.currentTime;for(e=Math.floor(f);!this.zf(e,3)&&0<e;)e--;e=this.zf(e,3);e.value==this.Va?this.ng=-1:(this.ng=e.value,this.Xh=f,this.tj=Math.max(5,e.time+e.Db-f))}}else{e={};if(0<this.B.Kd)e.pan=
this.B.eh,e.tilt=this.B.fh,e.fov=this.B.dh,e.projection=this.B.Rm;else{for(e.pan=b.value;360<e.pan;)e.pan-=360;for(;-360>e.pan;)e.pan+=360;e.tilt=f.value;e.fov=g.value;e.projection=h?h.value:4}e.timingFunction=3;e.speed=1;this.F.nh=!0;this.Ii(e);this.B.active=!0}}else 0<this.B.Li&&this.Gf&&e>=1E3*this.B.Li?1<this.Ya.length&&(e=this.cm())&&(this.B.startTime=a.getTime(),this.B.wd=a.getTime(),this.B.timeout=0,this.ed("{"+e+"}"),this.B.active=!0,this.J.ue=!0):(e=a.getTime(),f=b=1E3/60,0!=this.B.wd&&(f=
e-this.B.wd),this.v.d=this.B.jj*(0-this.v.j)/100,this.fov.d=this.B.jj*(this.fov.cb-this.fov.j)/100,this.pan.d=.95*this.pan.d+-this.B.speed*this.ji()*.05,b=f/b,this.pan.j+=this.pan.d*b,this.v.j+=this.v.d*b,this.fov.j+=this.fov.d*b,this.B.wd=e,this.update());3E3<a.getTime()-this.B.Di&&!this.B.di&&(this.Qa.style.cursor="none",this.B.di=!0)}else!this.wb.Vj&&1E3<a.getTime()-this.Hf&&(this.xa.splice(this.xa.indexOf(this.I),1),this.I=this.Gg(!1),this.Wb=this.I.ab,this.B.active=!1,this.B.Dg=!0),this.B.enabled&&
!this.Y.wi()&&a.getTime()-this.Hf>1E3*this.B.timeout&&!this.B.Dg&&(this.B.Dh&&this.li()||!this.B.Dh)&&(this.B.active=!0,this.B.startTime=a.getTime(),this.B.wd=0,this.P("autorotatechanged",{}),this.pan.d=0,this.v.d=0,this.fov.d=0),!this.Ja.enabled||this.Y.wi()||0==this.pan.d&&0==this.v.d&&0==this.fov.d||(this.F.ti=!0,this.pan.d*=.9,this.v.d*=.9,this.fov.d*=.9,this.pan.j+=this.pan.d,this.v.j+=this.v.d,this.Cj(this.fov.d),1E-4>this.pan.d*this.pan.d+this.v.d*this.v.d+this.fov.d*this.fov.d&&(this.pan.d=
0,this.v.d=0,this.fov.d=0),this.update())};c.prototype.cr=function(a){var b=this.J;if(b.yd){var e=a.getTime()-b.ro;e/=1E3*b.qo;1<=e?(b.yd=!1,this.Rl(),b.Tk=a.getTime(),this.Pn(),b.re=!0,0==b.sc||b.kg||(4==b.sc?(this.I=this.Gg(!0,b.$e,b.af,b.Rd),this.Wb=this.I.ab,this.B.active=!0,this.wb.running=!0):this.moveTo(b.$e,b.af,b.Rd,b.te,0,b.xd))):b.en(e)}else b.re&&(e=a.getTime()-b.Tk,e/=1E3*b.og,1<=e?(b.re=!1,this.Hf=a.getTime(),this.update(),0!=b.sc&&b.kg&&(4==b.sc?(this.I=this.Gg(!0,b.$e,b.af,b.Rd),this.Wb=
this.I.ab,this.B.active=!0,this.wb.running=!0):this.moveTo(b.$e,b.af,b.Rd,b.te,0,b.xd)),4!=b.sc&&(this.Vi(!1),this.B.active=b.ue,this.P("autorotatechanged",{}),b.ue=!1),this.B.wd=0,this.pa&&this.Jj(),this.qg=!1):b.en(e));b=this.Wq;b.Po&&(b.ei?a.getTime()-b.Qj>=1E3*b.delay&&(b.ei=!1):(b.current+=b.kd,0>b.current&&(b.current=0,b.kd=-b.kd,b.ei=!0,b.Qj=a.getTime()),1<b.current&&(b.current=1,b.kd=-b.kd,b.ei=!0,b.Qj=a.getTime())))};c.prototype.fr=function(){var a,b=this.H;if(0<b.sb.length){for(a=0;a<b.sb.length;a++)b.gd[a]!=
b.Zb[a]&&(b.gd[a]>b.Zb[a]?(b.Zb[a]+=.05,b.gd[a]<b.Zb[a]&&(b.Zb[a]=b.gd[a])):(b.Zb[a]-=.05,b.gd[a]>b.Zb[a]&&(b.Zb[a]=b.gd[a],-1!=b.bj.indexOf(b.sb[a])&&(b.bj.splice(b.bj.indexOf(b.sb[a]),1),b.sb.splice(a,1),b.gd.splice(a,1),b.Zb.splice(a,1)))));this.update()}if(2==b.mode)for(a=0;a<this.W.length;a++){var e=this.W[a];"poly"==e.type&&e.gb!=e.wa&&(e.gb>e.wa?(e.wa+=b.kd,e.gb<e.wa&&(e.wa=e.gb)):(e.wa-=b.kd,e.gb>e.wa&&(e.wa=e.gb)),this.update())}3==b.mode&&b.gb!=b.wa&&(b.gb>b.wa?(b.wa+=b.kd,b.gb<b.wa&&(b.wa=
b.gb)):(b.wa-=b.kd,b.gb>b.wa&&(b.wa=b.gb)),this.update())};c.prototype.er=function(){var a=this.Ja;this.Y.wi()&&(this.L.Hd?(a.ma.x=.4*(this.fa.na.x-a.na.x),a.ma.y=.4*(this.fa.na.y-a.na.y),a.na.x+=a.ma.x,a.na.y+=a.ma.y):(a.ma.x=.1*-this.fa.ma.x*this.L.sensitivity/8,a.ma.y=.1*-this.fa.ma.y*this.L.sensitivity/8),this.jo(a.ma.x,a.ma.y),this.update());a.fov.active&&(this.xl(.4*(a.fov.wc-this.fov.j)),.001>Math.abs(a.fov.wc-this.fov.j)/this.fov.j&&(a.fov.active=!1),this.update());if(a.enabled&&(0!=a.ma.x||
0!=a.ma.y)&&!this.Y.wi()){var b=.9*(1-a.Lk);a.ma.x*=b;a.ma.y*=b;this.F.ti=!0;.01>a.ma.x*a.ma.x+a.ma.y*a.ma.y?(a.ma.x=0,a.ma.y=0):(this.jo(a.ma.x,a.ma.y),this.update())}};c.prototype.br=function(){if(this.L.wn&&this.L.Hd){var a=this.jn;a.pan=this.pan.j;a.v=this.v.j;a.fov=this.fov.j;this.pf(a);this.pf(a);this.pf(a);var b=a.pan-this.pan.j,e=a.v-this.v.j;a=a.fov-this.fov.j;if(0!=b||0!=e||0!=a){var f=.2+.9*Math.min((Math.abs(b)+Math.abs(e)+Math.abs(a))/Math.abs(Math.min(this.fov.j,90))*.3,1);this.pan.j+=
b*f;this.v.j+=e*f;this.fov.j+=a*f;this.Ja.Lk=.3;this.update()}else this.Ja.Lk=0}else this.sg();if(isNaN(this.pan.j)||1E7<this.pan.j||-1E7>this.pan.j)this.pan.j=0;if(isNaN(this.v.j)||1E7<this.v.j||-1E7>this.v.j)this.v.j=0;if(isNaN(this.U.j)||1E7<this.U.j||-1E7>this.U.j)this.U.j=0;if(2!=this.Wa){for(;360<this.pan.j;)this.pan.j-=360;for(;-360>this.pan.j;)this.pan.j+=360}};c.prototype.dr=function(){if(!this.li()&&this.Cf&&5<this.u.sn){var a,b=0,e=this.gc.length;if(this.Lh)e=50,this.Rj<e&&this.Rj++,b=
this.Rj;else for(a=0;a<e;a++)(this.gc[a].complete&&this.gc[a].src!=this.Nl||""==this.gc[a].src)&&b++;b==e?(this.rh=1,this.isLoaded=!0,this.sa&&this.sa.ggLoaded&&this.sa.ggLoaded(),this.P("imagesready",{}),this.B.Dh&&this.B.enabled&&!this.F.active&&!this.J.yd&&(this.B.active=!0,this.B.startTime=(new Date).getTime(),this.B.wd=0)):this.rh=b/(1*e);this.P("downloadprogress",{percentLoaded:this.rh})}};c.prototype.qh=function(){var a=this;a.Ti||(a.vi?setTimeout(function(){a.Ti=!1;a.qh()},1E3/60):window.requestAnimationFrame(function(){a.Ti=
!1;a.qh()}));a.Ti=!0;this.Gk=this.Ri=0;a.F.ti=!1;var b=new Date;this.ki++;120<=this.ki&&(this.N("F/s: "+Math.round(1E3*this.ki/(b.getTime()-this.Nm))),this.Nm=b.getTime(),this.ki=0);this.P("timer",{});this.ga&&this.za.kp();this.Nb&&""!==this.Fe&&!this.qa&&document.hasOwnProperty(this.Fe)&&document[this.Fe].setPan&&0==this.op--&&(this.qa=document[this.Fe],this.jd=this.ga=!1,this.Ia&&(this.Ia.style.visibility="hidden"),this.qa.setLocked(!0),this.qa.setSlaveMode(!0),this.qa.readConfigString(this.Mj),
this.Kc("Flash player '"+this.Fe+"' connected."));this.al&&(this.Qc(),this.al=!1);this.er();this.dr();this.ar(b);this.br();this.cr(b);this.za.ys();(0<=this.H.mode||0<this.H.sb.length)&&this.fr();this.oj();if(this.If.pan!=this.pan.j||this.If.v!=this.v.j||this.If.fov!=this.fov.j)this.If.pan=this.pan.j,this.If.v=this.v.j,this.If.fov=this.fov.j,this.P("positionchanged",{});this.Pm!=this.Va&&(this.Pm=this.Va,this.P("projectionchanged",{}));this.Ma&&(0<this.xg?this.xg--:(this.Ma=!1,this.xg=0),this.J.re||
this.J.yd||this.ef||(this.Kh(),this.P("renderframe",{})),this.P("repaint",{}));b=this.hm();b!=this.Om&&(b?(this.sa&&this.sa.ggReLoadedLevels&&this.sa.ggReLoadedLevels(),this.P("tilesrequested",{})):(a.sa&&a.sa.ggLoadedLevels&&a.sa.ggLoadedLevels(),this.P("tilesready",{})),this.Om=b)};c.prototype.Hg=function(a){switch(a){case 4:a=Math.min(110,this.fov.max);break;case 12:a=Math.min(270,this.fov.xk);a=Math.min(360*this.aspect(),a);a=Math.min(360/this.aspect(),a);break;case 9:a=Math.min(270,this.fov.yk);
break;default:a=90}return a};c.prototype.vs=function(){var a=this;setTimeout(function(){a.Xf(!1)},10);setTimeout(function(){a.Xf(!1)},100)};c.prototype.oj=function(){this.Lj.Ul(this.pan.j,this.v.j);for(var a=0;a<this.X.length+this.S.length;a++){if(a<this.X.length)var b=this.X[a];else if(b=this.S[a-this.X.length],b.dd)continue;b.oj()}};c.prototype.Ur=function(a,b){var e=this;var f="<<L>>"+String(e.Oa);f=f.toUpperCase();"U"!=f.charAt(2)&&(e.L.Df=!1);if(0!=e.kh.length||!e.L.Df||e.L.ug||e.L.bi)if(e.pd)e.$.removeChild(e.pd),
e.pd=null;else{e.pd=document.createElement("div");var g=e.pd;f="left: "+a+"px;"+("top:\t "+b+"px;")+"z-index: 32000;";f+="position:relative;";f+="display: table;";f+="color: black;";f+="background-color: white;";f+="border: 1px solid lightgray;";f+="box-shadow: 1px 1px 3px #333;";f+="font-family: Verdana, Arial, Helvetica, sans-serif;";f+="font-size: 9pt;";f+="opacity : 0.95;";g.setAttribute("style",f);g.setAttribute("class","gg_contextmenu");f=document.createElement("style");a=document.createTextNode(".gg_context_row:hover { background-color: #3399FF }");
f.type="text/css";f.styleSheet?f.styleSheet.cssText=a.nodeValue:f.appendChild(a);g.appendChild(f);for(a=0;a<e.kh.length;a++){b=e.kh[a];var h=document.createElement("div");f="text-align: left;";f+="margin: 0;";f+="padding: 5px 20px;";f+="vertical-align: left;";h.setAttribute("style",f);h.setAttribute("class","gg_context_row");f=document.createElement("a");f.href=b.url;f.target="_blank";f.innerHTML=b.text;f.setAttribute("style","color: black; text-decoration: none;");h.appendChild(f);g.appendChild(h)}0<
e.kh.length&&(!e.L.Df||e.L.ug||e.L.bi)&&g.appendChild(document.createElement("hr"));if(e.L.bi&&e.ga){b=[];b.push({text:"Rectilinear Projection",uh:4});b.push({text:"Stereographic Projection",uh:9});b.push({text:"Fisheye Projection",uh:12});for(a=0;a<b.length;a++){h=b[a];var l=document.createElement("div");l.setAttribute("class","gg_context_row");f="text-align: left;";f+="margin: 0;";f=e.Va==h.uh?f+"padding: 5px 20px 5px 7px;":f+"padding: 5px 20px;";f+="vertical-align: left;";f+="cursor: pointer;";
l.setAttribute("style",f);l.onclick=function(k){return function(){e.Dj(k,1);e.update()}}(h.uh);l.innerHTML=e.Va==h.uh?"&#10687; "+h.text:h.text;g.appendChild(l)}e.L.Df&&!e.L.ug||g.appendChild(document.createElement("hr"))}e.L.ug&&(a=document.createElement("div"),a.setAttribute("class","gg_context_row"),f="text-align: left;margin: 0;padding: 5px 20px;",f+="vertical-align: left;",f+="cursor: pointer;",a.setAttribute("style",f),a.onclick=function(){e.kj()},a.innerHTML=e.Vg()?"Exit Fullscreen":"Enter Fullscreen",
g.appendChild(a));e.L.Df||(a=document.createElement("div"),f="text-align: left;margin: 0;padding: 5px 20px;",f+="vertical-align: left;",a.setAttribute("style",f),a.setAttribute("class","gg_context_row"),f=document.createElement("a"),f.href=c.wg("aHR0cDovL3Bhbm8ydnIuY29tLw=="),f.target="_blank",f.innerHTML=c.wg("Q3JlYXRlZCB3aXRoIFBhbm8yVlI="),7<this.Fi.length&&(f.innerHTML+="<br/>"+c.Kl(this.Fi).replace(/./gm,function(k){return"&#"+k.charCodeAt(0)+";"})),f.setAttribute("style","color: black; text-decoration: none;"),
a.appendChild(f),g.appendChild(a));e.$.insertBefore(e.pd,e.$.firstChild);g.onclick=function(){e.pd&&(e.$.removeChild(e.pd),e.pd=null)};g.oncontextmenu=g.onclick}};c.prototype.Oo=function(){var a=this;var b=a.Qa;a.control=b;a.control=b;a.vs();setTimeout(function(){a.qh()},10);setTimeout(function(){a.fn()},200);setTimeout(function(){a.df();a.Kh()},10);b.addEventListener&&(b.addEventListener("touchstart",function(e){a.qs(e)},!1),b.addEventListener("touchmove",function(e){a.ps(e)},!1),b.addEventListener("touchend",
function(e){a.os(e)},!1),b.addEventListener("touchcancel",function(e){a.ns(e)},!1),b.addEventListener("pointerdown",function(e){a.Wm(e)},!1),b.addEventListener("MSPointerDown",function(e){a.Wm(e)},!1),b.addEventListener("MSGestureStart",function(e){a.bm(e)},!1),b.addEventListener("MSGestureEnd",function(e){a.am(e)},!1),b.addEventListener("MSGestureChange",function(e){a.Hq(e)},!1),b.addEventListener("gesturestart",function(e){a.bm(e)},!1),b.addEventListener("gesturechange",function(e){a.qp(e)},!1),
b.addEventListener("gestureend",function(e){a.am(e)},!1),b.addEventListener("mousedown",function(e){a.Eq(e)},!1),b.addEventListener("mousemove",function(e){a.Dq(e)},!1),document.addEventListener("mouseup",function(e){a.Cq(e)},!1),b.addEventListener("mousewheel",function(e){a.Vm(e)},!1),b.addEventListener("DOMMouseScroll",function(e){a.Vm(e)},!1),document.addEventListener("keydown",function(e){a.uq(e)},!1),document.addEventListener("keyup",function(e){a.vq(e)},!1),window.addEventListener("resize",
function(){a.df()},!1),window.addEventListener("blur",function(){a.Nq()},!1),a.$.addEventListener("webkitfullscreenchange",function(){a.Ni()},!1),document.addEventListener("mozfullscreenchange",function(){a.Ni()},!1),window.addEventListener("webkitfullscreenchange",function(){a.Ni()},!1),document.addEventListener("MSFullscreenChange",function(){a.Ni()},!1));b.oncontextmenu=function(e){void 0===e&&(e=window.event);if(e.target&&!a.Jc(e.target))return!0;if(!e.ctrlKey){e=a.Ig(e);var f=a.He();a.Ur(e.x-
f.x,e.y-f.y);return!1}return!0};window.addEventListener("deviceorientation",function(e){a.Tq(e.alpha,e.beta,e.gamma,e.absolute);null!=e.alpha&&null!=e.beta&&null!=e.gamma&&0==a.dk&&(a.dk=!0,a.P("gyroavailable",{available:!0}),a.P("playerstatechanged",{}))})};c.prototype.ol=function(){for(var a=0;a<this.W.length;a++)if("point"==this.W[a].type&&(this.ka&&this.ka.addSkinHotspot?(this.W[a].uf(),this.W[a].f=this.ka.addSkinHotspot(this.W[a])):(this.W[a].f=new x.to(this,this.W[a]),this.W[a].Xc&&this.W[a].eg&&
(this.W[a].f.ggUse3d=!0,this.W[a].f.gg3dDistance=this.W[a].fi)),this.W[a].f.__div.style.left="-1000px",this.W[a].f.__div.style.top="-1000px",this.W[a].f&&this.W[a].f.__div)){var b=this.Qa.firstChild;b?this.Qa.insertBefore(this.W[a].f.__div,b):this.Qa.appendChild(this.W[a].f.__div)}};c.prototype.po=function(){var a,b=document.createElement("fakeelement"),e={OTransition:"oTransitionEnd",MSTransition:"msTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd",transition:"transitionEnd"};
for(a in e)if(void 0!==b.style[a])return e[a]};c.prototype.vb=function(a){var b=[];a="#"==a.substr(0,1)?a.substr(1):"^"+a+"$";a=new RegExp(a,"");for(var e=0;e<this.X.length;e++)a.test(this.X[e].id)&&b.push(this.X[e]);for(e=0;e<this.S.length;e++)a.test(this.S[e].id)&&b.push(this.S[e]);for(e=0;e<this.eb.length;e++)a.test(this.eb[e].id)&&b.push(this.eb[e]);return b};c.prototype.Lp=function(a){if("_videopanorama"==a)return this.D.f;a=this.vb(a);return 0<a.length?a[0].f:null};c.prototype.mn=function(a,
b){var e=this;b.addEventListener("ended",function(g){e.P("videoended",{video:g.target})});b.addEventListener("pause",function(g){e.P("videopaused",{video:g.target})});b.addEventListener("play",function(g){e.P("videostarted",{video:g.target})});for(var f=0;f<this.S.length;f++)if(this.S[f].id==a)return this.S[f].f=b,this.S[f];f=new x.nl(this);f.registerElement(a,b);return f};c.prototype.isPlaying=function(a){if(this.Nb){var b=this.qa;if(b)return b.isPlaying(a)}else{if("_main"===a)return!0;a=this.vb(a);
if(0<a.length)return a[0].ua?a[0].Pf:!a[0].f.ended&&!a[0].f.paused}return!1};c.prototype.ge=function(a,b){if(this.Nb){var e=this.qa;e&&e.playSound(a,b)}else try{e=this.vb(a);for(var f=0;f<e.length;f++){var g=e[f];g.ub=b&&!isNaN(Number(b))?Number(b)-1:g.loop-1;-1==g.ub&&(g.ub=1E7);this.N(g.f);this.isPlaying(a)&&this.dj(a);g.ua?g.Xd():(g.f.play(),!g.Sd||this.yc&&this.ri||g.lg());this.Lr(g.id)}}catch(h){this.N(h)}};c.prototype.gn=function(a,b){a=this.vb(a);for(var e=0;e<a.length;e++){var f=a[e];this.isPlaying(f.id)?
this.Ck(f.id):this.ge(f.id,b)}};c.prototype.gr=function(a,b){a=this.vb(a);for(var e=0;e<a.length;e++){var f=a[e];this.isPlaying(f.id)?this.dj(f.id):this.ge(f.id,b)}};c.prototype.Ck=function(a){if(this.Nb){var b=this.qa;b&&b.pauseSound(a)}else try{if(b=void 0,"_main"==a){this.Zi(a);for(b=0;b<this.X.length;b++)this.X[b].ua?this.X[b].yj():this.X[b].f.pause();for(b=0;b<this.S.length;b++)this.S[b].f.pause()}else{var e=this.vb(a);for(b=0;b<e.length;b++){var f=e[b];this.Zi(f.id);f.ua?f.yj():f.f.pause()}}}catch(g){this.N(g)}};
c.prototype.Eo=function(a,b){a=this.vb(a);for(var e=0;e<a.length;e++){var f=a[e];0==b||1==b?f.Ng&&f.Ng(1==b):2==b&&f.Ie&&f.Ie();!f.nb||-1==this.eb.indexOf(f)&&-1==this.S.indexOf(f)||(this.Ob=this.ie=f)}};c.prototype.dj=function(a){var b;if(this.Nb)(b=this.qa)&&b.stopSound(a);else try{if("_main"===a){this.Zi(a);for(b=0;b<this.X.length;b++)this.X[b].ua?this.X[b].nf():(this.X[b].f.pause(),this.X[b].f.currentTime=0);for(b=0;b<this.S.length;b++)this.S[b].f.pause(),this.S[b].f.currentTime=0}else{var e=
this.vb(a);for(b=0;b<e.length;b++){var f=e[b];this.Zi(f.id);f.ua?f.nf():f.f&&f.f.pause&&(f.f.pause(),f.f.currentTime=0)}}}catch(g){this.N(g)}};c.prototype.Zi=function(a){-1==this.hd.indexOf(a)&&this.hd.push(a);var b=this.se.indexOf(a);-1!=b&&this.se.splice(b,1);"_main"==a&&(this.se=[])};c.prototype.Lr=function(a){-1!=this.hd.indexOf("_main")&&-1==this.se.indexOf(a)&&this.se.push(a);a=this.hd.indexOf(a);-1!=a&&this.hd.splice(a,1)};c.prototype.Wr=function(a){a=this.vb(a);return 0<a.length?(a=a[0],a.ua?
a.Ro():a.f?a.f.currentTime:0):0};c.prototype.Xr=function(a,b){a=this.vb(a);0<a.length&&(a=a[0],a.ua?(0>b&&(b=0),b>a.Zh.duration&&(b=a.Zh.duration-.1),a.So(b)):a.f&&(0>b&&(b=0),b>a.f.duration&&(b=a.f.duration-.1),a.f.currentTime=b))};c.prototype.setVolume=function(a,b){if(this.Nb){var e=this.qa;e&&e.setVolume(a,b)}else try{e=void 0;var f=Number(b);1<f&&(f=1);0>f&&(f=0);"_videopanorama"===a&&this.D.f&&(this.D.f.volume=f);if("_main"===a){this.ba=f;for(e=0;e<this.X.length;e++)this.X[e].f.volume=this.X[e].level*
this.ba;for(e=0;e<this.S.length;e++)this.S[e].f.volume=this.S[e].level*this.ba;this.D.f&&(this.D.f.volume=this.ba)}else{var g=this.vb(a);this.N(g);for(e=0;e<g.length;e++){var h=g[e];h.f&&null!=h.f.volume&&(h.f.volume=f*this.ba);h.level=f}}}catch(l){this.N(l)}};c.prototype.Zo=function(a,b){if(this.Nb){var e=this.qa;e&&e.changeVolume(a,b)}else try{var f=e=void 0;"_videopanorama"===a&&this.D.f&&(this.D.f.volume+=Number(b));if("_main"===a){e=this.ba;e+=Number(b);1<e&&(e=1);0>e&&(e=0);this.ba=e;for(f=
0;f<this.X.length;f++)this.X[f].f.volume=this.X[f].level*this.ba;for(f=0;f<this.S.length;f++)this.S[f].f.volume=this.S[f].level*this.ba;this.D.f&&(this.D.f.volume=this.ba)}else{var g=this.vb(a);for(f=0;f<g.length;f++){var h=g[f];e=h.level;e+=Number(b);1<e&&(e=1);0>e&&(e=0);h.level=e;h.f&&null!=h.f.volume&&(h.f.volume=e*this.ba)}}}catch(l){this.N(l)}};c.prototype.Wi=function(a,b,e){a.f.style.opacity=0==b?1:0;a.f.style[this.Yc]="opacity "+e+"ms";a.f.style.opacity=0==b?0:1};c.prototype.Ar=function(a,
b,e){function f(){var k=g[l];if(!k.f)return"continue";0==b?(h.Wi(k,b,e),setTimeout(function(){0==k.f.style.opacity&&k.Yf(!1)},e+10),k.ob=!1):1==b?(h.Wi(k,b,e),k.Yf(!0),k.ob=!0):2==b&&("visible"==k.f.style.visibility?(h.Wi(k,0,e),setTimeout(function(){0==k.f.style.opacity&&k.Yf(!1)},e+10),k.ob=!1):(h.Wi(k,1,e),k.Yf(!0),k.ob=!0))}for(var g=this.vb(a),h=this,l=0;l<g.length;l++)f()};c.prototype.Pn=function(){try{for(var a=this,b=!1,e=!1,f=0;f<this.X.length;f++){var g=this.X[f];if(-1!=g.loop&&!this.isPlaying(g.id)&&
-1==this.hd.indexOf(g.id)&&(-1==this.hd.indexOf("_main")||-1!=this.se.indexOf(g.id)))if(this.va&&this.Xa.enabled&&4!=g.mode&&6!=g.mode)if(this.Xa.Gl){if(g.ua)g.Xd();else{var h=g.f.play();if(void 0!==h)h.then(function(){})["catch"](function(){});g.f.currentTime=0}g.ta=0;e=!0}else b=!0;else if(4!=g.mode&&6!=g.mode&&("_background"!=g.id||!this.isPlaying(g.id)))if(g.ua)g.Xd();else{h=g.f.play();if(void 0!==h)h.then(function(){})["catch"](function(){});g.f.currentTime&&(g.f.currentTime=0)}}b&&setTimeout(function(){a.Xa.ds()},
1E3*this.Xa.Db);e&&(this.Xa.Zr=this.va.currentTime,this.Xa.Yr=setInterval(function(){a.Xa.np()},10))}catch(l){this.N(l)}};c.prototype.Rl=function(){for(var a=0;a<this.Xa.Ih.length;a++)this.Xa.Ql(this.Xa.Ih[a])};c.prototype.rn=function(){for(var a;0<this.W.length;)a=this.W.pop(),a.f&&(this.Qa.removeChild(a.f.__div),delete a.f),a.f=null;this.H.wa=0;this.H.gb=0;this.P("hotspotsremoved",{})};c.prototype.Ok=function(a){this.Rh=a;this.$.style.zIndex=0!=a?a.toString():"auto";this.Sa&&this.Sa.ld&&(this.Sa.ld.zIndex=
(a+4).toString());this.Qa.style.zIndex=(a+4).toString();this.Ia.style.zIndex=(a+3).toString();this.Ha.style.zIndex=(a+5).toString();for(var b=0;b<this.S.length+this.eb.length;b++){var e=b<this.S.length?this.S[b]:this.eb[b-this.S.length];e.f&&(e.f.style.zIndex=(a+(e.nb?8E4:0)).toString())}};c.prototype.Xf=function(a){var b=this.isFullscreen!==a;this.isFullscreen!==a&&(this.isFullscreen=a,this.update(100));if(this.isFullscreen){if(this.pj)try{this.$.webkitRequestFullScreen?this.$.webkitRequestFullScreen():
this.$.mozRequestFullScreen?this.$.mozRequestFullScreen():this.$.msRequestFullscreen?this.$.msRequestFullscreen():this.$.requestFullScreen?this.$.requestFullScreen():this.$.requestFullscreen&&this.$.requestFullscreen()}catch(e){this.N(e)}this.$.style.position="absolute";a=this.He();this.$.style.left=window.pageXOffset-a.x+this.margin.left+"px";this.$.style.top=window.pageYOffset-a.y+this.margin.top+"px";this.Ok(10);document.body.style.overflow="hidden";b&&(this.sa&&this.sa.ggEnterFullscreen&&this.sa.ggEnterFullscreen(),
this.P("fullscreenenter",{}),this.P("playerstatechanged",{}))}else{if(this.pj)try{document.webkitIsFullScreen?document.webkitCancelFullScreen():document.mozFullScreen?document.mozCancelFullScreen():document.msExitFullscreen?document.msExitFullscreen():document.fullScreen&&(document.cancelFullScreen?document.cancelFullScreen():document.exitFullscreen&&document.exitFullscreen())}catch(e){this.N(e)}this.$.style.position="relative";this.$.style.left="0px";this.$.style.top="0px";this.Ok(0);document.body.style.overflow=
"";b&&(this.sa&&this.sa.ggExitFullscreen&&this.sa.ggExitFullscreen(),this.P("fullscreenexit",{}),this.P("playerstatechanged",{}))}this.df()};c.prototype.kj=function(){this.Xf(!this.isFullscreen)};c.prototype.mp=function(){this.Xf(!0)};c.prototype.exitFullscreen=function(){this.Xf(!1)};c.prototype.Bp=function(){return this.isFullscreen};c.prototype.zg=function(){this.Eb.gp();this.tn();this.Eb.zg();this.Eb.Vq();return!0};c.prototype.cq=function(){return"N/A"};c.prototype.Pr=function(a){this.Eb&&(this.Eb.yf=
a)};c.prototype.tf=function(){this.Eb&&(this.Eb.tf(),this.Eb.Te(),this.Eb.Gj());return!0};c.prototype.Xn=function(){this.Eb&&(this.Eb.Wg()?this.tf():this.zg());return!0};c.prototype.Wg=function(){return this.Eb&&this.Eb.Wg()?!0:!1};c.prototype.ik=function(){return this.Eb&&this.Eb.ik()?!0:!1};c.prototype.bs=function(a,b,e){this.B.Vd=this.B.Yh;this.B.gg=this.B.Oh;this.B.enabled=!0;this.B.jf=this.B.enabled;this.B.active=!0;this.B.wd=0;var f=new Date;this.B.Kd=0;this.B.startTime=f.getTime();a&&0!=a&&
(this.B.speed=a);b&&(this.B.timeout=b);e&&(this.B.jj=e);this.P("autorotatechanged",{})};c.prototype.es=function(){this.B.active=!1;this.B.enabled=!1;this.B.jf=this.B.enabled;this.gf=this.B.Hi=!1;this.F.active&&this.F.nh&&(this.F.active=!1,this.F.nh=!1,this.F.Lb=0);this.P("autorotatechanged",{})};c.prototype.ls=function(){this.B.enabled=!this.B.active;this.B.jf=this.B.enabled;this.B.active=this.B.enabled;this.B.wd=0;if(this.B.enabled){var a=new Date;this.B.Kd=0;this.B.startTime=a.getTime();this.B.Vd=
this.B.Yh;this.B.gg=this.B.Oh}this.P("autorotatechanged",{})};c.prototype.sr=function(a){this.B.Mf=a;this.B.$m=!0};c.prototype.$r=function(a){this.wb.running&&this.zn();this.Wb="";a&&""!=a&&(this.B.Vd=a);this.B.jf=this.B.enabled;this.B.gg=!0;this.B.enabled=!0;this.B.active=!0;this.B.wd=0;a=new Date;this.B.Kd=0;this.B.startTime=a.getTime();this.P("autorotatechanged",{})};c.prototype.zn=function(){this.wb.running=!1;this.wb.Vj=!0;this.B.active=this.J.ue;this.xa.splice(this.xa.indexOf(this.I),1);0<this.xa.length&&
(this.I=this.xa[0]);this.Wb="";this.Vi(!1);this.J.ue=!1;this.Hf=(new Date).getTime()};c.prototype.Fl=function(a){if(this.md=document.getElementById(a)){this.md.innerHTML="";this.$=document.createElement("div");this.$.onselectstart=function(){return!1};Il&&this.$.setAttribute("id","viewport");a="top:\t0px;left: 0px;position:relative;-ms-touch-action: none;touch-action: none;text-align: left;"+(this.Oa+"user-select: none;");this.$.setAttribute("style",a);this.md.appendChild(this.$);this.K=document.createElement("div");
a="top:\t0px;left: 0px;width:  100px;height: 100px;overflow: hidden;position:absolute;-ms-touch-action: none;touch-action: none;"+(this.Oa+"user-select: none;");Il&&this.K.setAttribute("id","viewer");this.K.setAttribute("style",a);this.$.appendChild(this.K);if(this.Nb){var b=document.createElement("div");a="top:\t0px;left: 0px;width:  100%;height: 100%;overflow: hidden;position:absolute;-ms-touch-action: none;touch-action: none;"+(this.Oa+"user-select: none;");b.setAttribute("id",this.Yj);b.setAttribute("style",
a);this.K.appendChild(b)}this.Sa&&(this.Sa.ld=document.createElement("canvas"),Il&&this.Sa.ld.setAttribute("id","lensflarecanvas"),a="top:\t0px;left: 0px;width:  100px;height: 100px;overflow: hidden;position:absolute;"+(this.Oa+"user-select: none;"),a+=this.Oa+"pointer-events: none;",this.Sa.ld.setAttribute("style",a),this.$.appendChild(this.Sa.ld));this.Qa=document.createElement("div");Il&&this.Qa.setAttribute("id","hotspots");a="top:\t0px;left: 0px;width:  100px;height: 100px;overflow: hidden;position:absolute;";
this.nk&&(a+="background-image: url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7);");this.yc&&!this.ga&&(a+=this.Oa+"transform: translateZ(9999999px);");a+=this.Oa+"user-select: none;";this.Qa.setAttribute("style",a);this.$.appendChild(this.Qa);this.Ia=document.createElement("canvas");Il&&this.Ia.setAttribute("id","hotspotcanvas");a="top:\t0px;left: 0px;width:  100px;height: 100px;overflow: hidden;position:absolute;"+(this.Oa+"user-select: none;");a+=this.Oa+"pointer-events: none;";
this.Ia.setAttribute("style",a);this.$.appendChild(this.Ia);this.Ha=document.createElement("div");Il&&this.Ha.setAttribute("id","hotspottext");this.Ha.setAttribute("style","top:\t0px;left: 0px;position:absolute;padding: 3px;visibility: hidden;");this.Ha.classList.add("ggskin");this.Ha.classList.add("ggdefaulthotspot");this.Ha.innerHTML=" Hotspot text!";this.$.appendChild(this.Ha);this.divSkin=this.sa=this.Qa;this.Ok(0)}else alert("container not found!")};c.prototype.Il=function(a){this.Ma=!0;return function(){a.bb&&
(a.u&&a.u.complete?(a.loaded=!0,a.bb.drawImage(a.u,0,0,a.width,a.height),a.u=null,a.Nd=null):a.Nd&&a.Nd.complete&&!a.loaded&&(a.bb.drawImage(a.Nd,0,0,a.width,a.height),a.Nd=null))}};c.prototype.El=function(a){var b,e=128;this.u.Rf&&(this.K.style.backgroundColor=this.u.Rf.replace("0x","#"));a?(e=this.pg,this.bf=1):this.Ec>e&&(e=this.Ec);for(b=0;6>b;b++){var f=this.cube.faces[b];a?(f.width=this.pg,f.height=this.pg):(f.V=document.createElement("canvas"),f.V.width=this.Ec,f.V.height=this.Ec,f.width=this.Ec,
f.height=this.Ec,f.bb=f.V.getContext("2d"));var g="position:absolute;";g+="left: 0px;";g+="top: 0px;";g+="width: "+e+"px;";g+="height: "+e+"px;";a&&(g+="outline: 1px solid transparent;");g+=this.Oa+"transform-origin: 0% 0%;";g+="-webkit-user-select: none;";g+=this.Oa+"transform: ";var h="";var l=1;this.Tf&&(l=100);h=4>b?h+("rotateY("+-90*b+"deg)"):h+("rotateX("+(4==b?-90:90)+"deg)");this.Tf&&(h+=" scale("+l+")");h+=" translate3d("+-e/2+"px,"+-e/2+"px,"+-e*l/(2*this.bf)+"px)";g+=h+";";f.vm=h;a||(f.V.setAttribute("style",
g),this.K.insertBefore(f.V,this.K.firstChild))}if(!a){for(b=0;6>b;b++)f=this.cube.faces[b],""!=this.rf[b]&&(f.Nd=new Image,f.Nd.crossOrigin=this.crossOrigin,f.Nd.onload=this.Il(f),f.Nd.setAttribute("src",this.Pb(this.rf[b])),this.gc.push(f.Nd));for(b=0;6>b;b++)f=this.cube.faces[b],f.loaded=!1,f.u=new Image,f.u.crossOrigin=this.crossOrigin,f.u.onload=this.Il(f),f.u.setAttribute("src",this.Pb(this.vg[b])),this.gc.push(f.u)}};c.prototype.Te=function(){var a;this.Ja.ma.x=0;this.Ja.ma.y=0;if(this.jd){for(a=
0;a<this.cube.faces.length;a++)this.cube.faces[a].V&&this.cube.faces[a].V.setAttribute&&(this.cube.faces[a].V.setAttribute("src",this.Nl),this.K.removeChild(this.cube.faces[a].V));if(this.u.levels){for(a=0;a<this.u.levels.length;a++){var b=this.u.levels[a];for(f in b.aa)if(b.aa.hasOwnProperty(f)){var e=b.aa[f];e.visible=!1;e.V&&(e.bb&&e.bb.clearRect(0,0,e.bb.canvas.width,e.bb.canvas.height),this.lj.push(e.V));e.u&&delete e.u;e.pb&&(this.R.deleteTexture(e.pb),this.rd--);e.bb=null;e.V=null;e.u=null}delete b.aa}delete this.u.levels;
this.u.levels=null}}this.za.Te();var f=[];for(a=0;a<this.S.length;a++)b=this.S[a],b.dd?f.push(b):b.Se();for(a=0;a<this.eb.length;a++)this.eb[a].Se();this.H.$g=-1;this.Ia.style.visibility="hidden";this.Wa=0;this.Ze=[];this.Xa.Ih=[];for(a=0;a<this.X.length;a++)b=this.X[a],0==b.mode||b.Zm||this.Ze.push(b);this.S=f;this.eb=[];this.D.f&&(this.$.removeChild(this.D.f),this.D.f=null,a=this.vb("_videopanorama"),0<a.length&&(a[0].f=null));this.D.vd=!1;this.D.yi=!1};c.prototype.rm=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}};c.prototype.km=function(){var a=this.rm();return a.w>a.h?a.w:a.h};c.prototype.Fk=function(a,b){var e=(new DOMParser).parseFromString(a,"text/xml");this.Mj=a;this.ln(e,b);this.qa&&(this.N("Apply to Flash player"),this.qa.readConfigString(this.Mj),this.qa.setLocked(!0),this.qa.setSlaveMode(!0))};c.prototype.kn=function(a,b,e){try{var f=void 0;f=new XMLHttpRequest;f.open("GET",a,!1);f.send(null);if(f.responseXML){var g=
a.lastIndexOf("/");0<=g&&(this.Wd=a.substr(0,g+1));2<=arguments.length&&null!=b&&(this.Wd=b);this.Fk(f.responseText,e)}else alert("Error loading panorama XML")}catch(h){alert("Error:"+h)}};c.prototype.ir=function(a,b,e,f){var g=new XMLHttpRequest;var h=this;g.onload=function(l){if(4<=g.readyState)if(g.responseXML){var k=a.lastIndexOf("/");0<=k&&(h.Wd=a.substr(0,k+1));3<=arguments.length&&null!=e&&(h.Wd=e);h.Fk(g.responseText,f);b&&b()}else alert("Error loading panorama XML");else console.error("Wrong state loading XML:"+
g.statusText)};g.onerror=function(){console.error("Error loading XML:"+g.statusText)};g.open("GET",a,!0);g.send(null)};c.prototype.Bj=function(a){var b="";"{"==a.charAt(0)&&(b=a.substr(1,a.length-2));(a=this.Yd[b])&&(b=a);a={oldNodeId:this.Pa,nodeId:b};this.P("beforechangenodeid",a);this.ck?this.ck=!1:this.zk.push(this.Pa);""!=this.Pa&&-1==this.qj.indexOf(this.Pa)&&(this.qj.push(this.Pa),this.P("changevisitednodes",{}));this.Qm=this.Pa;this.Pa=b;this.N("change active node: "+b);this.ka&&this.ka.changeActiveNode&&
this.ka.changeActiveNode("{"+b+"}");this.P("changenodeid",a);this.wf=!0};c.prototype.Zj=function(){return this.Pa};c.prototype.Np=function(){if(0<this.Ya.length){var a=this.Ya.indexOf(this.Pa);a++;a>=this.Ya.length&&(a=0);return this.Ya[a]}return""};c.prototype.Zp=function(){if(0<this.Ya.length){var a=this.Ya.indexOf(this.Pa);a--;0>a&&(a=this.Ya.length-1);return this.Ya[a]}return""};c.prototype.Gp=function(){return this.Qm};c.prototype.Lq=function(a){return-1!=this.qj.indexOf(a)};c.prototype.cp=function(){this.qj=
[];this.P("changevisitednodes",{})};c.prototype.ln=function(a,b){var e=a.firstChild;this.qe=[];this.Ya=[];this.Yd=[];for(a=e.firstChild;a;){if("map"==a.nodeName){var f={},g=a.getAttributeNode("title");g&&(f.title=g.nodeValue.toString());g=a.getAttributeNode("type");f.type=g.nodeValue.toString();"web"==f.type?(g=a.getAttributeNode("mapprovider"),f.mapprovider=g.nodeValue.toString(),(g=a.getAttributeNode("mapstyle"))&&(f.mapstyle=g.nodeValue.toString()),(g=a.getAttributeNode("googlecustomstylecode"))&&
(f.googlecustomstylecode=g.nodeValue.toString()),(g=a.getAttributeNode("mapurltemplate"))&&(f.mapurltemplate=g.nodeValue.toString()),(g=a.getAttributeNode("mapmaxzoom"))&&(f.mapmaxzoom=Number(g.nodeValue)),(g=a.getAttributeNode("mapkey"))&&(f.mapkey=g.nodeValue.toString()),(g=a.getAttributeNode("styleurl"))&&(f.styleurl=g.nodeValue.toString())):(g=a.getAttributeNode("width"),f.width=Number(g.nodeValue),g=a.getAttributeNode("height"),f.height=Number(g.nodeValue),g=a.getAttributeNode("zoomlevels"),
f.zoomlevels=Number(g.nodeValue),g=a.getAttributeNode("tileformat"),f.tileformat=g.nodeValue.toString(),g=a.getAttributeNode("bgcolor"),f.bgcolor=g.nodeValue.toString(),g=a.getAttributeNode("transparent"),f.transparent=1==g.nodeValue,g=a.getAttributeNode("floorplannorth"),f.floorplannorth=Number(g.nodeValue));g=a.getAttributeNode("id");this.Gi[g.nodeValue.toString()]=f}a=a.nextSibling}if("tour"==e.nodeName){this.Gf=!0;a="";(g=e.getAttributeNode("start"))&&(a=g.nodeValue.toString());this.hasOwnProperty("startNode")&&
this.startNode&&(a=String(this.startNode),this.startNode="");this.hasOwnProperty("startView")&&this.startView&&("object"===typeof this.startView&&null!==this.startView?b=this.startView:""!=this.startView&&(b=String(this.startView)),this.startView="");f=e.firstChild;var h="";for(e="";f;){if("panorama"==f.nodeName){if(g=f.getAttributeNode("id"))h=g.nodeValue.toString(),""==a&&(a=h),""==e&&(e=h),this.qe[h]=f,this.Ya.push(h);for(g=f.firstChild;g;){if("userdata"==g.nodeName){var l=this.Bg(g);this.Ph[h]=
l;h==a&&(this.Ph._first=l);l.customnodeid&&(this.Yd[l.customnodeid]=h);this.Lc[h]=this.Ol(g);this.Lf[h]=this.Pl(g)}g=g.nextSibling}}if("masternode"==f.nodeName)for(g=f.firstChild;g;)"userdata"==g.nodeName&&(l=this.Bg(g),this.Ph._master=l),g=g.nextSibling;f=f.nextSibling}this.qe.hasOwnProperty(a)||(g=this.Yd[a])&&(a=g);this.qe.hasOwnProperty(a)||(this.Kc("Start node "+a+" not found!"),a=e);this.Ek(this.qe[a],b);this.Bj("{"+a+"}");this.Pa=a}else this.Gf=!1,this.Ek(e,b),this.Bj(""),this.Ya.push("");
this.ef&&(this.N("add pano vr config"),this.Eb.Vh());this.P("configloaded",{});this.P("changenode",{});this.P("playerstatechanged",{})};c.prototype.Ek=function(a,b){var e=this;this.rn();this.Sa&&this.Sa.kr();this.Wf(this.mb);this.Te();this.ah=0;for(var f=a.firstChild,g,h,l=0;f;){if("view"==f.nodeName){if(g=f.getAttributeNode("fovmode"))this.fov.mode=Number(g.nodeValue);g=f.getAttributeNode("pannorth");this.pan.Ak=1*(g?g.nodeValue:0);for(var k=f.firstChild;k;){"start"==k.nodeName&&(g=k.getAttributeNode("pan"),
this.pan.j=Number(g?g.nodeValue:0),this.pan.cb=this.pan.j,g=k.getAttributeNode("tilt"),this.v.j=Number(g?g.nodeValue:0),this.v.cb=this.v.j,g=k.getAttributeNode("roll"),this.U.j=Number(g?g.nodeValue:0),this.U.cb=this.U.j,g=k.getAttributeNode("fov"),this.fov.j=Number(g?g.nodeValue:70),this.fov.cb=this.fov.j,g=k.getAttributeNode("projection"),this.Oi=Number(g?g.nodeValue:4),this.Oc(this.Oi));"min"==k.nodeName&&(g=k.getAttributeNode("pan"),this.pan.min=1*(g?g.nodeValue:0),g=k.getAttributeNode("tilt"),
this.v.min=1*(g?g.nodeValue:-90),g=k.getAttributeNode("fov"),this.fov.min=1*(g?g.nodeValue:5),1E-20>this.fov.min&&(this.fov.min=1E-20),g=k.getAttributeNode("fovpixel"),this.fov.lh=1*(g?g.nodeValue:0));if("max"==k.nodeName){g=k.getAttributeNode("pan");this.pan.max=1*(g?g.nodeValue:0);g=k.getAttributeNode("tilt");this.v.max=1*(g?g.nodeValue:90);g=k.getAttributeNode("fov");this.fov.max=1*(g?g.nodeValue:120);180<=this.fov.max&&(this.fov.max=179.9);if(g=k.getAttributeNode("fovstereographic"))this.fov.yk=
1*g.nodeValue;if(g=k.getAttributeNode("fovfisheye"))this.fov.xk=1*g.nodeValue;if(g=k.getAttributeNode("scaletofit"))this.L.xn=1==g.nodeValue}if("flyin"==k.nodeName){if(g=k.getAttributeNode("projection"))this.Gc.Lb=Number(g.nodeValue);if(g=k.getAttributeNode("pan"))this.Gc.pan=parseFloat(g.nodeValue);if(g=k.getAttributeNode("tilt"))this.Gc.v=parseFloat(g.nodeValue);if(g=k.getAttributeNode("fov"))this.Gc.fov=parseFloat(g.nodeValue)}k=k.nextSibling}}if("autorotate"==f.nodeName){if(g=f.getAttributeNode("speed"))this.B.speed=
1*g.nodeValue;if(g=f.getAttributeNode("delay"))this.B.timeout=1*g.nodeValue;if(g=f.getAttributeNode("returntohorizon"))this.B.jj=1*g.nodeValue;if(g=f.getAttributeNode("nodedelay"))this.B.Li=1*g.nodeValue;if(g=f.getAttributeNode("noderandom"))this.B.an=1==g.nodeValue;(g=f.getAttributeNode("nodefilter"))&&!this.B.$m&&(this.B.Mf=g.nodeValue);this.$d&&(this.B.enabled=!0,this.B.jf=!0,this.B.active=!1);this.B.Kd=0;if(g=f.getAttributeNode("startloaded"))this.B.Dh=1==g.nodeValue,this.B.Dh&&(this.B.active=
!1);if(g=f.getAttributeNode("useanimation"))this.B.Oh=1==g.nodeValue,this.B.gg=this.B.Oh;if(g=f.getAttributeNode("syncanimationwithvideo"))this.B.Vk=1==g.nodeValue}if("animation"==f.nodeName){if(g=f.getAttributeNode("syncanimationwithvideo"))this.B.Vk=1==g.nodeValue;if(g=f.getAttributeNode("useinautorotation"))this.B.Oh=1==g.nodeValue;if(g=f.getAttributeNode("animsequence"))this.B.Yh=g.nodeValue,this.$d&&(this.B.Vd=this.B.Yh);this.xa=[];for(k=f.firstChild;k;){if("clip"==k.nodeName){this.I=new x.il;
if(g=k.getAttributeNode("animtitle"))this.I.hf=g.nodeValue.toString();if(g=k.getAttributeNode("cliptitle"))this.I.ab=g.nodeValue.toString();if(g=k.getAttributeNode("nodeid"))this.I.Os=g.nodeValue.toString();if(g=k.getAttributeNode("length"))this.I.length=Number(g.nodeValue);if(g=k.getAttributeNode("animtype"))this.I.Lo=Number(g.nodeValue);if(g=k.getAttributeNode("nextcliptitle"))this.I.Xm=g.nodeValue.toString();if(g=k.getAttributeNode("nextclipnodeid"))this.I.Ki=g.nodeValue.toString();if(g=k.getAttributeNode("nextclipstartview"))this.I.Kq=
g.nodeValue.toString();if(g=k.getAttributeNode("transitiontype"))this.I.rs=Number(g.nodeValue);var w=k.firstChild;for(this.I.ca=[];w;){if("keyframe"==w.nodeName){var r=new x.Vc;if(g=w.getAttributeNode("time"))r.time=Number(g.nodeValue);if(g=w.getAttributeNode("value"))r.value=Number(g.nodeValue);if(g=w.getAttributeNode("valuestring"))r.dl=g.nodeValue.toString();if(g=w.getAttributeNode("transitiontime"))r.Db=Number(g.nodeValue);g=w.getAttributeNode("type");var y=0;g&&(r.type=Number(g.nodeValue),y=
Number(g.nodeValue));if(g=w.getAttributeNode("property"))r.rb=Number(g.nodeValue);if(g=w.getAttributeNode("additionaltrackid"))r.Wh=g.nodeValue.toString();if(1==y||2==y){if(g=w.getAttributeNode("bezierintime"))r.ve=Number(g.nodeValue);if(g=w.getAttributeNode("bezierinvalue"))r.we=Number(g.nodeValue);if(g=w.getAttributeNode("bezierouttime"))r.xe=Number(g.nodeValue);if(g=w.getAttributeNode("bezieroutvalue"))r.ye=Number(g.nodeValue)}this.I.ca.push(r)}w=w.nextSibling}this.xa.push(this.I)}k=k.nextSibling}}"input"==
f.nodeName&&(h||(h=f));if(h)for(w=0;6>w;w++)g=h.getAttributeNode("prev"+w+"url"),this.rf[w]=g?String(g.nodeValue):"";"altinput"==f.nodeName&&(k=0,(g=f.getAttributeNode("screensize"))&&(k=1*g.nodeValue),0<k&&k<=this.km()&&k>l&&(l=k,h=f));if("control"==f.nodeName&&this.$d){if(g=f.getAttributeNode("simulatemass"))this.Ja.enabled=1==g.nodeValue;if(g=f.getAttributeNode("rubberband"))this.L.wn=1==g.nodeValue;if(g=f.getAttributeNode("locked"))this.L.jc=1==g.nodeValue;g&&(this.L.hh=1==g.nodeValue);if(g=f.getAttributeNode("lockedmouse"))this.L.jc=
1==g.nodeValue;if(g=f.getAttributeNode("lockedkeyboard"))this.L.hh=1==g.nodeValue;if(g=f.getAttributeNode("lockedkeyboardzoom"))this.L.zq=1==g.nodeValue;if(g=f.getAttributeNode("lockedwheel"))this.L.ce=1==g.nodeValue;if(g=f.getAttributeNode("invertwheel"))this.L.Fm=1==g.nodeValue;if(g=f.getAttributeNode("speedwheel"))this.L.Ln=1*g.nodeValue;if(g=f.getAttributeNode("invertcontrol"))this.L.Hd=1==g.nodeValue;if(g=f.getAttributeNode("sensitivity"))this.L.sensitivity=1*g.nodeValue,1>this.L.sensitivity&&
(this.L.sensitivity=1);if(g=f.getAttributeNode("dblclickfullscreen"))this.L.Oj=1==g.nodeValue;if(g=f.getAttributeNode("contextfullscreen"))this.L.ug=1==g.nodeValue;if(g=f.getAttributeNode("contextprojections"))this.L.bi=1==g.nodeValue;if(g=f.getAttributeNode("hideabout"))this.L.Df=1==g.nodeValue;for(k=f.firstChild;k;)"menulink"==k.nodeName&&(w={text:"",url:""},g=k.getAttributeNode("text"),w.text=g.nodeValue,g=k.getAttributeNode("url"),w.url=g.nodeValue,this.kh.push(w)),k=k.nextSibling}if("transition"==
f.nodeName&&this.$d){if(g=f.getAttributeNode("enabled"))this.J.enabled=1==g.nodeValue;if(g=f.getAttributeNode("blendtime"))this.J.og=1*g.nodeValue;if(g=f.getAttributeNode("blendcolor"))this.J.lf=g.nodeValue.toString();if(g=f.getAttributeNode("type"))this.J.type=g.nodeValue.toString();if(g=f.getAttributeNode("softedge"))this.J.Pc=1*g.nodeValue;if(g=f.getAttributeNode("zoomin"))this.J.ra=1*g.nodeValue;if(g=f.getAttributeNode("zoomout"))this.J.sc=1*g.nodeValue;if(g=f.getAttributeNode("zoomfov"))this.J.jg=
1*g.nodeValue;if(g=f.getAttributeNode("zoomspeed"))this.J.te=1*g.nodeValue;if(g=f.getAttributeNode("zoomoutpause"))this.J.kg=1==g.nodeValue;"cut"==this.J.type&&(this.J.og=0)}if("soundstransition"==f.nodeName){if(g=f.getAttributeNode("enabled"))this.Xa.enabled=1==g.nodeValue;if(g=f.getAttributeNode("transitiontime"))this.Xa.Db=1*g.nodeValue;if(g=f.getAttributeNode("crossfade"))this.Xa.Gl=1==g.nodeValue}if("flyintransition"==f.nodeName){if(g=f.getAttributeNode("enabled"))this.wb.enabled=1==g.nodeValue&&
this.ga;if(g=f.getAttributeNode("speed"))this.wb.speed=1*g.nodeValue}"userdata"==f.nodeName&&(this.userdata=this.hg=this.Bg(f),this.Lc[a.id]||(this.Lc[a.id]=this.Ol(f),this.Lf[a.id]=this.Pl(f)));if("hotspots"==f.nodeName)for(k=f.firstChild;k;){if("label"==k.nodeName&&this.$d){w=this.H.gj;if(g=k.getAttributeNode("enabled"))w.enabled=1==g.nodeValue;if(g=k.getAttributeNode("width"))w.width=1*g.nodeValue;if(g=k.getAttributeNode("height"))w.height=1*g.nodeValue;if(g=k.getAttributeNode("textcolor"))w.hj=
1*g.nodeValue;if(g=k.getAttributeNode("textalpha"))w.fj=1*g.nodeValue;if(g=k.getAttributeNode("background"))w.background=1==g.nodeValue;if(g=k.getAttributeNode("backgroundalpha"))w.bc=1*g.nodeValue;if(g=k.getAttributeNode("backgroundcolor"))w.cc=1*g.nodeValue;if(g=k.getAttributeNode("border"))w.$h=1*g.nodeValue;if(g=k.getAttributeNode("bordercolor"))w.ec=1*g.nodeValue;if(g=k.getAttributeNode("borderalpha"))w.dc=1*g.nodeValue;if(g=k.getAttributeNode("borderradius"))w.xj=1*g.nodeValue;if(g=k.getAttributeNode("wordwrap"))w.rj=
1==g.nodeValue}if("polystyle"==k.nodeName&&this.$d){if(g=k.getAttributeNode("mode"))this.H.mode=1*g.nodeValue;if(g=k.getAttributeNode("bordercolor"))this.H.ec=1*g.nodeValue;if(g=k.getAttributeNode("backgroundcolor"))this.H.cc=1*g.nodeValue;if(g=k.getAttributeNode("borderalpha"))this.H.dc=1*g.nodeValue;if(g=k.getAttributeNode("backgroundalpha"))this.H.bc=1*g.nodeValue;if(g=k.getAttributeNode("handcursor"))this.H.Bf=1==g.nodeValue}g=void 0;"hotspot"==k.nodeName&&(g=new x.Uh(this),g.type="point",g.Yb(k),
this.W.push(g));"polyhotspot"==k.nodeName&&(g=new x.Uh(this),g.type="poly",g.Yb(k),this.W.push(g));k=k.nextSibling}if("sounds"==f.nodeName||"media"==f.nodeName)for(k=f.firstChild;k;){if("sound"==k.nodeName&&!this.Ym)for(g=new x.Bo(this),g.Yb(k),this.Nb||g.addElement(),w=0;w<this.Ze.length;w++)g.id==this.Ze[w].id&&(this.Ze.splice(w,1),w--);"video"==k.nodeName&&(g=new x.nl(this),g.Yb(k),this.Nb||g.addElement());"image"==k.nodeName&&(g=new x.zo(this),g.Yb(k),this.Nb||g.addElement());"lensflare"==k.nodeName&&
this.Sa&&(g=new x.Ao(this),g.Yb(k),this.Sa.gh.push(g));k=k.nextSibling}f=f.nextSibling}for(w=0;w<this.Ze.length;w++){a=this.Ze[w];if(this.va&&this.Xa.enabled&&this.isPlaying(a.id))this.Xa.Ih.push(a);else{try{a.ua?a.nf():a.f.pause()}catch(ha){this.N(ha)}a.Se()}this.X.splice(this.X.indexOf(a),1)}1!=this.J.ra&&2!=this.J.ra&&6!=this.J.ra&&this.Rl();this.kb.xh=!0;b&&("object"===typeof b&&null!==b?(b.hasOwnProperty("pan")&&this.Xe(Number(b.pan)),b.hasOwnProperty("tilt")&&this.Ye(Number(b.tilt)),b.hasOwnProperty("fov")&&
this.We(Number(b.fov)),b.hasOwnProperty("projection")&&this.Oc(Number(b.projection))):""!=b&&(b=b.toString().split("/"),4<b.length&&this.Oc(Number(b[4])),0<b.length&&(g=String(b[0]),"N"==g.charAt(0)?this.Nk(Number(g.substr(1))):"S"==g.charAt(0)?this.Nk(-180+Number(g.substr(1))):this.Xe(Number(g))),1<b.length&&this.Ye(Number(b[1])),2<b.length&&this.We(Number(b[2]))),this.pan.open=this.pan.j);if(h){g=h.getAttributeNode("stereo");this.Jd=!1;g&&1==g.nodeValue&&(this.Jd=!0);g=h.getAttributeNode("fliplr");
this.Eh=!1;g&&1==g.nodeValue&&(this.Eh=!0);for(w=0;w<(this.Jd?12:6);w++)(g=h.getAttributeNode("tile"+w+"url"))&&(this.vg[w]=String(g.nodeValue));for(w=0;6>w;w++)(g=h.getAttributeNode("prev"+w+"url"))&&(this.rf[w]=String(g.nodeValue));if(g=h.getAttributeNode("tilevrurl"))this.Hl=String(g.nodeValue);if(g=h.getAttributeNode("tilesize"))this.Ec=1*g.nodeValue;if(g=h.getAttributeNode("canvassize"))this.pg=Number(g.nodeValue);if(g=h.getAttributeNode("tilescale"))this.bf=1*g.nodeValue;if(g=h.getAttributeNode("leveltileurl"))this.u.uk=
g.nodeValue;if(g=h.getAttributeNode("leveltilesize"))this.u.M=Number(g.nodeValue);if(g=h.getAttributeNode("levelbias"))this.u.Tm=Number(g.nodeValue);if(g=h.getAttributeNode("levelbiashidpi"))this.u.Um=Number(g.nodeValue);g=h.getAttributeNode("overlap");this.Na.U=0;this.Na.pitch=0;g&&(this.u.Da=Number(g.nodeValue));if(g=h.getAttributeNode("levelingroll"))this.Na.U=Number(g.nodeValue);if(g=h.getAttributeNode("levelingpitch"))this.Na.pitch=Number(g.nodeValue);this.Wa=0;(g=h.getAttributeNode("flat"))&&
1==g.nodeValue&&(this.Wa=2);g=h.getAttributeNode("width");this.u.width=1*(g?g.nodeValue:1);g=h.getAttributeNode("height");this.u.height=1*(g?g.nodeValue:this.u.width);this.D.src=[];this.u.levels=[];for(k=h.firstChild;k;){if("preview"==k.nodeName){if(g=k.getAttributeNode("color"))this.u.Rf=g.nodeValue;if(g=k.getAttributeNode("strip"))this.u.hn=1==g.nodeValue}if("video"==k.nodeName){if(g=k.getAttributeNode("format"))"3x2"==g.nodeValue&&(this.D.format=14),"equirectangular"==g.nodeValue&&(this.D.format=
1);if(g=k.getAttributeNode("flipy"))this.D.flipY=Number(g.nodeValue);if(g=k.getAttributeNode("startonload"))this.D.Sk=1==g.nodeValue;if(g=k.getAttributeNode("startmutedmobile"))this.D.Nn=1==g.nodeValue;if(g=k.getAttributeNode("bleed"))this.D.kf=Number(g.nodeValue);if(g=k.getAttributeNode("endaction"))this.D.De=String(g.nodeValue);if(g=k.getAttributeNode("targetview"))this.D.Wk=String(g.nodeValue);if(g=k.getAttributeNode("width"))this.D.width=Number(g.nodeValue);if(g=k.getAttributeNode("height"))this.D.height=
Number(g.nodeValue);for(w=k.firstChild;w;)"source"==w.nodeName&&(g=w.getAttributeNode("url"))&&this.D.src.push(g.nodeValue.toString()),w=w.nextSibling}if("level"==k.nodeName){h=new x.ll;g=k.getAttributeNode("width");h.width=1*(g?g.nodeValue:1);g=k.getAttributeNode("height");h.height=1*(g?g.nodeValue:h.width);if(g=k.getAttributeNode("preload"))h.cache=1==g.nodeValue;if(g=k.getAttributeNode("preview"))h.Re=1==g.nodeValue;h.T=Math.floor((h.width+this.u.M-1)/this.u.M);h.da=Math.floor((h.height+this.u.M-
1)/this.u.M);this.u.levels.push(h)}k=k.nextSibling}this.u.sk=this.u.levels.length}this.Cf=!0;this.Lh&&(this.ga=this.jd=!1,this.vc||(this.N("dummy rendering"),this.vc=document.createElement("canvas"),this.vc.width=100,this.vc.height=100,this.vc.id="dummycanvas",this.K.appendChild(this.vc)),this.Qc());this.ga&&this.R&&(this.za.Dm(this.bf),this.za.Em());this.jd&&(0<this.u.levels.length?this.El(!0):this.El(!1),this.ah=0);var z=this;0<this.u.levels.length&&this.u.hn&&0==this.Wa&&(b=new Image,h=new x.ll,
h.Re=!0,h.cache=!0,h.T=h.da=0,h.height=h.width=0,this.u.levels.push(h),b.crossOrigin=this.crossOrigin,b.onload=this.za.Jq(b),b.setAttribute("src",this.oe(6,this.u.sk-1,0,0)));if(0<this.D.src.length&&this.ga)if(this.Mh){this.D.f=document.createElement("video");this.D.f.crossOrigin=this.crossOrigin;this.D.f.setAttribute("style","display:none; max-width:none;");this.D.f.setAttribute("playsinline","playsinline");this.D.f.preload=!0;this.D.f.volume=this.ba;this.$.appendChild(this.D.f);this.D.vd=!1;this.D.Tn=
!1;this.D.f.oncanplay=function(){if(!z.D.vd){z.D.yi=!0;var ha,ua,id=[],sh=new x.Ga,db=z.R,gl=z.D.f.videoWidth/3;z.D.width=z.D.f.videoWidth;z.D.height=z.D.f.videoHeight;for(ha=0;6>ha;ha++){var tf=ha%3*gl+z.D.kf;var hl=tf+gl-2*z.D.kf;var il=4;3>ha&&(il+=gl);var kl=il+gl-2*z.D.kf;for(ua=0;4>ua;ua++){sh.x=-1;sh.y=-1;sh.z=1;for(var jl=0;jl<ua;jl++)sh.vn();id.push((0<sh.x?tf:hl)/(3*gl),(0<sh.y?kl:il)/(2*gl))}}db.bindBuffer(db.ARRAY_BUFFER,z.D.ej);db.bufferData(db.ARRAY_BUFFER,new Float32Array(id),db.STATIC_DRAW)}};
this.D.ub=function(){var ha=z.vb("_videopanorama");return 0<ha.length&&ha[0].ub?ha[0].ub:0};this.D.yn=function(ha){var ua=z.vb("_videopanorama");0<ua.length&&(ua[0].ub=ha)};this.D.loop=function(){return 0<z.D.ub()?(z.D.yn(z.D.ub()-1),z.D.f.play(),!0):!1};"exit"==this.D.De?this.D.f.onended=function(){z.D.yi=!1;z.D.vd=!1;z.$.removeChild(z.D.f);z.D.f=null;z.update()}:"stop"==this.D.De?z.D.f.onended=function(){z.D.loop()||z.update()}:"{"==this.D.De.charAt(0)?this.D.f.onended=function(){z.ed(z.D.De,z.D.Wk)}:
this.D.f.loop=!0;for(w=0;w<this.D.src.length;w++)h=document.createElement("source"),h.setAttribute("src",this.Pb(this.D.src[w])),this.D.f.appendChild(h);h=this.vb("_videopanorama");0<h.length?h[0].f=this.D.f:this.mn("_videopanorama",this.D.f);if(this.D.Sk&&(h=this.D.f.play(),void 0!==h))h.then(function(){})["catch"](function(){e.D.Nn&&(e.D.f.muted=!0,e.D.f.play())})}else"{"==this.D.De.charAt(0)&&z.ed(z.D.De,z.D.Wk);this.ol();this.J.yd||this.Pn();this.update();this.$d&&(this.$d=!1,this.sa&&this.sa.ggViewerInit&&
(this.sa.ggViewerInit(),this.P("viewerinit",{})),this.wb.enabled&&0==this.Wa&&this.ga&&(this.Oc(9),this.pan.j=this.Gc.pan,this.v.j=this.Gc.v,this.fov.j=this.Gc.fov,this.Va=this.Gc.Lb,this.I=this.Gg(!1),this.pan.j=this.I.ca[0].value,this.v.j=this.I.ca[1].value,this.fov.j=this.I.ca[2].value,3==this.I.ca[3].rb&&this.Oc(this.I.ca[3].value),this.Wb=this.I.ab,this.Vi(!0),this.B.active=!1,this.B.Dg=!0));this.Qc()};c.prototype.Bk=function(a,b){0<a.length&&(".xml"==a.substr(a.length-4)||".swf"==a.substr(a.length-
4)||"{"==a.charAt(0)?this.ed(this.Pb(a),b):window.open(this.Pb(a),b))};c.prototype.cs=function(){this.Cf=this.isLoaded=!1;this.checkLoaded=this.gc=[];this.rh=0;this.sa&&this.sa.ggReLoaded&&this.sa.ggReLoaded();this.P("beforechangenode",{})};c.prototype.mq=function(a){var b="";0<this.zk.length&&(b=this.zk.pop());""!=b&&(this.ck=!0);this.ed("{"+b+"}",a)};c.prototype.ed=function(a,b){if(""!=a&&"{}"!=a){this.cs();this.ka&&this.ka.hotspotProxyOut&&this.ka.hotspotProxyOut(this.Ca.id,this.Ca.url);".swf"==
a.substr(a.length-4)&&(a=a.substr(0,a.length-4)+".xml");var e="",f=null;"object"===typeof b&&null!==b?f=b:b&&(e=b.toString());b="/"+this.v.j+"/"+this.fov.j+"//"+this.Ra();e=e.replace("$cur",this.pan.j+b);e=e.replace("$(cur)",this.pan.j+b);e=e.replace("$fwd","N"+this.Ge()+b);e=e.replace("$(fwd)","N"+this.Ge()+b);e=e.replace("$bwd","S"+this.Ge()+b);e=e.replace("$(bwd)","S"+this.Ge()+b);e=e.replace("$ap",String(this.pan.j));e=e.replace("$(ap)",String(this.pan.j));e=e.replace("$an",String(this.Ge()));
e=e.replace("$(an)",String(this.Ge()));e=e.replace("$at",String(this.v.j));e=e.replace("$(at)",String(this.v.j));e=e.replace("$af",String(this.fov.j));e=e.replace("$(af)",String(this.fov.j));e=e.replace("$ar",String(this.Ra()));e=e.replace("$(ar)",String(this.Ra()));""!=e&&(b=e.split("/"),3<b.length&&""!=b[3]&&(this.startNode=b[3]));b=null!==f?f:e;this.Ea();if("{"==a.charAt(0)){var g=a.substr(1,a.length-2);if(this.Pa==g&&this.qg)return;(f=this.Yd[g])&&(g=f);f=this.J;var h=this.R;if(this.qe[g]){this.qg=
!0;if(this.J.enabled&&this.ga&&this.J.rc){f.re||f.yd||this.Vi(!0);var l=void 0;"wipeleftright"==f.type?l=1:"wiperightleft"==f.type?l=2:"wipetopbottom"==f.type?l=3:"wipebottomtop"==f.type?l=4:"wiperandom"==f.type&&(l=Math.ceil(4*Math.random()));f.Nj=l;h.bindFramebuffer(h.FRAMEBUFFER,f.rc);h.viewport(0,0,f.rc.width,f.rc.height);h.clear(h.COLOR_BUFFER_BIT|h.DEPTH_BUFFER_BIT);f.Hh=!0;this.Kh();f.Hh=!1;h.bindFramebuffer(h.FRAMEBUFFER,null);h.viewport(0,0,this.xb.width,this.xb.height);h=new Date;this.Ca!=
this.mb&&6!=f.ra?(f.Sh=this.Ca.Xb/this.C.width,f.Th=1-this.Ca.Ab/this.C.height):(f.Sh=.5,f.Th=.5);1!=f.ra&&2!=f.ra&&6!=f.ra?(f.Tk=h.getTime(),f.re=!0):(f.ro=h.getTime(),f.yd=!0,f.Fb=Math.sin(this.Tb()/2*Math.PI/180)/Math.sin(f.jg/2*Math.PI/180),f.Fb=Math.max(f.Fb,1),f.qo=1/f.te*f.Fb*.3)}this.Ek(this.qe[g],b);this.Bj(a);if(f.enabled&&this.ga&&0!=f.sc){f.$e=this.Kg();f.af=this.ni();f.Rd=this.Tb();f.xd=this.Ra();if(1==f.sc||3==f.sc)this.$i(f.jg);else if(2==f.sc)this.$i(this.Tb()+f.jg);else if(4==f.sc){for(g=
b=0;g<this.xa.length;g++)this.xa[g].ab&&0==this.xa[g].ab.indexOf("__FlyIn")&&(b=this.xa[g]);0!=b?(this.Oc(this.mi(3,b).value),this.Xe(this.mi(0,b).value),this.Ye(this.mi(1,b).value),this.We(this.mi(2,b).value)):(this.Oc(this.Gc.Lb),this.Xe(this.Gc.pan),this.Ye(this.Gc.v),this.$i(this.Gc.fov))}f.kg||1==f.ra||2==f.ra||6==f.ra||(4==f.sc?(this.I=this.Gg(!0,f.$e,f.af,f.Rd),this.Wb=this.I.ab,this.B.active=!0,this.wb.running=!0):this.moveTo(f.$e,f.af,f.Rd,f.te,0,f.xd))}this.qa&&this.qa.openNext(a,e);this.ef&&
(this.N("add pano opennext"),this.Eb.Vh());this.J.yd||this.J.re||(this.pa&&this.Jj(),this.qg=!1)}else{this.Kc("invalid node id: "+g);return}}else this.kn(a,null,b);this.P("changenode",{});this.update(5)}};c.prototype.Pp=function(){return this.Cf?this.Gf?this.Ya.slice(0):[""]:[]};c.prototype.Bg=function(a){var b;var e={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"))&&(e.title=b.nodeValue.toString()),(b=a.getAttributeNode("description"))&&(e.description=b.nodeValue.toString()),(b=a.getAttributeNode("author"))&&(e.author=b.nodeValue.toString()),(b=a.getAttributeNode("datetime"))&&(e.datetime=b.nodeValue.toString()),(b=a.getAttributeNode("copyright"))&&(e.copyright=b.nodeValue.toString()),(b=a.getAttributeNode("source"))&&(e.source=b.nodeValue.toString()),(b=a.getAttributeNode("info"))&&(e.information=b.nodeValue.toString()),
(b=a.getAttributeNode("comment"))&&(e.comment=b.nodeValue.toString()),(b=a.getAttributeNode("latitude"))&&(e.latitude=Number(b.nodeValue)),(b=a.getAttributeNode("longitude"))&&(e.longitude=Number(b.nodeValue)),(b=a.getAttributeNode("nodeid"))&&(e.nodeid=b.nodeValue.toString()),(b=a.getAttributeNode("altitude"))&&(e.altitude=Number(b.nodeValue)),(b=a.getAttributeNode("heading"))&&(e.heading=Number(b.nodeValue)),(b=a.getAttributeNode("customnodeid"))&&(e.customnodeid=b.nodeValue.toString()),(b=a.getAttributeNode("streetviewlink"))&&
(e.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--);e.tags=a}return e};c.prototype.Ol=function(a){for(var b={},e=a.firstChild;e;){if("mapcoords"==e.nodeName){var f={x:0,y:0};a=e.getAttributeNode("x");f.x=Number(a.nodeValue);a=e.getAttributeNode("y");f.y=Number(a.nodeValue);a=e.getAttributeNode("mapid");b[a.nodeValue.toString()]=f}e=e.nextSibling}return b};c.prototype.Pl=function(a){for(var b=
{},e=a.firstChild;e;){if("mapcoords"==e.nodeName){var f={x:0,y:0};a=e.getAttributeNode("x_floorplan_percent");f.x=Number(a.nodeValue);a=e.getAttributeNode("y_floorplan_percent");f.y=Number(a.nodeValue);a=e.getAttributeNode("mapid");b[a.nodeValue.toString()]=f}e=e.nextSibling}return b};c.prototype.Jg=function(a){return a?this.Ph[a]?this.Ph[a]:this.Bg():this.hg};c.prototype.ak=function(a){a=this.Jg(a);var b=[];""!=a.latitude&&0!=a.latitude&&0!=a.longitude&&(b.push(a.latitude),b.push(a.longitude));return b};
c.prototype.lm=function(a){for(var b=[],e=0;e<this.Ya.length;e++){var f=this.Ya[e],g=this.Jg(f);g&&g.tags.includes(a)&&b.push(f)}return b};c.prototype.Sp=function(a){return this.Jg(a).title};c.prototype.Op=function(a,b){var e=-1;a=this.ak(a);b=this.ak(b);if(2==a.length&&2==b.length){e=Math.PI/180*(b[0]-a[0]);var f=Math.PI/180*(b[1]-a[1]);a=Math.sin(e/2)*Math.sin(e/2)+Math.sin(f/2)*Math.sin(f/2)*Math.cos(Math.PI/180*a[0])*Math.cos(Math.PI/180*b[0]);e=12742E3*Math.atan2(Math.sqrt(a),Math.sqrt(1-a))}return e};
c.prototype.zf=function(a,b){var e;for(e=0;e<this.I.ca.length;e++)if(this.I.ca[e].time==a&&this.I.ca[e].rb==b)return this.I.ca[e];return!1};c.prototype.mi=function(a,b){var e;for(e=0;e<b.ca.length;e++)if(0==b.ca[e].time&&b.ca[e].rb==a)return b.ca[e];return!1};c.prototype.Mp=function(a){var b,e=1E5,f=a,g=!1;for(b=0;b<this.I.ca.length;b++)this.I.ca[b].rb==a.rb&&this.I.ca[b].time>a.time&&this.I.ca[b].time<e&&(f=this.I.ca[b],e=f.time,g=!0);return g?f:!1};c.prototype.rp=function(a){for(var b=[],e=0;e<
this.I.ca.length;e++)if(this.I.ca[e].time<=a&&4==this.I.ca[e].rb){for(var f=!1,g=0;g<b.length;g++)if(b[g].Wh==this.I.ca[e].Wh){b[g].time<this.I.ca[e].time?b.splice(g,1):f=!0;break}f||b.push(this.I.ca[e])}return b};c.prototype.Gg=function(a,b,e,f){for(var g=0;g<this.xa.length;g++)if(this.xa[g].ab&&0==this.xa[g].ab.indexOf("__FlyIn"))return this.xa[g];g=new x.hl;g.ab="__FlyIn";g.me=this.pan.j;g.Bh=this.v.j;g.Pd=this.fov.j;g.Ah=this.Va;g.xd=this.Oi;a?(g.sf=!1,g.Be=!1,g.speed=this.J.te,g.Qd=b,g.ne=e,
g.ag=f):(g.sf=!0,g.Be=!0,g.speed=this.wb.speed,g.Qd=this.pan.cb,g.ne=this.v.cb,g.ag=this.fov.cb);return this.$l(g)};c.prototype.$l=function(a){var b=new x.il;b.ab=a.ab;b.hf="";b.ca=[];for(var e=a.Ah!=a.xd&&-1!=a.xd;-180>a.Qd;)a.Qd+=360;for(;180<a.Qd;)a.Qd-=360;var f=a.Qd-a.me;if(360==this.pan.max-this.pan.min){for(;-180>f;)f+=360;for(;180<f;)f-=360}var g=a.ne-a.Bh,h=a.ag-a.Pd,l=Math.round(Math.sqrt(f*f+g*g+h*h)/a.speed*.33);e&&(l=Math.max(10,l));b.length=l;if(a.Ce){var k=Math.ceil(.7*l);k=Math.min(15,
k);k=Math.max(5,k);b.length=l+k;var w=.33*k}var r=a.ag,y=l,z=0,ha=l-1;if(e){var ua=a.Pd;var id=4==a.xd?120:this.Hg(a.xd);var sh=a.ag;h=sh-a.Pd;var db=new x.Fc(0,a.Pd),gl=new x.Fc(l,sh),tf=new x.Fc,hl=new x.Fc;hl.init(l/3,a.Pd+h/3);tf.init(2*l/3,sh-h/3);if(ua>id)for(;z<=l&&ua>id;)ua=new x.Fc,ua.wj(db,gl,hl,tf,z),ua=ua.y,z++;else z=1;z>=.8*l&&(y=z=Math.round(.8*l));0==z&&(z=1);id=4==a.Ah?120:this.Hg(a.Ah);ua=a.ag;if(ua>id)for(;ha>z&&ua>id;)ua=new x.Fc,ua.wj(db,gl,hl,tf,ha),ua=ua.y,ha--}db=new x.Vc;
db.time=0;db.rb=0;db.value=a.me;db.type=1;db.xe=l/3;db.ye=a.sf?a.me:a.me+f/3;b.ca.push(db);db=new x.Vc;db.time=0;db.rb=1;db.value=a.Bh;db.type=1;db.xe=l/3;db.ye=a.sf?a.Bh:a.Bh+g/3;b.ca.push(db);db=new x.Vc;db.time=0;db.rb=2;db.value=a.Pd;db.type=1;db.xe=l/3;db.ye=a.sf?a.Pd:a.Pd+h/3;b.ca.push(db);db=new x.Vc;db.time=0;db.rb=3;db.value=a.Ah;db.type=0;db.Db=0;b.ca.push(db);e&&(db=new x.Vc,db.time=z,db.rb=3,db.value=a.xd,db.type=0,db.Db=ha-z,b.ca.push(db));db=new x.Vc;db.time=l;db.rb=0;db.value=a.me+
f;db.type=1;db.ve=2*l/3;db.we=a.Be&&!a.Ce?db.value:db.value-f/3;a.Ce&&(db.xe=l+w,db.ye=db.value+w/l*f);b.ca.push(db);db=new x.Vc;db.time=l;db.rb=1;db.value=a.ne;db.type=1;db.ve=2*l/3;db.we=a.Be&&!a.Ce?a.ne:a.ne-g/3;a.Ce&&(db.xe=l+w,db.ye=db.value+w/l*g);b.ca.push(db);db=new x.Vc;db.time=y;db.rb=2;db.value=r;db.type=1;db.ve=2*y/3;db.we=a.Be?r:r-h/3;b.ca.push(db);a.Ce&&(db=new x.Vc,db.time=l+k,db.rb=0,db.value=a.me+f,db.type=1,db.ve=l+k-w,db.we=a.me+f,b.ca.push(db),db=new x.Vc,db.time=l+k,db.rb=1,db.value=
a.ne,db.type=1,db.ve=l+k-w,db.we=a.ne,b.ca.push(db));this.xa.push(b);return b};c.prototype.Es=function(){this.D.f&&this.D.f.play()};c.prototype.Fs=function(){this.D.f&&(this.D.f.pause(),this.D.f.currentTime=0)};c.prototype.Ds=function(){this.D.f&&this.D.f.pause()};c.prototype.Rr=function(a){this.D.f&&(0>a&&(a=0),a>this.D.f.duration&&(a=this.D.f.duration-.1),this.D.f.currentTime=a,this.update())};c.prototype.gq=function(){return this.D.f?this.D.f.currentTime:0};c.prototype.fq=function(){if(this.D.f)return this.D.f};
c.prototype.Qr=function(a){if(this.D.f){var b=!this.D.f.paused&&!this.D.f.ended,e=this.D.f.currentTime;this.D.f.pause();this.D.f.src=isNaN(parseInt(a,10))?String(a):this.D.src[parseInt(a,10)];b&&(this.D.f.onloadedmetadata=function(){this.currentTime=e;this.play();this.onloadedmetadata=null});this.D.f.currentTime=e}};c.prototype.lp=function(){this.Ym=!0};return c}();x.ml=d})(ggP2VR||(ggP2VR={}));window.ggHasHtml5Css3D=Gl;window.ggHasWebGL=Hl;window.pano2vrPlayer=ggP2VR.ml;var n=ggP2VR.ml.prototype;
n.getVersion=n.um;n.readConfigString=n.Fk;n.readConfigUrl=n.kn;n.readConfigUrlAsync=n.ir;n.readConfigXml=n.ln;n.openUrl=n.Bk;n.openNext=n.ed;n.goBack=n.mq;n.setMargins=n.zr;n.addListener=n.addListener;n.on=n.addListener;n.removeEventListener=n.removeEventListener;n.off=n.removeEventListener;n.detectBrowser=n.Ml;n.initWebGL=n.bd;n.getPercentLoaded=n.Vp;n.setBasePath=n.tr;n.getBasePath=n.dm;n.setViewerSize=n.Hn;n.getViewerSize=n.jq;n.setSkinObject=n.Kr;n.changeViewMode=n.Xo;n.getViewMode=n.hq;
n.changePolygonMode=n.zl;n.setPolygonMode=n.zl;n.getPolygonMode=n.Xp;n.showOnePolyHotspot=n.In;n.hideOnePolyHotspot=n.Am;n.changePolyHotspotColor=n.Vo;n.toggleOnePolyHotspot=n.ms;n.changeViewState=n.Yo;n.getViewState=n.iq;n.setRenderFlags=n.Dr;n.getRenderFlags=n.$p;n.setMaxTileCount=n.En;n.getVFov=n.Tb;n.setVFov=n.$i;n.getHFov=n.xp;n.updatePanorama=n.Kh;n.isTouching=n.Lm;n.getIsMobile=n.Dp;n.setIsMobile=n.yr;n.getIsTour=n.Ep;n.getIsAutorotating=n.Ap;n.getIsLoading=n.Cp;n.getIsLoaded=n.li;
n.getIsTileLoading=n.hm;n.getLastActivity=n.Fp;n.getPan=n.Kg;n.getPanNorth=n.Ge;n.getPanDest=n.Up;n.getPanN=n.mm;n.setPan=n.Xe;n.setPanNorth=n.Nk;n.changePan=n.yl;n.changePanLog=n.Uo;n.getTilt=n.ni;n.getTiltDest=n.aq;n.setTilt=n.Ye;n.changeTilt=n.Al;n.changeTiltLog=n.Wo;n.getFov=n.$j;n.getFovDest=n.vp;n.setFov=n.We;n.changeFov=n.xl;n.changeFovLog=n.Cj;n.getRoll=n.qm;n.setRoll=n.Yi;n.setPanTilt=n.Br;n.setPanTiltFov=n.Xi;n.setDefaultView=n.ur;n.setLocked=n.setLocked;n.setLockedMouse=n.Cn;
n.setLockedKeyboard=n.Bn;n.getLockedKeyboard=n.Hp;n.setLockedWheel=n.Dn;n.moveTo=n.moveTo;n.moveToEx=n.Ii;n.moveToDefaultView=n.Fq;n.moveToDefaultViewEx=n.Gq;n.addHotspotElements=n.ol;n.playSound=n.ge;n.playPauseSound=n.gn;n.playStopSound=n.gr;n.pauseSound=n.Ck;n.activateSound=n.Eo;n.soundGetTime=n.Wr;n.soundSetTime=n.Xr;n.setMediaVisibility=n.Ar;n.isPlaying=n.isPlaying;n.stopSound=n.dj;n.setVolume=n.setVolume;n.changeVolume=n.Zo;n.removeHotspots=n.rn;n.getHotspotsVisible=n.fm;
n.getCurrentPerspective=n.qd;n.addHotspot=n.Go;n.updateHotspot=n.us;n.removeHotspot=n.jr;n.setActiveHotspot=n.Wf;n.getPointHotspotIds=n.Wp;n.getHotspot=n.zp;n.setFullscreen=n.Xf;n.toggleFullscreen=n.kj;n.enterFullscreen=n.mp;n.exitFullscreen=n.exitFullscreen;n.getIsFullscreen=n.Bp;n.startAutorotate=n.bs;n.stopAutorotate=n.es;n.toggleAutorotate=n.ls;n.setAutorotateNodeFilter=n.sr;n.startAnimation=n.$r;n.createLayers=n.Fl;n.removePanorama=n.Te;n.getScreenResolution=n.rm;n.getMaxScreenResolution=n.km;
n.getNodeIds=n.Pp;n.getNodeUserdata=n.Jg;n.getNodeLatLng=n.ak;n.getNodeTitle=n.Sp;n.getNodeDistance=n.Op;n.getCurrentNode=n.Zj;n.getNextNode=n.Np;n.getPrevNode=n.Zp;n.getLastVisitedNode=n.Gp;n.getNodesWithTag=n.lm;n.getCurrentPointHotspots=n.tp;n.getPositionAngles=n.Yp;n.getPositionRawAngles=n.nm;n.nodeVisited=n.Lq;n.clearVisitedNodes=n.cp;n.setElementIdPrefix=n.wr;n.videoPanoPlay=n.Es;n.videoPanoStop=n.Fs;n.videoPanoPause=n.Ds;n.getVideoPanoTime=n.gq;n.setVideoPanoTime=n.Rr;
n.getVideoPanoObject=n.fq;n.setVideoPanoSource=n.Qr;n.getMediaObject=n.Lp;n.registerVideoElement=n.mn;n.disableSoundLoading=n.lp;n.setCrossOrigin=n.setCrossOrigin;n.setProjection=n.Oc;n.getProjection=n.Ra;n.changeProjection=n.Dj;n.changeProjectionEx=n.Dj;n.changeLensflares=n.To;n.setTransition=n.Nr;n.getMapType=n.Kp;n.getMapDetails=n.Jp;n.getNodeMapCoords=n.Qp;n.getNodeMapCoordsInPercent=n.Rp;n.getMapContainingNode=n.Ip;n.getMapsContainingNode=n.jm;n.getMapIDs=n.im;n.addVariable=n.Jo;
n.setVariableOptions=n.Fn;n.setVariableValue=n.le;n.getVariableValue=n.eq;n.setSuperCookie=n.Mr;n.getGyroAvailable=n.wp;n.setUseGyro=n.Or;n.getUseGyro=n.bq;n.getOS=n.Tp;n.getBrowser=n.sp;n.triggerEvent=n.P;n.requestRedraw=n.lr;n.getWebGlContext=n.kq;n.getHasTouch=n.yp;n.enterVR=n.zg;n.exitVR=n.tf;n.toggleVR=n.Xn;n.isInVR=n.Wg;n.hasVR=n.ik;n.getVRDisplayName=n.cq;n.setVRFrameBufferScaleFactor=n.Pr;