-
Notifications
You must be signed in to change notification settings - Fork 0
/
pano2vr_player.js
558 lines (557 loc) · 282 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
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
//////////////////////////////////////////////////////////////////////
// Pano2VR 7.1.2/20913 HTML5/CSS3 & WebGL Panorama Player //
// Trial License: For evaluation only! //
// (c) 2024, Garden Gnome Software, https://ggnome.com //
//////////////////////////////////////////////////////////////////////
/*
Copyright 2005-2024 Garden Gnome GmbH.
All rights reserved
*/
var Yb="function"==typeof Object.defineProperties?Object.defineProperty:function(nb,ub,rb){if(nb==Array.prototype||nb==Object.prototype)return nb;nb[ub]=rb.value;return nb};function Zb(nb){nb=["object"==typeof globalThis&&globalThis,nb,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var ub=0;ub<nb.length;++ub){var rb=nb[ub];if(rb&&rb.Math==Math)return rb}throw Error("Cannot find global object");}var $b=Zb(this);
function bd(nb,ub){if(ub)a:{var rb=$b;nb=nb.split(".");for(var pb=0;pb<nb.length-1;pb++){var qb=nb[pb];if(!(qb in rb))break a;rb=rb[qb]}nb=nb[nb.length-1];pb=rb[nb];ub=ub(pb);ub!=pb&&null!=ub&&Yb(rb,nb,{configurable:!0,writable:!0,value:ub})}}bd("Array.prototype.includes",function(nb){return nb?nb:function(ub,rb){var pb=this;pb instanceof String&&(pb=String(pb));var qb=pb.length;rb=rb||0;for(0>rb&&(rb=Math.max(rb+qb,0));rb<qb;rb++){var lb=pb[rb];if(lb===ub||Object.is(lb,ub))return!0}return!1}});
(()=>{function nb(pb){var qb=rb[pb];if(void 0!==qb)return qb.exports;qb=rb[pb]={exports:{}};ub[pb](qb,qb.exports,nb);return qb.exports}var ub={768:pb=>{pb.exports=function(){return!1}}},rb={};(()=>{nb.n=pb=>{var qb=pb&&pb.__esModule?()=>pb["default"]:()=>pb;nb.d(qb,{a:qb});return qb}})();(()=>{nb.d=(pb,qb)=>{for(var lb in qb)nb.uq(qb,lb)&&!nb.uq(pb,lb)&&Object.defineProperty(pb,lb,{enumerable:!0,get:qb[lb]})}})();(()=>{nb.uq=(pb,qb)=>Object.prototype.hasOwnProperty.call(pb,qb)})();(()=>{function pb(){var a=
"perspective",b=["Webkit","Moz","O","ms","Ms"],e;for(e=0;e<b.length;e++)"undefined"!==typeof document.documentElement.style[b[e]+"Perspective"]&&(a=b[e]+"Perspective");"undefined"!==typeof document.documentElement.style[a]?"webkitPerspective"in document.documentElement.style?(a=document.createElement("style"),b=document.createElement("div"),e=document.head||document.getElementsByTagName("head")[0],a.textContent="@media (-webkit-transform-3d) {#ggswhtml5{height:5px}}",e.appendChild(a),b.id="ggswhtml5",
document.documentElement.appendChild(b),e=5===b.offsetHeight,a.parentNode.removeChild(a),b.parentNode.removeChild(b)):e=!0:e=!1;return e}function qb(){let a;if(a=!!window.WebGLRenderingContext)try{let b=document.createElement("canvas");b.width=100;b.height=100;let e=b.getContext("webgl");e||(e=b.getContext("experimental-webgl"));a=!!e}catch(b){a=!1}return a}class lb{constructor(a,b,e,f,h){this.ac=this.zc=this.v=this.wd=this.z=this.y=this.x=0;a&&(this.x=a);b&&(this.y=b);e&&(this.z=e);f&&(this.wd=f);
h&&(this.v=h)}init(a,b,e,f,h){this.x=a;this.y=b;this.z=e;f&&(this.wd=f);h&&(this.v=h)}toString(){return"("+this.x+","+this.y+","+this.z+") - ("+this.wd+","+this.v+")"}ya(a){let b=Math.sin(a);a=Math.cos(a);let e=this.y,f=this.z;this.y=a*e-b*f;this.z=b*e+a*f}Wu(){let a=this.y;this.y=-this.z;this.z=a}Vu(){let a=this.y;this.y=this.z;this.z=-a}Ca(a){let b=Math.sin(a);a=Math.cos(a);let e=this.x,f=this.z;this.x=a*e+b*f;this.z=-b*e+a*f}Xu(){let a=this.x;this.x=-this.z;this.z=a}Ta(a){let b=Math.sin(a);a=Math.cos(a);
let e=this.x,f=this.y;this.x=a*e-b*f;this.y=b*e+a*f}Qq(){let a=this.x;this.x=-this.y;this.y=a}bc(a){this.ya(a*Math.PI/180)}Sc(a){this.Ca(a*Math.PI/180)}le(a){this.Ta(a*Math.PI/180)}clone(){return new lb(this.x,this.y,this.z,this.wd,this.v)}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}normalize(){let a=this.length();0<a&&(a=1/a,this.x*=a,this.y*=a,this.z*=a)}mk(a){return this.x*a.x+this.y*a.y+this.z*a.z}Ee(a,b){let e;e=Math.cos(b*Math.PI/180);this.x=e*Math.sin(a*Math.PI/180);
this.y=Math.sin(b*Math.PI/180);this.z=e*Math.cos(a*Math.PI/180)}jf(){return 180*Math.atan2(-this.x,-this.z)/Math.PI}kf(){return 180*Math.asin(this.y/this.length())/Math.PI}he(a,b,e){this.x=a.x*e+b.x*(1-e);this.y=a.y*e+b.y*(1-e);this.z=a.z*e+b.z*(1-e);this.wd=a.wd*e+b.wd*(1-e);this.v=a.v*e+b.v*(1-e)}}var kb={create:function(a){let b;b="undefined"!=typeof Float32Array?new Float32Array(16):Array(16);a&&(b[0]=a[0],b[1]=a[1],b[2]=a[2],b[3]=a[3],b[4]=a[4],b[5]=a[5],b[6]=a[6],b[7]=a[7],b[8]=a[8],b[9]=a[9],
b[10]=a[10],b[11]=a[11],b[12]=a[12],b[13]=a[13],b[14]=a[14],b[15]=a[15]);return b},set:function(a,b){b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=a[3];b[4]=a[4];b[5]=a[5];b[6]=a[6];b[7]=a[7];b[8]=a[8];b[9]=a[9];b[10]=a[10];b[11]=a[11];b[12]=a[12];b[13]=a[13];b[14]=a[14];b[15]=a[15];return b},identity:function(a){a[0]=1;a[1]=0;a[2]=0;a[3]=0;a[4]=0;a[5]=1;a[6]=0;a[7]=0;a[8]=0;a[9]=0;a[10]=1;a[11]=0;a[12]=0;a[13]=0;a[14]=0;a[15]=1;return a},multiply:function(a,b,e){e||(e=a);let f=a[0],h=a[1],n=a[2],r=a[3],w=a[4],
x=a[5],y=a[6],z=a[7],cb=a[8],ab=a[9],db=a[10],gb=a[11],bb=a[12],fb=a[13],ib=a[14];a=a[15];let hb=b[0],mb=b[1],ob=b[2],jb=b[3],sb=b[4],vb=b[5],yb=b[6],zb=b[7],xb=b[8],Fb=b[9],Ib=b[10],Jb=b[11],Kb=b[12],Lb=b[13],Mb=b[14];b=b[15];e[0]=hb*f+mb*w+ob*cb+jb*bb;e[1]=hb*h+mb*x+ob*ab+jb*fb;e[2]=hb*n+mb*y+ob*db+jb*ib;e[3]=hb*r+mb*z+ob*gb+jb*a;e[4]=sb*f+vb*w+yb*cb+zb*bb;e[5]=sb*h+vb*x+yb*ab+zb*fb;e[6]=sb*n+vb*y+yb*db+zb*ib;e[7]=sb*r+vb*z+yb*gb+zb*a;e[8]=xb*f+Fb*w+Ib*cb+Jb*bb;e[9]=xb*h+Fb*x+Ib*ab+Jb*fb;e[10]=
xb*n+Fb*y+Ib*db+Jb*ib;e[11]=xb*r+Fb*z+Ib*gb+Jb*a;e[12]=Kb*f+Lb*w+Mb*cb+b*bb;e[13]=Kb*h+Lb*x+Mb*ab+b*fb;e[14]=Kb*n+Lb*y+Mb*db+b*ib;e[15]=Kb*r+Lb*z+Mb*gb+b*a;return e},translate:function(a,b,e){let f=b[0],h=b[1];b=b[2];if(!e||a==e)return a[12]=a[0]*f+a[4]*h+a[8]*b+a[12],a[13]=a[1]*f+a[5]*h+a[9]*b+a[13],a[14]=a[2]*f+a[6]*h+a[10]*b+a[14],a[15]=a[3]*f+a[7]*h+a[11]*b+a[15],a;let n=a[0],r=a[1],w=a[2],x=a[3],y=a[4],z=a[5],cb=a[6],ab=a[7],db=a[8],gb=a[9],bb=a[10],fb=a[11];e[0]=n;e[1]=r;e[2]=w;e[3]=x;e[4]=
y;e[5]=z;e[6]=cb;e[7]=ab;e[8]=db;e[9]=gb;e[10]=bb;e[11]=fb;e[12]=n*f+y*h+db*b+a[12];e[13]=r*f+z*h+gb*b+a[13];e[14]=w*f+cb*h+bb*b+a[14];e[15]=x*f+ab*h+fb*b+a[15];return e},scale:function(a,b,e){let f=b[0],h=b[1];b=b[2];if(!e||a==e)return a[0]*=f,a[1]*=f,a[2]*=f,a[3]*=f,a[4]*=h,a[5]*=h,a[6]*=h,a[7]*=h,a[8]*=b,a[9]*=b,a[10]*=b,a[11]*=b,a;e[0]=a[0]*f;e[1]=a[1]*f;e[2]=a[2]*f;e[3]=a[3]*f;e[4]=a[4]*h;e[5]=a[5]*h;e[6]=a[6]*h;e[7]=a[7]*h;e[8]=a[8]*b;e[9]=a[9]*b;e[10]=a[10]*b;e[11]=a[11]*b;e[12]=a[12];e[13]=
a[13];e[14]=a[14];e[15]=a[15];return e},rotate:function(a,b,e,f){let h=e[0],n=e[1];e=e[2];let r=Math.sqrt(h*h+n*n+e*e);if(!r)return null;1!=r&&(r=1/r,h*=r,n*=r,e*=r);let w=Math.sin(b),x=Math.cos(b),y=1-x;b=a[0];r=a[1];let z=a[2],cb=a[3],ab=a[4],db=a[5],gb=a[6],bb=a[7],fb=a[8],ib=a[9],hb=a[10],mb=a[11],ob=h*h*y+x,jb=n*h*y+e*w,sb=e*h*y-n*w,vb=h*n*y-e*w,yb=n*n*y+x,zb=e*n*y+h*w,xb=h*e*y+n*w;h=n*e*y-h*w;n=e*e*y+x;f?a!=f&&(f[12]=a[12],f[13]=a[13],f[14]=a[14],f[15]=a[15]):f=a;f[0]=b*ob+ab*jb+fb*sb;f[1]=
r*ob+db*jb+ib*sb;f[2]=z*ob+gb*jb+hb*sb;f[3]=cb*ob+bb*jb+mb*sb;f[4]=b*vb+ab*yb+fb*zb;f[5]=r*vb+db*yb+ib*zb;f[6]=z*vb+gb*yb+hb*zb;f[7]=cb*vb+bb*yb+mb*zb;f[8]=b*xb+ab*h+fb*n;f[9]=r*xb+db*h+ib*n;f[10]=z*xb+gb*h+hb*n;f[11]=cb*xb+bb*h+mb*n;return f},Os:function(a,b,e,f,h,n,r){r||(r=kb.create());let w=b-a,x=f-e,y=n-h;r[0]=2*h/w;r[1]=0;r[2]=0;r[3]=0;r[4]=0;r[5]=2*h/x;r[6]=0;r[7]=0;r[8]=(b+a)/w;r[9]=(f+e)/x;r[10]=-(n+h)/y;r[11]=-1;r[12]=0;r[13]=0;r[14]=-(n*h*2)/y;r[15]=0;return r},perspective:function(a,b,
e,f,h){a=e*Math.tan(a*Math.PI/360);b*=a;return kb.Os(-b,b,-a,a,e,f,h)},Lw:function(a,b,e,f,h,n,r){r||(r=kb.create());let w=b-a,x=f-e,y=n-h;r[0]=2/w;r[1]=0;r[2]=0;r[3]=0;r[4]=0;r[5]=2/x;r[6]=0;r[7]=0;r[8]=0;r[9]=0;r[10]=-2/y;r[11]=0;r[12]=-(a+b)/w;r[13]=-(f+e)/x;r[14]=-(n+h)/y;r[15]=1;return r}},eb=nb(768),Nb=nb.n(eb);class Ob{constructor(){this.ba=this.value=0;this.Yi=-1;this.unit="px"}nk(a,b,e){let f=0;a.hasOwnProperty("value")&&(f=a.value,a.hasOwnProperty("unit")||(a.unit="px"),"px"==a.unit||"%"==
a.unit)&&(this.unit!=a.unit&&(this.value="%"==a.unit?this.value/e*100:this.value*e/100),this.unit=a.unit);b&&b.hasOwnProperty("duration")&&0<b.duration||(this.value=f);this.Yi=f}hh(a,b=-1){-1==b&&(b=this.value);this.ba="%"==this.unit?.01*b*a:b}sj(a,b){-1!=this.Yi&&(this.Yi==this.value?this.hh(b):(this.hh(b,this.value+(this.Yi-this.value)*a),1<=a&&(this.value=this.Yi)))}}class Gb{constructor(){this.fov=this.u=this.pan=0}}class fd{constructor(){this.uo=-1E7;this.Qp=!1}}const Sb={Jw:a=>a,zw:a=>a*a,Dw:a=>
a*(2-a),ww:a=>.5>a?2*a*a:-1+(4-2*a)*a,vw:a=>a*a*a,Cw:a=>--a*a*a+1,Fo:a=>.5>a?4*a*a*a:(a-1)*(2*a-2)*(2*a-2)+1,Aw:a=>a*a*a*a,Ew:a=>1- --a*a*a*a,xw:a=>.5>a?8*a*a*a*a:1-8*--a*a*a*a,Bw:a=>a*a*a*a*a,Fw:a=>1+--a*a*a*a*a,yw:a=>.5>a?16*a*a*a*a*a:1+16*--a*a*a*a*a};class wb{$l(){return""}Rs(){return this.Wc}Yu(a){0<a&&(this.Wc=a)}Ef(){return eb&&eb.Matrix4}qh(a){if(""!=a)try{let b;b="object"===typeof a?a:JSON.parse(a);if("object"===typeof b)for(const e in b)if("translations"==e&&this.Ra.hasOwnProperty("translations")){let f=
b[e];for(const h in f)if(this.Ra.translations.hasOwnProperty(h))for(a=0;a<f[h].length-1;a++)""!=f[h][a]&&(this.Ra.translations[h][a]=f[h][a]);else this.Ra.translations[h]=f[h]}else this.Ra[e]=b[e];this.Ra.hasOwnProperty("projectLanguage")&&(this.ui=this.Ra.projectLanguage);this.G("languagechanged",{language:this.Bh})}catch(b){console.error(b)}}Ja(a,b){let e=a;if(""!=e&&"object"===typeof this.Ra&&this.Ra.hasOwnProperty("languages")&&this.Ra.hasOwnProperty("translations")){var f=this.Ra.languages.indexOf(this.Bh);
-1!=f&&this.Ra.translations.hasOwnProperty(a)&&(a=this.Ra.translations[a],Array.isArray(a)&&a.length>f&&""!=a[f]&&(e=a[f]))}if(b&&0<b.length)for(f=b.length-1;0<=f;f--)e=e.replace(new RegExp("%"+String(f+1),"g"),b[f]);return e}en(a){this.rm=!0;a=a.replace("_","-");if("object"===typeof this.Ra&&this.Ra.hasOwnProperty("languages")&&this.Ra.hasOwnProperty("translations")&&this.ui!=a){let b=-1,e=-1,f="",h=-1,n=-1,r=a.substring(0,2).toUpperCase();for(let w=0;w<this.Ra.languages.length;w++)if(this.Ra.languages[w].toUpperCase()==
a.toUpperCase()){b=w;break}else if(!this.ui.toUpperCase().startsWith(r)&&this.Ra.languages[w].toUpperCase().startsWith(r)){if(""==f||-1!=f.indexOf("-"))e=w,f=this.Ra.languages[w]}else{let x=window.navigator.languages;for(let y=0;y<x.length;y++)!this.ui.toUpperCase().startsWith(r)&&this.Ra.languages[w].toUpperCase().startsWith(x[y].substring(0,2).toUpperCase())&&(-1==n||y<n)&&(h=w,n=y)}a=-1!=b?b:-1!=e?e:h;a=-1!=a?this.Ra.languages[a]:this.ui}this.Bh!=a&&(this.Bh=a,this.T.setAttribute("lang",a),this.G("languagechanged",
{language:a}))}dt(){return this.Bh}wt(){return this.Km}addListener(a,b){(this.Gh[a]=this.Gh[a]||[]).push(b)}G(a,b){if(a=this.Gh[a]){let e=a.length;for(let f=0;f<e;f++)try{a[f].apply(null,[b])}catch(h){this.Yb(h)}}}removeEventListener(a,b){let e=this.Gh[a];if(e){var f;var h=0;for(f=e.length;h<f;h++)if(e[h]===b){1===f?delete this.Gh[a]:e.splice(h,1);break}}}Su(){this.Ha=!0}ks(a,b,e,f){if(!this.xb.hasOwnProperty(a)){let h=new fd;this.xb[a]=h;h.type=b;"undefined"!==typeof e&&this.Ye(a,e);"object"===typeof f&&
this.gr(a,f);return!0}return!1}static ap(a){let 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}static wv(a,b){0==a.type?a.value="string"===typeof b?b:b.toString():1==a.type?a.value="string"===typeof b?parseFloat(b):"number"===typeof b?b:b?1:0:2==a.type&&(a.value="string"===typeof b?"false"!==b&&""!==b&&"0"!==b:"number"===typeof b?0!=b:!!b)}gr(a,b){if(this.xb.hasOwnProperty(a)&&
"object"===typeof b){let f=this.xb[a];b.hasOwnProperty("cookiePath")&&(f.vo=String(b.cookiePath));b.hasOwnProperty("cookieExpireDays")&&(f.uo=parseFloat(b.cookieExpireDays));if(b.hasOwnProperty("keep")&&(f.qm=!!b.keep,f.qm&&0<document.cookie.length))if(""!=this.Zg){if(-1!=document.cookie.indexOf(this.Zg+"=")){var e=JSON.parse(wb.ap(this.Zg));e.hasOwnProperty(a)&&this.Ye(a,e[a])}}else e="ggvar_"+a,-1!=document.cookie.indexOf(e+"=")&&(e=wb.ap(e),this.Ye(a,e));b.hasOwnProperty("ignoreInState")&&(f.Qp=
b.ignoreInState);b.hasOwnProperty("customProperty")&&"object"===typeof b.customProperty&&(b=b.customProperty,this.Ga.hasOwnProperty(a)?(this.Ga[a].variabletype!=b.variableType||this.Ga[a].propertytype!=b.propertyType)&&console.log("Custom property added as variable has different types than custom property from project."):this.Ga[a]={Rd:b.variableType,wi:b.propertyType,Gl:b.defaultValue});return!0}return!1}pv(a,b){this.Zg=a;b&&"object"===typeof b&&(b.hasOwnProperty("cookiePath")&&(this.Er=String(b.cookiePath)),
b.hasOwnProperty("cookieExpireDays")&&(this.Dr=parseFloat(b.cookieExpireDays)))}static co(a,b,e){-1<=b&&(a+="; max-age="+86400*b);""!=e&&(a+="; path="+e);return a}static cp(a,b){switch(b){case 0:return a;case 1:return a.toString();case 2:return a?"true":"false"}}static Rl(a,b){switch(b){case 0:return a;case 1:return Number(a);case 2:return"true"==a}}Cp(a,b){""==a&&(a="node1");return this.bg.hasOwnProperty(a)&&this.bg[a].hasOwnProperty(b)?this.Ej(wb.Rl(this.bg[a][b],this.Ga[b].Rd),this.Ga[b].Rd):null}dr(a,
b,e){e="string"===typeof e?e:wb.cp(e,this.Ga[b].Rd);this.bg[a][b]!=e&&(this.bg[a][b]=e,this.G("varchanged_"+b,{}))}yf(a,b,e){""==a&&(a="node1");return this.pb.hasOwnProperty(a)&&this.pb[a].hasOwnProperty(b)&&this.pb[a][b].hasOwnProperty(e)?this.Ej(wb.Rl(this.pb[a][b][e],this.Ga[e].Rd),this.Ga[e].Rd):this.Ga.hasOwnProperty(e)?this.Ej(wb.Rl(this.Ga[e].Gl,this.Ga[e].Rd),this.Ga[e].Rd):null}Ci(a,b,e,f){""==a&&(a="node1");f="string"===typeof f?f:wb.cp(f,this.Ga[e].Rd);this.pb.hasOwnProperty(a)||(this.pb[a]=
{});this.pb[a].hasOwnProperty(b)||(this.pb[a][b]={});this.pb[a][b].hasOwnProperty(e)&&this.pb[a][b][e]==f||(this.pb[a][b][e]=f,this.G("varchanged_"+e,{}))}Us(a){return this.Ga.hasOwnProperty(a)?this.Ga[a].Gl:null}pd(){return"object"}Ye(a,b,e=!0){if(void 0===b)return!1;let f=!1;this.Ga.hasOwnProperty(a)&&(0==this.Ga[a].wi?(this.dr(this.pd(),a,b),f=!0):1==this.Ga[a].wi&&this.O&&(this.Ci(this.pd(),this.O.id,a,b),f=!0));if(this.xb.hasOwnProperty(a)){var h=this.xb[a];if(h.value!=b){wb.wv(h,b);if(h.qm&&
e){if(""!=this.Zg){h={};e=Object.keys(this.xb);for(n of e)this.xb[n].qm&&(h[n]=encodeURIComponent(this.xb[n].value.toString()));var n=this.Zg+"="+JSON.stringify(h);n=wb.co(n,this.Dr,this.Er)}else n="ggvar_"+a+"="+encodeURIComponent(b.toString()),n=wb.co(n,h.uo,h.vo?h.vo:"");document.cookie=n}f||this.G("varchanged_"+a,{value:b})}return!0}return!1}Ej(a,b){return 0==b?this.Ja(a):a}Zl(a,b=""){if(this.Ga.hasOwnProperty(a)){if(0==this.Ga[a].wi)return this.Cp(this.pd(),a);if(1==this.Ga[a].wi){if(""!=b||
this.O&&this.O!=this.Wa)return this.yf(this.pd(),""!=b?b:this.O.id,a);switch(this.Ga[a].Rd){case 0:return"";case 1:return 0;case 2:return!1}}}if(this.xb.hasOwnProperty(a))return this.Ej(this.xb[a].value,this.xb[a].type)}Qh(a,b){return this.xb.hasOwnProperty(a)?this.xb[a].value:b}static Ch(a){let b="";let e,f,h,n=0;a=a.replace(/[^A-Za-z0-9+\/=]/g,"");do{var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(n++));var w="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(n++));
f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(n++));h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(n++));r=r<<2|w>>4;w=(w&15)<<4|f>>2;e=(f&3)<<6|h;b+=String.fromCharCode(r);64!=f&&(b+=String.fromCharCode(w));64!=h&&(b+=String.fromCharCode(e))}while(n<a.length);return b}static Mv(a){const b=[1,1,1,1,2,2,3,0],e=a.length;let f="";for(let h=0;h<e;){let n=a.charCodeAt(h++);if(n&128){let r=b[n>>3&7];if(!(n&64&&r)||h+r>e)return null;
for(n&=63>>r;0<r;--r){let w=a.charCodeAt(h++);if(128!=(w&192))return null;n=n<<6|w&63}}f+=String.fromCharCode(n)}return f}static Bo(a){return wb.Mv(wb.Ch(a))}constructor(){this.Qn="aHR0cHM6Ly9nZ25vbWUuY29t";this.Rn="Q3JlYXRlZCBieSBHbm9tZXM=";this.du="VHJpYWwgTGljZW5zZTogRm9yIGV2YWx1YXRpb24gb25seSE=";this.kh=!0;this.H={width:10,height:10};this.crossOrigin="anonymous";this.Wc=1;this.Ra={};this.ui=this.Bh="";this.Km=[];this.rm=!1;this.Ce=this.$d=!0;this.Vj=0;this.control=this.xa=this.T=this.ia=null;this.ld=[];this.Ha=this.nc=!1;this.ze=1;this.aa=
null;this.fe=!1;this.oi=0;this.Lf={pan:-1,u:-1,fov:-1};this.ka=null;this.ag={};this.df={};this.bg={};this.pb={};this.Ga={};this.P={mode:1,count:0,sm:-1,Fa:0,jb:0,zd:.05,hc:255,fc:1,ec:255,dc:.3,Ie:!0,Ik:{enabled:!0,width:180,height:20,Jk:0,Hk:1,background:!0,ec:16777215,dc:1,hc:0,fc:1,jl:3,ij:1,dj:!0},Bc:[],Tc:[],ud:[],Ak:[]};this.ge=null;this.L=[];this.Wa={};this.xg=this.xc=!1;this.Li=-1;this.ea=1;this.container=null;this.Gh={};this.xb={};this.Er=this.Zg="";this.Dr=-1;this.margin={left:new Ob,top:new Ob,
right:new Ob,bottom:new Ob,transition:{}};this.ck=[];this.ca={x:0,y:0};this.jm=!1;this.ue="";this.Is="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA5JREFUeNpiYBgeACDAAADIAAE3iTbkAAAAAElFTkSuQmCC";this.Tb="";this.qk=this.Nj=this.Xh=this.Vp=this.Uh=this.Wp=this.Tj=this.Qj=this.Lc=this.Sj=this.om=this.Oj=this.rk=this.Mb=this.Vh=this.Ag=this.mm=this.Xp=this.nm=this.Zp=!1;this.Ke=[];this.devicePixelRatio=1;this.ym=!1;this.ak="<<LOG>>";
this.In=!1;this.kt=function(a){return a?this.Wh()&&(a.clientX||a.clientY)?{x:a.clientX,y:a.clientY}:a.pageX||a.pageY?{x:a.pageX,y:a.pageY}:a.clientX||a.clientY?{x:a.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,y:a.clientY+document.body.scrollTop+document.documentElement.scrollTop}:a.touches&&a.touches[0]?{x:a.touches[0].pageX,y:a.touches[0].pageY}:{x:0,y:0}:{x:0,y:0}};this.zf=function(a){a=this.kt(a);let b=this.Bf();return{x:a.x-b.x,y:a.y-b.y}};this.Fv=function(a,b,e){let f=
this;var h="<<L>>"+String(f.Tb);h=h.toUpperCase();"U"!=h.charAt(2)&&(f.K.Hj=!1);if(f.Cd)f.T.removeChild(f.Cd),f.Cd=null;else{f.Cd=document.createElement("div");var n=f.Cd;h="left: "+a+"px;top:\t "+(b+"px;z-index: 32000;");h+="position:relative;";h+="display: table;";h+="color: black;";h+="background-color: white;";h+="border: 1px solid lightgray;";h+="box-shadow: 1px 1px 3px #333;";h+="font-family: Verdana, Arial, Helvetica, sans-serif;";h+="font-size: 9pt;";h+="opacity : 0.95;";n.setAttribute("style",
h);n.setAttribute("class","gg_contextmenu");h=document.createElement("style");a=document.createTextNode(".gg_context_row:hover { background-color: #3399FF }");h.type="text/css";h.styleSheet?h.styleSheet.cssText=a.nodeValue:h.appendChild(a);n.appendChild(h);for(a=0;a<f.ck.length;a++){b=f.ck[a];if(""==b.text)continue;let r=document.createElement("div");h="text-align: left;";h+="margin: 0;";h+="padding: 5px 20px;";h+="vertical-align: left;";r.setAttribute("style",h);r.setAttribute("class","gg_context_row");
""!=b.url?(h=document.createElement("a"),h.href=b.url,h.target="_blank",h.innerHTML=this.Ja(b.text),h.setAttribute("style","color: black; text-decoration: none;"),r.appendChild(h)):(h=document.createElement("span"),h.innerHTML=this.Ja(b.text),h.setAttribute("style","color: black; text-decoration: none;"),r.appendChild(h));n.appendChild(r)}0<f.ck.length&&(0<e.length||!f.K.Hj)&&n.appendChild(document.createElement("hr"));for(h=0;h<e.length;h++)a=e[h],a.hasOwnProperty("hr")?n.appendChild(document.createElement("hr")):
(b=document.createElement("div"),b.setAttribute("class","gg_context_row"),a.hasOwnProperty("style")&&b.setAttribute("style",a.style),a.hasOwnProperty("onclick")&&(b.onclick=a.onclick),b.innerHTML=a.innerHTML,n.appendChild(b));f.K.Hj||(e=document.createElement("div"),h="text-align: left;margin: 0;padding: 5px 20px;",h+="vertical-align: left;",e.setAttribute("style",h),e.setAttribute("class","gg_context_row"),h=document.createElement("a"),h.href=wb.Ch(f.Qn),h.target="_blank",h.innerHTML=wb.Ch(f.Rn),
7<this.ak.length&&(h.innerHTML+="<br/>"+wb.Bo(f.ak).replace(/./gm,function(r){return"&#"+r.charCodeAt(0)+";"})),h.setAttribute("style","color: black; text-decoration: none;"),e.appendChild(h),n.appendChild(e));f.T.insertBefore(f.Cd,f.T.firstChild);n.onclick=function(){f.Cd&&(f.T.removeChild(f.Cd),f.Cd=null)};n.oncontextmenu=n.onclick}};this.mn=0;this.xi="";this.wc=!1;this.Do();this.checkLoaded=this.ld;this.isLoaded=!1}Do(){this.devicePixelRatio=window.devicePixelRatio||1;this.Zp=!!navigator.userAgent.match(/(Windows|Win)/g);
this.nm=!!navigator.userAgent.match(/(Mac|Macintosh|Mac_powerpc)/g)&&!navigator.userAgent.match(/(like Mac)/g);this.Xp=!!navigator.userAgent.match(/(Linux|Ubuntu)/g);this.mm=!!navigator.userAgent.match(/(MSIE)/g);this.Ag=!!navigator.userAgent.match(/(Edge|EdgA|Edg)/g);this.Vh=!!navigator.userAgent.match(/(Firefox)/g);if(this.Mb=!!navigator.userAgent.match(/(Safari)/g)){var a=navigator.userAgent.indexOf("Safari");this.Ob=navigator.userAgent.substring(a+7);a=navigator.userAgent.indexOf("Version");-1!=
a&&(this.Ob=navigator.userAgent.substring(a+8));this.Ob=this.Ob.substring(0,this.Ob.indexOf(" "));this.Ob=this.Ob.substring(0,this.Ob.indexOf("."));this.rk=!0}if(this.Oj=!!navigator.userAgent.match(/(Chrome|CriOS)/g))this.Mb=!1;this.om=!!navigator.userAgent.match(/(SamsungBrowser)/g);if(this.Sj=!!navigator.userAgent.match(/(OculusBrowser)/g))this.Mb=this.Oj=this.om=!1;this.Lc=!!navigator.userAgent.match(/(iPad|iPhone|iPod)/g);this.Tj=(this.Qj=!!navigator.userAgent.match(/(iPad)/g)||this.nm&&2<navigator.maxTouchPoints)&&
void 0!==navigator.xr&&void 0!==navigator.xr.requestSession;this.Wp=!!navigator.userAgent.match(/(iPhone|iPod)/g);this.Uh=!!navigator.userAgent.match(/(android)/i);this.Vp=!!navigator.userAgent.match(/(IEMobile)/i);this.Xh=this.Lc||this.Uh||this.Vp||this.Qj;/iP(hone|od|ad)/.test(navigator.platform)&&(a=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/),this.Ke=[parseInt(a[1],10),parseInt(a[2],10),parseInt(a[3]||"0",10)]);this.Nj=!window.requestAnimationFrame;this.Tb="";a=["Webkit","Moz","O","ms",
"Ms"];for(let b=0;b<a.length;b++)"undefined"!==typeof document.documentElement.style[a[b]+"Transform"]&&(this.Tb="-"+a[b].toLowerCase()+"-")}Av(){try{window.AudioContext=window.AudioContext||window.webkitAudioContext,this.ga=new AudioContext}catch(a){this.ga=null}this.Mb&&(!this.rk||9>Number(this.Ob))&&(this.ga=null);this.Mb&&!this.Lc&&12<=Number(this.Ob)&&13>Number(this.Ob)&&(this.ga=null);this.Mb&&this.Lc&&13==Number(this.Ke[0])&&(1==Number(this.Ke[1])||2<=Number(this.Ke[1]))&&(this.ga=null)}Yb(a){let b=
document.getElementById("gg_debug");b&&(b.innerHTML=a+"<br />");window.console&&window.console.log(a)}setCrossOrigin(a){this.crossOrigin=a}$u(a){this.Je=a}tt(){return this.oi}Zu(a){this.ue=a}$o(){return this.ue}Vl(){return this.Xh}fp(){return this.jm}cv(a){this.Xh=!!a}Nh(){return this.isLoaded}ip(){return!this.isLoaded}Ji(a,b){try{this.nc&&(a=window.innerWidth,b=window.innerHeight);let h=a-this.margin.left.ba-this.margin.right.ba,n=b-this.margin.top.ba-this.margin.bottom.ba;if(!(10>h||10>n)){this.ia.style.width=
h+"px";this.ia.style.height=n+"px";this.ia.style.left=this.margin.left.ba+"px";this.ia.style.top=this.margin.top.ba+"px";this.xa&&(this.xa.style.width=a+"px",this.xa.style.height=b+"px",this.aa&&this.aa!=this.xa&&(this.aa.style.width=a+"px",this.aa.style.height=b+"px"));this.fe&&(this.Ha=!0);var e=this.ia.offsetWidth,f=this.ia.offsetHeight;if(this.H.width!=e||this.H.height!=f)this.H.width=e,this.H.height=f;this.aa&&this.aa.ggUpdateSize&&this.aa.ggUpdateSize(a,b);this.G("sizechanged",{w:a,h:b});this.G("playerstatechanged",
{})}}catch(h){}}Qd(){this.In=!0}xd(){this.Rr();this.Ji(this.container.offsetWidth,this.container.offsetHeight)}Rr(){this.margin.left.hh(this.container.offsetWidth);this.margin.top.hh(this.container.offsetHeight);this.margin.right.hh(this.container.offsetWidth);this.margin.bottom.hh(this.container.offsetHeight)}Jt(a=!1){let b={width:0,height:0};b.width=this.H.width+(a?this.margin.left.ba+this.margin.right.ba:0);b.height=this.H.height+(a?this.margin.top.ba+this.margin.bottom.ba:0);return b}Bf(){let a=
{x:0,y:0},b=this.ia.getBoundingClientRect();a.x=b.left;a.y=b.top;this.Mb&&14>Number(this.Ob)&&(a.x=b.left+window.scrollX,a.y=b.top+window.scrollY);return a}ov(a){this.ka=a}dv(a,b,e,f){let h=!0;"object"===typeof a?(a.hasOwnProperty("left")&&this.margin.left.nk(a.left,a.transition,this.container.offsetWidth),a.hasOwnProperty("top")&&this.margin.top.nk(a.top,a.transition,this.container.offsetHeight),a.hasOwnProperty("right")&&this.margin.right.nk(a.right,a.transition,this.container.offsetWidth),a.hasOwnProperty("bottom")&&
this.margin.bottom.nk(a.bottom,a.transition,this.container.offsetHeight),a.hasOwnProperty("transition")&&a.transition.hasOwnProperty("duration")&&0<a.transition.duration&&(h=!1,this.margin.transition.duration=a.transition.duration,a.transition.hasOwnProperty("timingfunction")?this.margin.transition.timingfunction=a.transition.timingfunction:this.margin.transition.timingfunction="ease")):(this.margin.left.value=a,this.margin.top.value=b,this.margin.right.value=e,this.margin.bottom.value=f);this.ka=
this.skinObj;h?this.Qd():(b=0,a.transition.hasOwnProperty("delay")&&(b=a.transition.delay),setTimeout(()=>{this.Wv(this)},b))}Wv(a){a.margin.transition.starttime=(new Date).getTime();a.margin.transition.interval&&clearInterval(a.margin.transition.interval);a.margin.transition.interval=setInterval(()=>{a.Xv(a)},20)}Xv(a){var b=((new Date).getTime()-a.margin.transition.starttime)/a.margin.transition.duration;b=Math.max(b,0);b=Math.min(b,1);switch(a.margin.transition.timingfunction){case "ease-in":b=
1-Math.cos(b*Math.PI/2);break;case "ease-out":b=Math.sin(b*Math.PI/2);break;case "ease":b=-(Math.cos(Math.PI*b)-1)/2;break;case "ease-in-out":b=.5>b?4*b*b*b:1-Math.pow(-2*b+2,3)/2;break;case "step-end":b=1==b?1:0}b=Math.round(100*b)/100;a.margin.left.sj(b,a.container.offsetWidth);a.margin.top.sj(b,a.container.offsetHeight);a.margin.right.sj(b,a.container.offsetWidth);a.margin.bottom.sj(b,a.container.offsetHeight);a.Ji(a.container.offsetWidth,a.container.offsetHeight);1<=b&&(clearInterval(a.margin.transition.interval),
a.margin.transition.interval=0)}no(a){0==a&&(this.K.lc=!1);1==a&&(this.K.lc=!0);2==a&&(this.K.lc=!this.K.lc);this.G("viewmodechanged",{});this.G("playerstatechanged",{})}Ep(){return 1==this.K.lc?1:0}gi(){this.Ha=!0}mo(a,b){this.P.mode=1==b&&0<this.P.mode?0:Math.round(a);this.gi();this.G("polymodechanged",{})}Sr(a){let b=this.Bf();this.Wh()?(this.ca.x=a.clientX-this.margin.left.ba,this.ca.y=a.clientY-this.margin.top.ba):(this.ca.x=a.clientX-b.x,this.ca.y=a.clientY-b.y)}Tr(a){a=a.touches;let b=this.Bf();
this.ca.x=a[0].clientX-b.x;this.ca.y=a[0].clientY-b.y}Hh(a){let b=[];a="*"==a?"^.*$":"#"==a.substring(0,1)?a.substring(1):"^"+a+"$";a=new RegExp(a,"");for(var e=0;e<this.L.length;e++)"poly"==this.L[e].type&&a.test(this.L[e].id)&&b.push(this.L[e]);return b}lr(a){a=this.Hh(a);for(let b=0;b<a.length;b++){let e=this.P.Bc.indexOf(a[b].id);-1==e?(this.P.Bc.push(a[b].id),this.P.Tc.push(0),this.P.ud.push(1)):this.P.ud[e]=1}this.gi()}Np(a){a=this.Hh(a);for(let b=0;b<a.length;b++){let e=this.P.Bc.indexOf(a[b].id);
-1!=e&&(this.P.ud[e]=0,this.P.Ak.push(a[b].id),this.update())}this.gi()}Rv(a){a=this.Hh(a);for(let b=0;b<a.length;b++){let e=this.P.Bc.indexOf(a[b].id);-1==e||-1!=e&&0==this.P.ud[e]?this.lr(a[b].id):this.Np(a[b].id)}this.gi()}ws(a,b,e,f,h){let n;n=""==a?this.L:this.Hh(a);for(let r=0;r<n.length;r++){let w=n[r];"poly"==w.type&&(w.ec=b,w.dc=e,w.hc=f,w.fc=h)}""==a&&(this.P.ec=b,this.P.dc=e,this.P.hc=f,this.P.fc=h);this.gi()}gv(a,b){let e;e=""==a?this.L:this.Hh(a);for(let f=0;f<e.length;f++){let h=e[f];
"poly"==h.type&&(h.Ie=b)}""==a&&(this.P.Ie=b);this.update()}vp(){return this.P.mode}oo(){this.G("viewstatechanged",{})}Fp(){return 0}Lq(a,b,e){var f=(new RegExp("%0*"+b,"i")).exec(a.toString());if(f){f=f.toString();let h=e.toString();f.charAt(f.length-1)!=b&&(h=(1+e).toString());if(!isNaN(parseFloat(e)))for(;h.length<f.length-1;)h="0"+h;a=a.replace(f,h)}return a}Ok(){this.G("hotspotsupdated",{})}bp(){let a=[];for(let b=0;b<this.L.length;b++){let e=this.L[b];"point"==e.type&&e.obj&&e.obj.__div&&a.push(e.obj.__div)}return a}Gb(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+")"}static Op(a,b,e){let f;var h;let n=!1;f=0;for(h=a.length-1;f<a.length;h=f++){let r=a[f];h=a[h];r.ac>e!=h.ac>e&&b<(h.zc-r.zc)*(e-r.ac)/(h.ac-r.ac)+r.zc&&(n=!n)}return n}aspect(){return this.H.width/this.H.height}Yd(){}update(a=0){this.Ha=!0;a&&(this.ze=Math.max(1*a,this.ze))}Wl(){return!1}hv(a){this.xi=a}getQueryParameter(){return this.xi}La(a){if(a){if("{"==a.charAt(0)||"/"==a.charAt(0)||
0<a.indexOf(":"))return a;""!=this.xi&&(a=-1==a.indexOf("?")?a+("?"+this.xi):a+("&"+this.xi));return this.ue+a}return this.ue}ce(){return 0}sp(){return 0}Md(){}vh(){}Af(){return 0}Dp(){return 0}Nd(){}wh(){}Fd(){return 0}Jb(){return!1}uk(){}uh(){return!1}ko(){}tk(){}setLocked(a){this.Zq(a);this.$q(a);this.Yq(a)}Zq(a){this.K.pc=!!a}Yq(a){this.K.di=!!a}gt(){return this.K.di}$q(a){this.K.Oe=!!a}Gp(){return this.K.re}ir(a){this.K.re=a}vk(a){this.wc=!!a}st(){return this.Uh?5:this.Tj?7:this.Qj?6:this.Lc?
4:this.Zp?1:this.nm?2:this.Xp?3:0}Ss(){return this.mm?5:this.Ag?4:this.Vh?2:this.Mb?3:this.Oj?1:this.Sj?6:0}Ts(){return window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?1:0}moveTo(){this.ra(!1)}ki(){this.ra(!1)}lq(){}mq(){}Un(){}Pr(a,b,e){for(let f=0;f<this.L.length;f++){let h=this.L[f];h.id==a&&(h.pan=b,h.tilt=e,h.wf())}this.Ha=!0}Jq(a){let b=-1,e;for(let f=0;f<this.L.length;f++)e=this.L[f],e.id==a&&(b=f);-1<b&&(e=this.L.splice(b,1).pop(),e.j&&e.j.__div&&this.xa.removeChild(e.j.__div))}vt(){let a=
[];for(let b=0;b<this.L.length;b++){let e=this.L[b];"point"==e.type&&a.push(String(e.id))}return a}gp(){}fh(a,b,e){const f=this.P.Ik,h=this.ge;f.enabled&&(this.O!=this.Wa&&0<=a&&0<=b&&""!=this.O.title?(h.innerHTML=this.Ja(this.O.title),h.style.color=this.Gb(f.Jk,f.Hk),h.style.backgroundColor=f.background?this.Gb(f.ec,f.dc):"transparent",h.style.border="solid "+this.Gb(f.hc,f.fc)+" "+f.ij+"px",h.style.borderRadius=f.jl+"px",h.style.textAlign="center",0<f.width?(h.style.left=a-f.width/2+this.margin.left.ba+
"px",h.style.width=f.width+"px"):(h.style.width="auto",h.style.left=a-h.offsetWidth/2+this.margin.left.ba+"px"),h.style.height=0<f.height?f.height+"px":"auto",h.style.top=b+(e?-60:25)+this.margin.top.ba+"px",h.style.visibility="inherit",h.style.whiteSpace=f.dj?"pre-wrap":"nowrap",h.style.overflow="hidden"):(h.style.visibility="hidden",h.innerHTML=""))}Kr(a){this.ka&&this.ka.hotspotProxyClick&&this.ka.hotspotProxyClick(a.id,a.url);this.G("hsproxyclick",{id:this.O.id,url:this.O.url});""!=a.url&&this.hk(a.url,
a.target);this.fh(-1,-1,!1)}Lr(a){this.ka&&this.ka.hotspotProxyDoubleClick&&this.ka.hotspotProxyDoubleClick(a.id,a.url);this.G("hsproxydblclick",{id:this.O.id,url:this.O.url})}ra(){this.If=(new Date).getTime()}et(){return this.If}Wh(){return document.webkitIsFullScreen||document.mozFullScreen||document.msFullscreenElement&&null!=document.msFullscreenElement||document.fullScreen}pm(){}Xk(){let 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]}np(){return null}mp(){return null}isPlaying(){return!1}Ld(){}Gm(){}Dq(){}Hg(){}Sn(){}Qi(){}rr(){return 0}tr(){}sr(){}setVolume(){}po(){}yk(){}nu(a){this.yk(a,1)}Zv(a){this.yk(a,0)}Qv(a){this.yk(a,-1)}ut(){return this.xc}Ys(){return this.xg}Vt(){this.eo=document.createElement("audio");this.eo.src="./media/testsound.mp3"}vr(){let a=this;this.ga&&"suspended"===
this.ga.state&&this.ga.resume();let b=a.eo.play();void 0!==b&&b.then(()=>{a.Sg(!0)}).catch(()=>{a.Sg(!1)})}wr(){this.xg&&1!=this.Li?this.vr():this.$d=this.Ce=!1}yt(){return this.Li}Sg(a){if(1!=this.Li){let b=a?1:0;this.Li!=b&&(this.Li=b,this.G("soundspermittedchanged",{permitted:a}))}}yr(){}xk(){}pn(){}Vm(){}Ul(){return!0}Tg(){}Bi(a){let b=this.nc!==a;this.nc!==a&&(this.nc=a,this.update(100));if(this.nc){if(this.kh)try{this.T.webkitRequestFullScreen?this.T.webkitRequestFullScreen():this.T.mozRequestFullScreen?
this.T.mozRequestFullScreen():this.T.msRequestFullscreen?this.T.msRequestFullscreen():this.T.requestFullScreen?this.T.requestFullScreen():this.T.requestFullscreen&&this.T.requestFullscreen()}catch(e){}this.T.style.position="absolute";a=this.Bf();this.T.style.left=window.pageXOffset-a.x+this.margin.left.ba+"px";this.T.style.top=window.pageYOffset-a.y+this.margin.top.ba+"px";this.Tg(10);document.body.style.overflow="hidden";b&&(this.aa&&this.aa.ggEnterFullscreen&&this.aa.ggEnterFullscreen(),this.G("fullscreenenter",
{}),this.G("playerstatechanged",{}))}else{if(this.kh)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.T.style.position="relative";this.T.style.left="0px";this.T.style.top="0px";this.Tg(0);document.body.style.overflow="";b&&(this.aa&&
this.aa.ggExitFullscreen&&this.aa.ggExitFullscreen(),this.G("fullscreenexit",{}),this.G("playerstatechanged",{}))}this.Qd()}Lk(){this.Bi(!this.nc)}Js(){this.Bi(!0)}exitFullscreen(){this.Bi(!1)}bt(){return this.nc}mi(){this.nc&&(this.Wh()||this.exitFullscreen(),this.Wh()&&(this.T.style.left="0px",this.T.style.top="0px"))}Le(){return!1}yg(){return!1}fr(){return!1}Dj(){return!1}zr(){}Cr(){}Hr(){}Bq(){this.ra(!1)}Oq(){}Tq(){}Vq(){}yl(){}Ap(){let a=1,b=-1!=navigator.userAgent.indexOf("Mac");window.devicePixelRatio&&
b&&(a=window.devicePixelRatio);return{w:screen.width*a,h:screen.height*a}}lp(){let a=this.Ap();return a.w>a.h?a.w:a.h}Ho(a){try{let b=a.getAttributeNode("variablename"),e=b.nodeValue.toString();b=a.getAttributeNode("variabletype");let f=Number(b.nodeValue);b=a.getAttributeNode("propertytype");let h=Number(b.nodeValue);b=a.getAttributeNode("defaultvalue");let n;b&&(n=b.nodeValue.toString());this.Ga[e]={Rd:f,wi:h,Gl:n}}catch(b){console.error(b)}}Ko(a){let b={},e=a.firstChild;for(;e;){if("custompropertyvalue"==
e.nodeName){a=e.getAttributeNode("value");let f=a.nodeValue.toString();a=e.getAttributeNode("variablename");b[a.nodeValue.toString()]=f}e=e.nextSibling}return b}Jl(a,b){let e,f="";(e=b.getAttributeNode("id"))&&(f=e.nodeValue.toString());if(!this.pb.hasOwnProperty(a)||!this.pb[a].hasOwnProperty(f)){var h={};for(b=b.firstChild;b;){if("custompropertyvalue"==b.nodeName){e=b.getAttributeNode("variablename");let n=e.nodeValue;e=b.getAttributeNode("value");h[n]=e.nodeValue}b=b.nextSibling}this.pb[a]||(this.pb[a]=
{});this.pb[a][f]=h}}Om(a,b){a=(new DOMParser).parseFromString(a,"text/xml");this.Pm(a,b)}Gq(a,b,e){try{let f;f=new XMLHttpRequest;f.open("GET",a,!1);f.send(null);if(f.responseXML){let h=a.lastIndexOf("/");0<=h&&(this.ue=a.slice(0,h+1));2<=arguments.length&&null!=b&&(this.ue=b);this.Om(f.responseText,e)}else alert("Error loading panorama XML")}catch(f){alert("Error:"+f)}}Qu(a,b,e,f){let h;h=new XMLHttpRequest;let n=this;const r=arguments;h.onload=function(){if(4<=h.readyState)if(h.responseXML){let w=
a.lastIndexOf("/");0<=w&&(n.ue=a.slice(0,w+1));3<=r.length&&null!=e&&(n.ue=e);n.Om(h.responseText,f);b&&b()}else alert("Error loading panorama XML");else console.error("Wrong state loading XML:"+h.statusText)};h.onerror=function(){console.error("Error loading XML:"+h.statusText)};h.open("GET",a,!0);h.send(null)}Pm(){}hk(a,b){0<a.length&&".xml"!=a.slice(-4)&&".swf"!=a.slice(-4)&&"{"!=a.charAt(0)&&window.open(this.La(a),b)}Eo(){this.ym=!0}tp(){return{}}cr(){return!0}}class gd{constructor(a){this.Wg=
new Gb;this.ng=new Gb;this.Dn=this.Nk=null;this.En=this.offset=0;this.$a=kb.create();this.cl=1;this.o=a;this.enabled=!1;this.rf=1;this.eg=0;this.type="crossdissolve";this.Vc=this.da=this.dd=0;this.$k=20;this.Yk=90;this.Zk=20;this.ph=1;this.oh=!1;this.yn=this.xn=this.rn=0;this.Ri=70;this.fs=0;this.Lb=this.es=1;this.nh=this.mh=.5;this.Vd=this.te=!1;this.Cl=1}Th(){let a=this.o.N,b=a.createShader(a.VERTEX_SHADER);a.shaderSource(b,"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");
a.compileShader(b);a.getShaderParameter(b,a.COMPILE_STATUS)||(alert(a.getShaderInfoLog(b)),b=null);var e=a.createShader(a.FRAGMENT_SHADER);a.shaderSource(e,"#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");
a.compileShader(e);a.getShaderParameter(e,a.COMPILE_STATUS)||(alert(a.getShaderInfoLog(e)),e=null);this.wa=a.createProgram();a.attachShader(this.wa,b);a.attachShader(this.wa,e);a.linkProgram(this.wa);a.getProgramParameter(this.wa,a.LINK_STATUS)||alert("Could not initialise shaders");this.wa.la=a.getAttribLocation(this.wa,"aVertexPosition");a.enableVertexAttribArray(this.wa.la);this.wa.Ea=a.getAttribLocation(this.wa,"aTextureCoord");a.enableVertexAttribArray(this.wa.Ea);e=a.createShader(a.FRAGMENT_SHADER);
a.shaderSource(e,"#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");
a.compileShader(e);a.getShaderParameter(e,a.COMPILE_STATUS)||(alert(a.getShaderInfoLog(e)),e=null);this.ib=a.createProgram();a.attachShader(this.ib,b);a.attachShader(this.ib,e);a.linkProgram(this.ib);a.getProgramParameter(this.ib,a.LINK_STATUS)||alert("Could not initialise shaders");this.ib.la=a.getAttribLocation(this.ib,"aVertexPosition");a.enableVertexAttribArray(this.ib.la);this.ib.Ea=a.getAttribLocation(this.ib,"aTextureCoord");a.enableVertexAttribArray(this.ib.Ea);e=a.createShader(a.FRAGMENT_SHADER);
a.shaderSource(e,"#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");
a.compileShader(e);a.getShaderParameter(e,a.COMPILE_STATUS)||(alert(a.getShaderInfoLog(e)),e=null);this.Ua=a.createProgram();a.attachShader(this.Ua,b);a.attachShader(this.Ua,e);a.linkProgram(this.Ua);a.getProgramParameter(this.Ua,a.LINK_STATUS)||alert("Could not initialise shaders");this.Ua.la=a.getAttribLocation(this.Ua,"aVertexPosition");a.enableVertexAttribArray(this.Ua.la);this.Ua.Ea=a.getAttribLocation(this.Ua,"aTextureCoord");a.enableVertexAttribArray(this.Ua.Ea);e=a.createShader(a.FRAGMENT_SHADER);
a.shaderSource(e,"#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");
a.compileShader(e);a.getShaderParameter(e,a.COMPILE_STATUS)||(alert(a.getShaderInfoLog(e)),e=null);this.eb=a.createProgram();a.attachShader(this.eb,b);a.attachShader(this.eb,e);a.linkProgram(this.eb);a.getProgramParameter(this.eb,a.LINK_STATUS)||alert("Could not initialise shaders");this.eb.la=a.getAttribLocation(this.eb,"aVertexPosition");a.enableVertexAttribArray(this.eb.la);this.eb.Ea=a.getAttribLocation(this.eb,"aTextureCoord");a.enableVertexAttribArray(this.eb.Ea);this.As()}As(){const a=this.o;
let b=a.N;const e=b.createShader(b.VERTEX_SHADER);a.Jc(e,"precision highp float;\n#define M_PI 3.14159265358979323846\nattribute vec4 aVertexPosition;\nvarying vec2 dst;\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 );\nuniform mat4 matProject;\nvarying vec3 srcTexDir;\nvarying vec3 dstTexDir;\nuniform float transitionBlend;\nuniform float alphaBlend;\nuniform vec2 rotOffset;\nvoid main(void) {\nfloat srcPan=(aVertexPosition.x) * 2.0 * M_PI;float srcTilt=-(aVertexPosition.y - 0.5) * M_PI; vec3 srcV = vec3(-sin(srcPan) * cos (srcTilt), sin(srcTilt),-cos(srcPan) * cos(srcTilt));float dstPan=(aVertexPosition.z) * 2.0 * M_PI;float dstTilt=-(aVertexPosition.a - 0.5) * M_PI; vec3 dstV = vec3(-sin(dstPan) * cos (dstTilt), sin(dstTilt),-cos(dstPan) * cos(dstTilt));srcTexDir=srcV;srcTexDir.z=-srcV.z;vec3 tmp=srcV;srcV.x= cos(rotOffset.x)*tmp.x - sin(rotOffset.x)*tmp.z;srcV.y= tmp.y;srcV.z= sin(rotOffset.x)*tmp.x + cos(rotOffset.x)*tmp.z;dstTexDir=dstV;dstTexDir.z=-dstV.z;tmp=dstV;dstV.x= cos(rotOffset.y)*tmp.x - sin(rotOffset.y)*tmp.z;dstV.y= tmp.y;dstV.z= sin(rotOffset.y)*tmp.x + cos(rotOffset.y)*tmp.z; gl_Position = matProject * matRotate * vec4(mix(srcV, dstV, transitionBlend), 1.0) ;\ngl_Position.y=-gl_Position.y;}\n");
const f=b.createShader(b.FRAGMENT_SHADER);a.Jc(f,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nvarying vec3 srcTexDir;\nvarying vec3 dstTexDir;\nuniform float transitionBlend;\nuniform samplerCube cubeTexture;uniform samplerCube cubeTexture2;uniform float alphaBlend;\nuniform vec2 irisRamp;\nuniform vec2 uCanvasDimensions;\nvoid main()\n{\nvec4 c1 = textureCube(cubeTexture, srcTexDir);vec4 c2 = textureCube(cubeTexture2, dstTexDir);vec2 fromCenter=(2.0 * vec2(gl_FragCoord.x / uCanvasDimensions.x,gl_FragCoord.y / uCanvasDimensions.y)) - vec2(1.0,1.0);gl_FragColor=mix(c1,c2,clamp(mix((irisRamp.x + 1.0)*transitionBlend - irisRamp.x,(irisRamp.y + 1.0)*transitionBlend - irisRamp.y,length(fromCenter)),0.0, 1.0));gl_FragColor.a=alphaBlend;}\n");
this.Iq=b.createProgram();a.Mf(this.Iq,e,f)}Hf(){let a=this.o.N;if(!a)return!1;if(this.Pb=a.createFramebuffer()){a.bindFramebuffer(a.FRAMEBUFFER,this.Pb);this.Pb.width=1024;this.Pb.height=1024;this.Xf=a.createTexture();a.bindTexture(a.TEXTURE_2D,this.Xf);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.LINEAR);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,a.LINEAR);a.texImage2D(a.TEXTURE_2D,0,a.RGBA,this.Pb.width,this.Pb.height,0,a.RGBA,a.UNSIGNED_BYTE,null);let b=a.createRenderbuffer();a.bindRenderbuffer(a.RENDERBUFFER,
b);a.renderbufferStorage(a.RENDERBUFFER,a.DEPTH_COMPONENT16,this.Pb.width,this.Pb.height);a.renderbufferStorage(a.RENDERBUFFER,a.STENCIL_INDEX8,this.Pb.width,this.Pb.height);a.framebufferTexture2D(a.FRAMEBUFFER,a.COLOR_ATTACHMENT0,a.TEXTURE_2D,this.Xf,0);a.framebufferRenderbuffer(a.FRAMEBUFFER,a.STENCIL_ATTACHMENT,a.RENDERBUFFER,b);a.bindTexture(a.TEXTURE_2D,null);a.bindRenderbuffer(a.RENDERBUFFER,null);a.bindFramebuffer(a.FRAMEBUFFER,null);this.vb=a.createBuffer();a.bindBuffer(a.ARRAY_BUFFER,this.vb);
a.bufferData(a.ARRAY_BUFFER,new Float32Array([-1,-1,0,1,-1,0,-1,1,0,1,1,0]),a.STATIC_DRAW);this.vb.itemSize=3;this.vb.numberOfItems=4;this.Mg=a.createBuffer();a.bindBuffer(a.ARRAY_BUFFER,this.Mg);a.bufferData(a.ARRAY_BUFFER,new Float32Array([0,0,1,0,0,1,1,1]),a.STATIC_DRAW);return!0}return!1}Dm(a){let b=this.o.N;var e=this.o.Ya;const f=this.o.D;if(this.Pd){b.useProgram(this.wa);b.bindBuffer(b.ARRAY_BUFFER,this.vb);b.vertexAttribPointer(this.wa.la,this.vb.itemSize,b.FLOAT,!1,0,0);b.bindBuffer(b.ARRAY_BUFFER,
this.Mg);b.vertexAttribPointer(this.wa.Ea,2,b.FLOAT,!1,0,0);b.enableVertexAttribArray(this.wa.la);b.enableVertexAttribArray(this.wa.Ea);b.activeTexture(b.TEXTURE0);b.bindTexture(b.TEXTURE_2D,this.Xf);e=1+(this.Lb-1)*a;b.uniform1f(b.getUniformLocation(this.wa,"uAlpha"),1);b.uniform1i(b.getUniformLocation(this.wa,"uZoomIn"),1);var h=b.getUniformLocation(this.wa,"uZoomCenter"),n=.5+(this.mh-.5)*Math.sqrt(a);a=.5+(this.nh-.5)*Math.sqrt(a);0>n-.5/e&&(n=.5/e);0>a-.5/e&&(a=.5/e);1<n+.5/e&&(n=1-.5/e);1<a+
.5/e&&(a=1-.5/e);b.uniform2f(h,n,a);b.uniform1f(b.getUniformLocation(this.wa,"uZoomFactor"),e);b.uniform1i(b.getUniformLocation(this.wa,"uSampler"),0);b.drawArrays(b.TRIANGLE_STRIP,0,this.vb.numberOfItems);b.useProgram(f.Gg.R)}else{this.o.Zi();b.blendFuncSeparate(b.SRC_ALPHA,b.ONE_MINUS_SRC_ALPHA,b.SRC_ALPHA,b.ONE);b.enable(b.BLEND);b.disable(b.DEPTH_TEST);h=.5+(this.mh-.5);n=.5+(this.nh-.5);0>h-.5/this.Lb&&(h=.5/this.Lb);0>n-.5/this.Lb&&(n=.5/this.Lb);1<h+.5/this.Lb&&(h=1-.5/this.Lb);1<n+.5/this.Lb&&
(n=1-.5/this.Lb);b.enableVertexAttribArray(this.wa.la);b.enableVertexAttribArray(this.wa.Ea);if("crossdissolve"==this.type)b.useProgram(this.wa),b.bindBuffer(b.ARRAY_BUFFER,this.vb),b.vertexAttribPointer(this.wa.la,this.vb.itemSize,b.FLOAT,!1,0,0),b.bindBuffer(b.ARRAY_BUFFER,this.Mg),b.vertexAttribPointer(this.wa.Ea,2,b.FLOAT,!1,0,0),b.activeTexture(b.TEXTURE0),b.bindTexture(b.TEXTURE_2D,this.Xf),b.uniform1f(b.getUniformLocation(this.wa,"uAlpha"),1-a),b.uniform1i(b.getUniformLocation(this.wa,"uZoomIn"),
1==this.da||2==this.da||6==this.da||7==this.da?1:0),b.uniform2f(b.getUniformLocation(this.wa,"uZoomCenter"),h,n),b.uniform1f(b.getUniformLocation(this.wa,"uZoomFactor"),this.Lb),b.uniform1i(b.getUniformLocation(this.wa,"uSampler"),0);else if("diptocolor"==this.type)b.useProgram(this.ib),b.bindBuffer(b.ARRAY_BUFFER,this.vb),b.vertexAttribPointer(this.ib.la,this.vb.itemSize,b.FLOAT,!1,0,0),b.bindBuffer(b.ARRAY_BUFFER,this.Mg),b.vertexAttribPointer(this.ib.Ea,2,b.FLOAT,!1,0,0),b.activeTexture(b.TEXTURE0),
b.bindTexture(b.TEXTURE_2D,this.Xf),b.uniform1f(b.getUniformLocation(this.ib,"uColorPercent"),Math.min(2*a,1)),b.uniform1f(b.getUniformLocation(this.ib,"uAlpha"),1-Math.max(2*(a-.5),0)),b.uniform3f(b.getUniformLocation(this.ib,"uDipColor"),(this.eg>>16&255)/255,(this.eg>>8&255)/255,(this.eg&255)/255),b.uniform1i(b.getUniformLocation(this.ib,"uZoomIn"),1==this.da||2==this.da||6==this.da||7==this.da?1:0),b.uniform2f(b.getUniformLocation(this.ib,"uZoomCenter"),h,n),b.uniform1f(b.getUniformLocation(this.ib,
"uZoomFactor"),this.Lb),b.uniform1i(b.getUniformLocation(this.ib,"uSampler"),0);else if("irisround"==this.type||"irisroundcenter"==this.type||"irisrectangular"==this.type||"irisrectangularcenter"==this.type){b.useProgram(this.Ua);b.bindBuffer(b.ARRAY_BUFFER,this.vb);b.vertexAttribPointer(this.Ua.la,this.vb.itemSize,b.FLOAT,!1,0,0);b.bindBuffer(b.ARRAY_BUFFER,this.Mg);b.vertexAttribPointer(this.Ua.Ea,2,b.FLOAT,!1,0,0);b.activeTexture(b.TEXTURE0);b.bindTexture(b.TEXTURE_2D,this.Xf);let x,y;1==this.da||
2==this.da||6==this.da||7==this.da||"irisroundcenter"==this.type||"irisrectangularcenter"==this.type?y=x=.5:(x=this.mh,y=this.nh);var r=x*e.width,w=y*e.height;r=Math.max(r,e.width-r);w=Math.max(w,e.height-w);"irisround"==this.type||"irisroundcenter"==this.type?b.uniform1f(b.getUniformLocation(this.Ua,"uRadius"),(Math.sqrt(r*r+w*w)+this.dd)*a):(r>w?(w=e.height/e.width*r+this.dd,r+=this.dd):(r=e.width/e.height*w+this.dd,w+=this.dd),b.uniform2f(b.getUniformLocation(this.Ua,"uRectDim"),r*a,w*a));b.uniform1f(b.getUniformLocation(this.Ua,
"uSoftEdge"),this.dd);b.uniform1i(b.getUniformLocation(this.Ua,"uRound"),"irisround"==this.type||"irisroundcenter"==this.type?1:0);b.uniform2f(b.getUniformLocation(this.Ua,"uIrisCenter"),x*e.width,y*e.height);b.uniform1i(b.getUniformLocation(this.Ua,"uZoomIn"),1==this.da||2==this.da||6==this.da||7==this.da?1:0);b.uniform2f(b.getUniformLocation(this.Ua,"uZoomCenter"),h,n);b.uniform1f(b.getUniformLocation(this.Ua,"uZoomFactor"),this.Lb);b.uniform1i(b.getUniformLocation(this.Ua,"uSampler"),0)}else if("wipeleftright"==
this.type||"wiperightleft"==this.type||"wipetopbottom"==this.type||"wipebottomtop"==this.type||"wiperandom"==this.type)b.useProgram(this.eb),b.bindBuffer(b.ARRAY_BUFFER,this.vb),b.vertexAttribPointer(this.eb.la,this.vb.itemSize,b.FLOAT,!1,0,0),b.bindBuffer(b.ARRAY_BUFFER,this.Mg),b.vertexAttribPointer(this.eb.Ea,2,b.FLOAT,!1,0,0),b.activeTexture(b.TEXTURE0),b.bindTexture(b.TEXTURE_2D,this.Xf),b.uniform1f(b.getUniformLocation(this.eb,"uPercent"),3>this.Cl?a*(e.width+this.dd):a*(e.height+this.dd)),
b.uniform1f(b.getUniformLocation(this.eb,"uSoftEdge"),this.dd),b.uniform1i(b.getUniformLocation(this.eb,"uDirection"),this.Cl),b.uniform2f(b.getUniformLocation(this.eb,"uCanvasDimensions"),e.width,e.height),b.uniform1i(b.getUniformLocation(this.eb,"uZoomIn"),1==this.da||2==this.da||6==this.da||7==this.da?1:0),b.uniform2f(b.getUniformLocation(this.eb,"uZoomCenter"),h,n),b.uniform1f(b.getUniformLocation(this.eb,"uZoomFactor"),this.Lb),b.uniform1i(b.getUniformLocation(this.eb,"uSampler"),0);b.drawArrays(b.TRIANGLE_STRIP,
0,this.vb.numberOfItems);b.useProgram(f.Gg.R);b.disable(b.BLEND);b.enable(b.DEPTH_TEST)}}kr(){const a=this.o.N;a.texParameteri(a.TEXTURE_CUBE_MAP,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE);a.texParameteri(a.TEXTURE_CUBE_MAP,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE);a.texParameteri(a.TEXTURE_CUBE_MAP,a.TEXTURE_MIN_FILTER,a.LINEAR);a.texParameteri(a.TEXTURE_CUBE_MAP,a.TEXTURE_MAG_FILTER,a.LINEAR)}Fu(a){var b=this.o;const e=b.N,f=b.fa[0];b.fa[0].zl();b.fa[1].zl();var h=Sb.Fo(a);f.D.pan.m=this.Wg.pan*(1-h)+this.ng.pan*
h;f.D.u.m=this.Wg.u*(1-h)+this.ng.u*h;f.D.fov.m=this.Wg.fov*(1-h)+this.ng.fov*h;f.D.Yd();h=parseInt(b.Qh("__mesh_mb_iter",5));b=parseFloat(b.Qh("__mesh_mb_width",.05));1<b&&(b=1);e&&e.clear(e.COLOR_BUFFER_BIT);a=(a-.5)*(1+2*b)+.5-b;for(let n=0;n<h;n++){this.cl=0==n?1:.5;let r=a+n/h*b;1<r&&(r=1);0>r&&(r=0);0<=r&&1>=r&&(f.Cn=Sb.Fo(r),e&&e.clear(e.STENCIL_BUFFER_BIT),this.Gu())}}setup(){const a=this.o;this.vd||this.Pd||this.ed||a.vk(!0);var b;"wipeleftright"==this.type?b=1:"wiperightleft"==this.type?
b=2:"wipetopbottom"==this.type?b=3:"wipebottomtop"==this.type?b=4:"wiperandom"==this.type&&(b=Math.ceil(4*Math.random()));this.Cl=b;"mesh"!=this.type&&this.Bs();b=new Date;a.O!=a.Wa&&6!=this.da?7==this.da?(this.mh=a.O.zc/a.H.width,this.nh=.5):(this.mh=a.O.zc/a.H.width,this.nh=1-a.O.ac/a.H.height):this.nh=this.mh=.5;if(1==this.da||2==this.da||6==this.da||7==this.da)this.fs=b.getTime()+100,this.Pd=!0,this.Lb=Math.sin(a.Fd()/2*Math.PI/180)/Math.sin(this.$k/2*Math.PI/180),this.Lb=Math.max(this.Lb,1),
this.es=1/this.ph*this.Lb*.3}Ou(){const a=this.o,b=a.D;this.rf=parseFloat(a.Qh("__trans_blend_time",this.rf));a.Mr(null);if(0!=this.Vc){this.xn=b.ce();this.yn=b.Af();this.Ri=b.Fd();this.ne=b.Z();if(1==this.Vc||3==this.Vc)b.Jb(this.Zk);else if(2==this.Vc)b.Jb(this.Yk);else if(4==this.Vc){let f=0;for(var e=0;e<a.za.length;e++)a.za[e].fb&&0==a.za[e].fb.indexOf("__FlyIn")&&(f=a.za[e]);0!=f?(b.ab(a.yj(3,f).value),b.Md(a.yj(0,f).value),b.Nd(a.yj(1,f).value),b.Jb(a.yj(2,f).value)):(b.ab(b.Zc.rb),b.Md(b.Zc.pan),
b.Nd(b.Zc.u),b.Jb(b.Zc.fov))}this.oh||1==this.da||2==this.da||6==this.da||7==this.da||a.qn()}}Bs(){const a=this.o.N,b=this.o;a.bindFramebuffer(a.FRAMEBUFFER,this.Pb);a.viewport(0,0,this.Pb.width,this.Pb.height);this.Wi=!0;b.Zi();this.Wi=!1;a.bindFramebuffer(a.FRAMEBUFFER,null);a.viewport(0,0,b.Ya.width,b.Ya.height)}Bv(a){const b=this.o.N;this.Nk||(this.Nk=b.createBuffer(),this.Dn=b.createBuffer());b.bindBuffer(b.ARRAY_BUFFER,this.Nk);let e=[],f=[];const h=a.pan,n=a.pan-this.offset,r=new lb,w=new lb;
r.Ee(0,0);w.Ee(0,0);r.bc(a.u);w.bc(a.u);r.Sc(h);w.Sc(n);e.push(r.jf()/360);e.push((r.kf()+90)/180);e.push(w.jf()/360);e.push((w.kf()+90)/180);r.Ee(180,0);w.Ee(180,0);r.bc(a.u);w.bc(a.u);r.Sc(h);w.Sc(n);e.push(r.jf()/360);e.push((r.kf()+90)/180);e.push(w.jf()/360);e.push((w.kf()+90)/180);for(let x=0;64>x;x++)r.Ee(120,0),r.le(360*x/64),w.Ee(60,0),w.le(360*x/64),r.bc(a.u),w.bc(a.u),r.Sc(h),w.Sc(n),e.push(r.jf()/360),e.push((r.kf()+90)/180),e.push(w.jf()/360),e.push((w.kf()+90)/180),f.push(2+x),f.push(2+
(x+1)%64),f.push(0),f.push(1),f.push(2+(x+1)%64),f.push(2+x);this.En=f.length;b.bufferData(b.ARRAY_BUFFER,new Float32Array(e),b.STATIC_DRAW);b.bindBuffer(b.ELEMENT_ARRAY_BUFFER,this.Dn);a=new Uint16Array(f);b.bufferData(b.ELEMENT_ARRAY_BUFFER,a,b.STATIC_DRAW)}Gu(){const a=this.o,b=a.N;var e=a.D,f=a.fa[0];let h=this.Iq;h&&(b.useProgram(h),b.disable(b.DEPTH_TEST),b.enable(b.STENCIL_TEST),b.blendFuncSeparate(b.SRC_ALPHA,b.ONE_MINUS_SRC_ALPHA,b.SRC_ALPHA,b.ONE),b.enable(b.BLEND),b.stencilOp(b.KEEP,b.KEEP,
b.INVERT),b.stencilFunc(b.EQUAL,0,1),b.enable(b.CULL_FACE),b.cullFace(b.FRONT),f.gh(0,h),kb.identity(this.$a),kb.perspective(e.Db(),a.Ya.width/a.Ya.height,.001,10,this.$a),b.uniformMatrix4fv(b.getUniformLocation(h,"matProject"),!1,this.$a),b.uniform2f(b.getUniformLocation(h,"uCanvasDimensions"),a.Ya.width,a.Ya.height),e=b.getUniformLocation(h,"alphaBlend"),b.uniform1f(e,this.cl),e=b.getUniformLocation(h,"rotOffset"),b.uniform2f(e,this.offset*Math.PI/180,0*Math.PI/180),e=b.getUniformLocation(h,"irisRamp"),
b.uniform2f(e,parseFloat(a.Qh("__mesh_iris_center",0)),parseFloat(a.Qh("__mesh_iris_outer",0))),f.Pk(h),f.gh(0,h),e=b.getUniformLocation(h,"cubeTexture"),b.uniform1i(e,0),e=b.getUniformLocation(h,"cubeTexture2"),b.uniform1i(e,1),f=b.getAttribLocation(h,"aVertexPosition"),b.disableVertexAttribArray(1),b.disableVertexAttribArray(2),b.enableVertexAttribArray(f),b.bindBuffer(b.ARRAY_BUFFER,this.Nk),b.bindBuffer(b.ELEMENT_ARRAY_BUFFER,this.Dn),b.vertexAttribPointer(f,4,b.FLOAT,!1,0,0),b.activeTexture(b.TEXTURE0),
a.fa[1].Fb&&(b.bindTexture(b.TEXTURE_CUBE_MAP,a.fa[1].Fb),this.kr()),b.activeTexture(b.TEXTURE1),a.fa[0].Fb&&(b.bindTexture(b.TEXTURE_CUBE_MAP,a.fa[0].Fb),this.kr()),b.drawElements(b.TRIANGLES,this.En,b.UNSIGNED_SHORT,0),b.disable(b.STENCIL_TEST))}}class Pb{constructor(a){this.Fe=this.Ma=!1;this.j=null;this.Xb=!0;this.Em=this.td=!1;this.Ta=this.Ca=this.ya=0;this.fov=70;this.Xc=0;this.ri=100;this.jk=0;this.autoplay=this.wg=this.Ff=!1;this.ad="";this.o=null;this.Hp=!1;this.id=this.Jp="";this.u=this.pan=
0;this.o=a;this.$c=this.kc=100;this.Kc=1}wb(a){let b;(b=a.getAttributeNode("id"))&&b.nodeValue&&(this.id=b.nodeValue.toString());if(b=a.getAttributeNode("pan"))this.pan=Number(b.nodeValue);if(b=a.getAttributeNode("tilt"))this.u=Number(b.nodeValue)}Hn(a){var b="";let e=this.o;var f=e.D;let h=!0;if(e.Vh){var n=new lb(0,0,-100);n.ya(-this.u*Math.PI/180);n.Ca(this.pan*Math.PI/180);n.Ca(-f.pan.m*Math.PI/180);n.ya(f.u.m*Math.PI/180);n.Ta(f.Y.m*Math.PI/180);.01<=n.z&&(h=!1)}e.Ve&&(b+="perspective("+a+"px) ");
b=b+("translate3d(0px,0px,"+a+"px) rotateZ(")+(f.Y.m.toFixed(10)+"deg) ");b+="rotateX("+f.u.m.toFixed(10)+"deg) ";b+="rotateY("+(-f.pan.m).toFixed(10)+"deg) ";b+="rotateY("+this.pan.toFixed(10)+"deg) ";b+="rotateX("+(-this.u).toFixed(10)+"deg) ";a=1E4;f=this.j.videoWidth;n=this.j.videoHeight;if(0==f||0==n)f=640,n=480;0<this.kc&&(f=this.kc);0<this.$c&&(n=this.$c);0<f&&0<n&&(this.j.width=f,this.j.height=n,this.j.style.width=f+"px",this.j.style.height=n+"px");0<this.fov&&(a=f/(2*Math.tan(this.fov/2*
Math.PI/180)));b+="translate3d(0px,0px,"+(-a).toFixed(10)+"px) ";b+="rotateZ("+this.Ta.toFixed(10)+"deg) ";b+="rotateY("+(-this.Ca).toFixed(10)+"deg) ";b+="rotateX("+this.ya.toFixed(10)+"deg) ";this.Kc&&1!=this.Kc&&(b+="scaleY("+this.Kc+") ");b+="translate3d("+-f/2+"px,"+-n/2+"px,0px) ";this.j.style[e.Ae+"Origin"]="0% 0%";if(this.Ma){b="";let r;1==this.Xc&&(r=Math.min(e.H.width/f,e.H.height/n));4!=this.Xc&&(r=r*this.ri/100,b+="scale("+r+") ");b+="translate3d("+-f/2+"px,"+-n/2+"px,0px) "}this.Jp!=
b&&(this.Jp=b,this.j.style[e.Ae]=b,this.j.style.visibility=h&&this.Xb&&(!this.Ff||this.Fe||this.Ma)?"visible":"hidden",this.Fe&&this.Hp==this.Ma&&(this.j.style[e.Hc]="all 0s linear 0s"),this.Hp=this.Ma)}Tf(a){this.j&&(this.j.style.visibility=a?"visible":"hidden")}Qd(){let a=this.o;a.pa?(this.j.style.left=a.H.width/2+"px",this.j.style.top=a.H.height/2+"px"):(this.j.style.left=a.margin.left.ba+a.H.width/2+"px",this.j.style.top=a.margin.top.ba+a.H.height/2+"px")}Ue(){this.j.parentNode&&this.j.parentNode.removeChild(this.j);
this.j=null}Xd(){}ke(){return 4==this.Xc||1==this.Xc}}class Bb extends Pb{constructor(a){super(a);this.ta=!1;this.kb=0;this.Sd=this.Ll=this.qq=this.muted=this.un=this.stopped=this.Br=!1;this.hg=this.Cb=this.Bb=this.Ab=this.lb=this.Ad=this.zb=this.audioBuffer=this.Rb=this.source=null;this.Qf=this.Pi=0;this.Ig=!1;this.j=null;this.$i=[];this.Hm=this.Im=this.eh=!1;this.url=[];this.loop=0;this.level=1;this.Ec=0;this.mode=1;this.wj=10;this.dh=this.Hb=0;this.va=1;this.kd=this.jd=this.hd=this.gd=0;this.Fg=
-1}ef(){var a=this.o;a&&this.j&&(this.Sd=!1,a=a.ga)&&(this.ta||7==this.mode||(this.source=a.createMediaElementSource(this.j)),2==this.mode||3==this.mode||5==this.mode?(this.Ad=a.createChannelSplitter(2),this.lb=a.createGain(),this.Ab=a.createGain(),this.Bb=a.createGain(),this.Cb=a.createGain(),this.hg=a.createChannelMerger(2),this.ta||this.source.connect(this.Ad),this.Ad.connect(this.lb,0),this.Ad.connect(this.Ab,0),this.Ad.connect(this.Bb,1),this.Ad.connect(this.Cb,1),this.lb.connect(this.hg,0,0),
this.Ab.connect(this.hg,0,1),this.Bb.connect(this.hg,0,0),this.Cb.connect(this.hg,0,1),this.hg.connect(a.destination),1==this.Fg&&this.vn()):7!=this.mode&&(this.zb=a.createGain(),this.ta||this.source.connect(this.zb),this.zb.connect(a.destination)))}gn(a){var b;let e=null===(b=this.o)||void 0===b?void 0:b.ga;(-1==a?this.muted:1!=a)?this.muted&&(this.muted=this.j.muted=!1,this instanceof Qb||!this.un||this.o.Ld(this.id)):(a=!1,this.muted=this.j.muted=!0,this.o.isPlaying(this.id)?(this.lb?(this.lb.gain.setValueAtTime(0,
e.currentTime+1),this.Cb.gain.setValueAtTime(0,e.currentTime+1),this.Ab.gain.setValueAtTime(0,e.currentTime+1),this.Bb.gain.setValueAtTime(0,e.currentTime+1)):this.zb&&this.zb.gain.setValueAtTime(0,e.currentTime+1),this instanceof Qb||(this.o.Hg(this.id),a=!0)):0<=this.loop&&this.autoplay&&!this.stopped&&(a=!0),a&&(this.un=!0))}Qk(){if(!this.Sd||4==this.mode||6==this.mode){var a=this.o,b=this.o.D,e=this.o.ga;if((this.j||this.ta)&&!this.muted){var f,h=this.pan-b.pan.m;for(f=this.u-b.u.m;-180>h;)h+=
360;for(;180<h;)h-=360;let x=this.Ec;var n=this.wj;0==n&&(n=.01);0>n&&(n=b.fov.m);this.v||(this.v=new lb,this.v.Ee(this.pan,this.u));0!=this.mode&&1!=this.mode||!e||this.zb&&this.zb.gain.setValueAtTime(this.level*a.ea*this.va,e.currentTime);2==this.mode&&e&&(b=.5*Math.cos(h*Math.PI/180)+.5,this.gd=Math.sqrt(b)*this.va*this.level*a.ea,this.kd=Math.sqrt(b)*this.va*this.level*a.ea,this.hd=Math.sqrt(1-b)*this.va*this.level*a.ea,this.jd=Math.sqrt(1-b)*this.va*this.level*a.ea,this.Ei());if(3==this.mode){h=
0>h?h<-this.Hb?h+this.Hb:0:h>this.Hb?h-this.Hb:0;b=this.level;f=Math.abs(f);f=f<this.dh?0:f-this.dh;var r=1-f/n;if(Math.abs(h)>n||0>r)r=b*x*a.ea,e?(this.gd=r*this.va,this.kd=r*this.va,this.jd=this.hd=0,this.Ei()):this.j.volume=b*x*a.ea;else{var w=1-Math.abs(h/n);if(e){let y=b*(x+(1-x)*r*w)*a.ea;w=b*x*a.ea;0<=h?(this.gd=y*this.va,this.kd=w*this.va):(this.gd=w*this.va,this.kd=y*this.va);2*Math.abs(h)<n?(w=1-Math.abs(2*h)/n,y=b*(x+(1-x)*r*w)*a.ea,w=.5*b*(1-x)*r*(1-w)*a.ea,0<=h?(this.kd=y*this.va,this.jd=
w*this.va,this.hd=0):(this.gd=y*this.va,this.hd=w*this.va,this.jd=0)):(w=1-(Math.abs(2*h)-n)/n,y=.5*b*(1-x)*r*w*a.ea,0<=h?(this.jd=y*this.va,this.hd=0):(this.hd=y*this.va,this.jd=0));this.Ei()}else this.j.volume=b*(x+(1-x)*r*w)*a.ea}}4==this.mode&&(Math.abs(h)<this.Hb&&Math.abs(f)<this.dh?this.eh||(this.eh=!0,this.kb=this.loop-1,a.$d||(this.j.play(),this.Sd&&this.ef())):this.eh=!1);5==this.mode&&(f=180*Math.acos(a.Bl.mk(this.v))/Math.PI,f<this.Hb?e?(this.gd=this.level*a.ea*this.va,this.kd=this.level*
a.ea*this.va,this.jd=this.hd=0,this.Ei()):this.j.volume=this.level*a.ea:e?(f<this.Hb+n?(h=0>h?h>-this.Hb?0:h+this.Hb:h<this.Hb?0:h-this.Hb,e=1-Math.max(f-this.Hb,0)/n,n=Math.max(1-Math.abs(h)*Math.cos(this.u*Math.PI/180)/n,0),0<h?(this.gd=this.level*(e*(1-this.Ec)+this.Ec)*a.ea*this.va,this.kd=this.level*(e*n*(1-this.Ec)+this.Ec)*a.ea*this.va,this.hd=0,this.jd=this.level*e*(1-n)*a.ea*this.va):(this.gd=this.level*(e*n*(1-this.Ec)+this.Ec)*a.ea*this.va,this.kd=this.level*(e*(1-this.Ec)+this.Ec)*a.ea*
this.va,this.hd=this.level*e*(1-n)*a.ea*this.va,this.jd=0)):(h=this.level*this.Ec*a.ea,this.gd=h*this.va,this.kd=h*this.va,this.jd=this.hd=0),this.Ei()):(f-=this.Hb,this.j.volume=f<n&&0<n?this.level*(x+(1-x)*(1-Math.abs(f/n)))*a.ea:x*a.ea));6==this.mode&&(f=180*Math.acos(a.Bl.mk(this.v))/Math.PI,Math.abs(f)<this.Hb?this.eh||(this.eh=!0,this.kb=this.loop-1,this.ta?this.Ig||this.Wd():this.j.play()):this.eh=!1)}}}Wd(){let a=this.o.ga,b=this.Qf;this.audioBuffer?(null==this.Rb&&(this.xo(),this.Rb.buffer=
this.audioBuffer),this.Pi=a.currentTime-b,this.Qf=0,this.Ig=!0,this.stopped=!1,this.Rb.start(0,b)):this.Hm=!0}kl(){let a=this.o.ga.currentTime-this.Pi;this.fg();this.Qf=a}fg(){this.Rb&&this.Ig&&(this.stopped=!0,this.Rb.disconnect(),this.Rb.stop(0),this.Rb=null);this.Pi=this.Qf=0;this.Ig=!1}qs(){let a=this.o.ga;return this.Qf?this.Qf:this.Pi?a.currentTime-this.Pi:0}rs(a){this.fg();this.Qf=a;this.Wd()}addElement(){let a=-1,b=this,e=this.o,f=this.o.ga;try{var h=!1;for(let n=0;n<e.X.length;n++)e.X[n].id==
b.id&&(a=n,null==e.X[n].j&&!e.X[n].ta||e.X[n].url.join()!=b.url.join()||e.X[n].loop!=b.loop||e.X[n].mode!=b.mode||(h=!0,e.X[n].pan=b.pan,e.X[n].u=b.u,e.X[n].level=b.level,e.X[n].Ec=b.Ec,e.X[n].wj=b.wj,e.X[n].Hb=b.Hb,e.X[n].dh=b.dh));if(!h){if(0<=a){let n=e.X[a];if(null!=n.j||n.ta)if(f&&e.bb.enabled)e.bb.Xi.push(n),1!=e.F.da&&2!=e.F.da&&6!=e.F.da&&e.bb.Lo(n);else{try{n.ta?n.kl():n.j.pause()}catch(r){}try{n.Ue()}catch(r){}}}f&&(this.Sd=!0);b.j=document.createElement("audio");b.j.crossOrigin=e.crossOrigin;
b.j.setAttribute("class","ggmedia");e.Je&&b.j.setAttribute("id",e.Je+b.id);for(h=0;h<b.url.length;h++){let n;n=document.createElement("source");if(""!=b.url[h]&&"#"!=b.url[h]){n.crossOrigin=e.crossOrigin;let r=e.La(e.Ja(b.url[h]));n.setAttribute("src",r);b.j.appendChild(n);b.$i.push(r)}}b.j.volume=b.level*e.ea;if(0<b.j.childNodes.length&&(e.T.appendChild(b.j),b.j.addEventListener("ended",function(){b.qr()},!1),f&&(b.Ll=!1,0==b.loop&&b.source&&b.source.mediaElement&&(b.source.mediaElement.loop=!0),
e.hw))){let n=new XMLHttpRequest;n.open("GET",e.La(b.url[0]),!0);n.responseType="arraybuffer";n.onload=function(){let r=n.response;f.decodeAudioData(r,function(w){b.Fg=w.numberOfChannels;b.ta=!0;b.ef();b.Pu(r);1==b.Fg&&b.vn()})};n.send()}1<=b.loop&&(b.kb=b.loop-1);0<=a?e.X[a]=b:e.X.push(b);b.Qk();this.o.xc||(1!=b.mode&&2!=b.mode&&3!=b.mode&&5!=b.mode||!(0<=b.loop)||f&&e.bb.enabled||(b.ta||(b.j.autoplay=!0,b.Fn()),b.autoplay=!0),0==b.mode&&0<=b.loop&&(b.autoplay=!0,b.Fn()))}}catch(n){}}Xd(){let a=
this.o.isPlaying(this.id),b=0,e=!1;for(let f=0;f<this.j.children.length&&!(this.url.length<=b);f++){let h=this.j.children[f];if("SOURCE"==h.nodeName){let n=this.o.La(this.o.Ja(this.url[b]));this.$i[b]!=n&&(a&&!e&&this.o.Hg(this.id),h.setAttribute("src",n),this.$i[b]=n,e=!0);b++}}e&&(this.j.load(),a&&this.o.Ld(this.id))}Ue(){try{this.ta||(this.o.T.removeChild(this.j),this.j=null)}catch(a){}}wb(a){super.wb(a);let 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.qq=1==Number(b.nodeValue);if(b=a.getAttributeNode("field"))this.wj=Number(b.nodeValue);if(b=a.getAttributeNode("ambientlevel"))this.Ec=Number(b.nodeValue);if(b=a.getAttributeNode("pansize"))this.Hb=Number(b.nodeValue);if(b=a.getAttributeNode("tiltsize"))this.dh=Number(b.nodeValue);for(a=a.firstChild;a;)"source"==
a.nodeName&&(b=a.getAttributeNode("url"))&&this.url.push(b.nodeValue.toString()),a=a.nextSibling}Fn(){let a=this;var b=a.j.play();void 0!==b&&b.then(()=>{a.ef()}).catch(()=>{a.j.pause();a.Br&&(a.j.muted=!0,a.j.play())})}vn(){1!=this.Fg||this.Sd||!this.Ad||2!=this.mode&&3!=this.mode&&5!=this.mode||(this.Ad.connect(this.Bb,0),this.Ad.connect(this.Cb,0))}Ei(){const a=this.o.ga;this.Ma||this.Im||(this.lb?(this.lb.gain.setValueAtTime(this.gd,a.currentTime),this.Cb.gain.setValueAtTime(this.kd,a.currentTime),
this.Ab.gain.setValueAtTime(this.hd,a.currentTime),this.Bb.gain.setValueAtTime(this.jd,a.currentTime)):this.zb&&this.zb.gain.setValueAtTime((this.gd+this.kd)/2,a.currentTime+1))}qr(){this.ta&&this.stopped?this.stopped=!1:0==this.loop?this.ta?(this.Rb=null,this.Wd()):this.j.play():0<this.kb?(this.kb--,this.ta||(this.j.currentTime=0),this.Ll&&(this.zb&&0==this.zb.gain.value||0==this.lb.gain.value&&0==this.Cb.gain.value&&0==this.Ab.gain.value&&0==this.Bb.gain.value)||(this.ta?(this.Rb=null,this.Wd()):
this.j.play())):this.ta&&(this.Rb=null,this.Ig=!1)}xo(){let a=this;a.Rb=this.o.ga.createBufferSource();a.Rb.addEventListener("ended",function(){a.qr()},!1);2==a.mode||3==a.mode||5==a.mode?a.Rb.connect(a.Ad):a.Rb.connect(a.zb)}Pu(a){let b=this,e=this.o.ga;b.xo();e.decodeAudioData(a,function(f){b.Fg=f.numberOfChannels;1==b.Fg&&b.vn();b.audioBuffer=f;b.Rb.buffer=f;b.Hm&&(b.Wd(),b.Hm=!1)})}}class Qb extends Bb{constructor(a){super(a);this.poster="";this.Ta=this.Ca=this.ya=0;this.fov=50;this.Xc=0;this.ri=
100;this.jk=0;this.wg=this.Ff=!1}Ge(){this.ke()&&this.Cf(!this.Ma);2==this.Xc&&this.o.Gm(this.id)}Cf(a){let b=this.o;var e=b.ga;if(this.ke()){if(this.Ma=a)this.j.style.pointerEvents="auto",this.j.style.cursor="pointer",this.j.style.zIndex=(b.cg+8E4).toString(),this.j.style[this.o.Hc]="all 1s ease 0s",this.j.muted=!1,this.o.isPlaying(this.id)||b.Ld(this.id);else{this.j.style.pointerEvents="none";this.j.style.cursor="default";this.j.style.zIndex=b.cg.toString();this.j.style[this.o.Hc]="all 1s ease 0s";
this.o.isPlaying(this.id)&&(0==this.jk?b.Qi(this.id):2==this.jk&&(this.j.muted=!0));this.Im=!0;let f=this;setTimeout(function(){f.Im=!1},1E3)}if(e&&(2==this.mode||3==this.mode||5==this.mode)&&(e=e.currentTime,this.lb&&this.Cb&&this.Ab.gain&&this.Ab&&this.Bb)){let f=this.lb.gain.value,h=this.Cb.gain.value,n=this.Ab.gain.value,r=this.Bb.gain.value;this.Ma?(this.lb.gain.linearRampToValueAtTime(f,e),this.lb.gain.linearRampToValueAtTime(this.level*b.ea,e+1),this.Cb.gain.linearRampToValueAtTime(h,e),this.Cb.gain.linearRampToValueAtTime(this.level*
b.ea,e+1),this.Ab.gain.linearRampToValueAtTime(n,e),this.Ab.gain.linearRampToValueAtTime(0,e+1),this.Bb.gain.linearRampToValueAtTime(r,e),this.Bb.gain.linearRampToValueAtTime(0,e+1)):(this.lb.gain.linearRampToValueAtTime(f,e),this.lb.gain.linearRampToValueAtTime(this.gd,e+1),this.Cb.gain.linearRampToValueAtTime(h,e),this.Cb.gain.linearRampToValueAtTime(this.kd,e+1),this.Ab.gain.linearRampToValueAtTime(n,e),this.Ab.gain.linearRampToValueAtTime(this.hd,e+1),this.Bb.gain.linearRampToValueAtTime(r,e),
this.Bb.gain.linearRampToValueAtTime(this.jd,e+1))}this.Fe=!0;this.o.Ur()}2==this.Xc&&(a?this.o.Ld(this.id):this.o.Hg(this.id))}wb(a){super.wb(a);let b;if(b=a.getAttributeNode("poster"))this.poster=String(b.nodeValue);if(b=a.getAttributeNode("maskimage"))this.ad=String(b.nodeValue);if(b=a.getAttributeNode("rotx"))this.ya=Number(b.nodeValue);if(b=a.getAttributeNode("roty"))this.Ca=Number(b.nodeValue);if(b=a.getAttributeNode("rotz"))this.Ta=Number(b.nodeValue);if(b=a.getAttributeNode("fov"))this.fov=
Number(b.nodeValue);if(b=a.getAttributeNode("width"))this.kc=Number(b.nodeValue);if(b=a.getAttributeNode("height"))this.$c=Number(b.nodeValue);this.Kc=(b=a.getAttributeNode("stretch"))?Number(b.nodeValue):1;if(b=a.getAttributeNode("clickmode"))this.Xc=Number(b.nodeValue);if(b=a.getAttributeNode("popoutscaling"))this.ri=Number(b.nodeValue);if(b=a.getAttributeNode("popbackmode"))this.jk=Number(b.nodeValue);if(b=a.getAttributeNode("handcursor"))this.wg=1==Number(b.nodeValue);if(b=a.getAttributeNode("startmutedmobile"))this.Br=
1==Number(b.nodeValue)}addElement(){let a=this,b=this.o,e=this.o.ga;try{a.j=document.createElement("video"),a.j.setAttribute("class","ggmedia"),a.j.setAttribute("disablePictureInPicture","true"),a.j.setAttribute("controlsList","nodownload"),a.j.crossOrigin=b.crossOrigin,a.j.hidden=!0,a.j.addEventListener("click",function(f){f.stopPropagation()}),b.Je&&a.j.setAttribute("id",b.Je+a.id),b.bj?(a.j.setAttribute("playsinline","playsinline"),a.j.setAttribute("style","display: none; max-width:none;")):(a.j.setAttribute("style",
"max-width:none;pointer-events:none;"),a.j.setAttribute("playsinline","playsinline"),this.ke()&&(a.j.addEventListener(b.Xk(),function(){a.He()},!1),a.j.addEventListener("transitionend",function(){a.He()},!1))),b.Wn(a.j,a.url,a),""!=a.poster&&(a.j.poster=b.La(b.Ja(a.poster)),0>a.loop&&(a.j.preload="none")),a.ad&&""!=a.ad&&(a.j.style.ad="url('"+b.La(a.ad)+"')",a.j.style.webkitMaskImage="url('"+b.La(a.ad)+"')",a.j.style.maskSize="100% 100%",a.j.style.webkitMaskSize="100% 100%"),a.j.volume=a.level*b.ea,
1<=a.loop&&(a.kb=a.loop-1),e&&(this.Sd=!0),(1==a.mode||2==a.mode||3==a.mode||5==a.mode)&&0<=a.loop&&(a.j.autoplay=!0,a.isRunning=!0,a.autoplay=!0,this.o.xc&&(a.j.muted=!0),a.Fn()),b.V.push(this),b.bj?b.T.appendChild(a.j):(a.j.style.position="absolute",a.kc&&(a.j.width=a.kc),a.$c&&(a.j.height=a.$c),b.ia.appendChild(a.j)),a.j.addEventListener("ended",function(){a.iw()},!1)}catch(f){}}Xd(){this.j.poster=this.o.La(this.o.Ja(this.poster));super.Xd()}registerElement(a,b){this.td=!0;this.j=b;this.id=a;this.level=
1;this.o.V.push(this)}Ue(){let a=this.o;a.bj&&(a.N.deleteTexture(this.texture),this.texture=0);this.j.parentNode&&this.j.parentNode.removeChild(this.j);this.j=null}He(){this.Fe=!1;this.j.style[this.o.Hc]="none"}iw(){0==this.loop?this.j.play():0<this.kb?(this.kb--,this.j.currentTime=0,this.j.play()):this.isRunning=!1}}class id extends Pb{constructor(a){super(a);this.url="";this.Ta=this.Ca=this.ya=0;this.fov=50;this.Xc=0;this.wg=!1;this.$c=this.kc=100;this.Kc=1}wb(a){super.wb(a);let b;if(b=a.getAttributeNode("url"))this.url=
b.nodeValue.toString();if(b=a.getAttributeNode("maskimage"))this.ad=String(b.nodeValue);if(b=a.getAttributeNode("rotx"))this.ya=Number(b.nodeValue);if(b=a.getAttributeNode("roty"))this.Ca=Number(b.nodeValue);if(b=a.getAttributeNode("rotz"))this.Ta=Number(b.nodeValue);if(b=a.getAttributeNode("fov"))this.fov=Number(b.nodeValue);if(b=a.getAttributeNode("width"))this.kc=Number(b.nodeValue);if(b=a.getAttributeNode("height"))this.$c=Number(b.nodeValue);this.Kc=(b=a.getAttributeNode("stretch"))?Number(b.nodeValue):
1;if(b=a.getAttributeNode("clickmode"))this.Xc=Number(b.nodeValue);if(b=a.getAttributeNode("popoutscaling"))this.ri=Number(b.nodeValue);if(b=a.getAttributeNode("hidepinned"))this.Ff=1==Number(b.nodeValue);if(b=a.getAttributeNode("handcursor"))this.wg=1==Number(b.nodeValue);for(a=a.firstChild;a;)"source"==a.nodeName&&(b=a.getAttributeNode("url"))&&(this.url=b.nodeValue.toString()),a=a.nextSibling}Ge(){this.ke()&&this.Cf(!this.Ma)}Cf(a){let b=this.o;this.ke()&&(this.Ma=a,this.Ff&&(this.j.style.visibility=
"visible",this.j.style.opacity=this.Ma?"0.0":"1.0"),this.Ma?(this.j.style.pointerEvents="auto",this.j.style.cursor="pointer",this.j.style.zIndex=(b.cg+8E4).toString(),this.j.style[b.Hc]="all 1s ease 0s",this.j.style.opacity="1.0"):(this.j.style.pointerEvents="none",this.j.style.cursor="default",this.j.style.zIndex=b.cg.toString(),this.j.style[b.Hc]="all 1s ease 0s",this.Ff&&(this.j.style.opacity="0.0")),this.Fe=!0,b.Gn())}addElement(){let a=this,b=this.o;try{a.j=document.createElement("img"),a.j.setAttribute("style",
"-webkit-user-drag:none; max-width:none; pointer-events:none;"),a.j.setAttribute("class","ggmedia"),a.j.hidden=!0,a.j.addEventListener("click",function(e){e.stopPropagation()}),b.Je&&a.j.setAttribute("id",b.Je+a.id),a.j.ondragstart=function(){return!1},this.ke()&&(a.j.addEventListener(b.Xk(),function(){a.He()},!1),a.j.addEventListener("transitionend",function(){a.He()},!1)),a.j.setAttribute("src",b.La(b.Ja(a.url))),a.kc&&(a.j.width=a.kc),a.$c&&(a.j.height=a.$c),b.Za.push(a),a.j.style.position="absolute",
a.ad&&""!=a.ad&&(a.j.style.ad="url('"+b.La(a.ad)+"')",a.j.style.webkitMaskImage="url('"+b.La(a.ad)+"')",a.j.style.maskSize="100% 100%",a.j.style.webkitMaskSize="100% 100%"),b.ia.appendChild(a.j)}catch(e){}}Xd(){this.j.setAttribute("src",this.o.La(this.o.Ja(this.url)))}He(){this.Fe=!1;this.j.style[this.o.Hc]="none";this.Ff&&!this.Ma&&(this.j.style.visibility="hidden")}}class jd extends Pb{constructor(a){super(a);this.code=""}wb(a){super.wb(a);let b;if(b=a.getAttributeNode("rotx"))this.ya=Number(b.nodeValue);
if(b=a.getAttributeNode("roty"))this.Ca=Number(b.nodeValue);if(b=a.getAttributeNode("rotz"))this.Ta=Number(b.nodeValue);if(b=a.getAttributeNode("fov"))this.fov=Number(b.nodeValue);if(b=a.getAttributeNode("width"))this.kc=Number(b.nodeValue);if(b=a.getAttributeNode("height"))this.$c=Number(b.nodeValue);this.Kc=(b=a.getAttributeNode("stretch"))?Number(b.nodeValue):1;if(b=a.getAttributeNode("clickmode"))this.Xc=Number(b.nodeValue);if(b=a.getAttributeNode("popoutscaling"))this.ri=Number(b.nodeValue);
if(b=a.getAttributeNode("handcursor"))this.wg=1==Number(b.nodeValue);if(b=a.getAttributeNode("code"))this.code=b.nodeValue.toString();if(b=a.getAttributeNode("permeable"))this.Em=1==Number(b.nodeValue)}Ge(){this.ke()&&this.Cf(!this.Ma)}Cf(a){let b=this.o;this.ke()&&(this.Ma=a,this.Ff&&(this.j.style.visibility="visible",this.j.style.opacity=this.Ma?"0.0":"1.0"),this.Ma?(this.j.style.cursor="pointer",this.j.style.zIndex=(b.cg+8E4).toString(),this.j.style[b.Hc]="all 1s ease 0s",this.j.style.opacity=
"1.0"):(this.j.style.cursor="default",this.j.style.zIndex=b.cg.toString(),this.j.style[b.Hc]="all 1s ease 0s"),this.Fe=!0,b.Gn())}addElement(){let a=this,b=this.o;try{a.j=document.createElement("div");this.Or();let e="max-width:none;";this.Em&&(e+="pointer-events:none;");a.j.setAttribute("style",e);a.j.setAttribute("class","ggmedia");b.Je&&a.j.setAttribute("id",b.Je+a.id);this.ke()&&(a.j.addEventListener(b.Xk(),function(){a.He()},!1),a.j.addEventListener("transitionend",function(){a.He()},!1));b.Qb.push(a);
a.j.style.position="absolute";a.j.style.visibility="hidden";0==a.Xc?b.xa.insertBefore(a.j,b.xa.firstChild):b.ia.appendChild(a.j)}catch(e){}}Or(){let a=this.j.innerHTML,b=this.o.Ja(this.code);b!=a&&(this.j.innerHTML=b)}Xd(){this.Or()}He(){this.Fe=!1;this.j.style[this.o.Hc]="none"}}class kd extends Pb{constructor(a){super(a);this.alpha=this.ho=50;this.type=0;this.color=16777215}wb(a){super.wb(a);let b;if(b=a.getAttributeNode("blinding"))this.ho=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)}}class Rb{constructor(a){this.o=a;this.type="empty";this.ln=this.id=this.target=this.description=this.title=this.url="";this.w=100;this.h=20;this.dj=!1;this.j=null;this.Mm=this.Lm=this.ac=this.zc=this.jb=this.Fa=this.distance=this.u=this.pan=0;this.visible=!0;this.hc=a.P.hc;this.ec=a.P.ec;this.fc=a.P.fc;this.dc=a.P.dc;this.Ie=a.P.Ie;this.nd="";this.Bd=
this.tf=0;this.Yf=!1;this.rj=0;this.vertices=[]}wf(){this.id=this.id;this.pan=this.pan;this.tilt=this.u;this.url=this.url;this.target=this.target;this.title=this.title;this.distance=this.distance;this.description=this.description;this.skinid=this.ln;this.obj=this.j;this.customimage=this.nd;this.customimagewidth=this.tf;this.customimageheight=this.Bd;this.use3D=this.Yf;this.distance3D=this.rj;this.j&&this.j.__div&&(this.div=this.j.__div)}Nv(){let a=this.url;return"{"==a.charAt(0)?a.substring(1,a.length-
1):!1}wb(a){var b;(b=a.getAttributeNode("url"))&&b.nodeValue&&(this.url=b.nodeValue.toString());(b=a.getAttributeNode("target"))&&b.nodeValue&&(this.target=b.nodeValue.toString());(b=a.getAttributeNode("title"))&&b.nodeValue&&(this.title=b.nodeValue.toString());(b=a.getAttributeNode("description"))&&b.nodeValue&&(this.description=b.nodeValue.toString());(b=a.getAttributeNode("id"))&&b.nodeValue&&(this.id=b.nodeValue.toString());(b=a.getAttributeNode("skinid"))&&b.nodeValue&&(this.ln=b.nodeValue.toString());
if(b=a.getAttributeNode("width"))this.w=Number(b.nodeValue);if(b=a.getAttributeNode("height"))this.h=Number(b.nodeValue);if(b=a.getAttributeNode("wordwrap"))this.dj=1==Number(b.nodeValue);b=a.getAttributeNode("pan");this.pan=1*(b?Number(b.nodeValue):0);b=a.getAttributeNode("tilt");this.u=1*(b?Number(b.nodeValue):0);b=a.getAttributeNode("fov");this.fov=1*(b?Number(b.nodeValue):0);b=a.getAttributeNode("distance");this.distance=1*(b?Number(b.nodeValue):0);if(b=a.getAttributeNode("bordercolor"))this.hc=
1*Number(b.nodeValue);if(b=a.getAttributeNode("backgroundcolor"))this.ec=1*Number(b.nodeValue);if(b=a.getAttributeNode("borderalpha"))this.fc=1*Number(b.nodeValue);if(b=a.getAttributeNode("backgroundalpha"))this.dc=1*Number(b.nodeValue);if(b=a.getAttributeNode("handcursor"))this.Ie=1==Number(b.nodeValue);if(b=a.getAttributeNode("customimage"))this.nd=this.o.$o()+b.nodeValue;if(b=a.getAttributeNode("customimagewidth"))this.tf=Number(b.nodeValue);if(b=a.getAttributeNode("customimageheight"))this.Bd=
Number(b.nodeValue);if(b=a.getAttributeNode("use3D"))this.Yf=1==Number(b.nodeValue);if(b=a.getAttributeNode("distance3D"))this.rj=Number(b.nodeValue);for(a=a.firstChild;a;){if("polystring"==a.nodeName){var e=a.textContent.toString().split("|");for(b=0;b<e.length;b++){let f=e[b].split("/");if(2==f.length){let h={pan:0,u:0};h.pan=Number(f[0]);h.u=Number(f[1]);this.vertices.push(h)}}}"vertex"==a.nodeName&&(e={pan:0,u:0},b=a.getAttributeNode("pan"),e.pan=1*(b?Number(b.nodeValue):0),b=a.getAttributeNode("tilt"),
e.u=1*(b?Number(b.nodeValue):0),this.vertices.push(e));a=a.nextSibling}this.wf()}}let Db=2E3;class md{Ds(){this.init();this.animate()}constructor(a){this.Sa=null;this.controller=[];this.line=this.gg=this.nl=null;this.Pa=[];this.gk=[];this.ca={x:0,y:0};this.bd={x:0,y:0};this.ji=0;this.session=null;this.Nl=!1;this.Vk=this.Nn=this.Pf=0;this.km=this.Zf=!1;this.kn=0;this.Vg=-5;this.Bn=0;this.vj=this.rg=this.bk=!1;this.o=null;this.Ym=!0;this.De=1;this.Jj=[];this.frustumCulled=!1;this.Ij=0;this.Uk=null;
this.Go=!0;this.Bk=0;this.Fl=1;this.Pn=this.Dc=eb.SRGBColorSpace;this.Kp=this.wl=null;this.Rj=-1;this.ll=this.$r=!1;this.Me=[-1,-1,-1,-1];this.Ne=[-1,-1,-1,-1];this.Kf=[!1,!1,!1,!1];this.Vb=[];this.Wj=[];this.Jf=[];this.ml=new Map;this.o=a;var b=this;setTimeout(function(){if(window.WebXRPolyfill&&window.Promise){let e={cardboardConfig:{BUFFER_SCALE:1}};try{new window.WebXRPolyfill(e)}catch(f){a.Yb(f)}}b.Xt()},0);a.Ef()?this.fo():console.log("Three.js not available!")}fo(){this.Si=new eb.Matrix4;this.tq=
new eb.Euler;this.Cq=new eb.Ray}init(){const a=this;var b=this.o;"xr"in navigator||console.log("no WebXR support");if(b.Ef())if(this.Sa)console.log("already set up!");else{this.Si||this.fo();var e=this.container=b.container,f=this.$m=new eb.Scene,h=this.Hv=new eb.Scene,n=this.camera=new eb.PerspectiveCamera(100,window.innerWidth/window.innerHeight,.001,Db);f.add(n);108>parseFloat(eb.REVISION)&&(this.frustumCulled=!0);n.position.z=-.01;n.position.y=0;n.position.x=0;n=new eb.WebGLRenderer({depth:!0,
logarithmicDepthBuffer:!0,alpha:!0,antialias:!0,stencil:!1});eb.ColorManagement.enabled=!0;b.Tj&&17==parseInt(b.Ob)&&this.Uq(eb.SRGBColorSpace,eb.LinearSRGBColorSpace);n.outputColorSpace=this.Pn;n.setPixelRatio(window.devicePixelRatio);this.Sa=n;n.setClearColor(new eb.Color(0),1);n.setSize(window.innerWidth,window.innerHeight);n.shadowMap.enabled=!1;e.appendChild(n.domElement);"xr"in navigator&&(n.xr.enabled=!0,n.xr.setReferenceSpaceType("local"));n=this.lj=new eb.Group;n.name="controllerGroup";n.renderOrder=
3E3;f.add(new eb.HemisphereLight(12369084,10855845,3));e=new eb.DirectionalLight(16777215,3);e.position.set(0,6,0);f.add(e);e=(new eb.BufferGeometry).setFromPoints([new eb.Vector3(0,0,0),new eb.Vector3(0,0,-1)]);var r=new eb.LineBasicMaterial({color:14737632});e=new eb.Line(e,r);e.name="line";e.scale.z=5;this.line=e;this.Tn(0);this.Tn(1);n.visible=!1;e=this.Ze=new eb.Group;e.name="skinGroup";e.translateZ(this.Vg);e.visible=!1;e.renderOrder=1E3;h.add(e);e=this.Cc=new eb.Group;e.name="toggleSkinGroup";
e.translateZ(this.Vg+.1);e.position.y=0==this.Bk?3.17:-3.17;e.renderOrder=1100;e.visible=!1;h.add(e);h.add(n);h=(new eb.TextureLoader).load(b.La("webxr/vrSkinShow.svg"));e=new eb.PlaneGeometry(.3,.3);h=new eb.MeshBasicMaterial({map:h,side:eb.DoubleSide,transparent:!0});e=new eb.Mesh(e,h);e.name="showSkinButton";e.userData.onclick=function(){a.Xe()};e.userData.setOpacity=function(w){a.Uf.material.opacity=w};e.visible=!0;this.Uf=e;this.Cc.add(e);h=(new eb.TextureLoader).load(b.La("webxr/vrSkinHide.svg"));
e=new eb.PlaneGeometry(.3,.3);h=new eb.MeshBasicMaterial({map:h,side:eb.DoubleSide,transparent:!0});e=new eb.Mesh(e,h);e.name="hideSkinButton";e.userData.onclick=function(){a.Xe()};e.userData.setOpacity=function(w){a.zg.material.opacity=w};e.visible=!1;this.zg=e;this.Cc.add(e);this.Lg=new eb.Raycaster;this.ca=new eb.Vector2;this.Re=new eb.Group;this.Re.name="panoGroup";b.Lc||(this.Re.renderOrder=1);this.Gf=new eb.Group;this.Gf.name="imageGroup";this.Hd=new eb.Group;this.Hd.name="hotspotGroup";this.mg=
new eb.Group;this.mg.name="elementGroup";this.gg=new eb.Group;this.gg.name="centerGroup";b.Lc||(this.gg.renderOrder=2E3);this.Re.add(this.mg);this.Re.add(this.Hd);this.Re.add(this.Gf);f.add(this.Re);e=new eb.BufferGeometry;b=[];f=[];for(h=0;20>h;h++)r=2*h*Math.PI/20,n=Math.cos(r),r=Math.sin(r),f.push(.03*n,.03*r,0),f.push(.05*n,.05*r,0);for(h=0;20>h;h++){n=2*h+1;r=(h+1)%20*2+1;const w=(h+1)%20*2;b.push(2*h,n,w);b.push(n,r,w)}e.setIndex(b);e.setAttribute("position",new eb.Float32BufferAttribute(f,
3));b=new eb.MeshBasicMaterial({color:"black",side:eb.DoubleSide,transparent:!0,opacity:.25});b=new eb.Mesh(e,b);b.position.z=-5;this.nl=b;this.gg.add(b);window.addEventListener("resize",function(){a.zu()},!1);document.addEventListener("mouseup",function(){a.vu()},!1);document.addEventListener("mousedown",function(w){a.tu(w)},!1);document.addEventListener("mousemove",function(w){a.uu(w)},!1)}else console.log("Three.js not available!")}Tn(a){const b=this,e=b.$m;var f=b.Sa;this.wl||(this.wl=new eb.rw,
this.Kp=new eb.sw);let h=f.xr.getController(a);h.addEventListener("selectstart",function(){-1==b.Rj&&b.wq()});h.addEventListener("selectend",function(r){b.vq(r)});h.visible=!1;h.userData.mj=a;this.lj.add(h);h.add(this.line.clone());var n=f.xr.getControllerGrip(a);n.add(this.wl.tw(n));e.add(n);f=f.xr.getHand(a);n=this.Kp.uw(f);f.add(n);f.addEventListener("pinchstart",()=>{b.Rj=a;b.Fm=Date.now();b.wq();b.Si.identity().extractRotation(h.matrixWorld);const r=b.Cq;r.origin.setFromMatrixPosition(h.matrixWorld);
r.direction.set(0,0,-1).applyMatrix4(this.Si)});f.addEventListener("pinchend",r=>{b.Rj=-1;b.vq(r)});e.add(f);this.controller[a]=h}mr(){var a=this.o;a.G("vrchanged",{});a.G("playerstatechanged",{})}Gv(){this.km=!0;let a=this.o;a.G("vrchanged",{});a.G("playerstatechanged",{})}Xt(){if(!this.$r){this.$r=!0;var a=this;this.o.Ef()&&"xr"in navigator&&navigator.xr.isSessionSupported("immersive-vr").then(function(b){b?a.Gv():a.mr()}).catch(a.mr)}}Dj(){return this.Ze}Le(){return null!=this.session?this.Sa.xr.isPresenting:
this.o.qe?!0:!1}yg(){return this.km}xu(a){let b=this;this.ej();a.addEventListener("end",function(){b.wu()});a.addEventListener("inputsourceschange",()=>{});console.log("XR Session started.");this.Sa.xr.setSession(a);this.Nl=!0;this.session=a;b.o.G("entervr",{session:a})}wu(){console.log("XR Session ended.");this.Nl=!1;this.session=null;this.tl()}og(){let a=this.o;if(this.km){if(null===this.session){let b=this;navigator.xr.requestSession("immersive-vr",{optionalFeatures:["hand-tracking"]}).then(e=>
{b.xu(e)}).catch(function(e){console.log(e);console.warn("'immersive-vr' isn't supported, or an error occurred activating VR!");b.tl()})}this.Hd&&this.Hd.translateY(-this.Ij);this.Ij=0;if(1==this.De){let b=navigator.userAgent;0<=b.indexOf("OculusBrowser")&&(0<=b.indexOf("Pacific")&&(this.De=1.7),0<=b.indexOf("Quest")&&(this.De=1.5),0<=b.indexOf("Quest 3")&&(this.De=1.5))}this.Sa.xr.setFramebufferScaleFactor(this.De);a.Yb("Enter VR - scaled "+this.De)}else this.ej(),this.o.G("entervr",{session:null})}Au(){const a=
this.o;a.Ef()&&this.Sa&&(a.qe=!0,a.Mb&&(Db=2E3),a.Vh&&(Db=2E3),a.T.style.display="none",a.Ka.style.display="none",this.Sa.domElement.style.display="inline",a.G("vrchanged",{}),a.G("playerstatechanged",{}))}tl(){let a=this.o;a.Ef()&&this.Sa&&(a.qe=!1,a.T.style.display="inline",a.Ka.style.display="inline",this.Sa.domElement.style.display="none",this.o.er(!1),a.Rg(0),a.xd(),a.update(),a.G("vrchanged",{}),a.G("playerstatechanged",{}),this.o.G("exitvr",{session:null}),this.ro())}pg(){null!=this.session&&
this.session.end()}Ir(){this.Le()?this.pg():this.og()}Ns(){let a=0,b=this.o.D.M,e;e=1536;this.Sa&&(e*=this.De);e*=Math.pow(2,0);if(0<b.levels.length)for(;b.levels.length>=a+2&&!b.levels[a+1].Kg&&b.levels[a+1].width>e;)a++;return a}yp(a){let b=this.o;var e=b.D.M,f=b.cf[a];a="";if(f){f=f.firstChild;for(var h;f;)"input"==f.nodeName&&(h=f)&&(h=0<e.levels.length?h.getAttributeNode("leveltileurl"):h.getAttributeNode("tilevrurl"))&&(a=h.nodeValue),f=f.nextSibling}else a=0<e.levels.length?e.vm:b.Al;e=a;a=
b.Lq;for(f=0;3>f;f++)e=a(e,"c","vr"),e=a(e,"s","vr"),e=a(e,"r",0),e=a(e,"l",0),e=a(e,"x",0),e=a(e,"y",0),e=a(e,"v",0),e=a(e,"h",0);return b.La(e)}ceilPowerOfTwo(a){return Math.pow(2,Math.ceil(Math.log(a)/Math.LN2))}hq(a,b,e){let f=new eb.ImageLoader;f.setCrossOrigin(this.o.crossOrigin);let h=this;f.load(b,function(n){let r=h.ceilPowerOfTwo(n.width),w=h.ceilPowerOfTwo(n.height);a.colorSpace=h.Dc;if(r==n.width&&w==n.height||!e)a.image=n;else{var x=document.createElement("canvas");x.width=r;x.height=
w;x.getContext("2d").drawImage(n,0,0,r,w);a.image=x}a.needsUpdate=!0;a.Ip=!0;a.Gj&&a.Gj.Ip&&(a.bm.visible=!0,a.Gj.bm.visible=!0)});this.Jj.push(a)}ej(){const a=this.o;if(a.Ef()){var b=a.D;if(!this.ll){var e=this.Gf,f=this;this.Sf();this.camera.layers.enable(1);e.setRotationFromEuler(this.tq);e.rotateX(b.qb.pitch*Math.PI/180);e.rotateZ(-b.qb.Y*Math.PI/180);var h=new eb.SphereGeometry(Db/3*1.5,16,16),n=new eb.Texture,r=new eb.ImageLoader;r.setCrossOrigin(this.o.crossOrigin);r.load(this.yp(a.pd()),function(w){n.colorSpace=
f.Dc;n.image=w;n.needsUpdate=!0});r=new eb.MeshBasicMaterial({map:n,side:eb.DoubleSide});h=new eb.Mesh(h,r);h.scale.x=-1;h.rotateZ(b.qb.Y*Math.PI/180);h.rotateX(-b.qb.pitch*Math.PI/180);h.rotateY(-90*Math.PI/180);e.add(h);f.lk=h;f.ll=!0;setTimeout(function(){f.ll=!1;f.hs();a.B.j?f.ls():f.js();f.gs()});this.Tu();this.Ym=!0}}}ls(){function a(){var y=0;let z=2*Math.PI,cb=0,ab=Math.PI;if(15==f.format&&(y=Math.PI/2,z=Math.PI,0<b.B.width&&0<b.B.height)){let db;db=.5*b.B.width/b.B.height;1<db&&(ab=Math.PI/
db,cb=(Math.PI-ab)/2)}y=new eb.SphereGeometry(h,60,40,y,z,cb,ab);y.scale(-1,1,1);return y}let b=this.o,e=this.Gf,f=b.B,h=Db/3;if(b.oc){var n=new eb.VideoTexture(b.B.j);n.wrapS=eb.ClampToEdgeWrapping;n.wrapT=eb.ClampToEdgeWrapping;n.minFilter=eb.LinearFilter;n.colorSpace=this.Dc;var r=a(),w=r.attributes.uv.array;for(var x=0;x<w.length;x+=2)15==f.format?(w[x]*=.5,w[x]+=.5):w[x+1]*=.5;w=new eb.MeshBasicMaterial({map:n});r=new eb.Mesh(r,w);r.rotateY(-90*Math.PI/180);r.layers.set(b.Wf?1:2);e.add(r);r=
a();w=r.attributes.uv.array;for(x=0;x<w.length;x+=2)15==f.format?w[x]*=.5:(w[x+1]*=.5,w[x+1]+=.5);w=new eb.MeshBasicMaterial({map:n});r=new eb.Mesh(r,w);r.rotateY(-90*Math.PI/180);r.layers.set(b.Wf?2:1);e.add(r)}else n=a(),r=new eb.VideoTexture(b.B.j),r.colorSpace=this.Dc,r.wrapS=eb.ClampToEdgeWrapping,r.wrapT=eb.ClampToEdgeWrapping,r.minFilter=eb.LinearFilter,r=new eb.MeshBasicMaterial({map:r}),n=new eb.Mesh(n,r),n.rotateY(-90*Math.PI/180),e.add(n);try{b.B.j.play()}catch(y){b.Yb(y)}}js(){let a=this.o;
var b=this.o.D.M;let e=[];var f=this.Ns();let h=this.Gf,n=Db/3,r=a.oc?2:1,w;if(b.levels.length>f){var x=b.levels[f];for(var y=0;6>y;y++){e[y]=new eb.Group;for(var z=0;z<x.sa;z++)for(var cb=0;cb<x.$;cb++)for(let bb=0;bb<r;bb++){let fb=new eb.Texture;fb.colorSpace=this.Dc;this.hq(fb,a.D.ah(y,f,cb,z,1==bb),!0);fb.wrapS=eb.ClampToEdgeWrapping;fb.wrapT=eb.ClampToEdgeWrapping;fb.minFilter=eb.LinearMipMapLinearFilter;fb.anisotropy=1;var ab=b.W+2*b.hb;let ib=b.W+2*b.hb;cb==x.$-1&&(ab=x.width-b.W*(x.$-1)+
2*b.hb);z==x.sa-1&&(ib=x.width-b.W*(x.sa-1)+2*b.hb);var db=new eb.PlaneGeometry(n*ab/x.width,n*ib/x.width,8),gb=new eb.MeshBasicMaterial({map:fb});db=new eb.Mesh(db,gb);gb.transparent=!0;gb.side=eb.FrontSide;gb=1*b.W;db.position.x=n*(cb*gb+ab/2-b.hb-x.width/2)/x.width;db.position.y=n*-(z*gb+ib/2-b.hb-x.width/2)/x.width;db.position.z=-.5*n;a.oc&&(db.visible=!1,db.layers.set(1==bb?1:2),fb.ggMesh=db,0==bb?w=db:(ab=w.material.map,fb.ggStereoPair=ab,ab.ggStereoPair=fb));e[y].add(db);db.frustumCulled=this.frustumCulled}4>
y?e[y].rotation.y=-y*Math.PI/2:e[y].rotation.x=(4==y?1:-1)*Math.PI/2;h.add(e[y])}}else for(b=a.bh,f=0;6>f;f++)for(e[f]=new eb.Group,x=0;x<r;x++)z=f,a.oc&&(z=f+(1==x?6:0)),y=new eb.Texture,y.colorSpace=this.Dc,this.hq(y,a.La(a.zh[z]),!1),y.wrapS=eb.ClampToEdgeWrapping,y.wrapT=eb.ClampToEdgeWrapping,y.minFilter=eb.LinearFilter,cb=new eb.PlaneGeometry(b*n,b*n,64),z=new eb.MeshBasicMaterial({map:y}),cb=new eb.Mesh(cb,z),z.transparent=!0,z.side=eb.FrontSide,cb.position.x=0,cb.position.y=0,cb.position.z=
-.5*n,a.oc&&(cb.layers.set(1==x?1:2),cb.visible=!1,y.ggMesh=cb,0==x?w=cb:(z=w.material.map,y.ggStereoPair=z,z.ggStereoPair=y)),e[f].add(cb),4>f?e[f].rotation.y=-f*Math.PI/2:e[f].rotation.x=(4==f?1:-1)*Math.PI/2,h.add(e[f])}hs(){let a=this.o,b=this.Hd;new lb(0,0,-100);let e=a.P.Ik;for(let x=0;x<a.L.length;x++){let y=a.L[x];if("poly"==y.type)continue;var f=null,h=y.Nv(),n=!1;let z=y.Yf?100:5;a.vrSkinObj&&a.vrSkinObj.addSkinHotspot&&(f=a.vrSkinObj.addSkinHotspot(y))&&(n=!0,f.userData.Iw&&(z=100));if(!n&&
(n=.22,!1!==h)){z=!y.distance||0>=y.distance?5:1>y.distance?1:5>y.distance?y.distance:5;y.nd?(n=(new eb.TextureLoader).load(y.nd),n.colorSpace=this.Dc,f=new eb.MeshBasicMaterial({map:n}),y.Yf?(n=2*z*Math.tan(y.fov/2*Math.PI/180),h=new eb.PlaneGeometry(n,n*y.Bd/y.tf,1,1),f.transparent=!0,f.opacity=1):(h=new eb.PlaneGeometry(.005*y.tf,.005*y.Bd,1,1),f.transparent=!0,f.opacity=.25),n=.005*y.Bd/2,f.side=eb.DoubleSide,f=new eb.Mesh(h,f)):(f=new eb.SphereGeometry(.2*this.Fl,16,16),h=(new eb.TextureLoader).load(this.yp(h)),
h.colorSpace=this.Dc,h=new eb.MeshBasicMaterial({map:h}),h.transparent=!0,h.opacity=.25,f=new eb.Mesh(f,h));var r=y.title;if(e.enabled&&""!=r){h=document.createElement("canvas");h.width=256;h.height=32;let cb=h.getContext("2d");this.Vi||(this.Vi=document.createElement("canvas"),this.Vi.width=h.width,this.Vi.height=h.height);let ab=this.Vi.getContext("2d");ab.clearRect(0,0,h.width,h.height);ab.font="16px Helvetica";ab.textAlign="center";ab.textBaseline="top";var w=ab.measureText(r);let db=w.width;
0<e.height&&(db=Math.min(e.width,h.width-6),db=Math.max(db,w.width));w=db+6;e.background&&(ab.fillStyle=this.o.Gb(e.ec,e.dc),ab.fillRect((h.width-db)/2-3,2,db+6,24));0<e.ij&&(ab.strokeStyle=this.o.Gb(e.hc,e.fc),ab.strokeRect((h.width-db)/2-3,2,db+6,24));ab.fillStyle=this.o.Gb(e.Jk,e.Hk);ab.fillText(r,h.width/2,5,h.width-6);cb.drawImage(this.Vi,(h.width-w)/2,2,w,24,0,0,h.width,h.height);r=new eb.Texture(h);r.colorSpace=this.Dc;r.needsUpdate=!0;h=new eb.PlaneGeometry(1.5*w/h.width,4.5/h.height,1,1);
r=new eb.MeshBasicMaterial({map:r,side:eb.DoubleSide});h=new eb.Mesh(h,r);h.translateY(-(n*this.Fl)-.09375);h.frustumCulled=this.frustumCulled;f.add(h);r.transparent=!0;r.opacity=.5}f.userData={O:y}}f&&(f.rotateY(y.pan*Math.PI/180),f.rotateX(y.u*Math.PI/180),f.translateZ(-z),f.castShadow=!1,f.receiveShadow=!1,f.frustumCulled=this.frustumCulled,b.add(f))}}gs(){var a=this.o;for(var b=0;b<a.Za.length;b++){var e=a.Za[b];if(e.j){var f=(new eb.TextureLoader).load(e.j.src);f.colorSpace=this.Dc;this.wo(e,
f)}}for(b=0;b<a.V.length;b++)e=a.V[b],e.j&&"_videopanorama"!=e.id&&!e.td&&(e.j.play(),f=new eb.VideoTexture(e.j),f.colorSpace=this.Dc,f.wrapS=eb.ClampToEdgeWrapping,f.wrapT=eb.ClampToEdgeWrapping,f.minFilter=eb.LinearFilter,this.wo(e,f))}wo(a,b){const e=this.mg;let f=Db/8;var h=2*Math.tan(a.fov*Math.PI/360)*f;let n;n=0<a.kc?h*a.$c/a.kc:h;a.Kc&&1!=a.Kc&&(n*=a.Kc);h=new eb.PlaneGeometry(h,n,5,5);b=new eb.MeshBasicMaterial({map:b,side:eb.DoubleSide,transparent:!0});b=new eb.Mesh(h,b);b.rotateY(a.pan*
Math.PI/180);b.rotateX(a.u*Math.PI/180);b.translateY(-0);b.translateZ(-f);b.rotateZ(-a.Ta*Math.PI/180);b.rotateY(-a.Ca*Math.PI/180);b.rotateX(-a.ya*Math.PI/180);b.userData=a;b.castShadow=!1;b.receiveShadow=!1;e.add(b)}xk(a,b,e){for(let f=0;f<this.mg.children.length;f++){let h=this.mg.children[f];h.userData.id==a&&this.fv(h,b,e)}}fv(a,b,e){b=2==b?a.visible?0:1:b;0<e?this.Ls(a,b,e):a.visible=1==b}Ls(a,b,e){1==b&&(a.material.opacity=0,a.visible=!0);let f=(new Date).getTime(),h=setInterval(()=>{let n=
(new Date).getTime()-f,r=n/e;a.material.opacity=0==b?1-r:r;n>e&&(0==b&&(a.visible=!1,a.material.opacity=1),clearInterval(h))},20)}Eh(a){for(let b=a.children.length-1;0<=b;b--){let e=a.children[b];this.Eh(e);a.remove(e)}a.geometry&&a.geometry.dispose();a.material&&(a.material.texture&&(a.material.texture.dispose(),a.material.texture.Gj=null,a.material.texture.bm=null),a.material.map&&(a.material.map.dispose(),a.material.map.Gj=null,a.material.map.bm=null),a.material.dispose())}Sf(){eb&&(this.Jj=[],
this.Eh(this.Gf),this.Eh(this.Hd),this.Eh(this.mg))}zu(){if(eb){var a=this.camera;a.aspect=window.innerWidth/window.innerHeight;a.updateProjectionMatrix();this.Sa.setSize(window.innerWidth,window.innerHeight)}}wq(){if(eb){var a=this.o;if(0<this.Pa.length){for(var b=0,e;b<this.Pa.length&&!e;)this.Bm(this.Pa[b])&&(e=this.Pa[0]),b++;e&&(b=e.userData,b.O&&!b.fromSkin?(e=b.O,a.Rc(e.url,e.target)):(this.ve(e,"onmousedown"),this.ve(e,"onclick")))}}}vq(a){if(eb){a=a.target;var b=this.hp(a);0<b.length&&this.fj(b,
a.userData.mj)}}hp(a){this.Si.identity().extractRotation(a.matrixWorld);this.Lg.ray.origin.setFromMatrixPosition(a.matrixWorld);this.Lg.ray.direction.set(0,0,-1).applyMatrix4(this.Si);return this.lm(this.Lg)}lm(a){let b=[],e;this.Hd.visible&&(e=a.intersectObjects(this.Hd.children,!0),b=b.concat(e));this.Ze.visible&&(e=a.intersectObjects(this.Ze.children,!0),b=b.concat(e));e=a.intersectObjects(this.Cc.children,!0);return b=b.concat(e)}fj(a,b=-1){for(let e=0;e<a.length;e++){const f=a[e].object;f&&f.userData&&
(void 0!==f.userData.isVisible&&f.userData.isVisible()||void 0===f.userData.isVisible&&this.Bm(f)||f.userData.clickInvisible&&this.Bm(f))&&(f.selected=!0,f.distance=a[e].distance,f.mj=b,this.Pa.push(f))}}Zt(a){var b=this.controller[a],e=b.getObjectByName("line");let f=this.hp(b);0<f.length&&this.fj(f,b.userData.mj);e&&(e.scale.z=0<this.Pa.length?this.Pa[0].distance:5);this.Rj==a&&(a=this.Cq.direction,b=this.Lg.ray.direction,e=a.clone(),e.sub(b),e.normalize(),a.angleTo(b)>Math.PI/4?Math.abs(e.x)+Math.abs(e.z)>
Math.abs(e.y)&&this.Fm<Date.now()&&(this.Og(0<e.x?20:-20),this.Fm=Date.now()+500):this.Fm=Date.now())}ro(){for(;this.Pa.length;)this.Pa.pop().selected=!1}uu(a){a.preventDefault();let b=this.ca,e=this.Sa;b.x=a.clientX/e.domElement.clientWidth*2-1;b.y=2*-(a.clientY/e.domElement.clientHeight)+1;1==a.buttons&&(this.ji=this.bd.x-b.x)}Yt(){var a=this.Lg;a.setFromCamera(this.ca,this.camera);a=this.lm(a);0<a.length&&this.fj(a)}$t(){var a=this.Lg;this.camera.updateProjectionMatrix();a.setFromCamera({x:0,y:0},
this.camera);a=this.lm(a);0<a.length&&this.fj(a)}vu(){this.ji=0;if(0<this.Pa.length){let a=this.Pa[0];a.userData.O||this.ve(a,"onmouseup")}}ve(a,b,e=!1){let f=a;do if(f.userData[b])if(e){var h=a.mj;0<=h&&this.Vb&&this.Vb[h]&&(h=this.Vb[h],h.hapticActuators&&0<h.hapticActuators.length&&h.hapticActuators[0].pulse(.8,5))}else f.userData[b]();while(!f.userData.stopPropagation&&(f=f.parent))}io(a,b){const e=this.nl;do if(a.userData.onclick||a.userData.O&&!a.userData.fromSkin)if(b)a.userData.Mi=-1;else if(a.userData.Mi&&
-1!=a.userData.Mi){const f=(Date.now()-a.userData.Mi)/1E3;1<=f?a.userData.onclick?(a.userData.onclick(),a.userData.Mi=-1):a.userData.O&&a.userData.O.url&&this.o.Rc(a.userData.O.url,a.userData.O.target):e.material instanceof eb.Material&&(e.material.opacity=.5+.5*f)}else a.userData.Mi=Date.now();while(!a.userData.stopPropagation&&(a=a.parent))}tu(a){var b=this.o;50>a.clientX&&50>a.clientY&&b.pg();if(0<this.Pa.length){a=this.Pa[0];for(b=1;b<this.Pa.length;b++)this.Pa[b].position.z>a.position.z&&(a=
this.Pa[b]);b=a.userData;b.O?(a=b.O,this.o.Rc(a.url,a.target)):(this.ve(a,"onclick"),this.ve(a,"onmousedown"))}else this.bd.x=this.ca.x,this.bd.y=this.ca.y}animate(){let a=this.jq=this;this.Sa&&this.Sa.setAnimationLoop(function(){a.render()})}render(){if(eb){var a=null;try{a=this.Sa.xr.getCamera()}catch(n){}!this.Uk&&a&&(a.add(this.gg),this.$m.add(a));if(this.Uk=a)this.Hd.translateY(a.position.y-this.Ij),this.Ij=a.position.y;var b=this.jq,e=b.o;if(e.qe){b.Zf=!0;b.controller.forEach(n=>{n.visible&&
(b.Zf=!1)});var f=this.Pt();this.Qt();this.lk&&0<this.Jj.length&&this.Jj.every(function(n){return n.Ip})&&(this.Eh(this.lk),this.Gf.remove(this.lk),this.lk=null);var h=this.Hd;for(let n=h.children.length-1;0<=n;n--){let r=h.children[n],w=1,x=1;r.selected?(w=1.5,x=1):f?(w=.6,x=.7):(w=.4,x=.5);let y=r.scale.x;y+=.1*(w-y);r.userData.fromSkin?r.userData.ggUse3d&&(y=10):(r.material.opacity+=.1*(x-r.material.opacity),r.userData&&r.userData.O&&r.userData.O.nd?(r.userData.O.Yf&&(y=1,r.material.opacity=1),
0<r.children.length&&(r.children[0].material.opacity=r.material.opacity)):(r.rotateY(1*Math.PI/180),0<r.children.length&&(r.children[0].rotateY(-1*Math.PI/180),r.children[0].material.opacity=r.material.opacity)));r.scale.x=r.scale.y=r.scale.z=y}f=b.camera.rotation.clone();f.reorder("YXZ");this.Nn=180*f.y/Math.PI;this.Vk=180*f.x/Math.PI;e.vrSkinObj&&!this.Ze.visible&&this.Go&&(0==this.Bk&&10<this.Vk||1==this.Bk&&-10>this.Vk?this.bk||(this.bk=!0,this.fu=new Date):(this.bk=!1,!this.rg&&!this.Cc.visible||
this.vj||(this.vj=!0,this.Kl=new Date),this.rg=!1),this.bk&&!this.rg&&!this.Cc.visible&&500<(new Date).getTime()-this.fu.getTime()&&(this.rg=!0,this.Kl=new Date),this.rg?(this.Cc.visible=!0,h=((new Date).getTime()-this.Kl.getTime())/5,100<=h?(this.Gi(1),this.rg=!1):this.Gi(h/100)):this.vj&&(h=((new Date).getTime()-this.Kl.getTime())/5,100<=h?(this.Gi(0),this.vj=!1):this.Gi(1-h/100)));this.Ym&&(this.Og(this.Nn-e.D.pan.m),this.Ym=!1);e.hn(this.Nn-this.Pf,this.Vk,180*f.z/Math.PI);e=this.gg;b.Zf?a&&(e.visible=
!0):e.visible=!1;e=this.Cc;a&&!this.Ze.visible&&(e.translateZ(-(this.Vg+.1)),e.rotateY(-this.Bn),f=new eb.Vector3(0,0,1),f.applyEuler(a.rotation),this.Bn=Math.atan2(f.x,f.z),e.rotateY(this.Bn),e.translateZ(this.Vg+.1));b.Sa.autoClear=!0;b.Sa.render(b.$m,b.camera);b.Sa.autoClear=!1;b.Sa.clearDepth();b.Sa.render(b.Hv,b.camera);0==this.ji||isNaN(this.ji)||this.Og(this.ji)}}}Pt(){function a(x,y){if(b.Vb[x].buttons[y].pressed){if(!b.ml.get(x+"_"+y))return b.ml.set(x+"_"+y,!0),!0}else b.ml.set(x+"_"+y,
!1);return!1}let b=this;const e=b.o;this.Vb=[];let f=!0;this.session?(this.session.inputSources.forEach(x=>{let y=x.profiles;"gaze"==x.targetRayMode?b.Zf=!0:(this.Vb.push(x.gamepad),0<=y.indexOf("oculus-go")&&(f=!1),0<=y.indexOf("generic-trigger-squeeze-thumbstick")&&(f=!0),0<=y.indexOf("oculus-touch")&&(f=!0))}),this.Vb.push(...navigator.getGamepads())):this.Vb=navigator.getGamepads&&navigator.getGamepads();let h=!1;if(this.Vb)for(let x=0;x<this.Vb.length;x++){var n=this.Vb[x];if(n&&0<n.buttons.length)if(6<
n.buttons.length&&(a(x,4)&&e.Rc("{"+e.xp()+"}"),a(x,5)&&e.Rc("{"+e.pp()+"}")),2<=n.axes.length&&2<n.buttons.length&&!f)if(n.buttons[2].pressed)this.Kf[x]||(this.Kf[x]=!0,this.Xe());else if(n.buttons[2].touched){h=!0;this.Kf[x]=!1;var r=n.axes[0];n=n.axes[1];if(-1==this.Me[x])this.Me[x]=r;else{var w=this.Me[x]-r;-.3>w&&(this.Og(20),this.Me[x]=r,this.Ne[x]=n);.3<w&&(this.Og(-20),this.Me[x]=r,this.Ne[x]=n)}-1==this.Ne[x]?this.Ne[x]=n:(w=this.Ne[x]-n,-.5>w&&(this.Xe(!0),this.Ne[x]=n,this.Me[x]=r),.5<
w&&(this.Xe(!1),this.Ne[x]=n,this.Me[x]=r))}else this.Me[x]=-1,this.Ne[x]=-1,this.Kf[x]=!1;else 4<=n.axes.length&&(r=n.axes[2],.8<r?(h=!0,1!=this.Jf[x]&&(this.Jf[x]=1,this.Wj[x]=Date.now()-1E4)):-.8>r?(h=!0,-1!=this.Jf[x]&&(this.Jf[x]=-1,this.Wj[x]=Date.now()-1E4)):this.Jf[x]=0,0!=this.Jf[x]&&400<Date.now()-this.Wj[x]&&(this.Wj[x]=Date.now(),this.Og(20*this.Jf[x])),n.buttons[1].pressed?this.Kf[x]||(this.Kf[x]=!0,this.Xe()):this.Kf[x]=!1)}b.lj.visible==(!this.Vb||0==this.Vb.length)&&(b.lj.visible=
!b.lj.visible);return h}Nu(a){for(a=a.parent;a;){if(a.selected)return!0;a=a.parent}return!1}Bm(a){let b=a.visible||a.userData.clickInvisible;for(a=a.parent;b&&a;)b=b&&a.visible,a=a.parent;return b}Qt(){let a=this.jq;a.gk=a.Pa.slice();a.ro();for(var b=0;b<a.controller.length;b++)a.controller[b].visible&&a.Zt(b);a.Nl||a.Yt();if(a.Zf){a.$t();b=this.nl;b.position.z=0<a.Pa.length?-a.Pa[0].distance+.1:-5;var e=-.2*b.position.z;b.scale.set(e,e,e);b.material instanceof eb.Material&&(b.material.opacity=.2)}for(b=
0;b<a.Pa.length;b++)e=a.Pa[b],a.Zf&&this.io(e,!1),-1==a.gk.indexOf(e)&&(this.ve(e,"onmouseenter"),this.Vb&&0<this.Vb.length&&this.ve(e,"onclick",!0));for(b=0;b<a.gk.length;b++)e=a.gk[b],-1==a.Pa.indexOf(e)&&(this.Nu(e)||this.ve(e,"onmouseleave"),a.Zf&&this.io(e,!0))}Xe(a){let b=this.Ze;void 0===a&&(a=!b.visible);let e=this.Uk;a?(b.translateZ(-this.Vg),b.rotateY(-this.kn),e&&(a=new eb.Vector3(0,0,1),a.applyEuler(e.rotation),this.kn=Math.atan2(a.x,a.z)),b.rotateY(this.kn),b.translateZ(this.Vg),this.Ze.visible=
!0,this.Cc.visible=!0,this.Gi(1),this.Uf.visible=!1,this.zg.visible=!0):(this.Ze.visible=!1,this.Cc.visible=!1,this.Uf.visible=!0,this.zg.visible=!1)}Gi(a){this.Uf.userData.setOpacity(a);0==a&&(this.Cc.visible=!1)}Nq(a){a.position.x=0;a.position.y=0;a.position.z=0;a.userData.x=0;a.userData.y=0;a.userData.z=0}nv(a){this.Nq(a);this.Cc.remove(this.Uf);a.userData.setOpacity(0);this.Uf=a;this.Cc.add(this.Uf)}av(a){this.Nq(a);this.Cc.remove(this.zg);a.userData.setOpacity(1);a.visible=!1;this.zg=a;this.Cc.add(this.zg)}Tu(){this.Pf=
0;this.Re.setRotationFromEuler(this.tq)}Og(a){this.Pf+=a;this.Re.rotateY(a*Math.PI/180)}Uq(a,b){a&&(this.Dc=a);b&&(this.Pn=b)}}class Ab{constructor(){this.value=this.time=0;this.Ln="";this.pf=this.nf=this.mf=this.lf=this.sb=this.type=this.Kb=0;this.yd="";this.Xn=0}}class Tb{constructor(){this.Yv=this.ms=this.length=0}}class Ub{}class Cb{Xq(){this.rc=1;this.Pc=this.sc=this.Nb=0;this.tc=1;this.uc=this.Zb=this.Qc=0;this.$b=1}constructor(){this.Xq()}clone(a){this.rc=a.rc;this.Nb=a.Nb;this.sc=a.sc;this.Pc=
a.Pc;this.tc=a.tc;this.Qc=a.Qc;this.Zb=a.Zb;this.uc=a.uc;this.$b=a.$b}kv(a){let b=Math.cos(a);a=Math.sin(a);this.rc=1;this.Pc=this.sc=this.Nb=0;this.tc=b;this.Qc=-a;this.Zb=0;this.uc=a;this.$b=b}lv(a){let b=Math.cos(a);a=Math.sin(a);this.rc=b;this.Nb=0;this.sc=a;this.Pc=0;this.tc=1;this.Qc=0;this.Zb=-a;this.uc=0;this.$b=b}mv(a){let b=Math.cos(a);a=Math.sin(a);this.rc=b;this.Nb=-a;this.sc=0;this.Pc=a;this.tc=b;this.uc=this.Zb=this.Qc=0;this.$b=1}bc(a){this.ya(a*Math.PI/180)}Sc(a){this.Ca(a*Math.PI/
180)}le(a){this.Ta(a*Math.PI/180)}ya(a){this.sd||(this.sd=new Cb,this.Pe=new Cb);this.sd.kv(a);this.Pe.clone(this);this.multiply(this.sd,this.Pe)}Ca(a){this.sd||(this.sd=new Cb,this.Pe=new Cb);this.sd.lv(a);this.Pe.clone(this);this.multiply(this.sd,this.Pe)}Ta(a){this.sd||(this.sd=new Cb,this.Pe=new Cb);this.sd.mv(a);this.Pe.clone(this);this.multiply(this.sd,this.Pe)}multiply(a,b){this.rc=a.rc*b.rc+a.Nb*b.Pc+a.sc*b.Zb;this.Nb=a.rc*b.Nb+a.Nb*b.tc+a.sc*b.uc;this.sc=a.rc*b.sc+a.Nb*b.Qc+a.sc*b.$b;this.Pc=
a.Pc*b.rc+a.tc*b.Pc+a.Qc*b.Zb;this.tc=a.Pc*b.Nb+a.tc*b.tc+a.Qc*b.uc;this.Qc=a.Pc*b.sc+a.tc*b.Qc+a.Qc*b.$b;this.Zb=a.Zb*b.rc+a.uc*b.Pc+a.$b*b.Zb;this.uc=a.Zb*b.Nb+a.uc*b.tc+a.$b*b.uc;this.$b=a.Zb*b.sc+a.uc*b.Qc+a.$b*b.$b}lu(a){let b,e,f;b=a.x;e=a.y;f=a.z;a.x=b*this.rc+e*this.Nb+f*this.sc;a.y=b*this.Pc+e*this.tc+f*this.Qc;a.z=b*this.Zb+e*this.uc+f*this.$b}}class qd{constructor(){this.levels=[];this.kk="0x000000";this.Fq=!1;this.gq=this.fq=.4;this.W=512;this.hb=1;this.um=0;this.vm="";this.Kq=this.height=
this.width=0}}class Vb{constructor(){this.height=this.width=0;this.Kg=this.cache=!1;this.sa=this.$=0;this.loaded=!1;this.Na={}}}class Hb{constructor(a){this.id=0;this.Zd=this.ub=this.M=null;this.loaded=this.visible=!1;this.Df=this.Eb=null;this.Te=this.Sm=0;this.vg=[];this.dm=0;this.mb=[];this.Yj=this.Oa=0;this.level=null;this.Uj=0;this.id=a}}class Wb{constructor(a,b){this.Aa=kb.create();this.$a=kb.create();this.ee=0;this.yi=this.md=this.we=this.oj=this.tg=this.zi=this.Tm=this.Um=null;this.gb=[];this.Fb=
null;this.Yh=!1;this.tn=this.Ml=this.Rm=1;this.kg=1E6;this.nj=[!1,!1,!1,!1,!1,!1];this.Cn=0;this.cl=1;this.Ck=!1;this.El=[];this.Fh=!1;this.On=8;this.gu=new Cb;this.offset=this.En=0;this.ye=[];this.Mn=null;this.o=a;this.D=b;b.Gg=this;if(a.Lc||a.Uh)b.An=2}Th(){const a=this.o;let b=a.N;if(b){var e=b.createShader(b.FRAGMENT_SHADER);if(e){b.shaderSource(e,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nvarying vec2 vTextureCoord;\n\t\t\t\t\tuniform sampler2D uSampler;\n\t\t\t\t\tvoid main(void) {\n\t\t\t\t\t\tgl_FragColor = texture2D(uSampler, vec2(vTextureCoord.s, vTextureCoord.t));\n\t\t\t\t\t}");
b.compileShader(e);b.getShaderParameter(e,b.COMPILE_STATUS)||(console&&console.log(b.getShaderInfoLog(e)),alert(b.getShaderInfoLog(e)),e=null);var f=b.createShader(b.VERTEX_SHADER);a.Jc(f,"#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.R=b.createProgram();a.Mf(this.R,f,e);this.R.la=b.getAttribLocation(this.R,"aVertexPosition");b.enableVertexAttribArray(this.R.la);this.R.Ea=b.getAttribLocation(this.R,"aTextureCoord");b.enableVertexAttribArray(this.R.Ea);this.R.Qe=b.getUniformLocation(this.R,"uPMatrix");this.R.li=b.getUniformLocation(this.R,"uMVMatrix");this.R.Pg=b.getUniformLocation(this.R,"uSampler");this.R.al=b.getUniformLocation(this.R,"uZoffset");e=b.createShader(b.VERTEX_SHADER);a.Jc(e,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nattribute vec3 aVertexPosition;\n\t\t\t\tuniform vec2 uCanvasDimensions;\n\t\t\t\tvoid main(void) {\n\t\t\t\t\tvec2 pointNorm = (aVertexPosition.xy / uCanvasDimensions) * 2.0 - vec2(1.0, 1.0);\n\t\t\t\t\tgl_Position = vec4(pointNorm.x, pointNorm.y * -1.0, 0.0, 1.0);\n\t\t\t\t}");
f=b.createShader(b.FRAGMENT_SHADER);a.Jc(f,"#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.je=b.createProgram();a.Mf(this.je,e,f);this.je.la=b.getAttribLocation(this.je,"aVertexPosition");b.enableVertexAttribArray(this.je.la);f=b.createShader(b.VERTEX_SHADER);a.Jc(f,"precision highp float;\n\t\t\t\tattribute vec3 aVertexPosition;\n\t\t\t\tvarying vec2 vTextureCoord;\n\t\t\t\tuniform vec2 uCanvasDimensions;\n\t\t\t\tuniform vec4 uRect;\n\t\t\t\tvoid main(void) {\n\t\t\t\t\tvec2 pos = vec2(uRect.x + uRect.z*aVertexPosition.x,uRect.y + uRect.w*aVertexPosition.y);\n\t\t\t\t\tvec2 pointNorm = (pos / uCanvasDimensions) * 2.0 - vec2(1.0, 1.0);\n\t\t\t\t\tgl_Position = vec4(pointNorm.x, pointNorm.y * -1.0, 1.0, 1.0);\n\t\t\t\t\tvTextureCoord.s=aVertexPosition.x;\n\t\t\t\t\tvTextureCoord.t=1.0-aVertexPosition.y;\n\t\t\t\t}");
e=b.createShader(b.FRAGMENT_SHADER);a.Jc(e,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nvarying vec2 vTextureCoord;\n\t\t\t\tuniform sampler2D uSampler;\n\t\t\t\tvoid main(void) {\n\t\t\t\t\tgl_FragColor = texture2D(uSampler,vTextureCoord);\n\t\t\t\t}");this.tg=b.createProgram();a.Mf(this.tg,f,e)}else console.log("error creating shader")}}Mj(){let a=this.o,b=a.N,e;if(b){e=b.createShader(b.FRAGMENT_SHADER);var f=this.Yl(13);a.Jc(e,f);f=b.createShader(b.VERTEX_SHADER);
a.Jc(f,"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.Tm=b.createProgram();a.Mf(this.Tm,f,e);e=b.createShader(b.FRAGMENT_SHADER);f=this.Yl(4);a.Jc(e,f);f=b.createShader(b.VERTEX_SHADER);a.Jc(f,"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.Um=b.createProgram();a.Mf(this.Um,f,e);this.yo();this.yi||(this.yi=b.createBuffer())}}yo(){const a=this.o,b=a.N;const e=b.createShader(b.FRAGMENT_SHADER);var f=this.Yl(a.B.format);a.Jc(e,f);f=b.createShader(b.VERTEX_SHADER);a.Jc(f,"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.zi&&b.deleteProgram(this.zi);this.zi=b.createProgram();a.Mf(this.zi,f,e);b.deleteShader(f);b.deleteShader(e)}Yl(a){let b=this.o,e;e="#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 float transitionBlend;\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";
e=(13==a?e+"uniform samplerCube cubeTexture;":e+"uniform sampler2D tileTexture;\n")+"void main()\n{\n";e+="vec4 direction;\n";e+="vec2 src;\n";e+="vec2 srcCord;\n";e+="vec2 texc;\n";let f=this.Bp(b.Z());if(b.Z()!=b.Ic()&&0!=b.Ic()){let h=this.Bp(b.Ic());e+="vec4 direction1,direction2;\n";e+=f.replace("direction=","direction1=");e+=h.replace("direction=","direction2=");e+="direction=normalize(mix(direction1, direction2,1.0-directionBlend));\n"}else e+=f;e+="direction=direction*matRotate;\n";13==a&&
(e+="direction.z=-direction.z;",e+="gl_FragColor = textureCube(cubeTexture, direction.xyz);",e+="gl_FragColor.a *= transitionBlend;\n");4==a&&(e+="float iz=1.0/(direction.z * rectSrcDistance);\n",e+="src.x=-direction.x*iz;\n",e+="src.y= direction.y*iz;\n",e+="texc=src * srcScale + srcOffset;\n",e+="if (",e+="(direction.z<0.0) && ",e+="(texc.x>=0.0) && (texc.x<=1.0) && (texc.y>=0.0) && (texc.y<=1.0)) {\n",this.Fh?e+=" gl_FragColor = vec4(0.5,0.5,0,1);\n":(e+=" gl_FragColor = texture2D(tileTexture, texc);\n",
e+=" gl_FragColor.a*= transitionBlend;\n"),e+="} else {\n",e=this.Fh?e+" gl_FragColor = vec4(0.5,0,0,0.3);\n":e+" discard;\n",e+="}\n");1==a&&(e+="src.x=atan(float(-direction.x), float(-direction.z));",e+="src.y=asin(direction.y);\n",e+="texc=src * srcScale + srcOffset;\n",e+="gl_FragColor = texture2D(tileTexture, texc);\n");15==a&&(e+="src.x=atan(float(-direction.x), float(-direction.z));",e+="src.y=asin(direction.y);\n",e+="texc=src * srcScale + srcOffset;\n",e=b.oc?e+"vec2 s=step(vec2(0.5,0.0), texc) - step(vec2(1.0,1.0), texc);\n":
e+"vec2 s=step(vec2(0.0,0.0), texc) - step(vec2(1.0,1.0), texc);\n",e+="gl_FragColor = s.x*s.y*texture2D(tileTexture, texc);\n");14==a&&(e+="vec2 cf;\n",e+="if ((direction.z<0.0) && (direction.z<=-abs(direction.x)) && (direction.z<=-abs(direction.y))) {\n",e+=" src.x=-direction.x/direction.z;\n",e+=" src.y=+direction.y/direction.z;\n",e+=" cf.x=1.0;cf.y=3.0;\n",e+="}\n",e+="if ((direction.x>=0.0) && (direction.x>=abs(direction.y)) && (direction.x>=abs(direction.z))) {\n",e+=" src.x=+direction.z/direction.x;\n",
e+=" src.y=-direction.y/direction.x;\n",e+=" cf.x=3.0;cf.y=3.0;\n",e+="}\n",e+="if ((direction.z>=0.0) && (direction.z>=abs(direction.x)) && (direction.z>=abs(direction.y))) {\n",e+=" src.x=-direction.x/direction.z;\n",e+=" src.y=-direction.y/direction.z;\n",e+=" cf.x=5.0;cf.y=3.0;\n",e+="}\n",e+="if ((direction.x<=0.0) && (direction.x<=-abs(direction.y)) && (direction.x<=-abs(direction.z))) {\n",e+=" src.x=+direction.z/direction.x;\n",e+=" src.y=+direction.y/direction.x;\n",e+=" cf.x=1.0;cf.y=1.0;\n",
e+="}\n",e+="if ((direction.y>=0.0) && (direction.y>=abs(direction.x)) && (direction.y>=abs(direction.z))) {\n",e+=" src.x=+direction.x/direction.y;\n",e+=" src.y=-direction.z/direction.y;\n",e+=" cf.x=5.0;cf.y=1.0;\n",e+="}\n",e+="if ((direction.y<=0.0) && (direction.y<=-abs(direction.x)) && (direction.y<=-abs(direction.z))) {\n",e+=" src.x=-direction.x/direction.y;\n",e+=" src.y=-direction.z/direction.y;\n",e+=" cf.x=3.0;cf.y=1.0;\n",e+="}\n",e+="texc.x=(cf.x+src.x*srcScale.x) / 6.0;\n",e+=
"texc.y=(cf.y+src.y*srcScale.y) / 4.0;\n",e+="gl_FragColor = texture2D(tileTexture, texc);\n");return e+="}\n"}Bp(a){let b="";switch(a){case 4:b+="direction.x=dst.x*rectDstDistance;\ndirection.y=dst.y*rectDstDistance;\ndirection.z=-1.0;\n";break;case 12:b+="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:b+="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 b+
"direction.w=0.0;\ndirection=normalize(direction);\n"}Rp(a){let b,e,f,h,n=this.o,r=this.o.N;this.oj=r.createBuffer();r.bindBuffer(r.ARRAY_BUFFER,this.oj);let w=[-1,-1,1,1,-1,1,1,1,1,-1,1,1];for(b=0;12>b;b++)2>b%3&&(w[b]*=a);r.bufferData(r.ARRAY_BUFFER,new Float32Array(w),r.STATIC_DRAW);this.we=r.createBuffer();r.bindBuffer(r.ARRAY_BUFFER,this.we);let x=[1,0,0,0,0,1,1,1];r.bufferData(r.ARRAY_BUFFER,new Float32Array(x),r.STATIC_DRAW);this.md=r.createBuffer();r.bindBuffer(r.ELEMENT_ARRAY_BUFFER,this.md);
let y=[0,1,2,0,2,3];r.bufferData(r.ELEMENT_ARRAY_BUFFER,new Uint16Array(y),r.STATIC_DRAW);w=[];y=[];x=[];let z=new lb;for(a=0;6>a;a++){f=a%3;h=3>a?1:0;for(e=0;4>e;e++){z.x=-1;z.y=-1;z.z=1;for(b=0;b<e;b++)z.Qq();x.push((0>z.x?.33:0)+.33*f,(0>z.y?0:.5)+.5*h);if(4>a)for(b=0;b<a;b++)z.Xu();else 5==a?z.Wu():z.Vu();w.push(z.x,z.y,z.z)}b=4*a;y.push(0+b,1+b,2+b,0+b,2+b,3+b)}n.B.Rk=r.createBuffer();r.bindBuffer(r.ARRAY_BUFFER,n.B.Rk);r.bufferData(r.ARRAY_BUFFER,new Float32Array(w),r.STATIC_DRAW);n.B.Ti=r.createBuffer();
r.bindBuffer(r.ARRAY_BUFFER,n.B.Ti);r.bufferData(r.ARRAY_BUFFER,new Float32Array(x),r.STATIC_DRAW);n.B.Lj=r.createBuffer();r.bindBuffer(r.ELEMENT_ARRAY_BUFFER,n.B.Lj);r.bufferData(r.ELEMENT_ARRAY_BUFFER,new Uint16Array(y),r.STATIC_DRAW);this.Ot=r.createBuffer();this.Nt=r.createBuffer()}fm(a){let b=this;return function(){try{if(a.qu)return;let e=b.o.N;e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,1);let f=!1;null!=a.Nf&&a.Nf.complete?a.Mp||(e.bindTexture(e.TEXTURE_2D,a),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,
e.UNSIGNED_BYTE,a.Nf),f=a.Mp=!0):null!=a.Rf&&a.Rf.complete&&(e.bindTexture(e.TEXTURE_2D,a),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,a.Rf),f=!0);f&&(a.loaded=!0,b.o.F.ed&&("previewtrack"==b.o.F.delay||"videopano"==b.o.F.delay&&!b.o.B.j)&&b.Eq()&&b.o.Fk(null));e.bindTexture(e.TEXTURE_2D,null);e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,0)}catch(e){}b.o.update(2)}}Tp(){let a=this.o,b=a.N;if(this.gb)for(;0<this.gb.length;)b.deleteTexture(this.gb.pop());this.gb=[];for(let h=0;6>h;h++){var e=b.createTexture();
this.ee++;e.Rf=null;e.Nf=null;e.Mp=!1;b.bindTexture(b.TEXTURE_2D,e);b.texImage2D(b.TEXTURE_2D,0,b.RGBA,1,1,0,b.RGBA,b.UNSIGNED_BYTE,null);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);if(a.Ah[h]){var f=new Image;f.crossOrigin=a.crossOrigin;f.src=a.La(a.Ah[h]);e.Rf=f;f.addEventListener&&f.addEventListener("load",this.fm(e),!1);a.ld.push(f)}this.gb.push(e)}for(e=
0;6>e;e++)a.zh[e]&&(f=new Image,f.crossOrigin=a.crossOrigin,f.src=a.La(a.zh[e]),f.addEventListener?f.addEventListener("load",this.fm(this.gb[e]),!1):f.onload=this.fm(this.gb[e]),this.gb[e].Nf=f,a.ld.push(f));for(f=0;f<a.V.length;f++)a.V[f].td||(a.V[f].texture=b.createTexture(),a.ee++,b.bindTexture(b.TEXTURE_2D,a.V[f].texture),b.texImage2D(b.TEXTURE_2D,0,b.RGB,1,1,0,b.RGB,b.UNSIGNED_BYTE,null));a.B.texture=b.createTexture();a.ee++;b.bindTexture(b.TEXTURE_2D,a.B.texture);b.texImage2D(b.TEXTURE_2D,0,
b.RGB,1,1,0,b.RGB,b.UNSIGNED_BYTE,null);b.bindTexture(b.TEXTURE_2D,null)}ow(){var a=this.o;if(a.N){var b=a.N;b.useProgram(this.R);this.Ug(0);b.uniform1i(this.R.Pg,0);b.enableVertexAttribArray(this.R.la);b.enableVertexAttribArray(this.R.Ea);b.bindBuffer(b.ARRAY_BUFFER,this.we);b.vertexAttribPointer(this.R.Ea,2,b.FLOAT,!1,0,0);b.activeTexture(b.TEXTURE0);b.bindBuffer(b.ELEMENT_ARRAY_BUFFER,this.md);b.uniform1f(this.R.al,1E-4);b.vertexAttribPointer(this.R.la,3,b.FLOAT,!1,0,0);kb.identity(this.$a);kb.perspective(a.Db(),
a.Ya.width/a.Ya.height,.1,100,this.$a);b.uniformMatrix4fv(this.R.Qe,!1,this.$a);for(a=0;6>a;a++)this.Ug(a),b.bindBuffer(b.ARRAY_BUFFER,this.oj),b.vertexAttribPointer(this.R.la,3,b.FLOAT,!1,0,0),b.bindBuffer(b.ARRAY_BUFFER,this.we),b.vertexAttribPointer(this.R.Ea,2,b.FLOAT,!1,0,0),6<=this.gb.length&&this.gb[a].loaded&&(b.activeTexture(b.TEXTURE0),b.bindTexture(b.TEXTURE_2D,this.gb[a]),b.bindBuffer(b.ELEMENT_ARRAY_BUFFER,this.md),b.uniform1i(this.R.Pg,0),b.uniformMatrix4fv(this.R.li,!1,this.Aa),b.uniformMatrix4fv(this.R.Qe,
!1,this.$a),b.drawElements(b.TRIANGLES,6,b.UNSIGNED_SHORT,0))}}Nr(){let a=this.o;var b=this.D;b.M.kk&&6<b.M.kk.length&&(b=parseInt(b.M.kk),a.N.clearColor((b>>16&255)/255,(b>>8&255)/255,(b>>0&255)/255,1))}Ug(a,b=1){const e=this.D;kb.identity(this.Aa);kb.rotate(this.Aa,b*-e.Y.m*Math.PI/180,[0,0,1]);kb.rotate(this.Aa,b*-e.u.m*Math.PI/180,[1,0,0]);-1==b?kb.rotate(this.Aa,-e.pan.m*Math.PI/180,[0,1,0]):kb.rotate(this.Aa,(180-e.pan.m)*Math.PI/180,[0,1,0]);e.qb&&(kb.rotate(this.Aa,-e.qb.pitch*Math.PI/180,
[1,0,0]),kb.rotate(this.Aa,e.qb.Y*Math.PI/180,[0,0,1]));4>a?kb.rotate(this.Aa,-Math.PI/2*a,[0,1,0]):kb.rotate(this.Aa,Math.PI/2*(5==a?1:-1),[1,0,0])}Ov(a){let b=this;return function(){b.El.push(a)}}Gs(a){function b(){a.Eb=f.createTexture();e.o.ee++;f.pixelStorei(f.UNPACK_FLIP_Y_WEBGL,1);f.bindTexture(f.TEXTURE_2D,a.Eb);try{f.texImage2D(f.TEXTURE_2D,0,f.RGBA,f.RGBA,f.UNSIGNED_BYTE,a.M)}catch(h){f.texImage2D(f.TEXTURE_2D,0,f.RGBA,1,1,0,f.RGBA,f.UNSIGNED_BYTE,new Uint8Array([128,128,128,250]))}}let e=
this;e.o.Ha=!0;e.o.Dh=!0;a.loaded=!0;a.Sm=0;a.Te=0;let f=e.o.N;this.Co();null!=a.M&&a.M.complete&&("decode"in a.M?a.M.decode().then(()=>{a.M&&(a.ub=document.createElement("canvas"),a.ub.width=a.M.width,a.ub.height=a.M.height,a.Zd=a.ub.getContext("2d"),a.Zd&&a.Zd.drawImage(a.M,0,0),b(),a.Zd&&(delete a.Zd,a.Zd=null))}):b());e.o.update(2)}Co(){this.D.Ui&&this.D.Ui--}Hs(){let a=2;for(;0<this.El.length&&0<a;){let b=this.El.shift();this.Gs(b);a--}}mu(a){const b=this,e=b.o;return function(){e.Ha=!0;e.Dh=
!0;const f=b.D.M;try{if(null!=a&&a.complete){let h=f.levels[f.levels.length-1],n=f.hb;h.height=h.width=a.width-2*n;h.$=h.sa=1;for(let r=0;6>r;r++){let w=new Hb(r);w.ub=document.createElement("canvas");b.o.pa?(w.ub.width=h.width+2*n,w.ub.height=h.height+2*n):(w.ub.width=f.W+2*n,w.ub.height=f.W+2*n);w.Zd=w.ub.getContext("2d");w.ub.style[b.o.Ae+"Origin"]="0% 0%";w.ub.style.overflow="hidden";w.ub.style.position="absolute";w.M=a;let x=h.width+2*n,y=h.height+2*n;w.Zd&&w.Zd.drawImage(a,0,r*y,x,y,0,0,x,y);
if(b.o.pa&&b.o.N){let z=b.o.N;z.pixelStorei(z.UNPACK_FLIP_Y_WEBGL,1);w.Eb=z.createTexture();b.o.ee++;z.bindTexture(z.TEXTURE_2D,w.Eb);try{z.texImage2D(z.TEXTURE_2D,0,z.RGBA,z.RGBA,z.UNSIGNED_BYTE,w.ub)}catch(cb){}z.bindTexture(z.TEXTURE_2D,null);z.pixelStorei(z.UNPACK_FLIP_Y_WEBGL,0)}b.o.ih&&(w.ub.Gw=-1,b.o.ia.insertBefore(w.ub,b.o.ia.firstChild));h.Na[r]=w}h.loaded=!0;b.o.F.ed&&("previewtrack"==b.o.F.delay||"videopano"==b.o.F.delay&&!b.o.B.j)&&b.o.Fk(null)}}catch(h){}b.o.update(2)}}Gr(a){let b=this;
return function(){b.o.Ha=!0;b.o.Dh=!0;b.Co();a.M=null}}mw(){let a=this.o,b=this.D;var e=b.M;let f=e.levels;if(a.N){var h=a.N;h.useProgram(this.R);h.enable(h.DEPTH_TEST);kb.identity(this.$a);kb.perspective(b.Db(),a.Ya.width/a.Ya.height,.1,100,this.$a);h.uniformMatrix4fv(this.R.Qe,!1,this.$a);b.aw();b.iq();var n=b.No();var r=f.length-1;for(b.pe=0;r>=n;){var w=f[r],x=1;r==f.length-1&&0==e.hb&&(x=e.W/(e.W-.5));for(var y=0;6>y;y++){var z=void 0;z=b.cube.xf[y];var cb=z.pi;if(z.Xb&&0<cb.cj&&0<cb.Wk&&0<cb.scale||
w.cache){z.Ha=!1;var ab=void 0;z.bounds[r]||(z.bounds[r]={fx:0,fy:0,Jd:0,Kd:0});ab=z.bounds[r];w.cache?(ab.fx=0,ab.fy=0,ab.Jd=w.$-1,ab.Kd=w.sa-1):b.At(w,cb,ab);cb=!0;for(var db=ab.fy;db<=ab.Kd;db++)for(let bb=ab.fx;bb<=ab.Jd;bb++){var gb=bb+db*w.$+y*w.$*w.sa;let fb=w.Na[gb];fb||(fb=w.Na[gb]=new Hb(gb));this.uj()?fb.M||(fb.Te?fb.Te--:(this.$j(fb,w,b.ah(y,r,bb,db)),a.Ha=!0)):b.pe++;if(fb.Eb){if(!fb.Df){gb=.5*r+1;fb.Df=h.createBuffer();h.bindBuffer(h.ARRAY_BUFFER,fb.Df);let ib=[-1,-1,1,1,-1,1,1,1,1,
-1,1,1];ib[3]=bb*e.W-e.hb;ib[0]=Math.min((bb+1)*e.W,w.width)+e.hb;ib[7]=db*e.W-e.hb;ib[1]=Math.min((db+1)*e.W,w.height)+e.hb;ib[4]=ib[1];ib[6]=ib[3];ib[9]=ib[0];ib[10]=ib[7];for(let hb=0;12>hb;hb++)ib[hb]=0==hb%3?x*gb*(-2*ib[hb]/w.width+1):1==hb%3?x*gb*(-2*ib[hb]/w.height+1):gb;h.bufferData(h.ARRAY_BUFFER,new Float32Array(ib),h.STATIC_DRAW)}}else cb=!1;fb.visible=z.Xb}ab.eq=cb}}r--}for(e=0;6>e;e++)if(w=b.cube.xf[e],w.Xb)for(x=w.pi,this.Ug(e),h.uniform1i(this.R.Pg,0),h.uniformMatrix4fv(this.R.Qe,!1,
this.$a),h.uniformMatrix4fv(this.R.li,!1,this.Aa),h.enableVertexAttribArray(this.R.la),h.enableVertexAttribArray(this.R.Ea),h.bindBuffer(h.ARRAY_BUFFER,this.we),h.vertexAttribPointer(this.R.Ea,2,h.FLOAT,!1,0,0),h.activeTexture(h.TEXTURE0),h.bindBuffer(h.ELEMENT_ARRAY_BUFFER,this.md),h.useProgram(this.R),r=n;r<=f.length-1;){y=f[r];if(w.Xb&&0<x.cj&&w.bounds[r]&&0<=w.bounds[r].fx){z=w.bounds[r];for(ab=z.fy;ab<=z.Kd;ab++)for(cb=z.fx;cb<=z.Jd;cb++)(db=y.Na[cb+ab*y.$+e*y.$*y.sa])&&db.Eb&&(h.uniform1f(this.R.al,
1E-4*(cb%2+ab%2*2)),h.bindBuffer(h.ARRAY_BUFFER,db.Df),h.vertexAttribPointer(this.R.la,3,h.FLOAT,!1,0,0),h.bindTexture(h.TEXTURE_2D,db.Eb),this.Ki(h),h.drawElements(h.TRIANGLES,6,h.UNSIGNED_SHORT,0)),db.visible=w.Xb;z.eq&&(r=f.length)}r++}this.Wm();a.Dh=!1}}Ki(a){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)}uj(){return this.D.Ui<
this.D.An}$j(a,b,e){let f=this.D,h=this.o;f.Ut++;a.M=new Image;a.Sm++;a.Te=1<<a.Sm;a.M.onload=this.Ov(a);a.M.onerror=this.Gr(a);a.M.onabort=this.Gr(a);a.M.crossOrigin=h.crossOrigin;a.M.setAttribute("src",e);b.cache&&h.ld.push(a.M);f.Ui++}ds(){let a=this.o,b=this.D;if(a.N){var e=a.N;this.Nr();e.disable(e.CULL_FACE);e.bindBuffer(e.ARRAY_BUFFER,this.yi);var f=[0,0];f[2]=a.H.width;f[3]=0;f[4]=a.H.width;f[5]=a.H.height;f[6]=0;f[7]=a.H.height;e.bufferData(e.ARRAY_BUFFER,new Float32Array(f),e.STATIC_DRAW);
b.pe=0;this.zl();a.B.Mc?this.Eu():(e.enable(e.DEPTH_TEST),e.depthRange(0,1),e.depthFunc(e.LESS),this.Ck=!1,0<this.D.M.levels.length&&this.nw(),this.Fb&&!this.Ck&&this.Du())}}zl(){const a=this.D.M;if(!this.Fb||this.Yh)0<a.levels.length?this.Es():this.Fs()}Cv(a,b,e,f,h,n,r){const w=this.o;var x=this.D;h=x.M;let y=w.H;var z=e*h.W/b.width,cb=(e+1)*h.W/b.width;e=f*h.W/b.height;b=(f+1)*h.W/b.height;h=.1;r&&(h=.2);this.Fh&&(h=0);f=(cb-z)*h;1<cb&&(cb=1);1<b&&(b=1);z-=f;e-=f;h=this.On;r=(cb+f-z)/h;cb=(b+f-
e)/h;b={x:0,y:0};f={x:0,y:0};a.dm=0;let ab=w.Bj(),db=new lb,gb=this.gu;gb.Xq();4>n?gb.Sc(-90*n):gb.bc(5==n?90:-90);x.qb&&(gb.le(x.qb.Y),gb.bc(-x.qb.pitch));gb.Sc(-x.pan.m);gb.bc(x.u.m);gb.le(x.Y.m);for(n=0;n<=h;n++)for(x=0;x<=h;x++){var bb=2*(z+x*r)-1;var fb=2*(e+n*cb)-1;db.x=1*bb;db.y=1*fb;db.z=-1;db.normalize();gb.lu(db);bb=this.zp(db,b,w.Z());0!=w.Ic()&&1>ab&&(fb=this.zp(db,f,w.Ic()),bb&&fb?(b.x=b.x*ab+f.x*(1-ab),b.y=b.y*ab+f.y*(1-ab)):!bb&&fb&&(bb=!0,b.x=f.x,b.y=f.y));bb||(b.x=NaN);a.vg[a.dm++]=
y.width/2+b.x*y.width/2;a.vg[a.dm++]=y.height/2-b.y*y.width/2}this.Dv(a,h)}zp(a,b,e){let f=!0;switch(e){case 0:case 4:e=1/(a.z*this.Rm);b.x=-a.x*e;b.y=a.y*e;0<a.z&&(f=!1);break;case 9:1==a.z&&(f=!1);e=1/((1-a.z)*this.tn);b.x=a.x*e;b.y=-a.y*e;break;case 12:if(e=Math.sqrt(a.x*a.x+a.y*a.y),0==e)b.x=0,b.y=0;else{let h=2*this.Ml*Math.acos(-a.z)/e;if(2<e)return!1;b.x=h*a.x;b.y=-h*a.y}}return f}Dv(a,b){let e=this.o,f=[],h;a.Oa=0;for(let r=0;r<b;r++)for(let w=0;w<b;w++){f[0]=r+w*(b+1);f[1]=r+1+w*(b+1);f[2]=
r+(w+1)*(b+1);f[3]=r+1+(w+1)*(b+1);h=!0;for(var n=0;4>n;n++)isNaN(a.vg[2*f[0]])&&(h=!1);if(h){let x=n=!1,y=!1,z=!1;for(let cb=0;4>cb;cb++){let ab=a.vg[2*f[cb]];ab<e.H.width&&(x=!0);0<=ab&&(n=!0);ab=a.vg[2*f[cb]+1];ab<e.H.height&&(y=!0);0<=ab&&(z=!0)}if(h=h&&x&&n&&y&&z)this.Fh?(a.mb[a.Oa++]=f[0],a.mb[a.Oa++]=f[1],a.mb[a.Oa++]=f[1],a.mb[a.Oa++]=f[3],a.mb[a.Oa++]=f[3],a.mb[a.Oa++]=f[2],a.mb[a.Oa++]=f[2],a.mb[a.Oa++]=f[0],a.mb[a.Oa++]=f[3],a.mb[a.Oa++]=f[0],a.mb[a.Oa++]=f[1],a.mb[a.Oa++]=f[2]):(a.mb[a.Oa++]=
f[0],a.mb[a.Oa++]=f[3],a.mb[a.Oa++]=f[2],a.mb[a.Oa++]=f[0],a.mb[a.Oa++]=f[1],a.mb[a.Oa++]=f[3])}}}nw(){let a=this.o,b=this.D,e=b.M,f=e.levels;if(a.N){var h=a.N,n=this.Um;h.useProgram(n);this.Pk(n);h.enable(h.CULL_FACE);h.cullFace(h.FRONT);h.enable(h.STENCIL_TEST);h.stencilOp(h.KEEP,h.KEEP,h.INCR);h.stencilFunc(h.EQUAL,0,255);h.blendFuncSeparate(h.SRC_ALPHA,h.ONE_MINUS_SRC_ALPHA,h.SRC_ALPHA,h.ONE);h.enable(h.BLEND);kb.identity(this.$a);kb.perspective(a.Db(),a.Ya.width/a.Ya.height,.1,100,this.$a);h.uniformMatrix4fv(h.getUniformLocation(n,
"uPMatrix"),!1,this.$a);b.pe=0;b.iq();var r=b.No(),w=0;var x=f.length-1;for(var y={},z=f[x];z.Kg&&0<x;)x--,z=f[x];var cb=x,ab=cb;for(var db=0;6>db;db++)for(var gb=0;gb<z.sa;gb++)for(var bb=0;bb<z.$;bb++)y[bb+gb*z.$+db*z.$*z.sa]=1;for(;x>=r;){db={};z=f[x];gb=null;0<x&&(gb=f[x-1]);bb=!0;for(var fb in y)if(y.hasOwnProperty(fb)){var ib=Number(fb),hb=z.Na[ib],mb=Number(Math.floor(ib/(z.$*z.sa))),ob=Math.floor((ib-mb*z.$*z.sa)/z.$),jb=Math.floor(ib-(ob*z.$+mb*z.$*z.sa));if(6<=mb)console.log("Grrr...");
else if(b.cube.xf[mb].Ha=!1,hb||(hb=z.Na[ib]=new Hb(ib)),this.Cv(hb,z,jb,ob,Math.max(1,this.On>>cb-x),mb,0!=a.Ic()),hb.visible=0<hb.Oa||z.cache,hb.Uj=3,hb.Yj=Date.now(),hb.visible&&!hb.Eb&&(bb=!1,this.uj()?hb.M||(hb.Te?hb.Te--:(this.$j(hb,z,b.ah(mb,x,jb,ob)),a.Ha=!0)):this.D.pe++),gb&&(hb.visible||gb.cache)){ib=(jb*e.W+1)/z.width;jb=Math.min(1,((jb+1)*e.W-1)/z.width);var sb=(ob*e.W+1)/z.height;ob=Math.min(1,((ob+1)*e.W-1)/z.height);hb=e.W/gb.width;let vb=e.W/gb.height,yb=sb;sb=Math.floor(sb*gb.height/
e.W);do{let zb=ib,xb=Math.floor(ib*gb.width/e.W);do{let Fb=xb+sb*gb.$+mb*gb.$*gb.sa;xb<gb.$&&sb<gb.sa&&(db[Fb]=1);xb++;zb+=hb}while(zb<jb);sb++;yb+=vb}while(yb<ob)}}bb&&(ab=x,20>b.fov.m&&x<this.kg&&(this.Ck=!0));y=db;x--}this.Wm();h.uniform1i(h.getUniformLocation(n,"tileTexture"),0);h.activeTexture(h.TEXTURE0);x=r;for(r=-1;x<=Math.min(ab,this.kg-1);){z=f[x];for(let vb in z.Na)if(z.Na.hasOwnProperty(vb)){db=Number(vb);y=z.Na[db];cb=Math.floor(db/(z.$*z.sa));fb=Math.floor((db-cb*z.$*z.sa)/z.$);db=Math.floor(db-
(fb*z.$+cb*z.$*z.sa));r!=cb&&(r=cb,this.gh(cb,n));if(w>b.hi){this.Ck=!1;break}y.Eb&&(bb=gb=e.W,db==z.$-1&&(gb=z.width-e.W*db),fb==z.sa-1&&(bb=z.height-e.W*fb),gb=(gb+2*e.hb)/e.W,bb=(bb+2*e.hb)/e.W,h.bindTexture(h.TEXTURE_2D,y.Eb),h.uniform2f(h.getUniformLocation(n,"uCanvasDimensions"),a.H.width,a.H.height),mb=h.getUniformLocation(n,"srcScale"),h.uniform2f(mb,.5*z.width/e.W/gb,.5*z.height/e.W/bb),mb=h.getUniformLocation(n,"srcOffset"),h.uniform2f(mb,(.5*z.width+e.hb-e.W*db)/e.W/gb,-(.5*z.height+e.hb-
e.W*fb)/e.W/bb+1),mb=h.getUniformLocation(n,"zOffset"),h.uniform1f(mb,(x+1)/(f.length+5)),fb=h.getAttribLocation(n,"aVertexPosition"),h.disableVertexAttribArray(0),h.disableVertexAttribArray(1),h.disableVertexAttribArray(2),h.enableVertexAttribArray(fb),h.activeTexture(h.TEXTURE0),this.Ki(h),h.bindBuffer(h.ARRAY_BUFFER,this.Ot),h.vertexAttribPointer(fb,2,h.FLOAT,!1,0,0),h.bufferData(h.ARRAY_BUFFER,new Float32Array(y.vg),h.DYNAMIC_DRAW),h.bindBuffer(h.ELEMENT_ARRAY_BUFFER,this.Nt),h.bufferData(h.ELEMENT_ARRAY_BUFFER,
new Uint16Array(y.mb),h.DYNAMIC_DRAW),this.Fh?0==x&&0==cb&&h.drawElements(h.LINES,y.Oa,h.UNSIGNED_SHORT,0):h.drawElements(h.TRIANGLES,y.Oa,h.UNSIGNED_SHORT,0),w++)}x++}h.disable(h.CULL_FACE);h.cullFace(h.FRONT_AND_BACK);a.Dh=!1;h.disable(h.STENCIL_TEST)}}gh(a,b){let e=this.o.N;kb.identity(this.Aa);this.Ug(a,-1);e.uniformMatrix4fv(e.getUniformLocation(b,"matRotate"),!1,this.Aa)}Eu(){let a=this.o;if(a.N){var b=a.N,e=this.zi;b.useProgram(e);this.gh(0,e);b.uniform2f(b.getUniformLocation(e,"uCanvasDimensions"),
a.H.width,a.H.height);var f=b.getUniformLocation(e,"srcOffset");b.uniform2f(f,.5,.5);1==a.B.format&&(f=b.getUniformLocation(e,"srcScale"),a.oc?(b.uniform2f(f,-.5/Math.PI,(a.B.flipY?-.5:.5)/Math.PI),f=b.getUniformLocation(e,"srcOffset"),a.Wf?b.uniform2f(f,.5,.75):b.uniform2f(f,.5,.25)):b.uniform2f(f,-.5/Math.PI,(a.B.flipY?-1:1)/Math.PI));if(15==a.B.format){f=b.getUniformLocation(e,"srcScale");let h=1;0<a.B.width&&0<a.B.height&&(h=.5*a.B.width/a.B.height);b.uniform2f(f,-.5/Math.PI,(a.B.flipY?-h:h)/
Math.PI);a.oc&&(f=b.getUniformLocation(e,"srcOffset"),a.Wf?b.uniform2f(f,.25,.5):b.uniform2f(f,.75,.5))}14==a.B.format&&(f=b.getUniformLocation(e,"srcScale"),b.uniform2f(f,1-2*a.B.qf/(a.B.width/3),1-2*a.B.qf/(a.B.height/2)));this.Pk(e);f=b.getUniformLocation(e,"cubeTexture");b.uniform1i(f,0);f=b.getAttribLocation(e,"aVertexPosition");b.disableVertexAttribArray(0);b.disableVertexAttribArray(1);b.disableVertexAttribArray(2);b.enableVertexAttribArray(f);b.bindBuffer(b.ARRAY_BUFFER,this.yi);b.vertexAttribPointer(f,
2,b.FLOAT,!1,0,0);b.activeTexture(b.TEXTURE0);b.bindTexture(b.TEXTURE_2D,a.B.texture);this.Ki(b);b.bindBuffer(b.ELEMENT_ARRAY_BUFFER,this.md);b.drawElements(b.TRIANGLES,6,b.UNSIGNED_SHORT,0)}}Pk(a){const b=this.D;let e=this.o.N;var f=this.o.H;let h=1;switch(b.fov.mode){case 0:h=f.width/f.height;break;case 1:h=1;break;case 2:h=f.width/Math.sqrt(f.width*f.width+f.height*f.height);break;case 3:4*f.height/3<f.width&&(h=4/3)}f=e.getUniformLocation(a,"rectDstDistance");this.Rm=Math.tan(Math.min(b.fov.m,
179)/2*Math.PI/180)*h;e.uniform1f(f,this.Rm);f=e.getUniformLocation(a,"fisheyeDistance");this.Ml=180/(b.fov.m*Math.PI*h);e.uniform1f(f,this.Ml);f=e.getUniformLocation(a,"stereoDistance");this.tn=Math.tan(Math.min(b.fov.m,359)/4*Math.PI/180)*h;e.uniform1f(f,this.tn);f=e.getUniformLocation(a,"directionBlend");e.uniform1f(f,b.Bj());f=e.getUniformLocation(a,"transitionBlend");e.uniform1f(f,this.Cn)}Du(){var a=this.o;let b=a.N;var e=this.Tm;b.useProgram(e);b.enable(b.STENCIL_TEST);b.stencilOp(b.KEEP,b.KEEP,
b.INCR);b.stencilFunc(b.EQUAL,0,255);this.gh(0,e);b.uniform2f(b.getUniformLocation(e,"uCanvasDimensions"),a.H.width,a.H.height);a=b.getUniformLocation(e,"srcScale");b.uniform2f(a,1,1);a=b.getUniformLocation(e,"srcOffset");b.uniform2f(a,0,0);a=b.getUniformLocation(e,"zOffset");b.uniform1f(a,.9999);this.Pk(e);this.gh(0,e);a=b.getUniformLocation(e,"cubeTexture");b.uniform1i(a,0);e=b.getAttribLocation(e,"aVertexPosition");b.disableVertexAttribArray(0);b.disableVertexAttribArray(1);b.disableVertexAttribArray(2);
b.enableVertexAttribArray(e);b.bindBuffer(b.ARRAY_BUFFER,this.yi);b.vertexAttribPointer(e,2,b.FLOAT,!1,0,0);b.activeTexture(b.TEXTURE0);b.bindTexture(b.TEXTURE_CUBE_MAP,this.Fb);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.texParameteri(b.TEXTURE_CUBE_MAP,b.TEXTURE_MIN_FILTER,b.LINEAR);b.texParameteri(b.TEXTURE_CUBE_MAP,b.TEXTURE_MAG_FILTER,b.LINEAR);b.bindBuffer(b.ELEMENT_ARRAY_BUFFER,this.md);b.drawElements(b.TRIANGLES,
6,b.UNSIGNED_SHORT,0);b.disable(b.STENCIL_TEST)}Fs(){var a,b;let e=this.o,f=e.N;if(f){f.getParameter(f.MAX_CUBE_MAP_TEXTURE_SIZE);var h=[1,3,5,4,0,2],n=!0,r=!0,w=!1;for(var x=0;6>x;x++)(null===(a=this.gb[x].Nf)||void 0===a?0:a.complete)?this.nj[x]||(w=!0):n=!1,(null===(b=this.gb[x].Rf)||void 0===b?0:b.complete)||(r=!1);if(r||n)if(!r||n||!this.Fb||w){r=Math.round(e.af/e.bh);a=(e.af-r)/2;this.kg=0;this.Fb||(this.Fb=f.createTexture());e.ee++;f.bindTexture(f.TEXTURE_CUBE_MAP,this.Fb);f.texParameteri(f.TEXTURE_CUBE_MAP,
f.TEXTURE_MIN_FILTER,f.LINEAR);f.texParameteri(f.TEXTURE_CUBE_MAP,f.TEXTURE_MAG_FILTER,f.LINEAR);f.pixelStorei(f.UNPACK_FLIP_Y_WEBGL,1);b=document.createElement("canvas");b.width=r;b.height=r;r=b.getContext("2d");for(w=0;6>w;w++)x=h[w],this.gb[x].Nf.complete?this.nj[x]||(r.drawImage(this.gb[x].Nf,-a,-a),f.texImage2D(f.TEXTURE_CUBE_MAP_POSITIVE_X+w,0,f.RGBA,f.RGBA,f.UNSIGNED_BYTE,b),this.nj[x]=!0):(r.drawImage(this.gb[x].Rf,-a,-a,e.af,e.af),f.texImage2D(f.TEXTURE_CUBE_MAP_POSITIVE_X+w,0,f.RGBA,f.RGBA,
f.UNSIGNED_BYTE,b));this.Yh=!n}}}Es(){var a=this.o,b=this.D.M;let e=b.levels,f=a.N;if(f){var h=e.length-1;if(!(0>h)){e[h].Kg&&h--;var n=512;a.Xh?n=2<=a.devicePixelRatio?512:256:!a.Ng&&2<=a.devicePixelRatio&&(n=1024);var r=f.getParameter(f.MAX_CUBE_MAP_TEXTURE_SIZE);for(r&&r<n&&(n=r);0<h&&e[h-1].width<=n;)h--;r=e[h];if(0!=r.$){n=h;r=this.xs(h);this.Yh&&r&&(this.Yh=!1);r||(h=e.length-1,r||(r=this.loadLevel(h)),this.Yh=!0);for(var w=h;w>=n;w--)this.loadLevel(w)&&(h=w);if(r){r=e[h];this.kg>h&&(this.kg=
h);w=b.hb;let y=0<w||1<r.$||1<r.sa||h==n,z,cb=this.Pv;y&&(cb||(this.Pv=cb=document.createElement("canvas")),2048>r.width?1500<r.width?(cb.width=2048,cb.height=2048):700<r.width?(cb.width=1024,cb.height=1024):(cb.width=512,cb.height=512):(cb.width=r.width,cb.height=r.height),z=cb.getContext("2d"));this.Fb=f.createTexture();a.ee++;f.bindTexture(f.TEXTURE_CUBE_MAP,this.Fb);f.texParameteri(f.TEXTURE_CUBE_MAP,f.TEXTURE_WRAP_S,f.CLAMP_TO_EDGE);f.texParameteri(f.TEXTURE_CUBE_MAP,f.TEXTURE_WRAP_T,f.CLAMP_TO_EDGE);
f.pixelStorei(f.UNPACK_FLIP_Y_WEBGL,1);a=[1,3,5,4,0,2];b=b.W;for(let ab=0;6>ab;ab++){z&&z.clearRect(0,0,cb.width,cb.height);for(let db=h;db>=n;db--){r=e[db];for(let gb=0;gb<r.sa;gb++)for(let bb=0;bb<r.$;bb++){var x=r.Na[bb+gb*r.$+a[ab]*r.$*r.sa];if(x){let fb=x.M;x.ub&&(fb=x.ub);fb&&0<fb.width&&(y?(x=cb.width/r.width,z.drawImage(fb,x*(bb*b-w),x*(gb*b-w),x*fb.width,x*fb.height)):f.texImage2D(f.TEXTURE_CUBE_MAP_POSITIVE_X+ab,0,f.RGBA,f.RGBA,f.UNSIGNED_BYTE,fb))}}}y&&f.texImage2D(f.TEXTURE_CUBE_MAP_POSITIVE_X+
ab,0,f.RGBA,f.RGBA,f.UNSIGNED_BYTE,cb)}}}}}}loadLevel(a){let b=this.o,e=this.D,f=e.M.levels[a];if(0==f.$)return!1;let h=!0;f.cache=!0;for(let n=0;6>n;n++)for(let r=0;r<f.sa;r++)for(let w=0;w<f.$;w++){let x=w+r*f.$+n*f.$*f.sa,y=f.Na[x];y||(y=f.Na[x]=new Hb(x));this.uj()?y.M||(y.Te?y.Te--:(this.$j(y,f,e.ah(n,a,w,r)),b.Ha=!0)):e.pe++;y.Eb||(h=!1,b.Ha=!0)}h&&(f.loaded=!0);return h}xs(a){a=this.D.M.levels[a];if(0==a.$)return!1;for(let b=0;6>b;b++)for(let e=0;e<a.sa;e++)for(let f=0;f<a.$;f++){let h=a.Na[f+
e*a.$+b*a.$*a.sa];if(!h||!h.Eb)return!1}return a.loaded=!0}ready(){return null!=this.Fb}Eq(){for(let a=0;6>a;a++)if(!this.gb[a].Rf.complete)return!1;return!0}Wm(){let a=this.o,b=this.D;var e=b.M.levels;let f=a.N,h=Date.now();for(let r=e.length-1;0<=r;r--){let w=e[r];if(!w.cache)for(let x in w.Na)if(w.Na.hasOwnProperty(x)){var n=w.Na[x];0<n.Uj&&n.Uj--;n.visible||0<n.Uj?(n.visible&&(n.Yj=h),n=this.ye.indexOf(n),-1!==n&&this.ye.splice(n,1)):-1===this.ye.indexOf(n)&&(n.level=w,this.ye.push(n))}}if(this.ye.length>
1.1*b.Fr)for(this.ye.sort(function(r,w){return w.Yj-r.Yj});this.ye.length>b.Fr;)e=this.ye.pop(),e.Eb&&(f.deleteTexture(e.Eb),a.ee--,e.Eb=0),e.M=null,e.Df&&(f.deleteBuffer(e.Df),e.Df=0),delete e.level.Na[e.id]}ew(){let a=this.o;if(a.N){var b=this.o.N,e=this.D,f;for(f=0;f<a.V.length;f++){let h=a.V[f];if(h.td)continue;kb.identity(this.Aa);kb.rotate(this.Aa,-e.Y.m*Math.PI/180,[0,0,1]);kb.rotate(this.Aa,-e.u.m*Math.PI/180,[1,0,0]);kb.rotate(this.Aa,(180-e.pan.m)*Math.PI/180,[0,1,0]);kb.rotate(this.Aa,
h.pan*Math.PI/180,[0,1,0]);kb.rotate(this.Aa,-h.u*Math.PI/180,[1,0,0]);kb.translate(this.Aa,[0,0,1]);kb.rotate(this.Aa,h.Ta*Math.PI/180,[0,0,1]);kb.rotate(this.Aa,-h.Ca*Math.PI/180,[0,1,0]);kb.rotate(this.Aa,h.ya*Math.PI/180,[1,0,0]);let n=Math.tan(h.fov/2*Math.PI/180),r=h.aspect;r||(r=16/9);kb.scale(this.Aa,[n,n/r,1]);kb.translate(this.Aa,[0,0,-1]);b.bindBuffer(b.ARRAY_BUFFER,this.oj);b.vertexAttribPointer(this.R.la,3,b.FLOAT,!1,0,0);b.bindBuffer(b.ARRAY_BUFFER,this.we);b.vertexAttribPointer(this.R.Ea,
2,b.FLOAT,!1,0,0);b.activeTexture(b.TEXTURE0);b.bindTexture(b.TEXTURE_2D,h.texture);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);this.Ki(b);b.bindBuffer(b.ELEMENT_ARRAY_BUFFER,this.md);b.uniform1i(this.R.Pg,0);b.uniformMatrix4fv(this.R.li,!1,this.Aa);b.uniformMatrix4fv(this.R.Qe,!1,this.$a);b.drawElements(b.TRIANGLES,6,b.UNSIGNED_SHORT,0)}}}dw(){let a=this.o,b;if(a.N){var e=a.N;e.useProgram(this.R);kb.identity(this.$a);
kb.perspective(a.Db(),a.Ya.width/a.Ya.height,.1,100,this.$a);e.uniformMatrix4fv(this.R.Qe,!1,this.$a);this.Ug(0);e.uniform1i(this.R.Pg,0);e.uniformMatrix4fv(this.R.Qe,!1,this.$a);e.uniformMatrix4fv(this.R.li,!1,this.Aa);e.enableVertexAttribArray(this.R.la);e.enableVertexAttribArray(this.R.Ea);e.bindBuffer(e.ARRAY_BUFFER,this.we);e.vertexAttribPointer(this.R.Ea,2,e.FLOAT,!1,0,0);e.activeTexture(e.TEXTURE0);e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,this.md);e.uniform1f(this.R.al,1E-4);e.vertexAttribPointer(this.R.la,
3,e.FLOAT,!1,0,0);e.bindTexture(e.TEXTURE_2D,a.B.texture);for(b=0;1>b;b++)this.Ug(0),e.bindBuffer(e.ARRAY_BUFFER,a.B.Rk),e.vertexAttribPointer(this.R.la,3,e.FLOAT,!1,0,0),e.bindBuffer(e.ARRAY_BUFFER,a.B.Ti),e.vertexAttribPointer(this.R.Ea,2,e.FLOAT,!1,0,0),e.activeTexture(e.TEXTURE0),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,a.B.Lj),e.uniform1i(this.R.Pg,0),e.uniformMatrix4fv(this.R.li,!1,this.Aa),e.uniformMatrix4fv(this.R.Qe,!1,this.$a),e.drawElements(e.TRIANGLES,36,e.UNSIGNED_SHORT,0)}}cw(){let a=this.o,
b=a.N,e=a.B;if(0<a.V.length)for(var f=0;f<a.V.length;f++){let h=a.V[f];if(!h.td&&h.isRunning&&h.Rh!=h.j.currentTime&&(h.Rh=h.j.currentTime,!h.aspect&&0<h.j.videoHeight&&(h.aspect=h.j.videoWidth/h.j.videoHeight),a.bj))try{h.texture&&(b.bindTexture(b.TEXTURE_2D,h.texture),b.texImage2D(b.TEXTURE_2D,0,b.RGB,b.RGB,b.UNSIGNED_BYTE,h.j),a.update())}catch(n){}}if(e.j&&(f=Number(e.j.currentTime),e.Rh!=f)){e.Rh=f;try{let h=0<e.j.readyState;a.Vh&&e.Mc&&(h=h&&0<e.j.currentTime);e.texture&&e.Bg&&h&&(e.Mc||this.yo(),
e.Mc=!0,e.width=e.j.videoWidth,e.height=e.j.videoHeight,b.pixelStorei(b.UNPACK_FLIP_Y_WEBGL,a.B.flipY),b.bindTexture(b.TEXTURE_2D,e.texture),b.texImage2D(b.TEXTURE_2D,0,b.RGB,b.RGB,b.UNSIGNED_BYTE,e.j),e.zn=!0,a.update())}catch(h){}}}zq(){let a;var b;let e=this.o,f=this.o.N;e.P.sm!=e.P.mode&&(e.P.sm=e.P.mode);if((0<=e.P.mode||0<e.P.Bc.length)&&!e.F.Wi){let r=1;0>=e.P.mode&&(r=0);3==e.P.mode&&(r=e.P.Fa);for(a=0;a<e.L.length;a++){let w=e.L[a];if("poly"==w.type){var h=w.Jg;let x=r;2==e.P.mode&&(x=w.Fa);
var n=e.P.Bc.indexOf(w.id);-1!=n&&(x=e.P.Tc[n]);if(0<h.length){n=[];for(b=0;b<h.length;b++)n.push(h[b].zc),n.push(h[b].ac),n.push(0);f.useProgram(this.je);f.enable(f.BLEND);f.blendFuncSeparate(f.SRC_ALPHA,f.ONE_MINUS_SRC_ALPHA,f.SRC_ALPHA,f.ONE);f.disable(f.DEPTH_TEST);this.Mn||(this.Mn=f.createBuffer());f.bindBuffer(f.ARRAY_BUFFER,this.Mn);f.bufferData(f.ARRAY_BUFFER,new Float32Array(n),f.STATIC_DRAW);f.uniform2f(f.getUniformLocation(this.je,"uCanvasDimensions"),e.H.width,e.H.height);h=f.getUniformLocation(this.je,
"uColor");b=w.hc;f.uniform3f(h,(b>>16&255)/255,(b>>8&255)/255,(b&255)/255);let y=f.getUniformLocation(this.je,"uAlpha");f.uniform1f(y,w.fc*x);f.vertexAttribPointer(this.je.la,3,f.FLOAT,!1,0,0);f.drawArrays(f.LINE_LOOP,0,n.length/3);b=w.ec;f.uniform3f(h,(b>>16&255)/255,(b>>8&255)/255,(b&255)/255);f.uniform1f(y,w.dc*x);f.enable(f.STENCIL_TEST);f.clearStencil(0);f.clear(f.STENCIL_BUFFER_BIT);f.colorMask(!1,!1,!1,!1);f.stencilFunc(f.ALWAYS,1,1);f.stencilOp(f.INCR,f.INCR,f.INCR);f.drawArrays(f.TRIANGLE_FAN,
0,n.length/3);f.colorMask(!0,!0,!0,!0);f.stencilFunc(f.EQUAL,1,1);f.stencilOp(f.ZERO,f.ZERO,f.ZERO);f.drawArrays(f.TRIANGLE_FAN,0,n.length/3);f.disable(f.BLEND);f.enable(f.DEPTH_TEST);f.disable(f.STENCIL_TEST);f.useProgram(this.R)}}}}}bw(){var a=this.o,b=this.D;let e=b.M;if(a.N){var f=a.N;f.disable(f.DEPTH_TEST);f.disable(f.CULL_FACE);f.useProgram(this.tg);var h=f.getUniformLocation(this.tg,"uRect");f.uniform2f(f.getUniformLocation(this.tg,"uCanvasDimensions"),a.H.width,a.H.height);f.activeTexture(f.TEXTURE0);
f.bindBuffer(f.ELEMENT_ARRAY_BUFFER,this.md);var n=f.getAttribLocation(this.tg,"aVertexPosition");f.disableVertexAttribArray(0);f.disableVertexAttribArray(1);f.disableVertexAttribArray(2);f.enableVertexAttribArray(n);f.bindBuffer(f.ARRAY_BUFFER,this.we);f.vertexAttribPointer(n,2,f.FLOAT,!1,0,0);b.pe=0;var r=100/b.fov.m;var w=e.width/e.height;n=a.H.height*r*w;r*=a.H.height;w=(b.pan.m/100/w-.5)*n+a.H.width/2;for(var x=(b.u.m/100-.5)*r+a.H.height/2,y,z,cb,ab=0;e.levels.length>=ab+2&&e.levels[ab+1].width>
n;)ab++;var db;var gb=[];for(db=e.levels.length-1;db>=ab;){var bb=e.levels[db];let fb;bb.cache?(fb={fx:0,fy:0},fb.Jd=bb.$-1,fb.Kd=bb.sa-1):(fb={},y=-x/r*(bb.height/e.W),z=(-w+a.H.width)/n*(bb.width/e.W),cb=(-x+a.H.height)/r*(bb.height/e.W),fb.fx=Math.min(Math.max(0,Math.floor(-w/n*(bb.width/e.W))),bb.$-1),fb.fy=Math.min(Math.max(0,Math.floor(y)),bb.sa-1),fb.Jd=Math.min(Math.max(0,Math.floor(z)),bb.$-1),fb.Kd=Math.min(Math.max(0,Math.floor(cb)),bb.sa-1));gb[db]=fb;let ib=!0;for(z=fb.fy;z<=fb.Kd;z++)for(y=
fb.fx;y<=fb.Jd;y++){cb=y+z*bb.$;let hb=bb.Na[cb];hb||(hb=new Hb(cb),bb.Na[cb]=hb);this.uj()?hb.M||(this.$j(hb,bb,b.ah(0,db,y,z)),a.Ha=!0):b.pe++;hb.M&&hb.M.complete||(ib=!1);hb.visible=!0}fb.eq=ib;db--}for(db=e.levels.length-1;db>=ab;){a=e.levels[db];if(gb[db]&&0<=gb[db].fx)for(b=gb[db],z=b.fy;z<=b.Kd;z++)for(y=b.fx;y<=b.Jd;y++)cb=y+z*a.$,(bb=a.Na[cb])&&bb.M&&bb.M.complete&&(f.uniform4f(h,w+(-e.hb+e.W*y)*n/a.width,x+(-e.hb+e.W*z)*r/a.height,bb.M.width*n/a.width,bb.M.height*r/a.height),bb&&bb.Eb&&
(f.bindBuffer(f.ELEMENT_ARRAY_BUFFER,this.md),f.bindTexture(f.TEXTURE_2D,bb.Eb),this.Ki(f),f.drawElements(f.TRIANGLES,6,f.UNSIGNED_SHORT,0)));db--}this.Wm()}}Sf(){let a=this.o.N;if(a&&this.gb)for(;0<this.gb.length;){let b=this.gb.pop();b.qu=!0;a.deleteTexture(b)}this.Fb&&(a.deleteTexture(this.Fb),this.Fb=null);this.kg=1E6;this.nj=[!1,!1,!1,!1,!1,!1]}}class vd{constructor(a){this.Xi=[];this.o=a;this.enabled=!1;this.Kb=2;this.zo=!1}Lo(a){if(2==a.mode||3==a.mode||5==a.mode){var b=this.o.ga.currentTime;
if(a.lb&&a.lb.gain&&a.Cb&&a.Ab&&a.Bb){let e=a.Cb.gain.value,f=a.Ab.gain.value,h=a.Bb.gain.value;a.lb.gain.linearRampToValueAtTime(a.lb.gain.value,b);a.lb.gain.linearRampToValueAtTime(0,b+this.Kb);a.Cb.gain.linearRampToValueAtTime(e,b);a.Cb.gain.linearRampToValueAtTime(0,b+this.Kb);a.Ab.gain.linearRampToValueAtTime(f,b);a.Ab.gain.linearRampToValueAtTime(0,b+this.Kb);a.Bb.gain.linearRampToValueAtTime(h,b);a.Bb.gain.linearRampToValueAtTime(0,b+this.Kb)}}else b=this.o.ga.currentTime,a.zb&&a.zb.gain&&
(a.zb.gain.linearRampToValueAtTime(a.zb.gain.value,b),a.zb.gain.linearRampToValueAtTime(0,b+this.Kb));a.Ll=!0;setTimeout(function(){a.Ue()},1E3*this.Kb+5)}Lv(){for(var a=0;a<this.o.X.length;a++){let b=this.o.X[a];!b.stopped&&!this.o.isPlaying(b.id)&&-1<b.loop&&4!=b.mode&&6!=b.mode&&(b.ta?b.Wd():(b.Sd&&b.ef(),b.j.play(),b.j.currentTime=0))}}Ms(){let a=(this.o.ga.currentTime-this.Jv)/this.Kb;a=Math.min(1,a);for(let b=0;b<this.o.X.length;b++){let e=this.o.X[b];this.o.isPlaying(e.id)&&1>e.va&&(e.va=a)}1==
a&&clearInterval(this.Iv)}}class wd{constructor(a){this.ci=[];this.yc=[];this.ic=[];this.Ac=[];this.jn=!0;this.o=a;this.Cs()}Th(){let a=this.o.N;var b=a.createShader(a.VERTEX_SHADER);a.shaderSource(b,"attribute vec3 aVertexPosition;\nvoid main(void) {\n gl_Position = vec4(aVertexPosition, 1.0);\n}\n");a.compileShader(b);a.getShaderParameter(b,a.COMPILE_STATUS)||(alert(a.getShaderInfoLog(b)),b=null);var e=a.createShader(a.FRAGMENT_SHADER);a.shaderSource(e,"#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");
a.compileShader(e);a.getShaderParameter(e,a.COMPILE_STATUS)||(alert(a.getShaderInfoLog(e)),e=null);this.Fc=a.createProgram();a.attachShader(this.Fc,b);a.attachShader(this.Fc,e);a.linkProgram(this.Fc);a.getProgramParameter(this.Fc,a.LINK_STATUS)||alert("Could not initialise shaders");this.Fc.la=a.getAttribLocation(this.Fc,"aVertexPosition");a.enableVertexAttribArray(this.Fc.la);e=a.createShader(a.VERTEX_SHADER);b=a.createShader(a.VERTEX_SHADER);a.shaderSource(e,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nattribute vec3 aVertexPosition;\nvarying vec4 vColor;\nuniform vec2 uCirclePosition;\nuniform float uCircleRadius;\nuniform vec2 uCanvasDimensions2;\nuniform float uAspectRatio;\nvoid main(void) {\n vec2 circleOnScreen = aVertexPosition.xy * uCircleRadius + uCirclePosition;\n circleOnScreen.y = circleOnScreen.y / uAspectRatio;\n vec2 circleNorm = (circleOnScreen / uCanvasDimensions2) * 2.0 - vec2(1.0, 1.0);\n gl_Position = vec4(circleNorm.x, circleNorm.y, 0.0, 1.0);\n}\n");
a.compileShader(e);a.getShaderParameter(e,a.COMPILE_STATUS)||(alert(a.getShaderInfoLog(e)),e=null);a.shaderSource(b,"#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");
a.compileShader(b);a.getShaderParameter(b,a.COMPILE_STATUS)||(alert(a.getShaderInfoLog(b)),e=null);let f=a.createShader(a.FRAGMENT_SHADER);a.shaderSource(f,"#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");
a.compileShader(f);a.getShaderParameter(f,a.COMPILE_STATUS)||(alert(a.getShaderInfoLog(f)),f=null);this.Ba=a.createProgram();a.attachShader(this.Ba,e);a.attachShader(this.Ba,f);a.linkProgram(this.Ba);a.getProgramParameter(this.Ba,a.LINK_STATUS)||alert("Could not initialise shaders");this.Ba.la=a.getAttribLocation(this.Ba,"aVertexPosition");a.enableVertexAttribArray(this.Ba.la);e=a.createShader(a.FRAGMENT_SHADER);a.shaderSource(e,"#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");
a.compileShader(e);a.getShaderParameter(e,a.COMPILE_STATUS)||(alert(a.getShaderInfoLog(e)),e=null);this.Ib=a.createProgram();a.attachShader(this.Ib,b);a.attachShader(this.Ib,e);a.linkProgram(this.Ib);a.getProgramParameter(this.Ib,a.LINK_STATUS)||alert("Could not initialise shaders");this.Ib.la=a.getAttribLocation(this.Ib,"aVertexPosition")}Hf(){let a=this.o.N;this.ae=a.createBuffer();a.bindBuffer(a.ARRAY_BUFFER,this.ae);a.bufferData(a.ARRAY_BUFFER,new Float32Array([-1,-1,0,1,-1,0,1,1,0,-1,1,0]),a.STATIC_DRAW);
this.ae.itemSize=3;this.ae.numberOfItems=4;this.sg=a.createBuffer();a.bindBuffer(a.ARRAY_BUFFER,this.sg);var b=[0,0,0],e=2*Math.PI/6,f=Math.PI/180*35;let h=1;for(var n=f;n<=f+2*Math.PI;n+=e)b.push(Math.sin(n)),b.push(-Math.cos(n)),b.push(0),h++;a.bufferData(a.ARRAY_BUFFER,new Float32Array(b),a.STATIC_DRAW);this.sg.itemSize=3;this.sg.numberOfItems=h;this.Pq=a.createTexture();a.bindTexture(a.TEXTURE_2D,this.Pq);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.LINEAR);a.texParameteri(a.TEXTURE_2D,
a.TEXTURE_MAG_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);b=document.createElement("canvas");b.width=100;b.height=1;e=b.getContext("2d");e.width=100;e.height=1;f=e.createLinearGradient(0,0,100,0);f.addColorStop(0,this.o.Gb(0,0));f.addColorStop(.88,this.o.Gb(0,0));f.addColorStop(.9,this.o.Gb(16654848,1));f.addColorStop(.92,this.o.Gb(16776448,1));f.addColorStop(.94,this.o.Gb(4849466,1));f.addColorStop(.96,
this.o.Gb(131071,1));f.addColorStop(.98,this.o.Gb(8190,1));f.addColorStop(1,this.o.Gb(0,0));e.fillStyle=f;e.fillRect(0,0,100,1);a.texImage2D(a.TEXTURE_2D,0,a.RGBA,a.RGBA,a.UNSIGNED_BYTE,b)}Ru(){for(;0<this.ci.length;)this.ci.pop()}Cs(){let a=[],b=[],e=[];var f={radius:14,alpha:.2,color:11390415,C:.27};a.push(f);f={radius:20,alpha:.25,color:11390415,C:.4};a.push(f);f={radius:10,alpha:.2,color:12442332,C:.6};a.push(f);f={radius:15,alpha:.2,color:11390415,C:.8};a.push(f);f={radius:10,alpha:.2,color:12442332,
C:1.5};a.push(f);f={radius:15,alpha:.2,color:11390415,C:1.8};a.push(f);f={radius:8,alpha:.2,color:12575203,J:.8,C:.7};b.push(f);f={radius:7,alpha:.4,color:12575203,J:.5,C:1.6};b.push(f);f={radius:5,alpha:.4,color:12575203,J:.6,C:.9};b.push(f);f={radius:8,alpha:.3,color:12575203,J:.4,C:1.1};b.push(f);this.yc.push(a);this.ic.push(b);this.Ac.push(e);a=[];b=[];e=[];f={radius:30,alpha:.3,color:11390415,C:.5};a.push(f);f={radius:10,alpha:.3,color:11390415,C:1};a.push(f);f={radius:20,alpha:.3,color:11390415,
C:1.3};a.push(f);f={radius:10,alpha:.3,color:11390415,C:1.5};a.push(f);f={radius:15,alpha:.3,color:11390415,C:1.8};a.push(f);f={radius:10,alpha:.3,color:15506856,J:.8,C:.7};b.push(f);f={radius:20,alpha:.5,color:15506856,J:.5,C:1.6};b.push(f);f={radius:5,alpha:.5,color:15506856,J:.6,C:.9};b.push(f);f={radius:60,alpha:.4,color:15506856,J:.2,C:1.1};b.push(f);e.push({radius:220,alpha:.035,C:2});this.yc.push(a);this.ic.push(b);this.Ac.push(e);a=[];b=[];e=[];f={radius:30,alpha:.5,color:15465727,C:.5};a.push(f);
f={radius:40,alpha:.28,color:15726842,C:.8};a.push(f);f={radius:25,alpha:.32,color:15726842,C:1.1};a.push(f);f={radius:15,alpha:.25,color:15726842,C:1.35};a.push(f);f={radius:10,alpha:.28,color:15465727,C:1.65};a.push(f);f={radius:10,alpha:.45,color:15465727,J:.8,C:.7};b.push(f);f={radius:7,alpha:.5,color:15465727,J:.4,C:.9};b.push(f);f={radius:40,alpha:.4,color:15465727,J:.3,C:.38};b.push(f);f={radius:50,alpha:.4,color:15465727,J:.5,C:1.25};b.push(f);f={radius:18,alpha:.2,color:15465727,J:.5,C:1.25};
b.push(f);f={radius:10,alpha:.34,color:15726842,J:.8,C:1.5};b.push(f);f={radius:38,alpha:.37,color:15465727,J:.3,C:-.5};b.push(f);this.yc.push(a);this.ic.push(b);this.Ac.push(e);a=[];b=[];e=[];f={radius:16,alpha:.5,color:16363159,C:.1};a.push(f);f={radius:26,alpha:.3,color:16091819,C:.32};a.push(f);f={radius:29,alpha:.2,color:16091819,C:1.32};a.push(f);f={radius:20,alpha:.18,color:16363159,C:1.53};a.push(f);f={radius:27,alpha:.13,color:16425092,C:1.6};a.push(f);f={radius:20,alpha:.1,color:16091819,
C:1.75};a.push(f);f={radius:12,alpha:.45,color:16312238,J:.45,C:.2};b.push(f);f={radius:8,alpha:.25,color:16434209,J:.7,C:.33};b.push(f);f={radius:9,alpha:.25,color:16091819,J:.4,C:.7};b.push(f);f={radius:7,alpha:.2,color:16091819,J:.4,C:.85};b.push(f);f={radius:60,alpha:.23,color:16091819,J:.55,C:1.05};b.push(f);f={radius:37,alpha:.1,color:16091819,J:.55,C:1.22};b.push(f);f={radius:10,alpha:.25,color:16363159,J:.65,C:1.38};b.push(f);f={radius:7,alpha:.2,color:16434209,J:.5,C:1.45};b.push(f);f={radius:3,
alpha:.2,color:16416033,J:.5,C:1.78};b.push(f);f={radius:6,alpha:.18,color:16434209,J:.45,C:1.9};b.push(f);f={radius:4,alpha:.14,color:16766514,J:.45,C:2.04};b.push(f);f={radius:30,alpha:.14,color:16766514,J:.8,C:.04};b.push(f);this.yc.push(a);this.ic.push(b);this.Ac.push(e);a=[];b=[];e=[];f={radius:9,alpha:.3,color:14346999,J:.3,C:.3};b.push(f);f={radius:5,alpha:.5,color:14148072,J:.8,C:.6};b.push(f);f={radius:3,alpha:.37,color:14346999,J:.66,C:.8};b.push(f);f={radius:45,alpha:.2,color:14346999,
J:.36,C:1.2};b.push(f);f={radius:13,alpha:.2,color:14346999,J:.36,C:1.23};b.push(f);f={radius:11,alpha:.2,color:14148072,J:.36,C:1.28};b.push(f);f={radius:27,alpha:.16,color:14346999,J:.36,C:1.55};b.push(f);f={radius:6,alpha:.36,color:14148072,J:.8,C:1.7};b.push(f);this.yc.push(a);this.ic.push(b);this.Ac.push(e);a=[];b=[];e=[];f={radius:24,alpha:.2,color:15186464,C:.2};a.push(f);f={radius:7,alpha:.26,color:15186464,C:.35};a.push(f);f={radius:23,alpha:.18,color:15186464,C:.65};a.push(f);f={radius:13,
alpha:.2,color:15186464,C:.8};a.push(f);f={radius:11,alpha:.15,color:15186464,C:1.4};a.push(f);f={radius:15,alpha:.11,color:15451904,C:1.6};a.push(f);f={radius:6,alpha:.45,color:15579138,J:.45,C:.22};b.push(f);f={radius:3,alpha:.3,color:15451904,J:.25,C:.4};b.push(f);f={radius:4,alpha:.2,color:15451904,J:.25,C:.45};b.push(f);f={radius:65,alpha:.17,color:15186464,J:.25,C:.5};b.push(f);f={radius:5,alpha:.45,color:15579138,J:.45,C:.88};b.push(f);f={radius:140,alpha:.18,color:15579138,J:.32,C:.95};b.push(f);
f={radius:12,alpha:.22,color:15579138,J:.32,C:1.1};b.push(f);f={radius:8,alpha:.32,color:15451904,J:.72,C:1.2};b.push(f);f={radius:55,alpha:.2,color:15451904,J:.45,C:1.33};b.push(f);f={radius:4,alpha:.3,color:15451904,J:.25,C:1.42};b.push(f);this.yc.push(a);this.ic.push(b);this.Ac.push(e);a=[];b=[];e=[];f={radius:16,alpha:.4,color:10933495,C:.32};a.push(f);f={radius:14,alpha:.3,color:11007484,C:.36};a.push(f);f={radius:10,alpha:.3,color:4037331,C:.58};a.push(f);f={radius:14,alpha:.22,color:8835068,
C:.68};a.push(f);f={radius:10,alpha:.27,color:11007484,C:.82};a.push(f);f={radius:11,alpha:.27,color:10867450,C:1};a.push(f);f={radius:9,alpha:.2,color:6158332,C:1.05};a.push(f);f={radius:10,alpha:.17,color:10867450,C:1.78};a.push(f);f={radius:10,alpha:.3,color:4037331,C:-.23};a.push(f);f={radius:8,alpha:.45,color:8835068,J:.45,C:.175};b.push(f);f={radius:7,alpha:.4,color:12574715,J:.55,C:.46};b.push(f);f={radius:3,alpha:.3,color:10867450,J:.35,C:.5};b.push(f);f={radius:60,alpha:.37,color:4031699,
J:.75,C:.75};b.push(f);f={radius:3,alpha:.25,color:4031699,J:.25,C:.75};b.push(f);f={radius:3,alpha:.2,color:6158332,J:.25,C:.9};b.push(f);f={radius:7,alpha:.45,color:8835068,J:.45,C:1.3};b.push(f);f={radius:32,alpha:.22,color:8835068,J:.75,C:1.62};b.push(f);f={radius:9,alpha:.45,color:4031699,J:.65,C:1.6};b.push(f);f={radius:8,alpha:.25,color:4031699,J:.65,C:1.83};b.push(f);f={radius:7,alpha:.4,color:12574715,J:.55,C:-.18};b.push(f);this.yc.push(a);this.ic.push(b);this.Ac.push(e);a=[];b=[];e=[];
f={radius:16,alpha:.4,color:16389120,C:.32};a.push(f);f={radius:26,alpha:.22,color:16389120,C:.4};a.push(f);f={radius:26,alpha:.25,color:16389120,C:.65};a.push(f);f={radius:18,alpha:.3,color:16389120,C:1.23};a.push(f);f={radius:14,alpha:.26,color:16389120,C:1.33};a.push(f);f={radius:17,alpha:.18,color:16389120,C:1.7};a.push(f);f={radius:30,alpha:.16,color:16389120,C:2.15};a.push(f);f={radius:100,alpha:.25,color:16389120,J:.22,C:1.45};b.push(f);f={radius:7,alpha:.5,color:15628151,J:.3,C:1.5};b.push(f);
f={radius:3,alpha:.5,color:15628151,J:.3,C:1.52};b.push(f);f={radius:4,alpha:.5,color:16389120,J:.3,C:1.745};b.push(f);f={radius:9,alpha:.22,color:16389120,J:.3,C:1.8};b.push(f);this.yc.push(a);this.ic.push(b);this.Ac.push(e);a=[];b=[];e=[];f={radius:16,alpha:.4,color:10933495,C:.32};a.push(f);f={radius:14,alpha:.3,color:11007484,C:.36};a.push(f);f={radius:10,alpha:.3,color:4037331,C:.58};a.push(f);f={radius:14,alpha:.22,color:8835068,C:.68};a.push(f);f={radius:10,alpha:.27,color:11007484,C:.82};
a.push(f);f={radius:11,alpha:.27,color:10867450,C:1};a.push(f);f={radius:9,alpha:.2,color:6158332,C:1.05};a.push(f);f={radius:10,alpha:.17,color:10867450,C:1.78};a.push(f);f={radius:10,alpha:.3,color:4037331,C:-.23};a.push(f);f={radius:8,alpha:.45,color:8835068,J:.45,C:.175};b.push(f);f={radius:7,alpha:.4,color:12574715,J:.55,C:.46};b.push(f);f={radius:3,alpha:.3,color:10867450,J:.35,C:.5};b.push(f);f={radius:60,alpha:.37,color:4031699,J:.75,C:.75};b.push(f);f={radius:3,alpha:.25,color:4031699,J:.25,
C:.75};b.push(f);f={radius:3,alpha:.2,color:6158332,J:.25,C:.9};b.push(f);f={radius:7,alpha:.45,color:8835068,J:.45,C:1.3};b.push(f);f={radius:32,alpha:.22,color:8835068,J:.75,C:1.62};b.push(f);f={radius:9,alpha:.45,color:4031699,J:.65,C:1.6};b.push(f);f={radius:8,alpha:.25,color:4031699,J:.65,C:1.83};b.push(f);f={radius:7,alpha:.4,color:12574715,J:.55,C:-.18};b.push(f);this.yc.push(a);this.ic.push(b);this.Ac.push(e);a=[];b=[];e=[];f={radius:16,alpha:.4,color:16389120,C:.32};a.push(f);f={radius:26,
alpha:.22,color:16389120,C:.4};a.push(f);f={radius:26,alpha:.25,color:16389120,C:.65};a.push(f);f={radius:18,alpha:.3,color:16389120,C:1.23};a.push(f);f={radius:14,alpha:.26,color:16389120,C:1.33};a.push(f);f={radius:17,alpha:.18,color:16389120,C:1.7};a.push(f);f={radius:30,alpha:.16,color:16389120,C:2.15};a.push(f);f={radius:100,alpha:.25,color:16389120,J:.22,C:1.45};b.push(f);f={radius:7,alpha:.5,color:15628151,J:.3,C:1.5};b.push(f);f={radius:3,alpha:.5,color:15628151,J:.3,C:1.52};b.push(f);f={radius:4,
alpha:.5,color:16389120,J:.3,C:1.745};b.push(f);f={radius:9,alpha:.22,color:16389120,J:.3,C:1.8};b.push(f);this.yc.push(a);this.ic.push(b);this.Ac.push(e);a=[];b=[];e=[];f={radius:24,alpha:.2,color:15186464,C:.2};a.push(f);f={radius:7,alpha:.26,color:15186464,C:.35};a.push(f);f={radius:23,alpha:.18,color:15186464,C:.65};a.push(f);f={radius:13,alpha:.2,color:15186464,C:.8};a.push(f);f={radius:11,alpha:.15,color:15186464,C:1.4};a.push(f);f={radius:15,alpha:.11,color:15451904,C:1.6};a.push(f);f={radius:6,
alpha:.45,color:15579138,J:.45,C:.22};b.push(f);f={radius:3,alpha:.3,color:15451904,J:.25,C:.4};b.push(f);f={radius:4,alpha:.2,color:15451904,J:.25,C:.45};b.push(f);f={radius:65,alpha:.17,color:15186464,J:.25,C:.5};b.push(f);f={radius:5,alpha:.45,color:15579138,J:.45,C:.88};b.push(f);f={radius:140,alpha:.18,color:15579138,J:.32,C:.95};b.push(f);f={radius:12,alpha:.22,color:15579138,J:.32,C:1.1};b.push(f);f={radius:8,alpha:.32,color:15451904,J:.72,C:1.2};b.push(f);f={radius:55,alpha:.2,color:15451904,
J:.45,C:1.33};b.push(f);f={radius:4,alpha:.3,color:15451904,J:.25,C:1.42};b.push(f);this.yc.push(a);this.ic.push(b);this.Ac.push(e)}Cu(){if(this.jn){var a=this.o.N,b,e=new lb(0,0,-100),f=this.o.be(),h=0,n=0,r=!1,w=this.o.D;if(this.o.pa){var x=this.o.Ya.width;var y=this.o.Ya.height;this.o.F.Wi&&(x=this.o.F.Pb.width,y=this.o.F.Pb.height)}var z=Math.sqrt(x*x+y*y),cb=z/800;for(b=0;b<this.ci.length;b++){var ab=this.ci[b];e.init(0,0,-100);e.ya(-ab.u*Math.PI/180);e.Ca(ab.pan*Math.PI/180);e.Ca(-w.pan.m*Math.PI/
180);e.ya(w.u.m*Math.PI/180);e.Ta(w.Y.m*Math.PI/180);if(-.01>e.z){n=-f/e.z;h=e.x*n;n*=e.y;var db=Math.max(x,y);Math.abs(h)<db/2+100&&Math.abs(n)<db/2+100&&(r=!0,h+=x/2,n+=y/2)}if(r){this.o.pa&&(a.blendFunc(a.SRC_ALPHA,a.ONE),a.enable(a.BLEND),a.disable(a.DEPTH_TEST));db=x/2;var gb=y/2;var bb=Math.sqrt((db-h)*(db-h)+(gb-n)*(gb-n));var fb=z/2;db=ab.ho/100*((fb-bb)/fb);0>db&&(db=0);this.o.pa&&(a.useProgram(this.Fc),a.bindBuffer(a.ARRAY_BUFFER,this.o.F.vb),a.vertexAttribPointer(this.Fc.la,this.o.F.vb.itemSize,
a.FLOAT,!1,0,0),a.uniform2f(a.getUniformLocation(this.Fc,"uCanvasDimensions"),a.drawingBufferWidth,a.drawingBufferHeight),a.uniform2f(a.getUniformLocation(this.Fc,"uFlareCenterPosition"),a.drawingBufferWidth/x*h,y-a.drawingBufferHeight/y*n),a.uniform1f(a.getUniformLocation(this.Fc,"uBlindingValue"),db),a.uniform1f(a.getUniformLocation(this.Fc,"uAspectRatio"),this.o.F.Wi?a.drawingBufferWidth/a.drawingBufferHeight:a.drawingBufferWidth/a.drawingBufferHeight/(x/y)),a.drawArrays(a.TRIANGLE_STRIP,0,this.o.F.vb.numberOfItems));
if(0!=Number(ab.type)&&!this.o.F.Wi){db=x/2-h;gb=y/2-n;let ob=1,jb=Number(ab.type)-1;bb<.35*fb&&(ob=bb/(.35*fb),ob*=ob);bb>.7*fb&&(ob=(fb-bb)/(.3*fb));ob*=ab.alpha/100;if(0<this.yc[jb].length)for(bb=0;bb<this.yc[jb].length;bb++){fb=this.yc[jb][bb];var ib=fb.radius*cb,hb=fb.alpha*ob;0>hb&&(hb=0);var mb=fb.color;if(8==jb||9==jb||10==jb)mb=ab.color;this.o.pa&&(a.useProgram(this.Ba),a.bindBuffer(a.ARRAY_BUFFER,this.sg),a.vertexAttribPointer(this.Ba.la,this.sg.itemSize,a.FLOAT,!1,0,0),a.uniform2f(a.getUniformLocation(this.Ba,
"uCanvasDimensions2"),a.drawingBufferWidth,a.drawingBufferHeight),a.uniform2f(a.getUniformLocation(this.Ba,"uCirclePosition"),a.drawingBufferWidth/x*(h+db*fb.C),a.drawingBufferWidth/x*(y-(n+gb*fb.C))),a.uniform2f(a.getUniformLocation(this.Ba,"uCircleTexturePosition"),a.drawingBufferWidth/x*(h+db*fb.C),y-(n+gb*fb.C)),a.uniform1f(a.getUniformLocation(this.Ba,"uCircleRadius"),ib),a.uniform3f(a.getUniformLocation(this.Ba,"uCircleColor"),(mb>>16&255)/255,(mb>>8&255)/255,(mb&255)/255),a.uniform1f(a.getUniformLocation(this.Ba,
"uCircleAlpha"),hb),a.uniform1f(a.getUniformLocation(this.Ba,"uCircleSoftness"),.1),a.uniform1f(a.getUniformLocation(this.Ba,"uAspectRatio"),a.drawingBufferWidth/a.drawingBufferHeight/(x/y)),a.drawArrays(a.TRIANGLE_FAN,0,this.sg.numberOfItems))}if(0<this.ic[jb].length)for(bb=0;bb<this.ic[jb].length;bb++){fb=this.ic[jb][bb];ib=fb.radius*cb;hb=fb.alpha*ob;0>hb&&(hb=0);mb=fb.color;if(8==jb||9==jb||10==jb)mb=ab.color;this.o.pa&&(a.useProgram(this.Ba),a.bindBuffer(a.ARRAY_BUFFER,this.ae),a.vertexAttribPointer(this.Ba.la,
this.ae.itemSize,a.FLOAT,!1,0,0),a.uniform2f(a.getUniformLocation(this.Ba,"uCanvasDimensions2"),a.drawingBufferWidth,a.drawingBufferHeight),a.uniform2f(a.getUniformLocation(this.Ba,"uCirclePosition"),a.drawingBufferWidth/x*(h+db*fb.C),a.drawingBufferWidth/x*(y-(n+gb*fb.C))),a.uniform2f(a.getUniformLocation(this.Ba,"uCircleTexturePosition"),a.drawingBufferWidth/x*(h+db*fb.C),y-(n+gb*fb.C)),a.uniform1f(a.getUniformLocation(this.Ba,"uCircleRadius"),ib),a.uniform3f(a.getUniformLocation(this.Ba,"uCircleColor"),
(mb>>16&255)/255,(mb>>8&255)/255,(mb&255)/255),a.uniform1f(a.getUniformLocation(this.Ba,"uCircleAlpha"),hb),a.uniform1f(a.getUniformLocation(this.Ba,"uCircleSoftness"),fb.J),a.uniform1f(a.getUniformLocation(this.Ba,"uAspectRatio"),a.drawingBufferWidth/a.drawingBufferHeight/(x/y)),a.drawArrays(a.TRIANGLE_FAN,0,this.ae.numberOfItems))}if(0<this.Ac[jb].length)for(bb=0;bb<this.Ac[jb].length;bb++)ab=this.Ac[jb][bb],fb=ab.radius*cb,ib=ab.alpha*ob,0>ib&&(ib=0),this.o.pa&&(a.useProgram(this.Ib),a.activeTexture(a.TEXTURE0),
a.bindTexture(a.TEXTURE_2D,this.Pq),a.bindBuffer(a.ARRAY_BUFFER,this.ae),a.vertexAttribPointer(this.Ib.la,this.ae.itemSize,a.FLOAT,!1,0,0),a.uniform2f(a.getUniformLocation(this.Ib,"uCanvasDimensions2"),x,y),a.uniform2f(a.getUniformLocation(this.Ib,"uCirclePosition"),h+db*ab.C,y-(n+gb*ab.C)),a.uniform2f(a.getUniformLocation(this.Ib,"uRingTexturePosition"),a.drawingBufferWidth/x*(h+db*ab.C),y-(n+gb*ab.C)),a.uniform1f(a.getUniformLocation(this.Ib,"uCircleRadius"),fb),a.uniform2f(a.getUniformLocation(this.Ib,
"uRingPosition"),h+db*ab.C,y-(n+gb*ab.C)),a.uniform1f(a.getUniformLocation(this.Ib,"uRingRadius"),fb),a.uniform1f(a.getUniformLocation(this.Ib,"uRingAlpha"),ib),a.uniform1f(a.getUniformLocation(this.Ib,"uAspectRatio"),a.drawingBufferWidth/a.drawingBufferHeight/(x/y)),a.uniform1i(a.getUniformLocation(this.Ib,"uSampler"),0),a.drawArrays(a.TRIANGLE_FAN,0,this.ae.numberOfItems))}this.o.pa&&(a.useProgram(this.o.D.Gg.R),a.disable(a.BLEND),a.enable(a.DEPTH_TEST))}}}}}class xd{constructor(a,b){this.o=a;this.O=
b;let e,f,h=this.__div=document.createElement("div");h.ggVisible=!0;e=document.createElement("img");let n;b.nd?(n=b.nd,e.setAttribute("style","position: absolute; width: "+b.tf+"px; height: "+b.Bd+"px; top: -"+b.Bd/2+"px; left: -"+b.tf/2+"px; cursor: pointer; "+a.Tb+"user-select: none; max-width: none;")):(n="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",
e.setAttribute("style","position: absolute; width: 28px; height: 28px; top: -14px; left: -14px; cursor: pointer; "+a.Tb+"user-select: none; max-width: none;"));e.setAttribute("src",n);e.ondragstart=function(){return!1};h.appendChild(e);n="position:absolute;"+(a.Tb+"user-select: none;");n+=a.Tb+"touch-callout: none;";n+=a.Tb+"tap-highlight-color: rgba(0,0,0,0);";a.Mb&&!a.pa&&(n+=a.Tb+"transform: translateZ(9999999px);");h.setAttribute("style",n);h.onclick=function(){a.We(b);a.hk(a.Ja(b.url),b.target);
a.ka&&a.ka.hotspotProxyClick&&a.ka.hotspotProxyClick(b.id,b.url);a.G("hsproxyclick",{id:b.id,url:b.url})};h.ondblclick=function(){a.ka&&a.ka.hotspotProxyDoubleClick&&a.ka.hotspotProxyDoubleClick(b.id,b.url);a.G("hsproxydblclick",{id:b.id,url:b.url})};let r=a.P.Ik;r.enabled&&""!=b.title&&(f=document.createElement("div"),n="position:absolute;",n=b.nd?a.Vl()?n+("top: -"+(b.Bd/2+20)+"px;"):n+("top: "+b.Bd/2+"px;"):a.Vl()?n+"top:\t -50px;":n+"top:\t 20px;",n=r.dj?n+"white-space: pre-wrap;":n+"white-space: nowrap;",
n+=a.Tb+"transform-origin: 50% 50%;",f.setAttribute("style",n+"visibility: hidden;overflow: hidden;padding: 0px 1px 0px 1px;"),f.style.color=this.o.Gb(r.Jk,r.Hk),f.style.backgroundColor=r.background?this.o.Gb(r.ec,r.dc):"transparent",f.style.border="solid "+this.o.Gb(r.hc,r.fc)+" "+r.ij+"px",f.style.borderRadius=r.jl+"px",f.style.textAlign="center",0<r.width?(f.style.left=-r.width/2+"px",f.style.width=r.width+"px"):f.style.width="auto",f.style.height=0<r.height?r.height+"px":"auto",f.style.overflow=
"hidden",f.innerHTML=a.Ja(b.title),f.classList.add("ggskin"),f.classList.add("ggdefaulthotspot"),h.addEventListener("mouseover",function(){0==r.width&&(f.style.left=-f.offsetWidth/2+"px");f.style.visibility="inherit";a.ka&&a.ka.hotspotProxyOver&&a.ka.hotspotProxyOver(b.id,b.url);a.G("hsproxyover",{id:b.id,url:b.url})}),h.addEventListener("mouseout",function(){f.style.visibility="hidden";a.ka&&a.ka.hotspotProxyOut&&a.ka.hotspotProxyOut(b.id,b.url);a.G("hsproxyout",{id:b.id,url:b.url})}),h.appendChild(f),
this.Jr=f);h.addEventListener("mouseover",function(){a.We(b)});h.addEventListener("mouseout",function(){a.We(null)})}Lt(){this.Jr&&(this.Jr.innerHTML=this.o.Ja(this.O.title))}}class tb{constructor(a,b){this.x=a;this.y=b}init(a,b){this.x=a;this.y=b}he(a,b,e){let f=b.y-a.y;this.x=a.x+(b.x-a.x)*e;this.y=a.y+f*e}ps(a,b,e,f,h){var n=new tb;n.he(a,e,h);a=new tb;a.he(e,f,h);e=new tb;e.he(f,b,h);b=new tb;b.he(n,a,h);n=new tb;n.he(a,e,h);a=new tb;a.he(b,n,h);this.x=a.x;this.y=a.y}il(a,b,e,f,h){let n=new tb,
r=.5,w=.25,x;do n.ps(a,b,e,f,r),x=n.x-h,r=0<x?r-w:r+w,w/=2;while(.01<Math.abs(x));this.x=n.x;this.y=n.y}}class yd{constructor(){this.pi={Kh:1,Lh:1,ei:0,fi:0,cj:0,Wk:0,scale:1};this.Xb=!0;this.bounds=[]}}class zd{constructor(){let a;this.xf=Array(6);for(a=0;6>a;a++)this.xf[a]=new yd}checkVisibility(a,b,e,f){for(let n=0;6>n;n++){let r;if(r=this.xf[n]){let w;w=[];w.push(new lb(-1,-1,-1,0,0));w.push(new lb(1,-1,-1,1,0));w.push(new lb(1,1,-1,1,1));w.push(new lb(-1,1,-1,0,1));for(var h=0;h<w.length;h++)4>
n?w[h].Ca(-Math.PI/2*n):w[h].ya(Math.PI/2*(4===n?-1:1)),f&&(w[h].Ta(f.Y*Math.PI/180),w[h].ya(-f.pitch*Math.PI/180)),w[h].Ca(-a*Math.PI/180),w[h].ya(b*Math.PI/180),w[h].Ta(e*Math.PI/180);r.Xb=0<w.length}}}}class Xb{constructor(a){this.pan={m:0,Va:0,min:0,max:360,d:0,Am:0,Ub:0,open:0};this.u={m:0,Va:0,min:-90,max:90,d:0,Ub:0,open:0};this.Y={m:0,Va:0,min:-180,max:180,d:0,open:0};this.Zc={pan:0,u:-90,Y:0,fov:170,rb:9};this.fov={m:70,Va:70,min:1,ii:0,max:170,wm:360,xm:270,prev:0,d:0,Yc:{enabled:!1,x:0,
y:0},mode:0,Ar:0,Ao:0,open:0};this.cube=new zd;this.Gg=null;this.qb={Y:0,pitch:0};this.Wf=this.oc=!1;this.ik=this.yq=4;this.cd=this.xq=this.Cm=0;this.M=new qd;this.hi=200;this.Ui=0;this.An=5;this.pe=0;this.Fr=50;this.Ut=0;this.B={src:[],qf:4,width:640,height:480,Mc:!1,Bg:!1,Ek:!0,Dk:!1,Be:"loop",Gk:"",j:null,zn:!1,texture:null,Rk:null,Ti:null,Lj:null,format:1,Rh:0,flipY:1,kb:function(){return 0},an:function(){},loop:function(){return!1}};this.Lf={pan:-1,u:-1,fov:-1};this.tm=0;this.zh=[];this.Al="";
this.Ah=[];this.bh=this.af=1;this.Jm=new Gb;this.o=a}ra(){this.o.ra(!1)}update(){this.o.update()}ce(){return this.pan.m}zj(){let a=this.pan.m;if(!this.Qa()){for(;-180>a;)a+=360;for(;180<a;)a-=360}return a}de(){let a=this.pan.m-this.pan.Am;if(!this.Qa()){for(;-180>a;)a+=360;for(;180<a;)a-=360}return a}Md(a){this.ra();isNaN(a)||(this.pan.m=Number(a));this.update()}Di(a){this.ra();isNaN(a)||(this.pan.m=Number(a)+this.pan.Am);this.update()}vh(a,b){isNaN(a)||(this.Md(this.ce()+a),b&&(this.pan.d=a))}ol(a,
b){this.vh(a*this.Jh(),b)}Jh(){return Math.min(1,2*Math.tan(Math.PI*Math.min(this.fov.m,90)/360))}Af(){return this.u.m}Nd(a){this.ra();isNaN(a)||(this.u.m=Number(a));this.update()}wh(a,b){this.Nd(this.Af()+a);b&&(this.u.d=a)}ql(a,b){this.wh(a*this.Jh(),b)}Rg(a){this.ra();isNaN(a)||(this.Y.m=Number(a));this.update()}Cj(){return this.Y.m}Fd(){return this.fov.m}Jb(a){this.ra();switch(this.Z()){case 4:var b=170;break;case 12:b=360;break;case 9:b=355;break;default:b=170}this.Qa()&&(b=9999999999);return!isNaN(a)&&
0<a&&a<b&&(b=this.fov.m,this.fov.m=1*a,b!=this.fov.m)?(this.update(),!0):!1}cn(a){0<=a&&4>a&&(this.fov.mode=Number(a),this.Yd(),this.update())}Qa(){return 2==this.cd}uh(a,b){return this.Jb(this.Fd()+a)?(b&&(this.fov.d=a),!0):!1}jj(a,b){if(!isNaN(a)){let e;e=a/90*Math.cos(Math.min(this.fov.m,90)*Math.PI/360);e=this.fov.m*Math.exp(e);this.Jb(e);b&&(this.fov.d=a)}}zk(a,b){this.ra();isNaN(a)||(this.pan.m=a);isNaN(b)||(this.u.m=b);this.update()}hn(a,b,e){this.ra();!isNaN(a)&&1E7>a&&-1E7<a&&(this.pan.m=
a);!isNaN(b)&&1E7>b&&-1E7<b&&(this.u.m=b);!isNaN(e)&&1E7>e&&-1E7<e&&(this.Y.m=e);this.update()}Qg(a,b,e){this.ra();isNaN(a)||(this.pan.m=a);isNaN(b)||(this.u.m=b);isNaN(e)||this.Jb(e);this.update()}tk(){this.Qg(this.pan.Va,this.u.Va,this.fov.Va)}be(){return Number(this.o.H.height)/(2*Math.tan(Math.PI/180*(this.Db()/2)))}Gd(a,b,e){var f=this.o;a||(a=f.ca.x,b=f.ca.y);if(this.Qa())e=this.fov.m/f.H.height,a=-(a-f.H.width/2)*e+this.pan.m,b=-(b-f.H.height/2)*e+this.u.m;else{f=new lb(0,0,1);b=this.Aj(a,
b);f.bc(-b.tilt);f.Sc(b.pan);f.bc(-this.u.m);f.Sc(-this.pan.m);e||(f.bc(-this.qb.pitch),f.le(this.qb.Y));for(a=f.jf()-180;-180>a;)a+=360;b=f.kf()}e={};e.pan=a;e.tilt=b;return e}Aj(a,b){var e=this.o;a||(a=e.ca.x,b=e.ca.y);var f=e.H;e=f.height/(2*Math.tan(this.Db()*Math.PI/360));a-=f.width/2;b-=f.height/2;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}ab(a,b,e){let f=b?Number(b):0;if(0!=a&&4!=a&&12!=a&&9!=a)this.o.Yb("Unsupported projection type: "+
a);else if(b&&0!==f&&4!==f&&12!==f&&9!==f)this.o.Yb("Unsupported projection2 type: "+f);else if(a==f&&(f=0),this.xq=e?Number(e):1,this.ik!=a||this.Cm!=f)this.ik=a,this.Cm=f,this.Gg.Mj()}Z(){return 0==this.ik?4:this.ik}Ic(){return this.Cm}Ph(){return this.yq}Bj(){return this.xq}aspect(){return this.o.H.width/this.o.H.height}Yp(){return 4==this.Z()&&0==this.Ic()}Db(a,b){a||(a=this.fov.m);b||(b=this.Z());return this.jg(b,1/this.Po(this.o.H),a)}jg(a,b,e){return this.Qa()?b*e:4==a?360*Math.atan(b*Math.tan(e/
2*Math.PI/180))/Math.PI:9==a?720*Math.atan(b*Math.tan(e/4*Math.PI/180))/Math.PI:b*e}Tl(a,b){a||(a=this.Db());b||(b=this.Z());return this.jg(b,this.aspect(),a)}Sl(a,b){a||(a=this.Db());b||(b=this.Z());let e=this.aspect();e=Math.sqrt(1+e*e);return this.jg(b,e,a)}jo(a){var b;b||(b=this.Z());return this.jg(b,this.Po(this.o.H),a)}Po(a){let b=1;switch(this.fov.mode){case 0:b=1;break;case 1:b=a.width/a.height;break;case 2:b=Math.sqrt(a.width*a.width+a.height*a.height)/a.height;break;case 3:b=4*a.height/
3>a.width?1:3*a.width/(4*a.height)}return b}Hi(a){this.Jb(this.jo(a))}dn(a){let b=this.Z(),e=1/this.aspect();this.Hi(this.jg(b,e,a))}bn(a){let b=this.Z(),e=this.aspect();e=1/Math.sqrt(1+e*e);this.Hi(this.jg(b,e,a))}Yd(){if(!this.o.qe){var a=this.Jm;a.pan=this.pan.m;a.u=this.u.m;a.fov=this.fov.m;this.ig(a);this.ig(a);this.ig(a);this.pan.m=a.pan;this.u.m=a.u;this.fov.m!=a.fov&&(this.fov.m=a.fov);this.o.G("checklimits",{pan:a.pan,tilt:a.u,fov:a.fov})}}ig(a){var b=this.aspect();var e=this.o.H;var f=this.o;
let h=f.A;if(this.Qa()){if(0<this.fov.ii){var n=this.af;this.M.levels&&0<this.M.levels.length&&(n=this.M.levels[0].height);10<n&&(this.fov.min=100*e.height/(n*this.fov.ii))}n=a.fov/2;e=n*b;var r=this.M.width/this.M.height*50;b=f.K.Sq?2*Math.min(50,r/b):2*Math.max(50,r/b);a.fov<this.fov.min&&(a.fov=this.fov.min);a.fov>b&&(a.fov=b);50<n?a.u=0:(50<a.u+n&&(a.u=50-n),-50>a.u-n&&(a.u=-50+n));e>r?a.pan=0:(a.pan+e>r&&(a.pan=r-e,f.A.active&&(f.A.speed=-f.A.speed,this.pan.d=0)),a.pan-e<-r&&(a.pan=-r+e,h.active&&
(h.speed=-h.speed,this.pan.d=0)))}else{0<this.fov.ii&&(n=this.af,this.M.levels&&0<this.M.levels.length&&(n=this.M.levels[0].height),10<n&&(this.fov.min=360*Math.atan2(e.height/2,n/2*this.fov.ii)/Math.PI));a.fov<this.fov.min&&(a.fov=this.fov.min);r=this.fov.max;var w=179;n=this.Db()/2;e=b*n;4==this.Z()?e=180*Math.atan(b*Math.tan(n*Math.PI/180))/Math.PI:9==this.Z()?(r=this.fov.xm,w=355):12==this.Z()&&(r=this.fov.wm,w=360);f.pa||(r=Math.max(160,r));a.fov>r&&(a.fov=r);12==this.Z()&&(2*e>w&&(a.fov=w/b),
n=this.Db()/2,2*n>w&&(a.fov=w),n=this.Db()/2,e=b*n);2*n>this.u.max-this.u.min&&180>this.u.max-this.u.min&&(n=(this.u.max-this.u.min)/2,a.fov=this.jo(2*n));90>this.u.max?a.u+n>this.u.max&&(a.u=this.u.max-n):a.u>this.u.max&&(a.u=this.u.max);-90<this.u.min?a.u-n<this.u.min&&(a.u=this.u.min+n):a.u<this.u.min&&(a.u=this.u.min);f=this.pan.max-this.pan.min;359.99>f&&(a.pan<this.pan.min&&a.pan+360<this.pan.max&&(a.pan+=360),this.pan.m>this.pan.max&&a.pan-360>this.pan.min&&(a.pan-=360),b=90,r=Math.tan(n*Math.PI/
180),w=Math.tan((Math.abs(a.u)+n)*Math.PI/180),w=Math.sqrt(w*w+1)/Math.sqrt(r*r+1),n=180*Math.atan(w*Math.tan(e*Math.PI/180))/Math.PI,2*n>f&&(w=Math.tan(f*Math.PI/360)/Math.tan(e*Math.PI/180),f=w*Math.sqrt(r*r+1),w=Math.sqrt(f*f-1),b=180/Math.PI*Math.atan(w)),a.pan+n>this.pan.max&&(a.pan=this.pan.max-n,h.active&&(h.speed=-h.speed,this.pan.d=0)),a.pan-n<this.pan.min&&(a.pan=this.pan.min+n,h.active&&(h.speed=-h.speed,this.pan.d=0)),a.u+e>b&&(a.u=b-e),a.u-e<-b&&(a.u=-b+e))}}ah(a,b,e,f,h){let n=this.M.um-
1-b,r=this.M.vm,w="x";switch(a){case 0:w="f";break;case 1:w="r";break;case 2:w="b";break;case 3:w="l";break;case 4:w="u";break;case 5:w="d";break;case "vr":w="vr"}h&&(a+="l",w+="l");h=this.o.Lq;for(let x=0;3>x;x++)r=h(r,"c",a),r=h(r,"s",w),r=h(r,"r",b),r=h(r,"l",n),r=h(r,"x",e),r=h(r,"y",f),r=h(r,"v",f),r=h(r,"h",e);return this.o.La(r)}At(a,b,e){e.fx=a.width/this.M.W*b.Kh;e.fy=a.height/this.M.W*b.Lh;e.Jd=a.width/this.M.W*b.ei;e.Kd=a.height/this.M.W*b.fi;e.fx=Math.min(Math.max(0,Math.floor(e.fx)),
a.$-1);e.fy=Math.min(Math.max(0,Math.floor(e.fy)),a.sa-1);e.Jd=Math.min(Math.max(0,Math.floor(e.Jd)),a.$-1);e.Kd=Math.min(Math.max(0,Math.floor(e.Kd)),a.sa-1)}aw(){if(!(6>this.cube.xf.length))for(let e=0;6>e;e++){var a=void 0;a=this.cube.xf[e];let f;f=[];f.push(new lb(-1,-1,-1,0,0));f.push(new lb(1,-1,-1,1,0));f.push(new lb(1,1,-1,1,1));f.push(new lb(-1,1,-1,0,1));for(var b=0;4>b;b++)4>e?f[b].Ca(-Math.PI/2*e):f[b].ya(Math.PI/2*(4==e?-1:1)),this.qb&&(f[b].Ta(this.qb.Y*Math.PI/180),f[b].ya(-this.qb.pitch*
Math.PI/180)),f[b].Sc(-this.pan.m),f[b].bc(this.u.m),f[b].le(this.Y.m);f=this.o.sl(f);a.Xb=0<f.length;if(a.Xb){a=a.pi;a.Kh=f[0].wd;a.ei=f[0].wd;a.Lh=f[0].v;a.fi=f[0].v;for(b=1;b<f.length;b++)a.Kh=Math.min(a.Kh,f[b].wd),a.ei=Math.max(a.ei,f[b].wd),a.Lh=Math.min(a.Lh,f[b].v),a.fi=Math.max(a.fi,f[b].v);a.cj=a.ei-a.Kh;a.Wk=a.fi-a.Lh;a.scale=Math.max(a.cj,a.Wk)}else a.pi.cj=-1,a.pi.Wk=-1}}iq(){for(var a=0;a<this.M.levels.length;a++){let e=this.M.levels[a];for(var b in e.Na)e.Na.hasOwnProperty(b)&&(e.Na[b].visible=
!1)}}No(){let a=0,b=this.o.H,e=Math.tan(Math.min(this.Db(),175)*Math.PI/360),f=b.height/(2*e);f*=1+b.width/b.height*e/2;for(f*=Math.pow(2,1<this.o.devicePixelRatio?this.M.gq:this.M.fq);this.M.levels.length>=a+2&&!this.M.levels[a+1].Kg&&this.M.levels[a+1].width>f;)a++;return a}Iu(){if(this.o.K.Rq&&this.o.K.lc){var a=this.Jm;a.pan=this.pan.m;a.u=this.u.m;a.fov=this.fov.m;this.ig(a);this.ig(a);this.ig(a);let b=a.pan-this.pan.m,e=a.u-this.u.m;a=a.fov-this.fov.m;if(0!=b||0!=e||0!=a){let f;f=.2+.9*Math.min((Math.abs(b)+
Math.abs(e)+Math.abs(a))/Math.abs(Math.min(this.fov.m,90))*.3,1);this.pan.m+=b*f;this.u.m+=e*f;this.fov.m+=a*f;this.o.qa.Zm=.3;this.update()}else this.o.qa.Zm=0}else this.Yd();if(isNaN(this.pan.m)||1E7<this.pan.m||-1E7>this.pan.m)this.pan.m=0;if(isNaN(this.u.m)||1E7<this.u.m||-1E7>this.u.m)this.u.m=0;if(isNaN(this.Y.m)||1E7<this.Y.m||-1E7>this.Y.m)this.Y.m=0;if(!this.Qa()){for(;360<this.pan.m;)this.pan.m-=360;for(;-360>this.pan.m;)this.pan.m+=360}}}class Eb extends wb{Kt(){return this.N}constructor(a,
b){super(a,b);this.D=new Xb(this);this.cd=0;this.H={width:10,height:10};this.Bl=new lb;this.crossOrigin="anonymous";this.ee=this.cg=0;this.cs={};this.Wf=this.oc=!1;this.oa={start:{x:0,y:0},na:{x:0,y:0},ie:{x:0,y:0},m:{x:0,y:0},ma:{x:0,y:0}};this.U={bd:!1,od:!1,Pj:function(){return this.od||this.bd},Oo:0,startTime:0,start:{x:0,y:0},na:{x:0,y:0},ie:{x:0,y:0},m:{x:0,y:0},ma:{x:0,y:0},si:!1,Yg:null};this.Ce=this.$d=!0;this.qa={enabled:!0,na:{x:0,y:0},ma:{x:0,y:0},Zm:0,fov:{active:!1,jc:0,center:{enabled:!1,
x:0,y:0}}};this.ob={alpha:0,beta:0,gamma:0,orientation:0,Pf:0,Ai:!0,fadeIn:0};this.Sh={alpha:0,beta:0,gamma:0,orientation:0};this.B={src:[],qf:4,width:640,height:480,Mc:!1,Bg:!1,Ek:!0,Dk:!1,level:1,Be:"loop",Gk:"",j:null,zn:!1,texture:null,Rk:null,Ti:null,Lj:null,format:1,Rh:0,flipY:1,kb:function(){return 0},an:function(){},loop:function(){return!1}};this.control=this.T=this.Gc=this.Ka=this.ia=null;this.ld=[];this.Ha=!1;this.ze=1;this.aa=null;this.se=this.gf=this.fe=!1;this.rh=0;this.Td=.02;this.fl=
0;this.hl=!1;this.el=this.gj=this.th=this.ff=this.bo=0;this.$n=-1;this.vc="";this.Xm=this.Ve=!1;this.zh=[];this.Al="";this.Ah=[];this.bh=this.af=1;this.Ng=!1;this.A={enabled:!1,timeout:5,active:!1,Xg:!1,speed:.4,Kk:0,Pp:!1,fk:0,sq:!0,Eg:"",rq:!1,$f:!1,fd:!1,hj:"",so:!1,Ud:"Animation01",dg:!1,dk:!1,wn:!1,startTime:0,rd:0,Ih:!1,pj:!1,Zj:0,Id:0,ai:0,bi:0,$h:0,bq:0};this.I={active:!1,aborted:!1,speed:.1,pan:0,u:0,Y:0,fov:70,Ri:70,ai:0,bi:0,cq:0,$h:0,rb:0,vi:0,lastTime:0,Jn:!1,Dg:!1,Zn:0,Yn:0,Kj:!1};this.Sk=
null;this.tm=0;this.xe=[];this.ao={};this.qc={};this.Oc={};this.Cg={};this.L=[];this.nr=!1;this.X=[];this.V=[];this.Za=[];this.Qb=[];this.cf=[];this.cb=[];this.za=[];this.Vf=[];this.Se=this.Sb=null;this.fa=[];this.Bu={target:0,current:0,zd:.01,delay:2,Hl:0,qj:!1,os:!1};this.K={di:!1,eu:!1,pc:!1,Oe:!1,lc:!0,Up:!1,nn:1,Rq:!1,re:!0,Dl:!0,ul:!0,vl:!0,to:!1,Hj:!1,Sq:!0,sensitivity:8};this.Dh=!0;this.bj=this.jh=this.ih=this.qe=this.Kn=this.pa=!1;this.gw=!0;this.hm=this.hw=!1;this.Ol=!0;this.lh=this.em=
this.gm=!1;this.Wr=!0;this.Tb="";this.Hc="transition";this.Ae="transform";this.tj="perspective";this.Ya={width:0,height:0};this.So=new lb;this.Ro=new lb;this.To=new lb;this.Uo=new lb;this.Qo=new lb;this.qd=!1;this.Uc=this.aq=this.ua="";this.Tk=[];this.zm=[];this.cm=!1;this.aj=!0;this.ha=this.F=null;this.xh=!1;this.bb=null;this.Da={enabled:!1,speed:1,running:!1,finished:!0,Dd:{pan:0,u:0,fov:0,rb:0,Vr:!1}};this.Nc=null;this.yh=function(f,h){if(0==f.length)return f;let n,r,w,x,y,z,cb,ab;ab=[];n=h.mk(f[0])-
0;for(x=0;x<f.length;x++){z=x;cb=x+1;cb==f.length&&(cb=0);r=h.mk(f[cb])-0;if(0<=n&&0<=r)ab.push(f[z]);else if(0<=n||0<=r)w=r/(r-n),0>w&&(w=0),1<w&&(w=1),y=new lb,y.he(f[z],f[cb],w),0>n||ab.push(f[z]),ab.push(y);n=r}return ab};this.Jm=new Gb;this.Mk=1;this.Xj=-1;this.ek=1;this.Pl=this.Il=this.Qm=this.pk=0;this.$p=!1;this.Ed=!0;this.Av();this.Qn="aHR0cHM6Ly9wYW5vMnZyLmNvbQ==";this.Rn="Q3JlYXRlZCB3aXRoIFBhbm8yVlI=";this.hm=pb();this.pa=qb();this.ih=this.hm;this.pa&&(this.ih=!1);this.Ve=!0;this.Xm=!1;
if(this.Lc||this.Uh)this.ar(80),this.D.An=2;var e="Pano2VR player "+this.$l();this.Ef()&&(e+=", THREEjs "+eb.REVISION);this.Lp()&&(e+=", HSL.js");e+=", "+(this.hm?"CSS 3D available":"CSS 3D not available");e+=", "+(this.pa?(this.Kn?"WebGL2":"WebGL")+" available":"WebGL not available");this.Yb(e);this.addListener("languagechanged",()=>{this.ts();this.us()});document.addEventListener("visibilitychange",()=>{});this.Wa=new Rb(this);this.Wa.Ie=!1;7<this.ak.length&&(e=Eb.Ch("bG9n"),window[Eb.Ch("Y29uc29sZQ==")][e](Eb.Bo(this.ak)));
this.We(this.Wa);this.zs();this.aj=this.Wp?this.Mb&&this.rk&&10<=Number(this.Ob)?!0:!1:!0;b&&b.hasOwnProperty("webGLFlags")&&b.webGLFlags&&(this.cs=b.webGLFlags);this.Nc=new wd(this);this.userdata=this.ag=this.qg();this.emptyHotspot=this.Wa;this.mouse=this.ca;this.F=new gd(this);this.bb=new vd(this);this.yl(a);this.fa.push(new Wb(this,this.D));this.fa.push(new Wb(this,new Xb(this)));this.ja=new md(this);this.ns();this.ra(!1);this.xd()}$l(a){return-99991===a?this.du:"7.1.2/20913"}xl(){this.F.enabled=
this.ha.enabled;this.F.type=this.ha.type;this.F.da=this.ha.zoomin;this.F.Vc=this.ha.zoomout;this.F.rf=this.ha.blendtime;this.F.oh=this.ha.zoomoutpause;this.F.$k=this.ha.zoomfov;this.F.Yk=this.ha.zoomafterinfov;this.F.Zk=this.ha.zoomafteroutfov;this.F.ph=this.ha.zoomspeed;this.F.eg=this.ha.blendcolor;this.F.dd=this.ha.softedge;this.ha=null}qv(a){this.ha={};this.ha.enabled=!0;this.ha.type=this.F.type;this.ha.zoomin=this.F.da;this.ha.zoomout=this.F.Vc;this.ha.blendtime=this.F.rf;this.ha.zoomoutpause=
this.F.oh;this.ha.zoomfov=this.F.$k;this.ha.zoomafterinfov=this.F.Yk;this.ha.zoomafteroutfov=this.F.Zk;this.ha.zoomspeed=this.F.ph;this.ha.blendcolor=this.F.eg;this.ha.softedge=this.F.dd;if(a.hasOwnProperty("type")){var b=a.type;"cut"==b||"crossdissolve"==b||"diptocolor"==b||"irisround"==b||"irisroundcenter"==b||"irisrectangular"==b||"irisrectangularcenter"==b||"wipeleftright"==b||"wiperightleft"==b||"wipetopbottom"==b||"wipebottomtop"==b||"wiperandom"==b||"mesh"==b?this.ha.type=b:this.Yb("unknown transition type")}a.hasOwnProperty("before")&&
(b=Number(a.before),0==b||2==b)&&(this.ha.zoomin=b);a.hasOwnProperty("after")&&(b=Number(a.after),0==b||2==b||3==b||4==b)&&(this.ha.zoomout=b);a.hasOwnProperty("transitiontime")&&(b=Number(a.transitiontime),0<=b&&50>=b&&(this.ha.blendtime=b));a.hasOwnProperty("waitfortransition")&&(this.ha.zoomoutpause=1==a.waitfortransition);a.hasOwnProperty("zoomedfov")&&(b=Number(a.zoomedfov),.01<=b&&50>=b&&(this.ha.zoomfov=b));a.hasOwnProperty("zoomafterinfov")&&(b=Number(a.zoomafterinfov),70<=b&&120>=b&&(this.ha.zoomafterinfov=
b));a.hasOwnProperty("zoomafteroutoutfov")&&(b=Number(a.zoomafteroutfov),.01<=b&&70>=b&&(this.ha.zoomafteroutfov=b));a.hasOwnProperty("zoomspeed")&&(b=Number(a.zoomspeed),.01<=b&&99>=b&&(this.ha.zoomspeed=b));a.hasOwnProperty("dipcolor")&&(this.ha.blendcolor=a.dipcolor);a.hasOwnProperty("softedge")&&(a=Number(a.softedge),0<=a&&1E3>=a&&(this.ha.softedge=a));this.xh||this.xl()}ab(a,b,e){this.D.ab(a,b,e)}Z(){return this.D.Z()}Ph(){return this.D.Ph()}Ic(){return this.D.Ic()}Bj(){return this.D.Bj()}pl(a,
b){if(0!=a&&4!=a&&12!=a&&9!=a)this.Yb("Unsupported projection type: "+a);else if(this.pa||0==a||4==a||this.Yb("Projection changes require WebGL!"),this.Z()!=a){let e={};const f=this.D;e.pan=f.pan.m;e.tilt=f.u.m;e.fov=f.fov.m;e.projection=a;e.timingFunction=3;e.speed=b;a=this.Mh(a);e.fov=Math.min(a,e.fov);this.ki(e)}}zs(){if(!this.ga){try{window.AudioContext=window.AudioContext||window.webkitAudioContext,this.ga=new AudioContext}catch(a){this.ga=null}this.Mb&&(!this.rk||9>Number(this.Ob))&&(this.ga=
null);this.Mb&&!this.Lc&&12<=Number(this.Ob)&&13>Number(this.Ob)&&(this.ga=null);this.Mb&&this.Lc&&13==Number(this.Ke[0])&&(1==Number(this.Ke[1])||2<=Number(this.Ke[1]))&&(this.ga=null)}}ar(a){this.D.hi=a}ct(){return this.qd}rt(){return this.qd?this.qp().length:1}$s(){return this.A.active}Nh(){return this.isLoaded}ip(){return!this.isLoaded}be(){return this.D.be()}Ji(a,b){try{this.nc&&(a=window.innerWidth,b=window.innerHeight);let n=a-this.margin.left.ba-this.margin.right.ba,r=b-this.margin.top.ba-
this.margin.bottom.ba;if(!(10>n||10>r)){var e=window.devicePixelRatio||1;this.Ng&&(e=1);this.ia.style.width=n+"px";this.ia.style.height=r+"px";this.ia.style.left=this.margin.left.ba+"px";this.ia.style.top=this.margin.top.ba+"px";if(this.pa)try{this.Ka&&(this.Ka.style.position="absolute",this.Ka.style.display="inline",this.Ka.style.width=n+"px",this.Ka.style.height=r+"px",this.Ka.width=n*e,this.Ka.height=r*e),this.N&&(this.Ya.width=n*e,this.Ya.height=r*e,this.N.viewport(0,0,this.N.drawingBufferWidth,
this.N.drawingBufferHeight))}catch(w){alert(w)}this.Gc&&(this.Gc.style.width=a+"px",this.Gc.style.height=b+"px",this.Gc.width=a,this.Gc.height=b);this.xa&&(this.xa.style.width=a+"px",this.xa.style.height=b+"px",this.aa&&this.aa!=this.xa&&(this.aa.style.width=a+"px",this.aa.style.height=b+"px"));this.fe&&(this.Ha=!0);var f=this.ia.offsetWidth,h=this.ia.offsetHeight;if(this.H.width!=f||this.H.height!=h)this.H.width=f,this.H.height=h;this.fw();this.aa&&this.aa.ggUpdateSize&&this.aa.ggUpdateSize(a,b);
this.G("sizechanged",{w:a,h:b});this.G("playerstatechanged",{})}}catch(n){}}xd(){this.Rr();this.Ji(this.container.offsetWidth,this.container.offsetHeight)}no(a){0==a&&(this.K.lc=!1);1==a&&(this.K.lc=!0);2==a&&(this.K.lc=!this.K.lc);this.G("viewmodechanged",{});this.G("playerstatechanged",{})}Ep(){return 1==this.K.lc?1:0}vs(a){this.Nc&&(this.Nc.jn=0==a?!0:1==a?!1:!this.Nc.jn,this.update())}vp(){return this.P.mode}oo(){this.G("viewstatechanged",{})}Fp(){return 0}jt(a){return"_firstmap"==a?"web":"_firstfloorplan"==
a?"file":(a=this.qc[a])?a.type:"web"}it(a){"_firstmap"==a?a=this.ep():"_firstfloorplan"==a&&(a=this.xj());return(a=this.qc[a])?a:{}}ep(){let a="";for(let b in this.qc){let e=this.qc[b];"web"==e.type&&1E4>e.index&&(a=b)}return a}xj(){let a="";for(var b in this.qc){let e=this.qc[b];"file"==e.type&&1E4>e.index&&(a=b)}return a}mt(a,b){"_firstfloorplan"==b&&(b=this.xj());let e=[];a||(a=this.ua);let f=this.xe[a];f&&(a=f);""===a&&0<Object.keys(this.Oc).length&&(a=Object.keys(this.Oc)[0]);this.Oc[a]&&this.Oc[a][b]&&
(e.push(this.Oc[a][b].y),e.push(this.Oc[a][b].x));return e}nt(a,b){"_firstfloorplan"==b&&(b=this.xj());let e=[];a||(a=this.ua);let f=this.xe[a];f&&(a=f);""===a&&0<Object.keys(this.Oc).length&&(a=Object.keys(this.Oc)[0]);this.Cg[a]&&this.Cg[a][b]&&(e.push(this.Cg[a][b].x),e.push(this.Cg[a][b].y));return e}kp(a){var b=this.xe[a];b&&(a=b);b=this.jp();let e=[];for(let f=0;f<b.length;f++)this.Oc[a]&&this.Oc[a][b[f]]&&e.push(b[f]);return e}ht(a){a=this.kp(a);return 0<a.length?a[0]:""}jp(){let a=[];for(let b in this.qc)a.push(b);
return a}Vs(){let a=[];for(let b in this.qc)"file"==this.qc[b].type&&a.push(b);return a}St(){for(let a in this.qc)if("web"==this.qc[a].type)return!0;return!1}Rt(){for(let a in this.qc)if("file"==this.qc[a].type)return!0;return!1}Wt(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.So.init(0,0,-1);this.Ro.init(a,0,-b);this.To.init(-a,0,-b);this.Uo.init(0,f,-e);this.Qo.init(0,-f,-e)}sl(a){a=this.yh(a,this.So);a=this.yh(a,this.Ro);a=this.yh(a,
this.To);a=this.yh(a,this.Uo);return a=this.yh(a,this.Qo)}Qr(a){if(!this.Ve&&this.cu!=a){this.cu=a;let b;b=this.margin.left.ba+this.H.width/2+"px ";b+=this.margin.top.ba+this.H.height/2+"px ";this.xa.style[this.tj]=a+"px";this.xa.style[this.tj+"Origin"]=b;this.ia.style[this.tj]=a+"px";this.ia.style[this.tj+"Origin"]=b}}Ul(){return this.F.vd||this.F.Pd||this.pa&&(4!=this.Z()||0!=this.Ic())?!1:!0}Ok(){const a=this.D;let b=new lb(0,0,-100),e=this.be();const f=100/a.fov.m*this.H.height;let h=this.Ul(),
n=1E5,r=-1;for(let cb=0;cb<this.L.length;cb++){let ab=this.L[cb];if("point"==ab.type){var w=void 0,x=void 0;var y=!1;a.Qa()?(w=(a.pan.m-ab.pan)/100*f,x=(a.u.m-ab.u)/100*f,Math.abs(w)<this.H.width/2+500&&Math.abs(x)<this.H.height/2+500&&(y=!0)):(b.init(0,0,-100),b.ya(-ab.u*Math.PI/180),b.Ca(ab.pan*Math.PI/180),b.Ca(-a.pan.m*Math.PI/180),b.ya(a.u.m*Math.PI/180),b.Ta(a.Y.m*Math.PI/180),.01>b.z?(x=-e/b.z,w=b.x*x,x*=b.y,Math.abs(w)<this.H.width/2+5E3&&Math.abs(x)<this.H.height/2+5E3&&(y=!0)):x=w=-1E4);
ab.zc=w+this.H.width/2;ab.ac=x+this.H.height/2;ab.Lm=ab.zc/this.H.width*100;ab.Mm=ab.ac/this.H.height*100;ab.visible=y;ab.closestToCenter=!1;if(y&&h){var z=Math.sqrt(w*w+x*x);n>z&&(n=z,r=cb)}ab.px=ab.zc;ab.py=ab.ac;ab.pxp=ab.Lm;ab.pyp=ab.Mm;ab.visible=ab.visible;if(ab.j&&ab.j.onUpdatePosition)ab.j.onUpdatePosition(this,ab);else ab.j&&ab.j.__div&&("none"!=ab.j.__div.style[this.Hc]&&(ab.j.__div.style[this.Hc]="none"),y&&h?(ab.j.ggUse3d?(this.Ve||this.Qr(e),this.Qa()?(ab.j.__div.style[this.Ae]="scale("+
(100/a.fov.m*this.H.height/ab.j.gg3dDistance).toFixed(10)+")",ab.j.__div.style.left=this.margin.left.ba+w+this.H.width/2+"px",ab.j.__div.style.top=this.margin.top.ba+x+this.H.height/2+"px"):(ab.j.__div.style.width="1px",ab.j.__div.style.height="1px",y="",this.Ve&&(y+="perspective("+e+"px) "),y+="translate3d(0px,0px,"+e+"px) ",y+="rotateZ("+a.Y.m.toFixed(10)+"deg) ",y+="rotateX("+a.u.m.toFixed(10)+"deg) ",y+="rotateY("+(-a.pan.m).toFixed(10)+"deg) ",y+="rotateY("+ab.pan.toFixed(10)+"deg) ",y+="rotateX("+
(-ab.u).toFixed(10)+"deg) ",y+="translate3d(0px,0px,"+(-1*ab.j.gg3dDistance).toFixed(10)+"px) ",ab.j.__div.style[this.Ae+"Origin"]="0% 0%",ab.j.__div.style[this.Ae]=y,ab.j.__div.style.left=this.margin.left.ba+this.H.width/2+"px",ab.j.__div.style.top=this.margin.top.ba+this.H.height/2+"px")):this.nr?(ab.j.__div.style.left=this.margin.left.ba+this.H.width/2+"px",ab.j.__div.style.top=this.margin.top.ba+this.H.height/2+"px",ab.j.__div.style[this.Ae]="translate3d(0px,0px,-1000px) rotateY(0.1deg) translate3d("+
w+"px,"+x+"px, 0.5px)",ab.j.__div.style["transform-style"]="preserve-3d"):(ab.j.__div.style.left=this.margin.left.ba+w+this.H.width/2+"px",ab.j.__div.style.top=this.margin.top.ba+x+this.H.height/2+"px"),ab.j.__div.ggVisible&&(ab.j.__div.style.visibility="visible")):(ab.j.ggUse3d&&(ab.j.__div.style[this.Ae]=""),ab.j.__div.style.left="-1000px",ab.j.__div.style.top="-1000px",ab.j.__div.style.visibility="hidden"))}if("poly"==ab.type)if(w=[],this.Qa())for(ab.Jg=[],y=0;y<ab.vertices.length;y++)w=ab.vertices[y],
x=(a.pan.m-w.pan)/100*f,z=(a.u.m-w.u)/100*f,x+=this.margin.left.ba+this.H.width/2,z+=this.margin.top.ba+this.H.height/2,ab.Jg.push({zc:x,ac:z});else{for(y=0;y<ab.vertices.length;y++)x=ab.vertices[y],b.init(0,0,-100),b.ya(-x.u*Math.PI/180),b.Ca(x.pan*Math.PI/180),b.Ca(-a.pan.m*Math.PI/180),b.ya(a.u.m*Math.PI/180),b.Ta(a.Y.m*Math.PI/180),w.push(b.clone());w=this.sl(w);if(0<w.length)for(y=0;y<w.length;y++)b=w[y],.1>b.z?(z=-e/b.z,x=this.H.width/2+b.x*z,z=this.H.height/2+b.y*z):z=x=0,b.zc=x,b.ac=z;ab.Jg=
w}}-1!=r&&(this.L[r].closestToCenter=!0);this.G("hotspotsupdated",{})}bp(){let a=[];for(let b=0;b<this.L.length;b++){let e=this.L[b];"point"==e.type&&e.j&&e.j.__div&&a.push(e.j.__div)}return a}kj(a,b){let e=-1;if((0<=this.P.mode||0<this.P.Bc.length)&&this.Yp())for(let f=0;f<this.L.length;f++){let h=this.L[f];"poly"==h.type&&h.Jg&&0<h.Jg.length&&(-1!=this.P.mode||-1!=this.P.Bc.indexOf(h.id))&&Eb.Op(h.Jg,a,b)&&(e=f,h.zc=a,h.ac=b)}return 0<=e?this.L[e]:!1}Yp(){return 4==this.Z()&&0==this.Ic()}Yd(){this.D.Yd()}update(a=
0){this.Ha=!0;a&&(this.ze=Math.max(1*a,this.ze))}Wl(){return 0<this.D.Ui||0<this.D.pe}Zi(){var a=Date.now();var b=this.N;this.fa[0].Cn=1;3<this.Mk&&(this.Mk=-3);this.Mk+=.01;if(1<this.fa.length){var e=this.fa[0].D,f=this.fa[1].D;f.ab(e.Z());f.pan.m=e.pan.m;f.u.m=e.u.m;f.fov.m=e.fov.m}this.Ha=!0;e=this.fa[0];f=e.D;b&&(e.Nr(),b.clear(b.COLOR_BUFFER_BIT|b.DEPTH_BUFFER_BIT|b.STENCIL_BUFFER_BIT));this.Qa()?(this.Ok(),this.pa&&(e.bw(),e.zq())):0===this.cd&&(!this.pa||4==this.Z()&&0==this.Ic()?(b=this.be(),
this.Wt(this.H.width/2,this.H.height/2,b),this.Ok(),this.bj?e.ew():this.gw&&this.Ur(),this.Gn(),this.pa?(this.B.Mc?14==this.B.format?e.dw():e.ds():0<f.M.levels.length?e.mw():e.ow(),e.zq()):this.jh&&this.$v(),this.Nc&&this.Nc.Cu()):(this.fa[0].ds(),this.Ok(),this.Tt()));50<Date.now()-a?this.Ng||(2<this.mn?(this.Ng=!0,this.xd()):this.mn++):this.mn=0;this.fe&&e.D.M.Kq++;this.pa&&this.N&&(a=this.N,a.disable(a.BLEND),a.disable(a.STENCIL_TEST),a.disable(a.DEPTH_TEST),a.disable(a.CULL_FACE))}$v(){this.Yd();
let a;this.Gc&&(a=this.Gc.getContext("2d"));if(this.H.width!==this.ia.offsetWidth||this.H.height!==this.ia.offsetHeight)this.H.width=this.ia.offsetWidth,this.H.height=this.ia.offsetHeight;if(a){const b=this.D;let e=a.canvas.width/2,f=a.canvas.height/2,h=a.createRadialGradient(e,f,5,e,f,Math.max(e,f));h.addColorStop(0,"#333");h.addColorStop(1,"#fff");a.rect(0,0,a.canvas.width,a.canvas.height);a.fillStyle=h;a.fill();a.fillStyle="#f00";a.font="20px Helvetica";a.textAlign="center";a.fillText("Pan: "+
b.pan.m.toFixed(1),e,f-60);a.fillText("Tilt: "+b.u.m.toFixed(1),e,f-30);a.fillText("Fov: "+b.fov.m.toFixed(1),e,f+0);a.fillText("Node: "+this.pd(),e,f+30);a.fillText("Title: "+this.ag.title,e,f+60)}}jv(a){a=Math.round(a);this.Ve=0<(a&1);this.Xm=0<(a&2);this.kh=0<(a&4);this.Ng=0<(a&8);4096<=a&&(this.ih=0<(a&4096),this.pa=0<(a&8192),this.jh=0<(a&32768))}xt(){let a=0;this.Ve&&(a|=1);this.Xm&&(a|=2);this.kh&&(a|=4);this.ih&&(a|=4096);this.pa&&(a|=8192);this.jh&&(a|=32768);return a}Gn(){let a=Math.round(this.be());
this.Ve||this.Qr(a);for(var b=0;b<this.Za.length;b++){var e=void 0;e=this.Za[b];e.Hn(a);e.j.hidden=!1}for(b=0;b<this.Qb.length;b++)e=this.Qb[b],e.Hn(a),e.j.hidden=!1}Ur(){let a=Math.round(this.be());for(let b=0;b<this.V.length;b++){let e;e=this.V[b];e.td||(e.Hn(a),e.j.hidden=this.F.vd?!0:!1)}}Tt(){for(var a=0;a<this.Za.length;a++)this.Za[a].Tf(!1);for(a=0;a<this.V.length;a++){let b;b=this.V[a];b.td||b.Tf(!1)}for(a=0;a<this.Qb.length;a++)this.Qb[a].Tf(!1)}fw(){try{for(let a=0;a<this.Fj();a++){let b=
this.am(a);b.td||b.Qd()}}catch(a){}}Hf(a){const b=this;b.Ol=!1;b.Ka=a?a:document.createElement("canvas");b.Ka.addEventListener("webglcontextlost",e=>{b.N=null;e.preventDefault();b.Yb("Pano2VR: Context lost")});b.Ka.addEventListener("webglcontextrestored",e=>{e.preventDefault();b.Sp();b.Yb("Pano2VR: Context restored")});return b.Sp()}Sp(){const a=this;try{let b=a.container.offsetWidth-a.margin.left.ba-a.margin.right.ba,e=a.container.offsetHeight-a.margin.top.ba-a.margin.bottom.ba;if(100>b||100>e)e=
b=100;let f=window.devicePixelRatio||1;a.Ng&&(f=1);a.ia.style.width=b+"px";a.ia.style.height=e+"px";a.Ka.style.width=b+"px";a.Ka.style.height=e+"px";a.Ka.width=b*f;a.Ka.height=e*f;a.Ka.style.display="none";a.Ka.style.touchAction="none";a.ia.insertBefore(a.Ka,a.ia.firstChild);let h=a.cs;h.stencil=!0;h.depth=!0;h.powerPreference="high-performance";a.Lc&&10<=a.Ke[0]&&(h.antialias=!1,h.alpha=!1);let n={};n.flags=h;n.canvas=a.Ka;a.G("beforewebglcontext",n);a.N=a.Ka.getContext("webgl2",h);a.N?a.Kn=!0:(a.Kn=
!1,a.N=a.Ka.getContext("webgl",h));a.N||(a.N=a.Ka.getContext("experimental-webgl",h));if(a.N){let r=a.N;a.Ya.width=b*f;a.Ya.height=e*f;r.clearColor(0,0,0,0);r.enable(a.N.DEPTH_TEST);r.viewport(0,0,500,500);r.clear(r.COLOR_BUFFER_BIT|r.DEPTH_BUFFER_BIT);4096<=r.getParameter(r.MAX_TEXTURE_SIZE)&&!a.Xh&&(a.D.hi=1<f?4*a.D.hi:2*a.D.hi);a.fa.forEach(w=>{w.Th();w.Mj();w.Rp(a.bh);w.Tp()});a.F&&(a.F.Th(),a.F.Hf());a.Nc&&(a.Nc.Th(),a.Nc.Hf())}}catch(b){}a.N?(a.pa=!0,a.G("webglready",{gl:this.N})):alert("Could not initialise WebGL!")}Jc(a,
b){const e=this.N;e.shaderSource(a,b);e.compileShader(a);e.getShaderParameter(a,e.COMPILE_STATUS)||(console&&console.log(e.getShaderInfoLog(a)),alert(e.getShaderInfoLog(a)))}Mf(a,b,e){const f=this.N;f.attachShader(a,b);f.attachShader(a,e);f.linkProgram(a);f.getProgramParameter(a,f.LINK_STATUS)||(alert("Could not initialise shader program"),console&&console.log(f.getError()));f.useProgram(a)}ce(){return this.D.ce()}sp(){return this.I.pan}zj(){return this.D.zj()}de(){return this.D.de()}Qa(){return this.D.Qa()}Md(a){this.D.Md(a)}Di(a){this.D.Di(a)}vh(a,
b){this.D.vh(a,b)}ol(a,b){this.D.ol(a,b)}Af(){return this.D.Af()}Dp(){return this.I.u}Nd(a){this.D.Nd(a)}wh(a,b){this.D.wh(a,b)}ql(a,b){this.D.ql(a,b)}Rg(a){this.D.Rg(a)}Cj(){return this.D.Cj()}Fd(){return this.D.Fd()}Db(){return this.D.Db()}Tl(a,b){return this.D.Tl(a,b)}Sl(a,b){return this.D.Sl(a,b)}Ws(){return this.I.Ri}Jb(a){return this.D.Jb(a)}cn(a){this.D.cn(a)}Hi(a){this.D.Hi(a)}dn(a){this.D.dn(a)}bn(a){this.D.bn(a)}uk(a,b){const e=this.D;if(120<e.Fd())e.Jb(a);else{var f=this.Gd(b.x,b.y,!0);
if(this.Jb(a)){b=this.Gd(b.x,b.y,!0);a=f.pan-b.pan;b=f.tilt-b.tilt;if(15<Math.abs(a)||10<Math.abs(b))b=a=0;a=this.Qa()?-a:a*Math.cos(f.tilt*Math.PI/180);e.pan.Ub-=a;e.u.Ub+=b;e.zk(e.pan.m-a,e.u.m+b)}}}uh(a,b){return this.D.uh(a,b)}ko(a,b){this.uk(this.Fd()+a,b)}jj(a,b){const e=this.D;if(!isNaN(a)){let f;f=a/90*Math.cos(Math.min(e.fov.m,90)*Math.PI/360);f=e.fov.m*Math.exp(f);this.Jb(f);b&&(e.fov.d=a)}}lo(a,b,e){const f=this.D;if(!isNaN(a)){let h;h=a/90*Math.cos(Math.min(f.fov.m,90)*Math.PI/360);h=
f.fov.m*Math.exp(h);this.uk(h,b);e&&(f.fov.d=a,f.fov.Yc.enabled=!0,f.fov.Yc.x=b.x,f.fov.Yc.y=b.y)}}zk(a,b){this.D.zk(a,b)}hn(a,b,e){this.D.hn(a,b,e)}Qg(a,b,e){this.D.Qg(a,b,e)}tk(){this.D.tk()}It(){let a={};const b=this.D;a.pan={};a.pan.min=b.pan.min;a.pan.max=b.pan.max;a.tilt={};a.tilt.min=b.u.min;a.tilt.max=b.u.max;return a}zv(a){const b=this.D;a.hasOwnProperty("pan")&&(a.pan.hasOwnProperty("min")&&(b.pan.min=a.pan.min),a.pan.hasOwnProperty("max")&&(b.pan.max=a.pan.max));a.hasOwnProperty("tilt")&&
(a.tilt.hasOwnProperty("min")&&(b.u.min=a.tilt.min),a.tilt.hasOwnProperty("max")&&(b.u.max=a.tilt.max));this.Yd();this.update()}Zs(){return this.qa.enabled}bv(a){let b=this.qa;a&&(b.ma.x=0,b.ma.y=0);b.enabled=!!a}Gp(){return this.K.re}ir(a){this.K.re=a}Xs(){return this.im()?!0:this.em}er(a,b=!0){this.Wr=b;this.lh==!a&&(a&&this.im()?this.Mq():((this.lh=!!a)?this.ob.Ai=!0:this.D.Y.m=0,this.G("gyrochanged",{}),this.G("playerstatechanged",{})))}im(){return window.hasOwnProperty("DeviceOrientationEvent")&&
DeviceOrientationEvent.hasOwnProperty("requestPermission")&&"function"===typeof DeviceOrientationEvent.requestPermission?!0:!1}Mq(){let a=this;if(this.im())try{DeviceOrientationEvent.requestPermission().then(b=>{"granted"===b&&(a.ob.Ai=!0,a.lh=!0,a.G("gyrochanged",{}),a.G("playerstatechanged",{}))}).catch(console.error)}catch(b){console.log(b)}}Bt(){return this.lh}moveTo(a,b,e,f,h,n){this.ra(!1);if("_blank"!==a&&""!==a){this.I.active=!0;this.I.aborted=!1;this.I.Jn=!1;var r=this.D,w=a.toString().split("/");
1<w.length&&(a=Number(w[0]),f=Number(b),b=Number(w[1]),2<w.length&&(e=Number(w[2])));this.I.pan=isNaN(a)?r.pan.m:Number(a);this.I.u=isNaN(b)?r.u.m:Number(b);this.I.fov=!isNaN(e)&&0<e&&180>e?Number(e):r.fov.m;this.I.speed=!isNaN(f)&&0<f?Number(f):1;this.I.Y=isNaN(h)?r.Y.m:Number(h);void 0!==n?!a||4!=n&&12!=n&&9!=n||(this.I.rb=n):this.I.rb=this.Z()}}ki(a){this.ra(!1);let b=0,e=0,f=70,h=4,n=0,r=1;a.hasOwnProperty("pan")&&(b=Number(a.pan),this.I.pan=b);a.hasOwnProperty("tilt")&&(e=Number(a.tilt),this.I.u=
e);a.hasOwnProperty("fov")&&(f=Number(a.fov),this.I.fov=f);a.hasOwnProperty("projection")&&(h=Number(a.projection),this.I.rb=h);a.hasOwnProperty("timingFunction")&&(n=Number(a.timingFunction));a.hasOwnProperty("speed")&&(r=Number(a.speed));a=this.D;if(0>=r)this.Qg(b,e,f),this.ab(h);else{let w=new Ub;w.fb="__AutoMove";w.$e=this.zj();w.Oi=a.u.m;w.me=a.fov.m;w.Ni=this.Z();w.Od=b;w.oe=e;w.$g=f;w.ne=h;w.lg=!1;w.uf=!1;w.vf=!1;0==n&&(w.uf=!0);1==n&&(w.lg=!0,w.uf=!0);2==n&&(w.vf=!0);w.speed=r;this.I.Yn=this.S;
this.S=this.Vo(w);this.I.Zn=(new Date).getTime();this.I.Jn=!0;this.I.active=!0;this.I.aborted=!1;this.I.pan=b;this.I.u=e;this.I.fov=f;this.se=!1}}lq(a){const b=this.D;this.moveTo(b.pan.Va,b.u.Va,b.fov.Va,a)}mq(a,b){let e={};const f=this.D;e.pan=f.pan.Va;e.tilt=f.u.Va;e.fov=f.fov.Va;e.projection=this.Ph();e.timingFunction=b;e.speed=a;this.ki(e)}Un(a,b,e,f){let h=new Rb(this);h.type="point";h.pan=b;h.u=e;h.id=a;h.j={};h.j.player=this;h.wf();h.j.hotspot=h;h.j.__div=document.createElement("div");h.j.__div.appendChild(f);
this.L.push(h);h.j.__div.style.position="absolute";h.j.__div.style.left="-1000px";h.j.__div.style.top="-1000px";h.j.__div.ggVisible=!0;this.xa.insertBefore(h.j.__div,this.xa.firstChild);this.Ha=!0}Pr(a,b,e){for(let f=0;f<this.L.length;f++){let h=this.L[f];h.id==a&&(h.pan=b,h.u=e,h.wf())}this.Ha=!0}Jq(a){let b=-1,e;for(let f=0;f<this.L.length;f++)e=this.L[f],e.id==a&&(b=f);-1<b&&(e=this.L.splice(b,1).pop(),e.j&&e.j.__div&&this.xa.removeChild(e.j.__div))}gp(a){for(var b=0;b<this.L.length;b++){let e=
this.L[b];if(e.id==a)return b={},b.id=a,b.pan=e.pan,b.tilt=e.u,b.pxp=e.Lm,b.pyp=e.Mm,b.url=e.url,b.target=e.target,b.distance=e.distance,b.title=e.title,b.description=e.description,b.skinid=e.ln,e.nd&&(b.customimage=e.nd,b.customimagewidth=e.tf,b.customimageheight=e.Bd,b.use3D=e.Yf,b.distance3D=e.rj),e.j&&e.j.__div&&(b.div=e.j.__div),b}}Zr(a,b){this.oa.start.x=a;this.oa.start.y=b;this.oa.na.x=a;this.oa.na.y=b;this.qa.na.x=a;this.qa.na.y=b;this.Qm++;a=this.D;a.pan.Ub=a.pan.m;a.u.Ub=a.u.m}Xr(a,b){let e=
this.Db();const f=this.D;f.pan.Ub+=a*e/this.H.height;f.u.Ub+=b*e/this.H.height;f.pan.m=f.pan.Ub;f.u.m=f.u.Ub}Yr(a,b){this.oa.m.x=a;this.oa.m.y=b;this.oa.ma.x=this.oa.m.x-this.oa.na.x;this.oa.ma.y=this.oa.m.y-this.oa.na.y;this.K.lc&&(this.oa.na.x=this.oa.m.x,this.oa.na.y=this.oa.m.y,this.update())}ra(a){const b=this.D;this.A.active&&(this.A.active=!1,this.G("autorotatechanged",{}),b.pan.d=0,b.u.d=0,b.fov.d=0,b.fov.Yc.enabled=!1);this.I.active&&(this.I.active=!1,b.pan.d=0,b.u.d=0,b.fov.d=0,b.fov.Yc.enabled=
!1);this.gf=this.I.aborted=!1;this.A.dk=!1;this.Td=.02;this.rh=0;this.A.fd&&(this.A.enabled=this.A.dg,a&&(this.A.fd=this.A.$f));this.If=(new Date).getTime()}Aj(a,b){return this.D.Aj(a,b)}Gd(a,b){return this.D.Gd(a,b)}mc(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}rl(a,b){const e=this.D;let f=this.be(),h;for(h=0;h<this.Fj();h++){var n=
this.am(h);if(n.Ma)return n}for(h=0;h<this.Fj();h++){let w=this.am(h);if(w.td||w.Em)continue;let x=[],y=new lb,z,cb,ab;0<w.fov&&(cb=Math.tan(w.fov/2*Math.PI/180),ab=0<w.kc?cb*w.$c/w.kc:cb,w.Kc&&1!=w.Kc&&(ab*=w.Kc));for(z=0;4>z;z++){switch(z){case 0:y.init(-cb,-ab,0);break;case 1:y.init(cb,-ab,0);break;case 2:y.init(cb,ab,0);break;case 3:y.init(-cb,ab,0)}y.ya(w.ya*Math.PI/180);y.Ca(-w.Ca*Math.PI/180);y.Ta(w.Ta*Math.PI/180);--y.z;y.ya(-w.u*Math.PI/180);y.Ca(w.pan*Math.PI/180);y.Ca(-e.pan.m*Math.PI/
180);y.ya(e.u.m*Math.PI/180);y.Ta(e.Y.m*Math.PI/180);x.push(y.clone())}x=this.sl(x);if(0<x.length){for(z=0;z<x.length;z++){y=x[z];if(.1>y.z){var r=-f/y.z;n=this.H.width/2+y.x*r;r=this.H.height/2+y.y*r}else r=n=0;y.zc=n;y.ac=r}if(Eb.Op(x,a,b))return w}}return null}Fj(){return this.V.length+this.Za.length+this.Qb.length}am(a){return a<this.V.length?this.V[a]:a<this.V.length+this.Za.length?this.Za[a-this.V.length]:this.Qb[a-(this.V.length+this.Za.length)]}ju(a){this.Sr(a);window.focus();if(this.Cd)this.Cd.onclick();
(this.$d||this.Ce&&this.Ag)&&7>this.Wc&&this.ug();if(0==a.button&&(this.Sb=null,!this.K.pc&&!this.wc)){a=a?a:window.event;if(a.which||0==a.which||1==a.which){let b=(new Date).getTime();if(this.Se){this.Sb=this.Se;this.U.bd=!0;this.U.startTime=b;a.stopPropagation();return}if(this.mc(a.target)){let e;if((e=this.rl(this.ca.x,this.ca.y))&&e.Ge&&(this.Sb=e,void 0!==e.code&&""!==e.code&&e.Xb))return;this.Zr(a.pageX,a.pageY);this.U.bd=!0;this.U.startTime=b;a.preventDefault();this.ra(!0);a=this.Gd(this.ca.x,
this.ca.y,!0);this.G("playerdown",{pan:-Math.round(100*a.pan)/100,tilt:Math.round(100*a.tilt)/100})}}this.oa.ma.x=0;this.oa.ma.y=0}}We(a){if("string"==typeof a)for(let b=0;b<this.L.length;b++)if(this.L[b].id==a){a=this.L[b];break}this.O=a&&null!==a&&"object"==typeof a?a:this.Wa;this.O==this.Wa&&(a=this.kj(this.ca.x,this.ca.y))&&(a.jb=0);this.O.wf&&this.O.wf();this.hotspot=this.O;this.G("activehotspotchanged",{hotspot:this.O})}iu(a){this.Sr(a);if(!this.K.pc&&!this.wc&&!this.Se){this.A.active&&(this.A.Zj=
(new Date).getTime());0==a.buttons&&(this.U.bd=!1);this.U.bd&&(a.preventDefault(),(a.which||0==a.which||1==a.which)&&this.Yr(a.pageX,a.pageY),this.ra(!0));let e=!1;if(this.O==this.Wa||"poly"==this.O.type){var b=this.Wa;0<this.L.length&&this.mc(a.target)&&(b=this.kj(this.ca.x,this.ca.y));this.sk(b);this.fh(this.ca.x,this.ca.y,!1);0!=b&&b!=this.Wa&&(e=!0)}b=null;!e&&this.mc(a.target)&&(b=this.rl(this.ca.x,this.ca.y));this.A.pj&&(this.A.pj=!1);this.xa.style.cursor=this.O!=this.Wa&&this.O.Ie&&e||b&&b.wg?
"pointer":"default"}}sk(a){!1===a&&(a=this.Wa);this.O!=a&&(this.O!=this.Wa&&(0<this.P.mode&&(this.O.jb=0),this.ka&&this.ka.hotspotProxyOut&&this.ka.hotspotProxyOut(this.O.id,this.O.url),this.G("hsproxyout",{id:this.O.id,url:this.O.url})),a!=this.Wa?(this.We(a),this.ka&&this.ka.hotspotProxyOver&&this.ka.hotspotProxyOver(this.O.id,this.O.url),this.G("hsproxyover",{id:this.O.id,url:this.O.url}),0<this.P.mode&&(this.P.jb=1,this.O.jb=1)):(this.We(this.Wa),0<this.P.mode&&(this.P.jb=0)))}hu(a){this.Xj=-1;
if(this.$d||this.Ce&&this.Ag)7<=this.Wc?this.wr():this.ug();if(0==a.button&&!this.K.pc&&!this.wc){let b=this.Gd(this.ca.x,this.ca.y,!0);this.Sb&&(this.Sb.Ge(),this.Se=this.Sb.Ma?this.Sb:null);if(this.U.bd){this.ra(!0);a.preventDefault();this.U.bd=!1;a=(new Date).getTime();let e;e=Math.abs(this.oa.start.x-this.oa.na.x)+Math.abs(this.oa.start.y-this.oa.na.y);if(400>a-this.U.startTime&&0<=e&&20>e){let f=this.kj(this.ca.x,this.ca.y);f&&this.Kr(f);e=Math.abs(this.oa.ie.x-this.oa.na.x)+Math.abs(this.oa.ie.y-
this.oa.na.y);700>a-this.Zh&&0<=e&&20>e?(f?this.Lr(f):this.K.Dl&&this.Lk(),this.G("playerdblclick",{pan:-Math.round(100*b.pan)/100,tilt:Math.round(100*b.tilt)/100}),this.Zh=0):(this.G("playerclick",{pan:-Math.round(100*b.pan)/100,tilt:Math.round(100*b.tilt)/100}),this.Zh=a);this.oa.ie.x=this.oa.na.x;this.oa.ie.y=this.oa.na.y}this.G("playerup",{pan:-Math.round(100*b.pan)/100,tilt:Math.round(100*b.tilt)/100})}}}kq(a){if(!this.K.Oe&&!this.wc&&(a=a?a:window.event,this.mc(a.target))){var b=a.detail?-1*
a.detail:a.wheelDelta/40;this.K.Up&&(b=-b);a.axis&&(-1==this.Xj?this.Xj=a.axis:this.Xj!=a.axis&&(b=0));let e=0<b?1:-1;a.wheelDeltaX&&a.wheelDeltaY&&Math.abs(a.wheelDeltaX)>Math.abs(a.wheelDeltaY)&&(b=0);0!=b&&(this.K.re?(b=this.Bf(),this.lo(e*this.K.nn,{x:a.clientX-b.x,y:a.clientY-b.y},!0)):this.jj(e*this.K.nn,!0),this.update());a.preventDefault();this.ra(!0)}}Vv(a){const b=this.D;var e=a.touches;this.Tr(a);this.bf=this.Sb=null;window.focus();this.jm||(this.jm=!0,this.G("hastouch",{}),this.G("playerstatechanged",
{}));!this.om&&(this.$d||this.Ce&&this.Ag)&&7>this.Wc&&this.ug();if(!this.K.pc&&!this.wc){var f=(new Date).getTime();if(this.Se)this.Sb=this.Se,this.U.od=!0,this.U.startTime=f,a.preventDefault(),this.U.si=!0,e[0]&&(this.yb=e[0].target);else{if(!this.U.od&&e[0]){this.U.startTime=f;this.U.start.x=e[0].pageX;this.U.start.y=e[0].pageY;this.U.na.x=e[0].pageX;this.U.na.y=e[0].pageY;f=this.yb=e[0].target;if(this.mc(f)){var h;(h=this.rl(this.ca.x,this.ca.y))&&h.Ge&&(this.Sb=h);if(h=this.kj(this.ca.x,this.ca.y))this.bf=
h,this.sk(h),this.zf(a),this.fh(this.ca.x,this.ca.y,!0);this.Zr(e[0].pageX,e[0].pageY);this.U.Oo=e[0].identifier;this.U.od=!0;a.preventDefault();this.U.si=!0;this.ra(!0);h=this.Gd(this.ca.x,this.ca.y,!0);this.G("playerdown",{pan:-Math.round(100*h.pan)/100,tilt:Math.round(100*h.tilt)/100})}if(f){h=!1;if(null!=this.U.Yg)for(var n=this.U.Yg;n&&n!=this.control;){if(n.onmouseout)n.onmouseout(a);if(n.onmouseleave)n.onmouseleave(a);n=n.parentNode}n=f;let r=!0;for(;n&&n!=this.control;)f!=this.U.Yg&&(n.onmouseover&&
(n.onmouseover(a),7<=this.Wc&&this.mc(a)&&(h=!0)),n.onmouseenter&&(n.onmouseenter(a),7<=this.Wc&&this.mc(a)&&(h=!0))),n.onmousedown&&(n.onmousedown(a),r=!1,h=!0),n.onclick&&(r=!1),n=n.parentNode;this.U.Yg=r&&7<=this.Wc&&f!=this.U.Yg?f:null;h&&(a.preventDefault(),this.U.si=!0)}}1<e.length&&(this.U.od=!1);!this.gm&&2==e.length&&e[0]&&e[1]&&this.mc(this.yb)&&(a=e[0].pageX-e[1].pageX,e=e[0].pageY-e[1].pageY,b.fov.Ar=Math.sqrt(a*a+e*e),b.fov.prev=b.fov.m);this.oa.ma.x=0;this.oa.ma.y=0}}}ug(){try{this.aj&&
this.B.j&&(!this.B.Mc&&this.B.Ek&&this.B.j.play(),this.B.j.muted=!1);if(this.ga&&(this.ga.resume(),"suspended"==this.ga.state))return;if(this.Lc&&this.ga&&this.ga.createOscillator){let e=this.ga.createOscillator();var a=this.ga.createGain();e.frequency.value=30;e.type="sine";e.connect(a);a.connect(this.ga.destination);a.gain.value=.01;e.start(0);setTimeout(function(){e.stop()},1E4)}for(a=0;a<this.X.length;a++){var b=this.X[a];(!this.isPlaying(b.id)||b.ta)&&0<=b.loop&&b.autoplay&&!this.xc&&(b.ta&&
b.fg(),this.Ld(b.id,b.loop))}for(b=0;b<this.V.length;b++){let e=this.V[b];!this.isPlaying(e.id)&&e.autoplay&&this.aj&&!this.xc&&this.Ld(e.id,e.loop);this.isPlaying(e.id)&&e.autoplay&&this.aj&&!this.xc&&(e.Sd&&e.ef(),e.j.muted=!1)}this.Ce=this.$d=!1}catch(e){}}Uv(a){const b=this.D;this.Tr(a);let e=a.touches;if(this.K.pc||this.wc)(this.F.Pd||this.F.vd||this.F.ed)&&a.preventDefault();else{e[0]&&(this.U.na.x=e[0].pageX,this.U.na.y=e[0].pageY);if(this.yb){for(var f=this.yb,h=!1;f&&f!=this.control&&!h;)"scrollarea"==
f.ggType&&(h=!0),"map"==f.ggType&&(h=!0),"text"==f.ggType&&(h=!0),f=f.parentNode;h||a.preventDefault()}if(this.U.od){a.preventDefault();for(f=0;f<e.length;f++)if(e[f].identifier==this.U.Oo){this.Yr(e[f].pageX,e[f].pageY);break}this.bf&&(this.zf(a),this.fh(this.ca.x,this.ca.y,!0));this.ra(!0)}2==e.length&&e[0]&&e[1]&&(this.U.od=!1,!this.gm&&this.mc(this.yb)&&(this.K.Oe||(f=e[0].pageX-e[1].pageX,h=e[0].pageY-e[1].pageY,b.fov.Ao=Math.sqrt(f*f+h*h),this.qa.fov.active=!0,this.qa.fov.center.enabled=!0,
this.qa.fov.center.x=(e[0].pageX+e[1].pageX)/2,this.qa.fov.center.y=(e[0].pageY+e[1].pageY)/2,this.qa.fov.jc=b.fov.prev*Math.sqrt(b.fov.Ar/b.fov.Ao),4==this.Z()&&!this.Qa()&&this.qa.fov.jc>b.fov.max&&(this.qa.fov.jc=b.fov.max),this.qa.fov.jc<b.fov.min&&(this.qa.fov.jc=b.fov.min)),this.ra(!0),a.preventDefault()))}}Tv(a){const b=this;b.U.si&&(b.U.si=!1,a.preventDefault());let e=!1;if(b.$d||b.Ce&&b.Ag)7<=b.Wc?b.wr():b.ug();if(!b.K.pc&&!b.wc){let h=this.Gd(b.U.na.x,b.U.na.y,!0);b.U.od&&(a.preventDefault(),
b.ra(!0),this.G("playerup",{pan:-Math.round(100*h.pan)/100,tilt:Math.round(100*h.tilt)/100}));let n=(new Date).getTime(),r=!1;this.mc(this.yb)&&(a.preventDefault(),this.Sb&&(this.Sb.Ge(),this.Se=this.Sb.Ma?this.Sb:null));var f=Math.abs(this.U.start.x-this.U.na.x)+Math.abs(this.U.start.y-this.U.na.y);if(0<=f&&20>f){e=!0;if(b.yb)for(f=b.yb;f&&f!=b.control;){if(f.onclick){let w=f,x=b.hotspot;setTimeout(()=>{let y=b.hotspot;b.hotspot=x;w.onclick(a);b.hotspot=y},0);"hotspot"!=f.Hw&&(r=!0);e=!1}f=f.parentNode}f=
Math.abs(b.U.ie.x-b.U.na.x)+Math.abs(b.U.ie.y-b.U.na.y);if(700>n-b.Zh&&0<=f&&20>f){if(b.mc(b.yb)){a.preventDefault();if(b.bf)b.Lr(b.bf);else if(b.K.Dl){let w=this;setTimeout(function(){w.Lk()},1)}this.G("playerdblclick",{pan:-Math.round(100*h.pan)/100,tilt:Math.round(100*h.tilt)/100})}if(b.yb)for(f=b.yb;f&&f!=b.control;)f.ondblclick&&(f.ondblclick(),r=!0,e=!1),f=f.parentNode;b.Zh=0}else b.Zh=n;b.U.ie.x=b.U.na.x;b.U.ie.y=b.U.na.y}if(b.yb)for(f=b.yb;f&&f!=b.control;)b.U.Yg!=b.yb&&(f.onmouseout&&(f.onmouseout(a),
7<=b.Wc&&(r=!0)),f.onmouseleave&&(f.onmouseleave(a),r=!0)),f.onmouseup&&(f.onmouseup(a),7<=b.Wc&&(r=!0)),f=f.parentNode;r&&a.preventDefault();b.zf(a);b.bf&&(b.fh(-1,-1,!0),e&&b.Kr(b.bf));b.yb=null;b.U.od=!1;b.sk(b.Wa);b.bf=null}}Sv(a){this.K.pc||this.wc||(this.U.od=!1);this.bf=null;this.sk(this.Wa);this.zf(a);this.fh(-1,-1,!0)}pm(){return null!=this.yb||this.U.od||this.U.bd}nq(a){!this.Of&&window.MSGesture&&(this.Of=new window.MSGesture,this.Of.target=this.control);this.Of&&this.Of.addPointer(a.pointerId)}Xo(a){const b=
this.D;this.gm=!0;this.ek=1;this.K.pc||this.K.Oe||this.wc||(a.touches?(this.yb=a.touches.target,this.mc(a.target)&&(a.preventDefault(),b.fov.prev=b.fov.m,this.ra(!0))):(a.preventDefault(),b.fov.prev=b.fov.m,this.ra(!0)))}Ps(a){const b=this.D;if(!this.K.pc&&!this.K.Oe&&!this.wc&&this.mc(a.target)){a.preventDefault();this.qa.fov.active=!0;this.qa.fov.center.enabled=!0;let e=this.zf(a);this.qa.fov.center.x=e.x;this.qa.fov.center.y=e.y;this.qa.fov.jc=b.fov.prev/Math.sqrt(a.scale);4==this.Z()&&2!=this.cd&&
this.qa.fov.jc>b.fov.max&&(this.qa.fov.jc=b.fov.max);this.update();this.ra(!0)}}ku(a){const b=this.D;this.K.pc||this.K.Oe||this.wc||(a.preventDefault(),1!=a.scale&&(this.qa.fov.active=!0,this.ek*=a.scale,this.qa.fov.center.enabled=!0,a=this.zf(a),this.qa.fov.center.x=a.x,this.qa.fov.center.y=a.y,this.qa.fov.jc=b.fov.prev/Math.sqrt(this.ek),4==this.Z()&&2!=this.cd&&this.qa.fov.jc>b.fov.max&&(this.qa.fov.jc=b.fov.max),this.update(),this.ra(!0)))}Wo(a){this.K.pc||this.K.Oe||this.wc||(this.qa.fov.active=
!1,a.preventDefault(),this.ra(!0),this.Of&&this.Of.reset&&this.Of.reset())}au(a){this.K.di||this.wc||(this.nc&&a.preventDefault(),this.Vj=a.keyCode,this.ra(!0))}bu(a){this.Vj&&(this.Vj=0,a.preventDefault())}ru(){this.Vj=0}yu(a,b,e,f){f?(this.Sh.alpha=a,this.Sh.beta=b,this.Sh.gamma=e,this.Sh.gamma+=90):(this.ob.alpha=a,this.ob.beta=b,this.ob.gamma=e,this.ob.gamma+=90);this.ob.orientation=window.orientation?1*parseInt(""+window.orientation,10):0;e=new Cb;a=this.ob;e.Sc(-a.alpha);e.le(-a.beta);e.bc(-a.gamma);
e.le(90-a.orientation);1>e.Nb?-1<e.Nb?(b=180/Math.PI*Math.asin(-e.Nb),a=180/Math.PI*Math.atan2(e.uc,e.tc),e=180/Math.PI*Math.atan2(e.sc,e.rc)):(b=0,a=90,e=-180/Math.PI*Math.atan2(-e.Zb,e.$b)):(b=0,a=-90,e=180/Math.PI*Math.atan2(-e.Zb,e.$b));if(this.lh)if(this.pm()||this.I.Kj||this.ob.Ai)this.ob.Pf=this.ce()+e,this.ob.fadeIn=0,this.ob.Ai=!1;else{f=this.I.active;let h=1;10>this.ob.fadeIn&&(this.ob.fadeIn+=1,h=.1*this.ob.fadeIn);e=-e+this.ob.Pf;this.Md(h*e+(1-h)*this.ce());this.Nd(h*a+(1-h)*this.Af());
this.Wr?this.Rg(h*b+(1-h)*this.Cj()):this.Rg(0);this.Yd();this.I.active=f}}Jh(){return Math.min(1,2*Math.tan(Math.PI*Math.min(this.D.fov.m,90)/360))}Aq(){let a=this;setTimeout(function(){a.Aq()},100);9!=a.pk||a.Nj||window.requestAnimationFrame(function(){a.ni()});10<a.pk&&1<a.Qm&&(a.Yb("recover timer - disabling requestAnimationFrame"),a.Nj=!0,a.ni());a.pk++}Ii(a){var b=this.D;if("__VideoPano"!=this.S.fb){var e={PAN:{value:0,name:"pan"},qw:{value:1,name:"tilt"},pw:{value:2,name:"fov"}},f=0,h=0,n=
0;a=Math.max(a,0);for(var r in e){var w=e[r],x=void 0,y=this.Wb(this.wp(a,w.value,""),w.value,"");x=(x=this.op(y))?this.Yo(y,x,a):y.value;switch(w.value){case 0:w=b.pan.m;if(this.se&&3!=y.type){if(!this.Qa()){for(;360<x;)x-=360;for(;-360>x;)x+=360}f=x-w;this.Qa()||(180<f&&(f-=360),-180>f&&(f+=360));b.pan.m+=f*this.Td}else b.pan.m=x;this.A.ai=b.pan.m;break;case 1:w=b.u.m;this.se&&3!=y.type?(h=x-w,b.u.m+=h*this.Td):b.u.m=x;this.A.bi=b.u.m;break;case 2:w=b.fov.m,this.se&&3!=y.type?(n=x-w,b.fov.m+=n*
this.Td):b.fov.m=x,this.A.$h=b.fov.m}}e=this.Z();for(r=Math.floor(a);!this.Wb(r,3)&&0<r;)r--;r=this.Wb(r,3);y=a-r.time;this.se&&-1!=this.th&&this.gj+this.el>a?(e=this.Mh(this.th),b.fov.m>e?this.gj=a:(b=(a-this.gj)/this.el,b=Math.min(1,b),this.ab(this.Z(),this.th,1-b))):(0==r.Kb||y>r.Kb-.3?this.ab(r.value):this.ab(e,r.value,1-y/r.Kb),this.A.bq=r.value);this.se&&(f=Math.sqrt(f*f+h*h+n*n),.3>f&&(this.se=!1,this.Td=.02,this.rh=0),0<this.rh&&f>this.rh&&(this.Td+=.01,this.Td=Math.min(this.Td,1)),this.rh=
f)}f=Math.floor(a);h=this.Qs(f);for(n=0;n<h.length;n++)if(e=h[n],3>e.Xn)f!=this.$n&&(b=e.yd,this.xb.hasOwnProperty(b)&&(r=this.xb[b].type,0==r?this.Ye(b,e.Ln):1==r?this.Ye(b,e.value):2==r&&this.Ye(b,"true"==e.Ln)));else if(b=this.Wb(this.wp(a,e.sb,e.yd),e.sb,e.yd),b=(r=this.op(b))?this.Yo(b,r,a):b.value,r=e.yd.split("|"),2==r.length)for(e=r[0],r=r[1],y=0;y<this.L.length;y++)x=this.L[y],x.id==e&&("pan"==r?x.pan=b:"tilt"==r&&(x.u=b));this.$n=f;this.update()}Zo(){if(""!=this.A.Eg){var a=this.rp(this.A.Eg);
if(0==a.length||1==a.length&&a[0]==this.ua)return this.ua}a=this.ua;do if(this.A.sq){let b=1E3;do a=this.cb[Math.floor(Math.random()*this.cb.length)];while(b--&&a==this.ua)}else a=this.cb.indexOf(a),a++,a>=this.cb.length&&(a=0),a=this.cb[a];while(""!=this.A.Eg&&!this.Oh(a).tags.includes(this.A.Eg)&&a!=this.ua);return a}Hu(a){var b=this.D;var e=this.I.speed;this.I.lastTime&&(e=e*(a.getTime()-this.I.lastTime)/60);this.I.lastTime=a.getTime();var f=!0;0<this.fa.length&&(this.fa[0].ready()||(f=!1));this.A.Ih&&
(f||4==this.Z())&&this.Nh()&&(this.A.Ih=!1,this.A.active=!0,this.Da.running=!0,this.Da.finished=!1);if(this.I.active||0!=this.I.rb&&f){if(this.I.Jn&&"__AutoMove"==this.S.fb)if(e=(a.getTime()-this.I.Zn)/100,e>=this.S.length){if(this.Ii(this.S.length),this.za.splice(this.za.indexOf(this.S),1),this.I.active=!1,this.S=this.I.Yn,this.I.rb=0,this.Qg(this.I.pan,this.I.u,this.I.fov),b.pan.Ub=this.I.pan,b.u.Ub=this.I.u,this.I.Dg&&(this.I.Dg=!1,this.A.dk=!0,this.A.fd=!0,this.A.active=!0,this.G("autorotatechanged",
{})),this.onMoveComplete)this.onMoveComplete()}else this.Ii(e);else{b.pan.d=this.I.pan-b.pan.m;if(360==b.pan.max-b.pan.min){for(;-180>b.pan.d;)b.pan.d+=360;for(;180<b.pan.d;)b.pan.d-=360}b.u.d=this.I.u-b.u.m;b.Y.d=this.I.Y-b.Y.m;b.fov.d=this.I.fov-b.fov.m;f=e*this.Jh();var h=Math.sqrt(b.pan.d*b.pan.d+b.u.d*b.u.d+b.Y.d*b.Y.d+b.fov.d*b.fov.d),n=b.pan.m-this.I.ai;let r=b.u.m-this.I.bi,w=b.Y.m-this.I.cq,x=b.fov.m-this.I.$h;100*Math.sqrt(n*n+r*r+w*w+x*x)<f&&0==this.I.rb&&(this.I.aborted=!0);this.I.ai=
b.pan.m;this.I.bi=b.u.m;this.I.cq=b.Y.m;this.I.$h=b.fov.m;if(100*h<f||this.I.aborted){if(b.pan.d=0,b.u.d=0,b.Y.d=0,b.fov.d=0,b.fov.Yc.enabled=!1,this.I.active&&(this.I.active=!1,b.pan.m=this.I.pan,b.u.m=this.I.u,b.Y.m=this.I.Y,b.fov.m=this.I.fov,this.onMoveComplete))this.onMoveComplete()}else h=h>5*f?f/h:.2,b.pan.d*=h,b.u.d*=h,b.fov.d*=h;b.pan.m+=b.pan.d;b.u.m+=b.u.d;b.Y.m+=b.Y.d;this.K.re&&b.fov.Yc.enabled?this.uk(b.fov.m+b.fov.d,b.fov.Yc):b.fov.m+=b.fov.d;0!=this.I.rb&&(this.I.rb!=this.Z()?(e=this.Mh(this.I.rb),
this.Fd()>e?(b.fov.m+=-Math.max((2.5-1.7*Math.min(Math.sqrt(b.pan.d*b.pan.d+b.u.d*b.u.d+b.Y.d*b.Y.d)/f,1))*f,b.fov.d)-b.fov.d,this.I.fov=b.fov.m):(this.ab(this.I.rb,this.Z(),0),this.I.vi=0,this.fa.forEach(y=>{y.Mj()}))):1>this.I.vi?(this.I.vi=Math.min(1,this.I.vi+.05*e),this.ab(this.Z(),this.Ic(),this.I.vi)):(this.ab(this.Z(),0,0),this.I.rb=0,this.fa.forEach(y=>{y.Mj()})))}this.If=a.getTime();this.update()}else if(this.A.active&&!this.F.vd){e=a.getTime()-this.A.startTime;this.A.Zj<this.A.startTime&&
(this.A.Zj=this.A.startTime);if((this.A.fd||this.Da.running)&&0<this.za.length){e/=100;f=!1;if(this.vc!=this.S.fb||""!=this.S.hf&&this.A.Ud!=this.S.hf){for(b=0;b<this.za.length;b++)if(""==this.vc&&this.za[b].hf==this.A.Ud||""!=this.vc&&this.za[b].fb==this.vc&&this.za[b].hf==this.A.Ud){f=!0;this.S=this.za[b];this.vc=this.S.fb;break}!f&&0<this.za.length&&this.za[0].hf==this.A.Ud&&(f=!0,this.S=this.za[0],this.vc=this.S.fb)}else f=!0;if(f)if(b=(f=this.B.j&&this.B.Mc)&&this.A.wn&&!this.Da.running,this.gf){h=
e;if(b){if(0==this.ff&&0!=this.B.j.duration)for(;this.ff<this.S.length/10;)this.ff+=this.B.j.duration;this.B.j.currentTime<this.bo&&this.hl&&(this.fl++,this.hl=!1);h=10*(this.fl*this.B.j.duration+this.B.j.currentTime);this.bo=this.B.j.currentTime;.05>this.B.j.duration-this.B.j.currentTime&&(this.hl=!0);for(;h>=10*this.ff;)h-=10*this.ff}if(!f&&e>=this.S.length||f&&!b&&e>=this.S.length||f&&b&&(this.S.fb!=this.S.pq||this.S.oq!=this.ua)&&e>=this.S.length){this.Ii(this.S.length);this.A.Id=0;this.gf=!1;
if(this.Da.running){this.Wq();return}f="";if(this.A.so){b=0;do e=this.ao[this.S.hf],f=Math.floor(Math.random()*Object.keys(e).length),f=e[f],this.vc=f.cliptitle,e=f.nodeid,f=f.startview,b++;while(e==this.ua&&10>b)}else this.vc=this.S.pq,e=this.S.oq,f=this.S.ou;this.vc==this.S.fb&&this.ua==e?1<this.cb.length&&0<this.A.fk&&(this.A.startTime=a.getTime(),(b=this.Zo())&&b!=this.ua&&(this.Rc("{"+b+"}"),this.gf=!1,this.A.active=!0,this.F.te=!0,this.F.Vd=!0)):(this.qd&&e!=this.ua&&(this.Rc("{"+e+"}",f),this.F.enabled?
(this.A.active=!1,this.F.te=!0,this.F.Vd=!0):this.A.active=!0),this.A.startTime=a.getTime())}else this.Ii(h),this.A.Id=h}else if(e=this.Wb(0,0),f=this.Wb(0,1),h=this.Wb(0,2),n=this.Wb(0,3),3!=n.sb&&(n=0),this.A.dk||this.I.aborted||this.Da.running||b){if(this.gf=!0,this.A.startTime=0<this.A.Id?a.getTime()-100*this.A.Id:a.getTime(),this.se=b){this.ff=this.fl=0;b=10*this.B.j.currentTime;for(e=Math.floor(b);!this.Wb(e,3)&&0<e;)e--;e=this.Wb(e,3);e.value==this.Z()?this.th=-1:(this.th=e.value,this.gj=b,
this.el=Math.max(5,e.time+e.Kb-b))}}else{b={};if(0<this.A.Id)b.pan=this.A.ai,b.tilt=this.A.bi,b.fov=this.A.$h,b.projection=this.A.bq;else{b.pan=e.value;if(!this.Qa()){for(;360<b.pan;)b.pan-=360;for(;-360>b.pan;)b.pan+=360}b.tilt=f.value;b.fov=h.value;b.projection=n?n.value:4}b.timingFunction=3;b.speed=1;this.I.Dg=!0;this.ki(b);this.A.active=!0}}else 0<this.A.fk&&this.qd&&e>=1E3*this.A.fk?1<this.cb.length&&(this.A.startTime=a.getTime(),(b=this.Zo())&&b!=this.ua&&(this.A.rd=a.getTime(),this.A.timeout=
0,this.Rc("{"+b+"}"),this.A.active=!0,this.F.te=!0)):(e=a.getTime(),h=f=1E3/60,0!=this.A.rd&&(h=e-this.A.rd),b.u.d=this.A.Kk*((this.A.Pp?b.u.Va:0)-b.u.m)/100,b.fov.d=this.A.Kk*(b.fov.Va-b.fov.m)/100,b.pan.d=.95*b.pan.d+-this.A.speed*this.Jh()*.05,f=h/f,b.pan.m+=b.pan.d*f,b.u.m+=b.u.d*f,b.fov.m+=b.fov.d*f,this.A.rd=e,this.update());3E3<a.getTime()-this.A.Zj&&!this.A.pj&&(this.xa.style.cursor="none",this.A.pj=!0)}else!this.Da.finished&&1E3<a.getTime()-this.If&&(this.za.splice(this.za.indexOf(this.S),
1),this.S=this.Ql(!1),this.vc=this.S.fb,this.A.active=!1,this.A.Ih=!0),this.A.enabled&&!this.U.Pj()&&a.getTime()-this.If>1E3*this.A.timeout&&!this.A.Ih&&(this.A.Xg&&this.Nh()||!this.A.Xg)&&(this.A.active=!0,this.A.startTime=a.getTime(),this.A.rd=0,this.G("autorotatechanged",{}),b.pan.d=0,b.u.d=0,b.fov.d=0,b.fov.Yc.enabled=!1),!this.qa.enabled||this.U.Pj()||0==b.pan.d&&0==b.u.d&&0==b.fov.d||(this.I.Kj=!0,b.pan.d*=.9,b.u.d*=.9,b.fov.d*=.9,b.pan.m+=b.pan.d,b.u.m+=b.u.d,this.K.re&&b.fov.Yc.enabled?this.lo(b.fov.d,
b.fov.Yc):this.jj(b.fov.d),1E-4>b.pan.d*b.pan.d+b.u.d*b.u.d+b.fov.d*b.fov.d&&(b.pan.d=0,b.u.d=0,b.fov.d=0,b.fov.Yc.enabled=!1),this.update())}Mr(a){let b=this.F;b.ed=!1;if("previewtrack"==b.delay&&!this.Qa()||"videopano"==b.delay&&!this.B.j)if(0<this.D.M.levels.length)this.D.M.levels[this.D.M.levels.length-1].loaded||(b.ed=!0);else{let e=!0;this.fa.forEach(f=>{f.Eq()||(e=!1)});e||(b.ed=!0)}else"videopano"==b.delay&&this.B.j&&!this.B.Bg&&(b.ed=!0);b.ed||this.Fk(a)}Fk(a){a||(a=new Date);let b=this.F;
b.ed=!1;b.vd=!0;b.Vd=this.A.fd;b.rn=a.getTime()+100;0==b.Vc||b.oh||this.qn()}qn(){let a=this.F;4==a.Vc?(this.S=this.Ql(!0,a.xn,a.yn,a.Ri),this.vc=this.S.fb,this.A.active=!0,this.Da.running=!0):this.moveTo(a.xn,a.yn,a.Ri,a.ph,0,a.ne)}Ju(a){var b=this.F;if(!b.jr){if(b.Pd){var e=(a.getTime()-b.fs)/(1E3*b.es);1<=e?(b.Dm(1),b.Pd=!1,this.Mo(),this.pn(),this.Mr(a)):0<=e&&b.Dm(e)}else b.vd&&(e=(a.getTime()-b.rn)/(1E3*b.rf),1<=e?(b.vd=!1,this.If=a.getTime(),this.update(),0!=b.Vc&&b.oh&&this.qn(),4!=b.Vc&&
(this.vk(!1),this.A.active=b.te,this.A.fd=b.Vd,this.G("autorotatechanged",{}),b.te=!1,b.Vd=!1),this.A.rd=0,this.ha&&this.xl(),this.xh=!1):0<=e&&("mesh"==b.type?this.fa[0].D.Qa()||this.fa[1].D.Qa()?b.rn=1:b.Fu(e):b.Dm(e)));b=this.Bu;b.os&&(b.qj?a.getTime()-b.Hl>=1E3*b.delay&&(b.qj=!1):(b.current+=b.zd,0>b.current&&(b.current=0,b.zd=-b.zd,b.qj=!0,b.Hl=a.getTime()),1<b.current&&(b.current=1,b.zd=-b.zd,b.qj=!0,b.Hl=a.getTime())))}}Mu(){let a,b=this.P;if(0<b.Bc.length){for(a=0;a<b.Bc.length;a++)b.ud[a]!=
b.Tc[a]&&(b.ud[a]>b.Tc[a]?(b.Tc[a]+=.05,b.ud[a]<b.Tc[a]&&(b.Tc[a]=b.ud[a])):(b.Tc[a]-=.05,b.ud[a]>b.Tc[a]&&(b.Tc[a]=b.ud[a],-1!=b.Ak.indexOf(b.Bc[a])&&(b.Ak.splice(b.Ak.indexOf(b.Bc[a]),1),b.Bc.splice(a,1),b.ud.splice(a,1),b.Tc.splice(a,1)))));this.update()}if(2==b.mode)for(a=0;a<this.L.length;a++){let e=this.L[a];"poly"==e.type&&e.jb!=e.Fa&&(e.jb>e.Fa?(e.Fa+=b.zd,e.jb<e.Fa&&(e.Fa=e.jb)):(e.Fa-=b.zd,e.jb>e.Fa&&(e.Fa=e.jb)),this.update())}3==b.mode&&b.jb!=b.Fa&&(b.jb>b.Fa?(b.Fa+=b.zd,b.jb<b.Fa&&(b.Fa=
b.jb)):(b.Fa-=b.zd,b.jb>b.Fa&&(b.Fa=b.jb)),this.update())}Lu(){var a=this.D;let b=this.qa;this.U.Pj()&&(this.K.lc?(b.ma.x=.4*(this.oa.na.x-b.na.x),b.ma.y=.4*(this.oa.na.y-b.na.y),b.na.x+=b.ma.x,b.na.y+=b.ma.y):(b.ma.x=.1*-this.oa.ma.x*this.K.sensitivity/8,b.ma.y=.1*-this.oa.ma.y*this.K.sensitivity/8),this.Xr(b.ma.x,b.ma.y),this.update());b.fov.active&&(this.K.re&&b.fov.center.enabled?this.ko(.4*(b.fov.jc-a.fov.m),b.fov.center):this.uh(.4*(b.fov.jc-a.fov.m)),.001>Math.abs(b.fov.jc-a.fov.m)/a.fov.m&&
(b.fov.active=!1),this.update());!b.enabled||0==b.ma.x&&0==b.ma.y||this.U.Pj()||(a=.9*(1-b.Zm),b.ma.x*=a,b.ma.y*=a,this.I.Kj=!0,.01>b.ma.x*b.ma.x+b.ma.y*b.ma.y?(b.ma.x=0,b.ma.y=0):(this.Xr(b.ma.x,b.ma.y),this.update()))}Ku(){if(!this.Nh()&&this.fe&&5<this.D.M.Kq){let a,b=0,e=this.ld.length;if(this.jh)e=50,this.Il<e&&this.Il++,b=this.Il;else for(a=0;a<e;a++)(this.ld[a].complete&&this.ld[a].src!=this.Is||""==this.ld[a].src)&&b++;b==e?(this.oi=1,this.isLoaded=!0,this.aa&&this.aa.ggLoaded&&this.aa.ggLoaded(),
this.G("imagesready",{}),this.A.Xg&&this.A.enabled&&!this.I.active&&!this.F.Pd&&(this.A.active=!0,this.A.Xg=!1,this.A.startTime=(new Date).getTime(),this.A.rd=0)):this.oi=b/(1*e);this.G("downloadprogress",{percentLoaded:this.oi})}}ni(){var a=this,b=a.D;a.qk||(a.Nj?setTimeout(function(){a.qk=!1;a.ni()},1E3/60):window.requestAnimationFrame(function(){a.qk=!1;a.ni()}));a.qk=!0;this.Qm=this.pk=0;a.I.Kj=!1;this.pa&&(this.Ol&&(this.Hf(0),this.xd()),this.H.width!=this.ia.offsetWidth||this.H.height!=this.ia.offsetHeight)&&
(this.H.width=this.ia.offsetWidth,this.H.height=this.ia.offsetHeight);let e=new Date;this.Pl++;120<=this.Pl&&(this.Pl=0);this.G("timer",{});this.pa&&this.fa.forEach(f=>{f.Hs()});this.In&&(this.xd(),this.In=!1);this.Lu();this.Ku();this.B.j&&this.B.Mc&&!this.gf&&!this.I.Dg&&this.Sk&&(this.S=this.Sk,this.Ii(10*this.B.j.currentTime));this.Hu(e);this.D.Iu();this.Ju(e);this.fa.forEach(f=>{f.cw()});(0<=this.P.mode||0<this.P.Bc.length)&&this.Mu();this.Qk();if(this.Lf.pan!=b.pan.m||this.Lf.u!=b.u.m||this.Lf.fov!=
b.fov.m)this.Lf.pan=b.pan.m,this.Lf.u=b.u.m,this.Lf.fov=b.fov.m,this.G("positionchanged",{});this.tm!=this.Z()&&(this.tm=this.Z(),this.G("projectionchanged",{}));this.Ha&&(0<this.ze?this.ze--:(this.Ha=!1,this.ze=0),this.F.vd||this.F.Pd||this.F.ed||this.qe||(this.Zi(),this.G("renderframe",{})),this.G("repaint",{}));b=this.Wl();b!=this.$p&&(b?(this.aa&&this.aa.ggReLoadedLevels&&this.aa.ggReLoadedLevels(),this.G("tilesrequested",{})):(a.aa&&a.aa.ggLoadedLevels&&a.aa.ggLoadedLevels(),this.G("tilesready",
{})),this.$p=b)}Mh(a){const b=this.D;switch(a){case 4:a=Math.min(110,b.fov.max);break;case 12:a=Math.min(270,b.fov.wm);a=Math.min(360*this.aspect(),a);a=Math.min(360/this.aspect(),a);break;case 9:a=Math.min(270,b.fov.xm);break;default:a=90}return a}Qk(){var a=this.D;this.Bl.Ee(a.pan.m,a.u.m);for(a=0;a<this.X.length+this.V.length;a++){let b;if(a<this.X.length)b=this.X[a];else if(b=this.V[a-this.X.length],b.td)continue;b.Qk()}}Ev(a,b){let e=this,f=[];let h;if(e.K.to&&e.pa){let r=[];r.push({text:this.Ja("Rectilinear Projection"),
ti:4});r.push({text:this.Ja("Stereographic Projection"),ti:9});r.push({text:this.Ja("Fisheye Projection"),ti:12});for(h=0;h<r.length;h++){let w=r[h],x={};var n="text-align: left;";n+="margin: 0;";n=e.Z()==w.ti?n+"padding: 5px 20px 5px 7px;":n+"padding: 5px 20px;";n+="vertical-align: left;";n+="cursor: pointer;";x.style=n;x.onclick=function(y){return function(){e.pl(y,1);e.update()}}(w.ti);x.innerHTML=e.Z()==w.ti?"⦿ "+w.text:w.text;f.push(x)}(e.K.ul||e.K.vl&&e.yg())&&f.push({hr:!0})}e.K.ul&&
(n={style:"text-align: left;margin: 0;padding: 5px 20px;vertical-align: left;cursor: pointer;",onclick:function(){e.Lk()}},n.innerHTML=e.Wh()?this.Ja("Exit Fullscreen"):this.Ja("Enter Fullscreen"),f.push(n));e.K.vl&&e.yg()&&(n={style:"text-align: left;margin: 0;padding: 5px 20px;vertical-align: left;cursor: pointer;",onclick:function(){e.og()}},n.innerHTML=this.Ja("Enter VR"),f.push(n));e.Fv(a,b,f)}ns(){let a=this,b;b=a.xa;a.control=b;a.control=b;setTimeout(function(){a.ni()},10);setTimeout(function(){a.Aq()},
200);setTimeout(function(){a.Qd();a.Zi()},10);b.addEventListener&&(b.addEventListener("touchstart",function(e){a.Vv(e)},!1),b.addEventListener("touchmove",function(e){a.Uv(e)},!1),b.addEventListener("touchend",function(e){a.Tv(e)},!1),b.addEventListener("touchcancel",function(e){a.Sv(e)},!1),b.addEventListener("pointerdown",function(e){a.nq(e)},!1),b.addEventListener("MSPointerDown",function(e){a.nq(e)},!1),b.addEventListener("MSGestureStart",function(e){a.Xo(e)},!1),b.addEventListener("MSGestureEnd",
function(e){a.Wo(e)},!1),b.addEventListener("MSGestureChange",function(e){a.ku(e)},!1),b.addEventListener("gesturestart",function(e){a.Xo(e)},!1),b.addEventListener("gesturechange",function(e){a.Ps(e)},!1),b.addEventListener("gestureend",function(e){a.Wo(e)},!1),b.addEventListener("mousedown",function(e){a.ju(e)},!1),b.addEventListener("mousemove",function(e){a.iu(e)},!1),document.addEventListener("mouseup",function(e){a.hu(e)},!1),b.addEventListener("mousewheel",function(e){a.kq(e)},!1),b.addEventListener("DOMMouseScroll",
function(e){a.kq(e)},!1),document.addEventListener("keydown",function(e){a.au(e)},!1),document.addEventListener("keyup",function(e){a.bu(e)},!1),window.addEventListener("resize",function(){a.Qd()},!1),a.container.addEventListener("resize",function(){a.Qd()},!1),window.addEventListener("blur",function(){a.ru()},!1),a.T.addEventListener("webkitfullscreenchange",function(){a.mi()},!1),document.addEventListener("mozfullscreenchange",function(){a.mi()},!1),window.addEventListener("webkitfullscreenchange",
function(){a.mi()},!1),document.addEventListener("MSFullscreenChange",function(){a.mi()},!1),document.addEventListener("fullscreenchange",function(){a.mi()},!1));b.oncontextmenu=function(e){void 0===e&&(e=window.event);if(e.target&&!a.mc(e.target))return!0;if(!e.ctrlKey){a.zf(e);const f=a.Bf();a.Ev(e.clientX-f.x,e.clientY-f.y);return!1}return!0};window.addEventListener("deviceorientation",function(e){a.yu(e.alpha,e.beta,e.gamma,e.absolute);null!=e.alpha&&null!=e.beta&&null!=e.gamma&&0==a.em&&(a.em=
!0,a.G("gyroavailable",{available:!0}),a.G("playerstatechanged",{}))})}Vn(){for(let a=0;a<this.L.length;a++)if("point"==this.L[a].type&&(this.ka&&this.ka.addSkinHotspot?(this.L[a].wf(),this.L[a].j=this.ka.addSkinHotspot(this.L[a])):(this.L[a].j=new xd(this,this.L[a]),this.L[a].nd&&this.L[a].Yf&&(this.L[a].j.ggUse3d=!0,this.L[a].j.gg3dDistance=this.L[a].rj)),this.L[a].j.__div.style.left="-1000px",this.L[a].j.__div.style.top="-1000px",this.L[a].j&&this.L[a].j.__div)){let b=this.xa.firstChild;b?this.xa.insertBefore(this.L[a].j.__div,
b):this.xa.appendChild(this.L[a].j.__div)}}ts(){if(!this.ka||!this.ka.addSkinHotspot)for(var a=0;a<this.L.length;a++)"point"==this.L[a].type&&this.L[a].j&&this.L[a].j.Lt()}us(){for(var a=0;a<this.Za.length;a++)this.Za[a].Xd();for(a=0;a<this.Qb.length;a++)this.Qb[a].Xd();for(a=0;a<this.X.length;a++)this.X[a].Xd();for(a=0;a<this.V.length;a++)this.V[a].Xd()}Xk(){let 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]}Xa(a){let b=[];a="*"==a?"^.*$":"#"==a.substring(0,1)?a.substring(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.V.length;e++)a.test(this.V[e].id)&&b.push(this.V[e]);for(e=0;e<this.Za.length;e++)a.test(this.Za[e].id)&&b.push(this.Za[e]);for(e=0;e<this.Qb.length;e++)a.test(this.Qb[e].id)&&b.push(this.Qb[e]);return b}np(a){if("_videopanorama"==
a)return this.B.j;a=this.Xa(a);return 0<a.length?a[0].j:null}mp(a){a=this.Xa(a);return 0<a.length&&a[0].ta?a[0]:null}Hq(a,b){let e=this;b.addEventListener("ended",function(n){e.G("videoended",{video:n.target})});b.addEventListener("pause",function(n){e.G("videopaused",{video:n.target})});b.addEventListener("play",function(n){e.G("videostarted",{video:n.target})});let f=null;for(var h=0;h<this.V.length;h++)this.V[h].id==a&&(this.V[h].j=b,f=this.V[h]);f||(f=new Qb(this),f.registerElement(a,b));e.xc&&
f.gn(1);return f}isPlaying(a){if("_main"===a)return!0;a=this.Xa(a);return 0<a.length?a[0].ta?a[0].Ig:!a[0].j.ended&&!a[0].j.paused:!1}Ld(a,b){let e=null;if(!this.xc)try{let h=this.Xa(a);for(var f=0;f<h.length;f++){let n=h[f];n instanceof Bb&&(n.kb=b&&!isNaN(Number(b))?Number(b)-1:n.loop-1,-1>=n.kb&&(n.kb=1E7),this.isPlaying(a)&&this.Qi(a),n.ta?n.Wd():(e=n.j.play(),void 0!==e&&e.then(()=>{this.Sg(!0)}).catch(()=>{this.Sg(!1)}),n.Sd&&n.ef()),this.Fi(n.id,!1))}}catch(h){}return e}Gm(a,b){a=this.Xa(a);
for(var e=0;e<a.length;e++){let f=a[e];this.isPlaying(f.id)?this.Hg(f.id):this.Ld(f.id,b)}}Dq(a,b){a=this.Xa(a);for(var e=0;e<a.length;e++){let f=a[e];f instanceof Bb&&(this.isPlaying(f.id)?this.Qi(f.id):this.Ld(f.id,b))}}Hg(a){try{let b;if("_main"==a){this.Fi(a,!0);for(b=0;b<this.X.length;b++)this.X[b].ta?this.X[b].kl():this.X[b].j.pause();for(b=0;b<this.V.length;b++)this.V[b].j.pause()}else{let e=this.Xa(a);for(b=0;b<e.length;b++){let f=e[b];f instanceof Bb&&(this.Fi(f.id,!0),f.ta?f.kl():f.j.pause())}}}catch(b){}}Sn(a,
b){a=this.Xa(a);for(var e=0;e<a.length;e++){let f=a[e];0==b||1==b?f.Cf&&f.Cf(1==b):2==b&&f.Ge&&f.Ge();!f.Ma||-1==this.Za.indexOf(f)&&-1==this.V.indexOf(f)&&-1==this.Qb.indexOf(f)||(this.Sb=this.Se=f)}}Qi(a){let b;try{if("_main"===a){this.Fi(a,!0);for(b=0;b<this.X.length;b++)this.X[b].ta?this.X[b].fg():(this.X[b].j.pause(),this.X[b].j.currentTime=0);for(b=0;b<this.V.length;b++)this.V[b].j.pause(),this.V[b].j.currentTime=0}else{let e=this.Xa(a);for(b=0;b<e.length;b++){let f=e[b];f instanceof Bb&&(this.Fi(f.id,
!0),f.ta?f.fg():f.j&&f.j.pause&&(f.j.pause(),f.j.currentTime=0))}}}catch(e){}}Fi(a,b){a=this.Xa("_main"===a?".*":a);for(let e=0;e<a.length;e++){let f=a[e];f.stopped=b;f.un=!1}}rr(a){a=this.Xa(a);return 0<a.length?(a=a[0],a instanceof Bb?a.ta?a.qs():a.j?a.j.currentTime:0:0):0}tr(a,b){a=this.Xa(a);for(let e=0;e<a.length;e++){let f=a[e];f instanceof Bb&&(f.ta?(0>b&&(b=0),b>f.audioBuffer.duration&&(b=f.audioBuffer.duration-.1),f.rs(b)):f.j&&(0>b&&(b=0),b>f.j.duration&&(b=f.j.duration-.1),f.j.currentTime=
b))}}sr(a,b){a=this.Xa(a);0<a.length&&(a=a[0],a.j&&(a.j.playbackRate=b))}setVolume(a,b){try{let e,f=Number(b);1<f&&(f=1);0>f&&(f=0);"_videopanorama"===a&&this.B.j&&(this.B.j.volume=f,this.B.level=f);if("_main"===a){this.ea=f;for(e=0;e<this.X.length;e++)this.X[e].j.volume=this.X[e].level*this.ea;for(e=0;e<this.V.length;e++)this.V[e].j.volume=this.V[e].level*this.ea;this.B.j&&(this.B.j.volume=this.ea*this.B.level)}else{let h=this.Xa(a);for(e=0;e<h.length;e++){let n=h[e];n.j&&null!=n.j.volume&&(n.j.volume=
f*this.ea);n.level=f}}}catch(e){}this.G("elementvolume",{id:a,type:"set",volume:b})}po(a,b){try{let e,f;"_videopanorama"===a&&this.B.j&&(this.B.j.volume+=Number(b));if("_main"===a){e=this.ea;e+=Number(b);1<e&&(e=1);0>e&&(e=0);this.ea=e;for(f=0;f<this.X.length;f++)this.X[f].j.volume=this.X[f].level*this.ea;for(f=0;f<this.V.length;f++)this.V[f].j.volume=this.V[f].level*this.ea;this.B.j&&(this.B.j.volume=this.ea*this.B.level)}else{let h=this.Xa(a);for(f=0;f<h.length;f++){let n=h[f];n instanceof Bb&&
(e=n.level,e+=Number(b),1<e&&(e=1),0>e&&(e=0),n.level=e,n.j&&null!=n.j.volume&&(n.j.volume=e*this.ea))}}}catch(e){}this.G("elementvolume",{id:a,type:"change",volume:b})}yk(a,b){if("_main"===a||"_all"===a||"_videopanorama"===a)"_all"===a&&(b=(this.xc=1==b||-1==b&&!this.xc?!0:!1)?1:0),this.B.j&&(this.B.j.muted=-1==b?!this.B.j.muted:1==b);let e=this.Xa("_main"===a||"_all"===a?".*":a);for(let f=0;f<e.length;f++){let h=e[f];h.gn&&h.gn(b)}this.G("elementmuted",{id:a,state:b})}yr(){this.ug();this.$d&&setTimeout(()=>
{this.ug()},500)}wk(a,b,e){a.j.style.opacity=0==b?1:0;a.j.style[this.Hc]="opacity "+e+"ms";a.j.style.opacity=0==b?0:1}xk(a,b,e){let f=this.Xa(a);for(var h=0;h<f.length;h++){let n=f[h];n.j&&(this.Le()?this.ja.xk(a,b,e):0==b?(this.wk(n,b,e),setTimeout(function(){0==n.j.style.opacity&&n.Tf(!1)},e+10),n.Xb=!1):1==b?(this.wk(n,b,e),n.Tf(!0),n.Xb=!0):2==b&&("visible"==n.j.style.visibility?(this.wk(n,0,e),setTimeout(function(){0==n.j.style.opacity&&n.Tf(!1)},e+10),n.Xb=!1):(this.wk(n,1,e),n.Tf(!0),n.Xb=
!0)))}}pn(){try{let a=this,b=!1,e=!1;for(let f=0;f<this.X.length;f++){let h=this.X[f];if(-1==h.loop||this.isPlaying(h.id))continue;if(h.stopped)continue;let n;this.ga&&this.bb.enabled&&4!=h.mode&&6!=h.mode&&!this.xc?this.bb.zo?(h.ta?h.Wd():(n=h.j.play(),h.Sd&&h.ef(),h.j.currentTime=0),h.va=0,e=!0):b=!0:4==h.mode||6==h.mode||"_background"==h.id&&this.isPlaying(h.id)||this.xc||(h.ta?h.Wd():(n=h.j.play(),h.j.currentTime&&(h.j.currentTime=0)));void 0!==n&&n.then(()=>{this.Sg(!0)}).catch(()=>{this.Sg(!1)})}b&&
setTimeout(function(){a.bb.Lv()},1E3*this.bb.Kb);e&&(this.bb.Jv=this.ga.currentTime,this.bb.Iv=setInterval(function(){a.bb.Ms()},10))}catch(a){}}Mo(){for(let a=0;a<this.bb.Xi.length;a++)this.bb.Lo(this.bb.Xi[a])}Vm(){if(this.O&&this.O!=this.Wa&&this.O.div&&this.O.div.onmouseout)this.O.div.onmouseout();let a;for(;0<this.L.length;)a=this.L.pop(),a.j&&(this.xa.removeChild(a.j.__div),delete a.j),a.j=null;this.P.Fa=0;this.P.jb=0;this.G("hotspotsremoved",{})}Tg(a){this.cg=a;this.T.style.zIndex=0!=a?a.toString():
"auto";this.xa.style.zIndex=(a+4).toString();this.ge.style.zIndex=(a+5).toString();for(let b=0;b<this.Fj();b++){let e;e=b<this.V.length?this.V[b]:this.Za[b-this.V.length];e.j&&(e.j.style.zIndex=(a+(e.Ma?8E4:0)).toString())}}Bi(a){let b=this.nc!==a;this.nc!==a&&(this.nc=a,this.update(100));if(this.nc){if(this.kh)try{this.T.webkitRequestFullScreen?this.T.webkitRequestFullScreen():this.T.mozRequestFullScreen?this.T.mozRequestFullScreen():this.T.msRequestFullscreen?this.T.msRequestFullscreen():this.T.requestFullScreen?
this.T.requestFullScreen():this.T.requestFullscreen&&this.T.requestFullscreen()}catch(e){}this.T.style.position="absolute";a=this.Bf();this.T.style.left=window.pageXOffset-a.x+this.margin.left.ba+"px";this.T.style.top=window.pageYOffset-a.y+this.margin.top.ba+"px";this.Tg(10);document.body.style.overflow="hidden";b&&(this.aa&&this.aa.ggEnterFullscreen&&this.aa.ggEnterFullscreen(),this.G("fullscreenenter",{}),this.G("playerstatechanged",{}))}else{if(this.kh)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.T.style.position="relative";this.T.style.left="0px";this.T.style.top="0px";this.Tg(0);document.body.style.overflow="";b&&(this.aa&&this.aa.ggExitFullscreen&&this.aa.ggExitFullscreen(),this.G("fullscreenexit",{}),this.G("playerstatechanged",{}))}this.Qd()}og(){this.ja.Ds();
this.Tj||this.Sj||this.Mq();this.ja.og();this.ja.Au();return!0}Dt(){return"N/A"}Ct(){if(this.ja)return this.ja.Le()?this.ja.Uk:this.ja.camera}Et(){if(this.ja)return this.ja.Sa}rv(a,b){this.ja.Uq(a,b)}Ft(){return this.ja.Dc}sv(a){this.ja&&(this.ja.De=a)}pg(){this.ja&&(this.ja.pg(),this.ja.Sf(),this.ja.tl());return!0}Ir(){this.ja&&(this.ja.Le()?this.pg():this.og());return!0}Le(){return this.ja&&this.ja.Le()?!0:!1}yg(){return this.ja&&this.ja.yg()?!0:!1}fr(a){return this.ja?(2==a?this.ja.Xe():this.ja.Xe(0!=
a),!0):!1}Dj(){return this.ja?this.ja.Dj():!1}vv(a){this.ja&&this.ja.nv(a)}tv(a){this.ja&&this.ja.av(a)}zr(a,b,e){this.A.Ud=this.A.hj;this.A.fd=this.A.$f;this.A.enabled=!0;this.A.dg=this.A.enabled;this.A.active=!0;this.A.rd=0;let f=new Date;this.A.Id=0;this.A.startTime=f.getTime();void 0!==a&&0!=a&&(this.A.speed=a);void 0!==b&&(this.A.timeout=b);void 0!==e&&(this.A.Kk=e);this.G("autorotatechanged",{})}Cr(){this.A.active=!1;this.A.enabled=!1;this.A.dg=this.A.enabled;this.gf=this.A.dk=!1;this.I.active&&
this.I.Dg&&(this.I.active=!1,this.I.Dg=!1,this.I.rb=0);this.G("autorotatechanged",{})}Hr(){this.A.enabled=!this.A.active;this.A.dg=this.A.enabled;this.A.active=this.A.enabled;this.A.rd=0;if(this.A.enabled){let a=new Date;this.A.Id=0;this.A.startTime=a.getTime();this.A.Ud=this.A.hj;this.A.fd=this.A.$f}this.G("autorotatechanged",{})}Bq(){this.ra(!1)}Oq(){this.A.enabled&&(this.A.active=!0,this.A.rd=0)}Tq(a){this.A.Eg=a;this.A.rq=!0}ur(a){this.Da.running&&this.Wq();this.vc="";a&&""!=a&&(this.A.Ud=a);
this.A.dg=this.A.enabled;this.A.fd=!0;this.A.enabled=!0;this.A.active=!0;this.A.rd=0;this.F.vd&&(this.F.Vd=!0,this.F.te=!0);a=new Date;this.A.Id=0;this.A.startTime=a.getTime();this.G("autorotatechanged",{})}Uu(a){a&&""!=a&&this.A.Ud!=a||0==this.A.Id?this.ur(a):(this.A.fd=!0,this.A.enabled=!0,this.A.active=!0,this.G("autorotatechanged",{}))}Wq(){this.Da.running=!1;this.Da.finished=!0;this.A.active=this.F.te;this.A.fd=this.F.Vd;this.za.splice(this.za.indexOf(this.S),1);0<this.za.length&&(this.S=this.za[0]);
this.vc="";this.vk(!1);this.F.te=!1;this.F.Vd=!1;this.If=(new Date).getTime()}qo(a){if(this.container=document.getElementById(a))return this.container.innerHTML="",!0;alert("container not found!");return!1}Vq(a){let b=this;b.container.removeEventListener("resize",function(){b.Qd()});b.qo(a)&&(b.container.appendChild(b.T),b.container.addEventListener("resize",function(){b.Qd()},!1))}yl(a){this.qo(a)&&(this.T=document.createElement("div"),this.T.onselectstart=function(){return!1},this.T.setAttribute("id",
"viewport"),this.T.setAttribute("role","application"),a="top: 0px;left: 0px;position: relative;perspective: none;-ms-touch-action: none;touch-action: none;-webkit-user-select: none;user-select: none;text-align: left;"+(this.Tb+"user-select: none;"),this.T.setAttribute("style",a),this.container.appendChild(this.T),this.ia=document.createElement("div"),a="top:\t0px;left: 0px;width: 100px;height: 100px;overflow: hidden;position:absolute;-ms-touch-action: none;touch-action: none;"+(this.Tb+"user-select: none;"),
this.ia.setAttribute("id","viewer"),this.ia.setAttribute("style",a),this.T.appendChild(this.ia),this.xa=document.createElement("div"),this.xa.setAttribute("id","hotspots"),a="top:\t0px;left: 0px;width: 100px;height: 100px;overflow: hidden;position:absolute;",this.mm&&(a+="background-image: url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7);"),this.Mb&&!this.pa&&(a+=this.Tb+"transform: translateZ(9999999px);"),a+=this.Tb+"user-select: none;",this.xa.setAttribute("style",
a),this.T.appendChild(this.xa),this.ge=document.createElement("div"),this.ge.setAttribute("id","hotspottext"),this.ge.setAttribute("style","top:\t0px;left: 0px;position:absolute;padding: 3px;visibility: hidden;"),this.ge.classList.add("ggskin"),this.ge.classList.add("ggdefaulthotspot"),this.ge.innerHTML=" Hotspot text!",this.T.appendChild(this.ge),this.divSkin=this.aa=this.xa,this.Tg(0))}Sf(){var a;this.qa.ma.x=0;this.qa.ma.y=0;this.fa.forEach(f=>{f.Sf()});let b=[];for(a=0;a<this.V.length;a++){var e=
this.V[a];e.td?b.push(e):e.Ue()}for(a=0;a<this.Za.length;a++)this.Za[a].Ue();for(a=0;a<this.Qb.length;a++)this.Qb[a].Ue();this.P.sm=-1;this.cd=0;this.Vf=[];this.bb.Xi=[];for(a=0;a<this.X.length;a++)e=this.X[a],e.qq||7>this.Wc&&0==e.mode||this.Vf.push(e);this.V=b;this.Za=[];this.Qb=[];this.B.j&&(this.T.removeChild(this.B.j),this.B.j=null,a=this.Xa("_videopanorama"),0<a.length&&(a[0].j=null));this.B.Mc=!1;this.B.Bg=!1}ss(a){a="{"==a.charAt(0)?a.slice(1,a.length-1):a;let b=this.xe[a];b&&(a=b);this.G("beforechangenodeid",
{oldNodeId:this.ua,nodeId:a});this.cm?this.cm=!1:this.zm.push(this.ua);""!=this.ua&&-1==this.Tk.indexOf(this.ua)&&(this.Tk.push(this.ua),this.G("changevisitednodes",{}));this.aq=this.ua;this.ua=a;this.ka&&this.ka.changeActiveNode&&this.ka.changeActiveNode("{"+a+"}");this.Ce=!0}pd(){return this.ua}pp(a){return 0<this.cb.length?(a||(a=this.ua),a=this.cb.indexOf(a),a++,a>=this.cb.length&&(a=0),this.cb[a]):""}xp(a){return 0<this.cb.length?(a||(a=this.ua),a=this.cb.indexOf(a),a--,0>a&&(a=this.cb.length-
1),this.cb[a]):""}ft(){return this.aq}zt(){return this.Uc}pu(a){return-1!=this.Tk.indexOf(a)}ys(){this.Tk=[];this.G("changevisitednodes",{})}Pm(a,b){a=a.firstChild;this.cf=[];this.cb=[];this.xe=[];this.xg=!1;var e;(e=a.getAttributeNode("appversion"))&&e.nodeValue.toString().match(/(\d+)\.(\d+)\.?(\d+)?/);for(var f=a.firstChild;f;){if("map"==f.nodeName){var h={};(e=f.getAttributeNode("index"))&&(h.index=Number(e.nodeValue));(e=f.getAttributeNode("title"))&&(h.title=e.nodeValue.toString());e=f.getAttributeNode("type");
h.type=e.nodeValue.toString();"web"==h.type?(e=f.getAttributeNode("mapprovider"),h.mapprovider=e.nodeValue.toString(),(e=f.getAttributeNode("mapstyle"))&&(h.mapstyle=e.nodeValue.toString()),(e=f.getAttributeNode("googlecustomstylecode"))&&(h.googlecustomstylecode=e.nodeValue.toString()),(e=f.getAttributeNode("mapurltemplate"))&&(h.mapurltemplate=e.nodeValue.toString()),(e=f.getAttributeNode("mapmaxzoom"))&&(h.mapmaxzoom=Number(e.nodeValue)),(e=f.getAttributeNode("customlayernames"))&&(h.customlayernames=
e.nodeValue.toString().split("|")),(e=f.getAttributeNode("customlayerurltemplates"))&&(h.customlayerurltemplates=e.nodeValue.toString().split("|")),(e=f.getAttributeNode("customlayermaxzooms"))&&(h.customlayermaxzooms=e.nodeValue.toString().split("|")),(e=f.getAttributeNode("mapkey"))&&(h.mapkey=e.nodeValue.toString()),(e=f.getAttributeNode("styleurl"))&&(h.styleurl=e.nodeValue.toString()),(e=f.getAttributeNode("mapboxlayernames"))&&(h.mapboxlayernames=e.nodeValue.toString().split("|")),(e=f.getAttributeNode("mapboxlayerstyleurls"))&&
(h.mapboxlayerstyleurls=e.nodeValue.toString().split("|")),(e=f.getAttributeNode("googlelayernames"))&&(h.googlelayernames=e.nodeValue.toString().split("|")),(e=f.getAttributeNode("googlelayerstyles"))&&(h.googlelayerstyles=e.nodeValue.toString().split("|")),(e=f.getAttributeNode("maplimits"))&&(h.maplimits=e.nodeValue.toString().split("|"))):(e=f.getAttributeNode("width"),h.width=Number(e.nodeValue),e=f.getAttributeNode("height"),h.height=Number(e.nodeValue),e=f.getAttributeNode("zoomlevels"),h.zoomlevels=
Number(e.nodeValue),e=f.getAttributeNode("tileformat"),h.tileformat=e.nodeValue.toString(),e=f.getAttributeNode("bgcolor"),h.bgcolor=e.nodeValue.toString(),e=f.getAttributeNode("crispedges"),h.crispedges=1==e.nodeValue,e=f.getAttributeNode("transparent"),h.transparent=1==e.nodeValue,e=f.getAttributeNode("floorplannorth"),h.floorplannorth=Number(e.nodeValue));e=f.getAttributeNode("id");this.qc[e.nodeValue.toString()]=h}f=f.nextSibling}if("tour"==a.nodeName){this.qd=!0;if(e=a.getAttributeNode("start"))this.Uc=
e.nodeValue.toString();if(e=a.getAttributeNode("hassounds"))this.xg=1==e.nodeValue;this.hasOwnProperty("startNode")&&this.startNode&&(this.Uc=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=a.firstChild;for(a=h="";f;){if("panorama"==f.nodeName){if(e=f.getAttributeNode("id"))h=e.nodeValue.toString(),""==this.Uc&&(this.Uc=
h),""==a&&(a=h),this.cf[h]=f,this.cb.push(h);for(e=f.firstChild;e;){if("userdata"==e.nodeName){var n=this.qg(e);this.df[h]=n;h==this.Uc&&(this.df._first=n);n.customnodeid&&(this.xe[n.customnodeid]=h);this.Oc[h]=this.Io(e);this.Cg[h]=this.Jo(e);this.bg[h]=this.Ko(e)}if("hotspots"==e.nodeName)for(n=e.firstChild;n;)"hotspot"!=n.nodeName&&"polyhotspot"!=n.nodeName||this.Jl(h,e),n=n.nextSibling;e=e.nextSibling}}if("masternode"==f.nodeName)for(e=f.firstChild;e;){"userdata"==e.nodeName&&(n=this.qg(e),this.df._master=
n);"animationsequences"==e.nodeName&&this.Ks(e);if("translations"==e.nodeName){(n=e.getAttributeNode("json"))&&this.qh(n.nodeValue.toString());let r=e.firstChild;for(;r;){"json"==r.nodeName&&this.qh(r.textContent);if("projecttranslation"==r.nodeName){let w={};if(n=r.getAttributeNode("langcode"))w.langCode=n.nodeValue;if(n=r.getAttributeNode("langname"))w.langName=n.nodeValue;this.Km.push(w)}r=r.nextSibling}this.rm||this.en(window.navigator.language)}e=e.nextSibling}"customproperty"==f.nodeName&&this.Ho(f);
f=f.nextSibling}!this.cf.hasOwnProperty(this.Uc)&&(f=this.xe[this.Uc])&&(this.Uc=f);this.cf.hasOwnProperty(this.Uc)||(this.Yb("Start node "+this.Uc+" not found!"),this.Uc=a);this.Nm(this.cf[this.Uc],b,this.fa[0].D)}else{this.qd=!1;this.Nm(a,b);if(e=a.getAttributeNode("hassounds"))this.xg=1==e.nodeValue;this.cb.push("")}this.qe&&this.ja.ej();this.xg&&(this.Vt(),this.vr());this.G("configloaded",{});this.G("changenode",{});this.G("playerstatechanged",{})}Nm(a,b,e){e||(e=this.D);this.We(this.Wa);this.Vm();
this.Nc&&this.Nc.Ru();this.Sf();this.Sk=0;var f;let h="";(f=a.getAttributeNode("id"))&&(h=f.nodeValue.toString());let n={oldNodeId:this.ua,nodeId:h};var r,w=0,x=e.M;let y=a.firstChild;for(;y;){if("view"==y.nodeName){if(f=y.getAttributeNode("fovmode"))e.fov.mode=Number(f.nodeValue);f=y.getAttributeNode("pannorth");e.pan.Am=1*(f?f.nodeValue:0);for(var z=y.firstChild;z;){"start"==z.nodeName&&(f=z.getAttributeNode("pan"),e.pan.m=Number(f?f.nodeValue:0),e.pan.Va=e.pan.m,f=z.getAttributeNode("tilt"),e.u.m=
Number(f?f.nodeValue:0),e.u.Va=e.u.m,f=z.getAttributeNode("roll"),e.Y.m=Number(f?f.nodeValue:0),e.Y.Va=e.Y.m,f=z.getAttributeNode("fov"),e.fov.m=Number(f?f.nodeValue:70),e.fov.Va=e.fov.m,f=z.getAttributeNode("projection"),e.yq=Number(f?f.nodeValue:4),this.ab(this.Ph()));"min"==z.nodeName&&(f=z.getAttributeNode("pan"),e.pan.min=1*(f?f.nodeValue:0),f=z.getAttributeNode("tilt"),e.u.min=1*(f?f.nodeValue:-90),f=z.getAttributeNode("fov"),e.fov.min=1*(f?f.nodeValue:5),1E-20>e.fov.min&&(e.fov.min=1E-20),
f=z.getAttributeNode("fovpixel"),e.fov.ii=1*(f?f.nodeValue:0));if("max"==z.nodeName){f=z.getAttributeNode("pan");e.pan.max=1*(f?f.nodeValue:0);f=z.getAttributeNode("tilt");e.u.max=1*(f?f.nodeValue:90);f=z.getAttributeNode("fov");e.fov.max=1*(f?f.nodeValue:120);180<=e.fov.max&&(e.fov.max=179.9);if(f=z.getAttributeNode("fovstereographic"))e.fov.xm=1*f.nodeValue;if(f=z.getAttributeNode("fovfisheye"))e.fov.wm=1*f.nodeValue;if(f=z.getAttributeNode("scaletofit"))this.K.Sq=1==f.nodeValue}if("flyin"==z.nodeName){if(f=
z.getAttributeNode("projection"))e.Zc.rb=Number(f.nodeValue);if(f=z.getAttributeNode("pan"))e.Zc.pan=parseFloat(f.nodeValue);if(f=z.getAttributeNode("tilt"))e.Zc.u=parseFloat(f.nodeValue);if(f=z.getAttributeNode("fov"))e.Zc.fov=parseFloat(f.nodeValue)}z=z.nextSibling}}if("autorotate"==y.nodeName){if(f=y.getAttributeNode("speed"))this.A.speed=1*f.nodeValue;if(f=y.getAttributeNode("delay"))this.A.timeout=1*f.nodeValue;if(f=y.getAttributeNode("returntohorizon"))this.A.Kk=1*f.nodeValue;if(f=y.getAttributeNode("horizonfromdefview"))this.A.Pp=
1==f.nodeValue;if(f=y.getAttributeNode("nodedelay"))this.A.fk=1*f.nodeValue;if(f=y.getAttributeNode("noderandom"))this.A.sq=1==f.nodeValue;(f=y.getAttributeNode("nodefilter"))&&!this.A.rq&&(this.A.Eg=f.nodeValue);this.Ed&&(this.A.enabled=!0,this.A.dg=!0,this.A.active=!1);(f=y.getAttributeNode("startloaded"))&&this.Ed&&(this.A.Xg=1==f.nodeValue,this.A.Xg&&(this.A.active=!1));if(f=y.getAttributeNode("useanimation"))this.A.$f=1==f.nodeValue,this.A.fd=this.A.$f;if(f=y.getAttributeNode("syncanimationwithvideo"))this.A.wn=
1==f.nodeValue}if("animation"==y.nodeName){if(f=y.getAttributeNode("syncanimationwithvideo"))this.A.wn=1==f.nodeValue;if(f=y.getAttributeNode("useinautorotation"))this.A.$f=1==f.nodeValue;if(f=y.getAttributeNode("animsequence"))this.A.hj=f.nodeValue,this.Ed&&(this.A.Ud=this.A.hj);if(f=y.getAttributeNode("clipsrandom"))this.A.so=1==f.nodeValue;this.za=[];for(z=y.firstChild;z;){if("clip"==z.nodeName){this.S=new Tb;if(f=z.getAttributeNode("animtitle"))this.S.hf=f.nodeValue.toString();if(f=z.getAttributeNode("cliptitle"))this.S.fb=
f.nodeValue.toString();if(f=z.getAttributeNode("nodeid"))this.S.Kw=f.nodeValue.toString();if(f=z.getAttributeNode("length"))this.S.length=Number(f.nodeValue);if(f=z.getAttributeNode("animtype"))this.S.ms=Number(f.nodeValue);if(f=z.getAttributeNode("nextcliptitle"))this.S.pq=f.nodeValue.toString();if(f=z.getAttributeNode("nextclipnodeid"))this.S.oq=f.nodeValue.toString();if(f=z.getAttributeNode("nextclipstartview"))this.S.ou=f.nodeValue.toString();if(f=z.getAttributeNode("transitiontype"))this.S.Yv=
Number(f.nodeValue);var cb=z.firstChild;for(this.S.Ia=[];cb;){if("keyframe"==cb.nodeName){let db=new Ab;if(f=cb.getAttributeNode("time"))db.time=Number(f.nodeValue);if(f=cb.getAttributeNode("value"))db.value=Number(f.nodeValue);if(f=cb.getAttributeNode("valuestring"))db.Ln=f.nodeValue.toString();if(f=cb.getAttributeNode("transitiontime"))db.Kb=Number(f.nodeValue);f=cb.getAttributeNode("type");let gb=0;f&&(db.type=Number(f.nodeValue),gb=Number(f.nodeValue));if(f=cb.getAttributeNode("property"))db.sb=
Number(f.nodeValue);if(f=cb.getAttributeNode("additionaltrackid"))db.yd=f.nodeValue.toString();if(f=cb.getAttributeNode("additionaltracktype"))db.Xn=Number(f.nodeValue);if(1==gb||2==gb){if(f=cb.getAttributeNode("bezierintime"))db.lf=Number(f.nodeValue);if(f=cb.getAttributeNode("bezierinvalue"))db.mf=Number(f.nodeValue);if(f=cb.getAttributeNode("bezierouttime"))db.nf=Number(f.nodeValue);if(f=cb.getAttributeNode("bezieroutvalue"))db.pf=Number(f.nodeValue)}this.S.Ia.push(db)}cb=cb.nextSibling}this.za.push(this.S);
"__VideoPano"==this.S.fb&&(this.Sk=this.S)}z=z.nextSibling}}"input"==y.nodeName&&(r||(r=y));if(r)for(z=0;6>z;z++)f=r.getAttributeNode("prev"+z+"url"),this.Ah[z]=f?String(f.nodeValue):"";"altinput"==y.nodeName&&(z=0,(f=y.getAttributeNode("screensize"))&&(z=1*f.nodeValue),0<z&&z<=this.lp()&&z>w&&(w=z,r=y));if("control"==y.nodeName&&this.Ed){if(f=y.getAttributeNode("simulatemass"))this.qa.enabled=1==f.nodeValue;if(f=y.getAttributeNode("rubberband"))this.K.Rq=1==f.nodeValue;if(f=y.getAttributeNode("zoomcentercursor"))this.K.re=
1==f.nodeValue;if(f=y.getAttributeNode("locked"))this.K.pc=1==f.nodeValue;f&&(this.K.di=1==f.nodeValue);if(f=y.getAttributeNode("lockedmouse"))this.K.pc=1==f.nodeValue;if(f=y.getAttributeNode("lockedkeyboard"))this.K.di=1==f.nodeValue;if(f=y.getAttributeNode("lockedkeyboardzoom"))this.K.eu=1==f.nodeValue;if(f=y.getAttributeNode("lockedwheel"))this.K.Oe=1==f.nodeValue;if(f=y.getAttributeNode("invertwheel"))this.K.Up=1==f.nodeValue;if(f=y.getAttributeNode("speedwheel"))this.K.nn=1*f.nodeValue;if(f=
y.getAttributeNode("invertcontrol"))this.K.lc=1==f.nodeValue;if(f=y.getAttributeNode("sensitivity"))this.K.sensitivity=1*f.nodeValue,1>this.K.sensitivity&&(this.K.sensitivity=1);if(f=y.getAttributeNode("dblclickfullscreen"))this.K.Dl=1==f.nodeValue;if(f=y.getAttributeNode("contextfullscreen"))this.K.ul=1==f.nodeValue;if(f=y.getAttributeNode("contextvr"))this.K.vl=1==f.nodeValue;if(f=y.getAttributeNode("contextprojections"))this.K.to=1==f.nodeValue;if(f=y.getAttributeNode("hideabout"))this.K.Hj=1==
f.nodeValue;for(z=y.firstChild;z;)"menulink"==z.nodeName&&(cb={text:"",url:""},f=z.getAttributeNode("text"),cb.text=f.nodeValue,f=z.getAttributeNode("url"),cb.url=f.nodeValue,this.ck.push(cb)),z=z.nextSibling}if("vr"==y.nodeName&&this.Ed){if(f=y.getAttributeNode("toggleskinbutton"))this.ja.Go=1==f.nodeValue;if(f=y.getAttributeNode("skinbuttonposition"))this.ja.Bk=f.nodeValue;if(f=y.getAttributeNode("defaulthsscale"))this.ja.Fl=1*f.nodeValue/100}if("transition"==y.nodeName&&this.Ed){if(f=y.getAttributeNode("enabled"))this.F.enabled=
1==f.nodeValue;if(f=y.getAttributeNode("blendtime"))this.F.rf=1*f.nodeValue;if(f=y.getAttributeNode("blendcolor"))this.F.eg=f.nodeValue.toString();if(f=y.getAttributeNode("type"))this.F.type=f.nodeValue.toString();if(f=y.getAttributeNode("delay"))this.F.delay=f.nodeValue.toString();if(f=y.getAttributeNode("softedge"))this.F.dd=1*f.nodeValue;if(f=y.getAttributeNode("zoomin"))this.F.da=1*f.nodeValue;if(f=y.getAttributeNode("zoomout"))this.F.Vc=1*f.nodeValue;if(f=y.getAttributeNode("zoomfov"))this.F.$k=
1*f.nodeValue;if(f=y.getAttributeNode("zoomafterinfov"))this.F.Yk=1*f.nodeValue;if(f=y.getAttributeNode("zoomafteroutfov"))this.F.Zk=1*f.nodeValue;if(f=y.getAttributeNode("zoomspeed"))this.F.ph=1*f.nodeValue;if(f=y.getAttributeNode("zoomoutpause"))this.F.oh=1==f.nodeValue;"cut"==this.F.type&&(this.F.rf=0);"mesh"==this.F.type&&(this.F.Vc=0)}if("soundstransition"==y.nodeName){if(f=y.getAttributeNode("enabled"))this.bb.enabled=1==f.nodeValue;if(f=y.getAttributeNode("transitiontime"))this.bb.Kb=1*f.nodeValue;
if(f=y.getAttributeNode("crossfade"))this.bb.zo=1==f.nodeValue}if("flyintransition"==y.nodeName){if(f=y.getAttributeNode("enabled"))this.Da.enabled=1==f.nodeValue&&this.pa;if(f=y.getAttributeNode("speed"))this.Da.speed=1*f.nodeValue}"userdata"==y.nodeName&&(this.userdata=this.ag=this.qg(y),this.df.hasOwnProperty(h)||(this.df[h]=this.ag),this.Oc[a.id]||(this.Oc[a.id]=this.Io(y),this.Cg[a.id]=this.Jo(y),this.bg[a.id]=this.Ko(y)));"projectuserdata"==y.nodeName&&(this.df._master=this.qg(y));"customproperty"==
y.nodeName&&this.Ho(y);if("translations"==y.nodeName)for((f=y.getAttributeNode("json"))&&this.qh(f.nodeValue.toString()),this.rm||this.en(window.navigator.language),z=y.firstChild;z;){"json"==z.nodeName&&this.qh(z.textContent);if("projecttranslation"==z.nodeName){cb={};if(f=z.getAttributeNode("langcode"))cb.langCode=f.nodeValue;if(f=z.getAttributeNode("langname"))cb.langName=f.nodeValue;this.Km.push(cb)}z=z.nextSibling}if("hotspots"==y.nodeName){if(f=y.getAttributeNode("smoothmovement"))this.nr=1==
f.nodeValue;z=y.firstChild;for(this.P.count=0;z;){if("label"==z.nodeName&&this.Ed){cb=this.P.Ik;if(f=z.getAttributeNode("enabled"))cb.enabled=1==f.nodeValue;if(f=z.getAttributeNode("width"))cb.width=1*f.nodeValue;if(f=z.getAttributeNode("height"))cb.height=1*f.nodeValue;if(f=z.getAttributeNode("textcolor"))cb.Jk=1*f.nodeValue;if(f=z.getAttributeNode("textalpha"))cb.Hk=1*f.nodeValue;if(f=z.getAttributeNode("background"))cb.background=1==f.nodeValue;if(f=z.getAttributeNode("backgroundalpha"))cb.dc=
1*f.nodeValue;if(f=z.getAttributeNode("backgroundcolor"))cb.ec=1*f.nodeValue;if(f=z.getAttributeNode("border"))cb.ij=1*f.nodeValue;if(f=z.getAttributeNode("bordercolor"))cb.hc=1*f.nodeValue;if(f=z.getAttributeNode("borderalpha"))cb.fc=1*f.nodeValue;if(f=z.getAttributeNode("borderradius"))cb.jl=1*f.nodeValue;if(f=z.getAttributeNode("wordwrap"))cb.dj=1==f.nodeValue}if("polystyle"==z.nodeName&&this.Ed){if(f=z.getAttributeNode("mode"))this.P.mode=1*f.nodeValue;if(f=z.getAttributeNode("bordercolor"))this.P.hc=
1*f.nodeValue;if(f=z.getAttributeNode("backgroundcolor"))this.P.ec=1*f.nodeValue;if(f=z.getAttributeNode("borderalpha"))this.P.fc=1*f.nodeValue;if(f=z.getAttributeNode("backgroundalpha"))this.P.dc=1*f.nodeValue;if(f=z.getAttributeNode("handcursor"))this.P.Ie=1==f.nodeValue}"hotspot"==z.nodeName&&(f=new Rb(this),f.type="point",f.wb(z),this.L.push(f),this.Jl(a.id,z));"polyhotspot"==z.nodeName&&(f=new Rb(this),f.type="poly",f.wb(z),this.L.push(f),this.P.count++,this.Jl(a.id,z));z=z.nextSibling}}if("sounds"==
y.nodeName||"media"==y.nodeName)for(f=y.firstChild;f;){if("sound"==f.nodeName&&!this.ym)for(z=new Bb(this),z.wb(f),z.addElement(),cb=0;cb<this.Vf.length;cb++)z.id==this.Vf[cb].id&&(this.Vf.splice(cb,1),cb--);"video"==f.nodeName&&(z=new Qb(this),z.wb(f),z.addElement());"image"==f.nodeName&&(z=new id(this),z.wb(f),z.addElement());"webelement"==f.nodeName&&(z=new jd(this),z.wb(f),z.addElement());"lensflare"==f.nodeName&&this.Nc&&(z=new kd(this),z.wb(f),this.Nc.ci.push(z));f=f.nextSibling}y=y.nextSibling}this.A.Id=
0;for(a=0;a<this.Vf.length;a++){w=this.Vf[a];if(this.ga&&this.bb.enabled&&this.isPlaying(w.id))this.bb.Xi.push(w);else{try{w.ta?w.fg():w.j.pause()}catch(db){}w.Ue()}this.X.splice(this.X.indexOf(w),1)}(1!=this.F.da&&2!=this.F.da&&6!=this.F.da&&7!=this.F.da||"mesh"==this.F.type)&&this.Mo();this.qe||(this.ob.Ai=!0);b&&("object"===typeof b&&null!==b?(b.hasOwnProperty("pan")&&this.Md(Number(b.pan)),b.hasOwnProperty("tilt")&&this.Nd(Number(b.tilt)),b.hasOwnProperty("projection")&&this.ab(Number(b.projection)),
b.hasOwnProperty("fov")&&this.Jb(Number(b.fov))):""!=b&&(b=b.toString().split("/"),4<b.length&&this.ab(Number(b[4])),0<b.length&&(f=String(b[0]),"N"==f.charAt(0)?this.Di(Number(f.substring(1))):"S"==f.charAt(0)?this.Di(-180+Number(f.substring(1))):this.Md(Number(f))),1<b.length&&this.Nd(Number(b[1])),2<b.length&&this.Jb(Number(b[2]))),e.pan.open=e.pan.m,this.Da.Dd.pan=e.pan.m,this.Da.Dd.u=e.u.m,this.Da.Dd.fov=e.fov.m,this.Da.Dd.rb=this.Z(),this.Da.Dd.Vr=!0);if(r){f=r.getAttributeNode("stereo");this.oc=
!1;f&&1==f.nodeValue&&(this.oc=!0);f=r.getAttributeNode("fliplr");this.Wf=!1;f&&1==f.nodeValue&&(this.Wf=!0);for(b=0;b<(this.oc?12:6);b++)(f=r.getAttributeNode("tile"+b+"url"))&&(this.zh[b]=String(f.nodeValue));for(b=0;6>b;b++)(f=r.getAttributeNode("prev"+b+"url"))&&(this.Ah[b]=String(f.nodeValue));if(f=r.getAttributeNode("tilevrurl"))this.Al=String(f.nodeValue);if(f=r.getAttributeNode("tilesize"))this.af=1*f.nodeValue;f=r.getAttributeNode("canvassize");if(f=r.getAttributeNode("tilescale"))this.bh=
1*f.nodeValue;if(f=r.getAttributeNode("leveltileurl"))x.vm=f.nodeValue;if(f=r.getAttributeNode("leveltilesize"))x.W=Number(f.nodeValue);if(f=r.getAttributeNode("levelbias"))x.fq=Number(f.nodeValue);if(f=r.getAttributeNode("levelbiashidpi"))x.gq=Number(f.nodeValue);f=r.getAttributeNode("overlap");e.qb.Y=0;e.qb.pitch=0;f&&(x.hb=Number(f.nodeValue));if(f=r.getAttributeNode("levelingroll"))e.qb.Y=Number(f.nodeValue);if(f=r.getAttributeNode("levelingpitch"))e.qb.pitch=Number(f.nodeValue);this.cd=0;(f=
r.getAttributeNode("flat"))&&1==f.nodeValue&&(this.cd=2);e.cd=this.cd;f=r.getAttributeNode("width");x.width=1*(f?f.nodeValue:1);f=r.getAttributeNode("height");x.height=1*(f?f.nodeValue:x.width);this.B.src=[];x.levels=[];for(r=r.firstChild;r;){if("preview"==r.nodeName){if(f=r.getAttributeNode("color"))x.kk=f.nodeValue;if(f=r.getAttributeNode("strip"))x.Fq=1==f.nodeValue}if("video"==r.nodeName){this.B.format=1;this.oc=!1;if(f=r.getAttributeNode("format"))"3x2"==f.nodeValue&&(this.B.format=14),"video3x2"==
f.nodeValue&&(this.B.format=14),"equirectangular"==f.nodeValue&&(this.B.format=1),"vr180"==f.nodeValue&&(this.B.format=15),"vr180stereo"==f.nodeValue&&(this.B.format=15,this.oc=!0);if(f=r.getAttributeNode("flipy"))this.B.flipY=Number(f.nodeValue);if(f=r.getAttributeNode("startonload"))this.B.Ek=1==f.nodeValue;if(f=r.getAttributeNode("startmutedmobile"))this.B.Dk=1==f.nodeValue;if(f=r.getAttributeNode("level"))this.B.level=Number(f.nodeValue);if(f=r.getAttributeNode("bleed"))this.B.qf=Number(f.nodeValue);
if(f=r.getAttributeNode("endaction"))this.B.Be=String(f.nodeValue);if(f=r.getAttributeNode("targetview"))this.B.Gk=String(f.nodeValue);if(f=r.getAttributeNode("width"))this.B.width=Number(f.nodeValue);if(f=r.getAttributeNode("height"))this.B.height=Number(f.nodeValue);for(b=r.firstChild;b;)"source"==b.nodeName&&(f=b.getAttributeNode("url"))&&this.B.src.push(f.nodeValue.toString()),b=b.nextSibling}if("level"==r.nodeName){b=new Vb;f=r.getAttributeNode("width");b.width=1*(f?f.nodeValue:1);f=r.getAttributeNode("height");
b.height=1*(f?f.nodeValue:b.width);if(f=r.getAttributeNode("preload"))b.cache=1==f.nodeValue;if(f=r.getAttributeNode("preview"))b.Kg=1==f.nodeValue;b.$=Math.floor((b.width+x.W-1)/x.W);b.sa=Math.floor((b.height+x.W-1)/x.W);x.levels.push(b)}r=r.nextSibling}x.um=x.levels.length}this.fe=!0;this.jh&&(this.pa=this.ih=!1,this.Gc||(this.Gc=document.createElement("canvas"),this.Gc.width=100,this.Gc.height=100,this.Gc.id="dummycanvas",this.ia.appendChild(this.Gc)),this.xd());this.pa&&this.N&&this.fa.forEach(db=>
{db.Rp(this.bh);db.Tp()});let ab=this;0<x.levels.length&&x.Fq&&0==this.cd&&(r=new Image,b=new Vb,b.Kg=!0,b.cache=!0,b.$=b.sa=0,b.height=b.width=0,x.levels.push(b),r.crossOrigin=this.crossOrigin,r.onload=e.Gg.mu(r),r.setAttribute("src",e.ah(6,x.um-1,0,0)));0<this.B.src.length&&this.pa&&(this.aj?(x=this.B.j=document.createElement("video"),x.crossOrigin=this.crossOrigin,x.setAttribute("style","display:none; max-width:none;"),x.setAttribute("playsinline","playsinline"),x.preload="metadata",x.volume=this.ea*
this.B.level,this.T.appendChild(x),this.B.Mc=!1,this.B.zn=!1,this.B.j.oncanplay=function(){if(!ab.B.Mc){ab.B.Bg=!0;let db,gb,bb,fb,ib,hb,mb=[],ob=new lb,jb=ab.N,sb=ab.B.j.videoWidth/3;ab.B.width=ab.B.j.videoWidth;ab.B.height=ab.B.j.videoHeight;for(db=0;6>db;db++)for(bb=db%3*sb+ab.B.qf,ib=bb+sb-2*ab.B.qf,hb=4,3>db&&(hb+=sb),fb=hb+sb-2*ab.B.qf,gb=0;4>gb;gb++){ob.x=-1;ob.y=-1;ob.z=1;for(let vb=0;vb<gb;vb++)ob.Qq();mb.push((0<ob.x?bb:ib)/(3*sb),(0<ob.y?fb:hb)/(2*sb))}jb.bindBuffer(jb.ARRAY_BUFFER,ab.B.Ti);
jb.bufferData(jb.ARRAY_BUFFER,new Float32Array(mb),jb.STATIC_DRAW);ab.F.ed&&"videopano"==ab.F.delay&&ab.Fk(null)}},this.B.kb=function(){let db=ab.Xa("_videopanorama");return 0<db.length&&db[0].kb?db[0].kb:0},this.B.an=function(db){let gb=ab.Xa("_videopanorama");0<gb.length&&(gb[0].kb=db)},this.B.loop=function(){return 0<ab.B.kb()?(ab.B.an(ab.B.kb()-1),ab.B.j.play(),!0):!1},"exit"==this.B.Be?this.B.j.onended=function(){ab.B.Bg=!1;ab.B.Mc=!1;ab.T.removeChild(ab.B.j);ab.B.j=null;ab.update()}:"stop"==
this.B.Be?ab.B.j.onended=function(){ab.B.loop()||ab.update()}:"{"==this.B.Be.charAt(0)?this.B.j.onended=function(){ab.Rc(ab.B.Be,ab.B.Gk)}:this.B.j.loop=!0,this.Wn(x,this.B.src),x=this.Xa("_videopanorama"),0<x.length?x[0].j=this.B.j:this.Hq("_videopanorama",this.B.j),this.B.Ek&&(x=!1,this.xc&&(this.B.Dk?this.B.j.muted=!0:x=!0),x||(x=this.B.j.play(),void 0!==x&&x.then(()=>{}).catch(()=>{this.B.Dk&&(this.B.j.muted=!0,this.B.j.play())})))):"{"==this.B.Be.charAt(0)&&ab.Rc(ab.B.Be,ab.B.Gk));this.ss(h);
this.Vn();this.F.Pd||this.pn();this.update();this.Ed&&(this.Ed=!1,this.G("viewerinit",{}),this.aa&&this.aa.ggViewerInit&&this.aa.ggViewerInit(),this.Da.enabled&&0==this.cd&&this.pa&&(this.ab(9),e.pan.m=e.Zc.pan,e.u.m=e.Zc.u,e.fov.m=e.Zc.fov,this.ab(e.Zc.rb),this.S=this.Ql(!1),this.F.Vd=this.A.$f,e.pan.m=this.Wb(0,0).value,e.u.m=this.Wb(0,1).value,e.fov.m=this.Wb(0,2).value,e=this.Wb(0,3).value,3==e&&this.ab(e),this.vc=this.S.fb,this.vk(!0),this.A.active=!1,this.A.Ih=!0));this.xd();this.G("changenodeid",
n)}Lp(){return Nb()&&Nb().hasOwnProperty("isSupported")}Wn(a,b,e){if(1<=b.length){var f=this.La(this.Ja(b[0]));if(this.Lp()&&0<f.indexOf(".m3u8")&&!a.canPlayType("application/vnd.apple.mpegurl")&&Nb().isSupported())b=new (Nb()),b.attachMedia(a),b.loadSource(f),e&&e.$i.push(f);else for(f=0;f<b.length;f++){let h=this.La(this.Ja(b[f])),n=document.createElement("source");n.setAttribute("src",h);a.appendChild(n);e&&e.$i.push(h)}}}hk(a,b){0<a.length&&(".xml"==a.slice(-4)||".swf"==a.slice(-4)||"{"==a.charAt(0)?
this.Rc(this.La(a),b):window.open(this.La(a),b))}Kv(){this.fe=this.isLoaded=!1;this.checkLoaded=this.ld=[];this.oi=0;this.aa&&this.aa.ggReLoaded&&this.aa.ggReLoaded();this.G("beforechangenode",{})}Mt(a){let b="";0<this.zm.length&&(b=this.zm.pop());""!=b&&(this.cm=!0);this.Rc("{"+b+"}",a)}Rc(a,b){var e=this.D;if(""!=a&&"{}"!=a){this.Kv();this.Ol&&!this.jh&&(this.Hf(0),this.xd());this.ka&&this.ka.hotspotProxyOut&&this.ka.hotspotProxyOut(this.O.id,this.O.url);this.G("hsproxyout",{id:this.O.id,url:this.O.url});
".swf"==a.substring(a.length-4)&&(a=a.substring(0,a.length-4)+".xml");var f="",h=null;"object"===typeof b&&null!==b?h=b:b&&(f=b.toString());b="/"+e.u.m+"/"+e.fov.m+"//"+e.Z();f=f.replace("$cur",e.pan.m+b);f=f.replace("$(cur)",e.pan.m+b);f=f.replace("$fwd","N"+e.de()+b);f=f.replace("$(fwd)","N"+e.de()+b);f=f.replace("$bwd","S"+e.de()+b);f=f.replace("$(bwd)","S"+e.de()+b);f=f.replace("$ap",String(e.pan.m));f=f.replace("$(ap)",String(e.pan.m));f=f.replace("$an",String(e.de()));f=f.replace("$(an)",String(e.de()));
f=f.replace("$at",String(e.u.m));f=f.replace("$(at)",String(e.u.m));f=f.replace("$af",String(e.fov.m));f=f.replace("$(af)",String(e.fov.m));f=f.replace("$ar",String(e.Z()));f=f.replace("$(ar)",String(e.Z()));""!=f&&(e=f.split("/"),3<e.length&&""!=e[3]&&(this.startNode=e[3]));f=null!==h?h:f;this.ra(!1);if("{"==a.charAt(0)){h=a.substring(1,a.length-1);if(this.ua==h&&this.xh){this.fe=this.isLoaded=!0;return}(a=this.xe[h])&&(h=a);a=this.F;if(this.cf[h]){this.xh=!0;this.F.enabled&&this.pa&&(a.jr=!0,"mesh"==
a.type?(e=this.fa[0],this.fa[0]=this.fa[1],this.fa[1]=e,this.D=this.fa[0].D):this.F.Pb&&a.setup());e=new Gb;e.pan=this.ce();a.vd&&1<this.fa.length&&this.fa[1]&&this.fa[1].D&&(e.pan=this.fa[1].D.pan.m);let n=b=!0;7==this.F.da&&(n=!1);6==this.F.da&&(n=b=!1);if(this.O){"point"==this.O.type&&(b&&(e.pan=this.O.pan),n&&(e.u=this.O.u));if("poly"==this.O.type){let r=this.Gd();b&&(e.pan=-r.pan);n&&(e.u=r.tilt)}if(b=this.yf(this.pd(),this.O.id,"__mesh_pan"))e.pan=parseFloat(b);if(b=this.yf(this.pd(),this.O.id,
"__mesh_tilt"))e.u=parseFloat(b)}this.Nm(this.cf[h],f);a.enabled&&this.pa&&(a.Ou(),"mesh"==a.type&&(f=this.fa[0].D,h=this.fa[1].D,a.Wg.pan=f.pan.m,a.Wg.u=h.u.m,a.Wg.fov=h.fov.m,a.ng.pan=f.pan.m,a.ng.u=f.u.m,a.ng.fov=f.fov.m,f.fov.m=h.fov.m,f.u.m=h.u.m,h.ab(f.Z()),a.offset=h.pan.m-f.pan.m,a.Bv(e)));a.jr=!1;this.qe&&this.ja.ej();this.F.Pd||this.F.vd||this.F.ed||(this.ha&&this.xl(),this.xh=!1)}else{this.Yb("invalid node id: "+h);return}}else this.Gq(a,null,f);this.G("changenode",{});this.update(5)}}qp(){if(this.fe){if(this.qd)return this.cb.slice(0);
let a=[];a.push(this.ua);return a}return[]}qg(a){var b;let e;e={title:"",description:"",author:"",datetime:"",copyright:"",source:"",information:"",comment:"",latitude:0,longitude:0,altitude:-1E4,heading:0,customnodeid:"",streetviewlink:"",tags:[]};if(a&&((b=a.getAttributeNode("title"))&&(e.title=b.nodeValue.toString()),(b=a.getAttributeNode("description"))&&(e.description=b.nodeValue.toString()),(b=a.getAttributeNode("author"))&&(e.author=b.nodeValue.toString()),(b=a.getAttributeNode("datetime"))&&
(e.datetime=b.nodeValue.toString()),(b=a.getAttributeNode("copyright"))&&(e.copyright=b.nodeValue.toString()),(b=a.getAttributeNode("source"))&&(e.source=b.nodeValue.toString()),(b=a.getAttributeNode("info"))&&(e.information=b.nodeValue.toString()),(b=a.getAttributeNode("comment"))&&(e.comment=b.nodeValue.toString()),(b=a.getAttributeNode("latitude"))&&(e.latitude=Number(b.nodeValue)),(b=a.getAttributeNode("longitude"))&&(e.longitude=Number(b.nodeValue)),(b=a.getAttributeNode("nodeid"))&&(e.nodeid=
b.nodeValue.toString()),(b=a.getAttributeNode("altitude"))&&(e.altitude=Number(b.nodeValue)),(b=a.getAttributeNode("heading"))&&(e.heading=Number(b.nodeValue)),(b=a.getAttributeNode("customnodeid"))&&(e.customnodeid=b.nodeValue.toString()),(b=a.getAttributeNode("streetviewlink"))&&(e.streetviewlink=b.nodeValue.toString()),b=a.getAttributeNode("tags"))){a=b.nodeValue.toString().split("|");for(b=0;b<a.length;b++)""==a[b]&&(a.splice(b,1),b--);e.tags=a}return e}Ks(a){let b="",e=a.firstChild;for(;e;){if("sequence"==
e.nodeName){if(a=e.getAttributeNode("title"))b=a.nodeValue;let f=[],h=e.firstChild;for(;h;){if("sequenceelement"==h.nodeName){let n={};if(a=h.getAttributeNode("index"))n.index=a.nodeValue;if(a=h.getAttributeNode("nodeid"))n.nodeid=a.nodeValue;if(a=h.getAttributeNode("cliptitle"))n.cliptitle=a.nodeValue;if(a=h.getAttributeNode("startview"))n.startview=a.nodeValue;f.push(n)}h=h.nextSibling}this.ao[b]=f}e=e.nextSibling}}Io(a){let b={},e=a.firstChild;for(;e;){if("mapcoords"==e.nodeName){let 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}Jo(a){let b={},e=a.firstChild;for(;e;){if("mapcoords"==e.nodeName){let 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}Oh(a){return a?this.df[a]?
this.df[a]:this.qg():this.ag}qt(a,b){""!==a||this.qd||(a="node1");a||(a=this.ua);return this.Cp(a,b)}ev(a,b,e){""!==a||this.qd||(a="node1");a||(a=this.ua);this.dr(a,b,e)}Xl(a){a=this.Oh(a);let b=[];""!=a.latitude&&0!=a.latitude&&0!=a.longitude&&(b.push(a.latitude),b.push(a.longitude));return b}rp(a){let b=[];for(let e=0;e<this.cb.length;e++){let f=this.cb[e],h=this.Oh(f);h&&h.tags.includes(a)&&b.push(f)}return b}pt(a){return this.Oh(a).title}lt(a,b){var e=-1;a=this.Xl(a);b=this.Xl(b);if(2==a.length&&
2==b.length){e=Math.PI/180*(b[0]-a[0]);let 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}Wb(a,b,e){let f;for(f=0;f<this.S.Ia.length;f++){let h=this.S.Ia[f];if(h.time==a&&h.sb==b&&(!e||h.yd==e))return h}return!1}yj(a,b){let e;for(e=0;e<b.Ia.length;e++)if(0==b.Ia[e].time&&b.Ia[e].sb==a)return b.Ia[e];return!1}wp(a,b,e){for(a=Math.floor(a);!this.Wb(a,
b,e)&&0<a;)a--;return a}op(a){let b,e=1E5,f=a,h=!1;for(b=0;b<this.S.Ia.length;b++){let n=this.S.Ia[b];n.sb==a.sb&&n.yd==a.yd&&n.time>a.time&&n.time<e&&(f=this.S.Ia[b],e=f.time,h=!0)}return h?f:!1}Qs(a){let b=[];for(let e=0;e<this.S.Ia.length;e++){let f=this.S.Ia[e];if(f.time<=a&&4==f.sb){let h=!1;for(let n=0;n<b.length;n++)if(b[n].yd==this.S.Ia[e].yd){b[n].time<f.time?b.splice(n,1):h=!0;break}h||b.push(f)}}return b}Yo(a,b,e){var f=new tb(a.time,a.value);let h=new tb(b.time,b.value);var n=(e-a.time)/
(b.time-a.time);if(0!=a.type||0!=b.type&&3!=b.type)if(3==a.type)f=a.value;else{n=new tb;let r=new tb,w=b.time-a.time;0==a.type?r.init(a.time+.3*w,a.value):r.init(a.nf,a.pf);0==b.type||3==b.type?n.init(b.time-.3*w,b.value):n.init(b.lf,b.mf);a=new tb;a.il(f,h,r,n,e);f=a.y}else e=new tb,e.he(f,h,n),f=e.y;return f}Ql(a,b,e,f){const h=this.D;for(var n=0;n<this.za.length;n++)if(this.za[n].fb&&0==this.za[n].fb.indexOf("__FlyIn"))return this.za[n];n=new Ub;n.fb="__FlyIn";n.$e=h.pan.m;n.Oi=h.u.m;n.me=h.fov.m;
n.Ni=this.Z();n.ne=this.Ph();a?(n.lg=!1,n.uf=!1,n.speed=this.F.ph,n.Od=b,n.oe=e,n.$g=f):(n.lg=!0,n.uf=!0,n.speed=this.Da.speed,this.Da.Dd.Vr?(n.Od=this.Da.Dd.pan,n.oe=this.Da.Dd.u,n.$g=this.Da.Dd.fov,n.ne=this.Da.Dd.rb):(n.Od=h.pan.Va,n.oe=h.u.Va,n.$g=h.fov.Va));return this.Vo(n)}Vo(a){var b=this.D;let e=new Tb;e.fb=a.fb;e.hf="";e.Ia=[];let f=a.Ni!=a.ne&&-1!=a.ne;for(;-180>a.Od;)a.Od+=360;for(;180<a.Od;)a.Od-=360;let h=a.Od-a.$e;if(360==b.pan.max-b.pan.min&&!this.Qa()){for(;-180>h;)h+=360;for(;180<
h;)h-=360}b=a.oe-a.Oi;let n=a.$g-a.me,r=Math.round(Math.sqrt(h*h+b*b+n*n)/a.speed*.33);f&&(r=Math.max(10,r));e.length=r;let w,x;a.vf&&(w=Math.ceil(.7*r),w=Math.min(15,w),w=Math.max(5,w),e.length=r+w,x=.33*w);let y=a.$g,z=r,cb=0,ab=r-1;if(f){var db=a.me;var gb=4==a.ne?120:this.Mh(a.ne);n=y-a.me;var bb=new tb(0,a.me);let fb=new tb(r,y),ib=new tb,hb=new tb;hb.init(r/3,a.me+n/3);ib.init(2*r/3,y-n/3);if(db>gb)for(;cb<=r&&db>gb;)db=new tb,db.il(bb,fb,hb,ib,cb),db=db.y,cb++;else cb=1;cb>=.8*r&&(z=cb=Math.round(.8*
r));0==cb&&(cb=1);gb=4==a.Ni?120:this.Mh(a.Ni);db=a.$g;if(db>gb)for(;ab>cb&&db>gb;)db=new tb,db.il(bb,fb,hb,ib,ab),db=db.y,ab--}bb=new Ab;bb.time=0;bb.sb=0;bb.value=a.$e;bb.type=1;bb.nf=r/3;bb.pf=a.lg?a.$e:a.$e+h/3;e.Ia.push(bb);bb=new Ab;bb.time=0;bb.sb=1;bb.value=a.Oi;bb.type=1;bb.nf=r/3;bb.pf=a.lg?a.Oi:a.Oi+b/3;e.Ia.push(bb);bb=new Ab;bb.time=0;bb.sb=2;bb.value=a.me;bb.type=1;bb.nf=r/3;bb.pf=a.lg?a.me:a.me+n/3;e.Ia.push(bb);bb=new Ab;bb.time=0;bb.sb=3;bb.value=a.Ni;bb.type=0;bb.Kb=0;e.Ia.push(bb);
f&&(bb=new Ab,bb.time=cb,bb.sb=3,bb.value=a.ne,bb.type=0,bb.Kb=ab-cb,e.Ia.push(bb));bb=new Ab;bb.time=r;bb.sb=0;bb.value=a.$e+h;bb.type=1;bb.lf=2*r/3;bb.mf=a.uf&&!a.vf?bb.value:bb.value-h/3;a.vf&&(bb.nf=r+x,bb.pf=bb.value+x/r*h);e.Ia.push(bb);bb=new Ab;bb.time=r;bb.sb=1;bb.value=a.oe;bb.type=1;bb.lf=2*r/3;bb.mf=a.uf&&!a.vf?a.oe:a.oe-b/3;a.vf&&(bb.nf=r+x,bb.pf=bb.value+x/r*b);e.Ia.push(bb);bb=new Ab;bb.time=z;bb.sb=2;bb.value=y;bb.type=1;bb.lf=2*z/3;bb.mf=a.uf?y:y-n/3;e.Ia.push(bb);a.vf&&(bb=new Ab,
bb.time=r+w,bb.sb=0,bb.value=a.$e+h,bb.type=1,bb.lf=r+w-x,bb.mf=a.$e+h,e.Ia.push(bb),bb=new Ab,bb.time=r+w,bb.sb=1,bb.value=a.oe,bb.type=1,bb.lf=r+w-x,bb.mf=a.oe,e.Ia.push(bb));this.za.push(e);return e}kw(){this.B.j&&this.B.j.play()}lw(){this.B.j&&(this.B.j.pause(),this.B.j.currentTime=0)}jw(){this.B.j&&this.B.j.pause()}yv(a){this.B.j&&(0>a&&(a=0),a>this.B.j.duration&&(a=this.B.j.duration-.1),this.B.j.currentTime=a,this.update())}Ht(){return this.B.j?this.B.j.currentTime:0}Gt(){if(this.B.j)return this.B.j}xv(a){const b=
this.B.j;if(b){let e=!this.B.j.paused&&!this.B.j.ended,f=this.B.j.currentTime;b.pause();b.src=isNaN(parseInt(a,10))?String(a):this.B.src[parseInt(a,10)];e&&(this.B.j.onloadedmetadata=function(){b.currentTime=f;b.play();b.onloadedmetadata=null});this.B.j.currentTime=f}}Eo(){this.ym=!0}yf(a,b,e){""!==a||this.qd||(a="node1");a||(a=this.ua);return super.yf(a,b,e)}Ci(a,b,e,f){""!==a||this.qd||(a="node1");a||(a=this.ua);return super.Ci(a,b,e,f)}tp(){let a={};var b=this.D;a.currentNode=this.pd();a.position=
{pan:b.pan.m,tilt:b.u.m,fov:b.fov.m,projection:this.Z()};b=a.variables={};for(var e of Object.keys(this.xb))this.xb[e].Qp||"undefined"!==this.Zl(e)&&((b[e]={}).value=this.Zl(e));e=a.hsprops={};for(var f of Object.keys(this.pb)){b=e[f]={};for(var h of Object.keys(this.pb[f])){let r=b[h]={};for(var n of Object.keys(this.pb[f][h]))r[n]=this.yf(f,h,n)}}f=a.polyhotspots=[];for(h=0;h<this.L.length;h++)"poly"==this.L[h].type&&(n=this.L[h],e={},e.id=n.id,e.bordercolor=n.hc,e.borderalpha=n.fc,e.backgroundcolor=
n.ec,e.backgroundalpha=n.dc,f.push(e));return a}cr(a){var b=this.D;if(a.hasOwnProperty("position")){var e=a.position;b.pan.m=e.pan;b.u.m=e.tilt;b.fov.m=e.fov;this.ab(e.projection)}for(const r of Object.keys(a.variables))this.Ye(r,a.variables[r].value);for(var f of Object.keys(a.hsprops)){b=a.hsprops[f];for(var h of Object.keys(b)){e=b[h];for(var n of Object.keys(e))this.Ci(f,h,n,e[n])}}for(f=0;f<a.polyhotspots.length;f++)for(n=a.polyhotspots[f],h=0;h<this.L.length;h++)"poly"==this.L[h].type&&this.L[h].id==
n.id&&(this.L[h].hc=n.bordercolor,this.L[h].fc=n.borderalpha,this.L[h].dc=n.backgroundalpha,this.L[h].ec=n.backgroundcolor);return this.Ha=!0}}window.ggHasHtml5Css3D=pb;window.ggHasWebGL=qb;window.THREE=eb;window.pano2vrPlayer=Eb;let t=Eb.prototype;t._=t.Ja;t.setContainer=t.Vq;t.setLanguage=t.en;t.getLanguage=t.dt;t.addTranslations=t.qh;t.getProjectTranslations=t.wt;t.getVersion=t.$l;t.readConfigString=t.Om;t.readConfigUrl=t.Gq;t.readConfigUrlAsync=t.Qu;t.readConfigXml=t.Pm;t.openUrl=t.hk;t.openNext=
t.Rc;t.goBack=t.Mt;t.setMargins=t.dv;t.addListener=t.addListener;t.on=t.addListener;t.removeEventListener=t.removeEventListener;t.off=t.removeEventListener;t.detectBrowser=t.Do;t.initWebGL=t.Hf;t.getPercentLoaded=t.tt;t.setBasePath=t.Zu;t.getBasePath=t.$o;t.setViewerSize=t.Ji;t.getViewerSize=t.Jt;t.updateViewerSizeNow=t.xd;t.setSkinObject=t.ov;t.changeViewMode=t.no;t.getViewMode=t.Ep;t.changePolygonMode=t.mo;t.setPolygonMode=t.mo;t.getPolygonMode=t.vp;t.showOnePolyHotspot=t.lr;t.hideOnePolyHotspot=
t.Np;t.changePolyHotspotColor=t.ws;t.setPolyHotspotHandcursor=t.gv;t.toggleOnePolyHotspot=t.Rv;t.changeViewState=t.oo;t.getViewState=t.Fp;t.setRenderFlags=t.jv;t.getRenderFlags=t.xt;t.setMaxTileCount=t.ar;t.updatePanorama=t.Zi;t.isTouching=t.pm;t.getIsMobile=t.Vl;t.setIsMobile=t.cv;t.getHasTouch=t.fp;t.getIsTour=t.ct;t.getNodesCount=t.rt;t.getIsAutorotating=t.$s;t.getIsLoading=t.ip;t.getIsLoaded=t.Nh;t.getIsTileLoading=t.Wl;t.getLastActivity=t.et;t.getPan=t.ce;t.getPanNorth=t.de;t.getPanDest=t.sp;
t.getPanN=t.zj;t.setPan=t.Md;t.setPanNorth=t.Di;t.changePan=t.vh;t.changePanLog=t.ol;t.getTilt=t.Af;t.getTiltDest=t.Dp;t.setTilt=t.Nd;t.changeTilt=t.wh;t.changeTiltLog=t.ql;t.getFov=t.Fd;t.getFovDest=t.Ws;t.setFov=t.Jb;t.setFovMode=t.cn;t.changeFov=t.uh;t.changeFovLog=t.jj;t.getVFov=t.Db;t.setVFov=t.Hi;t.getHFov=t.Tl;t.setHFov=t.dn;t.getDFov=t.Sl;t.setDFov=t.bn;t.getRoll=t.Cj;t.setRoll=t.Rg;t.setPanTilt=t.zk;t.setPanTiltFov=t.Qg;t.setDefaultView=t.tk;t.getViewerLimits=t.It;t.setViewerLimits=t.zv;
t.setLocked=t.setLocked;t.setLockedMouse=t.Zq;t.setLockedKeyboard=t.Yq;t.getLockedKeyboard=t.gt;t.setLockedWheel=t.$q;t.moveTo=t.moveTo;t.moveToEx=t.ki;t.moveToDefaultView=t.lq;t.moveToDefaultViewEx=t.mq;t.addHotspotElements=t.Vn;t.playSound=t.Ld;t.playPauseSound=t.Gm;t.playStopSound=t.Dq;t.pauseSound=t.Hg;t.activateSound=t.Sn;t.soundGetTime=t.rr;t.soundSetTime=t.tr;t.soundSetPlaybackRate=t.sr;t.setMediaVisibility=t.xk;t.isPlaying=t.isPlaying;t.stopSound=t.Qi;t.setVolume=t.setVolume;t.changeVolume=
t.po;t.mute=t.nu;t.unmute=t.Zv;t.toggleMuted=t.Qv;t.getPlayerMuted=t.ut;t.getHasSounds=t.Ys;t.getSoundsPermitted=t.yt;t.startAutoplayMedia=t.yr;t.removeHotspots=t.Vm;t.getHotspotsVisible=t.Ul;t.getHotspotPropValue=t.yf;t.setHotspotPropValue=t.Ci;t.getCustomPropertyDefaultValue=t.Us;t.getCurrentPerspective=t.be;t.addHotspot=t.Un;t.updateHotspot=t.Pr;t.removeHotspot=t.Jq;t.setActiveHotspot=t.We;t.getPointHotspotIds=t.vt;t.getHotspot=t.gp;t.setFullscreen=t.Bi;t.toggleFullscreen=t.Lk;t.enterFullscreen=
t.Js;t.exitFullscreen=t.exitFullscreen;t.getIsFullscreen=t.bt;t.startAutorotate=t.zr;t.stopAutorotate=t.Cr;t.toggleAutorotate=t.Hr;t.pauseAutorotate=t.Bq;t.resumeAutorotate=t.Oq;t.setAutorotateNodeFilter=t.Tq;t.startAnimation=t.ur;t.resumeAnimation=t.Uu;t.createLayers=t.yl;t.removePanorama=t.Sf;t.getScreenResolution=t.Ap;t.getMaxScreenResolution=t.lp;t.getNodeIds=t.qp;t.getNodeUserdata=t.Oh;t.getNodeUserdataPropValue=t.qt;t.setNodeUserdataPropValue=t.ev;t.getNodeLatLng=t.Xl;t.getNodeTitle=t.pt;t.getNodeDistance=
t.lt;t.getCurrentNode=t.pd;t.getNextNode=t.pp;t.getPrevNode=t.xp;t.getLastVisitedNode=t.ft;t.getStartNode=t.zt;t.getNodesWithTag=t.rp;t.getCurrentPointHotspots=t.bp;t.getPositionAngles=t.Gd;t.getPositionRawAngles=t.Aj;t.nodeVisited=t.pu;t.clearVisitedNodes=t.ys;t.setElementIdPrefix=t.$u;t.videoPanoPlay=t.kw;t.videoPanoStop=t.lw;t.videoPanoPause=t.jw;t.getVideoPanoTime=t.Ht;t.setVideoPanoTime=t.yv;t.getVideoPanoObject=t.Gt;t.setVideoPanoSource=t.xv;t.getMediaObject=t.np;t.getMediaBufferSourceObject=
t.mp;t.registerVideoElement=t.Hq;t.disableSoundLoading=t.Eo;t.setCrossOrigin=t.setCrossOrigin;t.setProjection=t.ab;t.getProjection=t.Z;t.changeProjection=t.pl;t.changeProjectionEx=t.pl;t.changeLensflares=t.vs;t.setTransition=t.qv;t.getMapType=t.jt;t.getMapDetails=t.it;t.getNodeMapCoords=t.mt;t.getNodeMapCoordsInPercent=t.nt;t.getMapContainingNode=t.ht;t.getMapsContainingNode=t.kp;t.getMapIDs=t.jp;t.getFloorplanIDs=t.Vs;t.getFirstMap=t.ep;t.getFirstFloorplan=t.xj;t.hasMap=t.St;t.hasFloorplan=t.Rt;
t.addVariable=t.ks;t.setVariableOptions=t.gr;t.setVariableValue=t.Ye;t.getVariableValue=t.Zl;t.setSuperCookie=t.pv;t.getGyroAvailable=t.Xs;t.setUseGyro=t.er;t.getUseGyro=t.Bt;t.getOS=t.st;t.getBrowser=t.Ss;t.getBrowserTheme=t.Ts;t.triggerEvent=t.G;t.requestRedraw=t.Su;t.getWebGlContext=t.Kt;t.getHasTouch=t.fp;t.updateViewerSizeNow=t.xd;t.getApiVersion=t.Rs;t.setApiVersion=t.Yu;t.getInertia=t.Zs;t.setInertia=t.bv;t.getZoomCenterCursor=t.Gp;t.setZoomCenterCursor=t.ir;t.getPlayerState=t.tp;t.setPlayerState=
t.cr;t.getQueryParameter=t.getQueryParameter;t.setQueryParameter=t.hv;t.enterVR=t.og;t.exitVR=t.pg;t.toggleVR=t.Ir;t.isInVR=t.Le;t.hasVR=t.yg;t.getVRDisplayName=t.Dt;t.getVRCamera=t.Ct;t.getVRRenderer=t.Et;t.setVRFrameBufferScaleFactor=t.sv;t.getSkinGroup=t.Dj;t.setVRShowSkinButton=t.vv;t.setVRHideSkinButton=t.tv;t.setVRSkinVisibility=t.fr;t.setVRColorSpace=t.rv;t.getVRTextureColorSpace=t.Ft})()})();