//////////////////////////////////////////////////////////////////////
// Pano2VR 7.0 beta6/19829 HTML5/CSS3 & WebGL Panorama Player       //
// License: David G Mehas                                           //
// (c) 2022, Garden Gnome Software, https://ggnome.com              //
//////////////////////////////////////////////////////////////////////

var p="function"==typeof Object.defineProperties?Object.defineProperty:function(y,w,v){if(y==Array.prototype||y==Object.prototype)return y;y[w]=v.value;return y};function aa(y){y=["object"==typeof globalThis&&globalThis,y,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var w=0;w<y.length;++w){var v=y[w];if(v&&v.Math==Math)return v}throw Error("Cannot find global object");}var ba=aa(this);
function L(y,w){if(w)a:{var v=ba;y=y.split(".");for(var f=0;f<y.length-1;f++){var e=y[f];if(!(e in v))break a;v=v[e]}y=y[y.length-1];f=v[y];w=w(f);w!=f&&null!=w&&p(v,y,{configurable:!0,writable:!0,value:w})}}var ca;if("function"==typeof Object.setPrototypeOf)ca=Object.setPrototypeOf;else{var da;a:{var ea={a:!0},fa={};try{fa.__proto__=ea;da=fa.a;break a}catch(y){}da=!1}ca=da?function(y,w){y.__proto__=w;if(y.__proto__!==w)throw new TypeError(y+" is not extensible");return y}:null}var ha=ca;
L("Object.setPrototypeOf",function(y){return y||ha});L("Array.prototype.fill",function(y){return y?y:function(w,v,f){var e=this.length||0;0>v&&(v=Math.max(0,e+v));if(null==f||f>e)f=e;f=Number(f);0>f&&(f=Math.max(0,e+f));for(v=Number(v||0);v<f;v++)this[v]=w;return this}});function Q(y){return y?y:Array.prototype.fill}L("Int8Array.prototype.fill",Q);L("Uint8Array.prototype.fill",Q);L("Uint8ClampedArray.prototype.fill",Q);L("Int16Array.prototype.fill",Q);L("Uint16Array.prototype.fill",Q);
L("Int32Array.prototype.fill",Q);L("Uint32Array.prototype.fill",Q);L("Float32Array.prototype.fill",Q);L("Float64Array.prototype.fill",Q);function ia(y,w,v){if(null==y)throw new TypeError("The 'this' value for String.prototype."+v+" must not be null or undefined");if(w instanceof RegExp)throw new TypeError("First argument to String.prototype."+v+" must not be a regular expression");return y+""}
L("String.prototype.startsWith",function(y){return y?y:function(w,v){var f=ia(this,w,"startsWith");w+="";var e=f.length,a=w.length;v=Math.max(0,Math.min(v|0,f.length));for(var b=0;b<a&&v<e;)if(f[v++]!=w[b++])return!1;return b>=a}});function ja(y){var w=0;return function(){return w<y.length?{done:!1,value:y[w++]}:{done:!0}}}
L("Symbol",function(y){function w(a){if(this instanceof w)throw new TypeError("Symbol is not a constructor");return new v(f+(a||"")+"_"+e++,a)}function v(a,b){this.uq=a;p(this,"description",{configurable:!0,writable:!0,value:b})}if(y)return y;v.prototype.toString=function(){return this.uq};var f="jscomp_symbol_"+(1E9*Math.random()>>>0)+"_",e=0;return w});
L("Symbol.iterator",function(y){if(y)return y;y=Symbol("Symbol.iterator");for(var w="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),v=0;v<w.length;v++){var f=ba[w[v]];"function"===typeof f&&"function"!=typeof f.prototype[y]&&p(f.prototype,y,{configurable:!0,writable:!0,value:function(){return ka(ja(this))}})}return y});function ka(y){y={next:y};y[Symbol.iterator]=function(){return this};return y}
function la(y,w){y instanceof String&&(y+="");var v=0,f=!1,e={next:function(){if(!f&&v<y.length){var a=v++;return{value:w(a,y[a]),done:!1}}f=!0;return{done:!0,value:void 0}}};e[Symbol.iterator]=function(){return e};return e}L("Array.prototype.keys",function(y){return y?y:function(){return la(this,function(w){return w})}});L("Object.is",function(y){return y?y:function(w,v){return w===v?0!==w||1/w===1/v:w!==w&&v!==v}});
L("Array.prototype.includes",function(y){return y?y:function(w,v){var f=this;f instanceof String&&(f=String(f));var e=f.length;v=v||0;for(0>v&&(v=Math.max(v+e,0));v<e;v++){var a=f[v];if(a===w||Object.is(a,w))return!0}return!1}});L("String.prototype.includes",function(y){return y?y:function(w,v){return-1!==ia(this,w,"includes").indexOf(w,v||0)}});
var __extends=this&&this.__extends||function(){function y(w,v){y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,e){f.__proto__=e}||function(f,e){for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(f[a]=e[a])};return y(w,v)}return function(w,v){function f(){this.constructor=w}if("function"!==typeof v&&null!==v)throw new TypeError("Class extends value "+String(v)+" is not a constructor or null");y(w,v);w.prototype=null===v?Object.create(v):(f.prototype=v.prototype,new f)}}();
function ma(){var y="perspective",w=["Webkit","Moz","O","ms","Ms"],v;for(v=0;v<w.length;v++)"undefined"!==typeof document.documentElement.style[w[v]+"Perspective"]&&(y=w[v]+"Perspective");"undefined"!==typeof document.documentElement.style[y]?"webkitPerspective"in document.documentElement.style?(y=document.createElement("style"),w=document.createElement("div"),v=document.head||document.getElementsByTagName("head")[0],y.textContent="@media (-webkit-transform-3d) {#ggswhtml5{height:5px}}",v.appendChild(y),
w.id="ggswhtml5",document.documentElement.appendChild(w),v=5===w.offsetHeight,y.parentNode.removeChild(y),w.parentNode.removeChild(w)):v=!0:v=!1;return v}function na(){var y;if(y=!!window.WebGLRenderingContext)try{var w=document.createElement("canvas");w.width=100;w.height=100;var v=w.getContext("webgl");v||(v=w.getContext("experimental-webgl"));y=!!v}catch(f){y=!1}return y}var ggP2VR;
(function(y){var w=function(){function e(a){this.o=null;this.ve=this.ro=this.Ma=!1;this.oc=!0;this.nd=!1;this.yb=this.Na=this.Ja=0;this.fov=70;this.Kj=this.Ca=0;this.autoplay=this.lg=this.qf=!1;this.id="";this.u=this.pan=0;this.o=a;this.Pc=this.pc=100;this.Ic=1}e.prototype.xb=function(a){var b;if(b=a.getAttributeNode("id"))this.id=b.nodeValue.toString();if(b=a.getAttributeNode("pan"))this.pan=Number(b.nodeValue);if(b=a.getAttributeNode("tilt"))this.u=Number(b.nodeValue)};e.prototype.Fm=function(a){var b=
"",c=this.o,h=!0;if(c.uj){var m=new y.Ta(0,0,-100);m.Ja(-this.u*Math.PI/180);m.Na(this.pan*Math.PI/180);m.Na(-c.pan.m*Math.PI/180);m.Ja(c.u.m*Math.PI/180);m.yb(c.W.m*Math.PI/180);.01<=m.z&&(h=!1)}c.Me&&(b+="perspective("+a+"px) ");b=b+("translate3d(0px,0px,"+a+"px) rotateZ(")+(c.W.m.toFixed(10)+"deg) ");b+="rotateX("+c.u.m.toFixed(10)+"deg) ";b+="rotateY("+(-c.pan.m).toFixed(10)+"deg) ";b+="rotateY("+this.pan.toFixed(10)+"deg) ";b+="rotateX("+(-this.u).toFixed(10)+"deg) ";a=1E4;m=this.j.videoWidth;
var n=this.j.videoHeight;if(0==m||0==n)m=640,n=480;0<this.pc&&(m=this.pc);0<this.Pc&&(n=this.Pc);0<m&&0<n&&(this.j.width=m,this.j.height=n,this.j.style.width=m+"px",this.j.style.height=n+"px");0<this.fov&&(a=m/(2*Math.tan(this.fov/2*Math.PI/180)));b+="translate3d(0px,0px,"+(-a).toFixed(10)+"px) ";b+="rotateZ("+this.yb.toFixed(10)+"deg) ";b+="rotateY("+(-this.Na).toFixed(10)+"deg) ";b+="rotateX("+this.Ja.toFixed(10)+"deg) ";this.Ic&&1!=this.Ic&&(b+="scaleY("+this.Ic+") ");b+="translate3d("+-m/2+"px,"+
-n/2+"px,0px) ";this.j.style[c.Ad+"Origin"]="0% 0%";this.Ma&&(b="",1==this.Ca&&(b+="scale("+Math.min(c.C.width/m,c.C.height/n)+") "),b+="translate3d("+-m/2+"px,"+-n/2+"px,0px) ");this.Ds!=b&&(this.Ds=b,this.j.style[c.Ad]=b,this.j.style.visibility=h&&this.oc&&(!this.qf||this.ve||this.Ma)?"visible":"hidden",this.ve&&this.ro==this.Ma&&(this.j.style[c.Zb]="all 0s linear 0s"),this.ro=this.Ma)};e.prototype.Gf=function(a){this.j&&(this.j.style.visibility=a?"visible":"hidden")};e.prototype.he=function(){var a=
this.o;a.na?(this.j.style.left=a.C.width/2+"px",this.j.style.top=a.C.height/2+"px"):(this.j.style.left=a.margin.left+a.C.width/2+"px",this.j.style.top=a.margin.top+a.C.height/2+"px")};e.prototype.Le=function(){this.j.parentNode&&this.j.parentNode.removeChild(this.j);this.j=null};e.prototype.Od=function(){};return e}();y.rv=w;var v=function(e){function a(b){b=e.call(this,b)||this;b.wa=!1;b.Tp=!1;b.stopped=!1;b.muted=!1;b.Wo=!1;b.Mg=!1;b.Wk=!1;b.Ol=!1;b.Ld=!1;b.jc=null;b.Ri=null;b.Ai=0;b.zf=0;b.vg=
!1;b.Kt=!1;b.url=[];b.loop=0;b.level=1;b.Cc=0;b.mode=1;b.ej=10;b.Cb=0;b.Lg=0;b.va=1;b.$c=0;b.ad=0;b.bd=0;b.cd=0;b.Hj=-1;return b}__extends(a,e);a.prototype.Cm=function(){var b=this,c=b.j.play();if(void 0!==c)c.then(function(){b.Of()})["catch"](function(){b.j.pause();b.Tp&&(b.j.muted=!0,b.j.play())})};a.prototype.Op=function(){this.wa&&this.stopped?this.stopped=!1:0==this.loop?this.wa?(this.jc=null,this.ne()):this.j.play():0<this.sb?(this.sb--,this.wa||(this.j.currentTime=0),this.Wk&&(this.Ib&&0==
this.Ib.gain.value||0==this.ub.gain.value&&0==this.Lb.gain.value&&0==this.Jb.gain.value&&0==this.Kb.gain.value)||(this.wa?(this.jc=null,this.ne()):this.j.play())):this.wa&&(this.jc=null,this.vg=!1)};a.prototype.Of=function(){this.Ld=!1;var b=this.o.ra;b&&(this.wa||7==this.mode||(this.source=b.createMediaElementSource(this.j)),2==this.mode||3==this.mode||5==this.mode?(this.Pd=b.createChannelSplitter(2),this.ub=b.createGain(),this.Jb=b.createGain(),this.Kb=b.createGain(),this.Lb=b.createGain(),this.gh=
b.createChannelMerger(2),this.wa||this.source.connect(this.Pd),this.Pd.connect(this.ub,0),this.Pd.connect(this.Jb,0),this.Pd.connect(this.Kb,1),this.Pd.connect(this.Lb,1),this.ub.connect(this.gh,0,0),this.Jb.connect(this.gh,0,1),this.Kb.connect(this.gh,0,0),this.Lb.connect(this.gh,0,1),this.gh.connect(b.destination),1==this.Hj&&this.Yp()):7!=this.mode&&(this.Ib=b.createGain(),this.wa||this.source.connect(this.Ib),this.Ib.connect(b.destination)))};a.prototype.Yp=function(){1!=this.Hj||this.Ld||!this.Pd||
2!=this.mode&&3!=this.mode&&5!=this.mode||(this.Pd.connect(this.Kb,0),this.Pd.connect(this.Lb,0))};a.prototype.si=function(){var b=this.o.ra;this.Ma||this.Ol||(this.ub?(this.ub.gain.setValueAtTime(this.$c,b.currentTime),this.Lb.gain.setValueAtTime(this.cd,b.currentTime),this.Jb.gain.setValueAtTime(this.ad,b.currentTime),this.Kb.gain.setValueAtTime(this.bd,b.currentTime)):this.Ib&&this.Ib.gain.setValueAtTime((this.$c+this.cd)/2,b.currentTime+1))};a.prototype.eu=function(b){var c=this.o.ra;(-1==b?this.muted:
1!=b)?this.muted&&(this.muted=this.j.muted=!1,this instanceof f||this.o.Yd(this.id)):this.o.isPlaying(this.id)&&(this.muted=this.j.muted=!0,this.ub?(this.ub.gain.setValueAtTime(0,c.currentTime+1),this.Lb.gain.setValueAtTime(0,c.currentTime+1),this.Jb.gain.setValueAtTime(0,c.currentTime+1),this.Kb.gain.setValueAtTime(0,c.currentTime+1)):this.Ib&&this.Ib.gain.setValueAtTime(0,c.currentTime+1),this instanceof f||this.o.ei(this.id))};a.prototype.ik=function(){if(!this.Ld||4==this.mode||6==this.mode){var b=
this.o,c=this.o.ra;if((this.j||this.wa)&&!this.muted){var h,m=this.pan-b.pan.m;for(h=this.u-b.u.m;-180>m;)m+=360;for(;180<m;)m-=360;var n=this.Cc,q=this.ej;0==q&&(q=.01);0>q&&(q=b.fov.m);this.hc||(this.hc=new y.Ta,this.hc.Kn(this.pan,this.u));0!=this.mode&&1!=this.mode||!c||this.Ib&&this.Ib.gain.setValueAtTime(this.level*b.ba*this.va,c.currentTime);if(2==this.mode&&c){var r=.5*Math.cos(m*Math.PI/180)+.5;this.$c=Math.sqrt(r)*this.va*this.level*b.ba;this.cd=Math.sqrt(r)*this.va*this.level*b.ba;this.ad=
Math.sqrt(1-r)*this.va*this.level*b.ba;this.bd=Math.sqrt(1-r)*this.va*this.level*b.ba;this.si()}if(3==this.mode){m=0>m?m<-this.Cb?m+this.Cb:0:m>this.Cb?m-this.Cb:0;var t=this.level;h=Math.abs(h);h=h<this.Lg?0:h-this.Lg;var x=1-h/q;if(Math.abs(m)>q||0>x)r=t*n*b.ba,c?(this.$c=r*this.va,this.cd=r*this.va,this.bd=this.ad=0,this.si()):this.j.volume=t*n*b.ba;else if(r=1-Math.abs(m/q),c){var z=t*(n+(1-n)*x*r)*b.ba;r=t*n*b.ba;0<=m?(this.$c=z*this.va,this.cd=r*this.va):(this.$c=r*this.va,this.cd=z*this.va);
2*Math.abs(m)<q?(r=1-Math.abs(2*m)/q,z=t*(n+(1-n)*x*r)*b.ba,r=.5*t*(1-n)*x*(1-r)*b.ba,0<=m?(this.cd=z*this.va,this.bd=r*this.va,this.ad=0):(this.$c=z*this.va,this.ad=r*this.va,this.bd=0)):(r=1-(Math.abs(2*m)-q)/q,z=.5*t*(1-n)*x*r*b.ba,0<=m?(this.bd=z*this.va,this.ad=0):(this.ad=z*this.va,this.bd=0));this.si()}else this.j.volume=t*(n+(1-n)*x*r)*b.ba}4==this.mode&&(Math.abs(m)<this.Cb&&Math.abs(h)<this.Lg?this.Mg||(this.Mg=!0,this.sb=this.loop-1,b.re||(this.j.play(),this.Ld&&this.Of())):this.Mg=!1);
5==this.mode&&(h=180*Math.acos(b.Nk.Nj(this.hc))/Math.PI,h<this.Cb?c?(this.$c=this.level*b.ba*this.va,this.cd=this.level*b.ba*this.va,this.bd=this.ad=0,this.si()):this.j.volume=this.level*b.ba:c?(h<this.Cb+q?(m=0>m?m>-this.Cb?0:m+this.Cb:m<this.Cb?0:m-this.Cb,z=1-Math.max(h-this.Cb,0)/q,r=Math.max(1-Math.abs(m)*Math.cos(this.u*Math.PI/180)/q,0),0<m?(this.$c=this.level*(z*(1-this.Cc)+this.Cc)*b.ba*this.va,this.cd=this.level*(z*r*(1-this.Cc)+this.Cc)*b.ba*this.va,this.ad=0,this.bd=this.level*z*(1-r)*
b.ba*this.va):(this.$c=this.level*(z*r*(1-this.Cc)+this.Cc)*b.ba*this.va,this.cd=this.level*(z*(1-this.Cc)+this.Cc)*b.ba*this.va,this.ad=this.level*z*(1-r)*b.ba*this.va,this.bd=0)):(z=this.level*this.Cc*b.ba,this.$c=z*this.va,this.cd=z*this.va,this.bd=this.ad=0),this.si()):(h-=this.Cb,h<q&&0<q?(r=1-Math.abs(h/q),this.j.volume=this.level*(n+(1-n)*r)*b.ba):this.j.volume=n*b.ba));6==this.mode&&(h=180*Math.acos(b.Nk.Nj(this.hc))/Math.PI,Math.abs(h)<this.Cb?this.Mg||(this.Mg=!0,this.sb=this.loop-1,this.wa?
this.vg||this.ne():this.j.play()):this.Mg=!1)}}};a.prototype.gr=function(){var b=this;b.jc=this.o.ra.createBufferSource();b.jc.addEventListener("ended",function(){b.Op()},!1);2==b.mode||3==b.mode||5==b.mode?b.jc.connect(b.Pd):b.jc.connect(b.Ib)};a.prototype.ne=function(){var b=this.o.ra,c=this.zf;this.Ri?(null==this.jc&&(this.gr(),this.jc.buffer=this.Ri),this.Ai=b.currentTime-c,this.zf=0,this.vg=!0,this.stopped=!1,this.jc.start(0,c),this.o.O("buffer Source started")):(this.o.O("bufferSoundPlay() -> no audio buffer -> playWhenReady"),
this.Kt=!0)};a.prototype.yk=function(){var b=this.o.ra.currentTime-this.Ai;this.Tf();this.zf=b};a.prototype.Tf=function(){this.jc&&this.vg&&(this.stopped=!0,this.jc.disconnect(),this.jc.stop(0),this.jc=null);this.Ai=this.zf=0;this.vg=!1};a.prototype.Vq=function(){var b=this.o.ra;return this.zf?this.zf:this.Ai?b.currentTime-this.Ai:0};a.prototype.Wq=function(b){this.Tf();this.zf=b;this.ne()};a.prototype.addElement=function(){var b=-1,c=this,h=this.o,m=this.o.ra;try{for(var n=!1,q=0;q<h.X.length;q++)h.X[q].id==
c.id&&(b=q,null==h.X[q].j&&!h.X[q].wa||h.X[q].url.join()!=c.url.join()||h.X[q].loop!=c.loop||h.X[q].mode!=c.mode||(n=!0,h.X[q].pan=c.pan,h.X[q].u=c.u,h.X[q].level=c.level,h.X[q].Cc=c.Cc,h.X[q].ej=c.ej,h.X[q].Cb=c.Cb,h.X[q].Lg=c.Lg));if(n)h.O("Keep playing "+c.id);else{if(0<=b){var r=h.X[b];if(null!=r.j||r.wa)if(m&&h.Ya.enabled)h.Ya.Gi.push(r),1!=h.D.da&&2!=h.D.da&&6!=h.D.da&&h.Ya.Fn(r);else{try{r.wa?r.yk():r.j.pause()}catch(x){h.O(x)}try{r.Le()}catch(x){h.O(x)}}}m&&(this.Ld=!0);c.j=document.createElement("audio");
c.j.crossOrigin=h.crossOrigin;c.j.setAttribute("class","ggmedia");h.Be&&c.j.setAttribute("id",h.Be+c.id);for(q=0;q<c.url.length;q++)n=void 0,n=document.createElement("source"),""!=c.url[q]&&"#"!=c.url[q]&&(n.crossOrigin=h.crossOrigin,n.setAttribute("src",h.fb(h.ab(c.url[q]))),c.j.appendChild(n));c.j.volume=c.level*h.ba;if(0<c.j.childNodes.length&&(h.$.appendChild(c.j),c.j.addEventListener("ended",function(){c.Op()},!1),m)){c.Wk=!1;0==c.loop&&c.source&&c.source.mediaElement&&(c.source.mediaElement.loop=
!0);var t=new XMLHttpRequest;t.open("GET",h.fb(c.url[0]),!0);t.responseType="arraybuffer";t.onload=function(){m.decodeAudioData(t.response,function(x){c.Hj=x.numberOfChannels;1==c.Hj&&c.Yp()})};t.send()}1<=c.loop&&(c.sb=c.loop-1);0<=b?h.X[b]=c:h.X.push(c);c.ik();this.o.pd||(1!=c.mode&&2!=c.mode&&3!=c.mode&&5!=c.mode||!(0<=c.loop)||m&&h.Ya.enabled||(c.wa||(c.j.autoplay=!0,c.Cm()),c.autoplay=!0),0==c.mode&&0<=c.loop&&(c.autoplay=!0,c.Cm()))}}catch(x){this.o.O(x)}};a.prototype.Od=function(){var b=this.o.isPlaying(this.id);
b&&this.o.ei(this.id);for(var c=0,h=0;h<this.j.children.length&&!(this.url.length<=c);h++){var m=this.j.children[h];"SOURCE"==m.nodeName&&(m.setAttribute("src",this.o.fb(this.o.ab(this.url[c]))),c++)}this.j.load();b&&this.o.Yd(this.id)};a.prototype.Le=function(){try{this.o.O("Remove Snd:"+this.id),this.wa||(this.o.$.removeChild(this.j),this.j=null)}catch(b){this.o.O(b)}};a.prototype.xb=function(b){e.prototype.xb.call(this,b);var c;(c=b.getAttributeNode("url"))&&this.url.push(c.nodeValue.toString());
if(c=b.getAttributeNode("level"))this.level=Number(c.nodeValue);if(c=b.getAttributeNode("loop"))this.loop=Number(c.nodeValue);if(c=b.getAttributeNode("mode"))this.mode=Number(c.nodeValue);if(c=b.getAttributeNode("nodechangekeep"))this.Wo=1==Number(c.nodeValue);if(c=b.getAttributeNode("field"))this.ej=Number(c.nodeValue);if(c=b.getAttributeNode("ambientlevel"))this.Cc=Number(c.nodeValue);if(c=b.getAttributeNode("pansize"))this.Cb=Number(c.nodeValue);if(c=b.getAttributeNode("tiltsize"))this.Lg=Number(c.nodeValue);
for(b=b.firstChild;b;)"source"==b.nodeName&&(c=b.getAttributeNode("url"))&&this.url.push(c.nodeValue.toString()),b=b.nextSibling};return a}(w);y.Eq=v;var f=function(e){function a(b){b=e.call(this,b)||this;b.poster="";b.Ja=0;b.Na=0;b.yb=0;b.fov=50;b.Ca=0;b.Kj=0;b.qf=!1;b.lg=!1;return b}__extends(a,e);a.prototype.xe=function(){1!=this.Ca&&4!=this.Ca||this.mf(!this.Ma);2==this.Ca&&this.o.hp(this.id)};a.prototype.mf=function(b){var c=this.o,h=c.ra;if(1==this.Ca||4==this.Ca){if(this.Ma=b)this.j.style.pointerEvents=
"auto",this.j.style.cursor="pointer",this.j.style.zIndex=(c.Mf+8E4).toString(),this.j.style[this.o.Zb]="all 1s ease 0s",this.j.muted=!1,this.o.isPlaying(this.id)||c.Yd(this.id);else{this.j.style.pointerEvents="none";this.j.style.cursor="default";this.j.style.zIndex=c.Mf.toString();this.j.style[this.o.Zb]="all 1s ease 0s";this.o.isPlaying(this.id)&&(0==this.Kj?c.$j(this.id):2==this.Kj&&(this.j.muted=!0));this.Ol=!0;var m=this;setTimeout(function(){m.Ol=!1},1E3)}if(h&&(2==this.mode||3==this.mode||5==
this.mode)&&(h=h.currentTime,this.ub&&this.Lb&&this.Jb.gain&&this.Jb&&this.Kb)){var n=this.ub.gain.value,q=this.Lb.gain.value,r=this.Jb.gain.value,t=this.Kb.gain.value;this.Ma?(this.ub.gain.linearRampToValueAtTime(n,h),this.ub.gain.linearRampToValueAtTime(this.level*c.ba,h+1),this.Lb.gain.linearRampToValueAtTime(q,h),this.Lb.gain.linearRampToValueAtTime(this.level*c.ba,h+1),this.Jb.gain.linearRampToValueAtTime(r,h),this.Jb.gain.linearRampToValueAtTime(0,h+1),this.Kb.gain.linearRampToValueAtTime(t,
h),this.Kb.gain.linearRampToValueAtTime(0,h+1)):(this.ub.gain.linearRampToValueAtTime(n,h),this.ub.gain.linearRampToValueAtTime(this.$c,h+1),this.Lb.gain.linearRampToValueAtTime(q,h),this.Lb.gain.linearRampToValueAtTime(this.cd,h+1),this.Jb.gain.linearRampToValueAtTime(r,h),this.Jb.gain.linearRampToValueAtTime(this.ad,h+1),this.Kb.gain.linearRampToValueAtTime(t,h),this.Kb.gain.linearRampToValueAtTime(this.bd,h+1))}this.ve=!0;this.o.jq()}2==this.Ca&&(b?this.o.Yd(this.id):this.o.ei(this.id))};a.prototype.ye=
function(){this.ve=!1;this.j.style[this.o.Zb]="none"};a.prototype.hv=function(){0==this.loop?this.j.play():0<this.sb?(this.sb--,this.j.currentTime=0,this.j.play()):this.isRunning=!1};a.prototype.xb=function(b){e.prototype.xb.call(this,b);var c;if(c=b.getAttributeNode("poster"))this.poster=String(c.nodeValue);if(c=b.getAttributeNode("maskimage"))this.md=String(c.nodeValue);if(c=b.getAttributeNode("rotx"))this.Ja=Number(c.nodeValue);if(c=b.getAttributeNode("roty"))this.Na=Number(c.nodeValue);if(c=b.getAttributeNode("rotz"))this.yb=
Number(c.nodeValue);if(c=b.getAttributeNode("fov"))this.fov=Number(c.nodeValue);if(c=b.getAttributeNode("width"))this.pc=Number(c.nodeValue);if(c=b.getAttributeNode("height"))this.Pc=Number(c.nodeValue);this.Ic=(c=b.getAttributeNode("stretch"))?Number(c.nodeValue):1;if(c=b.getAttributeNode("clickmode"))this.Ca=Number(c.nodeValue);if(c=b.getAttributeNode("popbackmode"))this.Kj=Number(c.nodeValue);if(c=b.getAttributeNode("handcursor"))this.lg=1==Number(c.nodeValue);if(c=b.getAttributeNode("startmutedmobile"))this.Tp=
1==Number(c.nodeValue)};a.prototype.addElement=function(){var b=this,c=this.o,h=this.o.ra;try{b.j=document.createElement("video");b.j.setAttribute("class","ggmedia");b.j.crossOrigin=c.crossOrigin;b.j.hidden=!0;b.j.addEventListener("click",function(q){q.stopPropagation()});c.Be&&b.j.setAttribute("id",c.Be+b.id);if(c.Ji)b.j.setAttribute("playsinline","playsinline"),b.j.setAttribute("style","display: none; max-width:none;");else if(b.j.setAttribute("style","max-width:none;pointer-events:none;"),b.j.setAttribute("playsinline",
"playsinline"),1==b.Ca||4==b.Ca)b.j.addEventListener(c.Pm(),function(){b.ye()},!1),b.j.addEventListener("transitionend",function(){b.ye()},!1);var m=void 0;for(m=0;m<b.url.length;m++){var n=void 0;n=document.createElement("source");n.crossOrigin=c.crossOrigin;n.setAttribute("src",c.fb(c.ab(b.url[m])));b.j.appendChild(n)}""!=b.poster&&(b.j.poster=c.fb(c.ab(b.poster)),0>b.loop&&(b.j.preload="none"));b.md&&""!=b.md&&(b.j.style.md="url('"+c.fb(b.md)+"')",b.j.style.webkitMaskImage="url('"+c.fb(b.md)+"')",
b.j.style.maskSize="100% 100%",b.j.style.webkitMaskSize="100% 100%");b.j.volume=b.level*c.ba;1<=b.loop&&(b.sb=b.loop-1);h&&(this.Ld=!0);(1==b.mode||2==b.mode||3==b.mode||5==b.mode)&&0<=b.loop&&(b.j.autoplay=!0,b.isRunning=!0,b.autoplay=!0,this.o.pd&&(b.j.muted=!0),b.Cm());c.U.push(this);c.Ji?c.$.appendChild(b.j):(b.j.style.position="absolute",b.pc&&(b.j.width=b.pc),b.Pc&&(b.j.height=b.Pc),c.ea.appendChild(b.j));b.j.addEventListener("ended",function(){b.hv()},!1)}catch(q){c.O(q)}};a.prototype.Od=function(){this.j.poster=
this.o.fb(this.o.ab(this.poster));e.prototype.Od.call(this)};a.prototype.registerElement=function(b,c){this.nd=!0;this.j=c;this.id=b;this.level=1;this.o.U.push(this)};a.prototype.Le=function(){var b=this.o;b.Ji&&(b.R.deleteTexture(this.texture),this.texture=0);this.j.parentNode&&this.j.parentNode.removeChild(this.j);this.j=null};return a}(v);y.Vm=f;v=function(e){function a(b){b=e.call(this,b)||this;b.url="";b.Ja=0;b.Na=0;b.yb=0;b.fov=50;b.Ca=0;b.lg=!1;b.pc=100;b.Pc=100;b.Ic=1;return b}__extends(a,
e);a.prototype.xb=function(b){e.prototype.xb.call(this,b);var c;if(c=b.getAttributeNode("url"))this.url=c.nodeValue.toString();if(c=b.getAttributeNode("maskimage"))this.md=String(c.nodeValue);if(c=b.getAttributeNode("rotx"))this.Ja=Number(c.nodeValue);if(c=b.getAttributeNode("roty"))this.Na=Number(c.nodeValue);if(c=b.getAttributeNode("rotz"))this.yb=Number(c.nodeValue);if(c=b.getAttributeNode("fov"))this.fov=Number(c.nodeValue);if(c=b.getAttributeNode("width"))this.pc=Number(c.nodeValue);if(c=b.getAttributeNode("height"))this.Pc=
Number(c.nodeValue);this.Ic=(c=b.getAttributeNode("stretch"))?Number(c.nodeValue):1;if(c=b.getAttributeNode("clickmode"))this.Ca=Number(c.nodeValue);if(c=b.getAttributeNode("hidepinned"))this.qf=1==Number(c.nodeValue);if(c=b.getAttributeNode("handcursor"))this.lg=1==Number(c.nodeValue);for(b=b.firstChild;b;)"source"==b.nodeName&&(c=b.getAttributeNode("url"))&&(this.url=c.nodeValue.toString()),b=b.nextSibling};a.prototype.ye=function(){this.ve=!1;this.j.style[this.o.Zb]="none";this.qf&&!this.Ma&&(this.j.style.visibility=
"hidden")};a.prototype.xe=function(){1!==this.Ca&&4!==this.Ca||this.mf(!this.Ma)};a.prototype.mf=function(b){var c=this.o;if(1===this.Ca||4===this.Ca)this.Ma=b,this.qf&&(this.j.style.visibility="visible",this.j.style.opacity=this.Ma?"0.0":"1.0"),this.Ma?(this.j.style.pointerEvents="auto",this.j.style.cursor="pointer",this.j.style.zIndex=(c.Mf+8E4).toString(),this.j.style[c.Zb]="all 1s ease 0s",this.j.style.opacity="1.0"):(this.j.style.pointerEvents="none",this.j.style.cursor="default",this.j.style.zIndex=
c.Mf.toString(),this.j.style[c.Zb]="all 1s ease 0s",this.qf&&(this.j.style.opacity="0.0")),this.ve=!0,c.Em()};a.prototype.addElement=function(){var b=this,c=this.o;try{b.j=document.createElement("img");b.j.setAttribute("style","-webkit-user-drag:none; max-width:none; pointer-events:none;");b.j.setAttribute("class","ggmedia");b.j.hidden=!0;b.j.addEventListener("click",function(h){h.stopPropagation()});c.Be&&b.j.setAttribute("id",c.Be+b.id);b.j.ondragstart=function(){return!1};if(1===b.Ca||4===b.Ca)b.j.addEventListener(c.Pm(),
function(){b.ye()},!1),b.j.addEventListener("transitionend",function(){b.ye()},!1);b.j.setAttribute("src",c.fb(c.ab(b.url)));b.pc&&(b.j.width=b.pc);b.Pc&&(b.j.height=b.Pc);c.Wa.push(b);b.j.style.position="absolute";b.md&&""!=b.md&&(b.j.style.md="url('"+c.fb(b.md)+"')",b.j.style.webkitMaskImage="url('"+c.fb(b.md)+"')",b.j.style.maskSize="100% 100%",b.j.style.webkitMaskSize="100% 100%");c.ea.appendChild(b.j)}catch(h){c.O("Error addimage:"+h)}};a.prototype.Od=function(){this.j.setAttribute("src",this.o.fb(this.o.ab(this.url)))};
return a}(w);y.Cq=v;v=function(e){function a(b){b=e.call(this,b)||this;b.code="";return b}__extends(a,e);a.prototype.xb=function(b){e.prototype.xb.call(this,b);var c;if(c=b.getAttributeNode("rotx"))this.Ja=Number(c.nodeValue);if(c=b.getAttributeNode("roty"))this.Na=Number(c.nodeValue);if(c=b.getAttributeNode("rotz"))this.yb=Number(c.nodeValue);if(c=b.getAttributeNode("fov"))this.fov=Number(c.nodeValue);if(c=b.getAttributeNode("width"))this.pc=Number(c.nodeValue);if(c=b.getAttributeNode("height"))this.Pc=
Number(c.nodeValue);this.Ic=(c=b.getAttributeNode("stretch"))?Number(c.nodeValue):1;if(c=b.getAttributeNode("clickmode"))this.Ca=Number(c.nodeValue);if(c=b.getAttributeNode("handcursor"))this.lg=1==Number(c.nodeValue);if(c=b.getAttributeNode("code"))this.code=c.nodeValue.toString()};a.prototype.ye=function(){this.ve=!1;this.j.style[this.o.Zb]="none"};a.prototype.xe=function(){1!==this.Ca&&4!==this.Ca||this.mf(!this.Ma)};a.prototype.mf=function(b){var c=this.o;if(1===this.Ca||4===this.Ca)this.Ma=b,
this.qf&&(this.j.style.visibility="visible",this.j.style.opacity=this.Ma?"0.0":"1.0"),this.Ma?(this.j.style.cursor="pointer",this.j.style.zIndex=(c.Mf+8E4).toString(),this.j.style[c.Zb]="all 1s ease 0s",this.j.style.opacity="1.0"):(this.j.style.cursor="default",this.j.style.zIndex=c.Mf.toString(),this.j.style[c.Zb]="all 1s ease 0s"),this.ve=!0,c.Em()};a.prototype.addElement=function(){var b=this,c=this.o;try{b.j=document.createElement("div");this.gq();b.j.setAttribute("style","max-width:none;");b.j.setAttribute("class",
"ggmedia");c.Be&&b.j.setAttribute("id",c.Be+b.id);if(1===b.Ca||4===b.Ca)b.j.addEventListener(c.Pm(),function(){b.ye()},!1),b.j.addEventListener("transitionend",function(){b.ye()},!1);c.Sb.push(b);b.j.style.position="absolute";0==b.Ca?c.Ia.insertBefore(b.j,c.Ia.firstChild):c.ea.appendChild(b.j)}catch(h){c.O("Error addwebelement:"+h)}};a.prototype.gq=function(){var b=this.j.innerHTML,c=this.o.ab(this.code);c!=b&&(this.j.innerHTML=c)};a.prototype.Od=function(){this.gq()};return a}(w);y.Fq=v;w=function(e){function a(b){b=
e.call(this,b)||this;b.fn=50;b.alpha=50;b.type=0;b.color=16777215;return b}__extends(a,e);a.prototype.xb=function(b){e.prototype.xb.call(this,b);var c;if(c=b.getAttributeNode("blinding"))this.fn=Number(c.nodeValue);if(c=b.getAttributeNode("alpha"))this.alpha=Number(c.nodeValue);if(c=b.getAttributeNode("type"))this.type=Number(c.nodeValue);if(c=b.getAttributeNode("color"))this.color=1*Number(c.nodeValue)};return a}(w);y.Dq=w;w=function(){function e(a){this.o=a;this.type="empty";this.om=this.id=this.target=
this.description=this.title=this.url="";this.w=100;this.h=20;this.nk=!1;this.j=null;this.Sl=this.Rl=this.Pb=this.cc=this.jb=this.Da=this.distance=this.u=this.pan=0;this.visible=!0;this.Wb=a.K.Wb;this.Ub=a.K.Ub;this.Vb=a.K.Vb;this.Tb=a.K.Tb;this.ze=a.K.ze;this.gd="";this.xd=this.df=0;this.Jf=!1;this.aj=0;this.vertices=[]}e.prototype.bg=function(){this.id=this.id;this.pan=this.pan;this.tilt=this.u;this.url=this.url;this.target=this.target;this.title=this.title;this.distance=this.distance;this.description=
this.description;this.skinid=this.om;this.obj=this.j;this.customimage=this.gd;this.customimagewidth=this.df;this.customimageheight=this.xd;this.use3D=this.Jf;this.distance3D=this.aj;this.j&&this.j.__div&&(this.div=this.j.__div)};e.prototype.Ou=function(){var a=this.url;return"{"==a.charAt(0)?a.substr(1,a.length-2):!1};e.prototype.xb=function(a){var b;if(b=a.getAttributeNode("url"))this.url=b.nodeValue.toString();if(b=a.getAttributeNode("target"))this.target=b.nodeValue.toString();if(b=a.getAttributeNode("title"))this.title=
b.nodeValue.toString();if(b=a.getAttributeNode("description"))this.description=b.nodeValue.toString();if(b=a.getAttributeNode("id"))this.id=b.nodeValue.toString();if(b=a.getAttributeNode("skinid"))this.om=b.nodeValue.toString();if(b=a.getAttributeNode("width"))this.w=Number(b.nodeValue);if(b=a.getAttributeNode("height"))this.h=Number(b.nodeValue);if(b=a.getAttributeNode("wordwrap"))this.nk=1==Number(b.nodeValue);b=a.getAttributeNode("pan");this.pan=1*(b?Number(b.nodeValue):0);b=a.getAttributeNode("tilt");
this.u=1*(b?Number(b.nodeValue):0);b=a.getAttributeNode("fov");this.fov=1*(b?Number(b.nodeValue):0);b=a.getAttributeNode("distance");this.distance=1*(b?Number(b.nodeValue):0);if(b=a.getAttributeNode("bordercolor"))this.Wb=1*Number(b.nodeValue);if(b=a.getAttributeNode("backgroundcolor"))this.Ub=1*Number(b.nodeValue);if(b=a.getAttributeNode("borderalpha"))this.Vb=1*Number(b.nodeValue);if(b=a.getAttributeNode("backgroundalpha"))this.Tb=1*Number(b.nodeValue);if(b=a.getAttributeNode("handcursor"))this.ze=
1==Number(b.nodeValue);if(b=a.getAttributeNode("customimage"))this.gd=this.o.Vn()+b.nodeValue;if(b=a.getAttributeNode("customimagewidth"))this.df=Number(b.nodeValue);if(b=a.getAttributeNode("customimageheight"))this.xd=Number(b.nodeValue);if(b=a.getAttributeNode("use3D"))this.Jf=1==Number(b.nodeValue);if(b=a.getAttributeNode("distance3D"))this.aj=Number(b.nodeValue);for(a=a.firstChild;a;){if("polystring"==a.nodeName){b=a.textContent.toString().split("|");for(var c=0;c<b.length;c++){var h=b[c].split("/");
if(2==h.length){var m={pan:0,u:0};m.pan=Number(h[0]);m.u=Number(h[1]);this.vertices.push(m)}}}"vertex"==a.nodeName&&(m={pan:0,u:0},b=a.getAttributeNode("pan"),m.pan=1*(b?Number(b.nodeValue):0),b=a.getAttributeNode("tilt"),m.u=1*(b?Number(b.nodeValue):0),this.vertices.push(m));a=a.nextSibling}this.bg()};return e}();y.Mi=w})(ggP2VR||(ggP2VR={}));
(function(y){var w=function(){function v(f,e){this.x=f;this.y=e}v.prototype.init=function(f,e){this.x=f;this.y=e};v.prototype.Td=function(f,e,a){var b=e.y-f.y;this.x=f.x+(e.x-f.x)*a;this.y=f.y+b*a};v.prototype.Uq=function(f,e,a,b,c){var h=new v;h.Td(f,a,c);f=new v;f.Td(a,b,c);a=new v;a.Td(b,e,c);e=new v;e.Td(h,f,c);h=new v;h.Td(f,a,c);f=new v;f.Td(e,h,c);this.x=f.x;this.y=f.y};v.prototype.wk=function(f,e,a,b,c){var h=new v,m=.5,n=.25;do{h.Uq(f,e,a,b,m);var q=h.x-c;m=0<q?m-n:m+n;n/=2}while(.01<Math.abs(q));
this.x=h.x;this.y=h.y};return v}();y.Mc=w})(ggP2VR||(ggP2VR={}));
(function(y){var w=function(){function v(f,e,a,b,c){this.x=f;this.y=e;this.z=a;this.Kd=b;this.hc=c}v.prototype.init=function(f,e,a,b,c){this.x=f;this.y=e;this.z=a;this.Kd=b;this.hc=c};v.prototype.toString=function(){return"("+this.x+","+this.y+","+this.z+") - ("+this.Kd+","+this.hc+")"};v.prototype.Ja=function(f){var e=Math.sin(f);f=Math.cos(f);var a=this.y,b=this.z;this.y=f*a-e*b;this.z=e*a+f*b};v.prototype.Tt=function(){var f=this.y;this.y=-this.z;this.z=f};v.prototype.St=function(){var f=this.y;
this.y=this.z;this.z=-f};v.prototype.Na=function(f){var e=Math.sin(f);f=Math.cos(f);var a=this.x,b=this.z;this.x=f*a+e*b;this.z=-e*a+f*b};v.prototype.Ut=function(){var f=this.x;this.x=-this.z;this.z=f};v.prototype.yb=function(f){var e=Math.sin(f);f=Math.cos(f);var a=this.x,b=this.y;this.x=f*a-e*b;this.y=e*a+f*b};v.prototype.wp=function(){var f=this.x;this.x=-this.y;this.y=f};v.prototype.$d=function(f){this.Ja(f*Math.PI/180)};v.prototype.Ef=function(f){this.Na(f*Math.PI/180)};v.prototype.Ff=function(f){this.yb(f*
Math.PI/180)};v.prototype.clone=function(){return new v(this.x,this.y,this.z,this.Kd,this.hc)};v.prototype.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)};v.prototype.normalize=function(){var f=this.length();0<f&&(f=1/f,this.x*=f,this.y*=f,this.z*=f)};v.prototype.Nj=function(f){return this.x*f.x+this.y*f.y+this.z*f.z};v.prototype.Kn=function(f,e){var a=Math.cos(e*Math.PI/180);this.x=a*Math.sin(f*Math.PI/180);this.y=Math.sin(e*Math.PI/180);this.z=a*Math.cos(f*Math.PI/
180)};v.prototype.Qq=function(){return 180*Math.atan2(-this.x,-this.z)/Math.PI};v.prototype.Rq=function(){return 180*Math.asin(this.y/this.length())/Math.PI};v.prototype.Td=function(f,e,a){this.x=f.x*a+e.x*(1-a);this.y=f.y*a+e.y*(1-a);this.z=f.z*a+e.z*(1-a);this.Kd=f.Kd*a+e.Kd*(1-a);this.hc=f.hc*a+e.hc*(1-a)};return v}();y.Ta=w})(ggP2VR||(ggP2VR={}));
(function(y){var w=function(){function v(){this.Bp()}v.prototype.Bp=function(){this.sc=1;this.Kc=this.tc=this.Ob=0;this.uc=1;this.vc=this.ac=this.Lc=0;this.bc=1};v.prototype.clone=function(f){this.sc=f.sc;this.Ob=f.Ob;this.tc=f.tc;this.Kc=f.Kc;this.uc=f.uc;this.Lc=f.Lc;this.ac=f.ac;this.vc=f.vc;this.bc=f.bc};v.prototype.mu=function(f){var e=Math.cos(f);f=Math.sin(f);this.sc=1;this.Kc=this.tc=this.Ob=0;this.uc=e;this.Lc=-f;this.ac=0;this.vc=f;this.bc=e};v.prototype.nu=function(f){var e=Math.cos(f);
f=Math.sin(f);this.sc=e;this.Ob=0;this.tc=f;this.Kc=0;this.uc=1;this.Lc=0;this.ac=-f;this.vc=0;this.bc=e};v.prototype.ou=function(f){var e=Math.cos(f);f=Math.sin(f);this.sc=e;this.Ob=-f;this.tc=0;this.Kc=f;this.uc=e;this.vc=this.ac=this.Lc=0;this.bc=1};v.prototype.ju=function(f){this.mu(f*Math.PI/180)};v.prototype.ku=function(f){this.nu(f*Math.PI/180)};v.prototype.lu=function(f){this.ou(f*Math.PI/180)};v.prototype.$d=function(f){this.ld||(this.ld=new v,this.Fe=new v);this.ld.ju(f);this.Fe.clone(this);
this.multiply(this.ld,this.Fe)};v.prototype.Ef=function(f){this.ld||(this.ld=new v,this.Fe=new v);this.ld.ku(f);this.Fe.clone(this);this.multiply(this.ld,this.Fe)};v.prototype.Ff=function(f){this.ld||(this.ld=new v,this.Fe=new v);this.ld.lu(f);this.Fe.clone(this);this.multiply(this.ld,this.Fe)};v.prototype.multiply=function(f,e){this.sc=f.sc*e.sc+f.Ob*e.Kc+f.tc*e.ac;this.Ob=f.sc*e.Ob+f.Ob*e.uc+f.tc*e.vc;this.tc=f.sc*e.tc+f.Ob*e.Lc+f.tc*e.bc;this.Kc=f.Kc*e.sc+f.uc*e.Kc+f.Lc*e.ac;this.uc=f.Kc*e.Ob+
f.uc*e.uc+f.Lc*e.vc;this.Lc=f.Kc*e.tc+f.uc*e.Lc+f.Lc*e.bc;this.ac=f.ac*e.sc+f.vc*e.Kc+f.bc*e.ac;this.vc=f.ac*e.Ob+f.vc*e.uc+f.bc*e.vc;this.bc=f.ac*e.tc+f.vc*e.Lc+f.bc*e.bc};v.prototype.it=function(f){var e=f.x;var a=f.y;var b=f.z;f.x=e*this.sc+a*this.Ob+b*this.tc;f.y=e*this.Kc+a*this.uc+b*this.Lc;f.z=e*this.ac+a*this.vc+b*this.bc};return v}();y.Sm=w})(ggP2VR||(ggP2VR={}));
(function(y){y.la={create:function(w){var v="undefined"!=typeof Float32Array?new Float32Array(16):Array(16);w&&(v[0]=w[0],v[1]=w[1],v[2]=w[2],v[3]=w[3],v[4]=w[4],v[5]=w[5],v[6]=w[6],v[7]=w[7],v[8]=w[8],v[9]=w[9],v[10]=w[10],v[11]=w[11],v[12]=w[12],v[13]=w[13],v[14]=w[14],v[15]=w[15]);return v},set:function(w,v){v[0]=w[0];v[1]=w[1];v[2]=w[2];v[3]=w[3];v[4]=w[4];v[5]=w[5];v[6]=w[6];v[7]=w[7];v[8]=w[8];v[9]=w[9];v[10]=w[10];v[11]=w[11];v[12]=w[12];v[13]=w[13];v[14]=w[14];v[15]=w[15];return v},identity:function(w){w[0]=
1;w[1]=0;w[2]=0;w[3]=0;w[4]=0;w[5]=1;w[6]=0;w[7]=0;w[8]=0;w[9]=0;w[10]=1;w[11]=0;w[12]=0;w[13]=0;w[14]=0;w[15]=1;return w},multiply:function(w,v,f){f||(f=w);var e=w[0],a=w[1],b=w[2],c=w[3],h=w[4],m=w[5],n=w[6],q=w[7],r=w[8],t=w[9],x=w[10],z=w[11],C=w[12],F=w[13],E=w[14];w=w[15];var D=v[0],A=v[1],G=v[2],J=v[3],H=v[4],I=v[5],M=v[6],K=v[7],O=v[8],R=v[9],U=v[10],V=v[11],W=v[12],X=v[13],Y=v[14];v=v[15];f[0]=D*e+A*h+G*r+J*C;f[1]=D*a+A*m+G*t+J*F;f[2]=D*b+A*n+G*x+J*E;f[3]=D*c+A*q+G*z+J*w;f[4]=H*e+I*h+M*r+
K*C;f[5]=H*a+I*m+M*t+K*F;f[6]=H*b+I*n+M*x+K*E;f[7]=H*c+I*q+M*z+K*w;f[8]=O*e+R*h+U*r+V*C;f[9]=O*a+R*m+U*t+V*F;f[10]=O*b+R*n+U*x+V*E;f[11]=O*c+R*q+U*z+V*w;f[12]=W*e+X*h+Y*r+v*C;f[13]=W*a+X*m+Y*t+v*F;f[14]=W*b+X*n+Y*x+v*E;f[15]=W*c+X*q+Y*z+v*w;return f},translate:function(w,v,f){var e=v[0],a=v[1];v=v[2];if(!f||w==f)return w[12]=w[0]*e+w[4]*a+w[8]*v+w[12],w[13]=w[1]*e+w[5]*a+w[9]*v+w[13],w[14]=w[2]*e+w[6]*a+w[10]*v+w[14],w[15]=w[3]*e+w[7]*a+w[11]*v+w[15],w;var b=w[0],c=w[1],h=w[2],m=w[3],n=w[4],q=w[5],
r=w[6],t=w[7],x=w[8],z=w[9],C=w[10],F=w[11];f[0]=b;f[1]=c;f[2]=h;f[3]=m;f[4]=n;f[5]=q;f[6]=r;f[7]=t;f[8]=x;f[9]=z;f[10]=C;f[11]=F;f[12]=b*e+n*a+x*v+w[12];f[13]=c*e+q*a+z*v+w[13];f[14]=h*e+r*a+C*v+w[14];f[15]=m*e+t*a+F*v+w[15];return f},scale:function(w,v,f){var e=v[0],a=v[1];v=v[2];if(!f||w==f)return w[0]*=e,w[1]*=e,w[2]*=e,w[3]*=e,w[4]*=a,w[5]*=a,w[6]*=a,w[7]*=a,w[8]*=v,w[9]*=v,w[10]*=v,w[11]*=v,w;f[0]=w[0]*e;f[1]=w[1]*e;f[2]=w[2]*e;f[3]=w[3]*e;f[4]=w[4]*a;f[5]=w[5]*a;f[6]=w[6]*a;f[7]=w[7]*a;f[8]=
w[8]*v;f[9]=w[9]*v;f[10]=w[10]*v;f[11]=w[11]*v;f[12]=w[12];f[13]=w[13];f[14]=w[14];f[15]=w[15];return f},rotate:function(w,v,f,e){var a=f[0],b=f[1];f=f[2];var c=Math.sqrt(a*a+b*b+f*f);if(!c)return null;1!=c&&(c=1/c,a*=c,b*=c,f*=c);var h=Math.sin(v),m=Math.cos(v),n=1-m;v=w[0];c=w[1];var q=w[2],r=w[3],t=w[4],x=w[5],z=w[6],C=w[7],F=w[8],E=w[9],D=w[10],A=w[11],G=a*a*n+m,J=b*a*n+f*h,H=f*a*n-b*h,I=a*b*n-f*h,M=b*b*n+m,K=f*b*n+a*h,O=a*f*n+b*h;a=b*f*n-a*h;b=f*f*n+m;e?w!=e&&(e[12]=w[12],e[13]=w[13],e[14]=w[14],
e[15]=w[15]):e=w;e[0]=v*G+t*J+F*H;e[1]=c*G+x*J+E*H;e[2]=q*G+z*J+D*H;e[3]=r*G+C*J+A*H;e[4]=v*I+t*M+F*K;e[5]=c*I+x*M+E*K;e[6]=q*I+z*M+D*K;e[7]=r*I+C*M+A*K;e[8]=v*O+t*a+F*b;e[9]=c*O+x*a+E*b;e[10]=q*O+z*a+D*b;e[11]=r*O+C*a+A*b;return e},ur:function(w,v,f,e,a,b,c){c||(c=y.la.create());var h=v-w,m=e-f,n=b-a;c[0]=2*a/h;c[1]=0;c[2]=0;c[3]=0;c[4]=0;c[5]=2*a/m;c[6]=0;c[7]=0;c[8]=(v+w)/h;c[9]=(e+f)/m;c[10]=-(b+a)/n;c[11]=-1;c[12]=0;c[13]=0;c[14]=-(b*a*2)/n;c[15]=0;return c},perspective:function(w,v,f,e,a){w=
f*Math.tan(w*Math.PI/360);v*=w;return y.la.ur(-v,v,-w,w,f,e,a)},zv:function(w,v,f,e,a,b,c){c||(c=y.la.create());var h=v-w,m=e-f,n=b-a;c[0]=2/h;c[1]=0;c[2]=0;c[3]=0;c[4]=0;c[5]=2/m;c[6]=0;c[7]=0;c[8]=0;c[9]=0;c[10]=-2/n;c[11]=0;c[12]=-(w+v)/h;c[13]=-(e+f)/m;c[14]=-(b+a)/n;c[15]=1;return c}}})(ggP2VR||(ggP2VR={}));
(function(y){var w=function(){function v(f){this.za=y.la.create();this.Bb=y.la.create();this.Sd=0;this.eb=[];this.Mh=!1;this.tm=this.Xk=this.Wl=1;this.Xf=1E6;this.Yi=[!1,!1,!1,!1,!1,!1];this.Xj=!1;this.Qk=[];this.rh=!1;this.Tm=8;this.Zs=new y.Sm;this.pe=[];this.o=f;this.N=f.N;if(f.Vd||f.Jh)f.N.zm=2}v.prototype.Ih=function(){var f=this.o.R;if(f){var e=f.createShader(f.FRAGMENT_SHADER);f.shaderSource(e,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nvarying vec2 vTextureCoord;\n\t\t\t\t\tuniform sampler2D uSampler;\n\t\t\t\t\tvoid main(void) {\n\t\t\t\t\t\tgl_FragColor = texture2D(uSampler, vec2(vTextureCoord.s, vTextureCoord.t));\n\t\t\t\t\t}");
f.compileShader(e);f.getShaderParameter(e,f.COMPILE_STATUS)||(console&&console.log(f.getShaderInfoLog(e)),alert(f.getShaderInfoLog(e)),e=null);var a=f.createShader(f.VERTEX_SHADER);this.jd(a,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nattribute vec3 aVertexPosition;\n\t\t\t\tattribute vec2 aTextureCoord;\n\t\t\t\tuniform mat4 uMVMatrix;\n\t\t\t\tuniform mat4 uPMatrix;\n\t\t\t\tuniform float uZoffset;\n\t\t\t\tvarying vec2 vTextureCoord;\n\t\t\t\tvoid main(void) {\n\t\t\t\t\tgl_Position = uPMatrix * uMVMatrix * vec4(aVertexPosition, 1.0);\n\t\t\t\t\tgl_Position.z += uZoffset;\n\t\t\t\t\tvTextureCoord = aTextureCoord;\n\t\t\t\t}");
this.P=f.createProgram();this.rg(this.P,a,e);this.P.ja=f.getAttribLocation(this.P,"aVertexPosition");f.enableVertexAttribArray(this.P.ja);this.P.Ka=f.getAttribLocation(this.P,"aTextureCoord");f.enableVertexAttribArray(this.P.Ka);this.P.He=f.getUniformLocation(this.P,"uPMatrix");this.P.ai=f.getUniformLocation(this.P,"uMVMatrix");this.P.yg=f.getUniformLocation(this.P,"uSampler");this.P.sk=f.getUniformLocation(this.P,"uZoffset");e=f.createShader(f.VERTEX_SHADER);this.jd(e,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nattribute vec3 aVertexPosition;\n\t\t\t\tuniform vec2 uCanvasDimensions;\n\t\t\t\tvoid main(void) {\n\t\t\t\t\tvec2 pointNorm = (aVertexPosition.xy / uCanvasDimensions) * 2.0 - vec2(1.0, 1.0);\n\t\t\t\t\tgl_Position = vec4(pointNorm.x, pointNorm.y * -1.0, 0.0, 1.0);\n\t\t\t\t}");
a=f.createShader(f.FRAGMENT_SHADER);this.jd(a,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nuniform vec3 uColor;\n\t\t\t\tuniform float uAlpha;\n\t\t\t\tvoid main(void) {\n\t\t\t\t\tgl_FragColor = vec4(uColor, uAlpha);\n\t\t\t\t}");this.Zd=f.createProgram();this.rg(this.Zd,e,a);this.Zd.ja=f.getAttribLocation(this.Zd,"aVertexPosition");f.enableVertexAttribArray(this.Zd.ja);a=f.createShader(f.VERTEX_SHADER);this.jd(a,"precision highp float;\n\t\t\t\tattribute vec3 aVertexPosition;\n\t\t\t\tvarying vec2 vTextureCoord;\n\t\t\t\tuniform vec2 uCanvasDimensions;\n\t\t\t\tuniform vec4 uRect;\n\t\t\t\tvoid main(void) {\n\t\t\t\t\tvec2 pos = vec2(uRect.x + uRect.z*aVertexPosition.x,uRect.y + uRect.w*aVertexPosition.y);\n\t\t\t\t\tvec2 pointNorm = (pos / uCanvasDimensions) * 2.0 - vec2(1.0, 1.0);\n\t\t\t\t\tgl_Position = vec4(pointNorm.x, pointNorm.y * -1.0, 1.0, 1.0);\n\t\t\t\t\tvTextureCoord.s=aVertexPosition.x;\n\t\t\t\t\tvTextureCoord.t=1.0-aVertexPosition.y;\n\t\t\t\t}");
e=f.createShader(f.FRAGMENT_SHADER);this.jd(e,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nvarying vec2 vTextureCoord;\n\t\t\t\tuniform sampler2D uSampler;\n\t\t\t\tvoid main(void) {\n\t\t\t\t\tgl_FragColor = texture2D(uSampler,vTextureCoord);\n\t\t\t\t}");this.vh=f.createProgram();this.rg(this.vh,a,e)}};v.prototype.rj=function(){var f=this.o,e=f.R;if(e){var a=e.createShader(e.FRAGMENT_SHADER);var b=this.il(13);this.jd(a,b);b=e.createShader(e.VERTEX_SHADER);
this.jd(b,"precision highp float;\nattribute vec3 aVertexPosition;\nuniform vec2 uCanvasDimensions;\nvarying vec2 dst;\nuniform vec2 dstSize;\nuniform float zOffset;\nvoid main(void) {\n vec2 pointNorm = (aVertexPosition.xy / uCanvasDimensions) * 2.0 - vec2(1.0, 1.0);\n gl_Position = vec4(pointNorm.x, pointNorm.y * -1.0, zOffset, 1.0);\n dst.x= -1.0 + 2.0*((aVertexPosition.x + 0.5) / uCanvasDimensions.x);\n dst.y= (-1.0 * uCanvasDimensions.y + 2.0*(aVertexPosition.y + 0.5)) / uCanvasDimensions.x;\n}\n");
this.np=e.createProgram();this.rg(this.np,b,a);a=e.createShader(e.FRAGMENT_SHADER);b=this.il(4);this.jd(a,b);b=e.createShader(e.VERTEX_SHADER);this.jd(b,"precision highp float;\nattribute vec3 aVertexPosition;\nuniform vec2 uCanvasDimensions;\nvarying vec2 dst;\nuniform vec2 dstSize;\nuniform float zOffset;\nvoid main(void) {\n vec2 pointNorm = (aVertexPosition.xy / uCanvasDimensions) * 2.0 - vec2(1.0, 1.0);\n gl_Position = vec4(pointNorm.x, pointNorm.y * -1.0, zOffset, 1.0);\n dst.x= -1.0 + 2.0*((aVertexPosition.x + 0.5) / uCanvasDimensions.x);\n dst.y= (-1.0 * uCanvasDimensions.y + 2.0*(aVertexPosition.y + 0.5)) / uCanvasDimensions.x;\n}\n");
this.op=e.createProgram();this.rg(this.op,b,a);a=e.createShader(e.FRAGMENT_SHADER);b=this.il(f.B.format);this.jd(a,b);b=e.createShader(e.VERTEX_SHADER);this.jd(b,"precision highp float;\nattribute vec3 aVertexPosition;\nuniform vec2 uCanvasDimensions;\nvarying vec2 dst;\nuniform vec2 dstSize;\nvoid main(void) {\n vec2 pointNorm = (aVertexPosition.xy / uCanvasDimensions) * 2.0 - vec2(1.0, 1.0);\n gl_Position = vec4(pointNorm.x, pointNorm.y * -1.0, 0.0, 1.0);\n dst.x= -1.0 + 2.0*((aVertexPosition.x + 0.5) / uCanvasDimensions.x);\n dst.y= (-1.0 * uCanvasDimensions.y + 2.0*(aVertexPosition.y + 0.5)) / uCanvasDimensions.x;\n}\n");
this.pp=e.createProgram();this.rg(this.pp,b,a);this.Pj||(this.Pj=e.createBuffer())}else this.o.O("No WebGL to initRemapShader!")};v.prototype.jd=function(f,e){var a=this.o.R;a.shaderSource(f,e);a.compileShader(f);a.getShaderParameter(f,a.COMPILE_STATUS)||(console&&console.log(a.getShaderInfoLog(f)),S&&alert(a.getShaderInfoLog(f)))};v.prototype.rg=function(f,e,a){var b=this.o.R;b.attachShader(f,e);b.attachShader(f,a);b.linkProgram(f);b.getProgramParameter(f,b.LINK_STATUS)||(alert("Could not initialise shader program"),
console&&console.log(b.getError()));b.useProgram(f)};v.prototype.il=function(f){var e=this.o;var a="#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\n#define M_PI 3.14159265358979323846\nvarying vec2 dst;\nuniform vec2 srcScale;\nuniform vec2 srcOffset;\nuniform float rectDstDistance;\nuniform float fisheyeDistance;\nuniform float stereoDistance;\nuniform float directionBlend;\nuniform mat4 matRotate; // = mat4( 1.0,0.0,0.0,0.0, 0.0,1.0,0.0,0.0, 0.0,0.0,1.0,0.0, 0.0,0.0,0.0,1.0 );\nconst float rectSrcDistance = 1.0;\nuniform vec2 tonemap;\n";
a=(13==f?a+"uniform samplerCube cubeTexture;":a+"uniform sampler2D tileTexture;\n")+"void main()\n{\n";a+="vec4 direction;\n";a+="vec2 src;\n";a+="vec2 srcCord;\n";a+="vec2 texc;\n";var b=this.po(e.Z());e.Z()!=e.Hc()&&0!=e.Hc()?(e=this.po(e.Hc()),a+="vec4 direction1,direction2;\n",a+=b.replace("direction=","direction1="),a+=e.replace("direction=","direction2="),a+="direction=normalize(mix(direction1, direction2,1.0-directionBlend));\n"):a+=b;a+="direction=direction*matRotate;\n";13==f&&(a+="direction.z=-direction.z;",
a+="gl_FragColor = textureCube(cubeTexture, direction.xyz);");4==f&&(a+="float iz=1.0/(direction.z * rectSrcDistance);\n",a+="src.x=-direction.x*iz;\n",a+="src.y= direction.y*iz;\n",a+="texc=src * srcScale + srcOffset;\n",a+="if (",a+="(direction.z<0.0) && ",a+="(texc.x>=0.0) && (texc.x<=1.0) && (texc.y>=0.0) && (texc.y<=1.0)) {\n",a=this.rh?a+" gl_FragColor = vec4(0.5,0.5,0,1);\n":a+"  gl_FragColor = texture2D(tileTexture, texc);\n",a+="} else {\n",a=this.rh?a+" gl_FragColor = vec4(0.5,0,0,0.3);\n":
a+"  discard;\n",a+="}\n");1==f&&(a+="src.x=atan(float(-direction.x), float(-direction.z));",a+="src.y=asin(direction.y);\n",a+="texc=src * srcScale + srcOffset;\n",a+="gl_FragColor = texture2D(tileTexture, texc);\n");14==f&&(a+="vec2 cf;\n",a+="if ((direction.z<0.0) && (direction.z<=-abs(direction.x)) && (direction.z<=-abs(direction.y))) {\n",a+="  src.x=-direction.x/direction.z;\n",a+="  src.y=+direction.y/direction.z;\n",a+="  cf.x=1.0;cf.y=3.0;\n",a+="}\n",a+="if ((direction.x>=0.0) && (direction.x>=abs(direction.y)) && (direction.x>=abs(direction.z))) {\n",
a+="  src.x=+direction.z/direction.x;\n",a+="  src.y=-direction.y/direction.x;\n",a+="  cf.x=3.0;cf.y=3.0;\n",a+="}\n",a+="if ((direction.z>=0.0) && (direction.z>=abs(direction.x)) && (direction.z>=abs(direction.y))) {\n",a+="  src.x=-direction.x/direction.z;\n",a+="  src.y=-direction.y/direction.z;\n",a+="  cf.x=5.0;cf.y=3.0;\n",a+="}\n",a+="if ((direction.x<=0.0) && (direction.x<=-abs(direction.y)) && (direction.x<=-abs(direction.z))) {\n",a+="  src.x=+direction.z/direction.x;\n",a+="  src.y=+direction.y/direction.x;\n",
a+="  cf.x=1.0;cf.y=1.0;\n",a+="}\n",a+="if ((direction.y>=0.0) && (direction.y>=abs(direction.x)) && (direction.y>=abs(direction.z))) {\n",a+="  src.x=+direction.x/direction.y;\n",a+="  src.y=-direction.z/direction.y;\n",a+="  cf.x=5.0;cf.y=1.0;\n",a+="}\n",a+="if ((direction.y<=0.0) && (direction.y<=-abs(direction.x)) && (direction.y<=-abs(direction.z))) {\n",a+="  src.x=-direction.x/direction.y;\n",a+="  src.y=-direction.z/direction.y;\n",a+="  cf.x=3.0;cf.y=1.0;\n",a+="}\n",a+="texc.x=(cf.x+src.x*srcScale.x) / 6.0;\n",
a+="texc.y=(cf.y+src.y*srcScale.y) / 4.0;\n",a+="gl_FragColor = texture2D(tileTexture, texc);\n");return a+="}\n"};v.prototype.po=function(f){var e="";switch(f){case 4:e+="direction.x=dst.x*rectDstDistance;\ndirection.y=dst.y*rectDstDistance;\ndirection.z=-1.0;\n";break;case 12:e+="float r,ph,ro;\nr=length(dst.xy)*0.5;\nro=atan(float(dst.x),float(-dst.y));\nph=r / fisheyeDistance;\ndirection.x= sin(ph) * sin(ro);\ndirection.y=-sin(ph) * cos(ro);\ndirection.z=-cos(ph);\n";break;case 9:e+="float n;\nvec2 ind;\nind=dst*stereoDistance;\nn=1.0 + ind.x*ind.x + ind.y*ind.y;\ndirection.x=2.0*ind.x/n;\ndirection.y=2.0*ind.y/n;\ndirection.z=(n-2.0)/n;\n"}return e+
"direction.w=0.0;\ndirection=normalize(direction);\n"};v.prototype.yo=function(f){var e,a,b=this.o,c=this.o.R;this.Mk=c.createBuffer();c.bindBuffer(c.ARRAY_BUFFER,this.Mk);var h=[-1,-1,1,1,-1,1,1,1,1,-1,1,1];for(e=0;12>e;e++)2>e%3&&(h[e]*=f);c.bufferData(c.ARRAY_BUFFER,new Float32Array(h),c.STATIC_DRAW);this.cf=c.createBuffer();c.bindBuffer(c.ARRAY_BUFFER,this.cf);var m=[1,0,0,0,0,1,1,1];c.bufferData(c.ARRAY_BUFFER,new Float32Array(m),c.STATIC_DRAW);this.wd=c.createBuffer();c.bindBuffer(c.ELEMENT_ARRAY_BUFFER,
this.wd);var n=[0,1,2,0,2,3];c.bufferData(c.ELEMENT_ARRAY_BUFFER,new Uint16Array(n),c.STATIC_DRAW);h=[];n=[];m=[];var q=new y.Ta;for(f=0;6>f;f++){var r=f%3;var t=3>f?1:0;for(a=0;4>a;a++){q.x=-1;q.y=-1;q.z=1;for(e=0;e<a;e++)q.wp();m.push((0>q.x?.33:0)+.33*r,(0>q.y?0:.5)+.5*t);if(4>f)for(e=0;e<f;e++)q.Ut();else 5==f?q.Tt():q.St();h.push(q.x,q.y,q.z)}e=4*f;n.push(0+e,1+e,2+e,0+e,2+e,3+e)}b.B.kk=c.createBuffer();c.bindBuffer(c.ARRAY_BUFFER,b.B.kk);c.bufferData(c.ARRAY_BUFFER,new Float32Array(h),c.STATIC_DRAW);
b.B.Ci=c.createBuffer();c.bindBuffer(c.ARRAY_BUFFER,b.B.Ci);c.bufferData(c.ARRAY_BUFFER,new Float32Array(m),c.STATIC_DRAW);b.B.qj=c.createBuffer();c.bindBuffer(c.ELEMENT_ARRAY_BUFFER,b.B.qj);c.bufferData(c.ELEMENT_ARRAY_BUFFER,new Uint16Array(n),c.STATIC_DRAW);this.Hs=c.createBuffer();this.Gs=c.createBuffer()};v.prototype.pl=function(f){var e=this;return function(){try{if(f.nt)return;var a=e.o.R;a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,1);var b=!1;null!=f.wf&&f.wf.complete?f.to||(a.bindTexture(a.TEXTURE_2D,
f),a.texImage2D(a.TEXTURE_2D,0,a.RGBA,a.RGBA,a.UNSIGNED_BYTE,f.wf),b=f.to=!0):null!=f.Bf&&f.Bf.complete&&(a.bindTexture(a.TEXTURE_2D,f),a.texImage2D(a.TEXTURE_2D,0,a.RGBA,a.RGBA,a.UNSIGNED_BYTE,f.Bf),b=!0);b&&(f.loaded=!0,e.o.D.Zc&&("previewtrack"==e.o.D.delay||"videopano"==e.o.D.delay&&!e.o.B.j)&&e.ip()&&e.o.Zj(null));a.bindTexture(a.TEXTURE_2D,null);a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,0)}catch(c){e.o.O(c)}e.o.update(2)}};v.prototype.zo=function(){var f=this.o,e=f.R;if(this.eb)for(;0<this.eb.length;)e.deleteTexture(this.eb.pop());
this.eb=[];for(var a=0;6>a;a++){var b=e.createTexture();this.Sd++;b.Bf=null;b.wf=null;b.to=!1;e.bindTexture(e.TEXTURE_2D,b);e.texImage2D(e.TEXTURE_2D,0,e.RGB,1,1,0,e.RGB,e.UNSIGNED_BYTE,null);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE);if(f.lh[a]){var c=new Image;c.crossOrigin=f.crossOrigin;c.src=f.fb(f.lh[a]);b.Bf=c;c.addEventListener&&c.addEventListener("load",
this.pl(b),!1);f.vd.push(c)}this.eb.push(b)}for(a=0;6>a;a++)f.kh[a]&&(c=new Image,c.crossOrigin=f.crossOrigin,c.src=f.fb(f.kh[a]),c.addEventListener?c.addEventListener("load",this.pl(this.eb[a]),!1):c.onload=this.pl(this.eb[a]),this.eb[a].wf=c,f.vd.push(c));for(a=0;a<f.U.length;a++)f.U[a].nd||(f.U[a].texture=e.createTexture(),f.Sd++,e.bindTexture(e.TEXTURE_2D,f.U[a].texture),e.texImage2D(e.TEXTURE_2D,0,e.RGB,1,1,0,e.RGB,e.UNSIGNED_BYTE,null),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),
e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE));f.B.texture=e.createTexture();f.Sd++;e.bindTexture(e.TEXTURE_2D,f.B.texture);e.texImage2D(e.TEXTURE_2D,0,e.RGB,1,1,0,e.RGB,e.UNSIGNED_BYTE,null);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE);e.bindTexture(e.TEXTURE_2D,null)};v.prototype.ov=
function(){var f=this.o;if(f.C.width!=f.ea.offsetWidth||f.C.height!=f.ea.offsetHeight)f.C.width=f.ea.offsetWidth,f.C.height=f.ea.offsetHeight;f.se&&(f.Rc(0),f.fc());if(f.R){var e=f.R;this.gk();e.clear(e.DEPTH_BUFFER_BIT);e.useProgram(this.P);this.Cg(0);e.uniform1i(this.P.yg,0);e.enableVertexAttribArray(this.P.ja);e.enableVertexAttribArray(this.P.Ka);e.bindBuffer(e.ARRAY_BUFFER,this.cf);e.vertexAttribPointer(this.P.Ka,2,e.FLOAT,!1,0,0);e.activeTexture(e.TEXTURE0);e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,
this.wd);e.uniform1f(this.P.sk,1E-4);e.vertexAttribPointer(this.P.ja,3,e.FLOAT,!1,0,0);y.la.identity(this.Bb);y.la.perspective(f.Mb(),f.Ab.width/f.Ab.height,.1,100,this.Bb);e.uniformMatrix4fv(this.P.He,!1,this.Bb);for(f=0;6>f;f++)this.Cg(f),e.bindBuffer(e.ARRAY_BUFFER,this.Mk),e.vertexAttribPointer(this.P.ja,3,e.FLOAT,!1,0,0),e.bindBuffer(e.ARRAY_BUFFER,this.cf),e.vertexAttribPointer(this.P.Ka,2,e.FLOAT,!1,0,0),6<=this.eb.length&&this.eb[f].loaded&&(e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,
this.eb[f]),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,this.wd),e.uniform1i(this.P.yg,0),e.uniformMatrix4fv(this.P.ai,!1,this.za),e.uniformMatrix4fv(this.P.He,!1,this.Bb),e.drawElements(e.TRIANGLES,6,e.UNSIGNED_SHORT,0))}};v.prototype.gk=function(){var f=this.o,e=this.N;e.M.Lj&&6<e.M.Lj.length&&(e=parseInt(e.M.Lj),f.R.clearColor((e>>16&255)/255,(e>>8&255)/255,(e>>0&255)/255,1))};v.prototype.Cg=function(f,e){void 0===e&&(e=1);var a=this.o;y.la.identity(this.za);y.la.rotate(this.za,e*-a.W.m*Math.PI/180,[0,
0,1]);y.la.rotate(this.za,e*-a.u.m*Math.PI/180,[1,0,0]);-1==e?y.la.rotate(this.za,-a.pan.m*Math.PI/180,[0,1,0]):y.la.rotate(this.za,(180-a.pan.m)*Math.PI/180,[0,1,0]);a.Xa&&(y.la.rotate(this.za,-a.Xa.pitch*Math.PI/180,[1,0,0]),y.la.rotate(this.za,a.Xa.W*Math.PI/180,[0,0,1]));4>f?y.la.rotate(this.za,-Math.PI/2*f,[0,1,0]):y.la.rotate(this.za,Math.PI/2*(5==f?1:-1),[1,0,0])};v.prototype.Pu=function(f){var e=this;return function(){e.Qk.push(f)}};v.prototype.lr=function(f){this.o.tb=!0;this.o.ph=!0;f.loaded=
!0;f.Xl=0;f.Ke=0;var e=this.o.R;this.zn();e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,1);if(null!=f.M&&f.M.complete){f.Nb=e.createTexture();this.o.Sd++;e.bindTexture(e.TEXTURE_2D,f.Nb);try{e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,f.M)}catch(a){e.texImage2D(e.TEXTURE_2D,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,new Uint8Array([128,128,128,250])),this.o.O(a)}}this.o.update(2)};v.prototype.zn=function(){this.o.N.Di&&this.o.N.Di--};v.prototype.mr=function(){if(0<this.Qk.length){var f=this.Qk.shift();
this.lr(f)}};v.prototype.jt=function(f){var e=this;return function(){e.o.tb=!0;e.o.ph=!0;var a=e.N.M;try{if(null!=f&&f.complete){var b=a.levels[a.levels.length-1],c=a.gb;b.height=b.width=f.width-2*c;b.Y=b.ta=1;for(var h=0;6>h;h++){var m=new y.Zg;m.Ec=document.createElement("canvas");e.o.na?(m.Ec.width=b.width+2*c,m.Ec.height=b.height+2*c):(m.Ec.width=a.V+2*c,m.Ec.height=a.V+2*c);m.wn=m.Ec.getContext("2d");m.Ec.style[e.o.Ad+"Origin"]="0% 0%";m.Ec.style.overflow="hidden";m.Ec.style.position="absolute";
m.M=f;var n=b.width+2*c,q=b.height+2*c;m.wn&&m.wn.drawImage(f,0,h*q,n,q,0,0,n,q);if(e.o.na&&e.o.R){var r=e.o.R;r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,1);m.Nb=r.createTexture();e.o.Sd++;r.bindTexture(r.TEXTURE_2D,m.Nb);try{r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,m.Ec)}catch(t){e.o.O(t)}r.bindTexture(r.TEXTURE_2D,null);r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,0)}e.o.Og&&(m.Ec.vv=-1,e.o.ea.insertBefore(m.Ec,e.o.ea.firstChild));b.La[h]=m}b.loaded=!0;e.o.D.Zc&&("previewtrack"==e.o.D.delay||"videopano"==
e.o.D.delay&&!e.o.B.j)&&e.o.Zj(null)}}catch(t){e.o.O(t)}e.o.update(2)}};v.prototype.$p=function(f){var e=this;return function(){e.o.tb=!0;e.o.ph=!0;e.zn();f.M=null}};v.prototype.mv=function(){var f=this.o,e=this.N,a=e.M,b=a.levels;f.se&&(f.Rc(0),f.fc());if(f.R){var c=f.R;c.useProgram(this.P);this.gk();c.clear(c.DEPTH_BUFFER_BIT);c.enable(c.DEPTH_TEST);y.la.identity(this.Bb);y.la.perspective(f.Mb(),f.Ab.width/f.Ab.height,.1,100,this.Bb);c.uniformMatrix4fv(this.P.He,!1,this.Bb);e.av();e.Qo();var h=
e.Hn();var m=b.length-1;for(e.fe=0;m>=h;){var n=b[m],q=1;m==b.length-1&&0==a.gb&&(q=a.V/(a.V-.5));for(var r=0;6>r;r++){var t=e.cube.dg[r];var x=t.gi;if(t.oc&&0<x.Ki&&0<x.mk&&0<x.scale||n.cache){t.tb=!1;t.Sf[m]||(t.Sf[m]={Oc:0,Bd:0,Gd:0,Hd:0});var z=t.Sf[m];n.cache?(z.Oc=0,z.Bd=0,z.Gd=n.Y-1,z.Hd=n.ta-1):e.qs(n,x,z);x=!0;for(var C=z.Bd;C<=z.Hd;C++)for(var F=z.Oc;F<=z.Gd;F++){var E=F+C*n.Y+r*n.Y*n.ta,D=n.La[E];D||(D=n.La[E]=new y.Zg,f.O("create simple "+m+","+E));this.bj()?D.M||(D.Ke?D.Ke--:(this.Aj(D,
n,e.Jg(r,m,F,C)),f.tb=!0)):e.fe++;if(D.Nb){if(!D.jg){E=.5*m+1;D.jg=c.createBuffer();c.bindBuffer(c.ARRAY_BUFFER,D.jg);var A=[-1,-1,1,1,-1,1,1,1,1,-1,1,1];A[3]=F*a.V-a.gb;A[0]=Math.min((F+1)*a.V,n.width)+a.gb;A[7]=C*a.V-a.gb;A[1]=Math.min((C+1)*a.V,n.height)+a.gb;A[4]=A[1];A[6]=A[3];A[9]=A[0];A[10]=A[7];for(var G=0;12>G;G++)A[G]=0==G%3?q*E*(-2*A[G]/n.width+1):1==G%3?q*E*(-2*A[G]/n.height+1):E;c.bufferData(c.ARRAY_BUFFER,new Float32Array(A),c.STATIC_DRAW)}}else x=!1;D.visible=t.oc}z.No=x}}m--}for(r=
0;6>r;r++)if(t=e.cube.dg[r],t.oc)for(x=t.gi,this.Cg(r),c.uniform1i(this.P.yg,0),c.uniformMatrix4fv(this.P.He,!1,this.Bb),c.uniformMatrix4fv(this.P.ai,!1,this.za),c.enableVertexAttribArray(this.P.ja),c.enableVertexAttribArray(this.P.Ka),c.bindBuffer(c.ARRAY_BUFFER,this.cf),c.vertexAttribPointer(this.P.Ka,2,c.FLOAT,!1,0,0),c.activeTexture(c.TEXTURE0),c.bindBuffer(c.ELEMENT_ARRAY_BUFFER,this.wd),c.useProgram(this.P),m=h;m<=b.length-1;){n=b[m];if(t.oc&&0<x.Ki&&t.Sf[m]&&0<=t.Sf[m].Oc){z=t.Sf[m];for(C=
z.Bd;C<=z.Hd;C++)for(F=z.Oc;F<=z.Gd;F++)E=F+C*n.Y+r*n.Y*n.ta,(D=n.La[E])&&D.Nb&&(c.uniform1f(this.P.sk,1E-4*(F%2+C%2*2)),c.bindBuffer(c.ARRAY_BUFFER,D.jg),c.vertexAttribPointer(this.P.ja,3,c.FLOAT,!1,0,0),c.bindTexture(c.TEXTURE_2D,D.Nb),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MAG_FILTER,c.LINEAR),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MIN_FILTER,c.LINEAR),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_S,c.CLAMP_TO_EDGE),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_T,c.CLAMP_TO_EDGE),c.drawElements(c.TRIANGLES,
6,c.UNSIGNED_SHORT,0)),D.visible=t.oc;z.No&&(m=b.length)}m++}this.Yl();f.ph=!1}};v.prototype.bj=function(){return this.N.Di<this.N.zm};v.prototype.Aj=function(f,e,a){var b=this.N,c=this.o;b.Ns++;f.M=new Image;f.Xl++;f.Ke=1<<f.Xl;f.M.onload=this.Pu(f);f.M.onerror=this.$p(f);f.M.onabort=this.$p(f);f.M.crossOrigin=c.crossOrigin;f.M.setAttribute("src",a);c.O("load "+a);e.cache&&c.vd.push(f.M);b.Di++};v.prototype.rq=function(){var f=this.o,e=this.N,a=e.M;f.se&&(f.Rc(0),f.fc());if(f.R){var b=f.R;this.gk();
b.clear(b.DEPTH_BUFFER_BIT);b.disable(b.CULL_FACE);b.bindBuffer(b.ARRAY_BUFFER,this.Pj);var c=[0,0];c[2]=f.C.width;c[3]=0;c[4]=f.C.width;c[5]=f.C.height;c[6]=0;c[7]=f.C.height;b.bufferData(b.ARRAY_BUFFER,new Float32Array(c),b.STATIC_DRAW);e.fe=0;if(!this.Qc||this.Mh)0<a.levels.length?this.jr():this.kr();f.B.Tc?this.Bt():(b.enable(b.DEPTH_TEST),b.depthRange(0,1),b.depthFunc(b.LESS),this.Xj=!1,0<a.levels.length&&this.nv(),this.Qc&&!this.Xj&&this.At())}};v.prototype.yu=function(f,e,a,b,c,h,m){var n=
this.o;c=this.N.M;var q=n.C,r=a*c.V/e.width,t=(a+1)*c.V/e.width;a=b*c.V/e.height;e=(b+1)*c.V/e.height;c=.1;m&&(c=.2);this.rh&&(c=0);b=(t-r)*c;1<t&&(t=1);1<e&&(e=1);r-=b;a-=b;c=this.Tm;m=(t+b-r)/c;t=(e+b-a)/c;e={x:0,y:0};b={x:0,y:0};f.nl=0;var x=n.lj(),z=new y.Ta,C=this.Zs;C.Bp();4>h?C.Ef(-90*h):C.$d(5==h?90:-90);n.Xa&&(C.Ff(n.Xa.W),C.$d(-n.Xa.pitch));C.Ef(-n.pan.m);C.$d(n.u.m);C.Ff(n.W.m);for(h=0;h<=c;h++)for(var F=0;F<=c;F++){var E=2*(r+F*m)-1;var D=2*(a+h*t)-1;z.x=1*E;z.y=1*D;z.z=-1;z.normalize();
C.it(z);E=this.no(z,e,n.Z());0!=n.Hc()&&1>x&&(D=this.no(z,b,n.Hc()),E&&D?(e.x=e.x*x+b.x*(1-x),e.y=e.y*x+b.y*(1-x)):!E&&D&&(E=!0,e.x=b.x,e.y=b.y));E||(e.x=NaN);f.kg[f.nl++]=q.width/2+e.x*q.width/2;f.kg[f.nl++]=q.height/2-e.y*q.width/2}this.zu(f,c)};v.prototype.no=function(f,e,a){var b=!0;switch(a){case 0:case 4:a=1/(f.z*this.Wl);e.x=-f.x*a;e.y=f.y*a;0<f.z&&(b=!1);break;case 9:1==f.z&&(b=!1);a=1/((1-f.z)*this.tm);e.x=f.x*a;e.y=-f.y*a;break;case 12:if(a=Math.sqrt(f.x*f.x+f.y*f.y),0==a)e.x=0,e.y=0;else{var c=
2*this.Xk*Math.acos(-f.z)/a;if(2<a)return!1;e.x=c*f.x;e.y=-c*f.y}}return b};v.prototype.zu=function(f,e){for(var a=this.o,b=[],c,h=f.Oa=0;h<e;h++)for(var m=0;m<e;m++){b[0]=h+m*(e+1);b[1]=h+1+m*(e+1);b[2]=h+(m+1)*(e+1);b[3]=h+1+(m+1)*(e+1);c=!0;for(var n=0;4>n;n++)isNaN(f.kg[2*b[0]])&&(c=!1);if(c){var q=!1,r=!1,t=!1,x=!1;for(n=0;4>n;n++){var z=f.kg[2*b[n]];z<a.C.width&&(r=!0);0<=z&&(q=!0);z=f.kg[2*b[n]+1];z<a.C.height&&(t=!0);0<=z&&(x=!0)}if(c=c&&r&&q&&t&&x)this.rh?(f.mb[f.Oa++]=b[0],f.mb[f.Oa++]=
b[1],f.mb[f.Oa++]=b[1],f.mb[f.Oa++]=b[3],f.mb[f.Oa++]=b[3],f.mb[f.Oa++]=b[2],f.mb[f.Oa++]=b[2],f.mb[f.Oa++]=b[0],f.mb[f.Oa++]=b[3],f.mb[f.Oa++]=b[0],f.mb[f.Oa++]=b[1],f.mb[f.Oa++]=b[2]):(f.mb[f.Oa++]=b[0],f.mb[f.Oa++]=b[3],f.mb[f.Oa++]=b[2],f.mb[f.Oa++]=b[0],f.mb[f.Oa++]=b[1],f.mb[f.Oa++]=b[3])}}};v.prototype.nv=function(){var f=this.o,e=this.N,a=e.M,b=a.levels;f.se&&(f.Rc(0),f.fc());if(f.R){var c=f.R,h=this.op;c.useProgram(h);this.Gm(h);c.enable(c.CULL_FACE);c.cullFace(c.FRONT);c.enable(c.STENCIL_TEST);
c.stencilOp(c.KEEP,c.INCR,c.INCR);c.stencilFunc(c.EQUAL,0,255);y.la.identity(this.Bb);y.la.perspective(f.Mb(),f.Ab.width/f.Ab.height,.1,100,this.Bb);c.uniformMatrix4fv(c.getUniformLocation(h,"uPMatrix"),!1,this.Bb);e.fe=0;e.Qo();var m=e.Hn(),n=0;var q=b.length-1;for(var r={},t=b[q];t.Cf&&0<q;)q--,t=b[q];for(var x=q,z=x,C=0;6>C;C++)for(var F=0;F<t.ta;F++)for(var E=0;E<t.Y;E++){var D=E+F*t.Y+C*t.Y*t.ta;r[D]=1}for(;q>=m;){var A={};t=b[q];var G=null;0<q&&(G=b[q-1]);var J=!0;for(var H in r)if(r.hasOwnProperty(H)){D=
Number(H);var I=t.La[D];C=Number(Math.floor(D/(t.Y*t.ta)));F=Math.floor((D-C*t.Y*t.ta)/t.Y);E=Math.floor(D-(F*t.Y+C*t.Y*t.ta));if(6<=C)console.log("Grrr...");else{var M=e.cube.dg[C];M.tb=!1;I||(I=t.La[D]=new y.Zg,f.O("create "+ +q+","+D));this.yu(I,t,E,F,Math.max(1,this.Tm>>x-q),C,0!=f.Hc());I.visible=0<I.Oa||t.cache;I.vj=3;I.Ph=Date.now();I.visible&&!I.Nb&&(J=!1,this.bj()?I.M||(I.Ke?I.Ke--:(this.Aj(I,t,e.Jg(C,q,E,F)),f.tb=!0)):this.N.fe++);if(G&&(I.visible||G.cache)){I=(E*a.V+1)/t.width;E=Math.min(1,
((E+1)*a.V-1)/t.width);var K=(F*a.V+1)/t.height;F=Math.min(1,((F+1)*a.V-1)/t.height);D=a.V/G.width;M=a.V/G.height;var O=K;K=Math.floor(K*G.height/a.V);do{var R=I,U=Math.floor(I*G.width/a.V);do{var V=U+K*G.Y+C*G.Y*G.ta;U<G.Y&&K<G.ta?A[V]=1:f.O("Grrrr");U++;R+=D}while(R<E);K++;O+=M}while(O<F)}}}J&&(z=q,20>f.fov.m&&q<this.Xf&&(this.Xj=!0));r=A;q--}this.Yl();c.uniform1i(c.getUniformLocation(h,"tileTexture"),0);c.activeTexture(c.TEXTURE0);q=m;for(m=-1;q<=Math.min(z,this.Xf-1);){t=b[q];for(H in t.La)if(t.La.hasOwnProperty(H)){r=
Number(H);I=t.La[r];C=Math.floor(r/(t.Y*t.ta));F=Math.floor((r-C*t.Y*t.ta)/t.Y);E=Math.floor(r-(F*t.Y+C*t.Y*t.ta));m!=C&&(m=C,this.hk(C,h));if(n>e.tg){f.O("Exceeded painted tiles");this.Xj=!1;break}I.Nb&&(x=r=a.V,E==t.Y-1&&(r=t.width-a.V*E),F==t.ta-1&&(x=t.height-a.V*F),r=(r+2*a.gb)/a.V,x=(x+2*a.gb)/a.V,c.bindTexture(c.TEXTURE_2D,I.Nb),c.uniform2f(c.getUniformLocation(h,"uCanvasDimensions"),f.C.width,f.C.height),A=c.getUniformLocation(h,"srcScale"),c.uniform2f(A,.5*t.width/a.V/r,.5*t.height/a.V/x),
A=c.getUniformLocation(h,"srcOffset"),c.uniform2f(A,(.5*t.width+a.gb-a.V*E)/a.V/r,-(.5*t.height+a.gb-a.V*F)/a.V/x+1),A=c.getUniformLocation(h,"zOffset"),c.uniform1f(A,(q+1)/(b.length+5)),r=c.getAttribLocation(h,"aVertexPosition"),c.disableVertexAttribArray(0),c.disableVertexAttribArray(1),c.disableVertexAttribArray(2),c.enableVertexAttribArray(r),c.activeTexture(c.TEXTURE0),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MAG_FILTER,c.LINEAR),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MIN_FILTER,c.LINEAR),c.texParameteri(c.TEXTURE_2D,
c.TEXTURE_WRAP_S,c.CLAMP_TO_EDGE),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_T,c.CLAMP_TO_EDGE),c.bindBuffer(c.ARRAY_BUFFER,this.Hs),c.vertexAttribPointer(r,2,c.FLOAT,!1,0,0),c.bufferData(c.ARRAY_BUFFER,new Float32Array(I.kg),c.DYNAMIC_DRAW),c.bindBuffer(c.ELEMENT_ARRAY_BUFFER,this.Gs),c.bufferData(c.ELEMENT_ARRAY_BUFFER,new Uint16Array(I.mb),c.DYNAMIC_DRAW),this.rh?0==q&&0==C&&c.drawElements(c.LINES,I.Oa,c.UNSIGNED_SHORT,0):c.drawElements(c.TRIANGLES,I.Oa,c.UNSIGNED_SHORT,0),n++)}q++}c.disable(c.CULL_FACE);
c.cullFace(c.FRONT_AND_BACK);f.ph=!1;c.disable(c.STENCIL_TEST)}};v.prototype.hk=function(f,e){var a=this.o.R;y.la.identity(this.za);this.Cg(f,-1);a.uniformMatrix4fv(a.getUniformLocation(e,"matRotate"),!1,this.za)};v.prototype.Bt=function(){var f=this.o;if(f.R){var e=f.R,a=this.pp;e.useProgram(a);this.hk(0,a);e.uniform2f(e.getUniformLocation(a,"uCanvasDimensions"),f.C.width,f.C.height);var b=e.getUniformLocation(a,"srcOffset");e.uniform2f(b,.5,.5);1==f.B.format&&(b=e.getUniformLocation(a,"srcScale"),
f.Ed?(e.uniform2f(b,-.5/Math.PI,(f.B.flipY?-.5:.5)/Math.PI),b=e.getUniformLocation(a,"srcOffset"),f.Fg?e.uniform2f(b,.5,.75):e.uniform2f(b,.5,.25)):e.uniform2f(b,-.5/Math.PI,(f.B.flipY?-1:1)/Math.PI));14==f.B.format&&(b=e.getUniformLocation(a,"srcScale"),e.uniform2f(b,1-2*f.B.af/(f.B.width/3),1-2*f.B.af/(f.B.height/2)));this.Gm(a);b=e.getUniformLocation(a,"cubeTexture");e.uniform1i(b,0);b=e.getAttribLocation(a,"aVertexPosition");e.disableVertexAttribArray(0);e.disableVertexAttribArray(1);e.disableVertexAttribArray(2);
e.enableVertexAttribArray(b);e.bindBuffer(e.ARRAY_BUFFER,this.Pj);e.vertexAttribPointer(b,2,e.FLOAT,!1,0,0);e.activeTexture(e.TEXTURE0);e.bindTexture(e.TEXTURE_2D,f.B.texture);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR);e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,this.wd);e.drawElements(e.TRIANGLES,6,e.UNSIGNED_SHORT,
0)}};v.prototype.Gm=function(f){var e=this.o,a=e.R,b=this.o.C,c=1;switch(e.fov.mode){case 0:c=b.width/b.height;break;case 1:c=1;break;case 2:c=b.width/Math.sqrt(b.width*b.width+b.height*b.height);break;case 3:4*b.height/3<b.width&&(c=4/3)}b=a.getUniformLocation(f,"rectDstDistance");this.Wl=Math.tan(Math.min(e.fov.m,179)/2*Math.PI/180)*c;a.uniform1f(b,this.Wl);b=a.getUniformLocation(f,"fisheyeDistance");this.Xk=180/(e.fov.m*Math.PI*c);a.uniform1f(b,this.Xk);b=a.getUniformLocation(f,"stereoDistance");
this.tm=Math.tan(Math.min(e.fov.m,359)/4*Math.PI/180)*c;a.uniform1f(b,this.tm);b=a.getUniformLocation(f,"directionBlend");a.uniform1f(b,e.lj())};v.prototype.At=function(){var f=this.o,e=f.R,a=this.np;e.useProgram(a);e.enable(e.STENCIL_TEST);e.stencilOp(e.KEEP,e.INCR,e.INCR);e.stencilFunc(e.EQUAL,0,255);this.hk(0,a);e.uniform2f(e.getUniformLocation(a,"uCanvasDimensions"),f.C.width,f.C.height);f=e.getUniformLocation(a,"srcScale");e.uniform2f(f,1,1);f=e.getUniformLocation(a,"srcOffset");e.uniform2f(f,
0,0);f=e.getUniformLocation(a,"zOffset");e.uniform1f(f,.9999);this.Gm(a);this.hk(0,a);f=e.getUniformLocation(a,"cubeTexture");e.uniform1i(f,0);a=e.getAttribLocation(a,"aVertexPosition");e.disableVertexAttribArray(0);e.disableVertexAttribArray(1);e.disableVertexAttribArray(2);e.enableVertexAttribArray(a);e.bindBuffer(e.ARRAY_BUFFER,this.Pj);e.vertexAttribPointer(a,2,e.FLOAT,!1,0,0);e.activeTexture(e.TEXTURE0);e.bindTexture(e.TEXTURE_CUBE_MAP,this.Qc);e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_WRAP_S,
e.CLAMP_TO_EDGE);e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE);e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_MIN_FILTER,e.LINEAR);e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_MAG_FILTER,e.LINEAR);e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,this.wd);e.drawElements(e.TRIANGLES,6,e.UNSIGNED_SHORT,0);e.disable(e.STENCIL_TEST)};v.prototype.kr=function(){var f=this.o,e=f.R;e.getParameter(e.MAX_CUBE_MAP_TEXTURE_SIZE);for(var a=[1,3,5,4,0,2],b=!0,c=!0,h=!1,m=0;6>m;m++)this.eb[m].wf.complete?
this.Yi[m]||(h=!0):b=!1,this.eb[m].Bf.complete||(c=!1);if(c||b)if(!c||b||!this.Qc||h){m=Math.round(f.Re/f.Kg);c=(f.Re-m)/2;f.O("paint cube single - isMain: "+b+" overlap: "+c);this.Xf=0;this.Qc||(this.Qc=e.createTexture());f.Sd++;e.bindTexture(e.TEXTURE_CUBE_MAP,this.Qc);e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE);e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE);e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,1);h=document.createElement("canvas");h.width=m;h.height=
m;var n=h.getContext("2d");for(m=0;6>m;m++){var q=a[m];this.eb[q].wf.complete?this.Yi[q]||(n.drawImage(this.eb[q].wf,-c,-c),e.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+m,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,h),this.Yi[q]=!0):(n.drawImage(this.eb[q].Bf,-c,-c,f.Re,f.Re),e.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+m,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,h))}this.Mh=!b}};v.prototype.jr=function(){var f=this.o,e=this.N.M,a=e.levels,b=f.R,c;var h=a.length-1;if(!(0>h)){a[h].Cf&&h--;var m=512;f.Lh&&(m=256);!f.xg&&2<=
f.devicePixelRatio&&(m=512);for((c=b.getParameter(b.MAX_CUBE_MAP_TEXTURE_SIZE))&&c<m&&(m=c);0<h&&a[h-1].width<=m;)h--;m=a[h];if(0!=m.Y){c=h;var n=this.er(h);this.Mh&&n&&(this.Mh=!1);n||(h=a.length-1,m=a[h],n||(m.Cf?(n=m.loaded,this.Gl(h-1)&&(--h,n=!0)):n=this.Gl(h)),this.Mh=!0);this.Gl(c);if(n&&this.Xf>h){m=a[h];f.O("paint cube level "+h);this.Xf=h;a=e.gb;h=0<a||1<m.Y||1<m.ta;n=c=void 0;h&&(n=document.createElement("canvas"),n.width=m.width,n.height=m.height,2048>m.width&&(1500<m.width?(n.width=2048,
n.height=2048):700<m.width?(n.width=1024,n.height=1024):(n.width=512,n.height=512)),c=n.getContext("2d"));this.Qc=b.createTexture();f.Sd++;b.bindTexture(b.TEXTURE_CUBE_MAP,this.Qc);b.texParameteri(b.TEXTURE_CUBE_MAP,b.TEXTURE_WRAP_S,b.CLAMP_TO_EDGE);b.texParameteri(b.TEXTURE_CUBE_MAP,b.TEXTURE_WRAP_T,b.CLAMP_TO_EDGE);b.pixelStorei(b.UNPACK_FLIP_Y_WEBGL,1);var q=[1,3,5,4,0,2];e=e.V;for(var r=0;6>r;r++){for(var t=0;t<m.ta;t++)for(var x=0;x<m.Y;x++){var z=x+t*m.Y+q[r]*m.Y*m.ta,C=m.La[z],F=C.M;C.Ec&&
(F=C.Ec);F?h?(z=n.width/m.width,c.drawImage(F,z*(x*e-a),z*(t*e-a),z*F.width,z*F.height)):b.texImage2D(b.TEXTURE_CUBE_MAP_POSITIVE_X+r,0,b.RGBA,b.RGBA,b.UNSIGNED_BYTE,F):(f.O("WTF?!"),f.O(z),f.O(C))}h&&b.texImage2D(b.TEXTURE_CUBE_MAP_POSITIVE_X+r,0,b.RGBA,b.RGBA,b.UNSIGNED_BYTE,n)}}}}};v.prototype.Gl=function(f){var e=this.o,a=this.N,b=a.M.levels[f];if(0==b.Y)return!1;var c=!0;b.cache=!0;for(var h=0;6>h;h++)for(var m=0;m<b.ta;m++)for(var n=0;n<b.Y;n++){var q=n+m*b.Y+h*b.Y*b.ta,r=b.La[q];r||(r=b.La[q]=
new y.Zg);this.bj()?r.M||(r.Ke?r.Ke--:(this.Aj(r,b,a.Jg(h,f,n,m)),e.tb=!0)):a.fe++;r.Nb||(c=!1,e.tb=!0)}c&&(b.loaded=!0);return c};v.prototype.er=function(f){f=this.N.M.levels[f];if(0==f.Y)return!1;for(var e=0;6>e;e++)for(var a=0;a<f.ta;a++)for(var b=0;b<f.Y;b++){var c=f.La[b+a*f.Y+e*f.Y*f.ta];if(!c||!c.Nb)return!1}return f.loaded=!0};v.prototype.ready=function(){return null!=this.Qc};v.prototype.ip=function(){for(var f=0;6>f;f++)if(!this.eb[f].Bf.complete)return!1;return!0};v.prototype.Yl=function(){for(var f=
this.o,e=this.N,a=e.M.levels,b=f.R,c=Date.now(),h=a.length-1;0<=h;h--){var m=a[h];if(!m.cache)for(var n in m.La)if(m.La.hasOwnProperty(n)){var q=m.La[n];0<q.vj&&q.vj--;q.visible||0<q.vj?(q.visible&&(q.Ph=c),q=this.pe.indexOf(q),-1!==q&&this.pe.splice(q,1)):-1===this.pe.indexOf(q)&&(q.level=m,this.pe.push(q))}}if(this.pe.length>1.1*e.Zp)for(this.pe.sort(function(r,t){return t.Ph-r.Ph});this.pe.length>e.Zp;)q=this.pe.pop(),q.Nb&&(b.deleteTexture(q.Nb),f.Sd--,q.Nb=0),q.M=null,q.jg&&(b.deleteBuffer(q.jg),
q.jg=0),n=q.level.La.indexOf(q),f.O("delete "+n+" "+(c-q.Ph)),delete q.level.La[n]};v.prototype.ev=function(){var f=this.o;if(f.R){var e=this.o.R,a;for(a=0;a<f.U.length;a++){var b=f.U[a];if(!b.nd){y.la.identity(this.za);y.la.rotate(this.za,-f.W.m*Math.PI/180,[0,0,1]);y.la.rotate(this.za,-f.u.m*Math.PI/180,[1,0,0]);y.la.rotate(this.za,(180-f.pan.m)*Math.PI/180,[0,1,0]);y.la.rotate(this.za,b.pan*Math.PI/180,[0,1,0]);y.la.rotate(this.za,-b.u*Math.PI/180,[1,0,0]);y.la.translate(this.za,[0,0,1]);y.la.rotate(this.za,
b.yb*Math.PI/180,[0,0,1]);y.la.rotate(this.za,-b.Na*Math.PI/180,[0,1,0]);y.la.rotate(this.za,b.Ja*Math.PI/180,[1,0,0]);var c=Math.tan(b.fov/2*Math.PI/180),h=b.aspect;h||(h=16/9);y.la.scale(this.za,[c,c/h,1]);y.la.translate(this.za,[0,0,-1]);e.bindBuffer(e.ARRAY_BUFFER,this.Mk);e.vertexAttribPointer(this.P.ja,3,e.FLOAT,!1,0,0);e.bindBuffer(e.ARRAY_BUFFER,this.cf);e.vertexAttribPointer(this.P.Ka,2,e.FLOAT,!1,0,0);e.activeTexture(e.TEXTURE0);e.bindTexture(e.TEXTURE_2D,b.texture);e.texParameteri(e.TEXTURE_2D,
e.TEXTURE_MAG_FILTER,e.LINEAR);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE);e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,this.wd);e.uniform1i(this.P.yg,0);e.uniformMatrix4fv(this.P.ai,!1,this.za);e.uniformMatrix4fv(this.P.He,!1,this.Bb);e.drawElements(e.TRIANGLES,6,e.UNSIGNED_SHORT,0)}}}};v.prototype.dv=function(){var f=this.o,e;if(f.C.width!=f.ea.offsetWidth||f.C.height!=
f.ea.offsetHeight)f.C.width=f.ea.offsetWidth,f.C.height=f.ea.offsetHeight;f.se&&(f.Rc(0),f.fc());if(f.R){var a=f.R;a.useProgram(this.P);y.la.identity(this.Bb);y.la.perspective(f.Mb(),f.Ab.width/f.Ab.height,.1,100,this.Bb);a.uniformMatrix4fv(this.P.He,!1,this.Bb);this.Cg(0);a.uniform1i(this.P.yg,0);a.uniformMatrix4fv(this.P.He,!1,this.Bb);a.uniformMatrix4fv(this.P.ai,!1,this.za);a.enableVertexAttribArray(this.P.ja);a.enableVertexAttribArray(this.P.Ka);a.bindBuffer(a.ARRAY_BUFFER,this.cf);a.vertexAttribPointer(this.P.Ka,
2,a.FLOAT,!1,0,0);a.activeTexture(a.TEXTURE0);a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,this.wd);a.uniform1f(this.P.sk,1E-4);a.vertexAttribPointer(this.P.ja,3,a.FLOAT,!1,0,0);a.bindTexture(a.TEXTURE_2D,f.B.texture);for(e=0;1>e;e++)this.Cg(0),a.bindBuffer(a.ARRAY_BUFFER,f.B.kk),a.vertexAttribPointer(this.P.ja,3,a.FLOAT,!1,0,0),a.bindBuffer(a.ARRAY_BUFFER,f.B.Ci),a.vertexAttribPointer(this.P.Ka,2,a.FLOAT,!1,0,0),a.activeTexture(a.TEXTURE0),a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,f.B.qj),a.uniform1i(this.P.yg,
0),a.uniformMatrix4fv(this.P.ai,!1,this.za),a.uniformMatrix4fv(this.P.He,!1,this.Bb),a.drawElements(a.TRIANGLES,36,a.UNSIGNED_SHORT,0)}};v.prototype.cv=function(){var f=this.o,e=f.R,a=f.B;if(0<f.U.length)for(var b=0;b<f.U.length;b++){var c=f.U[b];if(!c.nd&&c.isRunning&&c.Eh!=c.j.currentTime&&(c.Eh=c.j.currentTime,!c.aspect&&0<c.j.videoHeight&&(c.aspect=c.j.videoWidth/c.j.videoHeight),f.Ji))try{c.texture&&(e.bindTexture(e.TEXTURE_2D,c.texture),e.texImage2D(e.TEXTURE_2D,0,e.RGB,e.RGB,e.UNSIGNED_BYTE,
c.j),f.update())}catch(m){f.O(m)}}if(a.j&&(b=Number(a.j.currentTime),a.Eh!=b)){a.Eh=b;try{var h=0<a.j.readyState;f.uj&&a.Tc&&(h=h&&0<a.j.currentTime);a.texture&&a.pg&&h&&(a.Tc=!0,a.width=a.j.videoWidth,a.height=a.j.videoHeight,e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,f.B.flipY),e.bindTexture(e.TEXTURE_2D,a.texture),e.texImage2D(e.TEXTURE_2D,0,e.RGB,e.RGB,e.UNSIGNED_BYTE,a.j),a.ym=!0,f.update())}catch(m){f.O(m)}}};v.prototype.ep=function(){var f,e,a=this.o,b=this.o.R;a.rb.style.visibility="hidden";a.K.Oh!=
a.K.mode&&(a.K.Oh=a.K.mode);if((0<=a.K.mode||0<a.K.Qb.length)&&!a.D.Fi){var c=1;0>=a.K.mode&&(c=0);3==a.K.mode&&(c=a.K.Da);for(f=0;f<a.J.length;f++){var h=a.J[f];if("poly"==h.type){var m=h.Af,n=c;2==a.K.mode&&(n=h.Da);var q=a.K.Qb.indexOf(h.id);-1!=q&&(n=a.K.Ac[q]);if(0<m.length){q=[];for(e=0;e<m.length;e++)q.push(m[e].cc),q.push(m[e].Pb),q.push(0);b.useProgram(this.Zd);b.enable(b.BLEND);b.blendFuncSeparate(b.SRC_ALPHA,b.ONE_MINUS_SRC_ALPHA,b.SRC_ALPHA,b.ONE);b.disable(b.DEPTH_TEST);m=b.createBuffer();
b.bindBuffer(b.ARRAY_BUFFER,m);b.bufferData(b.ARRAY_BUFFER,new Float32Array(q),b.STATIC_DRAW);b.uniform2f(b.getUniformLocation(this.Zd,"uCanvasDimensions"),a.C.width,a.C.height);m=b.getUniformLocation(this.Zd,"uColor");e=h.Wb;b.uniform3f(m,(e>>16&255)/255,(e>>8&255)/255,(e&255)/255);var r=b.getUniformLocation(this.Zd,"uAlpha");b.uniform1f(r,h.Vb*n);b.vertexAttribPointer(this.Zd.ja,3,b.FLOAT,!1,0,0);b.drawArrays(b.LINE_LOOP,0,q.length/3);e=h.Ub;b.uniform3f(m,(e>>16&255)/255,(e>>8&255)/255,(e&255)/
255);b.uniform1f(r,h.Tb*n);b.enable(b.STENCIL_TEST);b.clearStencil(0);b.clear(b.STENCIL_BUFFER_BIT);b.colorMask(!1,!1,!1,!1);b.stencilFunc(b.ALWAYS,1,1);b.stencilOp(b.INCR,b.INCR,b.INCR);b.drawArrays(b.TRIANGLE_FAN,0,q.length/3);b.colorMask(!0,!0,!0,!0);b.stencilFunc(b.EQUAL,1,1);b.stencilOp(b.ZERO,b.ZERO,b.ZERO);b.drawArrays(b.TRIANGLE_FAN,0,q.length/3);b.disable(b.BLEND);b.enable(b.DEPTH_TEST);b.disable(b.STENCIL_TEST);b.useProgram(this.P)}}}}};v.prototype.bv=function(){var f=this.o,e=this.N,a=
e.M;if(f.C.width!=f.ea.offsetWidth||f.C.height!=f.ea.offsetHeight)f.C.width=f.ea.offsetWidth,f.C.height=f.ea.offsetHeight;f.se&&(f.Rc(0),f.fc());if(f.R){var b=f.R;this.gk();b.clear(b.COLOR_BUFFER_BIT|b.DEPTH_BUFFER_BIT|b.STENCIL_BUFFER_BIT);b.disable(b.DEPTH_TEST);b.disable(b.CULL_FACE);b.useProgram(this.vh);var c=b.getUniformLocation(this.vh,"uRect");b.uniform2f(b.getUniformLocation(this.vh,"uCanvasDimensions"),f.C.width,f.C.height);b.activeTexture(b.TEXTURE0);b.bindBuffer(b.ELEMENT_ARRAY_BUFFER,
this.wd);var h=b.getAttribLocation(this.vh,"aVertexPosition");b.disableVertexAttribArray(0);b.disableVertexAttribArray(1);b.disableVertexAttribArray(2);b.enableVertexAttribArray(h);b.bindBuffer(b.ARRAY_BUFFER,this.cf);b.vertexAttribPointer(h,2,b.FLOAT,!1,0,0);e.fe=0;var m=100/f.fov.m;var n=a.width/a.height;h=f.C.height*m*n;m*=f.C.height;n=(f.pan.m/100/n-.5)*h+f.C.width/2;for(var q=(f.u.m/100-.5)*m+f.C.height/2,r,t,x,z=0;a.levels.length>=z+2&&a.levels[z+1].width>h;)z++;var C;var F=[];for(C=a.levels.length-
1;C>=z;){var E=a.levels[C];if(E.cache){var D={Oc:0,Bd:0};D.Gd=E.Y-1;D.Hd=E.ta-1}else{D={};r=-q/m*(E.height/a.V);t=(-n+f.C.width)/h*(E.width/a.V);var A=(-q+f.C.height)/m*(E.height/a.V);D.Oc=Math.min(Math.max(0,Math.floor(-n/h*(E.width/a.V))),E.Y-1);D.Bd=Math.min(Math.max(0,Math.floor(r)),E.ta-1);D.Gd=Math.min(Math.max(0,Math.floor(t)),E.Y-1);D.Hd=Math.min(Math.max(0,Math.floor(A)),E.ta-1)}F[C]=D;var G=!0;for(t=D.Bd;t<=D.Hd;t++)for(r=D.Oc;r<=D.Gd;r++)x=r+t*E.Y,A=E.La[x],A||(A=new y.Zg,E.La[x]=A),this.bj()?
A.M||(this.Aj(A,E,e.Jg(0,C,r,t)),f.tb=!0):e.fe++,A.M&&A.M.complete||(G=!1),A.visible=!0;D.No=G;C--}for(C=a.levels.length-1;C>=z;){E=a.levels[C];if(F[C]&&0<=F[C].Oc)for(D=F[C],t=D.Bd;t<=D.Hd;t++)for(r=D.Oc;r<=D.Gd;r++)x=r+t*E.Y,(A=E.La[x])&&A.M&&A.M.complete&&(f=n+(-a.gb+a.V*r)*h/E.width,b.uniform4f(c,f,q+(-a.gb+a.V*t)*m/E.height,A.M.width*h/E.width,A.M.height*m/E.height),A&&A.Nb&&(b.bindBuffer(b.ELEMENT_ARRAY_BUFFER,this.wd),b.bindTexture(b.TEXTURE_2D,A.Nb),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MAG_FILTER,
b.LINEAR),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MIN_FILTER,b.LINEAR),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_WRAP_S,b.CLAMP_TO_EDGE),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_WRAP_T,b.CLAMP_TO_EDGE),b.drawElements(b.TRIANGLES,6,b.UNSIGNED_SHORT,0)));C--}this.Yl()}};v.prototype.Df=function(){var f=this.o.R;if(f&&this.eb)for(;0<this.eb.length;){var e=this.eb.pop();e.nt=!0;f.deleteTexture(e)}this.Qc&&(f.deleteTexture(this.Qc),this.Qc=null);this.Xf=1E6;this.Yi=[!1,!1,!1,!1,!1,!1]};return v}();y.Gq=w})(ggP2VR||
(ggP2VR={}));(function(y){var w=function(){return function(){this.gi={xh:1,yh:1,Vh:0,Wh:0,Ki:0,mk:0,scale:1};this.oc=!0;this.Sf=[]}}();y.Bq=function(){return function(){var v;this.dg=Array(6);for(v=0;6>v;v++)this.dg[v]=new w}}()})(ggP2VR||(ggP2VR={}));
(function(y){y.zq=function(){return function(){this.levels=[];this.Lj="0x000000";this.jp=!1;this.Po=this.Oo=.4;this.V=512;this.gb=1;this.El=0;this.Fl="";this.rp=this.height=this.width=0}}();y.Um=function(){return function(){this.height=this.width=0;this.Cf=this.cache=!1;this.ta=this.Y=0;this.loaded=!1;this.La=[]}}();y.Zg=function(){return function(){this.loaded=this.visible=!1;this.Ke=this.Xl=0;this.kg=[];this.nl=0;this.mb=[];this.vj=this.Ph=this.Oa=0}}()})(ggP2VR||(ggP2VR={}));
(function(y){var w=function(){function v(f,e){this.o=f;this.S=e;var a=this.__div=document.createElement("div");a.ggVisible=!0;var b=document.createElement("img");if(e.gd){var c=e.gd;b.setAttribute("style","position: absolute; width: "+e.df+"px; height: "+e.xd+"px; top: -"+e.xd/2+"px; left: -"+e.df/2+"px; cursor: pointer; "+f.kb+"user-select: none; max-width: none;")}else c="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA5xJREFUeNqclmlIVFEUx997TjrplFQW2WKBBSYtRFlpWUILSSsRZRQIBdGHCFqIoKIvQRsUFRJC9LEgaSFbMMpcWi1pLzOLsjItKms0U5t5/c/wH7nc5o2jF374xrv87z33nHOPaRsRtbFgDpgJxoD+wATfwDNQDK6CyrCr5OcbhgiGIRsUAZt4QTWoIFXgp9JfAhY7rgdBl8NeBoLDYBloA+dBOagFTcDHcVEgDgwBGWA+OAcugvXgvb5wKMGJoAAMp9BpUA96EBf/Btsf8BI8AWfAErAcpHHDZeriliY2AVwDg8AucAQ0Ag+I4XhTm2Oxz8PT46KMbTx5EZjuJDgAnAVusJUm9DhYwalFcc59sIXXIaceFkowDySBPTRPL20xm+b7zYXa+N3CPrWJ6GuwGySA40HLBHc/GywFhbS5R1lEBrZy7FQwiSaX9pmnqeAYt+KUcew7BVZw/QKTq0ocpYPVvDOXItZCk2xgDIZqL8BR8Ab0VDbr4yZOgLeIwzQx6WiQxcCt1+6sld66L4yYtFSwF4yg2dU7/cEwGW9YVkAwmycp1dzdpvgm0DcCh4kHmxWzBls0uBX4qqmZJ4KzePm1IeJLgjmlC16aDKZpp5Q168B3o6wsSwTHgU+MIUs74RSj6y1d+212HKimJlUE+tFRfJpYtOKNXWmJTASqWf2Bu/R6+4TKHOrOzG4IhptjWgHbGkZvepQ6SQK7oRuCXzjX1DJavBEX1ygfT8FgBqpfm1zRDcEKbR2bsZlkJCdXieB1ZhZ5YtqVgXIPN+m9kbY6hpdb+d9fPncJRmZmqQheZkemJmgxyxykl3XWJEkcAl7N21s7PDcl5ZJ0PAa3wVwmWtVbZafPwQ7wLozYB7ATPNJO56d/LAikP9u+66KNJS1d4IOZp7wU0hfLukUyzgwm70T2N/DOxIy/eFdqawa5DL2NEGwP5k15Ja4woz9glvcomd9NzyvkFcQo5gomaLfm5c0svnKZ2k7q7+FauvR2MJKZR3+sY5WgtvkdG6JyELGhNHMTXyGfLviRJ5Tcd4Dlhle7086Sgp8CqVxDkn4OqHaqacr5ekjy3Q/W0FRNNGmoMtamdzdxsytZC0lqXKhEgWPVVgImg2NgFT1MHOoOk3yLEtgWN5TEOYvoIFI1rGM19//2wpAD7imF7lfwENwAxaASNCj90pcLLKdC2Iyw1M9gnEplMEp5kOU1f8WwKGJm8oUr9f8JMAAVMDM6HSDa9QAAAABJRU5ErkJggg%3D%3D",
b.setAttribute("style","position: absolute; width: 28px; height: 28px; top: -14px; left: -14px; cursor: pointer; "+f.kb+"user-select: none; max-width: none;");b.setAttribute("src",c);b.ondragstart=function(){return!1};a.appendChild(b);c="position:absolute;"+(f.kb+"user-select: none;");c+=f.kb+"touch-callout: none;";c+=f.kb+"tap-highlight-color: rgba(0,0,0,0);";f.Sc&&!f.na&&(c+=f.kb+"transform: translateZ(9999999px);");a.setAttribute("style",c);a.onclick=function(){f.Ne(e);f.Ll(f.ab(e.url),e.target);
f.ga&&f.ga.hotspotProxyClick&&f.ga.hotspotProxyClick(e.id,e.url);f.H("hsproxyclick",{id:e.id,url:e.url})};a.ondblclick=function(){f.ga&&f.ga.hotspotProxyDoubleClick&&f.ga.hotspotProxyDoubleClick(e.id,e.url);f.H("hsproxydblclick",{id:e.id,url:e.url})};var h=f.K.ck;if(h.enabled&&""!=e.title){var m=document.createElement("div");c="position:absolute;";c=e.gd?f.el()?c+("top: -"+(e.xd/2+20)+"px;"):c+("top: "+e.xd/2+"px;"):f.el()?c+"top:\t -50px;":c+"top:\t 20px;";c=h.nk?c+"white-space: pre-wrap;":c+"white-space: nowrap;";
c+=f.kb+"transform-origin: 50% 50%;";m.setAttribute("style",c+"visibility: hidden;overflow: hidden;padding: 0px 1px 0px 1px;");m.style.color=this.o.oa(h.dk,h.bk);m.style.backgroundColor=h.background?this.o.oa(h.Ub,h.Tb):"transparent";m.style.border="solid "+this.o.oa(h.Wb,h.Vb)+" "+h.Si+"px";m.style.borderRadius=h.xk+"px";m.style.textAlign="center";0<h.width?(m.style.left=-h.width/2+"px",m.style.width=h.width+"px"):m.style.width="auto";m.style.height=0<h.height?h.height+"px":"auto";m.style.overflow=
"hidden";m.innerHTML=f.ab(e.title);m.classList.add("ggskin");m.classList.add("ggdefaulthotspot");a.addEventListener("mouseover",function(){0==h.width&&(m.style.left=-m.offsetWidth/2+"px");m.style.visibility="inherit";f.ga&&f.ga.hotspotProxyOver&&f.ga.hotspotProxyOver(e.id,e.url);f.H("hsproxyover",{id:e.id,url:e.url})});a.addEventListener("mouseout",function(){m.style.visibility="hidden";f.ga&&f.ga.hotspotProxyOut&&f.ga.hotspotProxyOut(e.id,e.url);f.H("hsproxyout",{id:e.id,url:e.url})});a.appendChild(m);
this.bq=m}a.addEventListener("mouseover",function(){f.Ne(e)});a.addEventListener("mouseout",function(){f.Ne(null)})}v.prototype.Es=function(){this.bq&&(this.bq.innerHTML=this.o.ab(this.S.title))};return v}();y.vq=w})(ggP2VR||(ggP2VR={}));
(function(y){y.ed=function(){return function(){this.value=this.time=0;this.Jm="";this.$e=this.Ze=this.Ye=this.Xe=this.hb=this.type=this.Fb=0;this.sd="";this.Xm=0}}();y.Rm=function(){return function(){this.Xu=this.Pq=this.length=0}}();y.Qm=function(){return function(){}}()})(ggP2VR||(ggP2VR={}));
(function(y){var w=function(){function v(f){this.o=f;this.enabled=!1;this.dh=1;this.Rf=0;this.type="crossdissolve";this.dd=this.da=this.Yc=0;this.rk=20;this.pk=90;this.qk=20;this.Yg=1;this.Xg=!1;this.wm=this.vm=this.Vp=0;this.Bi=70;this.tq=0;this.Gb=this.sq=1;this.Wg=this.Vg=.5;this.We=this.ke=!1;this.Ok=1}v.prototype.Ih=function(){var f=this.o.R,e=f.createShader(f.VERTEX_SHADER);f.shaderSource(e,"attribute vec3 aVertexPosition;\nattribute vec2 aTextureCoord;\nvarying vec2 vTextureCoord;\nuniform bool uZoomIn;\nuniform float uZoomFactor;\nuniform vec2 uZoomCenter;\nvoid main(void) {\n\t gl_Position = vec4(aVertexPosition, 1.0);\n\t if(!uZoomIn) {\n\t \n\t   vTextureCoord = aTextureCoord;\n\t }\n\t else {\n\t   vTextureCoord = (aTextureCoord - vec2(0.5, 0.5)) * (1.0/uZoomFactor) + uZoomCenter;\n\t }\n}\n");
f.compileShader(e);f.getShaderParameter(e,f.COMPILE_STATUS)||(alert(f.getShaderInfoLog(e)),e=null);var a=f.createShader(f.FRAGMENT_SHADER);f.shaderSource(a,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nvarying vec2 vTextureCoord;\nuniform float uAlpha;\nuniform sampler2D uSampler;\nvoid main(void) {\n vec4 textureColor = texture2D(uSampler, vec2(vTextureCoord.s, vTextureCoord.t));\n gl_FragColor = vec4(textureColor.x, textureColor.y, textureColor.z, uAlpha);\n}\n");
f.compileShader(a);f.getShaderParameter(a,f.COMPILE_STATUS)||(alert(f.getShaderInfoLog(a)),a=null);this.Aa=f.createProgram();f.attachShader(this.Aa,e);f.attachShader(this.Aa,a);f.linkProgram(this.Aa);f.getProgramParameter(this.Aa,f.LINK_STATUS)||alert("Could not initialise shaders");this.Aa.ja=f.getAttribLocation(this.Aa,"aVertexPosition");f.enableVertexAttribArray(this.Aa.ja);this.Aa.Ka=f.getAttribLocation(this.Aa,"aTextureCoord");f.enableVertexAttribArray(this.Aa.Ka);a=f.createShader(f.FRAGMENT_SHADER);
f.shaderSource(a,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nvarying vec2 vTextureCoord;\nuniform float uColorPercent;\nuniform float uAlpha;\nuniform vec3 uDipColor;\nuniform sampler2D uSampler;\nvoid main(void) {\n vec4 textureColor = texture2D(uSampler, vec2(vTextureCoord.s, vTextureCoord.t));\n gl_FragColor = vec4(textureColor.x * (1.0 - uColorPercent) + uDipColor.x * uColorPercent, textureColor.y * (1.0 - uColorPercent) + uDipColor.y * uColorPercent, textureColor.z * (1.0 - uColorPercent) + uDipColor.z * uColorPercent, uAlpha);\n}\n");
f.compileShader(a);f.getShaderParameter(a,f.COMPILE_STATUS)||(alert(f.getShaderInfoLog(a)),a=null);this.ib=f.createProgram();f.attachShader(this.ib,e);f.attachShader(this.ib,a);f.linkProgram(this.ib);f.getProgramParameter(this.ib,f.LINK_STATUS)||alert("Could not initialise shaders");this.ib.ja=f.getAttribLocation(this.ib,"aVertexPosition");f.enableVertexAttribArray(this.ib.ja);this.ib.Ka=f.getAttribLocation(this.ib,"aTextureCoord");f.enableVertexAttribArray(this.ib.Ka);a=f.createShader(f.FRAGMENT_SHADER);
f.shaderSource(a,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nvarying vec2 vTextureCoord;\nuniform bool uRound;\nuniform float uRadius;\nuniform vec2 uRectDim;\nuniform vec2 uIrisCenter;\nuniform float uSoftEdge;\nuniform sampler2D uSampler;\nvoid main(void) {\n float alpha = 0.0;\n vec4 textureColor = texture2D(uSampler, vec2(vTextureCoord.s, vTextureCoord.t));\n if (uRound) {\n\t  vec2 diff = uIrisCenter - gl_FragCoord.xy;\n\t   float distFromCenter = sqrt( (diff.x * diff.x) + (diff.y * diff.y) );\n\t   if (distFromCenter > uRadius) {\n      alpha = 1.0;\n    } else {\n      alpha = 1.0 - ((uRadius - distFromCenter) / uSoftEdge);\n    };\n }\n else {\n    float alphaFromLeft = 1.0 - ((gl_FragCoord.x -(uIrisCenter.x - uRectDim.x)) / uSoftEdge);\n    float alphaFromRight = 1.0 - (((uIrisCenter.x + uRectDim.x) - gl_FragCoord.x) / uSoftEdge);\n    float alphaFromTop = 1.0 - ((gl_FragCoord.y -(uIrisCenter.y - uRectDim.y)) / uSoftEdge);\n    float alphaFromBottom = 1.0 - (((uIrisCenter.y + uRectDim.y) - gl_FragCoord.y) / uSoftEdge);\n    alpha = max(max(alphaFromLeft, alphaFromRight), max(alphaFromTop, alphaFromBottom));\n }\n gl_FragColor = vec4(textureColor.x, textureColor.y, textureColor.z, alpha);\n}\n");
f.compileShader(a);f.getShaderParameter(a,f.COMPILE_STATUS)||(alert(f.getShaderInfoLog(a)),a=null);this.Sa=f.createProgram();f.attachShader(this.Sa,e);f.attachShader(this.Sa,a);f.linkProgram(this.Sa);f.getProgramParameter(this.Sa,f.LINK_STATUS)||alert("Could not initialise shaders");this.Sa.ja=f.getAttribLocation(this.Sa,"aVertexPosition");f.enableVertexAttribArray(this.Sa.ja);this.Sa.Ka=f.getAttribLocation(this.Sa,"aTextureCoord");f.enableVertexAttribArray(this.Sa.Ka);a=f.createShader(f.FRAGMENT_SHADER);
f.shaderSource(a,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nvarying vec2 vTextureCoord;\nuniform float uPercent;\nuniform int uDirection;\nuniform vec2 uCanvasDimensions;\nuniform float uSoftEdge;\nuniform sampler2D uSampler;\nvoid main(void) {\n vec4 textureColor = texture2D(uSampler, vec2(vTextureCoord.s, vTextureCoord.t));\n float alpha = 0.0;\n if (uDirection == 1) {\n\t if (gl_FragCoord.x > uPercent) {\n    alpha = 1.0; \n  } else {\n    alpha = 1.0 - ((uPercent - gl_FragCoord.x) / uSoftEdge);\n  }\n }\n if (uDirection == 2) {\n\t if (gl_FragCoord.x < uCanvasDimensions.x - uPercent) {\n    alpha = 1.0; \n  } else {\n    alpha = 1.0 - ((gl_FragCoord.x - (uCanvasDimensions.x - uPercent)) / uSoftEdge);\n  }\n }\n if (uDirection == 3) {\n\t if (gl_FragCoord.y < uCanvasDimensions.y - uPercent) {\n    alpha = 1.0; \n  } else {\n    alpha = 1.0 - ((gl_FragCoord.y - (uCanvasDimensions.y - uPercent)) / uSoftEdge);\n  }\n }\n if (uDirection == 4) {\n\t if (gl_FragCoord.y > uPercent) {\n    alpha = 1.0; \n  } else {\n    alpha = 1.0 - ((uPercent - gl_FragCoord.y) / uSoftEdge);\n  }\n }\n gl_FragColor = vec4(textureColor.x, textureColor.y, textureColor.z, alpha);\n}\n");
f.compileShader(a);f.getShaderParameter(a,f.COMPILE_STATUS)||(alert(f.getShaderInfoLog(a)),a=null);this.$a=f.createProgram();f.attachShader(this.$a,e);f.attachShader(this.$a,a);f.linkProgram(this.$a);f.getProgramParameter(this.$a,f.LINK_STATUS)||alert("Could not initialise shaders");this.$a.ja=f.getAttribLocation(this.$a,"aVertexPosition");f.enableVertexAttribArray(this.$a.ja);this.$a.Ka=f.getAttribLocation(this.$a,"aTextureCoord");f.enableVertexAttribArray(this.$a.Ka)};v.prototype.Rc=function(){var f=
this.o.R;if(!f)return!1;if(this.Bc=f.createFramebuffer()){f.bindFramebuffer(f.FRAMEBUFFER,this.Bc);this.Bc.width=1024;this.Bc.height=1024;this.If=f.createTexture();f.bindTexture(f.TEXTURE_2D,this.If);f.texParameteri(f.TEXTURE_2D,f.TEXTURE_MIN_FILTER,f.LINEAR);f.texParameteri(f.TEXTURE_2D,f.TEXTURE_MAG_FILTER,f.LINEAR);f.texImage2D(f.TEXTURE_2D,0,f.RGBA,this.Bc.width,this.Bc.height,0,f.RGBA,f.UNSIGNED_BYTE,null);var e=f.createRenderbuffer();f.bindRenderbuffer(f.RENDERBUFFER,e);f.renderbufferStorage(f.RENDERBUFFER,
f.DEPTH_COMPONENT16,this.Bc.width,this.Bc.height);f.framebufferTexture2D(f.FRAMEBUFFER,f.COLOR_ATTACHMENT0,f.TEXTURE_2D,this.If,0);f.framebufferRenderbuffer(f.FRAMEBUFFER,f.DEPTH_ATTACHMENT,f.RENDERBUFFER,e);f.bindTexture(f.TEXTURE_2D,null);f.bindRenderbuffer(f.RENDERBUFFER,null);f.bindFramebuffer(f.FRAMEBUFFER,null);this.wb=f.createBuffer();f.bindBuffer(f.ARRAY_BUFFER,this.wb);f.bufferData(f.ARRAY_BUFFER,new Float32Array([-1,-1,0,1,-1,0,-1,1,0,1,1,0]),f.STATIC_DRAW);this.wb.itemSize=3;this.wb.Ge=
4;this.wg=f.createBuffer();f.bindBuffer(f.ARRAY_BUFFER,this.wg);f.bufferData(f.ARRAY_BUFFER,new Float32Array([0,0,1,0,0,1,1,1]),f.STATIC_DRAW);return!0}return!1};v.prototype.Nl=function(f){var e=this.o.R,a=this.o.Ab;if(this.Jd){e.useProgram(this.Aa);e.bindBuffer(e.ARRAY_BUFFER,this.wb);e.vertexAttribPointer(this.Aa.ja,this.wb.itemSize,e.FLOAT,!1,0,0);e.bindBuffer(e.ARRAY_BUFFER,this.wg);e.vertexAttribPointer(this.Aa.Ka,2,e.FLOAT,!1,0,0);e.enableVertexAttribArray(this.Aa.ja);e.enableVertexAttribArray(this.Aa.Ka);
e.activeTexture(e.TEXTURE0);e.bindTexture(e.TEXTURE_2D,this.If);a=1+(this.Gb-1)*f;var b=e.getUniformLocation(this.Aa,"uAlpha");e.uniform1f(b,1);b=e.getUniformLocation(this.Aa,"uZoomIn");e.uniform1i(b,1);b=e.getUniformLocation(this.Aa,"uZoomCenter");var c=.5+(this.Vg-.5)*Math.sqrt(f),h=.5+(this.Wg-.5)*Math.sqrt(f);0>c-.5/a&&(c=.5/a);0>h-.5/a&&(h=.5/a);1<c+.5/a&&(c=1-.5/a);1<h+.5/a&&(h=1-.5/a);e.uniform2f(b,c,h);c=e.getUniformLocation(this.Aa,"uZoomFactor");e.uniform1f(c,a);e.uniform1i(e.getUniformLocation(this.Aa,
"uSampler"),0);e.drawArrays(e.TRIANGLE_STRIP,0,this.wb.Ge);e.useProgram(this.o.sa.P)}else{this.o.Hi();e.blendFuncSeparate(e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA,e.SRC_ALPHA,e.ONE);e.enable(e.BLEND);e.disable(e.DEPTH_TEST);c=.5+(this.Vg-.5);h=.5+(this.Wg-.5);0>c-.5/this.Gb&&(c=.5/this.Gb);0>h-.5/this.Gb&&(h=.5/this.Gb);1<c+.5/this.Gb&&(c=1-.5/this.Gb);1<h+.5/this.Gb&&(h=1-.5/this.Gb);if("crossdissolve"==this.type)e.useProgram(this.Aa),e.bindBuffer(e.ARRAY_BUFFER,this.wb),e.vertexAttribPointer(this.Aa.ja,
this.wb.itemSize,e.FLOAT,!1,0,0),e.bindBuffer(e.ARRAY_BUFFER,this.wg),e.vertexAttribPointer(this.Aa.Ka,2,e.FLOAT,!1,0,0),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,this.If),b=e.getUniformLocation(this.Aa,"uAlpha"),e.uniform1f(b,1-f),b=e.getUniformLocation(this.Aa,"uZoomIn"),e.uniform1i(b,1==this.da||2==this.da||6==this.da||7==this.da?1:0),b=e.getUniformLocation(this.Aa,"uZoomCenter"),e.uniform2f(b,c,h),c=e.getUniformLocation(this.Aa,"uZoomFactor"),e.uniform1f(c,this.Gb),e.uniform1i(e.getUniformLocation(this.Aa,
"uSampler"),0);else if("diptocolor"==this.type)e.useProgram(this.ib),e.bindBuffer(e.ARRAY_BUFFER,this.wb),e.vertexAttribPointer(this.ib.ja,this.wb.itemSize,e.FLOAT,!1,0,0),e.bindBuffer(e.ARRAY_BUFFER,this.wg),e.vertexAttribPointer(this.ib.Ka,2,e.FLOAT,!1,0,0),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,this.If),e.uniform1f(e.getUniformLocation(this.ib,"uColorPercent"),Math.min(2*f,1)),b=e.getUniformLocation(this.ib,"uAlpha"),e.uniform1f(b,1-Math.max(2*(f-.5),0)),e.uniform3f(e.getUniformLocation(this.ib,
"uDipColor"),(this.Rf>>16&255)/255,(this.Rf>>8&255)/255,(this.Rf&255)/255),b=e.getUniformLocation(this.ib,"uZoomIn"),e.uniform1i(b,1==this.da||2==this.da||6==this.da||7==this.da?1:0),b=e.getUniformLocation(this.ib,"uZoomCenter"),e.uniform2f(b,c,h),c=e.getUniformLocation(this.ib,"uZoomFactor"),e.uniform1f(c,this.Gb),e.uniform1i(e.getUniformLocation(this.ib,"uSampler"),0);else if("irisround"==this.type||"irisroundcenter"==this.type||"irisrectangular"==this.type||"irisrectangularcenter"==this.type){e.useProgram(this.Sa);
e.bindBuffer(e.ARRAY_BUFFER,this.wb);e.vertexAttribPointer(this.Sa.ja,this.wb.itemSize,e.FLOAT,!1,0,0);e.bindBuffer(e.ARRAY_BUFFER,this.wg);e.vertexAttribPointer(this.Sa.Ka,2,e.FLOAT,!1,0,0);e.activeTexture(e.TEXTURE0);e.bindTexture(e.TEXTURE_2D,this.If);if(1==this.da||2==this.da||6==this.da||7==this.da||"irisroundcenter"==this.type||"irisrectangularcenter"==this.type)var m=b=.5;else b=this.Vg,m=this.Wg;var n=b*a.width,q=m*a.height;n=Math.max(n,a.width-n);q=Math.max(q,a.height-q);"irisround"==this.type||
"irisroundcenter"==this.type?e.uniform1f(e.getUniformLocation(this.Sa,"uRadius"),(Math.sqrt(n*n+q*q)+this.Yc)*f):(n>q?(q=a.height/a.width*n+this.Yc,n+=this.Yc):(n=a.width/a.height*q+this.Yc,q+=this.Yc),e.uniform2f(e.getUniformLocation(this.Sa,"uRectDim"),n*f,q*f));f=e.getUniformLocation(this.Sa,"uSoftEdge");e.uniform1f(f,this.Yc);e.uniform1i(e.getUniformLocation(this.Sa,"uRound"),"irisround"==this.type||"irisroundcenter"==this.type?1:0);e.uniform2f(e.getUniformLocation(this.Sa,"uIrisCenter"),b*a.width,
m*a.height);b=e.getUniformLocation(this.Sa,"uZoomIn");e.uniform1i(b,1==this.da||2==this.da||6==this.da||7==this.da?1:0);b=e.getUniformLocation(this.Sa,"uZoomCenter");e.uniform2f(b,c,h);c=e.getUniformLocation(this.Sa,"uZoomFactor");e.uniform1f(c,this.Gb);e.uniform1i(e.getUniformLocation(this.Sa,"uSampler"),0)}else if("wipeleftright"==this.type||"wiperightleft"==this.type||"wipetopbottom"==this.type||"wipebottomtop"==this.type||"wiperandom"==this.type)e.useProgram(this.$a),e.bindBuffer(e.ARRAY_BUFFER,
this.wb),e.vertexAttribPointer(this.$a.ja,this.wb.itemSize,e.FLOAT,!1,0,0),e.bindBuffer(e.ARRAY_BUFFER,this.wg),e.vertexAttribPointer(this.$a.Ka,2,e.FLOAT,!1,0,0),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,this.If),e.uniform1f(e.getUniformLocation(this.$a,"uPercent"),3>this.Ok?f*(a.width+this.Yc):f*(a.height+this.Yc)),f=e.getUniformLocation(this.$a,"uSoftEdge"),e.uniform1f(f,this.Yc),e.uniform1i(e.getUniformLocation(this.$a,"uDirection"),this.Ok),e.uniform2f(e.getUniformLocation(this.$a,
"uCanvasDimensions"),a.width,a.height),b=e.getUniformLocation(this.$a,"uZoomIn"),e.uniform1i(b,1==this.da||2==this.da||6==this.da||7==this.da?1:0),b=e.getUniformLocation(this.$a,"uZoomCenter"),e.uniform2f(b,c,h),c=e.getUniformLocation(this.$a,"uZoomFactor"),e.uniform1f(c,this.Gb),e.uniform1i(e.getUniformLocation(this.$a,"uSampler"),0);e.drawArrays(e.TRIANGLE_STRIP,0,this.wb.Ge);e.useProgram(this.o.sa.P);e.disable(e.BLEND);e.enable(e.DEPTH_TEST)}};return v}();y.xq=w})(ggP2VR||(ggP2VR={}));
(function(y){var w=function(){function v(f){this.Gi=[];this.o=f;this.enabled=!1;this.Fb=2;this.vn=!1}v.prototype.Fn=function(f){if(2==f.mode||3==f.mode||5==f.mode){var e=this.o.ra.currentTime;if(f.ub&&f.ub.gain&&f.Lb&&f.Jb&&f.Kb){var a=f.Lb.gain.value,b=f.Jb.gain.value,c=f.Kb.gain.value;f.ub.gain.linearRampToValueAtTime(f.ub.gain.value,e);f.ub.gain.linearRampToValueAtTime(0,e+this.Fb);f.Lb.gain.linearRampToValueAtTime(a,e);f.Lb.gain.linearRampToValueAtTime(0,e+this.Fb);f.Jb.gain.linearRampToValueAtTime(b,
e);f.Jb.gain.linearRampToValueAtTime(0,e+this.Fb);f.Kb.gain.linearRampToValueAtTime(c,e);f.Kb.gain.linearRampToValueAtTime(0,e+this.Fb)}}else e=this.o.ra.currentTime,f.Ib&&f.Ib.gain&&(f.Ib.gain.linearRampToValueAtTime(f.Ib.gain.value,e),f.Ib.gain.linearRampToValueAtTime(0,e+this.Fb));f.Wk=!0;setTimeout(function(){f.Le()},1E3*this.Fb+5)};v.prototype.Lu=function(){for(var f=0;f<this.o.X.length;f++){var e=this.o.X[f];!e.stopped&&!this.o.isPlaying(e.id)&&-1<e.loop&&4!=e.mode&&6!=e.mode&&(e.wa?e.ne():
(e.Ld&&e.Of(),e.j.play(),e.j.currentTime=0))}};v.prototype.sr=function(){var f=(this.o.ra.currentTime-this.Hu)/this.Fb;f=Math.min(1,f);for(var e=0;e<this.o.X.length;e++){var a=this.o.X[e];this.o.isPlaying(a.id)&&1>a.va&&(a.va=f)}1==f&&clearInterval(this.Gu)};return v}();y.yq=w})(ggP2VR||(ggP2VR={}));
(function(y){var w=function(){function v(f){this.Th=[];this.ud=null;this.yc=[];this.kc=[];this.zc=[];this.mm=!0;this.o=f;this.hr()}v.prototype.Ih=function(){var f=this.o.R,e=f.createShader(f.VERTEX_SHADER);f.shaderSource(e,"attribute vec3 aVertexPosition;\nvoid main(void) {\n gl_Position = vec4(aVertexPosition, 1.0);\n}\n");f.compileShader(e);f.getShaderParameter(e,f.COMPILE_STATUS)||(alert(f.getShaderInfoLog(e)),e=null);var a=f.createShader(f.FRAGMENT_SHADER);f.shaderSource(a,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nvarying vec4 vColor;\nuniform vec2 uCanvasDimensions;\nuniform vec2 uFlareCenterPosition;\nuniform float uBlindingValue;\nuniform float uAspectRatio;\nvoid main(void) {\n float canvasDiag = sqrt( (uCanvasDimensions.x * uCanvasDimensions.x) + (uCanvasDimensions.y * uCanvasDimensions.y) );\n vec2 diff = uFlareCenterPosition - gl_FragCoord.xy;\n diff.y = diff.y * uAspectRatio;\n float distFromFlarePoint = sqrt( (diff.x * diff.x) + (diff.y * diff.y) );\n float factor = (distFromFlarePoint / canvasDiag) / 10.0;\n gl_FragColor = vec4(1.0, 1.0, 1.0, pow(((1.0 - factor) * 0.8) * uBlindingValue, 2.0));\n}\n");
f.compileShader(a);f.getShaderParameter(a,f.COMPILE_STATUS)||(alert(f.getShaderInfoLog(a)),a=null);this.Dc=f.createProgram();f.attachShader(this.Dc,e);f.attachShader(this.Dc,a);f.linkProgram(this.Dc);f.getProgramParameter(this.Dc,f.LINK_STATUS)||alert("Could not initialise shaders");this.Dc.ja=f.getAttribLocation(this.Dc,"aVertexPosition");f.enableVertexAttribArray(this.Dc.ja);a=f.createShader(f.VERTEX_SHADER);e=f.createShader(f.VERTEX_SHADER);f.shaderSource(a,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nattribute vec3 aVertexPosition;\nvarying vec4 vColor;\nuniform vec2 uCirclePosition;\nuniform float uCircleRadius;\nuniform vec2 uCanvasDimensions2;\nuniform float uAspectRatio;\nvoid main(void) {\n vec2 circleOnScreen = aVertexPosition.xy * uCircleRadius + uCirclePosition;\n circleOnScreen.y = circleOnScreen.y / uAspectRatio;\n vec2 circleNorm = (circleOnScreen / uCanvasDimensions2) * 2.0 - vec2(1.0, 1.0);\n gl_Position = vec4(circleNorm.x, circleNorm.y, 0.0, 1.0);\n}\n");
f.compileShader(a);f.getShaderParameter(a,f.COMPILE_STATUS)||(alert(f.getShaderInfoLog(a)),a=null);f.shaderSource(e,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nattribute vec3 aVertexPosition;\nvarying vec4 vColor;\nuniform vec2 uCirclePosition;\nuniform float uCircleRadius;\nuniform vec2 uCanvasDimensions2;\nuniform float uAspectRatio;\nvoid main(void) {\n vec2 circleOnScreen = aVertexPosition.xy * uCircleRadius + uCirclePosition;\n circleOnScreen.y = circleOnScreen.y / uAspectRatio;\n vec2 circleNorm = (circleOnScreen / uCanvasDimensions2) * 2.0 - vec2(1.0, 1.0);\n gl_Position = vec4(circleNorm.x, circleNorm.y, 0.0, 1.0);\n}\n");
f.compileShader(e);f.getShaderParameter(e,f.COMPILE_STATUS)||(alert(f.getShaderInfoLog(e)),a=null);var b=f.createShader(f.FRAGMENT_SHADER);f.shaderSource(b,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nvarying vec4 vColor;\nuniform vec2 uCircleTexturePosition;\nuniform vec3 uCircleColor;\nuniform float uCircleRadius;\nuniform float uCircleAlpha;\nuniform float uCircleSoftness;\nuniform float uAspectRatio;\nvoid main(void) {\n vec2 diff = uCircleTexturePosition - gl_FragCoord.xy;\n diff.y = diff.y * uAspectRatio;\n float distFromCircleCenter = sqrt( (diff.x * diff.x) + (diff.y * diff.y) );\n float softnessDistance = uCircleRadius * (1.0 - uCircleSoftness);\n if (distFromCircleCenter > uCircleRadius)\n {\n\t  gl_FragColor = vec4(uCircleColor, 0.0);\n }\n else if (distFromCircleCenter <= (softnessDistance))\n {\n\t  float factor = distFromCircleCenter / softnessDistance;\n\t  gl_FragColor = vec4(uCircleColor, pow((1.0 - (0.2 * factor)) * uCircleAlpha, 1.8));\n }\n else\n {\n\t  float factor = (distFromCircleCenter - softnessDistance) / (uCircleRadius - softnessDistance);\n\t  gl_FragColor = vec4(uCircleColor, pow((0.8 - (0.8 * factor)) * uCircleAlpha, 1.8));\n }\n}\n");
f.compileShader(b);f.getShaderParameter(b,f.COMPILE_STATUS)||(alert(f.getShaderInfoLog(b)),b=null);this.Ba=f.createProgram();f.attachShader(this.Ba,a);f.attachShader(this.Ba,b);f.linkProgram(this.Ba);f.getProgramParameter(this.Ba,f.LINK_STATUS)||alert("Could not initialise shaders");this.Ba.ja=f.getAttribLocation(this.Ba,"aVertexPosition");f.enableVertexAttribArray(this.Ba.ja);a=f.createShader(f.FRAGMENT_SHADER);f.shaderSource(a,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nvarying vec4 vColor;\nuniform vec2 uRingTexturePosition;\nuniform float uRingRadius;\nuniform float uRingAlpha;\nuniform float uAspectRatio;\nuniform sampler2D uSampler;\nvoid main(void) {\n vec2 diff = uRingTexturePosition - gl_FragCoord.xy;\n diff.y = diff.y * uAspectRatio;\n float distFromRingCenter = sqrt( (diff.x * diff.x) + (diff.y * diff.y) );\n float factor = distFromRingCenter / uRingRadius;\n if (distFromRingCenter > uRingRadius)\n {\n\t gl_FragColor = vec4(1.0, 1.0, 1.0, 0.0);\n }\n else\n {\n vec4 textureColor = texture2D(uSampler, vec2(factor / uAspectRatio, 0.5));\n gl_FragColor = vec4(textureColor.x, textureColor.y, textureColor.z, uRingAlpha);\n }\n}\n");
f.compileShader(a);f.getShaderParameter(a,f.COMPILE_STATUS)||(alert(f.getShaderInfoLog(a)),a=null);this.Db=f.createProgram();f.attachShader(this.Db,e);f.attachShader(this.Db,a);f.linkProgram(this.Db);f.getProgramParameter(this.Db,f.LINK_STATUS)||alert("Could not initialise shaders");this.Db.ja=f.getAttribLocation(this.Db,"aVertexPosition")};v.prototype.Rc=function(){var f=this.o.R;this.Rd=f.createBuffer();f.bindBuffer(f.ARRAY_BUFFER,this.Rd);f.bufferData(f.ARRAY_BUFFER,new Float32Array([-1,-1,0,1,
-1,0,1,1,0,-1,1,0]),f.STATIC_DRAW);this.Rd.itemSize=3;this.Rd.Ge=4;this.fg=f.createBuffer();f.bindBuffer(f.ARRAY_BUFFER,this.fg);for(var e=[0,0,0],a=2*Math.PI/6,b=Math.PI/180*35,c=1,h=b;h<=b+2*Math.PI;h+=a)e.push(Math.sin(h)),e.push(-Math.cos(h)),e.push(0),c++;f.bufferData(f.ARRAY_BUFFER,new Float32Array(e),f.STATIC_DRAW);this.fg.itemSize=3;this.fg.Ge=c;this.vp=f.createTexture();f.bindTexture(f.TEXTURE_2D,this.vp);f.texParameteri(f.TEXTURE_2D,f.TEXTURE_MIN_FILTER,f.LINEAR);f.texParameteri(f.TEXTURE_2D,
f.TEXTURE_MAG_FILTER,f.LINEAR);f.texParameteri(f.TEXTURE_2D,f.TEXTURE_WRAP_S,f.CLAMP_TO_EDGE);f.texParameteri(f.TEXTURE_2D,f.TEXTURE_WRAP_T,f.CLAMP_TO_EDGE);e=document.createElement("canvas");e.width=100;e.height=1;a=e.getContext("2d");a.width=100;a.height=1;b=a.createLinearGradient(0,0,100,0);b.addColorStop(0,this.o.oa(0,0));b.addColorStop(.88,this.o.oa(0,0));b.addColorStop(.9,this.o.oa(16654848,1));b.addColorStop(.92,this.o.oa(16776448,1));b.addColorStop(.94,this.o.oa(4849466,1));b.addColorStop(.96,
this.o.oa(131071,1));b.addColorStop(.98,this.o.oa(8190,1));b.addColorStop(1,this.o.oa(0,0));a.fillStyle=b;a.fillRect(0,0,100,1);f.texImage2D(f.TEXTURE_2D,0,f.RGBA,f.RGBA,f.UNSIGNED_BYTE,e)};v.prototype.Nt=function(){for(;0<this.Th.length;)this.Th.pop()};v.prototype.hr=function(){var f=[],e=[],a=[];var b={radius:14,alpha:.2,color:11390415,A:.27};f.push(b);b={radius:20,alpha:.25,color:11390415,A:.4};f.push(b);b={radius:10,alpha:.2,color:12442332,A:.6};f.push(b);b={radius:15,alpha:.2,color:11390415,
A:.8};f.push(b);b={radius:10,alpha:.2,color:12442332,A:1.5};f.push(b);b={radius:15,alpha:.2,color:11390415,A:1.8};f.push(b);b={radius:8,alpha:.2,color:12575203,G:.8,A:.7};e.push(b);b={radius:7,alpha:.4,color:12575203,G:.5,A:1.6};e.push(b);b={radius:5,alpha:.4,color:12575203,G:.6,A:.9};e.push(b);b={radius:8,alpha:.3,color:12575203,G:.4,A:1.1};e.push(b);this.yc.push(f);this.kc.push(e);this.zc.push(a);f=[];e=[];a=[];b={radius:30,alpha:.3,color:11390415,A:.5};f.push(b);b={radius:10,alpha:.3,color:11390415,
A:1};f.push(b);b={radius:20,alpha:.3,color:11390415,A:1.3};f.push(b);b={radius:10,alpha:.3,color:11390415,A:1.5};f.push(b);b={radius:15,alpha:.3,color:11390415,A:1.8};f.push(b);b={radius:10,alpha:.3,color:15506856,G:.8,A:.7};e.push(b);b={radius:20,alpha:.5,color:15506856,G:.5,A:1.6};e.push(b);b={radius:5,alpha:.5,color:15506856,G:.6,A:.9};e.push(b);b={radius:60,alpha:.4,color:15506856,G:.2,A:1.1};e.push(b);a.push({radius:220,alpha:.035,A:2});this.yc.push(f);this.kc.push(e);this.zc.push(a);f=[];e=
[];a=[];b={radius:30,alpha:.5,color:15465727,A:.5};f.push(b);b={radius:40,alpha:.28,color:15726842,A:.8};f.push(b);b={radius:25,alpha:.32,color:15726842,A:1.1};f.push(b);b={radius:15,alpha:.25,color:15726842,A:1.35};f.push(b);b={radius:10,alpha:.28,color:15465727,A:1.65};f.push(b);b={radius:10,alpha:.45,color:15465727,G:.8,A:.7};e.push(b);b={radius:7,alpha:.5,color:15465727,G:.4,A:.9};e.push(b);b={radius:40,alpha:.4,color:15465727,G:.3,A:.38};e.push(b);b={radius:50,alpha:.4,color:15465727,G:.5,A:1.25};
e.push(b);b={radius:18,alpha:.2,color:15465727,G:.5,A:1.25};e.push(b);b={radius:10,alpha:.34,color:15726842,G:.8,A:1.5};e.push(b);b={radius:38,alpha:.37,color:15465727,G:.3,A:-.5};e.push(b);this.yc.push(f);this.kc.push(e);this.zc.push(a);f=[];e=[];a=[];b={radius:16,alpha:.5,color:16363159,A:.1};f.push(b);b={radius:26,alpha:.3,color:16091819,A:.32};f.push(b);b={radius:29,alpha:.2,color:16091819,A:1.32};f.push(b);b={radius:20,alpha:.18,color:16363159,A:1.53};f.push(b);b={radius:27,alpha:.13,color:16425092,
A:1.6};f.push(b);b={radius:20,alpha:.1,color:16091819,A:1.75};f.push(b);b={radius:12,alpha:.45,color:16312238,G:.45,A:.2};e.push(b);b={radius:8,alpha:.25,color:16434209,G:.7,A:.33};e.push(b);b={radius:9,alpha:.25,color:16091819,G:.4,A:.7};e.push(b);b={radius:7,alpha:.2,color:16091819,G:.4,A:.85};e.push(b);b={radius:60,alpha:.23,color:16091819,G:.55,A:1.05};e.push(b);b={radius:37,alpha:.1,color:16091819,G:.55,A:1.22};e.push(b);b={radius:10,alpha:.25,color:16363159,G:.65,A:1.38};e.push(b);b={radius:7,
alpha:.2,color:16434209,G:.5,A:1.45};e.push(b);b={radius:3,alpha:.2,color:16416033,G:.5,A:1.78};e.push(b);b={radius:6,alpha:.18,color:16434209,G:.45,A:1.9};e.push(b);b={radius:4,alpha:.14,color:16766514,G:.45,A:2.04};e.push(b);b={radius:30,alpha:.14,color:16766514,G:.8,A:.04};e.push(b);this.yc.push(f);this.kc.push(e);this.zc.push(a);f=[];e=[];a=[];b={radius:9,alpha:.3,color:14346999,G:.3,A:.3};e.push(b);b={radius:5,alpha:.5,color:14148072,G:.8,A:.6};e.push(b);b={radius:3,alpha:.37,color:14346999,
G:.66,A:.8};e.push(b);b={radius:45,alpha:.2,color:14346999,G:.36,A:1.2};e.push(b);b={radius:13,alpha:.2,color:14346999,G:.36,A:1.23};e.push(b);b={radius:11,alpha:.2,color:14148072,G:.36,A:1.28};e.push(b);b={radius:27,alpha:.16,color:14346999,G:.36,A:1.55};e.push(b);b={radius:6,alpha:.36,color:14148072,G:.8,A:1.7};e.push(b);this.yc.push(f);this.kc.push(e);this.zc.push(a);f=[];e=[];a=[];b={radius:24,alpha:.2,color:15186464,A:.2};f.push(b);b={radius:7,alpha:.26,color:15186464,A:.35};f.push(b);b={radius:23,
alpha:.18,color:15186464,A:.65};f.push(b);b={radius:13,alpha:.2,color:15186464,A:.8};f.push(b);b={radius:11,alpha:.15,color:15186464,A:1.4};f.push(b);b={radius:15,alpha:.11,color:15451904,A:1.6};f.push(b);b={radius:6,alpha:.45,color:15579138,G:.45,A:.22};e.push(b);b={radius:3,alpha:.3,color:15451904,G:.25,A:.4};e.push(b);b={radius:4,alpha:.2,color:15451904,G:.25,A:.45};e.push(b);b={radius:65,alpha:.17,color:15186464,G:.25,A:.5};e.push(b);b={radius:5,alpha:.45,color:15579138,G:.45,A:.88};e.push(b);
b={radius:140,alpha:.18,color:15579138,G:.32,A:.95};e.push(b);b={radius:12,alpha:.22,color:15579138,G:.32,A:1.1};e.push(b);b={radius:8,alpha:.32,color:15451904,G:.72,A:1.2};e.push(b);b={radius:55,alpha:.2,color:15451904,G:.45,A:1.33};e.push(b);b={radius:4,alpha:.3,color:15451904,G:.25,A:1.42};e.push(b);this.yc.push(f);this.kc.push(e);this.zc.push(a);f=[];e=[];a=[];b={radius:16,alpha:.4,color:10933495,A:.32};f.push(b);b={radius:14,alpha:.3,color:11007484,A:.36};f.push(b);b={radius:10,alpha:.3,color:4037331,
A:.58};f.push(b);b={radius:14,alpha:.22,color:8835068,A:.68};f.push(b);b={radius:10,alpha:.27,color:11007484,A:.82};f.push(b);b={radius:11,alpha:.27,color:10867450,A:1};f.push(b);b={radius:9,alpha:.2,color:6158332,A:1.05};f.push(b);b={radius:10,alpha:.17,color:10867450,A:1.78};f.push(b);b={radius:10,alpha:.3,color:4037331,A:-.23};f.push(b);b={radius:8,alpha:.45,color:8835068,G:.45,A:.175};e.push(b);b={radius:7,alpha:.4,color:12574715,G:.55,A:.46};e.push(b);b={radius:3,alpha:.3,color:10867450,G:.35,
A:.5};e.push(b);b={radius:60,alpha:.37,color:4031699,G:.75,A:.75};e.push(b);b={radius:3,alpha:.25,color:4031699,G:.25,A:.75};e.push(b);b={radius:3,alpha:.2,color:6158332,G:.25,A:.9};e.push(b);b={radius:7,alpha:.45,color:8835068,G:.45,A:1.3};e.push(b);b={radius:32,alpha:.22,color:8835068,G:.75,A:1.62};e.push(b);b={radius:9,alpha:.45,color:4031699,G:.65,A:1.6};e.push(b);b={radius:8,alpha:.25,color:4031699,G:.65,A:1.83};e.push(b);b={radius:7,alpha:.4,color:12574715,G:.55,A:-.18};e.push(b);this.yc.push(f);
this.kc.push(e);this.zc.push(a);f=[];e=[];a=[];b={radius:16,alpha:.4,color:16389120,A:.32};f.push(b);b={radius:26,alpha:.22,color:16389120,A:.4};f.push(b);b={radius:26,alpha:.25,color:16389120,A:.65};f.push(b);b={radius:18,alpha:.3,color:16389120,A:1.23};f.push(b);b={radius:14,alpha:.26,color:16389120,A:1.33};f.push(b);b={radius:17,alpha:.18,color:16389120,A:1.7};f.push(b);b={radius:30,alpha:.16,color:16389120,A:2.15};f.push(b);b={radius:100,alpha:.25,color:16389120,G:.22,A:1.45};e.push(b);b={radius:7,
alpha:.5,color:15628151,G:.3,A:1.5};e.push(b);b={radius:3,alpha:.5,color:15628151,G:.3,A:1.52};e.push(b);b={radius:4,alpha:.5,color:16389120,G:.3,A:1.745};e.push(b);b={radius:9,alpha:.22,color:16389120,G:.3,A:1.8};e.push(b);this.yc.push(f);this.kc.push(e);this.zc.push(a);f=[];e=[];a=[];b={radius:16,alpha:.4,color:10933495,A:.32};f.push(b);b={radius:14,alpha:.3,color:11007484,A:.36};f.push(b);b={radius:10,alpha:.3,color:4037331,A:.58};f.push(b);b={radius:14,alpha:.22,color:8835068,A:.68};f.push(b);
b={radius:10,alpha:.27,color:11007484,A:.82};f.push(b);b={radius:11,alpha:.27,color:10867450,A:1};f.push(b);b={radius:9,alpha:.2,color:6158332,A:1.05};f.push(b);b={radius:10,alpha:.17,color:10867450,A:1.78};f.push(b);b={radius:10,alpha:.3,color:4037331,A:-.23};f.push(b);b={radius:8,alpha:.45,color:8835068,G:.45,A:.175};e.push(b);b={radius:7,alpha:.4,color:12574715,G:.55,A:.46};e.push(b);b={radius:3,alpha:.3,color:10867450,G:.35,A:.5};e.push(b);b={radius:60,alpha:.37,color:4031699,G:.75,A:.75};e.push(b);
b={radius:3,alpha:.25,color:4031699,G:.25,A:.75};e.push(b);b={radius:3,alpha:.2,color:6158332,G:.25,A:.9};e.push(b);b={radius:7,alpha:.45,color:8835068,G:.45,A:1.3};e.push(b);b={radius:32,alpha:.22,color:8835068,G:.75,A:1.62};e.push(b);b={radius:9,alpha:.45,color:4031699,G:.65,A:1.6};e.push(b);b={radius:8,alpha:.25,color:4031699,G:.65,A:1.83};e.push(b);b={radius:7,alpha:.4,color:12574715,G:.55,A:-.18};e.push(b);this.yc.push(f);this.kc.push(e);this.zc.push(a);f=[];e=[];a=[];b={radius:16,alpha:.4,color:16389120,
A:.32};f.push(b);b={radius:26,alpha:.22,color:16389120,A:.4};f.push(b);b={radius:26,alpha:.25,color:16389120,A:.65};f.push(b);b={radius:18,alpha:.3,color:16389120,A:1.23};f.push(b);b={radius:14,alpha:.26,color:16389120,A:1.33};f.push(b);b={radius:17,alpha:.18,color:16389120,A:1.7};f.push(b);b={radius:30,alpha:.16,color:16389120,A:2.15};f.push(b);b={radius:100,alpha:.25,color:16389120,G:.22,A:1.45};e.push(b);b={radius:7,alpha:.5,color:15628151,G:.3,A:1.5};e.push(b);b={radius:3,alpha:.5,color:15628151,
G:.3,A:1.52};e.push(b);b={radius:4,alpha:.5,color:16389120,G:.3,A:1.745};e.push(b);b={radius:9,alpha:.22,color:16389120,G:.3,A:1.8};e.push(b);this.yc.push(f);this.kc.push(e);this.zc.push(a);f=[];e=[];a=[];b={radius:24,alpha:.2,color:15186464,A:.2};f.push(b);b={radius:7,alpha:.26,color:15186464,A:.35};f.push(b);b={radius:23,alpha:.18,color:15186464,A:.65};f.push(b);b={radius:13,alpha:.2,color:15186464,A:.8};f.push(b);b={radius:11,alpha:.15,color:15186464,A:1.4};f.push(b);b={radius:15,alpha:.11,color:15451904,
A:1.6};f.push(b);b={radius:6,alpha:.45,color:15579138,G:.45,A:.22};e.push(b);b={radius:3,alpha:.3,color:15451904,G:.25,A:.4};e.push(b);b={radius:4,alpha:.2,color:15451904,G:.25,A:.45};e.push(b);b={radius:65,alpha:.17,color:15186464,G:.25,A:.5};e.push(b);b={radius:5,alpha:.45,color:15579138,G:.45,A:.88};e.push(b);b={radius:140,alpha:.18,color:15579138,G:.32,A:.95};e.push(b);b={radius:12,alpha:.22,color:15579138,G:.32,A:1.1};e.push(b);b={radius:8,alpha:.32,color:15451904,G:.72,A:1.2};e.push(b);b={radius:55,
alpha:.2,color:15451904,G:.45,A:1.33};e.push(b);b={radius:4,alpha:.3,color:15451904,G:.25,A:1.42};e.push(b);this.yc.push(f);this.kc.push(e);this.zc.push(a)};v.prototype.yt=function(){if(this.mm){var f=this.o.R,e,a=new y.Ta(0,0,-100),b=this.o.jf(),c=0,h=0,m=!1;if(this.o.na){var n=this.o.Ab.width;var q=this.o.Ab.height;this.o.D.Fi&&(n=this.o.D.Bc.width,q=this.o.D.Bc.height)}else{this.aa||(this.aa=this.ud.getContext("2d"));if(this.aa.width!==this.o.C.width||this.aa.height!==this.o.C.height)this.aa.width=
this.o.C.width,this.aa.height=this.o.C.height;this.aa.clear?this.aa.clear():this.aa.clearRect(0,0,this.ud.width,this.ud.height);n=this.aa.width;q=this.aa.height}var r=Math.sqrt(n*n+q*q),t=r/800;for(e=0;e<this.Th.length;e++){var x=this.Th[e];a.init(0,0,-100);a.Ja(-x.u*Math.PI/180);a.Na(x.pan*Math.PI/180);a.Na(-this.o.pan.m*Math.PI/180);a.Ja(this.o.u.m*Math.PI/180);a.yb(this.o.W.m*Math.PI/180);if(-.01>a.z){h=-b/a.z;c=a.x*h;h*=a.y;var z=Math.max(n,q);Math.abs(c)<z/2+100&&Math.abs(h)<z/2+100&&(m=!0,c+=
n/2,h+=q/2)}if(m){this.o.na&&(f.blendFunc(f.SRC_ALPHA,f.ONE),f.enable(f.BLEND),f.disable(f.DEPTH_TEST));z=n/2;var C=q/2;var F=Math.sqrt((z-c)*(z-c)+(C-h)*(C-h));var E=r/2;C=n>q?n:q;z=x.fn/100*((E-F)/E);0>z&&(z=0);if(this.o.na){f.useProgram(this.Dc);f.bindBuffer(f.ARRAY_BUFFER,this.o.D.wb);f.vertexAttribPointer(this.Dc.ja,this.o.D.wb.itemSize,f.FLOAT,!1,0,0);var D=f.getUniformLocation(this.Dc,"uCanvasDimensions");f.uniform2f(D,f.drawingBufferWidth,f.drawingBufferHeight);f.uniform2f(f.getUniformLocation(this.Dc,
"uFlareCenterPosition"),f.drawingBufferWidth/n*c,q-f.drawingBufferHeight/q*h);f.uniform1f(f.getUniformLocation(this.Dc,"uBlindingValue"),z);D=f.getUniformLocation(this.Dc,"uAspectRatio");f.uniform1f(D,this.o.D.Fi?f.drawingBufferWidth/f.drawingBufferHeight:f.drawingBufferWidth/f.drawingBufferHeight/(n/q));f.drawArrays(f.TRIANGLE_STRIP,0,this.o.D.wb.Ge)}else D=this.aa.createRadialGradient(c,h,1,c,h,C),D.addColorStop(0,"rgba(255, 255, 255, "+z+")"),D.addColorStop(.5,"rgba(255, 255, 255, "+.8*z+")"),
D.addColorStop(1,"rgba(255, 255, 255, "+.6*z+")"),this.aa.fillStyle=D,this.aa.fillRect(0,0,this.aa.width,this.aa.height);if(0!=Number(x.type)&&!this.o.D.Fi){z=n/2-c;C=q/2-h;var A=1,G=Number(x.type)-1;F<.35*E&&(A=F/(.35*E),A*=A);F>.7*E&&(A=(E-F)/(.3*E));A*=x.alpha/100;if(0<this.yc[G].length)for(F=0;F<this.yc[G].length;F++){var J=this.yc[G][F];E=J.radius*t;var H=J.alpha*A;0>H&&(H=0);var I=J.color;if(8==G||9==G||10==G)I=x.color;if(this.o.na)f.useProgram(this.Ba),f.bindBuffer(f.ARRAY_BUFFER,this.fg),
f.vertexAttribPointer(this.Ba.ja,this.fg.itemSize,f.FLOAT,!1,0,0),D=f.getUniformLocation(this.Ba,"uCanvasDimensions2"),f.uniform2f(D,f.drawingBufferWidth,f.drawingBufferHeight),f.uniform2f(f.getUniformLocation(this.Ba,"uCirclePosition"),f.drawingBufferWidth/n*(c+z*J.A),f.drawingBufferWidth/n*(q-(h+C*J.A))),f.uniform2f(f.getUniformLocation(this.Ba,"uCircleTexturePosition"),f.drawingBufferWidth/n*(c+z*J.A),q-(h+C*J.A)),f.uniform1f(f.getUniformLocation(this.Ba,"uCircleRadius"),E),f.uniform3f(f.getUniformLocation(this.Ba,
"uCircleColor"),(I>>16&255)/255,(I>>8&255)/255,(I&255)/255),f.uniform1f(f.getUniformLocation(this.Ba,"uCircleAlpha"),H),f.uniform1f(f.getUniformLocation(this.Ba,"uCircleSoftness"),.1),D=f.getUniformLocation(this.Ba,"uAspectRatio"),f.uniform1f(D,f.drawingBufferWidth/f.drawingBufferHeight/(n/q)),f.drawArrays(f.TRIANGLE_FAN,0,this.fg.Ge);else{this.aa.save();this.aa.translate(c+z*J.A,h+C*J.A);D=this.aa.createRadialGradient(0,0,1,0,0,1.1*E);D.addColorStop(0,this.o.oa(I,H));D.addColorStop(.65,this.o.oa(I,
.9*H));D.addColorStop(.8,this.o.oa(I,.7*H));D.addColorStop(1,this.o.oa(I,.2*H));this.aa.beginPath();I=2*Math.PI/6;J=Math.PI/180*35;var M=!0;for(H=J;H<=J+2*Math.PI;H+=I)M?(this.aa.moveTo(E*Math.sin(H),E*Math.cos(H)),M=!1):this.aa.lineTo(E*Math.sin(H),E*Math.cos(H));this.aa.closePath();this.aa.fillStyle=D;this.aa.fill();this.aa.restore()}}if(0<this.kc[G].length)for(F=0;F<this.kc[G].length;F++){J=this.kc[G][F];E=J.radius*t;H=J.alpha*A;0>H&&(H=0);I=J.color;if(8==G||9==G||10==G)I=x.color;this.o.na?(f.useProgram(this.Ba),
f.bindBuffer(f.ARRAY_BUFFER,this.Rd),f.vertexAttribPointer(this.Ba.ja,this.Rd.itemSize,f.FLOAT,!1,0,0),D=f.getUniformLocation(this.Ba,"uCanvasDimensions2"),f.uniform2f(D,f.drawingBufferWidth,f.drawingBufferHeight),D=f.getUniformLocation(this.Ba,"uCirclePosition"),f.uniform2f(D,f.drawingBufferWidth/n*(c+z*J.A),f.drawingBufferWidth/n*(q-(h+C*J.A))),D=f.getUniformLocation(this.Ba,"uCircleTexturePosition"),f.uniform2f(D,f.drawingBufferWidth/n*(c+z*J.A),q-(h+C*J.A)),D=f.getUniformLocation(this.Ba,"uCircleRadius"),
f.uniform1f(D,E),f.uniform3f(f.getUniformLocation(this.Ba,"uCircleColor"),(I>>16&255)/255,(I>>8&255)/255,(I&255)/255),f.uniform1f(f.getUniformLocation(this.Ba,"uCircleAlpha"),H),f.uniform1f(f.getUniformLocation(this.Ba,"uCircleSoftness"),J.G),D=f.getUniformLocation(this.Ba,"uAspectRatio"),f.uniform1f(D,f.drawingBufferWidth/f.drawingBufferHeight/(n/q)),f.drawArrays(f.TRIANGLE_FAN,0,this.Rd.Ge)):(this.aa.save(),this.aa.translate(c+z*J.A,h+C*J.A),D=this.aa.createRadialGradient(0,0,1,0,0,E),D.addColorStop(0,
this.o.oa(I,H)),D.addColorStop(1-J.G,this.o.oa(I,.8*H)),D.addColorStop(1,this.o.oa(I,0)),this.aa.beginPath(),this.aa.arc(0,0,E,0,2*Math.PI,!1),this.aa.closePath(),this.aa.fillStyle=D,this.aa.fill(),this.aa.restore())}if(0<this.zc[G].length)for(F=0;F<this.zc[G].length;F++)x=this.zc[G][F],E=x.radius*t,H=x.alpha*A,0>H&&(H=0),this.o.na?(f.useProgram(this.Db),f.activeTexture(f.TEXTURE0),f.bindTexture(f.TEXTURE_2D,this.vp),f.bindBuffer(f.ARRAY_BUFFER,this.Rd),f.vertexAttribPointer(this.Db.ja,this.Rd.itemSize,
f.FLOAT,!1,0,0),D=f.getUniformLocation(this.Db,"uCanvasDimensions2"),f.uniform2f(D,n,q),D=f.getUniformLocation(this.Db,"uCirclePosition"),f.uniform2f(D,c+z*x.A,q-(h+C*x.A)),D=f.getUniformLocation(this.Db,"uRingTexturePosition"),f.uniform2f(D,f.drawingBufferWidth/n*(c+z*x.A),q-(h+C*x.A)),D=f.getUniformLocation(this.Db,"uCircleRadius"),f.uniform1f(D,E),f.uniform2f(f.getUniformLocation(this.Db,"uRingPosition"),c+z*x.A,q-(h+C*x.A)),f.uniform1f(f.getUniformLocation(this.Db,"uRingRadius"),E),f.uniform1f(f.getUniformLocation(this.Db,
"uRingAlpha"),H),D=f.getUniformLocation(this.Db,"uAspectRatio"),f.uniform1f(D,f.drawingBufferWidth/f.drawingBufferHeight/(n/q)),f.uniform1i(f.getUniformLocation(this.Db,"uSampler"),0),f.drawArrays(f.TRIANGLE_FAN,0,this.Rd.Ge)):(this.aa.save(),this.aa.translate(c+z*x.A,h+C*x.A),D=this.aa.createRadialGradient(0,0,0,0,0,E),D.addColorStop(0,this.o.oa(16777215,0)),D.addColorStop(.88,this.o.oa(0,0)),D.addColorStop(.9,this.o.oa(16654848,H)),D.addColorStop(.92,this.o.oa(16776448,H)),D.addColorStop(.94,this.o.oa(4849466,
H)),D.addColorStop(.96,this.o.oa(131071,H)),D.addColorStop(.98,this.o.oa(8190,H)),D.addColorStop(1,this.o.oa(0,0)),this.aa.beginPath(),this.aa.arc(0,0,E,0,2*Math.PI,!1),this.aa.closePath(),this.aa.fillStyle=D,this.aa.fill(),this.aa.restore())}this.o.na&&(f.useProgram(this.o.sa.P),f.disable(f.BLEND),f.enable(f.DEPTH_TEST))}}}};return v}();y.wq=w})(ggP2VR||(ggP2VR={}));var THREE;
(function(y){var w=function(){function v(f){this.vb=[];this.Ij=[];this.ca={x:0,y:0};this.Wc={x:0,y:0};this.Zh=0;this.session=null;this.Yk=!1;this.Nm=this.Mm=this.yf=0;this.ul=this.Rg=!1;this.nm=0;this.Dg=-5;this.Bm=0;this.dj=this.eg=this.Cj=!1;this.o=null;this.$l=!0;this.hg=1;this.oj=[];this.frustumCulled=!1;this.Gh=0;this.Lm=null;this.zk=this.pq=!1;this.Ce=[-1,-1,-1,-1];this.De=[-1,-1,-1,-1];this.uf=[!1,!1,!1,!1];this.Gc=[];this.xj=[];this.tf=[];this.o=f;var e=this;setTimeout(function(){if(window.WebXRPolyfill&&
window.Promise){var a={cardboardConfig:{BUFFER_SCALE:1}};try{new window.WebXRPolyfill(a),f.O("WebXR Polyfill loaded!")}catch(b){f.Uc(b)}}e.Qs()},0);THREE?this.en():console.log("Three.js not available!")}v.prototype.ir=function(){this.init();this.animate()};v.prototype.en=function(){this.xm=new THREE.Matrix4;this.Zo=new THREE.Euler};v.prototype.init=function(){"xr"in navigator||console.log("no WebXR support");if(THREE)if(this.Ra)console.log("already set up!");else{this.xm||this.en();var f=this,e=this.lc=
this.o.lc,a=this.Vt=new THREE.Scene,b=this.Cu=new THREE.Scene,c=this.camera=new THREE.PerspectiveCamera(100,window.innerWidth/window.innerHeight,.001,2E4);a.add(c);108>THREE.REVISION&&(this.frustumCulled=!0);c.position.z=-.01;c.position.y=0;c.position.x=0;this.Ra=c=new THREE.WebGLRenderer({depth:!0,logarithmicDepthBuffer:!0,alpha:!0,antialias:!0,stencil:!1});c.setClearColor(new THREE.Color(0),1);c.setPixelRatio(window.devicePixelRatio);c.setSize(window.innerWidth,window.innerHeight);c.outputEncoding=
THREE.sRGBEncoding;c.shadowMap.enabled=!1;e.appendChild(c.domElement);"xr"in navigator&&(c.xr.enabled=!0,c.xr.setReferenceSpaceType("local"));var h=this.Jk=new THREE.Group;h.name="controllerGroup";h.renderOrder=3E3;e=this.Hk=c.xr.getController(0);e.addEventListener("selectstart",function(r){f.ap(r)});e.addEventListener("selectend",function(r){f.$o(r)});e.visible=!0;e.userData.Vf=0;h.add(e);var m=this.Ik=c.xr.getController(1);m.addEventListener("selectstart",function(r){f.ap(r)});m.addEventListener("selectend",
function(r){f.$o(r)});m.visible=!0;m.userData.Vf=1;h.add(m);h.visible=!1;var n=this.Pe=new THREE.Group;n.name="skinGroup";n.translateZ(this.Dg);n.visible=!1;n.renderOrder=1E3;b.add(n);n=this.Am=new THREE.Group;n.name="toggleSkinGroup";n.translateZ(this.Dg+.1);n.renderOrder=1100;b.add(n);b.add(h);n=(new THREE.TextureLoader).load("webxr/vrSkinShow.svg");var q=(new THREE.TextureLoader).load("webxr/vrSkinHide.svg");h=new THREE.PlaneBufferGeometry(.3,.3);n=new THREE.MeshBasicMaterial({map:n});n.transparent=
!0;q=new THREE.MeshBasicMaterial({map:q});q.transparent=!0;h=new THREE.Mesh(h,n);h.name="SkinToggleButton";h.position.y=3.12;h.Av=!1;h.userData.bt=n;h.userData.$s=q;h.userData.onclick=function(){f.ri()};this.Rb=h;this.Rb.visible=!1;this.Am.add(h);h=(new THREE.BufferGeometry).setFromPoints([new THREE.Vector3(0,0,0),new THREE.Vector3(0,0,-1)]);n=new THREE.LineBasicMaterial({color:14737632});h=new THREE.Line(h,n);h.name="line";h.scale.z=5;e.add(h.clone());m.add(h.clone());this.ni=new THREE.Raycaster;
this.ca=new THREE.Vector2;this.Ie=new THREE.Group;this.Ie.name="panoGroup";this.Ie.renderOrder=1;this.rf=new THREE.Group;this.rf.name="imageGroup";this.Dd=new THREE.Group;this.Dd.name="hotspotGroup";this.cj=new THREE.Group;this.cj.name="elementGroup";this.eh=new THREE.Group;this.eh.name="centerGroup";this.eh.renderOrder=2E3;this.Ie.add(this.cj);this.Ie.add(this.Dd);this.Ie.add(this.rf);a.add(this.Ie);a.add(this.eh);e=document.createElement("canvas");e.width=64;e.height=64;m=e.getContext("2d");m.fillStyle=
"black";m.lineWidth=3;m.beginPath();m.arc(32,32,10,0,2*Math.PI);m.stroke();e=new THREE.Texture(e);e.encoding=THREE.sRGBEncoding;h=new THREE.PlaneBufferGeometry(2,2,8);m=new THREE.MeshBasicMaterial({map:e});m.transparent=!0;m=new THREE.Mesh(h,m);m.position.z=-50;this.eh.add(m);e.needsUpdate=!0;window.addEventListener("resize",function(){f.vt()},!1);document.addEventListener("mouseup",function(){f.rt()},!1);document.addEventListener("mousedown",function(r){f.pt(r)},!1);document.addEventListener("mousemove",
function(r){f.qt(r)},!1);S&&"undefined"!==typeof __THREE_DEVTOOLS__&&(__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:a})),__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:b})),__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:c})))}else console.log("Three.js not available!")};v.prototype.Mp=function(){var f=this.o;f.O("VR not found");f.H("vrchanged",{});f.H("playerstatechanged",{})};v.prototype.Bu=function(){this.ul=!0;var f=this.o;f.O("XR found");
f.H("vrchanged",{});f.H("playerstatechanged",{})};v.prototype.Qs=function(){if(!this.pq){this.pq=!0;var f=this;if("xr"in navigator)navigator.xr.isSessionSupported("immersive-vr").then(function(e){e?f.Bu():f.Mp()})["catch"](f.Mp)}};v.prototype.jl=function(){return this.Pe};v.prototype.og=function(){return null!=this.session?this.Ra.xr.isPresenting:this.o.ie?!0:!1};v.prototype.pf=function(){return this.ul&&THREE};v.prototype.tt=function(f){var e=this;this.Ni();f.addEventListener("end",function(){e.st()});
console.log("XR Session started.");this.Ra.xr.setSession(f);this.Yk=!0;this.session=f;e.o.H("entervr",{session:f})};v.prototype.st=function(){console.log("XR Session ended.");this.Yk=!1;this.session=null;this.Gk()};v.prototype.$f=function(){var f=this.o;if(this.ul){if(null===this.session){var e=this;navigator.xr.requestSession("immersive-vr",{optionalFeatures:["local-floor","bounded-floor"]}).then(function(b){e.tt(b)})["catch"](function(b){console.log(b);console.warn("'immersive-vr' isn't supported, or an error occurred activating VR!");
e.Gk()})}this.Dd&&this.Dd.translateY(-this.Gh);this.Gh=0;if(1==this.hg){var a=navigator.userAgent;0<=a.indexOf("OculusBrowser")&&(0<=a.indexOf("Pacific")&&(this.hg=1.7),0<=a.indexOf("Quest")&&(this.hg=1.5))}this.Ra.xr.setFramebufferScaleFactor(this.hg);f.Uc("Enter VR - scaled "+this.hg)}else this.Ni(),this.o.H("entervr",{session:null})};v.prototype.wt=function(){if(THREE&&this.Ra){var f=this.o;f.ie=!0;f.$.style.display="none";f.bb.style.display="none";this.Ra.domElement.style.display="inline";f.H("vrchanged",
{});f.H("playerstatechanged",{})}};v.prototype.Gk=function(){if(THREE&&this.Ra){var f=this.o;f.ie=!1;f.$.style.display="inline";f.bb.style.display="inline";this.Ra.domElement.style.display="none";f.Ag(0);f.fc();f.update();f.H("vrchanged",{});f.H("playerstatechanged",{});this.o.H("exitvr",{session:null});this.Ek()}};v.prototype.ag=function(){null!=this.session&&this.session.end()};v.prototype.aq=function(){this.og()?this.ag():this.$f()};v.prototype.tr=function(){var f=0,e=this.o,a=e.N.M;var b=1536;
this.Ra&&e.O("Canvas: "+b);b*=Math.pow(2,0);if(0<a.levels.length){for(;a.levels.length>=f+2&&!a.levels[f+1].Cf&&a.levels[f+1].width>b;)f++;e.O("Level "+f+" - width: "+a.levels[f].width);e.O(a.levels)}return f};v.prototype.mo=function(f){var e=this.o,a=e.N.M,b=e.Te[f];f="";if(b){b=b.firstChild;for(var c;b;)"input"==b.nodeName&&(c=b)&&(c=0<a.levels.length?c.getAttributeNode("leveltileurl"):c.getAttributeNode("tilevrurl"))&&(f=c.nodeValue),b=b.nextSibling}else f=0<a.levels.length?a.Fl:e.Lk;a=f;f=e.sp;
for(b=0;3>b;b++)a=f(a,"c","vr"),a=f(a,"s","vr"),a=f(a,"r",0),a=f(a,"l",0),a=f(a,"x",0),a=f(a,"y",0),a=f(a,"v",0),a=f(a,"h",0);return e.fb(a)};v.prototype.ceilPowerOfTwo=function(f){return Math.pow(2,Math.ceil(Math.log(f)/Math.LN2))};v.prototype.loadTexture=function(f,e,a){var b=new THREE.ImageLoader;b.setCrossOrigin(this.o.crossOrigin);var c=this;b.load(e,function(h){var m=c.ceilPowerOfTwo(h.width),n=c.ceilPowerOfTwo(h.height);f.encoding=THREE.sRGBEncoding;if(m==h.width&&n==h.height||!a)f.image=h;
else{c.o.O("resizing "+h.width+"/"+h.height+" -> "+m+"/"+n);var q=document.createElement("canvas");q.width=m;q.height=n;q.getContext("2d").drawImage(h,0,0,m,n);f.image=q}f.needsUpdate=!0;f.so=!0;f.we&&f.we.so&&(f.Dh.visible=!0,f.we.Dh.visible=!0)});this.oj.push(f)};v.prototype.Ni=function(){if(THREE){var f=this.o;if(this.zk)f.O("vr panorama aleady added!");else{var e=this.rf,a=this;f.O("add vr panorama");this.Df();this.camera.layers.enable(1);e.setRotationFromEuler(this.Zo);e.rotateX(f.Xa.pitch*Math.PI/
180);e.rotateZ(-f.Xa.W*Math.PI/180);var b=new THREE.SphereBufferGeometry(2E4/3*1.5,16,16),c=new THREE.Texture,h=new THREE.ImageLoader;h.setCrossOrigin(this.o.crossOrigin);h.load(this.mo(f.gj()),function(m){c.encoding=THREE.sRGBEncoding;c.image=m;c.needsUpdate=!0});h=new THREE.MeshBasicMaterial({map:c,side:THREE.DoubleSide});b=new THREE.Mesh(b,h);b.scale.x=-1;b.rotateZ(f.Xa.W*Math.PI/180);b.rotateX(-f.Xa.pitch*Math.PI/180);b.rotateY(-90*Math.PI/180);e.add(b);a.Mj=b;a.zk=!0;setTimeout(function(){f.O("Adding Main Pano");
a.zk=!1;a.Lq();f.B.j?a.Oq():a.Mq();a.Jq()});this.Pt();this.$l=!0}}};v.prototype.Oq=function(){var f=this.o,e=this.rf,a=2E4/3;if(f.Ed){var b=new THREE.VideoTexture(f.B.j);b.wrapS=THREE.ClampToEdgeWrapping;b.wrapT=THREE.ClampToEdgeWrapping;b.minFilter=THREE.LinearFilter;b.encoding=THREE.sRGBEncoding;var c=new THREE.SphereBufferGeometry(a,60,40);c.scale(-1,1,1);for(var h=c.attributes.uv.array,m=1;m<h.length;m+=2)h[m]*=.5;h=new THREE.MeshBasicMaterial({map:b});c=new THREE.Mesh(c,h);c.rotateY(-90*Math.PI/
180);c.layers.set(f.Fg?1:2);e.add(c);c=new THREE.SphereBufferGeometry(a,60,40);c.scale(-1,1,1);h=c.attributes.uv.array;for(m=1;m<h.length;m+=2)h[m]*=.5,h[m]+=.5;h=new THREE.MeshBasicMaterial({map:b});c=new THREE.Mesh(c,h);c.rotateY(-90*Math.PI/180);c.layers.set(f.Fg?2:1)}else c=new THREE.SphereBufferGeometry(a,60,40),c.scale(-1,1,1),b=new THREE.VideoTexture(f.B.j),b.encoding=THREE.sRGBEncoding,b.wrapS=THREE.ClampToEdgeWrapping,b.wrapT=THREE.ClampToEdgeWrapping,b.minFilter=THREE.LinearFilter,h=new THREE.MeshBasicMaterial({map:b}),
c=new THREE.Mesh(c,h),c.rotateY(-90*Math.PI/180);e.add(c);try{f.B.j.play()}catch(n){f.Uc(n)}};v.prototype.Mq=function(){var f=this.o,e=this.o.N.M,a=[],b=this.tr(),c=this.rf,h=2E4/3,m=f.Ed?2:1;if(e.levels.length>b)for(var n=e.levels[b],q=0;6>q;q++){a[q]=new THREE.Group;for(var r=0;r<n.ta;r++)for(var t=0;t<n.Y;t++)for(var x=0;x<m;x++){var z=new THREE.Texture;z.encoding=THREE.sRGBEncoding;this.loadTexture(z,f.N.Jg(q,b,t,r,1==x),!0);z.wrapS=THREE.ClampToEdgeWrapping;z.wrapT=THREE.ClampToEdgeWrapping;
z.minFilter=THREE.LinearMipMapLinearFilter;z.anisotropy=1;var C=e.V+2*e.gb,F=e.V+2*e.gb;t==n.Y-1&&(C=n.width-e.V*(n.Y-1)+2*e.gb);r==n.ta-1&&(F=n.width-e.V*(n.ta-1)+2*e.gb);var E=new THREE.PlaneBufferGeometry(h*C/n.width,h*F/n.width,8),D=new THREE.MeshBasicMaterial({map:z});E=new THREE.Mesh(E,D);D.transparent=!0;D.side=THREE.FrontSide;D=1*e.V;E.position.x=h*(t*D+C/2-e.gb-n.width/2)/n.width;E.position.y=h*-(r*D+F/2-e.gb-n.width/2)/n.width;E.position.z=-.5*h;if(f.Ed)if(E.visible=!1,E.layers.set(1==x?
1:2),z.Dh=E,0==x)var A=E;else C=A.material.map,z.we=C,C.we=z;a[q].add(E);E.frustumCulled=this.frustumCulled}4>q?a[q].rotation.y=-q*Math.PI/2:a[q].rotation.x=(4==q?1:-1)*Math.PI/2;c.add(a[q])}else for(e=f.Kg,q=0;6>q;q++)for(a[q]=new THREE.Group,x=0;x<m;x++)b=q,f.Ed&&(b=q+(1==x?6:0)),z=new THREE.Texture,z.encoding=THREE.sRGBEncoding,this.loadTexture(z,f.fb(f.kh[b]),!1),z.wrapS=THREE.ClampToEdgeWrapping,z.wrapT=THREE.ClampToEdgeWrapping,z.minFilter=THREE.LinearFilter,E=new THREE.PlaneBufferGeometry(e*
h/2,e*h/2,64),D=new THREE.MeshBasicMaterial({map:z}),E=new THREE.Mesh(E,D),D.transparent=!0,D.side=THREE.FrontSide,E.position.x=0,E.position.y=0,E.position.z=-.25*h,f.Ed&&(E.layers.set(1==x?1:2),E.visible=!1,z.Dh=E,0==x?A=E:(C=A.material.map,z.we=C,C.we=z)),a[q].add(E),4>q?a[q].rotation.y=-q*Math.PI/2:a[q].rotation.x=(4==q?1:-1)*Math.PI/2,c.add(a[q])};v.prototype.Lq=function(){var f=this.o,e=this.Dd;new y.Ta(0,0,-100);for(var a=f.K.ck,b=0;b<f.J.length;b++){var c=f.J[b];if("poly"!=c.type){var h=null,
m=c.Ou(),n=c.Jf?100:5;if(f.Li&&f.Li.addSkinHotspot)(h=f.Li.addSkinHotspot(c))&&h.userData.xv&&(n=100);else{var q=.2;if(!1!==m){n=!c.distance||0>=c.distance?5:1>c.distance?1:5>c.distance?c.distance:5;if(c.gd){m=.005;var r=(new THREE.TextureLoader).load(c.gd);r.encoding=THREE.sRGBEncoding;var t=new THREE.MeshBasicMaterial({map:r});if(c.Jf){h=2*n*Math.tan(c.fov/2*Math.PI/180);var x=new THREE.PlaneBufferGeometry(h,h*c.xd/c.df,1,1);t.transparent=!0;t.opacity=1}else x=new THREE.PlaneBufferGeometry(m*c.df,
m*c.xd,1,1),t.transparent=!0,t.opacity=.25;q=m*c.xd/2;t.side=THREE.DoubleSide}else x=new THREE.SphereBufferGeometry(.2,16,16),r=(new THREE.TextureLoader).load(this.mo(m)),r.encoding=THREE.sRGBEncoding,t=new THREE.MeshBasicMaterial({map:r}),t.transparent=!0,t.opacity=.25;h=new THREE.Mesh(x,t);m=c.title;if(a.enabled&&""!=m){x=document.createElement("canvas");x.width=256;x.height=32;r=x.getContext("2d");this.Ei||(this.Ei=document.createElement("canvas"),this.Ei.width=x.width,this.Ei.height=x.height);
var z=this.Ei.getContext("2d");z.clearRect(0,0,x.width,x.height);z.font="16px Helvetica";z.textAlign="center";z.textBaseline="top";t=z.measureText(m);var C=t.width;0<a.height&&(C=Math.min(a.width,x.width-6),C=Math.max(C,t.width));t=C+6;a.background&&(z.fillStyle=this.o.oa(a.Ub,a.Tb),z.fillRect((x.width-C)/2-3,2,C+6,24));0<a.Si&&(z.strokeStyle=this.o.oa(a.Wb,a.Vb),z.strokeRect((x.width-C)/2-3,2,C+6,24));z.fillStyle=this.o.oa(a.dk,a.bk);z.fillText(m,x.width/2,5,x.width-6);r.drawImage(this.Ei,(x.width-
t)/2,2,t,24,0,0,x.width,x.height);r=new THREE.Texture(x);r.encoding=THREE.sRGBEncoding;r.needsUpdate=!0;m=1.5;x=new THREE.PlaneBufferGeometry(1*m*t/x.width,3*m/x.height,1,1);t=new THREE.MeshBasicMaterial({map:r,side:THREE.DoubleSide});x=new THREE.Mesh(x,t);x.translateY(-q-.125*m/2);x.frustumCulled=this.frustumCulled;h.add(x);t.transparent=!0;t.opacity=.5}h.userData={S:c}}}h&&(h.rotateY(c.pan*Math.PI/180),h.rotateX(c.u*Math.PI/180),h.translateZ(-n),h.castShadow=!1,h.receiveShadow=!1,h.frustumCulled=
this.frustumCulled,e.add(h))}}};v.prototype.Jq=function(){for(var f=this.o,e=0;e<f.Wa.length;e++){var a=f.Wa[e];if(a.j){var b=(new THREE.TextureLoader).load(a.j.src);this.tn(a,b)}}for(e=0;e<f.U.length;e++)a=f.U[e],a.j&&"_videopanorama"!=a.id&&!a.nd&&(a.j.play(),b=new THREE.VideoTexture(a.j),b.encoding=THREE.sRGBEncoding,b.wrapS=THREE.ClampToEdgeWrapping,b.wrapT=THREE.ClampToEdgeWrapping,b.minFilter=THREE.LinearFilter,this.tn(a,b))};v.prototype.tn=function(f,e){var a=this.cj,b=5E3*Math.tan(f.fov*Math.PI/
360);var c=0<f.pc?b*f.Pc/f.pc:b;f.Ic&&1!=f.Ic&&(c*=f.Ic);b=new THREE.PlaneBufferGeometry(b,c,5,5);e=new THREE.MeshBasicMaterial({map:e,side:THREE.DoubleSide,transparent:!0});e=new THREE.Mesh(b,e);e.rotateY(f.pan*Math.PI/180);e.rotateX(f.u*Math.PI/180);e.translateY(-0);e.translateZ(-2500);e.rotateZ(-f.yb*Math.PI/180);e.rotateY(-f.Na*Math.PI/180);e.rotateX(-f.Ja*Math.PI/180);e.userData=f;e.castShadow=!1;e.receiveShadow=!1;a.add(e)};v.prototype.qh=function(f){for(var e=f.children.length-1;0<=e;e--){var a=
f.children[e];this.qh(a);f.remove(a)}f.geometry&&f.geometry.dispose();f.material&&(f.material.texture&&(f.material.texture.dispose(),f.material.texture.we=null,f.material.texture.Dh=null),f.material.map&&(f.material.map.dispose(),f.material.map.we=null,f.material.map.Dh=null),f.material.dispose())};v.prototype.Df=function(){THREE&&(this.oj=[],this.qh(this.rf),this.qh(this.Dd),this.qh(this.cj),10<this.Ra.info.memory.textures&&this.o.Om(this.Ra.info.memory))};v.prototype.vt=function(){if(THREE){var f=
this.camera;f.aspect=window.innerWidth/window.innerHeight;f.updateProjectionMatrix();this.Ra.setSize(window.innerWidth,window.innerHeight)}};v.prototype.ap=function(f){if(THREE){f=f.target;this.Ek();var e=this.dl(f);0<e.length&&(this.$g(e,f.userData.Vf),0<this.vb.length&&(f=this.vb[0],e=f.userData,e.S&&!e.fromSkin?(f=e.S,this.o.od(f.url,f.target)):(this.me(f,"onclick"),this.me(f,"onmousedown"))))}};v.prototype.$o=function(f){if(THREE){f=f.target;var e=this.dl(f);0<e.length&&this.$g(e,f.userData.Vf)}};
v.prototype.dl=function(f){this.xm.identity().extractRotation(f.matrixWorld);this.ni.ray.origin.setFromMatrixPosition(f.matrixWorld);this.ni.ray.direction.set(0,0,-1).applyMatrix4(this.xm);return this.vl(this.ni)};v.prototype.vl=function(f){var e=[];if(this.Dd.visible){var a=f.intersectObjects(this.Dd.children,!0);e=e.concat(a)}this.Pe.visible&&(a=f.intersectObjects(this.Pe.children,!0),e=e.concat(a));a=f.intersectObjects(this.Am.children,!0);return e=e.concat(a)};v.prototype.$g=function(f,e){void 0===
e&&(e=-1);for(var a=0;a<f.length;a++)if(void 0!==f[a].object.userData.isVisible&&f[a].object.userData.isVisible()||void 0===f[a].object.userData.isVisible&&f[a].object.visible||f[a].object.userData.tv){var b=f[a].object;b.selected=!0;b.distance=f[a].distance;b.Vf=e;this.vb.push(b)}};v.prototype.intersectObjects=function(f){var e=f.getObjectByName("line"),a=this.dl(f);0<a.length&&this.$g(a,f.userData.Vf);e.scale.z=0<this.vb.length?this.vb[0].distance:5};v.prototype.Ek=function(){for(;this.vb.length;)this.vb.pop().selected=
!1};v.prototype.qt=function(f){f.preventDefault();var e=this.ca,a=this.Ra;e.x=f.clientX/a.domElement.clientWidth*2-1;e.y=2*-(f.clientY/a.domElement.clientHeight)+1;1==f.buttons&&(this.Zh=this.Wc.x-e.x)};v.prototype.Rs=function(){var f=this.ni;f.setFromCamera(this.ca,this.camera);f=this.vl(f);0<f.length&&this.$g(f)};v.prototype.Ss=function(){var f=this.ni;f.setFromCamera({x:0,y:0},this.camera);f=this.vl(f);0<f.length&&this.$g(f)};v.prototype.rt=function(){this.Zh=0;if(0<this.vb.length){var f=this.vb[0];
f.userData.S||this.me(f,"onmouseup")}};v.prototype.me=function(f,e,a){void 0===a&&(a=!1);var b=f;do if(b.userData[e])if(a){var c=f.Vf;0<=c&&this.Gc&&this.Gc[c]&&(c=this.Gc[c],c.hapticActuators&&0<c.hapticActuators.length&&c.hapticActuators[0].pulse(.8,5))}else b.userData[e]();while(!b.userData.stopPropagation&&(b=b.parent))};v.prototype.gn=function(f,e){do if(f.userData.onclick||f.userData.S&&!f.userData.fromSkin)e?f.userData.xi=-1:f.userData.xi&&-1!=f.userData.xi?Date.now()>f.userData.xi+1E3&&(f.userData.onclick?
(f.userData.onclick(),f.userData.xi=-1):f.userData.S&&f.userData.S.url&&this.o.od(f.userData.S.url,f.userData.S.target)):f.userData.xi=Date.now();while(!f.userData.stopPropagation&&(f=f.parent))};v.prototype.pt=function(f){50>f.clientX&&50>f.clientY&&this.o.ag();if(0<this.vb.length){f=this.vb[0];for(var e=1;e<this.vb.length;e++)this.vb[e].position.z>f.position.z&&(f=this.vb[e]);e=f.userData;e.S?(f=e.S,this.o.od(f.url,f.target)):(this.me(f,"onclick"),this.me(f,"onmousedown"))}else this.Wc.x=this.ca.x,
this.Wc.y=this.ca.y};v.prototype.animate=function(){var f=this.Ro=this;this.Ra&&this.Ra.setAnimationLoop(function(){f.render()})};v.prototype.render=function(){if(THREE){var f=null;try{f=this.Ra.xr.getCamera(this.camera)}catch(t){}this.Lm=f;0==this.Gh&&f&&(this.Gh=f.position.y,this.Dd.translateY(this.Gh));var e=this.Ro,a=e.o;if(a.ie){e.Rg=e.Hk.visible||e.Ik.visible?!1:!0;var b=this.Is();this.Js();this.Mj&&0<this.oj.length&&this.oj.every(function(t){return t.so})&&(this.qh(this.Mj),this.rf.remove(this.Mj),
this.Mj=null,a.O("unload Preview Sphere"));for(var c=this.Dd,h=c.children.length-1;0<=h;h--){var m=c.children[h],n=1,q=1;m.selected?(n=1.5,q=1):b?(n=.6,q=.7):(n=.4,q=.5);var r=m.scale.x;r+=.1*(n-r);m.userData.fromSkin?m.userData.ggUse3d&&(r=10):(m.material.opacity+=.1*(q-m.material.opacity),m.userData&&m.userData.S&&m.userData.S.gd?(m.userData.S.Jf&&(r=1,m.material.opacity=1),0<m.children.length&&(m.children[0].material.opacity=m.material.opacity)):(m.rotateY(1*Math.PI/180),0<m.children.length&&(m.children[0].rotateY(-1*
Math.PI/180),m.children[0].material.opacity=m.material.opacity)));m.scale.x=m.scale.y=m.scale.z=r}b=e.camera.rotation.clone();b.reorder("YXZ");this.Mm=180*b.y/Math.PI;this.Nm=180*b.x/Math.PI;a.Li&&!this.Pe.visible&&(10<this.Nm?this.Cj||(this.Cj=!0,this.Ys=new Date):(this.Cj=!1,!this.eg&&!this.Rb.visible||this.dj||(this.dj=!0,this.Vk=new Date),this.eg=!1),!this.Cj||this.eg||this.Rb.visible||(c=new Date,500<c.getTime()-this.Ys.getTime()&&(this.eg=!0,this.Vk=new Date)),this.eg?(this.Rb.visible=!0,c=
new Date,c=(c.getTime()-this.Vk.getTime())/5,100<=c?(this.Rb.material.opacity=1,this.eg=!1):this.Rb.material.opacity=c/100):this.dj&&(c=new Date,c=(c.getTime()-this.Vk.getTime())/5,100<=c?(this.Rb.material.opacity=0,this.dj=this.Rb.visible=!1):this.Rb.material.opacity=1-c/100));this.$l&&(this.pi(this.Mm-a.pan.m),this.$l=!1);a.Hp(this.Mm-this.yf,this.Nm,180*b.z/Math.PI);a=this.eh;e.Rg?f&&(a.setRotationFromEuler(f.rotation),a.visible=!0):a.visible=!1;a=this.Am;f&&!this.Pe.visible&&(a.translateZ(-(this.Dg+
.1)),a.rotateY(-this.Bm),b=new THREE.Vector3(0,0,1),b.applyEuler(f.rotation),this.Bm=Math.atan2(b.x,b.z),a.rotateY(this.Bm),a.translateZ(this.Dg+.1));e.Ra.autoClear=!0;e.Ra.render(e.Vt,e.camera);e.Ra.autoClear=!1;e.Ra.clearDepth();e.Ra.render(e.Cu,e.camera);0==this.Zh||isNaN(this.Zh)||this.pi(this.Zh)}}};v.prototype.Is=function(){var f=this,e=this;this.Gc=[];var a=!0;this.session?this.session.inputSources.forEach(function(q){var r=q.profiles;"gaze"==q.targetRayMode?e.Rg=!0:(f.Gc.push(q.gamepad),0<=
r.indexOf("oculus-go")&&(a=!1),0<=r.indexOf("generic-trigger-squeeze-thumbstick")&&(a=!0),0<=r.indexOf("oculus-touch")&&(a=!0))}):this.Gc=navigator.getGamepads&&navigator.getGamepads();var b=!1;if(this.Gc)for(var c=0;c<this.Gc.length;c++){var h=this.Gc[c];if(h&&0<h.buttons.length)if(2<=h.axes.length&&2<h.buttons.length&&!a)if(h.buttons[2].pressed)this.uf[c]||(this.uf[c]=!0,this.ri());else if(h.buttons[2].touched){b=!0;this.uf[c]=!1;var m=h.axes[0],n=h.axes[1];-1==this.Ce[c]?this.Ce[c]=m:(h=this.Ce[c]-
m,-.3>h&&(this.pi(20),this.Ce[c]=m,this.De[c]=n),.3<h&&(this.pi(-20),this.Ce[c]=m,this.De[c]=n));-1==this.De[c]?this.De[c]=n:(h=this.De[c]-n,-.5>h&&(this.ri(!0),this.De[c]=n,this.Ce[c]=m),.5<h&&(this.ri(!1),this.De[c]=n,this.Ce[c]=m))}else this.Ce[c]=-1,this.De[c]=-1,this.uf[c]=!1;else 4<=h.axes.length&&(m=h.axes[2],n=h.axes[3],.8<m?(b=!0,1!=this.tf[c]&&(this.tf[c]=1,this.xj[c]=Date.now()-1E4)):-.8>m?(b=!0,-1!=this.tf[c]&&(this.tf[c]=-1,this.xj[c]=Date.now()-1E4)):this.tf[c]=0,0!=this.tf[c]&&400<
Date.now()-this.xj[c]&&(this.xj[c]=Date.now(),this.pi(20*this.tf[c])),h.buttons[1].pressed?this.uf[c]||(this.uf[c]=!0,this.ri()):this.uf[c]=!1)}e.Jk.visible==(!this.Gc||0==this.Gc.length)&&(e.Jk.visible=!e.Jk.visible);return b};v.prototype.gp=function(f){for(f=f.parent;f;){if(f.selected)return!0;f=f.parent}return!1};v.prototype.Js=function(){var f=this.Ro;f.Ij=f.vb.slice();f.Ek();f.Hk.visible&&f.intersectObjects(f.Hk);f.Ik.visible&&f.intersectObjects(f.Ik);f.Yk||f.Rs();f.Rg&&f.Ss();for(var e=0;e<
f.vb.length;e++){var a=f.vb[e];f.Rg&&this.gn(a,!1);-1!=f.Ij.indexOf(a)||this.gp(a)||(this.me(a,"onmouseover"),this.Gc&&0<this.Gc.length&&this.me(a,"onclick",!0))}for(e=0;e<f.Ij.length;e++)a=f.Ij[e],-1==f.vb.indexOf(a)&&(this.gp(a)||this.me(a,"onmouseout"),f.Rg&&this.gn(a,!0))};v.prototype.ri=function(f){var e=this.Pe;void 0===f&&(f=!e.visible);var a=this.Lm;f?(e.translateZ(-this.Dg),e.rotateY(-this.nm),a&&(f=new THREE.Vector3(0,0,1),f.applyEuler(a.rotation),this.nm=Math.atan2(f.x,f.z)),e.rotateY(this.nm),
e.translateZ(this.Dg),this.Pe.visible=!0,this.Rb.material=this.Rb.userData.$s,this.Rb.visible=!0,this.Rb.material.opacity=1):(this.Pe.visible=!1,this.Rb.material=this.Rb.userData.bt,this.Rb.visible=!1)};v.prototype.Pt=function(){this.yf=0;this.Ie.setRotationFromEuler(this.Zo)};v.prototype.pi=function(f){this.yf+=f;this.Ie.rotateY(f*Math.PI/180)};return v}();y.Hq=w})(ggP2VR||(ggP2VR={}));
(function(y){var w=function(){return function(){this.fov=this.u=this.pan=0}}();y.qv=w;var v=function(){function f(e){this.pan={m:0,Ha:0,min:0,max:360,d:0,bi:0,Yb:0,open:0};this.u={m:0,Ha:0,min:-90,max:90,d:0,Yb:0,open:0};this.W={m:0,Ha:0,min:-180,max:180,d:0,open:0};this.nc={pan:0,u:-90,W:0,fov:170,pb:9};this.fov={m:70,Ha:70,min:1,Yh:0,max:170,Hl:360,Il:270,prev:0,d:0,Nc:{enabled:!1,x:0,y:0},mode:0,Sp:0,xn:0,open:0};this.cube=new y.Bq;this.sa=null;this.Xa={W:0,pitch:0};this.Fg=this.Ed=!1;this.Jj=
this.cp=4;this.bp=this.Ml=0;this.M=new y.zq;this.tg=200;this.Di=0;this.zm=5;this.fe=0;this.Zp=50;this.Ns=0;this.B={src:[],af:4,width:640,height:480,Tc:!1,pg:!1,Yj:!0,rm:!1,qe:"loop",ak:"",j:HTMLVideoElement=null,ym:!1,texture:WebGLTexture=null,kk:WebGLBuffer=null,Ci:WebGLBuffer=null,qj:WebGLBuffer=null,format:1,Eh:0,flipY:1,sb:function(){return 0},cm:function(){},loop:function(){return!1}};this.vf={pan:-1,u:-1,fov:-1};this.Cl=0;this.kh=[];this.Lk="";this.lh=[];this.Kg=this.Re=1;this.Pl=new w;this.o=
e}f.prototype.ma=function(){this.o.ma(!1)};f.prototype.update=function(){this.o.update()};f.prototype.lf=function(){return this.pan.m};f.prototype.hl=function(){for(var e=this.pan.m;-180>e;)e+=360;for(;180<e;)e-=360;return e};f.prototype.ue=function(){for(var e=this.pan.m-this.pan.bi;-180>e;)e+=360;for(;180<e;)e-=360;return e};f.prototype.ae=function(e){this.ma();isNaN(e)||(this.pan.m=Number(e));this.update()};f.prototype.Vj=function(e){this.ma();isNaN(e)||(this.pan.m=Number(e)+this.pan.bi);this.update()};
f.prototype.Ui=function(e,a){isNaN(e)||(this.ae(this.lf()+e),a&&(this.pan.d=e))};f.prototype.kn=function(e,a){this.Ui(e*this.hf(),a)};f.prototype.hf=function(){return Math.min(1,2*Math.tan(Math.PI*Math.min(this.fov.m,90)/360))};f.prototype.ig=function(){return this.u.m};f.prototype.be=function(e){this.ma();isNaN(e)||(this.u.m=Number(e));this.update()};f.prototype.Vi=function(e,a){this.be(this.ig()+e);a&&(this.u.d=e)};f.prototype.mn=function(e,a){this.Vi(e*this.hf(),a)};f.prototype.Ag=function(e){this.ma();
isNaN(e)||(this.W.m=Number(e));this.update()};f.prototype.mj=function(){return this.W.m};f.prototype.Cd=function(){return this.fov.m};f.prototype.zb=function(e){this.ma();switch(this.Z()){case 4:var a=170;break;case 12:a=360;break;case 9:a=355;break;default:a=170}this.$b()&&(a=9999999999);return!isNaN(e)&&0<e&&e<a&&(a=this.fov.m,this.fov.m=1*e,this.bf(),a!=this.fov.m)?(this.update(),!0):!1};f.prototype.fm=function(e){0<=e&&4>e&&(this.fov.mode=Number(e),this.bf(),this.update())};f.prototype.$b=function(){return 2==
this.o.Xd};f.prototype.Bk=function(e,a){this.zb(this.Cd()+e);a&&(this.fov.d=e)};f.prototype.Ti=function(e,a){if(!isNaN(e)){var b=e/90*Math.cos(Math.min(this.fov.m,90)*Math.PI/360);b=this.fov.m*Math.exp(b);this.zb(b);a&&(this.fov.d=e)}};f.prototype.km=function(e,a){this.ma();isNaN(e)||(this.pan.m=e);isNaN(a)||(this.u.m=a);this.update()};f.prototype.Hp=function(e,a,b){this.ma();!isNaN(e)&&1E7>e&&-1E7<e&&(this.pan.m=e);!isNaN(a)&&1E7>a&&-1E7<a&&(this.u.m=a);!isNaN(b)&&1E7>b&&-1E7<b&&(this.W.m=b);this.update()};
f.prototype.zg=function(e,a,b){this.ma();isNaN(e)||(this.pan.m=e);isNaN(a)||(this.u.m=a);isNaN(b)||this.zb(b);this.update()};f.prototype.zp=function(){this.zg(this.pan.Ha,this.u.Ha,this.fov.Ha)};f.prototype.qb=function(e,a,b){var c=a?Number(a):0;if(0!=e&&4!=e&&12!=e&&9!=e)this.o.Uc("Unsupported projection type: "+e);else if(a&&0!==c&&4!==c&&12!==c&&9!==c)this.o.Uc("Unsupported projection2 type: "+c);else if(e==c&&(c=0),this.bp=b?Number(b):1,this.Jj!=e||this.Ml!=c)this.Jj=e,this.Ml=c,this.sa.rj()};
f.prototype.Z=function(){return 0==this.Jj?4:this.Jj};f.prototype.Hc=function(){return this.Ml};f.prototype.Bh=function(){return this.cp};f.prototype.lj=function(){return this.bp};f.prototype.aspect=function(){return this.o.C.width/this.o.C.height};f.prototype.Eo=function(){return 4==this.Z()&&0==this.Hc()};f.prototype.Mb=function(e,a){e||(e=this.fov.m);a||(a=this.Z());return this.Wf(a,1/this.Jn(this.o.C),e)};f.prototype.Wf=function(e,a,b){return this.$b()?a*b:4==e?360*Math.atan(a*Math.tan(b/2*Math.PI/
180))/Math.PI:9==e?720*Math.atan(a*Math.tan(b/4*Math.PI/180))/Math.PI:a*b};f.prototype.bl=function(e,a){e||(e=this.Mb());a||(a=this.Z());return this.Wf(a,this.aspect(),e)};f.prototype.al=function(e,a){e||(e=this.Mb());a||(a=this.Z());var b=this.aspect();b=Math.sqrt(1+b*b);return this.Wf(a,b,e)};f.prototype.hn=function(e){var a;a||(a=this.Z());return this.Wf(a,this.Jn(this.o.C),e)};f.prototype.Jn=function(e){var a=1;switch(this.fov.mode){case 0:a=1;break;case 1:a=e.width/e.height;break;case 2:a=Math.sqrt(e.width*
e.width+e.height*e.height)/e.height;break;case 3:a=4*e.height/3>e.width?1:3*e.width/(4*e.height)}return a};f.prototype.ui=function(e){this.zb(this.hn(e))};f.prototype.gm=function(e){var a=this.Z(),b=1/this.aspect();this.ui(this.Wf(a,b,e))};f.prototype.dm=function(e){var a=this.Z(),b=this.aspect();b=1/Math.sqrt(1+b*b);this.ui(this.Wf(a,b,e))};f.prototype.bf=function(){if(!this.o.ie){var e=this.Pl;e.pan=this.pan.m;e.u=this.u.m;e.fov=this.fov.m;this.Uf(e);this.Uf(e);this.Uf(e);this.pan.m=e.pan;this.u.m=
e.u;this.fov.m!=e.fov&&(this.fov.m=e.fov)}};f.prototype.Uf=function(e){var a=this.aspect();var b=this.o.C;var c=this.o,h=c.v;if(this.$b()){if(0<this.fov.Yh){var m=this.Re;this.M.levels&&0<this.M.levels.length&&(m=this.M.levels[0].height);10<m&&(this.fov.min=100*b.height/(m*this.fov.Yh))}m=e.fov/2;b=m*a;var n=this.M.width/this.M.height*50;a=c.I.yp?2*Math.min(50,n/a):2*Math.max(50,n/a);e.fov<this.fov.min&&(e.fov=this.fov.min);e.fov>a&&(e.fov=a);50<m?e.u=0:(50<e.u+m&&(e.u=50-m),-50>e.u-m&&(e.u=-50+m));
b>n?e.pan=0:(e.pan+b>n&&(e.pan=n-b,c.v.active&&(c.v.speed=-c.v.speed,this.pan.d=0)),e.pan-b<-n&&(e.pan=-n+b,h.active&&(h.speed=-h.speed,this.pan.d=0)))}else{0<this.fov.Yh&&(m=this.Re,this.M.levels&&0<this.M.levels.length&&(m=this.M.levels[0].height),10<m&&(this.fov.min=360*Math.atan2(b.height/2,m/2*this.fov.Yh)/Math.PI));e.fov<this.fov.min&&(e.fov=this.fov.min);n=this.fov.max;var q=179;m=this.Mb()/2;b=a*m;4==this.Z()?b=180*Math.atan(a*Math.tan(m*Math.PI/180))/Math.PI:9==this.Z()?(n=this.fov.Il,q=
355):12==this.Z()&&(n=this.fov.Hl,q=360);c.na||(n=Math.max(160,n));e.fov>n&&(e.fov=n);12==this.Z()&&(2*b>q&&(e.fov=q/a),m=this.Mb()/2,2*m>q&&(e.fov=q),m=this.Mb()/2,b=a*m);2*m>this.u.max-this.u.min&&180>this.u.max-this.u.min&&(m=(this.u.max-this.u.min)/2,e.fov=this.hn(2*m));90>this.u.max?e.u+m>this.u.max&&(e.u=this.u.max-m):e.u>this.u.max&&(e.u=this.u.max);-90<this.u.min?e.u-m<this.u.min&&(e.u=this.u.min+m):e.u<this.u.min&&(e.u=this.u.min);c=this.pan.max-this.pan.min;359.99>c&&(a=90,n=Math.tan(m*
Math.PI/180),q=Math.tan((Math.abs(e.u)+m)*Math.PI/180),q=Math.sqrt(q*q+1)/Math.sqrt(n*n+1),m=180*Math.atan(q*Math.tan(b*Math.PI/180))/Math.PI,2*m>c&&(q=Math.tan(c*Math.PI/360)/Math.tan(b*Math.PI/180),c=q*Math.sqrt(n*n+1),q=Math.sqrt(c*c-1),a=180/Math.PI*Math.atan(q)),e.pan+m>this.pan.max&&(e.pan=this.pan.max-m,h.active&&(h.speed=-h.speed,this.pan.d=0)),e.pan-m<this.pan.min&&(e.pan=this.pan.min+m,h.active&&(h.speed=-h.speed,this.pan.d=0)),e.u+b>a&&(e.u=a-b),e.u-b<-a&&(e.u=-a+b))}};f.prototype.Jg=function(e,
a,b,c,h){var m=this.M.El-1-a,n=this.M.Fl,q="x";switch(e){case 0:q="f";break;case 1:q="r";break;case 2:q="b";break;case 3:q="l";break;case 4:q="u";break;case 5:q="d";break;case "vr":q="vr"}h&&(e+="l",q+="l");h=this.o.sp;for(var r=0;3>r;r++)n=h(n,"c",e),n=h(n,"s",q),n=h(n,"r",a),n=h(n,"l",m),n=h(n,"x",b),n=h(n,"y",c),n=h(n,"v",c),n=h(n,"h",b);return this.o.fb(n)};f.prototype.qs=function(e,a,b){b.Oc=e.width/this.M.V*a.xh;b.Bd=e.height/this.M.V*a.yh;b.Gd=e.width/this.M.V*a.Vh;b.Hd=e.height/this.M.V*a.Wh;
b.Oc=Math.min(Math.max(0,Math.floor(b.Oc)),e.Y-1);b.Bd=Math.min(Math.max(0,Math.floor(b.Bd)),e.ta-1);b.Gd=Math.min(Math.max(0,Math.floor(b.Gd)),e.Y-1);b.Hd=Math.min(Math.max(0,Math.floor(b.Hd)),e.ta-1)};f.prototype.av=function(){if(!(6>this.cube.dg.length))for(var e=0;6>e;e++){var a=this.cube.dg[e];var b=[];b.push(new y.Ta(-1,-1,-1,0,0));b.push(new y.Ta(1,-1,-1,1,0));b.push(new y.Ta(1,1,-1,1,1));b.push(new y.Ta(-1,1,-1,0,1));for(var c=0;4>c;c++)4>e?b[c].Na(-Math.PI/2*e):b[c].Ja(Math.PI/2*(4==e?-1:
1)),this.Xa&&(b[c].yb(this.Xa.W*Math.PI/180),b[c].Ja(-this.Xa.pitch*Math.PI/180)),b[c].Ef(-this.pan.m),b[c].$d(this.u.m),b[c].Ff(this.W.m);b=this.o.Fk(b);a.oc=0<b.length;if(a.oc){a=a.gi;a.xh=b[0].Kd;a.Vh=b[0].Kd;a.yh=b[0].hc;a.Wh=b[0].hc;for(c=1;c<b.length;c++)a.xh=Math.min(a.xh,b[c].Kd),a.Vh=Math.max(a.Vh,b[c].Kd),a.yh=Math.min(a.yh,b[c].hc),a.Wh=Math.max(a.Wh,b[c].hc);a.Ki=a.Vh-a.xh;a.mk=a.Wh-a.yh;a.scale=Math.max(a.Ki,a.mk)}else a.gi.Ki=-1,a.gi.mk=-1}};f.prototype.Qo=function(){for(var e=0;e<this.M.levels.length;e++){var a=
this.M.levels[e],b;for(b in a.La)a.La.hasOwnProperty(b)&&(a.La[b].visible=!1)}};f.prototype.Hn=function(){var e=0,a=this.o.C,b=Math.tan(Math.min(this.Mb(),175)*Math.PI/360),c=a.height/(2*b);c*=1+a.width/a.height*b/2;for(c*=Math.pow(2,1<this.o.devicePixelRatio?this.M.Po:this.M.Oo);this.M.levels.length>=e+2&&!this.M.levels[e+1].Cf&&this.M.levels[e+1].width>c;)e++;return e};f.prototype.Dt=function(){if(this.o.I.xp&&this.o.I.Ud){var e=this.Pl;e.pan=this.pan.m;e.u=this.u.m;e.fov=this.fov.m;this.Uf(e);
this.Uf(e);this.Uf(e);var a=e.pan-this.pan.m,b=e.u-this.u.m;e=e.fov-this.fov.m;if(0!=a||0!=b||0!=e){var c=.2+.9*Math.min((Math.abs(a)+Math.abs(b)+Math.abs(e))/Math.abs(Math.min(this.fov.m,90))*.3,1);this.pan.m+=a*c;this.u.m+=b*c;this.fov.m+=e*c;this.o.ka.am=.3;this.update()}else this.o.ka.am=0}else this.bf();if(isNaN(this.pan.m)||1E7<this.pan.m||-1E7>this.pan.m)this.pan.m=0;if(isNaN(this.u.m)||1E7<this.u.m||-1E7>this.u.m)this.u.m=0;if(isNaN(this.W.m)||1E7<this.W.m||-1E7>this.W.m)this.W.m=0;if(!this.$b()){for(;360<
this.pan.m;)this.pan.m-=360;for(;-360>this.pan.m;)this.pan.m+=360}};return f}();y.Aq=v})(ggP2VR||(ggP2VR={}));var S=!1;
(function(y){var w=function(){return function(){this.fov=this.u=this.pan=0}}(),v=function(){return function(){this.rn=-1E7;this.xo=!1}}(),f=function(){function e(a,b){this.Ws="TGljZW5zZTogRGF2aWQgRyBNZWhhcw==";this.N=new y.Aq(this);this.pan=this.N.pan;this.u=this.N.u;this.W=this.N.W;this.nc=this.N.nc;this.fov=this.N.fov;this.Xd=0;this.Xa=this.N.Xa;this.C={width:10,height:10};this.Nk=new y.Ta;this.crossOrigin="anonymous";this.Sd=this.Mf=0;this.fd=1;this.qq={};this.Fg=this.Ed=!1;this.Qa={};this.ji=this.mh="";this.Ql=[];this.Bl=
!1;this.ia={start:{x:0,y:0},pa:{x:0,y:0},Wd:{x:0,y:0},m:{x:0,y:0},ha:{x:0,y:0}};this.T={Wc:!1,hd:!1,tj:function(){return this.hd||this.Wc},In:0,startTime:0,start:{x:0,y:0},pa:{x:0,y:0},Wd:{x:0,y:0},m:{x:0,y:0},ha:{x:0,y:0},hi:!1,Gg:HTMLElement=null};this.gf=this.re=!0;this.ka={enabled:!0,pa:{x:0,y:0},ha:{x:0,y:0},am:0,fov:{active:!1,mc:0,center:{enabled:!1,x:0,y:0}}};this.nb={alpha:0,beta:0,gamma:0,orientation:0,yf:0,oi:!0,fadeIn:0};this.Fh={alpha:0,beta:0,gamma:0,orientation:0};this.B={src:[],af:4,
width:640,height:480,Tc:!1,pg:!1,Yj:!0,rm:!1,qe:"loop",ak:"",j:HTMLVideoElement=null,ym:!1,texture:WebGLTexture=null,kk:WebGLBuffer=null,Ci:WebGLBuffer=null,qj:WebGLBuffer=null,format:1,Eh:0,flipY:1,sb:function(){return 0},cm:function(){},loop:function(){return!1}};this.wj=0;this.control=this.rb=this.Ia=this.$=this.Fc=this.bb=this.ea=null;this.vd=[];this.tb=!1;this.oh=1;this.ua=null;this.je=this.Ue=this.nf=!1;this.ah=0;this.Md=.02;this.uk=0;this.vk=!1;this.tk=this.Pi=this.bh=this.Pf=this.bn=0;this.$m=
-1;this.wc="";this.Zl=this.Me=!1;this.fi=0;this.kh=[];this.Lk="";this.lh=[];this.Kg=this.Re=1;this.xg=!1;this.v={enabled:!1,timeout:5,active:!1,Eg:!1,speed:.4,ek:0,wo:!1,Gj:0,Yo:!0,ug:"",Xo:!1,Sg:!1,rd:!1,Qi:"",pn:!1,Nd:"Animation01",Qf:!1,Dj:!1,um:!1,startTime:0,kd:0,wh:!1,Zi:!1,zj:0,Fd:0,Rh:0,Sh:0,Qh:0,Lo:0};this.F={active:!1,aborted:!1,speed:.1,pan:0,u:0,W:0,fov:70,Bi:70,Rh:0,Sh:0,Mo:0,Qh:0,pb:0,ki:0,Dl:0,Im:!1,$h:!1,Zm:0,Ym:0,pj:!1};this.Km=null;this.vf={pan:-1,u:-1,fov:-1};this.Cl=0;this.Li=
this.ga=null;this.Tg={};this.Ug={};this.Kf={};this.ob={};this.Ua={};this.oe=[];this.an={};this.rc={};this.Vc={};this.sg={};this.K={mode:1,Oh:-1,Da:0,jb:0,td:.05,Wb:255,Vb:1,Ub:255,Tb:.3,ze:!0,ck:{enabled:!0,width:180,height:20,dk:0,bk:1,background:!0,Ub:16777215,Tb:1,Wb:0,Vb:1,xk:3,Si:1,nk:!0},Qb:[],Ac:[],qd:[],Wj:[]};this.Fa=null;this.J=[];this.Np=!1;this.X=[];this.U=[];this.Wa=[];this.Sb=[];this.Te=[];this.Za=[];this.ya=[];this.Hf=[];this.Ae=this.pd=!1;this.wi=-1;this.ba=1;this.sa=this.Je=this.Xb=
this.lc=null;this.th={};this.dc={};this.Xp=this.Hg="";this.Wp=-1;this.xt={target:0,current:0,td:.01,delay:2,Sk:0,$i:!1,Tq:!1};this.margin={left:0,top:0,right:0,bottom:0};this.I={Uh:!1,Xs:!1,qc:!1,Ee:!1,Ud:!0,Ao:!1,qm:1,xp:!1,Nf:!0,Pk:!0,ih:!0,jh:!0,Xi:!1,mg:!1,yp:!0,sensitivity:8};this.Xh=[];this.ph=!0;this.ca={x:0,y:0};this.Ji=this.Pg=this.Og=this.ie=this.na=!1;this.jk=this.gv=!0;this.rl=!1;this.se=!0;this.Qg=this.ol=this.ql=!1;this.lq=!0;this.tl=!1;this.kb=this.le="";this.Zb="transition";this.Ad=
"transform";this.Yf="perspective";this.pr="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA5JREFUeNpiYBgeACDAAADIAAE3iTbkAAAAAElFTkSuQmCC";this.Ab={width:0,height:0};this.Nn=new y.Ta;this.Mn=new y.Ta;this.On=new y.Ta;this.Pn=new y.Ta;this.Ln=new y.Ta;this.sf=!1;this.ec=this.Ko=this.xa="";this.lk=[];this.Kl=[];this.Lh=this.Bo=this.Jh=this.Co=this.yl=this.Vd=this.Fo=this.wl=this.bm=this.Sc=this.uj=this.ng=this.xl=this.Do=this.zl=
this.Ho=this.ml=!1;this.Ii=!0;this.Qj=this.sj=!1;this.Hh=[];this.devicePixelRatio=1;this.fa=this.D=null;this.fh=!1;this.Ya=null;this.Ea={enabled:!1,speed:1,running:!1,finished:!0,zd:{pan:0,u:0,fov:0,pb:0,kq:!1}};this.Jl=!1;this.Bj="<<LOG>>";this.Hm=!1;this.hh=function(h,m){if(0==h.length)return h;var n;var q=[];var r=m.Nj(h[0])-0;for(n=0;n<h.length;n++){var t=n;var x=n+1;x==h.length&&(x=0);var z=m.Nj(h[x])-0;if(0<=r&&0<=z)q.push(h[t]);else if(0<=r||0<=z){var C=z/(z-r);0>C&&(C=0);1<C&&(C=1);var F=
new y.Ta;F.Td(h[t],h[x],C);0>r||q.push(h[t]);q.push(F)}r=z}return q};this.Pl=new w;this.pm=0;this.mi="";this.xc=!1;this.yj=-1;this.Xr=function(h){return h?this.Kh()&&(h.clientX||h.clientY)?{x:h.clientX,y:h.clientY}:h.pageX||h.pageY?{x:h.pageX,y:h.pageY}:h.clientX||h.clientY?{x:h.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,y:h.clientY+document.body.scrollTop+document.documentElement.scrollTop}:h.touches&&h.touches[0]?{x:h.touches[0].pageX,y:h.touches[0].pageY}:{x:0,y:0}:{x:0,
y:0}};this.te=function(h){h=this.Xr(h);var m=this.Ch();return{x:h.x-m.x,y:h.y-m.y}};this.Fj=1;this.fj=this.Io=this.Tk=this.Vl=this.Oj=0;this.Jo=!1;this.Qd=!0;this.qn=[5,0,0];this.lb=new y.Mi(this);this.lb.ze=!1;this.An();if(7<this.Bj.length){var c=e.nh("bG9n");window[e.nh("Y29uc29sZQ==")][c](e.yn(this.Bj))}this.Ne(this.lb);this.checkLoaded=this.vd;this.isLoaded=!1;b&&b.hasOwnProperty("webGLFlags")&&b.webGLFlags&&(this.qq=b.webGLFlags);this.ma(!1);this.Pa=new y.wq(this);this.un(a);this.Sq();this.userdata=
this.Tg=this.cg();this.emptyHotspot=this.lb;this.mouse=this.ca;this.D=new y.xq(this);this.Ya=new y.yq(this);this.sa=new y.Gq(this);this.N.sa=this.sa;this.Ga=new y.Hq(this);this.fc()}e.prototype.qo=function(a){return-99991===a?this.Ws:"7.0 beta6/19829"};e.prototype.zr=function(){return this.fd};e.prototype.Wt=function(a){0<a&&(this.fd=a)};e.prototype.Oi=function(a){if(""!=a)try{var b=void 0;b="object"===typeof a?a:JSON.parse(a);if("object"===typeof b)for(var c in b)if("translations"==c&&this.Qa.hasOwnProperty("translations")){var h=
b[c],m;for(m in h)if(this.Qa.translations.hasOwnProperty(m))for(a=0;a<h[m].length-1;a++)""!=h[m][a]&&(this.Qa.translations[m][a]=h[m][a]);else this.Qa.translations[m]=h[m]}else this.Qa[c]=b[c];this.Qa.hasOwnProperty("projectLanguage")&&(this.ji=this.Qa.projectLanguage);this.H("languagechanged",{language:this.mh})}catch(n){console.error(n)}};e.prototype.ab=function(a,b){var c=a;if(""!=c&&"object"===typeof this.Qa&&this.Qa.hasOwnProperty("languages")&&this.Qa.hasOwnProperty("translations")){var h=this.Qa.languages.indexOf(this.mh);
-1!=h&&this.Qa.translations.hasOwnProperty(a)&&(a=this.Qa.translations[a],Array.isArray(a)&&a.length>h&&""!=a[h]&&(c=a[h]))}if(b&&0<b.length)for(h=b.length-1;0<=h;h--)c=c.replace(new RegExp("%"+String(h+1),"g"),b[h]);return c};e.prototype.im=function(a){this.Bl=!0;a=a.replace("_","-");if("object"===typeof this.Qa&&this.Qa.hasOwnProperty("languages")&&this.Qa.hasOwnProperty("translations")&&this.ji!=a){for(var b=-1,c=-1,h="",m=-1,n=-1,q=a.substring(0,2).toUpperCase(),r=0;r<this.Qa.languages.length;r++)if(this.Qa.languages[r].toUpperCase()==
a.toUpperCase()){b=r;break}else if(!this.ji.toUpperCase().startsWith(q)&&this.Qa.languages[r].toUpperCase().startsWith(q)){if(""==h||-1!=h.indexOf("-"))c=r,h=this.Qa.languages[r]}else for(var t=window.navigator.languages,x=0;x<t.length;x++)!this.ji.toUpperCase().startsWith(q)&&this.Qa.languages[r].toUpperCase().startsWith(t[x].substring(0,2).toUpperCase())&&(-1==n||x<n)&&(m=r,n=x);a=-1!=b?b:-1!=c?c:m;a=-1!=a?this.Qa.languages[a]:this.ji}this.mh!=a&&(this.mh=a,this.Yq(),this.Zq(),this.$.setAttribute("lang",
a),this.H("languagechanged",{language:a}))};e.prototype.Or=function(){return this.mh};e.prototype.ms=function(){return this.Ql};e.prototype.Kk=function(){this.D.enabled=this.fa.enabled;this.D.type=this.fa.type;this.D.da=this.fa.zoomin;this.D.dd=this.fa.zoomout;this.D.dh=this.fa.blendtime;this.D.Xg=this.fa.zoomoutpause;this.D.rk=this.fa.zoomfov;this.D.pk=this.fa.zoomafterinfov;this.D.qk=this.fa.zoomafteroutfov;this.D.Yg=this.fa.zoomspeed;this.D.Rf=this.fa.blendcolor;this.D.Yc=this.fa.softedge;this.fa=
null};e.prototype.ru=function(a){this.fa={};this.fa.enabled=!0;this.fa.type=this.D.type;this.fa.zoomin=this.D.da;this.fa.zoomout=this.D.dd;this.fa.blendtime=this.D.dh;this.fa.zoomoutpause=this.D.Xg;this.fa.zoomfov=this.D.rk;this.fa.zoomafterinfov=this.D.pk;this.fa.zoomafteroutfov=this.D.qk;this.fa.zoomspeed=this.D.Yg;this.fa.blendcolor=this.D.Rf;this.fa.softedge=this.D.Yc;if(a.hasOwnProperty("type")){var b=a.type;if("cut"==b||"crossdissolve"==b||"diptocolor"==b||"irisround"==b||"irisroundcenter"==
b||"irisrectangular"==b||"irisrectangularcenter"==b||"wipeleftright"==b||"wiperightleft"==b||"wipetopbottom"==b||"wipebottomtop"==b||"wiperandom"==b)this.fa.type=b}a.hasOwnProperty("before")&&(b=Number(a.before),0==b||2==b)&&(this.fa.zoomin=b);a.hasOwnProperty("after")&&(b=Number(a.after),0==b||2==b||3==b||4==b)&&(this.fa.zoomout=b);a.hasOwnProperty("transitiontime")&&(b=Number(a.transitiontime),0<=b&&50>=b&&(this.fa.blendtime=b));a.hasOwnProperty("waitfortransition")&&(this.fa.zoomoutpause=1==a.waitfortransition);
a.hasOwnProperty("zoomedfov")&&(b=Number(a.zoomedfov),.01<=b&&50>=b&&(this.fa.zoomfov=b));a.hasOwnProperty("zoomafterinfov")&&(b=Number(a.zoomafterinfov),70<=b&&120>=b&&(this.fa.zoomafterinfov=b));a.hasOwnProperty("zoomafteroutoutfov")&&(b=Number(a.zoomafteroutfov),.01<=b&&70>=b&&(this.fa.zoomafteroutfov=b));a.hasOwnProperty("zoomspeed")&&(b=Number(a.zoomspeed),.01<=b&&99>=b&&(this.fa.zoomspeed=b));a.hasOwnProperty("dipcolor")&&(this.fa.blendcolor=a.dipcolor);a.hasOwnProperty("softedge")&&(a=Number(a.softedge),
0<=a&&1E3>=a&&(this.fa.softedge=a));this.fh||this.Kk()};e.prototype.qb=function(a,b,c){this.N.qb(a,b,c)};e.prototype.Z=function(){return this.N.Z()};e.prototype.Bh=function(){return this.N.Bh()};e.prototype.Hc=function(){return this.N.Hc()};e.prototype.lj=function(){return this.N.lj()};e.prototype.Ck=function(a,b){if(0!=a&&4!=a&&12!=a&&9!=a)this.Uc("Unsupported projection type: "+a);else if(this.na||0==a||4==a||this.Uc("Projection changes require WebGL!"),this.Z()!=a){var c={};c.pan=this.pan.m;c.tilt=
this.u.m;c.fov=this.fov.m;c.projection=a;c.timingFunction=3;c.speed=b;a=this.zh(a);c.fov=Math.min(a,c.fov);this.Ej(c)}};e.prototype.addListener=function(a,b){(this.th[a]=this.th[a]||[]).push(b)};e.prototype.H=function(a,b){if(a=this.th[a])for(var c=a.length,h=0;h<c;h++)try{a[h].apply(null,[b])}catch(m){this.Uc(m)}};e.prototype.removeEventListener=function(a,b){var c=this.th[a];if(c){var h;var m=0;for(h=c.length;m<h;m++)if(c[m]===b){1===h?delete this.th[a]:c.splice(m,1);break}}};e.prototype.Ot=function(){this.tb=
!0};e.prototype.Bs=function(){return this.R};e.prototype.Nq=function(a,b,c,h){if(!this.dc.hasOwnProperty(a)){var m=new v;this.dc[a]=m;m.type=b;"undefined"!==typeof c&&this.Oe(a,c);"object"===typeof h&&this.Ip(a,h);return!0}return!1};e.Wn=function(a){var b=document.cookie.indexOf(a+"="),c="";-1!=b&&(b=b+a.length+1,a=document.cookie.indexOf(";",b),-1==a&&(a=document.cookie.length),c=decodeURIComponent(document.cookie.substring(b,a)));return c};e.uu=function(a,b){0==a.type?a.value="string"===typeof b?
b:b.toString():1==a.type?a.value="string"===typeof b?parseFloat(b):"number"===typeof b?b:b?1:0:2==a.type&&(a.value="string"===typeof b?"false"!==b&&""!==b&&"0"!==b:"number"===typeof b?0!=b:!!b)};e.prototype.Ip=function(a,b){if(this.dc.hasOwnProperty(a)&&"object"===typeof b){var c=this.dc[a];b.hasOwnProperty("cookiePath")&&(c.sn=String(b.cookiePath));b.hasOwnProperty("cookieExpireDays")&&(c.rn=parseFloat(b.cookieExpireDays));if(b.hasOwnProperty("keep")&&(c.Al=!!b.keep,c.Al&&0<document.cookie.length))if(""!=
this.Hg){if(-1!=document.cookie.indexOf(this.Hg+"=")){var h=JSON.parse(y.ic.Wn(this.Hg));h.hasOwnProperty(a)&&this.Oe(a,h[a])}}else h="ggvar_"+a,-1!=document.cookie.indexOf(h+"=")&&(h=y.ic.Wn(h),this.Oe(a,h));b.hasOwnProperty("ignoreInState")&&(c.xo=b.ignoreInState);b.hasOwnProperty("customProperty")&&"object"===typeof b.customProperty&&(b=b.customProperty,this.Ua.hasOwnProperty(a)?(this.Ua[a].variabletype!=b.variableType||this.Ua[a].propertytype!=b.propertyType)&&console.log("Custom property added as variable has different types than custom property from project."):
this.Ua[a]={Lf:b.variableType,li:b.propertyType,Rk:b.defaultValue});return!0}return!1};e.prototype.qu=function(a,b){this.Hg=a;b&&"object"===typeof b&&(b.hasOwnProperty("cookiePath")&&(this.Xp=String(b.cookiePath)),b.hasOwnProperty("cookieExpireDays")&&(this.Wp=parseFloat(b.cookieExpireDays)))};e.cn=function(a,b,c){-1<=b&&(a+="; max-age="+86400*b);""!=c&&(a+="; path="+c);return a};e.Xn=function(a,b){switch(b){case 0:return a;case 1:return a.toString();case 2:return a?"true":"false"}};e.$k=function(a,
b){switch(b){case 0:return a;case 1:return Number(a);case 2:return"true"==a}};e.prototype.Oe=function(a,b,c){void 0===c&&(c=!0);if(void 0===b)return!1;var h=!1;this.Ua.hasOwnProperty(a)&&(0==this.Ua[a].li?(this.Gp(this.xa,a,b),h=!0):1==this.Ua[a].li&&this.S&&(this.hm(this.xa,this.S.id,a,b),h=!0));if(this.dc.hasOwnProperty(a)){var m=this.dc[a];if(m.value!=b){y.ic.uu(m,b);if(m.Al&&c){if(""!=this.Hg){m={};for(var n=0,q=Object.keys(this.dc);n<q.length;n++)c=q[n],this.dc[c].Al&&(m[c]=encodeURIComponent(this.dc[c].value.toString()));
c=this.Hg+"="+JSON.stringify(m);c=y.ic.cn(c,this.Wp,this.Xp)}else c="ggvar_"+a+"="+encodeURIComponent(b.toString()),c=y.ic.cn(c,m.rn,m.sn?m.sn:"");document.cookie=c}h||this.H("varchanged_"+a,{value:b})}return!0}return!1};e.prototype.kl=function(a,b){void 0===b&&(b="");if(this.Ua.hasOwnProperty(a)){if(0==this.Ua[a].li)return this.io(this.xa,a);if(1==this.Ua[a].li){if(""!=b||this.S&&this.S!=this.lb)return this.cl(this.xa,""!=b?b:this.S.id,a);switch(this.Ua[a].Lf){case 0:return"";case 1:return 0;case 2:return!1}}}if(this.dc.hasOwnProperty(a))return this.dc[a].value};
e.nh=function(a){var b="",c=0;a=a.replace(/[^A-Za-z0-9+\/=]/g,"");do{var h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(c++));var m="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(c++));var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(c++));var q="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(c++));h=h<<2|m>>4;m=(m&15)<<4|n>>2;var r=(n&3)<<6|
q;b+=String.fromCharCode(h);64!=n&&(b+=String.fromCharCode(m));64!=q&&(b+=String.fromCharCode(r))}while(c<a.length);return b};e.Nu=function(a){for(var b=[1,1,1,1,2,2,3,0],c=a.length,h="",m=0;m<c;){var n=a.charCodeAt(m++);if(n&128){var q=b[n>>3&7];if(!(n&64&&q)||m+q>c)return null;for(n&=63>>q;0<q;--q){var r=a.charCodeAt(m++);if(128!=(r&192))return null;n=n<<6|r&63}}h+=String.fromCharCode(n)}return h};e.yn=function(a){return e.Nu(e.nh(a))};e.prototype.An=function(){this.devicePixelRatio=window.devicePixelRatio||
1;this.Ho=!!navigator.userAgent.match(/(Windows|Win)/g);this.zl=!!navigator.userAgent.match(/(Mac|Macintosh|Mac_powerpc)/g)&&!navigator.userAgent.match(/(like Mac)/g);this.Do=!!navigator.userAgent.match(/(Linux|Ubuntu)/g);this.xl=!!navigator.userAgent.match(/(MSIE)/g);this.ng=!!navigator.userAgent.match(/(Edge|EdgA|Edg)/g);this.uj=!!navigator.userAgent.match(/(Firefox)/g);if(this.Sc=!!navigator.userAgent.match(/(Safari)/g)){var a=navigator.userAgent.indexOf("Safari");this.Xc=navigator.userAgent.substring(a+
7);a=navigator.userAgent.indexOf("Version");-1!=a&&(this.Xc=navigator.userAgent.substring(a+8));this.Xc=this.Xc.substring(0,this.Xc.indexOf(" "));this.Xc=this.Xc.substring(0,this.Xc.indexOf("."));this.bm=!0}this.Fo=!!navigator.userAgent.match(/(SamsungBrowser)/g);if(this.wl=!!navigator.userAgent.match(/(Chrome|CriOS)/g))this.Sc=!1;this.Vd=!!navigator.userAgent.match(/(iPad|iPhone|iPod)/g);this.yl=!!navigator.userAgent.match(/(iPad)/g)||this.zl&&2<navigator.maxTouchPoints;this.Co=!!navigator.userAgent.match(/(iPhone|iPod)/g);
this.Jh=!!navigator.userAgent.match(/(android)/i);this.Bo=!!navigator.userAgent.match(/(IEMobile)/i);this.Lh=this.Vd||this.Jh||this.Bo||this.yl;/iP(hone|od|ad)/.test(navigator.platform)&&(a=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/),this.Hh=[parseInt(a[1],10),parseInt(a[2],10),parseInt(a[3]||"0",10)]);this.sj=!window.requestAnimationFrame;a=["Webkit","Moz","O","ms","Ms"];this.kb="";this.Zb="transition";this.Ad="transform";this.Yf="perspective";for(var b=0;b<a.length;b++)"undefined"!==typeof document.documentElement.style[a[b]+
"Transform"]&&(this.kb="-"+a[b].toLowerCase()+"-",this.Zb=a[b]+"Transition",this.Ad=a[b]+"Transform",this.Yf=a[b]+"Perspective");this.rl=ma();this.na=na();this.Og=this.rl;this.na&&(this.Og=!1);this.Me=!0;this.Zl=!1;if(this.Vd||this.Jh)this.Fp(80),this.N.zm=2;this.Uc("Pano2VR player "+this.qo()+" - Prefix:"+this.kb+", "+(this.rl?"CSS 3D available":"CSS 3D not available")+", "+(this.na?"WebGL available":"WebGL not available"));S&&this.O("Pano2VR Debug version!");try{window.AudioContext=window.AudioContext||
window.webkitAudioContext,this.ra=new AudioContext}catch(c){this.ra=null}this.Sc&&(!this.bm||9>Number(this.Xc))&&(this.ra=null);this.Sc&&!this.Vd&&12<=Number(this.Xc)&&13>Number(this.Xc)&&(this.ra=null);this.Sc&&this.Vd&&13==Number(this.Hh[0])&&(1==Number(this.Hh[1])||2<=Number(this.Hh[1]))&&(this.ra=null);this.Ii=this.Co?this.Sc&&this.bm&&10<=Number(this.Xc)?!0:!1:!0};e.prototype.O=function(a){if(S){var b=document.getElementById("gg_debug");b&&(b.innerHTML=a.toString()+"<br />");window.console&&
window.console.log(a)}};e.prototype.Om=function(a){if(S){var b=document.getElementById("gg_debug");b&&(b.innerHTML=a.toString()+"<br />");window.console&&window.console.warn(a)}};e.prototype.Uc=function(a){var b=document.getElementById("gg_debug");b&&(b.innerHTML=a+"<br />");window.console&&window.console.log(a)};e.prototype.Fp=function(a){this.N.tg=a};e.prototype.setCrossOrigin=function(a){this.crossOrigin=a};e.prototype.$t=function(a){this.Be=a};e.prototype.gs=function(){return this.fi};e.prototype.Yt=
function(a){this.le=a};e.prototype.Vn=function(){return this.le};e.prototype.el=function(){return this.Lh};e.prototype.Zn=function(){return this.tl};e.prototype.Nr=function(){return this.sf};e.prototype.ds=function(){return this.sf?this.ho().length:1};e.prototype.Kr=function(){return this.v.active};e.prototype.bu=function(a){this.Lh=!!a};e.prototype.ij=function(){return this.isLoaded};e.prototype.Mr=function(){return!this.isLoaded};e.prototype.jf=function(){return Number(this.C.height)/(2*Math.tan(Math.PI/
180*(this.Mb()/2)))};e.prototype.Jp=function(a,b){try{this.isFullscreen&&(a=window.innerWidth,b=window.innerHeight);var c=a-this.margin.left-this.margin.right,h=b-this.margin.top-this.margin.bottom;if(!(10>c||10>h)){var m=window.devicePixelRatio||1;this.xg&&(m=1);this.ea.style.width=c+"px";this.ea.style.height=h+"px";this.ea.style.left=this.margin.left+"px";this.ea.style.top=this.margin.top+"px";if(this.na)try{this.bb&&(this.bb.style.position="absolute",this.bb.style.display="inline",this.bb.style.width=
c+"px",this.bb.style.height=h+"px",this.bb.width=c*m,this.bb.height=h*m),this.R&&(this.Ab.width=c*m,this.Ab.height=h*m,this.R.viewport(0,0,this.R.drawingBufferWidth,this.R.drawingBufferHeight))}catch(t){alert(t)}this.Fc&&(this.Fc.style.width=a+"px",this.Fc.style.height=b+"px",this.Fc.width=a,this.Fc.height=b);this.Ia&&(this.Ia.style.width=a+"px",this.Ia.style.height=b+"px",this.rb.style.width=a+"px",this.rb.style.height=b+"px",this.rb.width=a,this.rb.height=b,this.rb.style.left=this.margin.left+"px",
this.rb.style.top=this.margin.top+"px",this.ua&&this.ua!=this.Ia&&(this.ua.style.width=a+"px",this.ua.style.height=b+"px"));if(this.Pa){var n=this.Pa.ud;n.style.width=a+"px";n.style.height=b+"px";n.width=a;n.height=b;n.style.left=this.margin.left+"px";n.style.top=this.margin.top+"px"}this.nf&&(this.tb=!0);var q=this.ea.offsetWidth,r=this.ea.offsetHeight;if(this.C.width!=q||this.C.height!=r)this.C.width=q,this.C.height=r;this.fv();this.ua&&this.ua.ggUpdateSize&&this.ua.ggUpdateSize(a,b);this.H("sizechanged",
{w:a,h:b});this.H("playerstatechanged",{})}}catch(t){this.Om(t)}};e.prototype.he=function(){this.Hm=!0};e.prototype.fc=function(){this.Jp(this.lc.offsetWidth,this.lc.offsetHeight)};e.prototype.As=function(){var a={width:0,height:0};a.width=this.C.width;a.height=this.C.height;return a};e.prototype.Ch=function(){var a={x:0,y:0},b=this.ea.getBoundingClientRect();a.x=b.left;a.y=b.top;this.Sc&&14>Number(this.Xc)&&(a.x=b.left+window.scrollX,a.y=b.top+window.scrollY);return a};e.prototype.pu=function(a){this.ga=
a};e.prototype.cu=function(a,b,c,h){this.margin.left=a;this.margin.top=b;this.margin.right=c;this.margin.bottom=h;this.ga=this.skinObj;this.Li=this.vrSkinObj;this.he()};e.prototype.br=function(a){0==a&&(this.I.Ud=!1);1==a&&(this.I.Ud=!0);2==a&&(this.I.Ud=!this.I.Ud);this.H("viewmodechanged",{});this.H("playerstatechanged",{})};e.prototype.ys=function(){return 1==this.I.Ud?1:0};e.prototype.ln=function(a,b){this.K.mode=1==b&&0<this.K.mode?0:Math.round(a);this.update();this.H("polymodechanged",{})};
e.prototype.uh=function(a){var b=[];a="#"==a.substr(0,1)?a.substr(1):"^"+a+"$";a=new RegExp(a,"");for(var c=0;c<this.J.length;c++)"poly"==this.J[c].type&&a.test(this.J[c].id)&&b.push(this.J[c]);return b};e.prototype.Lp=function(a){a=this.uh(a);for(var b=0;b<a.length;b++){var c=this.K.Qb.indexOf(a[b].id);-1==c?(this.K.Qb.push(a[b].id),this.K.Ac.push(0),this.K.qd.push(1)):this.K.qd[c]=1}this.update()};e.prototype.uo=function(a){a=this.uh(a);for(var b=0;b<a.length;b++){var c=this.K.Qb.indexOf(a[b].id);
-1!=c&&(this.K.qd[c]=0,this.K.Wj.push(a[b].id),this.update())}};e.prototype.Su=function(a){a=this.uh(a);for(var b=0;b<a.length;b++){var c=this.K.Qb.indexOf(a[b].id);-1==c||-1!=c&&0==this.K.qd[c]?this.Lp(a[b].id):this.uo(a[b].id);this.update()}};e.prototype.ar=function(a,b,c,h,m){var n=""==a?this.J:this.uh(a);for(var q=0;q<n.length;q++){var r=n[q];"poly"==r.type&&(r.Ub=b,r.Tb=c,r.Wb=h,r.Vb=m)}""==a&&(this.K.Ub=b,this.K.Tb=c,this.K.Wb=h,this.K.Vb=m);this.update()};e.prototype.gu=function(a,b){var c=
""==a?this.J:this.uh(a);for(var h=0;h<c.length;h++){var m=c[h];"poly"==m.type&&(m.ze=b)}""==a&&(this.K.ze=b);this.update()};e.prototype.$q=function(a){this.Pa&&(this.Pa.mm=0==a?!0:1==a?!1:!this.Pa.mm,this.update())};e.prototype.ks=function(){return this.K.mode};e.prototype.cr=function(){this.H("viewstatechanged",{})};e.prototype.zs=function(){return 0};e.prototype.Ur=function(a){return"_firstmap"==a?"web":"_firstfloorplan"==a?"file":(a=this.rc[a])?a.type:"web"};e.prototype.Tr=function(a){"_firstmap"==
a?a=this.Yn():"_firstfloorplan"==a&&(a=this.hj());return(a=this.rc[a])?a:{}};e.prototype.Yn=function(){var a="",b;for(b in this.rc){var c=this.rc[b];"web"==c.type&&1E4>c.index&&(a=b)}return a};e.prototype.hj=function(){var a="",b;for(b in this.rc){var c=this.rc[b];"file"==c.type&&1E4>c.index&&(a=b)}return a};e.prototype.$r=function(a,b){"_firstfloorplan"==b&&(b=this.hj());var c=[];a||(a=this.xa);var h=this.oe[a];h&&(a=h);""===a&&0<Object.keys(this.Vc).length&&(a=Object.keys(this.Vc)[0]);this.Vc[a]&&
this.Vc[a][b]&&(c.push(this.Vc[a][b].y),c.push(this.Vc[a][b].x));return c};e.prototype.bs=function(a,b){"_firstfloorplan"==b&&(b=this.hj());var c=[];a||(a=this.xa);var h=this.oe[a];h&&(a=h);""===a&&0<Object.keys(this.Vc).length&&(a=Object.keys(this.Vc)[0]);this.sg[a]&&this.sg[a][b]&&(c.push(this.sg[a][b].x),c.push(this.sg[a][b].y));return c};e.prototype.co=function(a){var b=this.oe[a];b&&(a=b);b=this.bo();for(var c=[],h=0;h<b.length;h++)this.Vc[a][b[h]]&&c.push(b[h]);return c};e.prototype.Sr=function(a){a=
this.co(a);return 0<a.length?a[0]:""};e.prototype.bo=function(){var a=[],b;for(b in this.rc)a.push(b);return a};e.prototype.Er=function(){var a=[],b;for(b in this.rc)"file"==this.rc[b].type&&a.push(b);return a};e.prototype.Ls=function(){for(var a in this.rc)if("web"==this.rc[a].type)return!0;return!1};e.prototype.Ks=function(){for(var a in this.rc)if("file"==this.rc[a].type)return!0;return!1};e.prototype.sp=function(a,b,c){var h=(new RegExp("%0*"+b,"i")).exec(a.toString());if(h){h=h.toString();var m=
c.toString();h.charAt(h.length-1)!=b&&(m=(1+c).toString());if(!isNaN(parseFloat(c)))for(;m.length<h.length-1;)m="0"+m;a=a.replace(h,m)}return a};e.prototype.Ps=function(a,b,c){a=Math.atan2(a+1,c);var h=Math.atan2(b+1,c);b=Math.sin(a);c=Math.sin(h);a=Math.cos(a);h=Math.cos(h);this.Nn.init(0,0,-1);this.Mn.init(a,0,-b);this.On.init(-a,0,-b);this.Pn.init(0,h,-c);this.Ln.init(0,-h,-c)};e.prototype.Fk=function(a){a=this.hh(a,this.Nn);a=this.hh(a,this.Mn);a=this.hh(a,this.On);a=this.hh(a,this.Pn);return a=
this.hh(a,this.Ln)};e.prototype.hq=function(a){if(!this.Me&&this.Vs!=a){this.Vs=a;var b=this.margin.left+this.C.width/2+"px ";b+=this.margin.top+this.C.height/2+"px ";this.Ia.style[this.Yf]=a+"px";this.Ia.style[this.Yf+"Origin"]=b;this.ea.style[this.Yf]=a+"px";this.ea.style[this.Yf+"Origin"]=b}};e.prototype.cl=function(a,b,c){""==a&&(a="node1");return this.ob.hasOwnProperty(a)&&this.ob[a].hasOwnProperty(b)&&this.ob[a][b].hasOwnProperty(c)?y.ic.$k(this.ob[a][b][c],this.Ua[c].Lf):this.Ua.hasOwnProperty(c)?
y.ic.$k(this.Ua[c].Rk,this.Ua[c].Lf):null};e.prototype.hm=function(a,b,c,h){""==a&&(a="node1");h="string"===typeof h?h:y.ic.Xn(h,this.Ua[c].Lf);this.ob.hasOwnProperty(a)||(this.ob[a]={});this.ob[a].hasOwnProperty(b)||(this.ob[a][b]={});this.ob[a][b].hasOwnProperty(c)&&this.ob[a][b][c]==h||(this.ob[a][b][c]=h,this.H("varchanged_"+c,{}))};e.prototype.Dr=function(a){return this.Ua.hasOwnProperty(a)?this.Ua[a].Rk:null};e.prototype.$n=function(){return this.D.ge||this.D.Jd||this.na&&(4!=this.Z()||0!=this.Hc())?
!1:!0};e.prototype.Dm=function(){var a=new y.Ta(0,0,-100),b=this.jf(),c=this.N.M;var h=100/this.fov.m;var m=c.width/c.height;c=this.C.height*h*m;h*=this.C.height;for(var n=this.$n(),q=0;q<this.J.length;q++){var r=this.J[q];if("point"==r.type){var t=!1;if(this.$b()){var x=(this.pan.m-r.pan)/100/m*c;var z=(this.u.m-r.u)/100*h;Math.abs(x)<this.C.width/2+500&&Math.abs(z)<this.C.height/2+500&&(t=!0)}else a.init(0,0,-100),a.Ja(-r.u*Math.PI/180),a.Na(r.pan*Math.PI/180),a.Na(-this.pan.m*Math.PI/180),a.Ja(this.u.m*
Math.PI/180),a.yb(this.W.m*Math.PI/180),.01>a.z?(z=-b/a.z,x=a.x*z,z*=a.y,Math.abs(x)<this.C.width/2+5E3&&Math.abs(z)<this.C.height/2+5E3&&(t=!0)):z=x=-1E4;r.cc=x+this.C.width/2;r.Pb=z+this.C.height/2;r.Rl=r.cc/this.C.width*100;r.Sl=r.Pb/this.C.height*100;r.visible=t;r.px=r.cc;r.py=r.Pb;r.pxp=r.Rl;r.pyp=r.Sl;r.visible=r.visible;if(r.j&&r.j.onUpdatePosition)r.j.onUpdatePosition(this,r);else r.j&&r.j.__div&&("none"!=r.j.__div.style[this.Zb]&&(r.j.__div.style[this.Zb]="none"),t&&n?(r.j.ggUse3d?(this.Me||
this.hq(b),this.$b()?(r.j.__div.style[this.Ad]="scale("+(100/this.fov.m*500/r.j.gg3dDistance).toFixed(10)+")",r.j.__div.style.left=this.margin.left+x+this.C.width/2+"px",r.j.__div.style.top=this.margin.top+z+this.C.height/2+"px"):(r.j.__div.style.width="1px",r.j.__div.style.height="1px",x="",this.Me&&(x+="perspective("+b+"px) "),x+="translate3d(0px,0px,"+b+"px) ",x+="rotateZ("+this.W.m.toFixed(10)+"deg) ",x+="rotateX("+this.u.m.toFixed(10)+"deg) ",x+="rotateY("+(-this.pan.m).toFixed(10)+"deg) ",x+=
"rotateY("+r.pan.toFixed(10)+"deg) ",x+="rotateX("+(-r.u).toFixed(10)+"deg) ",x+="translate3d(0px,0px,"+(-1*r.j.gg3dDistance).toFixed(10)+"px) ",r.j.__div.style[this.Ad+"Origin"]="0% 0%",r.j.__div.style[this.Ad]=x,r.j.__div.style.left=this.margin.left+this.C.width/2+"px",r.j.__div.style.top=this.margin.top+this.C.height/2+"px")):this.Np?(r.j.__div.style.left=this.margin.left+this.C.width/2+"px",r.j.__div.style.top=this.margin.top+this.C.height/2+"px",r.j.__div.style[this.Ad]="translate3d(0px,0px,-1000px) rotateY(0.1deg) translate3d("+
x+"px,"+z+"px, 0.5px)",r.j.__div.style["transform-style"]="preserve-3d"):(r.j.__div.style.left=this.margin.left+x+this.C.width/2+"px",r.j.__div.style.top=this.margin.top+z+this.C.height/2+"px"),r.j.__div.ggVisible&&(r.j.__div.style.visibility="visible")):(r.j.ggUse3d&&(r.j.__div.style[this.Ad]=""),r.j.__div.style.left="-1000px",r.j.__div.style.top="-1000px",r.j.__div.style.visibility="hidden"))}if("poly"==r.type){var C=[];if(this.$b())for(r.Af=[],t=0;t<r.vertices.length;t++)z=r.vertices[t],x=(this.pan.m-
z.pan)/100/m*c,z=(this.u.m-z.u)/100*h,x+=this.margin.left+this.C.width/2,z+=this.margin.top+this.C.height/2,r.Af.push({cc:x,Pb:z});else{for(t=0;t<r.vertices.length;t++)z=r.vertices[t],a.init(0,0,-100),a.Ja(-z.u*Math.PI/180),a.Na(z.pan*Math.PI/180),a.Na(-this.pan.m*Math.PI/180),a.Ja(this.u.m*Math.PI/180),a.yb(this.W.m*Math.PI/180),C.push(a.clone());C=this.Fk(C);if(0<C.length)for(t=0;t<C.length;t++)a=C[t],.1>a.z?(z=-b/a.z,x=this.C.width/2+a.x*z,z=this.C.height/2+a.y*z):z=x=0,a.cc=x,a.Pb=z;r.Af=C}}}this.H("hotspotsupdated",
{})};e.prototype.Cr=function(){for(var a=[],b=0;b<this.J.length;b++){var c=this.J[b];"point"==c.type&&c.j&&c.j.__div&&a.push(c.j.__div)}return a};e.prototype.oa=function(a,b){a=Number(a);isNaN(b)&&(b=0);0>b&&(b=0);1<b&&(b=1);return"rgba("+(a>>16&255)+","+(a>>8&255)+","+(a&255)+","+b+")"};e.prototype.zt=function(){var a;if(this.rb&&(this.K.Oh!=this.K.mode&&(this.K.Oh=this.K.mode,this.rb.style.visibility=0<this.K.mode?"inherit":"hidden"),0<=this.K.mode||0<this.K.Qb.length)){this.Hb||(this.Hb=this.rb.getContext("2d"));
if(this.Hb.width!=this.C.width||this.Hb.height!=this.C.height)this.Hb.width=this.C.width,this.Hb.height=this.C.height;this.Hb.clear?this.Hb.clear():this.Hb.clearRect(0,0,this.rb.width,this.rb.height);var b=1;0>=this.K.mode&&(b=0);3==this.K.mode&&(b=this.K.Da);for(a=0;a<this.J.length;a++){var c=this.J[a];var h=b;if("poly"==c.type){var m=c.Af;2==this.K.mode&&(h=c.Da);var n=this.K.Qb.indexOf(c.id);-1!=n&&(h=this.K.Ac[n]);this.Hb.fillStyle=this.oa(c.Ub,c.Tb*h);this.Hb.strokeStyle=this.oa(c.Wb,c.Vb*h);
if(0<m.length){this.Hb.beginPath();for(c=0;c<m.length;c++)h=m[c],0==c?this.Hb.moveTo(h.cc,h.Pb):this.Hb.lineTo(h.cc,h.Pb);this.Hb.closePath();this.Hb.stroke();this.Hb.fill()}}}}};e.vo=function(a,b,c){var h,m=!1;var n=0;for(h=a.length-1;n<a.length;h=n++){var q=a[n];h=a[h];q.Pb>c!=h.Pb>c&&b<(h.cc-q.cc)*(c-q.Pb)/(h.Pb-q.Pb)+q.cc&&(m=!m)}return m};e.prototype.Wi=function(a,b){var c=-1;if((0<=this.K.mode||0<this.K.Qb.length)&&this.Eo())for(var h=0;h<this.J.length;h++){var m=this.J[h];"poly"==m.type&&m.Af&&
0<m.Af.length&&(-1!=this.K.mode||-1!=this.K.Qb.indexOf(m.id))&&y.ic.vo(m.Af,a,b)&&(c=h,m.cc=a,m.Pb=b)}return 0<=c?this.J[c]:!1};e.prototype.Eo=function(){return 4==this.Z()&&0==this.Hc()};e.prototype.aspect=function(){return this.C.width/this.C.height};e.prototype.bf=function(){this.N.bf()};e.prototype.update=function(a){void 0===a&&(a=0);this.tb=!0;a&&(this.oh=Math.max(1*a,this.oh))};e.prototype.ao=function(){return 0<this.N.Di||0<this.N.fe};e.prototype.Hi=function(){var a=Date.now();if(this.$b())this.Dm(),
this.na&&(this.sa.bv(),this.sa.ep());else if(0===this.Xd)if(!this.na||4==this.Z()&&0==this.Hc()){var b=this.jf();this.Ps(this.C.width/2,this.C.height/2,b);this.Dm();this.Ji?this.sa.ev():this.gv&&this.jq();this.Em();this.na?(this.B.Tc?14==this.B.format?this.sa.dv():this.sa.rq():0<this.N.M.levels.length?this.sa.mv():this.sa.ov(),this.sa.ep()):(this.Pg&&this.Zu(),this.zt());this.Pa&&this.Pa.yt()}else this.sa.rq(),this.Dm(),this.Ms();b=Date.now();50<b-a?(this.O("Time between frames: "+(b-a)),this.xg||
(2<this.pm?(this.xg=!0,this.O("disabling HighDPI rendering"),this.fc()):this.pm++)):this.pm=0;this.nf&&this.N.M.rp++;this.na&&(a=this.R,a.disable(a.BLEND),a.disable(a.STENCIL_TEST),a.disable(a.DEPTH_TEST),a.disable(a.CULL_FACE))};e.prototype.Zu=function(){this.bf();var a;this.Fc&&(a=this.Fc.getContext("2d"));if(this.C.width!==this.ea.offsetWidth||this.C.height!==this.ea.offsetHeight)this.C.width=this.ea.offsetWidth,this.C.height=this.ea.offsetHeight;if(a){var b=a.canvas.width/2,c=a.canvas.height/
2,h=a.createRadialGradient(b,c,5,b,c,Math.max(b,c));h.addColorStop(0,"#333");h.addColorStop(1,"#fff");a.rect(0,0,a.canvas.width,a.canvas.height);a.fillStyle=h;a.fill();a.fillStyle="#f00";a.font="20px Helvetica";a.textAlign="center";a.fillText("Pan: "+this.pan.m.toFixed(1),b,c-60);a.fillText("Tilt: "+this.u.m.toFixed(1),b,c-30);a.fillText("Fov: "+this.fov.m.toFixed(1),b,c+0);a.fillText("Node: "+this.gj(),b,c+30);a.fillText("Title: "+this.Tg.title,b,c+60)}};e.prototype.iu=function(a){a=Math.round(a);
this.Me=0<(a&1);this.Zl=0<(a&2);this.jk=0<(a&4);this.xg=0<(a&8);4096<=a&&(this.Og=0<(a&4096),this.na=0<(a&8192),this.Pg=0<(a&32768))};e.prototype.ns=function(){var a=0;this.Me&&(a|=1);this.Zl&&(a|=2);this.jk&&(a|=4);this.Og&&(a|=4096);this.na&&(a|=8192);this.Pg&&(a|=32768);return a};e.prototype.Em=function(){var a=Math.round(this.jf());this.Me||this.hq(a);for(var b=0;b<this.Wa.length;b++){var c=this.Wa[b];c.Fm(a);c.j.hidden=!1}for(b=0;b<this.Sb.length;b++)c=this.Sb[b],c.Fm(a),c.j.hidden=!1};e.prototype.jq=
function(){for(var a=Math.round(this.jf()),b=0;b<this.U.length;b++){var c=this.U[b];c.nd||(c.Fm(a),c.j.hidden=!1)}};e.prototype.Ms=function(){for(var a=0;a<this.Wa.length;a++){var b=this.Wa[a];b.Gf(!1)}for(a=0;a<this.U.length;a++)b=this.U[a],b.nd||b.Gf(!1);for(a=0;a<this.Sb.length;a++)b=this.Sb[a],b.Gf(!1)};e.prototype.fv=function(){try{for(var a=0;a<this.nj();a++){var b=this.ll(a);b.nd||b.he()}}catch(c){this.Om(c)}};e.prototype.Rc=function(a){this.se=!1;try{this.bb=a?a:document.createElement("canvas");
var b=this.lc.offsetWidth-this.margin.left-this.margin.right,c=this.lc.offsetHeight-this.margin.top-this.margin.bottom;if(100>b||100>c)c=b=100;var h=window.devicePixelRatio||1;this.xg&&(h=1);this.ea.style.width=b+"px";this.ea.style.height=c+"px";this.bb.style.width=b+"px";this.bb.style.height=c+"px";this.bb.width=b*h;this.bb.height=c*h;this.bb.style.display="none";this.bb.style.touchAction="none";this.ea.insertBefore(this.bb,this.ea.firstChild);var m=this.qq;m.stencil=!0;m.depth=!0;m.powerPreference=
"high-performance";m.alpha=this.Sc?!0:!1;this.Vd&&10<=this.Hh[0]&&(m.antialias=!1,m.alpha=!1);a={};a.flags=m;a.canvas=this.bb;this.H("beforewebglcontext",a);this.R=this.bb.getContext("webgl",m);this.R||(this.R=this.bb.getContext("experimental-webgl",m));if(this.R){var n=this.R;this.Ab.width=b*h;this.Ab.height=c*h;n.clearColor(0,0,0,0);n.enable(this.R.DEPTH_TEST);n.viewport(0,0,500,500);n.clear(n.COLOR_BUFFER_BIT|n.DEPTH_BUFFER_BIT);4096<=n.getParameter(n.MAX_TEXTURE_SIZE)&&!this.Lh&&(this.N.tg=1<
h?4*this.N.tg:2*this.N.tg);this.O("Max tile cnt: "+this.N.tg);this.sa.Ih();this.sa.rj();this.sa.yo(this.Kg);this.sa.zo();this.D&&(this.D.Ih(),this.D.Rc());this.Pa&&(this.Pa.Ih(),this.Pa.Rc())}}catch(q){this.O(q)}this.R?(this.na=!0,this.H("webglready",{gl:this.R})):alert("Could not initialise WebGL!")};e.prototype.hu=function(a){this.mi=a};e.prototype.getQueryParameter=function(){return this.mi};e.prototype.fb=function(a){if(a){if("{"==a.charAt(0)||"/"==a.charAt(0)||0<a.indexOf("://")||0==a.indexOf("javascript:"))return a;
""!=this.mi&&(a=-1==a.indexOf("?")?a+("?"+this.mi):a+("&"+this.mi));return this.le+a}return this.le};e.prototype.lf=function(){return this.pan.m};e.prototype.fs=function(){return this.F.pan};e.prototype.hl=function(){for(var a=this.pan.m;-180>a;)a+=360;for(;180<a;)a-=360;return a};e.prototype.ue=function(){for(var a=this.pan.m-this.pan.bi;-180>a;)a+=360;for(;180<a;)a-=360;return a};e.prototype.$b=function(){return this.N.$b()};e.prototype.ae=function(a){this.ma(!1);isNaN(a)||(this.pan.m=Number(a));
this.update()};e.prototype.Vj=function(a){this.ma(!1);isNaN(a)||(this.pan.m=Number(a)+this.pan.bi);this.update()};e.prototype.Ui=function(a,b){isNaN(a)||(this.ae(this.lf()+a),b&&(this.pan.d=a))};e.prototype.kn=function(a,b){this.Ui(a*this.hf(),b)};e.prototype.ig=function(){return this.u.m};e.prototype.rs=function(){return this.F.u};e.prototype.be=function(a){this.ma(!1);isNaN(a)||(this.u.m=Number(a));this.update()};e.prototype.Vi=function(a,b){this.be(this.ig()+a);b&&(this.u.d=a)};e.prototype.mn=
function(a,b){this.Vi(a*this.hf(),b)};e.prototype.Ag=function(a){this.N.Ag(a)};e.prototype.mj=function(){return this.N.mj()};e.prototype.Cd=function(){return this.N.Cd()};e.prototype.Mb=function(){return this.N.Mb()};e.prototype.bl=function(a,b){return this.N.bl(a,b)};e.prototype.al=function(a,b){return this.N.al(a,b)};e.prototype.Fr=function(){return this.F.Bi};e.prototype.zb=function(a){return this.N.zb(a)};e.prototype.fm=function(a){this.N.fm(a)};e.prototype.ui=function(a){this.N.ui(a)};e.prototype.gm=
function(a){this.N.gm(a)};e.prototype.dm=function(a){this.N.dm(a)};e.prototype.em=function(a,b){if(120<this.Cd())this.zb(a);else{var c=this.kj(b.x,b.y,!0);if(this.zb(a)){b=this.kj(b.x,b.y,!0);a=c.pan-b.pan;b=c.tilt-b.tilt;if(15<Math.abs(a)||10<Math.abs(b))b=a=0;a=this.$b()?-a:a*Math.cos(c.tilt*Math.PI/180);this.pan.Yb-=a;this.u.Yb+=b;this.km(this.pan.m-a,this.u.m+b)}}};e.prototype.Bk=function(a,b){return this.zb(this.Cd()+a)?(b&&(this.fov.d=a),!0):!1};e.prototype.Xq=function(a,b){this.em(this.Cd()+
a,b)};e.prototype.Ti=function(a,b){if(!isNaN(a)){var c=a/90*Math.cos(Math.min(this.fov.m,90)*Math.PI/360);c=this.fov.m*Math.exp(c);this.zb(c);b&&(this.fov.d=a)}};e.prototype.jn=function(a,b,c){if(!isNaN(a)){var h=a/90*Math.cos(Math.min(this.fov.m,90)*Math.PI/360);h=this.fov.m*Math.exp(h);this.em(h,b);c&&(this.fov.d=a,this.fov.Nc.enabled=!0,this.fov.Nc.x=b.x,this.fov.Nc.y=b.y)}};e.prototype.km=function(a,b){this.ma(!1);isNaN(a)||(this.pan.m=a);isNaN(b)||(this.u.m=b);this.update()};e.prototype.Hp=function(a,
b,c){this.ma(!1);!isNaN(a)&&1E7>a&&-1E7<a&&(this.pan.m=a);!isNaN(b)&&1E7>b&&-1E7<b&&(this.u.m=b);!isNaN(c)&&1E7>c&&-1E7<c&&(this.W.m=c);this.update()};e.prototype.zg=function(a,b,c){this.ma(!1);isNaN(a)||(this.pan.m=a);isNaN(b)||(this.u.m=b);isNaN(c)||this.zb(c);this.update()};e.prototype.zp=function(){this.zg(this.pan.Ha,this.u.Ha,this.fov.Ha)};e.prototype.setLocked=function(a){this.Dp(a);this.Ep(a);this.Cp(a)};e.prototype.Dp=function(a){this.I.qc=!!a};e.prototype.Cp=function(a){this.I.Uh=!!a};e.prototype.Rr=
function(){return this.I.Uh};e.prototype.Ep=function(a){this.I.Ee=!!a};e.prototype.Jr=function(){return this.ka.enabled};e.prototype.au=function(a){var b=this.ka;a&&(b.ha.x=0,b.ha.y=0);b.enabled=!!a};e.prototype.Cs=function(){return this.I.Nf};e.prototype.xu=function(a){this.I.Nf=a};e.prototype.Tj=function(a){this.xc=!!a};e.prototype.Gr=function(){return this.sl()?!0:this.ol};e.prototype.su=function(a,b){void 0===b&&(b=!0);this.lq=b;this.Qg==!a&&(a&&this.sl()?this.tp():((this.Qg=!!a)?this.nb.oi=!0:
this.W.m=0,this.H("gyrochanged",{}),this.H("playerstatechanged",{})))};e.prototype.sl=function(){return window.hasOwnProperty("DeviceOrientationEvent")&&DeviceOrientationEvent.hasOwnProperty("requestPermission")&&"function"===typeof DeviceOrientationEvent.requestPermission?!0:!1};e.prototype.tp=function(){var a=this;if(this.sl())try{DeviceOrientationEvent.requestPermission().then(function(b){"granted"===b&&(a.nb.oi=!0,a.Qg=!0,a.H("gyrochanged",{}),a.H("playerstatechanged",{}))})["catch"](console.error)}catch(b){console.log(b)}};
e.prototype.ss=function(){return this.Qg};e.prototype.es=function(){return this.Jh?5:this.yl?6:this.Vd?4:this.Ho?1:this.zl?2:this.Do?3:0};e.prototype.Ar=function(){return this.xl?5:this.ng?4:this.uj?2:this.Sc?3:this.wl?1:0};e.prototype.Br=function(){return window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?1:0};e.prototype.moveTo=function(a,b,c,h,m,n){this.ma(!1);if("_blank"!==a&&""!==a){this.F.active=!0;this.F.aborted=!1;this.F.Im=!1;var q=a.toString().split("/");1<q.length&&
(a=Number(q[0]),h=Number(b),b=Number(q[1]),2<q.length&&(c=Number(q[2])));this.F.pan=isNaN(a)?this.pan.m:Number(a);this.F.u=isNaN(b)?this.u.m:Number(b);this.F.fov=!isNaN(c)&&0<c&&180>c?Number(c):this.fov.m;this.F.speed=!isNaN(h)&&0<h?Number(h):1;this.F.W=isNaN(m)?this.W.m:Number(m);void 0!==n?!a||4!=n&&12!=n&&9!=n||(this.F.pb=n):this.F.pb=this.Z()}};e.prototype.Ej=function(a){this.ma(!1);var b=0,c=0,h=70,m=4,n=0,q=1;a.hasOwnProperty("pan")&&(b=Number(a.pan),this.F.pan=b);a.hasOwnProperty("tilt")&&
(c=Number(a.tilt),this.F.u=c);a.hasOwnProperty("fov")&&(h=Number(a.fov),this.F.fov=h);a.hasOwnProperty("projection")&&(m=Number(a.projection),this.F.pb=m);a.hasOwnProperty("timingFunction")&&(n=Number(a.timingFunction));a.hasOwnProperty("speed")&&(q=Number(a.speed));0>=q?(this.zg(b,c,h),this.qb(m)):(a=new y.Qm,a.cb="__AutoMove",a.Qe=this.hl(),a.zi=this.u.m,a.ce=this.fov.m,a.yi=this.Z(),a.Id=b,a.ee=c,a.Ig=h,a.de=m,a.Zf=!1,a.ef=!1,a.ff=!1,0==n&&(a.ef=!0),1==n&&(a.Zf=!0,a.ef=!0),2==n&&(a.ff=!0),a.speed=
q,this.F.Ym=this.L,this.L=this.Qn(a),this.F.Zm=(new Date).getTime(),this.F.Im=!0,this.F.active=!0,this.F.aborted=!1,this.F.pan=b,this.F.u=c,this.F.fov=h,this.je=!1)};e.prototype.ft=function(a){this.moveTo(this.pan.Ha,this.u.Ha,this.fov.Ha,a)};e.prototype.gt=function(a,b){var c={};c.pan=this.pan.Ha;c.tilt=this.u.Ha;c.fov=this.fov.Ha;c.projection=this.Bh();c.timingFunction=b;c.speed=a;this.Ej(c)};e.prototype.Kq=function(a,b,c,h){var m=new y.Mi(this);m.type="point";m.pan=b;m.u=c;m.id=a;m.j={};m.j.player=
this;m.bg();m.j.hotspot=m;m.j.__div=document.createElement("div");m.j.__div.appendChild(h);this.J.push(m);m.j.__div.style.position="absolute";m.j.__div.style.left="-1000px";m.j.__div.style.top="-1000px";m.j.__div.ggVisible=!0;this.Ia.insertBefore(m.j.__div,this.Ia.firstChild);this.tb=!0};e.prototype.$u=function(a,b,c){for(var h=0;h<this.J.length;h++){var m=this.J[h];m.id==a&&(m.pan=b,m.u=c,m.bg())}this.tb=!0};e.prototype.Mt=function(a){for(var b=-1,c,h=0;h<this.J.length;h++)c=this.J[h],c.id==a&&(b=
h);-1<b&&(c=this.J.splice(b,1).pop(),c.j&&c.j.__div&&this.Ia.removeChild(c.j.__div))};e.prototype.js=function(){for(var a=[],b=0;b<this.J.length;b++){var c=this.J[b];"point"==c.type&&a.push(String(c.id))}return a};e.prototype.Ir=function(a){for(var b=0;b<this.J.length;b++){var c=this.J[b];if(c.id==a)return b={},b.id=a,b.pan=c.pan,b.tilt=c.u,b.pxp=c.Rl,b.pyp=c.Sl,b.url=c.url,b.target=c.target,b.distance=c.distance,b.title=c.title,b.description=c.description,b.skinid=c.om,c.gd&&(b.customimage=c.gd,
b.customimagewidth=c.df,b.customimageheight=c.xd,b.use3D=c.Jf,b.distance3D=c.aj),c.j&&c.j.__div&&(b.div=c.j.__div),b}};e.prototype.oq=function(a,b){this.ia.start.x=a;this.ia.start.y=b;this.ia.pa.x=a;this.ia.pa.y=b;this.ka.pa.x=a;this.ka.pa.y=b;this.Vl++;this.pan.Yb=this.pan.m;this.u.Yb=this.u.m};e.prototype.mq=function(a,b){var c=this.Mb();this.pan.Yb+=a*c/this.C.height;this.u.Yb+=b*c/this.C.height;this.pan.m=this.pan.Yb;this.u.m=this.u.Yb};e.prototype.nq=function(a,b){this.ia.m.x=a;this.ia.m.y=b;
this.ia.ha.x=this.ia.m.x-this.ia.pa.x;this.ia.ha.y=this.ia.m.y-this.ia.pa.y;this.I.Ud&&(this.ia.pa.x=this.ia.m.x,this.ia.pa.y=this.ia.m.y,this.update())};e.prototype.ma=function(a){this.v.active&&(this.v.active=!1,this.H("autorotatechanged",{}),this.pan.d=0,this.u.d=0,this.fov.d=0,this.fov.Nc.enabled=!1);this.F.active&&(this.F.active=!1,this.pan.d=0,this.u.d=0,this.fov.d=0,this.fov.Nc.enabled=!1);this.Ue=this.F.aborted=!1;this.v.Dj=!1;this.Md=.02;this.ah=0;this.v.rd&&(this.v.enabled=this.v.Qf,a&&
(this.v.rd=this.v.Sg));this.qg=(new Date).getTime()};e.prototype.Pr=function(){return this.qg};e.prototype.ko=function(a,b){a||(a=this.ca.x,b=this.ca.y);var c=this.C.height/(2*Math.tan(this.Mb()*Math.PI/360));a-=this.C.width/2;b-=this.C.height/2;var h={};h.pan=180*Math.atan(a/c)/Math.PI;h.tilt=180*Math.atan(-b/Math.sqrt(a*a+c*c))/Math.PI;return h};e.prototype.kj=function(a,b,c){a||(a=this.ca.x,b=this.ca.y);if(this.$b()){var h=this.fov.m/this.C.height;a=-(a-this.C.width/2)*h+this.pan.m;b=-(b-this.C.height/
2)*h+this.u.m}else{h=new y.Ta(0,0,1);b=this.ko(a,b);h.$d(-b.tilt);h.Ef(b.pan);h.$d(-this.u.m);h.Ef(-this.pan.m);c||(h.$d(-this.Xa.pitch),h.Ff(this.Xa.W));for(a=h.Qq()-180;-180>a;)a+=360;b=h.Rq()}h={};h.pan=a;h.tilt=b;return h};e.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};e.prototype.Dk=function(a,b){var c=this.jf(),
h,m;for(h=0;h<this.nj();h++){var n=this.ll(h);if(n.Ma)return n}for(h=0;h<this.nj();h++)if(n=this.ll(h),!n.nd){var q=[],r=new y.Ta,t;var x=m=void 0;0<n.fov&&(m=Math.tan(n.fov/2*Math.PI/180),x=0<n.pc?m*n.Pc/n.pc:m,n.Ic&&1!=n.Ic&&(x*=n.Ic));for(t=0;4>t;t++){switch(t){case 0:r.init(-m,-x,0);break;case 1:r.init(m,-x,0);break;case 2:r.init(m,x,0);break;case 3:r.init(-m,x,0)}r.Ja(n.Ja*Math.PI/180);r.Na(-n.Na*Math.PI/180);r.yb(n.yb*Math.PI/180);--r.z;r.Ja(-n.u*Math.PI/180);r.Na(n.pan*Math.PI/180);r.Na(-this.pan.m*
Math.PI/180);r.Ja(this.u.m*Math.PI/180);r.yb(this.W.m*Math.PI/180);q.push(r.clone())}q=this.Fk(q);if(0<q.length){for(t=0;t<q.length;t++)r=q[t],.1>r.z?(x=-c/r.z,m=this.C.width/2+r.x*x,x=this.C.height/2+r.y*x):x=m=0,r.cc=m,r.Pb=x;if(y.ic.vo(q,a,b))return n}}return null};e.prototype.nj=function(){return this.U.length+this.Wa.length+this.Sb.length};e.prototype.ll=function(a){return a<this.U.length?this.U[a]:a<this.U.length+this.Wa.length?this.Wa[a-this.U.length]:this.Sb[a-(this.U.length+this.Wa.length)]};
e.prototype.Kh=function(){return document.webkitIsFullScreen||document.mozFullScreen||document.msFullscreenElement&&null!=document.msFullscreenElement||document.fullScreen};e.prototype.et=function(a){this.iq(a);window.focus();if(this.yd)this.yd.onclick();(this.re||this.gf&&this.ng)&&7>this.fd&&this.gg();this.Xb=null;if(!this.I.qc&&!this.xc){a=a?a:window.event;if(a.which||0==a.which||1==a.which){var b=(new Date).getTime();if(this.Je){this.Xb=this.Je;this.T.Wc=!0;this.T.startTime=b;a.stopPropagation();
return}if(this.Jc(a.target)){var c;if((c=this.Dk(this.ca.x,this.ca.y))&&c.xe&&(this.Xb=c,void 0!==c.code&&""!==c.code&&c.oc))return;this.oq(a.pageX,a.pageY);this.T.Wc=!0;this.T.startTime=b;a.preventDefault();this.ma(!0)}}this.ia.ha.x=0;this.ia.ha.y=0}};e.prototype.Ng=function(a,b,c){var h=this.K.ck;h.enabled&&(this.S!=this.lb&&0<=a&&0<=b&&""!=this.S.title?(this.Fa.innerHTML=this.ab(this.S.title),this.Fa.style.color=this.oa(h.dk,h.bk),this.Fa.style.backgroundColor=h.background?this.oa(h.Ub,h.Tb):"transparent",
this.Fa.style.border="solid "+this.oa(h.Wb,h.Vb)+" "+h.Si+"px",this.Fa.style.borderRadius=h.xk+"px",this.Fa.style.textAlign="center",0<h.width?(this.Fa.style.left=a-h.width/2+this.margin.left+"px",this.Fa.style.width=h.width+"px"):(this.Fa.style.width="auto",this.Fa.style.left=a-this.Fa.offsetWidth/2+this.margin.left+"px"),this.Fa.style.height=0<h.height?h.height+"px":"auto",this.Fa.style.top=b+(c?-60:25)+this.margin.top+"px",this.Fa.style.visibility="inherit",this.Fa.style.overflow="hidden"):(this.Fa.style.visibility=
"hidden",this.Fa.innerHTML=""))};e.prototype.iq=function(a){var b=this.Ch();this.Kh()?(this.ca.x=a.clientX-this.margin.left,this.ca.y=a.clientY-this.margin.top):(this.ca.x=a.clientX-b.x,this.ca.y=a.clientY-b.y)};e.prototype.Ne=function(a){if("string"==typeof a)for(var b=0;b<this.J.length;b++)if(this.J[b].id==a){a=this.J[b];break}this.S=a&&null!==a&&"object"==typeof a?a:this.lb;this.S==this.lb&&(a=this.Wi(this.ca.x,this.ca.y))&&(a.jb=0);this.S.bg&&this.S.bg();this.hotspot=this.S;this.H("activehotspotchanged",
{hotspot:this.S})};e.prototype.dt=function(a){a=a?a:window.event;this.iq(a);if(!this.I.qc&&!this.xc&&!this.Je){this.v.active&&(this.v.zj=(new Date).getTime());0==a.buttons&&(this.T.Wc=!1);this.T.Wc&&(a.preventDefault(),(a.which||0==a.which||1==a.which)&&this.nq(a.pageX,a.pageY),this.ma(!0));var b=!1;if(this.S==this.lb||"poly"==this.S.type){var c=this.lb;0<this.J.length&&this.Jc(a.target)&&(c=this.Wi(this.ca.x,this.ca.y));this.Rj(c);this.Ng(this.ca.x,this.ca.y,!1);0!=c&&c!=this.lb&&(b=!0)}c=null;!b&&
this.Jc(a.target)&&(c=this.Dk(this.ca.x,this.ca.y));this.v.Zi&&(this.v.Zi=!1);this.Ia.style.cursor=this.S!=this.lb&&this.S.ze&&b||c&&c.lg?"pointer":"default"}};e.prototype.Rj=function(a){!1===a&&(a=this.lb);this.S!=a&&(this.S!=this.lb&&(0<this.K.mode&&(this.S.jb=0),this.ga&&this.ga.hotspotProxyOut&&this.ga.hotspotProxyOut(this.S.id,this.S.url),this.H("hsproxyout",{id:this.S.id,url:this.S.url})),a!=this.lb?(this.Ne(a),this.ga&&this.ga.hotspotProxyOver&&this.ga.hotspotProxyOver(this.S.id,this.S.url),
this.H("hsproxyover",{id:this.S.id,url:this.S.url}),0<this.K.mode&&(this.K.jb=1,this.S.jb=1)):(this.Ne(this.lb),0<this.K.mode&&(this.K.jb=0)))};e.prototype.ct=function(a){a=a?a:window.event;this.yj=-1;if(this.re||this.gf&&this.ng)7<=this.fd?this.Rp():this.gg();if(!this.I.qc&&!this.xc&&(this.Xb&&(this.Xb.xe(),this.Je=this.Xb.Ma?this.Xb:null),this.T.Wc)){this.ma(!0);a.preventDefault();this.T.Wc=!1;a=(new Date).getTime();var b=Math.abs(this.ia.start.x-this.ia.pa.x)+Math.abs(this.ia.start.y-this.ia.pa.y);
if(400>a-this.T.startTime&&0<=b&&20>b){var c=this.Wi(this.ca.x,this.ca.y);c&&this.cq(c);b=Math.abs(this.ia.Wd.x-this.ia.pa.x)+Math.abs(this.ia.Wd.y-this.ia.pa.y);var h=this.kj(this.ca.x,this.ca.y,!0);700>a-this.Nh&&0<=b&&20>b?(c?this.eq(c):this.I.Pk&&this.fk(),this.H("doubleclick",{pan:-Math.round(100*h.pan)/100,tilt:Math.round(100*h.tilt)/100}),this.Nh=0):(this.H("panoclick",{pan:-Math.round(100*h.pan)/100,tilt:Math.round(100*h.tilt)/100}),this.Nh=a);this.ia.Wd.x=this.ia.pa.x;this.ia.Wd.y=this.ia.pa.y}}};
e.prototype.So=function(a){if(!this.I.Ee&&!this.xc&&(a=a?a:window.event,this.Jc(a.target))){var b=a.detail?-1*a.detail:a.wheelDelta/40;this.I.Ao&&(b=-b);a.axis&&(-1==this.yj?this.yj=a.axis:this.yj!=a.axis&&(b=0));var c=0<b?1:-1;a.wheelDeltaX&&a.wheelDeltaY&&Math.abs(a.wheelDeltaX)>Math.abs(a.wheelDeltaY)&&(b=0);0!=b&&(this.I.Nf?this.jn(c*this.I.qm,this.te(a),!0):this.Ti(c*this.I.qm,!0),this.update());a.preventDefault();this.ma(!0)}};e.prototype.Wu=function(a){a||(a=window.event);var b=a.touches,c=
this.Ch();this.ca.x=b[0].clientX-c.x;this.ca.y=b[0].clientY-c.y;this.Se=this.Xb=null;window.focus();this.tl||(this.tl=!0,this.H("hastouch",{}),this.H("playerstatechanged",{}));!this.Fo&&(this.re||this.gf&&this.ng)&&7>this.fd&&this.gg();if(!this.I.qc&&!this.xc)if(c=(new Date).getTime(),this.Je)this.Xb=this.Je,this.T.hd=!0,this.T.startTime=c,a.preventDefault(),this.T.hi=!0;else{if(!this.T.hd&&b[0]){this.T.startTime=c;this.T.start.x=b[0].pageX;this.T.start.y=b[0].pageY;this.T.pa.x=b[0].pageX;this.T.pa.y=
b[0].pageY;c=this.Eb=b[0].target;if(this.Jc(c)){var h;(h=this.Dk(this.ca.x,this.ca.y))&&h.xe&&(this.Xb=h);if(h=this.Wi(this.ca.x,this.ca.y))this.O(h),this.Se=h,this.Rj(h),this.te(a),this.Ng(this.ca.x,this.ca.y,!0);this.oq(b[0].pageX,b[0].pageY);this.T.In=b[0].identifier;this.T.hd=!0;a.preventDefault();this.T.hi=!0;this.ma(!0)}if(c){h=!1;if(null!=this.T.Gg)for(var m=this.T.Gg;m&&m!=this.control;){if(m.onmouseout)m.onmouseout(a);m=m.parentNode}m=c;for(var n=!0;m&&m!=this.control;)c!=this.T.Gg&&m.onmouseover&&
(m.onmouseover(a),7<=this.fd&&this.Jc(a)&&(h=!0)),m.onmousedown&&(m.onmousedown(a),n=!1,h=!0),m.onclick&&(n=!1),m=m.parentNode;this.T.Gg=n&&7<=this.fd&&c!=this.T.Gg?c:null;h&&(a.preventDefault(),this.T.hi=!0)}}1<b.length&&(this.T.hd=!1);!this.ql&&2==b.length&&b[0]&&b[1]&&this.Jc(this.Eb)&&(a=b[0].pageX-b[1].pageX,b=b[0].pageY-b[1].pageY,this.fov.Sp=Math.sqrt(a*a+b*b),this.fov.prev=this.fov.m);this.ia.ha.x=0;this.ia.ha.y=0}};e.prototype.gg=function(){try{this.Ii&&this.B.j&&(!this.B.Tc&&this.B.Yj&&
this.B.j.play(),this.B.j.muted=!1);if(this.ra&&(this.ra.resume(),"suspended"==this.ra.state))return;if(this.Vd&&this.ra&&this.ra.createOscillator){var a=this.ra.createOscillator(),b=this.ra.createGain();a.frequency.value=30;a.type="sine";a.connect(b);b.connect(this.ra.destination);b.gain.value=.01;a.start(0);setTimeout(function(){a.stop()},1E4)}for(b=0;b<this.X.length;b++){var c=this.X[b];(!this.isPlaying(c.id)||c.wa)&&0<=c.loop&&c.autoplay&&!this.pd&&(c.wa&&c.Tf(),this.Yd(c.id,c.loop))}for(b=0;b<
this.U.length;b++){var h=this.U[b];!this.isPlaying(h.id)&&h.autoplay&&this.Ii&&!this.pd&&this.Yd(h.id,h.loop);this.isPlaying(h.id)&&h.autoplay&&this.Ii&&!this.pd&&(h.Ld&&h.Of(),h.j.muted=!1)}this.gf=this.re=!1}catch(m){this.O(m)}};e.prototype.Vu=function(a){a||(a=window.event);var b=a.touches,c=this.Ch();this.ca.x=b[0].clientX-c.x;this.ca.y=b[0].clientY-c.y;if(this.I.qc||this.xc)(this.D.Jd||this.D.ge||this.D.Zc)&&a.preventDefault();else{b[0]&&(this.T.pa.x=b[0].pageX,this.T.pa.y=b[0].pageY);if(this.Eb){c=
this.Eb;for(var h=!1;c&&c!=this.control&&!h;)"scrollarea"==c.ggType&&(h=!0),"map"==c.ggType&&(h=!0),"text"==c.ggType&&(h=!0),c=c.parentNode;h||a.preventDefault()}if(this.T.hd){a.preventDefault();for(c=0;c<b.length;c++)if(b[c].identifier==this.T.In){this.nq(b[c].pageX,b[c].pageY);break}this.Se&&(this.te(a),this.Ng(this.ca.x,this.ca.y,!0));this.ma(!0)}2==b.length&&b[0]&&b[1]&&(this.T.hd=!1,!this.ql&&this.Jc(this.Eb)&&(this.I.Ee||(c=b[0].pageX-b[1].pageX,h=b[0].pageY-b[1].pageY,this.fov.xn=Math.sqrt(c*
c+h*h),this.ka.fov.active=!0,this.ka.fov.center.enabled=!0,this.ka.fov.center.x=(b[0].pageX+b[1].pageX)/2,this.ka.fov.center.y=(b[0].pageY+b[1].pageY)/2,this.ka.fov.mc=this.fov.prev*Math.sqrt(this.fov.Sp/this.fov.xn),4==this.Z()&&!this.$b()&&this.ka.fov.mc>this.fov.max&&(this.ka.fov.mc=this.fov.max),this.ka.fov.mc<this.fov.min&&(this.ka.fov.mc=this.fov.min)),this.ma(!0),a.preventDefault()))}};e.prototype.Uu=function(a){this.T.hi&&(this.T.hi=!1,a.preventDefault());var b=!1;if(this.re||this.gf&&this.ng)7<=
this.fd?this.Rp():this.gg();if(!this.I.qc&&!this.xc){this.T.hd&&(a.preventDefault(),this.ma(!0));var c=(new Date).getTime(),h=void 0,m=!1;h=Math.abs(this.T.start.x-this.T.pa.x)+Math.abs(this.T.start.y-this.T.pa.y);if(0<=h&&20>h){b=!0;this.Jc(this.Eb)&&(a.preventDefault(),this.Xb&&(this.Xb.xe(),this.Je=this.Xb.Ma?this.Xb:null));if(this.Eb){var n=this.Eb;for(h=function(){if(n.onclick){var r=n;setTimeout(function(){r.onclick(a)},0);"hotspot"!=n.wv&&(m=!0);b=!1}n=n.parentNode};n&&n!=this.control;)h()}h=
Math.abs(this.T.Wd.x-this.T.pa.x)+Math.abs(this.T.Wd.y-this.T.pa.y);if(700>c-this.Nh&&0<=h&&20>h){if(this.Jc(this.Eb))if(a.preventDefault(),this.Se)this.eq(this.Se);else if(this.I.Pk){var q=this;setTimeout(function(){q.fk()},1)}if(this.Eb)for(n=this.Eb;n&&n!=this.control;)n.ondblclick&&(n.ondblclick(),m=!0,b=!1),n=n.parentNode;this.Nh=0}else this.Nh=c;this.T.Wd.x=this.T.pa.x;this.T.Wd.y=this.T.pa.y}if(this.Eb)for(n=this.Eb;n&&n!=this.control;)this.T.Gg!=this.Eb&&n.onmouseout&&(n.onmouseout(a),7<=
this.fd&&(m=!0)),n.onmouseup&&(n.onmouseup(a),7<=this.fd&&(m=!0)),n=n.parentNode;m&&a.preventDefault();this.te(a);this.Se&&(this.Ng(-1,-1,!0),b&&this.cq(this.Se));this.Eb=null;this.T.hd=!1;this.Rj(this.lb);this.Se=null}};e.prototype.Tu=function(a){this.I.qc||this.xc||(this.T.hd=!1);this.Se=null;this.Rj(this.lb);this.te(a);this.Ng(-1,-1,!0)};e.prototype.Go=function(){return null!=this.Eb||this.T.hd||this.T.Wc};e.prototype.To=function(a){if(!this.xf&&window.MSGesture){var b=window.MSGesture;this.O("setup gesture");
this.xf=new b;this.xf.target=this.control}this.xf&&this.xf.addPointer(a.pointerId)};e.prototype.Sn=function(a){this.ql=!0;this.Fj=1;this.I.qc||this.I.Ee||this.xc||(a.touches?(this.Eb=a.touches.target,this.Jc(a.target)&&(a.preventDefault(),this.fov.prev=this.fov.m,this.ma(!0))):(a.preventDefault(),this.fov.prev=this.fov.m,this.ma(!0)))};e.prototype.wr=function(a){if(!this.I.qc&&!this.I.Ee&&!this.xc&&this.Jc(a.target)){a.preventDefault();this.ka.fov.active=!0;this.ka.fov.center.enabled=!0;var b=this.te(a);
this.ka.fov.center.x=b.x;this.ka.fov.center.y=b.y;this.ka.fov.mc=this.fov.prev/Math.sqrt(a.scale);4==this.Z()&&2!=this.Xd&&this.ka.fov.mc>this.fov.max&&(this.ka.fov.mc=this.fov.max);this.update();this.ma(!0)}};e.prototype.ht=function(a){this.I.qc||this.I.Ee||this.xc||(a.preventDefault(),1!=a.scale&&(this.ka.fov.active=!0,this.Fj*=a.scale,this.ka.fov.center.enabled=!0,a=this.te(a),this.ka.fov.center.x=a.x,this.ka.fov.center.y=a.y,this.ka.fov.mc=this.fov.prev/Math.sqrt(this.Fj),4==this.Z()&&2!=this.Xd&&
this.ka.fov.mc>this.fov.max&&(this.ka.fov.mc=this.fov.max),this.update(),this.ma(!0)))};e.prototype.Rn=function(a){this.I.qc||this.I.Ee||this.xc||(this.ka.fov.active=!1,a.preventDefault(),this.ma(!0),this.xf&&this.xf.reset&&this.xf.reset())};e.prototype.Ts=function(a){this.I.Uh||this.xc||(this.isFullscreen&&a.preventDefault(),this.wj=a.keyCode,this.ma(!0))};e.prototype.Us=function(a){this.wj&&(this.wj=0,a.preventDefault())};e.prototype.ot=function(){this.wj=0};e.prototype.ci=function(){this.isFullscreen&&
(this.Kh()||this.exitFullscreen(),this.Kh()&&(this.$.style.left="0px",this.$.style.top="0px"))};e.prototype.ut=function(a,b,c,h){h?(this.Fh.alpha=a,this.Fh.beta=b,this.Fh.gamma=c,this.Fh.gamma+=90):(this.nb.alpha=a,this.nb.beta=b,this.nb.gamma=c,this.nb.gamma+=90);this.nb.orientation=window.orientation?1*parseInt(""+window.orientation,10):0;c=new y.Sm;a=this.nb;c.Ef(-a.alpha);c.Ff(-a.beta);c.$d(-a.gamma);c.Ff(90-a.orientation);1>c.Ob?-1<c.Ob?(b=180/Math.PI*Math.asin(-c.Ob),a=180/Math.PI*Math.atan2(c.vc,
c.uc),c=180/Math.PI*Math.atan2(c.tc,c.sc)):(b=0,a=90,c=-180/Math.PI*Math.atan2(-c.ac,c.bc)):(b=0,a=-90,c=180/Math.PI*Math.atan2(-c.ac,c.bc));if(this.Qg)if(this.Go()||this.F.pj||this.nb.oi)this.nb.yf=this.lf()+c,this.nb.fadeIn=0,this.nb.oi=!1;else{h=this.F.active;var m=1;10>this.nb.fadeIn&&(this.nb.fadeIn+=1,m=.1*this.nb.fadeIn);c=-c+this.nb.yf;this.ae(m*c+(1-m)*this.lf());this.be(m*a+(1-m)*this.ig());this.lq?this.Ag(m*b+(1-m)*this.mj()):this.Ag(0);this.bf();this.F.active=h}};e.prototype.cq=function(a){this.ga&&
this.ga.hotspotProxyClick&&this.ga.hotspotProxyClick(a.id,a.url);this.H("hsproxyclick",{id:this.S.id,url:this.S.url});""!=a.url&&(this.Ll(a.url,a.target),this.Ng(-1,-1,!1))};e.prototype.eq=function(a){this.ga&&this.ga.hotspotProxyDoubleClick&&this.ga.hotspotProxyDoubleClick(a.id,a.url);this.H("hsproxydblclick",{id:this.S.id,url:this.S.url})};e.prototype.hf=function(){return Math.min(1,2*Math.tan(Math.PI*Math.min(this.fov.m,90)/360))};e.prototype.fp=function(){var a=this;setTimeout(function(){a.fp()},
100);9!=a.Oj||a.sj||window.requestAnimationFrame(function(){a.di();a.O("restart recover timer")});10<a.Oj&&1<a.Vl&&(a.Uc("recover timer - disabling requestAnimationFrame"),a.sj=!0,a.di());a.Oj++};e.prototype.vi=function(a){if("__VideoPano"!=this.L.cb){var b={PAN:{value:0,name:"pan"},sv:{value:1,name:"tilt"},pv:{value:2,name:"fov"}},c=0,h=0,m=0;a=Math.max(a,0);for(var n in b){var q=b[n],r=this.kf(this.lo(a,q.value,""),q.value,"");var t=(t=this.fo(r))?this.Tn(r,t,a):r.value;switch(q.value){case 0:q=
this.pan.m;if(this.je&&3!=r.type){if(!this.$b()){for(;360<t;)t-=360;for(;-360>t;)t+=360}c=t-q;this.$b()||(180<c&&(c-=360),-180>c&&(c+=360));this.pan.m+=c*this.Md}else this.pan.m=t;this.v.Rh=this.pan.m;break;case 1:q=this.u.m;this.je&&3!=r.type?(h=t-q,this.u.m+=h*this.Md):this.u.m=t;this.v.Sh=this.u.m;break;case 2:q=this.fov.m,this.je&&3!=r.type?(m=t-q,this.fov.m+=m*this.Md):this.fov.m=t,this.v.Qh=this.fov.m}}t=this.Z();for(b=Math.floor(a);!this.kf(b,3)&&0<b;)b--;b=this.kf(b,3);n=a-b.time;this.je&&
-1!=this.bh&&this.Pi+this.tk>a?(t=this.zh(this.bh),this.fov.m>t?this.Pi=a:(n=(a-this.Pi)/this.tk,n=Math.min(1,n),this.qb(this.Z(),this.bh,1-n))):(0==b.Fb||n>b.Fb-.3?this.qb(b.value):(n/=b.Fb,this.qb(t,b.value,1-n)),this.v.Lo=b.value);this.je&&(t=Math.sqrt(c*c+h*h+m*m),.3>t&&(this.je=!1,this.Md=.02,this.ah=0),0<this.ah&&t>this.ah&&(this.Md+=.01,this.Md=Math.min(this.Md,1)),this.ah=t)}c=Math.floor(a);h=this.yr(c);for(m=0;m<h.length;m++)if(n=h[m],3>n.Xm)c!=this.$m&&(t=n.sd,this.dc.hasOwnProperty(t)&&
(b=this.dc[t].type,0==b?this.Oe(t,n.Jm):1==b?this.Oe(t,n.value):2==b&&this.Oe(t,"true"==n.Jm)));else if(b=this.kf(this.lo(a,n.hb,n.sd),n.hb,n.sd),t=(t=this.fo(b))?this.Tn(b,t,a):b.value,n=n.sd.split("|"),2==n.length)for(b=n[0],n=n[1],r=0;r<this.J.length;r++)q=this.J[r],q.id==b&&("pan"==n?q.pan=t:"tilt"==n&&(q.u=t));this.$m=c;this.update()};e.prototype.Un=function(){if(""!=this.v.ug){var a=this.jo(this.v.ug);if(0==a.length||1==a.length&&a[0]==this.xa)return this.xa}a=this.xa;do if(this.v.Yo){var b=
1E3;do a=this.Za[Math.floor(Math.random()*this.Za.length)];while(b--&&a==this.xa)}else b=this.Za.indexOf(a),b++,b>=this.Za.length&&(b=0),a=this.Za[b];while(""!=this.v.ug&&!this.Ah(a).tags.includes(this.v.ug)&&a!=this.xa);return a};e.prototype.Ct=function(a){var b=this.F.speed;this.F.Dl&&(b=b*(a.getTime()-this.F.Dl)/60);this.F.Dl=a.getTime();this.v.wh&&(this.sa.ready()||4==this.Z())&&this.ij()&&(this.v.wh=!1,this.v.active=!0,this.Ea.running=!0,this.Ea.finished=!1);if(this.F.active||0!=this.F.pb&&this.sa.ready()){if(this.F.Im&&
"__AutoMove"==this.L.cb){var c=a.getTime()-this.F.Zm;b=c/100;if(b>=this.L.length){if(this.vi(this.L.length),this.ya.splice(this.ya.indexOf(this.L),1),this.F.active=!1,this.L=this.F.Ym,this.F.pb=0,this.zg(this.F.pan,this.F.u,this.F.fov),this.pan.Yb=this.F.pan,this.u.Yb=this.F.u,this.F.$h&&(this.F.$h=!1,this.v.Dj=!0,this.v.rd=!0,this.v.active=!0,this.H("autorotatechanged",{})),this.onMoveComplete)this.onMoveComplete()}else this.vi(b)}else{this.pan.d=this.F.pan-this.pan.m;if(360==this.pan.max-this.pan.min){for(;-180>
this.pan.d;)this.pan.d+=360;for(;180<this.pan.d;)this.pan.d-=360}this.u.d=this.F.u-this.u.m;this.W.d=this.F.W-this.W.m;this.fov.d=this.F.fov-this.fov.m;c=b*this.hf();var h=Math.sqrt(this.pan.d*this.pan.d+this.u.d*this.u.d+this.W.d*this.W.d+this.fov.d*this.fov.d),m=this.pan.m-this.F.Rh,n=this.u.m-this.F.Sh,q=this.W.m-this.F.Mo,r=this.fov.m-this.F.Qh;100*Math.sqrt(m*m+n*n+q*q+r*r)<c&&0==this.F.pb&&(this.F.aborted=!0);this.F.Rh=this.pan.m;this.F.Sh=this.u.m;this.F.Mo=this.W.m;this.F.Qh=this.fov.m;if(100*
h<c||this.F.aborted){if(this.pan.d=0,this.u.d=0,this.W.d=0,this.fov.d=0,this.fov.Nc.enabled=!1,this.F.active&&(this.F.active=!1,this.pan.m=this.F.pan,this.u.m=this.F.u,this.W.m=this.F.W,this.fov.m=this.F.fov,this.onMoveComplete))this.onMoveComplete()}else h=h>5*c?c/h:.2,this.pan.d*=h,this.u.d*=h,this.fov.d*=h;this.pan.m+=this.pan.d;this.u.m+=this.u.d;this.W.m+=this.W.d;this.I.Nf&&this.fov.Nc.enabled?this.em(this.fov.m+this.fov.d,this.fov.Nc):this.fov.m+=this.fov.d;0!=this.F.pb&&(this.F.pb!=this.Z()?
(b=this.zh(this.F.pb),this.Cd()>b?(this.fov.m+=-Math.max((2.5-1.7*Math.min(Math.sqrt(this.pan.d*this.pan.d+this.u.d*this.u.d+this.W.d*this.W.d)/c,1))*c,this.fov.d)-this.fov.d,this.F.fov=this.fov.m):(this.qb(this.F.pb,this.Z(),0),this.O("New projection from Target:"+this.Z()),this.F.ki=0,this.sa.rj())):1>this.F.ki?(this.F.ki=Math.min(1,this.F.ki+.05*b),this.qb(this.Z(),this.Hc(),this.F.ki)):(this.qb(this.Z(),0,0),this.F.pb=0,this.sa.rj()))}this.qg=a.getTime();this.update()}else if(this.v.active&&!this.D.ge){c=
a.getTime()-this.v.startTime;this.v.zj<this.v.startTime&&(this.v.zj=this.v.startTime);if((this.v.rd||this.Ea.running)&&0<this.ya.length){b=c/100;h=!1;if(this.wc!=this.L.cb||""!=this.L.Ve&&this.v.Nd!=this.L.Ve){for(c=0;c<this.ya.length;c++)if(""==this.wc&&this.ya[c].Ve==this.v.Nd||""!=this.wc&&this.ya[c].cb==this.wc&&this.ya[c].Ve==this.v.Nd){h=!0;this.L=this.ya[c];this.wc=this.L.cb;break}!h&&0<this.ya.length&&this.ya[0].Ve==this.v.Nd&&(h=!0,this.L=this.ya[0],this.wc=this.L.cb)}else h=!0;if(h)if(c=
(m=this.B.j&&this.B.Tc)&&this.v.um&&!this.Ea.running,this.Ue){h=b;if(c)for(this.B.j.currentTime<this.bn&&this.vk&&(this.uk++,this.vk=!1),h=10*(this.uk*this.B.j.duration+this.B.j.currentTime),this.bn=this.B.j.currentTime,.05>this.B.j.duration-this.B.j.currentTime&&(this.vk=!0);h>=10*this.Pf;)h-=10*this.Pf;if(!m&&b>=this.L.length||m&&!c&&b>=this.L.length||m&&c&&(this.L.cb!=this.L.Vo||this.L.Uo!=this.xa)&&b>=this.L.length){this.vi(this.L.length);this.v.Fd=0;this.Ue=!1;if(this.Ea.running){this.Ap();return}if(this.v.pn){c=
0;do b=this.an[this.L.Ve],h=Math.floor(Math.random()*Object.keys(b).length),h=b[h],this.wc=h.cliptitle,b=h.nodeid,h=h.startview,c++;while(b==this.xa&&10>c)}else this.wc=this.L.Vo,b=this.L.Uo,h=this.L.lt;this.wc==this.L.cb&&this.xa==b?1<this.Za.length&&0<this.v.Gj&&(this.v.startTime=a.getTime(),(c=this.Un())&&c!=this.xa&&(this.od("{"+c+"}"),this.Ue=!1,this.v.active=!0,this.D.ke=!0,this.D.We=!0)):(this.sf&&b!=this.xa&&(this.od("{"+b+"}",h),this.D.enabled?(this.v.active=!1,this.D.ke=!0,this.D.We=!0):
this.v.active=!0),this.v.startTime=a.getTime())}else this.vi(h),this.v.Fd=h}else if(b=this.L.qa[0],h=this.L.qa[1],m=this.L.qa[2],n=this.L.qa[3],3!=n.hb&&(n=0),this.v.Dj||this.F.aborted||this.Ea.running||c){if(this.Ue=!0,this.v.startTime=0<this.v.Fd?a.getTime()-100*this.v.Fd:a.getTime(),this.je=c){for(this.Pf=this.uk=0;this.Pf<this.L.length/10;)this.Pf+=this.B.j.duration;h=10*this.B.j.currentTime;for(c=Math.floor(h);!this.kf(c,3)&&0<c;)c--;c=this.kf(c,3);c.value==this.Z()?this.bh=-1:(this.bh=c.value,
this.Pi=h,this.tk=Math.max(5,c.time+c.Fb-h))}}else{c={};if(0<this.v.Fd)c.pan=this.v.Rh,c.tilt=this.v.Sh,c.fov=this.v.Qh,c.projection=this.v.Lo;else{for(c.pan=b.value;360<c.pan;)c.pan-=360;for(;-360>c.pan;)c.pan+=360;c.tilt=h.value;c.fov=m.value;c.projection=n?n.value:4}c.timingFunction=3;c.speed=1;this.F.$h=!0;this.Ej(c);this.v.active=!0}}else 0<this.v.Gj&&this.sf&&c>=1E3*this.v.Gj?1<this.Za.length&&(this.v.startTime=a.getTime(),(c=this.Un())&&c!=this.xa&&(this.v.kd=a.getTime(),this.v.timeout=0,this.od("{"+
c+"}"),this.v.active=!0,this.D.ke=!0)):(c=a.getTime(),h=b=1E3/60,0!=this.v.kd&&(h=c-this.v.kd),this.u.d=this.v.ek*((this.v.wo?this.u.Ha:0)-this.u.m)/100,this.fov.d=this.v.ek*(this.fov.Ha-this.fov.m)/100,this.pan.d=.95*this.pan.d+-this.v.speed*this.hf()*.05,b=h/b,this.pan.m+=this.pan.d*b,this.u.m+=this.u.d*b,this.fov.m+=this.fov.d*b,this.v.kd=c,this.update());3E3<a.getTime()-this.v.zj&&!this.v.Zi&&(this.Ia.style.cursor="none",this.v.Zi=!0)}else!this.Ea.finished&&1E3<a.getTime()-this.qg&&(this.ya.splice(this.ya.indexOf(this.L),
1),this.L=this.Zk(!1),this.wc=this.L.cb,this.v.active=!1,this.v.wh=!0),this.v.enabled&&!this.T.tj()&&a.getTime()-this.qg>1E3*this.v.timeout&&!this.v.wh&&(this.v.Eg&&this.ij()||!this.v.Eg)&&(this.v.active=!0,this.v.startTime=a.getTime(),this.v.kd=0,this.H("autorotatechanged",{}),this.pan.d=0,this.u.d=0,this.fov.d=0,this.fov.Nc.enabled=!1),!this.ka.enabled||this.T.tj()||0==this.pan.d&&0==this.u.d&&0==this.fov.d||(this.F.pj=!0,this.pan.d*=.9,this.u.d*=.9,this.fov.d*=.9,this.pan.m+=this.pan.d,this.u.m+=
this.u.d,this.I.Nf&&this.fov.Nc.enabled?this.jn(this.fov.d,this.fov.Nc):this.Ti(this.fov.d),1E-4>this.pan.d*this.pan.d+this.u.d*this.u.d+this.fov.d*this.fov.d&&(this.pan.d=0,this.u.d=0,this.fov.d=0,this.fov.Nc.enabled=!1),this.update())};e.prototype.fq=function(a){var b=this.D;b.Zc=!1;"previewtrack"==b.delay||"videopano"==b.delay&&!this.B.j?0<this.N.M.levels.length?this.N.M.levels[this.N.M.levels.length-1].loaded||(b.Zc=!0):this.sa.ip()||(b.Zc=!0):"videopano"==b.delay&&this.B.j&&!this.B.pg&&(b.Zc=
!0);b.Zc||this.Zj(a)};e.prototype.Zj=function(a){a||(a=new Date);var b=this.D;b.Zc=!1;b.ge=!0;b.Vp=a.getTime()+100;0==b.dd||b.Xg||this.sm()};e.prototype.sm=function(){var a=this.D;4==a.dd?(this.L=this.Zk(!0,a.vm,a.wm,a.Bi),this.wc=this.L.cb,this.v.active=!0,this.Ea.running=!0):this.moveTo(a.vm,a.wm,a.Bi,a.Yg,0,a.de)};e.prototype.Et=function(a){var b=this.D;if(!b.Kp){if(b.Jd){var c=a.getTime()-b.tq;c/=1E3*b.sq;1<=c?(b.Nl(1),b.Jd=!1,this.Gn(),this.Up(),this.fq(a)):0<=c&&b.Nl(c)}else b.ge&&(c=a.getTime()-
b.Vp,c/=1E3*b.dh,1<=c?(b.ge=!1,this.qg=a.getTime(),this.update(),0!=b.dd&&b.Xg&&this.sm(),4!=b.dd&&(this.Tj(!1),this.v.active=b.ke,this.v.rd=b.We,this.H("autorotatechanged",{}),b.ke=!1,b.We=!1),this.v.kd=0,this.fa&&this.Kk(),this.fh=!1):0<=c&&b.Nl(c));b=this.xt;b.Tq&&(b.$i?a.getTime()-b.Sk>=1E3*b.delay&&(b.$i=!1):(b.current+=b.td,0>b.current&&(b.current=0,b.td=-b.td,b.$i=!0,b.Sk=a.getTime()),1<b.current&&(b.current=1,b.td=-b.td,b.$i=!0,b.Sk=a.getTime())))}};e.prototype.Ht=function(){var a,b=this.K;
if(0<b.Qb.length){for(a=0;a<b.Qb.length;a++)b.qd[a]!=b.Ac[a]&&(b.qd[a]>b.Ac[a]?(b.Ac[a]+=.05,b.qd[a]<b.Ac[a]&&(b.Ac[a]=b.qd[a])):(b.Ac[a]-=.05,b.qd[a]>b.Ac[a]&&(b.Ac[a]=b.qd[a],-1!=b.Wj.indexOf(b.Qb[a])&&(b.Wj.splice(b.Wj.indexOf(b.Qb[a]),1),b.Qb.splice(a,1),b.qd.splice(a,1),b.Ac.splice(a,1)))));this.update()}if(2==b.mode)for(a=0;a<this.J.length;a++){var c=this.J[a];"poly"==c.type&&c.jb!=c.Da&&(c.jb>c.Da?(c.Da+=b.td,c.jb<c.Da&&(c.Da=c.jb)):(c.Da-=b.td,c.jb>c.Da&&(c.Da=c.jb)),this.update())}3==b.mode&&
b.jb!=b.Da&&(b.jb>b.Da?(b.Da+=b.td,b.jb<b.Da&&(b.Da=b.jb)):(b.Da-=b.td,b.jb>b.Da&&(b.Da=b.jb)),this.update())};e.prototype.Gt=function(){var a=this.ka;this.T.tj()&&(this.I.Ud?(a.ha.x=.4*(this.ia.pa.x-a.pa.x),a.ha.y=.4*(this.ia.pa.y-a.pa.y),a.pa.x+=a.ha.x,a.pa.y+=a.ha.y):(a.ha.x=.1*-this.ia.ha.x*this.I.sensitivity/8,a.ha.y=.1*-this.ia.ha.y*this.I.sensitivity/8),this.mq(a.ha.x,a.ha.y),this.update());a.fov.active&&(this.I.Nf&&a.fov.center.enabled?this.Xq(.4*(a.fov.mc-this.fov.m),a.fov.center):this.Bk(.4*
(a.fov.mc-this.fov.m)),.001>Math.abs(a.fov.mc-this.fov.m)/this.fov.m&&(a.fov.active=!1),this.update());if(a.enabled&&(0!=a.ha.x||0!=a.ha.y)&&!this.T.tj()){var b=.9*(1-a.am);a.ha.x*=b;a.ha.y*=b;this.F.pj=!0;.01>a.ha.x*a.ha.x+a.ha.y*a.ha.y?(a.ha.x=0,a.ha.y=0):(this.mq(a.ha.x,a.ha.y),this.update())}};e.prototype.Ft=function(){if(!this.ij()&&this.nf&&5<this.N.M.rp){var a,b=0,c=this.vd.length;if(this.Pg)c=50,this.Tk<c&&this.Tk++,b=this.Tk;else for(a=0;a<c;a++)(this.vd[a].complete&&this.vd[a].src!=this.pr||
""==this.vd[a].src)&&b++;b==c?(this.fi=1,this.isLoaded=!0,this.ua&&this.ua.ggLoaded&&this.ua.ggLoaded(),this.H("imagesready",{}),this.v.Eg&&this.v.enabled&&!this.F.active&&!this.D.Jd&&(this.v.active=!0,this.v.Eg=!1,this.v.startTime=(new Date).getTime(),this.v.kd=0)):this.fi=b/(1*c);this.H("downloadprogress",{percentLoaded:this.fi})}};e.prototype.di=function(){var a=this;a.Qj||(a.sj?setTimeout(function(){a.Qj=!1;a.di()},1E3/60):window.requestAnimationFrame(function(){a.Qj=!1;a.di()}));a.Qj=!0;this.Vl=
this.Oj=0;a.F.pj=!1;var b=new Date;this.fj++;120<=this.fj&&(this.O("F/s: "+Math.round(1E3*this.fj/(b.getTime()-this.Io))),this.Io=b.getTime(),this.fj=0);this.H("timer",{});this.na&&this.sa.mr();this.Hm&&(this.fc(),this.Hm=!1);this.Gt();this.Ft();this.B.j&&this.B.Tc&&!this.Ue&&this.Km&&(this.L=this.Km,this.vi(10*this.B.j.currentTime));this.Ct(b);this.N.Dt();this.Et(b);this.sa.cv();(0<=this.K.mode||0<this.K.Qb.length)&&this.Ht();this.ik();if(this.vf.pan!=this.pan.m||this.vf.u!=this.u.m||this.vf.fov!=
this.fov.m)this.vf.pan=this.pan.m,this.vf.u=this.u.m,this.vf.fov=this.fov.m,this.H("positionchanged",{});this.Cl!=this.Z()&&(this.Cl=this.Z(),this.H("projectionchanged",{}));this.tb&&(0<this.oh?this.oh--:(this.tb=!1,this.oh=0),this.D.ge||this.D.Jd||this.D.Zc||this.ie||(this.Hi(),this.H("renderframe",{})),this.H("repaint",{}));b=this.ao();b!=this.Jo&&(b?(this.ua&&this.ua.ggReLoadedLevels&&this.ua.ggReLoadedLevels(),this.H("tilesrequested",{})):(a.ua&&a.ua.ggLoadedLevels&&a.ua.ggLoadedLevels(),this.H("tilesready",
{})),this.Jo=b)};e.prototype.zh=function(a){switch(a){case 4:a=Math.min(110,this.fov.max);break;case 12:a=Math.min(270,this.fov.Hl);a=Math.min(360*this.aspect(),a);a=Math.min(360/this.aspect(),a);break;case 9:a=Math.min(270,this.fov.Il);break;default:a=90}return a};e.prototype.ik=function(){this.Nk.Kn(this.pan.m,this.u.m);for(var a=0;a<this.X.length+this.U.length;a++){if(a<this.X.length)var b=this.X[a];else if(b=this.U[a-this.X.length],b.nd)continue;b.ik()}};e.prototype.Au=function(a,b){var c=this;
var h="<<U>>"+String(c.kb);h=h.toUpperCase();"U"!=h.charAt(2)&&(c.I.mg=!1);if(0!=c.Xh.length||!c.I.mg||c.I.ih||c.I.jh&&c.pf()||c.I.Xi)if(c.yd)c.$.removeChild(c.yd),c.yd=null;else{c.yd=document.createElement("div");var m=c.yd;h="left: "+a+"px;top:\t "+(b+"px;z-index: 32000;");h+="position:relative;";h+="display: table;";h+="color: black;";h+="background-color: white;";h+="border: 1px solid lightgray;";h+="box-shadow: 1px 1px 3px #333;";h+="font-family: Verdana, Arial, Helvetica, sans-serif;";h+="font-size: 9pt;";
h+="opacity : 0.95;";m.setAttribute("style",h);m.setAttribute("class","gg_contextmenu");h=document.createElement("style");a=document.createTextNode(".gg_context_row:hover { background-color: #3399FF }");h.type="text/css";h.styleSheet?h.styleSheet.cssText=a.nodeValue:h.appendChild(a);m.appendChild(h);for(a=0;a<c.Xh.length;a++)if(b=c.Xh[a],""!=b.text){var n=document.createElement("div");h="text-align: left;";h+="margin: 0;";h+="padding: 5px 20px;";h+="vertical-align: left;";n.setAttribute("style",h);
n.setAttribute("class","gg_context_row");""!=b.url?(h=document.createElement("a"),h.href=b.url,h.target="_blank",h.innerHTML=this.ab(b.text),h.setAttribute("style","color: black; text-decoration: none;"),n.appendChild(h)):(h=document.createElement("span"),h.innerHTML=this.ab(b.text),h.setAttribute("style","color: black; text-decoration: none;"),n.appendChild(h));m.appendChild(n)}0<c.Xh.length&&(!c.I.mg||c.I.ih||c.I.jh&&c.pf()||c.I.Xi)&&m.appendChild(document.createElement("hr"));if(c.I.Xi&&c.na){b=
[];b.push({text:this.ab("Rectilinear Projection"),ii:4});b.push({text:this.ab("Stereographic Projection"),ii:9});b.push({text:this.ab("Fisheye Projection"),ii:12});for(a=0;a<b.length;a++){n=b[a];var q=document.createElement("div");q.setAttribute("class","gg_context_row");h="text-align: left;";h+="margin: 0;";h=c.Z()==n.ii?h+"padding: 5px 20px 5px 7px;":h+"padding: 5px 20px;";h+="vertical-align: left;";h+="cursor: pointer;";q.setAttribute("style",h);q.onclick=function(r){return function(){c.Ck(r,1);
c.update()}}(n.ii);q.innerHTML=c.Z()==n.ii?"&#10687; "+n.text:n.text;m.appendChild(q)}(!c.I.mg||c.I.ih||c.I.jh&&c.pf())&&m.appendChild(document.createElement("hr"))}c.I.ih&&(a=document.createElement("div"),a.setAttribute("class","gg_context_row"),h="text-align: left;margin: 0;padding: 5px 20px;",h+="vertical-align: left;",h+="cursor: pointer;",a.setAttribute("style",h),a.onclick=function(){c.fk()},a.innerHTML=c.Kh()?this.ab("Exit Fullscreen"):this.ab("Enter Fullscreen"),m.appendChild(a));c.I.jh&&
c.pf()&&(a=document.createElement("div"),a.setAttribute("class","gg_context_row"),h="text-align: left;margin: 0;padding: 5px 20px;",h+="vertical-align: left;",h+="cursor: pointer;",a.setAttribute("style",h),a.onclick=function(){c.$f()},a.innerHTML="Enter VR",m.appendChild(a));c.I.mg||(a=document.createElement("div"),h="text-align: left;margin: 0;padding: 5px 20px;",h+="vertical-align: left;",a.setAttribute("style",h),a.setAttribute("class","gg_context_row"),h=document.createElement("a"),h.href=e.nh("aHR0cDovL3Bhbm8ydnIuY29tLw=="),
h.target="_blank",h.innerHTML=e.nh("Q3JlYXRlZCB3aXRoIFBhbm8yVlI="),7<this.Bj.length&&(h.innerHTML+="<br/>"+e.yn(this.Bj).replace(/./gm,function(r){return"&#"+r.charCodeAt(0)+";"})),h.setAttribute("style","color: black; text-decoration: none;"),a.appendChild(h),m.appendChild(a));c.$.insertBefore(c.yd,c.$.firstChild);m.onclick=function(){c.yd&&(c.$.removeChild(c.yd),c.yd=null)};m.oncontextmenu=m.onclick}};e.prototype.Sq=function(){var a=this;var b=a.Ia;a.control=b;a.control=b;setTimeout(function(){a.di()},
10);setTimeout(function(){a.fp()},200);setTimeout(function(){a.he();a.Hi()},10);b.addEventListener&&(b.addEventListener("touchstart",function(c){a.Wu(c)},!1),b.addEventListener("touchmove",function(c){a.Vu(c)},!1),b.addEventListener("touchend",function(c){a.Uu(c)},!1),b.addEventListener("touchcancel",function(c){a.Tu(c)},!1),b.addEventListener("pointerdown",function(c){a.To(c)},!1),b.addEventListener("MSPointerDown",function(c){a.To(c)},!1),b.addEventListener("MSGestureStart",function(c){a.Sn(c)},
!1),b.addEventListener("MSGestureEnd",function(c){a.Rn(c)},!1),b.addEventListener("MSGestureChange",function(c){a.ht(c)},!1),b.addEventListener("gesturestart",function(c){a.Sn(c)},!1),b.addEventListener("gesturechange",function(c){a.wr(c)},!1),b.addEventListener("gestureend",function(c){a.Rn(c)},!1),b.addEventListener("mousedown",function(c){a.et(c)},!1),b.addEventListener("mousemove",function(c){a.dt(c)},!1),document.addEventListener("mouseup",function(c){a.ct(c)},!1),b.addEventListener("mousewheel",
function(c){a.So(c)},!1),b.addEventListener("DOMMouseScroll",function(c){a.So(c)},!1),document.addEventListener("keydown",function(c){a.Ts(c)},!1),document.addEventListener("keyup",function(c){a.Us(c)},!1),window.addEventListener("resize",function(){a.he()},!1),a.lc.addEventListener("resize",function(){a.he()},!1),window.addEventListener("blur",function(){a.ot()},!1),a.$.addEventListener("webkitfullscreenchange",function(){a.ci()},!1),document.addEventListener("mozfullscreenchange",function(){a.ci()},
!1),window.addEventListener("webkitfullscreenchange",function(){a.ci()},!1),document.addEventListener("MSFullscreenChange",function(){a.ci()},!1),document.addEventListener("fullscreenchange",function(){a.ci()},!1));b.oncontextmenu=function(c){void 0===c&&(c=window.event);return c.target&&!a.Jc(c.target)?!0:c.ctrlKey?!0:(c=a.te(c),a.Au(c.x,c.y),!1)};window.addEventListener("deviceorientation",function(c){a.ut(c.alpha,c.beta,c.gamma,c.absolute);null!=c.alpha&&null!=c.beta&&null!=c.gamma&&0==a.ol&&(a.ol=
!0,a.H("gyroavailable",{available:!0}),a.H("playerstatechanged",{}))})};e.prototype.Wm=function(){for(var a=0;a<this.J.length;a++)if("point"==this.J[a].type&&(this.ga&&this.ga.addSkinHotspot?(this.J[a].bg(),this.J[a].j=this.ga.addSkinHotspot(this.J[a])):(this.J[a].j=new y.vq(this,this.J[a]),this.J[a].gd&&this.J[a].Jf&&(this.J[a].j.ggUse3d=!0,this.J[a].j.gg3dDistance=this.J[a].aj)),this.J[a].j.__div.style.left="-1000px",this.J[a].j.__div.style.top="-1000px",this.J[a].j&&this.J[a].j.__div)){var b=this.Ia.firstChild;
b?this.Ia.insertBefore(this.J[a].j.__div,b):this.Ia.appendChild(this.J[a].j.__div)}};e.prototype.Yq=function(){if(!this.ga||!this.ga.addSkinHotspot)for(var a=0;a<this.J.length;a++)"point"==this.J[a].type&&this.J[a].j&&this.J[a].j.Es()};e.prototype.Zq=function(){for(var a=0;a<this.Wa.length;a++)this.Wa[a].Od();for(a=0;a<this.Sb.length;a++)this.Sb[a].Od();for(a=0;a<this.X.length;a++)this.X[a].Od();for(a=0;a<this.U.length;a++)this.U[a].Od()};e.prototype.Pm=function(){var a,b=document.createElement("fakeelement"),
c={OTransition:"oTransitionEnd",MSTransition:"msTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd",transition:"transitionEnd"};for(a in c)if(void 0!==b.style[a])return c[a]};e.prototype.Va=function(a){var b=[];a="#"==a.substr(0,1)?a.substr(1):"^"+a+"$";a=new RegExp(a,"");for(var c=0;c<this.X.length;c++)a.test(this.X[c].id)&&b.push(this.X[c]);for(c=0;c<this.U.length;c++)a.test(this.U[c].id)&&b.push(this.U[c]);for(c=0;c<this.Wa.length;c++)a.test(this.Wa[c].id)&&b.push(this.Wa[c]);
for(c=0;c<this.Sb.length;c++)a.test(this.Sb[c].id)&&b.push(this.Sb[c]);return b};e.prototype.Wr=function(a){if("_videopanorama"==a)return this.B.j;a=this.Va(a);return 0<a.length?a[0].j:null};e.prototype.Vr=function(a){a=this.Va(a);return 0<a.length&&a[0].wa?a[0]:null};e.prototype.mp=function(a,b){var c=this;b.addEventListener("ended",function(m){c.H("videoended",{video:m.target})});b.addEventListener("pause",function(m){c.H("videopaused",{video:m.target})});b.addEventListener("play",function(m){c.H("videostarted",
{video:m.target})});for(var h=0;h<this.U.length;h++)if(this.U[h].id==a)return this.U[h].j=b,this.U[h];h=new y.Vm(this);h.registerElement(a,b);return h};e.prototype.isPlaying=function(a){if("_main"===a)return!0;a=this.Va(a);return 0<a.length?a[0].wa?a[0].vg:!a[0].j.ended&&!a[0].j.paused:!1};e.prototype.Yd=function(a,b){var c=this,h=null;if(!this.pd)try{for(var m=this.Va(a),n=0;n<m.length;n++){var q=m[n];q.sb=b&&!isNaN(Number(b))?Number(b)-1:q.loop-1;-1==q.sb&&(q.sb=1E7);this.O(q.j);this.isPlaying(a)&&
this.$j(a);if(q.wa)q.ne();else{h=q.j.play();if(void 0!==h)h.then(function(){c.Bg(!0)})["catch"](function(){c.Bg(!1)});q.Ld&&q.Of()}this.ti(q.id,!1)}}catch(r){this.O(r)}return h};e.prototype.hp=function(a,b){a=this.Va(a);for(var c=0;c<a.length;c++){var h=a[c];this.isPlaying(h.id)?this.ei(h.id):this.Yd(h.id,b)}};e.prototype.Jt=function(a,b){a=this.Va(a);for(var c=0;c<a.length;c++){var h=a[c];this.isPlaying(h.id)?this.$j(h.id):this.Yd(h.id,b)}};e.prototype.ei=function(a){try{var b=void 0;if("_main"==
a){this.ti(a,!0);for(b=0;b<this.X.length;b++)this.X[b].wa?this.X[b].yk():this.X[b].j.pause();for(b=0;b<this.U.length;b++)this.U[b].j.pause()}else{var c=this.Va(a);for(b=0;b<c.length;b++){var h=c[b];this.ti(h.id,!0);h.wa?h.yk():h.j.pause()}}}catch(m){this.O(m)}};e.prototype.Iq=function(a,b){a=this.Va(a);for(var c=0;c<a.length;c++){var h=a[c];0==b||1==b?h.mf&&h.mf(1==b):2==b&&h.xe&&h.xe();!h.Ma||-1==this.Wa.indexOf(h)&&-1==this.U.indexOf(h)&&-1==this.Sb.indexOf(h)||(this.Xb=this.Je=h)}};e.prototype.$j=
function(a){var b;try{if("_main"===a){this.ti(a,!0);for(b=0;b<this.X.length;b++)this.X[b].wa?this.X[b].Tf():(this.X[b].j.pause(),this.X[b].j.currentTime=0);for(b=0;b<this.U.length;b++)this.U[b].j.pause(),this.U[b].j.currentTime=0}else{var c=this.Va(a);for(b=0;b<c.length;b++){var h=c[b];this.ti(h.id,!0);h.wa?h.Tf():h.j&&h.j.pause&&(h.j.pause(),h.j.currentTime=0)}}}catch(m){this.O(m)}};e.prototype.ti=function(a,b){a=this.Va("_main"===a?".*":a);for(var c=0;c<a.length;c++)a[c].stopped=b};e.prototype.Du=
function(a){a=this.Va(a);return 0<a.length?(a=a[0],a.wa?a.Vq():a.j?a.j.currentTime:0):0};e.prototype.Fu=function(a,b){a=this.Va(a);0<a.length&&(a=a[0],a.wa?(0>b&&(b=0),b>a.Ri.duration&&(b=a.Ri.duration-.1),a.Wq(b)):a.j&&(0>b&&(b=0),b>a.j.duration&&(b=a.j.duration-.1),a.j.currentTime=b))};e.prototype.Eu=function(a,b){a=this.Va(a);0<a.length&&(a=a[0],a.j&&(a.j.playbackRate=b))};e.prototype.setVolume=function(a,b){try{var c=void 0,h=Number(b);1<h&&(h=1);0>h&&(h=0);"_videopanorama"===a&&this.B.j&&(this.B.j.volume=
h);if("_main"===a){this.ba=h;for(c=0;c<this.X.length;c++)this.X[c].j.volume=this.X[c].level*this.ba;for(c=0;c<this.U.length;c++)this.U[c].j.volume=this.U[c].level*this.ba;this.B.j&&(this.B.j.volume=this.ba)}else{var m=this.Va(a);this.O(m);for(c=0;c<m.length;c++){var n=m[c];n.j&&null!=n.j.volume&&(n.j.volume=h*this.ba);n.level=h}}}catch(q){this.O(q)}};e.prototype.dr=function(a,b){try{var c=void 0,h=void 0;"_videopanorama"===a&&this.B.j&&(this.B.j.volume+=Number(b));if("_main"===a){c=this.ba;c+=Number(b);
1<c&&(c=1);0>c&&(c=0);this.ba=c;for(h=0;h<this.X.length;h++)this.X[h].j.volume=this.X[h].level*this.ba;for(h=0;h<this.U.length;h++)this.U[h].j.volume=this.U[h].level*this.ba;this.B.j&&(this.B.j.volume=this.ba)}else{var m=this.Va(a);for(h=0;h<m.length;h++){var n=m[h];c=n.level;c+=Number(b);1<c&&(c=1);0>c&&(c=0);n.level=c;n.j&&null!=n.j.volume&&(n.j.volume=c*this.ba)}}}catch(q){this.O(q)}};e.prototype.jm=function(a,b){if("_main"===a||"_all"===a||"_videopanorama"===a)"_all"===a&&(b=(this.pd=1==b||-1==
b&&!this.pd?!0:!1)?1:0),this.B.j&&(this.B.j.muted=-1==b?!this.B.j.muted:1==b);a=this.Va("_main"===a||"_all"===a?".*":a);for(var c=0;c<a.length;c++)a[c].eu(b)};e.prototype.kt=function(a){this.jm(a,1)};e.prototype.Yu=function(a){this.jm(a,0)};e.prototype.Ru=function(a){this.jm(a,-1)};e.prototype.Hr=function(){return this.Ae};e.prototype.Os=function(){this.dn=document.createElement("audio");this.dn.src="./media/testsound.mp3"};e.prototype.Qp=function(){var a=this;this.ra&&"suspended"===this.ra.state&&
this.ra.resume();var b=a.dn.play();if(void 0!==b)b.then(function(){a.Bg(!0)})["catch"](function(){a.Bg(!1)})};e.prototype.Rp=function(){this.Ae&&1!=this.wi?this.Qp():this.re=this.gf=!1};e.prototype.os=function(){return this.wi};e.prototype.Bg=function(a){if(1!=this.wi){var b=a?1:0;this.wi!=b&&(this.wi=b,this.H("soundspermittedchanged",{permitted:a}))}};e.prototype.Iu=function(){var a=this;this.gg();this.re&&setTimeout(function(){a.gg()},200)};e.prototype.Uj=function(a,b,c){a.j.style.opacity=0==b?
1:0;a.j.style[this.Zb]="opacity "+c+"ms";a.j.style.opacity=0==b?0:1};e.prototype.du=function(a,b,c){function h(){var r=m[q];if(!r.j)return"continue";0==b?(n.Uj(r,b,c),setTimeout(function(){0==r.j.style.opacity&&r.Gf(!1)},c+10),r.oc=!1):1==b?(n.Uj(r,b,c),r.Gf(!0),r.oc=!0):2==b&&("visible"==r.j.style.visibility?(n.Uj(r,0,c),setTimeout(function(){0==r.j.style.opacity&&r.Gf(!1)},c+10),r.oc=!1):(n.Uj(r,1,c),r.Gf(!0),r.oc=!0))}for(var m=this.Va(a),n=this,q=0;q<m.length;q++)h()};e.prototype.Up=function(){var a=
this;try{for(var b=this,c=!1,h=!1,m=0;m<this.X.length;m++){var n=this.X[m];if(-1!=n.loop&&!this.isPlaying(n.id)&&!n.stopped){var q=void 0;this.ra&&this.Ya.enabled&&4!=n.mode&&6!=n.mode&&!this.pd?this.Ya.vn?(n.wa?n.ne():(q=n.j.play(),n.Ld&&n.Of(),n.j.currentTime=0),n.va=0,h=!0):c=!0:4==n.mode||6==n.mode||"_background"==n.id&&this.isPlaying(n.id)||this.pd||(n.wa?n.ne():(q=n.j.play(),n.j.currentTime&&(n.j.currentTime=0)));if(void 0!==q)q.then(function(){a.Bg(!0)})["catch"](function(){a.Bg(!1)})}}c&&
setTimeout(function(){b.Ya.Lu()},1E3*this.Ya.Fb);h&&(this.Ya.Hu=this.ra.currentTime,this.Ya.Gu=setInterval(function(){b.Ya.sr()},10))}catch(r){this.O(r)}};e.prototype.Gn=function(){for(var a=0;a<this.Ya.Gi.length;a++)this.Ya.Fn(this.Ya.Gi[a])};e.prototype.qp=function(){for(var a;0<this.J.length;)a=this.J.pop(),a.j&&(this.Ia.removeChild(a.j.__div),delete a.j),a.j=null;this.K.Da=0;this.K.jb=0;this.H("hotspotsremoved",{})};e.prototype.lm=function(a){this.Mf=a;this.$.style.zIndex=0!=a?a.toString():"auto";
this.Pa&&this.Pa.ud&&(this.Pa.ud.zIndex=(a+4).toString());this.Ia.style.zIndex=(a+4).toString();this.rb.style.zIndex=(a+3).toString();this.Fa.style.zIndex=(a+5).toString();for(var b=0;b<this.nj();b++){var c=b<this.U.length?this.U[b]:this.Wa[b-this.U.length];c.j&&(c.j.style.zIndex=(a+(c.Ma?8E4:0)).toString())}};e.prototype.Sj=function(a){var b=this.isFullscreen!==a;this.isFullscreen!==a&&(this.isFullscreen=a,this.update(100));if(this.isFullscreen){if(this.jk)try{this.$.webkitRequestFullScreen?this.$.webkitRequestFullScreen():
this.$.mozRequestFullScreen?this.$.mozRequestFullScreen():this.$.msRequestFullscreen?this.$.msRequestFullscreen():this.$.requestFullScreen?this.$.requestFullScreen():this.$.requestFullscreen&&this.$.requestFullscreen()}catch(c){this.O(c)}this.$.style.position="absolute";a=this.Ch();this.$.style.left=window.pageXOffset-a.x+this.margin.left+"px";this.$.style.top=window.pageYOffset-a.y+this.margin.top+"px";this.lm(10);document.body.style.overflow="hidden";b&&(this.ua&&this.ua.ggEnterFullscreen&&this.ua.ggEnterFullscreen(),
this.H("fullscreenenter",{}),this.H("playerstatechanged",{}))}else{if(this.jk)try{document.webkitIsFullScreen?document.webkitCancelFullScreen():document.mozFullScreen?document.mozCancelFullScreen():document.msExitFullscreen?document.msExitFullscreen():document.fullScreen&&(document.cancelFullScreen?document.cancelFullScreen():document.exitFullscreen&&document.exitFullscreen())}catch(c){this.O(c)}this.$.style.position="relative";this.$.style.left="0px";this.$.style.top="0px";this.lm(0);document.body.style.overflow=
"";b&&(this.ua&&this.ua.ggExitFullscreen&&this.ua.ggExitFullscreen(),this.H("fullscreenexit",{}),this.H("playerstatechanged",{}))}this.he()};e.prototype.fk=function(){this.Sj(!this.isFullscreen)};e.prototype.qr=function(){this.Sj(!0)};e.prototype.exitFullscreen=function(){this.Sj(!1)};e.prototype.Lr=function(){return this.isFullscreen};e.prototype.$f=function(){this.Ga.ir();this.tp();this.Ga.$f();this.Ga.wt();return!0};e.prototype.us=function(){return"N/A"};e.prototype.ts=function(){if(this.Ga)return this.Ga.og()?
this.Ga.Lm:this.Ga.camera};e.prototype.vs=function(){if(this.Ga)return this.Ga.Ra};e.prototype.tu=function(a){this.Ga&&(this.Ga.hg=a)};e.prototype.ag=function(){this.Ga&&(this.Ga.ag(),this.Ga.Df(),this.Ga.Gk());return!0};e.prototype.aq=function(){this.Ga&&(this.Ga.og()?this.ag():this.$f());return!0};e.prototype.og=function(){return this.Ga&&this.Ga.og()?!0:!1};e.prototype.pf=function(){return this.Ga&&this.Ga.pf()?!0:!1};e.prototype.jl=function(){return this.Ga?this.Ga.jl():!1};e.prototype.Ju=function(a,
b,c){this.v.Nd=this.v.Qi;this.v.rd=this.v.Sg;this.v.enabled=!0;this.v.Qf=this.v.enabled;this.v.active=!0;this.v.kd=0;var h=new Date;this.v.Fd=0;this.v.startTime=h.getTime();void 0!==a&&0!=a&&(this.v.speed=a);void 0!==b&&(this.v.timeout=b);void 0!==c&&(this.v.ek=c);this.H("autorotatechanged",{})};e.prototype.Mu=function(){this.v.active=!1;this.v.enabled=!1;this.v.Qf=this.v.enabled;this.Ue=this.v.Dj=!1;this.F.active&&this.F.$h&&(this.F.active=!1,this.F.$h=!1,this.F.pb=0);this.H("autorotatechanged",
{})};e.prototype.Qu=function(){this.v.enabled=!this.v.active;this.v.Qf=this.v.enabled;this.v.active=this.v.enabled;this.v.kd=0;if(this.v.enabled){var a=new Date;this.v.Fd=0;this.v.startTime=a.getTime();this.v.Nd=this.v.Qi;this.v.rd=this.v.Sg}this.H("autorotatechanged",{})};e.prototype.It=function(){this.ma(!1)};e.prototype.Rt=function(){this.v.enabled&&(this.v.active=!0,this.v.kd=0)};e.prototype.Xt=function(a){this.v.ug=a;this.v.Xo=!0};e.prototype.Pp=function(a){this.Ea.running&&this.Ap();this.wc=
"";a&&""!=a&&(this.v.Nd=a);this.v.Qf=this.v.enabled;this.v.rd=!0;this.v.enabled=!0;this.v.active=!0;this.v.kd=0;this.D.ge&&(this.D.We=!0,this.D.ke=!0);a=new Date;this.v.Fd=0;this.v.startTime=a.getTime();this.H("autorotatechanged",{})};e.prototype.Qt=function(a){a&&""!=a&&this.v.Nd!=a||0==this.v.Fd?this.Pp(a):(this.v.rd=!0,this.v.enabled=!0,this.v.active=!0,this.H("autorotatechanged",{}))};e.prototype.Ap=function(){this.Ea.running=!1;this.Ea.finished=!0;this.v.active=this.D.ke;this.v.rd=this.D.We;
this.ya.splice(this.ya.indexOf(this.L),1);0<this.ya.length&&(this.L=this.ya[0]);this.wc="";this.Tj(!1);this.D.ke=!1;this.D.We=!1;this.qg=(new Date).getTime()};e.prototype.nn=function(a){if(this.lc=document.getElementById(a))return this.lc.innerHTML="",!0;alert("container not found!");return!1};e.prototype.Zt=function(a){var b=this;b.lc.removeEventListener("resize",function(){b.he()});b.nn(a)&&(b.lc.appendChild(b.$),b.lc.addEventListener("resize",function(){b.he()},!1))};e.prototype.un=function(a){this.nn(a)&&
(this.$=document.createElement("div"),this.$.onselectstart=function(){return!1},S&&this.$.setAttribute("id","viewport"),this.$.setAttribute("role","application"),a="top:\t0px;left: 0px;position:relative;-ms-touch-action: none;touch-action: none;text-align: left;"+(this.kb+"user-select: none;"),this.$.setAttribute("style",a),this.lc.appendChild(this.$),this.ea=document.createElement("div"),a="top:\t0px;left: 0px;width:  100px;height: 100px;overflow: hidden;position:absolute;-ms-touch-action: none;touch-action: none;"+
(this.kb+"user-select: none;"),S&&this.ea.setAttribute("id","viewer"),this.ea.setAttribute("style",a),this.$.appendChild(this.ea),this.Pa&&(this.Pa.ud=document.createElement("canvas"),S&&this.Pa.ud.setAttribute("id","lensflarecanvas"),a="top:\t0px;left: 0px;width:  100px;height: 100px;overflow: hidden;position:absolute;"+(this.kb+"user-select: none;"),a+=this.kb+"pointer-events: none;",this.Pa.ud.setAttribute("style",a),this.$.appendChild(this.Pa.ud)),this.Ia=document.createElement("div"),S&&this.Ia.setAttribute("id",
"hotspots"),a="top:\t0px;left: 0px;width:  100px;height: 100px;overflow: hidden;position:absolute;",this.xl&&(a+="background-image: url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7);"),this.Sc&&!this.na&&(a+=this.kb+"transform: translateZ(9999999px);"),a+=this.kb+"user-select: none;",this.Ia.setAttribute("style",a),this.$.appendChild(this.Ia),this.rb=document.createElement("canvas"),S&&this.rb.setAttribute("id","hotspotcanvas"),a="top:\t0px;left: 0px;width:  100px;height: 100px;overflow: hidden;position:absolute;"+
(this.kb+"user-select: none;"),a+=this.kb+"pointer-events: none;",this.rb.setAttribute("style",a),this.$.appendChild(this.rb),this.Fa=document.createElement("div"),S&&this.Fa.setAttribute("id","hotspottext"),this.Fa.setAttribute("style","top:\t0px;left: 0px;position:absolute;padding: 3px;visibility: hidden;"),this.Fa.classList.add("ggskin"),this.Fa.classList.add("ggdefaulthotspot"),this.Fa.innerHTML=" Hotspot text!",this.$.appendChild(this.Fa),this.divSkin=this.ua=this.Ia,this.lm(0))};e.prototype.Df=
function(){var a;this.ka.ha.x=0;this.ka.ha.y=0;this.sa.Df();var b=[];for(a=0;a<this.U.length;a++){var c=this.U[a];c.nd?b.push(c):c.Le()}for(a=0;a<this.Wa.length;a++)this.Wa[a].Le();for(a=0;a<this.Sb.length;a++)this.Sb[a].Le();this.K.Oh=-1;this.rb.style.visibility="hidden";this.Xd=0;this.Hf=[];this.Ya.Gi=[];for(a=0;a<this.X.length;a++)c=this.X[a],c.Wo||7>this.fd&&0==c.mode||this.Hf.push(c);this.U=b;this.Wa=[];this.Sb=[];this.B.j&&(this.$.removeChild(this.B.j),this.B.j=null,a=this.Va("_videopanorama"),
0<a.length&&(a[0].j=null));this.B.Tc=!1;this.B.pg=!1};e.prototype.oo=function(){var a=1,b=-1!=navigator.userAgent.indexOf("Mac");window.devicePixelRatio&&b&&(a=window.devicePixelRatio);return{w:screen.width*a,h:screen.height*a}};e.prototype.eo=function(){var a=this.oo();return a.w>a.h?a.w:a.h};e.prototype.Ul=function(a,b){a=(new DOMParser).parseFromString(a,"text/xml");this.lp(a,b)};e.prototype.kp=function(a,b,c){try{var h=void 0;h=new XMLHttpRequest;h.open("GET",a,!1);h.send(null);if(h.responseXML){var m=
a.lastIndexOf("/");0<=m&&(this.le=a.slice(0,m+1));2<=arguments.length&&null!=b&&(this.le=b);this.Ul(h.responseText,c)}else alert("Error loading panorama XML")}catch(n){alert("Error:"+n)}};e.prototype.Lt=function(a,b,c,h){var m=new XMLHttpRequest;var n=this;m.onload=function(q){if(4<=m.readyState)if(m.responseXML){var r=a.lastIndexOf("/");0<=r&&(n.le=a.slice(0,r+1));3<=arguments.length&&null!=c&&(n.le=c);n.Ul(m.responseText,h);b&&b()}else alert("Error loading panorama XML");else console.error("Wrong state loading XML:"+
m.statusText)};m.onerror=function(){console.error("Error loading XML:"+m.statusText)};m.open("GET",a,!0);m.send(null)};e.prototype.Ak=function(a){var b="";"{"==a.charAt(0)&&(b=a.slice(1,a.length-1));(a=this.oe[b])&&(b=a);a={oldNodeId:this.xa,nodeId:b};this.H("beforechangenodeid",a);this.ml?this.ml=!1:this.Kl.push(this.xa);""!=this.xa&&-1==this.lk.indexOf(this.xa)&&(this.lk.push(this.xa),this.H("changevisitednodes",{}));this.Ko=this.xa;this.xa=b;this.O("change active node: "+b);this.ga&&this.ga.changeActiveNode&&
this.ga.changeActiveNode("{"+b+"}");this.H("changenodeid",a);this.gf=!0};e.prototype.gj=function(){return this.xa};e.prototype.Yr=function(a){return 0<this.Za.length?(a||(a=this.xa),a=this.Za.indexOf(a),a++,a>=this.Za.length&&(a=0),this.Za[a]):""};e.prototype.ls=function(a){return 0<this.Za.length?(a||(a=this.xa),a=this.Za.indexOf(a),a--,0>a&&(a=this.Za.length-1),this.Za[a]):""};e.prototype.Qr=function(){return this.Ko};e.prototype.ps=function(){return this.ec};e.prototype.mt=function(a){return-1!=
this.lk.indexOf(a)};e.prototype.fr=function(){this.lk=[];this.H("changevisitednodes",{})};e.prototype.lp=function(a,b){a=a.firstChild;this.Te=[];this.Za=[];this.oe=[];this.Ae=!1;var c;if(c=a.getAttributeNode("appversion")){if(c=c.nodeValue.toString().match(/(\d+)\.(\d+)\.?(\d+)?/))this.qn=[parseInt(c[1],10),parseInt(c[2],10),parseInt(c[3]||"0",10)];this.O(this.qn)}for(var h=a.firstChild;h;){if("map"==h.nodeName){var m={};(c=h.getAttributeNode("index"))&&(m.index=Number(c.nodeValue));(c=h.getAttributeNode("title"))&&
(m.title=c.nodeValue.toString());c=h.getAttributeNode("type");m.type=c.nodeValue.toString();"web"==m.type?(c=h.getAttributeNode("mapprovider"),m.mapprovider=c.nodeValue.toString(),(c=h.getAttributeNode("mapstyle"))&&(m.mapstyle=c.nodeValue.toString()),(c=h.getAttributeNode("googlecustomstylecode"))&&(m.googlecustomstylecode=c.nodeValue.toString()),(c=h.getAttributeNode("mapurltemplate"))&&(m.mapurltemplate=c.nodeValue.toString()),(c=h.getAttributeNode("mapmaxzoom"))&&(m.mapmaxzoom=Number(c.nodeValue)),
(c=h.getAttributeNode("customlayernames"))&&(m.customlayernames=c.nodeValue.toString().split("|")),(c=h.getAttributeNode("customlayerurltemplates"))&&(m.customlayerurltemplates=c.nodeValue.toString().split("|")),(c=h.getAttributeNode("customlayermaxzooms"))&&(m.customlayermaxzooms=c.nodeValue.toString().split("|")),(c=h.getAttributeNode("mapkey"))&&(m.mapkey=c.nodeValue.toString()),(c=h.getAttributeNode("styleurl"))&&(m.styleurl=c.nodeValue.toString()),(c=h.getAttributeNode("mapboxlayernames"))&&
(m.mapboxlayernames=c.nodeValue.toString().split("|")),(c=h.getAttributeNode("mapboxlayerstyleurls"))&&(m.mapboxlayerstyleurls=c.nodeValue.toString().split("|")),(c=h.getAttributeNode("googlelayernames"))&&(m.googlelayernames=c.nodeValue.toString().split("|")),(c=h.getAttributeNode("googlelayerstyles"))&&(m.googlelayerstyles=c.nodeValue.toString().split("|")),(c=h.getAttributeNode("maplimits"))&&(m.maplimits=c.nodeValue.toString().split("|"))):(c=h.getAttributeNode("width"),m.width=Number(c.nodeValue),
c=h.getAttributeNode("height"),m.height=Number(c.nodeValue),c=h.getAttributeNode("zoomlevels"),m.zoomlevels=Number(c.nodeValue),c=h.getAttributeNode("tileformat"),m.tileformat=c.nodeValue.toString(),c=h.getAttributeNode("bgcolor"),m.bgcolor=c.nodeValue.toString(),c=h.getAttributeNode("crispedges"),m.crispedges=1==c.nodeValue,c=h.getAttributeNode("transparent"),m.transparent=1==c.nodeValue,c=h.getAttributeNode("floorplannorth"),m.floorplannorth=Number(c.nodeValue));c=h.getAttributeNode("id");this.rc[c.nodeValue.toString()]=
m}h=h.nextSibling}if("tour"==a.nodeName){this.sf=!0;if(c=a.getAttributeNode("start"))this.ec=c.nodeValue.toString();this.hasOwnProperty("startNode")&&this.startNode&&(this.ec=String(this.startNode),this.startNode="");this.hasOwnProperty("startView")&&this.startView&&("object"===typeof this.startView&&null!==this.startView?b=this.startView:""!=this.startView&&(b=String(this.startView)),this.startView="");h=a.firstChild;for(a=m="";h;){if("panorama"==h.nodeName){if(c=h.getAttributeNode("id"))m=c.nodeValue.toString(),
""==this.ec&&(this.ec=m),""==a&&(a=m),this.Te[m]=h,this.Za.push(m);for(c=h.firstChild;c;){if("userdata"==c.nodeName){var n=this.cg(c);this.Ug[m]=n;m==this.ec&&(this.Ug._first=n);n.customnodeid&&(this.oe[n.customnodeid]=m);this.Vc[m]=this.Cn(c);this.sg[m]=this.Dn(c);this.Kf[m]=this.En(c)}if("hotspots"==c.nodeName)for(n=c.firstChild;n;)"hotspot"!=n.nodeName&&"polyhotspot"!=n.nodeName||this.Uk(m,c),n=n.nextSibling;if("sounds"==c.nodeName||"media"==c.nodeName)for(n=c.firstChild;n;){"sound"!=n.nodeName||
this.Jl||(this.Ae=!0);if("video"==n.nodeName){var q;(q=n.getAttributeNode("level"))&&0<Number(q.nodeValue)&&(this.Ae=!0)}n=n.nextSibling}c=c.nextSibling}}if("masternode"==h.nodeName)for(c=h.firstChild;c;){"userdata"==c.nodeName&&(n=this.cg(c),this.Ug._master=n);"animationsequences"==c.nodeName&&this.rr(c);if("translations"==c.nodeName){(q=c.getAttributeNode("json"))&&this.Oi(q.nodeValue.toString());for(n=c.firstChild;n;){"json"==n.nodeName&&this.Oi(n.textContent);if("projecttranslation"==n.nodeName){var r=
{};if(q=n.getAttributeNode("langcode"))r.langCode=q.nodeValue;if(q=n.getAttributeNode("langname"))r.langName=q.nodeValue;this.Ql.push(r)}n=n.nextSibling}this.Bl||this.im(window.navigator.language)}c=c.nextSibling}"customproperty"==h.nodeName&&this.Bn(h);h=h.nextSibling}!this.Te.hasOwnProperty(this.ec)&&(h=this.oe[this.ec])&&(this.ec=h);this.Te.hasOwnProperty(this.ec)||(this.Uc("Start node "+this.ec+" not found!"),this.ec=a);this.Tl(this.Te[this.ec],b);this.Ak("{"+this.ec+"}");this.xa=this.ec}else this.sf=
!1,this.Tl(a,b),this.Ak(""),this.Za.push("");this.ie&&(this.O("add pano vr config"),this.Ga.Ni());this.Ae&&(this.Os(),this.Qp());this.H("configloaded",{});this.H("changenode",{});this.H("playerstatechanged",{})};e.prototype.Tl=function(a,b){var c=this;this.qp();this.Pa&&this.Pa.Nt();this.Ne(this.lb);this.Df();for(var h=a.firstChild,m,n,q=0,r=this.N.M;h;){if("view"==h.nodeName){if(m=h.getAttributeNode("fovmode"))this.fov.mode=Number(m.nodeValue);m=h.getAttributeNode("pannorth");this.pan.bi=1*(m?m.nodeValue:
0);for(var t=h.firstChild;t;){"start"==t.nodeName&&(m=t.getAttributeNode("pan"),this.pan.m=Number(m?m.nodeValue:0),this.pan.Ha=this.pan.m,m=t.getAttributeNode("tilt"),this.u.m=Number(m?m.nodeValue:0),this.u.Ha=this.u.m,m=t.getAttributeNode("roll"),this.W.m=Number(m?m.nodeValue:0),this.W.Ha=this.W.m,m=t.getAttributeNode("fov"),this.fov.m=Number(m?m.nodeValue:70),this.fov.Ha=this.fov.m,m=t.getAttributeNode("projection"),this.N.cp=Number(m?m.nodeValue:4),this.qb(this.Bh()));"min"==t.nodeName&&(m=t.getAttributeNode("pan"),
this.pan.min=1*(m?m.nodeValue:0),m=t.getAttributeNode("tilt"),this.u.min=1*(m?m.nodeValue:-90),m=t.getAttributeNode("fov"),this.fov.min=1*(m?m.nodeValue:5),1E-20>this.fov.min&&(this.fov.min=1E-20),m=t.getAttributeNode("fovpixel"),this.fov.Yh=1*(m?m.nodeValue:0));if("max"==t.nodeName){m=t.getAttributeNode("pan");this.pan.max=1*(m?m.nodeValue:0);m=t.getAttributeNode("tilt");this.u.max=1*(m?m.nodeValue:90);m=t.getAttributeNode("fov");this.fov.max=1*(m?m.nodeValue:120);180<=this.fov.max&&(this.fov.max=
179.9);if(m=t.getAttributeNode("fovstereographic"))this.fov.Il=1*m.nodeValue;if(m=t.getAttributeNode("fovfisheye"))this.fov.Hl=1*m.nodeValue;if(m=t.getAttributeNode("scaletofit"))this.I.yp=1==m.nodeValue}if("flyin"==t.nodeName){if(m=t.getAttributeNode("projection"))this.nc.pb=Number(m.nodeValue);if(m=t.getAttributeNode("pan"))this.nc.pan=parseFloat(m.nodeValue);if(m=t.getAttributeNode("tilt"))this.nc.u=parseFloat(m.nodeValue);if(m=t.getAttributeNode("fov"))this.nc.fov=parseFloat(m.nodeValue)}t=t.nextSibling}}if("autorotate"==
h.nodeName){if(m=h.getAttributeNode("speed"))this.v.speed=1*m.nodeValue;if(m=h.getAttributeNode("delay"))this.v.timeout=1*m.nodeValue;if(m=h.getAttributeNode("returntohorizon"))this.v.ek=1*m.nodeValue;if(m=h.getAttributeNode("horizonfromdefview"))this.v.wo=1==m.nodeValue;if(m=h.getAttributeNode("nodedelay"))this.v.Gj=1*m.nodeValue;if(m=h.getAttributeNode("noderandom"))this.v.Yo=1==m.nodeValue;(m=h.getAttributeNode("nodefilter"))&&!this.v.Xo&&(this.v.ug=m.nodeValue);this.Qd&&(this.v.enabled=!0,this.v.Qf=
!0,this.v.active=!1);(m=h.getAttributeNode("startloaded"))&&this.Qd&&(this.v.Eg=1==m.nodeValue,this.v.Eg&&(this.v.active=!1));if(m=h.getAttributeNode("useanimation"))this.v.Sg=1==m.nodeValue,this.v.rd=this.v.Sg;if(m=h.getAttributeNode("syncanimationwithvideo"))this.v.um=1==m.nodeValue}if("animation"==h.nodeName){if(m=h.getAttributeNode("syncanimationwithvideo"))this.v.um=1==m.nodeValue;if(m=h.getAttributeNode("useinautorotation"))this.v.Sg=1==m.nodeValue;if(m=h.getAttributeNode("animsequence"))this.v.Qi=
m.nodeValue,this.Qd&&(this.v.Nd=this.v.Qi);if(m=h.getAttributeNode("clipsrandom"))this.v.pn=1==m.nodeValue;this.ya=[];for(t=h.firstChild;t;){if("clip"==t.nodeName){this.L=new y.Rm;if(m=t.getAttributeNode("animtitle"))this.L.Ve=m.nodeValue.toString();if(m=t.getAttributeNode("cliptitle"))this.L.cb=m.nodeValue.toString();if(m=t.getAttributeNode("nodeid"))this.L.yv=m.nodeValue.toString();if(m=t.getAttributeNode("length"))this.L.length=Number(m.nodeValue);if(m=t.getAttributeNode("animtype"))this.L.Pq=
Number(m.nodeValue);if(m=t.getAttributeNode("nextcliptitle"))this.L.Vo=m.nodeValue.toString();if(m=t.getAttributeNode("nextclipnodeid"))this.L.Uo=m.nodeValue.toString();if(m=t.getAttributeNode("nextclipstartview"))this.L.lt=m.nodeValue.toString();if(m=t.getAttributeNode("transitiontype"))this.L.Xu=Number(m.nodeValue);var x=t.firstChild;for(this.L.qa=[];x;){if("keyframe"==x.nodeName){var z=new y.ed;if(m=x.getAttributeNode("time"))z.time=Number(m.nodeValue);if(m=x.getAttributeNode("value"))z.value=
Number(m.nodeValue);if(m=x.getAttributeNode("valuestring"))z.Jm=m.nodeValue.toString();if(m=x.getAttributeNode("transitiontime"))z.Fb=Number(m.nodeValue);m=x.getAttributeNode("type");var C=0;m&&(z.type=Number(m.nodeValue),C=Number(m.nodeValue));if(m=x.getAttributeNode("property"))z.hb=Number(m.nodeValue);if(m=x.getAttributeNode("additionaltrackid"))z.sd=m.nodeValue.toString();if(m=x.getAttributeNode("additionaltracktype"))z.Xm=Number(m.nodeValue);if(1==C||2==C){if(m=x.getAttributeNode("bezierintime"))z.Xe=
Number(m.nodeValue);if(m=x.getAttributeNode("bezierinvalue"))z.Ye=Number(m.nodeValue);if(m=x.getAttributeNode("bezierouttime"))z.Ze=Number(m.nodeValue);if(m=x.getAttributeNode("bezieroutvalue"))z.$e=Number(m.nodeValue)}this.L.qa.push(z)}x=x.nextSibling}this.ya.push(this.L);"__VideoPano"==this.L.cb&&(this.Km=this.L)}t=t.nextSibling}}"input"==h.nodeName&&(n||(n=h));if(n)for(x=0;6>x;x++)m=n.getAttributeNode("prev"+x+"url"),this.lh[x]=m?String(m.nodeValue):"";"altinput"==h.nodeName&&(t=0,(m=h.getAttributeNode("screensize"))&&
(t=1*m.nodeValue),0<t&&t<=this.eo()&&t>q&&(q=t,n=h));if("control"==h.nodeName&&this.Qd){if(m=h.getAttributeNode("simulatemass"))this.ka.enabled=1==m.nodeValue;if(m=h.getAttributeNode("rubberband"))this.I.xp=1==m.nodeValue;if(m=h.getAttributeNode("zoomcentercursor"))this.I.Nf=1==m.nodeValue;if(m=h.getAttributeNode("locked"))this.I.qc=1==m.nodeValue;m&&(this.I.Uh=1==m.nodeValue);if(m=h.getAttributeNode("lockedmouse"))this.I.qc=1==m.nodeValue;if(m=h.getAttributeNode("lockedkeyboard"))this.I.Uh=1==m.nodeValue;
if(m=h.getAttributeNode("lockedkeyboardzoom"))this.I.Xs=1==m.nodeValue;if(m=h.getAttributeNode("lockedwheel"))this.I.Ee=1==m.nodeValue;if(m=h.getAttributeNode("invertwheel"))this.I.Ao=1==m.nodeValue;if(m=h.getAttributeNode("speedwheel"))this.I.qm=1*m.nodeValue;if(m=h.getAttributeNode("invertcontrol"))this.I.Ud=1==m.nodeValue;if(m=h.getAttributeNode("sensitivity"))this.I.sensitivity=1*m.nodeValue,1>this.I.sensitivity&&(this.I.sensitivity=1);if(m=h.getAttributeNode("dblclickfullscreen"))this.I.Pk=1==
m.nodeValue;if(m=h.getAttributeNode("contextfullscreen"))this.I.ih=1==m.nodeValue;if(m=h.getAttributeNode("contextvr"))this.I.jh=1==m.nodeValue;if(m=h.getAttributeNode("contextprojections"))this.I.Xi=1==m.nodeValue;if(m=h.getAttributeNode("hideabout"))this.I.mg=1==m.nodeValue;for(t=h.firstChild;t;)"menulink"==t.nodeName&&(x={text:"",url:""},m=t.getAttributeNode("text"),x.text=m.nodeValue,m=t.getAttributeNode("url"),x.url=m.nodeValue,this.Xh.push(x)),t=t.nextSibling}if("transition"==h.nodeName&&this.Qd){if(m=
h.getAttributeNode("enabled"))this.D.enabled=1==m.nodeValue;if(m=h.getAttributeNode("blendtime"))this.D.dh=1*m.nodeValue;if(m=h.getAttributeNode("blendcolor"))this.D.Rf=m.nodeValue.toString();if(m=h.getAttributeNode("type"))this.D.type=m.nodeValue.toString();if(m=h.getAttributeNode("delay"))this.D.delay=m.nodeValue.toString();if(m=h.getAttributeNode("softedge"))this.D.Yc=1*m.nodeValue;if(m=h.getAttributeNode("zoomin"))this.D.da=1*m.nodeValue;if(m=h.getAttributeNode("zoomout"))this.D.dd=1*m.nodeValue;
if(m=h.getAttributeNode("zoomfov"))this.D.rk=1*m.nodeValue;if(m=h.getAttributeNode("zoomafterinfov"))this.D.pk=1*m.nodeValue;if(m=h.getAttributeNode("zoomafteroutfov"))this.D.qk=1*m.nodeValue;if(m=h.getAttributeNode("zoomspeed"))this.D.Yg=1*m.nodeValue;if(m=h.getAttributeNode("zoomoutpause"))this.D.Xg=1==m.nodeValue;"cut"==this.D.type&&(this.D.dh=0)}if("soundstransition"==h.nodeName){if(m=h.getAttributeNode("enabled"))this.Ya.enabled=1==m.nodeValue;if(m=h.getAttributeNode("transitiontime"))this.Ya.Fb=
1*m.nodeValue;if(m=h.getAttributeNode("crossfade"))this.Ya.vn=1==m.nodeValue}if("flyintransition"==h.nodeName){if(m=h.getAttributeNode("enabled"))this.Ea.enabled=1==m.nodeValue&&this.na;if(m=h.getAttributeNode("speed"))this.Ea.speed=1*m.nodeValue}"userdata"==h.nodeName&&(this.userdata=this.Tg=this.cg(h),this.Vc[a.id]||(this.Vc[a.id]=this.Cn(h),this.sg[a.id]=this.Dn(h),this.Kf[a.id]=this.En(h)));"projectuserdata"==h.nodeName&&(this.Ug._master=this.cg(h));"customproperty"==h.nodeName&&this.Bn(h);if("translations"==
h.nodeName)for((m=h.getAttributeNode("json"))&&this.Oi(m.nodeValue.toString()),this.Bl||this.im(window.navigator.language),t=h.firstChild;t;){if("projecttranslation"==t.nodeName){x={};if(m=t.getAttributeNode("langcode"))x.langCode=m.nodeValue;if(m=t.getAttributeNode("langname"))x.langName=m.nodeValue;this.Ql.push(x)}t=t.nextSibling}if("hotspots"==h.nodeName){if(m=h.getAttributeNode("smoothmovement"))this.Np=1==m.nodeValue;for(t=h.firstChild;t;){if("label"==t.nodeName&&this.Qd){x=this.K.ck;if(m=t.getAttributeNode("enabled"))x.enabled=
1==m.nodeValue;if(m=t.getAttributeNode("width"))x.width=1*m.nodeValue;if(m=t.getAttributeNode("height"))x.height=1*m.nodeValue;if(m=t.getAttributeNode("textcolor"))x.dk=1*m.nodeValue;if(m=t.getAttributeNode("textalpha"))x.bk=1*m.nodeValue;if(m=t.getAttributeNode("background"))x.background=1==m.nodeValue;if(m=t.getAttributeNode("backgroundalpha"))x.Tb=1*m.nodeValue;if(m=t.getAttributeNode("backgroundcolor"))x.Ub=1*m.nodeValue;if(m=t.getAttributeNode("border"))x.Si=1*m.nodeValue;if(m=t.getAttributeNode("bordercolor"))x.Wb=
1*m.nodeValue;if(m=t.getAttributeNode("borderalpha"))x.Vb=1*m.nodeValue;if(m=t.getAttributeNode("borderradius"))x.xk=1*m.nodeValue;if(m=t.getAttributeNode("wordwrap"))x.nk=1==m.nodeValue}if("polystyle"==t.nodeName&&this.Qd){if(m=t.getAttributeNode("mode"))this.K.mode=1*m.nodeValue;if(m=t.getAttributeNode("bordercolor"))this.K.Wb=1*m.nodeValue;if(m=t.getAttributeNode("backgroundcolor"))this.K.Ub=1*m.nodeValue;if(m=t.getAttributeNode("borderalpha"))this.K.Vb=1*m.nodeValue;if(m=t.getAttributeNode("backgroundalpha"))this.K.Tb=
1*m.nodeValue;if(m=t.getAttributeNode("handcursor"))this.K.ze=1==m.nodeValue}m=void 0;"hotspot"==t.nodeName&&(m=new y.Mi(this),m.type="point",m.xb(t),this.J.push(m),this.Uk(a.id,t));"polyhotspot"==t.nodeName&&(m=new y.Mi(this),m.type="poly",m.xb(t),this.J.push(m),this.Uk(a.id,t));t=t.nextSibling}}if("sounds"==h.nodeName||"media"==h.nodeName)for(t=h.firstChild;t;){if("sound"==t.nodeName&&!this.Jl)for(this.Ae=!0,m=new y.Eq(this),m.xb(t),m.addElement(),x=0;x<this.Hf.length;x++)m.id==this.Hf[x].id&&(this.Hf.splice(x,
1),x--);"video"==t.nodeName&&(m=new y.Vm(this),m.xb(t),m.addElement(),0<m.level&&(this.Ae=!0));"image"==t.nodeName&&(m=new y.Cq(this),m.xb(t),m.addElement());"webelement"==t.nodeName&&(m=new y.Fq(this),m.xb(t),m.addElement());"lensflare"==t.nodeName&&this.Pa&&(m=new y.Dq(this),m.xb(t),this.Pa.Th.push(m));t=t.nextSibling}h=h.nextSibling}for(x=this.v.Fd=0;x<this.Hf.length;x++){a=this.Hf[x];if(this.ra&&this.Ya.enabled&&this.isPlaying(a.id))this.Ya.Gi.push(a);else{try{a.wa?a.Tf():a.j.pause()}catch(E){this.O(E)}a.Le()}this.X.splice(this.X.indexOf(a),
1)}1!=this.D.da&&2!=this.D.da&&6!=this.D.da&&7!=this.D.da&&this.Gn();this.ie||(this.nb.oi=!0);b&&("object"===typeof b&&null!==b?(b.hasOwnProperty("pan")&&this.ae(Number(b.pan)),b.hasOwnProperty("tilt")&&this.be(Number(b.tilt)),b.hasOwnProperty("projection")&&this.qb(Number(b.projection)),b.hasOwnProperty("fov")&&this.zb(Number(b.fov))):""!=b&&(b=b.toString().split("/"),4<b.length&&this.qb(Number(b[4])),0<b.length&&(m=String(b[0]),"N"==m.charAt(0)?this.Vj(Number(m.substr(1))):"S"==m.charAt(0)?this.Vj(-180+
Number(m.substr(1))):this.ae(Number(m))),1<b.length&&this.be(Number(b[1])),2<b.length&&this.zb(Number(b[2]))),this.pan.open=this.pan.m,this.Ea.zd.pan=this.pan.m,this.Ea.zd.u=this.u.m,this.Ea.zd.fov=this.fov.m,this.Ea.zd.pb=this.Z(),this.Ea.zd.kq=!0);if(n){m=n.getAttributeNode("stereo");this.Ed=!1;m&&1==m.nodeValue&&(this.Ed=!0);m=n.getAttributeNode("fliplr");this.Fg=!1;m&&1==m.nodeValue&&(this.Fg=!0);for(x=0;x<(this.Ed?12:6);x++)(m=n.getAttributeNode("tile"+x+"url"))&&(this.kh[x]=String(m.nodeValue));
for(x=0;6>x;x++)(m=n.getAttributeNode("prev"+x+"url"))&&(this.lh[x]=String(m.nodeValue));if(m=n.getAttributeNode("tilevrurl"))this.Lk=String(m.nodeValue);if(m=n.getAttributeNode("tilesize"))this.Re=1*m.nodeValue;m=n.getAttributeNode("canvassize");if(m=n.getAttributeNode("tilescale"))this.Kg=1*m.nodeValue;if(m=n.getAttributeNode("leveltileurl"))r.Fl=m.nodeValue;if(m=n.getAttributeNode("leveltilesize"))r.V=Number(m.nodeValue);if(m=n.getAttributeNode("levelbias"))r.Oo=Number(m.nodeValue);if(m=n.getAttributeNode("levelbiashidpi"))r.Po=
Number(m.nodeValue);m=n.getAttributeNode("overlap");this.Xa.W=0;this.Xa.pitch=0;m&&(r.gb=Number(m.nodeValue));if(m=n.getAttributeNode("levelingroll"))this.Xa.W=Number(m.nodeValue);if(m=n.getAttributeNode("levelingpitch"))this.Xa.pitch=Number(m.nodeValue);this.Xd=0;(m=n.getAttributeNode("flat"))&&1==m.nodeValue&&(this.Xd=2);m=n.getAttributeNode("width");r.width=1*(m?m.nodeValue:1);m=n.getAttributeNode("height");r.height=1*(m?m.nodeValue:r.width);this.B.src=[];r.levels=[];for(t=n.firstChild;t;){if("preview"==
t.nodeName){if(m=t.getAttributeNode("color"))r.Lj=m.nodeValue;if(m=t.getAttributeNode("strip"))r.jp=1==m.nodeValue}if("video"==t.nodeName){if(m=t.getAttributeNode("format"))"3x2"==m.nodeValue&&(this.B.format=14),"equirectangular"==m.nodeValue&&(this.B.format=1);if(m=t.getAttributeNode("flipy"))this.B.flipY=Number(m.nodeValue);if(m=t.getAttributeNode("startonload"))this.B.Yj=1==m.nodeValue;if(m=t.getAttributeNode("startmutedmobile"))this.B.rm=1==m.nodeValue;if(m=t.getAttributeNode("bleed"))this.B.af=
Number(m.nodeValue);if(m=t.getAttributeNode("endaction"))this.B.qe=String(m.nodeValue);if(m=t.getAttributeNode("targetview"))this.B.ak=String(m.nodeValue);if(m=t.getAttributeNode("width"))this.B.width=Number(m.nodeValue);if(m=t.getAttributeNode("height"))this.B.height=Number(m.nodeValue);for(x=t.firstChild;x;)"source"==x.nodeName&&(m=x.getAttributeNode("url"))&&this.B.src.push(m.nodeValue.toString()),x=x.nextSibling}if("level"==t.nodeName){n=new y.Um;m=t.getAttributeNode("width");n.width=1*(m?m.nodeValue:
1);m=t.getAttributeNode("height");n.height=1*(m?m.nodeValue:n.width);if(m=t.getAttributeNode("preload"))n.cache=1==m.nodeValue;if(m=t.getAttributeNode("preview"))n.Cf=1==m.nodeValue;n.Y=Math.floor((n.width+r.V-1)/r.V);n.ta=Math.floor((n.height+r.V-1)/r.V);r.levels.push(n)}t=t.nextSibling}r.El=r.levels.length}this.nf=!0;this.Pg&&(this.na=this.Og=!1,this.Fc||(this.O("dummy rendering"),this.Fc=document.createElement("canvas"),this.Fc.width=100,this.Fc.height=100,this.Fc.id="dummycanvas",this.ea.appendChild(this.Fc)),
this.fc());this.na&&this.R&&(this.sa.yo(this.Kg),this.sa.zo());var F=this;0<r.levels.length&&r.jp&&0==this.Xd&&(b=new Image,n=new y.Um,n.Cf=!0,n.cache=!0,n.Y=n.ta=0,n.height=n.width=0,r.levels.push(n),b.crossOrigin=this.crossOrigin,b.onload=this.sa.jt(b),b.setAttribute("src",this.N.Jg(6,r.El-1,0,0)));if(0<this.B.src.length&&this.na)if(this.Ii){this.B.j=document.createElement("video");this.B.j.crossOrigin=this.crossOrigin;this.B.j.setAttribute("style","display:none; max-width:none;");this.B.j.setAttribute("playsinline",
"playsinline");this.B.j.preload=!0;this.B.j.volume=this.ba;this.$.appendChild(this.B.j);this.B.Tc=!1;this.B.ym=!1;this.B.j.oncanplay=function(){if(!F.B.Tc){F.B.pg=!0;var E,D,A=[],G=new y.Ta,J=F.R,H=F.B.j.videoWidth/3;F.B.width=F.B.j.videoWidth;F.B.height=F.B.j.videoHeight;for(E=0;6>E;E++){var I=E%3*H+F.B.af;var M=I+H-2*F.B.af;var K=4;3>E&&(K+=H);var O=K+H-2*F.B.af;for(D=0;4>D;D++){G.x=-1;G.y=-1;G.z=1;for(var R=0;R<D;R++)G.wp();A.push((0<G.x?I:M)/(3*H),(0<G.y?O:K)/(2*H))}}J.bindBuffer(J.ARRAY_BUFFER,
F.B.Ci);J.bufferData(J.ARRAY_BUFFER,new Float32Array(A),J.STATIC_DRAW);F.D.Zc&&"videopano"==F.D.delay&&F.Zj(null)}};this.B.sb=function(){var E=F.Va("_videopanorama");return 0<E.length&&E[0].sb?E[0].sb:0};this.B.cm=function(E){var D=F.Va("_videopanorama");0<D.length&&(D[0].sb=E)};this.B.loop=function(){return 0<F.B.sb()?(F.B.cm(F.B.sb()-1),F.B.j.play(),!0):!1};"exit"==this.B.qe?this.B.j.onended=function(){F.B.pg=!1;F.B.Tc=!1;F.$.removeChild(F.B.j);F.B.j=null;F.update()}:"stop"==this.B.qe?F.B.j.onended=
function(){F.B.loop()||F.update()}:"{"==this.B.qe.charAt(0)?this.B.j.onended=function(){F.od(F.B.qe,F.B.ak)}:this.B.j.loop=!0;for(x=0;x<this.B.src.length;x++)r=document.createElement("source"),r.setAttribute("src",this.fb(this.B.src[x])),this.B.j.appendChild(r);r=this.Va("_videopanorama");0<r.length?r[0].j=this.B.j:this.mp("_videopanorama",this.B.j);if(this.B.Yj&&(r=this.B.j.play(),void 0!==r))r.then(function(){})["catch"](function(){c.B.rm&&(c.B.j.muted=!0,c.B.j.play())})}else"{"==this.B.qe.charAt(0)&&
F.od(F.B.qe,F.B.ak);this.Wm();this.D.Jd||this.Up();this.update();this.Qd&&(this.Qd=!1,this.H("viewerinit",{}),this.ua&&this.ua.ggViewerInit&&this.ua.ggViewerInit(),this.Ea.enabled&&0==this.Xd&&this.na&&(this.qb(9),this.pan.m=this.nc.pan,this.u.m=this.nc.u,this.fov.m=this.nc.fov,this.qb(this.nc.pb),this.L=this.Zk(!1),this.pan.m=this.L.qa[0].value,this.u.m=this.L.qa[1].value,this.fov.m=this.L.qa[2].value,3==this.L.qa[3].hb&&this.qb(this.L.qa[3].value),this.wc=this.L.cb,this.Tj(!0),this.v.active=!1,
this.v.wh=!0));this.fc()};e.prototype.Ll=function(a,b){0<a.length&&(".xml"==a.slice(-4)||".swf"==a.slice(-4)||"{"==a.charAt(0)?this.od(this.fb(a),b):window.open(this.fb(a),b))};e.prototype.Ku=function(){this.nf=this.isLoaded=!1;this.checkLoaded=this.vd=[];this.fi=0;this.ua&&this.ua.ggReLoaded&&this.ua.ggReLoaded();this.H("beforechangenode",{})};e.prototype.Fs=function(a){var b="";0<this.Kl.length&&(b=this.Kl.pop());""!=b&&(this.ml=!0);this.od("{"+b+"}",a)};e.prototype.od=function(a,b){if(""!=a&&"{}"!=
a){this.Ku();this.se&&!this.Pg&&(this.Rc(0),this.fc());this.ga&&this.ga.hotspotProxyOut&&this.ga.hotspotProxyOut(this.S.id,this.S.url);this.H("hsproxyout",{id:this.S.id,url:this.S.url});".swf"==a.substr(a.length-4)&&(a=a.substr(0,a.length-4)+".xml");var c="",h=null;"object"===typeof b&&null!==b?h=b:b&&(c=b.toString());b="/"+this.u.m+"/"+this.fov.m+"//"+this.Z();c=c.replace("$cur",this.pan.m+b);c=c.replace("$(cur)",this.pan.m+b);c=c.replace("$fwd","N"+this.ue()+b);c=c.replace("$(fwd)","N"+this.ue()+
b);c=c.replace("$bwd","S"+this.ue()+b);c=c.replace("$(bwd)","S"+this.ue()+b);c=c.replace("$ap",String(this.pan.m));c=c.replace("$(ap)",String(this.pan.m));c=c.replace("$an",String(this.ue()));c=c.replace("$(an)",String(this.ue()));c=c.replace("$at",String(this.u.m));c=c.replace("$(at)",String(this.u.m));c=c.replace("$af",String(this.fov.m));c=c.replace("$(af)",String(this.fov.m));c=c.replace("$ar",String(this.Z()));c=c.replace("$(ar)",String(this.Z()));""!=c&&(b=c.split("/"),3<b.length&&""!=b[3]&&
(this.startNode=b[3]));h=null!==h?h:c;this.ma(!1);if("{"==a.charAt(0)){b=a.substr(1,a.length-2);if(this.xa==b&&this.fh){this.nf=this.isLoaded=!0;return}(c=this.oe[b])&&(b=c);c=this.D;var m=this.R;if(this.Te[b]){this.fh=!0;if(this.D.enabled&&this.na&&this.D.Bc){c.Kp=!0;c.ge||c.Jd||c.Zc||this.Tj(!0);var n=void 0;"wipeleftright"==c.type?n=1:"wiperightleft"==c.type?n=2:"wipetopbottom"==c.type?n=3:"wipebottomtop"==c.type?n=4:"wiperandom"==c.type&&(n=Math.ceil(4*Math.random()));c.Ok=n;m.bindFramebuffer(m.FRAMEBUFFER,
c.Bc);m.viewport(0,0,c.Bc.width,c.Bc.height);m.clear(m.COLOR_BUFFER_BIT|m.DEPTH_BUFFER_BIT);c.Fi=!0;this.Hi();c.Fi=!1;m.bindFramebuffer(m.FRAMEBUFFER,null);m.viewport(0,0,this.Ab.width,this.Ab.height);m=new Date;this.S!=this.lb&&6!=c.da?7==c.da?(c.Vg=this.S.cc/this.C.width,c.Wg=.5):(c.Vg=this.S.cc/this.C.width,c.Wg=1-this.S.Pb/this.C.height):(c.Vg=.5,c.Wg=.5);if(1==c.da||2==c.da||6==c.da||7==c.da)c.tq=m.getTime()+100,c.Jd=!0,c.Gb=Math.sin(this.Cd()/2*Math.PI/180)/Math.sin(c.rk/2*Math.PI/180),c.Gb=
Math.max(c.Gb,1),c.sq=1/c.Yg*c.Gb*.3}this.Tl(this.Te[b],h);this.Ak(a);if(c.enabled&&this.na&&(this.fq(null),0!=c.dd)){c.vm=this.lf();c.wm=this.ig();c.Bi=this.Cd();c.de=this.Z();if(1==c.dd||3==c.dd)this.zb(c.qk);else if(2==c.dd)this.zb(c.pk);else if(4==c.dd){for(h=a=0;h<this.ya.length;h++)this.ya[h].cb&&0==this.ya[h].cb.indexOf("__FlyIn")&&(a=this.ya[h]);0!=a?(this.qb(this.jj(3,a).value),this.ae(this.jj(0,a).value),this.be(this.jj(1,a).value),this.zb(this.jj(2,a).value)):(this.qb(this.nc.pb),this.ae(this.nc.pan),
this.be(this.nc.u),this.zb(this.nc.fov))}c.Xg||1==c.da||2==c.da||6==c.da||7==c.da||this.sm()}c.Kp=!1;this.ie&&(this.O("add pano opennext"),this.Ga.Ni());this.D.Jd||this.D.ge||this.D.Zc||(this.fa&&this.Kk(),this.fh=!1)}else{this.Uc("invalid node id: "+b);return}}else this.kp(a,null,h);this.H("changenode",{});this.update(5)}};e.prototype.ho=function(){return this.nf?this.sf?this.Za.slice(0):[""]:[]};e.prototype.cg=function(a){var b;var c={title:"",description:"",author:"",datetime:"",copyright:"",source:"",
information:"",comment:"",latitude:0,longitude:0,altitude:-1E4,heading:0,customnodeid:"",streetviewlink:"",tags:[]};if(a&&((b=a.getAttributeNode("title"))&&(c.title=b.nodeValue.toString()),(b=a.getAttributeNode("description"))&&(c.description=b.nodeValue.toString()),(b=a.getAttributeNode("author"))&&(c.author=b.nodeValue.toString()),(b=a.getAttributeNode("datetime"))&&(c.datetime=b.nodeValue.toString()),(b=a.getAttributeNode("copyright"))&&(c.copyright=b.nodeValue.toString()),(b=a.getAttributeNode("source"))&&
(c.source=b.nodeValue.toString()),(b=a.getAttributeNode("info"))&&(c.information=b.nodeValue.toString()),(b=a.getAttributeNode("comment"))&&(c.comment=b.nodeValue.toString()),(b=a.getAttributeNode("latitude"))&&(c.latitude=Number(b.nodeValue)),(b=a.getAttributeNode("longitude"))&&(c.longitude=Number(b.nodeValue)),(b=a.getAttributeNode("nodeid"))&&(c.nodeid=b.nodeValue.toString()),(b=a.getAttributeNode("altitude"))&&(c.altitude=Number(b.nodeValue)),(b=a.getAttributeNode("heading"))&&(c.heading=Number(b.nodeValue)),
(b=a.getAttributeNode("customnodeid"))&&(c.customnodeid=b.nodeValue.toString()),(b=a.getAttributeNode("streetviewlink"))&&(c.streetviewlink=b.nodeValue.toString()),b=a.getAttributeNode("tags"))){a=b.nodeValue.toString().split("|");for(b=0;b<a.length;b++)""==a[b]&&(a.splice(b,1),b--);c.tags=a}return c};e.prototype.rr=function(a){for(var b="",c=a.firstChild;c;){if("sequence"==c.nodeName){if(a=c.getAttributeNode("title"))b=a.nodeValue;for(var h=[],m=c.firstChild;m;){if("sequenceelement"==m.nodeName){var n=
{};if(a=m.getAttributeNode("index"))n.index=a.nodeValue;if(a=m.getAttributeNode("nodeid"))n.nodeid=a.nodeValue;if(a=m.getAttributeNode("cliptitle"))n.cliptitle=a.nodeValue;if(a=m.getAttributeNode("startview"))n.startview=a.nodeValue;h.push(n)}m=m.nextSibling}this.an[b]=h}c=c.nextSibling}};e.prototype.Cn=function(a){for(var b={},c=a.firstChild;c;){if("mapcoords"==c.nodeName){var h={x:0,y:0};a=c.getAttributeNode("x");h.x=Number(a.nodeValue);a=c.getAttributeNode("y");h.y=Number(a.nodeValue);a=c.getAttributeNode("mapid");
b[a.nodeValue.toString()]=h}c=c.nextSibling}return b};e.prototype.Dn=function(a){for(var b={},c=a.firstChild;c;){if("mapcoords"==c.nodeName){var h={x:0,y:0};a=c.getAttributeNode("x_floorplan_percent");h.x=Number(a.nodeValue);a=c.getAttributeNode("y_floorplan_percent");h.y=Number(a.nodeValue);a=c.getAttributeNode("mapid");b[a.nodeValue.toString()]=h}c=c.nextSibling}return b};e.prototype.En=function(a){for(var b={},c=a.firstChild;c;){if("custompropertyvalue"==c.nodeName){a=c.getAttributeNode("value");
var h=a.nodeValue.toString();a=c.getAttributeNode("variablename");b[a.nodeValue.toString()]=h}c=c.nextSibling}return b};e.prototype.Uk=function(a,b){var c,h="";(c=b.getAttributeNode("id"))&&(h=c.nodeValue.toString());if(!this.ob.hasOwnProperty(a)||!this.ob[a].hasOwnProperty(h)){var m={};for(b=b.firstChild;b;){if("custompropertyvalue"==b.nodeName){c=b.getAttributeNode("variablename");var n=c.nodeValue;c=b.getAttributeNode("value");m[n]=c.nodeValue}b=b.nextSibling}this.ob[a]||(this.ob[a]={});this.ob[a][h]=
m}};e.prototype.Bn=function(a){var b=a.getAttributeNode("variablename"),c=b.nodeValue.toString();b=a.getAttributeNode("variabletype");var h=Number(b.nodeValue);b=a.getAttributeNode("propertytype");var m=Number(b.nodeValue);b=a.getAttributeNode("defaultvalue");this.Ua[c]={Lf:h,li:m,Rk:b.nodeValue.toString()}};e.prototype.Ah=function(a){return a?this.Ug[a]?this.Ug[a]:this.cg():this.Tg};e.prototype.io=function(a,b){""==a&&(a="node1");return this.Kf.hasOwnProperty(a)&&this.Kf[a].hasOwnProperty(b)?y.ic.$k(this.Kf[a][b],
this.Ua[b].Lf):null};e.prototype.Gp=function(a,b,c){c="string"===typeof c?c:y.ic.Xn(c,this.Ua[b].Lf);this.Kf[a][b]!=c&&(this.Kf[a][b]=c,this.H("varchanged_"+b,{}))};e.prototype.fl=function(a){a=this.Ah(a);var b=[];""!=a.latitude&&0!=a.latitude&&0!=a.longitude&&(b.push(a.latitude),b.push(a.longitude));return b};e.prototype.jo=function(a){for(var b=[],c=0;c<this.Za.length;c++){var h=this.Za[c],m=this.Ah(h);m&&m.tags.includes(a)&&b.push(h)}return b};e.prototype.cs=function(a){return this.Ah(a).title};
e.prototype.Zr=function(a,b){var c=-1;a=this.fl(a);b=this.fl(b);if(2==a.length&&2==b.length){c=Math.PI/180*(b[0]-a[0]);var h=Math.PI/180*(b[1]-a[1]);a=Math.sin(c/2)*Math.sin(c/2)+Math.sin(h/2)*Math.sin(h/2)*Math.cos(Math.PI/180*a[0])*Math.cos(Math.PI/180*b[0]);c=12742E3*Math.atan2(Math.sqrt(a),Math.sqrt(1-a))}return c};e.prototype.kf=function(a,b,c){var h;for(h=0;h<this.L.qa.length;h++){var m=this.L.qa[h];if(m.time==a&&m.hb==b&&(!c||m.sd==c))return m}return!1};e.prototype.jj=function(a,b){var c;for(c=
0;c<b.qa.length;c++)if(0==b.qa[c].time&&b.qa[c].hb==a)return b.qa[c];return!1};e.prototype.lo=function(a,b,c){for(a=Math.floor(a);!this.kf(a,b,c)&&0<a;)a--;return a};e.prototype.fo=function(a){var b,c=1E5,h=a,m=!1;for(b=0;b<this.L.qa.length;b++){var n=this.L.qa[b];n.hb==a.hb&&n.sd==a.sd&&n.time>a.time&&n.time<c&&(h=this.L.qa[b],c=h.time,m=!0)}return m?h:!1};e.prototype.yr=function(a){for(var b=[],c=0;c<this.L.qa.length;c++){var h=this.L.qa[c];if(h.time<=a&&4==h.hb){for(var m=!1,n=0;n<b.length;n++)if(b[n].sd==
this.L.qa[c].sd){b[n].time<h.time?b.splice(n,1):m=!0;break}m||b.push(h)}}return b};e.prototype.Tn=function(a,b,c){var h=new y.Mc(a.time,a.value),m=new y.Mc(b.time,b.value),n=(c-a.time)/(b.time-a.time);if(0!=a.type||0!=b.type&&3!=b.type)if(3==a.type)c=a.value;else{n=new y.Mc;var q=new y.Mc,r=b.time-a.time;0==a.type?q.init(a.time+.3*r,a.value):q.init(a.Ze,a.$e);0==b.type||3==b.type?n.init(b.time-.3*r,b.value):n.init(b.Xe,b.Ye);a=new y.Mc;a.wk(h,m,q,n,c);c=a.y}else a=new y.Mc,a.Td(h,m,n),c=a.y;return c};
e.prototype.Zk=function(a,b,c,h){for(var m=0;m<this.ya.length;m++)if(this.ya[m].cb&&0==this.ya[m].cb.indexOf("__FlyIn"))return this.ya[m];m=new y.Qm;m.cb="__FlyIn";m.Qe=this.pan.m;m.zi=this.u.m;m.ce=this.fov.m;m.yi=this.Z();m.de=this.Bh();a?(m.Zf=!1,m.ef=!1,m.speed=this.D.Yg,m.Id=b,m.ee=c,m.Ig=h):(m.Zf=!0,m.ef=!0,m.speed=this.Ea.speed,this.Ea.zd.kq?(m.Id=this.Ea.zd.pan,m.ee=this.Ea.zd.u,m.Ig=this.Ea.zd.fov,m.de=this.Ea.zd.pb):(m.Id=this.pan.Ha,m.ee=this.u.Ha,m.Ig=this.fov.Ha));return this.Qn(m)};
e.prototype.Qn=function(a){var b=new y.Rm;b.cb=a.cb;b.Ve="";b.qa=[];for(var c=a.yi!=a.de&&-1!=a.de;-180>a.Id;)a.Id+=360;for(;180<a.Id;)a.Id-=360;var h=a.Id-a.Qe;if(360==this.pan.max-this.pan.min){for(;-180>h;)h+=360;for(;180<h;)h-=360}var m=a.ee-a.zi,n=a.Ig-a.ce,q=Math.round(Math.sqrt(h*h+m*m+n*n)/a.speed*.33);c&&(q=Math.max(10,q));b.length=q;if(a.ff){var r=Math.ceil(.7*q);r=Math.min(15,r);r=Math.max(5,r);b.length=q+r;var t=.33*r}var x=a.Ig,z=q,C=0,F=q-1;if(c){var E=a.ce;var D=4==a.de?120:this.zh(a.de);
n=x-a.ce;var A=new y.Mc(0,a.ce),G=new y.Mc(q,x),J=new y.Mc,H=new y.Mc;H.init(q/3,a.ce+n/3);J.init(2*q/3,x-n/3);if(E>D)for(;C<=q&&E>D;)E=new y.Mc,E.wk(A,G,H,J,C),E=E.y,C++;else C=1;C>=.8*q&&(z=C=Math.round(.8*q));0==C&&(C=1);D=4==a.yi?120:this.zh(a.yi);E=a.Ig;if(E>D)for(;F>C&&E>D;)E=new y.Mc,E.wk(A,G,H,J,F),E=E.y,F--}A=new y.ed;A.time=0;A.hb=0;A.value=a.Qe;A.type=1;A.Ze=q/3;A.$e=a.Zf?a.Qe:a.Qe+h/3;b.qa.push(A);A=new y.ed;A.time=0;A.hb=1;A.value=a.zi;A.type=1;A.Ze=q/3;A.$e=a.Zf?a.zi:a.zi+m/3;b.qa.push(A);
A=new y.ed;A.time=0;A.hb=2;A.value=a.ce;A.type=1;A.Ze=q/3;A.$e=a.Zf?a.ce:a.ce+n/3;b.qa.push(A);A=new y.ed;A.time=0;A.hb=3;A.value=a.yi;A.type=0;A.Fb=0;b.qa.push(A);c&&(A=new y.ed,A.time=C,A.hb=3,A.value=a.de,A.type=0,A.Fb=F-C,b.qa.push(A));A=new y.ed;A.time=q;A.hb=0;A.value=a.Qe+h;A.type=1;A.Xe=2*q/3;A.Ye=a.ef&&!a.ff?A.value:A.value-h/3;a.ff&&(A.Ze=q+t,A.$e=A.value+t/q*h);b.qa.push(A);A=new y.ed;A.time=q;A.hb=1;A.value=a.ee;A.type=1;A.Xe=2*q/3;A.Ye=a.ef&&!a.ff?a.ee:a.ee-m/3;a.ff&&(A.Ze=q+t,A.$e=A.value+
t/q*m);b.qa.push(A);A=new y.ed;A.time=z;A.hb=2;A.value=x;A.type=1;A.Xe=2*z/3;A.Ye=a.ef?x:x-n/3;b.qa.push(A);a.ff&&(A=new y.ed,A.time=q+r,A.hb=0,A.value=a.Qe+h,A.type=1,A.Xe=q+r-t,A.Ye=a.Qe+h,b.qa.push(A),A=new y.ed,A.time=q+r,A.hb=1,A.value=a.ee,A.type=1,A.Xe=q+r-t,A.Ye=a.ee,b.qa.push(A));this.ya.push(b);return b};e.prototype.kv=function(){this.B.j&&this.B.j.play()};e.prototype.lv=function(){this.B.j&&(this.B.j.pause(),this.B.j.currentTime=0)};e.prototype.jv=function(){this.B.j&&this.B.j.pause()};
e.prototype.wu=function(a){this.B.j&&(0>a&&(a=0),a>this.B.j.duration&&(a=this.B.j.duration-.1),this.B.j.currentTime=a,this.update())};e.prototype.xs=function(){return this.B.j?this.B.j.currentTime:0};e.prototype.ws=function(){if(this.B.j)return this.B.j};e.prototype.vu=function(a){if(this.B.j){var b=!this.B.j.paused&&!this.B.j.ended,c=this.B.j.currentTime;this.B.j.pause();this.B.j.src=isNaN(parseInt(a,10))?String(a):this.B.src[parseInt(a,10)];b&&(this.B.j.onloadedmetadata=function(){this.currentTime=
c;this.play();this.onloadedmetadata=null});this.B.j.currentTime=c}};e.prototype.nr=function(){this.Jl=!0};e.prototype.hs=function(){var a={};a.currentNode=this.gj();a.position={pan:this.pan.m,tilt:this.u.m,fov:this.fov.m,projection:this.Z()};for(var b=a.variables={},c=0,h=Object.keys(this.dc);c<h.length;c++){var m=h[c];this.dc[m].xo||"undefined"!==this.kl(m)&&((b[m]={}).value=this.kl(m))}b=a.hsprops={};c=0;for(h=Object.keys(this.ob);c<h.length;c++){m=h[c];for(var n=b[m]={},q=0,r=Object.keys(this.ob[m]);q<
r.length;q++)for(var t=r[q],x=n[t]={},z=0,C=Object.keys(this.ob[m][t]);z<C.length;z++){var F=C[z];x[F]=this.cl(m,t,F)}}b=a.polyhotspots=[];for(c=0;c<this.J.length;c++)"poly"==this.J[c].type&&(h=this.J[c],m={},m.id=h.id,m.bordercolor=h.Wb,m.borderalpha=h.Vb,m.backgroundcolor=h.Ub,m.backgroundalpha=h.Tb,b.push(m));return a};e.prototype.fu=function(a){if(a.hasOwnProperty("position")){var b=a.position;this.pan.m=b.pan;this.u.m=b.tilt;this.fov.m=b.fov;this.qb(b.projection)}b=0;for(var c=Object.keys(a.variables);b<
c.length;b++){var h=c[b];this.Oe(h,a.variables[h].value)}b=0;for(c=Object.keys(a.hsprops);b<c.length;b++){h=c[b];for(var m=a.hsprops[h],n=0,q=Object.keys(m);n<q.length;n++)for(var r=q[n],t=m[r],x=0,z=Object.keys(t);x<z.length;x++){var C=z[x];this.hm(h,r,C,t[C])}}for(b=0;b<a.polyhotspots.length;b++)for(c=a.polyhotspots[b],h=0;h<this.J.length;h++)"poly"==this.J[h].type&&this.J[h].id==c.id&&(this.J[h].Wb=c.bordercolor,this.J[h].Vb=c.borderalpha,this.J[h].Tb=c.backgroundalpha,this.J[h].Ub=c.backgroundcolor);
return this.tb=!0};return e}();y.ic=f})(ggP2VR||(ggP2VR={}));window.ggHasHtml5Css3D=ma;window.ggHasWebGL=na;window.pano2vrPlayer=ggP2VR.ic;var Z=ggP2VR.ic.prototype;Z._=Z.ab;Z.setContainer=Z.Zt;Z.setLanguage=Z.im;Z.getLanguage=Z.Or;Z.addTranslations=Z.Oi;Z.getProjectTranslations=Z.ms;Z.getVersion=Z.qo;Z.readConfigString=Z.Ul;Z.readConfigUrl=Z.kp;Z.readConfigUrlAsync=Z.Lt;Z.readConfigXml=Z.lp;Z.openUrl=Z.Ll;Z.openNext=Z.od;Z.goBack=Z.Fs;Z.setMargins=Z.cu;Z.addListener=Z.addListener;Z.on=Z.addListener;
Z.removeEventListener=Z.removeEventListener;Z.off=Z.removeEventListener;Z.detectBrowser=Z.An;Z.initWebGL=Z.Rc;Z.getPercentLoaded=Z.gs;Z.setBasePath=Z.Yt;Z.getBasePath=Z.Vn;Z.setViewerSize=Z.Jp;Z.getViewerSize=Z.As;Z.updateViewerSizeNow=Z.fc;Z.setSkinObject=Z.pu;Z.changeViewMode=Z.br;Z.getViewMode=Z.ys;Z.changePolygonMode=Z.ln;Z.setPolygonMode=Z.ln;Z.getPolygonMode=Z.ks;Z.showOnePolyHotspot=Z.Lp;Z.hideOnePolyHotspot=Z.uo;Z.changePolyHotspotColor=Z.ar;Z.setPolyHotspotHandcursor=Z.gu;
Z.toggleOnePolyHotspot=Z.Su;Z.changeViewState=Z.cr;Z.getViewState=Z.zs;Z.setRenderFlags=Z.iu;Z.getRenderFlags=Z.ns;Z.setMaxTileCount=Z.Fp;Z.updatePanorama=Z.Hi;Z.isTouching=Z.Go;Z.getIsMobile=Z.el;Z.setIsMobile=Z.bu;Z.getHasTouch=Z.Zn;Z.getIsTour=Z.Nr;Z.getNodesCount=Z.ds;Z.getIsAutorotating=Z.Kr;Z.getIsLoading=Z.Mr;Z.getIsLoaded=Z.ij;Z.getIsTileLoading=Z.ao;Z.getLastActivity=Z.Pr;Z.getPan=Z.lf;Z.getPanNorth=Z.ue;Z.getPanDest=Z.fs;Z.getPanN=Z.hl;Z.setPan=Z.ae;Z.setPanNorth=Z.Vj;Z.changePan=Z.Ui;
Z.changePanLog=Z.kn;Z.getTilt=Z.ig;Z.getTiltDest=Z.rs;Z.setTilt=Z.be;Z.changeTilt=Z.Vi;Z.changeTiltLog=Z.mn;Z.getFov=Z.Cd;Z.getFovDest=Z.Fr;Z.setFov=Z.zb;Z.setFovMode=Z.fm;Z.changeFov=Z.Bk;Z.changeFovLog=Z.Ti;Z.getVFov=Z.Mb;Z.setVFov=Z.ui;Z.getHFov=Z.bl;Z.setHFov=Z.gm;Z.getDFov=Z.al;Z.setDFov=Z.dm;Z.getRoll=Z.mj;Z.setRoll=Z.Ag;Z.setPanTilt=Z.km;Z.setPanTiltFov=Z.zg;Z.setDefaultView=Z.zp;Z.setLocked=Z.setLocked;Z.setLockedMouse=Z.Dp;Z.setLockedKeyboard=Z.Cp;Z.getLockedKeyboard=Z.Rr;
Z.setLockedWheel=Z.Ep;Z.moveTo=Z.moveTo;Z.moveToEx=Z.Ej;Z.moveToDefaultView=Z.ft;Z.moveToDefaultViewEx=Z.gt;Z.addHotspotElements=Z.Wm;Z.playSound=Z.Yd;Z.playPauseSound=Z.hp;Z.playStopSound=Z.Jt;Z.pauseSound=Z.ei;Z.activateSound=Z.Iq;Z.soundGetTime=Z.Du;Z.soundSetTime=Z.Fu;Z.soundSetPlaybackRate=Z.Eu;Z.setMediaVisibility=Z.du;Z.isPlaying=Z.isPlaying;Z.stopSound=Z.$j;Z.setVolume=Z.setVolume;Z.changeVolume=Z.dr;Z.mute=Z.kt;Z.unmute=Z.Yu;Z.toggleMuted=Z.Ru;Z.getHasSounds=Z.Hr;Z.getSoundsPermitted=Z.os;
Z.startAutoplayMedia=Z.Iu;Z.removeHotspots=Z.qp;Z.getHotspotsVisible=Z.$n;Z.getHotspotPropValue=Z.cl;Z.setHotspotPropValue=Z.hm;Z.getCustomPropertyDefaultValue=Z.Dr;Z.getCurrentPerspective=Z.jf;Z.addHotspot=Z.Kq;Z.updateHotspot=Z.$u;Z.removeHotspot=Z.Mt;Z.setActiveHotspot=Z.Ne;Z.getPointHotspotIds=Z.js;Z.getHotspot=Z.Ir;Z.setFullscreen=Z.Sj;Z.toggleFullscreen=Z.fk;Z.enterFullscreen=Z.qr;Z.exitFullscreen=Z.exitFullscreen;Z.getIsFullscreen=Z.Lr;Z.startAutorotate=Z.Ju;Z.stopAutorotate=Z.Mu;
Z.toggleAutorotate=Z.Qu;Z.pauseAutorotate=Z.It;Z.resumeAutorotate=Z.Rt;Z.setAutorotateNodeFilter=Z.Xt;Z.startAnimation=Z.Pp;Z.resumeAnimation=Z.Qt;Z.createLayers=Z.un;Z.removePanorama=Z.Df;Z.getScreenResolution=Z.oo;Z.getMaxScreenResolution=Z.eo;Z.getNodeIds=Z.ho;Z.getNodeUserdata=Z.Ah;Z.getNodeUserdataPropValue=Z.io;Z.setNodeUserdataPropValue=Z.Gp;Z.getNodeLatLng=Z.fl;Z.getNodeTitle=Z.cs;Z.getNodeDistance=Z.Zr;Z.getCurrentNode=Z.gj;Z.getNextNode=Z.Yr;Z.getPrevNode=Z.ls;Z.getLastVisitedNode=Z.Qr;
Z.getStartNode=Z.ps;Z.getNodesWithTag=Z.jo;Z.getCurrentPointHotspots=Z.Cr;Z.getPositionAngles=Z.kj;Z.getPositionRawAngles=Z.ko;Z.nodeVisited=Z.mt;Z.clearVisitedNodes=Z.fr;Z.setElementIdPrefix=Z.$t;Z.videoPanoPlay=Z.kv;Z.videoPanoStop=Z.lv;Z.videoPanoPause=Z.jv;Z.getVideoPanoTime=Z.xs;Z.setVideoPanoTime=Z.wu;Z.getVideoPanoObject=Z.ws;Z.setVideoPanoSource=Z.vu;Z.getMediaObject=Z.Wr;Z.getMediaBufferSourceObject=Z.Vr;Z.registerVideoElement=Z.mp;Z.disableSoundLoading=Z.nr;Z.setCrossOrigin=Z.setCrossOrigin;
Z.setProjection=Z.qb;Z.getProjection=Z.Z;Z.changeProjection=Z.Ck;Z.changeProjectionEx=Z.Ck;Z.changeLensflares=Z.$q;Z.setTransition=Z.ru;Z.getMapType=Z.Ur;Z.getMapDetails=Z.Tr;Z.getNodeMapCoords=Z.$r;Z.getNodeMapCoordsInPercent=Z.bs;Z.getMapContainingNode=Z.Sr;Z.getMapsContainingNode=Z.co;Z.getMapIDs=Z.bo;Z.getFloorplanIDs=Z.Er;Z.getFirstMap=Z.Yn;Z.getFirstFloorplan=Z.hj;Z.hasMap=Z.Ls;Z.hasFloorplan=Z.Ks;Z.addVariable=Z.Nq;Z.setVariableOptions=Z.Ip;Z.setVariableValue=Z.Oe;Z.getVariableValue=Z.kl;
Z.setSuperCookie=Z.qu;Z.getGyroAvailable=Z.Gr;Z.setUseGyro=Z.su;Z.getUseGyro=Z.ss;Z.getOS=Z.es;Z.getBrowser=Z.Ar;Z.getBrowserTheme=Z.Br;Z.triggerEvent=Z.H;Z.requestRedraw=Z.Ot;Z.getWebGlContext=Z.Bs;Z.getHasTouch=Z.Zn;Z.updateViewerSizeNow=Z.fc;Z.getApiVersion=Z.zr;Z.setApiVersion=Z.Wt;Z.getInertia=Z.Jr;Z.setInertia=Z.au;Z.getZoomCenterCursor=Z.Cs;Z.setZoomCenterCursor=Z.xu;Z.getPlayerState=Z.hs;Z.setPlayerState=Z.fu;Z.getQueryParameter=Z.getQueryParameter;Z.setQueryParameter=Z.hu;Z.enterVR=Z.$f;
Z.exitVR=Z.ag;Z.toggleVR=Z.aq;Z.isInVR=Z.og;Z.hasVR=Z.pf;Z.getVRDisplayName=Z.us;Z.getVRCamera=Z.ts;Z.getVRRenderer=Z.vs;Z.setVRFrameBufferScaleFactor=Z.tu;Z.getSkinGroup=Z.jl;
