-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpano2vr_player.js
527 lines (526 loc) · 262 KB
/
pano2vr_player.js
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
524
525
526
527
//////////////////////////////////////////////////////////////////////
// Pano2VR 6.1.13/18080 HTML5/CSS3 & WebGL Panorama Player //
// EDU License: Philipps-University Marburg - Institute for Geography //
// (c) 2021, Garden Gnome Software, http://ggnome.com //
//////////////////////////////////////////////////////////////////////
/*
this.useWebVR*/
var ll="function"==typeof Object.defineProperties?Object.defineProperty:function(x,p,m){x!=Array.prototype&&x!=Object.prototype&&(x[p]=m.value)},nl="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this;function ol(x,p){if(p){var m=nl;x=x.split(".");for(var d=0;d<x.length-1;d++){var c=x[d];c in m||(m[c]={});m=m[c]}x=x[x.length-1];d=m[x];p=p(d);p!=d&&null!=p&&ll(m,x,{configurable:!0,writable:!0,value:p})}}var pl;
if("function"==typeof Object.setPrototypeOf)pl=Object.setPrototypeOf;else{var vl;a:{var wl={a:!0},xl={};try{xl.__proto__=wl;vl=xl.a;break a}catch(x){}vl=!1}pl=vl?function(x,p){x.__proto__=p;if(x.__proto__!==p)throw new TypeError(x+" is not extensible");return x}:null}var yl=pl;ol("Object.setPrototypeOf",function(x){return x||yl});
ol("Array.prototype.fill",function(x){return x?x:function(p,m,d){var c=this.length||0;0>m&&(m=Math.max(0,c+m));if(null==d||d>c)d=c;d=Number(d);0>d&&(d=Math.max(0,c+d));for(m=Number(m||0);m<d;m++)this[m]=p;return this}});function zl(x){var p=0;return function(){return p<x.length?{done:!1,value:x[p++]}:{done:!0}}}function Al(){Al=function(){};nl.Symbol||(nl.Symbol=Bl)}function Cl(x,p){this.Jo=x;ll(this,"description",{configurable:!0,writable:!0,value:p})}Cl.prototype.toString=function(){return this.Jo};
var Bl=function(){function x(m){if(this instanceof x)throw new TypeError("Symbol is not a constructor");return new Cl("jscomp_symbol_"+(m||"")+"_"+p++,m)}var p=0;return x}();function Dl(){Al();var x=nl.Symbol.iterator;x||(x=nl.Symbol.iterator=nl.Symbol("Symbol.iterator"));"function"!=typeof Array.prototype[x]&&ll(Array.prototype,x,{configurable:!0,writable:!0,value:function(){return El(zl(this))}});Dl=function(){}}
function El(x){Dl();x={next:x};x[nl.Symbol.iterator]=function(){return this};return x}function Fl(x,p){Dl();x instanceof String&&(x+="");var m=0,d={next:function(){if(m<x.length){var c=m++;return{value:p(c,x[c]),done:!1}}d.next=function(){return{done:!0,value:void 0}};return d.next()}};d[Symbol.iterator]=function(){return d};return d}ol("Array.prototype.keys",function(x){return x?x:function(){return Fl(this,function(p){return p})}});
ol("Object.is",function(x){return x?x:function(p,m){return p===m?0!==p||1/p===1/m:p!==p&&m!==m}});ol("Array.prototype.includes",function(x){return x?x:function(p,m){var d=this;d instanceof String&&(d=String(d));var c=d.length;m=m||0;for(0>m&&(m=Math.max(m+c,0));m<c;m++){var a=d[m];if(a===p||Object.is(a,p))return!0}return!1}});
ol("String.prototype.includes",function(x){return x?x:function(p,m){if(null==this)throw new TypeError("The 'this' value for String.prototype.includes must not be null or undefined");if(p instanceof RegExp)throw new TypeError("First argument to String.prototype.includes must not be a regular expression");return-1!==(this+"").indexOf(p,m||0)}});
var __extends=this&&this.__extends||function(){function x(p,m){x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,c){d.__proto__=c}||function(d,c){for(var a in c)c.hasOwnProperty(a)&&(d[a]=c[a])};return x(p,m)}return function(p,m){function d(){this.constructor=p}x(p,m);p.prototype=null===m?Object.create(m):(d.prototype=m.prototype,new d)}}();
function Gl(){var x="perspective",p=["Webkit","Moz","O","ms","Ms"],m;for(m=0;m<p.length;m++)"undefined"!==typeof document.documentElement.style[p[m]+"Perspective"]&&(x=p[m]+"Perspective");"undefined"!==typeof document.documentElement.style[x]?"webkitPerspective"in document.documentElement.style?(x=document.createElement("style"),p=document.createElement("div"),m=document.head||document.getElementsByTagName("head")[0],x.textContent="@media (-webkit-transform-3d) {#ggswhtml5{height:5px}}",m.appendChild(x),
p.id="ggswhtml5",document.documentElement.appendChild(p),m=5===p.offsetHeight,x.parentNode.removeChild(x),p.parentNode.removeChild(p)):m=!0:m=!1;return m}function Hl(){var x;if(x=!!window.WebGLRenderingContext)try{var p=document.createElement("canvas");p.width=100;p.height=100;var m=p.getContext("webgl");m||(m=p.getContext("experimental-webgl"));x=!!m}catch(d){x=!1}return x}var ggP2VR;
(function(x){var p=function(){function d(c){this.m=null;this.Xg=this.Jm=this.qb=!1;this.mb=!0;this.ob=this.La=this.Fa=0;this.fov=70;this.ib=0;this.autoplay=this.bh=!1;this.id="";this.v=this.pan=0;this.m=c;this.Ac=this.Vb=100;this.Kc=1}d.prototype.$b=function(c){var a;if(a=c.getAttributeNode("id"))this.id=a.nodeValue.toString();if(a=c.getAttributeNode("pan"))this.pan=Number(a.nodeValue);if(a=c.getAttributeNode("tilt"))this.v=Number(a.nodeValue)};d.prototype.wo=function(c){var a="",b=this.m,e=!0;if(b.Qf){var f=
new x.Ga(0,0,-100);f.Fa(-this.v*Math.PI/180);f.La(this.pan*Math.PI/180);f.La(-b.pan.j*Math.PI/180);f.Fa(b.v.j*Math.PI/180);f.ob(b.U.j*Math.PI/180);.01<=f.z&&(e=!1)}b.Sc&&(a+="perspective("+c+"px) ");a=a+("translate3d(0px,0px,"+c+"px) ")+("rotateZ("+b.U.j.toFixed(10)+"deg) ");a+="rotateX("+b.v.j.toFixed(10)+"deg) ";a+="rotateY("+(-b.pan.j).toFixed(10)+"deg) ";a+="rotateY("+this.pan.toFixed(10)+"deg) ";a+="rotateX("+(-this.v).toFixed(10)+"deg) ";c=1E4;f=this.f.videoWidth;var g=this.f.videoHeight;if(0==
f||0==g)f=640,g=480;0<this.Vb&&(f=this.Vb);0<this.Ac&&(g=this.Ac);0<f&&0<g&&(this.f.width=f,this.f.height=g,this.f.style.width=f+"px",this.f.style.height=g+"px");0<this.fov&&(c=f/(2*Math.tan(this.fov/2*Math.PI/180)));a+="translate3d(0px,0px,"+(-c).toFixed(10)+"px) ";a+="rotateZ("+this.ob.toFixed(10)+"deg) ";a+="rotateY("+(-this.La).toFixed(10)+"deg) ";a+="rotateX("+this.Fa.toFixed(10)+"deg) ";this.Kc&&1!=this.Kc&&(a+="scaleY("+this.Kc+") ");a+="translate3d("+-f/2+"px,"+-g/2+"px,0px) ";this.f.style[b.Va+
"Origin"]="0% 0%";this.qb&&(a="",1==this.ib&&(a+="scale("+Math.min(b.C.width/f,b.C.height/g)+") "),a+="translate3d("+-f/2+"px,"+-g/2+"px,0px) ");this.Aq!=a&&(this.Aq=a,this.f.style[b.Va]=a,this.f.style.visibility=e&&this.mb?"visible":"hidden",this.Xg&&this.Jm==this.qb&&(this.f.style[b.bd]="all 0s linear 0s"),this.Jm=this.qb)};d.prototype.jg=function(c){this.f&&(this.f.style.visibility=c?"visible":"hidden")};d.prototype.kf=function(){var c=this.m;c.ia?(this.f.style.left=c.C.width/2+"px",this.f.style.top=
c.C.height/2+"px"):(this.f.style.left=c.margin.left+c.C.width/2+"px",this.f.style.top=c.margin.top+c.C.height/2+"px")};return d}();x.Ys=p;var m=function(d){function c(a){a=d.call(this,a)||this;a.xa=!1;a.fo=!1;a.ln=!1;a.og=!1;a.ui=!1;a.Rk=!1;a.Ed=!1;a.wb=null;a.yg=null;a.mj=0;a.$f=0;a.Rc=!1;a.paused=!0;a.ended=!1;a.Qk=!1;a.stopped=!1;a.oj=!1;a.hc=null;a.zf=-1;a.tg=!1;a.url=[];a.loop=0;a.level=1;a.wc=0;a.mode=1;a.vi=10;a.Bb=0;a.ng=0;a.pa=1;a.Vc=0;a.Wc=0;a.Xc=0;a.Yc=0;a.Yf=-1;return a}__extends(c,d);
c.prototype.ro=function(){var a=this,b=a.f.play();if(void 0!==b)b.then(function(){a.vg()})["catch"](function(){a.pa=1;a.f.pause();a.fo&&(a.f.muted=!0,a.f.play())})};c.prototype.ao=function(){this.xa&&this.oj?(this.oj=!1,clearInterval(this.hc),this.hc=null):0==this.loop?this.xa?(this.wb=null,this.Gd()):this.f.play():0<this.xb?(this.xb--,this.xa||(this.f.currentTime=0),this.ui&&(this.Rb&&0==this.Rb.gain.value||0==this.Jb.gain.value&&0==this.Ub.gain.value&&0==this.Sb.gain.value&&0==this.Tb.gain.value)||
(this.xa?(this.wb=null,this.Gd()):this.f.play())):this.xa&&(this.wb=null,this.Rc=!1,this.ended=this.paused=!0,clearInterval(this.hc),this.hc=null,this.m.L("bufferSoundEnded",{id:this.id}))};c.prototype.vg=function(){this.Ed=!1;var a=this.m.ua;a&&(this.xa||(this.source=a.createMediaElementSource(this.f)),2==this.mode||3==this.mode||5==this.mode?(this.od=a.createChannelSplitter(2),this.Jb=a.createGain(),this.Sb=a.createGain(),this.Tb=a.createGain(),this.Ub=a.createGain(),this.Cg=a.createChannelMerger(2),
this.xa?this.wb.connect(this.od):this.source.connect(this.od),this.od.connect(this.Jb,0),this.od.connect(this.Sb,0),this.od.connect(this.Tb,1),this.od.connect(this.Ub,1),this.Jb.connect(this.Cg,0,0),this.Sb.connect(this.Cg,0,1),this.Tb.connect(this.Cg,0,0),this.Ub.connect(this.Cg,0,1),this.Cg.connect(a.destination),1==this.Yf&&this.il()):(this.Rb=a.createGain(),this.xa?this.wb.connect(this.Rb):this.source.connect(this.Rb),this.Rb.connect(a.destination)))};c.prototype.il=function(){1!=this.Yf||this.Ed||
!this.od||2!=this.mode&&3!=this.mode&&5!=this.mode||(this.od.connect(this.Tb,0),this.od.connect(this.Ub,0))};c.prototype.Lh=function(){var a=this.m.ua;this.qb||this.Rk||(this.Jb?(this.Jb.gain.setValueAtTime(this.Vc,a.currentTime),this.Ub.gain.setValueAtTime(this.Yc,a.currentTime),this.Sb.gain.setValueAtTime(this.Wc,a.currentTime),this.Tb.gain.setValueAtTime(this.Xc,a.currentTime)):this.Rb&&this.Rb.gain.setValueAtTime((this.Vc+this.Yc)/2,a.currentTime+1))};c.prototype.zj=function(){if(!this.Ed||4==
this.mode||6==this.mode){var a=this.m,b=this.m.ua;if(this.f||this.xa){var e,f=this.pan-a.pan.j;for(e=this.v-a.v.j;-180>f;)f+=360;for(;180<f;)f-=360;var g=this.wc,h=this.vi;0==h&&(h=.01);0>h&&(h=a.fov.j);this.cc||(this.cc=new x.Ga,this.cc.gm(this.pan,this.v));0!=this.mode&&1!=this.mode||!b||this.Rb&&this.Rb.gain.setValueAtTime(this.level*a.ba*this.pa,b.currentTime);if(2==this.mode&&b){var l=.5*Math.cos(f*Math.PI/180)+.5;this.Vc=Math.sqrt(l)*this.pa*this.level*a.ba;this.Yc=Math.sqrt(l)*this.pa*this.level*
a.ba;this.Wc=Math.sqrt(1-l)*this.pa*this.level*a.ba;this.Xc=Math.sqrt(1-l)*this.pa*this.level*a.ba;this.Lh()}if(3==this.mode){f=0>f?f<-this.Bb?f+this.Bb:0:f>this.Bb?f-this.Bb:0;var k=this.level;e=Math.abs(e);e=e<this.ng?0:e-this.ng;var w=1-e/h;if(Math.abs(f)>h||0>w)l=k*g*a.ba,b?(this.Vc=l*this.pa,this.Yc=l*this.pa,this.Xc=this.Wc=0,this.Lh()):this.f.volume=k*g*a.ba;else if(l=1-Math.abs(f/h),b){var r=k*(g+(1-g)*w*l)*a.ba;l=k*g*a.ba;0<=f?(this.Vc=r*this.pa,this.Yc=l*this.pa):(this.Vc=l*this.pa,this.Yc=
r*this.pa);2*Math.abs(f)<h?(l=1-Math.abs(2*f)/h,r=k*(g+(1-g)*w*l)*a.ba,l=.5*k*(1-g)*w*(1-l)*a.ba,0<=f?(this.Yc=r*this.pa,this.Xc=l*this.pa,this.Wc=0):(this.Vc=r*this.pa,this.Wc=l*this.pa,this.Xc=0)):(l=1-(Math.abs(2*f)-h)/h,r=.5*k*(1-g)*w*l*a.ba,0<=f?(this.Xc=r*this.pa,this.Wc=0):(this.Wc=r*this.pa,this.Xc=0));this.Lh()}else this.f.volume=k*(g+(1-g)*w*l)*a.ba}4==this.mode&&(Math.abs(f)<this.Bb&&Math.abs(e)<this.ng?this.og||(this.og=!0,this.xb=this.loop-1,this.xa?this.Rc||this.Gd():this.f.play()):
this.og=!1);5==this.mode&&(e=180*Math.acos(a.$j.$i(this.cc))/Math.PI,e<this.Bb?b?(this.Vc=this.level*a.ba*this.pa,this.Yc=this.level*a.ba*this.pa,this.Xc=this.Wc=0,this.Lh()):this.f.volume=this.level*a.ba:b?(e<this.Bb+h?(f=0>f?f>-this.Bb?0:f+this.Bb:f<this.Bb?0:f-this.Bb,r=1-Math.max(e-this.Bb,0)/h,l=Math.max(1-Math.abs(f)*Math.cos(this.v*Math.PI/180)/h,0),0<f?(this.Vc=this.level*(r*(1-this.wc)+this.wc)*a.ba*this.pa,this.Yc=this.level*(r*l*(1-this.wc)+this.wc)*a.ba*this.pa,this.Wc=0,this.Xc=this.level*
r*(1-l)*a.ba*this.pa):(this.Vc=this.level*(r*l*(1-this.wc)+this.wc)*a.ba*this.pa,this.Yc=this.level*(r*(1-this.wc)+this.wc)*a.ba*this.pa,this.Wc=this.level*r*(1-l)*a.ba*this.pa,this.Xc=0)):(r=this.level*this.wc*a.ba,this.Vc=r*this.pa,this.Yc=r*this.pa,this.Xc=this.Wc=0),this.Lh()):(e-=this.Bb,e<h&&0<h?(l=1-Math.abs(e/h),this.f.volume=this.level*(g+(1-g)*l)*a.ba):this.f.volume=g*a.ba));6==this.mode&&(e=180*Math.acos(a.$j.$i(this.cc))/Math.PI,Math.abs(e)<this.Bb?this.og||(this.og=!0,this.xb=this.loop-
1,this.xa?this.Rc||this.Gd():this.f.play()):this.og=!1)}}};c.prototype.Rl=function(){var a=this;a.wb=this.m.ua.createBufferSource();a.wb.addEventListener("ended",function(){a.ao()},!1);a.Ed||(2==a.mode||3==a.mode||5==a.mode?a.wb.connect(a.od):a.wb.connect(a.Rb))};c.prototype.zr=function(a){var b=this,e=this.m.ua;b.Rl();this.m.N("createBufferSoundSource()");e.decodeAudioData(a,function(f){b.Yf=f.numberOfChannels;1==b.Yf&&b.il();b.yg=f;b.wb.buffer=f;b.m.N("audio Data decoded");b.Qk&&(b.Gd(),b.Qk=!1)})};
c.prototype.Gd=function(){var a=this.m.ua,b=this.$f;if(this.yg){null==this.wb&&(this.Rl(),this.wb.buffer=this.yg);this.mj=a.currentTime-b;this.$f=0;this.zf=-1;this.Rc=!0;this.ended=this.oj=this.stopped=this.paused=!1;this.Ed&&this.vg();try{this.wb.start(0,b),this.m.L("bufferSoundPlay",{id:this.id}),this.hc&&(clearInterval(this.hc),this.hc=null),this.hc=setInterval(function(e){return function(){e.m.L("bufferSoundTimeupdate",{id:e.id,time:e.uf()})}}(this),50)}catch(e){this.m.N(e),clearInterval(this.hc),
this.hc=null}this.m.N("buffer Source started")}else this.m.N("bufferSoundPlay() -> no audio buffer -> playWhenReady"),this.Qk=!0};c.prototype.Nj=function(){var a=this.m.ua.currentTime-this.mj;this.vf();this.stopped=!1;this.$f=a;this.paused=!0;this.m.L("bufferSoundPause",{id:this.id});this.m.L("bufferSoundTimeupdate",{id:this.id,time:this.uf()})};c.prototype.vf=function(){this.wb&&this.Rc&&(this.oj=!0,this.wb.disconnect(),this.wb.stop(0),this.wb=null);this.mj=this.$f=0;this.zf=-1;this.ended=this.paused=
this.Rc=!1;this.stopped=!0;clearInterval(this.hc);this.hc=null;this.m.L("bufferSoundStop",{id:this.id});this.m.L("bufferSoundTimeupdate",{id:this.id,time:this.uf()})};c.prototype.uf=function(){var a=this.m.ua;if(-1<this.zf)return this.zf;if(this.ended)return this.ki();if(!this.stopped){if(this.paused)return this.$f;if(this.Rc)return a.currentTime-this.mj}return 0};c.prototype.ki=function(){return this.yg?this.yg.duration:1};c.prototype.Jl=function(a){var b=this.Rc;this.tg=this.tg||this.Rc;b&&this.vf();
this.$f=a;this.paused=!0;this.ended=this.stopped=this.Rc=!1;this.zf=-1;this.tg?(this.Gd(),this.tg=!1):this.m.L("bufferSoundTimeupdate",{id:this.id,time:a});this.tg=!1};c.prototype.hp=function(a){this.Rc&&(this.tg=!0,this.vf());this.zf=a;this.m.L("bufferSoundTimeupdate",{id:this.id,time:this.uf()})};c.prototype.addElement=function(){var a=-1,b=this,e=this.m,f=this.m.ua;try{for(var g=!1,h=0;h<e.X.length;h++)e.X[h].id==b.id&&(a=h,null==e.X[h].f&&!e.X[h].xa||e.X[h].url.join()!=b.url.join()||e.X[h].loop!=
b.loop||e.X[h].mode!=b.mode||(g=!0,e.X[h].pan=b.pan,e.X[h].v=b.v,e.X[h].level=b.level,e.X[h].wc=b.wc,e.X[h].vi=b.vi,e.X[h].Bb=b.Bb,e.X[h].ng=b.ng));if(g)e.N("Keep playing "+b.id);else{if(0<=a){var l=e.X[a];if(null!=l.f||l.xa)if(f&&e.Ia.enabled)e.Ia.Th.push(l),1!=e.J.sa&&2!=e.J.sa&&6!=e.J.sa&&e.Ia.cm(l);else{try{l.xa?l.Nj():l.f.pause()}catch(r){e.N(r)}try{l.We()}catch(r){e.N(r)}}}f&&(this.Ed=!0);if(f&&(e.ed||e.lc)){if(0<b.url.length){b.xa=!0;var k=new XMLHttpRequest;k.open("GET",e.eb(b.url[0]),!0);
k.responseType="arraybuffer";k.onload=function(){b.zr(k.response)};k.send();b.ui=!1}}else{b.f=document.createElement("audio");b.f.crossOrigin=e.crossOrigin;b.f.setAttribute("class","ggmedia");e.Mf&&b.f.setAttribute("id",e.Mf+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.eb(b.url[h])),b.f.appendChild(g));b.f.volume=b.level*e.ba;if(0<b.f.childNodes.length&&(e.$.appendChild(b.f),b.f.addEventListener("ended",
function(){b.ao()},!1),f)){b.ui=!1;0==b.loop&&b.source&&b.source.mediaElement&&(b.source.mediaElement.loop=!0);var w=new XMLHttpRequest;w.open("GET",e.eb(b.url[0]),!0);w.responseType="arraybuffer";w.onload=function(){f.decodeAudioData(w.response,function(r){b.Yf=r.numberOfChannels;1==b.Yf&&b.il()})};w.send()}}1<=b.loop&&(b.xb=b.loop-1);0<=a?e.X[a]=b:e.X.push(b);b.zj()}}catch(r){this.m.N(r)}};c.prototype.We=function(){try{this.m.N("Remove Snd:"+this.id),this.xa?(clearInterval(this.hc),this.hc=null):
(this.m.$.removeChild(this.f),this.f=null)}catch(a){this.m.N(a)}};c.prototype.$b=function(a){d.prototype.$b.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.ln=1==Number(b.nodeValue);if(b=a.getAttributeNode("field"))this.vi=Number(b.nodeValue);
if(b=a.getAttributeNode("ambientlevel"))this.wc=Number(b.nodeValue);if(b=a.getAttributeNode("pansize"))this.Bb=Number(b.nodeValue);if(b=a.getAttributeNode("tiltsize"))this.ng=Number(b.nodeValue);for(a=a.firstChild;a;)"source"==a.nodeName&&(b=a.getAttributeNode("url"))&&this.url.push(b.nodeValue.toString()),a=a.nextSibling};return c}(p);x.zl=m;m=function(d){function c(a){a=d.call(this,a)||this;a.poster="";a.Fa=0;a.La=0;a.ob=0;a.fov=50;a.ib=0;a.bh=!1;a.hd=!1;return a}__extends(c,d);c.prototype.Le=function(){1!=
this.ib&&4!=this.ib||this.Zg(!this.qb);2==this.ib&&this.m.vn(this.id)};c.prototype.Zg=function(a){var b=this.m,e=b.ua;if(1==this.ib||4==this.ib)if(this.qb=a,this.m.Pb)(b=b.ra)&&b.activateSound(this.id,this.qb?1:0);else{if(this.qb)this.f.style.pointerEvents="auto",this.f.style.cursor="pointer",this.f.style.zIndex=(b.bi+8E4).toString(),this.f.style[this.m.bd]="all 1s ease 0s",this.m.isPlaying(this.id)||b.Ue(this.id);else{this.f.style.pointerEvents="none";this.f.style.cursor="default";this.f.style.zIndex=
b.bi.toString();this.f.style[this.m.bd]="all 1s ease 0s";this.m.isPlaying(this.id)&&b.nj(this.id);this.Rk=!0;var f=this;setTimeout(function(){f.Rk=!1},1E3)}if(e&&(2==this.mode||3==this.mode||5==this.mode)&&(e=e.currentTime,this.Jb&&this.Ub&&this.Sb.gain&&this.Sb&&this.Tb)){var g=this.Jb.gain.value,h=this.Ub.gain.value,l=this.Sb.gain.value,k=this.Tb.gain.value;this.qb?(this.Jb.gain.linearRampToValueAtTime(g,e),this.Jb.gain.linearRampToValueAtTime(this.level*b.ba,e+1),this.Ub.gain.linearRampToValueAtTime(h,
e),this.Ub.gain.linearRampToValueAtTime(this.level*b.ba,e+1),this.Sb.gain.linearRampToValueAtTime(l,e),this.Sb.gain.linearRampToValueAtTime(0,e+1),this.Tb.gain.linearRampToValueAtTime(k,e),this.Tb.gain.linearRampToValueAtTime(0,e+1)):(this.Jb.gain.linearRampToValueAtTime(g,e),this.Jb.gain.linearRampToValueAtTime(this.Vc,e+1),this.Ub.gain.linearRampToValueAtTime(h,e),this.Ub.gain.linearRampToValueAtTime(this.Yc,e+1),this.Sb.gain.linearRampToValueAtTime(l,e),this.Sb.gain.linearRampToValueAtTime(this.Wc,
e+1),this.Tb.gain.linearRampToValueAtTime(k,e),this.Tb.gain.linearRampToValueAtTime(this.Xc,e+1))}this.Xg=!0;this.m.xo()}2==this.ib&&(a?this.m.Ue(this.id):this.m.Pk(this.id))};c.prototype.$g=function(){this.Xg=!1;this.f.style[this.m.bd]="none"};c.prototype.Ps=function(){0==this.loop?this.f.play():0<this.xb?(this.xb--,this.f.currentTime=0,this.f.play()):this.isRunning=!1};c.prototype.$b=function(a){d.prototype.$b.call(this,a);var b;if(b=a.getAttributeNode("poster"))this.poster=String(b.nodeValue);
if(b=a.getAttributeNode("maskimage"))this.gd=String(b.nodeValue);if(b=a.getAttributeNode("rotx"))this.Fa=Number(b.nodeValue);if(b=a.getAttributeNode("roty"))this.La=Number(b.nodeValue);if(b=a.getAttributeNode("rotz"))this.ob=Number(b.nodeValue);if(b=a.getAttributeNode("fov"))this.fov=Number(b.nodeValue);if(b=a.getAttributeNode("width"))this.Vb=Number(b.nodeValue);if(b=a.getAttributeNode("height"))this.Ac=Number(b.nodeValue);this.Kc=(b=a.getAttributeNode("stretch"))?Number(b.nodeValue):1;if(b=a.getAttributeNode("clickmode"))this.ib=
Number(b.nodeValue);if(b=a.getAttributeNode("handcursor"))this.bh=1==Number(b.nodeValue);if(b=a.getAttributeNode("startmutedmobile"))this.fo=1==Number(b.nodeValue)};c.prototype.addElement=function(){var a=this,b=this.m,e=this.m.ua;try{a.f=document.createElement("video");a.f.setAttribute("class","ggmedia");a.f.crossOrigin=b.crossOrigin;a.f.hidden=!0;a.f.addEventListener("click",function(h){h.stopPropagation()});b.Mf&&a.f.setAttribute("id",b.Mf+a.id);if(b.Yh)a.f.setAttribute("playsinline","playsinline"),
a.f.setAttribute("style","display: none; max-width:none;");else if(a.f.setAttribute("style","max-width:none;pointer-events:none;"),a.f.setAttribute("playsinline","playsinline"),1==a.ib||4==a.ib)a.f.addEventListener(b.Go(),function(){a.$g()},!1),a.f.addEventListener("transitionend",function(){a.$g()},!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.eb(a.url[f]));a.f.appendChild(g)}""!=a.poster&&(a.f.poster=
b.eb(a.poster),0>a.loop&&(a.f.preload="none"));a.gd&&""!=a.gd&&(a.f.style.gd="url('"+b.eb(a.gd)+"')",a.f.style.webkitMaskImage="url('"+b.eb(a.gd)+"')",a.f.style.maskSize="100% 100%",a.f.style.webkitMaskSize="100% 100%");a.f.volume=a.level*b.ba;1<=a.loop&&(a.xb=a.loop-1);e&&(this.Ed=!0);(1==a.mode||2==a.mode||3==a.mode||5==a.mode)&&0<=a.loop&&(a.f.autoplay=!0,a.isRunning=!0,a.autoplay=!0,a.ro());b.S.push(this);b.Yh?b.$.appendChild(a.f):(a.f.style.position="absolute",b.Oe&&(a.Vb/=2,a.Ac/=2),a.Vb&&(a.f.width=
a.Vb),a.Ac&&(a.f.height=a.Ac),b.M.appendChild(a.f));a.f.addEventListener("ended",function(){a.Ps()},!1)}catch(h){b.N(h)}};c.prototype.registerElement=function(a,b){this.hd=!0;this.f=b;this.id=a;this.level=1;this.m.S.push(this)};c.prototype.We=function(){var a=this.m;a.Yh&&(a.R.deleteTexture(this.texture),this.texture=0,a.$.removeChild(this.f));a.yo&&a.M.removeChild(this.f);this.f=null};return c}(m);x.Al=m;m=function(d){function c(a){a=d.call(this,a)||this;a.url="";a.Fa=0;a.La=0;a.ob=0;a.fov=50;a.ib=
0;a.bh=!1;a.Vb=100;a.Ac=100;a.Kc=1;return a}__extends(c,d);c.prototype.$b=function(a){d.prototype.$b.call(this,a);var b;if(b=a.getAttributeNode("url"))this.url=b.nodeValue.toString();if(b=a.getAttributeNode("maskimage"))this.gd=String(b.nodeValue);if(b=a.getAttributeNode("rotx"))this.Fa=Number(b.nodeValue);if(b=a.getAttributeNode("roty"))this.La=Number(b.nodeValue);if(b=a.getAttributeNode("rotz"))this.ob=Number(b.nodeValue);if(b=a.getAttributeNode("fov"))this.fov=Number(b.nodeValue);if(b=a.getAttributeNode("width"))this.Vb=
Number(b.nodeValue);if(b=a.getAttributeNode("height"))this.Ac=Number(b.nodeValue);this.Kc=(b=a.getAttributeNode("stretch"))?Number(b.nodeValue):1;if(b=a.getAttributeNode("clickmode"))this.ib=Number(b.nodeValue);if(b=a.getAttributeNode("handcursor"))this.bh=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.$g=function(){this.Xg=!1;this.f.style[this.m.bd]="none"};c.prototype.Le=function(){1!==
this.ib&&4!==this.ib||this.Zg(!this.qb)};c.prototype.Zg=function(a){var b=this.m;if(1===this.ib||4===this.ib)this.qb=a,this.m.Pb?(a=this.m.ra)&&a.activateSound(this.id,this.qb?1:0):(this.qb?(this.f.style.pointerEvents="auto",this.f.style.cursor="pointer",this.f.style.zIndex=(b.bi+8E4).toString()):(this.f.style.pointerEvents="none",this.f.style.cursor="default",this.f.style.zIndex=b.bi.toString()),this.f.style[b.bd]="all 1s ease 0s",this.Xg=!0,b.to())};c.prototype.addElement=function(){var a=this,
b=this.m;try{a.f=document.createElement("img");a.f.setAttribute("style","-webkit-user-drag:none; max-width:none; pointer-events:none;");a.f.setAttribute("class","ggmedia");a.f.hidden=!0;a.f.addEventListener("click",function(e){e.stopPropagation()});b.Mf&&a.f.setAttribute("id",b.Mf+a.id);a.f.ondragstart=function(){return!1};if(1===a.ib||4===a.ib)a.f.addEventListener(b.Go(),function(){a.$g()},!1),a.f.addEventListener("transitionend",function(){a.$g()},!1);a.f.setAttribute("src",b.eb(a.url));a.Vb&&(a.f.width=
a.Vb);a.Ac&&(a.f.height=a.Ac);b.fb.push(a);a.f.style.position="absolute";a.gd&&""!=a.gd&&(a.f.style.gd="url('"+b.eb(a.gd)+"')",a.f.style.webkitMaskImage="url('"+b.eb(a.gd)+"')",a.f.style.maskSize="100% 100%",a.f.style.webkitMaskSize="100% 100%");b.M.appendChild(a.f)}catch(e){b.N("Error addimage:"+e)}};c.prototype.We=function(){this.m.M.removeChild(this.f);this.f=null};return c}(p);x.Qo=m;p=function(d){function c(a){a=d.call(this,a)||this;a.Il=50;a.alpha=50;a.type=0;a.color=16777215;return a}__extends(c,
d);c.prototype.$b=function(a){d.prototype.$b.call(this,a);var b;if(b=a.getAttributeNode("blinding"))this.Il=Number(b.nodeValue);if(b=a.getAttributeNode("alpha"))this.alpha=Number(b.nodeValue);if(b=a.getAttributeNode("type"))this.type=Number(b.nodeValue);if(b=a.getAttributeNode("color"))this.color=1*Number(b.nodeValue)};return c}(p);x.Ro=p;p=function(){function d(c){this.m=c;this.type="empty";this.cl=this.id=this.target=this.description=this.title=this.url="";this.w=100;this.h=20;this.Dj=!1;this.f=
null;this.Cb=this.Zb=this.hb=this.va=this.distance=this.v=this.pan=0;this.visible=!0;this.gc=c.H.gc;this.ec=c.H.ec;this.fc=c.H.fc;this.dc=c.H.dc;this.Jf=c.H.Jf;this.ad="";this.Hd=this.De=0;this.pg=!1;this.si=0;this.vertices=[]}d.prototype.Df=function(){this.id=this.id;this.pan=this.pan;this.tilt=this.v;this.url=this.url;this.target=this.target;this.title=this.title;this.distance=this.distance;this.description=this.description;this.skinid=this.cl;this.obj=this.f;this.customimage=this.ad;this.customimagewidth=
this.De;this.customimageheight=this.Hd;this.use3D=this.pg;this.distance3D=this.si;this.f&&this.f.__div&&(this.div=this.f.__div)};d.prototype.us=function(){var c=this.url;return"{"==c.charAt(0)?c.substr(1,c.length-2):!1};d.prototype.$b=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.cl=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.Dj=1==Number(a.nodeValue);a=c.getAttributeNode("pan");this.pan=1*(a?Number(a.nodeValue):0);a=c.getAttributeNode("tilt");this.v=1*(a?Number(a.nodeValue):0);a=c.getAttributeNode("fov");this.fov=
1*(a?Number(a.nodeValue):0);a=c.getAttributeNode("distance");this.distance=1*(a?Number(a.nodeValue):0);if(a=c.getAttributeNode("bordercolor"))this.gc=1*Number(a.nodeValue);if(a=c.getAttributeNode("backgroundcolor"))this.ec=1*Number(a.nodeValue);if(a=c.getAttributeNode("borderalpha"))this.fc=1*Number(a.nodeValue);if(a=c.getAttributeNode("backgroundalpha"))this.dc=1*Number(a.nodeValue);if(a=c.getAttributeNode("handcursor"))this.Jf=1==Number(a.nodeValue);if(a=c.getAttributeNode("customimage"))this.ad=
this.m.qm()+a.nodeValue;if(a=c.getAttributeNode("customimagewidth"))this.De=Number(a.nodeValue);if(a=c.getAttributeNode("customimageheight"))this.Hd=Number(a.nodeValue);if(a=c.getAttributeNode("use3D"))this.pg=1==Number(a.nodeValue);if(a=c.getAttributeNode("distance3D"))this.si=Number(a.nodeValue);for(c=c.firstChild;c;){if("polystring"==c.nodeName){a=c.textContent.toString().split("|");for(var b=0;b<a.length;b++){var e=a[b].split("/");if(2==e.length){var f={pan:0,v:0};f.pan=Number(e[0]);f.v=Number(e[1]);
this.vertices.push(f)}}}"vertex"==c.nodeName&&(f={pan:0,v:0},a=c.getAttributeNode("pan"),f.pan=1*(a?Number(a.nodeValue):0),a=c.getAttributeNode("tilt"),f.v=1*(a?Number(a.nodeValue):0),this.vertices.push(f));c=c.nextSibling}this.Df()};return d}();x.ei=p})(ggP2VR||(ggP2VR={}));
(function(x){var p=function(){function m(d,c){this.x=d;this.y=c}m.prototype.init=function(d,c){this.x=d;this.y=c};m.prototype.Ld=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.gp=function(d,c,a,b,e){var f=new m;f.Ld(d,a,e);d=new m;d.Ld(a,b,e);a=new m;a.Ld(b,c,e);c=new m;c.Ld(f,d,e);f=new m;f.Ld(d,a,e);d=new m;d.Ld(c,f,e);this.x=d.x;this.y=d.y};m.prototype.Lj=function(d,c,a,b,e){var f=new m,g=.5,h=.25;do{f.gp(d,c,a,b,g);var l=f.x-e;g=0<l?g-h:g+h;h/=2}while(.01<Math.abs(l));
this.x=f.x;this.y=f.y};return m}();x.Ic=p})(ggP2VR||(ggP2VR={}));
(function(x){var p=function(){function m(d,c,a,b,e){this.x=d;this.y=c;this.z=a;this.Dd=b;this.cc=e}m.prototype.init=function(d,c,a,b,e){this.x=d;this.y=c;this.z=a;this.Dd=b;this.cc=e};m.prototype.toString=function(){return"("+this.x+","+this.y+","+this.z+") - ("+this.Dd+","+this.cc+")"};m.prototype.Fa=function(d){var c=Math.sin(d);d=Math.cos(d);var a=this.y,b=this.z;this.y=d*a-c*b;this.z=c*a+d*b};m.prototype.Fr=function(){var d=this.y;this.y=-this.z;this.z=d};m.prototype.Er=function(){var d=this.y;
this.y=this.z;this.z=-d};m.prototype.La=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.Gr=function(){var d=this.x;this.x=-this.z;this.z=d};m.prototype.ob=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.Jn=function(){var d=this.x;this.x=-this.y;this.y=d};m.prototype.Sd=function(d){this.Fa(d*Math.PI/180)};m.prototype.Ye=function(d){this.La(d*Math.PI/180)};m.prototype.Ze=function(d){this.ob(d*
Math.PI/180)};m.prototype.clone=function(){return new m(this.x,this.y,this.z,this.Dd,this.cc)};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.$i=function(d){return this.x*d.x+this.y*d.y+this.z*d.z};m.prototype.gm=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.bp=function(){return 180*Math.atan2(-this.x,-this.z)/Math.PI};m.prototype.cp=function(){return 180*Math.asin(this.y/this.length())/Math.PI};m.prototype.Ld=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.Dd=d.Dd*a+c.Dd*(1-a);this.cc=d.cc*a+c.cc*(1-a)};return m}();x.Ga=p})(ggP2VR||(ggP2VR={}));
(function(x){var p=function(){function m(){this.Pn()}m.prototype.Pn=function(){this.nc=1;this.Bc=this.oc=this.Mb=0;this.pc=1;this.qc=this.Wb=this.Cc=0;this.Xb=1};m.prototype.clone=function(d){this.nc=d.nc;this.Mb=d.Mb;this.oc=d.oc;this.Bc=d.Bc;this.pc=d.pc;this.Cc=d.Cc;this.Wb=d.Wb;this.qc=d.qc;this.Xb=d.Xb};m.prototype.Vr=function(d){var c=Math.cos(d);d=Math.sin(d);this.nc=1;this.Bc=this.oc=this.Mb=0;this.pc=c;this.Cc=-d;this.Wb=0;this.qc=d;this.Xb=c};m.prototype.Wr=function(d){var c=Math.cos(d);
d=Math.sin(d);this.nc=c;this.Mb=0;this.oc=d;this.Bc=0;this.pc=1;this.Cc=0;this.Wb=-d;this.qc=0;this.Xb=c};m.prototype.Xr=function(d){var c=Math.cos(d);d=Math.sin(d);this.nc=c;this.Mb=-d;this.oc=0;this.Bc=d;this.pc=c;this.qc=this.Wb=this.Cc=0;this.Xb=1};m.prototype.Sr=function(d){this.Vr(d*Math.PI/180)};m.prototype.Tr=function(d){this.Wr(d*Math.PI/180)};m.prototype.Ur=function(d){this.Xr(d*Math.PI/180)};m.prototype.Sd=function(d){this.fd||(this.fd=new m,this.he=new m);this.fd.Sr(d);this.he.clone(this);
this.multiply(this.fd,this.he)};m.prototype.Ye=function(d){this.fd||(this.fd=new m,this.he=new m);this.fd.Tr(d);this.he.clone(this);this.multiply(this.fd,this.he)};m.prototype.Ze=function(d){this.fd||(this.fd=new m,this.he=new m);this.fd.Ur(d);this.he.clone(this);this.multiply(this.fd,this.he)};m.prototype.multiply=function(d,c){this.nc=d.nc*c.nc+d.Mb*c.Bc+d.oc*c.Wb;this.Mb=d.nc*c.Mb+d.Mb*c.pc+d.oc*c.qc;this.oc=d.nc*c.oc+d.Mb*c.Cc+d.oc*c.Xb;this.Bc=d.Bc*c.nc+d.pc*c.Bc+d.Cc*c.Wb;this.pc=d.Bc*c.Mb+
d.pc*c.pc+d.Cc*c.qc;this.Cc=d.Bc*c.oc+d.pc*c.Cc+d.Cc*c.Xb;this.Wb=d.Wb*c.nc+d.qc*c.Bc+d.Xb*c.Wb;this.qc=d.Wb*c.Mb+d.qc*c.pc+d.Xb*c.qc;this.Xb=d.Wb*c.oc+d.qc*c.Cc+d.Xb*c.Xb};m.prototype.Xq=function(d){var c=d.x;var a=d.y;var b=d.z;d.x=c*this.nc+a*this.Mb+b*this.oc;d.y=c*this.Bc+a*this.pc+b*this.Cc;d.z=c*this.Wb+a*this.qc+b*this.Xb};return m}();x.vl=p})(ggP2VR||(ggP2VR={}));
(function(x){x.ka={create:function(p){var m="undefined"!=typeof Float32Array?new Float32Array(16):Array(16);p&&(m[0]=p[0],m[1]=p[1],m[2]=p[2],m[3]=p[3],m[4]=p[4],m[5]=p[5],m[6]=p[6],m[7]=p[7],m[8]=p[8],m[9]=p[9],m[10]=p[10],m[11]=p[11],m[12]=p[12],m[13]=p[13],m[14]=p[14],m[15]=p[15]);return m},set:function(p,m){m[0]=p[0];m[1]=p[1];m[2]=p[2];m[3]=p[3];m[4]=p[4];m[5]=p[5];m[6]=p[6];m[7]=p[7];m[8]=p[8];m[9]=p[9];m[10]=p[10];m[11]=p[11];m[12]=p[12];m[13]=p[13];m[14]=p[14];m[15]=p[15];return m},identity:function(p){p[0]=
1;p[1]=0;p[2]=0;p[3]=0;p[4]=0;p[5]=1;p[6]=0;p[7]=0;p[8]=0;p[9]=0;p[10]=1;p[11]=0;p[12]=0;p[13]=0;p[14]=0;p[15]=1;return p},multiply:function(p,m,d){d||(d=p);var c=p[0],a=p[1],b=p[2],e=p[3],f=p[4],g=p[5],h=p[6],l=p[7],k=p[8],w=p[9],r=p[10],y=p[11],z=p[12],ha=p[13],ua=p[14];p=p[15];var id=m[0],sh=m[1],db=m[2],gl=m[3],tf=m[4],hl=m[5],il=m[6],kl=m[7],jl=m[8],ml=m[9],ql=m[10],rl=m[11],sl=m[12],tl=m[13],ul=m[14];m=m[15];d[0]=id*c+sh*f+db*k+gl*z;d[1]=id*a+sh*g+db*w+gl*ha;d[2]=id*b+sh*h+db*r+gl*ua;d[3]=id*
e+sh*l+db*y+gl*p;d[4]=tf*c+hl*f+il*k+kl*z;d[5]=tf*a+hl*g+il*w+kl*ha;d[6]=tf*b+hl*h+il*r+kl*ua;d[7]=tf*e+hl*l+il*y+kl*p;d[8]=jl*c+ml*f+ql*k+rl*z;d[9]=jl*a+ml*g+ql*w+rl*ha;d[10]=jl*b+ml*h+ql*r+rl*ua;d[11]=jl*e+ml*l+ql*y+rl*p;d[12]=sl*c+tl*f+ul*k+m*z;d[13]=sl*a+tl*g+ul*w+m*ha;d[14]=sl*b+tl*h+ul*r+m*ua;d[15]=sl*e+tl*l+ul*y+m*p;return d},translate:function(p,m,d){var c=m[0],a=m[1];m=m[2];if(!d||p==d)return p[12]=p[0]*c+p[4]*a+p[8]*m+p[12],p[13]=p[1]*c+p[5]*a+p[9]*m+p[13],p[14]=p[2]*c+p[6]*a+p[10]*m+p[14],
p[15]=p[3]*c+p[7]*a+p[11]*m+p[15],p;var b=p[0],e=p[1],f=p[2],g=p[3],h=p[4],l=p[5],k=p[6],w=p[7],r=p[8],y=p[9],z=p[10],ha=p[11];d[0]=b;d[1]=e;d[2]=f;d[3]=g;d[4]=h;d[5]=l;d[6]=k;d[7]=w;d[8]=r;d[9]=y;d[10]=z;d[11]=ha;d[12]=b*c+h*a+r*m+p[12];d[13]=e*c+l*a+y*m+p[13];d[14]=f*c+k*a+z*m+p[14];d[15]=g*c+w*a+ha*m+p[15];return d},scale:function(p,m,d){var c=m[0],a=m[1];m=m[2];if(!d||p==d)return p[0]*=c,p[1]*=c,p[2]*=c,p[3]*=c,p[4]*=a,p[5]*=a,p[6]*=a,p[7]*=a,p[8]*=m,p[9]*=m,p[10]*=m,p[11]*=m,p;d[0]=p[0]*c;d[1]=
p[1]*c;d[2]=p[2]*c;d[3]=p[3]*c;d[4]=p[4]*a;d[5]=p[5]*a;d[6]=p[6]*a;d[7]=p[7]*a;d[8]=p[8]*m;d[9]=p[9]*m;d[10]=p[10]*m;d[11]=p[11]*m;d[12]=p[12];d[13]=p[13];d[14]=p[14];d[15]=p[15];return d},rotate:function(p,m,d,c){var a=d[0],b=d[1];d=d[2];var e=Math.sqrt(a*a+b*b+d*d);if(!e)return null;1!=e&&(e=1/e,a*=e,b*=e,d*=e);var f=Math.sin(m),g=Math.cos(m),h=1-g;m=p[0];e=p[1];var l=p[2],k=p[3],w=p[4],r=p[5],y=p[6],z=p[7],ha=p[8],ua=p[9],id=p[10],sh=p[11],db=a*a*h+g,gl=b*a*h+d*f,tf=d*a*h-b*f,hl=a*b*h-d*f,il=b*
b*h+g,kl=d*b*h+a*f,jl=a*d*h+b*f;a=b*d*h-a*f;b=d*d*h+g;c?p!=c&&(c[12]=p[12],c[13]=p[13],c[14]=p[14],c[15]=p[15]):c=p;c[0]=m*db+w*gl+ha*tf;c[1]=e*db+r*gl+ua*tf;c[2]=l*db+y*gl+id*tf;c[3]=k*db+z*gl+sh*tf;c[4]=m*hl+w*il+ha*kl;c[5]=e*hl+r*il+ua*kl;c[6]=l*hl+y*il+id*kl;c[7]=k*hl+z*il+sh*kl;c[8]=m*jl+w*a+ha*b;c[9]=e*jl+r*a+ua*b;c[10]=l*jl+y*a+id*b;c[11]=k*jl+z*a+sh*b;return c},Ep:function(p,m,d,c,a,b,e){e||(e=x.ka.create());var f=m-p,g=c-d,h=b-a;e[0]=2*a/f;e[1]=0;e[2]=0;e[3]=0;e[4]=0;e[5]=2*a/g;e[6]=0;e[7]=
0;e[8]=(m+p)/f;e[9]=(c+d)/g;e[10]=-(b+a)/h;e[11]=-1;e[12]=0;e[13]=0;e[14]=-(b*a*2)/h;e[15]=0;return e},perspective:function(p,m,d,c,a){p=d*Math.tan(p*Math.PI/360);m*=p;return x.ka.Ep(-m,m,-p,p,d,c,a)},ct:function(p,m,d,c,a,b,e){e||(e=x.ka.create());var f=m-p,g=c-d,h=b-a;e[0]=2/f;e[1]=0;e[2]=0;e[3]=0;e[4]=0;e[5]=2/g;e[6]=0;e[7]=0;e[8]=0;e[9]=0;e[10]=-2/h;e[11]=0;e[12]=-(p+m)/f;e[13]=-(c+d)/g;e[14]=-(b+a)/h;e[15]=1;return e}}})(ggP2VR||(ggP2VR={}));
(function(x){var p=function(){function m(d){this.za=x.ka.create();this.Ab=x.ka.create();this.ud=0;this.jb=[];this.ih=!1;this.hl=this.jk=this.Vk=1;this.xf=1E6;this.oi=[!1,!1,!1,!1,!1,!1];this.lj=!1;this.dk=[];this.wl=8;this.Pq=new x.vl;this.be=[];this.m=d;if(d.ed||d.Oe)d.Qh=2}m.prototype.eh=function(){var d=this.m.R;if(d){var c=d.createShader(d.FRAGMENT_SHADER);d.shaderSource(c,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nvarying vec2 vTextureCoord;\n\t\t\t\t\tuniform sampler2D uSampler;\n\t\t\t\t\tvoid main(void) {\n\t\t\t\t\t\tgl_FragColor = texture2D(uSampler, vec2(vTextureCoord.s, vTextureCoord.t));\n\t\t\t\t\t}");
d.compileShader(c);d.getShaderParameter(c,d.COMPILE_STATUS)||(console&&console.log(d.getShaderInfoLog(c)),alert(d.getShaderInfoLog(c)),c=null);var a=d.createShader(d.VERTEX_SHADER);this.dd(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.Vf(this.P,a,c);this.P.ja=d.getAttribLocation(this.P,"aVertexPosition");d.enableVertexAttribArray(this.P.ja);this.P.Ma=d.getAttribLocation(this.P,"aTextureCoord");d.enableVertexAttribArray(this.P.Ma);this.P.je=d.getUniformLocation(this.P,"uPMatrix");this.P.zh=d.getUniformLocation(this.P,"uMVMatrix");this.P.gg=d.getUniformLocation(this.P,"uSampler");this.P.Hj=d.getUniformLocation(this.P,"uZoffset");c=d.createShader(d.VERTEX_SHADER);this.dd(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.dd(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.Qd=d.createProgram();this.Vf(this.Qd,c,a);this.Qd.ja=d.getAttribLocation(this.Qd,"aVertexPosition");d.enableVertexAttribArray(this.Qd.ja);a=d.createShader(d.VERTEX_SHADER);this.dd(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.dd(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.Og=d.createProgram();this.Vf(this.Og,a,c)}};m.prototype.Hi=function(){var d=this.m,c=d.R;if(c){var a=c.createShader(c.FRAGMENT_SHADER);var b=this.qk(13);this.dd(a,b);b=c.createShader(c.VERTEX_SHADER);
this.dd(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.Bn=c.createProgram();this.Vf(this.Bn,b,a);a=c.createShader(c.FRAGMENT_SHADER);b=this.qk(4);this.dd(a,b);b=c.createShader(c.VERTEX_SHADER);this.dd(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.Cn=c.createProgram();this.Vf(this.Cn,b,a);a=c.createShader(c.FRAGMENT_SHADER);b=this.qk(d.D.format);this.dd(a,b);b=c.createShader(c.VERTEX_SHADER);this.dd(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.Dn=c.createProgram();this.Vf(this.Dn,b,a);this.bj||(this.bj=c.createBuffer())}else this.m.N("No WebGL to initRemapShader!")};m.prototype.dd=function(d,c){var a=this.m.R;a.shaderSource(d,c);a.compileShader(d);a.getShaderParameter(d,a.COMPILE_STATUS)||(console&&console.log(a.getShaderInfoLog(d)),Il&&alert(a.getShaderInfoLog(d)))};m.prototype.Vf=function(d,c,a){var b=this.m.R;b.attachShader(d,c);b.attachShader(d,a);b.linkProgram(d);b.getProgramParameter(d,b.LINK_STATUS)||(alert("Could not initialise shader program"),
console&&console.log(b.getError()));b.useProgram(d)};m.prototype.qk=function(d){var c=this.m;var a="#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\n#define M_PI 3.14159265358979323846\nvarying vec2 dst;\nuniform vec2 srcScale;\nuniform vec2 srcOffset;\nuniform float rectDstDistance;\nuniform float fisheyeDistance;\nuniform float stereoDistance;\nuniform float directionBlend;\nuniform mat4 matRotate; // = mat4( 1.0,0.0,0.0,0.0, 0.0,1.0,0.0,0.0, 0.0,0.0,1.0,0.0, 0.0,0.0,0.0,1.0 );\nconst float rectSrcDistance = 1.0;\nuniform vec2 tonemap;\n";
a=(13==d?a+"uniform samplerCube cubeTexture;":a+"uniform sampler2D tileTexture;\n")+"void main()\n{\n";a+="vec4 direction;\n";a+="vec2 src;\n";a+="vec2 srcCord;\n";a+="vec2 texc;\n";var b=this.Fm(c.Sa());c.Sa()!=c.Dc&&0!=c.Dc?(c=this.Fm(c.Dc),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.Fm=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.Pm=function(d){var c,a,b=this.m,e=this.m.R;this.Zj=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,this.Zj);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.Ce=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,this.Ce);var g=[1,0,0,0,0,1,1,1];e.bufferData(e.ARRAY_BUFFER,new Float32Array(g),e.STATIC_DRAW);this.qd=e.createBuffer();e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,
this.qd);var h=[0,1,2,0,2,3];e.bufferData(e.ELEMENT_ARRAY_BUFFER,new Uint16Array(h),e.STATIC_DRAW);f=[];h=[];g=[];var l=new x.Ga;for(d=0;6>d;d++){var k=d%3;var w=3>d?1:0;for(a=0;4>a;a++){l.x=-1;l.y=-1;l.z=1;for(c=0;c<a;c++)l.Jn();g.push((0>l.x?.33:0)+.33*k,(0>l.y?0:.5)+.5*w);if(4>d)for(c=0;c<d;c++)l.Gr();else 5==d?l.Fr():l.Er();f.push(l.x,l.y,l.z)}c=4*d;h.push(0+c,1+c,2+c,0+c,2+c,3+c)}b.D.rl=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,b.D.rl);e.bufferData(e.ARRAY_BUFFER,new Float32Array(f),e.STATIC_DRAW);
b.D.pj=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,b.D.pj);e.bufferData(e.ARRAY_BUFFER,new Float32Array(g),e.STATIC_DRAW);b.D.zk=e.createBuffer();e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,b.D.zk);e.bufferData(e.ELEMENT_ARRAY_BUFFER,new Uint16Array(h),e.STATIC_DRAW);this.Dq=e.createBuffer();this.Cq=e.createBuffer()};m.prototype.tk=function(d){var c=this;return function(){try{if(d.ar)return;var a=c.m.R;a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,1);var b=!1;null!=d.Qe&&d.Qe.complete?d.Lm||(a.bindTexture(a.TEXTURE_2D,
d),a.texImage2D(a.TEXTURE_2D,0,a.RGBA,a.RGBA,a.UNSIGNED_BYTE,d.Qe),b=d.Lm=!0):null!=d.bg&&d.bg.complete&&(a.bindTexture(a.TEXTURE_2D,d),a.texImage2D(a.TEXTURE_2D,0,a.RGBA,a.RGBA,a.UNSIGNED_BYTE,d.bg),b=!0);b&&(d.loaded=!0);a.bindTexture(a.TEXTURE_2D,null);a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,0)}catch(e){c.m.N(e)}c.m.update(2)}};m.prototype.Qm=function(){var d=this.m,c=d.R;if(this.jb)for(;0<this.jb.length;)c.deleteTexture(this.jb.pop());this.jb=[];for(var a=0;6>a;a++){var b=c.createTexture();this.ud++;
b.bg=null;b.Qe=null;b.Lm=!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.yf[a]){var e=new Image;e.crossOrigin=d.crossOrigin;e.src=d.eb(d.yf[a]);b.bg=e;e.addEventListener&&e.addEventListener("load",this.tk(b),!1);d.ic.push(e)}this.jb.push(b)}for(a=0;6>a;a++)d.Ig[a]&&
(e=new Image,e.crossOrigin=d.crossOrigin,e.src=d.eb(d.Ig[a]),e.addEventListener?e.addEventListener("load",this.tk(this.jb[a]),!1):e.onload=this.tk(this.jb[a]),this.jb[a].Qe=e,d.ic.push(e));for(a=0;a<d.S.length;a++)d.S[a].hd||(d.S[a].texture=c.createTexture(),d.ud++,c.bindTexture(c.TEXTURE_2D,d.S[a].texture),c.texImage2D(c.TEXTURE_2D,0,c.RGB,1,1,0,c.RGB,c.UNSIGNED_BYTE,null),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MIN_FILTER,c.LINEAR),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_S,c.CLAMP_TO_EDGE),c.texParameteri(c.TEXTURE_2D,
c.TEXTURE_WRAP_T,c.CLAMP_TO_EDGE));d.D.texture=c.createTexture();d.ud++;c.bindTexture(c.TEXTURE_2D,d.D.texture);c.texImage2D(c.TEXTURE_2D,0,c.RGB,1,1,0,c.RGB,c.UNSIGNED_BYTE,null);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MIN_FILTER,c.LINEAR);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_S,c.CLAMP_TO_EDGE);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_T,c.CLAMP_TO_EDGE);c.bindTexture(c.TEXTURE_2D,null)};m.prototype.Ws=function(){var d=this.m;if(d.C.width!=d.M.offsetWidth||d.C.height!=d.M.offsetHeight)d.C.width=
d.M.offsetWidth,d.C.height=d.M.offsetHeight;d.de&&(d.Mc(0),d.Hc());if(d.R){var c=d.R;this.xj();c.clearColor(0,0,0,1);c.clear(c.COLOR_BUFFER_BIT|c.DEPTH_BUFFER_BIT);c.useProgram(this.P);this.kg(0);c.uniform1i(this.P.gg,0);c.enableVertexAttribArray(this.P.ja);c.enableVertexAttribArray(this.P.Ma);c.bindBuffer(c.ARRAY_BUFFER,this.Ce);c.vertexAttribPointer(this.P.Ma,2,c.FLOAT,!1,0,0);c.activeTexture(c.TEXTURE0);c.bindBuffer(c.ELEMENT_ARRAY_BUFFER,this.qd);c.uniform1f(this.P.Hj,1E-4);c.vertexAttribPointer(this.P.ja,
3,c.FLOAT,!1,0,0);x.ka.identity(this.Ab);x.ka.perspective(d.kc(),d.zb.width/d.zb.height,.1,100,this.Ab);c.uniformMatrix4fv(this.P.je,!1,this.Ab);for(d=0;6>d;d++)this.kg(d),c.bindBuffer(c.ARRAY_BUFFER,this.Zj),c.vertexAttribPointer(this.P.ja,3,c.FLOAT,!1,0,0),c.bindBuffer(c.ARRAY_BUFFER,this.Ce),c.vertexAttribPointer(this.P.Ma,2,c.FLOAT,!1,0,0),6<=this.jb.length&&this.jb[d].loaded&&(c.activeTexture(c.TEXTURE0),c.bindTexture(c.TEXTURE_2D,this.jb[d]),c.bindBuffer(c.ELEMENT_ARRAY_BUFFER,this.qd),c.uniform1i(this.P.gg,
0),c.uniformMatrix4fv(this.P.zh,!1,this.za),c.uniformMatrix4fv(this.P.je,!1,this.Ab),c.drawElements(c.TRIANGLES,6,c.UNSIGNED_SHORT,0))}};m.prototype.xj=function(){var d=this.m;if(d.u.cg&&6<d.u.cg.length){var c=parseInt(d.u.cg);d.R.clearColor((c>>16&255)/255,(c>>8&255)/255,(c>>0&255)/255,1)}};m.prototype.kg=function(d,c){void 0===c&&(c=1);var a=this.m;x.ka.identity(this.za);x.ka.rotate(this.za,c*-a.U.j*Math.PI/180,[0,0,1]);x.ka.rotate(this.za,c*-a.v.j*Math.PI/180,[1,0,0]);-1==c?x.ka.rotate(this.za,
-a.pan.j*Math.PI/180,[0,1,0]):x.ka.rotate(this.za,(180-a.pan.j)*Math.PI/180,[0,1,0]);a.Oa&&(x.ka.rotate(this.za,-a.Oa.pitch*Math.PI/180,[1,0,0]),x.ka.rotate(this.za,a.Oa.U*Math.PI/180,[0,0,1]));4>d?x.ka.rotate(this.za,-Math.PI/2*d,[0,1,0]):x.ka.rotate(this.za,Math.PI/2*(5==d?1:-1),[1,0,0])};m.prototype.xs=function(d){var c=this;return function(){c.dk.push(d)}};m.prototype.yp=function(d){this.m.Na=!0;this.m.rd=!0;d.loaded=!0;d.Wk=0;d.me=0;var c=this.m.R;this.Yl();c.pixelStorei(c.UNPACK_FLIP_Y_WEBGL,
1);if(null!=d.u&&d.u.complete){d.rb=c.createTexture();this.m.ud++;c.bindTexture(c.TEXTURE_2D,d.rb);try{c.texImage2D(c.TEXTURE_2D,0,c.RGBA,c.RGBA,c.UNSIGNED_BYTE,d.u)}catch(a){c.texImage2D(c.TEXTURE_2D,0,c.RGBA,1,1,0,c.RGBA,c.UNSIGNED_BYTE,new Uint8Array([128,128,128,250])),this.m.N(a)}}this.m.update(2)};m.prototype.Yl=function(){this.m.bc&&this.m.bc--};m.prototype.zp=function(){if(0<this.dk.length){var d=this.dk.shift();this.yp(d)}};m.prototype.Yq=function(d){var c=this;return function(){c.m.Na=!0;
c.m.rd=!0;var a=c.m.u;try{if(null!=d&&d.complete){var b=a.levels[a.levels.length-1],e=a.Da;b.height=b.width=d.width-2*e;b.T=b.ea=1;for(var f=0;6>f;f++){var g=new x.Xd;g.V=document.createElement("canvas");c.m.ia?(g.V.width=b.width+2*e,g.V.height=b.height+2*e):(g.V.width=a.O+2*e,g.V.height=a.O+2*e);g.bb=g.V.getContext("2d");g.V.style[c.m.Va+"Origin"]="0% 0%";g.V.style.overflow="hidden";g.V.style.position="absolute";g.u=d;var h=b.width+2*e,l=b.height+2*e;g.bb&&g.bb.drawImage(d,0,f*l,h,l,0,0,h,l);if(c.m.ia&&
c.m.R){var k=c.m.R;k.pixelStorei(k.UNPACK_FLIP_Y_WEBGL,1);g.rb=k.createTexture();c.m.ud++;k.bindTexture(k.TEXTURE_2D,g.rb);try{k.texImage2D(k.TEXTURE_2D,0,k.RGBA,k.RGBA,k.UNSIGNED_BYTE,g.V)}catch(w){c.m.N(w)}k.bindTexture(k.TEXTURE_2D,null);k.pixelStorei(k.UNPACK_FLIP_Y_WEBGL,0)}c.m.ld&&(g.V.ee=-1,c.m.M.insertBefore(g.V,c.m.M.firstChild));b.aa[f]=g}b.loaded=!0}}catch(w){c.m.N(w)}c.m.update(2)}};m.prototype.no=function(d){var c=this;return function(){c.m.Na=!0;c.m.rd=!0;c.Yl();d.u=null}};m.prototype.Us=
function(){var d=this.m,c=d.u,a=d.u.levels;d.de&&(d.Mc(0),d.Hc());if(d.R){var b=d.R;b.useProgram(this.P);this.xj();b.clearColor(0,0,0,1);b.clear(b.COLOR_BUFFER_BIT|b.DEPTH_BUFFER_BIT);b.enable(b.DEPTH_TEST);x.ka.identity(this.Ab);x.ka.perspective(d.kc(),d.zb.width/d.zb.height,.1,100,this.Ab);b.uniformMatrix4fv(this.P.je,!1,this.Ab);d.vo();d.Jk();var e=d.hk();var f=a.length-1;for(d.Fc=0;f>=e;){var g=a[f],h=1;f==a.length-1&&0==c.Da&&(h=c.O/(c.O-.5));for(var l=0;6>l;l++){var k=d.cube.faces[l];var w=
k.ag;if(k.mb&&0<w.sg&&0<w.ai&&0<w.scale||g.cache){k.Na=!1;k.tf[f]||(k.tf[f]={lb:0,Ib:0,Kb:0,Lb:0});var r=k.tf[f];g.cache?(r.lb=0,r.Ib=0,r.Kb=g.T-1,r.Lb=g.ea-1):d.Gm(g,w,r);w=!0;for(var y=r.Ib;y<=r.Lb;y++)for(var z=r.lb;z<=r.Kb;z++){var ha=z+y*g.T+l*g.T*g.ea,ua=g.aa[ha];ua||(ua=g.aa[ha]=new x.Xd);this.ti()?ua.u||(ua.me?ua.me--:(this.Qi(ua,g,d.re(l,f,z,y)),d.Na=!0)):d.Fc++;if(ua.rb){if(!ua.If){ha=.5*f+1;ua.If=b.createBuffer();b.bindBuffer(b.ARRAY_BUFFER,ua.If);var id=[-1,-1,1,1,-1,1,1,1,1,-1,1,1];id[3]=
z*c.O-c.Da;id[0]=Math.min((z+1)*c.O,g.width)+c.Da;id[7]=y*c.O-c.Da;id[1]=Math.min((y+1)*c.O,g.height)+c.Da;id[4]=id[1];id[6]=id[3];id[9]=id[0];id[10]=id[7];for(var sh=0;12>sh;sh++)id[sh]=0==sh%3?h*ha*(-2*id[sh]/g.width+1):1==sh%3?h*ha*(-2*id[sh]/g.height+1):ha;b.bufferData(b.ARRAY_BUFFER,new Float32Array(id),b.STATIC_DRAW)}}else w=!1;ua.visible=k.mb}r.Gk=w}}f--}for(l=0;6>l;l++)if(k=d.cube.faces[l],k.mb)for(w=k.ag,this.kg(l),b.uniform1i(this.P.gg,0),b.uniformMatrix4fv(this.P.je,!1,this.Ab),b.uniformMatrix4fv(this.P.zh,
!1,this.za),b.enableVertexAttribArray(this.P.ja),b.enableVertexAttribArray(this.P.Ma),b.bindBuffer(b.ARRAY_BUFFER,this.Ce),b.vertexAttribPointer(this.P.Ma,2,b.FLOAT,!1,0,0),b.activeTexture(b.TEXTURE0),b.bindBuffer(b.ELEMENT_ARRAY_BUFFER,this.qd),b.useProgram(this.P),f=e;f<=a.length-1;){g=a[f];if(k.mb&&0<w.sg&&k.tf[f]&&0<=k.tf[f].lb){r=k.tf[f];for(y=r.Ib;y<=r.Lb;y++)for(z=r.lb;z<=r.Kb;z++)ha=z+y*g.T+l*g.T*g.ea,(ua=g.aa[ha])&&ua.rb&&(b.uniform1f(this.P.Hj,1E-4*(z%2+y%2*2)),b.bindBuffer(b.ARRAY_BUFFER,
ua.If),b.vertexAttribPointer(this.P.ja,3,b.FLOAT,!1,0,0),b.bindTexture(b.TEXTURE_2D,ua.rb),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MAG_FILTER,b.LINEAR),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MIN_FILTER,b.LINEAR),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_WRAP_S,b.CLAMP_TO_EDGE),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_WRAP_T,b.CLAMP_TO_EDGE),b.drawElements(b.TRIANGLES,6,b.UNSIGNED_SHORT,0)),ua.visible=k.mb;r.Gk&&(f=a.length)}f++}this.Xk();d.rd=!1}};m.prototype.ti=function(){return this.m.bc<this.m.Qh};m.prototype.Qi=
function(d,c,a){var b=this.m;b.yk++;d.u=new Image;d.Wk++;d.me=1<<d.Wk;d.u.onload=this.xs(d);d.u.onerror=this.no(d);d.u.onabort=this.no(d);d.u.crossOrigin=b.crossOrigin;d.u.setAttribute("src",a);b.N("load "+a);c.cache&&b.ic.push(d.u);b.bc++};m.prototype.Fo=function(){var d=this.m,c=d.u;d.de&&(d.Mc(0),d.Hc());if(d.R){var a=d.R;this.xj();Il&&a.clearColor(.2,0,0,1);a.clearColor(0,0,0,1);a.clear(a.COLOR_BUFFER_BIT|a.DEPTH_BUFFER_BIT);a.disable(a.DEPTH_TEST);a.disable(a.CULL_FACE);a.bindBuffer(a.ARRAY_BUFFER,
this.bj);var b=[0,0];b[2]=d.C.width;b[3]=0;b[4]=d.C.width;b[5]=d.C.height;b[6]=0;b[7]=d.C.height;a.bufferData(a.ARRAY_BUFFER,new Float32Array(b),a.STATIC_DRAW);this.m.Fc=0;if(!this.Lc||this.ih)0<c.levels.length?this.wp():this.xp();d.D.yd?this.pr():(a.enable(a.DEPTH_TEST),a.depthRange(0,1),a.depthFunc(a.LESS),this.lj=!1,0<c.levels.length&&this.Vs(),this.Lc&&!this.lj&&this.nr())}};m.prototype.fs=function(d,c,a,b,e,f,g){var h=this.m,l=h.u,k=h.C,w=a*l.O/c.width,r=(a+1)*l.O/c.width;a=b*l.O/c.height;c=
(b+1)*l.O/c.height;1<r&&(e*=2,r=1);1<c&&(e*=2,c=1);e=Math.min(this.wl,e);r=(r-w)/e;var y=(c-a)/e;b=c=0;l={x:0,y:0};var z={x:0,y:0},ha=0;d.Di=0;var ua=h.Bh,id=new x.Ga,sh=this.Pq;sh.Pn();4>f?sh.Ye(-90*f):sh.Sd(5==f?90:-90);h.Oa&&(sh.Ze(h.Oa.U),sh.Sd(-h.Oa.pitch));sh.Ye(-h.pan.j);sh.Sd(h.v.j);sh.Ze(h.U.j);for(f=0;f<=e;f++)for(var db=0;db<=e;db++){var gl=2*(w+db*r)-1;var tf=2*(a+f*y)-1;id.x=1*gl;id.y=1*tf;id.z=-1;id.normalize();sh.Xq(id);gl=this.Cm(id,l,h.Sa());0!=h.Dc&&1>ua&&(gl=gl&&this.Cm(id,z,h.Dc),
l.x=l.x*ua+z.x*(1-ua),l.y=l.y*ua+z.y*(1-ua));gl?-1E10<l.x&&1E10>l.x&&-1E10<l.y&&1E10>l.y?-2<l.x&&2>l.x&&-2<l.y&&2>l.y&&(c+=l.x,b+=l.y,ha++):l.x=NaN:l.x=NaN;d.vd[d.Di++]=l.x;d.vd[d.Di++]=l.y}0<ha?(c/=ha,b/=ha):g=0;for(a=0;a<d.Di;a+=2)l.x=d.vd[a],l.y=d.vd[a+1],h=l.x-c,w=l.y-b,l.x+=h*g,l.y+=w*g,d.vd[a]=k.width/2+l.x*k.width/2,d.vd[a+1]=k.height/2-l.y*k.width/2;this.gs(d,e)};m.prototype.Cm=function(d,c,a){var b=!0;switch(a){case 0:case 4:a=1/(d.z*this.Vk);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.hl);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.jk*Math.acos(-d.z)/a;if(2<a)return!1;c.x=e*d.x;c.y=-e*d.y}}return b};m.prototype.gs=function(d,c){for(var a=this.m,b=[],e,f=d.Kd=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.vd[2*b[0]])&&(e=!1);if(e){var l=!1,k=!1,w=!1,r=!1;for(h=0;4>h;h++){var y=d.vd[2*b[h]];y<a.C.width&&(k=
!0);0<=y&&(l=!0);y=d.vd[2*b[h]+1];y<a.C.height&&(w=!0);0<=y&&(r=!0)}if(e=e&&k&&l&&w&&r)d.Me[d.Kd++]=b[0],d.Me[d.Kd++]=b[3],d.Me[d.Kd++]=b[2],d.Me[d.Kd++]=b[0],d.Me[d.Kd++]=b[1],d.Me[d.Kd++]=b[3]}}};m.prototype.Vs=function(){var d=this.m,c=d.u,a=d.u.levels;d.de&&(d.Mc(0),d.Hc());if(d.R){var b=d.R,e=this.Cn;b.useProgram(e);this.nl(e);b.enable(b.CULL_FACE);b.cullFace(b.FRONT);b.enable(b.DEPTH_TEST);x.ka.identity(this.Ab);x.ka.perspective(d.kc(),d.zb.width/d.zb.height,.1,100,this.Ab);b.uniformMatrix4fv(b.getUniformLocation(e,
"uPMatrix"),!1,this.Ab);this.m.Fc=0;d.Jk();var f=d.hk(),g=0;var h=a.length-1;for(var l={},k=a[h];k.Ve&&0<h;)h--,k=a[h];for(var w=h,r=w,y=0;6>y;y++)for(var z=0;z<k.ea;z++)for(var ha=0;ha<k.T;ha++){var ua=ha+z*k.T+y*k.T*k.ea;l[ua]=1}for(;h>=f;){var id={};k=a[h];var sh=null;0<h&&(sh=a[h-1]);var db=!0;for(var gl in l)if(l.hasOwnProperty(gl)){ua=Number(gl);var tf=k.aa[ua];y=Number(Math.floor(ua/(k.T*k.ea)));z=Math.floor((ua-y*k.T*k.ea)/k.T);ha=Math.floor(ua-(z*k.T+y*k.T*k.ea));if(6<=y)console.log("Grrr...");
else{var hl=this.m.cube.faces[y];hl.Na=!1;tf||(tf=k.aa[ua]=new x.Xd,d.N("create "+ua));this.fs(tf,k,ha,z,Math.max(1,this.wl>>w-h),y,-(0!=d.Dc)?.3:.1);tf.visible=0<tf.Kd||k.cache;tf.Li=3;tf.mh=Date.now();tf.visible&&!tf.rb&&(db=!1,this.ti()?tf.u||(tf.me?tf.me--:(this.Qi(tf,k,d.re(y,h,ha,z)),d.Na=!0)):this.m.Fc++);if(sh&&(tf.visible||sh.cache)){tf=(ha*c.O+1)/k.width;ha=Math.min(1,((ha+1)*c.O-1)/k.width);var il=(z*c.O+1)/k.height;z=Math.min(1,((z+1)*c.O-1)/k.height);ua=c.O/sh.width;hl=c.O/sh.height;
var kl=il;il=Math.floor(il*sh.height/c.O);do{var jl=tf,ml=Math.floor(tf*sh.width/c.O);do{var ql=ml+il*sh.T+y*sh.T*sh.ea;ml<sh.T&&il<sh.ea?id[ql]=1:d.N("Grrrr");ml++;jl+=ua}while(jl<ha);il++;kl+=hl}while(kl<z)}}}db&&(r=h,20>d.fov.j&&h<this.xf&&(this.lj=!0));l=id;h--}this.Xk();b.uniform1i(b.getUniformLocation(e,"tileTexture"),0);b.activeTexture(b.TEXTURE0);h=f;for(f=-1;h<=Math.min(r,this.xf-1);){k=a[h];for(gl in k.aa)if(k.aa.hasOwnProperty(gl)){l=Number(gl);tf=k.aa[l];y=Math.floor(l/(k.T*k.ea));z=Math.floor((l-
y*k.T*k.ea)/k.T);ha=Math.floor(l-(z*k.T+y*k.T*k.ea));f!=y&&(f=y,this.yj(y,e));if(g>d.Re){d.N("Excided painted tiles");this.lj=!1;break}tf.rb&&(l=y=c.O,ha==k.T-1&&(y=k.width-c.O*ha),z==k.ea-1&&(l=k.height-c.O*z),y=(y+2*c.Da)/c.O,l=(l+2*c.Da)/c.O,b.bindTexture(b.TEXTURE_2D,tf.rb),b.uniform2f(b.getUniformLocation(e,"uCanvasDimensions"),d.C.width,d.C.height),w=b.getUniformLocation(e,"srcScale"),b.uniform2f(w,.5*k.width/c.O/y,.5*k.height/c.O/l),w=b.getUniformLocation(e,"srcOffset"),b.uniform2f(w,(.5*k.width+
c.Da-c.O*ha)/c.O/y,-(.5*k.height+c.Da-c.O*z)/c.O/l+1),w=b.getUniformLocation(e,"zOffset"),b.uniform1f(w,(h+1)/(a.length+5)),y=b.getAttribLocation(e,"aVertexPosition"),b.disableVertexAttribArray(0),b.disableVertexAttribArray(1),b.disableVertexAttribArray(2),b.enableVertexAttribArray(y),b.activeTexture(b.TEXTURE0),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MAG_FILTER,b.LINEAR),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MIN_FILTER,b.LINEAR),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_WRAP_S,b.CLAMP_TO_EDGE),b.texParameteri(b.TEXTURE_2D,
b.TEXTURE_WRAP_T,b.CLAMP_TO_EDGE),b.bindBuffer(b.ARRAY_BUFFER,this.Dq),b.vertexAttribPointer(y,2,b.FLOAT,!1,0,0),b.bufferData(b.ARRAY_BUFFER,new Float32Array(tf.vd),b.DYNAMIC_DRAW),b.bindBuffer(b.ELEMENT_ARRAY_BUFFER,this.Cq),b.bufferData(b.ELEMENT_ARRAY_BUFFER,new Uint16Array(tf.Me),b.DYNAMIC_DRAW),b.drawElements(b.TRIANGLES,tf.Kd,b.UNSIGNED_SHORT,0),g++)}h++}b.disable(b.CULL_FACE);b.cullFace(b.FRONT_AND_BACK);d.rd=!1}};m.prototype.yj=function(d,c){var a=this.m.R;x.ka.identity(this.za);this.kg(d,
-1);a.uniformMatrix4fv(a.getUniformLocation(c,"matRotate"),!1,this.za)};m.prototype.pr=function(){var d=this.m;if(d.R){var c=d.R,a=this.Dn;c.useProgram(a);this.yj(0,a);c.uniform2f(c.getUniformLocation(a,"uCanvasDimensions"),d.C.width,d.C.height);var b=c.getUniformLocation(a,"srcOffset");c.uniform2f(b,.5,.5);1==d.D.format&&(b=c.getUniformLocation(a,"srcScale"),d.Nd?(c.uniform2f(b,-.5/Math.PI,(d.D.flipY?-.5:.5)/Math.PI),b=c.getUniformLocation(a,"srcOffset"),d.Ph?c.uniform2f(b,.5,.75):c.uniform2f(b,
.5,.25)):c.uniform2f(b,-.5/Math.PI,(d.D.flipY?-1:1)/Math.PI));14==d.D.format&&(b=c.getUniformLocation(a,"srcScale"),c.uniform2f(b,1-2*d.D.rf/(d.D.width/3),1-2*d.D.rf/(d.D.height/2)));this.nl(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.bj);c.vertexAttribPointer(b,2,c.FLOAT,!1,0,0);c.activeTexture(c.TEXTURE0);
c.bindTexture(c.TEXTURE_2D,d.D.texture);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_S,c.CLAMP_TO_EDGE);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_T,c.CLAMP_TO_EDGE);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MIN_FILTER,c.LINEAR);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MAG_FILTER,c.LINEAR);c.bindBuffer(c.ELEMENT_ARRAY_BUFFER,this.qd);c.drawElements(c.TRIANGLES,6,c.UNSIGNED_SHORT,0)}};m.prototype.nl=function(d){var c=this.m,a=c.R,b=this.m.C,e=b.width/b.height;switch(c.fov.mode){case 1:e=1;break;case 2:e=
b.width/Math.sqrt(b.width*b.width+b.height*b.height);break;case 3:4*b.height/3<b.width&&(e=4/3)}b=a.getUniformLocation(d,"rectDstDistance");this.Vk=Math.tan(Math.min(c.fov.j,179)/2*Math.PI/180)*e;a.uniform1f(b,this.Vk);b=a.getUniformLocation(d,"fisheyeDistance");this.jk=180/(c.fov.j*Math.PI*e);a.uniform1f(b,this.jk);b=a.getUniformLocation(d,"stereoDistance");this.hl=Math.tan(Math.min(c.fov.j,359)/4*Math.PI/180)*e;a.uniform1f(b,this.hl);b=a.getUniformLocation(d,"directionBlend");a.uniform1f(b,c.Bh)};
m.prototype.nr=function(){var d=this.m,c=d.R,a=this.Bn;c.useProgram(a);c.enable(c.DEPTH_TEST);this.yj(0,a);c.uniform2f(c.getUniformLocation(a,"uCanvasDimensions"),d.C.width,d.C.height);d=c.getUniformLocation(a,"srcScale");c.uniform2f(d,1,1);d=c.getUniformLocation(a,"srcOffset");c.uniform2f(d,0,0);d=c.getUniformLocation(a,"zOffset");c.uniform1f(d,.9999);this.nl(a);this.yj(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.bj);c.vertexAttribPointer(a,2,c.FLOAT,!1,0,0);c.activeTexture(c.TEXTURE0);c.bindTexture(c.TEXTURE_CUBE_MAP,this.Lc);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.qd);c.drawElements(c.TRIANGLES,6,c.UNSIGNED_SHORT,0)};m.prototype.xp=function(){for(var d=this.m,c=d.R,a=[1,3,5,4,0,2],b=!0,e=!0,f=!1,g=0;6>g;g++)this.jb[g].Qe.complete?this.oi[g]||(f=!0):b=!1,this.jb[g].bg.complete||(e=!1);if(e||b)if(!e||b||!this.Lc||f){g=Math.round(d.Gc/d.ff);e=(d.Gc-g)/2;d.N("paint cube single - isMain: "+b+" overlap: "+e);this.xf=0;this.Lc||(this.Lc=c.createTexture());d.ud++;c.bindTexture(c.TEXTURE_CUBE_MAP,this.Lc);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.jb[l].Qe.complete?this.oi[l]||(h.drawImage(this.jb[l].Qe,-e,-e),c.texImage2D(c.TEXTURE_CUBE_MAP_POSITIVE_X+g,0,c.RGBA,c.RGBA,c.UNSIGNED_BYTE,f),this.oi[l]=!0):(h.drawImage(this.jb[l].bg,-e,-e,d.Gc,d.Gc),c.texImage2D(c.TEXTURE_CUBE_MAP_POSITIVE_X+
g,0,c.RGBA,c.RGBA,c.UNSIGNED_BYTE,f))}this.ih=!b}};m.prototype.wp=function(){var d=this.m,c=this.m.u,a=d.u.levels,b=d.R,e;var f=a.length-1;if(!(0>f)){a[f].Ve&&f--;var g=512;d.hh&&(g=256);!d.fg&&2<=d.devicePixelRatio&&(g=512);for((e=b.getParameter(b.MAX_CUBE_MAP_TEXTURE_SIZE))&&e<g&&(g=e);0<f&&a[f-1].width<=g;)f--;g=a[f];if(0!=g.T){e=f;var h=this.pp(f);this.ih&&h&&(this.ih=!1);h||(f=a.length-1,g=a[f],h||(g.Ve?(h=g.loaded,this.Ik(f-1)&&(--f,h=!0)):h=this.Ik(f)),this.ih=!0);this.Ik(e);if(h&&this.xf>
f){g=a[f];d.N("paint cube level "+f);this.xf=f;a=d.u.Da;f=0<a||1<g.T||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.Lc=b.createTexture();d.ud++;b.bindTexture(b.TEXTURE_CUBE_MAP,this.Lc);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.O;for(var k=0;6>k;k++){for(var w=0;w<g.ea;w++)for(var r=0;r<g.T;r++){var y=r+w*g.T+l[k]*g.T*g.ea,z=g.aa[y],ha=z.u;z.V&&(ha=z.V);ha?f?(y=h.width/g.width,e.drawImage(ha,y*(r*c-a),y*(w*c-a),y*ha.width,y*ha.height)):b.texImage2D(b.TEXTURE_CUBE_MAP_POSITIVE_X+k,0,b.RGBA,b.RGBA,b.UNSIGNED_BYTE,ha):(d.N("WTF?!"),d.N(y),d.N(z))}f&&b.texImage2D(b.TEXTURE_CUBE_MAP_POSITIVE_X+k,0,b.RGBA,b.RGBA,b.UNSIGNED_BYTE,h)}}}}};m.prototype.Ik=
function(d){var c=this.m,a=c.u.levels[d];if(0==a.T)return!1;var b=!0;a.cache=!0;for(var e=0;6>e;e++)for(var f=0;f<a.ea;f++)for(var g=0;g<a.T;g++){var h=g+f*a.T+e*a.T*a.ea,l=a.aa[h];l||(l=a.aa[h]=new x.Xd);this.ti()?l.u||(l.me?l.me--:(this.Qi(l,a,c.re(e,d,g,f)),c.Na=!0)):this.m.Fc++;l.rb||(b=!1,c.Na=!0)}b&&(a.loaded=!0);return b};m.prototype.pp=function(d){d=this.m.u.levels[d];if(0==d.T)return!1;for(var c=0;6>c;c++)for(var a=0;a<d.ea;a++)for(var b=0;b<d.T;b++){var e=d.aa[b+a*d.T+c*d.T*d.ea];if(!e||
!e.rb)return!1}return d.loaded=!0};m.prototype.ready=function(){return null!=this.Lc};m.prototype.Xk=function(){for(var d=this.m,c=d.u.levels,a=d.R,b=Date.now(),e=c.length-1;0<=e;e--){var f=c[e];if(!f.cache)for(var g in f.aa)if(f.aa.hasOwnProperty(g)){var h=f.aa[g];0<h.Li&&h.Li--;h.visible||0<h.Li?(h.visible&&(h.mh=b),h=this.be.indexOf(h),-1!==h&&this.be.splice(h,1)):-1===this.be.indexOf(h)&&(h.level=f,this.be.push(h))}}if(this.be.length>1.1*d.lo)for(this.be.sort(function(l,k){return k.mh-l.mh});this.be.length>
d.lo;)h=this.be.pop(),h.rb&&(a.deleteTexture(h.rb),d.ud--,h.rb=0),h.u=null,h.If&&(a.deleteBuffer(h.If),h.If=0),g=h.level.aa.indexOf(h),d.N("delete "+g+" "+(b-h.mh)),delete h.level.aa[g]};m.prototype.Ns=function(){var d=this.m;if(d.R){var c=this.m.R;c.disable(c.DEPTH_TEST);var a;for(a=0;a<d.S.length;a++){var b=d.S[a];if(!b.hd){x.ka.identity(this.za);x.ka.rotate(this.za,-d.U.j*Math.PI/180,[0,0,1]);x.ka.rotate(this.za,-d.v.j*Math.PI/180,[1,0,0]);x.ka.rotate(this.za,(180-d.pan.j)*Math.PI/180,[0,1,0]);
x.ka.rotate(this.za,b.pan*Math.PI/180,[0,1,0]);x.ka.rotate(this.za,-b.v*Math.PI/180,[1,0,0]);x.ka.translate(this.za,[0,0,1]);x.ka.rotate(this.za,b.ob*Math.PI/180,[0,0,1]);x.ka.rotate(this.za,-b.La*Math.PI/180,[0,1,0]);x.ka.rotate(this.za,b.Fa*Math.PI/180,[1,0,0]);var e=Math.tan(b.fov/2*Math.PI/180),f=b.aspect;f||(f=16/9);x.ka.scale(this.za,[e,e/f,1]);x.ka.translate(this.za,[0,0,-1]);c.bindBuffer(c.ARRAY_BUFFER,this.Zj);c.vertexAttribPointer(this.P.ja,3,c.FLOAT,!1,0,0);c.bindBuffer(c.ARRAY_BUFFER,
this.Ce);c.vertexAttribPointer(this.P.Ma,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.qd);c.uniform1i(this.P.gg,0);c.uniformMatrix4fv(this.P.zh,!1,this.za);c.uniformMatrix4fv(this.P.je,
!1,this.Ab);c.drawElements(c.TRIANGLES,6,c.UNSIGNED_SHORT,0)}}c.enable(c.DEPTH_TEST)}};m.prototype.Ms=function(){var d=this.m,c;if(d.C.width!=d.M.offsetWidth||d.C.height!=d.M.offsetHeight)d.C.width=d.M.offsetWidth,d.C.height=d.M.offsetHeight;d.de&&(d.Mc(0),d.Hc());if(d.R){var a=d.R;a.useProgram(this.P);x.ka.identity(this.Ab);x.ka.perspective(d.kc(),d.zb.width/d.zb.height,.1,100,this.Ab);a.uniformMatrix4fv(this.P.je,!1,this.Ab);this.kg(0);a.uniform1i(this.P.gg,0);a.uniformMatrix4fv(this.P.je,!1,this.Ab);
a.uniformMatrix4fv(this.P.zh,!1,this.za);a.enableVertexAttribArray(this.P.ja);a.enableVertexAttribArray(this.P.Ma);a.bindBuffer(a.ARRAY_BUFFER,this.Ce);a.vertexAttribPointer(this.P.Ma,2,a.FLOAT,!1,0,0);a.activeTexture(a.TEXTURE0);a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,this.qd);a.uniform1f(this.P.Hj,1E-4);a.vertexAttribPointer(this.P.ja,3,a.FLOAT,!1,0,0);a.bindTexture(a.TEXTURE_2D,d.D.texture);for(c=0;1>c;c++)this.kg(0),a.bindBuffer(a.ARRAY_BUFFER,d.D.rl),a.vertexAttribPointer(this.P.ja,3,a.FLOAT,!1,
0,0),a.bindBuffer(a.ARRAY_BUFFER,d.D.pj),a.vertexAttribPointer(this.P.Ma,2,a.FLOAT,!1,0,0),a.activeTexture(a.TEXTURE0),a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,d.D.zk),a.uniform1i(this.P.gg,0),a.uniformMatrix4fv(this.P.zh,!1,this.za),a.uniformMatrix4fv(this.P.je,!1,this.Ab),a.drawElements(a.TRIANGLES,36,a.UNSIGNED_SHORT,0)}};m.prototype.Ls=function(){var d=this.m,c=d.R,a=d.D;if(0<d.S.length)for(var b=0;b<d.S.length;b++){var e=d.S[b];if(!e.hd&&e.isRunning&&e.Ci!=e.f.currentTime&&(e.Ci=e.f.currentTime,!e.aspect&&
0<e.f.videoHeight&&(e.aspect=e.f.videoWidth/e.f.videoHeight),d.Yh))try{e.texture&&(c.bindTexture(c.TEXTURE_2D,e.texture),c.texImage2D(c.TEXTURE_2D,0,c.RGB,c.RGB,c.UNSIGNED_BYTE,e.f),d.update())}catch(g){d.N(g)}}if(a.f&&(b=Number(a.f.currentTime),a.Ci!=b)){a.Ci=b;try{var f=0<a.f.readyState;d.Qf&&a.yd&&(f=f&&0<a.f.currentTime);a.texture&&a.Ki&&f&&(a.yd=!0,a.width=a.f.videoWidth,a.height=a.f.videoHeight,c.pixelStorei(c.UNPACK_FLIP_Y_WEBGL,d.D.flipY),c.bindTexture(c.TEXTURE_2D,a.texture),c.texImage2D(c.TEXTURE_2D,
0,c.RGB,c.RGB,c.UNSIGNED_BYTE,a.f),a.ko=!0,d.update())}catch(g){d.N(g)}}};m.prototype.sn=function(){var d,c,a=this.m,b=this.m.R;a.Ja.style.visibility="hidden";a.H.kh!=a.H.mode&&(a.H.kh=a.H.mode);if((0<=a.H.mode||0<a.H.ub.length)&&!a.J.Sh){var e=1;0>=a.H.mode&&(e=0);3==a.H.mode&&(e=a.H.va);for(d=0;d<a.W.length;d++){var f=a.W[d];if("poly"==f.type){var g=f.ke,h=e;2==a.H.mode&&(h=f.va);var l=a.H.ub.indexOf(f.id);-1!=l&&(h=a.H.ac[l]);if(0<g.length){l=[];for(c=0;c<g.length;c++)l.push(g[c].Zb),l.push(g[c].Cb),
l.push(0);b.useProgram(this.Qd);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.Qd,"uCanvasDimensions"),a.C.width,a.C.height);g=b.getUniformLocation(this.Qd,"uColor");c=f.gc;b.uniform3f(g,(c>>16&255)/255,(c>>8&255)/255,(c&255)/255);var k=b.getUniformLocation(this.Qd,"uAlpha");b.uniform1f(k,
f.fc*h);b.vertexAttribPointer(this.Qd.ja,3,b.FLOAT,!1,0,0);b.drawArrays(b.LINE_LOOP,0,l.length/3);c=f.ec;b.uniform3f(g,(c>>16&255)/255,(c>>8&255)/255,(c&255)/255);b.uniform1f(k,f.dc*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.ml=function(){var d=this.m,c=d.u;if(d.C.width!=d.M.offsetWidth||d.C.height!=d.M.offsetHeight)d.C.width=d.M.offsetWidth,d.C.height=d.M.offsetHeight;d.de&&(d.Mc(0),d.Hc());if(d.R){var a=d.R;this.xj();a.clear(a.COLOR_BUFFER_BIT|a.DEPTH_BUFFER_BIT);a.disable(a.DEPTH_TEST);a.disable(a.CULL_FACE);a.useProgram(this.Og);var b=a.getUniformLocation(this.Og,"uRect");a.uniform2f(a.getUniformLocation(this.Og,
"uCanvasDimensions"),d.C.width,d.C.height);a.activeTexture(a.TEXTURE0);a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,this.qd);var e=a.getAttribLocation(this.Og,"aVertexPosition");a.disableVertexAttribArray(0);a.disableVertexAttribArray(1);a.disableVertexAttribArray(2);a.enableVertexAttribArray(e);a.bindBuffer(a.ARRAY_BUFFER,this.Ce);a.vertexAttribPointer(e,2,a.FLOAT,!1,0,0);d.Fc=0;var f=100/d.fov.j;var g=c.width/c.height;e=d.C.height*f*g;f*=d.C.height;g=(d.pan.j/100/g-.5)*e+d.C.width/2;for(var h=(d.v.j/100-
.5)*f+d.C.height/2,l,k,w,r=0;c.levels.length>=r+2&&c.levels[r+1].width>e;)r++;var y;var z=[];for(y=c.levels.length-1;y>=r;){var ha=c.levels[y];if(ha.cache){var ua={lb:0,Ib:0};ua.Kb=ha.T-1;ua.Lb=ha.ea-1}else{ua={};l=-h/f*(ha.height/d.u.O);k=(-g+d.C.width)/e*(ha.width/d.u.O);var id=(-h+d.C.height)/f*(ha.height/d.u.O);ua.lb=Math.min(Math.max(0,Math.floor(-g/e*(ha.width/d.u.O))),ha.T-1);ua.Ib=Math.min(Math.max(0,Math.floor(l)),ha.ea-1);ua.Kb=Math.min(Math.max(0,Math.floor(k)),ha.T-1);ua.Lb=Math.min(Math.max(0,
Math.floor(id)),ha.ea-1)}z[y]=ua;var sh=!0;for(k=ua.Ib;k<=ua.Lb;k++)for(l=ua.lb;l<=ua.Kb;l++)w=l+k*ha.T,id=ha.aa[w],id||(id=new x.Xd,ha.aa[w]=id),this.ti()?id.u||(this.Qi(id,ha,d.re(0,y,l,k)),d.Na=!0):this.m.Fc++,id.u&&id.u.complete||(sh=!1),id.visible=!0;ua.Gk=sh;y--}for(y=c.levels.length-1;y>=r;){ha=c.levels[y];if(z[y]&&0<=z[y].lb)for(ua=z[y],k=ua.Ib;k<=ua.Lb;k++)for(l=ua.lb;l<=ua.Kb;l++)w=l+k*ha.T,(id=ha.aa[w])&&id.u&&id.u.complete&&(d=g+(-c.Da+c.O*l)*e/ha.width,a.uniform4f(b,d,h+(-c.Da+c.O*k)*
f/ha.height,id.u.width*e/ha.width,id.u.height*f/ha.height),id&&id.rb&&(a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,this.qd),a.bindTexture(a.TEXTURE_2D,id.rb),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,a.LINEAR),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.LINEAR),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE),a.drawElements(a.TRIANGLES,6,a.UNSIGNED_SHORT,0)));y--}this.Xk()}};m.prototype.Xe=function(){var d=this.m.R;
if(d&&this.jb)for(;0<this.jb.length;){var c=this.jb.pop();c.ar=!0;d.deleteTexture(c)}this.Lc&&(d.deleteTexture(this.Lc),this.Lc=null);this.xf=1E6;this.oi=[!1,!1,!1,!1,!1,!1]};return m}();x.So=p})(ggP2VR||(ggP2VR={}));
(function(x){var p=function(){return function(){this.ag={Qg:1,Rg:1,th:0,uh:0,sg:0,ai:0,scale:1};this.mb=!0;this.tf=[]}}(),m=function(){function d(){var c;this.faces=Array(6);for(c=0;6>c;c++)this.faces[c]=new p}d.prototype.qp=function(c,a,b,e){for(var f=0;6>f;f++){var g;if(g=this.faces[f]){var h=[];h.push(new x.Ga(-1,-1,-1,0,0));h.push(new x.Ga(1,-1,-1,1,0));h.push(new x.Ga(1,1,-1,1,1));h.push(new x.Ga(-1,1,-1,0,1));for(var l=0;l<h.length;l++)4>f?h[l].La(-Math.PI/2*f):h[l].Fa(Math.PI/2*(4===f?-1:1)),
e&&(h[l].ob(e.U*Math.PI/180),h[l].Fa(-e.pitch*Math.PI/180)),h[l].La(-c*Math.PI/180),h[l].Fa(a*Math.PI/180),h[l].ob(b*Math.PI/180);g.mb=0<h.length}}};return d}();x.Po=m})(ggP2VR||(ggP2VR={}));
(function(x){x.Oo=function(){return function(){this.levels=[];this.cg="0x000000";this.wn=!1;this.fn=this.en=.4;this.O=512;this.Da=1;this.Fk=0;this.Hk="";this.Fn=this.height=this.width=0}}();x.xl=function(){return function(){this.height=this.width=0;this.Ve=this.cache=!1;this.ea=this.T=0;this.loaded=!1;this.aa=[]}}();x.Xd=function(){return function(){this.loaded=this.visible=!1;this.me=this.Wk=0;this.vd=[];this.Di=0;this.Me=[];this.Li=this.mh=this.Kd=0}}()})(ggP2VR||(ggP2VR={}));
(function(x){x.Ko=function(){return function(p,m){this.m=p;this.ya=m;var d=this.__div=document.createElement("div");d.ggVisible=!0;var c=document.createElement("img");if(m.ad){var a=m.ad;c.setAttribute("style","position: absolute;width: "+m.De+"px; height: "+m.Hd+"px;top: -"+m.Hd/2+"px;left: -"+m.De/2+"px; "+p.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; "+p.Pa+"user-select: none; max-width: none;");c.setAttribute("src",a);c.ondragstart=function(){return!1};d.appendChild(c);a="position:absolute;"+(p.Pa+"user-select: none;");a+=p.Pa+"touch-callout: none;";a+=p.Pa+"tap-highlight-color: rgba(0,0,0,0);";p.lc&&!p.ia&&(a+=p.Pa+"transform: translateZ(9999999px);");d.setAttribute("style",a);d.onclick=function(){p.hg(m);p.Ok(m.url,m.target);p.la&&p.la.hotspotProxyClick&&
p.la.hotspotProxyClick(m.id,m.url)};d.ondblclick=function(){p.la&&p.la.hotspotProxyDoubleClick&&p.la.hotspotProxyDoubleClick(m.id,m.url)};var b=p.H.rj;if(b.enabled&&""!=m.title){var e=document.createElement("div");a="position:absolute;";a=m.ad?a+("top:\t "+m.Hd/2+"px;"):a+"top:\t 20px;";a=b.Dj?a+"white-space: pre-wrap;":a+"white-space: nowrap;";a+=p.Pa+"transform-origin: 50% 50%;";e.setAttribute("style",a+"visibility: hidden;overflow: hidden;padding: 0px 1px 0px 1px;");e.style.color=this.m.fa(b.sj,
b.qj);e.style.backgroundColor=b.background?this.m.fa(b.ec,b.dc):"transparent";e.style.border="solid "+this.m.fa(b.gc,b.fc)+" "+b.ji+"px";e.style.borderRadius=b.Mj+"px";e.style.textAlign="center";0<b.width?(e.style.left=-b.width/2+"px",e.style.width=b.width+"px"):e.style.width="auto";e.style.height=0<b.height?b.height+"px":"auto";e.style.overflow="hidden";e.innerHTML=m.title;e.classList.add("ggskin");e.classList.add("ggdefaulthotspot");d.onmouseover=function(){0==b.width&&(e.style.left=-e.offsetWidth/
2+"px");e.style.visibility="inherit";p.la&&p.la.hotspotProxyOver&&p.la.hotspotProxyOver(m.id,m.url)};d.onmouseout=function(){e.style.visibility="hidden";p.la&&p.la.hotspotProxyOut&&p.la.hotspotProxyOut(m.id,m.url)};d.appendChild(e)}}}()})(ggP2VR||(ggP2VR={}));
(function(x){x.Zc=function(){return function(){this.value=this.time=0;this.ql="";this.Be=this.Ae=this.ze=this.ye=this.tb=this.type=this.Fb=0;this.gi=""}}();x.ul=function(){return function(){this.Es=this.ap=this.length=0}}();x.tl=function(){return function(){}}()})(ggP2VR||(ggP2VR={}));
(function(x){var p=function(){function m(d){this.m=d;this.enabled=!1;this.zg=1;this.sf=0;this.type="crossdissolve";this.vc=this.sa=this.Uc=0;this.Gj=20;this.Ej=90;this.Fj=20;this.we=1;this.ug=!1;this.ef=this.df=this.fl=0;this.Wd=70;this.Io=0;this.Hb=this.Ho=1;this.di=this.ci=.5;this.xe=!1;this.bk=1}m.prototype.eh=function(){var d=this.m.R,c=d.createShader(d.VERTEX_SHADER);d.shaderSource(c,"attribute vec3 aVertexPosition;\nattribute vec2 aTextureCoord;\nvarying vec2 vTextureCoord;\nuniform bool uZoomIn;\nuniform float uZoomFactor;\nuniform vec2 uZoomCenter;\nvoid main(void) {\n\t gl_Position = vec4(aVertexPosition, 1.0);\n\t if(!uZoomIn) {\n\t \n\t vTextureCoord = aTextureCoord;\n\t }\n\t else {\n\t vTextureCoord = (aTextureCoord - vec2(0.5, 0.5)) * (1.0/uZoomFactor) + uZoomCenter;\n\t }\n}\n");
d.compileShader(c);d.getShaderParameter(c,d.COMPILE_STATUS)||(alert(d.getShaderInfoLog(c)),c=null);var a=d.createShader(d.FRAGMENT_SHADER);d.shaderSource(a,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nvarying vec2 vTextureCoord;\nuniform float uAlpha;\nuniform sampler2D uSampler;\nvoid main(void) {\n vec4 textureColor = texture2D(uSampler, vec2(vTextureCoord.s, vTextureCoord.t));\n gl_FragColor = vec4(textureColor.x, textureColor.y, textureColor.z, uAlpha);\n}\n");
d.compileShader(a);d.getShaderParameter(a,d.COMPILE_STATUS)||(alert(d.getShaderInfoLog(a)),a=null);this.Ba=d.createProgram();d.attachShader(this.Ba,c);d.attachShader(this.Ba,a);d.linkProgram(this.Ba);d.getProgramParameter(this.Ba,d.LINK_STATUS)||alert("Could not initialise shaders");this.Ba.ja=d.getAttribLocation(this.Ba,"aVertexPosition");d.enableVertexAttribArray(this.Ba.ja);this.Ba.Ma=d.getAttribLocation(this.Ba,"aTextureCoord");d.enableVertexAttribArray(this.Ba.Ma);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.gb=d.createProgram();d.attachShader(this.gb,c);d.attachShader(this.gb,a);d.linkProgram(this.gb);d.getProgramParameter(this.gb,d.LINK_STATUS)||alert("Could not initialise shaders");this.gb.ja=d.getAttribLocation(this.gb,"aVertexPosition");d.enableVertexAttribArray(this.gb.ja);this.gb.Ma=d.getAttribLocation(this.gb,"aTextureCoord");d.enableVertexAttribArray(this.gb.Ma);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.Ma=d.getAttribLocation(this.Ua,"aTextureCoord");d.enableVertexAttribArray(this.Ua.Ma);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.Ma=d.getAttribLocation(this.Za,"aTextureCoord");d.enableVertexAttribArray(this.Za.Ma)};m.prototype.Mc=function(){var d=
this.m.R;if(!d)return!1;if(this.uc=d.createFramebuffer()){d.bindFramebuffer(d.FRAMEBUFFER,this.uc);this.uc.width=1024;this.uc.height=1024;this.gf=d.createTexture();d.bindTexture(d.TEXTURE_2D,this.gf);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.uc.width,this.uc.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.uc.width,this.uc.height);d.framebufferTexture2D(d.FRAMEBUFFER,d.COLOR_ATTACHMENT0,d.TEXTURE_2D,this.gf,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.ie=
4;this.dg=d.createBuffer();d.bindBuffer(d.ARRAY_BUFFER,this.dg);d.bufferData(d.ARRAY_BUFFER,new Float32Array([0,0,1,0,0,1,1,1]),d.STATIC_DRAW);return!0}return!1};m.prototype.tn=function(d){var c=this.m.R,a=this.m.zb;if(this.Cd){c.useProgram(this.Ba);c.bindBuffer(c.ARRAY_BUFFER,this.sb);c.vertexAttribPointer(this.Ba.ja,this.sb.itemSize,c.FLOAT,!1,0,0);c.bindBuffer(c.ARRAY_BUFFER,this.dg);c.vertexAttribPointer(this.Ba.Ma,2,c.FLOAT,!1,0,0);c.enableVertexAttribArray(this.Ba.ja);c.enableVertexAttribArray(this.Ba.Ma);
c.activeTexture(c.TEXTURE0);c.bindTexture(c.TEXTURE_2D,this.gf);a=1+(this.Hb-1)*d;var b=c.getUniformLocation(this.Ba,"uAlpha");c.uniform1f(b,1);b=c.getUniformLocation(this.Ba,"uZoomIn");c.uniform1i(b,1);b=c.getUniformLocation(this.Ba,"uZoomCenter");var e=.5+(this.ci-.5)*Math.sqrt(d),f=.5+(this.di-.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.Ba,"uZoomFactor");c.uniform1f(e,a);c.uniform1i(c.getUniformLocation(this.Ba,
"uSampler"),0);c.drawArrays(c.TRIANGLE_STRIP,0,this.sb.ie);c.useProgram(this.m.Aa.P)}else{this.m.Vh();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.ci-.5);f=.5+(this.di-.5);0>e-.5/this.Hb&&(e=.5/this.Hb);0>f-.5/this.Hb&&(f=.5/this.Hb);1<e+.5/this.Hb&&(e=1-.5/this.Hb);1<f+.5/this.Hb&&(f=1-.5/this.Hb);if("crossdissolve"==this.type)c.useProgram(this.Ba),c.bindBuffer(c.ARRAY_BUFFER,this.sb),c.vertexAttribPointer(this.Ba.ja,
this.sb.itemSize,c.FLOAT,!1,0,0),c.bindBuffer(c.ARRAY_BUFFER,this.dg),c.vertexAttribPointer(this.Ba.Ma,2,c.FLOAT,!1,0,0),c.activeTexture(c.TEXTURE0),c.bindTexture(c.TEXTURE_2D,this.gf),b=c.getUniformLocation(this.Ba,"uAlpha"),c.uniform1f(b,1-d),b=c.getUniformLocation(this.Ba,"uZoomIn"),c.uniform1i(b,1==this.sa||2==this.sa||6==this.sa?1:0),b=c.getUniformLocation(this.Ba,"uZoomCenter"),c.uniform2f(b,e,f),e=c.getUniformLocation(this.Ba,"uZoomFactor"),c.uniform1f(e,this.Hb),c.uniform1i(c.getUniformLocation(this.Ba,
"uSampler"),0);else if("diptocolor"==this.type)c.useProgram(this.gb),c.bindBuffer(c.ARRAY_BUFFER,this.sb),c.vertexAttribPointer(this.gb.ja,this.sb.itemSize,c.FLOAT,!1,0,0),c.bindBuffer(c.ARRAY_BUFFER,this.dg),c.vertexAttribPointer(this.gb.Ma,2,c.FLOAT,!1,0,0),c.activeTexture(c.TEXTURE0),c.bindTexture(c.TEXTURE_2D,this.gf),c.uniform1f(c.getUniformLocation(this.gb,"uColorPercent"),Math.min(2*d,1)),b=c.getUniformLocation(this.gb,"uAlpha"),c.uniform1f(b,1-Math.max(2*(d-.5),0)),c.uniform3f(c.getUniformLocation(this.gb,
"uDipColor"),(this.sf>>16&255)/255,(this.sf>>8&255)/255,(this.sf&255)/255),b=c.getUniformLocation(this.gb,"uZoomIn"),c.uniform1i(b,1==this.sa||2==this.sa||6==this.sa?1:0),b=c.getUniformLocation(this.gb,"uZoomCenter"),c.uniform2f(b,e,f),e=c.getUniformLocation(this.gb,"uZoomFactor"),c.uniform1f(e,this.Hb),c.uniform1i(c.getUniformLocation(this.gb,"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.dg);c.vertexAttribPointer(this.Ua.Ma,2,c.FLOAT,!1,0,0);c.activeTexture(c.TEXTURE0);c.bindTexture(c.TEXTURE_2D,this.gf);if(1==this.sa||2==this.sa||6==this.sa||"irisroundcenter"==this.type||"irisrectangularcenter"==this.type)var g=b=.5;else b=this.ci,g=this.di;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.Uc)*d):(h>l?(l=a.height/a.width*h+this.Uc,h+=this.Uc):(h=a.width/a.height*l+this.Uc,l+=this.Uc),c.uniform2f(c.getUniformLocation(this.Ua,"uRectDim"),h*d,l*d));d=c.getUniformLocation(this.Ua,"uSoftEdge");c.uniform1f(d,this.Uc);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.Hb);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.dg),c.vertexAttribPointer(this.Za.Ma,2,c.FLOAT,!1,0,0),c.activeTexture(c.TEXTURE0),c.bindTexture(c.TEXTURE_2D,this.gf),c.uniform1f(c.getUniformLocation(this.Za,"uPercent"),3>this.bk?d*(a.width+this.Uc):d*(a.height+this.Uc)),d=c.getUniformLocation(this.Za,"uSoftEdge"),c.uniform1f(d,this.Uc),c.uniform1i(c.getUniformLocation(this.Za,"uDirection"),this.bk),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.Hb),c.uniform1i(c.getUniformLocation(this.Za,"uSampler"),0);c.drawArrays(c.TRIANGLE_STRIP,0,this.sb.ie);c.useProgram(this.m.Aa.P);c.disable(c.BLEND);c.enable(c.DEPTH_TEST)}};return m}();x.Mo=p})(ggP2VR||(ggP2VR={}));
(function(x){var p=function(){function m(d){this.Th=[];this.m=d;this.enabled=!1;this.Fb=2;this.ni=!1}m.prototype.cm=function(d){if(2==d.mode||3==d.mode||5==d.mode){var c=this.m.ua.currentTime;if(d.Jb&&d.Jb.gain&&d.Ub&&d.Sb&&d.Tb){var a=d.Ub.gain.value,b=d.Sb.gain.value,e=d.Tb.gain.value;d.Jb.gain.linearRampToValueAtTime(d.Jb.gain.value,c);d.Jb.gain.linearRampToValueAtTime(0,c+this.Fb);d.Ub.gain.linearRampToValueAtTime(a,c);d.Ub.gain.linearRampToValueAtTime(0,c+this.Fb);d.Sb.gain.linearRampToValueAtTime(b,
c);d.Sb.gain.linearRampToValueAtTime(0,c+this.Fb);d.Tb.gain.linearRampToValueAtTime(e,c);d.Tb.gain.linearRampToValueAtTime(0,c+this.Fb)}}else c=this.m.ua.currentTime,d.Rb&&d.Rb.gain&&(d.Rb.gain.linearRampToValueAtTime(d.Rb.gain.value,c),d.Rb.gain.linearRampToValueAtTime(0,c+this.Fb));d.ui=!0;setTimeout(function(){d.We()},1E3*this.Fb+5)};m.prototype.rs=function(){for(var d=0;d<this.m.X.length;d++){var c=this.m.X[d];-1==this.m.Ud.indexOf(c.id)&&(-1==this.m.Ud.indexOf("_main")||-1!=this.m.hf.indexOf(c.id))&&
!this.m.isPlaying(c.id)&&-1<c.loop&&4!=c.mode&&6!=c.mode&&(c.xa?c.Gd():(c.Ed&&c.vg(),c.f.play(),c.f.currentTime=0))}};m.prototype.Cp=function(){var d=(this.m.ua.currentTime-this.ns)/this.Fb;d=Math.min(1,d);for(var c=0;c<this.m.X.length;c++){var a=this.m.X[c];this.m.isPlaying(a.id)&&1>a.pa&&(a.pa=d)}1==d&&clearInterval(this.ms)};return m}();x.No=p})(ggP2VR||(ggP2VR={}));
(function(x){var p=function(){function m(d){this.qh=[];this.nd=null;this.sc=[];this.jc=[];this.tc=[];this.bl=!0;this.m=d;this.tp()}m.prototype.eh=function(){var d=this.m.R,c=d.createShader(d.VERTEX_SHADER);d.shaderSource(c,"attribute vec3 aVertexPosition;\nvoid main(void) {\n gl_Position = vec4(aVertexPosition, 1.0);\n}\n");d.compileShader(c);d.getShaderParameter(c,d.COMPILE_STATUS)||(alert(d.getShaderInfoLog(c)),c=null);var a=d.createShader(d.FRAGMENT_SHADER);d.shaderSource(a,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nvarying vec4 vColor;\nuniform vec2 uCanvasDimensions;\nuniform vec2 uFlareCenterPosition;\nuniform float uBlindingValue;\nuniform float uAspectRatio;\nvoid main(void) {\n float canvasDiag = sqrt( (uCanvasDimensions.x * uCanvasDimensions.x) + (uCanvasDimensions.y * uCanvasDimensions.y) );\n vec2 diff = uFlareCenterPosition - gl_FragCoord.xy;\n diff.y = diff.y * uAspectRatio;\n float distFromFlarePoint = sqrt( (diff.x * diff.x) + (diff.y * diff.y) );\n float factor = (distFromFlarePoint / canvasDiag) / 10.0;\n gl_FragColor = vec4(1.0, 1.0, 1.0, pow(((1.0 - factor) * 0.8) * uBlindingValue, 2.0));\n}\n");
d.compileShader(a);d.getShaderParameter(a,d.COMPILE_STATUS)||(alert(d.getShaderInfoLog(a)),a=null);this.xc=d.createProgram();d.attachShader(this.xc,c);d.attachShader(this.xc,a);d.linkProgram(this.xc);d.getProgramParameter(this.xc,d.LINK_STATUS)||alert("Could not initialise shaders");this.xc.ja=d.getAttribLocation(this.xc,"aVertexPosition");d.enableVertexAttribArray(this.xc.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.Eb=d.createProgram();d.attachShader(this.Eb,c);d.attachShader(this.Eb,a);d.linkProgram(this.Eb);d.getProgramParameter(this.Eb,d.LINK_STATUS)||alert("Could not initialise shaders");this.Eb.ja=d.getAttribLocation(this.Eb,"aVertexPosition")};m.prototype.Mc=function(){var d=this.m.R;this.Jd=d.createBuffer();d.bindBuffer(d.ARRAY_BUFFER,this.Jd);d.bufferData(d.ARRAY_BUFFER,new Float32Array([-1,-1,0,1,
-1,0,1,1,0,-1,1,0]),d.STATIC_DRAW);this.Jd.itemSize=3;this.Jd.ie=4;this.Ff=d.createBuffer();d.bindBuffer(d.ARRAY_BUFFER,this.Ff);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.Ff.itemSize=3;this.Ff.ie=e;this.In=d.createTexture();d.bindTexture(d.TEXTURE_2D,this.In);d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MIN_FILTER,d.LINEAR);d.texParameteri(d.TEXTURE_2D,
d.TEXTURE_MAG_FILTER,d.LINEAR);d.texParameteri(d.TEXTURE_2D,d.TEXTURE_WRAP_S,d.CLAMP_TO_EDGE);d.texParameteri(d.TEXTURE_2D,d.TEXTURE_WRAP_T,d.CLAMP_TO_EDGE);c=document.createElement("canvas");c.width=100;c.height=1;a=c.getContext("2d");a.width=100;a.height=1;b=a.createLinearGradient(0,0,100,0);b.addColorStop(0,this.m.fa(0,0));b.addColorStop(.88,this.m.fa(0,0));b.addColorStop(.9,this.m.fa(16654848,1));b.addColorStop(.92,this.m.fa(16776448,1));b.addColorStop(.94,this.m.fa(4849466,1));b.addColorStop(.96,
this.m.fa(131071,1));b.addColorStop(.98,this.m.fa(8190,1));b.addColorStop(1,this.m.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.Cr=function(){for(;0<this.qh.length;)this.qh.pop()};m.prototype.tp=function(){var d=[],c=[],a=[];var b={radius:14,alpha:.2,color:11390415,A:.27};d.push(b);b={radius:20,alpha:.25,color:11390415,A:.4};d.push(b);b={radius:10,alpha:.2,color:12442332,A:.6};d.push(b);b={radius:15,alpha:.2,color:11390415,
A:.8};d.push(b);b={radius:10,alpha:.2,color:12442332,A:1.5};d.push(b);b={radius:15,alpha:.2,color:11390415,A:1.8};d.push(b);b={radius:8,alpha:.2,color:12575203,G:.8,A:.7};c.push(b);b={radius:7,alpha:.4,color:12575203,G:.5,A:1.6};c.push(b);b={radius:5,alpha:.4,color:12575203,G:.6,A:.9};c.push(b);b={radius:8,alpha:.3,color:12575203,G:.4,A:1.1};c.push(b);this.sc.push(d);this.jc.push(c);this.tc.push(a);d=[];c=[];a=[];b={radius:30,alpha:.3,color:11390415,A:.5};d.push(b);b={radius:10,alpha:.3,color:11390415,
A:1};d.push(b);b={radius:20,alpha:.3,color:11390415,A:1.3};d.push(b);b={radius:10,alpha:.3,color:11390415,A:1.5};d.push(b);b={radius:15,alpha:.3,color:11390415,A:1.8};d.push(b);b={radius:10,alpha:.3,color:15506856,G:.8,A:.7};c.push(b);b={radius:20,alpha:.5,color:15506856,G:.5,A:1.6};c.push(b);b={radius:5,alpha:.5,color:15506856,G:.6,A:.9};c.push(b);b={radius:60,alpha:.4,color:15506856,G:.2,A:1.1};c.push(b);a.push({radius:220,alpha:.035,A:2});this.sc.push(d);this.jc.push(c);this.tc.push(a);d=[];c=
[];a=[];b={radius:30,alpha:.5,color:15465727,A:.5};d.push(b);b={radius:40,alpha:.28,color:15726842,A:.8};d.push(b);b={radius:25,alpha:.32,color:15726842,A:1.1};d.push(b);b={radius:15,alpha:.25,color:15726842,A:1.35};d.push(b);b={radius:10,alpha:.28,color:15465727,A:1.65};d.push(b);b={radius:10,alpha:.45,color:15465727,G:.8,A:.7};c.push(b);b={radius:7,alpha:.5,color:15465727,G:.4,A:.9};c.push(b);b={radius:40,alpha:.4,color:15465727,G:.3,A:.38};c.push(b);b={radius:50,alpha:.4,color:15465727,G:.5,A:1.25};
c.push(b);b={radius:18,alpha:.2,color:15465727,G:.5,A:1.25};c.push(b);b={radius:10,alpha:.34,color:15726842,G:.8,A:1.5};c.push(b);b={radius:38,alpha:.37,color:15465727,G:.3,A:-.5};c.push(b);this.sc.push(d);this.jc.push(c);this.tc.push(a);d=[];c=[];a=[];b={radius:16,alpha:.5,color:16363159,A:.1};d.push(b);b={radius:26,alpha:.3,color:16091819,A:.32};d.push(b);b={radius:29,alpha:.2,color:16091819,A:1.32};d.push(b);b={radius:20,alpha:.18,color:16363159,A:1.53};d.push(b);b={radius:27,alpha:.13,color:16425092,
A:1.6};d.push(b);b={radius:20,alpha:.1,color:16091819,A:1.75};d.push(b);b={radius:12,alpha:.45,color:16312238,G:.45,A:.2};c.push(b);b={radius:8,alpha:.25,color:16434209,G:.7,A:.33};c.push(b);b={radius:9,alpha:.25,color:16091819,G:.4,A:.7};c.push(b);b={radius:7,alpha:.2,color:16091819,G:.4,A:.85};c.push(b);b={radius:60,alpha:.23,color:16091819,G:.55,A:1.05};c.push(b);b={radius:37,alpha:.1,color:16091819,G:.55,A:1.22};c.push(b);b={radius:10,alpha:.25,color:16363159,G:.65,A:1.38};c.push(b);b={radius:7,
alpha:.2,color:16434209,G:.5,A:1.45};c.push(b);b={radius:3,alpha:.2,color:16416033,G:.5,A:1.78};c.push(b);b={radius:6,alpha:.18,color:16434209,G:.45,A:1.9};c.push(b);b={radius:4,alpha:.14,color:16766514,G:.45,A:2.04};c.push(b);b={radius:30,alpha:.14,color:16766514,G:.8,A:.04};c.push(b);this.sc.push(d);this.jc.push(c);this.tc.push(a);d=[];c=[];a=[];b={radius:9,alpha:.3,color:14346999,G:.3,A:.3};c.push(b);b={radius:5,alpha:.5,color:14148072,G:.8,A:.6};c.push(b);b={radius:3,alpha:.37,color:14346999,
G:.66,A:.8};c.push(b);b={radius:45,alpha:.2,color:14346999,G:.36,A:1.2};c.push(b);b={radius:13,alpha:.2,color:14346999,G:.36,A:1.23};c.push(b);b={radius:11,alpha:.2,color:14148072,G:.36,A:1.28};c.push(b);b={radius:27,alpha:.16,color:14346999,G:.36,A:1.55};c.push(b);b={radius:6,alpha:.36,color:14148072,G:.8,A:1.7};c.push(b);this.sc.push(d);this.jc.push(c);this.tc.push(a);d=[];c=[];a=[];b={radius:24,alpha:.2,color:15186464,A:.2};d.push(b);b={radius:7,alpha:.26,color:15186464,A:.35};d.push(b);b={radius:23,
alpha:.18,color:15186464,A:.65};d.push(b);b={radius:13,alpha:.2,color:15186464,A:.8};d.push(b);b={radius:11,alpha:.15,color:15186464,A:1.4};d.push(b);b={radius:15,alpha:.11,color:15451904,A:1.6};d.push(b);b={radius:6,alpha:.45,color:15579138,G:.45,A:.22};c.push(b);b={radius:3,alpha:.3,color:15451904,G:.25,A:.4};c.push(b);b={radius:4,alpha:.2,color:15451904,G:.25,A:.45};c.push(b);b={radius:65,alpha:.17,color:15186464,G:.25,A:.5};c.push(b);b={radius:5,alpha:.45,color:15579138,G:.45,A:.88};c.push(b);
b={radius:140,alpha:.18,color:15579138,G:.32,A:.95};c.push(b);b={radius:12,alpha:.22,color:15579138,G:.32,A:1.1};c.push(b);b={radius:8,alpha:.32,color:15451904,G:.72,A:1.2};c.push(b);b={radius:55,alpha:.2,color:15451904,G:.45,A:1.33};c.push(b);b={radius:4,alpha:.3,color:15451904,G:.25,A:1.42};c.push(b);this.sc.push(d);this.jc.push(c);this.tc.push(a);d=[];c=[];a=[];b={radius:16,alpha:.4,color:10933495,A:.32};d.push(b);b={radius:14,alpha:.3,color:11007484,A:.36};d.push(b);b={radius:10,alpha:.3,color:4037331,
A:.58};d.push(b);b={radius:14,alpha:.22,color:8835068,A:.68};d.push(b);b={radius:10,alpha:.27,color:11007484,A:.82};d.push(b);b={radius:11,alpha:.27,color:10867450,A:1};d.push(b);b={radius:9,alpha:.2,color:6158332,A:1.05};d.push(b);b={radius:10,alpha:.17,color:10867450,A:1.78};d.push(b);b={radius:10,alpha:.3,color:4037331,A:-.23};d.push(b);b={radius:8,alpha:.45,color:8835068,G:.45,A:.175};c.push(b);b={radius:7,alpha:.4,color:12574715,G:.55,A:.46};c.push(b);b={radius:3,alpha:.3,color:10867450,G:.35,
A:.5};c.push(b);b={radius:60,alpha:.37,color:4031699,G:.75,A:.75};c.push(b);b={radius:3,alpha:.25,color:4031699,G:.25,A:.75};c.push(b);b={radius:3,alpha:.2,color:6158332,G:.25,A:.9};c.push(b);b={radius:7,alpha:.45,color:8835068,G:.45,A:1.3};c.push(b);b={radius:32,alpha:.22,color:8835068,G:.75,A:1.62};c.push(b);b={radius:9,alpha:.45,color:4031699,G:.65,A:1.6};c.push(b);b={radius:8,alpha:.25,color:4031699,G:.65,A:1.83};c.push(b);b={radius:7,alpha:.4,color:12574715,G:.55,A:-.18};c.push(b);this.sc.push(d);
this.jc.push(c);this.tc.push(a);d=[];c=[];a=[];b={radius:16,alpha:.4,color:16389120,A:.32};d.push(b);b={radius:26,alpha:.22,color:16389120,A:.4};d.push(b);b={radius:26,alpha:.25,color:16389120,A:.65};d.push(b);b={radius:18,alpha:.3,color:16389120,A:1.23};d.push(b);b={radius:14,alpha:.26,color:16389120,A:1.33};d.push(b);b={radius:17,alpha:.18,color:16389120,A:1.7};d.push(b);b={radius:30,alpha:.16,color:16389120,A:2.15};d.push(b);b={radius:100,alpha:.25,color:16389120,G:.22,A:1.45};c.push(b);b={radius:7,
alpha:.5,color:15628151,G:.3,A:1.5};c.push(b);b={radius:3,alpha:.5,color:15628151,G:.3,A:1.52};c.push(b);b={radius:4,alpha:.5,color:16389120,G:.3,A:1.745};c.push(b);b={radius:9,alpha:.22,color:16389120,G:.3,A:1.8};c.push(b);this.sc.push(d);this.jc.push(c);this.tc.push(a);d=[];c=[];a=[];b={radius:16,alpha:.4,color:10933495,A:.32};d.push(b);b={radius:14,alpha:.3,color:11007484,A:.36};d.push(b);b={radius:10,alpha:.3,color:4037331,A:.58};d.push(b);b={radius:14,alpha:.22,color:8835068,A:.68};d.push(b);
b={radius:10,alpha:.27,color:11007484,A:.82};d.push(b);b={radius:11,alpha:.27,color:10867450,A:1};d.push(b);b={radius:9,alpha:.2,color:6158332,A:1.05};d.push(b);b={radius:10,alpha:.17,color:10867450,A:1.78};d.push(b);b={radius:10,alpha:.3,color:4037331,A:-.23};d.push(b);b={radius:8,alpha:.45,color:8835068,G:.45,A:.175};c.push(b);b={radius:7,alpha:.4,color:12574715,G:.55,A:.46};c.push(b);b={radius:3,alpha:.3,color:10867450,G:.35,A:.5};c.push(b);b={radius:60,alpha:.37,color:4031699,G:.75,A:.75};c.push(b);
b={radius:3,alpha:.25,color:4031699,G:.25,A:.75};c.push(b);b={radius:3,alpha:.2,color:6158332,G:.25,A:.9};c.push(b);b={radius:7,alpha:.45,color:8835068,G:.45,A:1.3};c.push(b);b={radius:32,alpha:.22,color:8835068,G:.75,A:1.62};c.push(b);b={radius:9,alpha:.45,color:4031699,G:.65,A:1.6};c.push(b);b={radius:8,alpha:.25,color:4031699,G:.65,A:1.83};c.push(b);b={radius:7,alpha:.4,color:12574715,G:.55,A:-.18};c.push(b);this.sc.push(d);this.jc.push(c);this.tc.push(a);d=[];c=[];a=[];b={radius:16,alpha:.4,color:16389120,
A:.32};d.push(b);b={radius:26,alpha:.22,color:16389120,A:.4};d.push(b);b={radius:26,alpha:.25,color:16389120,A:.65};d.push(b);b={radius:18,alpha:.3,color:16389120,A:1.23};d.push(b);b={radius:14,alpha:.26,color:16389120,A:1.33};d.push(b);b={radius:17,alpha:.18,color:16389120,A:1.7};d.push(b);b={radius:30,alpha:.16,color:16389120,A:2.15};d.push(b);b={radius:100,alpha:.25,color:16389120,G:.22,A:1.45};c.push(b);b={radius:7,alpha:.5,color:15628151,G:.3,A:1.5};c.push(b);b={radius:3,alpha:.5,color:15628151,
G:.3,A:1.52};c.push(b);b={radius:4,alpha:.5,color:16389120,G:.3,A:1.745};c.push(b);b={radius:9,alpha:.22,color:16389120,G:.3,A:1.8};c.push(b);this.sc.push(d);this.jc.push(c);this.tc.push(a);d=[];c=[];a=[];b={radius:24,alpha:.2,color:15186464,A:.2};d.push(b);b={radius:7,alpha:.26,color:15186464,A:.35};d.push(b);b={radius:23,alpha:.18,color:15186464,A:.65};d.push(b);b={radius:13,alpha:.2,color:15186464,A:.8};d.push(b);b={radius:11,alpha:.15,color:15186464,A:1.4};d.push(b);b={radius:15,alpha:.11,color:15451904,
A:1.6};d.push(b);b={radius:6,alpha:.45,color:15579138,G:.45,A:.22};c.push(b);b={radius:3,alpha:.3,color:15451904,G:.25,A:.4};c.push(b);b={radius:4,alpha:.2,color:15451904,G:.25,A:.45};c.push(b);b={radius:65,alpha:.17,color:15186464,G:.25,A:.5};c.push(b);b={radius:5,alpha:.45,color:15579138,G:.45,A:.88};c.push(b);b={radius:140,alpha:.18,color:15579138,G:.32,A:.95};c.push(b);b={radius:12,alpha:.22,color:15579138,G:.32,A:1.1};c.push(b);b={radius:8,alpha:.32,color:15451904,G:.72,A:1.2};c.push(b);b={radius:55,
alpha:.2,color:15451904,G:.45,A:1.33};c.push(b);b={radius:4,alpha:.3,color:15451904,G:.25,A:1.42};c.push(b);this.sc.push(d);this.jc.push(c);this.tc.push(a)};m.prototype.lr=function(){if(this.bl){var d=this.m.R,c,a=new x.Ga(0,0,-100),b=this.m.td(),e=0,f=0,g=!1;if(this.m.ia){var h=this.m.zb.width;var l=this.m.zb.height;this.m.J.Sh&&(h=this.m.J.uc.width,l=this.m.J.uc.height)}else{this.Z||(this.Z=this.nd.getContext("2d"));if(this.Z.width!==this.m.C.width||this.Z.height!==this.m.C.height)this.Z.width=
this.m.C.width,this.Z.height=this.m.C.height;this.Z.clear?this.Z.clear():this.Z.clearRect(0,0,this.nd.width,this.nd.height);h=this.Z.width;l=this.Z.height}var k=Math.sqrt(h*h+l*l),w=k/800;for(c=0;c<this.qh.length;c++){var r=this.qh[c];a.init(0,0,-100);a.Fa(-r.v*Math.PI/180);a.La(r.pan*Math.PI/180);a.La(-this.m.pan.j*Math.PI/180);a.Fa(this.m.v.j*Math.PI/180);a.ob(this.m.U.j*Math.PI/180);if(-.01>a.z){f=-b/a.z;e=a.x*f;f*=a.y;var y=Math.max(h,l);Math.abs(e)<y/2+100&&Math.abs(f)<y/2+100&&(g=!0,e+=h/2,
f+=l/2)}if(g){this.m.ia&&(d.blendFunc(d.SRC_ALPHA,d.ONE),d.enable(d.BLEND),d.disable(d.DEPTH_TEST));y=h/2;var z=l/2;var ha=Math.sqrt((y-e)*(y-e)+(z-f)*(z-f));var ua=k/2;z=h>l?h:l;y=r.Il/100*((ua-ha)/ua);0>y&&(y=0);if(this.m.ia){d.useProgram(this.xc);d.bindBuffer(d.ARRAY_BUFFER,this.m.J.sb);d.vertexAttribPointer(this.xc.ja,this.m.J.sb.itemSize,d.FLOAT,!1,0,0);var id=d.getUniformLocation(this.xc,"uCanvasDimensions");d.uniform2f(id,d.drawingBufferWidth,d.drawingBufferHeight);d.uniform2f(d.getUniformLocation(this.xc,
"uFlareCenterPosition"),d.drawingBufferWidth/h*e,l-d.drawingBufferHeight/l*f);d.uniform1f(d.getUniformLocation(this.xc,"uBlindingValue"),y);id=d.getUniformLocation(this.xc,"uAspectRatio");d.uniform1f(id,this.m.J.Sh?d.drawingBufferWidth/d.drawingBufferHeight:d.drawingBufferWidth/d.drawingBufferHeight/(h/l));d.drawArrays(d.TRIANGLE_STRIP,0,this.m.J.sb.ie)}else id=this.Z.createRadialGradient(e,f,1,e,f,z),id.addColorStop(0,"rgba(255, 255, 255, "+y+")"),id.addColorStop(.5,"rgba(255, 255, 255, "+.8*y+")"),
id.addColorStop(1,"rgba(255, 255, 255, "+.6*y+")"),this.Z.fillStyle=id,this.Z.fillRect(0,0,this.Z.width,this.Z.height);if(0!=Number(r.type)&&!this.m.J.Sh){y=h/2-e;z=l/2-f;var sh=1,db=Number(r.type)-1;ha<.35*ua&&(sh=ha/(.35*ua),sh*=sh);ha>.7*ua&&(sh=(ua-ha)/(.3*ua));sh*=r.alpha/100;if(0<this.sc[db].length)for(ha=0;ha<this.sc[db].length;ha++){var gl=this.sc[db][ha];ua=gl.radius*w;var tf=gl.alpha*sh;0>tf&&(tf=0);var hl=gl.color;if(8==db||9==db||10==db)hl=r.color;if(this.m.ia)d.useProgram(this.Ca),d.bindBuffer(d.ARRAY_BUFFER,
this.Ff),d.vertexAttribPointer(this.Ca.ja,this.Ff.itemSize,d.FLOAT,!1,0,0),id=d.getUniformLocation(this.Ca,"uCanvasDimensions2"),d.uniform2f(id,d.drawingBufferWidth,d.drawingBufferHeight),d.uniform2f(d.getUniformLocation(this.Ca,"uCirclePosition"),d.drawingBufferWidth/h*(e+y*gl.A),d.drawingBufferWidth/h*(l-(f+z*gl.A))),d.uniform2f(d.getUniformLocation(this.Ca,"uCircleTexturePosition"),d.drawingBufferWidth/h*(e+y*gl.A),l-(f+z*gl.A)),d.uniform1f(d.getUniformLocation(this.Ca,"uCircleRadius"),ua),d.uniform3f(d.getUniformLocation(this.Ca,
"uCircleColor"),(hl>>16&255)/255,(hl>>8&255)/255,(hl&255)/255),d.uniform1f(d.getUniformLocation(this.Ca,"uCircleAlpha"),tf),d.uniform1f(d.getUniformLocation(this.Ca,"uCircleSoftness"),.1),id=d.getUniformLocation(this.Ca,"uAspectRatio"),d.uniform1f(id,d.drawingBufferWidth/d.drawingBufferHeight/(h/l)),d.drawArrays(d.TRIANGLE_FAN,0,this.Ff.ie);else{this.Z.save();this.Z.translate(e+y*gl.A,f+z*gl.A);id=this.Z.createRadialGradient(0,0,1,0,0,1.1*ua);id.addColorStop(0,this.m.fa(hl,tf));id.addColorStop(.65,
this.m.fa(hl,.9*tf));id.addColorStop(.8,this.m.fa(hl,.7*tf));id.addColorStop(1,this.m.fa(hl,.2*tf));this.Z.beginPath();hl=2*Math.PI/6;gl=Math.PI/180*35;var il=!0;for(tf=gl;tf<=gl+2*Math.PI;tf+=hl)il?(this.Z.moveTo(ua*Math.sin(tf),ua*Math.cos(tf)),il=!1):this.Z.lineTo(ua*Math.sin(tf),ua*Math.cos(tf));this.Z.closePath();this.Z.fillStyle=id;this.Z.fill();this.Z.restore()}}if(0<this.jc[db].length)for(ha=0;ha<this.jc[db].length;ha++){gl=this.jc[db][ha];ua=gl.radius*w;tf=gl.alpha*sh;0>tf&&(tf=0);hl=gl.color;
if(8==db||9==db||10==db)hl=r.color;this.m.ia?(d.useProgram(this.Ca),d.bindBuffer(d.ARRAY_BUFFER,this.Jd),d.vertexAttribPointer(this.Ca.ja,this.Jd.itemSize,d.FLOAT,!1,0,0),id=d.getUniformLocation(this.Ca,"uCanvasDimensions2"),d.uniform2f(id,d.drawingBufferWidth,d.drawingBufferHeight),id=d.getUniformLocation(this.Ca,"uCirclePosition"),d.uniform2f(id,d.drawingBufferWidth/h*(e+y*gl.A),d.drawingBufferWidth/h*(l-(f+z*gl.A))),id=d.getUniformLocation(this.Ca,"uCircleTexturePosition"),d.uniform2f(id,d.drawingBufferWidth/
h*(e+y*gl.A),l-(f+z*gl.A)),id=d.getUniformLocation(this.Ca,"uCircleRadius"),d.uniform1f(id,ua),d.uniform3f(d.getUniformLocation(this.Ca,"uCircleColor"),(hl>>16&255)/255,(hl>>8&255)/255,(hl&255)/255),d.uniform1f(d.getUniformLocation(this.Ca,"uCircleAlpha"),tf),d.uniform1f(d.getUniformLocation(this.Ca,"uCircleSoftness"),gl.G),id=d.getUniformLocation(this.Ca,"uAspectRatio"),d.uniform1f(id,d.drawingBufferWidth/d.drawingBufferHeight/(h/l)),d.drawArrays(d.TRIANGLE_FAN,0,this.Jd.ie)):(this.Z.save(),this.Z.translate(e+
y*gl.A,f+z*gl.A),id=this.Z.createRadialGradient(0,0,1,0,0,ua),id.addColorStop(0,this.m.fa(hl,tf)),id.addColorStop(1-gl.G,this.m.fa(hl,.8*tf)),id.addColorStop(1,this.m.fa(hl,0)),this.Z.beginPath(),this.Z.arc(0,0,ua,0,2*Math.PI,!1),this.Z.closePath(),this.Z.fillStyle=id,this.Z.fill(),this.Z.restore())}if(0<this.tc[db].length)for(ha=0;ha<this.tc[db].length;ha++)r=this.tc[db][ha],ua=r.radius*w,tf=r.alpha*sh,0>tf&&(tf=0),this.m.ia?(d.useProgram(this.Eb),d.activeTexture(d.TEXTURE0),d.bindTexture(d.TEXTURE_2D,
this.In),d.bindBuffer(d.ARRAY_BUFFER,this.Jd),d.vertexAttribPointer(this.Eb.ja,this.Jd.itemSize,d.FLOAT,!1,0,0),id=d.getUniformLocation(this.Eb,"uCanvasDimensions2"),d.uniform2f(id,h,l),id=d.getUniformLocation(this.Eb,"uCirclePosition"),d.uniform2f(id,e+y*r.A,l-(f+z*r.A)),id=d.getUniformLocation(this.Eb,"uRingTexturePosition"),d.uniform2f(id,d.drawingBufferWidth/h*(e+y*r.A),l-(f+z*r.A)),id=d.getUniformLocation(this.Eb,"uCircleRadius"),d.uniform1f(id,ua),d.uniform2f(d.getUniformLocation(this.Eb,"uRingPosition"),
e+y*r.A,l-(f+z*r.A)),d.uniform1f(d.getUniformLocation(this.Eb,"uRingRadius"),ua),d.uniform1f(d.getUniformLocation(this.Eb,"uRingAlpha"),tf),id=d.getUniformLocation(this.Eb,"uAspectRatio"),d.uniform1f(id,d.drawingBufferWidth/d.drawingBufferHeight/(h/l)),d.uniform1i(d.getUniformLocation(this.Eb,"uSampler"),0),d.drawArrays(d.TRIANGLE_FAN,0,this.Jd.ie)):(this.Z.save(),this.Z.translate(e+y*r.A,f+z*r.A),id=this.Z.createRadialGradient(0,0,0,0,0,ua),id.addColorStop(0,this.m.fa(16777215,0)),id.addColorStop(.88,
this.m.fa(0,0)),id.addColorStop(.9,this.m.fa(16654848,tf)),id.addColorStop(.92,this.m.fa(16776448,tf)),id.addColorStop(.94,this.m.fa(4849466,tf)),id.addColorStop(.96,this.m.fa(131071,tf)),id.addColorStop(.98,this.m.fa(8190,tf)),id.addColorStop(1,this.m.fa(0,0)),this.Z.beginPath(),this.Z.arc(0,0,ua,0,2*Math.PI,!1),this.Z.closePath(),this.Z.fillStyle=id,this.Z.fill(),this.Z.restore())}this.m.ia&&(d.useProgram(this.m.Aa.P),d.disable(d.BLEND),d.enable(d.DEPTH_TEST))}}}};return m}();x.Lo=p})(ggP2VR||(ggP2VR=
{}));var THREE;
(function(x){var p=function(){function m(d){this.xd=[];this.qa={x:0,y:0};this.Qc={x:0,y:0};this.xh=0;this.ne=null;this.kk=!1;this.sl=this.Te=0;this.xk=this.Bj=!1;this.m=null;this.Yk=!0;this.Gf=1;this.Fi=[];this.frustumCulled=!1;this.dh=0;this.Oj=this.Do=this.qn=!1;this.Uf=[-1,-1,-1,-1];this.Ni=[];this.Pe=[];this.m=d;var c=this;setTimeout(function(){if(window.WebXRPolyfill&&window.Promise){var a={cardboardConfig:{BUFFER_SCALE:1}};Il&&(a.allowCardboardOnDesktop=!0);try{new window.WebXRPolyfill(a),d.N("WebXR Polyfill loaded!")}catch(b){}}c.Fq()},
0);THREE?this.Hl():console.log("Three.js not available!")}m.prototype.vp=function(){this.init();this.animate()};m.prototype.Hl=function(){this.ll=new THREE.Matrix4;this.pn=new THREE.Euler};m.prototype.init=function(){"xr"in navigator||console.log("no WebXR support");if(THREE)if(this.Db)console.log("already set up!");else{this.ll||this.Hl();var d=this,c=this.pd=this.m.pd,a=this.Hr=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.Db=b=new THREE.WebGLRenderer({depth:!0,logarithmicDepthBuffer:!0,alpha:!0,antialias:!0,stencil:!0});b.setClearColor(new THREE.Color(0),1);b.setPixelRatio(window.devicePixelRatio);b.setSize(window.innerWidth,window.innerHeight);b.outputEncoding=THREE.GammaEncoding;b.shadowMap.enabled=!1;c.appendChild(b.domElement);"xr"in navigator&&(b.xr.enabled=!0,b.xr.setReferenceSpaceType("local"));var e=this.Hg=new THREE.Group;c=this.Wj=
b.xr.getController(0);c.addEventListener("selectstart",function(g){d.rn(g)});c.addEventListener("selectend",function(){});c.visible=!0;e.add(c);b=this.Xj=b.xr.getController(1);b.addEventListener("selectstart",function(g){d.rn(g)});b.addEventListener("selectend",function(){});b.visible=!0;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.Hh=new THREE.Raycaster;this.qa=new THREE.Vector2;this.Zf=new THREE.Group;this.Of=new THREE.Group;this.wd=new THREE.Group;this.gk=new THREE.Group;this.Pj=new THREE.Group;this.Zf.add(this.wd);this.Zf.add(this.gk);this.Zf.add(this.Of);a.add(this.Zf);a.add(this.Pj);a=document.createElement("canvas");a.width=64;a.height=64;c=a.getContext("2d");c.fillStyle="black";c.lineWidth=3;c.beginPath();c.arc(32,32,10,0,2*Math.PI);c.stroke();a=new THREE.Texture(a);
a.needsUpdate=!0;a.encoding=THREE.sRGBEncoding;e=new THREE.PlaneBufferGeometry(2,2,8);a=new THREE.MeshBasicMaterial({map:a});a.transparent=!0;a=new THREE.Mesh(e,a);a.position.z=-50;this.Pj.add(a);window.addEventListener("resize",function(){d.ir()},!1);document.addEventListener("mouseup",function(){d.er()},!1);document.addEventListener("mousedown",function(g){d.cr(g)},!1);document.addEventListener("mousemove",function(g){d.dr(g)},!1)}else console.log("Three.js not available!")};m.prototype.$n=function(){var d=
this.m;d.N("VR not found");d.L("vrchanged",{});d.L("playerstatechanged",{})};m.prototype.js=function(){this.xk=!0;var d=this.m;d.N("XR found");d.L("vrchanged",{});d.L("playerstatechanged",{})};m.prototype.Fq=function(){if(!this.Do){this.Do=!0;var d=this;if("xr"in navigator)navigator.xr.isSessionSupported("immersive-vr").then(function(c){c?d.js():d.$n()})["catch"](d.$n)}};m.prototype.gh=function(){return null!=this.ne?this.Db.xr.isPresenting:!1};m.prototype.Ne=function(){return this.xk&&THREE};m.prototype.gr=
function(d){var c=this;this.fi();d.addEventListener("end",function(){c.fr()});console.log("XR Session started.");this.Db.xr.setSession(d);this.kk=!0;this.ne=d};m.prototype.fr=function(){console.log("XR Session ended.");this.kk=!1;this.ne=null;this.Vj()};m.prototype.Bf=function(){var d=this.m;if(this.xk){if(null===this.ne){var c=this;navigator.xr.requestSession("immersive-vr",{optionalFeatures:["local-floor","bounded-floor"]}).then(function(b){c.gr(b)})["catch"](function(b){console.log(b);console.warn("'immersive-vr' isn't supported, or an error occurred activating VR!");
c.Vj()})}this.wd&&this.wd.translateY(-this.dh);this.dh=0;if(1==this.Gf){var a=navigator.userAgent;0<=a.indexOf("OculusBrowser")&&(0<=a.indexOf("Pacific")&&(this.Gf=1.7),0<=a.indexOf("Quest")&&(this.Gf=1.5))}this.Db.xr.setFramebufferScaleFactor(this.Gf);d.Oc("Enter VR - scaled "+this.Gf)}else this.fi()};m.prototype.jr=function(){if(THREE&&this.Db){var d=this.m;d.ve=!0;d.$.style.display="none";d.$a.style.display="none";this.Db.domElement.style.display="inline";d.L("vrchanged",{});d.L("playerstatechanged",
{})}};m.prototype.Vj=function(){if(THREE&&this.Db){var d=this.m;d.ve=!1;d.$.style.display="inline";d.$a.style.display="inline";this.Db.domElement.style.display="none";d.gj(0);d.Hc();d.update();d.L("vrchanged",{});d.L("playerstatechanged",{})}};m.prototype.Cf=function(){null!=this.ne&&this.ne.end()};m.prototype.oo=function(){this.gh()?this.Cf():this.Bf()};m.prototype.em=function(){var d=0,c=this.m;var a=1536;this.Db&&c.N("Canvas: "+a);a*=Math.pow(2,0);if(0<c.u.levels.length){for(;c.u.levels.length>=
d+2&&!c.u.levels[d+1].Ve&&c.u.levels[d+1].width>a;)d++;c.N("Level "+d+" - width: "+c.u.levels[d].width);c.N(c.u.levels)}return d};m.prototype.Bm=function(d){var c=this.m,a=c.te[d];d="";if(a){a=a.firstChild;for(var b;a;)"input"==a.nodeName&&(b=a)&&(b=0<c.u.levels.length?b.getAttributeNode("leveltileurl"):b.getAttributeNode("tilevrurl"))&&(d=b.nodeValue),a=a.nextSibling}else d=0<c.u.levels.length?c.u.Hk:c.Ul;for(a=0;3>a;a++)d=c.Ob(d,"c","vr"),d=c.Ob(d,"s","vr"),d=c.Ob(d,"r",0),d=c.Ob(d,"l",0),d=c.Ob(d,
"x",0),d=c.Ob(d,"y",0),d=c.Ob(d,"v",0),d=c.Ob(d,"h",0);return c.eb(d)};m.prototype.ceilPowerOfTwo=function(d){return Math.pow(2,Math.ceil(Math.log(d)/Math.LN2))};m.prototype.loadTexture=function(d,c,a){var b=new THREE.ImageLoader;b.setCrossOrigin(this.m.crossOrigin);var e=this;b.load(c,function(f){var g=e.ceilPowerOfTwo(f.width),h=e.ceilPowerOfTwo(f.height);d.format=THREE.RGBFormat;d.encoding=THREE.sRGBEncoding;d.needsUpdate=!0;if(g==f.width&&h==f.height||!a)d.image=f;else{e.m.N("resizing "+f.width+
"/"+f.height+" -> "+g+"/"+h);var l=document.createElement("canvas");l.width=g;l.height=h;l.getContext("2d").drawImage(f,0,0,g,h);d.image=l}d.Km=!0;d.fe&&d.fe.Km&&(d.Yg.visible=!0,d.fe.Yg.visible=!0)});this.Fi.push(d)};m.prototype.fi=function(){if(THREE){var d=this.m;if(this.Oj)d.N("vr panorama aleady added!");else{this.em();var c=this.Of,a=this;d.N("add vr panorama");this.Xe();this.camera.layers.enable(1);c.setRotationFromEuler(this.pn);c.rotateX(d.Oa.pitch*Math.PI/180);c.rotateZ(-d.Oa.U*Math.PI/
180);var b=new THREE.SphereBufferGeometry(2E4/3*1.5,16,16),e=(new THREE.TextureLoader).load(this.Bm(d.mk()));e.encoding=THREE.sRGBEncoding;e=new THREE.MeshBasicMaterial({map:e,side:THREE.DoubleSide});b=new THREE.Mesh(b,e);b.scale.x=-1;b.rotateZ(d.Oa.U*Math.PI/180);b.rotateX(-d.Oa.pitch*Math.PI/180);b.rotateY(-90*Math.PI/180);c.add(b);a.Zi=b;a.Oj=!0;setTimeout(function(){d.N("Adding Main Pano");a.Oj=!1;a.Xo();d.D.f?a.$o():a.Yo();a.Vo()});this.Hn();this.Yk=!0}}};m.prototype.$o=function(){var d=this.m,
c=this.Of,a=2E4/3;if(d.Nd){var b=new THREE.VideoTexture(d.D.f);b.wrapS=THREE.ClampToEdgeWrapping;b.wrapT=THREE.ClampToEdgeWrapping;b.minFilter=THREE.LinearFilter;b.encoding=THREE.sRGBEncoding;var e=new THREE.SphereBufferGeometry(a,60,40);e.scale(-1,1,1);for(var f=e.attributes.uv.array,g=1;g<f.length;g+=2)f[g]*=.5;f=new THREE.MeshBasicMaterial({map:b});e=new THREE.Mesh(e,f);e.rotateY(-90*Math.PI/180);e.layers.set(d.Ph?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.Ph?2:1)}else e=new THREE.SphereBufferGeometry(a,60,40),e.scale(-1,1,1),b=new THREE.VideoTexture(d.D.f),b.encoding=THREE.sRGBEncoding,b.wrapS=THREE.ClampToEdgeWrapping,b.wrapT=THREE.ClampToEdgeWrapping,b.minFilter=THREE.LinearFilter,f=new THREE.MeshBasicMaterial({map:b}),e=new THREE.Mesh(e,f),e.rotateY(-90*Math.PI/180);c.add(e);try{d.D.f.play()}catch(h){d.Oc(h)}};
m.prototype.Yo=function(){var d=this.m,c=[],a=this.em(),b=this.Of,e=2E4/3,f=d.Nd?2:1;if(d.u.levels.length>a)for(var g=d.u.levels[a],h=0;6>h;h++){c[h]=new THREE.Group;for(var l=0;l<g.ea;l++)for(var k=0;k<g.T;k++)for(var w=0;w<f;w++){var r=new THREE.Texture;r.encoding=THREE.sRGBEncoding;this.loadTexture(r,d.re(h,a,k,l,1==w),!0);r.wrapS=THREE.ClampToEdgeWrapping;r.wrapT=THREE.ClampToEdgeWrapping;r.minFilter=THREE.LinearMipMapLinearFilter;r.anisotropy=1;var y=d.u.O+2*d.u.Da,z=d.u.O+2*d.u.Da;k==g.T-1&&
(y=g.width-d.u.O*(g.T-1)+2*d.u.Da);l==g.ea-1&&(z=g.width-d.u.O*(g.ea-1)+2*d.u.Da);var ha=new THREE.PlaneBufferGeometry(e*y/g.width,e*z/g.width,8),ua=new THREE.MeshBasicMaterial({map:r});ha=new THREE.Mesh(ha,ua);ua.transparent=!0;ua.side=THREE.FrontSide;ua=1*d.u.O;ha.position.x=e*(k*ua+y/2-d.u.Da-g.width/2)/g.width;ha.position.y=e*-(l*ua+z/2-d.u.Da-g.width/2)/g.width;ha.position.z=-.5*e;if(d.Nd)if(ha.visible=!1,ha.layers.set(1==w?1:2),r.Yg=ha,0==w)var id=ha;else y=id.material.map,r.fe=y,y.fe=r;c[h].add(ha);
ha.frustumCulled=this.frustumCulled}4>h?c[h].rotation.y=-h*Math.PI/2:c[h].rotation.x=(4==h?1:-1)*Math.PI/2;b.add(c[h])}else for(a=d.ff,h=0;6>h;h++)for(c[h]=new THREE.Group,w=0;w<f;w++)g=h,d.Nd&&(g=h+(1==w?6:0)),r=new THREE.Texture,r.encoding=THREE.sRGBEncoding,this.loadTexture(r,d.eb(d.Ig[g]),!1),r.wrapS=THREE.ClampToEdgeWrapping,r.wrapT=THREE.ClampToEdgeWrapping,r.minFilter=THREE.LinearFilter,ha=new THREE.PlaneBufferGeometry(a*e/2,a*e/2,64),ua=new THREE.MeshBasicMaterial({map:r}),ha=new THREE.Mesh(ha,
ua),ua.transparent=!0,ua.side=THREE.FrontSide,ha.position.x=0,ha.position.y=0,ha.position.z=-.25*e,d.Nd&&(ha.layers.set(1==w?1:2),ha.visible=!1,r.Yg=ha,0==w?id=ha:(y=id.material.map,r.fe=y,y.fe=r)),c[h].add(ha),4>h?c[h].rotation.y=-h*Math.PI/2:c[h].rotation.x=(4==h?1:-1)*Math.PI/2,b.add(c[h])};m.prototype.Xo=function(){var d=this.m,c=this.wd;new x.Ga(0,0,-100);for(var a=d.H.rj,b=0;b<d.W.length;b++){var e=d.W[b],f=e.us(),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.ad){var l=.005,k=(new THREE.TextureLoader).load(e.ad);k.encoding=THREE.sRGBEncoding;var w=new THREE.MeshBasicMaterial({map:k});if(e.pg){h=100;g=2*h*Math.tan(e.fov/2*Math.PI/180);var r=new THREE.PlaneBufferGeometry(g,g*e.Hd/e.De,1,1);w.transparent=!0;w.opacity=1}else r=new THREE.PlaneBufferGeometry(l*e.De,l*e.Hd,1,1),w.transparent=!0,w.opacity=.25;g=l*e.Hd/2;w.side=THREE.DoubleSide}else r=new THREE.SphereBufferGeometry(.2,16,16),k=(new THREE.TextureLoader).load(this.Bm(f)),k.encoding=
THREE.sRGBEncoding,w=new THREE.MeshBasicMaterial({map:k}),w.transparent=!0,w.opacity=.25;f=new THREE.Mesh(r,w);l=e.title;if(a.enabled&&""!=l){r=document.createElement("canvas");r.width=256;r.height=32;k=r.getContext("2d");this.Rh||(this.Rh=document.createElement("canvas"),this.Rh.width=r.width,this.Rh.height=r.height);var y=this.Rh.getContext("2d");y.clearRect(0,0,r.width,r.height);y.font="16px Helvetica";y.textAlign="center";y.textBaseline="top";w=y.measureText(l);var z=w.width;0<a.height&&(z=Math.min(a.width,
r.width-6),z=Math.max(z,w.width));w=z+6;a.background&&(y.fillStyle=this.m.fa(a.ec,a.dc),y.fillRect((r.width-z)/2-3,2,z+6,24));0<a.ji&&(y.strokeStyle=this.m.fa(a.gc,a.fc),y.strokeRect((r.width-z)/2-3,2,z+6,24));y.fillStyle=this.m.fa(a.sj,a.qj);y.fillText(l,r.width/2,5,r.width-6);k.drawImage(this.Rh,(r.width-w)/2,2,w,24,0,0,r.width,r.height);k=new THREE.Texture(r);k.encoding=THREE.sRGBEncoding;k.needsUpdate=!0;l=1.5;r=new THREE.PlaneBufferGeometry(1*l*w/r.width,3*l/r.height,1,1);w=new THREE.MeshBasicMaterial({map:k,
side:THREE.DoubleSide});r=new THREE.Mesh(r,w);r.translateY(-g-.125*l/2);r.frustumCulled=this.frustumCulled;f.add(r);w.transparent=!0;w.opacity=.5}f.rotateY(e.pan*Math.PI/180);f.rotateX(e.v*Math.PI/180);f.translateZ(-h);f.userData=e;f.castShadow=!1;f.receiveShadow=!1;f.frustumCulled=this.frustumCulled;c.add(f)}}};m.prototype.Vo=function(){for(var d=this.m,c=this.gk,a=0;a<d.S.length;a++){var b=d.S[a];if(b.f&&"_videopanorama"!=b.id&&!b.hd){b.f.play();var e=new THREE.VideoTexture(b.f);e.encoding=THREE.sRGBEncoding;
e.wrapS=THREE.ClampToEdgeWrapping;e.wrapT=THREE.ClampToEdgeWrapping;e.minFilter=THREE.LinearFilter;e.format=THREE.RGBAFormat;var f=5E3*Math.tan(b.fov*Math.PI/360);var g=0<b.Vb?f*b.Ac/b.Vb:f;b.Kc&&1!=b.Kc&&(g*=b.Kc);f=new THREE.PlaneBufferGeometry(f,g,5,5);e=new THREE.MeshBasicMaterial({map:e,side:THREE.DoubleSide});e.transparent=!0;e.blending=THREE.CustomBlending;e.blendEquation=THREE.AddEquation;e.blendSrc=THREE.SrcAlphaFactor;e.blendDst=THREE.OneMinusSrcAlphaFactor;e.alphaTest=0;e=new THREE.Mesh(f,
e);e.rotateY(b.pan*Math.PI/180);e.rotateX(b.v*Math.PI/180);e.translateY(-0);e.translateZ(-2500);e.rotateZ(-b.ob*Math.PI/180);e.rotateY(-b.La*Math.PI/180);e.rotateX(-b.Fa*Math.PI/180);e.userData=b;e.castShadow=!1;e.receiveShadow=!1;c.add(e)}}};m.prototype.Lg=function(d){for(var c=d.children.length-1;0<=c;c--){var a=d.children[c];this.Lg(a);d.remove(a)}d.geometry&&d.geometry.dispose();d.material&&(d.material.texture&&(d.material.texture.dispose(),d.material.texture.fe=null,d.material.texture.Yg=null),
d.material.map&&(d.material.map.dispose(),d.material.map.fe=null,d.material.map.Yg=null),d.material.dispose())};m.prototype.Xe=function(){THREE&&(this.Fi=[],this.Lg(this.Of),this.Lg(this.wd),this.Lg(this.gk),10<this.Db.info.memory.textures&&this.m.Ts(this.Db.info.memory))};m.prototype.ir=function(){if(THREE){var d=this.camera;d.aspect=window.innerWidth/window.innerHeight;d.updateProjectionMatrix();this.Db.setSize(window.innerWidth,window.innerHeight)}};m.prototype.rn=function(d){THREE&&(d=this.tm(d.target),
0<d.length&&(d=d[0].object.userData,this.m.jd(d.url,d.target)))};m.prototype.tm=function(d){this.ll.identity().extractRotation(d.matrixWorld);this.Hh.ray.origin.setFromMatrixPosition(d.matrixWorld);this.Hh.ray.direction.set(0,0,-1).applyMatrix4(this.ll);return this.Hh.intersectObjects(this.wd.children)};m.prototype.intersectObjects=function(d){var c=d.getObjectByName("line");d=this.tm(d);if(0<d.length){d=d[0];var a=d.object;a.selected=!0;this.xd.push(a);c.scale.z=d.distance}else c.scale.z=5};m.prototype.rp=
function(){for(;this.xd.length;)this.xd.pop().selected=!1};m.prototype.dr=function(d){d.preventDefault();var c=this.qa,a=this.Db;c.x=d.clientX/a.domElement.clientWidth*2-1;c.y=2*-(d.clientY/a.domElement.clientHeight)+1;1==d.buttons&&(this.xh=this.Qc.x-c.x)};m.prototype.Gq=function(){var d=this.Hh;d.setFromCamera(this.qa,this.camera);d=d.intersectObjects(this.wd.children);0<d.length&&(d=d[0].object,d.selected=!0,this.xd.push(d))};m.prototype.Hq=function(){var d=this.Hh;d.setFromCamera({x:0,y:0},this.camera);
d=d.intersectObjects(this.wd.children);0<d.length&&(d=d[0].object,d.selected=!0,this.xd.push(d))};m.prototype.er=function(){this.xh=0};m.prototype.cr=function(d){50>d.clientX&&50>d.clientY&&this.m.Cf();0<this.xd.length?this.m.jd(this.xd[0].userData.url):(this.Qc.x=this.qa.x,this.Qc.y=this.qa.y)};m.prototype.animate=function(){var d=this.Qq=this;this.Db&&this.Db.setAnimationLoop(function(){d.render()})};m.prototype.render=function(){if(THREE){var d=null;try{d=this.Db.xr.getCamera(this.camera)}catch(y){console.log(y)}0==
this.dh&&d&&(this.dh=d.position.y,this.wd.translateY(this.dh));var c=this.Qq,a=c.m;c.rp();if(a.ve){c.Bj=c.Wj.visible||c.Xj.visible?!1:!0;c.Wj.visible&&c.intersectObjects(c.Wj);c.Xj.visible&&c.intersectObjects(c.Xj);c.kk||c.Gq();var b=[],e=!0;this.ne?this.ne.inputSources.forEach(function(y){var z=y.profiles;"gaze"==y.targetRayMode?c.Bj=!0:(b.push(y.gamepad),0<=z.indexOf("oculus-go")&&(e=!1),0<=z.indexOf("generic-trigger-squeeze-thumbstick")&&(e=!0),0<=z.indexOf("oculus-touch")&&(e=!0))}):b=navigator.getGamepads&&
navigator.getGamepads();var f=!1;!c.Hg.visible&&0<b.length&&(c.Hg.visible=!0);c.Hg.visible==(0==b.length)&&(c.Hg.visible=!c.Hg.visible);if(c.Bj)if(c.Hq(),0<this.xd.length)if(this.Dk!=this.xd[0])this.Dk=this.xd[0],this.Lq=Date.now();else{if(Date.now()>this.Lq+1E3){var g=this.Dk.userData;g&&g.url&&this.m.jd(g.url,g.target)}}else this.Dk=null;for(g=0;g<b.length;g++){var h=b[g];if(h&&0<h.buttons.length)if(2<h.buttons.length&&h.buttons[2].touched&&2<=h.axes.length&&!e)if(f=!0,h=h.axes[0],-1==this.Uf[g])this.Uf[g]=
h;else{var l=this.Uf[g]-h;-.3>l&&(this.Jh(20),this.Uf[g]=h);.3<l&&(this.Jh(-20),this.Uf[g]=h)}else this.Uf[g]=-1,4<=h.axes.length&&(h=h.axes[2],.8<h?(f=!0,1!=this.Pe[g]&&(this.Pe[g]=1,this.Ni[g]=Date.now()-1E4)):-.8>h?(f=!0,-1!=this.Pe[g]&&(this.Pe[g]=-1,this.Ni[g]=Date.now()-1E4)):this.Pe[g]=0,0!=this.Pe[g]&&400<Date.now()-this.Ni[g]&&(this.Ni[g]=Date.now(),this.Jh(20*this.Pe[g])))}this.Zi&&0<this.Fi.length&&this.Fi.every(function(y){return y.Km})&&(this.Lg(this.Zi),this.Of.remove(this.Zi),this.Zi=
null,a.N("unload Preview Sphere"));g=this.wd;for(h=g.children.length-1;0<=h;h--){l=g.children[h];var k=1,w=1;l.selected?(k=1.5,w=1):f?(k=.6,w=.7):(k=.4,w=.5);var r=l.scale.x;r+=.1*(k-r);l.material.opacity+=.1*(w-l.material.opacity);l.userData&&l.userData.ad?(l.userData.pg&&(r=1,l.material.opacity=1),0<l.children.length&&(l.children[0].material.opacity=l.material.opacity)):(l.rotateY(1*Math.PI/180),0<l.children.length&&(l.children[0].rotateY(-1*Math.PI/180),l.children[0].material.opacity=l.material.opacity));
l.scale.x=l.scale.y=l.scale.z=r}f=d?d.rotation.clone():c.camera.rotation.clone();f.reorder("YXZ");this.sl=180*f.y/Math.PI;this.Yk&&(this.Jh(this.sl-a.pan.j),this.Yk=!1);a.Qr(this.sl-this.Te,180*f.x/Math.PI,180*f.z/Math.PI);a=this.Pj;c.Bj?d&&(a.setRotationFromEuler(d.rotation),a.visible=!0):a.visible=!1;c.Db.render(c.Hr,c.camera);0==this.xh||isNaN(this.xh)||this.Jh(this.xh)}}};m.prototype.Hn=function(){this.Te=0;this.Zf.setRotationFromEuler(this.pn)};m.prototype.Jh=function(d){this.Te+=d;this.Zf.rotateY(d*
Math.PI/180)};return m}();x.To=p})(ggP2VR||(ggP2VR={}));var Il=!1;
(function(x){var p=function(){return function(){this.fov=this.v=this.pan=0}}(),m=function(){return function(){this.Pl=-1E7}}(),d=function(){function c(a,b){this.Nq="RURVIExpY2Vuc2U6IFBoaWxpcHBzLVVuaXZlcnNpdHkgTWFyYnVyZyAtIEluc3RpdHV0ZSBmb3IgR2VvZ3JhcGh5";this.pan={j:0,cb:0,min:0,max:360,d:0,Nk:0,$c:0,open:0};this.v={j:0,cb:0,min:-90,max:90,d:0,$c:0,open:0};this.U={j:0,cb:0,min:-180,max:180,d:0,open:0};this.Jc={pan:0,v:-90,U:0,fov:170,Nb:9};this.fov={j:70,cb:70,min:1,wh:0,max:170,Kk:360,Lk:270,prev:0,d:0,mode:0,co:0,Wl:0,open:0};this.Oa={U:0,pitch:0};this.C={width:10,height:10};
this.Xa=0;this.$j=new x.Ga;this.crossOrigin="anonymous";this.Wa=this.Yi=4;this.ud=this.bi=this.Bh=this.Dc=0;this.Eo={};this.Ph=this.Nd=!1;this.ga={start:{x:0,y:0},oa:{x:0,y:0},Pd:{x:0,y:0},j:{x:0,y:0},na:{x:0,y:0}};this.Y={Qc:!1,cd:!1,Ji:function(){return this.cd||this.Qc},fm:0,startTime:0,start:{x:0,y:0},oa:{x:0,y:0},Pd:{x:0,y:0},j:{x:0,y:0},na:{x:0,y:0},Eh:!1};this.Ef=this.He=!0;this.Ka={enabled:!0,oa:{x:0,y:0},na:{x:0,y:0},Zk:0,fov:{active:!1,zc:0}};this.nb={alpha:0,beta:0,gamma:0,orientation:0,
Te:0,Ih:!0,fadeIn:0};this.ah={alpha:0,beta:0,gamma:0,orientation:0};this.D={src:[],rf:4,width:640,height:480,yd:!1,Ki:!1,el:!0,eo:!1,Ge:"loop",kl:"",f:HTMLVideoElement=null,ko:!1,texture:WebGLTexture=null,rl:WebGLBuffer=null,pj:WebGLBuffer=null,zk:WebGLBuffer=null,format:1,Ci:0,flipY:1,xb:function(){return 0},Nn:function(){},loop:function(){return!1}};this.Mi=0;this.ra=this.Ja=this.Ra=this.$=this.yc=this.$a=this.M=null;this.Ie="pano";this.lk="flashcontainer";this.ak="";this.control=null;this.ic=[];
this.Na=!1;this.Kg=1;this.ta=null;this.Yd=this.nf=this.Kf=!1;this.wg=0;this.Fd=.02;this.Jj=0;this.Kj=!1;this.Ij=this.hi=this.xg=this.mf=this.Fl=0;this.El=-1;this.Yb="";this.eg=this.Sc=!1;this.Dh=0;this.Ig=[];this.Ul="";this.yf=[];this.ff=this.Gc=1;this.Ag=1024;this.fg=!1;this.Re=200;this.bc=0;this.Qh=5;this.Fc=0;this.lo=50;this.yk=this.mo=0;this.B={enabled:!1,timeout:5,active:!1,Oh:!1,speed:.4,uj:0,Xi:0,nn:!0,Xf:"",mn:!1,Zh:!1,qg:!1,ii:"",Zd:"Animation01",qf:!1,Ti:!1,jl:!1,startTime:0,zd:0,Pg:!1,
pi:!1,Pi:0,Od:0,oh:0,ph:0,nh:0,cn:0};this.F={active:!1,aborted:!1,speed:.1,pan:0,v:0,U:0,fov:70,Wd:70,oh:0,ph:0,dn:0,nh:0,Nb:0,Gh:0,Ek:0,pl:!1,yh:!1,Dl:0,Cl:0,Gi:!1};this.Tf={pan:-1,v:-1,fov:-1};this.an=0;this.la=null;this.rg={};this.$h={};this.ae=[];this.Si={};this.Pc={};this.Wf={};this.H={mode:1,kh:-1,va:0,hb:0,md:.05,gc:255,fc:1,ec:255,dc:.3,Jf:!0,rj:{enabled:!0,width:180,height:20,sj:0,qj:1,background:!0,ec:16777215,dc:1,gc:0,fc:1,Mj:3,ji:1,Dj:!0},ub:[],ac:[],kd:[],kj:[]};this.Ha=null;this.W=
[];this.X=[];this.S=[];this.fb=[];this.te={};this.Ya=[];this.wa=[];this.Ud=[];this.hf=[];this.cf=[];this.ba=1;this.Aa=this.le=this.Qb=this.pd=null;this.Mg={};this.Ec={};this.jo=this.lg="";this.io=-1;this.u=new x.Oo;this.kr={target:0,current:0,md:.01,delay:2,ek:0,ri:!1,fp:!1};this.margin={left:0,top:0,right:0,bottom:0};this.K={rh:!1,Oq:!1,mc:!1,ge:!1,Md:!0,Rm:!1,bo:1,Kn:!1,ck:!0,Fg:!0,Gg:!0,mi:!1,Lf:!1,Mn:!0,sensitivity:8};this.vh=[];this.rd=!0;this.qa={x:0,y:0};this.Yh=this.Pb=this.Wh=this.ld=this.ve=
this.ia=!1;this.Aj=this.yo=!0;this.vk=!1;this.de=!0;this.lf=this.sk=this.uk=!1;this.zo=!0;this.Ei=!1;this.Pa=this.$d="";this.bd="transition";this.Va="transform";this.Id="perspective";this.$l="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA5JREFUeNpiYBgeACDAAADIAAE3iTbkAAAAAElFTkSuQmCC";this.zb={width:0,height:0};this.jm=new x.Ga;this.im=new x.Ga;this.km=new x.Ga;this.lm=new x.Ga;this.hm=new x.Ga;this.Rf=!1;this.bn=this.Qa="";
this.Cj=[];this.Mk=[];this.rk=!1;this.wj=[];this.hh=this.Sm=this.Oe=this.Tm=this.ed=this.Wm=this.Ak=this.Ln=this.lc=this.Qf=this.Pf=this.Bk=this.Um=this.Vm=this.Ym=!1;this.Xh=!0;this.cj=this.Ii=!1;this.Nf=[];this.devicePixelRatio=1;this.da=this.J=null;this.Bg=!1;this.Ia=null;this.yb={enabled:!1,speed:1,running:!1,ik:!0};this.kn=!1;this.Ri="RURVIExpY2Vuc2U6IFBoaWxpcHBzLVVuaXZlcnNpdHkgTWFyYnVyZyAtIEluc3RpdHV0ZSBmb3IgR2VvZ3JhcGh5";this.cube=new x.Po;this.ol=!1;this.Eg=function(f,g){if(0==f.length)return f;var h;var l=[];var k=g.$i(f[0])-0;for(h=0;h<f.length;h++){var w=h;var r=h+
1;r==f.length&&(r=0);var y=g.$i(f[r])-0;if(0<=k&&0<=y)l.push(f[w]);else if(0<=k||0<=y){var z=y/(y-k);0>z&&(z=0);1<z&&(z=1);var ha=new x.Ga;ha.Ld(f[w],f[r],z);0>k||l.push(f[w]);l.push(ha)}k=y}return l};this.xn=new p;this.dl=0;this.rc=!1;this.Oi=-1;this.Ug=function(f){return f?this.fh()&&(f.clientX||f.clientY)?{x:f.clientX,y:f.clientY}:f.pageX||f.pageY?{x:f.pageX,y:f.pageY}:f.clientX||f.clientY?{x:f.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,y:f.clientY+document.body.scrollTop+
document.documentElement.scrollTop}:f.touches&&f.touches[0]?{x:f.touches[0].pageX,y:f.touches[0].pageY}:{x:0,y:0}:{x:0,y:0}};this.Vi=1;this.Dp=this.yi=this.Zm=this.fk=this.Uk=this.aj=0;this.$m=!1;this.ce=!0;this.kb=new x.ei(this);this.kb.Jf=!1;this.Zl();if(7<this.Ri.length){var e=c.Jg("bG9n");window[c.Jg("Y29uc29sZQ==")][e](c.Xl(this.Ri))}this.hg(this.kb);this.checkLoaded=this.ic;this.isLoaded=!1;b&&b.hasOwnProperty("useFlash")&&b.useFlash&&(this.Pb=!0,this.ia=this.ld=!1,b.hasOwnProperty("flashPlayerId")?
this.Ie=b.flashPlayerId:this.Ie="pano",b.hasOwnProperty("flashContainerId")?this.lk=b.flashContainerId:this.lk=a+"flash");b&&b.hasOwnProperty("webGLFlags")&&b.webGLFlags&&(this.Eo=b.webGLFlags);this.Ea();this.Pb||(this.Ta=new x.Lo(this));this.Tl(a);this.ep();this.userdata=this.rg=this.Ng();this.emptyHotspot=this.kb;this.mouse=this.qa;this.J=new x.Mo(this);this.Ia=new x.No(this);this.Aa=new x.So(this);this.Gb=new x.To(this);this.Hc()}c.prototype.Hm=function(a){return-99991===a?this.Nq:"6.1.13/18080"};
c.prototype.Yj=function(){this.J.enabled=this.da.enabled;this.J.type=this.da.type;this.J.sa=this.da.zoomin;this.J.vc=this.da.zoomout;this.J.zg=this.da.blendtime;this.J.ug=this.da.zoomoutpause;this.J.Gj=this.da.zoomfov;this.J.Ej=this.da.zoomafterinfov;this.J.Fj=this.da.zoomafteroutfov;this.J.we=this.da.zoomspeed;this.J.sf=this.da.blendcolor;this.J.Uc=this.da.softedge;this.da=null};c.prototype.bs=function(a){this.da={};this.da.enabled=!0;this.da.type=this.J.type;this.da.zoomin=this.J.sa;this.da.zoomout=
this.J.vc;this.da.blendtime=this.J.zg;this.da.zoomoutpause=this.J.ug;this.da.zoomfov=this.J.Gj;this.da.zoomafterinfov=this.J.Ej;this.da.zoomafteroutfov=this.J.Fj;this.da.zoomspeed=this.J.we;this.da.blendcolor=this.J.sf;this.da.softedge=this.J.Uc;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.da.type=b}a.hasOwnProperty("before")&&
(b=Number(a.before),0==b||2==b)&&(this.da.zoomin=b);a.hasOwnProperty("after")&&(b=Number(a.after),0==b||2==b||3==b||4==b)&&(this.da.zoomout=b);a.hasOwnProperty("transitiontime")&&(b=Number(a.transitiontime),0<=b&&50>=b&&(this.da.blendtime=b));a.hasOwnProperty("waitfortransition")&&(this.da.zoomoutpause=1==a.waitfortransition);a.hasOwnProperty("zoomedfov")&&(b=Number(a.zoomedfov),.01<=b&&50>=b&&(this.da.zoomfov=b));a.hasOwnProperty("zoomafterinfov")&&(b=Number(a.zoomafterinfov),70<=b&&120>=b&&(this.da.zoomafterinfov=
b));a.hasOwnProperty("zoomafteroutoutfov")&&(b=Number(a.zoomafteroutfov),.01<=b&&70>=b&&(this.da.zoomafteroutfov=b));a.hasOwnProperty("zoomspeed")&&(b=Number(a.zoomspeed),.01<=b&&99>=b&&(this.da.zoomspeed=b));a.hasOwnProperty("dipcolor")&&(this.da.blendcolor=a.dipcolor);a.hasOwnProperty("softedge")&&(a=Number(a.softedge),0<=a&&1E3>=a&&(this.da.softedge=a));this.Bg||this.Yj()};c.prototype.Tc=function(a,b,e){var f=b?Number(b):0;if(0!=a&&4!=a&&12!=a&&9!=a)this.Oc("Unsupported projection type: "+a);else if(b&&
0!==f&&4!==f&&12!==f&&9!==f)this.Oc("Unsupported projection2 type: "+f);else if(a==f&&(f=0),this.Bh=e?Number(e):1,this.Wa!=a||this.Dc!=f)this.Wa=a,this.Dc=f,this.Aa.Hi()};c.prototype.Sa=function(){return 0==this.Wa?4:this.Wa};c.prototype.Sj=function(a,b){if(0!=a&&4!=a&&12!=a&&9!=a)this.Oc("Unsupported projection type: "+a);else if(this.ia||0==a||4==a||this.Oc("Projection changes require WebGL!"),this.Sa()!=a){var e={};e.pan=this.pan.j;e.tilt=this.v.j;e.fov=this.fov.j;e.projection=a;e.timingFunction=
3;e.speed=b;a=this.Tg(a);e.fov=Math.min(a,e.fov);this.Ui(e)}};c.prototype.addListener=function(a,b){(this.Mg[a]=this.Mg[a]||[]).push(b)};c.prototype.L=function(a,b){if(a=this.Mg[a])for(var e=a.length,f=0;f<e;f++)try{a[f].apply(null,[b])}catch(g){this.Oc(g)}};c.prototype.removeEventListener=function(a,b){var e=this.Mg[a];if(e){var f;var g=0;for(f=e.length;g<f;g++)if(e[g]===b){1===f?delete this.Mg[a]:e.splice(g,1);break}}};c.prototype.Dr=function(){this.Na=!0};c.prototype.zq=function(){return this.R};
c.prototype.Zo=function(a,b,e,f){if(!this.Ec.hasOwnProperty(a)){var g=new m;this.Ec[a]=g;g.type=b;"undefined"!==typeof e&&this.oe(a,e);"object"===typeof f&&this.Vn(a,f);return!0}return!1};c.prototype.rm=function(a){var b=document.cookie.indexOf(a+"="),e="";-1!=b&&(b=b+a.length+1,a=document.cookie.indexOf(";",b),-1==a&&(a=document.cookie.length),e=decodeURIComponent(document.cookie.substring(b,a)));return e};c.prototype.Wn=function(a,b,e){0==b&&this.oe(a,e,!1);1==b&&this.oe(a,parseFloat(e),!1);2==
b&&this.oe(a,"true"==e,!1)};c.prototype.Vn=function(a,b){if(this.Ec.hasOwnProperty(a)&&"object"===typeof b){var e=this.Ec[a];b.hasOwnProperty("cookiePath")&&(e.Ql=String(b.cookiePath));b.hasOwnProperty("cookieExpireDays")&&(e.Pl=parseFloat(b.cookieExpireDays));b.hasOwnProperty("keep")&&(e.Ck=!!b.keep,e.Ck&&0<document.cookie.length&&(""!=this.lg?-1!=document.cookie.indexOf(this.lg+"=")&&(b=JSON.parse(this.rm(this.lg)),b.hasOwnProperty(a)&&this.Wn(a,e.type,b[a])):(b="ggvar_"+a,-1!=document.cookie.indexOf(b+
"=")&&(b=this.rm(b),this.Wn(a,e.type,b)))));return!0}return!1};c.prototype.$r=function(a,b){this.lg=a;b&&"object"===typeof b&&(b.hasOwnProperty("cookiePath")&&(this.jo=String(b.cookiePath)),b.hasOwnProperty("cookieExpireDays")&&(this.io=parseFloat(b.cookieExpireDays)))};c.prototype.Gl=function(a,b,e){-1<=b&&(a+="; max-age="+86400*b);""!=e&&(a+="; path="+e);return a};c.prototype.oe=function(a,b,e){void 0===e&&(e=!0);if(this.Ec.hasOwnProperty(a)){var f=this.Ec[a];if(0==f.type&&"string"===typeof b||
1==f.type&&"number"===typeof b||2==f.type&&"boolean"===typeof b){if(f.value!=b){f.value=b;if(f.Ck&&e){if(""!=this.lg){f={};for(var g=0,h=Object.keys(this.Ec);g<h.length;g++)e=h[g],this.Ec[e].Ck&&(f[e]=encodeURIComponent(this.Ec[e].value.toString()));e=this.lg+"="+JSON.stringify(f);e=this.Gl(e,this.io,this.jo)}else e="ggvar_"+a+"="+encodeURIComponent(b.toString()),e=this.Gl(e,f.Pl,f.Ql?f.Ql:"");document.cookie=e}this.L("varchanged_"+a,{value:b})}return!0}}return!1};c.prototype.tq=function(a){if(this.Ec.hasOwnProperty(a))return this.Ec[a].value};
c.Jg=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.ts=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.Xl=function(a){return c.ts(c.Jg(a))};c.prototype.Zl=function(){this.devicePixelRatio=window.devicePixelRatio||
1;this.Ym=!!navigator.userAgent.match(/(Windows|Win)/g);this.Vm=!!navigator.userAgent.match(/(Mac|Macintosh|Mac_powerpc)/g);this.Um=!!navigator.userAgent.match(/(Linux|Ubuntu)/g);this.Bk=!!navigator.userAgent.match(/(MSIE)/g);this.Pf=!!navigator.userAgent.match(/(Edge|EdgA)/g);this.lc=!!navigator.userAgent.match(/(Safari)/g);this.Wm=!!navigator.userAgent.match(/(SamsungBrowser)/g);if(this.Ak=!!navigator.userAgent.match(/(Chrome)/g)||!!navigator.userAgent.match(/(CriOS)/g))this.lc=!1;if(this.Qf=!!navigator.userAgent.match(/(Firefox)/g)||
!!navigator.userAgent.match(/(FxiOS)/g))this.lc=!1;if(this.lc){var a=navigator.userAgent.indexOf("Safari");this.Ad=navigator.userAgent.substring(a+7);a=navigator.userAgent.indexOf("Version");-1!=a&&(this.Ad=navigator.userAgent.substring(a+8));this.Ad=this.Ad.substring(0,this.Ad.indexOf(" "));this.Ad=this.Ad.substring(0,this.Ad.indexOf("."));this.Ln=!0}this.ed=!!navigator.userAgent.match(/(iPad|iPhone|iPod)/g);this.Tm=!!navigator.userAgent.match(/(iPhone|iPod)/g);this.Oe=!!navigator.userAgent.match(/(android)/i);
this.Sm=!!navigator.userAgent.match(/(IEMobile)/i);this.hh=this.ed||this.Oe||this.Sm;/iP(hone|od|ad)/.test(navigator.platform)&&(a=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/),this.Nf=[parseInt(a[1],10),parseInt(a[2],10),parseInt(a[3]||"0",10)]);this.Ii=!window.requestAnimationFrame;a=["Webkit","Moz","O","ms","Ms"];this.Pa="";this.bd="transition";this.Va="transform";this.Id="perspective";for(var b=0;b<a.length;b++)"undefined"!==typeof document.documentElement.style[a[b]+"Transform"]&&(this.Pa=
"-"+a[b].toLowerCase()+"-",this.bd=a[b]+"Transition",this.Va=a[b]+"Transform",this.Id=a[b]+"Perspective");this.vk=Gl();this.ia=Hl();this.ld=this.vk;this.ia&&(this.ld=!1);this.Sc=!0;this.eg=!1;if(this.ed||this.Oe)this.Tn(80),this.Qh=2;this.Oc("Pano2VR player "+this.Hm()+" - Prefix:"+this.Pa+", "+(this.vk?"CSS 3D available":"CSS 3D not available")+", "+(this.ia?"WebGL available":"WebGL not available"));Il&&this.N("Pano2VR Debug version!");try{window.AudioContext=window.AudioContext||window.webkitAudioContext,
this.ua=new AudioContext}catch(e){this.ua=null}this.lc&&(!this.Ln||9>Number(this.Ad))&&(this.ua=null);this.lc&&!this.ed&&12<=Number(this.Ad)&&13>Number(this.Ad)&&(this.ua=null);this.lc&&this.ed&&13==Number(this.Nf[0])&&(1==Number(this.Nf[1])||2<=Number(this.Nf[1]))&&(this.ua=null);this.Xh=this.Tm?10<Number(this.Nf[0])?!0:!1:!0};c.prototype.N=function(a){if(Il){var b=document.getElementById("gg_debug");b&&(b.innerHTML=a.toString()+"<br />");window.console&&window.console.log(a)}};c.prototype.Ts=function(a){if(Il){var b=
document.getElementById("gg_debug");b&&(b.innerHTML=a.toString()+"<br />");window.console&&window.console.warn(a)}};c.prototype.Oc=function(a){var b=document.getElementById("gg_debug");b&&(b.innerHTML=a+"<br />");window.console&&window.console.log(a)};c.prototype.Tn=function(a){this.Re=a};c.prototype.setCrossOrigin=function(a){this.crossOrigin=a};c.prototype.Lr=function(a){this.Mf=a};c.prototype.kq=function(){return this.Dh};c.prototype.Jr=function(a){this.$d=a};c.prototype.qm=function(){return this.$d};
c.prototype.Rp=function(){return this.hh};c.prototype.Mp=function(){return this.Ei};c.prototype.Sp=function(){return this.Rf};c.prototype.Op=function(){return this.B.active};c.prototype.Mr=function(a){this.hh=!!a};c.prototype.zi=function(){return this.isLoaded};c.prototype.Qp=function(){return!this.isLoaded};c.prototype.td=function(){return Number(this.C.height)/(2*Math.tan(Math.PI/180*(this.kc()/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.fg&&(g=1);this.M.style.width=e+"px";this.M.style.height=f+"px";this.M.style.left=this.margin.left+"px";this.M.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.zb.width=e*g,this.zb.height=f*g,
this.R.viewport(0,0,this.R.drawingBufferWidth,this.R.drawingBufferHeight))}catch(h){alert(h)}this.yc&&(this.yc.style.width=a+"px",this.yc.style.height=b+"px",this.yc.width=a,this.yc.height=b);this.Ra&&(this.Ra.style.width=a+"px",this.Ra.style.height=b+"px",this.Ja.style.width=a+"px",this.Ja.style.height=b+"px",this.Ja.width=a,this.Ja.height=b,this.Ja.style.left=this.margin.left+"px",this.Ja.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.nd,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.Kf&&(this.Na=!0);e=this.M.offsetWidth;f=this.M.offsetHeight;if(this.C.width!=e||this.C.height!=f)this.C.width=e,this.C.height=f;this.Os();this.ta&&this.ta.ggUpdateSize&&this.ta.ggUpdateSize(a,b);this.L("sizechanged",{w:a,h:b});this.L("playerstatechanged",{})}};c.prototype.kf=function(){this.ol=!0};c.prototype.Hc=function(){this.Xn(this.pd.offsetWidth,
this.pd.offsetHeight)};c.prototype.yq=function(){var a={width:0,height:0};a.width=this.C.width;a.height=this.C.height;return a};c.prototype.Ke=function(){var a={x:0,y:0},b=this.M;if(b.offsetParent){do a.x+=b.offsetLeft,a.y+=b.offsetTop,b=b.offsetParent;while(b)}return a};c.prototype.Yr=function(a){this.la=a};c.prototype.Nr=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.kf()};c.prototype.mp=function(a){0==a&&(this.K.Md=!1);
1==a&&(this.K.Md=!0);2==a&&(this.K.Md=!this.K.Md);this.L("viewmodechanged",{});this.L("playerstatechanged",{})};c.prototype.wq=function(){return 1==this.K.Md?1:0};c.prototype.Nl=function(a,b){this.H.mode=1==b&&0<this.H.mode?0:Math.round(a);this.update();this.ra&&(this.ra.changePolygonMode(a,b),this.ra.update());this.L("polymodechanged",{})};c.prototype.Zn=function(a){var b=this.H.ub.indexOf(a);-1==b?(this.H.ub.push(a),this.H.ac.push(0),this.H.kd.push(1)):this.H.kd[b]=1;this.update()};c.prototype.Mm=
function(a){var b=this.H.ub.indexOf(a);-1!=b&&(this.H.kd[b]=0,this.H.kj.push(a),this.update())};c.prototype.zs=function(a){var b=this.H.ub.indexOf(a);-1==b||-1!=b&&0==this.H.kd[b]?this.Zn(a):this.Mm(a);this.update()};c.prototype.kp=function(a,b,e,f,g){for(var h=0;h<this.W.length;h++){var l=this.W[h];"poly"!=l.type||l.id!=a&&""!=a||(l.ec=b,l.dc=e,l.gc=f,l.fc=g)}""==a&&(this.H.ec=b,this.H.dc=e,this.H.gc=f,this.H.fc=g);this.update()};c.prototype.ip=function(a){this.Ta&&(this.Ta.bl=0==a?!0:1==a?!1:!this.Ta.bl,
this.update())};c.prototype.mq=function(){return this.H.mode};c.prototype.np=function(){this.L("viewstatechanged",{})};c.prototype.xq=function(){return 0};c.prototype.Yp=function(a){return(a=this.Si[a])?a.type:"web"};c.prototype.Xp=function(a){return(a=this.Si[a])?a:{}};c.prototype.fq=function(a,b){var e=[];a||(a=this.Qa);var f=this.ae[a];f&&(a=f);""===a&&0<Object.keys(this.Pc).length&&(a=Object.keys(this.Pc)[0]);this.Pc[a]&&this.Pc[a][b]&&(e.push(this.Pc[a][b].y),e.push(this.Pc[a][b].x));return e};
c.prototype.gq=function(a,b){var e=[];a||(a=this.Qa);var f=this.ae[a];f&&(a=f);""===a&&0<Object.keys(this.Pc).length&&(a=Object.keys(this.Pc)[0]);this.Wf[a]&&this.Wf[a][b]&&(e.push(this.Wf[a][b].x),e.push(this.Wf[a][b].y));return e};c.prototype.wm=function(a){var b=this.ae[a];b&&(a=b);b=this.vm();var e=[];if(""!=a)for(var f=0;f<b.length;f++)this.Pc[a][b[f]]&&e.push(b[f]);return e};c.prototype.Wp=function(a){a=this.wm(a);return 0<a.length?a[0]:""};c.prototype.vm=function(){var a=[],b;for(b in this.Si)a.push(b);
return a};c.prototype.Om=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.jm.init(0,0,-1);this.im.init(a,0,-b);this.km.init(-a,0,-b);this.lm.init(0,f,-e);this.hm.init(0,-f,-e)};c.prototype.Uj=function(a){a=this.Eg(a,this.jm);a=this.Eg(a,this.im);a=this.Eg(a,this.km);a=this.Eg(a,this.lm);return a=this.Eg(a,this.hm)};c.prototype.so=function(a){if(!this.Sc&&this.Mq!=a){this.Mq=a;var b=this.margin.left+this.C.width/2+"px ";b+=this.margin.top+
this.C.height/2+"px ";this.Ra.style[this.Id]=a+"px";this.Ra.style[this.Id+"Origin"]=b;this.M.style[this.Id]=a+"px";this.M.style[this.Id+"Origin"]=b}};c.prototype.sm=function(){return this.J.ue||this.J.Cd||this.ia&&(4!=this.Wa||0!=this.Dc)?!1:!0};c.prototype.Uh=function(){var a=new x.Ga(0,0,-100),b=this.td();var e=100/this.fov.j;var f=this.u.width/this.u.height;var g=this.C.height*e*f;e*=this.C.height;for(var h=this.sm(),l=0;l<this.W.length;l++){var k=this.W[l];if("point"==k.type){var w=!1;if(2==this.Xa){var r=
(this.pan.j-k.pan)/100/f*g;var y=(this.v.j-k.v)/100*e;Math.abs(r)<this.C.width/2+500&&Math.abs(y)<this.C.height/2+500&&(w=!0)}else a.init(0,0,-100),a.Fa(-k.v*Math.PI/180),a.La(k.pan*Math.PI/180),a.La(-this.pan.j*Math.PI/180),a.Fa(this.v.j*Math.PI/180),a.ob(this.U.j*Math.PI/180),.01>a.z?(y=-b/a.z,r=a.x*y,y*=a.y,Math.abs(r)<this.C.width/2+5E3&&Math.abs(y)<this.C.height/2+5E3&&(w=!0)):y=r=0;k.Zb=r+this.C.width/2;k.Cb=y+this.C.height/2;k.visible=w;k.px=k.Zb;k.py=k.Cb;k.visible=k.visible;if(k.f&&k.f.onUpdatePosition)k.f.onUpdatePosition(this,
k);else k.f&&k.f.__div&&("none"!=k.f.__div.style[this.bd]&&(k.f.__div.style[this.bd]="none"),w&&h?(k.f.ggUse3d?(this.Sc||this.so(b),2==this.Xa?(k.f.__div.style[this.Va]="scale("+(100/this.fov.j*500/k.f.gg3dDistance).toFixed(10)+")",k.f.__div.style.left=this.margin.left+r+this.C.width/2+"px",k.f.__div.style.top=this.margin.top+y+this.C.height/2+"px"):(k.f.__div.style.width="1px",k.f.__div.style.height="1px",r="",this.Sc&&(r+="translate3d(0px,0px,"+(-1E3-200*l)+"px) perspective("+b+"px) "),r+="translate3d(0px,0px,"+
b+"px) ",r+="rotateZ("+this.U.j.toFixed(10)+"deg) ",r+="rotateX("+this.v.j.toFixed(10)+"deg) ",r+="rotateY("+(-this.pan.j).toFixed(10)+"deg) ",r+="rotateY("+k.pan.toFixed(10)+"deg) ",r+="rotateX("+(-k.v).toFixed(10)+"deg) ",r+="translate3d(0px,0px,"+(-1*k.f.gg3dDistance).toFixed(10)+"px) ",k.f.__div.style[this.Va+"Origin"]="0% 0%",k.f.__div.style[this.Va]=r,k.f.__div.style.left=this.margin.left+this.C.width/2+"px",k.f.__div.style.top=this.margin.top+this.C.height/2+"px")):(k.f.__div.style.left=this.margin.left+
r+this.C.width/2+"px",k.f.__div.style.top=this.margin.top+y+this.C.height/2+"px"),k.f.__div.ggVisible&&(""==k.f.__div.style.opacity||0<k.f.__div.style.opacity)&&(k.f.__div.style.visibility="visible")):(k.f.ggUse3d&&(k.f.__div.style[this.Va]=""),k.f.__div.style.left="-1000px",k.f.__div.style.top="-1000px",k.f.__div.style.visibility="hidden"))}if("poly"==k.type){var z=[];if(2==this.Xa)for(k.ke=[],w=0;w<k.vertices.length;w++)y=k.vertices[w],r=(this.pan.j-y.pan)/100/f*g,y=(this.v.j-y.v)/100*e,r+=this.margin.left+
this.C.width/2,y+=this.margin.top+this.C.height/2,k.ke.push({Zb:r,Cb:y});else{for(w=0;w<k.vertices.length;w++)y=k.vertices[w],a.init(0,0,-100),a.Fa(-y.v*Math.PI/180),a.La(y.pan*Math.PI/180),a.La(-this.pan.j*Math.PI/180),a.Fa(this.v.j*Math.PI/180),a.ob(this.U.j*Math.PI/180),z.push(a.clone());z=this.Uj(z);if(0<z.length)for(w=0;w<z.length;w++)a=z[w],.1>a.z?(y=-b/a.z,r=this.C.width/2+a.x*y,y=this.C.height/2+a.y*y):y=r=0,a.Zb=r,a.Cb=y;k.ke=z}}}};c.prototype.Ip=function(){for(var a=[],b=0;b<this.W.length;b++){var e=
this.W[b];"point"==e.type&&e.f&&e.f.__div&&a.push(e.f.__div)}return a};c.prototype.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.mr=function(){var a;if(this.Ja&&(this.H.kh!=this.H.mode&&(this.H.kh=this.H.mode,this.Ja.style.visibility=0<this.H.mode?"inherit":"hidden"),0<=this.H.mode||0<this.H.ub.length)){this.ma||(this.ma=this.Ja.getContext("2d"));if(this.ma.width!=this.C.width||this.ma.height!=this.C.height)this.ma.width=
this.C.width,this.ma.height=this.C.height;this.ma.clear?this.ma.clear():this.ma.clearRect(0,0,this.Ja.width,this.Ja.height);var b=1;0>=this.H.mode&&(b=0);3==this.H.mode&&(b=this.H.va);for(a=0;a<this.W.length;a++){var e=this.W[a];var f=b;if("poly"==e.type){var g=e.ke;2==this.H.mode&&(f=e.va);var h=this.H.ub.indexOf(e.id);-1!=h&&(f=this.H.ac[h]);this.ma.fillStyle=this.fa(e.ec,e.dc*f);this.ma.strokeStyle=this.fa(e.gc,e.fc*f);if(0<g.length){this.ma.beginPath();for(e=0;e<g.length;e++)f=g[e],0==e?this.ma.moveTo(f.Zb,
f.Cb):this.ma.lineTo(f.Zb,f.Cb);this.ma.closePath();this.ma.stroke();this.ma.fill()}}}}};c.prototype.Nm=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.Cb>e!=f.Cb>e&&b<(f.Zb-l.Zb)*(e-l.Cb)/(f.Cb-l.Cb)+l.Zb&&(g=!g)}return g};c.prototype.li=function(a,b){var e=-1;if((0<=this.H.mode||0<this.H.ub.length)&&this.Iq())for(var f=0;f<this.W.length;f++){var g=this.W[f];"poly"==g.type&&g.ke&&0<g.ke.length&&(-1!=this.H.mode||-1!=this.H.ub.indexOf(g.id))&&this.Nm(g.ke,
a,b)&&(e=f,g.Zb=a,g.Cb=b)}return 0<=e?this.W[e]:!1};c.prototype.Iq=function(){return 4==this.Sa()&&0==this.Dc};c.prototype.kc=function(){var a=0,b=this.Sa(),e=this.C;switch(this.fov.mode){case 0:a=this.fov.j/2;break;case 1:a=4==b?180*Math.atan(e.height/e.width*Math.tan(this.fov.j/2*Math.PI/180))/Math.PI:e.height/e.width*this.fov.j/2;break;case 2:a=Math.sqrt(e.width*e.width+e.height*e.height);a=4==b?180*Math.atan(e.height/a*Math.tan(this.fov.j/2*Math.PI/180))/Math.PI:e.height/a*this.fov.j/2;break;
case 3:a=4*e.height/3>e.width?this.fov.j/2:4==b?180*Math.atan(4*e.height/(3*e.width)*Math.tan(this.fov.j/2*Math.PI/180))/Math.PI:4*e.height/(3*e.width)*(this.fov.j/2)}return 2*a};c.prototype.Lp=function(a,b){a||(a=this.kc());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.C.width/this.C.height};c.prototype.Kl=function(a){var b=this.fov.j;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.C.width/this.C.height*Math.tan(a*Math.PI/180))/Math.PI:this.C.width/this.C.height*a;b=2*a;break;case 2:b=Math.sqrt(this.C.width*this.C.width+this.C.height*this.C.height);a=4==e?180*Math.atan(b/this.C.height*Math.tan(a*Math.PI/180))/Math.PI:b/this.C.height*a;b=2*a;break;case 3:4*this.C.height/3>this.C.width?b=2*a:(b=3*this.C.width/(4*this.C.height),a=4==e?180*Math.atan(b*Math.tan(a*Math.PI/180))/Math.PI:b*a,b=2*a)}return b};c.prototype.ij=function(a){this.fov.j=this.Kl(a)};
c.prototype.Dg=function(){if(!this.ve){var a=this.xn;a.pan=this.pan.j;a.v=this.v.j;a.fov=this.fov.j;this.wf(a);this.wf(a);this.wf(a);this.pan.j=a.pan;this.v.j=a.v;this.fov.j=a.fov}};c.prototype.wf=function(a){var b=this.C.width/this.C.height;if(2==this.Xa){if(0<this.fov.wh){var e=this.Gc;this.u.levels&&0<this.u.levels.length&&(e=this.u.levels[0].height);this.fov.min=100*this.C.height/(e*this.fov.wh)}var f=a.fov/2;e=f*b;var g=this.u.width/this.u.height*50;b=this.K.Mn?2*Math.min(50,g/b):2*Math.max(50,
g/b);a.fov<this.fov.min&&(a.fov=this.fov.min);a.fov>b&&(a.fov=b);50<f?a.v=0:(50<a.v+f&&(a.v=50-f),-50>a.v-f&&(a.v=-50+f));e>g?a.pan=0:(a.pan+e>g&&(a.pan=g-e,this.B.active&&(this.B.speed=-this.B.speed,this.pan.d=0)),a.pan-e<-g&&(a.pan=-g+e,this.B.active&&(this.B.speed=-this.B.speed,this.pan.d=0)))}else{0<this.fov.wh&&(e=this.Gc,this.u.levels&&0<this.u.levels.length&&(e=this.u.levels[0].height),this.fov.min=360*Math.atan2(this.C.height/2,e/2*this.fov.wh)/Math.PI);a.fov<this.fov.min&&(a.fov=this.fov.min);
g=this.fov.max;var h=179;f=this.kc()/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.Lk,h=355):12==this.Sa()&&(g=this.fov.Kk,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.kc()/2,2*f>h&&(a.fov=h),f=this.kc()/2,e=b*f);2*f>this.v.max-this.v.min&&180>this.v.max-this.v.min&&(f=(this.v.max-this.v.min)/2,a.fov=this.Kl(2*f));90>this.v.max?a.v+f>this.v.max&&(a.v=this.v.max-f):a.v>this.v.max&&(a.v=this.v.max);
-90<this.v.min?a.v-f<this.v.min&&(a.v=this.v.min+f):a.v<this.v.min&&(a.v=this.v.min);b=this.pan.max-this.pan.min;if(359.99>b){g=90;h=Math.tan(f*Math.PI/180);var l=Math.tan((Math.abs(a.v)+f)*Math.PI/180);l=Math.sqrt(l*l+1)/Math.sqrt(h*h+1);f=180*Math.atan(l*Math.tan(e*Math.PI/180))/Math.PI;2*f>b&&(l=Math.tan(b*Math.PI/360)/Math.tan(e*Math.PI/180),b=l*Math.sqrt(h*h+1),l=Math.sqrt(b*b-1),g=180/Math.PI*Math.atan(l));a.pan+f>this.pan.max&&(a.pan=this.pan.max-f,this.B.active&&(this.B.speed=-this.B.speed,
this.pan.d=0));a.pan-f<this.pan.min&&(a.pan=this.pan.min+f,this.B.active&&(this.B.speed=-this.B.speed,this.pan.d=0));a.v+e>g&&(a.v=g-e);a.v-e<-g&&(a.v=-g+e)}}};c.prototype.update=function(a){void 0===a&&(a=0);this.Na=!0;a&&(this.Kg=Math.max(1*a,this.Kg))};c.prototype.um=function(){return this.ra?!!this.ra.isTileLoading:0<this.bc||0<this.Fc};c.prototype.Vh=function(){var a=Date.now();if(this.Pb){if(this.ra)if(this.Gs(),2===this.Xa)this.Dg(),this.Uh();else if(0===this.Xa){var b=this.td();this.Om(this.C.width/
2,this.C.height/2,b);this.Uh()}}else 2===this.Xa?(this.Uh(),this.ia?(this.Aa.ml(),this.Aa.sn()):this.ml()):0===this.Xa&&(!this.ia||4==this.Wa&&0==this.Dc?(b=this.td(),this.Om(this.C.width/2,this.C.height/2,b),this.Uh(),this.Yh?this.Aa.Ns():this.yo&&this.xo(),this.to(),this.ia?(this.D.yd?14==this.D.format?this.Aa.Ms():this.Aa.Fo():0<this.u.levels.length?this.Aa.Us():this.Aa.Ws(),this.Aa.sn()):(this.ld?0<this.u.levels.length?this.Ks():this.Js():this.Wh&&this.Fs(),this.mr()),this.Ta&&this.Ta.lr()):(this.Aa.Fo(),
this.Uh(),this.Eq()));b=Date.now();50<b-a?(this.N("Time between frames: "+(b-a)),this.fg||(2<this.dl?(this.fg=!0,this.N("disabling HighDPI rendering"),this.Hc()):this.dl++)):this.dl=0;this.Kf&&this.u.Fn++};c.prototype.Js=function(){var a=!1;if(this.C.width!=this.M.offsetWidth||this.C.height!=this.M.offsetHeight)this.C.width=this.M.offsetWidth,this.C.height=this.M.offsetHeight,this.M.style[this.Va+"OriginX"]=this.C.width/2+"px",this.M.style[this.Va+"OriginY"]=this.C.height/2+"px",a=!0;var b=Math.round(this.td());
this.lh==b&&!a||this.Sc||(this.lh=b,this.M.style[this.Id]=b+"px");this.cube.qp(this.pan.j,this.v.j,this.U.j,this.Oa);for(a=0;6>a;a++){var e;if(e=this.cube.faces[a]){var f="";this.Sc?(f+="translate3d("+this.C.width/2+"px,"+this.C.height/2+"px,0px) ",f+="perspective("+b+"px) ",f+="translate3d(0px,0px,"+b+"px) "):f+="translate3d("+this.C.width/2+"px,"+this.C.height/2+"px,"+b+"px) ";f+="rotateZ("+Number(this.U.j).toFixed(10)+"deg) ";f+="rotateX("+Number(this.v.j).toFixed(10)+"deg) ";f+="rotateY("+Number(-this.pan.j).toFixed(10)+
"deg) ";e.Im&&(f+=e.Im,e.mb||(f="translate3d(-10px,-10px,0px) scale(0.001,0.001)"),e.V.style[this.Va]=f)}}};c.prototype.Fs=function(){this.Dg();var a;this.yc&&(a=this.yc.getContext("2d"));if(this.C.width!==this.M.offsetWidth||this.C.height!==this.M.offsetHeight)this.C.width=this.M.offsetWidth,this.C.height=this.M.offsetHeight;if(a){var b=a.canvas.width/2,e=a.canvas.height/2,f=a.createRadialGradient(b,e,5,b,e,Math.max(b,e));f.addColorStop(0,"#333");f.addColorStop(1,"#fff");a.rect(0,0,a.canvas.width,
a.canvas.height);a.fillStyle=f;a.fill();a.fillStyle="#f00";a.font="20px Helvetica";a.textAlign="center";a.fillText("Pan: "+this.pan.j.toFixed(1),b,e-60);a.fillText("Tilt: "+this.v.j.toFixed(1),b,e-30);a.fillText("Fov: "+this.fov.j.toFixed(1),b,e+0);a.fillText("Node: "+this.mk(),b,e+30);a.fillText("Title: "+this.rg.title,b,e+60)}};c.prototype.Gs=function(){this.Dg();if(this.C.width!==this.M.offsetWidth||this.C.height!==this.M.offsetHeight)this.C.width=this.M.offsetWidth,this.C.height=this.M.offsetHeight;
this.ra&&this.ra.setPan&&(this.ra.setPan(this.pan.j),this.ra.setTilt(this.v.j),this.ra.setFov(this.fov.j))};c.prototype.ml=function(){this.Ja.style.visibility="inherit";this.ma||(this.ma=this.Ja.getContext("2d"));if(this.ma.width!=this.C.width||this.ma.height!=this.C.height)this.ma.width=this.C.width,this.ma.height=this.C.height;this.ma.clear?this.ma.clear():this.ma.clearRect(0,0,this.Ja.width,this.Ja.height);this.Fc=0;var a=100/this.fov.j;var b=this.u.width/this.u.height;var e=this.C.height*a*b;
a*=this.C.height;var f=(this.pan.j/100/b-.5)*e+this.C.width/2;for(var g=(this.v.j/100-.5)*a+this.C.height/2,h,l,k,w,r=0;this.u.levels.length>=r+2&&this.u.levels[r+1].width>e;)r++;var y;var z=[];for(y=this.u.levels.length-1;y>=r;){b=this.u.levels[y];if(b.cache){var ha={lb:0,Ib:0};ha.Kb=b.T-1;ha.Lb=b.ea-1}else{ha={};var ua=-g/a*(b.height/this.u.O);h=(-f+this.C.width)/e*(b.width/this.u.O);l=(-g+this.C.height)/a*(b.height/this.u.O);ha.lb=Math.min(Math.max(0,Math.floor(-f/e*(b.width/this.u.O))),b.T-1);
ha.Ib=Math.min(Math.max(0,Math.floor(ua)),b.ea-1);ha.Kb=Math.min(Math.max(0,Math.floor(h)),b.T-1);ha.Lb=Math.min(Math.max(0,Math.floor(l)),b.ea-1)}z[y]=ha;var id=!0;for(l=ha.Ib;l<=ha.Lb;l++)for(h=ha.lb;h<=ha.Kb;h++)w=h+l*b.T,ua=b.aa[w],ua||(ua=new x.Xd,b.aa[w]=ua),this.bc<this.Qh?ua.u||(this.yk++,ua.u=new Image,ua.u.onload=this.ws(),ua.u.onerror=this.tj(ua),ua.u.onabort=this.tj(ua),ua.u.crossOrigin=this.crossOrigin,ua.u.setAttribute("src",this.re(0,y,h,l)),b.cache&&this.ic.push(ua.u),this.bc++,this.Na=
!0):this.Fc++,ua.u&&ua.u.complete||(id=!1),ua.visible=!0;ha.Gk=id;y--}for(y=this.u.levels.length-1;y>=r;){b=this.u.levels[y];if(z[y]&&0<=z[y].lb)for(ha=z[y],l=ha.Ib;l<=ha.Lb;l++)for(h=ha.lb;h<=ha.Kb;h++)w=h+l*b.T,(ua=b.aa[w])||(ua=b.aa[w]=new x.Xd),ua.u&&ua.u.complete&&(w=f+(-this.u.Da+this.u.O*h)*e/b.width,this.ma.drawImage(ua.u,w,g+(-this.u.Da+this.u.O*l)*a/b.height,ua.u.width*e/b.width,ua.u.height*a/b.height)),ua.visible=!0;y--}for(e=0;e<this.u.levels.length;e++)if(b=this.u.levels[e],!b.cache)for(k in b.aa)b.aa.hasOwnProperty(k)&&
(ua=b.aa[k],ua.visible||(ua.u=null,delete b.aa[k]));if(0<=this.H.mode||0<this.H.ub.length)for(e=1,0>=this.H.mode&&(e=0),3==this.H.mode&&(e=this.H.va),k=0;k<this.W.length;k++)if(b=this.W[k],f=e,"poly"==b.type&&(a=b.ke,2==this.H.mode&&(f=b.va),g=this.H.ub.indexOf(b.id),-1!=g&&(f=this.H.ac[g]),0<a.length)){this.ma.fillStyle=this.fa(b.ec,b.dc*f);this.ma.strokeStyle=this.fa(b.gc,b.fc*f);this.ma.beginPath();for(b=0;b<a.length;b++)f=a[b],0==b?this.ma.moveTo(f.Zb,f.Cb):this.ma.lineTo(f.Zb,f.Cb);this.ma.closePath();
this.ma.stroke();this.ma.fill()}this.rd=!1};c.prototype.vs=function(a){var b=this;return function(){b.update();b.rd=!0;a.loaded=!0;a.u&&!a.V&&b.M.appendChild(a.u);b.bc&&b.bc--;a.u&&a.bb&&(a.bb.drawImage(a.u,0,0),a.u=null)}};c.prototype.ws=function(){var a=this;return function(){a.Na=!0;a.rd=!0;a.bc&&a.bc--}};c.prototype.tj=function(a){var b=this;return function(){b.Na=!0;b.rd=!0;b.bc&&b.bc--;a.u=null}};c.prototype.Gm=function(a,b,e){e.lb=a.width/this.u.O*b.Qg;e.Ib=a.height/this.u.O*b.Rg;e.Kb=a.width/
this.u.O*b.th;e.Lb=a.height/this.u.O*b.uh;e.lb=Math.min(Math.max(0,Math.floor(e.lb)),a.T-1);e.Ib=Math.min(Math.max(0,Math.floor(e.Ib)),a.ea-1);e.Kb=Math.min(Math.max(0,Math.floor(e.Kb)),a.T-1);e.Lb=Math.min(Math.max(0,Math.floor(e.Lb)),a.ea-1)};c.prototype.Rr=function(a){a=Math.round(a);this.Sc=0<(a&1);this.eg=0<(a&2);this.Aj=0<(a&4);this.fg=0<(a&8);4096<=a&&(this.ld=0<(a&4096),this.ia=0<(a&8192),this.Wh=0<(a&32768))};c.prototype.pq=function(){var a=0;this.Sc&&(a|=1);this.eg&&(a|=2);this.Aj&&(a|=
4);this.ld&&(a|=4096);this.ia&&(a|=8192);this.Wh&&(a|=32768);return a};c.prototype.vo=function(){if(!(6>this.cube.faces.length))for(var a=0;6>a;a++){var b=this.cube.faces[a];var e=[];e.push(new x.Ga(-1,-1,-1,0,0));e.push(new x.Ga(1,-1,-1,1,0));e.push(new x.Ga(1,1,-1,1,1));e.push(new x.Ga(-1,1,-1,0,1));for(var f=0;4>f;f++)4>a?e[f].La(-Math.PI/2*a):e[f].Fa(Math.PI/2*(4==a?-1:1)),this.Oa&&(e[f].ob(this.Oa.U*Math.PI/180),e[f].Fa(-this.Oa.pitch*Math.PI/180)),e[f].Ye(-this.pan.j),e[f].Sd(this.v.j),e[f].Ze(this.U.j);
e=this.Uj(e);b.mb=0<e.length;if(b.mb){b=b.ag;b.Qg=e[0].Dd;b.th=e[0].Dd;b.Rg=e[0].cc;b.uh=e[0].cc;for(f=1;f<e.length;f++)b.Qg=Math.min(b.Qg,e[f].Dd),b.th=Math.max(b.th,e[f].Dd),b.Rg=Math.min(b.Rg,e[f].cc),b.uh=Math.max(b.uh,e[f].cc);b.sg=b.th-b.Qg;b.ai=b.uh-b.Rg;b.scale=Math.max(b.sg,b.ai)}else b.ag.sg=-1,b.ag.ai=-1}};c.prototype.Jk=function(){for(var a=0;a<this.u.levels.length;a++){var b=this.u.levels[a],e;for(e in b.aa)b.aa.hasOwnProperty(e)&&(b.aa[e].visible=!1)}};c.prototype.hk=function(){var a=
0,b=Math.tan(Math.min(this.kc(),175)*Math.PI/360),e=this.C.height/(2*b);e*=1+this.C.width/this.C.height*b/2;for(e*=Math.pow(2,1<this.devicePixelRatio?this.u.fn:this.u.en);this.u.levels.length>=a+2&&!this.u.levels[a+1].Ve&&this.u.levels[a+1].width>e;)a++;return a};c.prototype.Ks=function(){var a=!1,b,e,f;if(this.C.width!==this.M.offsetWidth||this.C.height!==this.M.offsetHeight)this.C.width=this.M.offsetWidth,this.C.height=this.M.offsetHeight,this.M.style[this.Va+"OriginX"]=this.C.width/2+"px",this.M.style[this.Va+
"OriginY"]=this.C.height/2+"px",a=!0;var g=Math.round(this.td());if(this.lh!=g||a)this.lh=g,this.Sc||(this.M.style[this.Id]=g+"px",this.M.style[this.Id+"Origin"]="50% 50%");this.Fc=0;if(0<this.u.levels.length){this.vo();this.Jk();var h="";for(b=0;6>b;b++){var l=this.cube.faces[b];l.mb&&(h=h+b+",")}h=this.hk();var k;for(k=this.u.levels.length-1;k>=h;){a=this.u.levels[k];var w=1;k==this.u.levels.length-1&&0==this.u.Da&&(w=this.u.O/(this.u.O-2));for(b=0;6>b;b++){l=this.cube.faces[b];var r=l.ag;if(l.mb&&
0<r.sg&&0<r.ai&&0<r.scale||a.cache){l.Na=!1;var y={};a.cache?(y.lb=0,y.Ib=0,y.Kb=a.T-1,y.Lb=a.ea-1):this.Gm(a,r,y);for(f=y.Ib;f<=y.Lb;f++)for(e=y.lb;e<=y.Kb;e++){var z=e+f*a.T+b*a.T*a.ea;(r=a.aa[z])||(r=a.aa[z]=new x.Xd);if(!r.V&&this.bc<this.Qh){if(0<this.wj.length){r.V=this.wj.shift();for(z=this.M.firstChild;z&&z.ee&&(-1==z.ee||z.ee>=k);)z=z.nextSibling;this.M.insertBefore(r.V,z);r.bb=r.V.getContext("2d")}else if(this.mo<this.Re){this.mo++;r.V=document.createElement("canvas");r.V.width=this.u.O+
2*this.u.Da;r.V.height=this.u.O+2*this.u.Da;r.bb=r.V.getContext("2d");r.V.style[this.Va+"Origin"]="0% 0%";r.V.style.overflow="hidden";r.V.style.position="absolute";for(z=this.M.firstChild;z&&z.ee&&(-1==z.ee||z.ee>=k);)z=z.nextSibling;this.M.insertBefore(r.V,z)}r.V&&(this.yk++,r.u=new Image,r.u.crossOrigin=this.crossOrigin,r.u.style[this.Va+"Origin"]="0% 0%",r.u.style.position="absolute",r.u.style.overflow="hidden",r.V.ee=k,r.u.onload=this.vs(r),r.u.onerror=this.tj(r),r.u.onabort=this.tj(r),r.u.setAttribute("src",
this.re(b,k,e,f)),a.cache&&this.ic.push(r.u),this.bc++,this.Na=!0)}else this.Fc++;if(r.V){z="";this.Sc?(z+="translate3d("+this.C.width/2+"px,"+this.C.height/2+"px,0px) ",z+=" perspective("+g+"px) ",z+="translate3d(0px,0px,"+g+"px) "):z+="translate3d("+this.C.width/2+"px,"+this.C.height/2+"px,"+g+"px) ";z+="rotateZ("+Number(this.U.j).toFixed(10)+"deg) ";z+="rotateX("+Number(this.v.j).toFixed(10)+"deg) ";z+="rotateY("+Number(-this.pan.j).toFixed(10)+"deg) ";this.Oa&&(z+="rotateX("+Number(-this.Oa.pitch).toFixed(10)+
"deg) ",z+="rotateZ("+Number(this.Oa.U).toFixed(10)+"deg) ");z=4>b?z+("rotateY("+-90*b+"deg) "):z+("rotateX("+(4==b?-90:90)+"deg) ");if(this.eg){var ha=this.u.O/a.width*(2*k+1)*(this.Ag/this.u.O);ha=this.lc?2/Math.tan(this.fov.j*Math.PI/360)*ha:2*ha;z+=" scale("+ha*w*w+")"}else ha=1/(w*w);z+=" translate3d("+(1/w*e*this.u.O-this.u.Da-a.width/2)+"px,";z+=1/w*f*this.u.O-this.u.Da-a.width/2+"px,";z+=-a.width*ha/2+"px)";l.mb&&(r.visible=!0,r.V?r.V.style[this.Va]=z:r.u&&(r.u.style[this.Va]=z))}}}}k--}for(g=
0;g<this.u.levels.length;g++){a=this.u.levels[g];for(var ua in a.aa)a.aa.hasOwnProperty(ua)&&(r=a.aa[ua],!r.visible&&r.V&&(a.cache?r.V?r.V.style[this.Va]="translate3d(-10px,-10px,0px) scale(0.001,0.001)":r.u&&(r.u.style[this.Va]=""):(r.bb&&r.bb.clearRect(0,0,r.bb.canvas.width,r.bb.canvas.height),this.wj.push(r.V),r.V?(h="translate3d(-10px,-10px,0px) scale(0.001,0.001)",r.V.style[this.Va]=h,r.V.ee=-1):r.loaded&&this.M.removeChild(r.u),r.V=null,r.u=null,r.bb=null,delete a.aa[ua])))}this.rd=!1}};c.prototype.to=
function(){var a=Math.round(this.td());this.Sc||this.so(a);for(var b=0;b<this.fb.length;b++){var e=this.fb[b];e.wo(a);e.f.hidden=!1}};c.prototype.xo=function(){for(var a=Math.round(this.td()),b=0;b<this.S.length;b++){var e=this.S[b];e.hd||(e.wo(a),e.f.hidden=!1)}};c.prototype.Eq=function(){for(var a=0;a<this.fb.length;a++){var b=this.fb[a];b.jg(!1)}for(a=0;a<this.S.length;a++)b=this.S[a],b.hd||b.jg(!1)};c.prototype.Os=function(){for(var a=0;a<this.S.length;a++){var b=this.S[a];b.hd||b.kf()}for(a=
0;a<this.fb.length;a++)b=this.fb[a],b.kf()};c.prototype.Mc=function(a){this.de=!1;try{this.$a=a?a:document.createElement("canvas");var b=this.pd.offsetWidth-this.margin.left-this.margin.right,e=this.pd.offsetHeight-this.margin.top-this.margin.bottom;if(100>b||100>e)e=b=100;var f=window.devicePixelRatio||1;this.fg&&(f=1);this.M.style.width=b+"px";this.M.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.M.insertBefore(this.$a,this.M.firstChild);var g=this.Eo;g.stencil=!0;g.depth=!0;g.powerPreference="high-performance";g.alpha=this.lc?!0:!1;this.ed&&10<=this.Nf[0]&&(g.antialias=!1,g.alpha=!1);a={};a.flags=g;a.canvas=this.$a;this.L("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.zb.width=b*f;this.zb.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.hh&&(this.Re=1<f?4*this.Re:2*this.Re);this.N("Max tile cnt: "+this.Re);this.Aa.eh();this.Aa.Hi();this.Aa.Pm(this.ff);this.Aa.Qm();this.J&&(this.J.eh(),this.J.Mc());this.Ta&&(this.Ta.eh(),this.Ta.Mc())}}catch(l){this.N(l)}this.R?(this.ia=!0,this.L("webglready",{gl:this.R})):alert("Could not initialise WebGL!")};c.prototype.eb=function(a){return a?"{"==a.charAt(0)||"/"==a.charAt(0)||0<a.indexOf("://")||0==a.indexOf("javascript:")?a:
this.$d+a:this.$d};c.prototype.Ob=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.re=function(a,b,e,f,g){var h=this.u.Fk-1-b,l=this.u.Hk,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.Ob(l,"c",a),l=this.Ob(l,"s",k),l=this.Ob(l,"r",b),l=this.Ob(l,"l",h),l=this.Ob(l,"x",e),l=this.Ob(l,"y",f),l=this.Ob(l,"v",f),l=this.Ob(l,"h",e);return this.eb(l)};c.prototype.Wg=function(){return this.pan.j};c.prototype.jq=function(){return this.F.pan};c.prototype.zm=function(){for(var a=this.pan.j;-180>a;)a+=360;for(;180<a;)a-=360;return a};c.prototype.Je=function(){for(var a=this.pan.j-this.pan.Nk;-180>a;)a+=360;for(;180<a;)a-=360;return a};c.prototype.af=function(a){this.Ea();
isNaN(a)||(this.pan.j=Number(a));this.update()};c.prototype.$k=function(a){this.Ea();isNaN(a)||(this.pan.j=Number(a)+this.pan.Nk);this.update()};c.prototype.Ml=function(a,b){isNaN(a)||(this.af(this.Wg()+a),b&&(this.pan.d=a))};c.prototype.jp=function(a,b){this.Ml(a*this.xi(),b)};c.prototype.Bi=function(){return this.v.j};c.prototype.qq=function(){return this.F.v};c.prototype.bf=function(a){this.Ea();isNaN(a)||(this.v.j=Number(a));this.update()};c.prototype.Ol=function(a,b){this.bf(this.Bi()+a);b&&
(this.v.d=a)};c.prototype.lp=function(a,b){this.Ol(a*this.xi(),b)};c.prototype.gj=function(a){this.Ea();isNaN(a)||(this.U.j=Number(a));this.update()};c.prototype.Dm=function(){return this.U.j};c.prototype.nk=function(){return this.fov.j};c.prototype.Jp=function(){return this.F.Wd};c.prototype.$e=function(a){this.Ea();switch(this.Sa()){case 4:var b=170;break;case 12:b=360;break;case 9:b=355;break;default:b=170}2==this.Xa&&(b=9999999999);!isNaN(a)&&0<a&&a<b&&(b=this.fov.j,this.fov.j=1*a,b!=this.fov.j&&
this.update())};c.prototype.Ll=function(a,b){this.$e(this.nk()+a);b&&(this.fov.d=a)};c.prototype.Rj=function(a,b){if(!isNaN(a)){var e=a/90*Math.cos(Math.min(this.fov.j,90)*Math.PI/360);e=this.fov.j*Math.exp(e);this.$e(e);b&&(this.fov.d=a)}};c.prototype.Pr=function(a,b){this.Ea();isNaN(a)||(this.pan.j=a);isNaN(b)||(this.v.j=b);this.update()};c.prototype.Qr=function(a,b,e){this.Ea();!isNaN(a)&&1E7>a&&-1E7<a&&(this.pan.j=a);!isNaN(b)&&1E7>b&&-1E7<b&&(this.v.j=b);!isNaN(e)&&1E7>e&&-1E7<e&&(this.U.j=e);
this.update()};c.prototype.fj=function(a,b,e){this.Ea();isNaN(a)||(this.pan.j=a);isNaN(b)||(this.v.j=b);isNaN(e)||this.$e(e);this.update()};c.prototype.Kr=function(){this.fj(this.pan.cb,this.v.cb,this.fov.cb)};c.prototype.setLocked=function(a){this.Rn(a);this.Sn(a);this.Qn(a)};c.prototype.Rn=function(a){this.K.mc=a};c.prototype.Qn=function(a){this.K.rh=a};c.prototype.Vp=function(){return this.K.rh};c.prototype.Sn=function(a){this.K.ge=a};c.prototype.dj=function(a){this.rc=a};c.prototype.Kp=function(){return this.wk()?
!0:this.sk};c.prototype.Un=function(a,b){void 0===b&&(b=!0);this.zo=b;this.lf==!a&&(a&&this.wk()?this.Gn():((this.lf=!!a)?this.nb.Ih=!0:this.U.j=0,this.L("gyrochanged",{}),this.L("playerstatechanged",{})))};c.prototype.wk=function(){return window.hasOwnProperty("DeviceOrientationEvent")&&DeviceOrientationEvent.hasOwnProperty("requestPermission")&&"function"===typeof DeviceOrientationEvent.requestPermission?!0:!1};c.prototype.Gn=function(){var a=this;if(this.wk())try{DeviceOrientationEvent.requestPermission().then(function(b){"granted"===
b&&(a.nb.Ih=!0,a.lf=!0,a.L("gyrochanged",{}),a.L("playerstatechanged",{}))})["catch"](console.error)}catch(b){console.log(b)}};c.prototype.rq=function(){return this.lf};c.prototype.iq=function(){return this.Oe?5:this.ed?4:this.Ym?1:this.Vm?2:this.Um?3:0};c.prototype.Hp=function(){return this.Bk?5:this.Pf?4:this.Qf?2:this.lc?3:this.Ak?1:0};c.prototype.moveTo=function(a,b,e,f,g,h){this.Ea();if("_blank"!==a&&""!==a){this.F.active=!0;this.F.aborted=!1;this.F.pl=!1;var l=a.toString().split("/");1<l.length&&
(a=Number(l[0]),f=Number(b),b=Number(l[1]),2<l.length&&(e=Number(l[2])));this.F.pan=isNaN(a)?this.pan.j:Number(a);this.F.v=isNaN(b)?this.v.j:Number(b);this.F.fov=!isNaN(e)&&0<e&&180>e?Number(e):this.fov.j;this.F.speed=!isNaN(f)&&0<f?Number(f):1;this.F.U=isNaN(g)?this.U.j:Number(g);void 0!==h?!a||4!=h&&12!=h&&9!=h||(this.F.Nb=h):this.F.Nb=this.Wa}};c.prototype.Ui=function(a){this.Ea();var b=0,e=0,f=70,g=4,h=0,l=1;a.hasOwnProperty("pan")&&(b=Number(a.pan),this.F.pan=b);a.hasOwnProperty("tilt")&&(e=
Number(a.tilt),this.F.v=e);a.hasOwnProperty("fov")&&(f=Number(a.fov),this.F.fov=f);a.hasOwnProperty("projection")&&(g=Number(a.projection),this.F.Nb=g);a.hasOwnProperty("timingFunction")&&(h=Number(a.timingFunction));a.hasOwnProperty("speed")&&(l=Number(a.speed));0>=l?(this.fj(b,e,f),this.Tc(g)):(a=new x.tl,a.ab="__AutoMove",a.pe=this.zm(),a.Nh=this.v.j,a.Td=this.fov.j,a.Mh=this.Wa,a.Vd=b,a.qe=e,a.mg=f,a.Bd=g,a.Af=!1,a.Ee=!1,a.Fe=!1,0==h&&(a.Ee=!0),1==h&&(a.Af=!0,a.Ee=!0),2==h&&(a.Fe=!0),a.speed=
l,this.F.Cl=this.I,this.I=this.mm(a),this.F.Dl=(new Date).getTime(),this.F.pl=!0,this.F.active=!0,this.F.aborted=!1,this.F.pan=b,this.F.v=e,this.F.fov=f,this.Yd=!1)};c.prototype.Uq=function(a){this.moveTo(this.pan.cb,this.v.cb,this.fov.cb,a)};c.prototype.Vq=function(a,b){var e={};e.pan=this.pan.cb;e.tilt=this.v.cb;e.fov=this.fov.cb;e.projection=this.Yi;e.timingFunction=b;e.speed=a;this.Ui(e)};c.prototype.Wo=function(a,b,e,f){var g=new x.ei(this);g.type="point";g.pan=b;g.v=e;g.id=a;g.f={};g.f.player=
this;g.Df();g.f.hotspot=g;g.f.__div=document.createElement("div");g.f.__div.appendChild(f);this.W.push(g);g.f.__div.style.position="absolute";g.f.__div.style.left="-1000px";g.f.__div.style.top="-1000px";g.f.__div.mb=!0;this.Ra.insertBefore(g.f.__div,this.Ra.firstChild);this.Na=!0};c.prototype.Hs=function(a,b,e){for(var f=0;f<this.W.length;f++){var g=this.W[f];g.id==a&&(g.pan=b,g.v=e,g.Df())}this.Na=!0};c.prototype.Br=function(a){for(var b=-1,e,f=0;f<this.W.length;f++)e=this.W[f],e.id==a&&(b=f);-1<
b&&(e=this.W.splice(b,1).pop(),e.f&&e.f.__div&&this.Ra.removeChild(e.f.__div))};c.prototype.lq=function(){for(var a=[],b=0;b<this.W.length;b++){var e=this.W[b];"point"==e.type&&a.push(String(e.id))}return a};c.prototype.Np=function(a){for(var b=0;b<this.W.length;b++){var e=this.W[b];if(e.id==a)return b={},b.id=a,b.pan=e.pan,b.tilt=e.v,b.url=e.url,b.target=e.target,b.distance=e.distance,b.title=e.title,b.description=e.description,b.skinid=e.cl,e.ad&&(b.customimage=e.ad,b.customimagewidth=e.De,b.customimageheight=
e.Hd,b.use3D=e.pg,b.distance3D=e.si),e.f&&e.f.__div&&(b.div=e.f.__div),b}};c.prototype.Co=function(a,b){this.ga.start.x=a;this.ga.start.y=b;this.ga.oa.x=a;this.ga.oa.y=b;this.Ka.oa.x=a;this.Ka.oa.y=b;this.Uk++;this.pan.$c=this.pan.j;this.v.$c=this.v.j};c.prototype.Ao=function(a,b){var e=this.kc();this.pan.$c+=a*e/this.C.height;this.v.$c+=b*e/this.C.height;this.pan.j=this.pan.$c;this.v.j=this.v.$c};c.prototype.Bo=function(a,b){this.ga.j.x=a;this.ga.j.y=b;this.ga.na.x=this.ga.j.x-this.ga.oa.x;this.ga.na.y=
this.ga.j.y-this.ga.oa.y;this.K.Md&&(this.ga.oa.x=this.ga.j.x,this.ga.oa.y=this.ga.j.y,this.update())};c.prototype.Ea=function(){this.B.active&&(this.B.active=!1,this.L("autorotatechanged",{}),this.pan.d=0,this.v.d=0,this.fov.d=0);this.F.active&&(this.F.active=!1,this.pan.d=0,this.v.d=0,this.fov.d=0);this.nf=this.F.aborted=!1;this.B.Ti=!1;this.Fd=.02;this.wg=0;this.B.qg&&(this.B.enabled=this.B.qf);this.Sf=(new Date).getTime()};c.prototype.Tp=function(){return this.Sf};c.prototype.Am=function(a,b){a||
(a=this.qa.x,b=this.qa.y);var e=this.C.height/(2*Math.tan(this.fov.j*Math.PI/360));a-=this.C.width/2;b-=this.C.height/2;var f={};f.pan=180*Math.atan(a/e)/Math.PI;f.tilt=180*Math.atan(-b/Math.sqrt(a*a+e*e))/Math.PI;return f};c.prototype.nq=function(a,b){a||(a=this.qa.x,b=this.qa.y);if(2===this.Xa){var e=this.fov.j/this.C.height;a=-(a-this.C.width/2)*e+this.pan.j;b=-(b-this.C.height/2)*e+this.v.j}else{e=new x.Ga(0,0,1);a=this.Am(a,b);e.Sd(-a.tilt);e.Ye(a.pan);e.Sd(-this.v.j);e.Ye(-this.pan.j);e.Sd(-this.Oa.pitch);
e.Ze(this.Oa.U);for(a=e.bp()-180;-180>a;)a+=360;b=e.cp()}e={};e.pan=a;e.tilt=b;return e};c.prototype.Nc=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.Tj=function(a,b){var e=this.td(),f,g;for(f=0;f<this.S.length+this.fb.length;f++){var h=f<this.S.length?this.S[f]:this.fb[f-this.S.length];if(h.qb)return h}for(f=0;f<this.S.length+
this.fb.length;f++)if(h=f<this.S.length?this.S[f]:this.fb[f-this.S.length],!h.hd){var l=[],k=new x.Ga,w;var r=g=void 0;0<h.fov&&(g=Math.tan(h.fov/2*Math.PI/180),r=0<h.Vb?g*h.Ac/h.Vb:g,h.Kc&&1!=h.Kc&&(r*=h.Kc));for(w=0;4>w;w++){switch(w){case 0:k.init(-g,-r,0);break;case 1:k.init(g,-r,0);break;case 2:k.init(g,r,0);break;case 3:k.init(-g,r,0)}k.Fa(h.Fa*Math.PI/180);k.La(-h.La*Math.PI/180);k.ob(h.ob*Math.PI/180);--k.z;k.Fa(-h.v*Math.PI/180);k.La(h.pan*Math.PI/180);k.La(-this.pan.j*Math.PI/180);k.Fa(this.v.j*
Math.PI/180);k.ob(this.U.j*Math.PI/180);l.push(k.clone())}l=this.Uj(l);if(0<l.length){for(w=0;w<l.length;w++)k=l[w],.1>k.z?(r=-e/k.z,g=this.C.width/2+k.x*r,r=this.C.height/2+k.y*r):r=g=0,k.Zb=g,k.Cb=r;if(this.Nm(l,a,b))return h}}return null};c.prototype.fh=function(){return document.webkitIsFullScreen||document.mozFullScreen||document.msFullscreenElement&&null!=document.msFullscreenElement||document.fullScreen};c.prototype.Tq=function(a){this.uo(a);window.focus();if(this.sd)this.sd.onclick();(this.He||
this.Ef&&this.Pf)&&this.wi();this.Qb=null;if(!this.K.mc&&!this.rc){a=a?a:window.event;if(a.which||0==a.which||1==a.which){var b=(new Date).getTime();if(this.le){this.Qb=this.le;this.Y.Qc=!0;this.Y.startTime=b;a.stopPropagation();return}if(this.Nc(a.target)){var e;(e=this.Tj(this.qa.x,this.qa.y))&&e.Le&&(this.Qb=e);this.Co(a.pageX,a.pageY);this.Y.Qc=!0;this.Y.startTime=b;a.preventDefault();this.Ea()}}this.ga.na.x=0;this.ga.na.y=0}};c.prototype.jf=function(a,b){var e=this.H.rj;e.enabled&&(this.ya!=
this.kb&&0<=a&&0<=b&&""!=this.ya.title?(this.Ha.innerHTML=this.ya.title,this.Ha.style.color=this.fa(e.sj,e.qj),this.Ha.style.backgroundColor=e.background?this.fa(e.ec,e.dc):"transparent",this.Ha.style.border="solid "+this.fa(e.gc,e.fc)+" "+e.ji+"px",this.Ha.style.borderRadius=e.Mj+"px",this.Ha.style.textAlign="center",0<e.width?(this.Ha.style.left=a-e.width/2+this.margin.left+"px",this.Ha.style.width=e.width+"px"):(this.Ha.style.width="auto",this.Ha.style.left=a-this.Ha.offsetWidth/2+this.margin.left+
"px"),this.Ha.style.height=0<e.height?e.height+"px":"auto",this.Ha.style.top=b+25+ +this.margin.top+"px",this.Ha.style.visibility="inherit",this.Ha.style.overflow="hidden"):(this.Ha.style.visibility="hidden",this.Ha.innerHTML=""))};c.prototype.uo=function(a){var b=this.Ke();this.fh()?(this.qa.x=a.clientX-this.margin.left,this.qa.y=a.clientY-this.margin.top):(this.qa.x=a.pageX-b.x,this.qa.y=a.pageY-b.y);return b};c.prototype.hg=function(a){this.ya=a&&null!==a&&"object"==typeof a?a:this.kb;this.ya==
this.kb&&(a=this.li(this.qa.x,this.qa.y))&&(a.hb=0);this.ya.Df&&this.ya.Df();this.hotspot=this.ya;this.L("activehotspotchanged",{hotspot:this.ya})};c.prototype.Sq=function(a){a=a?a:window.event;var b=this.uo(a);if(!this.K.mc&&!this.rc&&!this.le){this.B.active&&(this.B.Pi=(new Date).getTime());0==a.buttons&&(this.Y.Qc=!1);this.Y.Qc&&(a.preventDefault(),(a.which||0==a.which||1==a.which)&&this.Bo(a.pageX,a.pageY),this.Ea());var e=!1;if(this.ya==this.kb||"poly"==this.ya.type){var f=this.kb;0<this.W.length&&
this.Nc(a.target)&&(f=this.li(this.qa.x,this.qa.y));this.Kh(f);this.jf(a.pageX-b.x,a.pageY-b.y);0!=f&&f!=this.kb&&(e=!0)}b=null;!e&&this.Nc(a.target)&&(b=this.Tj(this.qa.x,this.qa.y));this.B.pi&&(this.B.pi=!1);this.Ra.style.cursor=this.ya!=this.kb&&this.ya.Jf&&e||b&&b.bh?"pointer":"default"}};c.prototype.Kh=function(a){!1===a&&(a=this.kb);this.ya!=a&&(this.ya!=this.kb&&(0<this.H.mode&&(this.ya.hb=0),this.la&&this.la.hotspotProxyOut&&this.la.hotspotProxyOut(this.ya.id,this.ya.url)),a!=this.kb?(this.hg(a),
this.la&&this.la.hotspotProxyOver&&this.la.hotspotProxyOver(this.ya.id,this.ya.url),0<this.H.mode&&(this.H.hb=1,this.ya.hb=1)):(this.hg(this.kb),0<this.H.mode&&(this.H.hb=0)),this.ra&&this.ra.changeCurrentHotspot(this.ya.id))};c.prototype.Rq=function(a){a=a?a:window.event;this.Oi=-1;(this.He||this.Ef&&this.Pf)&&this.wi();if(!this.K.mc&&!this.rc&&(this.Qb&&(this.Qb.Le(),this.le=this.Qb.qb?this.Qb:null),this.Y.Qc)){this.Ea();a.preventDefault();this.Y.Qc=!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.Y.startTime&&0<=b&&20>b){var e=this.li(this.qa.x,this.qa.y);e&&(this.ya==this.kb&&this.Kh(e),this.po(e));b=Math.abs(this.ga.Pd.x-this.ga.oa.x)+Math.abs(this.ga.Pd.y-this.ga.oa.y);700>a-this.jh&&0<=b&&20>b?(e?this.qo(e):this.K.ck&&this.vj(),this.jh=0):this.jh=a;this.ga.Pd.x=this.ga.oa.x;this.ga.Pd.y=this.ga.oa.y}}};c.prototype.gn=function(a){if(!this.K.ge&&!this.rc&&(a=a?a:window.event,this.Nc(a.target))){var b=a.detail?-1*a.detail:
a.wheelDelta/40;this.K.Rm&&(b=-b);a.axis&&(-1==this.Oi?this.Oi=a.axis:this.Oi!=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.Rj(e*this.K.bo,!0),this.update());a.preventDefault();this.Ea()}};c.prototype.Ds=function(a){a||(a=window.event);var b=a.touches,e=this.Ke();this.qa.x=b[0].pageX-e.x;this.qa.y=b[0].pageY-e.y;this.se=this.Qb=null;window.focus();this.Ei||(this.Ei=!0,this.L("hastouch",{}),this.L("playerstatechanged",
{}));this.Wm||this.Oe||!(this.He||this.Ef&&this.Pf)||this.wi();if(!this.K.mc&&!this.rc){var f=(new Date).getTime();if(this.le)this.Qb=this.le,this.Y.cd=!0,this.Y.startTime=f,a.preventDefault(),this.Y.Eh=!0;else{if(!this.Y.cd&&b[0]){this.Y.startTime=f;this.Y.start.x=b[0].pageX;this.Y.start.y=b[0].pageY;this.Y.oa.x=b[0].pageX;this.Y.oa.y=b[0].pageY;this.vb=b[0].target;if(this.Nc(this.vb)){(f=this.Tj(this.qa.x,this.qa.y))&&f.Le&&(this.Qb=f);if(f=this.li(this.qa.x,this.qa.y))this.N(f),this.se=f,this.Kh(f),
f=this.Ug(a),this.jf(f.x-e.x,f.y-e.y);this.Co(b[0].pageX,b[0].pageY);this.Y.fm=b[0].identifier;this.Y.cd=!0;a.preventDefault();this.Y.Eh=!0;this.Ea()}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.Y.Eh=!0)}}1<b.length&&(this.Y.cd=!1);!this.uk&&2==b.length&&b[0]&&b[1]&&this.Nc(this.vb)&&(a=b[0].pageX-b[1].pageX,b=b[0].pageY-b[1].pageY,this.fov.co=Math.sqrt(a*a+b*b),this.fov.prev=
this.fov.j);this.ga.na.x=0;this.ga.na.y=0}}};c.prototype.wi=function(){this.Ef=this.He=!1;try{this.Xh&&this.D.f&&(!this.D.yd&&this.D.el&&this.D.f.play(),this.D.f.muted=!1);if(this.ua&&(this.ua.resume(),!("suspended"!=this.ua.state||this.ed&&this.Qf))){this.He=!0;return}if(this.ed&&this.ua&&this.ua.createOscillator){var a=this.ua.createOscillator(),b=this.ua.createGain();a.frequency.value=30;a.type="sine";a.connect(b);b.connect(this.ua.destination);b.gain.value=.01;a.start(0);setTimeout(function(){a.stop()},
1E4)}for(b=0;b<this.X.length;b++){var e=this.X[b];!this.isPlaying(e.id)&&0<=e.loop&&e.autoplay&&this.Ue(e.id,e.loop)}for(b=0;b<this.S.length;b++){var f=this.S[b];!this.isPlaying(f.id)&&f.autoplay&&this.Xh&&this.Ue(f.id,f.loop);this.isPlaying(f.id)&&f.autoplay&&this.Xh&&(f.Ed&&f.vg(),f.f.muted=!1)}}catch(g){this.N(g)}};c.prototype.Cs=function(a){a||(a=window.event);var b=a.touches,e=this.Ke();this.qa.x=b[0].pageX-e.x;this.qa.y=b[0].pageY-e.y;if(this.K.mc||this.rc)(this.J.Cd||this.J.ue)&&a.preventDefault();
else{b[0]&&(this.Y.oa.x=b[0].pageX,this.Y.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.Y.cd){a.preventDefault();for(f=0;f<b.length;f++)if(b[f].identifier==this.Y.fm){this.Bo(b[f].pageX,b[f].pageY);break}this.se&&(f=this.Ug(a),this.jf(f.x-e.x,f.y-e.y));this.Ea()}2==b.length&&b[0]&&b[1]&&(this.Y.cd=!1,!this.uk&&this.Nc(this.vb)&&(this.K.ge||(e=b[0].pageX-
b[1].pageX,b=b[0].pageY-b[1].pageY,this.fov.Wl=Math.sqrt(e*e+b*b),this.Ka.fov.active=!0,this.Ka.fov.zc=this.fov.prev*Math.sqrt(this.fov.co/this.fov.Wl),4==this.Sa()&&2!=this.Xa&&this.Ka.fov.zc>this.fov.max&&(this.Ka.fov.zc=this.fov.max),this.Ka.fov.zc<this.fov.min&&(this.Ka.fov.zc=this.fov.min)),this.Ea(),a.preventDefault()))}};c.prototype.Bs=function(a){this.Y.Eh&&(this.Y.Eh=!1,a.preventDefault());var b=this.Ke(),e=!1;(this.He||this.Ef&&this.Pf)&&this.wi();if(!this.K.mc&&!this.rc){this.Y.cd&&(a.preventDefault(),
this.Ea());var f=(new Date).getTime();var g=void 0;var h=!1;g=Math.abs(this.Y.start.x-this.Y.oa.x)+Math.abs(this.Y.start.y-this.Y.oa.y);if(0<=g&&20>g){e=!0;this.Nc(this.vb)&&(a.preventDefault(),this.Qb&&(this.Qb.Le(),this.le=this.Qb.qb?this.Qb:null));if(this.vb){for(g=this.vb;g&&g!=this.control;)g.onclick&&(g.onclick(),"hotspot"!=g.$s&&(h=!0),e=!1),g=g.parentNode;h&&a.preventDefault()}g=Math.abs(this.Y.Pd.x-this.Y.oa.x)+Math.abs(this.Y.Pd.y-this.Y.oa.y);if(700>f-this.jh&&0<=g&&20>g){if(this.Nc(this.vb))if(a.preventDefault(),
this.se)this.qo(this.se);else if(this.K.ck){var l=this;setTimeout(function(){l.vj()},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.jh=0}else this.jh=f;this.Y.Pd.x=this.Y.oa.x;this.Y.Pd.y=this.Y.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.Ug(a);this.jf(a.x-b.x,a.y-b.y);this.se&&e&&this.po(this.se);this.jf(-1,-1);this.vb=null;
this.Y.cd=!1;this.Kh(this.kb);this.se=null}};c.prototype.As=function(a){var b=this.Ke();this.K.mc||this.rc||(this.Y.cd=!1);this.se=null;this.Kh(this.kb);a=this.Ug(a);this.jf(a.x-b.x,a.y-b.y)};c.prototype.Xm=function(){return null!=this.vb||this.Y.cd||this.Y.Qc};c.prototype.hn=function(a){!this.Se&&window.MSGesture&&(this.N("setup gesture"),this.Se=new MSGesture,this.Se.target=this.control);this.Se&&this.Se.addPointer(a.pointerId)};c.prototype.om=function(a){this.uk=!0;this.Vi=1;this.K.mc||this.K.ge||
this.rc||(a.touches?(this.vb=a.touches.target,this.Nc(a.target)&&(a.preventDefault(),this.fov.prev=this.fov.j,this.Ea())):(a.preventDefault(),this.fov.prev=this.fov.j,this.Ea()))};c.prototype.Fp=function(a){this.K.mc||this.K.ge||this.rc||!this.Nc(a.target)||(a.preventDefault(),this.Ka.fov.active=!0,this.Ka.fov.zc=this.fov.prev/Math.sqrt(a.scale),4==this.Sa()&&2!=this.Xa&&this.Ka.fov.zc>this.fov.max&&(this.Ka.fov.zc=this.fov.max),this.update(),this.Ea())};c.prototype.Wq=function(a){this.K.mc||this.K.ge||
this.rc||(a.preventDefault(),1!=a.scale&&(this.Ka.fov.active=!0,this.Vi*=a.scale,this.Ka.fov.zc=this.fov.prev/Math.sqrt(this.Vi),4==this.Sa()&&2!=this.Xa&&this.Ka.fov.zc>this.fov.max&&(this.Ka.fov.zc=this.fov.max),this.update(),this.Ea()))};c.prototype.nm=function(a){this.K.mc||this.K.ge||this.rc||(this.Ka.fov.active=!1,a.preventDefault(),this.Ea(),this.Se&&this.Se.reset&&this.Se.reset())};c.prototype.Jq=function(a){this.K.rh||this.rc||(this.isFullscreen&&a.preventDefault(),this.Mi=a.keyCode,this.Ea())};
c.prototype.Kq=function(a){this.Mi&&(this.Mi=0,a.preventDefault())};c.prototype.br=function(){this.Mi=0};c.prototype.Ah=function(){this.isFullscreen&&(this.fh()||this.exitFullscreen(),this.fh()&&(this.$.style.left="0px",this.$.style.top="0px"))};c.prototype.hr=function(a,b,e,f){f?(this.ah.alpha=a,this.ah.beta=b,this.ah.gamma=e,this.ah.gamma+=90):(this.nb.alpha=a,this.nb.beta=b,this.nb.gamma=e,this.nb.gamma+=90);this.nb.orientation=window.orientation?1*parseInt(""+window.orientation,10):0;e=new x.vl;
a=this.nb;e.Ye(-a.alpha);e.Ze(-a.beta);e.Sd(-a.gamma);e.Ze(90-a.orientation);1>e.Mb?-1<e.Mb?(b=180/Math.PI*Math.asin(-e.Mb),a=180/Math.PI*Math.atan2(e.qc,e.pc),e=180/Math.PI*Math.atan2(e.oc,e.nc)):(b=0,a=90,e=-180/Math.PI*Math.atan2(-e.Wb,e.Xb)):(b=0,a=-90,e=180/Math.PI*Math.atan2(-e.Wb,e.Xb));if(this.lf)if(this.Xm()||this.F.Gi||this.nb.Ih)this.nb.Te=this.Wg()+e,this.nb.fadeIn=0,this.nb.Ih=!1,this.ve&&this.Gb.Hn();else{f=this.F.active;var g=1;10>this.nb.fadeIn&&(this.nb.fadeIn+=1,g=.1*this.nb.fadeIn);
e=-e+this.nb.Te;this.af(g*e+(1-g)*this.Wg());this.bf(g*a+(1-g)*this.Bi());this.zo?this.gj(g*b+(1-g)*this.Dm()):this.gj(0);this.Dg();this.F.active=f}};c.prototype.po=function(a){this.la&&this.la.hotspotProxyClick&&this.la.hotspotProxyClick(a.id,a.url);""!=a.url&&(this.Ok(a.url,a.target),this.jf(-1,-1))};c.prototype.qo=function(a){this.la&&this.la.hotspotProxyDoubleClick&&this.la.hotspotProxyDoubleClick(a.id,a.url)};c.prototype.xi=function(){return Math.min(1,2*Math.tan(Math.PI*Math.min(this.fov.j,
90)/360))};c.prototype.un=function(){var a=this;setTimeout(function(){a.un()},100);9!=a.aj||a.Ii||window.requestAnimationFrame(function(){a.Ch();a.N("restart recover timer")});10<a.aj&&1<a.Uk&&(a.Oc("recover timer - disabling requestAnimationFrame"),a.Ii=!0,a.Ch());a.aj++};c.prototype.jj=function(a){var b={PAN:{value:0,name:"pan"},Zs:{value:1,name:"tilt"},Xs:{value:2,name:"fov"}},e=0,f=0,g=0,h;for(h in b){for(var l=b[h],k,w=Math.floor(a);!this.Hf(w,l.value)&&0<w;)w--;w=this.Hf(w,l.value);var r=this.aq(w);
if(r){k=new x.Ic(w.time,w.value);var y=new x.Ic(r.time,r.value),z=(a-w.time)/(r.time-w.time);if(0!=w.type||0!=r.type&&3!=r.type)if(3==w.type)k=w.value;else{z=new x.Ic;var ha=new x.Ic,ua=r.time-w.time;0==w.type?ha.init(w.time+.3*ua,w.value):ha.init(w.Ae,w.Be);0==r.type||3==r.type?z.init(r.time-.3*ua,r.value):z.init(r.ye,r.ze);r=new x.Ic;r.Lj(k,y,ha,z,a);k=r.y}else r=new x.Ic,r.Ld(k,y,z),k=r.y}else k=w.value;switch(l.value){case 0:l=this.pan.j;if(this.Yd&&3!=w.type){if(2!=this.Xa){for(;360<k;)k-=360;
for(;-360>k;)k+=360}e=k-l;2!=this.Xa&&(180<e&&(e-=360),-180>e&&(e+=360));this.pan.j+=e*this.Fd}else this.pan.j=k;this.B.oh=this.pan.j;break;case 1:l=this.v.j;this.Yd&&3!=w.type?(f=k-l,this.v.j+=f*this.Fd):this.v.j=k;this.B.ph=this.v.j;break;case 2:l=this.fov.j,this.Yd&&3!=w.type?(g=k-l,this.fov.j+=g*this.Fd):this.fov.j=k,this.B.nh=this.fov.j}}b=this.Sa();for(h=Math.floor(a);!this.Hf(h,3)&&0<h;)h--;h=this.Hf(h,3);w=a-h.time;this.Yd&&-1!=this.xg&&this.hi+this.Ij>a?(b=this.Tg(this.xg),this.fov.j>b?this.hi=
a:(w=(a-this.hi)/this.Ij,w=Math.min(1,w),this.Tc(this.Wa,this.xg,1-w))):(0==h.Fb||w>h.Fb-.3?this.Tc(h.value):(w/=h.Fb,this.Tc(b,h.value,1-w)),this.B.cn=h.value);this.Yd&&(e=Math.sqrt(e*e+f*f+g*g),.3>e&&(this.Yd=!1,this.Fd=.02,this.wg=0),0<this.wg&&e>this.wg&&(this.Fd+=.01,this.Fd=Math.min(this.Fd,1)),this.wg=e);h=Math.floor(a);if(h!=this.El)for(this.El=h,a=this.Gp(h),e=0;e<a.length;e++)f=a[e],g=f.gi,this.Ec.hasOwnProperty(g)&&(b=this.Ec[g].type,0==b?this.oe(g,f.ql):1==b?this.oe(g,f.value):2==b&&this.oe(g,
"true"==f.ql));this.update()};c.prototype.pm=function(){if(""!=this.B.Xf){var a=this.ym(this.B.Xf);if(0==a.length||1==a.length&&a[0]==this.Qa)return this.Qa}a=this.Qa;do if(this.B.nn){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.B.Xf&&!this.Vg(a).tags.includes(this.B.Xf)&&a!=this.Qa);return a};c.prototype.qr=function(a){var b=this.F.speed;this.F.Ek&&(b=b*(a.getTime()-this.F.Ek)/
60,5<b&&(b=5),.2>b&&(b=.2));this.F.Ek=a.getTime();this.B.Pg&&(this.Aa.ready()||4==this.Wa)&&this.zi()&&(this.B.Pg=!1,this.B.active=!0,this.yb.running=!0,this.yb.ik=!1);if(this.F.active||0!=this.F.Nb&&this.Aa.ready()){if(this.F.pl&&"__AutoMove"==this.I.ab){var e=a.getTime()-this.F.Dl;b=e/100;if(b>=this.I.length){if(this.jj(this.I.length),this.wa.splice(this.wa.indexOf(this.I),1),this.F.active=!1,this.I=this.F.Cl,this.F.Nb=0,this.fj(this.F.pan,this.F.v,this.F.fov),this.pan.$c=this.F.pan,this.v.$c=this.F.v,
this.F.yh&&(this.F.yh=!1,this.B.Ti=!0,this.B.active=!0,this.L("autorotatechanged",{})),this.onMoveComplete)this.onMoveComplete()}else this.jj(b)}else{this.pan.d=this.F.pan-this.pan.j;if(360==this.pan.max-this.pan.min){for(;-180>this.pan.d;)this.pan.d+=360;for(;180<this.pan.d;)this.pan.d-=360}this.v.d=this.F.v-this.v.j;this.U.d=this.F.U-this.U.j;this.fov.d=this.F.fov-this.fov.j;e=b*this.xi();var f=Math.sqrt(this.pan.d*this.pan.d+this.v.d*this.v.d+this.U.d*this.U.d+this.fov.d*this.fov.d),g=this.pan.j-
this.F.oh,h=this.v.j-this.F.ph,l=this.U.j-this.F.dn,k=this.fov.j-this.F.nh;100*Math.sqrt(g*g+h*h+l*l+k*k)<e&&0==this.F.Nb&&(this.F.aborted=!0);this.F.oh=this.pan.j;this.F.ph=this.v.j;this.F.dn=this.U.j;this.F.nh=this.fov.j;if(100*f<e||this.F.aborted){if(this.pan.d=0,this.v.d=0,this.U.d=0,this.fov.d=0,this.F.active&&(this.F.active=!1,this.pan.j=this.F.pan,this.v.j=this.F.v,this.U.j=this.F.U,this.fov.j=this.F.fov,this.onMoveComplete))this.onMoveComplete()}else f=f>5*e?e/f:.2,this.pan.d*=f,this.v.d*=
f,this.fov.d*=f;this.pan.j+=this.pan.d;this.v.j+=this.v.d;this.U.j+=this.U.d;this.fov.j+=this.fov.d;0!=this.F.Nb&&(this.F.Nb!=this.Wa?(b=this.Tg(this.F.Nb),this.nk()>b?(this.fov.j+=-Math.max((2.5-1.7*Math.min(Math.sqrt(this.pan.d*this.pan.d+this.v.d*this.v.d+this.U.d*this.U.d)/e,1))*e,this.fov.d)-this.fov.d,this.F.fov=this.fov.j):(this.Dc=this.Wa,this.Wa=this.F.Nb,this.N("New projection from Target:"+this.Wa),this.Bh=this.F.Gh=0,this.Aa.Hi())):1>this.F.Gh?(this.F.Gh=Math.min(1,this.F.Gh+.05*b),this.Bh=
this.F.Gh):(this.Dc=0,this.F.Nb=0,this.Aa.Hi()))}this.Sf=a.getTime();this.update()}else if(this.B.active){e=a.getTime()-this.B.startTime;this.B.Pi<this.B.startTime&&(this.B.Pi=this.B.startTime);if((this.B.qg||this.yb.running)&&0<this.wa.length){b=e/100;f=!1;if(this.Yb!=this.I.ab||""!=this.I.pf&&this.B.Zd!=this.I.pf){for(e=0;e<this.wa.length;e++)if(""==this.Yb&&this.wa[e].pf==this.B.Zd||""!=this.Yb&&this.wa[e].ab==this.Yb&&this.wa[e].pf==this.B.Zd){f=!0;this.I=this.wa[e];this.Yb=this.I.ab;break}!f&&
0<this.wa.length&&this.wa[0].pf==this.B.Zd&&(f=!0,this.I=this.wa[0],this.Yb=this.I.ab)}else f=!0;if(f)if(e=(g=this.D.f&&this.D.yd)&&this.B.jl&&!this.yb.running,this.nf){f=b;if(e)for(this.D.f.currentTime<this.Fl&&this.Kj&&(this.Jj++,this.Kj=!1),f=10*(this.Jj*this.D.f.duration+this.D.f.currentTime),this.Fl=this.D.f.currentTime,.05>this.D.f.duration-this.D.f.currentTime&&(this.Kj=!0);f>=10*this.mf;)f-=10*this.mf;if(!g&&b>=this.I.length||g&&!e&&b>=this.I.length||g&&e&&(this.I.ab!=this.I.jn||this.I.Wi!=
this.Qa)&&b>=this.I.length){this.jj(this.I.length);this.B.Od=0;this.nf=!1;if(this.yb.running){this.On();return}this.Yb=this.I.jn;this.Yb==this.I.ab&&this.Qa==this.I.Wi?1<this.Ya.length&&0<this.B.Xi&&(e=this.pm())&&(this.jd("{"+e+"}"),this.B.startTime=a.getTime(),this.nf=!1,this.B.active=!0,this.J.xe=!0):(this.Rf&&this.I.Wi!=this.Qa&&(this.jd("{"+this.I.Wi+"}",this.I.Zq),this.J.enabled?(this.B.active=!1,this.J.xe=!0):this.B.active=!0),this.B.startTime=a.getTime())}else this.jj(f),this.B.Od=f}else if(b=
this.I.ca[0],f=this.I.ca[1],g=this.I.ca[2],h=this.I.ca[3],3!=h.tb&&(h=0),this.B.Ti||this.F.aborted||this.yb.running||e){if(this.nf=!0,this.B.startTime=0<this.B.Od?a.getTime()-100*this.B.Od:a.getTime(),this.Yd=e){for(this.mf=this.Jj=0;this.mf<this.I.length/10;)this.mf+=this.D.f.duration;f=10*this.D.f.currentTime;for(e=Math.floor(f);!this.Hf(e,3)&&0<e;)e--;e=this.Hf(e,3);e.value==this.Wa?this.xg=-1:(this.xg=e.value,this.hi=f,this.Ij=Math.max(5,e.time+e.Fb-f))}}else{e={};if(0<this.B.Od)e.pan=this.B.oh,
e.tilt=this.B.ph,e.fov=this.B.nh,e.projection=this.B.cn;else{for(e.pan=b.value;360<e.pan;)e.pan-=360;for(;-360>e.pan;)e.pan+=360;e.tilt=f.value;e.fov=g.value;e.projection=h?h.value:4}e.timingFunction=3;e.speed=1;this.F.yh=!0;this.Ui(e);this.B.active=!0}}else 0<this.B.Xi&&this.Rf&&e>=1E3*this.B.Xi?1<this.Ya.length&&(e=this.pm())&&(this.B.startTime=a.getTime(),this.B.zd=a.getTime(),this.B.timeout=0,this.jd("{"+e+"}"),this.B.active=!0,this.J.xe=!0):(e=a.getTime(),f=b=1E3/60,0!=this.B.zd&&(f=e-this.B.zd),
this.v.d=this.B.uj*(0-this.v.j)/100,this.fov.d=this.B.uj*(this.fov.cb-this.fov.j)/100,this.pan.d=.95*this.pan.d+-this.B.speed*this.xi()*.05,b=f/b,this.pan.j+=this.pan.d*b,this.v.j+=this.v.d*b,this.fov.j+=this.fov.d*b,this.B.zd=e,this.update());3E3<a.getTime()-this.B.Pi&&!this.B.pi&&(this.Ra.style.cursor="none",this.B.pi=!0)}else!this.yb.ik&&1E3<a.getTime()-this.Sf&&(this.wa.splice(this.wa.indexOf(this.I),1),this.I=this.Sg(!1),this.Yb=this.I.ab,this.B.active=!1,this.B.Pg=!0),this.B.enabled&&!this.Y.Ji()&&
a.getTime()-this.Sf>1E3*this.B.timeout&&!this.B.Pg&&(this.B.Oh&&this.zi()||!this.B.Oh)&&(this.B.active=!0,this.B.startTime=a.getTime(),this.B.zd=0,this.L("autorotatechanged",{}),this.pan.d=0,this.v.d=0,this.fov.d=0),!this.Ka.enabled||this.Y.Ji()||0==this.pan.d&&0==this.v.d&&0==this.fov.d||(this.F.Gi=!0,this.pan.d*=.9,this.v.d*=.9,this.fov.d*=.9,this.pan.j+=this.pan.d,this.v.j+=this.v.d,this.Rj(this.fov.d),1E-4>this.pan.d*this.pan.d+this.v.d*this.v.d+this.fov.d*this.fov.d&&(this.pan.d=0,this.v.d=0,
this.fov.d=0),this.update())};c.prototype.sr=function(a){var b=this.J;if(!b.Yn){if(b.Cd){var e=Math.max(0,a.getTime()-b.Io);e/=1E3*b.Ho;1<=e?(b.Cd=!1,this.dm(),b.fl=a.getTime(),this.ho(),b.ue=!0,0==b.vc||b.ug||(4==b.vc?(this.I=this.Sg(!0,b.df,b.ef,b.Wd),this.Yb=this.I.ab,this.B.active=!0,this.yb.running=!0):this.moveTo(b.df,b.ef,b.Wd,b.we,0,b.Bd))):b.tn(e)}else b.ue&&(e=Math.max(0,a.getTime()-b.fl),e/=1E3*b.zg,1<=e?(b.ue=!1,this.Sf=a.getTime(),this.update(),0!=b.vc&&b.ug&&(4==b.vc?(this.I=this.Sg(!0,
b.df,b.ef,b.Wd),this.Yb=this.I.ab,this.B.active=!0,this.yb.running=!0):this.moveTo(b.df,b.ef,b.Wd,b.we,0,b.Bd)),4!=b.vc&&(this.dj(!1),this.B.active=b.xe,this.L("autorotatechanged",{}),b.xe=!1),this.B.zd=0,this.da&&this.Yj(),this.Bg=!1):b.tn(e));b=this.kr;b.fp&&(b.ri?a.getTime()-b.ek>=1E3*b.delay&&(b.ri=!1):(b.current+=b.md,0>b.current&&(b.current=0,b.md=-b.md,b.ri=!0,b.ek=a.getTime()),1<b.current&&(b.current=1,b.md=-b.md,b.ri=!0,b.ek=a.getTime())))}};c.prototype.wr=function(){var a,b=this.H;if(0<
b.ub.length){for(a=0;a<b.ub.length;a++)b.kd[a]!=b.ac[a]&&(b.kd[a]>b.ac[a]?(b.ac[a]+=.05,b.kd[a]<b.ac[a]&&(b.ac[a]=b.kd[a])):(b.ac[a]-=.05,b.kd[a]>b.ac[a]&&(b.ac[a]=b.kd[a],-1!=b.kj.indexOf(b.ub[a])&&(b.kj.splice(b.kj.indexOf(b.ub[a]),1),b.ub.splice(a,1),b.kd.splice(a,1),b.ac.splice(a,1)))));this.update()}if(2==b.mode)for(a=0;a<this.W.length;a++){var e=this.W[a];"poly"==e.type&&e.hb!=e.va&&(e.hb>e.va?(e.va+=b.md,e.hb<e.va&&(e.va=e.hb)):(e.va-=b.md,e.hb>e.va&&(e.va=e.hb)),this.update())}3==b.mode&&
b.hb!=b.va&&(b.hb>b.va?(b.va+=b.md,b.hb<b.va&&(b.va=b.hb)):(b.va-=b.md,b.hb>b.va&&(b.va=b.hb)),this.update())};c.prototype.ur=function(){var a=this.Ka;this.Y.Ji()&&(this.K.Md?(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.K.sensitivity/8,a.na.y=.1*-this.ga.na.y*this.K.sensitivity/8),this.Ao(a.na.x,a.na.y),this.update());a.fov.active&&(this.Ll(.4*(a.fov.zc-this.fov.j)),.001>Math.abs(a.fov.zc-this.fov.j)/this.fov.j&&(a.fov.active=
!1),this.update());if(a.enabled&&(0!=a.na.x||0!=a.na.y)&&!this.Y.Ji()){var b=.9*(1-a.Zk);a.na.x*=b;a.na.y*=b;this.F.Gi=!0;.01>a.na.x*a.na.x+a.na.y*a.na.y?(a.na.x=0,a.na.y=0):(this.Ao(a.na.x,a.na.y),this.update())}};c.prototype.rr=function(){if(this.K.Kn&&this.K.Md){var a=this.xn;a.pan=this.pan.j;a.v=this.v.j;a.fov=this.fov.j;this.wf(a);this.wf(a);this.wf(a);var b=a.pan-this.pan.j,e=a.v-this.v.j;a=a.fov-this.fov.j;if(0!=b||0!=e||0!=a){var f=.2+.9*Math.min((Math.abs(b)+Math.abs(e)+Math.abs(a))/Math.abs(Math.min(this.fov.j,
90))*.3,1);this.pan.j+=b*f;this.v.j+=e*f;this.fov.j+=a*f;this.Ka.Zk=.3;this.update()}else this.Ka.Zk=0}else this.Dg();if(isNaN(this.pan.j)||1E7<this.pan.j||-1E7>this.pan.j)this.pan.j=0;if(isNaN(this.v.j)||1E7<this.v.j||-1E7>this.v.j)this.v.j=0;if(isNaN(this.U.j)||1E7<this.U.j||-1E7>this.U.j)this.U.j=0;if(2!=this.Xa){for(;360<this.pan.j;)this.pan.j-=360;for(;-360>this.pan.j;)this.pan.j+=360}};c.prototype.tr=function(){if(!this.zi()&&this.Kf&&5<this.u.Fn){var a,b=0,e=this.ic.length;if(this.Wh)e=50,
this.fk<e&&this.fk++,b=this.fk;else for(a=0;a<e;a++)(this.ic[a].complete&&this.ic[a].src!=this.$l||""==this.ic[a].src)&&b++;b==e?(this.Dh=1,this.isLoaded=!0,this.ta&&this.ta.ggLoaded&&this.ta.ggLoaded(),this.L("imagesready",{}),this.B.Oh&&this.B.enabled&&!this.F.active&&!this.J.Cd&&(this.B.active=!0,this.B.startTime=(new Date).getTime(),this.B.zd=0)):this.Dh=b/(1*e);this.L("downloadprogress",{percentLoaded:this.Dh})}};c.prototype.Ch=function(){var a=this;a.cj||(a.Ii?setTimeout(function(){a.cj=!1;
a.Ch()},1E3/60):window.requestAnimationFrame(function(){a.cj=!1;a.Ch()}));a.cj=!0;this.Uk=this.aj=0;a.F.Gi=!1;var b=new Date;this.yi++;120<=this.yi&&(this.N("F/s: "+Math.round(1E3*this.yi/(b.getTime()-this.Zm))),this.Zm=b.getTime(),this.yi=0);this.L("timer",{});this.ia&&this.Aa.zp();this.Pb&&""!==this.Ie&&!this.ra&&document.hasOwnProperty(this.Ie)&&document[this.Ie].setPan&&0==this.Dp--&&(this.ra=document[this.Ie],this.ld=this.ia=!1,this.Ja&&(this.Ja.style.visibility="hidden"),this.ra.setLocked(!0),
this.ra.setSlaveMode(!0),this.ra.readConfigString(this.ak),this.Oc("Flash player '"+this.Ie+"' connected."));this.ol&&(this.Hc(),this.ol=!1);this.ur();this.tr();this.qr(b);this.rr();this.sr(b);this.Aa.Ls();(0<=this.H.mode||0<this.H.ub.length)&&this.wr();this.zj();if(this.Tf.pan!=this.pan.j||this.Tf.v!=this.v.j||this.Tf.fov!=this.fov.j)this.Tf.pan=this.pan.j,this.Tf.v=this.v.j,this.Tf.fov=this.fov.j,this.L("positionchanged",{});this.an!=this.Wa&&(this.an=this.Wa,this.L("projectionchanged",{}));this.Na&&
(0<this.Kg?this.Kg--:(this.Na=!1,this.Kg=0),this.J.ue||this.J.Cd||this.ve||(this.Vh(),this.L("renderframe",{})),this.L("repaint",{}));b=this.um();b!=this.$m&&(b?(this.ta&&this.ta.ggReLoadedLevels&&this.ta.ggReLoadedLevels(),this.L("tilesrequested",{})):(a.ta&&a.ta.ggLoadedLevels&&a.ta.ggLoadedLevels(),this.L("tilesready",{})),this.$m=b)};c.prototype.Tg=function(a){switch(a){case 4:a=Math.min(110,this.fov.max);break;case 12:a=Math.min(270,this.fov.Kk);a=Math.min(360*this.aspect(),a);a=Math.min(360/
this.aspect(),a);break;case 9:a=Math.min(270,this.fov.Lk);break;default:a=90}return a};c.prototype.Is=function(){var a=this;setTimeout(function(){a.ig(!1)},10);setTimeout(function(){a.ig(!1)},100)};c.prototype.zj=function(){this.$j.gm(this.pan.j,this.v.j);for(var a=0;a<this.X.length+this.S.length;a++){if(a<this.X.length)var b=this.X[a];else if(b=this.S[a-this.X.length],b.hd)continue;b.zj()}};c.prototype.hs=function(a,b){var e=this;var f="<<L>>"+String(e.Pa);f=f.toUpperCase();"U"!=f.charAt(2)&&(e.K.Lf=
!1);if(0!=e.vh.length||!e.K.Lf||e.K.Fg||e.K.Gg&&e.Ne()||e.K.mi)if(e.sd)e.$.removeChild(e.sd),e.sd=null;else{e.sd=document.createElement("div");var g=e.sd;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.vh.length;a++){b=e.vh[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.vh.length&&(!e.K.Lf||e.K.Fg||e.K.Gg&&e.Ne()||e.K.mi)&&g.appendChild(document.createElement("hr"));if(e.K.mi&&e.ia){b=[];b.push({text:"Rectilinear Projection",Fh:4});b.push({text:"Stereographic Projection",Fh:9});b.push({text:"Fisheye Projection",Fh: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.Fh?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.Sj(k,1);e.update()}}(h.Fh);l.innerHTML=e.Wa==h.Fh?"⦿ "+h.text:h.text;g.appendChild(l)}(!e.K.Lf||e.K.Fg||e.K.Gg&&e.Ne())&&g.appendChild(document.createElement("hr"))}e.K.Fg&&(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.vj()},a.innerHTML=e.fh()?"Exit Fullscreen":"Enter Fullscreen",g.appendChild(a));e.K.Gg&&e.Ne()&&(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.Bf()},a.innerHTML="Enter VR",g.appendChild(a));e.K.Lf||(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.Jg("aHR0cDovL3Bhbm8ydnIuY29tLw=="),f.target="_blank",f.innerHTML=c.Jg("Q3JlYXRlZCB3aXRoIFBhbm8yVlI="),7<this.Ri.length&&(f.innerHTML+="<br/>"+c.Xl(this.Ri).replace(/./gm,function(k){return"&#"+k.charCodeAt(0)+";"})),f.setAttribute("style","color: black; text-decoration: none;"),a.appendChild(f),g.appendChild(a));e.$.insertBefore(e.sd,
e.$.firstChild);g.onclick=function(){e.sd&&(e.$.removeChild(e.sd),e.sd=null)};g.oncontextmenu=g.onclick}};c.prototype.ep=function(){var a=this;var b=a.Ra;a.control=b;a.control=b;a.Is();setTimeout(function(){a.Ch()},10);setTimeout(function(){a.un()},200);setTimeout(function(){a.kf();a.Vh()},10);b.addEventListener&&(b.addEventListener("touchstart",function(e){a.Ds(e)},!1),b.addEventListener("touchmove",function(e){a.Cs(e)},!1),b.addEventListener("touchend",function(e){a.Bs(e)},!1),b.addEventListener("touchcancel",
function(e){a.As(e)},!1),b.addEventListener("pointerdown",function(e){a.hn(e)},!1),b.addEventListener("MSPointerDown",function(e){a.hn(e)},!1),b.addEventListener("MSGestureStart",function(e){a.om(e)},!1),b.addEventListener("MSGestureEnd",function(e){a.nm(e)},!1),b.addEventListener("MSGestureChange",function(e){a.Wq(e)},!1),b.addEventListener("gesturestart",function(e){a.om(e)},!1),b.addEventListener("gesturechange",function(e){a.Fp(e)},!1),b.addEventListener("gestureend",function(e){a.nm(e)},!1),
b.addEventListener("mousedown",function(e){a.Tq(e)},!1),b.addEventListener("mousemove",function(e){a.Sq(e)},!1),document.addEventListener("mouseup",function(e){a.Rq(e)},!1),b.addEventListener("mousewheel",function(e){a.gn(e)},!1),b.addEventListener("DOMMouseScroll",function(e){a.gn(e)},!1),document.addEventListener("keydown",function(e){a.Jq(e)},!1),document.addEventListener("keyup",function(e){a.Kq(e)},!1),window.addEventListener("resize",function(){a.kf()},!1),window.addEventListener("blur",function(){a.br()},
!1),a.$.addEventListener("webkitfullscreenchange",function(){a.Ah()},!1),document.addEventListener("mozfullscreenchange",function(){a.Ah()},!1),window.addEventListener("webkitfullscreenchange",function(){a.Ah()},!1),document.addEventListener("MSFullscreenChange",function(){a.Ah()},!1),document.addEventListener("fullscreenchange",function(){a.Ah()},!1));b.oncontextmenu=function(e){void 0===e&&(e=window.event);if(e.target&&!a.Nc(e.target))return!0;if(!e.ctrlKey){e=a.Ug(e);var f=a.Ke();a.hs(e.x-f.x,
e.y-f.y);return!1}return!0};window.addEventListener("deviceorientation",function(e){a.hr(e.alpha,e.beta,e.gamma,e.absolute);null!=e.alpha&&null!=e.beta&&null!=e.gamma&&0==a.sk&&(a.sk=!0,a.L("gyroavailable",{available:!0}),a.L("playerstatechanged",{}))})};c.prototype.Bl=function(){for(var a=0;a<this.W.length;a++)if("point"==this.W[a].type&&(this.la&&this.la.addSkinHotspot?(this.W[a].Df(),this.W[a].f=this.la.addSkinHotspot(this.W[a])):(this.W[a].f=new x.Ko(this,this.W[a]),this.W[a].ad&&this.W[a].pg&&
(this.W[a].f.ggUse3d=!0,this.W[a].f.gg3dDistance=this.W[a].si)),this.W[a].f.__div.style.left="-1000px",this.W[a].f.__div.style.top="-1000px",this.W[a].f&&this.W[a].f.__div)){var b=this.Ra.firstChild;b?this.Ra.insertBefore(this.W[a].f.__div,b):this.Ra.appendChild(this.W[a].f.__div)}};c.prototype.Go=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.pb=function(a){var b=[];a="#"==a.substr(0,1)?a.substr(1):"^"+a+"$";a=new RegExp(a,"");for(var e=0;e<this.X.length;e++)a.test(this.X[e].id)&&b.push(this.X[e]);for(e=0;e<this.S.length;e++)a.test(this.S[e].id)&&b.push(this.S[e]);for(e=0;e<this.fb.length;e++)a.test(this.fb[e].id)&&b.push(this.fb[e]);return b};c.prototype.$p=function(a){if("_videopanorama"==a)return this.D.f;a=this.pb(a);return 0<a.length?a[0].f:null};c.prototype.Zp=function(a){a=
this.pb(a);return 0<a.length&&a[0].xa?a[0]:null};c.prototype.An=function(a,b){var e=this;b.addEventListener("ended",function(g){e.L("videoended",{video:g.target})});b.addEventListener("pause",function(g){e.L("videopaused",{video:g.target})});b.addEventListener("play",function(g){e.L("videostarted",{video:g.target})});for(var f=0;f<this.S.length;f++)if(this.S[f].id==a)return this.S[f].f=b,this.S[f];f=new x.Al(this);f.registerElement(a,b);return f};c.prototype.isPlaying=function(a){if(this.Pb){var b=
this.ra;if(b)return b.isPlaying(a)}else{if("_main"===a)return!0;a=this.pb(a);if(0<a.length)return a[0].xa?a[0].Rc:!a[0].f.ended&&!a[0].f.paused}return!1};c.prototype.Ue=function(a,b){if(this.Pb){var e=this.ra;e&&e.playSound(a,b)}else try{e=this.pb(a);for(var f=0;f<e.length;f++){var g=e[f];g.xb=b&&!isNaN(Number(b))?Number(b)-1:g.loop-1;-1==g.xb&&(g.xb=1E7);this.N(g.f);this.isPlaying(a)&&this.nj(a);g.xa?g.Gd():(g.f.play(),!g.Ed||this.lc&&this.Ei||g.vg());this.Zr(g.id)}}catch(h){this.N(h)}};c.prototype.vn=
function(a,b){a=this.pb(a);for(var e=0;e<a.length;e++){var f=a[e];this.isPlaying(f.id)?this.Pk(f.id):this.Ue(f.id,b)}};c.prototype.yr=function(a,b){a=this.pb(a);for(var e=0;e<a.length;e++){var f=a[e];this.isPlaying(f.id)?this.nj(f.id):this.Ue(f.id,b)}};c.prototype.Pk=function(a){if(this.Pb){var b=this.ra;b&&b.pauseSound(a)}else try{if(b=void 0,"_main"==a){this.hj(a);for(b=0;b<this.X.length;b++)this.X[b].xa?this.X[b].Nj():this.X[b].f.pause();for(b=0;b<this.S.length;b++)this.S[b].f.pause()}else{var e=
this.pb(a);for(b=0;b<e.length;b++){var f=e[b];this.hj(f.id);f.xa?f.Nj():f.f.pause()}}}catch(g){this.N(g)}};c.prototype.Uo=function(a,b){a=this.pb(a);for(var e=0;e<a.length;e++){var f=a[e];0==b||1==b?f.Zg&&f.Zg(1==b):2==b&&f.Le&&f.Le();!f.qb||-1==this.fb.indexOf(f)&&-1==this.S.indexOf(f)||(this.Qb=this.le=f)}};c.prototype.nj=function(a){var b;if(this.Pb)(b=this.ra)&&b.stopSound(a);else try{if("_main"===a){this.hj(a);for(b=0;b<this.X.length;b++)this.X[b].xa?this.X[b].vf():(this.X[b].f.pause(),this.X[b].f.currentTime=
0);for(b=0;b<this.S.length;b++)this.S[b].f.pause(),this.S[b].f.currentTime=0}else{var e=this.pb(a);for(b=0;b<e.length;b++){var f=e[b];this.hj(f.id);f.xa?f.vf():f.f&&f.f.pause&&(f.f.pause(),f.f.currentTime=0)}}}catch(g){this.N(g)}};c.prototype.hj=function(a){-1==this.Ud.indexOf(a)&&this.Ud.push(a);var b=this.hf.indexOf(a);-1!=b&&this.hf.splice(b,1);"_main"==a&&(this.hf=[])};c.prototype.Zr=function(a){-1!=this.Ud.indexOf("_main")&&-1==this.hf.indexOf(a)&&this.hf.push(a);a=this.Ud.indexOf(a);-1!=a&&
this.Ud.splice(a,1)};c.prototype.ks=function(a){a=this.pb(a);return 0<a.length?(a=a[0],a.xa?a.uf():a.f?a.f.currentTime:0):0};c.prototype.ls=function(a,b){a=this.pb(a);0<a.length&&(a=a[0],a.xa?(0>b&&(b=0),b>a.ki()&&(b=a.ki()-.1),a.Jl(b)):a.f&&(0>b&&(b=0),b>a.f.duration&&(b=a.f.duration-.1),a.f.currentTime=b))};c.prototype.setVolume=function(a,b){if(this.Pb){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.D.f&&(this.D.f.volume=f);
if("_main"===a){this.ba=f;for(e=0;e<this.X.length;e++)this.X[e].f.volume=this.X[e].level*this.ba;for(e=0;e<this.S.length;e++)this.S[e].f.volume=this.S[e].level*this.ba;this.D.f&&(this.D.f.volume=this.ba)}else{var g=this.pb(a);this.N(g);for(e=0;e<g.length;e++){var h=g[e];h.f&&null!=h.f.volume&&(h.f.volume=f*this.ba);h.level=f}}}catch(l){this.N(l)}};c.prototype.op=function(a,b){if(this.Pb){var e=this.ra;e&&e.changeVolume(a,b)}else try{var f=e=void 0;"_videopanorama"===a&&this.D.f&&(this.D.f.volume+=
Number(b));if("_main"===a){e=this.ba;e+=Number(b);1<e&&(e=1);0>e&&(e=0);this.ba=e;for(f=0;f<this.X.length;f++)this.X[f].f.volume=this.X[f].level*this.ba;for(f=0;f<this.S.length;f++)this.S[f].f.volume=this.S[f].level*this.ba;this.D.f&&(this.D.f.volume=this.ba)}else{var g=this.pb(a);for(f=0;f<g.length;f++){var h=g[f];e=h.level;e+=Number(b);1<e&&(e=1);0>e&&(e=0);h.level=e;h.f&&null!=h.f.volume&&(h.f.volume=e*this.ba)}}}catch(l){this.N(l)}};c.prototype.ej=function(a,b,e){a.f.style.opacity=0==b?1:0;a.f.style[this.bd]=
"opacity "+e+"ms";a.f.style.opacity=0==b?0:1};c.prototype.Or=function(a,b,e){function f(){var k=g[l];if(!k.f)return"continue";0==b?(h.ej(k,b,e),setTimeout(function(){0==k.f.style.opacity&&k.jg(!1)},e+10),k.mb=!1):1==b?(h.ej(k,b,e),k.jg(!0),k.mb=!0):2==b&&("visible"==k.f.style.visibility?(h.ej(k,0,e),setTimeout(function(){0==k.f.style.opacity&&k.jg(!1)},e+10),k.mb=!1):(h.ej(k,1,e),k.jg(!0),k.mb=!0))}for(var g=this.pb(a),h=this,l=0;l<g.length;l++)f()};c.prototype.ho=function(){try{var a=this,b=!1,e=
!1;this.Ia.enabled&&(this.Ia.ni?e=!0:b=!0);for(var f=0;f<this.X.length;f++){var g=this.X[f];this.isPlaying(g.id)?e&&(g.pa=0):-1==g.loop||-1!=this.Ud.indexOf(g.id)||-1!=this.Ud.indexOf("_main")&&-1==this.hf.indexOf(g.id)||4==g.mode||6==g.mode||!this.ua||!(this.Ia.enabled&&this.Ia.ni||!this.Ia.enabled)||"_background"==g.id&&this.isPlaying(g.id)||(g.autoplay=!0,this.Ia.enabled&&this.Ia.ni&&(g.pa=0),g.xa?this.He?g.pa=1:g.Gd():(g.ro(),g.f.currentTime&&(g.f.currentTime=0)))}b&&setTimeout(function(){a.Ia.rs()},
1E3*this.Ia.Fb);e&&(this.Ia.ns=this.ua.currentTime,this.Ia.ms=setInterval(function(){a.Ia.Cp()},30))}catch(h){this.N(h)}};c.prototype.dm=function(){for(var a=0;a<this.Ia.Th.length;a++)this.Ia.cm(this.Ia.Th[a])};c.prototype.En=function(){for(var a;0<this.W.length;)a=this.W.pop(),a.f&&(this.Ra.removeChild(a.f.__div),delete a.f),a.f=null;this.H.va=0;this.H.hb=0;this.L("hotspotsremoved",{})};c.prototype.al=function(a){this.bi=a;this.$.style.zIndex=0!=a?a.toString():"auto";this.Ta&&this.Ta.nd&&(this.Ta.nd.zIndex=
(a+4).toString());this.Ra.style.zIndex=(a+4).toString();this.Ja.style.zIndex=(a+3).toString();this.Ha.style.zIndex=(a+5).toString();for(var b=0;b<this.S.length+this.fb.length;b++){var e=b<this.S.length?this.S[b]:this.fb[b-this.S.length];e.f&&(e.f.style.zIndex=(a+(e.qb?8E4:0)).toString())}};c.prototype.ig=function(a){var b=this.isFullscreen!==a;this.isFullscreen!==a&&(this.isFullscreen=a,this.update(100));if(this.isFullscreen){if(this.Aj)try{this.$.webkitRequestFullScreen?this.$.webkitRequestFullScreen():
this.$.mozRequestFullScreen?this.$.mozRequestFullScreen():this.$.msRequestFullscreen?this.$.msRequestFullscreen():this.$.requestFullScreen?this.$.requestFullScreen():this.$.requestFullscreen&&this.$.requestFullscreen()}catch(e){this.N(e)}this.$.style.position="absolute";a=this.Ke();this.$.style.left=window.pageXOffset-a.x+this.margin.left+"px";this.$.style.top=window.pageYOffset-a.y+this.margin.top+"px";this.al(10);document.body.style.overflow="hidden";b&&(this.ta&&this.ta.ggEnterFullscreen&&this.ta.ggEnterFullscreen(),
this.L("fullscreenenter",{}),this.L("playerstatechanged",{}))}else{if(this.Aj)try{document.webkitIsFullScreen?document.webkitCancelFullScreen():document.mozFullScreen?document.mozCancelFullScreen():document.msExitFullscreen?document.msExitFullscreen():document.fullScreen&&(document.cancelFullScreen?document.cancelFullScreen():document.exitFullscreen&&document.exitFullscreen())}catch(e){this.N(e)}this.$.style.position="relative";this.$.style.left="0px";this.$.style.top="0px";this.al(0);document.body.style.overflow=
"";b&&(this.ta&&this.ta.ggExitFullscreen&&this.ta.ggExitFullscreen(),this.L("fullscreenexit",{}),this.L("playerstatechanged",{}))}this.kf()};c.prototype.vj=function(){this.ig(!this.isFullscreen)};c.prototype.Bp=function(){this.ig(!0)};c.prototype.exitFullscreen=function(){this.ig(!1)};c.prototype.Pp=function(){return this.isFullscreen};c.prototype.Bf=function(){this.Gb.qn=this.lf;this.Gb.vp();this.Gn();this.Gb.Bf();this.Gb.jr();return!0};c.prototype.sq=function(){return"N/A"};c.prototype.cs=function(a){this.Gb&&
(this.Gb.Gf=a)};c.prototype.Cf=function(){if(this.Gb){var a=this.Gb;a.Cf();a.Xe();a.Vj();a.qn||this.Un(!1)}return!0};c.prototype.oo=function(){this.Gb&&(this.Gb.gh()?this.Cf():this.Bf());return!0};c.prototype.gh=function(){return this.Gb&&this.Gb.gh()?!0:!1};c.prototype.Ne=function(){return this.Gb&&this.Gb.Ne()?!0:!1};c.prototype.ps=function(a,b,e){this.B.Zd=this.B.ii;this.B.qg=this.B.Zh;this.B.enabled=!0;this.B.qf=this.B.enabled;this.B.active=!0;this.B.zd=0;var f=new Date;this.B.Od=0;this.B.startTime=
f.getTime();a&&0!=a&&(this.B.speed=a);b&&(this.B.timeout=b);e&&(this.B.uj=e);this.L("autorotatechanged",{})};c.prototype.ss=function(){this.B.active=!1;this.B.enabled=!1;this.B.qf=this.B.enabled;this.nf=this.B.Ti=!1;this.F.active&&this.F.yh&&(this.F.active=!1,this.F.yh=!1,this.F.Nb=0);this.L("autorotatechanged",{})};c.prototype.ys=function(){this.B.enabled=!this.B.active;this.B.qf=this.B.enabled;this.B.active=this.B.enabled;this.B.zd=0;if(this.B.enabled){var a=new Date;this.B.Od=0;this.B.startTime=
a.getTime();this.B.Zd=this.B.ii;this.B.qg=this.B.Zh}this.L("autorotatechanged",{})};c.prototype.Ir=function(a){this.B.Xf=a;this.B.mn=!0};c.prototype.os=function(a){this.yb.running&&this.On();this.Yb="";a&&""!=a&&(this.B.Zd=a);this.B.qf=this.B.enabled;this.B.qg=!0;this.B.enabled=!0;this.B.active=!0;this.B.zd=0;a=new Date;this.B.Od=0;this.B.startTime=a.getTime();this.L("autorotatechanged",{})};c.prototype.On=function(){this.yb.running=!1;this.yb.ik=!0;this.B.active=this.J.xe;this.wa.splice(this.wa.indexOf(this.I),
1);0<this.wa.length&&(this.I=this.wa[0]);this.Yb="";this.dj(!1);this.J.xe=!1;this.Sf=(new Date).getTime()};c.prototype.Tl=function(a){if(this.pd=document.getElementById(a)){this.pd.innerHTML="";this.$=document.createElement("div");this.$.onselectstart=function(){return!1};Il&&this.$.setAttribute("id","viewport");a="top:\t0px;left: 0px;position:relative;-ms-touch-action: none;touch-action: none;text-align: left;"+(this.Pa+"user-select: none;");this.$.setAttribute("style",a);this.pd.appendChild(this.$);
this.M=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;");Il&&this.M.setAttribute("id","viewer");this.M.setAttribute("style",a);this.$.appendChild(this.M);if(this.Pb){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.lk);b.setAttribute("style",a);this.M.appendChild(b)}this.Ta&&(this.Ta.nd=document.createElement("canvas"),Il&&this.Ta.nd.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.nd.setAttribute("style",a),this.$.appendChild(this.Ta.nd));this.Ra=document.createElement("div");Il&&this.Ra.setAttribute("id","hotspots");a="top:\t0px;left: 0px;width: 100px;height: 100px;overflow: hidden;position:absolute;";
this.Bk&&(a+="background-image: url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7);");this.lc&&!this.ia&&(a+=this.Pa+"transform: translateZ(9999999px);");a+=this.Pa+"user-select: none;";this.Ra.setAttribute("style",a);this.$.appendChild(this.Ra);this.Ja=document.createElement("canvas");Il&&this.Ja.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.Ja.setAttribute("style",a);this.$.appendChild(this.Ja);this.Ha=document.createElement("div");Il&&this.Ha.setAttribute("id","hotspottext");this.Ha.setAttribute("style","top:\t0px;left: 0px;position:absolute;padding: 3px;visibility: hidden;");this.Ha.classList.add("ggskin");this.Ha.classList.add("ggdefaulthotspot");this.Ha.innerHTML=" Hotspot text!";this.$.appendChild(this.Ha);this.divSkin=this.ta=this.Ra;this.al(0)}else alert("container not found!")};c.prototype.Vl=function(a){this.Na=!0;return function(){a.bb&&
(a.u&&a.u.complete?(a.loaded=!0,a.bb.drawImage(a.u,0,0,a.width,a.height),a.u=null,a.Rd=null):a.Rd&&a.Rd.complete&&!a.loaded&&(a.bb.drawImage(a.Rd,0,0,a.width,a.height),a.Rd=null))}};c.prototype.Sl=function(a){var b,e=128;this.u.cg&&(this.M.style.backgroundColor=this.u.cg.replace("0x","#"));a?(e=this.Ag,this.ff=1):this.Gc>e&&(e=this.Gc);for(b=0;6>b;b++){var f=this.cube.faces[b];a?(f.width=this.Ag,f.height=this.Ag):(f.V=document.createElement("canvas"),f.V.width=this.Gc,f.V.height=this.Gc,f.width=this.Gc,
f.height=this.Gc,f.bb=f.V.getContext("2d"));var g="position:absolute;";g+="left: 0px;";g+="top: 0px;";g+="width: "+e+"px;";g+="height: "+e+"px;";a&&(g+="outline: 1px solid transparent;");g+=this.Pa+"transform-origin: 0% 0%;";g+="-webkit-user-select: none;";g+=this.Pa+"transform: ";var h="";var l=1;this.eg&&(l=100);h=4>b?h+("rotateY("+-90*b+"deg)"):h+("rotateX("+(4==b?-90:90)+"deg)");this.eg&&(h+=" scale("+l+")");h+=" translate3d("+-e/2+"px,"+-e/2+"px,"+-e*l/(2*this.ff)+"px)";g+=h+";";f.Im=h;a||(f.V.setAttribute("style",
g),this.M.insertBefore(f.V,this.M.firstChild))}if(!a){for(b=0;6>b;b++)f=this.cube.faces[b],""!=this.yf[b]&&(f.Rd=new Image,f.Rd.crossOrigin=this.crossOrigin,f.Rd.onload=this.Vl(f),f.Rd.setAttribute("src",this.eb(this.yf[b])),this.ic.push(f.Rd));for(b=0;6>b;b++)f=this.cube.faces[b],f.loaded=!1,f.u=new Image,f.u.crossOrigin=this.crossOrigin,f.u.onload=this.Vl(f),f.u.setAttribute("src",this.eb(this.Ig[b])),this.ic.push(f.u)}};c.prototype.Xe=function(){var a;this.Ka.na.x=0;this.Ka.na.y=0;if(this.ld){for(a=
0;a<this.cube.faces.length;a++)this.cube.faces[a].V&&this.cube.faces[a].V.setAttribute&&(this.cube.faces[a].V.setAttribute("src",this.$l),this.M.removeChild(this.cube.faces[a].V));if(this.u.levels){for(a=0;a<this.u.levels.length;a++){var b=this.u.levels[a];for(f in b.aa)if(b.aa.hasOwnProperty(f)){var e=b.aa[f];e.visible=!1;e.V&&(e.bb&&e.bb.clearRect(0,0,e.bb.canvas.width,e.bb.canvas.height),this.wj.push(e.V));e.u&&delete e.u;e.rb&&(this.R.deleteTexture(e.rb),this.ud--);e.bb=null;e.V=null;e.u=null}delete b.aa}delete this.u.levels;
this.u.levels=null}}this.Aa.Xe();var f=[];for(a=0;a<this.S.length;a++)b=this.S[a],b.hd?f.push(b):b.We();for(a=0;a<this.fb.length;a++)this.fb[a].We();this.H.kh=-1;this.Ja.style.visibility="hidden";this.Xa=0;this.cf=[];this.Ia.Th=[];for(a=0;a<this.X.length;a++)b=this.X[a],0==b.mode||b.ln||this.cf.push(b);this.S=f;this.fb=[];this.D.f&&(this.$.removeChild(this.D.f),this.D.f=null,a=this.pb("_videopanorama"),0<a.length&&(a[0].f=null));this.D.yd=!1;this.D.Ki=!1};c.prototype.Em=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.xm=function(){var a=this.Em();return a.w>a.h?a.w:a.h};c.prototype.Tk=function(a,b){var e=(new DOMParser).parseFromString(a,"text/xml");this.ak=a;this.zn(e,b);this.ra&&(this.N("Apply to Flash player"),this.ra.readConfigString(this.ak),this.ra.setLocked(!0),this.ra.setSlaveMode(!0))};c.prototype.yn=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.$d=a.substr(0,g+1));2<=arguments.length&&null!=b&&(this.$d=b);this.Tk(f.responseText,e)}else alert("Error loading panorama XML")}catch(h){alert("Error:"+h)}};c.prototype.Ar=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.$d=a.substr(0,k+1));3<=arguments.length&&null!=e&&(h.$d=e);h.Tk(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.Qj=function(a){var b="";"{"==a.charAt(0)&&(b=a.substr(1,a.length-2));(a=this.ae[b])&&(b=a);a={oldNodeId:this.Qa,nodeId:b};this.L("beforechangenodeid",a);this.rk?this.rk=!1:this.Mk.push(this.Qa);""!=this.Qa&&-1==this.Cj.indexOf(this.Qa)&&(this.Cj.push(this.Qa),this.L("changevisitednodes",{}));this.bn=this.Qa;this.Qa=b;this.N("change active node: "+b);this.la&&this.la.changeActiveNode&&
this.la.changeActiveNode("{"+b+"}");this.L("changenodeid",a);this.Ef=!0};c.prototype.mk=function(){return this.Qa};c.prototype.bq=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.oq=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.Up=function(){return this.bn};c.prototype.$q=function(a){return-1!=this.Cj.indexOf(a)};c.prototype.sp=function(){this.Cj=
[];this.L("changevisitednodes",{})};c.prototype.zn=function(a,b){var e=a.firstChild;this.te=[];this.Ya=[];this.ae=[];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.Si[g.nodeValue.toString()]=f}a=a.nextSibling}if("tour"==e.nodeName){this.Rf=!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.te[h]=f,this.Ya.push(h);for(g=f.firstChild;g;){if("userdata"==g.nodeName){var l=this.Ng(g);this.$h[h]=
l;h==a&&(this.$h._first=l);l.customnodeid&&(this.ae[l.customnodeid]=h);this.Pc[h]=this.am(g);this.Wf[h]=this.bm(g)}g=g.nextSibling}}if("masternode"==f.nodeName)for(g=f.firstChild;g;)"userdata"==g.nodeName&&(l=this.Ng(g),this.$h._master=l),g=g.nextSibling;f=f.nextSibling}this.te.hasOwnProperty(a)||(g=this.ae[a])&&(a=g);this.te.hasOwnProperty(a)||(this.Oc("Start node "+a+" not found!"),a=e);this.Sk(this.te[a],b);this.Qj("{"+a+"}");this.Qa=a}else this.Rf=!1,this.Sk(e,b),this.Qj(""),this.Ya.push("");
this.ve&&(this.N("add pano vr config"),this.Gb.fi());this.L("configloaded",{});this.L("changenode",{});this.L("playerstatechanged",{})};c.prototype.Sk=function(a,b){var e=this;this.En();this.Ta&&this.Ta.Cr();this.hg(this.kb);this.Xe();this.lh=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.Nk=1*(g?g.nodeValue:0);for(var k=f.firstChild;k;){"start"==k.nodeName&&(g=k.getAttributeNode("pan"),
this.pan.j=Number(g?g.nodeValue:0),this.pan.cb=this.pan.j,g=k.getAttributeNode("tilt"),this.v.j=Number(g?g.nodeValue:0),this.v.cb=this.v.j,g=k.getAttributeNode("roll"),this.U.j=Number(g?g.nodeValue:0),this.U.cb=this.U.j,g=k.getAttributeNode("fov"),this.fov.j=Number(g?g.nodeValue:70),this.fov.cb=this.fov.j,g=k.getAttributeNode("projection"),this.Yi=Number(g?g.nodeValue:4),this.Tc(this.Yi));"min"==k.nodeName&&(g=k.getAttributeNode("pan"),this.pan.min=1*(g?g.nodeValue:0),g=k.getAttributeNode("tilt"),
this.v.min=1*(g?g.nodeValue:-90),g=k.getAttributeNode("fov"),this.fov.min=1*(g?g.nodeValue:5),1E-20>this.fov.min&&(this.fov.min=1E-20),g=k.getAttributeNode("fovpixel"),this.fov.wh=1*(g?g.nodeValue:0));if("max"==k.nodeName){g=k.getAttributeNode("pan");this.pan.max=1*(g?g.nodeValue:0);g=k.getAttributeNode("tilt");this.v.max=1*(g?g.nodeValue:90);g=k.getAttributeNode("fov");this.fov.max=1*(g?g.nodeValue:120);180<=this.fov.max&&(this.fov.max=179.9);if(g=k.getAttributeNode("fovstereographic"))this.fov.Lk=
1*g.nodeValue;if(g=k.getAttributeNode("fovfisheye"))this.fov.Kk=1*g.nodeValue;if(g=k.getAttributeNode("scaletofit"))this.K.Mn=1==g.nodeValue}if("flyin"==k.nodeName){if(g=k.getAttributeNode("projection"))this.Jc.Nb=Number(g.nodeValue);if(g=k.getAttributeNode("pan"))this.Jc.pan=parseFloat(g.nodeValue);if(g=k.getAttributeNode("tilt"))this.Jc.v=parseFloat(g.nodeValue);if(g=k.getAttributeNode("fov"))this.Jc.fov=parseFloat(g.nodeValue)}k=k.nextSibling}}if("autorotate"==f.nodeName){if(g=f.getAttributeNode("speed"))this.B.speed=
1*g.nodeValue;if(g=f.getAttributeNode("delay"))this.B.timeout=1*g.nodeValue;if(g=f.getAttributeNode("returntohorizon"))this.B.uj=1*g.nodeValue;if(g=f.getAttributeNode("nodedelay"))this.B.Xi=1*g.nodeValue;if(g=f.getAttributeNode("noderandom"))this.B.nn=1==g.nodeValue;(g=f.getAttributeNode("nodefilter"))&&!this.B.mn&&(this.B.Xf=g.nodeValue);this.ce&&(this.B.enabled=!0,this.B.qf=!0,this.B.active=!1);this.B.Od=0;if(g=f.getAttributeNode("startloaded"))this.B.Oh=1==g.nodeValue,this.B.Oh&&(this.B.active=
!1);if(g=f.getAttributeNode("useanimation"))this.B.Zh=1==g.nodeValue,this.B.qg=this.B.Zh;if(g=f.getAttributeNode("syncanimationwithvideo"))this.B.jl=1==g.nodeValue}if("animation"==f.nodeName){if(g=f.getAttributeNode("syncanimationwithvideo"))this.B.jl=1==g.nodeValue;if(g=f.getAttributeNode("useinautorotation"))this.B.Zh=1==g.nodeValue;if(g=f.getAttributeNode("animsequence"))this.B.ii=g.nodeValue,this.ce&&(this.B.Zd=this.B.ii);this.wa=[];for(k=f.firstChild;k;){if("clip"==k.nodeName){this.I=new x.ul;
if(g=k.getAttributeNode("animtitle"))this.I.pf=g.nodeValue.toString();if(g=k.getAttributeNode("cliptitle"))this.I.ab=g.nodeValue.toString();if(g=k.getAttributeNode("nodeid"))this.I.bt=g.nodeValue.toString();if(g=k.getAttributeNode("length"))this.I.length=Number(g.nodeValue);if(g=k.getAttributeNode("animtype"))this.I.ap=Number(g.nodeValue);if(g=k.getAttributeNode("nextcliptitle"))this.I.jn=g.nodeValue.toString();if(g=k.getAttributeNode("nextclipnodeid"))this.I.Wi=g.nodeValue.toString();if(g=k.getAttributeNode("nextclipstartview"))this.I.Zq=
g.nodeValue.toString();if(g=k.getAttributeNode("transitiontype"))this.I.Es=Number(g.nodeValue);var w=k.firstChild;for(this.I.ca=[];w;){if("keyframe"==w.nodeName){var r=new x.Zc;if(g=w.getAttributeNode("time"))r.time=Number(g.nodeValue);if(g=w.getAttributeNode("value"))r.value=Number(g.nodeValue);if(g=w.getAttributeNode("valuestring"))r.ql=g.nodeValue.toString();if(g=w.getAttributeNode("transitiontime"))r.Fb=Number(g.nodeValue);g=w.getAttributeNode("type");var y=0;g&&(r.type=Number(g.nodeValue),y=
Number(g.nodeValue));if(g=w.getAttributeNode("property"))r.tb=Number(g.nodeValue);if(g=w.getAttributeNode("additionaltrackid"))r.gi=g.nodeValue.toString();if(1==y||2==y){if(g=w.getAttributeNode("bezierintime"))r.ye=Number(g.nodeValue);if(g=w.getAttributeNode("bezierinvalue"))r.ze=Number(g.nodeValue);if(g=w.getAttributeNode("bezierouttime"))r.Ae=Number(g.nodeValue);if(g=w.getAttributeNode("bezieroutvalue"))r.Be=Number(g.nodeValue)}this.I.ca.push(r)}w=w.nextSibling}this.wa.push(this.I)}k=k.nextSibling}}"input"==
f.nodeName&&(h||(h=f));if(h)for(w=0;6>w;w++)g=h.getAttributeNode("prev"+w+"url"),this.yf[w]=g?String(g.nodeValue):"";"altinput"==f.nodeName&&(k=0,(g=f.getAttributeNode("screensize"))&&(k=1*g.nodeValue),0<k&&k<=this.xm()&&k>l&&(l=k,h=f));if("control"==f.nodeName&&this.ce){if(g=f.getAttributeNode("simulatemass"))this.Ka.enabled=1==g.nodeValue;if(g=f.getAttributeNode("rubberband"))this.K.Kn=1==g.nodeValue;if(g=f.getAttributeNode("locked"))this.K.mc=1==g.nodeValue;g&&(this.K.rh=1==g.nodeValue);if(g=f.getAttributeNode("lockedmouse"))this.K.mc=
1==g.nodeValue;if(g=f.getAttributeNode("lockedkeyboard"))this.K.rh=1==g.nodeValue;if(g=f.getAttributeNode("lockedkeyboardzoom"))this.K.Oq=1==g.nodeValue;if(g=f.getAttributeNode("lockedwheel"))this.K.ge=1==g.nodeValue;if(g=f.getAttributeNode("invertwheel"))this.K.Rm=1==g.nodeValue;if(g=f.getAttributeNode("speedwheel"))this.K.bo=1*g.nodeValue;if(g=f.getAttributeNode("invertcontrol"))this.K.Md=1==g.nodeValue;if(g=f.getAttributeNode("sensitivity"))this.K.sensitivity=1*g.nodeValue,1>this.K.sensitivity&&
(this.K.sensitivity=1);if(g=f.getAttributeNode("dblclickfullscreen"))this.K.ck=1==g.nodeValue;if(g=f.getAttributeNode("contextfullscreen"))this.K.Fg=1==g.nodeValue;if(g=f.getAttributeNode("contextvr"))this.K.Gg=1==g.nodeValue;if(g=f.getAttributeNode("contextprojections"))this.K.mi=1==g.nodeValue;if(g=f.getAttributeNode("hideabout"))this.K.Lf=1==g.nodeValue;for(k=f.firstChild;k;)"menulink"==k.nodeName&&(w={text:"",url:""},g=k.getAttributeNode("text"),w.text=g.nodeValue,g=k.getAttributeNode("url"),
w.url=g.nodeValue,this.vh.push(w)),k=k.nextSibling}if("transition"==f.nodeName&&this.ce){if(g=f.getAttributeNode("enabled"))this.J.enabled=1==g.nodeValue;if(g=f.getAttributeNode("blendtime"))this.J.zg=1*g.nodeValue;if(g=f.getAttributeNode("blendcolor"))this.J.sf=g.nodeValue.toString();if(g=f.getAttributeNode("type"))this.J.type=g.nodeValue.toString();if(g=f.getAttributeNode("softedge"))this.J.Uc=1*g.nodeValue;if(g=f.getAttributeNode("zoomin"))this.J.sa=1*g.nodeValue;if(g=f.getAttributeNode("zoomout"))this.J.vc=
1*g.nodeValue;if(g=f.getAttributeNode("zoomfov"))this.J.Gj=1*g.nodeValue;if(g=f.getAttributeNode("zoomafterinfov"))this.J.Ej=1*g.nodeValue;if(g=f.getAttributeNode("zoomafteroutfov"))this.J.Fj=1*g.nodeValue;if(g=f.getAttributeNode("zoomspeed"))this.J.we=1*g.nodeValue;if(g=f.getAttributeNode("zoomoutpause"))this.J.ug=1==g.nodeValue;"cut"==this.J.type&&(this.J.zg=0)}if("soundstransition"==f.nodeName){if(g=f.getAttributeNode("enabled"))this.Ia.enabled=1==g.nodeValue;if(g=f.getAttributeNode("transitiontime"))this.Ia.Fb=
1*g.nodeValue;if(g=f.getAttributeNode("crossfade"))this.Ia.ni=1==g.nodeValue}if("flyintransition"==f.nodeName){if(g=f.getAttributeNode("enabled"))this.yb.enabled=1==g.nodeValue&&this.ia;if(g=f.getAttributeNode("speed"))this.yb.speed=1*g.nodeValue}"userdata"==f.nodeName&&(this.userdata=this.rg=this.Ng(f),this.Pc[a.id]||(this.Pc[a.id]=this.am(f),this.Wf[a.id]=this.bm(f)));if("hotspots"==f.nodeName)for(k=f.firstChild;k;){if("label"==k.nodeName&&this.ce){w=this.H.rj;if(g=k.getAttributeNode("enabled"))w.enabled=
1==g.nodeValue;if(g=k.getAttributeNode("width"))w.width=1*g.nodeValue;if(g=k.getAttributeNode("height"))w.height=1*g.nodeValue;if(g=k.getAttributeNode("textcolor"))w.sj=1*g.nodeValue;if(g=k.getAttributeNode("textalpha"))w.qj=1*g.nodeValue;if(g=k.getAttributeNode("background"))w.background=1==g.nodeValue;if(g=k.getAttributeNode("backgroundalpha"))w.dc=1*g.nodeValue;if(g=k.getAttributeNode("backgroundcolor"))w.ec=1*g.nodeValue;if(g=k.getAttributeNode("border"))w.ji=1*g.nodeValue;if(g=k.getAttributeNode("bordercolor"))w.gc=
1*g.nodeValue;if(g=k.getAttributeNode("borderalpha"))w.fc=1*g.nodeValue;if(g=k.getAttributeNode("borderradius"))w.Mj=1*g.nodeValue;if(g=k.getAttributeNode("wordwrap"))w.Dj=1==g.nodeValue}if("polystyle"==k.nodeName&&this.ce){if(g=k.getAttributeNode("mode"))this.H.mode=1*g.nodeValue;if(g=k.getAttributeNode("bordercolor"))this.H.gc=1*g.nodeValue;if(g=k.getAttributeNode("backgroundcolor"))this.H.ec=1*g.nodeValue;if(g=k.getAttributeNode("borderalpha"))this.H.fc=1*g.nodeValue;if(g=k.getAttributeNode("backgroundalpha"))this.H.dc=
1*g.nodeValue;if(g=k.getAttributeNode("handcursor"))this.H.Jf=1==g.nodeValue}g=void 0;"hotspot"==k.nodeName&&(g=new x.ei(this),g.type="point",g.$b(k),this.W.push(g));"polyhotspot"==k.nodeName&&(g=new x.ei(this),g.type="poly",g.$b(k),this.W.push(g));k=k.nextSibling}if("sounds"==f.nodeName||"media"==f.nodeName)for(k=f.firstChild;k;){if("sound"==k.nodeName&&!this.kn)for(g=new x.zl(this),g.$b(k),this.Pb||g.addElement(),w=0;w<this.cf.length;w++)g.id==this.cf[w].id&&(this.cf.splice(w,1),w--);"video"==k.nodeName&&
(g=new x.Al(this),g.$b(k),this.Pb||g.addElement());"image"==k.nodeName&&(g=new x.Qo(this),g.$b(k),this.Pb||g.addElement());"lensflare"==k.nodeName&&this.Ta&&(g=new x.Ro(this),g.$b(k),this.Ta.qh.push(g));k=k.nextSibling}f=f.nextSibling}for(w=0;w<this.cf.length;w++){a=this.cf[w];if(this.ua&&this.Ia.enabled&&this.isPlaying(a.id))this.Ia.Th.push(a);else{try{a.xa?a.vf():a.f.pause()}catch(ha){this.N(ha)}a.We()}this.X.splice(this.X.indexOf(a),1)}1!=this.J.sa&&2!=this.J.sa&&6!=this.J.sa&&this.dm();this.nb.Ih=
!0;b&&("object"===typeof b&&null!==b?(b.hasOwnProperty("pan")&&this.af(Number(b.pan)),b.hasOwnProperty("tilt")&&this.bf(Number(b.tilt)),b.hasOwnProperty("projection")&&this.Tc(Number(b.projection)),b.hasOwnProperty("fov")&&this.$e(Number(b.fov))):""!=b&&(b=b.toString().split("/"),4<b.length&&this.Tc(Number(b[4])),0<b.length&&(g=String(b[0]),"N"==g.charAt(0)?this.$k(Number(g.substr(1))):"S"==g.charAt(0)?this.$k(-180+Number(g.substr(1))):this.af(Number(g))),1<b.length&&this.bf(Number(b[1])),2<b.length&&
this.$e(Number(b[2]))),this.pan.open=this.pan.j);if(h){g=h.getAttributeNode("stereo");this.Nd=!1;g&&1==g.nodeValue&&(this.Nd=!0);g=h.getAttributeNode("fliplr");this.Ph=!1;g&&1==g.nodeValue&&(this.Ph=!0);for(w=0;w<(this.Nd?12:6);w++)(g=h.getAttributeNode("tile"+w+"url"))&&(this.Ig[w]=String(g.nodeValue));for(w=0;6>w;w++)(g=h.getAttributeNode("prev"+w+"url"))&&(this.yf[w]=String(g.nodeValue));if(g=h.getAttributeNode("tilevrurl"))this.Ul=String(g.nodeValue);if(g=h.getAttributeNode("tilesize"))this.Gc=
1*g.nodeValue;if(g=h.getAttributeNode("canvassize"))this.Ag=Number(g.nodeValue);if(g=h.getAttributeNode("tilescale"))this.ff=1*g.nodeValue;if(g=h.getAttributeNode("leveltileurl"))this.u.Hk=g.nodeValue;if(g=h.getAttributeNode("leveltilesize"))this.u.O=Number(g.nodeValue);if(g=h.getAttributeNode("levelbias"))this.u.en=Number(g.nodeValue);if(g=h.getAttributeNode("levelbiashidpi"))this.u.fn=Number(g.nodeValue);g=h.getAttributeNode("overlap");this.Oa.U=0;this.Oa.pitch=0;g&&(this.u.Da=Number(g.nodeValue));
if(g=h.getAttributeNode("levelingroll"))this.Oa.U=Number(g.nodeValue);if(g=h.getAttributeNode("levelingpitch"))this.Oa.pitch=Number(g.nodeValue);this.Xa=0;(g=h.getAttributeNode("flat"))&&1==g.nodeValue&&(this.Xa=2);g=h.getAttributeNode("width");this.u.width=1*(g?g.nodeValue:1);g=h.getAttributeNode("height");this.u.height=1*(g?g.nodeValue:this.u.width);this.D.src=[];this.u.levels=[];for(k=h.firstChild;k;){if("preview"==k.nodeName){if(g=k.getAttributeNode("color"))this.u.cg=g.nodeValue;if(g=k.getAttributeNode("strip"))this.u.wn=
1==g.nodeValue}if("video"==k.nodeName){if(g=k.getAttributeNode("format"))"3x2"==g.nodeValue&&(this.D.format=14),"equirectangular"==g.nodeValue&&(this.D.format=1);if(g=k.getAttributeNode("flipy"))this.D.flipY=Number(g.nodeValue);if(g=k.getAttributeNode("startonload"))this.D.el=1==g.nodeValue;if(g=k.getAttributeNode("startmutedmobile"))this.D.eo=1==g.nodeValue;if(g=k.getAttributeNode("bleed"))this.D.rf=Number(g.nodeValue);if(g=k.getAttributeNode("endaction"))this.D.Ge=String(g.nodeValue);if(g=k.getAttributeNode("targetview"))this.D.kl=
String(g.nodeValue);if(g=k.getAttributeNode("width"))this.D.width=Number(g.nodeValue);if(g=k.getAttributeNode("height"))this.D.height=Number(g.nodeValue);for(w=k.firstChild;w;)"source"==w.nodeName&&(g=w.getAttributeNode("url"))&&this.D.src.push(g.nodeValue.toString()),w=w.nextSibling}if("level"==k.nodeName){h=new x.xl;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.Ve=1==g.nodeValue;h.T=Math.floor((h.width+this.u.O-1)/this.u.O);h.ea=Math.floor((h.height+this.u.O-1)/this.u.O);this.u.levels.push(h)}k=k.nextSibling}this.u.Fk=this.u.levels.length}this.Kf=!0;this.Wh&&(this.ia=this.ld=!1,this.yc||(this.N("dummy rendering"),this.yc=document.createElement("canvas"),this.yc.width=100,this.yc.height=100,this.yc.id="dummycanvas",this.M.appendChild(this.yc)),this.Hc());this.ia&&this.R&&(this.Aa.Pm(this.ff),this.Aa.Qm());this.ld&&(0<
this.u.levels.length?this.Sl(!0):this.Sl(!1),this.lh=0);var z=this;0<this.u.levels.length&&this.u.wn&&0==this.Xa&&(b=new Image,h=new x.xl,h.Ve=!0,h.cache=!0,h.T=h.ea=0,h.height=h.width=0,this.u.levels.push(h),b.crossOrigin=this.crossOrigin,b.onload=this.Aa.Yq(b),b.setAttribute("src",this.re(6,this.u.Fk-1,0,0)));if(0<this.D.src.length&&this.ia)if(this.Xh){this.D.f=document.createElement("video");this.D.f.crossOrigin=this.crossOrigin;this.D.f.setAttribute("style","display:none; max-width:none;");this.D.f.setAttribute("playsinline",
"playsinline");this.D.f.preload=!0;this.D.f.volume=this.ba;this.$.appendChild(this.D.f);this.D.yd=!1;this.D.ko=!1;this.D.f.oncanplay=function(){if(!z.D.yd){z.D.Ki=!0;var ha,ua,id=[],sh=new x.Ga,db=z.R,gl=z.D.f.videoWidth/3;z.D.width=z.D.f.videoWidth;z.D.height=z.D.f.videoHeight;for(ha=0;6>ha;ha++){var tf=ha%3*gl+z.D.rf;var hl=tf+gl-2*z.D.rf;var il=4;3>ha&&(il+=gl);var kl=il+gl-2*z.D.rf;for(ua=0;4>ua;ua++){sh.x=-1;sh.y=-1;sh.z=1;for(var jl=0;jl<ua;jl++)sh.Jn();id.push((0<sh.x?tf:hl)/(3*gl),(0<sh.y?
kl:il)/(2*gl))}}db.bindBuffer(db.ARRAY_BUFFER,z.D.pj);db.bufferData(db.ARRAY_BUFFER,new Float32Array(id),db.STATIC_DRAW)}};this.D.xb=function(){var ha=z.pb("_videopanorama");return 0<ha.length&&ha[0].xb?ha[0].xb:0};this.D.Nn=function(ha){var ua=z.pb("_videopanorama");0<ua.length&&(ua[0].xb=ha)};this.D.loop=function(){return 0<z.D.xb()?(z.D.Nn(z.D.xb()-1),z.D.f.play(),!0):!1};"exit"==this.D.Ge?this.D.f.onended=function(){z.D.Ki=!1;z.D.yd=!1;z.$.removeChild(z.D.f);z.D.f=null;z.update()}:"stop"==this.D.Ge?
z.D.f.onended=function(){z.D.loop()||z.update()}:"{"==this.D.Ge.charAt(0)?this.D.f.onended=function(){z.jd(z.D.Ge,z.D.kl)}:this.D.f.loop=!0;for(w=0;w<this.D.src.length;w++)h=document.createElement("source"),h.setAttribute("src",this.eb(this.D.src[w])),this.D.f.appendChild(h);h=this.pb("_videopanorama");0<h.length?h[0].f=this.D.f:this.An("_videopanorama",this.D.f);if(this.D.el&&(h=this.D.f.play(),void 0!==h))h.then(function(){})["catch"](function(){e.D.eo&&(e.D.f.muted=!0,e.D.f.play())})}else"{"==
this.D.Ge.charAt(0)&&z.jd(z.D.Ge,z.D.kl);this.Bl();this.J.Cd||this.ho();this.update();this.ce&&(this.ce=!1,this.ta&&this.ta.ggViewerInit&&(this.ta.ggViewerInit(),this.L("viewerinit",{})),this.yb.enabled&&0==this.Xa&&this.ia&&(this.Tc(9),this.pan.j=this.Jc.pan,this.v.j=this.Jc.v,this.fov.j=this.Jc.fov,this.Wa=this.Jc.Nb,this.I=this.Sg(!1),this.pan.j=this.I.ca[0].value,this.v.j=this.I.ca[1].value,this.fov.j=this.I.ca[2].value,3==this.I.ca[3].tb&&this.Tc(this.I.ca[3].value),this.Yb=this.I.ab,this.dj(!0),
this.B.active=!1,this.B.Pg=!0));this.Hc()};c.prototype.Ok=function(a,b){0<a.length&&(".xml"==a.substr(a.length-4)||".swf"==a.substr(a.length-4)||"{"==a.charAt(0)?this.jd(this.eb(a),b):window.open(this.eb(a),b))};c.prototype.qs=function(){this.Kf=this.isLoaded=!1;this.checkLoaded=this.ic=[];this.Dh=0;this.ta&&this.ta.ggReLoaded&&this.ta.ggReLoaded();this.L("beforechangenode",{})};c.prototype.Bq=function(a){var b="";0<this.Mk.length&&(b=this.Mk.pop());""!=b&&(this.rk=!0);this.jd("{"+b+"}",a)};c.prototype.jd=
function(a,b){if(""!=a&&"{}"!=a){this.qs();this.de&&(this.Mc(0),this.Hc());this.la&&this.la.hotspotProxyOut&&this.la.hotspotProxyOut(this.ya.id,this.ya.url);".swf"==a.substr(a.length-4)&&(a=a.substr(0,a.length-4)+".xml");var e="",f=null;"object"===typeof b&&null!==b?f=b:b&&(e=b.toString());b="/"+this.v.j+"/"+this.fov.j+"//"+this.Sa();e=e.replace("$cur",this.pan.j+b);e=e.replace("$(cur)",this.pan.j+b);e=e.replace("$fwd","N"+this.Je()+b);e=e.replace("$(fwd)","N"+this.Je()+b);e=e.replace("$bwd","S"+
this.Je()+b);e=e.replace("$(bwd)","S"+this.Je()+b);e=e.replace("$ap",String(this.pan.j));e=e.replace("$(ap)",String(this.pan.j));e=e.replace("$an",String(this.Je()));e=e.replace("$(an)",String(this.Je()));e=e.replace("$at",String(this.v.j));e=e.replace("$(at)",String(this.v.j));e=e.replace("$af",String(this.fov.j));e=e.replace("$(af)",String(this.fov.j));e=e.replace("$ar",String(this.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.Ea();if("{"==a.charAt(0)){var g=a.substr(1,a.length-2);if(this.Qa==g&&this.Bg)return;(f=this.ae[g])&&(g=f);f=this.J;var h=this.R;if(this.te[g]){this.Bg=!0;if(this.J.enabled&&this.ia&&this.J.uc){f.Yn=!0;f.ue||f.Cd||this.dj(!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.bk=l;h.bindFramebuffer(h.FRAMEBUFFER,f.uc);h.viewport(0,0,f.uc.width,f.uc.height);
h.clear(h.COLOR_BUFFER_BIT|h.DEPTH_BUFFER_BIT);f.Sh=!0;this.Vh();f.Sh=!1;h.bindFramebuffer(h.FRAMEBUFFER,null);h.viewport(0,0,this.zb.width,this.zb.height);h=new Date;this.ya!=this.kb&&6!=f.sa?(f.ci=this.ya.Zb/this.C.width,f.di=1-this.ya.Cb/this.C.height):(f.ci=.5,f.di=.5);1!=f.sa&&2!=f.sa&&6!=f.sa?(f.fl=h.getTime()+50,f.ue=!0):(f.Io=h.getTime()+50,f.Cd=!0,f.Hb=Math.sin(this.kc()/2*Math.PI/180)/Math.sin(f.Gj/2*Math.PI/180),f.Hb=Math.max(f.Hb,1),f.Ho=1/f.we*f.Hb*.3)}this.Sk(this.te[g],b);this.Qj(a);
if(f.enabled&&this.ia&&0!=f.vc){f.df=this.Wg();f.ef=this.Bi();f.Wd=this.kc();f.Bd=this.Sa();if(1==f.vc||3==f.vc)this.ij(f.Fj);else if(2==f.vc)this.ij(f.Ej);else if(4==f.vc){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.Tc(this.Ai(3,b).value),this.af(this.Ai(0,b).value),this.bf(this.Ai(1,b).value),this.$e(this.Ai(2,b).value)):(this.Tc(this.Jc.Nb),this.af(this.Jc.pan),this.bf(this.Jc.v),this.ij(this.Jc.fov))}f.ug||1==f.sa||2==f.sa||6==f.sa||
(4==f.vc?(this.I=this.Sg(!0,f.df,f.ef,f.Wd),this.Yb=this.I.ab,this.B.active=!0,this.yb.running=!0):this.moveTo(f.df,f.ef,f.Wd,f.we,0,f.Bd))}f.Yn=!1;this.ra&&this.ra.openNext(a,e);this.ve&&(this.N("add pano opennext"),this.Gb.fi());this.J.Cd||this.J.ue||(this.da&&this.Yj(),this.Bg=!1)}else{this.Oc("invalid node id: "+g);return}}else this.yn(a,null,b);this.L("changenode",{});this.update(5)}};c.prototype.eq=function(){return this.Kf?this.Rf?this.Ya.slice(0):[""]:[]};c.prototype.Ng=function(a){var b;
var e={title:"",description:"",author:"",datetime:"",copyright:"",source:"",information:"",comment:"",latitude:0,longitude:0,altitude:-1E4,heading:0,nodeid:"",customnodeid:"",streetviewlink:"",tags:[]};if(a&&((b=a.getAttributeNode("title"))&&(e.title=b.nodeValue.toString()),(b=a.getAttributeNode("description"))&&(e.description=b.nodeValue.toString()),(b=a.getAttributeNode("author"))&&(e.author=b.nodeValue.toString()),(b=a.getAttributeNode("datetime"))&&(e.datetime=b.nodeValue.toString()),(b=a.getAttributeNode("copyright"))&&
(e.copyright=b.nodeValue.toString()),(b=a.getAttributeNode("source"))&&(e.source=b.nodeValue.toString()),(b=a.getAttributeNode("info"))&&(e.information=b.nodeValue.toString()),(b=a.getAttributeNode("comment"))&&(e.comment=b.nodeValue.toString()),(b=a.getAttributeNode("latitude"))&&(e.latitude=Number(b.nodeValue)),(b=a.getAttributeNode("longitude"))&&(e.longitude=Number(b.nodeValue)),(b=a.getAttributeNode("nodeid"))&&(e.nodeid=b.nodeValue.toString()),(b=a.getAttributeNode("altitude"))&&(e.altitude=
Number(b.nodeValue)),(b=a.getAttributeNode("heading"))&&(e.heading=Number(b.nodeValue)),(b=a.getAttributeNode("customnodeid"))&&(e.customnodeid=b.nodeValue.toString()),(b=a.getAttributeNode("streetviewlink"))&&(e.streetviewlink=b.nodeValue.toString()),b=a.getAttributeNode("tags"))){a=b.nodeValue.toString().split("|");for(b=0;b<a.length;b++)""==a[b]&&(a.splice(b,1),b--);e.tags=a}return e};c.prototype.am=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.bm=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.Vg=function(a){return a?
this.$h[a]?this.$h[a]:this.Ng():this.rg};c.prototype.pk=function(a){a=this.Vg(a);var b=[];""!=a.latitude&&0!=a.latitude&&0!=a.longitude&&(b.push(a.latitude),b.push(a.longitude));return b};c.prototype.ym=function(a){for(var b=[],e=0;e<this.Ya.length;e++){var f=this.Ya[e],g=this.Vg(f);g&&g.tags.includes(a)&&b.push(f)}return b};c.prototype.hq=function(a){return this.Vg(a).title};c.prototype.cq=function(a,b){var e=-1;a=this.pk(a);b=this.pk(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.Hf=function(a,b){var e;for(e=0;e<this.I.ca.length;e++)if(this.I.ca[e].time==a&&this.I.ca[e].tb==b)return this.I.ca[e];return!1};c.prototype.Ai=function(a,b){var e;for(e=0;e<b.ca.length;e++)if(0==b.ca[e].time&&b.ca[e].tb==a)return b.ca[e];return!1};c.prototype.aq=function(a){var b,e=1E5,f=a,g=
!1;for(b=0;b<this.I.ca.length;b++)this.I.ca[b].tb==a.tb&&this.I.ca[b].time>a.time&&this.I.ca[b].time<e&&(f=this.I.ca[b],e=f.time,g=!0);return g?f:!1};c.prototype.Gp=function(a){for(var b=[],e=0;e<this.I.ca.length;e++)if(this.I.ca[e].time<=a&&4==this.I.ca[e].tb){for(var f=!1,g=0;g<b.length;g++)if(b[g].gi==this.I.ca[e].gi){b[g].time<this.I.ca[e].time?b.splice(g,1):f=!0;break}f||b.push(this.I.ca[e])}return b};c.prototype.Sg=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 x.tl;g.ab="__FlyIn";g.pe=this.pan.j;g.Nh=this.v.j;g.Td=this.fov.j;g.Mh=this.Wa;g.Bd=this.Yi;a?(g.Af=!1,g.Ee=!1,g.speed=this.J.we,g.Vd=b,g.qe=e,g.mg=f):(g.Af=!0,g.Ee=!0,g.speed=this.yb.speed,g.Vd=this.pan.cb,g.qe=this.v.cb,g.mg=this.fov.cb);return this.mm(g)};c.prototype.mm=function(a){var b=new x.ul;b.ab=a.ab;b.pf="";b.ca=[];for(var e=a.Mh!=a.Bd&&-1!=a.Bd;-180>a.Vd;)a.Vd+=360;for(;180<a.Vd;)a.Vd-=360;var f=a.Vd-a.pe;if(360==this.pan.max-this.pan.min){for(;-180>f;)f+=360;for(;180<f;)f-=360}var g=
a.qe-a.Nh,h=a.mg-a.Td,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.Fe){var k=Math.ceil(.7*l);k=Math.min(15,k);k=Math.max(5,k);b.length=l+k;var w=.33*k}var r=a.mg,y=l,z=0,ha=l-1;if(e){var ua=a.Td;var id=4==a.Bd?120:this.Tg(a.Bd);var sh=a.mg;h=sh-a.Td;var db=new x.Ic(0,a.Td),gl=new x.Ic(l,sh),tf=new x.Ic,hl=new x.Ic;hl.init(l/3,a.Td+h/3);tf.init(2*l/3,sh-h/3);if(ua>id)for(;z<=l&&ua>id;)ua=new x.Ic,ua.Lj(db,gl,hl,tf,z),ua=ua.y,z++;else z=1;z>=.8*l&&(y=z=Math.round(.8*
l));0==z&&(z=1);id=4==a.Mh?120:this.Tg(a.Mh);ua=a.mg;if(ua>id)for(;ha>z&&ua>id;)ua=new x.Ic,ua.Lj(db,gl,hl,tf,ha),ua=ua.y,ha--}db=new x.Zc;db.time=0;db.tb=0;db.value=a.pe;db.type=1;db.Ae=l/3;db.Be=a.Af?a.pe:a.pe+f/3;b.ca.push(db);db=new x.Zc;db.time=0;db.tb=1;db.value=a.Nh;db.type=1;db.Ae=l/3;db.Be=a.Af?a.Nh:a.Nh+g/3;b.ca.push(db);db=new x.Zc;db.time=0;db.tb=2;db.value=a.Td;db.type=1;db.Ae=l/3;db.Be=a.Af?a.Td:a.Td+h/3;b.ca.push(db);db=new x.Zc;db.time=0;db.tb=3;db.value=a.Mh;db.type=0;db.Fb=0;b.ca.push(db);
e&&(db=new x.Zc,db.time=z,db.tb=3,db.value=a.Bd,db.type=0,db.Fb=ha-z,b.ca.push(db));db=new x.Zc;db.time=l;db.tb=0;db.value=a.pe+f;db.type=1;db.ye=2*l/3;db.ze=a.Ee&&!a.Fe?db.value:db.value-f/3;a.Fe&&(db.Ae=l+w,db.Be=db.value+w/l*f);b.ca.push(db);db=new x.Zc;db.time=l;db.tb=1;db.value=a.qe;db.type=1;db.ye=2*l/3;db.ze=a.Ee&&!a.Fe?a.qe:a.qe-g/3;a.Fe&&(db.Ae=l+w,db.Be=db.value+w/l*g);b.ca.push(db);db=new x.Zc;db.time=y;db.tb=2;db.value=r;db.type=1;db.ye=2*y/3;db.ze=a.Ee?r:r-h/3;b.ca.push(db);a.Fe&&(db=
new x.Zc,db.time=l+k,db.tb=0,db.value=a.pe+f,db.type=1,db.ye=l+k-w,db.ze=a.pe+f,b.ca.push(db),db=new x.Zc,db.time=l+k,db.tb=1,db.value=a.qe,db.type=1,db.ye=l+k-w,db.ze=a.qe,b.ca.push(db));this.wa.push(b);return b};c.prototype.Rs=function(){this.D.f&&this.D.f.play()};c.prototype.Ss=function(){this.D.f&&(this.D.f.pause(),this.D.f.currentTime=0)};c.prototype.Qs=function(){this.D.f&&this.D.f.pause()};c.prototype.es=function(a){this.D.f&&(0>a&&(a=0),a>this.D.f.duration&&(a=this.D.f.duration-.1),this.D.f.currentTime=
a,this.update())};c.prototype.vq=function(){return this.D.f?this.D.f.currentTime:0};c.prototype.uq=function(){if(this.D.f)return this.D.f};c.prototype.ds=function(a){if(this.D.f){var b=!this.D.f.paused&&!this.D.f.ended,e=this.D.f.currentTime;this.D.f.pause();this.D.f.src=isNaN(parseInt(a,10))?String(a):this.D.src[parseInt(a,10)];b&&(this.D.f.onloadedmetadata=function(){this.currentTime=e;this.play();this.onloadedmetadata=null});this.D.f.currentTime=e}};c.prototype.Ap=function(){this.kn=!0};return c}();
x.yl=d})(ggP2VR||(ggP2VR={}));window.ggHasHtml5Css3D=Gl;window.ggHasWebGL=Hl;window.pano2vrPlayer=ggP2VR.yl;var n=ggP2VR.yl.prototype;n.getVersion=n.Hm;n.readConfigString=n.Tk;n.readConfigUrl=n.yn;n.readConfigUrlAsync=n.Ar;n.readConfigXml=n.zn;n.openUrl=n.Ok;n.openNext=n.jd;n.goBack=n.Bq;n.setMargins=n.Nr;n.addListener=n.addListener;n.on=n.addListener;n.removeEventListener=n.removeEventListener;n.off=n.removeEventListener;n.detectBrowser=n.Zl;n.initWebGL=n.Mc;n.getPercentLoaded=n.kq;
n.setBasePath=n.Jr;n.getBasePath=n.qm;n.setViewerSize=n.Xn;n.getViewerSize=n.yq;n.setSkinObject=n.Yr;n.changeViewMode=n.mp;n.getViewMode=n.wq;n.changePolygonMode=n.Nl;n.setPolygonMode=n.Nl;n.getPolygonMode=n.mq;n.showOnePolyHotspot=n.Zn;n.hideOnePolyHotspot=n.Mm;n.changePolyHotspotColor=n.kp;n.toggleOnePolyHotspot=n.zs;n.changeViewState=n.np;n.getViewState=n.xq;n.setRenderFlags=n.Rr;n.getRenderFlags=n.pq;n.setMaxTileCount=n.Tn;n.getVFov=n.kc;n.setVFov=n.ij;n.getHFov=n.Lp;n.updatePanorama=n.Vh;
n.isTouching=n.Xm;n.getIsMobile=n.Rp;n.setIsMobile=n.Mr;n.getIsTour=n.Sp;n.getIsAutorotating=n.Op;n.getIsLoading=n.Qp;n.getIsLoaded=n.zi;n.getIsTileLoading=n.um;n.getLastActivity=n.Tp;n.getPan=n.Wg;n.getPanNorth=n.Je;n.getPanDest=n.jq;n.getPanN=n.zm;n.setPan=n.af;n.setPanNorth=n.$k;n.changePan=n.Ml;n.changePanLog=n.jp;n.getTilt=n.Bi;n.getTiltDest=n.qq;n.setTilt=n.bf;n.changeTilt=n.Ol;n.changeTiltLog=n.lp;n.getFov=n.nk;n.getFovDest=n.Jp;n.setFov=n.$e;n.changeFov=n.Ll;n.changeFovLog=n.Rj;
n.getRoll=n.Dm;n.setRoll=n.gj;n.setPanTilt=n.Pr;n.setPanTiltFov=n.fj;n.setDefaultView=n.Kr;n.setLocked=n.setLocked;n.setLockedMouse=n.Rn;n.setLockedKeyboard=n.Qn;n.getLockedKeyboard=n.Vp;n.setLockedWheel=n.Sn;n.moveTo=n.moveTo;n.moveToEx=n.Ui;n.moveToDefaultView=n.Uq;n.moveToDefaultViewEx=n.Vq;n.addHotspotElements=n.Bl;n.playSound=n.Ue;n.playPauseSound=n.vn;n.playStopSound=n.yr;n.pauseSound=n.Pk;n.activateSound=n.Uo;n.soundGetTime=n.ks;n.soundSetTime=n.ls;n.setMediaVisibility=n.Or;n.isPlaying=n.isPlaying;
n.stopSound=n.nj;n.setVolume=n.setVolume;n.changeVolume=n.op;n.removeHotspots=n.En;n.getHotspotsVisible=n.sm;n.getCurrentPerspective=n.td;n.addHotspot=n.Wo;n.updateHotspot=n.Hs;n.removeHotspot=n.Br;n.setActiveHotspot=n.hg;n.getPointHotspotIds=n.lq;n.getHotspot=n.Np;n.setFullscreen=n.ig;n.toggleFullscreen=n.vj;n.enterFullscreen=n.Bp;n.exitFullscreen=n.exitFullscreen;n.getIsFullscreen=n.Pp;n.startAutorotate=n.ps;n.stopAutorotate=n.ss;n.toggleAutorotate=n.ys;n.setAutorotateNodeFilter=n.Ir;
n.startAnimation=n.os;n.createLayers=n.Tl;n.removePanorama=n.Xe;n.getScreenResolution=n.Em;n.getMaxScreenResolution=n.xm;n.getNodeIds=n.eq;n.getNodeUserdata=n.Vg;n.getNodeLatLng=n.pk;n.getNodeTitle=n.hq;n.getNodeDistance=n.cq;n.getCurrentNode=n.mk;n.getNextNode=n.bq;n.getPrevNode=n.oq;n.getLastVisitedNode=n.Up;n.getNodesWithTag=n.ym;n.getCurrentPointHotspots=n.Ip;n.getPositionAngles=n.nq;n.getPositionRawAngles=n.Am;n.nodeVisited=n.$q;n.clearVisitedNodes=n.sp;n.setElementIdPrefix=n.Lr;
n.videoPanoPlay=n.Rs;n.videoPanoStop=n.Ss;n.videoPanoPause=n.Qs;n.getVideoPanoTime=n.vq;n.setVideoPanoTime=n.es;n.getVideoPanoObject=n.uq;n.setVideoPanoSource=n.ds;n.getMediaObject=n.$p;n.getMediaBufferSourceObject=n.Zp;n.registerVideoElement=n.An;n.disableSoundLoading=n.Ap;n.setCrossOrigin=n.setCrossOrigin;n.setProjection=n.Tc;n.getProjection=n.Sa;n.changeProjection=n.Sj;n.changeProjectionEx=n.Sj;n.changeLensflares=n.ip;n.setTransition=n.bs;n.getMapType=n.Yp;n.getMapDetails=n.Xp;
n.getNodeMapCoords=n.fq;n.getNodeMapCoordsInPercent=n.gq;n.getMapContainingNode=n.Wp;n.getMapsContainingNode=n.wm;n.getMapIDs=n.vm;n.addVariable=n.Zo;n.setVariableOptions=n.Vn;n.setVariableValue=n.oe;n.getVariableValue=n.tq;n.setSuperCookie=n.$r;n.getGyroAvailable=n.Kp;n.setUseGyro=n.Un;n.getUseGyro=n.rq;n.getOS=n.iq;n.getBrowser=n.Hp;n.triggerEvent=n.L;n.requestRedraw=n.Dr;n.getWebGlContext=n.zq;n.getHasTouch=n.Mp;n.enterVR=n.Bf;n.exitVR=n.Cf;n.toggleVR=n.oo;n.isInVR=n.gh;n.hasVR=n.Ne;
n.getVRDisplayName=n.sq;n.setVRFrameBufferScaleFactor=n.cs;var Jl=ggP2VR.zl.prototype;Jl.bufferSoundCurrentTime=Jl.uf;Jl.bufferSoundSetTime=Jl.Jl;Jl.bufferSoundSetDragTime=Jl.hp;Jl.bufferSoundDuration=Jl.ki;