-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpano2vr_player.js
More file actions
523 lines (522 loc) · 261 KB
/
pano2vr_player.js
File metadata and controls
523 lines (522 loc) · 261 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
//////////////////////////////////////////////////////////////////////
// Pano2VR 6.1.0/17841 HTML5/CSS3 & WebGL Panorama Player //
// EDU License: Secondary School №30 //
// (c) 2019, Garden Gnome Software, http://ggnome.com //
//////////////////////////////////////////////////////////////////////
var jh="function"==typeof Object.defineProperties?Object.defineProperty:function(r,n,m){r!=Array.prototype&&r!=Object.prototype&&(r[n]=m.value)},lh="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this;function mh(r,n){if(n){var m=lh;r=r.split(".");for(var d=0;d<r.length-1;d++){var c=r[d];c in m||(m[c]={});m=m[c]}r=r[r.length-1];d=m[r];n=n(d);n!=d&&null!=n&&jh(m,r,{configurable:!0,writable:!0,value:n})}}var sh;
if("function"==typeof Object.setPrototypeOf)sh=Object.setPrototypeOf;else{var th;a:{var uh={a:!0},vh={};try{vh.__proto__=uh;th=vh.a;break a}catch(r){}th=!1}sh=th?function(r,n){r.__proto__=n;if(r.__proto__!==n)throw new TypeError(r+" is not extensible");return r}:null}var wh=sh;mh("Object.setPrototypeOf",function(r){return r||wh});
mh("Array.prototype.fill",function(r){return r?r:function(n,m,d){var c=this.length||0;0>m&&(m=Math.max(0,c+m));if(null==d||d>c)d=c;d=Number(d);0>d&&(d=Math.max(0,c+d));for(m=Number(m||0);m<d;m++)this[m]=n;return this}});function xh(r){var n=0;return function(){return n<r.length?{done:!1,value:r[n++]}:{done:!0}}}function yh(){yh=function(){};lh.Symbol||(lh.Symbol=zh)}function Ah(r,n){this.fo=r;jh(this,"description",{configurable:!0,writable:!0,value:n})}Ah.prototype.toString=function(){return this.fo};
var zh=function(){function r(m){if(this instanceof r)throw new TypeError("Symbol is not a constructor");return new Ah("jscomp_symbol_"+(m||"")+"_"+n++,m)}var n=0;return r}();function Bh(){yh();var r=lh.Symbol.iterator;r||(r=lh.Symbol.iterator=lh.Symbol("Symbol.iterator"));"function"!=typeof Array.prototype[r]&&jh(Array.prototype,r,{configurable:!0,writable:!0,value:function(){return Ch(xh(this))}});Bh=function(){}}
function Ch(r){Bh();r={next:r};r[lh.Symbol.iterator]=function(){return this};return r}function Dh(r,n){Bh();r instanceof String&&(r+="");var m=0,d={next:function(){if(m<r.length){var c=m++;return{value:n(c,r[c]),done:!1}}d.next=function(){return{done:!0,value:void 0}};return d.next()}};d[Symbol.iterator]=function(){return d};return d}mh("Array.prototype.keys",function(r){return r?r:function(){return Dh(this,function(n){return n})}});
mh("Object.is",function(r){return r?r:function(n,m){return n===m?0!==n||1/n===1/m:n!==n&&m!==m}});mh("Array.prototype.includes",function(r){return r?r:function(n,m){var d=this;d instanceof String&&(d=String(d));var c=d.length;m=m||0;for(0>m&&(m=Math.max(m+c,0));m<c;m++){var a=d[m];if(a===n||Object.is(a,n))return!0}return!1}});
mh("String.prototype.includes",function(r){return r?r:function(n,m){if(null==this)throw new TypeError("The 'this' value for String.prototype.includes must not be null or undefined");if(n instanceof RegExp)throw new TypeError("First argument to String.prototype.includes must not be a regular expression");return-1!==(this+"").indexOf(n,m||0)}});
var __extends=this&&this.__extends||function(){function r(n,m){r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,c){d.__proto__=c}||function(d,c){for(var a in c)c.hasOwnProperty(a)&&(d[a]=c[a])};return r(n,m)}return function(n,m){function d(){this.constructor=n}r(n,m);n.prototype=null===m?Object.create(m):(d.prototype=m.prototype,new d)}}();
function Eh(){var r="perspective",n=["Webkit","Moz","O","ms","Ms"],m;for(m=0;m<n.length;m++)"undefined"!==typeof document.documentElement.style[n[m]+"Perspective"]&&(r=n[m]+"Perspective");"undefined"!==typeof document.documentElement.style[r]?"webkitPerspective"in document.documentElement.style?(r=document.createElement("style"),n=document.createElement("div"),m=document.head||document.getElementsByTagName("head")[0],r.textContent="@media (-webkit-transform-3d) {#ggswhtml5{height:5px}}",m.appendChild(r),
n.id="ggswhtml5",document.documentElement.appendChild(n),m=5===n.offsetHeight,r.parentNode.removeChild(r),n.parentNode.removeChild(n)):m=!0:m=!1;return m}function Fh(){var r;if(r=!!window.WebGLRenderingContext)try{var n=document.createElement("canvas");n.width=100;n.height=100;var m=n.getContext("webgl");m||(m=n.getContext("experimental-webgl"));r=!!m}catch(d){r=!1}return r}var ggP2VR;
(function(r){var n=function(){function d(c){this.u=null;this.Ig=this.lm=this.nb=!1;this.ob=!0;this.jb=this.Ka=this.Ga=0;this.fov=70;this.gb=0;this.autoplay=this.Ng=!1;this.id="";this.A=this.pan=0;this.u=c;this.Wc=this.vc=100;this.Ec=1}d.prototype.Xb=function(c){var a;if(a=c.getAttributeNode("id"))this.id=a.nodeValue.toString();if(a=c.getAttributeNode("pan"))this.pan=Number(a.nodeValue);if(a=c.getAttributeNode("tilt"))this.A=Number(a.nodeValue)};d.prototype.Sn=function(c){var a="",b=this.u,e=!0;if(b.oi){var f=
new r.Ha(0,0,-100);f.Ga(-this.A*Math.PI/180);f.Ka(this.pan*Math.PI/180);f.Ka(-b.pan.m*Math.PI/180);f.Ga(b.A.m*Math.PI/180);f.jb(b.V.m*Math.PI/180);.01<=f.z&&(e=!1)}b.Kc&&(a+="perspective("+c+"px) ");a=a+("translate3d(0px,0px,"+c+"px) ")+("rotateZ("+b.V.m.toFixed(10)+"deg) ");a+="rotateX("+b.A.m.toFixed(10)+"deg) ";a+="rotateY("+(-b.pan.m).toFixed(10)+"deg) ";a+="rotateY("+this.pan.toFixed(10)+"deg) ";a+="rotateX("+(-this.A).toFixed(10)+"deg) ";c=1E4;f=this.j.videoWidth;var g=this.j.videoHeight;if(0==
f||0==g)f=640,g=480;0<this.vc&&(f=this.vc);0<this.Wc&&(g=this.Wc);0<f&&0<g&&(this.j.width=f,this.j.height=g,this.j.style.width=f+"px",this.j.style.height=g+"px");0<this.fov&&(c=f/(2*Math.tan(this.fov/2*Math.PI/180)));a+="translate3d(0px,0px,"+(-c).toFixed(10)+"px) ";a+="rotateZ("+this.jb.toFixed(10)+"deg) ";a+="rotateY("+(-this.Ka).toFixed(10)+"deg) ";a+="rotateX("+this.Ga.toFixed(10)+"deg) ";this.Ec&&1!=this.Ec&&(a+="scaleY("+this.Ec+") ");a+="translate3d("+-f/2+"px,"+-g/2+"px,0px) ";this.j.style[b.Va+
"Origin"]="0% 0%";this.nb&&(a="",1==this.gb&&(a+="scale("+Math.min(b.D.width/f,b.D.height/g)+") "),a+="translate3d("+-f/2+"px,"+-g/2+"px,0px) ");this.Yp!=a&&(this.Yp=a,this.j.style[b.Va]=a,this.j.style.visibility=e&&this.ob?"visible":"hidden",this.Ig&&this.lm==this.nb&&(this.j.style[b.Tc]="all 0s linear 0s"),this.lm=this.nb)};d.prototype.Wf=function(c){this.j&&(this.j.style.visibility=c?"visible":"hidden")};d.prototype.df=function(){var c=this.u;c.ia?(this.j.style.left=c.D.width/2+"px",this.j.style.top=
c.D.height/2+"px"):(this.j.style.left=c.margin.left+c.D.width/2+"px",this.j.style.top=c.margin.top+c.D.height/2+"px")};return d}();r.ts=n;var m=function(d){function c(a){a=d.call(this,a)||this;a.va=!1;a.En=!1;a.Qm=!1;a.$f=!1;a.Nj=!1;a.tk=!1;a.se=!1;a.ec=null;a.Rh=null;a.uh=0;a.Re=0;a.Nf=!1;a.Sq=!1;a.stopped=!1;a.url=[];a.loop=0;a.level=1;a.rc=0;a.mode=1;a.$h=10;a.zb=0;a.Zf=0;a.ua=1;a.dd=0;a.Oc=0;a.Pc=0;a.ed=0;a.Fi=-1;return a}__extends(c,d);c.prototype.Pk=function(){var a=this,b=a.j.play();if(void 0!==
b)b.then(function(){a.Nh()})["catch"](function(){a.j.pause();a.En&&(a.j.muted=!0,a.j.play())})};c.prototype.An=function(){this.va&&this.stopped?this.stopped=!1:0==this.loop?this.va?(this.ec=null,this.Vd()):this.j.play():0<this.kd?(this.kd--,this.va||(this.j.currentTime=0),this.Nj&&(this.Dc&&0==this.Dc.gain.value||0==this.Ob.gain.value&&0==this.Rb.gain.value&&0==this.Pb.gain.value&&0==this.Qb.gain.value)||(this.va?(this.ec=null,this.Vd()):this.j.play())):this.va&&(this.ec=null,this.Nf=!1)};c.prototype.Nh=
function(){this.se=!1;var a=this.u.Aa;a&&(this.va||(this.source=a.createMediaElementSource(this.j)),2==this.mode||3==this.mode||5==this.mode?(this.Ad=a.createChannelSplitter(2),this.Ob=a.createGain(),this.Pb=a.createGain(),this.Qb=a.createGain(),this.Rb=a.createGain(),this.og=a.createChannelMerger(2),this.va||this.source.connect(this.Ad),this.Ad.connect(this.Ob,0),this.Ad.connect(this.Pb,0),this.Ad.connect(this.Qb,1),this.Ad.connect(this.Rb,1),this.Ob.connect(this.og,0,0),this.Pb.connect(this.og,
0,1),this.Qb.connect(this.og,0,0),this.Rb.connect(this.og,0,1),this.og.connect(a.destination),1==this.Fi&&this.Gn()):(this.Dc=a.createGain(),this.va||this.source.connect(this.Dc),this.Dc.connect(a.destination)))};c.prototype.Gn=function(){1!=this.Fi||this.se||!this.Ad||2!=this.mode&&3!=this.mode&&5!=this.mode||(this.Ad.connect(this.Qb,0),this.Ad.connect(this.Rb,0))};c.prototype.rh=function(){var a=this.u.Aa;this.nb||this.tk||(this.Ob.gain.setValueAtTime(this.dd,a.currentTime),this.Rb.gain.setValueAtTime(this.ed,
a.currentTime),this.Pb.gain.setValueAtTime(this.Oc,a.currentTime),this.Qb.gain.setValueAtTime(this.Pc,a.currentTime))};c.prototype.ij=function(){if(!this.se||4==this.mode||6==this.mode){var a=this.u,b=this.u.Aa;if(this.j||this.va){var e,f=this.pan-a.pan.m;for(e=this.A-a.A.m;-180>f;)f+=360;for(;180<f;)f-=360;var g=this.rc,h=this.$h;0==h&&(h=.01);0>h&&(h=a.fov.m);this.$b||(this.$b=new r.Ha,this.$b.Kl(this.pan,this.A));0!=this.mode&&1!=this.mode||!b||this.Dc&&this.Dc.gain.setValueAtTime(this.level*a.ca*
this.ua,b.currentTime);if(2==this.mode&&b){var l=.5*Math.cos(f*Math.PI/180)+.5;this.dd=Math.sqrt(l)*this.ua*this.level*a.ca;this.ed=Math.sqrt(l)*this.ua*this.level*a.ca;this.Oc=Math.sqrt(1-l)*this.ua*this.level*a.ca;this.Pc=Math.sqrt(1-l)*this.ua*this.level*a.ca;this.rh()}if(3==this.mode){f=0>f?f<-this.zb?f+this.zb:0:f>this.zb?f-this.zb:0;var k=this.level;e=Math.abs(e);e=e<this.Zf?0:e-this.Zf;var q=1-e/h;if(Math.abs(f)>h||0>q)l=k*g*a.ca,b?(this.dd=l*this.ua,this.ed=l*this.ua,this.Pc=this.Oc=0,this.rh()):
this.j.volume=k*g*a.ca;else if(l=1-Math.abs(f/h),b){var p=k*(g+(1-g)*q*l)*a.ca;l=k*g*a.ca;0<=f?(this.dd=p*this.ua,this.ed=l*this.ua):(this.dd=l*this.ua,this.ed=p*this.ua);2*Math.abs(f)<h?(l=1-Math.abs(2*f)/h,p=k*(g+(1-g)*q*l)*a.ca,l=.5*k*(1-g)*q*(1-l)*a.ca,0<=f?(this.ed=p*this.ua,this.Pc=l*this.ua,this.Oc=0):(this.dd=p*this.ua,this.Oc=l*this.ua,this.Pc=0)):(l=1-(Math.abs(2*f)-h)/h,p=.5*k*(1-g)*q*l*a.ca,0<=f?(this.Pc=p*this.ua,this.Oc=0):(this.Oc=p*this.ua,this.Pc=0));this.rh()}else this.j.volume=
k*(g+(1-g)*q*l)*a.ca}4==this.mode&&(Math.abs(f)<this.zb&&Math.abs(e)<this.Zf?this.$f||(this.$f=!0,this.kd=this.loop-1,a.uf||(this.j.play(),this.se&&this.Nh())):this.$f=!1);5==this.mode&&(e=180*Math.acos(a.Fj.Ji(this.$b))/Math.PI,e<this.zb?b?(this.dd=this.level*a.ca*this.ua,this.ed=this.level*a.ca*this.ua,this.Pc=this.Oc=0,this.rh()):this.j.volume=this.level*a.ca:b?(e<this.zb+h?(f=0>f?f>-this.zb?0:f+this.zb:f<this.zb?0:f-this.zb,p=1-Math.max(e-this.zb,0)/h,l=Math.max(1-Math.abs(f)*Math.cos(this.A*
Math.PI/180)/h,0),0<f?(this.dd=this.level*(p*(1-this.rc)+this.rc)*a.ca*this.ua,this.ed=this.level*(p*l*(1-this.rc)+this.rc)*a.ca*this.ua,this.Oc=0,this.Pc=this.level*p*(1-l)*a.ca*this.ua):(this.dd=this.level*(p*l*(1-this.rc)+this.rc)*a.ca*this.ua,this.ed=this.level*(p*(1-this.rc)+this.rc)*a.ca*this.ua,this.Oc=this.level*p*(1-l)*a.ca*this.ua,this.Pc=0)):(p=this.level*this.rc*a.ca,this.dd=p*this.ua,this.ed=p*this.ua,this.Pc=this.Oc=0),this.rh()):(e-=this.zb,e<h&&0<h?(l=1-Math.abs(e/h),this.j.volume=
this.level*(g+(1-g)*l)*a.ca):this.j.volume=g*a.ca));6==this.mode&&(e=180*Math.acos(a.Fj.Ji(this.$b))/Math.PI,Math.abs(e)<this.zb?this.$f||(this.$f=!0,this.kd=this.loop-1,this.va?this.Nf||this.Vd():this.j.play()):this.$f=!1)}}};c.prototype.So=function(){var a=this;a.ec=this.u.Aa.createBufferSource();a.ec.addEventListener("ended",function(){a.An()},!1);2==a.mode||3==a.mode||5==a.mode?a.ec.connect(a.Ad):a.ec.connect(a.Dc)};c.prototype.Vd=function(){var a=this.u.Aa,b=this.Re;this.Rh?(null==this.ec&&(this.So(),
this.ec.buffer=this.Rh),this.uh=a.currentTime-b,this.Re=0,this.Nf=!0,this.stopped=!1,this.ec.start(0,b),this.u.O("buffer Source started")):(this.u.O("bufferSoundPlay() -> no audio buffer -> playWhenReady"),this.Sq=!0)};c.prototype.sj=function(){var a=this.u.Aa.currentTime-this.uh;this.mf();this.Re=a};c.prototype.mf=function(){this.ec&&this.Nf&&(this.stopped=!0,this.ec.disconnect(),this.ec.stop(0),this.ec=null);this.uh=this.Re=0;this.Nf=!1};c.prototype.Fo=function(){var a=this.u.Aa;return this.Re?
this.Re:this.uh?a.currentTime-this.uh:0};c.prototype.Go=function(a){this.mf();this.Re=a;this.Vd()};c.prototype.addElement=function(){var a=-1,b=this,e=this.u,f=this.u.Aa;try{for(var g=!1,h=0;h<e.Y.length;h++)e.Y[h].id==b.id&&(a=h,null==e.Y[h].j&&!e.Y[h].va||e.Y[h].url.join()!=b.url.join()||e.Y[h].loop!=b.loop||e.Y[h].mode!=b.mode||(g=!0,e.Y[h].pan=b.pan,e.Y[h].A=b.A,e.Y[h].level=b.level,e.Y[h].rc=b.rc,e.Y[h].$h=b.$h,e.Y[h].zb=b.zb,e.Y[h].Zf=b.Zf));if(g)e.O("Keep playing "+b.id);else{if(0<=a){var l=
e.Y[a];if(null!=l.j||l.va)if(f&&e.Xa.enabled)e.Xa.Ah.push(l),1!=e.K.sa&&2!=e.K.sa&&6!=e.K.sa&&e.Xa.Fl(l);else{try{l.va?l.sj():l.j.pause()}catch(q){e.O(q)}try{l.Te()}catch(q){e.O(q)}}}f&&(this.se=!0);b.j=document.createElement("audio");b.j.crossOrigin=e.crossOrigin;b.j.setAttribute("class","ggmedia");e.Cf&&b.j.setAttribute("id",e.Cf+b.id);for(h=0;h<b.url.length;h++)g=void 0,g=document.createElement("source"),""!=b.url[h]&&"#"!=b.url[h]&&(g.crossOrigin=e.crossOrigin,g.setAttribute("src",e.Mb(b.url[h])),
b.j.appendChild(g));b.j.volume=b.level*e.ca;if(0<b.j.childNodes.length&&(e.aa.appendChild(b.j),b.j.addEventListener("ended",function(){b.An()},!1),f)){b.Nj=!1;0==b.loop&&b.source&&b.source.mediaElement&&(b.source.mediaElement.loop=!0);var k=new XMLHttpRequest;k.open("GET",e.Mb(b.url[0]),!0);k.responseType="arraybuffer";k.onload=function(){f.decodeAudioData(k.response,function(q){b.Fi=q.numberOfChannels;1==b.Fi&&b.Gn()})};k.send()}1<=b.loop&&(b.kd=b.loop-1);0<=a?e.Y[a]=b:e.Y.push(b);b.ij();-1!=this.u.bd.indexOf(b.id)||
-1!=this.u.bd.indexOf("_main")&&-1==this.u.re.indexOf(b.id)||(1!=b.mode&&2!=b.mode&&3!=b.mode&&5!=b.mode||!(0<=b.loop)||f&&e.Xa.enabled||(b.va||(b.j.autoplay=!0,b.Pk()),b.autoplay=!0),0==b.mode&&0<=b.loop&&(b.autoplay=!0,b.Pk()))}}catch(q){this.u.O(q)}};c.prototype.Te=function(){try{this.u.O("Remove Snd:"+this.id),this.va||(this.u.aa.removeChild(this.j),this.j=null)}catch(a){this.u.O(a)}};c.prototype.Xb=function(a){d.prototype.Xb.call(this,a);var b;(b=a.getAttributeNode("url"))&&this.url.push(b.nodeValue.toString());
if(b=a.getAttributeNode("level"))this.level=Number(b.nodeValue);if(b=a.getAttributeNode("loop"))this.loop=Number(b.nodeValue);if(b=a.getAttributeNode("mode"))this.mode=Number(b.nodeValue);if(b=a.getAttributeNode("nodechangekeep"))this.Qm=1==Number(b.nodeValue);if(b=a.getAttributeNode("field"))this.$h=Number(b.nodeValue);if(b=a.getAttributeNode("ambientlevel"))this.rc=Number(b.nodeValue);if(b=a.getAttributeNode("pansize"))this.zb=Number(b.nodeValue);if(b=a.getAttributeNode("tiltsize"))this.Zf=Number(b.nodeValue);
for(a=a.firstChild;a;)"source"==a.nodeName&&(b=a.getAttributeNode("url"))&&this.url.push(b.nodeValue.toString()),a=a.nextSibling};return c}(n);r.po=m;m=function(d){function c(a){a=d.call(this,a)||this;a.poster="";a.Ga=0;a.Ka=0;a.jb=0;a.fov=50;a.gb=0;a.Ng=!1;a.td=!1;return a}__extends(c,d);c.prototype.Ie=function(){1!=this.gb&&4!=this.gb||this.Kg(!this.nb);2==this.gb&&this.u.Zm(this.id)};c.prototype.Kg=function(a){var b=this.u,e=b.Aa;if(1==this.gb||4==this.gb)if(this.nb=a,this.u.Kb)(b=b.ra)&&b.activateSound(this.id,
this.nb?1:0);else{if(this.nb)this.j.style.pointerEvents="auto",this.j.style.cursor="pointer",this.j.style.zIndex=(b.Jh+8E4).toString(),this.j.style[this.u.Tc]="all 1s ease 0s",this.u.isPlaying(this.id)||b.fe(this.id);else{this.j.style.pointerEvents="none";this.j.style.cursor="default";this.j.style.zIndex=b.Jh.toString();this.j.style[this.u.Tc]="all 1s ease 0s";this.u.isPlaying(this.id)&&b.Yi(this.id);this.tk=!0;var f=this;setTimeout(function(){f.tk=!1},1E3)}if(e&&(2==this.mode||3==this.mode||5==this.mode)&&
(e=e.currentTime,this.Ob&&this.Rb&&this.Pb.gain&&this.Pb&&this.Qb)){var g=this.Ob.gain.value,h=this.Rb.gain.value,l=this.Pb.gain.value,k=this.Qb.gain.value;this.nb?(this.Ob.gain.linearRampToValueAtTime(g,e),this.Ob.gain.linearRampToValueAtTime(this.level*b.ca,e+1),this.Rb.gain.linearRampToValueAtTime(h,e),this.Rb.gain.linearRampToValueAtTime(this.level*b.ca,e+1),this.Pb.gain.linearRampToValueAtTime(l,e),this.Pb.gain.linearRampToValueAtTime(0,e+1),this.Qb.gain.linearRampToValueAtTime(k,e),this.Qb.gain.linearRampToValueAtTime(0,
e+1)):(this.Ob.gain.linearRampToValueAtTime(g,e),this.Ob.gain.linearRampToValueAtTime(this.dd,e+1),this.Rb.gain.linearRampToValueAtTime(h,e),this.Rb.gain.linearRampToValueAtTime(this.ed,e+1),this.Pb.gain.linearRampToValueAtTime(l,e),this.Pb.gain.linearRampToValueAtTime(this.Oc,e+1),this.Qb.gain.linearRampToValueAtTime(k,e),this.Qb.gain.linearRampToValueAtTime(this.Pc,e+1))}this.Ig=!0;this.u.Tn()}2==this.gb&&(a?this.u.fe(this.id):this.u.sk(this.id))};c.prototype.Lg=function(){this.Ig=!1;this.j.style[this.u.Tc]=
"none"};c.prototype.js=function(){0==this.loop?this.j.play():0<this.kd?(this.kd--,this.j.currentTime=0,this.j.play()):this.isRunning=!1};c.prototype.Xb=function(a){d.prototype.Xb.call(this,a);var b;if(b=a.getAttributeNode("poster"))this.poster=String(b.nodeValue);if(b=a.getAttributeNode("rotx"))this.Ga=Number(b.nodeValue);if(b=a.getAttributeNode("roty"))this.Ka=Number(b.nodeValue);if(b=a.getAttributeNode("rotz"))this.jb=Number(b.nodeValue);if(b=a.getAttributeNode("fov"))this.fov=Number(b.nodeValue);
if(b=a.getAttributeNode("width"))this.vc=Number(b.nodeValue);if(b=a.getAttributeNode("height"))this.Wc=Number(b.nodeValue);this.Ec=(b=a.getAttributeNode("stretch"))?Number(b.nodeValue):1;if(b=a.getAttributeNode("clickmode"))this.gb=Number(b.nodeValue);if(b=a.getAttributeNode("handcursor"))this.Ng=1==Number(b.nodeValue);if(b=a.getAttributeNode("startmutedmobile"))this.En=1==Number(b.nodeValue)};c.prototype.addElement=function(){var a=this,b=this.u,e=this.u.Aa;try{a.j=document.createElement("video");
a.j.setAttribute("class","ggmedia");a.j.crossOrigin=b.crossOrigin;a.j.hidden=!0;a.j.addEventListener("click",function(h){h.stopPropagation()});b.Cf&&a.j.setAttribute("id",b.Cf+a.id);if(b.Fh)a.j.setAttribute("playsinline","playsinline"),a.j.setAttribute("style","display: none; max-width:none;");else if(a.j.setAttribute("style","max-width:none;pointer-events:none;"),a.j.setAttribute("playsinline","playsinline"),1==a.gb||4==a.gb)a.j.addEventListener(b.bo(),function(){a.Lg()},!1),a.j.addEventListener("transitionend",
function(){a.Lg()},!1);var f=void 0;for(f=0;f<a.url.length;f++){var g=void 0;g=document.createElement("source");g.crossOrigin=b.crossOrigin;g.setAttribute("src",b.Mb(a.url[f]));a.j.appendChild(g)}""!=a.poster&&(a.j.poster=b.Mb(a.poster),0>a.loop&&(a.j.preload="none"));a.j.volume=a.level*b.ca;1<=a.loop&&(a.kd=a.loop-1);e&&(this.se=!0);(1==a.mode||2==a.mode||3==a.mode||5==a.mode)&&0<=a.loop&&(a.j.autoplay=!0,a.isRunning=!0,a.autoplay=!0,a.Pk());b.T.push(this);b.Fh?b.aa.appendChild(a.j):(a.j.style.position=
"absolute",a.vc&&(a.j.width=a.vc),a.Wc&&(a.j.height=a.Wc),b.L.appendChild(a.j));a.j.addEventListener("ended",function(){a.js()},!1)}catch(h){b.O(h)}};c.prototype.registerElement=function(a,b){this.td=!0;this.j=b;this.id=a;this.level=1;this.u.T.push(this)};c.prototype.Te=function(){var a=this.u;a.Fh&&(a.R.deleteTexture(this.texture),this.texture=0,a.aa.removeChild(this.j));a.Un&&a.L.removeChild(this.j);this.j=null};return c}(m);r.cl=m;m=function(d){function c(a){a=d.call(this,a)||this;a.url="";a.Ga=
0;a.Ka=0;a.jb=0;a.fov=50;a.gb=0;a.Ng=!1;a.vc=100;a.Wc=100;a.Ec=1;return a}__extends(c,d);c.prototype.Xb=function(a){d.prototype.Xb.call(this,a);var b;if(b=a.getAttributeNode("url"))this.url=b.nodeValue.toString();if(b=a.getAttributeNode("rotx"))this.Ga=Number(b.nodeValue);if(b=a.getAttributeNode("roty"))this.Ka=Number(b.nodeValue);if(b=a.getAttributeNode("rotz"))this.jb=Number(b.nodeValue);if(b=a.getAttributeNode("fov"))this.fov=Number(b.nodeValue);if(b=a.getAttributeNode("width"))this.vc=Number(b.nodeValue);
if(b=a.getAttributeNode("height"))this.Wc=Number(b.nodeValue);this.Ec=(b=a.getAttributeNode("stretch"))?Number(b.nodeValue):1;if(b=a.getAttributeNode("clickmode"))this.gb=Number(b.nodeValue);if(b=a.getAttributeNode("handcursor"))this.Ng=1==Number(b.nodeValue);for(a=a.firstChild;a;)"source"==a.nodeName&&(b=a.getAttributeNode("url"))&&(this.url=b.nodeValue.toString()),a=a.nextSibling};c.prototype.Lg=function(){this.Ig=!1;this.j.style[this.u.Tc]="none"};c.prototype.Ie=function(){1!==this.gb&&4!==this.gb||
this.Kg(!this.nb)};c.prototype.Kg=function(a){var b=this.u;if(1===this.gb||4===this.gb)this.nb=a,this.u.Kb?(a=this.u.ra)&&a.activateSound(this.id,this.nb?1:0):(this.nb?(this.j.style.pointerEvents="auto",this.j.style.cursor="pointer",this.j.style.zIndex=(b.Jh+8E4).toString()):(this.j.style.pointerEvents="none",this.j.style.cursor="default",this.j.style.zIndex=b.Jh.toString()),this.j.style[b.Tc]="all 1s ease 0s",this.Ig=!0,b.Pn())};c.prototype.addElement=function(){var a=this,b=this.u;try{a.j=document.createElement("img");
a.j.setAttribute("style","-webkit-user-drag:none; max-width:none; pointer-events:none;");a.j.setAttribute("class","ggmedia");a.j.hidden=!0;a.j.addEventListener("click",function(e){e.stopPropagation()});b.Cf&&a.j.setAttribute("id",b.Cf+a.id);a.j.ondragstart=function(){return!1};if(1===a.gb||4===a.gb)a.j.addEventListener(b.bo(),function(){a.Lg()},!1),a.j.addEventListener("transitionend",function(){a.Lg()},!1);a.j.setAttribute("src",b.Mb(a.url));a.vc&&(a.j.width=a.vc);a.Wc&&(a.j.height=a.Wc);b.eb.push(a);
a.j.style.position="absolute";b.L.appendChild(a.j)}catch(e){b.O("Error addimage:"+e)}};c.prototype.Te=function(){this.u.L.removeChild(this.j);this.j=null};return c}(n);r.no=m;n=function(d){function c(a){a=d.call(this,a)||this;a.kl=50;a.alpha=50;a.type=0;a.color=16777215;return a}__extends(c,d);c.prototype.Xb=function(a){d.prototype.Xb.call(this,a);var b;if(b=a.getAttributeNode("blinding"))this.kl=Number(b.nodeValue);if(b=a.getAttributeNode("alpha"))this.alpha=Number(b.nodeValue);if(b=a.getAttributeNode("type"))this.type=
Number(b.nodeValue);if(b=a.getAttributeNode("color"))this.color=1*Number(b.nodeValue)};return c}(n);r.oo=n;n=function(){function d(c){this.u=c;this.type="empty";this.Hk=this.id=this.target=this.description=this.title=this.url="";this.w=100;this.h=20;this.lj=!1;this.j=null;this.Ab=this.Wb=this.lb=this.Ba=this.distance=this.A=this.pan=0;this.visible=!0;this.dc=c.I.dc;this.bc=c.I.bc;this.cc=c.I.cc;this.ac=c.I.ac;this.zf=c.I.zf;this.Sc="";this.Bd=this.Ae=0;this.bg=!1;this.Yh=0;this.vertices=[]}d.prototype.tf=
function(){this.id=this.id;this.pan=this.pan;this.tilt=this.A;this.url=this.url;this.target=this.target;this.title=this.title;this.distance=this.distance;this.description=this.description;this.skinid=this.Hk;this.obj=this.j;this.customimage=this.Sc;this.customimagewidth=this.Ae;this.customimageheight=this.Bd;this.use3D=this.bg;this.distance3D=this.Yh;this.j&&this.j.__div&&(this.div=this.j.__div)};d.prototype.Nr=function(){var c=this.url;return"{"==c.charAt(0)?c.substr(1,c.length-2):!1};d.prototype.Xb=
function(c){var a;if(a=c.getAttributeNode("url"))this.url=a.nodeValue.toString();if(a=c.getAttributeNode("target"))this.target=a.nodeValue.toString();if(a=c.getAttributeNode("title"))this.title=a.nodeValue.toString();if(a=c.getAttributeNode("description"))this.description=a.nodeValue.toString();if(a=c.getAttributeNode("id"))this.id=a.nodeValue.toString();if(a=c.getAttributeNode("skinid"))this.Hk=a.nodeValue.toString();if(a=c.getAttributeNode("width"))this.w=Number(a.nodeValue);if(a=c.getAttributeNode("height"))this.h=
Number(a.nodeValue);if(a=c.getAttributeNode("wordwrap"))this.lj=1==Number(a.nodeValue);a=c.getAttributeNode("pan");this.pan=1*(a?Number(a.nodeValue):0);a=c.getAttributeNode("tilt");this.A=1*(a?Number(a.nodeValue):0);a=c.getAttributeNode("fov");this.fov=1*(a?Number(a.nodeValue):0);a=c.getAttributeNode("distance");this.distance=1*(a?Number(a.nodeValue):0);if(a=c.getAttributeNode("bordercolor"))this.dc=1*Number(a.nodeValue);if(a=c.getAttributeNode("backgroundcolor"))this.bc=1*Number(a.nodeValue);if(a=
c.getAttributeNode("borderalpha"))this.cc=1*Number(a.nodeValue);if(a=c.getAttributeNode("backgroundalpha"))this.ac=1*Number(a.nodeValue);if(a=c.getAttributeNode("handcursor"))this.zf=1==Number(a.nodeValue);if(a=c.getAttributeNode("customimage"))this.Sc=this.u.Ul()+a.nodeValue;if(a=c.getAttributeNode("customimagewidth"))this.Ae=Number(a.nodeValue);if(a=c.getAttributeNode("customimageheight"))this.Bd=Number(a.nodeValue);if(a=c.getAttributeNode("use3D"))this.bg=1==Number(a.nodeValue);if(a=c.getAttributeNode("distance3D"))this.Yh=
Number(a.nodeValue);for(c=c.firstChild;c;){if("polystring"==c.nodeName){a=c.textContent.toString().split("|");for(var b=0;b<a.length;b++){var e=a[b].split("/");if(2==e.length){var f={pan:0,A:0};f.pan=Number(e[0]);f.A=Number(e[1]);this.vertices.push(f)}}}"vertex"==c.nodeName&&(f={pan:0,A:0},a=c.getAttributeNode("pan"),f.pan=1*(a?Number(a.nodeValue):0),a=c.getAttributeNode("tilt"),f.A=1*(a?Number(a.nodeValue):0),this.vertices.push(f));c=c.nextSibling}this.tf()};return d}();r.Mh=n})(ggP2VR||(ggP2VR=
{}));
(function(r){var n=function(){function m(d,c){this.x=d;this.y=c}m.prototype.init=function(d,c){this.x=d;this.y=c};m.prototype.Gd=function(d,c,a){var b=c.y-d.y;this.x=d.x+(c.x-d.x)*a;this.y=d.y+b*a};m.prototype.Eo=function(d,c,a,b,e){var f=new m;f.Gd(d,a,e);d=new m;d.Gd(a,b,e);a=new m;a.Gd(b,c,e);c=new m;c.Gd(f,d,e);f=new m;f.Gd(d,a,e);d=new m;d.Gd(c,f,e);this.x=d.x;this.y=d.y};m.prototype.qj=function(d,c,a,b,e){var f=new m,g=.5,h=.25;do{f.Eo(d,c,a,b,g);var l=f.x-e;g=0<l?g-h:g+h;h/=2}while(.01<Math.abs(l));
this.x=f.x;this.y=f.y};return m}();r.Bc=n})(ggP2VR||(ggP2VR={}));
(function(r){var n=function(){function m(d,c,a,b,e){this.x=d;this.y=c;this.z=a;this.yd=b;this.$b=e}m.prototype.init=function(d,c,a,b,e){this.x=d;this.y=c;this.z=a;this.yd=b;this.$b=e};m.prototype.toString=function(){return"("+this.x+","+this.y+","+this.z+") - ("+this.yd+","+this.$b+")"};m.prototype.Ga=function(d){var c=Math.sin(d);d=Math.cos(d);var a=this.y,b=this.z;this.y=d*a-c*b;this.z=c*a+d*b};m.prototype.Zq=function(){var d=this.y;this.y=-this.z;this.z=d};m.prototype.Yq=function(){var d=this.y;
this.y=this.z;this.z=-d};m.prototype.Ka=function(d){var c=Math.sin(d);d=Math.cos(d);var a=this.x,b=this.z;this.x=d*a+c*b;this.z=-c*a+d*b};m.prototype.$q=function(){var d=this.x;this.x=-this.z;this.z=d};m.prototype.jb=function(d){var c=Math.sin(d);d=Math.cos(d);var a=this.x,b=this.y;this.x=d*a-c*b;this.y=c*a+d*b};m.prototype.mn=function(){var d=this.x;this.x=-this.y;this.y=d};m.prototype.Nd=function(d){this.Ga(d*Math.PI/180)};m.prototype.Ue=function(d){this.Ka(d*Math.PI/180)};m.prototype.Ve=function(d){this.jb(d*
Math.PI/180)};m.prototype.clone=function(){return new m(this.x,this.y,this.z,this.yd,this.$b)};m.prototype.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)};m.prototype.normalize=function(){var d=this.length();0<d&&(d=1/d,this.x*=d,this.y*=d,this.z*=d)};m.prototype.Ji=function(d){return this.x*d.x+this.y*d.y+this.z*d.z};m.prototype.Kl=function(d,c){var a=Math.cos(c*Math.PI/180);this.x=a*Math.sin(d*Math.PI/180);this.y=Math.sin(c*Math.PI/180);this.z=a*Math.cos(d*Math.PI/
180)};m.prototype.Ao=function(){return 180*Math.atan2(-this.x,-this.z)/Math.PI};m.prototype.Bo=function(){return 180*Math.asin(this.y/this.length())/Math.PI};m.prototype.Gd=function(d,c,a){this.x=d.x*a+c.x*(1-a);this.y=d.y*a+c.y*(1-a);this.z=d.z*a+c.z*(1-a);this.yd=d.yd*a+c.yd*(1-a);this.$b=d.$b*a+c.$b*(1-a)};return m}();r.Ha=n})(ggP2VR||(ggP2VR={}));
(function(r){var n=function(){function m(){this.rn()}m.prototype.rn=function(){this.ic=1;this.wc=this.jc=this.Hb=0;this.kc=1;this.lc=this.Tb=this.xc=0;this.Ub=1};m.prototype.clone=function(d){this.ic=d.ic;this.Hb=d.Hb;this.jc=d.jc;this.wc=d.wc;this.kc=d.kc;this.xc=d.xc;this.Tb=d.Tb;this.lc=d.lc;this.Ub=d.Ub};m.prototype.pr=function(d){var c=Math.cos(d);d=Math.sin(d);this.ic=1;this.wc=this.jc=this.Hb=0;this.kc=c;this.xc=-d;this.Tb=0;this.lc=d;this.Ub=c};m.prototype.qr=function(d){var c=Math.cos(d);
d=Math.sin(d);this.ic=c;this.Hb=0;this.jc=d;this.wc=0;this.kc=1;this.xc=0;this.Tb=-d;this.lc=0;this.Ub=c};m.prototype.rr=function(d){var c=Math.cos(d);d=Math.sin(d);this.ic=c;this.Hb=-d;this.jc=0;this.wc=d;this.kc=c;this.lc=this.Tb=this.xc=0;this.Ub=1};m.prototype.lr=function(d){this.pr(d*Math.PI/180)};m.prototype.mr=function(d){this.qr(d*Math.PI/180)};m.prototype.nr=function(d){this.rr(d*Math.PI/180)};m.prototype.Nd=function(d){this.Zc||(this.Zc=new m,this.ce=new m);this.Zc.lr(d);this.ce.clone(this);
this.multiply(this.Zc,this.ce)};m.prototype.Ue=function(d){this.Zc||(this.Zc=new m,this.ce=new m);this.Zc.mr(d);this.ce.clone(this);this.multiply(this.Zc,this.ce)};m.prototype.Ve=function(d){this.Zc||(this.Zc=new m,this.ce=new m);this.Zc.nr(d);this.ce.clone(this);this.multiply(this.Zc,this.ce)};m.prototype.multiply=function(d,c){this.ic=d.ic*c.ic+d.Hb*c.wc+d.jc*c.Tb;this.Hb=d.ic*c.Hb+d.Hb*c.kc+d.jc*c.lc;this.jc=d.ic*c.jc+d.Hb*c.xc+d.jc*c.Ub;this.wc=d.wc*c.ic+d.kc*c.wc+d.xc*c.Tb;this.kc=d.wc*c.Hb+
d.kc*c.kc+d.xc*c.lc;this.xc=d.wc*c.jc+d.kc*c.xc+d.xc*c.Ub;this.Tb=d.Tb*c.ic+d.lc*c.wc+d.Ub*c.Tb;this.lc=d.Tb*c.Hb+d.lc*c.kc+d.Ub*c.lc;this.Ub=d.Tb*c.jc+d.lc*c.xc+d.Ub*c.Ub};m.prototype.vq=function(d){var c=d.x;var a=d.y;var b=d.z;d.x=c*this.ic+a*this.Hb+b*this.jc;d.y=c*this.wc+a*this.kc+b*this.xc;d.z=c*this.Tb+a*this.lc+b*this.Ub};return m}();r.$k=n})(ggP2VR||(ggP2VR={}));
(function(r){r.ka={create:function(n){var m="undefined"!=typeof Float32Array?new Float32Array(16):Array(16);n&&(m[0]=n[0],m[1]=n[1],m[2]=n[2],m[3]=n[3],m[4]=n[4],m[5]=n[5],m[6]=n[6],m[7]=n[7],m[8]=n[8],m[9]=n[9],m[10]=n[10],m[11]=n[11],m[12]=n[12],m[13]=n[13],m[14]=n[14],m[15]=n[15]);return m},set:function(n,m){m[0]=n[0];m[1]=n[1];m[2]=n[2];m[3]=n[3];m[4]=n[4];m[5]=n[5];m[6]=n[6];m[7]=n[7];m[8]=n[8];m[9]=n[9];m[10]=n[10];m[11]=n[11];m[12]=n[12];m[13]=n[13];m[14]=n[14];m[15]=n[15];return m},identity:function(n){n[0]=
1;n[1]=0;n[2]=0;n[3]=0;n[4]=0;n[5]=1;n[6]=0;n[7]=0;n[8]=0;n[9]=0;n[10]=1;n[11]=0;n[12]=0;n[13]=0;n[14]=0;n[15]=1;return n},multiply:function(n,m,d){d||(d=n);var c=n[0],a=n[1],b=n[2],e=n[3],f=n[4],g=n[5],h=n[6],l=n[7],k=n[8],q=n[9],p=n[10],w=n[11],x=n[12],y=n[13],z=n[14];n=n[15];var fa=m[0],la=m[1],B=m[2],db=m[3],ja=m[4],id=m[5],tf=m[6],ih=m[7],hh=m[8],kh=m[9],nh=m[10],oh=m[11],ph=m[12],qh=m[13],rh=m[14];m=m[15];d[0]=fa*c+la*f+B*k+db*x;d[1]=fa*a+la*g+B*q+db*y;d[2]=fa*b+la*h+B*p+db*z;d[3]=fa*e+la*l+
B*w+db*n;d[4]=ja*c+id*f+tf*k+ih*x;d[5]=ja*a+id*g+tf*q+ih*y;d[6]=ja*b+id*h+tf*p+ih*z;d[7]=ja*e+id*l+tf*w+ih*n;d[8]=hh*c+kh*f+nh*k+oh*x;d[9]=hh*a+kh*g+nh*q+oh*y;d[10]=hh*b+kh*h+nh*p+oh*z;d[11]=hh*e+kh*l+nh*w+oh*n;d[12]=ph*c+qh*f+rh*k+m*x;d[13]=ph*a+qh*g+rh*q+m*y;d[14]=ph*b+qh*h+rh*p+m*z;d[15]=ph*e+qh*l+rh*w+m*n;return d},translate:function(n,m,d){var c=m[0],a=m[1];m=m[2];if(!d||n==d)return n[12]=n[0]*c+n[4]*a+n[8]*m+n[12],n[13]=n[1]*c+n[5]*a+n[9]*m+n[13],n[14]=n[2]*c+n[6]*a+n[10]*m+n[14],n[15]=n[3]*
c+n[7]*a+n[11]*m+n[15],n;var b=n[0],e=n[1],f=n[2],g=n[3],h=n[4],l=n[5],k=n[6],q=n[7],p=n[8],w=n[9],x=n[10],y=n[11];d[0]=b;d[1]=e;d[2]=f;d[3]=g;d[4]=h;d[5]=l;d[6]=k;d[7]=q;d[8]=p;d[9]=w;d[10]=x;d[11]=y;d[12]=b*c+h*a+p*m+n[12];d[13]=e*c+l*a+w*m+n[13];d[14]=f*c+k*a+x*m+n[14];d[15]=g*c+q*a+y*m+n[15];return d},scale:function(n,m,d){var c=m[0],a=m[1];m=m[2];if(!d||n==d)return n[0]*=c,n[1]*=c,n[2]*=c,n[3]*=c,n[4]*=a,n[5]*=a,n[6]*=a,n[7]*=a,n[8]*=m,n[9]*=m,n[10]*=m,n[11]*=m,n;d[0]=n[0]*c;d[1]=n[1]*c;d[2]=
n[2]*c;d[3]=n[3]*c;d[4]=n[4]*a;d[5]=n[5]*a;d[6]=n[6]*a;d[7]=n[7]*a;d[8]=n[8]*m;d[9]=n[9]*m;d[10]=n[10]*m;d[11]=n[11]*m;d[12]=n[12];d[13]=n[13];d[14]=n[14];d[15]=n[15];return d},rotate:function(n,m,d,c){var a=d[0],b=d[1];d=d[2];var e=Math.sqrt(a*a+b*b+d*d);if(!e)return null;1!=e&&(e=1/e,a*=e,b*=e,d*=e);var f=Math.sin(m),g=Math.cos(m),h=1-g;m=n[0];e=n[1];var l=n[2],k=n[3],q=n[4],p=n[5],w=n[6],x=n[7],y=n[8],z=n[9],fa=n[10],la=n[11],B=a*a*h+g,db=b*a*h+d*f,ja=d*a*h-b*f,id=a*b*h-d*f,tf=b*b*h+g,ih=d*b*h+
a*f,hh=a*d*h+b*f;a=b*d*h-a*f;b=d*d*h+g;c?n!=c&&(c[12]=n[12],c[13]=n[13],c[14]=n[14],c[15]=n[15]):c=n;c[0]=m*B+q*db+y*ja;c[1]=e*B+p*db+z*ja;c[2]=l*B+w*db+fa*ja;c[3]=k*B+x*db+la*ja;c[4]=m*id+q*tf+y*ih;c[5]=e*id+p*tf+z*ih;c[6]=l*id+w*tf+fa*ih;c[7]=k*id+x*tf+la*ih;c[8]=m*hh+q*a+y*b;c[9]=e*hh+p*a+z*b;c[10]=l*hh+w*a+fa*b;c[11]=k*hh+x*a+la*b;return c},cp:function(n,m,d,c,a,b,e){e||(e=r.ka.create());var f=m-n,g=c-d,h=b-a;e[0]=2*a/f;e[1]=0;e[2]=0;e[3]=0;e[4]=0;e[5]=2*a/g;e[6]=0;e[7]=0;e[8]=(m+n)/f;e[9]=(c+
d)/g;e[10]=-(b+a)/h;e[11]=-1;e[12]=0;e[13]=0;e[14]=-(b*a*2)/h;e[15]=0;return e},perspective:function(n,m,d,c,a){n=d*Math.tan(n*Math.PI/360);m*=n;return r.ka.cp(-m,m,-n,n,d,c,a)},ys:function(n,m,d,c,a,b,e){e||(e=r.ka.create());var f=m-n,g=c-d,h=b-a;e[0]=2/f;e[1]=0;e[2]=0;e[3]=0;e[4]=0;e[5]=2/g;e[6]=0;e[7]=0;e[8]=0;e[9]=0;e[10]=-2/h;e[11]=0;e[12]=-(n+m)/f;e[13]=-(c+d)/g;e[14]=-(b+a)/h;e[15]=1;return e}}})(ggP2VR||(ggP2VR={}));
(function(r){var n=function(){function m(d){this.xa=r.ka.create();this.yb=r.ka.create();this.od=0;this.hb=[];this.Sg=!1;this.Lk=this.Qj=this.xk=1;this.pf=1E6;this.Vh=[!1,!1,!1,!1,!1,!1];this.Xi=!1;this.Jj=[];this.al=8;this.nq=new r.$k;this.Xd=[];this.u=d;if(d.ae||d.Pg)d.xh=2}m.prototype.Og=function(){var d=this.u.R;if(d){var c=d.createShader(d.FRAGMENT_SHADER);d.shaderSource(c,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nvarying vec2 vTextureCoord;\n\t\t\t\t\tuniform sampler2D uSampler;\n\t\t\t\t\tvoid main(void) {\n\t\t\t\t\t\tgl_FragColor = texture2D(uSampler, vec2(vTextureCoord.s, vTextureCoord.t));\n\t\t\t\t\t}");
d.compileShader(c);d.getShaderParameter(c,d.COMPILE_STATUS)||(console&&console.log(d.getShaderInfoLog(c)),alert(d.getShaderInfoLog(c)),c=null);var a=d.createShader(d.VERTEX_SHADER);this.Vc(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=d.createProgram();this.If(this.P,a,c);this.P.ja=d.getAttribLocation(this.P,"aVertexPosition");d.enableVertexAttribArray(this.P.ja);this.P.La=d.getAttribLocation(this.P,"aTextureCoord");d.enableVertexAttribArray(this.P.La);this.P.ee=d.getUniformLocation(this.P,"uPMatrix");this.P.ih=d.getUniformLocation(this.P,"uMVMatrix");this.P.Tf=d.getUniformLocation(this.P,"uSampler");this.P.mj=d.getUniformLocation(this.P,"uZoffset");c=d.createShader(d.VERTEX_SHADER);this.Vc(c,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nattribute vec3 aVertexPosition;\n\t\t\t\tuniform vec2 uCanvasDimensions;\n\t\t\t\tvoid main(void) {\n\t\t\t\t\tvec2 pointNorm = (aVertexPosition.xy / uCanvasDimensions) * 2.0 - vec2(1.0, 1.0);\n\t\t\t\t\tgl_Position = vec4(pointNorm.x, pointNorm.y * -1.0, 0.0, 1.0);\n\t\t\t\t}");
a=d.createShader(d.FRAGMENT_SHADER);this.Vc(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.Ld=d.createProgram();this.If(this.Ld,c,a);this.Ld.ja=d.getAttribLocation(this.Ld,"aVertexPosition");d.enableVertexAttribArray(this.Ld.ja);a=d.createShader(d.VERTEX_SHADER);this.Vc(a,"precision highp float;\n\t\t\t\tattribute vec3 aVertexPosition;\n\t\t\t\tvarying vec2 vTextureCoord;\n\t\t\t\tuniform vec2 uCanvasDimensions;\n\t\t\t\tuniform vec4 uRect;\n\t\t\t\tvoid main(void) {\n\t\t\t\t\tvec2 pos = vec2(uRect.x + uRect.z*aVertexPosition.x,uRect.y + uRect.w*aVertexPosition.y);\n\t\t\t\t\tvec2 pointNorm = (pos / uCanvasDimensions) * 2.0 - vec2(1.0, 1.0);\n\t\t\t\t\tgl_Position = vec4(pointNorm.x, pointNorm.y * -1.0, 1.0, 1.0);\n\t\t\t\t\tvTextureCoord.s=aVertexPosition.x;\n\t\t\t\t\tvTextureCoord.t=1.0-aVertexPosition.y;\n\t\t\t\t}");
c=d.createShader(d.FRAGMENT_SHADER);this.Vc(c,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nvarying vec2 vTextureCoord;\n\t\t\t\tuniform sampler2D uSampler;\n\t\t\t\tvoid main(void) {\n\t\t\t\t\tgl_FragColor = texture2D(uSampler,vTextureCoord);\n\t\t\t\t}");this.zg=d.createProgram();this.If(this.zg,a,c)}};m.prototype.li=function(){var d=this.u,c=d.R;if(c){var a=c.createShader(c.FRAGMENT_SHADER);var b=this.Vj(13);this.Vc(a,b);b=c.createShader(c.VERTEX_SHADER);
this.Vc(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.en=c.createProgram();this.If(this.en,b,a);a=c.createShader(c.FRAGMENT_SHADER);b=this.Vj(4);this.Vc(a,b);b=c.createShader(c.VERTEX_SHADER);this.Vc(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.fn=c.createProgram();this.If(this.fn,b,a);a=c.createShader(c.FRAGMENT_SHADER);b=this.Vj(d.F.format);this.Vc(a,b);b=c.createShader(c.VERTEX_SHADER);this.Vc(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.gn=c.createProgram();this.If(this.gn,b,a);this.Li||(this.Li=c.createBuffer())}else this.u.O("No WebGL to initRemapShader!")};m.prototype.Vc=function(d,c){var a=this.u.R;a.shaderSource(d,c);a.compileShader(d);a.getShaderParameter(d,a.COMPILE_STATUS)||(console&&console.log(a.getShaderInfoLog(d)),Gh&&alert(a.getShaderInfoLog(d)))};m.prototype.If=function(d,c,a){var b=this.u.R;b.attachShader(d,c);b.attachShader(d,a);b.linkProgram(d);b.getProgramParameter(d,b.LINK_STATUS)||(alert("Could not initialise shader program"),
console&&console.log(b.getError()));b.useProgram(d)};m.prototype.Vj=function(d){var c=this.u;var a="#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\n#define M_PI 3.14159265358979323846\nvarying vec2 dst;\nuniform vec2 srcScale;\nuniform vec2 srcOffset;\nuniform float rectDstDistance;\nuniform float fisheyeDistance;\nuniform float stereoDistance;\nuniform float directionBlend;\nuniform mat4 matRotate; // = mat4( 1.0,0.0,0.0,0.0, 0.0,1.0,0.0,0.0, 0.0,0.0,1.0,0.0, 0.0,0.0,0.0,1.0 );\nconst float rectSrcDistance = 1.0;\nuniform vec2 tonemap;\n";
a=(13==d?a+"uniform samplerCube cubeTexture;":a+"uniform sampler2D tileTexture;\n")+"void main()\n{\n";a+="vec4 direction;\n";a+="vec2 src;\n";a+="vec2 srcCord;\n";a+="vec2 texc;\n";var b=this.hm(c.Sa());c.Sa()!=c.yc&&0!=c.yc?(c=this.hm(c.yc),a+="vec4 direction1,direction2;\n",a+=b.replace("direction=","direction1="),a+=c.replace("direction=","direction2="),a+="direction=normalize(mix(direction1, direction2,1.0-directionBlend));\n"):a+=b;a+="direction=direction*matRotate;\n";13==d&&(a+="direction.z=-direction.z;",
a+="gl_FragColor = textureCube(cubeTexture, direction.xyz);");4==d&&(a+="float iz=1.0/(direction.z * rectSrcDistance);\n",a+="src.x=-direction.x*iz;\n",a+="src.y= direction.y*iz;\n",a+="texc=src * srcScale + srcOffset;\n",a+="if (",a+="(direction.z<0.0) && ",a+="(texc.x>=0.0) && (texc.x<=1.0) && (texc.y>=0.0) && (texc.y<=1.0)) {\n",a+=" gl_FragColor = texture2D(tileTexture, texc);\n",a+="} else {\n",a+=" discard;\n",a+="}\n");1==d&&(a+="src.x=atan(float(-direction.x), float(-direction.z));",a+=
"src.y=asin(direction.y);\n",a+="texc=src * srcScale + srcOffset;\n",a+="gl_FragColor = texture2D(tileTexture, texc);\n");14==d&&(a+="vec2 cf;\n",a+="if ((direction.z<0.0) && (direction.z<=-abs(direction.x)) && (direction.z<=-abs(direction.y))) {\n",a+=" src.x=-direction.x/direction.z;\n",a+=" src.y=+direction.y/direction.z;\n",a+=" cf.x=1.0;cf.y=3.0;\n",a+="}\n",a+="if ((direction.x>=0.0) && (direction.x>=abs(direction.y)) && (direction.x>=abs(direction.z))) {\n",a+=" src.x=+direction.z/direction.x;\n",
a+=" src.y=-direction.y/direction.x;\n",a+=" cf.x=3.0;cf.y=3.0;\n",a+="}\n",a+="if ((direction.z>=0.0) && (direction.z>=abs(direction.x)) && (direction.z>=abs(direction.y))) {\n",a+=" src.x=-direction.x/direction.z;\n",a+=" src.y=-direction.y/direction.z;\n",a+=" cf.x=5.0;cf.y=3.0;\n",a+="}\n",a+="if ((direction.x<=0.0) && (direction.x<=-abs(direction.y)) && (direction.x<=-abs(direction.z))) {\n",a+=" src.x=+direction.z/direction.x;\n",a+=" src.y=+direction.y/direction.x;\n",a+=" cf.x=1.0;cf.y=1.0;\n",
a+="}\n",a+="if ((direction.y>=0.0) && (direction.y>=abs(direction.x)) && (direction.y>=abs(direction.z))) {\n",a+=" src.x=+direction.x/direction.y;\n",a+=" src.y=-direction.z/direction.y;\n",a+=" cf.x=5.0;cf.y=1.0;\n",a+="}\n",a+="if ((direction.y<=0.0) && (direction.y<=-abs(direction.x)) && (direction.y<=-abs(direction.z))) {\n",a+=" src.x=-direction.x/direction.y;\n",a+=" src.y=-direction.z/direction.y;\n",a+=" cf.x=3.0;cf.y=1.0;\n",a+="}\n",a+="texc.x=(cf.x+src.x*srcScale.x) / 6.0;\n",a+=
"texc.y=(cf.y+src.y*srcScale.y) / 4.0;\n",a+="gl_FragColor = texture2D(tileTexture, texc);\n");return a+="}\n"};m.prototype.hm=function(d){var c="";switch(d){case 4:c+="direction.x=dst.x*rectDstDistance;\ndirection.y=dst.y*rectDstDistance;\ndirection.z=-1.0;\n";break;case 12:c+="float r,ph,ro;\nr=length(dst.xy)*0.5;\nro=atan(float(dst.x),float(-dst.y));\nph=r / fisheyeDistance;\ndirection.x= sin(ph) * sin(ro);\ndirection.y=-sin(ph) * cos(ro);\ndirection.z=-cos(ph);\n";break;case 9:c+="float n;\nvec2 ind;\nind=dst*stereoDistance;\nn=1.0 + ind.x*ind.x + ind.y*ind.y;\ndirection.x=2.0*ind.x/n;\ndirection.y=2.0*ind.y/n;\ndirection.z=(n-2.0)/n;\n"}return c+
"direction.w=0.0;\ndirection=normalize(direction);\n"};m.prototype.um=function(d){var c,a,b=this.u,e=this.u.R;this.Ej=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,this.Ej);var f=[-1,-1,1,1,-1,1,1,1,1,-1,1,1];for(c=0;12>c;c++)2>c%3&&(f[c]*=d);e.bufferData(e.ARRAY_BUFFER,new Float32Array(f),e.STATIC_DRAW);this.ze=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,this.ze);var g=[1,0,0,0,0,1,1,1];e.bufferData(e.ARRAY_BUFFER,new Float32Array(g),e.STATIC_DRAW);this.jd=e.createBuffer();e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,
this.jd);var h=[0,1,2,0,2,3];e.bufferData(e.ELEMENT_ARRAY_BUFFER,new Uint16Array(h),e.STATIC_DRAW);f=[];h=[];g=[];var l=new r.Ha;for(d=0;6>d;d++){var k=d%3;var q=3>d?1:0;for(a=0;4>a;a++){l.x=-1;l.y=-1;l.z=1;for(c=0;c<a;c++)l.mn();g.push((0>l.x?.33:0)+.33*k,(0>l.y?0:.5)+.5*q);if(4>d)for(c=0;c<d;c++)l.$q();else 5==d?l.Zq():l.Yq();f.push(l.x,l.y,l.z)}c=4*d;h.push(0+c,1+c,2+c,0+c,2+c,3+c)}b.F.Wk=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,b.F.Wk);e.bufferData(e.ARRAY_BUFFER,new Float32Array(f),e.STATIC_DRAW);
b.F.Zi=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,b.F.Zi);e.bufferData(e.ARRAY_BUFFER,new Float32Array(g),e.STATIC_DRAW);b.F.ck=e.createBuffer();e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,b.F.ck);e.bufferData(e.ELEMENT_ARRAY_BUFFER,new Uint16Array(h),e.STATIC_DRAW);this.aq=e.createBuffer();this.$p=e.createBuffer()};m.prototype.Yj=function(d){var c=this;return function(){try{if(d.zq)return;var a=c.u.R;a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,1);var b=!1;null!=d.Ne&&d.Ne.complete?d.nm||(a.bindTexture(a.TEXTURE_2D,
d),a.texImage2D(a.TEXTURE_2D,0,a.RGBA,a.RGBA,a.UNSIGNED_BYTE,d.Ne),b=d.nm=!0):null!=d.Of&&d.Of.complete&&(a.bindTexture(a.TEXTURE_2D,d),a.texImage2D(a.TEXTURE_2D,0,a.RGBA,a.RGBA,a.UNSIGNED_BYTE,d.Of),b=!0);b&&(d.loaded=!0);a.bindTexture(a.TEXTURE_2D,null);a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,0)}catch(e){c.u.O(e)}c.u.update(2)}};m.prototype.vm=function(){var d=this.u,c=d.R;if(this.hb)for(;0<this.hb.length;)c.deleteTexture(this.hb.pop());this.hb=[];for(var a=0;6>a;a++){var b=c.createTexture();this.od++;
b.Of=null;b.Ne=null;b.nm=!1;c.bindTexture(c.TEXTURE_2D,b);c.texImage2D(c.TEXTURE_2D,0,c.RGB,1,1,0,c.RGB,c.UNSIGNED_BYTE,null);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MIN_FILTER,c.LINEAR);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_S,c.CLAMP_TO_EDGE);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_T,c.CLAMP_TO_EDGE);if(d.qf[a]){var e=new Image;e.crossOrigin=d.crossOrigin;e.src=d.Mb(d.qf[a]);b.Of=e;e.addEventListener&&e.addEventListener("load",this.Yj(b),!1);d.fc.push(e)}this.hb.push(b)}for(a=0;6>a;a++)d.sg[a]&&
(e=new Image,e.crossOrigin=d.crossOrigin,e.src=d.Mb(d.sg[a]),e.addEventListener?e.addEventListener("load",this.Yj(this.hb[a]),!1):e.onload=this.Yj(this.hb[a]),this.hb[a].Ne=e,d.fc.push(e));for(a=0;a<d.T.length;a++)d.T[a].td||(d.T[a].texture=c.createTexture(),d.od++,c.bindTexture(c.TEXTURE_2D,d.T[a].texture),c.texImage2D(c.TEXTURE_2D,0,c.RGB,1,1,0,c.RGB,c.UNSIGNED_BYTE,null),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MIN_FILTER,c.LINEAR),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_S,c.CLAMP_TO_EDGE),c.texParameteri(c.TEXTURE_2D,
c.TEXTURE_WRAP_T,c.CLAMP_TO_EDGE));d.F.texture=c.createTexture();d.od++;c.bindTexture(c.TEXTURE_2D,d.F.texture);c.texImage2D(c.TEXTURE_2D,0,c.RGB,1,1,0,c.RGB,c.UNSIGNED_BYTE,null);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MIN_FILTER,c.LINEAR);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_S,c.CLAMP_TO_EDGE);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_T,c.CLAMP_TO_EDGE);c.bindTexture(c.TEXTURE_2D,null)};m.prototype.qs=function(){var d=this.u;if(d.D.width!=d.L.offsetWidth||d.D.height!=d.L.offsetHeight)d.D.width=
d.L.offsetWidth,d.D.height=d.L.offsetHeight;d.Ee&&(d.Xc(0),d.Nc());if(d.R){var c=d.R;this.gj();c.clear(c.DEPTH_BUFFER_BIT);c.useProgram(this.P);this.Xf(0);c.uniform1i(this.P.Tf,0);c.enableVertexAttribArray(this.P.ja);c.enableVertexAttribArray(this.P.La);c.bindBuffer(c.ARRAY_BUFFER,this.ze);c.vertexAttribPointer(this.P.La,2,c.FLOAT,!1,0,0);c.activeTexture(c.TEXTURE0);c.bindBuffer(c.ELEMENT_ARRAY_BUFFER,this.jd);c.uniform1f(this.P.mj,1E-4);c.vertexAttribPointer(this.P.ja,3,c.FLOAT,!1,0,0);r.ka.identity(this.yb);
r.ka.perspective(d.Sb(),d.xb.width/d.xb.height,.1,100,this.yb);c.uniformMatrix4fv(this.P.ee,!1,this.yb);for(d=0;6>d;d++)this.Xf(d),c.bindBuffer(c.ARRAY_BUFFER,this.Ej),c.vertexAttribPointer(this.P.ja,3,c.FLOAT,!1,0,0),c.bindBuffer(c.ARRAY_BUFFER,this.ze),c.vertexAttribPointer(this.P.La,2,c.FLOAT,!1,0,0),6<=this.hb.length&&this.hb[d].loaded&&(c.activeTexture(c.TEXTURE0),c.bindTexture(c.TEXTURE_2D,this.hb[d]),c.bindBuffer(c.ELEMENT_ARRAY_BUFFER,this.jd),c.uniform1i(this.P.Tf,0),c.uniformMatrix4fv(this.P.ih,
!1,this.xa),c.uniformMatrix4fv(this.P.ee,!1,this.yb),c.drawElements(c.TRIANGLES,6,c.UNSIGNED_SHORT,0))}};m.prototype.gj=function(){var d=this.u;if(d.v.Pf&&6<d.v.Pf.length){var c=parseInt(d.v.Pf);d.R.clearColor((c>>16&255)/255,(c>>8&255)/255,(c>>0&255)/255,1)}};m.prototype.Xf=function(d,c){void 0===c&&(c=1);var a=this.u;r.ka.identity(this.xa);r.ka.rotate(this.xa,c*-a.V.m*Math.PI/180,[0,0,1]);r.ka.rotate(this.xa,c*-a.A.m*Math.PI/180,[1,0,0]);-1==c?r.ka.rotate(this.xa,-a.pan.m*Math.PI/180,[0,1,0]):r.ka.rotate(this.xa,
(180-a.pan.m)*Math.PI/180,[0,1,0]);a.Oa&&(r.ka.rotate(this.xa,-a.Oa.pitch*Math.PI/180,[1,0,0]),r.ka.rotate(this.xa,a.Oa.V*Math.PI/180,[0,0,1]));4>d?r.ka.rotate(this.xa,-Math.PI/2*d,[0,1,0]):r.ka.rotate(this.xa,Math.PI/2*(5==d?1:-1),[1,0,0])};m.prototype.Qr=function(d){var c=this;return function(){c.Jj.push(d)}};m.prototype.Xo=function(d){this.u.Ma=!0;this.u.ld=!0;d.loaded=!0;d.yk=0;d.ie=0;var c=this.u.R;this.Al();c.pixelStorei(c.UNPACK_FLIP_Y_WEBGL,1);if(null!=d.v&&d.v.complete){d.pb=c.createTexture();
this.u.od++;c.bindTexture(c.TEXTURE_2D,d.pb);try{c.texImage2D(c.TEXTURE_2D,0,c.RGBA,c.RGBA,c.UNSIGNED_BYTE,d.v)}catch(a){c.texImage2D(c.TEXTURE_2D,0,c.RGBA,1,1,0,c.RGBA,c.UNSIGNED_BYTE,new Uint8Array([128,128,128,250])),this.u.O(a)}}this.u.update(2)};m.prototype.Al=function(){this.u.Zb&&this.u.Zb--};m.prototype.Yo=function(){if(0<this.Jj.length){var d=this.Jj.shift();this.Xo(d)}};m.prototype.wq=function(d){var c=this;return function(){c.u.Ma=!0;c.u.ld=!0;var a=c.u.v;try{if(null!=d&&d.complete){var b=
a.levels[a.levels.length-1],e=a.Ea;b.height=b.width=d.width-2*e;b.U=b.ea=1;for(var f=0;6>f;f++){var g=new r.Rd;g.W=document.createElement("canvas");c.u.ia?(g.W.width=b.width+2*e,g.W.height=b.height+2*e):(g.W.width=a.N+2*e,g.W.height=a.N+2*e);g.bb=g.W.getContext("2d");g.W.style[c.u.Va+"Origin"]="0% 0%";g.W.style.overflow="hidden";g.W.style.position="absolute";g.v=d;var h=b.width+2*e,l=b.height+2*e;g.bb&&g.bb.drawImage(d,0,f*l,h,l,0,0,h,l);if(c.u.ia&&c.u.R){var k=c.u.R;k.pixelStorei(k.UNPACK_FLIP_Y_WEBGL,
1);g.pb=k.createTexture();c.u.od++;k.bindTexture(k.TEXTURE_2D,g.pb);try{k.texImage2D(k.TEXTURE_2D,0,k.RGBA,k.RGBA,k.UNSIGNED_BYTE,g.W)}catch(q){c.u.O(q)}k.bindTexture(k.TEXTURE_2D,null);k.pixelStorei(k.UNPACK_FLIP_Y_WEBGL,0)}c.u.cd&&(g.W.Zd=-1,c.u.L.insertBefore(g.W,c.u.L.firstChild));b.ba[f]=g}b.loaded=!0}}catch(q){c.u.O(q)}c.u.update(2)}};m.prototype.Kn=function(d){var c=this;return function(){c.u.Ma=!0;c.u.ld=!0;c.Al();d.v=null}};m.prototype.os=function(){var d=this.u,c=d.v,a=d.v.levels;d.Ee&&
(d.Xc(0),d.Nc());if(d.R){var b=d.R;b.useProgram(this.P);this.gj();b.clear(b.DEPTH_BUFFER_BIT);b.enable(b.DEPTH_TEST);r.ka.identity(this.yb);r.ka.perspective(d.Sb(),d.xb.width/d.xb.height,.1,100,this.yb);b.uniformMatrix4fv(this.P.ee,!1,this.yb);d.Rn();d.lk();var e=d.Oj();var f=a.length-1;for(d.zc=0;f>=e;){var g=a[f],h=1;f==a.length-1&&0==c.Ea&&(h=c.N/(c.N-.5));for(var l=0;6>l;l++){var k=d.cube.faces[l];var q=k.Mf;if(k.ob&&0<q.fg&&0<q.Ih&&0<q.scale||g.cache){k.Ma=!1;k.bounds[f]||(k.bounds[f]={ib:0,
Eb:0,Fb:0,Gb:0});var p=k.bounds[f];g.cache?(p.ib=0,p.Eb=0,p.Fb=g.U-1,p.Gb=g.ea-1):d.im(g,q,p);q=!0;for(var w=p.Eb;w<=p.Gb;w++)for(var x=p.ib;x<=p.Fb;x++){var y=x+w*g.U+l*g.U*g.ea,z=g.ba[y];z||(z=g.ba[y]=new r.Rd);this.Zh()?z.v||(z.ie?z.ie--:(this.xi(z,g,d.ne(l,f,x,w)),d.Ma=!0)):d.zc++;if(z.pb){if(!z.yf){y=.5*f+1;z.yf=b.createBuffer();b.bindBuffer(b.ARRAY_BUFFER,z.yf);var fa=[-1,-1,1,1,-1,1,1,1,1,-1,1,1];fa[3]=x*c.N-c.Ea;fa[0]=Math.min((x+1)*c.N,g.width)+c.Ea;fa[7]=w*c.N-c.Ea;fa[1]=Math.min((w+1)*
c.N,g.height)+c.Ea;fa[4]=fa[1];fa[6]=fa[3];fa[9]=fa[0];fa[10]=fa[7];for(var la=0;12>la;la++)fa[la]=0==la%3?h*y*(-2*fa[la]/g.width+1):1==la%3?h*y*(-2*fa[la]/g.height+1):y;b.bufferData(b.ARRAY_BUFFER,new Float32Array(fa),b.STATIC_DRAW)}}else q=!1;z.visible=k.ob}p.ik=q}}f--}for(l=0;6>l;l++)if(k=d.cube.faces[l],k.ob)for(q=k.Mf,this.Xf(l),b.uniform1i(this.P.Tf,0),b.uniformMatrix4fv(this.P.ee,!1,this.yb),b.uniformMatrix4fv(this.P.ih,!1,this.xa),b.enableVertexAttribArray(this.P.ja),b.enableVertexAttribArray(this.P.La),
b.bindBuffer(b.ARRAY_BUFFER,this.ze),b.vertexAttribPointer(this.P.La,2,b.FLOAT,!1,0,0),b.activeTexture(b.TEXTURE0),b.bindBuffer(b.ELEMENT_ARRAY_BUFFER,this.jd),b.useProgram(this.P),f=e;f<=a.length-1;){g=a[f];if(k.ob&&0<q.fg&&k.bounds[f]&&0<=k.bounds[f].ib){p=k.bounds[f];for(w=p.Eb;w<=p.Gb;w++)for(x=p.ib;x<=p.Fb;x++)y=x+w*g.U+l*g.U*g.ea,(z=g.ba[y])&&z.pb&&(b.uniform1f(this.P.mj,1E-4*(x%2+w%2*2)),b.bindBuffer(b.ARRAY_BUFFER,z.yf),b.vertexAttribPointer(this.P.ja,3,b.FLOAT,!1,0,0),b.bindTexture(b.TEXTURE_2D,
z.pb),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MAG_FILTER,b.LINEAR),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MIN_FILTER,b.LINEAR),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_WRAP_S,b.CLAMP_TO_EDGE),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_WRAP_T,b.CLAMP_TO_EDGE),b.drawElements(b.TRIANGLES,6,b.UNSIGNED_SHORT,0)),z.visible=k.ob;p.ik&&(f=a.length)}f++}this.zk();d.ld=!1}};m.prototype.Zh=function(){return this.u.Zb<this.u.xh};m.prototype.xi=function(d,c,a){var b=this.u;b.bk++;d.v=new Image;d.yk++;d.ie=1<<d.yk;d.v.onload=
this.Qr(d);d.v.onerror=this.Kn(d);d.v.onabort=this.Kn(d);d.v.crossOrigin=b.crossOrigin;d.v.setAttribute("src",a);b.O("load "+a);c.cache&&b.fc.push(d.v);b.Zb++};m.prototype.ao=function(){var d=this.u,c=d.v;d.Ee&&(d.Xc(0),d.Nc());if(d.R){var a=d.R;this.gj();Gh&&a.clearColor(.2,0,0,1);a.clear(a.DEPTH_BUFFER_BIT);a.disable(a.DEPTH_TEST);a.disable(a.CULL_FACE);a.bindBuffer(a.ARRAY_BUFFER,this.Li);var b=[0,0];b[2]=d.D.width;b[3]=0;b[4]=d.D.width;b[5]=d.D.height;b[6]=0;b[7]=d.D.height;a.bufferData(a.ARRAY_BUFFER,
new Float32Array(b),a.STATIC_DRAW);this.u.zc=0;if(!this.Fc||this.Sg)0<c.levels.length?this.Vo():this.Wo();d.F.rd?this.Kq():(a.enable(a.DEPTH_TEST),a.depthRange(0,1),a.depthFunc(a.LESS),this.Xi=!1,0<c.levels.length&&this.ps(),this.Fc&&!this.Xi&&this.Jq())}};m.prototype.Ar=function(d,c,a,b,e,f,g){var h=this.u,l=h.v,k=h.D,q=a*l.N/c.width,p=(a+1)*l.N/c.width;a=b*l.N/c.height;c=(b+1)*l.N/c.height;1<p&&(e*=2,p=1);1<c&&(e*=2,c=1);e=Math.min(this.al,e);p=(p-q)/e;var w=(c-a)/e;b=c=0;l={x:0,y:0};var x={x:0,
y:0},y=0;d.ii=0;var z=h.jh,fa=new r.Ha,la=this.nq;la.rn();4>f?la.Ue(-90*f):la.Nd(5==f?90:-90);h.Oa&&(la.Ve(h.Oa.V),la.Nd(-h.Oa.pitch));la.Ue(-h.pan.m);la.Nd(h.A.m);la.Ve(h.V.m);for(f=0;f<=e;f++)for(var B=0;B<=e;B++){var db=2*(q+B*p)-1;var ja=2*(a+f*w)-1;fa.x=1*db;fa.y=1*ja;fa.z=-1;fa.normalize();la.vq(fa);db=this.em(fa,l,h.Sa());0!=h.yc&&1>z&&(db=db&&this.em(fa,x,h.yc),l.x=l.x*z+x.x*(1-z),l.y=l.y*z+x.y*(1-z));db?-1E10<l.x&&1E10>l.x&&-1E10<l.y&&1E10>l.y?-2<l.x&&2>l.x&&-2<l.y&&2>l.y&&(c+=l.x,b+=l.y,
y++):l.x=NaN:l.x=NaN;d.pd[d.ii++]=l.x;d.pd[d.ii++]=l.y}0<y?(c/=y,b/=y):g=0;for(a=0;a<d.ii;a+=2)l.x=d.pd[a],l.y=d.pd[a+1],h=l.x-c,q=l.y-b,l.x+=h*g,l.y+=q*g,d.pd[a]=k.width/2+l.x*k.width/2,d.pd[a+1]=k.height/2-l.y*k.width/2;this.Br(d,e)};m.prototype.em=function(d,c,a){var b=!0;switch(a){case 0:case 4:a=1/(d.z*this.xk);c.x=-d.x*a;c.y=d.y*a;0<d.z&&(b=!1);break;case 9:1==d.z&&(b=!1);a=1/((1-d.z)*this.Lk);c.x=d.x*a;c.y=-d.y*a;break;case 12:if(a=Math.sqrt(d.x*d.x+d.y*d.y),0==a)c.x=0,c.y=0;else{var e=2*this.Qj*
Math.acos(-d.z)/a;if(2<a)return!1;c.x=e*d.x;c.y=-e*d.y}}return b};m.prototype.Br=function(d,c){for(var a=this.u,b=[],e,f=d.Fd=0;f<c;f++)for(var g=0;g<c;g++){b[0]=f+g*(c+1);b[1]=f+1+g*(c+1);b[2]=f+(g+1)*(c+1);b[3]=f+1+(g+1)*(c+1);e=!0;for(var h=0;4>h;h++)isNaN(d.pd[2*b[0]])&&(e=!1);if(e){var l=!1,k=!1,q=!1,p=!1;for(h=0;4>h;h++){var w=d.pd[2*b[h]];w<a.D.width&&(k=!0);0<=w&&(l=!0);w=d.pd[2*b[h]+1];w<a.D.height&&(q=!0);0<=w&&(p=!0)}if(e=e&&k&&l&&q&&p)d.Je[d.Fd++]=b[0],d.Je[d.Fd++]=b[3],d.Je[d.Fd++]=b[2],
d.Je[d.Fd++]=b[0],d.Je[d.Fd++]=b[1],d.Je[d.Fd++]=b[3]}}};m.prototype.ps=function(){var d=this.u,c=d.v,a=d.v.levels;d.Ee&&(d.Xc(0),d.Nc());if(d.R){var b=d.R,e=this.fn;b.useProgram(e);this.Rk(e);b.enable(b.CULL_FACE);b.cullFace(b.FRONT);b.enable(b.DEPTH_TEST);r.ka.identity(this.yb);r.ka.perspective(d.Sb(),d.xb.width/d.xb.height,.1,100,this.yb);b.uniformMatrix4fv(b.getUniformLocation(e,"uPMatrix"),!1,this.yb);this.u.zc=0;d.lk();var f=d.Oj(),g=0;var h=a.length-1;for(var l={},k=a[h];k.Se&&0<h;)h--,k=a[h];
for(var q=h,p=q,w=0;6>w;w++)for(var x=0;x<k.ea;x++)for(var y=0;y<k.U;y++){var z=y+x*k.U+w*k.U*k.ea;l[z]=1}for(;h>=f;){var fa={};k=a[h];var la=null;0<h&&(la=a[h-1]);var B=!0;for(var db in l)if(l.hasOwnProperty(db)){z=Number(db);var ja=k.ba[z];w=Number(Math.floor(z/(k.U*k.ea)));x=Math.floor((z-w*k.U*k.ea)/k.U);y=Math.floor(z-(x*k.U+w*k.U*k.ea));if(6<=w)console.log("Grrr...");else{var id=this.u.cube.faces[w];id.Ma=!1;ja||(ja=k.ba[z]=new r.Rd,d.O("create "+z));this.Ar(ja,k,y,x,Math.max(1,this.al>>q-h),
w,-(0!=d.yc)?.3:.1);ja.visible=0<ja.Fd||k.cache;ja.si=3;ja.Wg=Date.now();ja.visible&&!ja.pb&&(B=!1,this.Zh()?ja.v||(ja.ie?ja.ie--:(this.xi(ja,k,d.ne(w,h,y,x)),d.Ma=!0)):this.u.zc++);if(la&&(ja.visible||la.cache)){ja=(y*c.N+1)/k.width;y=Math.min(1,((y+1)*c.N-1)/k.width);var tf=(x*c.N+1)/k.height;x=Math.min(1,((x+1)*c.N-1)/k.height);z=c.N/la.width;id=c.N/la.height;var ih=tf;tf=Math.floor(tf*la.height/c.N);do{var hh=ja,kh=Math.floor(ja*la.width/c.N);do{var nh=kh+tf*la.U+w*la.U*la.ea;kh<la.U&&tf<la.ea?
fa[nh]=1:d.O("Grrrr");kh++;hh+=z}while(hh<y);tf++;ih+=id}while(ih<x)}}}B&&(p=h,20>d.fov.m&&h<this.pf&&(this.Xi=!0));l=fa;h--}this.zk();b.uniform1i(b.getUniformLocation(e,"tileTexture"),0);b.activeTexture(b.TEXTURE0);h=f;for(f=-1;h<=Math.min(p,this.pf-1);){k=a[h];for(db in k.ba)if(k.ba.hasOwnProperty(db)){l=Number(db);ja=k.ba[l];w=Math.floor(l/(k.U*k.ea));x=Math.floor((l-w*k.U*k.ea)/k.U);y=Math.floor(l-(x*k.U+w*k.U*k.ea));f!=w&&(f=w,this.hj(w,e));if(g>d.Oe){d.O("Excided painted tiles");this.Xi=!1;
break}ja.pb&&(l=w=c.N,y==k.U-1&&(w=k.width-c.N*y),x==k.ea-1&&(l=k.height-c.N*x),w=(w+2*c.Ea)/c.N,l=(l+2*c.Ea)/c.N,b.bindTexture(b.TEXTURE_2D,ja.pb),b.uniform2f(b.getUniformLocation(e,"uCanvasDimensions"),d.D.width,d.D.height),q=b.getUniformLocation(e,"srcScale"),b.uniform2f(q,.5*k.width/c.N/w,.5*k.height/c.N/l),q=b.getUniformLocation(e,"srcOffset"),b.uniform2f(q,(.5*k.width+c.Ea-c.N*y)/c.N/w,-(.5*k.height+c.Ea-c.N*x)/c.N/l+1),q=b.getUniformLocation(e,"zOffset"),b.uniform1f(q,(h+1)/(a.length+5)),w=
b.getAttribLocation(e,"aVertexPosition"),b.disableVertexAttribArray(0),b.disableVertexAttribArray(1),b.disableVertexAttribArray(2),b.enableVertexAttribArray(w),b.activeTexture(b.TEXTURE0),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MAG_FILTER,b.LINEAR),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MIN_FILTER,b.LINEAR),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_WRAP_S,b.CLAMP_TO_EDGE),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_WRAP_T,b.CLAMP_TO_EDGE),b.bindBuffer(b.ARRAY_BUFFER,this.aq),b.vertexAttribPointer(w,2,b.FLOAT,
!1,0,0),b.bufferData(b.ARRAY_BUFFER,new Float32Array(ja.pd),b.DYNAMIC_DRAW),b.bindBuffer(b.ELEMENT_ARRAY_BUFFER,this.$p),b.bufferData(b.ELEMENT_ARRAY_BUFFER,new Uint16Array(ja.Je),b.DYNAMIC_DRAW),b.drawElements(b.TRIANGLES,ja.Fd,b.UNSIGNED_SHORT,0),g++)}h++}b.disable(b.CULL_FACE);b.cullFace(b.FRONT_AND_BACK);d.ld=!1}};m.prototype.hj=function(d,c){var a=this.u.R;r.ka.identity(this.xa);this.Xf(d,-1);a.uniformMatrix4fv(a.getUniformLocation(c,"matRotate"),!1,this.xa)};m.prototype.Kq=function(){var d=
this.u;if(d.R){var c=d.R,a=this.gn;c.useProgram(a);this.hj(0,a);c.uniform2f(c.getUniformLocation(a,"uCanvasDimensions"),d.D.width,d.D.height);var b=c.getUniformLocation(a,"srcOffset");c.uniform2f(b,.5,.5);1==d.F.format&&(b=c.getUniformLocation(a,"srcScale"),d.Id?(c.uniform2f(b,-.5/Math.PI,(d.F.flipY?-.5:.5)/Math.PI),b=c.getUniformLocation(a,"srcOffset"),d.wh?c.uniform2f(b,.5,.75):c.uniform2f(b,.5,.25)):c.uniform2f(b,-.5/Math.PI,(d.F.flipY?-1:1)/Math.PI));14==d.F.format&&(b=c.getUniformLocation(a,
"srcScale"),c.uniform2f(b,1-2*d.F.kf/(d.F.width/3),1-2*d.F.kf/(d.F.height/2)));this.Rk(a);b=c.getUniformLocation(a,"cubeTexture");c.uniform1i(b,0);b=c.getAttribLocation(a,"aVertexPosition");c.disableVertexAttribArray(0);c.disableVertexAttribArray(1);c.disableVertexAttribArray(2);c.enableVertexAttribArray(b);c.bindBuffer(c.ARRAY_BUFFER,this.Li);c.vertexAttribPointer(b,2,c.FLOAT,!1,0,0);c.activeTexture(c.TEXTURE0);c.bindTexture(c.TEXTURE_2D,d.F.texture);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_S,
c.CLAMP_TO_EDGE);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_T,c.CLAMP_TO_EDGE);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MIN_FILTER,c.LINEAR);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MAG_FILTER,c.LINEAR);c.bindBuffer(c.ELEMENT_ARRAY_BUFFER,this.jd);c.drawElements(c.TRIANGLES,6,c.UNSIGNED_SHORT,0)}};m.prototype.Rk=function(d){var c=this.u,a=c.R,b=this.u.D,e=b.width/b.height;switch(c.fov.mode){case 1:e=1;break;case 2:e=b.width/Math.sqrt(b.width*b.width+b.height*b.height);break;case 3:4*b.height/3<b.width&&
(e=4/3)}b=a.getUniformLocation(d,"rectDstDistance");this.xk=Math.tan(Math.min(c.fov.m,179)/2*Math.PI/180)*e;a.uniform1f(b,this.xk);b=a.getUniformLocation(d,"fisheyeDistance");this.Qj=180/(c.fov.m*Math.PI*e);a.uniform1f(b,this.Qj);b=a.getUniformLocation(d,"stereoDistance");this.Lk=Math.tan(Math.min(c.fov.m,359)/4*Math.PI/180)*e;a.uniform1f(b,this.Lk);b=a.getUniformLocation(d,"directionBlend");a.uniform1f(b,c.jh)};m.prototype.Jq=function(){var d=this.u,c=d.R,a=this.en;c.useProgram(a);c.enable(c.DEPTH_TEST);
this.hj(0,a);c.uniform2f(c.getUniformLocation(a,"uCanvasDimensions"),d.D.width,d.D.height);d=c.getUniformLocation(a,"srcScale");c.uniform2f(d,1,1);d=c.getUniformLocation(a,"srcOffset");c.uniform2f(d,0,0);d=c.getUniformLocation(a,"zOffset");c.uniform1f(d,.9999);this.Rk(a);this.hj(0,a);d=c.getUniformLocation(a,"cubeTexture");c.uniform1i(d,0);a=c.getAttribLocation(a,"aVertexPosition");c.disableVertexAttribArray(0);c.disableVertexAttribArray(1);c.disableVertexAttribArray(2);c.enableVertexAttribArray(a);
c.bindBuffer(c.ARRAY_BUFFER,this.Li);c.vertexAttribPointer(a,2,c.FLOAT,!1,0,0);c.activeTexture(c.TEXTURE0);c.bindTexture(c.TEXTURE_CUBE_MAP,this.Fc);c.texParameteri(c.TEXTURE_CUBE_MAP,c.TEXTURE_WRAP_S,c.CLAMP_TO_EDGE);c.texParameteri(c.TEXTURE_CUBE_MAP,c.TEXTURE_WRAP_T,c.CLAMP_TO_EDGE);c.texParameteri(c.TEXTURE_CUBE_MAP,c.TEXTURE_MIN_FILTER,c.LINEAR);c.texParameteri(c.TEXTURE_CUBE_MAP,c.TEXTURE_MAG_FILTER,c.LINEAR);c.bindBuffer(c.ELEMENT_ARRAY_BUFFER,this.jd);c.drawElements(c.TRIANGLES,6,c.UNSIGNED_SHORT,
0)};m.prototype.Wo=function(){for(var d=this.u,c=d.R,a=[1,3,5,4,0,2],b=!0,e=!0,f=!1,g=0;6>g;g++)this.hb[g].Ne.complete?this.Vh[g]||(f=!0):b=!1,this.hb[g].Of.complete||(e=!1);if(e||b)if(!e||b||!this.Fc||f){g=Math.round(d.Ac/d.bf);e=(d.Ac-g)/2;d.O("paint cube single - isMain: "+b+" overlap: "+e);this.pf=0;this.Fc||(this.Fc=c.createTexture());d.od++;c.bindTexture(c.TEXTURE_CUBE_MAP,this.Fc);c.texParameteri(c.TEXTURE_CUBE_MAP,c.TEXTURE_WRAP_S,c.CLAMP_TO_EDGE);c.texParameteri(c.TEXTURE_CUBE_MAP,c.TEXTURE_WRAP_T,
c.CLAMP_TO_EDGE);c.pixelStorei(c.UNPACK_FLIP_Y_WEBGL,1);f=document.createElement("canvas");f.width=g;f.height=g;var h=f.getContext("2d");for(g=0;6>g;g++){var l=a[g];this.hb[l].Ne.complete?this.Vh[l]||(h.drawImage(this.hb[l].Ne,-e,-e),c.texImage2D(c.TEXTURE_CUBE_MAP_POSITIVE_X+g,0,c.RGBA,c.RGBA,c.UNSIGNED_BYTE,f),this.Vh[l]=!0):(h.drawImage(this.hb[l].Of,-e,-e,d.Ac,d.Ac),c.texImage2D(c.TEXTURE_CUBE_MAP_POSITIVE_X+g,0,c.RGBA,c.RGBA,c.UNSIGNED_BYTE,f))}this.Sg=!b}};m.prototype.Vo=function(){var d=this.u,
c=this.u.v,a=d.v.levels,b=d.R,e;var f=a.length-1;if(!(0>f)){a[f].Se&&f--;var g=512;d.Rg&&(g=256);!d.Sf&&2<=d.devicePixelRatio&&(g=512);for((e=b.getParameter(b.MAX_CUBE_MAP_TEXTURE_SIZE))&&e<g&&(g=e);0<f&&a[f-1].width<=g;)f--;g=a[f];if(0!=g.U){e=f;var h=this.Oo(f);this.Sg&&h&&(this.Sg=!1);h||(f=a.length-1,g=a[f],h||(g.Se?(h=g.loaded,this.kk(f-1)&&(--f,h=!0)):h=this.kk(f)),this.Sg=!0);this.kk(e);if(h&&this.pf>f){g=a[f];d.O("paint cube level "+f);this.pf=f;a=d.v.Ea;f=0<a||1<g.U||1<g.ea;h=e=void 0;f&&
(h=document.createElement("canvas"),h.width=g.width,h.height=g.height,2048>g.width&&(1500<g.width?(h.width=2048,h.height=2048):700<g.width?(h.width=1024,h.height=1024):(h.width=512,h.height=512)),e=h.getContext("2d"));this.Fc=b.createTexture();d.od++;b.bindTexture(b.TEXTURE_CUBE_MAP,this.Fc);b.texParameteri(b.TEXTURE_CUBE_MAP,b.TEXTURE_WRAP_S,b.CLAMP_TO_EDGE);b.texParameteri(b.TEXTURE_CUBE_MAP,b.TEXTURE_WRAP_T,b.CLAMP_TO_EDGE);b.pixelStorei(b.UNPACK_FLIP_Y_WEBGL,1);var l=[1,3,5,4,0,2];c=c.N;for(var k=
0;6>k;k++){for(var q=0;q<g.ea;q++)for(var p=0;p<g.U;p++){var w=p+q*g.U+l[k]*g.U*g.ea,x=g.ba[w],y=x.v;x.W&&(y=x.W);y?f?(w=h.width/g.width,e.drawImage(y,w*(p*c-a),w*(q*c-a),w*y.width,w*y.height)):b.texImage2D(b.TEXTURE_CUBE_MAP_POSITIVE_X+k,0,b.RGBA,b.RGBA,b.UNSIGNED_BYTE,y):(d.O("WTF?!"),d.O(w),d.O(x))}f&&b.texImage2D(b.TEXTURE_CUBE_MAP_POSITIVE_X+k,0,b.RGBA,b.RGBA,b.UNSIGNED_BYTE,h)}}}}};m.prototype.kk=function(d){var c=this.u,a=c.v.levels[d];if(0==a.U)return!1;var b=!0;a.cache=!0;for(var e=0;6>e;e++)for(var f=
0;f<a.ea;f++)for(var g=0;g<a.U;g++){var h=g+f*a.U+e*a.U*a.ea,l=a.ba[h];l||(l=a.ba[h]=new r.Rd);this.Zh()?l.v||(l.ie?l.ie--:(this.xi(l,a,c.ne(e,d,g,f)),c.Ma=!0)):this.u.zc++;l.pb||(b=!1,c.Ma=!0)}b&&(a.loaded=!0);return b};m.prototype.Oo=function(d){d=this.u.v.levels[d];if(0==d.U)return!1;for(var c=0;6>c;c++)for(var a=0;a<d.ea;a++)for(var b=0;b<d.U;b++){var e=d.ba[b+a*d.U+c*d.U*d.ea];if(!e||!e.pb)return!1}return d.loaded=!0};m.prototype.ready=function(){return null!=this.Fc};m.prototype.zk=function(){for(var d=
this.u,c=d.v.levels,a=d.R,b=Date.now(),e=c.length-1;0<=e;e--){var f=c[e];if(!f.cache)for(var g in f.ba)if(f.ba.hasOwnProperty(g)){var h=f.ba[g];0<h.si&&h.si--;h.visible||0<h.si?(h.visible&&(h.Wg=b),h=this.Xd.indexOf(h),-1!==h&&this.Xd.splice(h,1)):-1===this.Xd.indexOf(h)&&(h.level=f,this.Xd.push(h))}}if(this.Xd.length>1.1*d.In)for(this.Xd.sort(function(l,k){return k.Wg-l.Wg});this.Xd.length>d.In;)h=this.Xd.pop(),h.pb&&(a.deleteTexture(h.pb),d.od--,h.pb=0),h.v=null,h.yf&&(a.deleteBuffer(h.yf),h.yf=
0),g=h.level.ba.indexOf(h),d.O("delete "+g+" "+(b-h.Wg)),delete h.level.ba[g]};m.prototype.gs=function(){var d=this.u;if(d.R){var c=this.u.R;c.disable(c.DEPTH_TEST);var a;for(a=0;a<d.T.length;a++){var b=d.T[a];if(!b.td){r.ka.identity(this.xa);r.ka.rotate(this.xa,-d.V.m*Math.PI/180,[0,0,1]);r.ka.rotate(this.xa,-d.A.m*Math.PI/180,[1,0,0]);r.ka.rotate(this.xa,(180-d.pan.m)*Math.PI/180,[0,1,0]);r.ka.rotate(this.xa,b.pan*Math.PI/180,[0,1,0]);r.ka.rotate(this.xa,-b.A*Math.PI/180,[1,0,0]);r.ka.translate(this.xa,
[0,0,1]);r.ka.rotate(this.xa,b.jb*Math.PI/180,[0,0,1]);r.ka.rotate(this.xa,-b.Ka*Math.PI/180,[0,1,0]);r.ka.rotate(this.xa,b.Ga*Math.PI/180,[1,0,0]);var e=Math.tan(b.fov/2*Math.PI/180),f=b.aspect;f||(f=16/9);r.ka.scale(this.xa,[e,e/f,1]);r.ka.translate(this.xa,[0,0,-1]);c.bindBuffer(c.ARRAY_BUFFER,this.Ej);c.vertexAttribPointer(this.P.ja,3,c.FLOAT,!1,0,0);c.bindBuffer(c.ARRAY_BUFFER,this.ze);c.vertexAttribPointer(this.P.La,2,c.FLOAT,!1,0,0);c.activeTexture(c.TEXTURE0);c.bindTexture(c.TEXTURE_2D,b.texture);
c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MAG_FILTER,c.LINEAR);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MIN_FILTER,c.LINEAR);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_S,c.CLAMP_TO_EDGE);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_T,c.CLAMP_TO_EDGE);c.bindBuffer(c.ELEMENT_ARRAY_BUFFER,this.jd);c.uniform1i(this.P.Tf,0);c.uniformMatrix4fv(this.P.ih,!1,this.xa);c.uniformMatrix4fv(this.P.ee,!1,this.yb);c.drawElements(c.TRIANGLES,6,c.UNSIGNED_SHORT,0)}}c.enable(c.DEPTH_TEST)}};m.prototype.fs=function(){var d=
this.u,c;if(d.D.width!=d.L.offsetWidth||d.D.height!=d.L.offsetHeight)d.D.width=d.L.offsetWidth,d.D.height=d.L.offsetHeight;d.Ee&&(d.Xc(0),d.Nc());if(d.R){var a=d.R;a.useProgram(this.P);r.ka.identity(this.yb);r.ka.perspective(d.Sb(),d.xb.width/d.xb.height,.1,100,this.yb);a.uniformMatrix4fv(this.P.ee,!1,this.yb);this.Xf(0);a.uniform1i(this.P.Tf,0);a.uniformMatrix4fv(this.P.ee,!1,this.yb);a.uniformMatrix4fv(this.P.ih,!1,this.xa);a.enableVertexAttribArray(this.P.ja);a.enableVertexAttribArray(this.P.La);
a.bindBuffer(a.ARRAY_BUFFER,this.ze);a.vertexAttribPointer(this.P.La,2,a.FLOAT,!1,0,0);a.activeTexture(a.TEXTURE0);a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,this.jd);a.uniform1f(this.P.mj,1E-4);a.vertexAttribPointer(this.P.ja,3,a.FLOAT,!1,0,0);a.bindTexture(a.TEXTURE_2D,d.F.texture);for(c=0;1>c;c++)this.Xf(0),a.bindBuffer(a.ARRAY_BUFFER,d.F.Wk),a.vertexAttribPointer(this.P.ja,3,a.FLOAT,!1,0,0),a.bindBuffer(a.ARRAY_BUFFER,d.F.Zi),a.vertexAttribPointer(this.P.La,2,a.FLOAT,!1,0,0),a.activeTexture(a.TEXTURE0),
a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,d.F.ck),a.uniform1i(this.P.Tf,0),a.uniformMatrix4fv(this.P.ih,!1,this.xa),a.uniformMatrix4fv(this.P.ee,!1,this.yb),a.drawElements(a.TRIANGLES,36,a.UNSIGNED_SHORT,0)}};m.prototype.es=function(){var d=this.u,c=d.R,a=d.F;if(0<d.T.length)for(var b=0;b<d.T.length;b++){var e=d.T[b];if(!e.td&&e.isRunning&&e.hi!=e.j.currentTime&&(e.hi=e.j.currentTime,!e.aspect&&0<e.j.videoHeight&&(e.aspect=e.j.videoWidth/e.j.videoHeight),d.Fh))try{e.texture&&(c.bindTexture(c.TEXTURE_2D,
e.texture),c.texImage2D(c.TEXTURE_2D,0,c.RGB,c.RGB,c.UNSIGNED_BYTE,e.j),d.update())}catch(g){d.O(g)}}if(a.j&&(b=Number(a.j.currentTime),a.hi!=b)){a.hi=b;try{var f=0<a.j.readyState;d.oi&&a.rd&&(f=f&&0<a.j.currentTime);a.texture&&a.ri&&f&&(a.rd=!0,a.width=a.j.videoWidth,a.height=a.j.videoHeight,c.pixelStorei(c.UNPACK_FLIP_Y_WEBGL,d.F.flipY),c.bindTexture(c.TEXTURE_2D,a.texture),c.texImage2D(c.TEXTURE_2D,0,c.RGB,c.RGB,c.UNSIGNED_BYTE,a.j),a.Hn=!0,d.update())}catch(g){d.O(g)}}};m.prototype.Wm=function(){var d,
c,a=this.u,b=this.u.R;a.Ia.style.visibility="hidden";a.I.Ug!=a.I.mode&&(a.I.Ug=a.I.mode);if((0<=a.I.mode||0<a.I.ub.length)&&!a.K.zh){var e=1;0>=a.I.mode&&(e=0);3==a.I.mode&&(e=a.I.Ba);for(d=0;d<a.X.length;d++){var f=a.X[d];if("poly"==f.type){var g=f.ge,h=e;2==a.I.mode&&(h=f.Ba);var l=a.I.ub.indexOf(f.id);-1!=l&&(h=a.I.Yb[l]);if(0<g.length){l=[];for(c=0;c<g.length;c++)l.push(g[c].Wb),l.push(g[c].Ab),l.push(0);b.useProgram(this.Ld);b.enable(b.BLEND);b.blendFuncSeparate(b.SRC_ALPHA,b.ONE_MINUS_SRC_ALPHA,
b.SRC_ALPHA,b.ONE);b.disable(b.DEPTH_TEST);g=b.createBuffer();b.bindBuffer(b.ARRAY_BUFFER,g);b.bufferData(b.ARRAY_BUFFER,new Float32Array(l),b.STATIC_DRAW);b.uniform2f(b.getUniformLocation(this.Ld,"uCanvasDimensions"),a.D.width,a.D.height);g=b.getUniformLocation(this.Ld,"uColor");c=f.dc;b.uniform3f(g,(c>>16&255)/255,(c>>8&255)/255,(c&255)/255);var k=b.getUniformLocation(this.Ld,"uAlpha");b.uniform1f(k,f.cc*h);b.vertexAttribPointer(this.Ld.ja,3,b.FLOAT,!1,0,0);b.drawArrays(b.LINE_LOOP,0,l.length/3);
c=f.bc;b.uniform3f(g,(c>>16&255)/255,(c>>8&255)/255,(c&255)/255);b.uniform1f(k,f.ac*h);b.enable(b.STENCIL_TEST);b.clearStencil(0);b.clear(b.STENCIL_BUFFER_BIT);b.colorMask(!1,!1,!1,!1);b.stencilFunc(b.ALWAYS,1,1);b.stencilOp(b.INCR,b.INCR,b.INCR);b.drawArrays(b.TRIANGLE_FAN,0,l.length/3);b.colorMask(!0,!0,!0,!0);b.stencilFunc(b.EQUAL,1,1);b.stencilOp(b.ZERO,b.ZERO,b.ZERO);b.drawArrays(b.TRIANGLE_FAN,0,l.length/3);b.disable(b.BLEND);b.enable(b.DEPTH_TEST);b.disable(b.STENCIL_TEST);b.useProgram(this.P)}}}}};
m.prototype.Qk=function(){var d=this.u,c=d.v;if(d.D.width!=d.L.offsetWidth||d.D.height!=d.L.offsetHeight)d.D.width=d.L.offsetWidth,d.D.height=d.L.offsetHeight;d.Ee&&(d.Xc(0),d.Nc());if(d.R){var a=d.R;this.gj();a.clear(a.COLOR_BUFFER_BIT|a.DEPTH_BUFFER_BIT);a.disable(a.DEPTH_TEST);a.disable(a.CULL_FACE);a.useProgram(this.zg);var b=a.getUniformLocation(this.zg,"uRect");a.uniform2f(a.getUniformLocation(this.zg,"uCanvasDimensions"),d.D.width,d.D.height);a.activeTexture(a.TEXTURE0);a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,
this.jd);var e=a.getAttribLocation(this.zg,"aVertexPosition");a.disableVertexAttribArray(0);a.disableVertexAttribArray(1);a.disableVertexAttribArray(2);a.enableVertexAttribArray(e);a.bindBuffer(a.ARRAY_BUFFER,this.ze);a.vertexAttribPointer(e,2,a.FLOAT,!1,0,0);d.zc=0;var f=100/d.fov.m;var g=c.width/c.height;e=d.D.height*f*g;f*=d.D.height;g=(d.pan.m/100/g-.5)*e+d.D.width/2;for(var h=(d.A.m/100-.5)*f+d.D.height/2,l,k,q,p=0;c.levels.length>=p+2&&c.levels[p+1].width>e;)p++;var w;var x=[];for(w=c.levels.length-
1;w>=p;){var y=c.levels[w];if(y.cache){var z={ib:0,Eb:0};z.Fb=y.U-1;z.Gb=y.ea-1}else{z={};l=-h/f*(y.height/d.v.N);k=(-g+d.D.width)/e*(y.width/d.v.N);var fa=(-h+d.D.height)/f*(y.height/d.v.N);z.ib=Math.min(Math.max(0,Math.floor(-g/e*(y.width/d.v.N))),y.U-1);z.Eb=Math.min(Math.max(0,Math.floor(l)),y.ea-1);z.Fb=Math.min(Math.max(0,Math.floor(k)),y.U-1);z.Gb=Math.min(Math.max(0,Math.floor(fa)),y.ea-1)}x[w]=z;var la=!0;for(k=z.Eb;k<=z.Gb;k++)for(l=z.ib;l<=z.Fb;l++)q=l+k*y.U,fa=y.ba[q],fa||(fa=new r.Rd,
y.ba[q]=fa),this.Zh()?fa.v||(this.xi(fa,y,d.ne(0,w,l,k)),d.Ma=!0):this.u.zc++,fa.v&&fa.v.complete||(la=!1),fa.visible=!0;z.ik=la;w--}for(w=c.levels.length-1;w>=p;){y=c.levels[w];if(x[w]&&0<=x[w].ib)for(z=x[w],k=z.Eb;k<=z.Gb;k++)for(l=z.ib;l<=z.Fb;l++)q=l+k*y.U,(fa=y.ba[q])&&fa.v&&fa.v.complete&&(d=g+(-c.Ea+c.N*l)*e/y.width,a.uniform4f(b,d,h+(-c.Ea+c.N*k)*f/y.height,fa.v.width*e/y.width,fa.v.height*f/y.height),fa&&fa.pb&&(a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,this.jd),a.bindTexture(a.TEXTURE_2D,fa.pb),
a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,a.LINEAR),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.LINEAR),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE),a.drawElements(a.TRIANGLES,6,a.UNSIGNED_SHORT,0)));w--}this.zk()}};m.prototype.je=function(){var d=this.u.R;if(d&&this.hb)for(;0<this.hb.length;){var c=this.hb.pop();c.zq=!0;d.deleteTexture(c)}this.Fc&&(d.deleteTexture(this.Fc),this.Fc=null);this.pf=1E6;this.Vh=
[!1,!1,!1,!1,!1,!1]};return m}();r.qo=n})(ggP2VR||(ggP2VR={}));
(function(r){var n=function(){return function(){this.Mf={Bg:1,Cg:1,bh:0,dh:0,fg:0,Ih:0,scale:1};this.ob=!0;this.bounds=[]}}(),m=function(){function d(){var c;this.faces=Array(6);for(c=0;6>c;c++)this.faces[c]=new n}d.prototype.Po=function(c,a,b,e){for(var f=0;6>f;f++){var g;if(g=this.faces[f]){var h=[];h.push(new r.Ha(-1,-1,-1,0,0));h.push(new r.Ha(1,-1,-1,1,0));h.push(new r.Ha(1,1,-1,1,1));h.push(new r.Ha(-1,1,-1,0,1));for(var l=0;l<h.length;l++)4>f?h[l].Ka(-Math.PI/2*f):h[l].Ga(Math.PI/2*(4===f?
-1:1)),e&&(h[l].jb(e.V*Math.PI/180),h[l].Ga(-e.pitch*Math.PI/180)),h[l].Ka(-c*Math.PI/180),h[l].Ga(a*Math.PI/180),h[l].jb(b*Math.PI/180);g.ob=0<h.length}}};return d}();r.mo=m})(ggP2VR||(ggP2VR={}));
(function(r){r.lo=function(){return function(){this.levels=[];this.Pf="0x000000";this.$m=!1;this.Lm=this.Km=.4;this.N=512;this.Ea=1;this.hk=0;this.jk="";this.jn=this.height=this.width=0}}();r.bl=function(){return function(){this.height=this.width=0;this.Se=this.cache=!1;this.ea=this.U=0;this.loaded=!1;this.ba=[]}}();r.Rd=function(){return function(){this.loaded=this.visible=!1;this.ie=this.yk=0;this.pd=[];this.ii=0;this.Je=[];this.si=this.Wg=this.Fd=0}}()})(ggP2VR||(ggP2VR={}));
(function(r){r.ho=function(){return function(n,m){this.u=n;this.Da=m;var d=this.__div=document.createElement("div");var c=document.createElement("img");if(m.Sc){var a=m.Sc;c.setAttribute("style","position: absolute;width: "+m.Ae+"px; height: "+m.Bd+"px;top: -"+m.Bd/2+"px;left: -"+m.Ae/2+"px; "+n.Pa+"user-select: none; max-width: none;")}else a="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA5xJREFUeNqclmlIVFEUx997TjrplFQW2WKBBSYtRFlpWUILSSsRZRQIBdGHCFqIoKIvQRsUFRJC9LEgaSFbMMpcWi1pLzOLsjItKms0U5t5/c/wH7nc5o2jF374xrv87z33nHOPaRsRtbFgDpgJxoD+wATfwDNQDK6CyrCr5OcbhgiGIRsUAZt4QTWoIFXgp9JfAhY7rgdBl8NeBoLDYBloA+dBOagFTcDHcVEgDgwBGWA+OAcugvXgvb5wKMGJoAAMp9BpUA96EBf/Btsf8BI8AWfAErAcpHHDZeriliY2AVwDg8AucAQ0Ag+I4XhTm2Oxz8PT46KMbTx5EZjuJDgAnAVusJUm9DhYwalFcc59sIXXIaceFkowDySBPTRPL20xm+b7zYXa+N3CPrWJ6GuwGySA40HLBHc/GywFhbS5R1lEBrZy7FQwiSaX9pmnqeAYt+KUcew7BVZw/QKTq0ocpYPVvDOXItZCk2xgDIZqL8BR8Ab0VDbr4yZOgLeIwzQx6WiQxcCt1+6sld66L4yYtFSwF4yg2dU7/cEwGW9YVkAwmycp1dzdpvgm0DcCh4kHmxWzBls0uBX4qqmZJ4KzePm1IeJLgjmlC16aDKZpp5Q168B3o6wsSwTHgU+MIUs74RSj6y1d+212HKimJlUE+tFRfJpYtOKNXWmJTASqWf2Bu/R6+4TKHOrOzG4IhptjWgHbGkZvepQ6SQK7oRuCXzjX1DJavBEX1ygfT8FgBqpfm1zRDcEKbR2bsZlkJCdXieB1ZhZ5YtqVgXIPN+m9kbY6hpdb+d9fPncJRmZmqQheZkemJmgxyxykl3XWJEkcAl7N21s7PDcl5ZJ0PAa3wVwmWtVbZafPwQ7wLozYB7ATPNJO56d/LAikP9u+66KNJS1d4IOZp7wU0hfLukUyzgwm70T2N/DOxIy/eFdqawa5DL2NEGwP5k15Ja4woz9glvcomd9NzyvkFcQo5gomaLfm5c0svnKZ2k7q7+FauvR2MJKZR3+sY5WgtvkdG6JyELGhNHMTXyGfLviRJ5Tcd4Dlhle7086Sgp8CqVxDkn4OqHaqacr5ekjy3Q/W0FRNNGmoMtamdzdxsytZC0lqXKhEgWPVVgImg2NgFT1MHOoOk3yLEtgWN5TEOYvoIFI1rGM19//2wpAD7imF7lfwENwAxaASNCj90pcLLKdC2Iyw1M9gnEplMEp5kOU1f8WwKGJm8oUr9f8JMAAVMDM6HSDa9QAAAABJRU5ErkJggg%3D%3D",
c.setAttribute("style","position: absolute;width: 28px; height: 28px;top: -14px;left: -14px; "+n.Pa+"user-select: none; max-width: none;");c.setAttribute("src",a);c.ondragstart=function(){return!1};d.appendChild(c);a="position:absolute;"+(n.Pa+"user-select: none;");a+=n.Pa+"touch-callout: none;";a+=n.Pa+"tap-highlight-color: rgba(0,0,0,0);";n.Yc&&!n.ia&&(a+=n.Pa+"transform: translateZ(9999999px);");d.setAttribute("style",a);d.onclick=function(){n.Uf(m);n.rk(m.url,m.target);n.la&&n.la.hotspotProxyClick&&
n.la.hotspotProxyClick(m.id,m.url)};d.ondblclick=function(){n.la&&n.la.hotspotProxyDoubleClick&&n.la.hotspotProxyDoubleClick(m.id,m.url)};var b=n.I.aj;if(b.enabled&&""!=m.title){var e=document.createElement("div");a="position:absolute;";a=m.Sc?a+("top:\t "+m.Bd/2+"px;"):a+"top:\t 20px;";a=b.lj?a+"white-space: pre-wrap;":a+"white-space: nowrap;";a+=n.Pa+"transform-origin: 50% 50%;";e.setAttribute("style",a+"visibility: hidden;overflow: hidden;padding: 0px 1px 0px 1px;font-size: 13px;");e.style.color=
this.u.fa(b.bj,b.$i);e.style.backgroundColor=b.background?this.u.fa(b.bc,b.ac):"transparent";e.style.border="solid "+this.u.fa(b.dc,b.cc)+" "+b.Sh+"px";e.style.borderRadius=b.rj+"px";e.style.textAlign="center";0<b.width?(e.style.left=-b.width/2+"px",e.style.width=b.width+"px"):e.style.width="auto";e.style.height=0<b.height?b.height+"px":"auto";e.style.overflow="hidden";e.innerHTML=m.title;d.onmouseover=function(){0==b.width&&(e.style.left=-e.offsetWidth/2+"px");e.style.visibility="inherit";n.la&&
n.la.hotspotProxyOver&&n.la.hotspotProxyOver(m.id,m.url)};d.onmouseout=function(){e.style.visibility="hidden";n.la&&n.la.hotspotProxyOut&&n.la.hotspotProxyOut(m.id,m.url)};d.appendChild(e)}}}()})(ggP2VR||(ggP2VR={}));(function(r){r.Qc=function(){return function(){this.value=this.time=0;this.Vk="";this.ye=this.xe=this.we=this.ve=this.tb=this.type=this.Cb=0;this.Oh=""}}();r.Zk=function(){return function(){this.Xr=this.zo=this.length=0}}();r.Yk=function(){return function(){}}()})(ggP2VR||(ggP2VR={}));
(function(r){var n=function(){function m(d){this.u=d;this.enabled=!1;this.lg=1;this.lf=0;this.type="crossdissolve";this.qc=this.sa=this.Mc=0;this.gg=5;this.te=1;this.hg=!1;this.af=this.$e=this.Kk=0;this.Qd=70;this.eo=0;this.Db=this.co=1;this.Lh=this.Kh=.5;this.ue=!1;this.Hj=1}m.prototype.Og=function(){var d=this.u.R,c=d.createShader(d.VERTEX_SHADER);d.shaderSource(c,"attribute vec3 aVertexPosition;\nattribute vec2 aTextureCoord;\nvarying vec2 vTextureCoord;\nuniform bool uZoomIn;\nuniform float uZoomFactor;\nuniform vec2 uZoomCenter;\nvoid main(void) {\n\t gl_Position = vec4(aVertexPosition, 1.0);\n\t if(!uZoomIn) {\n\t \n\t vTextureCoord = aTextureCoord;\n\t }\n\t else {\n\t vTextureCoord = (aTextureCoord - vec2(0.5, 0.5)) * (1.0/uZoomFactor) + uZoomCenter;\n\t }\n}\n");
d.compileShader(c);d.getShaderParameter(c,d.COMPILE_STATUS)||(alert(d.getShaderInfoLog(c)),c=null);var a=d.createShader(d.FRAGMENT_SHADER);d.shaderSource(a,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nvarying vec2 vTextureCoord;\nuniform float uAlpha;\nuniform sampler2D uSampler;\nvoid main(void) {\n vec4 textureColor = texture2D(uSampler, vec2(vTextureCoord.s, vTextureCoord.t));\n gl_FragColor = vec4(textureColor.x, textureColor.y, textureColor.z, uAlpha);\n}\n");
d.compileShader(a);d.getShaderParameter(a,d.COMPILE_STATUS)||(alert(d.getShaderInfoLog(a)),a=null);this.za=d.createProgram();d.attachShader(this.za,c);d.attachShader(this.za,a);d.linkProgram(this.za);d.getProgramParameter(this.za,d.LINK_STATUS)||alert("Could not initialise shaders");this.za.ja=d.getAttribLocation(this.za,"aVertexPosition");d.enableVertexAttribArray(this.za.ja);this.za.La=d.getAttribLocation(this.za,"aTextureCoord");d.enableVertexAttribArray(this.za.La);a=d.createShader(d.FRAGMENT_SHADER);
d.shaderSource(a,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nvarying vec2 vTextureCoord;\nuniform float uColorPercent;\nuniform float uAlpha;\nuniform vec3 uDipColor;\nuniform sampler2D uSampler;\nvoid main(void) {\n vec4 textureColor = texture2D(uSampler, vec2(vTextureCoord.s, vTextureCoord.t));\n gl_FragColor = vec4(textureColor.x * (1.0 - uColorPercent) + uDipColor.x * uColorPercent, textureColor.y * (1.0 - uColorPercent) + uDipColor.y * uColorPercent, textureColor.z * (1.0 - uColorPercent) + uDipColor.z * uColorPercent, uAlpha);\n}\n");
d.compileShader(a);d.getShaderParameter(a,d.COMPILE_STATUS)||(alert(d.getShaderInfoLog(a)),a=null);this.fb=d.createProgram();d.attachShader(this.fb,c);d.attachShader(this.fb,a);d.linkProgram(this.fb);d.getProgramParameter(this.fb,d.LINK_STATUS)||alert("Could not initialise shaders");this.fb.ja=d.getAttribLocation(this.fb,"aVertexPosition");d.enableVertexAttribArray(this.fb.ja);this.fb.La=d.getAttribLocation(this.fb,"aTextureCoord");d.enableVertexAttribArray(this.fb.La);a=d.createShader(d.FRAGMENT_SHADER);
d.shaderSource(a,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nvarying vec2 vTextureCoord;\nuniform bool uRound;\nuniform float uRadius;\nuniform vec2 uRectDim;\nuniform vec2 uIrisCenter;\nuniform float uSoftEdge;\nuniform sampler2D uSampler;\nvoid main(void) {\n float alpha = 0.0;\n vec4 textureColor = texture2D(uSampler, vec2(vTextureCoord.s, vTextureCoord.t));\n if (uRound) {\n\t vec2 diff = uIrisCenter - gl_FragCoord.xy;\n\t float distFromCenter = sqrt( (diff.x * diff.x) + (diff.y * diff.y) );\n\t if (distFromCenter > uRadius) {\n alpha = 1.0;\n } else {\n alpha = 1.0 - ((uRadius - distFromCenter) / uSoftEdge);\n };\n }\n else {\n float alphaFromLeft = 1.0 - ((gl_FragCoord.x -(uIrisCenter.x - uRectDim.x)) / uSoftEdge);\n float alphaFromRight = 1.0 - (((uIrisCenter.x + uRectDim.x) - gl_FragCoord.x) / uSoftEdge);\n float alphaFromTop = 1.0 - ((gl_FragCoord.y -(uIrisCenter.y - uRectDim.y)) / uSoftEdge);\n float alphaFromBottom = 1.0 - (((uIrisCenter.y + uRectDim.y) - gl_FragCoord.y) / uSoftEdge);\n alpha = max(max(alphaFromLeft, alphaFromRight), max(alphaFromTop, alphaFromBottom));\n }\n gl_FragColor = vec4(textureColor.x, textureColor.y, textureColor.z, alpha);\n}\n");
d.compileShader(a);d.getShaderParameter(a,d.COMPILE_STATUS)||(alert(d.getShaderInfoLog(a)),a=null);this.Ua=d.createProgram();d.attachShader(this.Ua,c);d.attachShader(this.Ua,a);d.linkProgram(this.Ua);d.getProgramParameter(this.Ua,d.LINK_STATUS)||alert("Could not initialise shaders");this.Ua.ja=d.getAttribLocation(this.Ua,"aVertexPosition");d.enableVertexAttribArray(this.Ua.ja);this.Ua.La=d.getAttribLocation(this.Ua,"aTextureCoord");d.enableVertexAttribArray(this.Ua.La);a=d.createShader(d.FRAGMENT_SHADER);
d.shaderSource(a,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nvarying vec2 vTextureCoord;\nuniform float uPercent;\nuniform int uDirection;\nuniform vec2 uCanvasDimensions;\nuniform float uSoftEdge;\nuniform sampler2D uSampler;\nvoid main(void) {\n vec4 textureColor = texture2D(uSampler, vec2(vTextureCoord.s, vTextureCoord.t));\n float alpha = 0.0;\n if (uDirection == 1) {\n\t if (gl_FragCoord.x > uPercent) {\n alpha = 1.0; \n } else {\n alpha = 1.0 - ((uPercent - gl_FragCoord.x) / uSoftEdge);\n }\n }\n if (uDirection == 2) {\n\t if (gl_FragCoord.x < uCanvasDimensions.x - uPercent) {\n alpha = 1.0; \n } else {\n alpha = 1.0 - ((gl_FragCoord.x - (uCanvasDimensions.x - uPercent)) / uSoftEdge);\n }\n }\n if (uDirection == 3) {\n\t if (gl_FragCoord.y < uCanvasDimensions.y - uPercent) {\n alpha = 1.0; \n } else {\n alpha = 1.0 - ((gl_FragCoord.y - (uCanvasDimensions.y - uPercent)) / uSoftEdge);\n }\n }\n if (uDirection == 4) {\n\t if (gl_FragCoord.y > uPercent) {\n alpha = 1.0; \n } else {\n alpha = 1.0 - ((uPercent - gl_FragCoord.y) / uSoftEdge);\n }\n }\n gl_FragColor = vec4(textureColor.x, textureColor.y, textureColor.z, alpha);\n}\n");
d.compileShader(a);d.getShaderParameter(a,d.COMPILE_STATUS)||(alert(d.getShaderInfoLog(a)),a=null);this.Za=d.createProgram();d.attachShader(this.Za,c);d.attachShader(this.Za,a);d.linkProgram(this.Za);d.getProgramParameter(this.Za,d.LINK_STATUS)||alert("Could not initialise shaders");this.Za.ja=d.getAttribLocation(this.Za,"aVertexPosition");d.enableVertexAttribArray(this.Za.ja);this.Za.La=d.getAttribLocation(this.Za,"aTextureCoord");d.enableVertexAttribArray(this.Za.La)};m.prototype.Xc=function(){var d=
this.u.R;if(!d)return!1;if(this.pc=d.createFramebuffer()){d.bindFramebuffer(d.FRAMEBUFFER,this.pc);this.pc.width=1024;this.pc.height=1024;this.cf=d.createTexture();d.bindTexture(d.TEXTURE_2D,this.cf);d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MIN_FILTER,d.LINEAR);d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MAG_FILTER,d.LINEAR);d.texImage2D(d.TEXTURE_2D,0,d.RGBA,this.pc.width,this.pc.height,0,d.RGBA,d.UNSIGNED_BYTE,null);var c=d.createRenderbuffer();d.bindRenderbuffer(d.RENDERBUFFER,c);d.renderbufferStorage(d.RENDERBUFFER,
d.DEPTH_COMPONENT16,this.pc.width,this.pc.height);d.framebufferTexture2D(d.FRAMEBUFFER,d.COLOR_ATTACHMENT0,d.TEXTURE_2D,this.cf,0);d.framebufferRenderbuffer(d.FRAMEBUFFER,d.DEPTH_ATTACHMENT,d.RENDERBUFFER,c);d.bindTexture(d.TEXTURE_2D,null);d.bindRenderbuffer(d.RENDERBUFFER,null);d.bindFramebuffer(d.FRAMEBUFFER,null);this.sb=d.createBuffer();d.bindBuffer(d.ARRAY_BUFFER,this.sb);d.bufferData(d.ARRAY_BUFFER,new Float32Array([-1,-1,0,1,-1,0,-1,1,0,1,1,0]),d.STATIC_DRAW);this.sb.itemSize=3;this.sb.de=
4;this.Qf=d.createBuffer();d.bindBuffer(d.ARRAY_BUFFER,this.Qf);d.bufferData(d.ARRAY_BUFFER,new Float32Array([0,0,1,0,0,1,1,1]),d.STATIC_DRAW);return!0}return!1};m.prototype.Xm=function(d){var c=this.u.R,a=this.u.xb;if(this.xd){c.useProgram(this.za);c.bindBuffer(c.ARRAY_BUFFER,this.sb);c.vertexAttribPointer(this.za.ja,this.sb.itemSize,c.FLOAT,!1,0,0);c.bindBuffer(c.ARRAY_BUFFER,this.Qf);c.vertexAttribPointer(this.za.La,2,c.FLOAT,!1,0,0);c.enableVertexAttribArray(this.za.ja);c.enableVertexAttribArray(this.za.La);
c.activeTexture(c.TEXTURE0);c.bindTexture(c.TEXTURE_2D,this.cf);a=1+(this.Db-1)*d;var b=c.getUniformLocation(this.za,"uAlpha");c.uniform1f(b,1);b=c.getUniformLocation(this.za,"uZoomIn");c.uniform1i(b,1);b=c.getUniformLocation(this.za,"uZoomCenter");var e=.5+(this.Kh-.5)*Math.sqrt(d),f=.5+(this.Lh-.5)*Math.sqrt(d);0>e-.5/a&&(e=.5/a);0>f-.5/a&&(f=.5/a);1<e+.5/a&&(e=1-.5/a);1<f+.5/a&&(f=1-.5/a);c.uniform2f(b,e,f);e=c.getUniformLocation(this.za,"uZoomFactor");c.uniform1f(e,a);c.uniform1i(c.getUniformLocation(this.za,
"uSampler"),0);c.drawArrays(c.TRIANGLE_STRIP,0,this.sb.de);c.useProgram(this.u.ya.P)}else{this.u.Ch();c.blendFuncSeparate(c.SRC_ALPHA,c.ONE_MINUS_SRC_ALPHA,c.SRC_ALPHA,c.ONE);c.enable(c.BLEND);c.disable(c.DEPTH_TEST);e=.5+(this.Kh-.5);f=.5+(this.Lh-.5);0>e-.5/this.Db&&(e=.5/this.Db);0>f-.5/this.Db&&(f=.5/this.Db);1<e+.5/this.Db&&(e=1-.5/this.Db);1<f+.5/this.Db&&(f=1-.5/this.Db);if("crossdissolve"==this.type)c.useProgram(this.za),c.bindBuffer(c.ARRAY_BUFFER,this.sb),c.vertexAttribPointer(this.za.ja,
this.sb.itemSize,c.FLOAT,!1,0,0),c.bindBuffer(c.ARRAY_BUFFER,this.Qf),c.vertexAttribPointer(this.za.La,2,c.FLOAT,!1,0,0),c.activeTexture(c.TEXTURE0),c.bindTexture(c.TEXTURE_2D,this.cf),b=c.getUniformLocation(this.za,"uAlpha"),c.uniform1f(b,1-d),b=c.getUniformLocation(this.za,"uZoomIn"),c.uniform1i(b,1==this.sa||2==this.sa||6==this.sa?1:0),b=c.getUniformLocation(this.za,"uZoomCenter"),c.uniform2f(b,e,f),e=c.getUniformLocation(this.za,"uZoomFactor"),c.uniform1f(e,this.Db),c.uniform1i(c.getUniformLocation(this.za,
"uSampler"),0);else if("diptocolor"==this.type)c.useProgram(this.fb),c.bindBuffer(c.ARRAY_BUFFER,this.sb),c.vertexAttribPointer(this.fb.ja,this.sb.itemSize,c.FLOAT,!1,0,0),c.bindBuffer(c.ARRAY_BUFFER,this.Qf),c.vertexAttribPointer(this.fb.La,2,c.FLOAT,!1,0,0),c.activeTexture(c.TEXTURE0),c.bindTexture(c.TEXTURE_2D,this.cf),c.uniform1f(c.getUniformLocation(this.fb,"uColorPercent"),Math.min(2*d,1)),b=c.getUniformLocation(this.fb,"uAlpha"),c.uniform1f(b,1-Math.max(2*(d-.5),0)),c.uniform3f(c.getUniformLocation(this.fb,
"uDipColor"),(this.lf>>16&255)/255,(this.lf>>8&255)/255,(this.lf&255)/255),b=c.getUniformLocation(this.fb,"uZoomIn"),c.uniform1i(b,1==this.sa||2==this.sa||6==this.sa?1:0),b=c.getUniformLocation(this.fb,"uZoomCenter"),c.uniform2f(b,e,f),e=c.getUniformLocation(this.fb,"uZoomFactor"),c.uniform1f(e,this.Db),c.uniform1i(c.getUniformLocation(this.fb,"uSampler"),0);else if("irisround"==this.type||"irisroundcenter"==this.type||"irisrectangular"==this.type||"irisrectangularcenter"==this.type){c.useProgram(this.Ua);
c.bindBuffer(c.ARRAY_BUFFER,this.sb);c.vertexAttribPointer(this.Ua.ja,this.sb.itemSize,c.FLOAT,!1,0,0);c.bindBuffer(c.ARRAY_BUFFER,this.Qf);c.vertexAttribPointer(this.Ua.La,2,c.FLOAT,!1,0,0);c.activeTexture(c.TEXTURE0);c.bindTexture(c.TEXTURE_2D,this.cf);if(1==this.sa||2==this.sa||6==this.sa||"irisroundcenter"==this.type||"irisrectangularcenter"==this.type)var g=b=.5;else b=this.Kh,g=this.Lh;var h=b*a.width,l=g*a.height;h=Math.max(h,a.width-h);l=Math.max(l,a.height-l);"irisround"==this.type||"irisroundcenter"==
this.type?c.uniform1f(c.getUniformLocation(this.Ua,"uRadius"),(Math.sqrt(h*h+l*l)+this.Mc)*d):(h>l?(l=a.height/a.width*h+this.Mc,h+=this.Mc):(h=a.width/a.height*l+this.Mc,l+=this.Mc),c.uniform2f(c.getUniformLocation(this.Ua,"uRectDim"),h*d,l*d));d=c.getUniformLocation(this.Ua,"uSoftEdge");c.uniform1f(d,this.Mc);c.uniform1i(c.getUniformLocation(this.Ua,"uRound"),"irisround"==this.type||"irisroundcenter"==this.type?1:0);c.uniform2f(c.getUniformLocation(this.Ua,"uIrisCenter"),b*a.width,g*a.height);b=
c.getUniformLocation(this.Ua,"uZoomIn");c.uniform1i(b,1==this.sa||2==this.sa||6==this.sa?1:0);b=c.getUniformLocation(this.Ua,"uZoomCenter");c.uniform2f(b,e,f);e=c.getUniformLocation(this.Ua,"uZoomFactor");c.uniform1f(e,this.Db);c.uniform1i(c.getUniformLocation(this.Ua,"uSampler"),0)}else if("wipeleftright"==this.type||"wiperightleft"==this.type||"wipetopbottom"==this.type||"wipebottomtop"==this.type||"wiperandom"==this.type)c.useProgram(this.Za),c.bindBuffer(c.ARRAY_BUFFER,this.sb),c.vertexAttribPointer(this.Za.ja,
this.sb.itemSize,c.FLOAT,!1,0,0),c.bindBuffer(c.ARRAY_BUFFER,this.Qf),c.vertexAttribPointer(this.Za.La,2,c.FLOAT,!1,0,0),c.activeTexture(c.TEXTURE0),c.bindTexture(c.TEXTURE_2D,this.cf),c.uniform1f(c.getUniformLocation(this.Za,"uPercent"),3>this.Hj?d*(a.width+this.Mc):d*(a.height+this.Mc)),d=c.getUniformLocation(this.Za,"uSoftEdge"),c.uniform1f(d,this.Mc),c.uniform1i(c.getUniformLocation(this.Za,"uDirection"),this.Hj),c.uniform2f(c.getUniformLocation(this.Za,"uCanvasDimensions"),a.width,a.height),
b=c.getUniformLocation(this.Za,"uZoomIn"),c.uniform1i(b,1==this.sa||2==this.sa||6==this.sa?1:0),b=c.getUniformLocation(this.Za,"uZoomCenter"),c.uniform2f(b,e,f),e=c.getUniformLocation(this.Za,"uZoomFactor"),c.uniform1f(e,this.Db),c.uniform1i(c.getUniformLocation(this.Za,"uSampler"),0);c.drawArrays(c.TRIANGLE_STRIP,0,this.sb.de);c.useProgram(this.u.ya.P);c.disable(c.BLEND);c.enable(c.DEPTH_TEST)}};return m}();r.jo=n})(ggP2VR||(ggP2VR={}));
(function(r){var n=function(){function m(d){this.Ah=[];this.u=d;this.enabled=!1;this.Cb=2;this.vl=!1}m.prototype.Fl=function(d){if(2==d.mode||3==d.mode||5==d.mode){var c=this.u.Aa.currentTime;if(d.Ob&&d.Ob.gain&&d.Rb&&d.Pb&&d.Qb){var a=d.Rb.gain.value,b=d.Pb.gain.value,e=d.Qb.gain.value;d.Ob.gain.linearRampToValueAtTime(d.Ob.gain.value,c);d.Ob.gain.linearRampToValueAtTime(0,c+this.Cb);d.Rb.gain.linearRampToValueAtTime(a,c);d.Rb.gain.linearRampToValueAtTime(0,c+this.Cb);d.Pb.gain.linearRampToValueAtTime(b,
c);d.Pb.gain.linearRampToValueAtTime(0,c+this.Cb);d.Qb.gain.linearRampToValueAtTime(e,c);d.Qb.gain.linearRampToValueAtTime(0,c+this.Cb)}}else c=this.u.Aa.currentTime,d.Dc&&d.Dc.gain&&(d.Dc.gain.linearRampToValueAtTime(d.Dc.gain.value,c),d.Dc.gain.linearRampToValueAtTime(0,c+this.Cb));d.Nj=!0;setTimeout(function(){d.Te()},1E3*this.Cb+5)};m.prototype.Kr=function(){for(var d=0;d<this.u.Y.length;d++){var c=this.u.Y[d];-1==this.u.bd.indexOf(c.id)&&(-1==this.u.bd.indexOf("_main")||-1!=this.u.re.indexOf(c.id))&&
!this.u.isPlaying(c.id)&&-1<c.loop&&4!=c.mode&&6!=c.mode&&(c.va?c.Vd():(c.j.play(),c.j.currentTime=0))}};m.prototype.ap=function(){var d=(this.u.Aa.currentTime-this.Gr)/this.Cb;d=Math.min(1,d);for(var c=0;c<this.u.Y.length;c++){var a=this.u.Y[c];this.u.isPlaying(a.id)&&1>a.ua&&(a.ua=d)}1==d&&clearInterval(this.Fr)};return m}();r.ko=n})(ggP2VR||(ggP2VR={}));
(function(r){var n=function(){function m(d){this.$g=[];this.gd=null;this.nc=[];this.gc=[];this.oc=[];this.Fk=!0;this.u=d;this.To()}m.prototype.Og=function(){var d=this.u.R,c=d.createShader(d.VERTEX_SHADER);d.shaderSource(c,"attribute vec3 aVertexPosition;\nvoid main(void) {\n gl_Position = vec4(aVertexPosition, 1.0);\n}\n");d.compileShader(c);d.getShaderParameter(c,d.COMPILE_STATUS)||(alert(d.getShaderInfoLog(c)),c=null);var a=d.createShader(d.FRAGMENT_SHADER);d.shaderSource(a,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nvarying vec4 vColor;\nuniform vec2 uCanvasDimensions;\nuniform vec2 uFlareCenterPosition;\nuniform float uBlindingValue;\nuniform float uAspectRatio;\nvoid main(void) {\n float canvasDiag = sqrt( (uCanvasDimensions.x * uCanvasDimensions.x) + (uCanvasDimensions.y * uCanvasDimensions.y) );\n vec2 diff = uFlareCenterPosition - gl_FragCoord.xy;\n diff.y = diff.y * uAspectRatio;\n float distFromFlarePoint = sqrt( (diff.x * diff.x) + (diff.y * diff.y) );\n float factor = (distFromFlarePoint / canvasDiag) / 10.0;\n gl_FragColor = vec4(1.0, 1.0, 1.0, pow(((1.0 - factor) * 0.8) * uBlindingValue, 2.0));\n}\n");
d.compileShader(a);d.getShaderParameter(a,d.COMPILE_STATUS)||(alert(d.getShaderInfoLog(a)),a=null);this.sc=d.createProgram();d.attachShader(this.sc,c);d.attachShader(this.sc,a);d.linkProgram(this.sc);d.getProgramParameter(this.sc,d.LINK_STATUS)||alert("Could not initialise shaders");this.sc.ja=d.getAttribLocation(this.sc,"aVertexPosition");d.enableVertexAttribArray(this.sc.ja);a=d.createShader(d.VERTEX_SHADER);c=d.createShader(d.VERTEX_SHADER);d.shaderSource(a,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nattribute vec3 aVertexPosition;\nvarying vec4 vColor;\nuniform vec2 uCirclePosition;\nuniform float uCircleRadius;\nuniform vec2 uCanvasDimensions2;\nuniform float uAspectRatio;\nvoid main(void) {\n vec2 circleOnScreen = aVertexPosition.xy * uCircleRadius + uCirclePosition;\n circleOnScreen.y = circleOnScreen.y / uAspectRatio;\n vec2 circleNorm = (circleOnScreen / uCanvasDimensions2) * 2.0 - vec2(1.0, 1.0);\n gl_Position = vec4(circleNorm.x, circleNorm.y, 0.0, 1.0);\n}\n");
d.compileShader(a);d.getShaderParameter(a,d.COMPILE_STATUS)||(alert(d.getShaderInfoLog(a)),a=null);d.shaderSource(c,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nattribute vec3 aVertexPosition;\nvarying vec4 vColor;\nuniform vec2 uCirclePosition;\nuniform float uCircleRadius;\nuniform vec2 uCanvasDimensions2;\nuniform float uAspectRatio;\nvoid main(void) {\n vec2 circleOnScreen = aVertexPosition.xy * uCircleRadius + uCirclePosition;\n circleOnScreen.y = circleOnScreen.y / uAspectRatio;\n vec2 circleNorm = (circleOnScreen / uCanvasDimensions2) * 2.0 - vec2(1.0, 1.0);\n gl_Position = vec4(circleNorm.x, circleNorm.y, 0.0, 1.0);\n}\n");
d.compileShader(c);d.getShaderParameter(c,d.COMPILE_STATUS)||(alert(d.getShaderInfoLog(c)),a=null);var b=d.createShader(d.FRAGMENT_SHADER);d.shaderSource(b,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nvarying vec4 vColor;\nuniform vec2 uCircleTexturePosition;\nuniform vec3 uCircleColor;\nuniform float uCircleRadius;\nuniform float uCircleAlpha;\nuniform float uCircleSoftness;\nuniform float uAspectRatio;\nvoid main(void) {\n vec2 diff = uCircleTexturePosition - gl_FragCoord.xy;\n diff.y = diff.y * uAspectRatio;\n float distFromCircleCenter = sqrt( (diff.x * diff.x) + (diff.y * diff.y) );\n float softnessDistance = uCircleRadius * (1.0 - uCircleSoftness);\n if (distFromCircleCenter > uCircleRadius)\n {\n\t gl_FragColor = vec4(uCircleColor, 0.0);\n }\n else if (distFromCircleCenter <= (softnessDistance))\n {\n\t float factor = distFromCircleCenter / softnessDistance;\n\t gl_FragColor = vec4(uCircleColor, pow((1.0 - (0.2 * factor)) * uCircleAlpha, 1.8));\n }\n else\n {\n\t float factor = (distFromCircleCenter - softnessDistance) / (uCircleRadius - softnessDistance);\n\t gl_FragColor = vec4(uCircleColor, pow((0.8 - (0.8 * factor)) * uCircleAlpha, 1.8));\n }\n}\n");
d.compileShader(b);d.getShaderParameter(b,d.COMPILE_STATUS)||(alert(d.getShaderInfoLog(b)),b=null);this.Ca=d.createProgram();d.attachShader(this.Ca,a);d.attachShader(this.Ca,b);d.linkProgram(this.Ca);d.getProgramParameter(this.Ca,d.LINK_STATUS)||alert("Could not initialise shaders");this.Ca.ja=d.getAttribLocation(this.Ca,"aVertexPosition");d.enableVertexAttribArray(this.Ca.ja);a=d.createShader(d.FRAGMENT_SHADER);d.shaderSource(a,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nvarying vec4 vColor;\nuniform vec2 uRingTexturePosition;\nuniform float uRingRadius;\nuniform float uRingAlpha;\nuniform float uAspectRatio;\nuniform sampler2D uSampler;\nvoid main(void) {\n vec2 diff = uRingTexturePosition - gl_FragCoord.xy;\n diff.y = diff.y * uAspectRatio;\n float distFromRingCenter = sqrt( (diff.x * diff.x) + (diff.y * diff.y) );\n float factor = distFromRingCenter / uRingRadius;\n if (distFromRingCenter > uRingRadius)\n {\n\t gl_FragColor = vec4(1.0, 1.0, 1.0, 0.0);\n }\n else\n {\n vec4 textureColor = texture2D(uSampler, vec2(factor / uAspectRatio, 0.5));\n gl_FragColor = vec4(textureColor.x, textureColor.y, textureColor.z, uRingAlpha);\n }\n}\n");
d.compileShader(a);d.getShaderParameter(a,d.COMPILE_STATUS)||(alert(d.getShaderInfoLog(a)),a=null);this.Bb=d.createProgram();d.attachShader(this.Bb,c);d.attachShader(this.Bb,a);d.linkProgram(this.Bb);d.getProgramParameter(this.Bb,d.LINK_STATUS)||alert("Could not initialise shaders");this.Bb.ja=d.getAttribLocation(this.Bb,"aVertexPosition")};m.prototype.Xc=function(){var d=this.u.R;this.Dd=d.createBuffer();d.bindBuffer(d.ARRAY_BUFFER,this.Dd);d.bufferData(d.ARRAY_BUFFER,new Float32Array([-1,-1,0,1,
-1,0,1,1,0,-1,1,0]),d.STATIC_DRAW);this.Dd.itemSize=3;this.Dd.de=4;this.wf=d.createBuffer();d.bindBuffer(d.ARRAY_BUFFER,this.wf);for(var c=[0,0,0],a=2*Math.PI/6,b=Math.PI/180*35,e=1,f=b;f<=b+2*Math.PI;f+=a)c.push(Math.sin(f)),c.push(-Math.cos(f)),c.push(0),e++;d.bufferData(d.ARRAY_BUFFER,new Float32Array(c),d.STATIC_DRAW);this.wf.itemSize=3;this.wf.de=e;this.ln=d.createTexture();d.bindTexture(d.TEXTURE_2D,this.ln);d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MIN_FILTER,d.LINEAR);d.texParameteri(d.TEXTURE_2D,
d.TEXTURE_MAG_FILTER,d.LINEAR);d.texParameteri(d.TEXTURE_2D,d.TEXTURE_WRAP_S,d.CLAMP_TO_EDGE);d.texParameteri(d.TEXTURE_2D,d.TEXTURE_WRAP_T,d.CLAMP_TO_EDGE);c=document.createElement("canvas");c.width=100;c.height=1;a=c.getContext("2d");a.width=100;a.height=1;b=a.createLinearGradient(0,0,100,0);b.addColorStop(0,this.u.fa(16777215,0));b.addColorStop(.88,this.u.fa(0,0));b.addColorStop(.9,this.u.fa(16654848,1));b.addColorStop(.92,this.u.fa(16776448,1));b.addColorStop(.94,this.u.fa(4849466,1));b.addColorStop(.96,
this.u.fa(131071,1));b.addColorStop(.98,this.u.fa(8190,1));b.addColorStop(1,this.u.fa(0,0));a.fillStyle=b;a.fillRect(0,0,100,1);d.texImage2D(d.TEXTURE_2D,0,d.RGBA,d.RGBA,d.UNSIGNED_BYTE,c)};m.prototype.Vq=function(){for(;0<this.$g.length;)this.$g.pop()};m.prototype.To=function(){var d=[],c=[],a=[];var b={radius:14,alpha:.2,color:11390415,B:.27};d.push(b);b={radius:20,alpha:.25,color:11390415,B:.4};d.push(b);b={radius:10,alpha:.2,color:12442332,B:.6};d.push(b);b={radius:15,alpha:.2,color:11390415,
B:.8};d.push(b);b={radius:10,alpha:.2,color:12442332,B:1.5};d.push(b);b={radius:15,alpha:.2,color:11390415,B:1.8};d.push(b);b={radius:8,alpha:.2,color:12575203,H:.8,B:.7};c.push(b);b={radius:7,alpha:.4,color:12575203,H:.5,B:1.6};c.push(b);b={radius:5,alpha:.4,color:12575203,H:.6,B:.9};c.push(b);b={radius:8,alpha:.3,color:12575203,H:.4,B:1.1};c.push(b);this.nc.push(d);this.gc.push(c);this.oc.push(a);d=[];c=[];a=[];b={radius:30,alpha:.3,color:11390415,B:.5};d.push(b);b={radius:10,alpha:.3,color:11390415,
B:1};d.push(b);b={radius:20,alpha:.3,color:11390415,B:1.3};d.push(b);b={radius:10,alpha:.3,color:11390415,B:1.5};d.push(b);b={radius:15,alpha:.3,color:11390415,B:1.8};d.push(b);b={radius:10,alpha:.3,color:15506856,H:.8,B:.7};c.push(b);b={radius:20,alpha:.5,color:15506856,H:.5,B:1.6};c.push(b);b={radius:5,alpha:.5,color:15506856,H:.6,B:.9};c.push(b);b={radius:60,alpha:.4,color:15506856,H:.2,B:1.1};c.push(b);a.push({radius:220,alpha:.035,B:2});this.nc.push(d);this.gc.push(c);this.oc.push(a);d=[];c=
[];a=[];b={radius:30,alpha:.5,color:15465727,B:.5};d.push(b);b={radius:40,alpha:.28,color:15726842,B:.8};d.push(b);b={radius:25,alpha:.32,color:15726842,B:1.1};d.push(b);b={radius:15,alpha:.25,color:15726842,B:1.35};d.push(b);b={radius:10,alpha:.28,color:15465727,B:1.65};d.push(b);b={radius:10,alpha:.45,color:15465727,H:.8,B:.7};c.push(b);b={radius:7,alpha:.5,color:15465727,H:.4,B:.9};c.push(b);b={radius:40,alpha:.4,color:15465727,H:.3,B:.38};c.push(b);b={radius:50,alpha:.4,color:15465727,H:.5,B:1.25};
c.push(b);b={radius:18,alpha:.2,color:15465727,H:.5,B:1.25};c.push(b);b={radius:10,alpha:.34,color:15726842,H:.8,B:1.5};c.push(b);b={radius:38,alpha:.37,color:15465727,H:.3,B:-.5};c.push(b);this.nc.push(d);this.gc.push(c);this.oc.push(a);d=[];c=[];a=[];b={radius:16,alpha:.5,color:16363159,B:.1};d.push(b);b={radius:26,alpha:.3,color:16091819,B:.32};d.push(b);b={radius:29,alpha:.2,color:16091819,B:1.32};d.push(b);b={radius:20,alpha:.18,color:16363159,B:1.53};d.push(b);b={radius:27,alpha:.13,color:16425092,
B:1.6};d.push(b);b={radius:20,alpha:.1,color:16091819,B:1.75};d.push(b);b={radius:12,alpha:.45,color:16312238,H:.45,B:.2};c.push(b);b={radius:8,alpha:.25,color:16434209,H:.7,B:.33};c.push(b);b={radius:9,alpha:.25,color:16091819,H:.4,B:.7};c.push(b);b={radius:7,alpha:.2,color:16091819,H:.4,B:.85};c.push(b);b={radius:60,alpha:.23,color:16091819,H:.55,B:1.05};c.push(b);b={radius:37,alpha:.1,color:16091819,H:.55,B:1.22};c.push(b);b={radius:10,alpha:.25,color:16363159,H:.65,B:1.38};c.push(b);b={radius:7,
alpha:.2,color:16434209,H:.5,B:1.45};c.push(b);b={radius:3,alpha:.2,color:16416033,H:.5,B:1.78};c.push(b);b={radius:6,alpha:.18,color:16434209,H:.45,B:1.9};c.push(b);b={radius:4,alpha:.14,color:16766514,H:.45,B:2.04};c.push(b);b={radius:30,alpha:.14,color:16766514,H:.8,B:.04};c.push(b);this.nc.push(d);this.gc.push(c);this.oc.push(a);d=[];c=[];a=[];b={radius:9,alpha:.3,color:14346999,H:.3,B:.3};c.push(b);b={radius:5,alpha:.5,color:14148072,H:.8,B:.6};c.push(b);b={radius:3,alpha:.37,color:14346999,
H:.66,B:.8};c.push(b);b={radius:45,alpha:.2,color:14346999,H:.36,B:1.2};c.push(b);b={radius:13,alpha:.2,color:14346999,H:.36,B:1.23};c.push(b);b={radius:11,alpha:.2,color:14148072,H:.36,B:1.28};c.push(b);b={radius:27,alpha:.16,color:14346999,H:.36,B:1.55};c.push(b);b={radius:6,alpha:.36,color:14148072,H:.8,B:1.7};c.push(b);this.nc.push(d);this.gc.push(c);this.oc.push(a);d=[];c=[];a=[];b={radius:24,alpha:.2,color:15186464,B:.2};d.push(b);b={radius:7,alpha:.26,color:15186464,B:.35};d.push(b);b={radius:23,
alpha:.18,color:15186464,B:.65};d.push(b);b={radius:13,alpha:.2,color:15186464,B:.8};d.push(b);b={radius:11,alpha:.15,color:15186464,B:1.4};d.push(b);b={radius:15,alpha:.11,color:15451904,B:1.6};d.push(b);b={radius:6,alpha:.45,color:15579138,H:.45,B:.22};c.push(b);b={radius:3,alpha:.3,color:15451904,H:.25,B:.4};c.push(b);b={radius:4,alpha:.2,color:15451904,H:.25,B:.45};c.push(b);b={radius:65,alpha:.17,color:15186464,H:.25,B:.5};c.push(b);b={radius:5,alpha:.45,color:15579138,H:.45,B:.88};c.push(b);
b={radius:140,alpha:.18,color:15579138,H:.32,B:.95};c.push(b);b={radius:12,alpha:.22,color:15579138,H:.32,B:1.1};c.push(b);b={radius:8,alpha:.32,color:15451904,H:.72,B:1.2};c.push(b);b={radius:55,alpha:.2,color:15451904,H:.45,B:1.33};c.push(b);b={radius:4,alpha:.3,color:15451904,H:.25,B:1.42};c.push(b);this.nc.push(d);this.gc.push(c);this.oc.push(a);d=[];c=[];a=[];b={radius:16,alpha:.4,color:10933495,B:.32};d.push(b);b={radius:14,alpha:.3,color:11007484,B:.36};d.push(b);b={radius:10,alpha:.3,color:4037331,
B:.58};d.push(b);b={radius:14,alpha:.22,color:8835068,B:.68};d.push(b);b={radius:10,alpha:.27,color:11007484,B:.82};d.push(b);b={radius:11,alpha:.27,color:10867450,B:1};d.push(b);b={radius:9,alpha:.2,color:6158332,B:1.05};d.push(b);b={radius:10,alpha:.17,color:10867450,B:1.78};d.push(b);b={radius:10,alpha:.3,color:4037331,B:-.23};d.push(b);b={radius:8,alpha:.45,color:8835068,H:.45,B:.175};c.push(b);b={radius:7,alpha:.4,color:12574715,H:.55,B:.46};c.push(b);b={radius:3,alpha:.3,color:10867450,H:.35,
B:.5};c.push(b);b={radius:60,alpha:.37,color:4031699,H:.75,B:.75};c.push(b);b={radius:3,alpha:.25,color:4031699,H:.25,B:.75};c.push(b);b={radius:3,alpha:.2,color:6158332,H:.25,B:.9};c.push(b);b={radius:7,alpha:.45,color:8835068,H:.45,B:1.3};c.push(b);b={radius:32,alpha:.22,color:8835068,H:.75,B:1.62};c.push(b);b={radius:9,alpha:.45,color:4031699,H:.65,B:1.6};c.push(b);b={radius:8,alpha:.25,color:4031699,H:.65,B:1.83};c.push(b);b={radius:7,alpha:.4,color:12574715,H:.55,B:-.18};c.push(b);this.nc.push(d);
this.gc.push(c);this.oc.push(a);d=[];c=[];a=[];b={radius:16,alpha:.4,color:16389120,B:.32};d.push(b);b={radius:26,alpha:.22,color:16389120,B:.4};d.push(b);b={radius:26,alpha:.25,color:16389120,B:.65};d.push(b);b={radius:18,alpha:.3,color:16389120,B:1.23};d.push(b);b={radius:14,alpha:.26,color:16389120,B:1.33};d.push(b);b={radius:17,alpha:.18,color:16389120,B:1.7};d.push(b);b={radius:30,alpha:.16,color:16389120,B:2.15};d.push(b);b={radius:100,alpha:.25,color:16389120,H:.22,B:1.45};c.push(b);b={radius:7,
alpha:.5,color:15628151,H:.3,B:1.5};c.push(b);b={radius:3,alpha:.5,color:15628151,H:.3,B:1.52};c.push(b);b={radius:4,alpha:.5,color:16389120,H:.3,B:1.745};c.push(b);b={radius:9,alpha:.22,color:16389120,H:.3,B:1.8};c.push(b);this.nc.push(d);this.gc.push(c);this.oc.push(a);d=[];c=[];a=[];b={radius:16,alpha:.4,color:10933495,B:.32};d.push(b);b={radius:14,alpha:.3,color:11007484,B:.36};d.push(b);b={radius:10,alpha:.3,color:4037331,B:.58};d.push(b);b={radius:14,alpha:.22,color:8835068,B:.68};d.push(b);
b={radius:10,alpha:.27,color:11007484,B:.82};d.push(b);b={radius:11,alpha:.27,color:10867450,B:1};d.push(b);b={radius:9,alpha:.2,color:6158332,B:1.05};d.push(b);b={radius:10,alpha:.17,color:10867450,B:1.78};d.push(b);b={radius:10,alpha:.3,color:4037331,B:-.23};d.push(b);b={radius:8,alpha:.45,color:8835068,H:.45,B:.175};c.push(b);b={radius:7,alpha:.4,color:12574715,H:.55,B:.46};c.push(b);b={radius:3,alpha:.3,color:10867450,H:.35,B:.5};c.push(b);b={radius:60,alpha:.37,color:4031699,H:.75,B:.75};c.push(b);
b={radius:3,alpha:.25,color:4031699,H:.25,B:.75};c.push(b);b={radius:3,alpha:.2,color:6158332,H:.25,B:.9};c.push(b);b={radius:7,alpha:.45,color:8835068,H:.45,B:1.3};c.push(b);b={radius:32,alpha:.22,color:8835068,H:.75,B:1.62};c.push(b);b={radius:9,alpha:.45,color:4031699,H:.65,B:1.6};c.push(b);b={radius:8,alpha:.25,color:4031699,H:.65,B:1.83};c.push(b);b={radius:7,alpha:.4,color:12574715,H:.55,B:-.18};c.push(b);this.nc.push(d);this.gc.push(c);this.oc.push(a);d=[];c=[];a=[];b={radius:16,alpha:.4,color:16389120,
B:.32};d.push(b);b={radius:26,alpha:.22,color:16389120,B:.4};d.push(b);b={radius:26,alpha:.25,color:16389120,B:.65};d.push(b);b={radius:18,alpha:.3,color:16389120,B:1.23};d.push(b);b={radius:14,alpha:.26,color:16389120,B:1.33};d.push(b);b={radius:17,alpha:.18,color:16389120,B:1.7};d.push(b);b={radius:30,alpha:.16,color:16389120,B:2.15};d.push(b);b={radius:100,alpha:.25,color:16389120,H:.22,B:1.45};c.push(b);b={radius:7,alpha:.5,color:15628151,H:.3,B:1.5};c.push(b);b={radius:3,alpha:.5,color:15628151,
H:.3,B:1.52};c.push(b);b={radius:4,alpha:.5,color:16389120,H:.3,B:1.745};c.push(b);b={radius:9,alpha:.22,color:16389120,H:.3,B:1.8};c.push(b);this.nc.push(d);this.gc.push(c);this.oc.push(a);d=[];c=[];a=[];b={radius:24,alpha:.2,color:15186464,B:.2};d.push(b);b={radius:7,alpha:.26,color:15186464,B:.35};d.push(b);b={radius:23,alpha:.18,color:15186464,B:.65};d.push(b);b={radius:13,alpha:.2,color:15186464,B:.8};d.push(b);b={radius:11,alpha:.15,color:15186464,B:1.4};d.push(b);b={radius:15,alpha:.11,color:15451904,
B:1.6};d.push(b);b={radius:6,alpha:.45,color:15579138,H:.45,B:.22};c.push(b);b={radius:3,alpha:.3,color:15451904,H:.25,B:.4};c.push(b);b={radius:4,alpha:.2,color:15451904,H:.25,B:.45};c.push(b);b={radius:65,alpha:.17,color:15186464,H:.25,B:.5};c.push(b);b={radius:5,alpha:.45,color:15579138,H:.45,B:.88};c.push(b);b={radius:140,alpha:.18,color:15579138,H:.32,B:.95};c.push(b);b={radius:12,alpha:.22,color:15579138,H:.32,B:1.1};c.push(b);b={radius:8,alpha:.32,color:15451904,H:.72,B:1.2};c.push(b);b={radius:55,
alpha:.2,color:15451904,H:.45,B:1.33};c.push(b);b={radius:4,alpha:.3,color:15451904,H:.25,B:1.42};c.push(b);this.nc.push(d);this.gc.push(c);this.oc.push(a)};m.prototype.Hq=function(){if(this.Fk){var d=this.u.R,c,a=new r.Ha(0,0,-100),b=this.u.nd(),e=0,f=0,g=!1;if(this.u.ia){var h=this.u.xb.width;var l=this.u.xb.height;this.u.K.zh&&(h=this.u.K.pc.width,l=this.u.K.pc.height)}else{this.$||(this.$=this.gd.getContext("2d"));if(this.$.width!==this.u.D.width||this.$.height!==this.u.D.height)this.$.width=
this.u.D.width,this.$.height=this.u.D.height;this.$.clear?this.$.clear():this.$.clearRect(0,0,this.gd.width,this.gd.height);h=this.$.width;l=this.$.height}var k=Math.sqrt(h*h+l*l),q=k/800;for(c=0;c<this.$g.length;c++){var p=this.$g[c];a.init(0,0,-100);a.Ga(-p.A*Math.PI/180);a.Ka(p.pan*Math.PI/180);a.Ka(-this.u.pan.m*Math.PI/180);a.Ga(this.u.A.m*Math.PI/180);a.jb(this.u.V.m*Math.PI/180);if(-.01>a.z){f=-b/a.z;e=a.x*f;f*=a.y;var w=Math.max(h,l);Math.abs(e)<w/2+100&&Math.abs(f)<w/2+100&&(g=!0,e+=h/2,
f+=l/2)}if(g){this.u.ia&&(d.blendFunc(d.SRC_ALPHA,d.DST_ALPHA),d.enable(d.BLEND),d.disable(d.DEPTH_TEST));w=h/2;var x=l/2;var y=Math.sqrt((w-e)*(w-e)+(x-f)*(x-f));var z=k/2;x=h>l?h:l;w=p.kl/100*((z-y)/z);0>w&&(w=0);if(this.u.ia){d.useProgram(this.sc);d.bindBuffer(d.ARRAY_BUFFER,this.u.K.sb);d.vertexAttribPointer(this.sc.ja,this.u.K.sb.itemSize,d.FLOAT,!1,0,0);var fa=d.getUniformLocation(this.sc,"uCanvasDimensions");d.uniform2f(fa,d.drawingBufferWidth,d.drawingBufferHeight);d.uniform2f(d.getUniformLocation(this.sc,
"uFlareCenterPosition"),d.drawingBufferWidth/h*e,l-d.drawingBufferHeight/l*f);d.uniform1f(d.getUniformLocation(this.sc,"uBlindingValue"),w);fa=d.getUniformLocation(this.sc,"uAspectRatio");d.uniform1f(fa,this.u.K.zh?d.drawingBufferWidth/d.drawingBufferHeight:d.drawingBufferWidth/d.drawingBufferHeight/(h/l));d.drawArrays(d.TRIANGLE_STRIP,0,this.u.K.sb.de)}else fa=this.$.createRadialGradient(e,f,1,e,f,x),fa.addColorStop(0,"rgba(255, 255, 255, "+w+")"),fa.addColorStop(.5,"rgba(255, 255, 255, "+.8*w+")"),
fa.addColorStop(1,"rgba(255, 255, 255, "+.6*w+")"),this.$.fillStyle=fa,this.$.fillRect(0,0,this.$.width,this.$.height);if(0!=Number(p.type)&&!this.u.K.zh){w=h/2-e;x=l/2-f;var la=1,B=Number(p.type)-1;y<.35*z&&(la=y/(.35*z),la*=la);y>.7*z&&(la=(z-y)/(.3*z));la*=p.alpha/100;if(0<this.nc[B].length)for(y=0;y<this.nc[B].length;y++){var db=this.nc[B][y];z=db.radius*q;var ja=db.alpha*la;0>ja&&(ja=0);var id=db.color;if(8==B||9==B||10==B)id=p.color;if(this.u.ia)d.useProgram(this.Ca),d.bindBuffer(d.ARRAY_BUFFER,
this.wf),d.vertexAttribPointer(this.Ca.ja,this.wf.itemSize,d.FLOAT,!1,0,0),fa=d.getUniformLocation(this.Ca,"uCanvasDimensions2"),d.uniform2f(fa,d.drawingBufferWidth,d.drawingBufferHeight),d.uniform2f(d.getUniformLocation(this.Ca,"uCirclePosition"),d.drawingBufferWidth/h*(e+w*db.B),d.drawingBufferWidth/h*(l-(f+x*db.B))),d.uniform2f(d.getUniformLocation(this.Ca,"uCircleTexturePosition"),d.drawingBufferWidth/h*(e+w*db.B),l-(f+x*db.B)),d.uniform1f(d.getUniformLocation(this.Ca,"uCircleRadius"),z),d.uniform3f(d.getUniformLocation(this.Ca,
"uCircleColor"),(id>>16&255)/255,(id>>8&255)/255,(id&255)/255),d.uniform1f(d.getUniformLocation(this.Ca,"uCircleAlpha"),ja),d.uniform1f(d.getUniformLocation(this.Ca,"uCircleSoftness"),.1),fa=d.getUniformLocation(this.Ca,"uAspectRatio"),d.uniform1f(fa,d.drawingBufferWidth/d.drawingBufferHeight/(h/l)),d.drawArrays(d.TRIANGLE_FAN,0,this.wf.de);else{this.$.save();this.$.translate(e+w*db.B,f+x*db.B);fa=this.$.createRadialGradient(0,0,1,0,0,1.1*z);fa.addColorStop(0,this.u.fa(id,ja));fa.addColorStop(.65,
this.u.fa(id,.9*ja));fa.addColorStop(.8,this.u.fa(id,.7*ja));fa.addColorStop(1,this.u.fa(id,.2*ja));this.$.beginPath();id=2*Math.PI/6;db=Math.PI/180*35;var tf=!0;for(ja=db;ja<=db+2*Math.PI;ja+=id)tf?(this.$.moveTo(z*Math.sin(ja),z*Math.cos(ja)),tf=!1):this.$.lineTo(z*Math.sin(ja),z*Math.cos(ja));this.$.closePath();this.$.fillStyle=fa;this.$.fill();this.$.restore()}}if(0<this.gc[B].length)for(y=0;y<this.gc[B].length;y++){db=this.gc[B][y];z=db.radius*q;ja=db.alpha*la;0>ja&&(ja=0);id=db.color;if(8==
B||9==B||10==B)id=p.color;this.u.ia?(d.useProgram(this.Ca),d.bindBuffer(d.ARRAY_BUFFER,this.Dd),d.vertexAttribPointer(this.Ca.ja,this.Dd.itemSize,d.FLOAT,!1,0,0),fa=d.getUniformLocation(this.Ca,"uCanvasDimensions2"),d.uniform2f(fa,d.drawingBufferWidth,d.drawingBufferHeight),fa=d.getUniformLocation(this.Ca,"uCirclePosition"),d.uniform2f(fa,d.drawingBufferWidth/h*(e+w*db.B),d.drawingBufferWidth/h*(l-(f+x*db.B))),fa=d.getUniformLocation(this.Ca,"uCircleTexturePosition"),d.uniform2f(fa,d.drawingBufferWidth/
h*(e+w*db.B),l-(f+x*db.B)),fa=d.getUniformLocation(this.Ca,"uCircleRadius"),d.uniform1f(fa,z),d.uniform3f(d.getUniformLocation(this.Ca,"uCircleColor"),(id>>16&255)/255,(id>>8&255)/255,(id&255)/255),d.uniform1f(d.getUniformLocation(this.Ca,"uCircleAlpha"),ja),d.uniform1f(d.getUniformLocation(this.Ca,"uCircleSoftness"),db.H),fa=d.getUniformLocation(this.Ca,"uAspectRatio"),d.uniform1f(fa,d.drawingBufferWidth/d.drawingBufferHeight/(h/l)),d.drawArrays(d.TRIANGLE_FAN,0,this.Dd.de)):(this.$.save(),this.$.translate(e+
w*db.B,f+x*db.B),fa=this.$.createRadialGradient(0,0,1,0,0,z),fa.addColorStop(0,this.u.fa(id,ja)),fa.addColorStop(1-db.H,this.u.fa(id,.8*ja)),fa.addColorStop(1,this.u.fa(id,0)),this.$.beginPath(),this.$.arc(0,0,z,0,2*Math.PI,!1),this.$.closePath(),this.$.fillStyle=fa,this.$.fill(),this.$.restore())}if(0<this.oc[B].length)for(y=0;y<this.oc[B].length;y++)p=this.oc[B][y],z=p.radius*q,ja=p.alpha*la,0>ja&&(ja=0),this.u.ia?(d.useProgram(this.Bb),d.activeTexture(d.TEXTURE0),d.bindTexture(d.TEXTURE_2D,this.ln),
d.bindBuffer(d.ARRAY_BUFFER,this.Dd),d.vertexAttribPointer(this.Bb.ja,this.Dd.itemSize,d.FLOAT,!1,0,0),fa=d.getUniformLocation(this.Bb,"uCanvasDimensions2"),d.uniform2f(fa,h,l),fa=d.getUniformLocation(this.Bb,"uCirclePosition"),d.uniform2f(fa,e+w*p.B,l-(f+x*p.B)),fa=d.getUniformLocation(this.Bb,"uRingTexturePosition"),d.uniform2f(fa,d.drawingBufferWidth/h*(e+w*p.B),l-(f+x*p.B)),fa=d.getUniformLocation(this.Bb,"uCircleRadius"),d.uniform1f(fa,z),d.uniform2f(d.getUniformLocation(this.Bb,"uRingPosition"),
e+w*p.B,l-(f+x*p.B)),d.uniform1f(d.getUniformLocation(this.Bb,"uRingRadius"),z),d.uniform1f(d.getUniformLocation(this.Bb,"uRingAlpha"),ja),fa=d.getUniformLocation(this.Bb,"uAspectRatio"),d.uniform1f(fa,d.drawingBufferWidth/d.drawingBufferHeight/(h/l)),d.uniform1i(d.getUniformLocation(this.Bb,"uSampler"),0),d.drawArrays(d.TRIANGLE_FAN,0,this.Dd.de)):(this.$.save(),this.$.translate(e+w*p.B,f+x*p.B),fa=this.$.createRadialGradient(0,0,0,0,0,z),fa.addColorStop(0,this.u.fa(16777215,0)),fa.addColorStop(.88,
this.u.fa(0,0)),fa.addColorStop(.9,this.u.fa(16654848,ja)),fa.addColorStop(.92,this.u.fa(16776448,ja)),fa.addColorStop(.94,this.u.fa(4849466,ja)),fa.addColorStop(.96,this.u.fa(131071,ja)),fa.addColorStop(.98,this.u.fa(8190,ja)),fa.addColorStop(1,this.u.fa(0,0)),this.$.beginPath(),this.$.arc(0,0,z,0,2*Math.PI,!1),this.$.closePath(),this.$.fillStyle=fa,this.$.fill(),this.$.restore())}this.u.ia&&(d.useProgram(this.u.ya.P),d.disable(d.BLEND),d.enable(d.DEPTH_TEST))}}}};return m}();r.io=n})(ggP2VR||(ggP2VR=
{}));var THREE;
(function(r){var n=function(){function m(d){this.qd=[];this.pa={x:0,y:0};this.Jc={x:0,y:0};this.gh=0;this.ai=!1;this.Xk=this.Qe=0;this.Uk=!1;this.u=null;this.Ak=!0;this.Ed=1;this.ji=[];this.tj=this.Zn=this.frustumCulled=!1;this.Hf=[-1,-1,-1,-1];this.ui=[];this.Me=[];this.pm=180;this.u=d;var c=this;setTimeout(function(){if(window.WebVRPolyfill&&window.Promise){var a={BUFFER_SCALE:1};try{new window.WebVRPolyfill(a),d.O("WebVR Polyfill loaded!")}catch(b){}}c.cq()},0);THREE?this.jl():console.log("Three.js not available!")}m.prototype.Uo=
function(){this.init();this.animate()};m.prototype.jl=function(){this.Ok=new THREE.Matrix4;this.Tm=new THREE.Euler};m.prototype.init=function(){"getVRDisplays"in navigator||console.log("no vr support");if(THREE)if(this.renderer)console.log("already set up!");else{this.Ok||this.jl();var d=this,c=this.hd=this.u.hd,a=this.ar=new THREE.Scene,b=this.camera=new THREE.PerspectiveCamera(100,window.innerWidth/window.innerHeight,.001,2E4);108>THREE.REVISION&&(this.frustumCulled=!0);b.position.z=-.01;b.position.y=
0;b.position.x=0;this.renderer=b=new THREE.WebGLRenderer({depth:!0,logarithmicDepthBuffer:!0,alpha:!0,antialias:!0,stencil:!0});b.setClearColor(new THREE.Color(0),1);b.setPixelRatio(window.devicePixelRatio);b.setSize(window.innerWidth,window.innerHeight);b.gammaInput=!0;b.gammaOutput=!0;b.shadowMap.enabled=!1;c.appendChild(b.domElement);"getVRDisplays"in navigator&&(b.vr.enabled=!0,b.vr.setFrameOfReferenceType("head-model"));var e=this.rl=new THREE.Group;c=this.Aj=b.vr.getController(0);c.addEventListener("selectstart",
function(g){d.Um(g)});c.addEventListener("selectend",function(){});c.visible=!1;e.add(c);b=this.Bj=b.vr.getController(1);b.addEventListener("selectstart",function(g){d.Um(g)});b.addEventListener("selectend",function(){});b.visible=!1;e.add(b);e.visible=!1;a.add(e);e=(new THREE.BufferGeometry).setFromPoints([new THREE.Vector3(0,0,0),new THREE.Vector3(0,0,-1)]);var f=new THREE.LineBasicMaterial({color:14737632});e=new THREE.Line(e,f);e.name="line";e.scale.z=5;c.add(e.clone());b.add(e.clone());this.ph=
new THREE.Raycaster;this.pa=new THREE.Vector2;this.Lf=new THREE.Group;this.Df=new THREE.Group;this.Ke=new THREE.Group;this.Mj=new THREE.Group;this.uj=new THREE.Group;this.Lf.add(this.Ke);this.Lf.add(this.Mj);this.Lf.add(this.Df);a.add(this.Lf);a.add(this.uj);a=document.createElement("canvas");a.width=64;a.height=64;c=a.getContext("2d");c.fillStyle="black";c.lineWidth=3;c.beginPath();c.arc(32,32,10,0,2*Math.PI);c.stroke();a=new THREE.Texture(a);a.needsUpdate=!0;e=new THREE.PlaneBufferGeometry(2,2,
8);a=new THREE.MeshBasicMaterial({map:a});a.transparent=!0;a=new THREE.Mesh(e,a);a.position.z=-50;this.uj.add(a);window.addEventListener("resize",function(){d.Fq()},!1);document.addEventListener("mouseup",function(){d.Dq()},!1);document.addEventListener("mousedown",function(g){d.Bq(g)},!1);document.addEventListener("mousemove",function(g){d.Cq(g)},!1);this.display||this.ig()}else console.log("Three.js not available!")};m.prototype.Gk=function(){var d=this.u;this.display=null;d.O("VR not found");d.S("vrchanged",
{});d.S("playerstatechanged",{})};m.prototype.yn=function(d){var c=this.u;this.display=d;this.renderer&&this.renderer.vr.setDevice(d);c.O("VR found");c.S("vrchanged",{});c.S("playerstatechanged",{})};m.prototype.cq=function(){if(!this.Zn){this.Zn=!0;var d=this;"getVRDisplays"in navigator?(window.addEventListener("vrdisplayconnect",function(c){d.yn(c.display)},!1),window.addEventListener("vrdisplaydisconnect",function(){d.Gk()},!1),window.addEventListener("vrdisplaypresentchange",function(){d.ai=d.display?
d.display.isPresenting:!1;d.u.O("VR Presenting: "+d.ai);d.ai?(d.Vm(),d.ig()):(d.ql(),d.je())},!1),window.addEventListener("vrdisplayactivate",function(c){d.renderer&&d.renderer.domElement&&c.display.requestPresent([{source:d.renderer.domElement}])},!1),navigator.getVRDisplays().then(function(c){0<c.length?d.yn(c[0]):d.Gk()})["catch"](d.Gk)):this.display=null}};m.prototype.Qg=function(){var d=this.display;return d?d.isPresenting:!1};m.prototype.ak=function(){return null!=this.display&&THREE};m.prototype.wg=
function(){var d=this.display,c=this.u;d?(1==this.Ed&&("Oculus Go"==d.displayName&&(this.Ed=1.7),"Oculus Quest"==d.displayName&&(this.Ed=1.5),"Gear VR"==d.displayName&&(this.Ed=2),"Lenovo Mirage Solo"==d.displayName&&(this.Ed=2)),c.Hc("Enter VR on '"+d.displayName+"' x"+this.Ed),this.renderer.vr.setFramebufferScaleFactor(this.Ed),d.isPresenting||(this.renderer.vr.setDevice(d),d.requestPresent([{source:this.renderer.domElement}]))):this.ig()};m.prototype.Vm=function(){if(THREE&&this.renderer){var d=
this.u;d.ef=!0;d.aa.style.display="none";d.$a.style.display="none";this.renderer.domElement.style.display="inline";d.S("vrchanged",{});d.S("playerstatechanged",{})}};m.prototype.ql=function(){if(THREE&&this.renderer){var d=this.u;d.ef=!1;d.aa.style.display="inline";d.$a.style.display="inline";this.renderer.domElement.style.display="none";d.Si(0);d.Nc();d.update();d.S("vrchanged",{});d.S("playerstatechanged",{})}};m.prototype.sf=function(){var d=this.display;d&&d.isPresenting&&d.vs()};m.prototype.Ln=
function(){this.Qg()?this.sf():this.wg()};m.prototype.Il=function(){var d=0,c=this.u;var a=1536;if(this.renderer){var b=this.display;if(b){var e=b.getEyeParameters("left");e&&(c.O(e),b=e.renderWidth*this.Ed,e.Hl&&(e=Math.abs(e.Hl.ws+e.Hl.zs),90>e&&(b/=Math.tan(e/2*Math.PI/180))),10<b&&(a=b))}c.O("Canvas: "+a)}a*=Math.pow(2,0);if(0<c.v.levels.length){for(;c.v.levels.length>=d+2&&!c.v.levels[d+1].Se&&c.v.levels[d+1].width>a;)d++;c.O("Level "+d+" - width: "+c.v.levels[d].width);c.O(c.v.levels)}return d};
m.prototype.dm=function(d){var c=this.u,a=c.pe[d];d="";if(a){a=a.firstChild;for(var b;a;)"input"==a.nodeName&&(b=a)&&(b=0<c.v.levels.length?b.getAttributeNode("leveltileurl"):b.getAttributeNode("tilevrurl"))&&(d=b.nodeValue),a=a.nextSibling}else d=0<c.v.levels.length?c.v.jk:c.wl;for(a=0;3>a;a++)d=c.Jb(d,"c","vr"),d=c.Jb(d,"s","vr"),d=c.Jb(d,"r",0),d=c.Jb(d,"l",0),d=c.Jb(d,"x",0),d=c.Jb(d,"y",0),d=c.Jb(d,"v",0),d=c.Jb(d,"h",0);return c.Mb(d)};m.prototype.ceilPowerOfTwo=function(d){return Math.pow(2,
Math.ceil(Math.log(d)/Math.LN2))};m.prototype.loadTexture=function(d,c,a){var b=new THREE.ImageLoader;b.setCrossOrigin(this.u.crossOrigin);var e=this;b.load(c,function(f){var g=e.ceilPowerOfTwo(f.width),h=e.ceilPowerOfTwo(f.height);d.format=THREE.RGBFormat;d.needsUpdate=!0;if(g==f.width&&h==f.height||!a)d.image=f;else{e.u.O("resizing "+f.width+"/"+f.height+" -> "+g+"/"+h);var l=document.createElement("canvas");l.width=g;l.height=h;l.getContext("2d").drawImage(f,0,0,g,h);d.image=l}d.mm=!0;d.$d&&d.$d.mm&&
(d.Jg.visible=!0,d.$d.Jg.visible=!0)});this.ji.push(d)};m.prototype.ig=function(){if(THREE){var d=this.u;if(this.tj)d.O("vr panorama aleady added!");else{this.Il();var c=this.Df,a=this;d.O("add vr panorama");this.je();this.camera.layers.enable(1);c.setRotationFromEuler(this.Tm);c.rotateX(d.Oa.pitch*Math.PI/180);c.rotateZ(-d.Oa.V*Math.PI/180);var b=new THREE.SphereBufferGeometry(2E4/3*1.5,16,16),e=(new THREE.TextureLoader).load(this.dm(d.Sj()));e=new THREE.MeshBasicMaterial({map:e,side:THREE.DoubleSide});
b=new THREE.Mesh(b,e);b.scale.x=-1;b.rotateZ(d.Oa.V*Math.PI/180);b.rotateX(-d.Oa.pitch*Math.PI/180);b.rotateY(-90*Math.PI/180);c.add(b);a.Ii=b;a.tj=!0;setTimeout(function(){d.O("Adding Main Pano");a.tj=!1;a.vo();d.F.j?a.yo():a.wo();a.to()});this.Xq();this.Ak=!0}}};m.prototype.yo=function(){var d=this.u,c=this.Df,a=2E4/3;if(d.Id){var b=new THREE.VideoTexture(d.F.j);b.wrapS=THREE.ClampToEdgeWrapping;b.wrapT=THREE.ClampToEdgeWrapping;b.minFilter=THREE.LinearFilter;var e=new THREE.SphereBufferGeometry(a,
60,40);e.scale(-1,1,1);for(var f=e.attributes.uv.array,g=1;g<f.length;g+=2)f[g]*=.5;f=new THREE.MeshBasicMaterial({map:b});e=new THREE.Mesh(e,f);e.rotateY(-90*Math.PI/180);e.layers.set(d.wh?1:2);c.add(e);e=new THREE.SphereBufferGeometry(a,60,40);e.scale(-1,1,1);f=e.attributes.uv.array;for(g=1;g<f.length;g+=2)f[g]*=.5,f[g]+=.5;f=new THREE.MeshBasicMaterial({map:b});e=new THREE.Mesh(e,f);e.rotateY(-90*Math.PI/180);e.layers.set(d.wh?2:1)}else e=new THREE.SphereBufferGeometry(a,60,40),e.scale(-1,1,1),
b=new THREE.VideoTexture(d.F.j),b.wrapS=THREE.ClampToEdgeWrapping,b.wrapT=THREE.ClampToEdgeWrapping,b.minFilter=THREE.LinearFilter,f=new THREE.MeshBasicMaterial({map:b}),e=new THREE.Mesh(e,f),e.rotateY(-90*Math.PI/180);c.add(e);try{d.F.j.play()}catch(h){}};m.prototype.wo=function(){var d=this.u,c=[],a=this.Il(),b=this.Df,e=2E4/3,f=d.Id?2:1;if(d.v.levels.length>a)for(var g=d.v.levels[a],h=0;6>h;h++){c[h]=new THREE.Group;for(var l=0;l<g.ea;l++)for(var k=0;k<g.U;k++)for(var q=0;q<f;q++){var p=new THREE.Texture;
this.loadTexture(p,d.ne(h,a,k,l,1==q),!0);p.wrapS=THREE.ClampToEdgeWrapping;p.wrapT=THREE.ClampToEdgeWrapping;p.minFilter=THREE.LinearMipMapLinearFilter;p.anisotropy=1;var w=d.v.N+2*d.v.Ea,x=d.v.N+2*d.v.Ea;k==g.U-1&&(w=g.width-d.v.N*(g.U-1)+2*d.v.Ea);l==g.ea-1&&(x=g.width-d.v.N*(g.ea-1)+2*d.v.Ea);var y=new THREE.PlaneBufferGeometry(e*w/g.width,e*x/g.width,8),z=new THREE.MeshBasicMaterial({map:p});y=new THREE.Mesh(y,z);z.transparent=!0;z.side=THREE.FrontSide;z=1*d.v.N;y.position.x=e*(k*z+w/2-d.v.Ea-
g.width/2)/g.width;y.position.y=e*-(l*z+x/2-d.v.Ea-g.width/2)/g.width;y.position.z=-.5*e;if(d.Id)if(y.visible=!1,y.layers.set(1==q?1:2),p.Jg=y,0==q)var fa=y;else w=fa.material.map,p.$d=w,w.$d=p;c[h].add(y);y.frustumCulled=this.frustumCulled}4>h?c[h].rotation.y=-h*Math.PI/2:c[h].rotation.x=(4==h?1:-1)*Math.PI/2;b.add(c[h])}else for(a=d.bf,h=0;6>h;h++)for(c[h]=new THREE.Group,q=0;q<f;q++)g=h,d.Id&&(g=h+(1==q?6:0)),p=new THREE.Texture,this.loadTexture(p,d.Mb(d.sg[g]),!1),p.wrapS=THREE.ClampToEdgeWrapping,
p.wrapT=THREE.ClampToEdgeWrapping,p.minFilter=THREE.LinearFilter,y=new THREE.PlaneBufferGeometry(a*e/2,a*e/2,64),z=new THREE.MeshBasicMaterial({map:p}),y=new THREE.Mesh(y,z),z.transparent=!0,z.side=THREE.FrontSide,y.position.x=0,y.position.y=0,y.position.z=-.25*e,d.Id&&(y.layers.set(1==q?1:2),y.visible=!1,p.Jg=y,0==q?fa=y:(w=fa.material.map,p.$d=w,w.$d=p)),c[h].add(y),4>h?c[h].rotation.y=-h*Math.PI/2:c[h].rotation.x=(4==h?1:-1)*Math.PI/2,b.add(c[h])};m.prototype.vo=function(){var d=this.u,c=this.Ke;
new r.Ha(0,0,-100);for(var a=d.I.aj,b=0;b<d.X.length;b++){var e=d.X[b],f=e.Nr(),g=.2;if(!1!==f){var h=!e.distance||0>=e.distance?5:1>e.distance?1:5>e.distance?e.distance:5;if(e.Sc){var l=.005,k=(new THREE.TextureLoader).load(e.Sc),q=new THREE.MeshBasicMaterial({map:k});if(e.bg){h=100;g=2*h*Math.tan(e.fov/2*Math.PI/180);var p=new THREE.PlaneBufferGeometry(g,g*e.Bd/e.Ae,1,1);q.transparent=!0;q.opacity=1}else p=new THREE.PlaneBufferGeometry(l*e.Ae,l*e.Bd,1,1),q.transparent=!0,q.opacity=.25;g=l*e.Bd/
2;q.side=THREE.DoubleSide}else p=new THREE.SphereBufferGeometry(.2,16,16),k=(new THREE.TextureLoader).load(this.dm(f)),q=new THREE.MeshBasicMaterial({map:k}),q.transparent=!0,q.opacity=.25;f=new THREE.Mesh(p,q);l=e.title;if(a.enabled&&""!=l){p=document.createElement("canvas");p.width=256;p.height=32;k=p.getContext("2d");this.yh||(this.yh=document.createElement("canvas"),this.yh.width=p.width,this.yh.height=p.height);var w=this.yh.getContext("2d");w.clearRect(0,0,p.width,p.height);w.font="16px Helvetica";
w.textAlign="center";w.textBaseline="top";q=w.measureText(l);var x=q.width;0<a.height&&(x=Math.min(a.width,p.width-6),x=Math.max(x,q.width));q=x+6;a.background&&(w.fillStyle=this.u.fa(a.bc,a.ac),w.fillRect((p.width-x)/2-3,2,x+6,24));0<a.Sh&&(w.strokeStyle=this.u.fa(a.dc,a.cc),w.strokeRect((p.width-x)/2-3,2,x+6,24));w.fillStyle=this.u.fa(a.bj,a.$i);w.fillText(l,p.width/2,5,p.width-6);k.drawImage(this.yh,(p.width-q)/2,2,q,24,0,0,p.width,p.height);k=new THREE.Texture(p);k.needsUpdate=!0;l=1.5;p=new THREE.PlaneBufferGeometry(1*
l*q/p.width,3*l/p.height,1,1);q=new THREE.MeshBasicMaterial({map:k,side:THREE.DoubleSide});p=new THREE.Mesh(p,q);p.translateY(-g-.125*l/2);p.frustumCulled=this.frustumCulled;f.add(p);q.transparent=!0;q.opacity=.5}f.rotateY(e.pan*Math.PI/180);f.rotateX(e.A*Math.PI/180);f.translateY(-0);f.translateZ(-h);f.userData=e;f.castShadow=!1;f.receiveShadow=!1;f.frustumCulled=this.frustumCulled;c.add(f)}}};m.prototype.to=function(){for(var d=this.u,c=this.Mj,a=0;a<d.T.length;a++){var b=d.T[a];if(b.j&&"_videopanorama"!=
b.id){b.j.play();var e=new THREE.VideoTexture(b.j);e.wrapS=THREE.ClampToEdgeWrapping;e.wrapT=THREE.ClampToEdgeWrapping;e.minFilter=THREE.LinearFilter;var f=5E3*Math.tan(b.fov*Math.PI/360);var g=0<b.vc?f*b.Wc/b.vc:f;b.Ec&&1!=b.Ec&&(g*=b.Ec);f=new THREE.PlaneBufferGeometry(f,g,5,5);e=new THREE.MeshBasicMaterial({map:e,side:THREE.DoubleSide});e=new THREE.Mesh(f,e);e.rotateY(b.pan*Math.PI/180);e.rotateX(b.A*Math.PI/180);e.translateY(-0);e.translateZ(-2500);e.rotateZ(-b.jb*Math.PI/180);e.rotateY(-b.Ka*
Math.PI/180);e.rotateX(-b.Ga*Math.PI/180);e.userData=b;e.castShadow=!1;e.receiveShadow=!1;c.add(e)}}};m.prototype.vg=function(d){for(var c=d.children.length-1;0<=c;c--){var a=d.children[c];this.vg(a);d.remove(a)}d.geometry&&d.geometry.dispose();d.material&&(d.material.texture&&(d.material.texture.dispose(),d.material.texture.$d=null,d.material.texture.Jg=null),d.material.map&&(d.material.map.dispose(),d.material.map.$d=null,d.material.map.Jg=null),d.material.dispose())};m.prototype.je=function(){THREE&&
(this.ji=[],this.vg(this.Df),this.vg(this.Ke),this.vg(this.Mj),10<this.renderer.info.memory.textures&&this.u.ns(this.renderer.info.memory))};m.prototype.Fq=function(){if(THREE){var d=this.camera;d.aspect=window.innerWidth/window.innerHeight;d.updateProjectionMatrix();this.renderer.setSize(window.innerWidth,window.innerHeight)}};m.prototype.Um=function(d){THREE&&(d=this.Wl(d.target),0<d.length&&(d=d[0].object.userData,this.u.$c(d.url,d.target)))};m.prototype.Wl=function(d){this.Ok.identity().extractRotation(d.matrixWorld);
this.ph.ray.origin.setFromMatrixPosition(d.matrixWorld);this.ph.ray.direction.set(0,0,-1).applyMatrix4(this.Ok);return this.ph.intersectObjects(this.Ke.children)};m.prototype.intersectObjects=function(d){var c=d.getObjectByName("line");d=this.Wl(d);if(0<d.length){d=d[0];var a=d.object;a.selected=!0;this.qd.push(a);c.scale.z=d.distance}else c.scale.z=5};m.prototype.Qo=function(){for(;this.qd.length;)this.qd.pop().selected=!1};m.prototype.Cq=function(d){d.preventDefault();var c=this.pa,a=this.renderer;
c.x=d.clientX/a.domElement.clientWidth*2-1;c.y=2*-(d.clientY/a.domElement.clientHeight)+1;1==d.buttons&&(this.gh=this.Jc.x-c.x)};m.prototype.eq=function(){var d=this.ph;d.setFromCamera(this.pa,this.camera);d=d.intersectObjects(this.Ke.children);0<d.length&&(d=d[0].object,d.selected=!0,this.qd.push(d))};m.prototype.fq=function(){var d=this.ph;d.setFromCamera({x:0,y:0},this.camera);d=d.intersectObjects(this.Ke.children);0<d.length&&(d=d[0].object,d.selected=!0,this.qd.push(d))};m.prototype.Dq=function(){this.gh=
0};m.prototype.Bq=function(d){50>d.clientX&&50>d.clientY&&this.u.sf();0<this.qd.length?this.u.$c(this.qd[0].userData.url):(this.Jc.x=this.pa.x,this.Jc.y=this.pa.y)};m.prototype.animate=function(){var d=this.oq=this;this.renderer&&this.renderer.setAnimationLoop(function(){d.render()})};m.prototype.render=function(){if(THREE){var d=this.oq,c=d.u;d.Qo();if(c.ef){d.Uk=d.Aj.visible||d.Bj.visible?!1:!0;d.Aj.visible&&d.intersectObjects(d.Aj);d.Bj.visible&&d.intersectObjects(d.Bj);d.ai||d.eq();if(d.Uk)if(d.fq(),
0<this.qd.length)if(this.fk!=this.qd[0])this.fk=this.qd[0],this.jq=Date.now();else{if(Date.now()>this.jq+1E3){var a=this.fk.userData;a&&a.url&&this.u.$c(a.url,a.target)}}else this.fk=null;var b=navigator.getGamepads&&navigator.getGamepads();a=!1;!d.rl.visible&&0<b.length&&b[0].id&&""!=b[0].id&&(0<this.pm?d.rl.visible=!0:this.pm--);for(var e=0;e<b.length;e++){var f=b[e];if(f&&0<f.buttons.length){var g="Oculus Touch (Left)"==f.id||"Oculus Touch (Right)"==f.id;f.buttons[0].touched&&2<=f.axes.length&&
!g?(a=!0,f=f.axes[0],-1==this.Hf[e]?this.Hf[e]=f:(g=this.Hf[e]-f,-.3>g&&(this.qh(20),this.Hf[e]=f),.3<g&&(this.qh(-20),this.Hf[e]=f))):(this.Hf[e]=-1,2<=f.axes.length&&(f=f.axes[0],.8<f?(a=!0,1!=this.Me[e]&&(this.Me[e]=1,this.ui[e]=Date.now()-1E4)):-.8>f?(a=!0,-1!=this.Me[e]&&(this.Me[e]=-1,this.ui[e]=Date.now()-1E4)):this.Me[e]=0,0!=this.Me[e]&&(f=Date.now()-this.ui[e],console.log(f),400<f&&(this.ui[e]=Date.now(),this.qh(20*this.Me[e])))))}}this.Ii&&0<this.ji.length&&this.ji.every(function(k){return k.mm})&&
(this.vg(this.Ii),this.Df.remove(this.Ii),this.Ii=null,c.O("unload Preview Sphere"));b=this.Ke;for(e=b.children.length-1;0<=e;e--){f=b.children[e];var h=g=1;f.selected?(g=1.5,h=1):a?(g=.6,h=.7):(g=.4,h=.5);var l=f.scale.x;l+=.1*(g-l);f.material.opacity+=.1*(h-f.material.opacity);f.userData&&f.userData.Sc?(f.userData.bg&&(l=1,f.material.opacity=1),0<f.children.length&&(f.children[0].material.opacity=f.material.opacity)):(f.rotateY(1*Math.PI/180),0<f.children.length&&(f.children[0].rotateY(-1*Math.PI/
180),f.children[0].material.opacity=f.material.opacity));f.scale.x=f.scale.y=f.scale.z=l}a=d.camera.rotation.clone();a.reorder("YXZ");this.Xk=180*a.y/Math.PI;this.Ak&&(this.qh(this.Xk-c.pan.m),this.Ak=!1);c.jr(this.Xk-this.Qe,180*a.x/Math.PI,180*a.z/Math.PI);c=this.uj;d.Uk?(c.setRotationFromEuler(d.camera.rotation),c.visible=!0):c.visible=!1;d.renderer.render(d.ar,d.camera);0==this.gh||isNaN(this.gh)||this.qh(this.gh)}}};m.prototype.Xq=function(){this.Qe=0;this.Lf.setRotationFromEuler(this.Tm)};m.prototype.qh=
function(d){this.Qe+=d;this.Lf.rotateY(d*Math.PI/180)};return m}();r.ro=n})(ggP2VR||(ggP2VR={}));var Gh=!1;
(function(r){var n=function(){return function(){this.fov=this.A=this.pan=0}}(),m=function(){return function(){this.Cj=-1E7}}(),d=function(){function c(a,b){this.lq="RURVIExpY2Vuc2U6IFNlY29uZGFyeSBTY2hvb2wg4oSWMzA=";this.pan={m:0,cb:0,min:0,max:360,d:0,qk:0,Rc:0,open:0};this.A={m:0,cb:0,min:-90,max:90,d:0,Rc:0,open:0};this.V={m:0,cb:0,min:-180,max:180,d:0,open:0};this.Cc={pan:0,A:-90,V:0,fov:170,Ib:9};this.fov={m:70,cb:70,min:1,fh:0,max:170,mk:360,nk:270,prev:0,d:0,mode:0,Cn:0,yl:0,open:0};this.Oa={V:0,pitch:0};this.D={width:10,height:10};
this.rb=0;this.Fj=new r.Ha;this.crossOrigin="anonymous";this.Wa=this.Hi=4;this.od=this.Jh=this.jh=this.yc=0;this.$n={};this.wh=this.Id=!1;this.ga={start:{x:0,y:0},oa:{x:0,y:0},Kd:{x:0,y:0},m:{x:0,y:0},na:{x:0,y:0}};this.Z={Jc:!1,Uc:!1,ni:function(){return this.Uc||this.Jc},Jl:0,startTime:0,start:{x:0,y:0},oa:{x:0,y:0},Kd:{x:0,y:0},m:{x:0,y:0},na:{x:0,y:0},mh:!1};this.vf=this.uf=!0;this.Ja={enabled:!0,oa:{x:0,y:0},na:{x:0,y:0},Bk:0,fov:{active:!1,uc:0}};this.qb={alpha:0,beta:0,gamma:0,orientation:0,
Qe:0,Ni:!0,fadeIn:0};this.Mg={alpha:0,beta:0,gamma:0,orientation:0};this.F={src:[],kf:4,width:640,height:480,rd:!1,ri:!1,Jk:!0,Dn:!1,De:"loop",Nk:"",j:HTMLVideoElement=null,Hn:!1,texture:WebGLTexture=null,Wk:WebGLBuffer=null,Zi:WebGLBuffer=null,ck:WebGLBuffer=null,format:1,hi:0,flipY:1};this.ti=0;this.ra=this.Ia=this.Ra=this.aa=this.tc=this.$a=this.L=null;this.Fe="pano";this.Rj="flashcontainer";this.Gj="";this.control=null;this.fc=[];this.Ma=!1;this.ug=1;this.ta=null;this.Sd=this.gf=this.Af=!1;this.jg=
0;this.zd=.02;this.oj=0;this.pj=!1;this.nj=this.Ph=this.kg=this.ff=this.il=0;this.hl=-1;this.Vb="";this.Rf=this.Kc=!1;this.lh=0;this.sg=[];this.wl="";this.qf=[];this.bf=this.Ac=1;this.mg=1024;this.Sf=!1;this.Oe=200;this.Zb=0;this.xh=5;this.zc=0;this.In=50;this.bk=this.Jn=0;this.C={enabled:!1,timeout:5,active:!1,vh:!1,speed:.4,dj:0,Ei:0,Sm:!0,Kf:"",Rm:!1,Gh:!1,dg:!1,Qh:"",Td:"Animation01",jf:!1,Ai:!1,Mk:!1,startTime:0,sd:0,Ag:!1,Wh:!1,wi:0,Jd:0,Yg:0,Zg:0,Xg:0,Im:0};this.G={active:!1,aborted:!1,speed:.1,
pan:0,A:0,V:0,fov:70,Qd:70,Yg:0,Zg:0,Jm:0,Xg:0,Ib:0,oh:0,gk:0,Tk:!1,hh:!1,fl:0,el:0,ki:!1};this.Gf={pan:-1,A:-1,fov:-1};this.Gm=0;this.la=null;this.eg={};this.Hh={};this.Wd=[];this.zi={};this.Ic={};this.Jf={};this.I={mode:1,Ug:-1,Ba:0,lb:0,fd:.05,dc:255,cc:1,bc:255,ac:.3,zf:!0,aj:{enabled:!0,width:180,height:20,bj:0,$i:1,background:!0,bc:16777215,ac:1,dc:0,cc:1,rj:3,Sh:1,lj:!0},ub:[],Yb:[],ad:[],Wi:[]};this.Na=null;this.X=[];this.Y=[];this.T=[];this.eb=[];this.pe={};this.Ya=[];this.wa=[];this.bd=
[];this.re=[];this.Ze=[];this.ca=1;this.ya=this.he=this.Lb=this.hd=null;this.xg={};this.vd={};this.v=new r.lo;this.Gq={target:0,current:0,fd:.01,delay:2,Kj:0,Xh:!1,Do:!1};this.margin={left:0,top:0,right:0,bottom:0};this.M={ah:!1,mq:!1,hc:!1,be:!1,Hd:!0,wm:!1,Bn:1,nn:!1,Ij:!0,rg:!0,Uh:!1,Bf:!1,pn:!0,sensitivity:8};this.eh=[];this.ld=!0;this.pa={x:0,y:0};this.Fh=this.Kb=this.Dh=this.cd=this.ef=this.ia=!1;this.jj=this.Un=!0;this.$j=!1;this.Ee=!0;this.cg=this.Xj=this.Zj=!1;this.Vn=!0;this.Pa=this.Ud=
"";this.Tc="transition";this.Va="transform";this.Cd="perspective";this.Cl="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA5JREFUeNpiYBgeACDAAADIAAE3iTbkAAAAAElFTkSuQmCC";this.xb={width:0,height:0};this.Nl=new r.Ha;this.Ml=new r.Ha;this.Ol=new r.Ha;this.Pl=new r.Ha;this.Ll=new r.Ha;this.Ef=!1;this.Hm=this.Qa="";this.kj=[];this.pk=[];this.Wj=!1;this.fj=[];this.Rg=this.xm=this.Pg=this.ym=this.ae=this.dk=this.Ck=this.Yc=this.oi=
this.Le=this.ek=this.zm=this.Am=this.Cm=!1;this.Eh=!0;this.Mi=this.mi=!1;this.sm=[];this.devicePixelRatio=1;this.qa=this.K=null;this.ng=!1;this.Xa=null;this.wb={enabled:!1,speed:1,running:!1,Pj:!0};this.Pm=!1;this.yi="RURVIExpY2Vuc2U6IFNlY29uZGFyeSBTY2hvb2wg4oSWMzA=";this.cube=new r.mo;this.Sk=!1;this.qg=function(f,g){if(0==f.length)return f;var h;var l=[];var k=g.Ji(f[0])-0;for(h=0;h<f.length;h++){var q=h;var p=h+1;p==f.length&&(p=0);var w=g.Ji(f[p])-0;if(0<=k&&0<=w)l.push(f[q]);else if(0<=k||0<=w){var x=w/(w-k);0>x&&(x=0);1<x&&(x=1);var y=
new r.Ha;y.Gd(f[q],f[p],x);0>k||l.push(f[q]);l.push(y)}k=w}return l};this.an=new n;this.Ik=0;this.mc=!1;this.vi=-1;this.Fg=function(f){return f?f.pageX||f.pageY?{x:f.pageX,y:f.pageY}:f.clientX||f.clientY?{x:f.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,y:f.clientY+document.body.scrollTop+document.documentElement.scrollTop}:f.touches&&f.touches[0]?{x:f.touches[0].pageX,y:f.touches[0].pageY}:{x:0,y:0}:{x:0,y:0}};this.Ci=1;this.bp=this.di=this.Em=this.Lj=this.wk=this.Ki=0;this.Fm=
!1;this.Yd=!0;this.mb=new r.Mh(this);this.mb.zf=!1;this.Bl();if(7<this.yi.length){var e=c.tg("bG9n");window[c.tg("Y29uc29sZQ==")][e](c.zl(this.yi))}this.Uf(this.mb);this.checkLoaded=this.fc;this.isLoaded=!1;b&&b.hasOwnProperty("useFlash")&&b.useFlash&&(this.Kb=!0,this.ia=this.cd=!1,b.hasOwnProperty("flashPlayerId")?this.Fe=b.flashPlayerId:this.Fe="pano",b.hasOwnProperty("flashContainerId")?this.Rj=b.flashContainerId:this.Rj=a+"flash");b&&b.hasOwnProperty("webGLFlags")&&b.webGLFlags&&(this.$n=b.webGLFlags);
this.Fa();this.Kb||(this.Ta=new r.io(this));this.ul(a);this.Co();this.userdata=this.eg=this.yg();this.emptyHotspot=this.mb;this.mouse=this.pa;this.K=new r.jo(this);this.Xa=new r.ko(this);this.ya=new r.qo(this);this.kb=new r.ro(this);this.Nc()}c.prototype.jm=function(a){return-99991===a?this.lq:"6.1.0/17841"};c.prototype.Dj=function(){this.K.enabled=this.qa.enabled;this.K.type=this.qa.type;this.K.sa=this.qa.zoomin;this.K.qc=this.qa.zoomout;this.K.lg=this.qa.blendtime;this.K.hg=this.qa.zoomoutpause;
this.K.gg=this.qa.zoomfov;this.K.te=this.qa.zoomspeed;this.K.lf=this.qa.blendcolor;this.K.Mc=this.qa.softedge;this.qa=null};c.prototype.ur=function(a){this.qa={};this.qa.enabled=!0;this.qa.type=this.K.type;this.qa.zoomin=this.K.sa;this.qa.zoomout=this.K.qc;this.qa.blendtime=this.K.lg;this.qa.zoomoutpause=this.K.hg;this.qa.zoomfov=this.K.gg;this.qa.zoomspeed=this.K.te;this.qa.blendcolor=this.K.lf;this.qa.softedge=this.K.Mc;if(a.hasOwnProperty("type")){var b=a.type;if("cut"==b||"crossdissolve"==b||
"diptocolor"==b||"irisround"==b||"irisrectangular"==b||"wipeleftright"==b||"wiperightleft"==b||"wipetopbottom"==b||"wipebottomtop"==b||"wiperandom"==b)this.qa.type=b}a.hasOwnProperty("before")&&(b=Number(a.before),0==b||2==b)&&(this.qa.zoomin=b);a.hasOwnProperty("after")&&(b=Number(a.after),0==b||2==b||3==b||4==b)&&(this.qa.zoomout=b);a.hasOwnProperty("transitiontime")&&(b=Number(a.transitiontime),0<=b&&50>=b&&(this.qa.blendtime=b));a.hasOwnProperty("waitfortransition")&&(this.qa.zoomoutpause=1==
a.waitfortransition);a.hasOwnProperty("zoomedfov")&&(b=Number(a.zoomedfov),.01<=b&&50>=b&&(this.qa.zoomfov=b));a.hasOwnProperty("zoomspeed")&&(b=Number(a.zoomspeed),.01<=b&&99>=b&&(this.qa.zoomspeed=b));a.hasOwnProperty("dipcolor")&&(this.qa.blendcolor=a.dipcolor);a.hasOwnProperty("softedge")&&(a=Number(a.softedge),0<=a&&1E3>=a&&(this.qa.softedge=a));this.ng||this.Dj()};c.prototype.Lc=function(a,b,e){var f=b?Number(b):0;if(0!=a&&4!=a&&12!=a&&9!=a)this.Hc("Unsupported projection type: "+a);else if(b&&
0!==f&&4!==f&&12!==f&&9!==f)this.Hc("Unsupported projection2 type: "+f);else if(a==f&&(f=0),this.jh=e?Number(e):1,this.Wa!=a||this.yc!=f)this.Wa=a,this.yc=f,this.ya.li()};c.prototype.Sa=function(){return 0==this.Wa?4:this.Wa};c.prototype.xj=function(a,b){if(0!=a&&4!=a&&12!=a&&9!=a)this.Hc("Unsupported projection type: "+a);else if(this.ia||0==a||4==a||this.Hc("Projection changes require WebGL!"),this.Sa()!=a){var e={};e.pan=this.pan.m;e.tilt=this.A.m;e.fov=this.fov.m;e.projection=a;e.timingFunction=
3;e.speed=b;a=this.Eg(a);e.fov=Math.min(a,e.fov);this.Bi(e)}};c.prototype.addListener=function(a,b){(this.xg[a]=this.xg[a]||[]).push(b)};c.prototype.S=function(a,b){if(a=this.xg[a])for(var e=a.length,f=0;f<e;f++)try{a[f].apply(null,[b])}catch(g){this.Hc(g)}};c.prototype.removeEventListener=function(a,b){var e=this.xg[a];if(e){var f;var g=0;for(f=e.length;g<f;g++)if(e[g]===b){1===f?delete this.xg[a]:e.splice(g,1);break}}};c.prototype.Wq=function(){this.Ma=!0};c.prototype.Xp=function(){return this.R};
c.prototype.xo=function(a,b,e,f){if(!this.vd.hasOwnProperty(a)){var g=new m;this.vd[a]=g;g.type=b;"undefined"!==typeof e&&this.ke(a,e);"object"===typeof f&&this.wn(a,f);return!0}return!1};c.prototype.wn=function(a,b){if(this.vd.hasOwnProperty(a)&&"object"===typeof b){var e=this.vd[a];b.hasOwnProperty("cookiePath")&&(e.sl=String(b.cookiePath));b.hasOwnProperty("cookieExpireDays")&&(e.Cj=parseFloat(b.cookieExpireDays));if(b.hasOwnProperty("keep")&&(e.Dm=!!b.keep,e.Dm)){var f="ggvar_"+a;0<document.cookie.length&&
(b=document.cookie.indexOf(f+"="),-1!=b&&(b=b+f.length+1,f=document.cookie.indexOf(";",b),-1==f&&(f=document.cookie.length),b=decodeURIComponent(document.cookie.substring(b,f)),0==e.type&&this.ke(a,b),1==e.type&&this.ke(a,parseFloat(b)),2==e.type&&this.ke(a,"true"==b)))}return!0}return!1};c.prototype.ke=function(a,b){if(this.vd.hasOwnProperty(a)){var e=this.vd[a];if(0==e.type&&"string"===typeof b||1==e.type&&"number"===typeof b||2==e.type&&"boolean"===typeof b){if(e.Dm){var f="ggvar_"+a+"="+encodeURIComponent(b.toString());
-1<=e.Cj&&(f+="; max-age="+86400*e.Cj);e.sl&&(f+="; path="+e.sl);document.cookie=f}e.value!=b&&(e.value=b,this.S("varchanged_"+a,{value:b}));return!0}}return!1};c.prototype.Rp=function(a){if(this.vd.hasOwnProperty(a))return this.vd[a].value};c.tg=function(a){var b="",e=0;a=a.replace(/[^A-Za-z0-9\+\/=]/g,"");do{var f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(e++));var g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(e++));
var h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(e++));var l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(e++));f=f<<2|g>>4;g=(g&15)<<4|h>>2;var k=(h&3)<<6|l;b+=String.fromCharCode(f);64!=h&&(b+=String.fromCharCode(g));64!=l&&(b+=String.fromCharCode(k))}while(e<a.length);return b};c.Mr=function(a){for(var b=[1,1,1,1,2,2,3,0],e=a.length,f="",g=0;g<e;){var h=a.charCodeAt(g++);if(h&128){var l=b[h>>3&7];if(!(h&64&&l)||g+
l>e)return null;for(h&=63>>l;0<l;--l){var k=a.charCodeAt(g++);if(128!=(k&192))return null;h=h<<6|k&63}}f+=String.fromCharCode(h)}return f};c.zl=function(a){return c.Mr(c.tg(a))};c.prototype.Bl=function(){this.devicePixelRatio=window.devicePixelRatio||1;this.Cm=!!navigator.userAgent.match(/(Windows|Win)/g);this.Am=!!navigator.userAgent.match(/(Mac|Macintosh|Mac_powerpc)/g);this.zm=!!navigator.userAgent.match(/(Linux|Ubuntu)/g);this.ek=!!navigator.userAgent.match(/(MSIE)/g);this.Le=!!navigator.userAgent.match(/(Edge|EdgA)/g);
this.oi=!!navigator.userAgent.match(/(Firefox)/g);if(this.Yc=!!navigator.userAgent.match(/(Safari)/g)){var a=navigator.userAgent.indexOf("Safari");this.ud=navigator.userAgent.substring(a+7);a=navigator.userAgent.indexOf("Version");-1!=a&&(this.ud=navigator.userAgent.substring(a+8));this.ud=this.ud.substring(0,this.ud.indexOf(" "));this.ud=this.ud.substring(0,this.ud.indexOf("."));this.Ck=!0}if(this.dk=!!navigator.userAgent.match(/(Chrome)/g))this.Yc=!1;this.ae=!!navigator.userAgent.match(/(iPad|iPhone|iPod)/g);
this.ym=!!navigator.userAgent.match(/(iPhone|iPod)/g);this.Pg=!!navigator.userAgent.match(/(android)/i);this.xm=!!navigator.userAgent.match(/(IEMobile)/i);this.Rg=this.ae||this.Pg||this.xm;/iP(hone|od|ad)/.test(navigator.platform)&&(a=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/),this.sm=[parseInt(a[1],10),parseInt(a[2],10),parseInt(a[3]||"0",10)]);this.mi=!window.requestAnimationFrame;a=["Webkit","Moz","O","ms","Ms"];this.Pa="";this.Tc="transition";this.Va="transform";this.Cd="perspective";
for(var b=0;b<a.length;b++)"undefined"!==typeof document.documentElement.style[a[b]+"Transform"]&&(this.Pa="-"+a[b].toLowerCase()+"-",this.Tc=a[b]+"Transition",this.Va=a[b]+"Transform",this.Cd=a[b]+"Perspective");this.$j=Eh();this.ia=Fh();this.cd=this.$j;this.ia&&(this.cd=!1);this.Kc=!0;this.Rf=!1;if(this.ae||this.Pg)this.vn(80),this.xh=2;this.Hc("Pano2VR player "+this.jm()+" - Prefix:"+this.Pa+", "+(this.$j?"CSS 3D available":"CSS 3D not available")+", "+(this.ia?"WebGL available":"WebGL not available"));
Gh&&this.O("Pano2VR Debug version!");try{window.AudioContext=window.AudioContext||window.webkitAudioContext,this.Aa=new AudioContext}catch(e){this.Aa=null}this.Yc&&(!this.Ck||9>Number(this.ud))&&(this.Aa=null);this.Yc&&!this.ae&&12<=Number(this.ud)&&(this.Aa=null);this.Eh=this.ym?this.Yc&&this.Ck&&10<=Number(this.ud)?!0:!1:!0};c.prototype.O=function(a){if(Gh){var b=document.getElementById("gg_debug");b&&(b.innerHTML=a.toString()+"<br />");window.console&&window.console.log(a)}};c.prototype.ns=function(a){if(Gh){var b=
document.getElementById("gg_debug");b&&(b.innerHTML=a.toString()+"<br />");window.console&&window.console.warn(a)}};c.prototype.Hc=function(a){var b=document.getElementById("gg_debug");b&&(b.innerHTML=a+"<br />");window.console&&window.console.log(a)};c.prototype.vn=function(a){this.Oe=a};c.prototype.setCrossOrigin=function(a){this.crossOrigin=a};c.prototype.er=function(a){this.Cf=a};c.prototype.Ip=function(){return this.lh};c.prototype.cr=function(a){this.Ud=a};c.prototype.Ul=function(){return this.Ud};
c.prototype.pp=function(){return this.Rg};c.prototype.qp=function(){return this.Ef};c.prototype.mp=function(){return this.C.active};c.prototype.fr=function(a){this.Rg=!!a};c.prototype.ei=function(){return this.isLoaded};c.prototype.op=function(){return!this.isLoaded};c.prototype.nd=function(){return Number(this.D.height)/(2*Math.tan(Math.PI/180*(this.Sb()/2)))};c.prototype.xn=function(a,b){this.isFullscreen&&(a=window.innerWidth,b=window.innerHeight);var e=a-this.margin.left-this.margin.right,f=b-
this.margin.top-this.margin.bottom;if(!(10>e||10>f)){var g=window.devicePixelRatio||1;this.Sf&&(g=1);this.L.style.width=e+"px";this.L.style.height=f+"px";this.L.style.left=this.margin.left+"px";this.L.style.top=this.margin.top+"px";if(this.ia)try{this.$a&&(this.$a.style.position="absolute",this.$a.style.display="inline",this.$a.style.width=e+"px",this.$a.style.height=f+"px",this.$a.width=e*g,this.$a.height=f*g),this.R&&(this.xb.width=e*g,this.xb.height=f*g,this.R.viewport(0,0,this.R.drawingBufferWidth,
this.R.drawingBufferHeight))}catch(h){alert(h)}this.tc&&(this.tc.style.width=a+"px",this.tc.style.height=b+"px",this.tc.width=a,this.tc.height=b);this.Ra&&(this.Ra.style.width=a+"px",this.Ra.style.height=b+"px",this.Ia.style.width=a+"px",this.Ia.style.height=b+"px",this.Ia.width=a,this.Ia.height=b,this.Ia.style.left=this.margin.left+"px",this.Ia.style.top=this.margin.top+"px",this.ta&&this.ta!=this.Ra&&(this.ta.style.width=a+"px",this.ta.style.height=b+"px"));this.Ta&&(e=this.Ta.gd,e.style.width=
a+"px",e.style.height=b+"px",e.width=a,e.height=b,e.style.left=this.margin.left+"px",e.style.top=this.margin.top+"px");this.Af&&(this.Ma=!0);e=this.L.offsetWidth;f=this.L.offsetHeight;if(this.D.width!=e||this.D.height!=f)this.D.width=e,this.D.height=f;this.hs();this.ta&&this.ta.ggUpdateSize&&this.ta.ggUpdateSize(a,b);this.S("sizechanged",{w:a,h:b});this.S("playerstatechanged",{})}};c.prototype.df=function(){this.Sk=!0};c.prototype.Nc=function(){this.xn(this.hd.offsetWidth,this.hd.offsetHeight)};c.prototype.Wp=
function(){var a={width:0,height:0};a.width=this.D.width;a.height=this.D.height;return a};c.prototype.He=function(){var a={x:0,y:0},b=this.L;if(b.offsetParent){do a.x+=b.offsetLeft,a.y+=b.offsetTop,b=b.offsetParent;while(b)}return a};c.prototype.sr=function(a){this.la=a};c.prototype.gr=function(a,b,e,f){this.margin.left=a;this.margin.top=b;this.margin.right=e;this.margin.bottom=f;this.la=this.skinObj;this.df()};c.prototype.Lo=function(a){0==a&&(this.M.Hd=!1);1==a&&(this.M.Hd=!0);2==a&&(this.M.Hd=
!this.M.Hd);this.S("viewmodechanged",{});this.S("playerstatechanged",{})};c.prototype.Up=function(){return 1==this.M.Hd?1:0};c.prototype.ol=function(a,b){this.I.mode=1==b&&0<this.I.mode?0:Math.round(a);this.update();this.ra&&(this.ra.changePolygonMode(a,b),this.ra.update());this.S("polymodechanged",{})};c.prototype.zn=function(a){var b=this.I.ub.indexOf(a);-1==b?(this.I.ub.push(a),this.I.Yb.push(0),this.I.ad.push(1)):this.I.ad[b]=1;this.update()};c.prototype.qm=function(a){var b=this.I.ub.indexOf(a);
-1!=b&&(this.I.ad[b]=0,this.I.Wi.push(a),this.update())};c.prototype.Sr=function(a){var b=this.I.ub.indexOf(a);-1==b||-1!=b&&0==this.I.ad[b]?this.zn(a):this.qm(a);this.update()};c.prototype.Jo=function(a,b,e,f,g){for(var h=0;h<this.X.length;h++){var l=this.X[h];"poly"!=l.type||l.id!=a&&""!=a||(l.bc=b,l.ac=e,l.dc=f,l.cc=g)}""==a&&(this.I.bc=b,this.I.ac=e,this.I.dc=f,this.I.cc=g);this.update()};c.prototype.Ho=function(a){this.Ta&&(this.Ta.Fk=0==a?!0:1==a?!1:!this.Ta.Fk,this.update())};c.prototype.Kp=
function(){return this.I.mode};c.prototype.Mo=function(){this.S("viewstatechanged",{})};c.prototype.Vp=function(){return 0};c.prototype.xp=function(a){return(a=this.zi[a])?a.type:"web"};c.prototype.wp=function(a){return(a=this.zi[a])?a:{}};c.prototype.Dp=function(a,b){var e=[];a||(a=this.Qa);var f=this.Wd[a];f&&(a=f);""===a&&0<Object.keys(this.Ic).length&&(a=Object.keys(this.Ic)[0]);this.Ic[a]&&this.Ic[a][b]&&(e.push(this.Ic[a][b].y),e.push(this.Ic[a][b].x));return e};c.prototype.Ep=function(a,b){var e=
[];a||(a=this.Qa);var f=this.Wd[a];f&&(a=f);""===a&&0<Object.keys(this.Ic).length&&(a=Object.keys(this.Ic)[0]);this.Jf[a]&&this.Jf[a][b]&&(e.push(this.Jf[a][b].x),e.push(this.Jf[a][b].y));return e};c.prototype.Zl=function(a){var b=this.Wd[a];b&&(a=b);b=this.Yl();for(var e=[],f=0;f<b.length;f++)this.Ic[a][b[f]]&&e.push(b[f]);return e};c.prototype.vp=function(a){a=this.Zl(a);return 0<a.length?a[0]:""};c.prototype.Yl=function(){var a=[],b;for(b in this.zi)a.push(b);return a};c.prototype.tm=function(a,
b,e){a=Math.atan2(a+1,e);var f=Math.atan2(b+1,e);b=Math.sin(a);e=Math.sin(f);a=Math.cos(a);f=Math.cos(f);this.Nl.init(0,0,-1);this.Ml.init(a,0,-b);this.Ol.init(-a,0,-b);this.Pl.init(0,f,-e);this.Ll.init(0,-f,-e)};c.prototype.zj=function(a){a=this.qg(a,this.Nl);a=this.qg(a,this.Ml);a=this.qg(a,this.Ol);a=this.qg(a,this.Pl);return a=this.qg(a,this.Ll)};c.prototype.On=function(a){if(!this.Kc&&this.kq!=a){this.kq=a;var b=this.margin.left+this.D.width/2+"px ";b+=this.margin.top+this.D.height/2+"px ";this.Ra.style[this.Cd]=
a+"px";this.Ra.style[this.Cd+"Origin"]=b;this.L.style[this.Cd]=a+"px";this.L.style[this.Cd+"Origin"]=b}};c.prototype.Vl=function(){return this.K.qe||this.K.xd||this.ia&&(4!=this.Wa||0!=this.yc)?!1:!0};c.prototype.Bh=function(){var a=new r.Ha(0,0,-100),b=this.nd();var e=100/this.fov.m;var f=this.v.width/this.v.height;var g=this.D.height*e*f;e*=this.D.height;for(var h=this.Vl(),l=0;l<this.X.length;l++){var k=this.X[l];if("point"==k.type){var q=!1;if(2==this.rb){var p=(this.pan.m-k.pan)/100/f*g;var w=
(this.A.m-k.A)/100*e;Math.abs(p)<this.D.width/2+500&&Math.abs(w)<this.D.height/2+500&&(q=!0)}else a.init(0,0,-100),a.Ga(-k.A*Math.PI/180),a.Ka(k.pan*Math.PI/180),a.Ka(-this.pan.m*Math.PI/180),a.Ga(this.A.m*Math.PI/180),a.jb(this.V.m*Math.PI/180),.01>a.z?(w=-b/a.z,p=a.x*w,w*=a.y,Math.abs(p)<this.D.width/2+500&&Math.abs(w)<this.D.height/2+500&&(q=!0)):w=p=0;k.Wb=p+this.D.width/2;k.Ab=w+this.D.height/2;k.visible=q;k.px=k.Wb;k.py=k.Ab;k.visible=k.visible;if(k.j&&k.j.onUpdatePosition)k.j.onUpdatePosition(this,
k);else k.j&&k.j.__div&&("none"!=k.j.__div.style[this.Tc]&&(k.j.__div.style[this.Tc]="none"),q&&h?k.j.ggUse3d?(this.Kc||this.On(b),2==this.rb?(k.j.__div.style[this.Va]="scale("+(100/this.fov.m*500/k.j.gg3dDistance).toFixed(10)+")",k.j.__div.style.left=this.margin.left+p+this.D.width/2+"px",k.j.__div.style.top=this.margin.top+w+this.D.height/2+"px"):(k.j.__div.style.width="1px",k.j.__div.style.height="1px",p="",this.Kc&&(p+="perspective("+b+"px) "),p+="translate3d(0px,0px,"+b+"px) ",p+="rotateZ("+
this.V.m.toFixed(10)+"deg) ",p+="rotateX("+this.A.m.toFixed(10)+"deg) ",p+="rotateY("+(-this.pan.m).toFixed(10)+"deg) ",p+="rotateY("+k.pan.toFixed(10)+"deg) ",p+="rotateX("+(-k.A).toFixed(10)+"deg) ",p+="translate3d(0px,0px,"+(-1*k.j.gg3dDistance).toFixed(10)+"px) ",k.j.__div.style[this.Va+"Origin"]="0% 0%",k.j.__div.style[this.Va]=p,k.j.__div.style.left=this.margin.left+this.D.width/2+"px",k.j.__div.style.top=this.margin.top+this.D.height/2+"px")):(k.j.__div.style.left=this.margin.left+p+this.D.width/
2+"px",k.j.__div.style.top=this.margin.top+w+this.D.height/2+"px"):(k.j.__div.style[this.Va]="",k.j.__div.style.left="-1000px",k.j.__div.style.top="-1000px"))}if("poly"==k.type){var x=[];if(2==this.rb)for(k.ge=[],q=0;q<k.vertices.length;q++)w=k.vertices[q],p=(this.pan.m-w.pan)/100/f*g,w=(this.A.m-w.A)/100*e,p+=this.margin.left+this.D.width/2,w+=this.margin.top+this.D.height/2,k.ge.push({Wb:p,Ab:w});else{for(q=0;q<k.vertices.length;q++)w=k.vertices[q],a.init(0,0,-100),a.Ga(-w.A*Math.PI/180),a.Ka(w.pan*
Math.PI/180),a.Ka(-this.pan.m*Math.PI/180),a.Ga(this.A.m*Math.PI/180),a.jb(this.V.m*Math.PI/180),x.push(a.clone());x=this.zj(x);if(0<x.length)for(q=0;q<x.length;q++)a=x[q],.1>a.z?(w=-b/a.z,p=this.D.width/2+a.x*w,w=this.D.height/2+a.y*w):w=p=0,a.Wb=p,a.Ab=w;k.ge=x}}}};c.prototype.hp=function(){for(var a=[],b=0;b<this.X.length;b++){var e=this.X[b];"point"==e.type&&e.j&&e.j.__div&&a.push(e.j.__div)}return a};c.prototype.fa=function(a,b){a=Number(a);isNaN(b)&&(b=0);0>b&&(b=0);1<b&&(b=1);return"rgba("+
(a>>16&255)+","+(a>>8&255)+","+(a&255)+","+b+")"};c.prototype.Iq=function(){var a;if(this.Ia&&(this.I.Ug!=this.I.mode&&(this.I.Ug=this.I.mode,this.Ia.style.visibility=0<this.I.mode?"inherit":"hidden"),0<=this.I.mode||0<this.I.ub.length)){this.ma||(this.ma=this.Ia.getContext("2d"));if(this.ma.width!=this.D.width||this.ma.height!=this.D.height)this.ma.width=this.D.width,this.ma.height=this.D.height;this.ma.clear?this.ma.clear():this.ma.clearRect(0,0,this.Ia.width,this.Ia.height);var b=1;0>=this.I.mode&&
(b=0);3==this.I.mode&&(b=this.I.Ba);for(a=0;a<this.X.length;a++){var e=this.X[a];var f=b;if("poly"==e.type){var g=e.ge;2==this.I.mode&&(f=e.Ba);var h=this.I.ub.indexOf(e.id);-1!=h&&(f=this.I.Yb[h]);this.ma.fillStyle=this.fa(e.bc,e.ac*f);this.ma.strokeStyle=this.fa(e.dc,e.cc*f);if(0<g.length){this.ma.beginPath();for(e=0;e<g.length;e++)f=g[e],0==e?this.ma.moveTo(f.Wb,f.Ab):this.ma.lineTo(f.Wb,f.Ab);this.ma.closePath();this.ma.stroke();this.ma.fill()}}}}};c.prototype.rm=function(a,b,e){var f,g=!1;var h=
0;for(f=a.length-1;h<a.length;f=h++){var l=a[h];f=a[f];l.Ab>e!=f.Ab>e&&b<(f.Wb-l.Wb)*(e-l.Ab)/(f.Ab-l.Ab)+l.Wb&&(g=!g)}return g};c.prototype.Th=function(a,b){var e=-1;if((0<=this.I.mode||0<this.I.ub.length)&&this.gq())for(var f=0;f<this.X.length;f++){var g=this.X[f];"poly"==g.type&&g.ge&&0<g.ge.length&&(-1!=this.I.mode||-1!=this.I.ub.indexOf(g.id))&&this.rm(g.ge,a,b)&&(e=f,g.Wb=a,g.Ab=b)}return 0<=e?this.X[e]:!1};c.prototype.gq=function(){return 4==this.Sa()&&0==this.yc};c.prototype.Sb=function(){var a=
0,b=this.Sa(),e=this.D;switch(this.fov.mode){case 0:a=this.fov.m/2;break;case 1:a=4==b?180*Math.atan(e.height/e.width*Math.tan(this.fov.m/2*Math.PI/180))/Math.PI:e.height/e.width*this.fov.m/2;break;case 2:a=Math.sqrt(e.width*e.width+e.height*e.height);a=4==b?180*Math.atan(e.height/a*Math.tan(this.fov.m/2*Math.PI/180))/Math.PI:e.height/a*this.fov.m/2;break;case 3:a=4*e.height/3>e.width?this.fov.m/2:4==b?180*Math.atan(4*e.height/(3*e.width)*Math.tan(this.fov.m/2*Math.PI/180))/Math.PI:4*e.height/(3*
e.width)*(this.fov.m/2)}return 2*a};c.prototype.kp=function(a,b){a||(a=this.Sb());b||(b=this.Sa());return 4==b?180*Math.atan(this.aspect()*Math.tan(a/2*Math.PI/180))/Math.PI:a*this.aspect()};c.prototype.aspect=function(){return this.D.width/this.D.height};c.prototype.ll=function(a){var b=this.fov.m;a/=2;var e=this.Sa();switch(this.fov.mode){case 0:b=2*a;break;case 1:a=4==e?180*Math.atan(this.D.width/this.D.height*Math.tan(a*Math.PI/180))/Math.PI:this.D.width/this.D.height*a;b=2*a;break;case 2:b=Math.sqrt(this.D.width*
this.D.width+this.D.height*this.D.height);a=4==e?180*Math.atan(b/this.D.height*Math.tan(a*Math.PI/180))/Math.PI:b/this.D.height*a;b=2*a;break;case 3:4*this.D.height/3>this.D.width?b=2*a:(b=3*this.D.width/(4*this.D.height),a=4==e?180*Math.atan(b*Math.tan(a*Math.PI/180))/Math.PI:b*a,b=2*a)}return b};c.prototype.Ui=function(a){this.fov.m=this.ll(a)};c.prototype.pg=function(){if(!this.ef){var a=this.an;a.pan=this.pan.m;a.A=this.A.m;a.fov=this.fov.m;this.nf(a);this.nf(a);this.nf(a);this.pan.m=a.pan;this.A.m=
a.A;this.fov.m=a.fov}};c.prototype.nf=function(a){var b=this.D.width/this.D.height;if(2==this.rb){if(0<this.fov.fh){var e=this.Ac;this.v.levels&&0<this.v.levels.length&&(e=this.v.levels[0].height);this.fov.min=100*this.D.height/(e*this.fov.fh)}var f=a.fov/2;e=f*b;var g=this.v.width/this.v.height*50;b=this.M.pn?2*Math.min(50,g/b):2*Math.max(50,g/b);a.fov<this.fov.min&&(a.fov=this.fov.min);a.fov>b&&(a.fov=b);50<f?a.A=0:(50<a.A+f&&(a.A=50-f),-50>a.A-f&&(a.A=-50+f));e>g?a.pan=0:(a.pan+e>g&&(a.pan=g-e,
this.C.active&&(this.C.speed=-this.C.speed,this.pan.d=0)),a.pan-e<-g&&(a.pan=-g+e,this.C.active&&(this.C.speed=-this.C.speed,this.pan.d=0)))}else{0<this.fov.fh&&(e=this.Ac,this.v.levels&&0<this.v.levels.length&&(e=this.v.levels[0].height),this.fov.min=360*Math.atan2(this.D.height/2,e/2*this.fov.fh)/Math.PI);a.fov<this.fov.min&&(a.fov=this.fov.min);g=this.fov.max;var h=179;f=this.Sb()/2;e=b*f;4==this.Sa()?e=180*Math.atan(b*Math.tan(f*Math.PI/180))/Math.PI:9==this.Sa()?(g=this.fov.nk,h=355):12==this.Sa()&&
(g=this.fov.mk,h=360);this.ia||(g=Math.max(160,g));a.fov>g&&(a.fov=g);12==this.Sa()&&(2*e>h&&(a.fov=h/b),f=this.Sb()/2,2*f>h&&(a.fov=h),f=this.Sb()/2,e=b*f);2*f>this.A.max-this.A.min&&180>this.A.max-this.A.min&&(f=(this.A.max-this.A.min)/2,a.fov=this.ll(2*f));90>this.A.max?a.A+f>this.A.max&&(a.A=this.A.max-f):a.A>this.A.max&&(a.A=this.A.max);-90<this.A.min?a.A-f<this.A.min&&(a.A=this.A.min+f):a.A<this.A.min&&(a.A=this.A.min);b=this.pan.max-this.pan.min;if(359.99>b){g=90;h=Math.tan(f*Math.PI/180);
var l=Math.tan((Math.abs(a.A)+f)*Math.PI/180);l=Math.sqrt(l*l+1)/Math.sqrt(h*h+1);f=180*Math.atan(l*Math.tan(e*Math.PI/180))/Math.PI;2*f>b&&(l=Math.tan(b*Math.PI/360)/Math.tan(e*Math.PI/180),b=l*Math.sqrt(h*h+1),l=Math.sqrt(b*b-1),g=180/Math.PI*Math.atan(l));a.pan+f>this.pan.max&&(a.pan=this.pan.max-f,this.C.active&&(this.C.speed=-this.C.speed,this.pan.d=0));a.pan-f<this.pan.min&&(a.pan=this.pan.min+f,this.C.active&&(this.C.speed=-this.C.speed,this.pan.d=0));a.A+e>g&&(a.A=g-e);a.A-e<-g&&(a.A=-g+e)}}};
c.prototype.update=function(a){void 0===a&&(a=0);this.Ma=!0;a&&(this.ug=Math.max(1*a,this.ug))};c.prototype.Xl=function(){return this.ra?!!this.ra.isTileLoading:0<this.Zb||0<this.zc};c.prototype.Ch=function(){var a=Date.now();if(this.Kb){if(this.ra)if(this.Zr(),2===this.rb)this.pg(),this.Bh();else if(0===this.rb){var b=this.nd();this.tm(this.D.width/2,this.D.height/2,b);this.Bh()}}else 2===this.rb?(this.Bh(),this.ia?(this.ya.Qk(),this.ya.Wm()):this.Qk()):0===this.rb&&(!this.ia||4==this.Wa&&0==this.yc?
(b=this.nd(),this.tm(this.D.width/2,this.D.height/2,b),this.Bh(),this.Fh?this.ya.gs():this.Un&&this.Tn(),this.Pn(),this.ia?(this.F.rd?14==this.F.format?this.ya.fs():this.ya.ao():0<this.v.levels.length?this.ya.os():this.ya.qs(),this.ya.Wm()):(this.cd?0<this.v.levels.length?this.ds():this.cs():this.Dh&&this.Yr(),this.Iq()),this.Ta&&this.Ta.Hq()):(this.ya.ao(),this.Bh(),this.bq()));b=Date.now();50<b-a?(this.O("Time between frames: "+(b-a)),this.Sf||(2<this.Ik?(this.Sf=!0,this.O("disabling HighDPI rendering"),
this.Nc()):this.Ik++)):this.Ik=0;this.Af&&this.v.jn++};c.prototype.cs=function(){var a=!1;if(this.D.width!=this.L.offsetWidth||this.D.height!=this.L.offsetHeight)this.D.width=this.L.offsetWidth,this.D.height=this.L.offsetHeight,this.L.style[this.Va+"OriginX"]=this.D.width/2+"px",this.L.style[this.Va+"OriginY"]=this.D.height/2+"px",a=!0;var b=Math.round(this.nd());this.Vg==b&&!a||this.Kc||(this.Vg=b,this.L.style[this.Cd]=b+"px");this.cube.Po(this.pan.m,this.A.m,this.V.m,this.Oa);for(a=0;6>a;a++){var e;
if(e=this.cube.faces[a]){var f="";this.Kc?(f+="translate3d("+this.D.width/2+"px,"+this.D.height/2+"px,0px) ",f+="perspective("+b+"px) ",f+="translate3d(0px,0px,"+b+"px) "):f+="translate3d("+this.D.width/2+"px,"+this.D.height/2+"px,"+b+"px) ";f+="rotateZ("+Number(this.V.m).toFixed(10)+"deg) ";f+="rotateX("+Number(this.A.m).toFixed(10)+"deg) ";f+="rotateY("+Number(-this.pan.m).toFixed(10)+"deg) ";e.km&&(f+=e.km,e.ob||(f="translate3d(-10px,-10px,0px) scale(0.001,0.001)"),e.W.style[this.Va]=f)}}};c.prototype.Yr=
function(){this.pg();var a;this.tc&&(a=this.tc.getContext("2d"));if(this.D.width!==this.L.offsetWidth||this.D.height!==this.L.offsetHeight)this.D.width=this.L.offsetWidth,this.D.height=this.L.offsetHeight;if(a){var b=a.canvas.width/2,e=a.canvas.height/2,f=a.createRadialGradient(b,e,5,b,e,Math.max(b,e));f.addColorStop(0,"#333");f.addColorStop(1,"#fff");a.rect(0,0,a.canvas.width,a.canvas.height);a.fillStyle=f;a.fill();a.fillStyle="#f00";a.font="20px Helvetica";a.textAlign="center";a.fillText("Pan: "+
this.pan.m.toFixed(1),b,e-60);a.fillText("Tilt: "+this.A.m.toFixed(1),b,e-30);a.fillText("Fov: "+this.fov.m.toFixed(1),b,e+0);a.fillText("Node: "+this.Sj(),b,e+30);a.fillText("Title: "+this.eg.title,b,e+60)}};c.prototype.Zr=function(){this.pg();if(this.D.width!==this.L.offsetWidth||this.D.height!==this.L.offsetHeight)this.D.width=this.L.offsetWidth,this.D.height=this.L.offsetHeight;this.ra&&this.ra.setPan&&(this.ra.setPan(this.pan.m),this.ra.setTilt(this.A.m),this.ra.setFov(this.fov.m))};c.prototype.Qk=
function(){this.Ia.style.visibility="inherit";this.ma||(this.ma=this.Ia.getContext("2d"));if(this.ma.width!=this.D.width||this.ma.height!=this.D.height)this.ma.width=this.D.width,this.ma.height=this.D.height;this.ma.clear?this.ma.clear():this.ma.clearRect(0,0,this.Ia.width,this.Ia.height);this.zc=0;var a=100/this.fov.m;var b=this.v.width/this.v.height;var e=this.D.height*a*b;a*=this.D.height;var f=(this.pan.m/100/b-.5)*e+this.D.width/2;for(var g=(this.A.m/100-.5)*a+this.D.height/2,h,l,k,q,p=0;this.v.levels.length>=
p+2&&this.v.levels[p+1].width>e;)p++;var w;var x=[];for(w=this.v.levels.length-1;w>=p;){b=this.v.levels[w];if(b.cache){var y={ib:0,Eb:0};y.Fb=b.U-1;y.Gb=b.ea-1}else{y={};var z=-g/a*(b.height/this.v.N);h=(-f+this.D.width)/e*(b.width/this.v.N);l=(-g+this.D.height)/a*(b.height/this.v.N);y.ib=Math.min(Math.max(0,Math.floor(-f/e*(b.width/this.v.N))),b.U-1);y.Eb=Math.min(Math.max(0,Math.floor(z)),b.ea-1);y.Fb=Math.min(Math.max(0,Math.floor(h)),b.U-1);y.Gb=Math.min(Math.max(0,Math.floor(l)),b.ea-1)}x[w]=
y;var fa=!0;for(l=y.Eb;l<=y.Gb;l++)for(h=y.ib;h<=y.Fb;h++)q=h+l*b.U,z=b.ba[q],z||(z=new r.Rd,b.ba[q]=z),this.Zb<this.xh?z.v||(this.bk++,z.v=new Image,z.v.onload=this.Pr(),z.v.onerror=this.cj(z),z.v.onabort=this.cj(z),z.v.crossOrigin=this.crossOrigin,z.v.setAttribute("src",this.ne(0,w,h,l)),b.cache&&this.fc.push(z.v),this.Zb++,this.Ma=!0):this.zc++,z.v&&z.v.complete||(fa=!1),z.visible=!0;y.ik=fa;w--}for(w=this.v.levels.length-1;w>=p;){b=this.v.levels[w];if(x[w]&&0<=x[w].ib)for(y=x[w],l=y.Eb;l<=y.Gb;l++)for(h=
y.ib;h<=y.Fb;h++)q=h+l*b.U,(z=b.ba[q])||(z=b.ba[q]=new r.Rd),z.v&&z.v.complete&&(q=f+(-this.v.Ea+this.v.N*h)*e/b.width,this.ma.drawImage(z.v,q,g+(-this.v.Ea+this.v.N*l)*a/b.height,z.v.width*e/b.width,z.v.height*a/b.height)),z.visible=!0;w--}for(e=0;e<this.v.levels.length;e++)if(b=this.v.levels[e],!b.cache)for(k in b.ba)b.ba.hasOwnProperty(k)&&(z=b.ba[k],z.visible||(z.v=null,delete b.ba[k]));if(0<=this.I.mode||0<this.I.ub.length)for(e=1,0>=this.I.mode&&(e=0),3==this.I.mode&&(e=this.I.Ba),k=0;k<this.X.length;k++)if(b=
this.X[k],f=e,"poly"==b.type&&(a=b.ge,2==this.I.mode&&(f=b.Ba),g=this.I.ub.indexOf(b.id),-1!=g&&(f=this.I.Yb[g]),0<a.length)){this.ma.fillStyle=this.fa(b.bc,b.ac*f);this.ma.strokeStyle=this.fa(b.dc,b.cc*f);this.ma.beginPath();for(b=0;b<a.length;b++)f=a[b],0==b?this.ma.moveTo(f.Wb,f.Ab):this.ma.lineTo(f.Wb,f.Ab);this.ma.closePath();this.ma.stroke();this.ma.fill()}this.ld=!1};c.prototype.Or=function(a){var b=this;return function(){b.update();b.ld=!0;a.loaded=!0;a.v&&!a.W&&b.L.appendChild(a.v);b.Zb&&
b.Zb--;a.v&&a.bb&&(a.bb.drawImage(a.v,0,0),a.v=null)}};c.prototype.Pr=function(){var a=this;return function(){a.Ma=!0;a.ld=!0;a.Zb&&a.Zb--}};c.prototype.cj=function(a){var b=this;return function(){b.Ma=!0;b.ld=!0;b.Zb&&b.Zb--;a.v=null}};c.prototype.im=function(a,b,e){e.ib=a.width/this.v.N*b.Bg;e.Eb=a.height/this.v.N*b.Cg;e.Fb=a.width/this.v.N*b.bh;e.Gb=a.height/this.v.N*b.dh;e.ib=Math.min(Math.max(0,Math.floor(e.ib)),a.U-1);e.Eb=Math.min(Math.max(0,Math.floor(e.Eb)),a.ea-1);e.Fb=Math.min(Math.max(0,
Math.floor(e.Fb)),a.U-1);e.Gb=Math.min(Math.max(0,Math.floor(e.Gb)),a.ea-1)};c.prototype.kr=function(a){a=Math.round(a);this.Kc=0<(a&1);this.Rf=0<(a&2);this.jj=0<(a&4);this.Sf=0<(a&8);4096<=a&&(this.cd=0<(a&4096),this.ia=0<(a&8192),this.Dh=0<(a&32768))};c.prototype.Np=function(){var a=0;this.Kc&&(a|=1);this.Rf&&(a|=2);this.jj&&(a|=4);this.cd&&(a|=4096);this.ia&&(a|=8192);this.Dh&&(a|=32768);return a};c.prototype.Rn=function(){if(!(6>this.cube.faces.length))for(var a=0;6>a;a++){var b=this.cube.faces[a];
var e=[];e.push(new r.Ha(-1,-1,-1,0,0));e.push(new r.Ha(1,-1,-1,1,0));e.push(new r.Ha(1,1,-1,1,1));e.push(new r.Ha(-1,1,-1,0,1));for(var f=0;4>f;f++)4>a?e[f].Ka(-Math.PI/2*a):e[f].Ga(Math.PI/2*(4==a?-1:1)),this.Oa&&(e[f].jb(this.Oa.V*Math.PI/180),e[f].Ga(-this.Oa.pitch*Math.PI/180)),e[f].Ue(-this.pan.m),e[f].Nd(this.A.m),e[f].Ve(this.V.m);e=this.zj(e);b.ob=0<e.length;if(b.ob){b=b.Mf;b.Bg=e[0].yd;b.bh=e[0].yd;b.Cg=e[0].$b;b.dh=e[0].$b;for(f=1;f<e.length;f++)b.Bg=Math.min(b.Bg,e[f].yd),b.bh=Math.max(b.bh,
e[f].yd),b.Cg=Math.min(b.Cg,e[f].$b),b.dh=Math.max(b.dh,e[f].$b);b.fg=b.bh-b.Bg;b.Ih=b.dh-b.Cg;b.scale=Math.max(b.fg,b.Ih)}else b.Mf.fg=-1,b.Mf.Ih=-1}};c.prototype.lk=function(){for(var a=0;a<this.v.levels.length;a++){var b=this.v.levels[a],e;for(e in b.ba)b.ba.hasOwnProperty(e)&&(b.ba[e].visible=!1)}};c.prototype.Oj=function(){var a=0,b=Math.tan(Math.min(this.Sb(),175)*Math.PI/360),e=this.D.height/(2*b);e*=1+this.D.width/this.D.height*b/2;for(e*=Math.pow(2,1<this.devicePixelRatio?this.v.Lm:this.v.Km);this.v.levels.length>=
a+2&&!this.v.levels[a+1].Se&&this.v.levels[a+1].width>e;)a++;return a};c.prototype.ds=function(){var a=!1,b,e,f;if(this.D.width!==this.L.offsetWidth||this.D.height!==this.L.offsetHeight)this.D.width=this.L.offsetWidth,this.D.height=this.L.offsetHeight,this.L.style[this.Va+"OriginX"]=this.D.width/2+"px",this.L.style[this.Va+"OriginY"]=this.D.height/2+"px",a=!0;var g=Math.round(this.nd());if(this.Vg!=g||a)this.Vg=g,this.Kc||(this.L.style[this.Cd]=g+"px",this.L.style[this.Cd+"Origin"]="50% 50%");this.zc=
0;if(0<this.v.levels.length){this.Rn();this.lk();var h="";for(b=0;6>b;b++){var l=this.cube.faces[b];l.ob&&(h=h+b+",")}h=this.Oj();var k;for(k=this.v.levels.length-1;k>=h;){a=this.v.levels[k];var q=1;k==this.v.levels.length-1&&0==this.v.Ea&&(q=this.v.N/(this.v.N-2));for(b=0;6>b;b++){l=this.cube.faces[b];var p=l.Mf;if(l.ob&&0<p.fg&&0<p.Ih&&0<p.scale||a.cache){l.Ma=!1;var w={};a.cache?(w.ib=0,w.Eb=0,w.Fb=a.U-1,w.Gb=a.ea-1):this.im(a,p,w);for(f=w.Eb;f<=w.Gb;f++)for(e=w.ib;e<=w.Fb;e++){var x=e+f*a.U+b*
a.U*a.ea;(p=a.ba[x])||(p=a.ba[x]=new r.Rd);if(!p.W&&this.Zb<this.xh){if(0<this.fj.length){p.W=this.fj.shift();for(x=this.L.firstChild;x&&x.Zd&&(-1==x.Zd||x.Zd>=k);)x=x.nextSibling;this.L.insertBefore(p.W,x);p.bb=p.W.getContext("2d")}else if(this.Jn<this.Oe){this.Jn++;p.W=document.createElement("canvas");p.W.width=this.v.N+2*this.v.Ea;p.W.height=this.v.N+2*this.v.Ea;p.bb=p.W.getContext("2d");p.W.style[this.Va+"Origin"]="0% 0%";p.W.style.overflow="hidden";p.W.style.position="absolute";for(x=this.L.firstChild;x&&
x.Zd&&(-1==x.Zd||x.Zd>=k);)x=x.nextSibling;this.L.insertBefore(p.W,x)}p.W&&(this.bk++,p.v=new Image,p.v.crossOrigin=this.crossOrigin,p.v.style[this.Va+"Origin"]="0% 0%",p.v.style.position="absolute",p.v.style.overflow="hidden",p.W.Zd=k,p.v.onload=this.Or(p),p.v.onerror=this.cj(p),p.v.onabort=this.cj(p),p.v.setAttribute("src",this.ne(b,k,e,f)),a.cache&&this.fc.push(p.v),this.Zb++,this.Ma=!0)}else this.zc++;if(p.W){x="";this.Kc?(x+="translate3d("+this.D.width/2+"px,"+this.D.height/2+"px,0px) ",x+=" perspective("+
g+"px) ",x+="translate3d(0px,0px,"+g+"px) "):x+="translate3d("+this.D.width/2+"px,"+this.D.height/2+"px,"+g+"px) ";x+="rotateZ("+Number(this.V.m).toFixed(10)+"deg) ";x+="rotateX("+Number(this.A.m).toFixed(10)+"deg) ";x+="rotateY("+Number(-this.pan.m).toFixed(10)+"deg) ";this.Oa&&(x+="rotateX("+Number(-this.Oa.pitch).toFixed(10)+"deg) ",x+="rotateZ("+Number(this.Oa.V).toFixed(10)+"deg) ");x=4>b?x+("rotateY("+-90*b+"deg) "):x+("rotateX("+(4==b?-90:90)+"deg) ");if(this.Rf){var y=this.v.N/a.width*(2*
k+1)*(this.mg/this.v.N);y=this.Yc?2/Math.tan(this.fov.m*Math.PI/360)*y:2*y;x+=" scale("+y*q*q+")"}else y=1/(q*q);x+=" translate3d("+(1/q*e*this.v.N-this.v.Ea-a.width/2)+"px,";x+=1/q*f*this.v.N-this.v.Ea-a.width/2+"px,";x+=-a.width*y/2+"px)";l.ob&&(p.visible=!0,p.W?p.W.style[this.Va]=x:p.v&&(p.v.style[this.Va]=x))}}}}k--}for(g=0;g<this.v.levels.length;g++){a=this.v.levels[g];for(var z in a.ba)a.ba.hasOwnProperty(z)&&(p=a.ba[z],!p.visible&&p.W&&(a.cache?p.W?p.W.style[this.Va]="translate3d(-10px,-10px,0px) scale(0.001,0.001)":
p.v&&(p.v.style[this.Va]=""):(p.bb&&p.bb.clearRect(0,0,p.bb.canvas.width,p.bb.canvas.height),this.fj.push(p.W),p.W?(h="translate3d(-10px,-10px,0px) scale(0.001,0.001)",p.W.style[this.Va]=h,p.W.Zd=-1):p.loaded&&this.L.removeChild(p.v),p.W=null,p.v=null,p.bb=null,delete a.ba[z])))}this.ld=!1}};c.prototype.Pn=function(){var a=Math.round(this.nd());this.Kc||this.On(a);for(var b=0;b<this.eb.length;b++){var e=this.eb[b];e.Sn(a);e.j.hidden=!1}};c.prototype.Tn=function(){for(var a=Math.round(this.nd()),b=
0;b<this.T.length;b++){var e=this.T[b];e.td||(e.Sn(a),e.j.hidden=!1)}};c.prototype.bq=function(){for(var a=0;a<this.eb.length;a++){var b=this.eb[a];b.Wf(!1)}for(a=0;a<this.T.length;a++)b=this.T[a],b.td||b.Wf(!1)};c.prototype.hs=function(){for(var a=0;a<this.T.length;a++){var b=this.T[a];b.td||b.df()}for(a=0;a<this.eb.length;a++)b=this.eb[a],b.df()};c.prototype.Xc=function(a){this.Ee=!1;try{this.$a=a?a:document.createElement("canvas");var b=this.hd.offsetWidth-this.margin.left-this.margin.right,e=
this.hd.offsetHeight-this.margin.top-this.margin.bottom;if(100>b||100>e)e=b=100;var f=window.devicePixelRatio||1;this.Sf&&(f=1);this.L.style.width=b+"px";this.L.style.height=e+"px";this.$a.style.width=b+"px";this.$a.style.height=e+"px";this.$a.width=b*f;this.$a.height=e*f;this.$a.style.display="none";this.$a.style.touchAction="none";this.L.insertBefore(this.$a,this.L.firstChild);var g=this.$n;g.stencil=!0;g.depth=!0;g.powerPreference="high-performance";g.alpha=this.Yc?!0:!1;this.ae&&10<=this.sm[0]&&
(g.antialias=!1,g.alpha=!1);a={};a.flags=g;a.canvas=this.$a;this.S("beforewebglcontext",a);this.R=this.$a.getContext("webgl",g);this.R||(this.R=this.$a.getContext("experimental-webgl",g));if(this.R){var h=this.R;this.xb.width=b*f;this.xb.height=e*f;h.clearColor(0,0,0,0);h.enable(this.R.DEPTH_TEST);h.viewport(0,0,500,500);h.clear(h.COLOR_BUFFER_BIT|h.DEPTH_BUFFER_BIT);4096<=h.getParameter(h.MAX_TEXTURE_SIZE)&&!this.Rg&&(this.Oe=1<f?4*this.Oe:2*this.Oe);this.O("Max tile cnt: "+this.Oe);this.ya.Og();
this.ya.li();this.ya.um(this.bf);this.ya.vm();this.K&&(this.K.Og(),this.K.Xc());this.Ta&&(this.Ta.Og(),this.Ta.Xc())}}catch(l){this.O(l)}this.R?(this.ia=!0,this.S("webglready",{gl:this.R})):alert("Could not initialise WebGL!")};c.prototype.Mb=function(a){return a?"{"==a.charAt(0)||"/"==a.charAt(0)||0<a.indexOf("://")||0==a.indexOf("javascript:")?a:this.Ud+a:this.Ud};c.prototype.Jb=function(a,b,e){var f=(new RegExp("%0*"+b,"i")).exec(a.toString());if(f){f=f.toString();var g=e.toString();f.charAt(f.length-
1)!=b&&(g=(1+e).toString());if(!isNaN(parseFloat(e)))for(;g.length<f.length-1;)g="0"+g;a=a.replace(f,g)}return a};c.prototype.ne=function(a,b,e,f,g){var h=this.v.hk-1-b,l=this.v.jk,k="x";switch(a){case 0:k="f";break;case 1:k="r";break;case 2:k="b";break;case 3:k="l";break;case 4:k="u";break;case 5:k="d";break;case "vr":k="vr"}g&&(a+="l",k+="l");for(g=0;3>g;g++)l=this.Jb(l,"c",a),l=this.Jb(l,"s",k),l=this.Jb(l,"r",b),l=this.Jb(l,"l",h),l=this.Jb(l,"x",e),l=this.Jb(l,"y",f),l=this.Jb(l,"v",f),l=this.Jb(l,
"h",e);return this.Mb(l)};c.prototype.Hg=function(){return this.pan.m};c.prototype.Hp=function(){return this.G.pan};c.prototype.bm=function(){for(var a=this.pan.m;-180>a;)a+=360;for(;180<a;)a-=360;return a};c.prototype.Ge=function(){for(var a=this.pan.m-this.pan.qk;-180>a;)a+=360;for(;180<a;)a-=360;return a};c.prototype.Xe=function(a){this.Fa();isNaN(a)||(this.pan.m=Number(a));this.update()};c.prototype.Dk=function(a){this.Fa();isNaN(a)||(this.pan.m=Number(a)+this.pan.qk);this.update()};c.prototype.nl=
function(a,b){isNaN(a)||(this.Xe(this.Hg()+a),b&&(this.pan.d=a))};c.prototype.Io=function(a,b){this.nl(a*this.ci(),b)};c.prototype.gi=function(){return this.A.m};c.prototype.Op=function(){return this.G.A};c.prototype.Ye=function(a){this.Fa();isNaN(a)||(this.A.m=Number(a));this.update()};c.prototype.pl=function(a,b){this.Ye(this.gi()+a);b&&(this.A.d=a)};c.prototype.Ko=function(a,b){this.pl(a*this.ci(),b)};c.prototype.Si=function(a){this.Fa();isNaN(a)||(this.V.m=Number(a));this.update()};c.prototype.fm=
function(){return this.V.m};c.prototype.Tj=function(){return this.fov.m};c.prototype.ip=function(){return this.G.Qd};c.prototype.We=function(a){this.Fa();switch(this.Sa()){case 4:var b=170;break;case 12:b=360;break;case 9:b=355;break;default:b=170}2==this.rb&&(b=9999999999);!isNaN(a)&&0<a&&a<b&&(b=this.fov.m,this.fov.m=1*a,b!=this.fov.m&&this.update())};c.prototype.ml=function(a,b){this.We(this.Tj()+a);b&&(this.fov.d=a)};c.prototype.wj=function(a,b){if(!isNaN(a)){var e=a/90*Math.cos(Math.min(this.fov.m,
90)*Math.PI/360);e=this.fov.m*Math.exp(e);this.We(e);b&&(this.fov.d=a)}};c.prototype.ir=function(a,b){this.Fa();isNaN(a)||(this.pan.m=a);isNaN(b)||(this.A.m=b);this.update()};c.prototype.jr=function(a,b,e){this.Fa();!isNaN(a)&&1E7>a&&-1E7<a&&(this.pan.m=a);!isNaN(b)&&1E7>b&&-1E7<b&&(this.A.m=b);!isNaN(e)&&1E7>e&&-1E7<e&&(this.V.m=e);this.update()};c.prototype.Ri=function(a,b,e){this.Fa();isNaN(a)||(this.pan.m=a);isNaN(b)||(this.A.m=b);isNaN(e)||this.We(e);this.update()};c.prototype.dr=function(){this.Ri(this.pan.cb,
this.A.cb,this.fov.cb)};c.prototype.setLocked=function(a){this.tn(a);this.un(a);this.sn(a)};c.prototype.tn=function(a){this.M.hc=a};c.prototype.sn=function(a){this.M.ah=a};c.prototype.tp=function(){return this.M.ah};c.prototype.un=function(a){this.M.be=a};c.prototype.Pi=function(a){this.mc=a};c.prototype.jp=function(){return this.om()?!0:this.Xj};c.prototype.wr=function(a,b){void 0===b&&(b=!0);this.Vn=b;this.cg==!a&&((this.cg=!!a)&&this.kn(),this.cg?this.qb.Ni=!0:this.V.m=0,this.S("gyrochanged",{}),
this.S("playerstatechanged",{}))};c.prototype.om=function(){return window.hasOwnProperty("DeviceOrientationEvent")&&DeviceOrientationEvent.hasOwnProperty("requestPermission")?!0:!1};c.prototype.kn=function(){this.om()&&DeviceOrientationEvent.requestPermission()};c.prototype.Pp=function(){return this.cg};c.prototype.Gp=function(){return this.Pg?5:this.ae?4:this.Cm?1:this.Am?2:this.zm?3:0};c.prototype.gp=function(){return this.ek?5:this.Le?4:this.oi?2:this.Yc?3:this.dk?1:0};c.prototype.moveTo=function(a,
b,e,f,g,h){this.Fa();if("_blank"!==a&&""!==a){this.G.active=!0;this.G.aborted=!1;this.G.Tk=!1;var l=a.toString().split("/");1<l.length&&(a=Number(l[0]),f=Number(b),b=Number(l[1]),2<l.length&&(e=Number(l[2])));this.G.pan=isNaN(a)?this.pan.m:Number(a);this.G.A=isNaN(b)?this.A.m:Number(b);this.G.fov=!isNaN(e)&&0<e&&180>e?Number(e):this.fov.m;this.G.speed=!isNaN(f)&&0<f?Number(f):1;this.G.V=isNaN(g)?this.V.m:Number(g);void 0!==h?!a||4!=h&&12!=h&&9!=h||(this.G.Ib=h):this.G.Ib=this.Wa}};c.prototype.Bi=
function(a){this.Fa();var b=0,e=0,f=70,g=4,h=0,l=1;a.hasOwnProperty("pan")&&(b=Number(a.pan),this.G.pan=b);a.hasOwnProperty("tilt")&&(e=Number(a.tilt),this.G.A=e);a.hasOwnProperty("fov")&&(f=Number(a.fov),this.G.fov=f);a.hasOwnProperty("projection")&&(g=Number(a.projection),this.G.Ib=g);a.hasOwnProperty("timingFunction")&&(h=Number(a.timingFunction));a.hasOwnProperty("speed")&&(l=Number(a.speed));0>=l?(this.Ri(b,e,f),this.Lc(g)):(a=new r.Yk,a.ab="__AutoMove",a.le=this.bm(),a.th=this.A.m,a.Od=this.fov.m,
a.sh=this.Wa,a.Pd=b,a.me=e,a.Yf=f,a.wd=g,a.rf=!1,a.Be=!1,a.Ce=!1,0==h&&(a.Be=!0),1==h&&(a.rf=!0,a.Be=!0),2==h&&(a.Ce=!0),a.speed=l,this.G.el=this.J,this.J=this.Ql(a),this.G.fl=(new Date).getTime(),this.G.Tk=!0,this.G.active=!0,this.G.aborted=!1,this.G.pan=b,this.G.A=e,this.G.fov=f,this.Sd=!1)};c.prototype.sq=function(a){this.moveTo(this.pan.cb,this.A.cb,this.fov.cb,a)};c.prototype.tq=function(a,b){var e={};e.pan=this.pan.cb;e.tilt=this.A.cb;e.fov=this.fov.cb;e.projection=this.Hi;e.timingFunction=
b;e.speed=a;this.Bi(e)};c.prototype.uo=function(a,b,e,f){var g=new r.Mh(this);g.type="point";g.pan=b;g.A=e;g.id=a;g.j={};g.j.player=this;g.tf();g.j.hotspot=g;g.j.__div=document.createElement("div");g.j.__div.appendChild(f);this.X.push(g);g.j.__div.style.position="absolute";g.j.__div.style.left="-1000px";g.j.__div.style.top="-1000px";this.Ra.insertBefore(g.j.__div,this.Ra.firstChild);this.Ma=!0};c.prototype.$r=function(a,b,e){for(var f=0;f<this.X.length;f++){var g=this.X[f];g.id==a&&(g.pan=b,g.A=e,
g.tf())}this.Ma=!0};c.prototype.Uq=function(a){for(var b=-1,e,f=0;f<this.X.length;f++)e=this.X[f],e.id==a&&(b=f);-1<b&&(e=this.X.splice(b,1).pop(),e.j&&e.j.__div&&this.Ra.removeChild(e.j.__div))};c.prototype.Jp=function(){for(var a=[],b=0;b<this.X.length;b++){var e=this.X[b];"point"==e.type&&a.push(String(e.id))}return a};c.prototype.lp=function(a){for(var b=0;b<this.X.length;b++){var e=this.X[b];if(e.id==a)return b={},b.id=a,b.pan=e.pan,b.tilt=e.A,b.url=e.url,b.target=e.target,b.distance=e.distance,
b.title=e.title,b.description=e.description,b.skinid=e.Hk,e.Sc&&(b.customimage=e.Sc,b.customimagewidth=e.Ae,b.customimageheight=e.Bd,b.use3D=e.bg,b.distance3D=e.Yh),e.j&&e.j.__div&&(b.div=e.j.__div),b}};c.prototype.Yn=function(a,b){this.ga.start.x=a;this.ga.start.y=b;this.ga.oa.x=a;this.ga.oa.y=b;this.Ja.oa.x=a;this.Ja.oa.y=b;this.wk++;this.pan.Rc=this.pan.m;this.A.Rc=this.A.m};c.prototype.Wn=function(a,b){var e=this.Sb();this.pan.Rc+=a*e/this.D.height;this.A.Rc+=b*e/this.D.height;this.pan.m=this.pan.Rc;
this.A.m=this.A.Rc};c.prototype.Xn=function(a,b){this.ga.m.x=a;this.ga.m.y=b;this.ga.na.x=this.ga.m.x-this.ga.oa.x;this.ga.na.y=this.ga.m.y-this.ga.oa.y;this.M.Hd&&(this.ga.oa.x=this.ga.m.x,this.ga.oa.y=this.ga.m.y,this.update())};c.prototype.Fa=function(){this.C.active&&(this.C.active=!1,this.S("autorotatechanged",{}),this.pan.d=0,this.A.d=0,this.fov.d=0);this.G.active&&(this.G.active=!1,this.pan.d=0,this.A.d=0,this.fov.d=0);this.gf=this.G.aborted=!1;this.C.Ai=!1;this.zd=.02;this.jg=0;this.C.dg&&
(this.C.enabled=this.C.jf);this.Ff=(new Date).getTime()};c.prototype.rp=function(){return this.Ff};c.prototype.cm=function(a,b){a||(a=this.pa.x,b=this.pa.y);var e=this.D.height/(2*Math.tan(this.fov.m*Math.PI/360));a-=this.D.width/2;b-=this.D.height/2;var f={};f.pan=180*Math.atan(a/e)/Math.PI;f.tilt=180*Math.atan(-b/Math.sqrt(a*a+e*e))/Math.PI;return f};c.prototype.Lp=function(a,b){a||(a=this.pa.x,b=this.pa.y);if(2===this.rb){var e=this.fov.m/this.D.height;a=-(a-this.D.width/2)*e+this.pan.m;b=-(b-
this.D.height/2)*e+this.A.m}else{e=new r.Ha(0,0,1);a=this.cm(a,b);e.Nd(-a.tilt);e.Ue(a.pan);e.Nd(-this.A.m);e.Ue(-this.pan.m);e.Nd(-this.Oa.pitch);e.Ve(this.Oa.V);for(a=e.Ao()-180;-180>a;)a+=360;b=e.Bo()}e={};e.pan=a;e.tilt=b;return e};c.prototype.Gc=function(a){return a==this.control||a&&void 0!==a.ggPermeableMap&&1==a.ggPermeableMap?!0:a&&void 0!==a.ggPermeable&&0==a.ggPermeable?!1:a&&a.ggType&&("container"==a.ggType||"cloner"==a.ggType||"timer"==a.ggType)?!0:!1};c.prototype.yj=function(a,b){var e=
this.nd(),f,g;for(f=0;f<this.T.length+this.eb.length;f++){var h=f<this.T.length?this.T[f]:this.eb[f-this.T.length];if(h.nb)return h}for(f=0;f<this.T.length+this.eb.length;f++)if(h=f<this.T.length?this.T[f]:this.eb[f-this.T.length],!h.td){var l=[],k=new r.Ha,q;var p=g=void 0;0<h.fov&&(g=Math.tan(h.fov/2*Math.PI/180),p=0<h.vc?g*h.Wc/h.vc:g,h.Ec&&1!=h.Ec&&(p*=h.Ec));for(q=0;4>q;q++){switch(q){case 0:k.init(-g,-p,0);break;case 1:k.init(g,-p,0);break;case 2:k.init(g,p,0);break;case 3:k.init(-g,p,0)}k.Ga(h.Ga*
Math.PI/180);k.Ka(-h.Ka*Math.PI/180);k.jb(h.jb*Math.PI/180);--k.z;k.Ga(-h.A*Math.PI/180);k.Ka(h.pan*Math.PI/180);k.Ka(-this.pan.m*Math.PI/180);k.Ga(this.A.m*Math.PI/180);k.jb(this.V.m*Math.PI/180);l.push(k.clone())}l=this.zj(l);if(0<l.length){for(q=0;q<l.length;q++)k=l[q],.1>k.z?(p=-e/k.z,g=this.D.width/2+k.x*p,p=this.D.height/2+k.y*p):p=g=0,k.Wb=g,k.Ab=p;if(this.rm(l,a,b))return h}}return null};c.prototype.pi=function(){return document.webkitIsFullScreen||document.mozFullScreen||document.msFullscreenElement&&
null!=document.msFullscreenElement||document.fullScreen};c.prototype.rq=function(a){this.Qn(a);if(this.md)this.md.onclick();(this.uf||this.vf&&this.Le)&&this.bi();this.Lb=null;if(!this.M.hc&&!this.mc){a=a?a:window.event;if(a.which||0==a.which||1==a.which){var b=(new Date).getTime();if(this.he){this.Lb=this.he;this.Z.Jc=!0;this.Z.startTime=b;a.stopPropagation();return}if(this.Gc(a.target)){var e;(e=this.yj(this.pa.x,this.pa.y))&&e.Ie&&(this.Lb=e);this.Yn(a.pageX,a.pageY);this.Z.Jc=!0;this.Z.startTime=
b;a.preventDefault();this.Fa()}}this.ga.na.x=0;this.ga.na.y=0}};c.prototype.ag=function(a,b){var e=this.I.aj;e.enabled&&(this.Da!=this.mb&&0<=a&&0<=b&&""!=this.Da.title?(this.Na.innerHTML=this.Da.title,this.Na.style.color=this.fa(e.bj,e.$i),this.Na.style.backgroundColor=e.background?this.fa(e.bc,e.ac):"transparent",this.Na.style.border="solid "+this.fa(e.dc,e.cc)+" "+e.Sh+"px",this.Na.style.borderRadius=e.rj+"px",this.Na.style.textAlign="center",0<e.width?(this.Na.style.left=a-e.width/2+this.margin.left+
"px",this.Na.style.width=e.width+"px"):(this.Na.style.width="auto",this.Na.style.left=a-this.Na.offsetWidth/2+this.margin.left+"px"),this.Na.style.height=0<e.height?e.height+"px":"auto",this.Na.style.top=b+25+ +this.margin.top+"px",this.Na.style.visibility="inherit",this.Na.style.overflow="hidden"):(this.Na.style.visibility="hidden",this.Na.innerHTML=""))};c.prototype.Qn=function(a){var b=this.He();this.pi()?(this.pa.x=a.pageX-this.margin.left,this.pa.y=a.pageY-this.margin.top):(this.pa.x=a.pageX-
b.x,this.pa.y=a.pageY-b.y);return b};c.prototype.Uf=function(a){this.Da=a&&null!==a&&"object"==typeof a?a:this.mb;this.Da==this.mb&&(a=this.Th(this.pa.x,this.pa.y))&&(a.lb=0);this.Da.tf&&this.Da.tf();this.hotspot=this.Da;this.S("activehotspotchanged",{hotspot:this.Da})};c.prototype.qq=function(a){a=a?a:window.event;var b=this.Qn(a);if(!this.M.hc&&!this.mc&&!this.he){this.C.active&&(this.C.wi=(new Date).getTime());0==a.buttons&&(this.Z.Jc=!1);this.Z.Jc&&(a.preventDefault(),(a.which||0==a.which||1==
a.which)&&this.Xn(a.pageX,a.pageY),this.Fa());var e=!1;if(this.Da==this.mb||"poly"==this.Da.type){var f=this.mb;0<this.X.length&&this.Gc(a.target)&&(f=this.Th(this.pa.x,this.pa.y));this.Oi(f);this.ag(a.pageX-b.x,a.pageY-b.y);0!=f&&f!=this.mb&&(e=!0)}b=null;!e&&this.Gc(a.target)&&(b=this.yj(this.pa.x,this.pa.y));this.C.Wh&&(this.C.Wh=!1);this.Ra.style.cursor=this.Da!=this.mb&&this.Da.zf&&e||b&&b.Ng?"pointer":"default"}};c.prototype.Oi=function(a){!1===a&&(a=this.mb);this.Da!=a&&(this.Da!=this.mb&&
(0<this.I.mode&&(this.Da.lb=0),this.la&&this.la.hotspotProxyOut&&this.la.hotspotProxyOut(this.Da.id,this.Da.url)),a!=this.mb?(this.Uf(a),this.la&&this.la.hotspotProxyOver&&this.la.hotspotProxyOver(this.Da.id,this.Da.url),0<this.I.mode&&(this.I.lb=1,this.Da.lb=1)):(this.Uf(this.mb),0<this.I.mode&&(this.I.lb=0)),this.ra&&this.ra.changeCurrentHotspot(this.Da.id))};c.prototype.pq=function(a){a=a?a:window.event;this.vi=-1;(this.uf||this.vf&&this.Le)&&this.bi();if(!this.M.hc&&!this.mc&&(this.Lb&&(this.Lb.Ie(),
this.he=this.Lb.nb?this.Lb:null),this.Z.Jc)){this.Fa();a.preventDefault();this.Z.Jc=!1;a=(new Date).getTime();var b=Math.abs(this.ga.start.x-this.ga.oa.x)+Math.abs(this.ga.start.y-this.ga.oa.y);if(400>a-this.Z.startTime&&0<=b&&20>b){var e=this.Th(this.pa.x,this.pa.y);e&&this.Mn(e);b=Math.abs(this.ga.Kd.x-this.ga.oa.x)+Math.abs(this.ga.Kd.y-this.ga.oa.y);700>a-this.Tg&&0<=b&&20>b?(e?this.Nn(e):this.M.Ij&&this.ej(),this.Tg=0):this.Tg=a;this.ga.Kd.x=this.ga.oa.x;this.ga.Kd.y=this.ga.oa.y}}};c.prototype.Mm=
function(a){if(!this.M.be&&!this.mc&&(a=a?a:window.event,this.Gc(a.target))){var b=a.detail?-1*a.detail:a.wheelDelta/40;this.M.wm&&(b=-b);a.axis&&(-1==this.vi?this.vi=a.axis:this.vi!=a.axis&&(b=0));var e=0<b?1:-1;a.wheelDeltaX&&a.wheelDeltaY&&Math.abs(a.wheelDeltaX)>Math.abs(a.wheelDeltaY)&&(b=0);0!=b&&(this.wj(e*this.M.Bn,!0),this.update());a.preventDefault();this.Fa()}};c.prototype.Wr=function(a){a||(a=window.event);var b=a.touches,e=this.He();this.pa.x=b[0].pageX-e.x;this.pa.y=b[0].pageY-e.y;this.oe=
this.Lb=null;(this.uf||this.vf&&this.Le)&&this.bi();if(!this.M.hc&&!this.mc){var f=(new Date).getTime();if(this.he)this.Lb=this.he,this.Z.Uc=!0,this.Z.startTime=f,a.preventDefault(),this.Z.mh=!0;else{if(!this.Z.Uc&&b[0]){this.Z.startTime=f;this.Z.start.x=b[0].pageX;this.Z.start.y=b[0].pageY;this.Z.oa.x=b[0].pageX;this.Z.oa.y=b[0].pageY;this.vb=b[0].target;if(this.Gc(this.vb)){(f=this.yj(this.pa.x,this.pa.y))&&f.Ie&&(this.Lb=f);if(f=this.Th(this.pa.x,this.pa.y))this.O(f),this.oe=f,this.Oi(f),f=this.Fg(a),
this.ag(f.x-e.x,f.y-e.y);this.Yn(b[0].pageX,b[0].pageY);this.Z.Jl=b[0].identifier;this.Z.Uc=!0;a.preventDefault();this.Z.mh=!0;this.Fa()}if(this.vb){e=this.vb;for(f=!1;e&&e!=this.control;){if(e.onmouseover)e.onmouseover();e.onmousedown&&!f&&(e.onmousedown(),f=!0);e=e.parentNode}f&&(a.preventDefault(),this.Z.mh=!0)}}1<b.length&&(this.Z.Uc=!1);!this.Zj&&2==b.length&&b[0]&&b[1]&&this.Gc(this.vb)&&(a=b[0].pageX-b[1].pageX,b=b[0].pageY-b[1].pageY,this.fov.Cn=Math.sqrt(a*a+b*b),this.fov.prev=this.fov.m);
this.ga.na.x=0;this.ga.na.y=0}}};c.prototype.bi=function(){try{this.Eh&&this.F.j&&(!this.F.rd&&this.F.Jk&&this.F.j.play(),this.F.j.muted=!1);if(this.Aa&&(this.Aa.resume(),"suspended"==this.Aa.state))return;if(this.ae&&this.Aa&&this.Aa.createOscillator){var a=this.Aa.createOscillator(),b=this.Aa.createGain();a.frequency.value=30;a.type="sine";a.connect(b);b.connect(this.Aa.destination);b.gain.value=.01;a.start(0);setTimeout(function(){a.stop()},1E4)}for(b=0;b<this.Y.length;b++){var e=this.Y[b];(!this.isPlaying(e.id)||
e.va)&&0<=e.loop&&e.autoplay&&(e.va&&e.mf(),this.fe(e.id,e.loop))}for(b=0;b<this.T.length;b++){var f=this.T[b];!this.isPlaying(f.id)&&f.autoplay&&this.Eh&&this.fe(f.id,f.loop);this.isPlaying(f.id)&&f.autoplay&&this.Eh&&(f.se&&(this.Le?f.Nh():this.fe(f.id)),f.j.muted=!1)}this.vf=this.uf=!1}catch(g){this.O(g)}};c.prototype.Vr=function(a){a||(a=window.event);var b=a.touches,e=this.He();this.pa.x=b[0].pageX-e.x;this.pa.y=b[0].pageY-e.y;if(this.M.hc||this.mc)(this.K.xd||this.K.qe)&&a.preventDefault();
else{b[0]&&(this.Z.oa.x=b[0].pageX,this.Z.oa.y=b[0].pageY);if(this.vb){for(var f=this.vb,g=!1;f&&f!=this.control&&!g;)"scrollarea"==f.ggType&&(g=!0),"map"==f.ggType&&(g=!0),"text"==f.ggType&&(g=!0),f=f.parentNode;g||a.preventDefault()}if(this.Z.Uc){a.preventDefault();for(f=0;f<b.length;f++)if(b[f].identifier==this.Z.Jl){this.Xn(b[f].pageX,b[f].pageY);break}this.oe&&(f=this.Fg(a),this.ag(f.x-e.x,f.y-e.y));this.Fa()}2==b.length&&b[0]&&b[1]&&(this.Z.Uc=!1,!this.Zj&&this.Gc(this.vb)&&(this.M.be||(e=b[0].pageX-
b[1].pageX,b=b[0].pageY-b[1].pageY,this.fov.yl=Math.sqrt(e*e+b*b),this.Ja.fov.active=!0,this.Ja.fov.uc=this.fov.prev*Math.sqrt(this.fov.Cn/this.fov.yl),4==this.Sa()&&this.Ja.fov.uc>this.fov.max&&(this.Ja.fov.uc=this.fov.max),this.Ja.fov.uc<this.fov.min&&(this.Ja.fov.uc=this.fov.min)),this.Fa(),a.preventDefault()))}};c.prototype.Ur=function(a){this.Z.mh&&(this.Z.mh=!1,a.preventDefault());var b=this.He(),e=!1;(this.uf||this.vf&&this.Le)&&this.bi();if(!this.M.hc&&!this.mc){this.Z.Uc&&(a.preventDefault(),
this.Fa());var f=(new Date).getTime();var g=void 0;var h=!1;g=Math.abs(this.Z.start.x-this.Z.oa.x)+Math.abs(this.Z.start.y-this.Z.oa.y);if(0<=g&&20>g){e=!0;this.Gc(this.vb)&&(a.preventDefault(),this.Lb&&(this.Lb.Ie(),this.he=this.Lb.nb?this.Lb:null));if(this.vb){for(g=this.vb;g&&g!=this.control;)g.onclick&&(g.onclick(),h=!0,e=!1),g=g.parentNode;h&&a.preventDefault()}g=Math.abs(this.Z.Kd.x-this.Z.oa.x)+Math.abs(this.Z.Kd.y-this.Z.oa.y);if(700>f-this.Tg&&0<=g&&20>g){if(this.Gc(this.vb))if(a.preventDefault(),
this.oe)this.Nn(this.oe);else if(this.M.Ij){var l=this;setTimeout(function(){l.ej()},1)}if(this.vb){for(g=this.vb;g&&g!=this.control;)g.ondblclick&&(g.ondblclick(),h=!0,e=!1),g=g.parentNode;h&&a.preventDefault()}this.Tg=0}else this.Tg=f;this.Z.Kd.x=this.Z.oa.x;this.Z.Kd.y=this.Z.oa.y}if(this.vb)for(g=this.vb;g&&g!=this.control;){if(g.onmouseout)g.onmouseout();if(g.onmouseup)g.onmouseup();g=g.parentNode}a=this.Fg(a);this.ag(a.x-b.x,a.y-b.y);this.oe&&e&&this.Mn(this.oe);this.vb=null;this.Z.Uc=!1;this.Oi(this.mb);
this.oe=null}};c.prototype.Tr=function(a){var b=this.He();this.M.hc||this.mc||(this.Z.Uc=!1);this.oe=null;this.Oi(this.mb);a=this.Fg(a);this.ag(a.x-b.x,a.y-b.y)};c.prototype.Bm=function(){return null!=this.vb||this.Z.Uc||this.Z.Jc};c.prototype.Nm=function(a){!this.Pe&&window.MSGesture&&(this.O("setup gesture"),this.Pe=new MSGesture,this.Pe.target=this.control);this.Pe&&this.Pe.addPointer(a.pointerId)};c.prototype.Sl=function(a){this.Zj=!0;this.Ci=1;this.M.hc||this.M.be||this.mc||(a.touches?(this.vb=
a.touches.target,this.Gc(a.target)&&(a.preventDefault(),this.fov.prev=this.fov.m,this.Fa())):(a.preventDefault(),this.fov.prev=this.fov.m,this.Fa()))};c.prototype.ep=function(a){this.M.hc||this.M.be||this.mc||!this.Gc(a.target)||(a.preventDefault(),this.Ja.fov.active=!0,this.Ja.fov.uc=this.fov.prev/Math.sqrt(a.scale),4==this.Sa()&&this.Ja.fov.uc>this.fov.max&&(this.Ja.fov.uc=this.fov.max),this.update(),this.Fa())};c.prototype.uq=function(a){this.M.hc||this.M.be||this.mc||(a.preventDefault(),1!=a.scale&&
(this.Ja.fov.active=!0,this.Ci*=a.scale,this.Ja.fov.uc=this.fov.prev/Math.sqrt(this.Ci),4==this.Sa()&&this.Ja.fov.uc>this.fov.max&&(this.Ja.fov.uc=this.fov.max),this.update(),this.Fa()))};c.prototype.Rl=function(a){this.M.hc||this.M.be||this.mc||(this.Ja.fov.active=!1,a.preventDefault(),this.Fa(),this.Pe&&this.Pe.reset&&this.Pe.reset())};c.prototype.hq=function(a){this.M.ah||this.mc||(this.isFullscreen&&a.preventDefault(),this.ti=a.keyCode,this.Fa())};c.prototype.iq=function(a){this.ti&&(this.ti=
0,a.preventDefault())};c.prototype.Aq=function(){this.ti=0};c.prototype.Gi=function(){this.isFullscreen&&(this.pi()||this.exitFullscreen(),this.pi()&&(this.aa.style.left="0px",this.aa.style.top="0px"))};c.prototype.Eq=function(a,b,e,f){f?(this.Mg.alpha=a,this.Mg.beta=b,this.Mg.gamma=e,this.Mg.gamma+=90):(this.qb.alpha=a,this.qb.beta=b,this.qb.gamma=e,this.qb.gamma+=90);this.qb.orientation=window.orientation?1*parseInt(""+window.orientation,10):0;e=new r.$k;a=this.qb;e.Ue(-a.alpha);e.Ve(-a.beta);e.Nd(-a.gamma);
e.Ve(90-a.orientation);1>e.Hb?-1<e.Hb?(b=180/Math.PI*Math.asin(-e.Hb),a=180/Math.PI*Math.atan2(e.lc,e.kc),e=180/Math.PI*Math.atan2(e.jc,e.ic)):(b=0,a=90,e=-180/Math.PI*Math.atan2(-e.Tb,e.Ub)):(b=0,a=-90,e=180/Math.PI*Math.atan2(-e.Tb,e.Ub));if(this.cg)if(this.Bm()||this.G.ki||this.qb.Ni)this.qb.Qe=this.Hg()+e,this.qb.fadeIn=0,this.qb.Ni=!1;else{f=this.G.active;var g=1;10>this.qb.fadeIn&&(this.qb.fadeIn+=1,g=.1*this.qb.fadeIn);e=-e+this.qb.Qe;this.Xe(g*e+(1-g)*this.Hg());this.Ye(g*a+(1-g)*this.gi());
this.Vn?this.Si(g*b+(1-g)*this.fm()):this.Si(0);this.pg();this.G.active=f}};c.prototype.Mn=function(a){this.la&&this.la.hotspotProxyClick&&this.la.hotspotProxyClick(a.id,a.url);""!=a.url&&(this.rk(a.url,a.target),this.ag(-1,-1))};c.prototype.Nn=function(a){this.la&&this.la.hotspotProxyDoubleClick&&this.la.hotspotProxyDoubleClick(a.id,a.url)};c.prototype.ci=function(){return Math.min(1,2*Math.tan(Math.PI*Math.min(this.fov.m,90)/360))};c.prototype.Ym=function(){var a=this;setTimeout(function(){a.Ym()},
100);9!=a.Ki||a.mi||window.requestAnimationFrame(function(){a.kh();a.Hc("restart recover timer")});10<a.Ki&&1<a.wk&&(a.Hc("recover timer - disabling requestAnimationFrame"),a.mi=!0,a.kh());a.Ki++};c.prototype.Vi=function(a){var b={ss:{value:0,name:"pan"},us:{value:1,name:"tilt"},rs:{value:2,name:"fov"}},e=0,f=0,g=0,h;for(h in b){for(var l=b[h],k,q=Math.floor(a);!this.xf(q,l.value)&&0<q;)q--;q=this.xf(q,l.value);var p=this.zp(q);if(p){k=new r.Bc(q.time,q.value);var w=new r.Bc(p.time,p.value),x=(a-
q.time)/(p.time-q.time);if(0!=q.type||0!=p.type&&3!=p.type)if(3==q.type)k=q.value;else{x=new r.Bc;var y=new r.Bc,z=p.time-q.time;0==q.type?y.init(q.time+.3*z,q.value):y.init(q.xe,q.ye);0==p.type||3==p.type?x.init(p.time-.3*z,p.value):x.init(p.ve,p.we);p=new r.Bc;p.qj(k,w,y,x,a);k=p.y}else p=new r.Bc,p.Gd(k,w,x),k=p.y}else k=q.value;switch(l.value){case 0:l=this.pan.m;if(this.Sd&&3!=q.type){if(2!=this.rb){for(;360<k;)k-=360;for(;-360>k;)k+=360}e=k-l;2!=this.rb&&(180<e&&(e-=360),-180>e&&(e+=360));this.pan.m+=
e*this.zd}else this.pan.m=k;this.C.Yg=this.pan.m;break;case 1:l=this.A.m;this.Sd&&3!=q.type?(f=k-l,this.A.m+=f*this.zd):this.A.m=k;this.C.Zg=this.A.m;break;case 2:l=this.fov.m,this.Sd&&3!=q.type?(g=k-l,this.fov.m+=g*this.zd):this.fov.m=k,this.C.Xg=this.fov.m}}b=this.Sa();for(h=Math.floor(a);!this.xf(h,3)&&0<h;)h--;h=this.xf(h,3);q=a-h.time;this.Sd&&-1!=this.kg&&this.Ph+this.nj>a?(b=this.Eg(this.kg),this.fov.m>b?this.Ph=a:(q=(a-this.Ph)/this.nj,q=Math.min(1,q),this.Lc(this.Wa,this.kg,1-q))):(0==h.Cb||
q>h.Cb-.3?this.Lc(h.value):(q/=h.Cb,this.Lc(b,h.value,1-q)),this.C.Im=h.value);this.Sd&&(e=Math.sqrt(e*e+f*f+g*g),.3>e&&(this.Sd=!1,this.zd=.02,this.jg=0),0<this.jg&&e>this.jg&&(this.zd+=.01,this.zd=Math.min(this.zd,1)),this.jg=e);h=Math.floor(a);if(h!=this.hl)for(this.hl=h,a=this.fp(h),e=0;e<a.length;e++)f=a[e],g=f.Oh,this.vd.hasOwnProperty(g)&&(b=this.vd[g].type,0==b?this.ke(g,f.Vk):1==b?this.ke(g,f.value):2==b&&this.ke(g,"true"==f.Vk));this.update()};c.prototype.Tl=function(){if(""!=this.C.Kf){var a=
this.am(this.C.Kf);if(1==a.length&&a[0]==this.Qa)return this.Qa}a=this.Qa;do if(this.C.Sm){var b=1E3;do a=this.Ya[Math.floor(Math.random()*this.Ya.length)];while(b--&&a==this.Qa)}else b=this.Ya.indexOf(a),b++,b>=this.Ya.length&&(b=0),a=this.Ya[b];while(""!=this.C.Kf&&!this.Gg(a).tags.includes(this.C.Kf)&&a!=this.Qa);return a};c.prototype.Lq=function(a){var b=this.G.speed;this.G.gk&&(b=b*(a.getTime()-this.G.gk)/60,5<b&&(b=5),.2>b&&(b=.2));this.G.gk=a.getTime();this.C.Ag&&(this.ya.ready()||4==this.Wa)&&
this.ei()&&(this.C.Ag=!1,this.C.active=!0,this.wb.running=!0,this.wb.Pj=!1);if(this.G.active||0!=this.G.Ib&&this.ya.ready()){if(this.G.Tk&&"__AutoMove"==this.J.ab){var e=a.getTime()-this.G.fl;b=e/100;if(b>=this.J.length){if(this.Vi(this.J.length),this.wa.splice(this.wa.indexOf(this.J),1),this.G.active=!1,this.J=this.G.el,this.G.Ib=0,this.Ri(this.G.pan,this.G.A,this.G.fov),this.pan.Rc=this.G.pan,this.A.Rc=this.G.A,this.G.hh&&(this.G.hh=!1,this.C.Ai=!0,this.C.active=!0,this.S("autorotatechanged",{})),
this.onMoveComplete)this.onMoveComplete()}else this.Vi(b)}else{this.pan.d=this.G.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.A.d=this.G.A-this.A.m;this.V.d=this.G.V-this.V.m;this.fov.d=this.G.fov-this.fov.m;e=b*this.ci();var f=Math.sqrt(this.pan.d*this.pan.d+this.A.d*this.A.d+this.V.d*this.V.d+this.fov.d*this.fov.d),g=this.pan.m-this.G.Yg,h=this.A.m-this.G.Zg,l=this.V.m-this.G.Jm,k=this.fov.m-this.G.Xg;100*Math.sqrt(g*
g+h*h+l*l+k*k)<e&&0==this.G.Ib&&(this.G.aborted=!0);this.G.Yg=this.pan.m;this.G.Zg=this.A.m;this.G.Jm=this.V.m;this.G.Xg=this.fov.m;if(100*f<e||this.G.aborted){if(this.pan.d=0,this.A.d=0,this.V.d=0,this.fov.d=0,this.G.active&&(this.G.active=!1,this.pan.m=this.G.pan,this.A.m=this.G.A,this.V.m=this.G.V,this.fov.m=this.G.fov,this.onMoveComplete))this.onMoveComplete()}else f=f>5*e?e/f:.2,this.pan.d*=f,this.A.d*=f,this.fov.d*=f;this.pan.m+=this.pan.d;this.A.m+=this.A.d;this.V.m+=this.V.d;this.fov.m+=this.fov.d;
0!=this.G.Ib&&(this.G.Ib!=this.Wa?(b=this.Eg(this.G.Ib),this.Tj()>b?(this.fov.m+=-Math.max((2.5-1.7*Math.min(Math.sqrt(this.pan.d*this.pan.d+this.A.d*this.A.d+this.V.d*this.V.d)/e,1))*e,this.fov.d)-this.fov.d,this.G.fov=this.fov.m):(this.yc=this.Wa,this.Wa=this.G.Ib,this.O("New projection from Target:"+this.Wa),this.jh=this.G.oh=0,this.ya.li())):1>this.G.oh?(this.G.oh=Math.min(1,this.G.oh+.05*b),this.jh=this.G.oh):(this.yc=0,this.G.Ib=0,this.ya.li()))}this.Ff=a.getTime();this.update()}else if(this.C.active){e=
a.getTime()-this.C.startTime;this.C.wi<this.C.startTime&&(this.C.wi=this.C.startTime);if((this.C.dg||this.wb.running)&&0<this.wa.length){b=e/100;f=!1;if(this.Vb!=this.J.ab||""!=this.J.hf&&this.C.Td!=this.J.hf){for(e=0;e<this.wa.length;e++)if(""==this.Vb&&this.wa[e].hf==this.C.Td||""!=this.Vb&&this.wa[e].ab==this.Vb&&this.wa[e].hf==this.C.Td){f=!0;this.J=this.wa[e];this.Vb=this.J.ab;break}!f&&0<this.wa.length&&this.wa[0].hf==this.C.Td&&(f=!0,this.J=this.wa[0],this.Vb=this.J.ab)}else f=!0;if(f)if(e=
(g=this.F.j&&this.F.rd)&&this.C.Mk&&!this.wb.running,this.gf){f=b;if(e)for(this.F.j.currentTime<this.il&&this.pj&&(this.oj++,this.pj=!1),f=10*(this.oj*this.F.j.duration+this.F.j.currentTime),this.il=this.F.j.currentTime,.05>this.F.j.duration-this.F.j.currentTime&&(this.pj=!0);f>=10*this.ff;)f-=10*this.ff;if(!g&&b>=this.J.length||g&&!e&&b>=this.J.length||g&&e&&(this.J.ab!=this.J.Om||this.J.Di!=this.Qa)&&b>=this.J.length){this.Vi(this.J.length);this.C.Jd=0;this.gf=!1;if(this.wb.running){this.qn();return}this.Vb=
this.J.Om;this.Vb==this.J.ab&&this.Qa==this.J.Di?1<this.Ya.length&&0<this.C.Ei&&(e=this.Tl())&&(this.$c("{"+e+"}"),this.C.startTime=a.getTime(),this.gf=!1,this.C.active=!0,this.K.ue=!0):(this.Ef&&this.J.Di!=this.Qa&&(this.$c("{"+this.J.Di+"}",this.J.xq),this.K.enabled?(this.C.active=!1,this.K.ue=!0):this.C.active=!0),this.C.startTime=a.getTime())}else this.Vi(f),this.C.Jd=f}else if(b=this.J.da[0],f=this.J.da[1],g=this.J.da[2],h=this.J.da[3],3!=h.tb&&(h=0),this.C.Ai||this.G.aborted||this.wb.running||
e){if(this.gf=!0,this.C.startTime=0<this.C.Jd?a.getTime()-100*this.C.Jd:a.getTime(),this.Sd=e){for(this.ff=this.oj=0;this.ff<this.J.length/10;)this.ff+=this.F.j.duration;f=10*this.F.j.currentTime;for(e=Math.floor(f);!this.xf(e,3)&&0<e;)e--;e=this.xf(e,3);e.value==this.Wa?this.kg=-1:(this.kg=e.value,this.Ph=f,this.nj=Math.max(5,e.time+e.Cb-f))}}else{e={};if(0<this.C.Jd)e.pan=this.C.Yg,e.tilt=this.C.Zg,e.fov=this.C.Xg,e.projection=this.C.Im;else{for(e.pan=b.value;360<e.pan;)e.pan-=360;for(;-360>e.pan;)e.pan+=
360;e.tilt=f.value;e.fov=g.value;e.projection=h?h.value:4}e.timingFunction=3;e.speed=1;this.G.hh=!0;this.Bi(e);this.C.active=!0}}else 0<this.C.Ei&&this.Ef&&e>=1E3*this.C.Ei?1<this.Ya.length&&(e=this.Tl())&&(this.C.startTime=a.getTime(),this.C.sd=a.getTime(),this.C.timeout=0,this.$c("{"+e+"}"),this.C.active=!0,this.K.ue=!0):(e=a.getTime(),f=b=1E3/60,0!=this.C.sd&&(f=e-this.C.sd),this.A.d=this.C.dj*(0-this.A.m)/100,this.fov.d=this.C.dj*(this.fov.cb-this.fov.m)/100,this.pan.d=.95*this.pan.d+-this.C.speed*
this.ci()*.05,b=f/b,this.pan.m+=this.pan.d*b,this.A.m+=this.A.d*b,this.fov.m+=this.fov.d*b,this.C.sd=e,this.update());3E3<a.getTime()-this.C.wi&&!this.C.Wh&&(this.Ra.style.cursor="none",this.C.Wh=!0)}else!this.wb.Pj&&1E3<a.getTime()-this.Ff&&(this.wa.splice(this.wa.indexOf(this.J),1),this.J=this.Dg(!1),this.Vb=this.J.ab,this.C.active=!1,this.C.Ag=!0),this.C.enabled&&!this.Z.ni()&&a.getTime()-this.Ff>1E3*this.C.timeout&&!this.C.Ag&&(this.C.vh&&this.ei()||!this.C.vh)&&(this.C.active=!0,this.C.startTime=
a.getTime(),this.C.sd=0,this.S("autorotatechanged",{}),this.pan.d=0,this.A.d=0,this.fov.d=0),!this.Ja.enabled||this.Z.ni()||0==this.pan.d&&0==this.A.d&&0==this.fov.d||(this.G.ki=!0,this.pan.d*=.9,this.A.d*=.9,this.fov.d*=.9,this.pan.m+=this.pan.d,this.A.m+=this.A.d,this.wj(this.fov.d),1E-4>this.pan.d*this.pan.d+this.A.d*this.A.d+this.fov.d*this.fov.d&&(this.pan.d=0,this.A.d=0,this.fov.d=0),this.update())};c.prototype.Nq=function(a){var b=this.K;if(b.xd){var e=a.getTime()-b.eo;e/=1E3*b.co;1<=e?(b.xd=
!1,this.Gl(),b.Kk=a.getTime(),this.Fn(),b.qe=!0,0==b.qc||b.hg||(4==b.qc?(this.J=this.Dg(!0,b.$e,b.af,b.Qd),this.Vb=this.J.ab,this.C.active=!0,this.wb.running=!0):this.moveTo(b.$e,b.af,b.Qd,b.te,0,b.wd))):b.Xm(e)}else b.qe&&(e=a.getTime()-b.Kk,e/=1E3*b.lg,1<=e?(b.qe=!1,this.Ff=a.getTime(),this.update(),0!=b.qc&&b.hg&&(4==b.qc?(this.J=this.Dg(!0,b.$e,b.af,b.Qd),this.Vb=this.J.ab,this.C.active=!0,this.wb.running=!0):this.moveTo(b.$e,b.af,b.Qd,b.te,0,b.wd)),4!=b.qc&&(this.Pi(!1),this.C.active=b.ue,this.S("autorotatechanged",
{}),b.ue=!1),this.C.sd=0,this.qa&&this.Dj(),this.ng=!1):b.Xm(e));b=this.Gq;b.Do&&(b.Xh?a.getTime()-b.Kj>=1E3*b.delay&&(b.Xh=!1):(b.current+=b.fd,0>b.current&&(b.current=0,b.fd=-b.fd,b.Xh=!0,b.Kj=a.getTime()),1<b.current&&(b.current=1,b.fd=-b.fd,b.Xh=!0,b.Kj=a.getTime())))};c.prototype.Qq=function(){var a,b=this.I;if(0<b.ub.length){for(a=0;a<b.ub.length;a++)b.ad[a]!=b.Yb[a]&&(b.ad[a]>b.Yb[a]?(b.Yb[a]+=.05,b.ad[a]<b.Yb[a]&&(b.Yb[a]=b.ad[a])):(b.Yb[a]-=.05,b.ad[a]>b.Yb[a]&&(b.Yb[a]=b.ad[a],-1!=b.Wi.indexOf(b.ub[a])&&
(b.Wi.splice(b.Wi.indexOf(b.ub[a]),1),b.ub.splice(a,1),b.ad.splice(a,1),b.Yb.splice(a,1)))));this.update()}if(2==b.mode)for(a=0;a<this.X.length;a++){var e=this.X[a];"poly"==e.type&&e.lb!=e.Ba&&(e.lb>e.Ba?(e.Ba+=b.fd,e.lb<e.Ba&&(e.Ba=e.lb)):(e.Ba-=b.fd,e.lb>e.Ba&&(e.Ba=e.lb)),this.update())}3==b.mode&&b.lb!=b.Ba&&(b.lb>b.Ba?(b.Ba+=b.fd,b.lb<b.Ba&&(b.Ba=b.lb)):(b.Ba-=b.fd,b.lb>b.Ba&&(b.Ba=b.lb)),this.update())};c.prototype.Pq=function(){var a=this.Ja;this.Z.ni()&&(this.M.Hd?(a.na.x=.4*(this.ga.oa.x-
a.oa.x),a.na.y=.4*(this.ga.oa.y-a.oa.y),a.oa.x+=a.na.x,a.oa.y+=a.na.y):(a.na.x=.1*-this.ga.na.x*this.M.sensitivity/8,a.na.y=.1*-this.ga.na.y*this.M.sensitivity/8),this.Wn(a.na.x,a.na.y),this.update());a.fov.active&&(this.ml(.4*(a.fov.uc-this.fov.m)),.001>Math.abs(a.fov.uc-this.fov.m)/this.fov.m&&(a.fov.active=!1),this.update());if(a.enabled&&(0!=a.na.x||0!=a.na.y)&&!this.Z.ni()){var b=.9*(1-a.Bk);a.na.x*=b;a.na.y*=b;this.G.ki=!0;.01>a.na.x*a.na.x+a.na.y*a.na.y?(a.na.x=0,a.na.y=0):(this.Wn(a.na.x,
a.na.y),this.update())}};c.prototype.Mq=function(){if(this.M.nn&&this.M.Hd){var a=this.an;a.pan=this.pan.m;a.A=this.A.m;a.fov=this.fov.m;this.nf(a);this.nf(a);this.nf(a);var b=a.pan-this.pan.m,e=a.A-this.A.m;a=a.fov-this.fov.m;if(0!=b||0!=e||0!=a){var f=.2+.9*Math.min((Math.abs(b)+Math.abs(e)+Math.abs(a))/Math.abs(Math.min(this.fov.m,90))*.3,1);this.pan.m+=b*f;this.A.m+=e*f;this.fov.m+=a*f;this.Ja.Bk=.3;this.update()}else this.Ja.Bk=0}else this.pg();if(isNaN(this.pan.m)||1E7<this.pan.m||-1E7>this.pan.m)this.pan.m=
0;if(isNaN(this.A.m)||1E7<this.A.m||-1E7>this.A.m)this.A.m=0;if(isNaN(this.V.m)||1E7<this.V.m||-1E7>this.V.m)this.V.m=0;if(2!=this.rb){for(;360<this.pan.m;)this.pan.m-=360;for(;-360>this.pan.m;)this.pan.m+=360}};c.prototype.Oq=function(){if(!this.ei()&&this.Af&&5<this.v.jn){var a,b=0,e=this.fc.length;if(this.Dh)e=50,this.Lj<e&&this.Lj++,b=this.Lj;else for(a=0;a<e;a++)(this.fc[a].complete&&this.fc[a].src!=this.Cl||""==this.fc[a].src)&&b++;b==e?(this.lh=1,this.isLoaded=!0,this.ta&&this.ta.ggLoaded&&
this.ta.ggLoaded(),this.S("imagesready",{}),this.C.vh&&this.C.enabled&&!this.G.active&&!this.K.xd&&(this.C.active=!0,this.C.startTime=(new Date).getTime(),this.C.sd=0)):this.lh=b/(1*e);this.S("downloadprogress",{percentLoaded:this.lh})}};c.prototype.kh=function(){var a=this;a.Mi||(a.mi?setTimeout(function(){a.Mi=!1;a.kh()},1E3/60):window.requestAnimationFrame(function(){a.Mi=!1;a.kh()}));a.Mi=!0;this.wk=this.Ki=0;a.G.ki=!1;var b=new Date;this.di++;120<=this.di&&(this.O("F/s: "+Math.round(1E3*this.di/
(b.getTime()-this.Em))),this.Em=b.getTime(),this.di=0);this.S("timer",{});this.ia&&this.ya.Yo();this.Kb&&""!==this.Fe&&!this.ra&&document.hasOwnProperty(this.Fe)&&document[this.Fe].setPan&&0==this.bp--&&(this.ra=document[this.Fe],this.cd=this.ia=!1,this.Ia&&(this.Ia.style.visibility="hidden"),this.ra.setLocked(!0),this.ra.setSlaveMode(!0),this.ra.readConfigString(this.Gj),this.Hc("Flash player '"+this.Fe+"' connected."));this.Sk&&(this.Nc(),this.Sk=!1);this.Pq();this.Oq();this.Lq(b);this.Mq();this.Nq(b);
this.ya.es();(0<=this.I.mode||0<this.I.ub.length)&&this.Qq();this.ij();if(this.Gf.pan!=this.pan.m||this.Gf.A!=this.A.m||this.Gf.fov!=this.fov.m)this.Gf.pan=this.pan.m,this.Gf.A=this.A.m,this.Gf.fov=this.fov.m,this.S("positionchanged",{});this.Gm!=this.Wa&&(this.Gm=this.Wa,this.S("projectionchanged",{}));this.Ma&&(0<this.ug?this.ug--:(this.Ma=!1,this.ug=0),this.K.qe||this.K.xd||this.ef||(this.Ch(),this.S("renderframe",{})),this.S("repaint",{}));b=this.Xl();b!=this.Fm&&(b?(this.ta&&this.ta.ggReLoadedLevels&&
this.ta.ggReLoadedLevels(),this.S("tilesrequested",{})):(a.ta&&a.ta.ggLoadedLevels&&a.ta.ggLoadedLevels(),this.S("tilesready",{})),this.Fm=b)};c.prototype.Eg=function(a){switch(a){case 4:a=Math.min(110,this.fov.max);break;case 12:a=Math.min(270,this.fov.mk);a=Math.min(360*this.aspect(),a);a=Math.min(360/this.aspect(),a);break;case 9:a=Math.min(270,this.fov.nk);break;default:a=90}return a};c.prototype.bs=function(){var a=this;setTimeout(function(){a.Vf(!1)},10);setTimeout(function(){a.Vf(!1)},100)};
c.prototype.ij=function(){this.Fj.Kl(this.pan.m,this.A.m);for(var a=0;a<this.Y.length+this.T.length;a++){if(a<this.Y.length)var b=this.Y[a];else if(b=this.T[a-this.Y.length],b.td)continue;b.ij()}};c.prototype.Cr=function(a,b){var e=this;var f="<<L>>"+String(e.Pa);f=f.toUpperCase();"U"!=f.charAt(2)&&(e.M.Bf=!1);if(0!=e.eh.length||!e.M.Bf||e.M.rg||e.M.Uh)if(e.md)e.aa.removeChild(e.md),e.md=null;else{e.md=document.createElement("div");var g=e.md;f="left: "+a+"px;"+("top:\t "+b+"px;")+"z-index: 32000;";
f+="position:relative;";f+="display: table;";f+="color: black;";f+="background-color: white;";f+="border: 1px solid lightgray;";f+="box-shadow: 1px 1px 3px #333;";f+="font-family: Verdana, Arial, Helvetica, sans-serif;";f+="font-size: 9pt;";f+="opacity : 0.95;";g.setAttribute("style",f);g.setAttribute("class","gg_contextmenu");f=document.createElement("style");a=document.createTextNode(".gg_context_row:hover { background-color: #3399FF }");f.type="text/css";f.styleSheet?f.styleSheet.cssText=a.nodeValue:
f.appendChild(a);g.appendChild(f);for(a=0;a<e.eh.length;a++){b=e.eh[a];var h=document.createElement("div");f="text-align: left;";f+="margin: 0;";f+="padding: 5px 20px;";f+="vertical-align: left;";h.setAttribute("style",f);h.setAttribute("class","gg_context_row");f=document.createElement("a");f.href=b.url;f.target="_blank";f.innerHTML=b.text;f.setAttribute("style","color: black; text-decoration: none;");h.appendChild(f);g.appendChild(h)}0<e.eh.length&&(!e.M.Bf||e.M.rg||e.M.Uh)&&g.appendChild(document.createElement("hr"));
if(e.M.Uh&&e.ia){b=[];b.push({text:"Rectilinear Projection",nh:4});b.push({text:"Stereographic Projection",nh:9});b.push({text:"Fisheye Projection",nh:12});for(a=0;a<b.length;a++){h=b[a];var l=document.createElement("div");l.setAttribute("class","gg_context_row");f="text-align: left;";f+="margin: 0;";f=e.Wa==h.nh?f+"padding: 5px 20px 5px 7px;":f+"padding: 5px 20px;";f+="vertical-align: left;";f+="cursor: pointer;";l.setAttribute("style",f);l.onclick=function(k){return function(){e.xj(k,1);e.update()}}(h.nh);
l.innerHTML=e.Wa==h.nh?"⦿ "+h.text:h.text;g.appendChild(l)}e.M.Bf&&!e.M.rg||g.appendChild(document.createElement("hr"))}e.M.rg&&(a=document.createElement("div"),a.setAttribute("class","gg_context_row"),f="text-align: left;margin: 0;padding: 5px 20px;",f+="vertical-align: left;",f+="cursor: pointer;",a.setAttribute("style",f),a.onclick=function(){e.ej()},a.innerHTML=e.pi()?"Exit Fullscreen":"Enter Fullscreen",g.appendChild(a));e.M.Bf||(a=document.createElement("div"),f="text-align: left;margin: 0;padding: 5px 20px;",
f+="vertical-align: left;",a.setAttribute("style",f),a.setAttribute("class","gg_context_row"),f=document.createElement("a"),f.href=c.tg("aHR0cDovL3Bhbm8ydnIuY29tLw=="),f.target="_blank",f.innerHTML=c.tg("Q3JlYXRlZCB3aXRoIFBhbm8yVlI="),7<this.yi.length&&(f.innerHTML+="<br/>"+c.zl(this.yi).replace(/./gm,function(k){return"&#"+k.charCodeAt(0)+";"})),f.setAttribute("style","color: black; text-decoration: none;"),a.appendChild(f),g.appendChild(a));e.aa.insertBefore(e.md,e.aa.firstChild);g.onclick=function(){e.md&&
(e.aa.removeChild(e.md),e.md=null)};g.oncontextmenu=g.onclick}};c.prototype.Co=function(){var a=this;var b=a.Ra;a.control=b;a.control=b;a.bs();setTimeout(function(){a.kh()},10);setTimeout(function(){a.Ym()},200);setTimeout(function(){a.df();a.Ch()},10);b.addEventListener&&(b.addEventListener("touchstart",function(e){a.Wr(e)},!1),b.addEventListener("touchmove",function(e){a.Vr(e)},!1),b.addEventListener("touchend",function(e){a.Ur(e)},!1),b.addEventListener("touchcancel",function(e){a.Tr(e)},!1),b.addEventListener("pointerdown",
function(e){a.Nm(e)},!1),b.addEventListener("MSPointerDown",function(e){a.Nm(e)},!1),b.addEventListener("MSGestureStart",function(e){a.Sl(e)},!1),b.addEventListener("MSGestureEnd",function(e){a.Rl(e)},!1),b.addEventListener("MSGestureChange",function(e){a.uq(e)},!1),b.addEventListener("gesturestart",function(e){a.Sl(e)},!1),b.addEventListener("gesturechange",function(e){a.ep(e)},!1),b.addEventListener("gestureend",function(e){a.Rl(e)},!1),b.addEventListener("mousedown",function(e){a.rq(e)},!1),b.addEventListener("mousemove",
function(e){a.qq(e)},!1),document.addEventListener("mouseup",function(e){a.pq(e)},!1),b.addEventListener("mousewheel",function(e){a.Mm(e)},!1),b.addEventListener("DOMMouseScroll",function(e){a.Mm(e)},!1),document.addEventListener("keydown",function(e){a.hq(e)},!1),document.addEventListener("keyup",function(e){a.iq(e)},!1),window.addEventListener("resize",function(){a.df()},!1),window.addEventListener("blur",function(){a.Aq()},!1),a.aa.addEventListener("webkitfullscreenchange",function(){a.Gi()},!1),
document.addEventListener("mozfullscreenchange",function(){a.Gi()},!1),window.addEventListener("webkitfullscreenchange",function(){a.Gi()},!1),document.addEventListener("MSFullscreenChange",function(){a.Gi()},!1));b.oncontextmenu=function(e){void 0===e&&(e=window.event);if(e.target&&!a.Gc(e.target))return!0;if(!e.ctrlKey){e=a.Fg(e);var f=a.He();a.Cr(e.x-f.x,e.y-f.y);return!1}return!0};window.addEventListener("deviceorientation",function(e){a.Eq(e.alpha,e.beta,e.gamma,e.absolute);null!=e.alpha&&null!=
e.beta&&null!=e.gamma&&0==a.Xj&&(a.Xj=!0,a.S("gyroavailable",{available:!0}),a.S("playerstatechanged",{}))})};c.prototype.dl=function(){for(var a=0;a<this.X.length;a++)if("point"==this.X[a].type&&(this.la&&this.la.addSkinHotspot?(this.X[a].tf(),this.X[a].j=this.la.addSkinHotspot(this.X[a])):(this.X[a].j=new r.ho(this,this.X[a]),this.X[a].Sc&&this.X[a].bg&&(this.X[a].j.ggUse3d=!0,this.X[a].j.gg3dDistance=this.X[a].Yh)),this.X[a].j.__div.style.left="-1000px",this.X[a].j.__div.style.top="-1000px",this.X[a].j&&
this.X[a].j.__div)){var b=this.Ra.firstChild;b?this.Ra.insertBefore(this.X[a].j.__div,b):this.Ra.appendChild(this.X[a].j.__div)}};c.prototype.bo=function(){var a,b=document.createElement("fakeelement"),e={OTransition:"oTransitionEnd",MSTransition:"msTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd",transition:"transitionEnd"};for(a in e)if(void 0!==b.style[a])return e[a]};c.prototype.Nb=function(a){var b=[];a="#"==a.substr(0,1)?a.substr(1):"^"+a+"$";a=new RegExp(a,
"");for(var e=0;e<this.Y.length;e++)a.test(this.Y[e].id)&&b.push(this.Y[e]);for(e=0;e<this.T.length;e++)a.test(this.T[e].id)&&b.push(this.T[e]);for(e=0;e<this.eb.length;e++)a.test(this.eb[e].id)&&b.push(this.eb[e]);return b};c.prototype.yp=function(a){if("_videopanorama"==a)return this.F.j;a=this.Nb(a);return 0<a.length?a[0].j:null};c.prototype.dn=function(a,b){var e=this;b.addEventListener("ended",function(g){e.S("videoended",{video:g.target})});b.addEventListener("pause",function(g){e.S("videopaused",
{video:g.target})});b.addEventListener("play",function(g){e.S("videostarted",{video:g.target})});for(var f=0;f<this.T.length;f++)if(this.T[f].id==a)return this.T[f].j=b,this.T[f];f=new r.cl(this);f.registerElement(a,b);return f};c.prototype.isPlaying=function(a){if(this.Kb){var b=this.ra;if(b)return b.isPlaying(a)}else{if("_main"===a)return!0;a=this.Nb(a);if(0<a.length)return a[0].va?a[0].Nf:!a[0].j.ended&&!a[0].j.paused}return!1};c.prototype.fe=function(a,b){if(this.Kb){var e=this.ra;e&&e.playSound(a,
b)}else try{e=this.Nb(a);for(var f=0;f<e.length;f++){var g=e[f];g.kd=b&&!isNaN(Number(b))?Number(b)-1:g.loop-1;-1==g.kd&&(g.kd=1E7);this.O(g.j);this.isPlaying(a)&&this.Yi(a);g.va?g.Vd():(g.j.play(),g.se&&g.Nh());this.tr(g.id)}}catch(h){this.O(h)}};c.prototype.Zm=function(a,b){a=this.Nb(a);for(var e=0;e<a.length;e++){var f=a[e];this.isPlaying(f.id)?this.sk(f.id):this.fe(f.id,b)}};c.prototype.Rq=function(a,b){a=this.Nb(a);for(var e=0;e<a.length;e++){var f=a[e];this.isPlaying(f.id)?this.Yi(f.id):this.fe(f.id,
b)}};c.prototype.sk=function(a){if(this.Kb){var b=this.ra;b&&b.pauseSound(a)}else try{if(b=void 0,"_main"==a){this.Ti(a);for(b=0;b<this.Y.length;b++)this.Y[b].va?this.Y[b].sj():this.Y[b].j.pause();for(b=0;b<this.T.length;b++)this.T[b].j.pause()}else{var e=this.Nb(a);for(b=0;b<e.length;b++){var f=e[b];this.Ti(f.id);f.va?f.sj():f.j.pause()}}}catch(g){this.O(g)}};c.prototype.so=function(a,b){a=this.Nb(a);for(var e=0;e<a.length;e++){var f=a[e];0==b||1==b?f.Kg&&f.Kg(1==b):2==b&&f.Ie&&f.Ie();!f.nb||-1==
this.eb.indexOf(f)&&-1==this.T.indexOf(f)||(this.Lb=this.he=f)}};c.prototype.Yi=function(a){var b;if(this.Kb)(b=this.ra)&&b.stopSound(a);else try{if("_main"===a){this.Ti(a);for(b=0;b<this.Y.length;b++)this.Y[b].va?this.Y[b].mf():(this.Y[b].j.pause(),this.Y[b].j.currentTime=0);for(b=0;b<this.T.length;b++)this.T[b].j.pause(),this.T[b].j.currentTime=0}else{var e=this.Nb(a);for(b=0;b<e.length;b++){var f=e[b];this.Ti(f.id);f.va?f.mf():f.j&&f.j.pause&&(f.j.pause(),f.j.currentTime=0)}}}catch(g){this.O(g)}};
c.prototype.Ti=function(a){-1==this.bd.indexOf(a)&&this.bd.push(a);var b=this.re.indexOf(a);-1!=b&&this.re.splice(b,1);"_main"==a&&(this.re=[])};c.prototype.tr=function(a){-1!=this.bd.indexOf("_main")&&-1==this.re.indexOf(a)&&this.re.push(a);a=this.bd.indexOf(a);-1!=a&&this.bd.splice(a,1)};c.prototype.Dr=function(a){a=this.Nb(a);return 0<a.length?(a=a[0],a.va?a.Fo():a.j?a.j.currentTime:0):0};c.prototype.Er=function(a,b){a=this.Nb(a);0<a.length&&(a=a[0],a.va?(0>b&&(b=0),b>a.Rh.duration&&(b=a.Rh.duration-
.1),a.Go(b)):a.j&&(0>b&&(b=0),b>a.j.duration&&(b=a.j.duration-.1),a.j.currentTime=b))};c.prototype.setVolume=function(a,b){if(this.Kb){var e=this.ra;e&&e.setVolume(a,b)}else try{e=void 0;var f=Number(b);1<f&&(f=1);0>f&&(f=0);"_videopanorama"===a&&this.F.j&&(this.F.j.volume=f);if("_main"===a){this.ca=f;for(e=0;e<this.Y.length;e++)this.Y[e].j.volume=this.Y[e].level*this.ca;for(e=0;e<this.T.length;e++)this.T[e].j.volume=this.T[e].level*this.ca;this.F.j&&(this.F.j.volume=this.ca)}else{var g=this.Nb(a);
this.O(g);for(e=0;e<g.length;e++){var h=g[e];h.j&&null!=h.j.volume&&(h.j.volume=f*this.ca);h.level=f}}}catch(l){this.O(l)}};c.prototype.No=function(a,b){if(this.Kb){var e=this.ra;e&&e.changeVolume(a,b)}else try{var f=e=void 0;"_videopanorama"===a&&this.F.j&&(this.F.j.volume+=Number(b));if("_main"===a){e=this.ca;e+=Number(b);1<e&&(e=1);0>e&&(e=0);this.ca=e;for(f=0;f<this.Y.length;f++)this.Y[f].j.volume=this.Y[f].level*this.ca;for(f=0;f<this.T.length;f++)this.T[f].j.volume=this.T[f].level*this.ca;this.F.j&&
(this.F.j.volume=this.ca)}else{var g=this.Nb(a);for(f=0;f<g.length;f++){var h=g[f];e=h.level;e+=Number(b);1<e&&(e=1);0>e&&(e=0);h.level=e;h.j&&null!=h.j.volume&&(h.j.volume=e*this.ca)}}}catch(l){this.O(l)}};c.prototype.Qi=function(a,b,e){a.j.style.opacity=0==b?1:0;a.j.style[this.Tc]="opacity "+e+"ms";a.j.style.opacity=0==b?0:1};c.prototype.hr=function(a,b,e){function f(){var k=g[l];if(!k.j)return"continue";0==b?(h.Qi(k,b,e),setTimeout(function(){0==k.j.style.opacity&&k.Wf(!1)},e+10),k.ob=!1):1==b?
(h.Qi(k,b,e),k.Wf(!0),k.ob=!0):2==b&&("visible"==k.j.style.visibility?(h.Qi(k,0,e),setTimeout(function(){0==k.j.style.opacity&&k.Wf(!1)},e+10),k.ob=!1):(h.Qi(k,1,e),k.Wf(!0),k.ob=!0))}for(var g=this.Nb(a),h=this,l=0;l<g.length;l++)f()};c.prototype.Fn=function(){try{for(var a=this,b=!1,e=!1,f=0;f<this.Y.length;f++){var g=this.Y[f];if(-1!=g.loop&&!this.isPlaying(g.id)&&-1==this.bd.indexOf(g.id)&&(-1==this.bd.indexOf("_main")||-1!=this.re.indexOf(g.id)))if(this.Aa&&this.Xa.enabled&&4!=g.mode&&6!=g.mode)if(this.Xa.vl){if(g.va)g.Vd();
else{var h=g.j.play();if(void 0!==h)h.then(function(){})["catch"](function(){});g.j.currentTime=0}g.ua=0;e=!0}else b=!0;else if(4!=g.mode&&6!=g.mode&&("_background"!=g.id||!this.isPlaying(g.id)))if(g.va)g.Vd();else{h=g.j.play();if(void 0!==h)h.then(function(){})["catch"](function(){});g.j.currentTime&&(g.j.currentTime=0)}}b&&setTimeout(function(){a.Xa.Kr()},1E3*this.Xa.Cb);e&&(this.Xa.Gr=this.Aa.currentTime,this.Xa.Fr=setInterval(function(){a.Xa.ap()},10))}catch(l){this.O(l)}};c.prototype.Gl=function(){for(var a=
0;a<this.Xa.Ah.length;a++)this.Xa.Fl(this.Xa.Ah[a])};c.prototype.hn=function(){for(var a;0<this.X.length;)a=this.X.pop(),a.j&&(this.Ra.removeChild(a.j.__div),delete a.j),a.j=null;this.S("hotspotsremoved",{})};c.prototype.Ek=function(a){this.Jh=a;this.aa.style.zIndex=0!=a?a.toString():"auto";this.Ta&&this.Ta.gd&&(this.Ta.gd.zIndex=(a+4).toString());this.Ra.style.zIndex=(a+4).toString();this.Ia.style.zIndex=(a+3).toString();this.Na.style.zIndex=(a+5).toString();for(var b=0;b<this.T.length+this.eb.length;b++){var e=
b<this.T.length?this.T[b]:this.eb[b-this.T.length];e.j&&(e.j.style.zIndex=(a+(e.nb?8E4:0)).toString())}};c.prototype.Vf=function(a){var b=this.isFullscreen!==a;this.isFullscreen!==a&&(this.isFullscreen=a,this.update(100));if(this.isFullscreen){if(this.jj)try{this.aa.webkitRequestFullScreen?this.aa.webkitRequestFullScreen():this.aa.mozRequestFullScreen?this.aa.mozRequestFullScreen():this.aa.msRequestFullscreen?this.aa.msRequestFullscreen():this.aa.requestFullScreen?this.aa.requestFullScreen():this.aa.requestFullscreen&&
this.aa.requestFullscreen()}catch(e){this.O(e)}this.aa.style.position="absolute";a=this.He();this.aa.style.left=window.pageXOffset-a.x+this.margin.left+"px";this.aa.style.top=window.pageYOffset-a.y+this.margin.top+"px";this.Ek(10);document.body.style.overflow="hidden";b&&(this.ta&&this.ta.ggEnterFullscreen&&this.ta.ggEnterFullscreen(),this.S("fullscreenenter",{}),this.S("playerstatechanged",{}))}else{if(this.jj)try{document.webkitIsFullScreen?document.webkitCancelFullScreen():document.mozFullScreen?
document.mozCancelFullScreen():document.msExitFullscreen?document.msExitFullscreen():document.fullScreen&&(document.cancelFullScreen?document.cancelFullScreen():document.exitFullscreen&&document.exitFullscreen())}catch(e){this.O(e)}this.aa.style.position="relative";this.aa.style.left="0px";this.aa.style.top="0px";this.Ek(0);document.body.style.overflow="";b&&(this.ta&&this.ta.ggExitFullscreen&&this.ta.ggExitFullscreen(),this.S("fullscreenexit",{}),this.S("playerstatechanged",{}))}this.df()};c.prototype.ej=
function(){this.Vf(!this.isFullscreen)};c.prototype.$o=function(){this.Vf(!0)};c.prototype.exitFullscreen=function(){this.Vf(!1)};c.prototype.np=function(){return this.isFullscreen};c.prototype.wg=function(){this.kb.Uo();this.kn();this.kb.wg();this.kb.Vm();return!0};c.prototype.Qp=function(){return this.kb.display?this.kb.display.displayName:"N/A"};c.prototype.xr=function(a){this.kb&&(this.kb.Ed=a)};c.prototype.sf=function(){this.kb&&(this.kb.sf(),this.kb.je(),this.kb.ql());return!0};c.prototype.Ln=
function(){this.kb&&(this.kb.Qg()?this.sf():this.wg());return!0};c.prototype.Qg=function(){return this.kb&&this.kb.Qg()?!0:!1};c.prototype.ak=function(){return this.kb&&this.kb.ak()?!0:!1};c.prototype.Ir=function(a,b,e){this.C.Td=this.C.Qh;this.C.dg=this.C.Gh;this.C.enabled=!0;this.C.jf=this.C.enabled;this.C.active=!0;this.C.sd=0;var f=new Date;this.C.Jd=0;this.C.startTime=f.getTime();a&&0!=a&&(this.C.speed=a);b&&(this.C.timeout=b);e&&(this.C.dj=e);this.S("autorotatechanged",{})};c.prototype.Lr=function(){this.C.active=
!1;this.C.enabled=!1;this.C.jf=this.C.enabled;this.gf=this.C.Ai=!1;this.G.active&&this.G.hh&&(this.G.active=!1,this.G.hh=!1,this.G.Ib=0);this.S("autorotatechanged",{})};c.prototype.Rr=function(){this.C.enabled=!this.C.active;this.C.jf=this.C.enabled;this.C.active=this.C.enabled;this.C.sd=0;if(this.C.enabled){var a=new Date;this.C.Jd=0;this.C.startTime=a.getTime();this.C.Td=this.C.Qh;this.C.dg=this.C.Gh}this.S("autorotatechanged",{})};c.prototype.br=function(a){this.C.Kf=a;this.C.Rm=!0};c.prototype.Hr=
function(a){this.wb.running&&this.qn();this.Vb="";a&&""!=a&&(this.C.Td=a);this.C.jf=this.C.enabled;this.C.dg=!0;this.C.enabled=!0;this.C.active=!0;this.C.sd=0;a=new Date;this.C.Jd=0;this.C.startTime=a.getTime();this.S("autorotatechanged",{})};c.prototype.qn=function(){this.wb.running=!1;this.wb.Pj=!0;this.C.active=this.K.ue;this.wa.splice(this.wa.indexOf(this.J),1);0<this.wa.length&&(this.J=this.wa[0]);this.Vb="";this.Pi(!1);this.K.ue=!1;this.Ff=(new Date).getTime()};c.prototype.ul=function(a){if(this.hd=
document.getElementById(a)){this.hd.innerHTML="";this.aa=document.createElement("div");this.aa.onselectstart=function(){return!1};Gh&&this.aa.setAttribute("id","viewport");a="top:\t0px;left: 0px;position:relative;-ms-touch-action: none;touch-action: none;text-align: left;"+(this.Pa+"user-select: none;");this.aa.setAttribute("style",a);this.hd.appendChild(this.aa);this.L=document.createElement("div");a="top:\t0px;left: 0px;width: 100px;height: 100px;overflow: hidden;position:absolute;-ms-touch-action: none;touch-action: none;"+
(this.Pa+"user-select: none;");Gh&&this.L.setAttribute("id","viewer");this.L.setAttribute("style",a);this.aa.appendChild(this.L);if(this.Kb){var b=document.createElement("div");a="top:\t0px;left: 0px;width: 100%;height: 100%;overflow: hidden;position:absolute;-ms-touch-action: none;touch-action: none;"+(this.Pa+"user-select: none;");b.setAttribute("id",this.Rj);b.setAttribute("style",a);this.L.appendChild(b)}this.Ta&&(this.Ta.gd=document.createElement("canvas"),Gh&&this.Ta.gd.setAttribute("id","lensflarecanvas"),
a="top:\t0px;left: 0px;width: 100px;height: 100px;overflow: hidden;position:absolute;"+(this.Pa+"user-select: none;"),a+=this.Pa+"pointer-events: none;",this.Ta.gd.setAttribute("style",a),this.aa.appendChild(this.Ta.gd));this.Ra=document.createElement("div");Gh&&this.Ra.setAttribute("id","hotspots");a="top:\t0px;left: 0px;width: 100px;height: 100px;overflow: hidden;position:absolute;";this.ek&&(a+="background-image: url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7);");
this.Yc&&!this.ia&&(a+=this.Pa+"transform: translateZ(9999999px);");a+=this.Pa+"user-select: none;";this.Ra.setAttribute("style",a);this.aa.appendChild(this.Ra);this.Ia=document.createElement("canvas");Gh&&this.Ia.setAttribute("id","hotspotcanvas");a="top:\t0px;left: 0px;width: 100px;height: 100px;overflow: hidden;position:absolute;"+(this.Pa+"user-select: none;");a+=this.Pa+"pointer-events: none;";this.Ia.setAttribute("style",a);this.aa.appendChild(this.Ia);this.Na=document.createElement("div");
Gh&&this.Na.setAttribute("id","hotspottext");this.Na.setAttribute("style","top:\t0px;left: 0px;position:absolute;padding: 3px;visibility: hidden;");this.Na.innerHTML=" Hotspot text!";this.aa.appendChild(this.Na);this.divSkin=this.ta=this.Ra;this.Ek(0)}else alert("container not found!")};c.prototype.xl=function(a){this.Ma=!0;return function(){a.bb&&(a.v&&a.v.complete?(a.loaded=!0,a.bb.drawImage(a.v,0,0,a.width,a.height),a.v=null,a.Md=null):a.Md&&a.Md.complete&&!a.loaded&&(a.bb.drawImage(a.Md,0,0,a.width,
a.height),a.Md=null))}};c.prototype.tl=function(a){var b,e=128;this.v.Pf&&(this.L.style.backgroundColor=this.v.Pf.replace("0x","#"));a?(e=this.mg,this.bf=1):this.Ac>e&&(e=this.Ac);for(b=0;6>b;b++){var f=this.cube.faces[b];a?(f.width=this.mg,f.height=this.mg):(f.W=document.createElement("canvas"),f.W.width=this.Ac,f.W.height=this.Ac,f.width=this.Ac,f.height=this.Ac,f.bb=f.W.getContext("2d"));var g="position:absolute;";g+="left: 0px;";g+="top: 0px;";g+="width: "+e+"px;";g+="height: "+e+"px;";a&&(g+=
"outline: 1px solid transparent;");g+=this.Pa+"transform-origin: 0% 0%;";g+="-webkit-user-select: none;";g+=this.Pa+"transform: ";var h="";var l=1;this.Rf&&(l=100);h=4>b?h+("rotateY("+-90*b+"deg)"):h+("rotateX("+(4==b?-90:90)+"deg)");this.Rf&&(h+=" scale("+l+")");h+=" translate3d("+-e/2+"px,"+-e/2+"px,"+-e*l/(2*this.bf)+"px)";g+=h+";";f.km=h;a||(f.W.setAttribute("style",g),this.L.insertBefore(f.W,this.L.firstChild))}if(!a){for(b=0;6>b;b++)f=this.cube.faces[b],""!=this.qf[b]&&(f.Md=new Image,f.Md.crossOrigin=
this.crossOrigin,f.Md.onload=this.xl(f),f.Md.setAttribute("src",this.Mb(this.qf[b])),this.fc.push(f.Md));for(b=0;6>b;b++)f=this.cube.faces[b],f.loaded=!1,f.v=new Image,f.v.crossOrigin=this.crossOrigin,f.v.onload=this.xl(f),f.v.setAttribute("src",this.Mb(this.sg[b])),this.fc.push(f.v)}};c.prototype.je=function(){var a;this.Ja.na.x=0;this.Ja.na.y=0;if(this.cd){for(a=0;a<this.cube.faces.length;a++)this.cube.faces[a].W&&this.cube.faces[a].W.setAttribute&&(this.cube.faces[a].W.setAttribute("src",this.Cl),
this.L.removeChild(this.cube.faces[a].W));if(this.v.levels){for(a=0;a<this.v.levels.length;a++){var b=this.v.levels[a];for(f in b.ba)if(b.ba.hasOwnProperty(f)){var e=b.ba[f];e.visible=!1;e.W&&(e.bb&&e.bb.clearRect(0,0,e.bb.canvas.width,e.bb.canvas.height),this.fj.push(e.W));e.v&&delete e.v;e.pb&&(this.R.deleteTexture(e.pb),this.od--);e.bb=null;e.W=null;e.v=null}delete b.ba}delete this.v.levels;this.v.levels=null}}this.ya.je();var f=[];for(a=0;a<this.T.length;a++)b=this.T[a],b.td?f.push(b):b.Te();
for(a=0;a<this.eb.length;a++)this.eb[a].Te();this.I.Ug=-1;this.Ia.style.visibility="hidden";this.rb=0;this.Ze=[];this.Xa.Ah=[];for(a=0;a<this.Y.length;a++)b=this.Y[a],0==b.mode||b.Qm||this.Ze.push(b);this.T=f;this.eb=[];this.F.j&&(this.aa.removeChild(this.F.j),this.F.j=null,a=this.Nb("_videopanorama"),0<a.length&&(a[0].j=null));this.F.rd=!1;this.F.ri=!1};c.prototype.gm=function(){var a=1,b=-1!=navigator.userAgent.indexOf("Mac");window.devicePixelRatio&&b&&(a=window.devicePixelRatio);return{w:screen.width*
a,h:screen.height*a}};c.prototype.$l=function(){var a=this.gm();return a.w>a.h?a.w:a.h};c.prototype.vk=function(a,b){var e=(new DOMParser).parseFromString(a,"text/xml");this.Gj=a;this.cn(e,b);this.ra&&(this.O("Apply to Flash player"),this.ra.readConfigString(this.Gj),this.ra.setLocked(!0),this.ra.setSlaveMode(!0))};c.prototype.bn=function(a,b,e){try{var f=void 0;f=new XMLHttpRequest;f.open("GET",a,!1);f.send(null);if(f.responseXML){var g=a.lastIndexOf("/");0<=g&&(this.Ud=a.substr(0,g+1));2<=arguments.length&&
null!=b&&(this.Ud=b);this.vk(f.responseText,e)}else alert("Error loading panorama XML")}catch(h){alert("Error:"+h)}};c.prototype.Tq=function(a,b,e,f){var g=new XMLHttpRequest;var h=this;g.onload=function(l){if(4<=g.readyState)if(g.responseXML){var k=a.lastIndexOf("/");0<=k&&(h.Ud=a.substr(0,k+1));3<=arguments.length&&null!=e&&(h.Ud=e);h.vk(g.responseText,f);b&&b()}else alert("Error loading panorama XML");else console.error("Wrong state loading XML:"+g.statusText)};g.onerror=function(){console.error("Error loading XML:"+
g.statusText)};g.open("GET",a,!0);g.send(null)};c.prototype.vj=function(a){var b="";"{"==a.charAt(0)&&(b=a.substr(1,a.length-2));(a=this.Wd[b])&&(b=a);a={oldNodeId:this.Qa,nodeId:b};this.S("beforechangenodeid",a);this.Wj?this.Wj=!1:this.pk.push(this.Qa);""!=this.Qa&&-1==this.kj.indexOf(this.Qa)&&(this.kj.push(this.Qa),this.S("changevisitednodes",{}));this.Hm=this.Qa;this.Qa=b;this.O("change active node: "+b);this.la&&this.la.changeActiveNode&&this.la.changeActiveNode("{"+b+"}");this.S("changenodeid",
a);this.vf=!0};c.prototype.Sj=function(){return this.Qa};c.prototype.Ap=function(){if(0<this.Ya.length){var a=this.Ya.indexOf(this.Qa);a++;a>=this.Ya.length&&(a=0);return this.Ya[a]}return""};c.prototype.Mp=function(){if(0<this.Ya.length){var a=this.Ya.indexOf(this.Qa);a--;0>a&&(a=this.Ya.length-1);return this.Ya[a]}return""};c.prototype.sp=function(){return this.Hm};c.prototype.yq=function(a){return-1!=this.kj.indexOf(a)};c.prototype.Ro=function(){this.kj=[];this.S("changevisitednodes",{})};c.prototype.cn=
function(a,b){var e=a.firstChild;this.pe=[];this.Ya=[];this.Wd=[];for(a=e.firstChild;a;){if("map"==a.nodeName){var f={},g=a.getAttributeNode("title");g&&(f.title=g.nodeValue.toString());g=a.getAttributeNode("type");f.type=g.nodeValue.toString();"web"==f.type?(g=a.getAttributeNode("mapprovider"),f.mapprovider=g.nodeValue.toString(),(g=a.getAttributeNode("mapstyle"))&&(f.mapstyle=g.nodeValue.toString()),(g=a.getAttributeNode("googlecustomstylecode"))&&(f.googlecustomstylecode=g.nodeValue.toString()),
(g=a.getAttributeNode("mapurltemplate"))&&(f.mapurltemplate=g.nodeValue.toString()),(g=a.getAttributeNode("mapmaxzoom"))&&(f.mapmaxzoom=Number(g.nodeValue)),(g=a.getAttributeNode("mapkey"))&&(f.mapkey=g.nodeValue.toString()),(g=a.getAttributeNode("styleurl"))&&(f.styleurl=g.nodeValue.toString())):(g=a.getAttributeNode("width"),f.width=Number(g.nodeValue),g=a.getAttributeNode("height"),f.height=Number(g.nodeValue),g=a.getAttributeNode("zoomlevels"),f.zoomlevels=Number(g.nodeValue),g=a.getAttributeNode("tileformat"),
f.tileformat=g.nodeValue.toString(),g=a.getAttributeNode("bgcolor"),f.bgcolor=g.nodeValue.toString(),g=a.getAttributeNode("transparent"),f.transparent=1==g.nodeValue,g=a.getAttributeNode("floorplannorth"),f.floorplannorth=Number(g.nodeValue));g=a.getAttributeNode("id");this.zi[g.nodeValue.toString()]=f}a=a.nextSibling}if("tour"==e.nodeName){this.Ef=!0;a="";(g=e.getAttributeNode("start"))&&(a=g.nodeValue.toString());this.hasOwnProperty("startNode")&&this.startNode&&(a=String(this.startNode),this.startNode=
"");this.hasOwnProperty("startView")&&this.startView&&("object"===typeof this.startView&&null!==this.startView?b=this.startView:""!=this.startView&&(b=String(this.startView)),this.startView="");f=e.firstChild;var h="";for(e="";f;){if("panorama"==f.nodeName){if(g=f.getAttributeNode("id"))h=g.nodeValue.toString(),""==a&&(a=h),""==e&&(e=h),this.pe[h]=f,this.Ya.push(h);for(g=f.firstChild;g;){if("userdata"==g.nodeName){var l=this.yg(g);this.Hh[h]=l;h==a&&(this.Hh._first=l);l.customnodeid&&(this.Wd[l.customnodeid]=
h);this.Ic[h]=this.Dl(g);this.Jf[h]=this.El(g)}g=g.nextSibling}}if("masternode"==f.nodeName)for(g=f.firstChild;g;)"userdata"==g.nodeName&&(l=this.yg(g),this.Hh._master=l),g=g.nextSibling;f=f.nextSibling}this.pe.hasOwnProperty(a)||(g=this.Wd[a])&&(a=g);this.pe.hasOwnProperty(a)||(this.Hc("Start node "+a+" not found!"),a=e);this.uk(this.pe[a],b);this.vj("{"+a+"}");this.Qa=a}else this.Ef=!1,this.uk(e,b),this.vj(""),this.Ya.push("");this.ef&&(this.O("add pano vr config"),this.kb.ig());this.S("configloaded",
{});this.S("changenode",{});this.S("playerstatechanged",{})};c.prototype.uk=function(a,b){var e=this;this.hn();this.Ta&&this.Ta.Vq();this.Uf(this.mb);this.je();this.Vg=0;for(var f=a.firstChild,g,h,l=0;f;){if("view"==f.nodeName){if(g=f.getAttributeNode("fovmode"))this.fov.mode=Number(g.nodeValue);g=f.getAttributeNode("pannorth");this.pan.qk=1*(g?g.nodeValue:0);for(var k=f.firstChild;k;){"start"==k.nodeName&&(g=k.getAttributeNode("pan"),this.pan.m=Number(g?g.nodeValue:0),this.pan.cb=this.pan.m,g=k.getAttributeNode("tilt"),
this.A.m=Number(g?g.nodeValue:0),this.A.cb=this.A.m,g=k.getAttributeNode("roll"),this.V.m=Number(g?g.nodeValue:0),this.V.cb=this.V.m,g=k.getAttributeNode("fov"),this.fov.m=Number(g?g.nodeValue:70),this.fov.cb=this.fov.m,g=k.getAttributeNode("projection"),this.Hi=Number(g?g.nodeValue:4),this.Lc(this.Hi));"min"==k.nodeName&&(g=k.getAttributeNode("pan"),this.pan.min=1*(g?g.nodeValue:0),g=k.getAttributeNode("tilt"),this.A.min=1*(g?g.nodeValue:-90),g=k.getAttributeNode("fov"),this.fov.min=1*(g?g.nodeValue:
5),1E-20>this.fov.min&&(this.fov.min=1E-20),g=k.getAttributeNode("fovpixel"),this.fov.fh=1*(g?g.nodeValue:0));if("max"==k.nodeName){g=k.getAttributeNode("pan");this.pan.max=1*(g?g.nodeValue:0);g=k.getAttributeNode("tilt");this.A.max=1*(g?g.nodeValue:90);g=k.getAttributeNode("fov");this.fov.max=1*(g?g.nodeValue:120);180<=this.fov.max&&(this.fov.max=179.9);if(g=k.getAttributeNode("fovstereographic"))this.fov.nk=1*g.nodeValue;if(g=k.getAttributeNode("fovfisheye"))this.fov.mk=1*g.nodeValue;if(g=k.getAttributeNode("scaletofit"))this.M.pn=
1==g.nodeValue}if("flyin"==k.nodeName){if(g=k.getAttributeNode("projection"))this.Cc.Ib=Number(g.nodeValue);if(g=k.getAttributeNode("pan"))this.Cc.pan=parseFloat(g.nodeValue);if(g=k.getAttributeNode("tilt"))this.Cc.A=parseFloat(g.nodeValue);if(g=k.getAttributeNode("fov"))this.Cc.fov=parseFloat(g.nodeValue)}k=k.nextSibling}}if("autorotate"==f.nodeName){if(g=f.getAttributeNode("speed"))this.C.speed=1*g.nodeValue;if(g=f.getAttributeNode("delay"))this.C.timeout=1*g.nodeValue;if(g=f.getAttributeNode("returntohorizon"))this.C.dj=
1*g.nodeValue;if(g=f.getAttributeNode("nodedelay"))this.C.Ei=1*g.nodeValue;if(g=f.getAttributeNode("noderandom"))this.C.Sm=1==g.nodeValue;(g=f.getAttributeNode("nodefilter"))&&!this.C.Rm&&(this.C.Kf=g.nodeValue);this.Yd&&(this.C.enabled=!0,this.C.jf=!0,this.C.active=!1);this.C.Jd=0;if(g=f.getAttributeNode("startloaded"))this.C.vh=1==g.nodeValue,this.C.vh&&(this.C.active=!1);if(g=f.getAttributeNode("useanimation"))this.C.Gh=1==g.nodeValue,this.C.dg=this.C.Gh;if(g=f.getAttributeNode("syncanimationwithvideo"))this.C.Mk=
1==g.nodeValue}if("animation"==f.nodeName){if(g=f.getAttributeNode("syncanimationwithvideo"))this.C.Mk=1==g.nodeValue;if(g=f.getAttributeNode("useinautorotation"))this.C.Gh=1==g.nodeValue;if(g=f.getAttributeNode("animsequence"))this.C.Qh=g.nodeValue,this.Yd&&(this.C.Td=this.C.Qh);this.wa=[];for(k=f.firstChild;k;){if("clip"==k.nodeName){this.J=new r.Zk;if(g=k.getAttributeNode("animtitle"))this.J.hf=g.nodeValue.toString();if(g=k.getAttributeNode("cliptitle"))this.J.ab=g.nodeValue.toString();if(g=k.getAttributeNode("nodeid"))this.J.xs=
g.nodeValue.toString();if(g=k.getAttributeNode("length"))this.J.length=Number(g.nodeValue);if(g=k.getAttributeNode("animtype"))this.J.zo=Number(g.nodeValue);if(g=k.getAttributeNode("nextcliptitle"))this.J.Om=g.nodeValue.toString();if(g=k.getAttributeNode("nextclipnodeid"))this.J.Di=g.nodeValue.toString();if(g=k.getAttributeNode("nextclipstartview"))this.J.xq=g.nodeValue.toString();if(g=k.getAttributeNode("transitiontype"))this.J.Xr=Number(g.nodeValue);var q=k.firstChild;for(this.J.da=[];q;){if("keyframe"==
q.nodeName){var p=new r.Qc;if(g=q.getAttributeNode("time"))p.time=Number(g.nodeValue);if(g=q.getAttributeNode("value"))p.value=Number(g.nodeValue);if(g=q.getAttributeNode("valuestring"))p.Vk=g.nodeValue.toString();if(g=q.getAttributeNode("transitiontime"))p.Cb=Number(g.nodeValue);g=q.getAttributeNode("type");var w=0;g&&(p.type=Number(g.nodeValue),w=Number(g.nodeValue));if(g=q.getAttributeNode("property"))p.tb=Number(g.nodeValue);if(g=q.getAttributeNode("additionaltrackid"))p.Oh=g.nodeValue.toString();
if(1==w||2==w){if(g=q.getAttributeNode("bezierintime"))p.ve=Number(g.nodeValue);if(g=q.getAttributeNode("bezierinvalue"))p.we=Number(g.nodeValue);if(g=q.getAttributeNode("bezierouttime"))p.xe=Number(g.nodeValue);if(g=q.getAttributeNode("bezieroutvalue"))p.ye=Number(g.nodeValue)}this.J.da.push(p)}q=q.nextSibling}this.wa.push(this.J)}k=k.nextSibling}}"input"==f.nodeName&&(h||(h=f));if(h)for(q=0;6>q;q++)g=h.getAttributeNode("prev"+q+"url"),this.qf[q]=g?String(g.nodeValue):"";"altinput"==f.nodeName&&
(k=0,(g=f.getAttributeNode("screensize"))&&(k=1*g.nodeValue),0<k&&k<=this.$l()&&k>l&&(l=k,h=f));if("control"==f.nodeName&&this.Yd){if(g=f.getAttributeNode("simulatemass"))this.Ja.enabled=1==g.nodeValue;if(g=f.getAttributeNode("rubberband"))this.M.nn=1==g.nodeValue;if(g=f.getAttributeNode("locked"))this.M.hc=1==g.nodeValue;g&&(this.M.ah=1==g.nodeValue);if(g=f.getAttributeNode("lockedmouse"))this.M.hc=1==g.nodeValue;if(g=f.getAttributeNode("lockedkeyboard"))this.M.ah=1==g.nodeValue;if(g=f.getAttributeNode("lockedkeyboardzoom"))this.M.mq=
1==g.nodeValue;if(g=f.getAttributeNode("lockedwheel"))this.M.be=1==g.nodeValue;if(g=f.getAttributeNode("invertwheel"))this.M.wm=1==g.nodeValue;if(g=f.getAttributeNode("speedwheel"))this.M.Bn=1*g.nodeValue;if(g=f.getAttributeNode("invertcontrol"))this.M.Hd=1==g.nodeValue;if(g=f.getAttributeNode("sensitivity"))this.M.sensitivity=1*g.nodeValue,1>this.M.sensitivity&&(this.M.sensitivity=1);if(g=f.getAttributeNode("dblclickfullscreen"))this.M.Ij=1==g.nodeValue;if(g=f.getAttributeNode("contextfullscreen"))this.M.rg=
1==g.nodeValue;if(g=f.getAttributeNode("contextprojections"))this.M.Uh=1==g.nodeValue;if(g=f.getAttributeNode("hideabout"))this.M.Bf=1==g.nodeValue;for(k=f.firstChild;k;)"menulink"==k.nodeName&&(q={text:"",url:""},g=k.getAttributeNode("text"),q.text=g.nodeValue,g=k.getAttributeNode("url"),q.url=g.nodeValue,this.eh.push(q)),k=k.nextSibling}if("transition"==f.nodeName&&this.Yd){if(g=f.getAttributeNode("enabled"))this.K.enabled=1==g.nodeValue;if(g=f.getAttributeNode("blendtime"))this.K.lg=1*g.nodeValue;
if(g=f.getAttributeNode("blendcolor"))this.K.lf=g.nodeValue.toString();if(g=f.getAttributeNode("type"))this.K.type=g.nodeValue.toString();if(g=f.getAttributeNode("softedge"))this.K.Mc=1*g.nodeValue;if(g=f.getAttributeNode("zoomin"))this.K.sa=1*g.nodeValue;if(g=f.getAttributeNode("zoomout"))this.K.qc=1*g.nodeValue;if(g=f.getAttributeNode("zoomfov"))this.K.gg=1*g.nodeValue;if(g=f.getAttributeNode("zoomspeed"))this.K.te=1*g.nodeValue;if(g=f.getAttributeNode("zoomoutpause"))this.K.hg=1==g.nodeValue;"cut"==
this.K.type&&(this.K.lg=0)}if("soundstransition"==f.nodeName){if(g=f.getAttributeNode("enabled"))this.Xa.enabled=1==g.nodeValue;if(g=f.getAttributeNode("transitiontime"))this.Xa.Cb=1*g.nodeValue;if(g=f.getAttributeNode("crossfade"))this.Xa.vl=1==g.nodeValue}if("flyintransition"==f.nodeName){if(g=f.getAttributeNode("enabled"))this.wb.enabled=1==g.nodeValue&&this.ia;if(g=f.getAttributeNode("speed"))this.wb.speed=1*g.nodeValue}"userdata"==f.nodeName&&(this.userdata=this.eg=this.yg(f),this.Ic[a.id]||
(this.Ic[a.id]=this.Dl(f),this.Jf[a.id]=this.El(f)));if("hotspots"==f.nodeName)for(k=f.firstChild;k;){if("label"==k.nodeName&&this.Yd){q=this.I.aj;if(g=k.getAttributeNode("enabled"))q.enabled=1==g.nodeValue;if(g=k.getAttributeNode("width"))q.width=1*g.nodeValue;if(g=k.getAttributeNode("height"))q.height=1*g.nodeValue;if(g=k.getAttributeNode("textcolor"))q.bj=1*g.nodeValue;if(g=k.getAttributeNode("textalpha"))q.$i=1*g.nodeValue;if(g=k.getAttributeNode("background"))q.background=1==g.nodeValue;if(g=
k.getAttributeNode("backgroundalpha"))q.ac=1*g.nodeValue;if(g=k.getAttributeNode("backgroundcolor"))q.bc=1*g.nodeValue;if(g=k.getAttributeNode("border"))q.Sh=1*g.nodeValue;if(g=k.getAttributeNode("bordercolor"))q.dc=1*g.nodeValue;if(g=k.getAttributeNode("borderalpha"))q.cc=1*g.nodeValue;if(g=k.getAttributeNode("borderradius"))q.rj=1*g.nodeValue;if(g=k.getAttributeNode("wordwrap"))q.lj=1==g.nodeValue}if("polystyle"==k.nodeName&&this.Yd){if(g=k.getAttributeNode("mode"))this.I.mode=1*g.nodeValue;if(g=
k.getAttributeNode("bordercolor"))this.I.dc=1*g.nodeValue;if(g=k.getAttributeNode("backgroundcolor"))this.I.bc=1*g.nodeValue;if(g=k.getAttributeNode("borderalpha"))this.I.cc=1*g.nodeValue;if(g=k.getAttributeNode("backgroundalpha"))this.I.ac=1*g.nodeValue;if(g=k.getAttributeNode("handcursor"))this.I.zf=1==g.nodeValue}g=void 0;"hotspot"==k.nodeName&&(g=new r.Mh(this),g.type="point",g.Xb(k),this.X.push(g));"polyhotspot"==k.nodeName&&(g=new r.Mh(this),g.type="poly",g.Xb(k),this.X.push(g));k=k.nextSibling}if("sounds"==
f.nodeName||"media"==f.nodeName)for(k=f.firstChild;k;){if("sound"==k.nodeName&&!this.Pm)for(g=new r.po(this),g.Xb(k),this.Kb||g.addElement(),q=0;q<this.Ze.length;q++)g.id==this.Ze[q].id&&(this.Ze.splice(q,1),q--);"video"==k.nodeName&&(g=new r.cl(this),g.Xb(k),this.Kb||g.addElement());"image"==k.nodeName&&(g=new r.no(this),g.Xb(k),this.Kb||g.addElement());"lensflare"==k.nodeName&&this.Ta&&(g=new r.oo(this),g.Xb(k),this.Ta.$g.push(g));k=k.nextSibling}f=f.nextSibling}for(q=0;q<this.Ze.length;q++){a=
this.Ze[q];if(this.Aa&&this.Xa.enabled&&this.isPlaying(a.id))this.Xa.Ah.push(a);else{try{a.va?a.mf():a.j.pause()}catch(y){this.O(y)}a.Te()}this.Y.splice(this.Y.indexOf(a),1)}1!=this.K.sa&&2!=this.K.sa&&6!=this.K.sa&&this.Gl();this.qb.Ni=!0;b&&("object"===typeof b&&null!==b?(b.hasOwnProperty("pan")&&this.Xe(Number(b.pan)),b.hasOwnProperty("tilt")&&this.Ye(Number(b.tilt)),b.hasOwnProperty("fov")&&this.We(Number(b.fov)),b.hasOwnProperty("projection")&&this.Lc(Number(b.projection))):""!=b&&(b=b.toString().split("/"),
4<b.length&&this.Lc(Number(b[4])),0<b.length&&(g=String(b[0]),"N"==g.charAt(0)?this.Dk(Number(g.substr(1))):"S"==g.charAt(0)?this.Dk(-180+Number(g.substr(1))):this.Xe(Number(g))),1<b.length&&this.Ye(Number(b[1])),2<b.length&&this.We(Number(b[2]))),this.pan.open=this.pan.m);if(h){g=h.getAttributeNode("stereo");this.Id=!1;g&&1==g.nodeValue&&(this.Id=!0);g=h.getAttributeNode("fliplr");this.wh=!1;g&&1==g.nodeValue&&(this.wh=!0);for(q=0;q<(this.Id?12:6);q++)(g=h.getAttributeNode("tile"+q+"url"))&&(this.sg[q]=
String(g.nodeValue));for(q=0;6>q;q++)(g=h.getAttributeNode("prev"+q+"url"))&&(this.qf[q]=String(g.nodeValue));if(g=h.getAttributeNode("tilevrurl"))this.wl=String(g.nodeValue);if(g=h.getAttributeNode("tilesize"))this.Ac=1*g.nodeValue;if(g=h.getAttributeNode("canvassize"))this.mg=Number(g.nodeValue);if(g=h.getAttributeNode("tilescale"))this.bf=1*g.nodeValue;if(g=h.getAttributeNode("leveltileurl"))this.v.jk=g.nodeValue;if(g=h.getAttributeNode("leveltilesize"))this.v.N=Number(g.nodeValue);if(g=h.getAttributeNode("levelbias"))this.v.Km=
Number(g.nodeValue);if(g=h.getAttributeNode("levelbiashidpi"))this.v.Lm=Number(g.nodeValue);g=h.getAttributeNode("overlap");this.Oa.V=0;this.Oa.pitch=0;g&&(this.v.Ea=Number(g.nodeValue));if(g=h.getAttributeNode("levelingroll"))this.Oa.V=Number(g.nodeValue);if(g=h.getAttributeNode("levelingpitch"))this.Oa.pitch=Number(g.nodeValue);this.rb=0;(g=h.getAttributeNode("flat"))&&1==g.nodeValue&&(this.rb=2);g=h.getAttributeNode("width");this.v.width=1*(g?g.nodeValue:1);g=h.getAttributeNode("height");this.v.height=
1*(g?g.nodeValue:this.v.width);this.F.src=[];this.v.levels=[];for(k=h.firstChild;k;){if("preview"==k.nodeName){if(g=k.getAttributeNode("color"))this.v.Pf=g.nodeValue;if(g=k.getAttributeNode("strip"))this.v.$m=1==g.nodeValue}if("video"==k.nodeName){if(g=k.getAttributeNode("format"))"3x2"==g.nodeValue&&(this.F.format=14),"equirectangular"==g.nodeValue&&(this.F.format=1);if(g=k.getAttributeNode("flipy"))this.F.flipY=Number(g.nodeValue);if(g=k.getAttributeNode("startonload"))this.F.Jk=1==g.nodeValue;
if(g=k.getAttributeNode("startmutedmobile"))this.F.Dn=1==g.nodeValue;if(g=k.getAttributeNode("bleed"))this.F.kf=Number(g.nodeValue);if(g=k.getAttributeNode("endaction"))this.F.De=String(g.nodeValue);if(g=k.getAttributeNode("targetview"))this.F.Nk=String(g.nodeValue);if(g=k.getAttributeNode("width"))this.F.width=Number(g.nodeValue);if(g=k.getAttributeNode("height"))this.F.height=Number(g.nodeValue);for(q=k.firstChild;q;)"source"==q.nodeName&&(g=q.getAttributeNode("url"))&&this.F.src.push(g.nodeValue.toString()),
q=q.nextSibling}if("level"==k.nodeName){h=new r.bl;g=k.getAttributeNode("width");h.width=1*(g?g.nodeValue:1);g=k.getAttributeNode("height");h.height=1*(g?g.nodeValue:h.width);if(g=k.getAttributeNode("preload"))h.cache=1==g.nodeValue;if(g=k.getAttributeNode("preview"))h.Se=1==g.nodeValue;h.U=Math.floor((h.width+this.v.N-1)/this.v.N);h.ea=Math.floor((h.height+this.v.N-1)/this.v.N);this.v.levels.push(h)}k=k.nextSibling}this.v.hk=this.v.levels.length}this.Af=!0;this.Dh&&(this.ia=this.cd=!1,this.tc||(this.O("dummy rendering"),
this.tc=document.createElement("canvas"),this.tc.width=100,this.tc.height=100,this.tc.id="dummycanvas",this.L.appendChild(this.tc)),this.Nc());this.ia&&this.R&&(this.ya.um(this.bf),this.ya.vm());this.cd&&(0<this.v.levels.length?this.tl(!0):this.tl(!1),this.Vg=0);var x=this;0<this.v.levels.length&&this.v.$m&&0==this.rb&&(b=new Image,h=new r.bl,h.Se=!0,h.cache=!0,h.U=h.ea=0,h.height=h.width=0,this.v.levels.push(h),b.crossOrigin=this.crossOrigin,b.onload=this.ya.wq(b),b.setAttribute("src",this.ne(6,
this.v.hk-1,0,0)));if(0<this.F.src.length&&this.ia)if(this.Eh){this.F.j=document.createElement("video");this.F.j.crossOrigin=this.crossOrigin;this.F.j.setAttribute("style","display:none; max-width:none;");this.F.j.setAttribute("playsinline","playsinline");this.F.j.preload=!0;this.F.j.volume=this.ca;this.aa.appendChild(this.F.j);this.F.rd=!1;this.F.Hn=!1;this.F.j.oncanplay=function(){if(!x.F.rd){x.F.ri=!0;var y,z,fa=[],la=new r.Ha,B=x.R,db=x.F.j.videoWidth/3;x.F.width=x.F.j.videoWidth;x.F.height=x.F.j.videoHeight;
for(y=0;6>y;y++){var ja=y%3*db+x.F.kf;var id=ja+db-2*x.F.kf;var tf=4;3>y&&(tf+=db);var ih=tf+db-2*x.F.kf;for(z=0;4>z;z++){la.x=-1;la.y=-1;la.z=1;for(var hh=0;hh<z;hh++)la.mn();fa.push((0<la.x?ja:id)/(3*db),(0<la.y?ih:tf)/(2*db))}}B.bindBuffer(B.ARRAY_BUFFER,x.F.Zi);B.bufferData(B.ARRAY_BUFFER,new Float32Array(fa),B.STATIC_DRAW)}};"exit"==this.F.De?this.F.j.onended=function(){x.F.ri=!1;x.F.rd=!1;x.aa.removeChild(x.F.j);x.F.j=null;x.update()}:"stop"==this.F.De?x.F.j.onended=function(){x.update()}:"{"==
this.F.De.charAt(0)?this.F.j.onended=function(){x.$c(x.F.De,x.F.Nk)}:this.F.j.loop=!0;for(q=0;q<this.F.src.length;q++)h=document.createElement("source"),h.setAttribute("src",this.Mb(this.F.src[q])),this.F.j.appendChild(h);h=this.Nb("_videopanorama");0<h.length?h[0].j=this.F.j:this.dn("_videopanorama",this.F.j);if(this.F.Jk&&(h=this.F.j.play(),void 0!==h))h.then(function(){})["catch"](function(){e.F.Dn&&(e.F.j.muted=!0,e.F.j.play())})}else"{"==this.F.De.charAt(0)&&x.$c(x.F.De,x.F.Nk);this.dl();this.K.xd||
this.Fn();this.update();this.Yd&&(this.Yd=!1,this.ta&&this.ta.ggViewerInit&&this.ta.ggViewerInit(),this.wb.enabled&&0==this.rb&&this.ia&&(this.Lc(9),this.pan.m=this.Cc.pan,this.A.m=this.Cc.A,this.fov.m=this.Cc.fov,this.Wa=this.Cc.Ib,this.J=this.Dg(!1),this.pan.m=this.J.da[0].value,this.A.m=this.J.da[1].value,this.fov.m=this.J.da[2].value,3==this.J.da[3].tb&&this.Lc(this.J.da[3].value),this.Vb=this.J.ab,this.Pi(!0),this.C.active=!1,this.C.Ag=!0));this.Nc()};c.prototype.rk=function(a,b){0<a.length&&
(".xml"==a.substr(a.length-4)||".swf"==a.substr(a.length-4)||"{"==a.charAt(0)?this.$c(this.Mb(a),b):window.open(this.Mb(a),b))};c.prototype.Jr=function(){this.Af=this.isLoaded=!1;this.checkLoaded=this.fc=[];this.lh=0;this.ta&&this.ta.ggReLoaded&&this.ta.ggReLoaded();this.S("beforechangenode",{})};c.prototype.Zp=function(a){var b="";0<this.pk.length&&(b=this.pk.pop());""!=b&&(this.Wj=!0);this.$c("{"+b+"}",a)};c.prototype.$c=function(a,b){if(""!=a&&"{}"!=a){this.Jr();this.la&&this.la.hotspotProxyOut&&
this.la.hotspotProxyOut(this.Da.id,this.Da.url);".swf"==a.substr(a.length-4)&&(a=a.substr(0,a.length-4)+".xml");var e="",f=null;"object"===typeof b&&null!==b?f=b:b&&(e=b.toString());b="/"+this.A.m+"/"+this.fov.m+"//"+this.Sa();e=e.replace("$cur",this.pan.m+b);e=e.replace("$(cur)",this.pan.m+b);e=e.replace("$fwd","N"+this.Ge()+b);e=e.replace("$(fwd)","N"+this.Ge()+b);e=e.replace("$bwd","S"+this.Ge()+b);e=e.replace("$(bwd)","S"+this.Ge()+b);e=e.replace("$ap",String(this.pan.m));e=e.replace("$(ap)",
String(this.pan.m));e=e.replace("$an",String(this.Ge()));e=e.replace("$(an)",String(this.Ge()));e=e.replace("$at",String(this.A.m));e=e.replace("$(at)",String(this.A.m));e=e.replace("$af",String(this.fov.m));e=e.replace("$(af)",String(this.fov.m));e=e.replace("$ar",String(this.Sa()));e=e.replace("$(ar)",String(this.Sa()));""!=e&&(b=e.split("/"),3<b.length&&""!=b[3]&&(this.startNode=b[3]));b=null!==f?f:e;this.Fa();if("{"==a.charAt(0)){var g=a.substr(1,a.length-2);if(this.Qa==g&&this.ng)return;(f=this.Wd[g])&&
(g=f);f=this.K;var h=this.R;if(this.pe[g]){this.ng=!0;if(this.K.enabled&&this.ia&&this.K.pc){f.qe||f.xd||this.Pi(!0);var l=void 0;"wipeleftright"==f.type?l=1:"wiperightleft"==f.type?l=2:"wipetopbottom"==f.type?l=3:"wipebottomtop"==f.type?l=4:"wiperandom"==f.type&&(l=Math.ceil(4*Math.random()));f.Hj=l;h.bindFramebuffer(h.FRAMEBUFFER,f.pc);h.viewport(0,0,f.pc.width,f.pc.height);h.clear(h.COLOR_BUFFER_BIT|h.DEPTH_BUFFER_BIT);f.zh=!0;this.Ch();f.zh=!1;h.bindFramebuffer(h.FRAMEBUFFER,null);h.viewport(0,
0,this.xb.width,this.xb.height);h=new Date;this.Da!=this.mb&&6!=f.sa?(f.Kh=this.Da.Wb/this.D.width,f.Lh=1-this.Da.Ab/this.D.height):(f.Kh=.5,f.Lh=.5);1!=f.sa&&2!=f.sa&&6!=f.sa?(f.Kk=h.getTime(),f.qe=!0):(f.eo=h.getTime(),f.xd=!0,f.Db=Math.sin(this.Sb()/2*Math.PI/180)/Math.sin(f.gg/2*Math.PI/180),f.Db=Math.max(f.Db,1),f.co=1/f.te*f.Db*.3)}this.uk(this.pe[g],b);this.vj(a);if(f.enabled&&this.ia&&0!=f.qc){f.$e=this.Hg();f.af=this.gi();f.Qd=this.Sb();f.wd=this.Sa();if(1==f.qc||3==f.qc)this.Ui(f.gg);else if(2==
f.qc)this.Ui(this.Sb()+f.gg);else if(4==f.qc){for(g=b=0;g<this.wa.length;g++)this.wa[g].ab&&0==this.wa[g].ab.indexOf("__FlyIn")&&(b=this.wa[g]);0!=b?(this.Lc(this.fi(3,b).value),this.Xe(this.fi(0,b).value),this.Ye(this.fi(1,b).value),this.We(this.fi(2,b).value)):(this.Lc(this.Cc.Ib),this.Xe(this.Cc.pan),this.Ye(this.Cc.A),this.Ui(this.Cc.fov))}f.hg||1==f.sa||2==f.sa||6==f.sa||(4==f.qc?(this.J=this.Dg(!0,f.$e,f.af,f.Qd),this.Vb=this.J.ab,this.C.active=!0,this.wb.running=!0):this.moveTo(f.$e,f.af,f.Qd,
f.te,0,f.wd))}this.ra&&this.ra.openNext(a,e);this.ef&&(this.O("add pano opennext"),this.kb.ig());this.K.xd||this.K.qe||(this.qa&&this.Dj(),this.ng=!1)}else{this.Hc("invalid node id: "+g);return}}else this.bn(a,null,b);this.S("changenode",{});this.update(5)}};c.prototype.Cp=function(){return this.Af?this.Ef?this.Ya.slice(0):[""]:[]};c.prototype.yg=function(a){var b;var e={title:"",description:"",author:"",datetime:"",copyright:"",source:"",information:"",comment:"",latitude:0,longitude:0,customnodeid:"",
tags:[]};if(a&&((b=a.getAttributeNode("title"))&&(e.title=b.nodeValue.toString()),(b=a.getAttributeNode("description"))&&(e.description=b.nodeValue.toString()),(b=a.getAttributeNode("author"))&&(e.author=b.nodeValue.toString()),(b=a.getAttributeNode("datetime"))&&(e.datetime=b.nodeValue.toString()),(b=a.getAttributeNode("copyright"))&&(e.copyright=b.nodeValue.toString()),(b=a.getAttributeNode("source"))&&(e.source=b.nodeValue.toString()),(b=a.getAttributeNode("info"))&&(e.information=b.nodeValue.toString()),
(b=a.getAttributeNode("comment"))&&(e.comment=b.nodeValue.toString()),(b=a.getAttributeNode("latitude"))&&(e.latitude=Number(b.nodeValue)),(b=a.getAttributeNode("longitude"))&&(e.longitude=Number(b.nodeValue)),(b=a.getAttributeNode("nodeid"))&&(e.nodeid=b.nodeValue.toString()),(b=a.getAttributeNode("customnodeid"))&&(e.customnodeid=b.nodeValue.toString()),b=a.getAttributeNode("tags"))){a=b.nodeValue.toString().split("|");for(b=0;b<a.length;b++)""==a[b]&&(a.splice(b,1),b--);e.tags=a}return e};c.prototype.Dl=
function(a){for(var b={},e=a.firstChild;e;){if("mapcoords"==e.nodeName){var f={x:0,y:0};a=e.getAttributeNode("x");f.x=Number(a.nodeValue);a=e.getAttributeNode("y");f.y=Number(a.nodeValue);a=e.getAttributeNode("mapid");b[a.nodeValue.toString()]=f}e=e.nextSibling}return b};c.prototype.El=function(a){for(var b={},e=a.firstChild;e;){if("mapcoords"==e.nodeName){var f={x:0,y:0};a=e.getAttributeNode("x_floorplan_percent");f.x=Number(a.nodeValue);a=e.getAttributeNode("y_floorplan_percent");f.y=Number(a.nodeValue);
a=e.getAttributeNode("mapid");b[a.nodeValue.toString()]=f}e=e.nextSibling}return b};c.prototype.Gg=function(a){return a?this.Hh[a]?this.Hh[a]:this.yg():this.eg};c.prototype.Uj=function(a){a=this.Gg(a);var b=[];""!=a.latitude&&0!=a.latitude&&0!=a.longitude&&(b.push(a.latitude),b.push(a.longitude));return b};c.prototype.am=function(a){for(var b=[],e=0;e<this.Ya.length;e++){var f=this.Ya[e],g=this.Gg(f);g&&g.tags.includes(a)&&b.push(f)}return b};c.prototype.Fp=function(a){return this.Gg(a).title};c.prototype.Bp=
function(a,b){var e=-1;a=this.Uj(a);b=this.Uj(b);if(2==a.length&&2==b.length){e=Math.PI/180*(b[0]-a[0]);var f=Math.PI/180*(b[1]-a[1]);a=Math.sin(e/2)*Math.sin(e/2)+Math.sin(f/2)*Math.sin(f/2)*Math.cos(Math.PI/180*a[0])*Math.cos(Math.PI/180*b[0]);e=12742E3*Math.atan2(Math.sqrt(a),Math.sqrt(1-a))}return e};c.prototype.xf=function(a,b){var e;for(e=0;e<this.J.da.length;e++)if(this.J.da[e].time==a&&this.J.da[e].tb==b)return this.J.da[e];return!1};c.prototype.fi=function(a,b){var e;for(e=0;e<b.da.length;e++)if(0==
b.da[e].time&&b.da[e].tb==a)return b.da[e];return!1};c.prototype.zp=function(a){var b,e=1E5,f=a,g=!1;for(b=0;b<this.J.da.length;b++)this.J.da[b].tb==a.tb&&this.J.da[b].time>a.time&&this.J.da[b].time<e&&(f=this.J.da[b],e=f.time,g=!0);return g?f:!1};c.prototype.fp=function(a){for(var b=[],e=0;e<this.J.da.length;e++)if(this.J.da[e].time<=a&&4==this.J.da[e].tb){for(var f=!1,g=0;g<b.length;g++)if(b[g].Oh==this.J.da[e].Oh){b[g].time<this.J.da[e].time?b.splice(g,1):f=!0;break}f||b.push(this.J.da[e])}return b};
c.prototype.Dg=function(a,b,e,f){for(var g=0;g<this.wa.length;g++)if(this.wa[g].ab&&0==this.wa[g].ab.indexOf("__FlyIn"))return this.wa[g];g=new r.Yk;g.ab="__FlyIn";g.le=this.pan.m;g.th=this.A.m;g.Od=this.fov.m;g.sh=this.Wa;g.wd=this.Hi;a?(g.rf=!1,g.Be=!1,g.speed=this.K.te,g.Pd=b,g.me=e,g.Yf=f):(g.rf=!0,g.Be=!0,g.speed=this.wb.speed,g.Pd=this.pan.cb,g.me=this.A.cb,g.Yf=this.fov.cb);return this.Ql(g)};c.prototype.Ql=function(a){var b=new r.Zk;b.ab=a.ab;b.hf="";b.da=[];for(var e=a.sh!=a.wd&&-1!=a.wd;-180>
a.Pd;)a.Pd+=360;for(;180<a.Pd;)a.Pd-=360;var f=a.Pd-a.le;if(360==this.pan.max-this.pan.min){for(;-180>f;)f+=360;for(;180<f;)f-=360}var g=a.me-a.th,h=a.Yf-a.Od,l=Math.round(Math.sqrt(f*f+g*g+h*h)/a.speed*.33);e&&(l=Math.max(10,l));b.length=l;if(a.Ce){var k=Math.ceil(.7*l);k=Math.min(15,k);k=Math.max(5,k);b.length=l+k;var q=.33*k}var p=a.Yf,w=l,x=0,y=l-1;if(e){var z=a.Od;var fa=4==a.wd?120:this.Eg(a.wd);var la=a.Yf;h=la-a.Od;var B=new r.Bc(0,a.Od),db=new r.Bc(l,la),ja=new r.Bc,id=new r.Bc;id.init(l/
3,a.Od+h/3);ja.init(2*l/3,la-h/3);if(z>fa)for(;x<=l&&z>fa;)z=new r.Bc,z.qj(B,db,id,ja,x),z=z.y,x++;else x=1;x>=.8*l&&(w=x=Math.round(.8*l));0==x&&(x=1);fa=4==a.sh?120:this.Eg(a.sh);z=a.Yf;if(z>fa)for(;y>x&&z>fa;)z=new r.Bc,z.qj(B,db,id,ja,y),z=z.y,y--}B=new r.Qc;B.time=0;B.tb=0;B.value=a.le;B.type=1;B.xe=l/3;B.ye=a.rf?a.le:a.le+f/3;b.da.push(B);B=new r.Qc;B.time=0;B.tb=1;B.value=a.th;B.type=1;B.xe=l/3;B.ye=a.rf?a.th:a.th+g/3;b.da.push(B);B=new r.Qc;B.time=0;B.tb=2;B.value=a.Od;B.type=1;B.xe=l/3;B.ye=
a.rf?a.Od:a.Od+h/3;b.da.push(B);B=new r.Qc;B.time=0;B.tb=3;B.value=a.sh;B.type=0;B.Cb=0;b.da.push(B);e&&(B=new r.Qc,B.time=x,B.tb=3,B.value=a.wd,B.type=0,B.Cb=y-x,b.da.push(B));B=new r.Qc;B.time=l;B.tb=0;B.value=a.le+f;B.type=1;B.ve=2*l/3;B.we=a.Be&&!a.Ce?B.value:B.value-f/3;a.Ce&&(B.xe=l+q,B.ye=B.value+q/l*f);b.da.push(B);B=new r.Qc;B.time=l;B.tb=1;B.value=a.me;B.type=1;B.ve=2*l/3;B.we=a.Be&&!a.Ce?a.me:a.me-g/3;a.Ce&&(B.xe=l+q,B.ye=B.value+q/l*g);b.da.push(B);B=new r.Qc;B.time=w;B.tb=2;B.value=p;
B.type=1;B.ve=2*w/3;B.we=a.Be?p:p-h/3;b.da.push(B);a.Ce&&(B=new r.Qc,B.time=l+k,B.tb=0,B.value=a.le+f,B.type=1,B.ve=l+k-q,B.we=a.le+f,b.da.push(B),B=new r.Qc,B.time=l+k,B.tb=1,B.value=a.me,B.type=1,B.ve=l+k-q,B.we=a.me,b.da.push(B));this.wa.push(b);return b};c.prototype.ls=function(){this.F.j&&this.F.j.play()};c.prototype.ms=function(){this.F.j&&(this.F.j.pause(),this.F.j.currentTime=0)};c.prototype.ks=function(){this.F.j&&this.F.j.pause()};c.prototype.zr=function(a){this.F.j&&(0>a&&(a=0),a>this.F.j.duration&&
(a=this.F.j.duration-.1),this.F.j.currentTime=a,this.update())};c.prototype.Tp=function(){return this.F.j?this.F.j.currentTime:0};c.prototype.Sp=function(){if(this.F.j)return this.F.j};c.prototype.yr=function(a){if(this.F.j){var b=!this.F.j.paused&&!this.F.j.ended,e=this.F.j.currentTime;this.F.j.pause();this.F.j.src=isNaN(parseInt(a,10))?String(a):this.F.src[parseInt(a,10)];b&&(this.F.j.onloadedmetadata=function(){this.currentTime=e;this.play();this.onloadedmetadata=null});this.F.j.currentTime=e}};
c.prototype.Zo=function(){this.Pm=!0};return c}();r.f=d})(ggP2VR||(ggP2VR={}));window.ggHasHtml5Css3D=Eh;window.ggHasWebGL=Fh;window.pano2vrPlayer=ggP2VR.f;ggP2VR.f.prototype.getVersion=ggP2VR.f.prototype.jm;ggP2VR.f.prototype.readConfigString=ggP2VR.f.prototype.vk;ggP2VR.f.prototype.readConfigUrl=ggP2VR.f.prototype.bn;ggP2VR.f.prototype.readConfigUrlAsync=ggP2VR.f.prototype.Tq;ggP2VR.f.prototype.readConfigXml=ggP2VR.f.prototype.cn;ggP2VR.f.prototype.openUrl=ggP2VR.f.prototype.rk;
ggP2VR.f.prototype.openNext=ggP2VR.f.prototype.$c;ggP2VR.f.prototype.goBack=ggP2VR.f.prototype.Zp;ggP2VR.f.prototype.setMargins=ggP2VR.f.prototype.gr;ggP2VR.f.prototype.addListener=ggP2VR.f.prototype.addListener;ggP2VR.f.prototype.on=ggP2VR.f.prototype.addListener;ggP2VR.f.prototype.removeEventListener=ggP2VR.f.prototype.removeEventListener;ggP2VR.f.prototype.off=ggP2VR.f.prototype.removeEventListener;ggP2VR.f.prototype.detectBrowser=ggP2VR.f.prototype.Bl;ggP2VR.f.prototype.initWebGL=ggP2VR.f.prototype.Xc;
ggP2VR.f.prototype.getPercentLoaded=ggP2VR.f.prototype.Ip;ggP2VR.f.prototype.setBasePath=ggP2VR.f.prototype.cr;ggP2VR.f.prototype.getBasePath=ggP2VR.f.prototype.Ul;ggP2VR.f.prototype.setViewerSize=ggP2VR.f.prototype.xn;ggP2VR.f.prototype.getViewerSize=ggP2VR.f.prototype.Wp;ggP2VR.f.prototype.setSkinObject=ggP2VR.f.prototype.sr;ggP2VR.f.prototype.changeViewMode=ggP2VR.f.prototype.Lo;ggP2VR.f.prototype.getViewMode=ggP2VR.f.prototype.Up;ggP2VR.f.prototype.changePolygonMode=ggP2VR.f.prototype.ol;
ggP2VR.f.prototype.setPolygonMode=ggP2VR.f.prototype.ol;ggP2VR.f.prototype.getPolygonMode=ggP2VR.f.prototype.Kp;ggP2VR.f.prototype.showOnePolyHotspot=ggP2VR.f.prototype.zn;ggP2VR.f.prototype.hideOnePolyHotspot=ggP2VR.f.prototype.qm;ggP2VR.f.prototype.changePolyHotspotColor=ggP2VR.f.prototype.Jo;ggP2VR.f.prototype.toggleOnePolyHotspot=ggP2VR.f.prototype.Sr;ggP2VR.f.prototype.changeViewState=ggP2VR.f.prototype.Mo;ggP2VR.f.prototype.getViewState=ggP2VR.f.prototype.Vp;
ggP2VR.f.prototype.setRenderFlags=ggP2VR.f.prototype.kr;ggP2VR.f.prototype.getRenderFlags=ggP2VR.f.prototype.Np;ggP2VR.f.prototype.setMaxTileCount=ggP2VR.f.prototype.vn;ggP2VR.f.prototype.getVFov=ggP2VR.f.prototype.Sb;ggP2VR.f.prototype.setVFov=ggP2VR.f.prototype.Ui;ggP2VR.f.prototype.getHFov=ggP2VR.f.prototype.kp;ggP2VR.f.prototype.updatePanorama=ggP2VR.f.prototype.Ch;ggP2VR.f.prototype.isTouching=ggP2VR.f.prototype.Bm;ggP2VR.f.prototype.getIsMobile=ggP2VR.f.prototype.pp;
ggP2VR.f.prototype.setIsMobile=ggP2VR.f.prototype.fr;ggP2VR.f.prototype.getIsTour=ggP2VR.f.prototype.qp;ggP2VR.f.prototype.getIsAutorotating=ggP2VR.f.prototype.mp;ggP2VR.f.prototype.getIsLoading=ggP2VR.f.prototype.op;ggP2VR.f.prototype.getIsLoaded=ggP2VR.f.prototype.ei;ggP2VR.f.prototype.getIsTileLoading=ggP2VR.f.prototype.Xl;ggP2VR.f.prototype.getLastActivity=ggP2VR.f.prototype.rp;ggP2VR.f.prototype.getPan=ggP2VR.f.prototype.Hg;ggP2VR.f.prototype.getPanNorth=ggP2VR.f.prototype.Ge;
ggP2VR.f.prototype.getPanDest=ggP2VR.f.prototype.Hp;ggP2VR.f.prototype.getPanN=ggP2VR.f.prototype.bm;ggP2VR.f.prototype.setPan=ggP2VR.f.prototype.Xe;ggP2VR.f.prototype.setPanNorth=ggP2VR.f.prototype.Dk;ggP2VR.f.prototype.changePan=ggP2VR.f.prototype.nl;ggP2VR.f.prototype.changePanLog=ggP2VR.f.prototype.Io;ggP2VR.f.prototype.getTilt=ggP2VR.f.prototype.gi;ggP2VR.f.prototype.getTiltDest=ggP2VR.f.prototype.Op;ggP2VR.f.prototype.setTilt=ggP2VR.f.prototype.Ye;ggP2VR.f.prototype.changeTilt=ggP2VR.f.prototype.pl;
ggP2VR.f.prototype.changeTiltLog=ggP2VR.f.prototype.Ko;ggP2VR.f.prototype.getFov=ggP2VR.f.prototype.Tj;ggP2VR.f.prototype.getFovDest=ggP2VR.f.prototype.ip;ggP2VR.f.prototype.setFov=ggP2VR.f.prototype.We;ggP2VR.f.prototype.changeFov=ggP2VR.f.prototype.ml;ggP2VR.f.prototype.changeFovLog=ggP2VR.f.prototype.wj;ggP2VR.f.prototype.getRoll=ggP2VR.f.prototype.fm;ggP2VR.f.prototype.setRoll=ggP2VR.f.prototype.Si;ggP2VR.f.prototype.setPanTilt=ggP2VR.f.prototype.ir;ggP2VR.f.prototype.setPanTiltFov=ggP2VR.f.prototype.Ri;
ggP2VR.f.prototype.setDefaultView=ggP2VR.f.prototype.dr;ggP2VR.f.prototype.setLocked=ggP2VR.f.prototype.setLocked;ggP2VR.f.prototype.setLockedMouse=ggP2VR.f.prototype.tn;ggP2VR.f.prototype.setLockedKeyboard=ggP2VR.f.prototype.sn;ggP2VR.f.prototype.getLockedKeyboard=ggP2VR.f.prototype.tp;ggP2VR.f.prototype.setLockedWheel=ggP2VR.f.prototype.un;ggP2VR.f.prototype.moveTo=ggP2VR.f.prototype.moveTo;ggP2VR.f.prototype.moveToEx=ggP2VR.f.prototype.Bi;ggP2VR.f.prototype.moveToDefaultView=ggP2VR.f.prototype.sq;
ggP2VR.f.prototype.moveToDefaultViewEx=ggP2VR.f.prototype.tq;ggP2VR.f.prototype.addHotspotElements=ggP2VR.f.prototype.dl;ggP2VR.f.prototype.playSound=ggP2VR.f.prototype.fe;ggP2VR.f.prototype.playPauseSound=ggP2VR.f.prototype.Zm;ggP2VR.f.prototype.playStopSound=ggP2VR.f.prototype.Rq;ggP2VR.f.prototype.pauseSound=ggP2VR.f.prototype.sk;ggP2VR.f.prototype.activateSound=ggP2VR.f.prototype.so;ggP2VR.f.prototype.soundGetTime=ggP2VR.f.prototype.Dr;ggP2VR.f.prototype.soundSetTime=ggP2VR.f.prototype.Er;
ggP2VR.f.prototype.setMediaVisibility=ggP2VR.f.prototype.hr;ggP2VR.f.prototype.isPlaying=ggP2VR.f.prototype.isPlaying;ggP2VR.f.prototype.stopSound=ggP2VR.f.prototype.Yi;ggP2VR.f.prototype.setVolume=ggP2VR.f.prototype.setVolume;ggP2VR.f.prototype.changeVolume=ggP2VR.f.prototype.No;ggP2VR.f.prototype.removeHotspots=ggP2VR.f.prototype.hn;ggP2VR.f.prototype.getHotspotsVisible=ggP2VR.f.prototype.Vl;ggP2VR.f.prototype.getCurrentPerspective=ggP2VR.f.prototype.nd;ggP2VR.f.prototype.addHotspot=ggP2VR.f.prototype.uo;
ggP2VR.f.prototype.updateHotspot=ggP2VR.f.prototype.$r;ggP2VR.f.prototype.removeHotspot=ggP2VR.f.prototype.Uq;ggP2VR.f.prototype.setActiveHotspot=ggP2VR.f.prototype.Uf;ggP2VR.f.prototype.getPointHotspotIds=ggP2VR.f.prototype.Jp;ggP2VR.f.prototype.getHotspot=ggP2VR.f.prototype.lp;ggP2VR.f.prototype.setFullscreen=ggP2VR.f.prototype.Vf;ggP2VR.f.prototype.toggleFullscreen=ggP2VR.f.prototype.ej;ggP2VR.f.prototype.enterFullscreen=ggP2VR.f.prototype.$o;ggP2VR.f.prototype.exitFullscreen=ggP2VR.f.prototype.exitFullscreen;
ggP2VR.f.prototype.getIsFullscreen=ggP2VR.f.prototype.np;ggP2VR.f.prototype.startAutorotate=ggP2VR.f.prototype.Ir;ggP2VR.f.prototype.stopAutorotate=ggP2VR.f.prototype.Lr;ggP2VR.f.prototype.toggleAutorotate=ggP2VR.f.prototype.Rr;ggP2VR.f.prototype.setAutorotateNodeFilter=ggP2VR.f.prototype.br;ggP2VR.f.prototype.startAnimation=ggP2VR.f.prototype.Hr;ggP2VR.f.prototype.createLayers=ggP2VR.f.prototype.ul;ggP2VR.f.prototype.removePanorama=ggP2VR.f.prototype.je;ggP2VR.f.prototype.getScreenResolution=ggP2VR.f.prototype.gm;
ggP2VR.f.prototype.getMaxScreenResolution=ggP2VR.f.prototype.$l;ggP2VR.f.prototype.getNodeIds=ggP2VR.f.prototype.Cp;ggP2VR.f.prototype.getNodeUserdata=ggP2VR.f.prototype.Gg;ggP2VR.f.prototype.getNodeLatLng=ggP2VR.f.prototype.Uj;ggP2VR.f.prototype.getNodeTitle=ggP2VR.f.prototype.Fp;ggP2VR.f.prototype.getNodeDistance=ggP2VR.f.prototype.Bp;ggP2VR.f.prototype.getCurrentNode=ggP2VR.f.prototype.Sj;ggP2VR.f.prototype.getNextNode=ggP2VR.f.prototype.Ap;ggP2VR.f.prototype.getPrevNode=ggP2VR.f.prototype.Mp;
ggP2VR.f.prototype.getLastVisitedNode=ggP2VR.f.prototype.sp;ggP2VR.f.prototype.getNodesWithTag=ggP2VR.f.prototype.am;ggP2VR.f.prototype.getCurrentPointHotspots=ggP2VR.f.prototype.hp;ggP2VR.f.prototype.getPositionAngles=ggP2VR.f.prototype.Lp;ggP2VR.f.prototype.getPositionRawAngles=ggP2VR.f.prototype.cm;ggP2VR.f.prototype.nodeVisited=ggP2VR.f.prototype.yq;ggP2VR.f.prototype.clearVisitedNodes=ggP2VR.f.prototype.Ro;ggP2VR.f.prototype.setElementIdPrefix=ggP2VR.f.prototype.er;
ggP2VR.f.prototype.videoPanoPlay=ggP2VR.f.prototype.ls;ggP2VR.f.prototype.videoPanoStop=ggP2VR.f.prototype.ms;ggP2VR.f.prototype.videoPanoPause=ggP2VR.f.prototype.ks;ggP2VR.f.prototype.getVideoPanoTime=ggP2VR.f.prototype.Tp;ggP2VR.f.prototype.setVideoPanoTime=ggP2VR.f.prototype.zr;ggP2VR.f.prototype.getVideoPanoObject=ggP2VR.f.prototype.Sp;ggP2VR.f.prototype.setVideoPanoSource=ggP2VR.f.prototype.yr;ggP2VR.f.prototype.getMediaObject=ggP2VR.f.prototype.yp;ggP2VR.f.prototype.registerVideoElement=ggP2VR.f.prototype.dn;
ggP2VR.f.prototype.disableSoundLoading=ggP2VR.f.prototype.Zo;ggP2VR.f.prototype.setCrossOrigin=ggP2VR.f.prototype.setCrossOrigin;ggP2VR.f.prototype.setProjection=ggP2VR.f.prototype.Lc;ggP2VR.f.prototype.getProjection=ggP2VR.f.prototype.Sa;ggP2VR.f.prototype.changeProjection=ggP2VR.f.prototype.xj;ggP2VR.f.prototype.changeProjectionEx=ggP2VR.f.prototype.xj;ggP2VR.f.prototype.changeLensflares=ggP2VR.f.prototype.Ho;ggP2VR.f.prototype.setTransition=ggP2VR.f.prototype.ur;ggP2VR.f.prototype.getMapType=ggP2VR.f.prototype.xp;
ggP2VR.f.prototype.getMapDetails=ggP2VR.f.prototype.wp;ggP2VR.f.prototype.getNodeMapCoords=ggP2VR.f.prototype.Dp;ggP2VR.f.prototype.getNodeMapCoordsInPercent=ggP2VR.f.prototype.Ep;ggP2VR.f.prototype.getMapContainingNode=ggP2VR.f.prototype.vp;ggP2VR.f.prototype.getMapsContainingNode=ggP2VR.f.prototype.Zl;ggP2VR.f.prototype.getMapIDs=ggP2VR.f.prototype.Yl;ggP2VR.f.prototype.addVariable=ggP2VR.f.prototype.xo;ggP2VR.f.prototype.setVariableOptions=ggP2VR.f.prototype.wn;
ggP2VR.f.prototype.setVariableValue=ggP2VR.f.prototype.ke;ggP2VR.f.prototype.getVariableValue=ggP2VR.f.prototype.Rp;ggP2VR.f.prototype.getGyroAvailable=ggP2VR.f.prototype.jp;ggP2VR.f.prototype.setUseGyro=ggP2VR.f.prototype.wr;ggP2VR.f.prototype.getUseGyro=ggP2VR.f.prototype.Pp;ggP2VR.f.prototype.getOS=ggP2VR.f.prototype.Gp;ggP2VR.f.prototype.getBrowser=ggP2VR.f.prototype.gp;ggP2VR.f.prototype.triggerEvent=ggP2VR.f.prototype.S;ggP2VR.f.prototype.requestRedraw=ggP2VR.f.prototype.Wq;
ggP2VR.f.prototype.getWebGlContext=ggP2VR.f.prototype.Xp;ggP2VR.f.prototype.enterVR=ggP2VR.f.prototype.wg;ggP2VR.f.prototype.exitVR=ggP2VR.f.prototype.sf;ggP2VR.f.prototype.toggleVR=ggP2VR.f.prototype.Ln;ggP2VR.f.prototype.isInVR=ggP2VR.f.prototype.Qg;ggP2VR.f.prototype.hasVR=ggP2VR.f.prototype.ak;ggP2VR.f.prototype.getVRDisplayName=ggP2VR.f.prototype.Qp;ggP2VR.f.prototype.setVRFrameBufferScaleFactor=ggP2VR.f.prototype.xr;