@realsee/five 6.4.2 → 6.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/docs/assets/navigation.js +1 -1
  2. package/docs/assets/search.js +1 -1
  3. package/docs/classes/plugins-1.BasePlugin.Controller.html +1 -1
  4. package/docs/classes/plugins-1.PanoAnimeController.html +33 -0
  5. package/docs/functions/plugins-1.PanoAnimePlugin.html +1 -0
  6. package/docs/hierarchy.html +1 -1
  7. package/docs/interfaces/plugins-1.BasePlugin.State.html +1 -1
  8. package/docs/interfaces/plugins-1.PanoAnimePluginType.Config.html +2 -0
  9. package/docs/interfaces/plugins-1.PanoAnimePluginType.EventMap.html +11 -0
  10. package/docs/interfaces/plugins-1.PanoAnimePluginType.Params.html +4 -0
  11. package/docs/interfaces/plugins-1.PanoAnimePluginType.State.html +8 -0
  12. package/docs/modules/plugins-1.PanoAnimePluginType.html +7 -0
  13. package/docs/modules/plugins-1.html +3 -0
  14. package/docs/types/plugins-1.PanoAnimePluginType.PluginData.html +1 -0
  15. package/docs/types/plugins-1.PanoAnimePluginType.ServerData.html +1 -0
  16. package/five/index.js +3 -3
  17. package/five/index.mjs +4 -4
  18. package/gltf-loader/index.js +3 -3
  19. package/gltf-loader/index.mjs +3 -3
  20. package/line/index.js +3 -3
  21. package/line/index.mjs +3 -3
  22. package/package.json +1 -1
  23. package/plugins/index.d.ts +77 -0
  24. package/plugins/index.js +39 -12
  25. package/plugins/index.mjs +781 -644
  26. package/react/index.js +2 -2
  27. package/react/index.mjs +2 -2
  28. package/shader-lib/index.js +42 -20
  29. package/shader-lib/index.mjs +69 -47
  30. package/sticker/index.js +3 -3
  31. package/sticker/index.mjs +3 -3
  32. package/umd/five-gltf-loader.js +3 -3
  33. package/umd/five-line.js +3 -3
  34. package/umd/five-plugins.js +39 -12
  35. package/umd/five-react.js +2 -2
  36. package/umd/five-shader-lib.js +43 -21
  37. package/umd/five-sticker.js +3 -3
  38. package/umd/five-vfx.js +2 -2
  39. package/umd/five-vue.js +2 -2
  40. package/umd/five.js +3 -3
  41. package/vfx/index.js +2 -2
  42. package/vfx/index.mjs +2 -2
  43. package/vue/index.js +2 -2
  44. package/vue/index.mjs +2 -2
  45. package/work-downloader/index.js +2 -2
  46. package/work-downloader/index.mjs +2 -2
package/plugins/index.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five
4
- * Generated: 6/20/2025
5
- * Version: 6.4.2
4
+ * Generated: 2025/7/23
5
+ * Version: 6.4.4
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -252,101 +252,101 @@
252
252
  * No amendment to or modification of this Agreement will be binding unless in
253
253
  * writing and signed by Realsee. You and Realsee hereto confirm that this
254
254
  * Agreement and all related documents shall be drafted in English.
255
- */import { Subscribe as pn, AnimationFrameLoop as Ht, Camera as dn } from "@realsee/five";
255
+ */import { Subscribe as yn, AnimationFrameLoop as Ct, Camera as bn, PanoCircleMesh as Tn } from "@realsee/five";
256
256
  import * as w from "three";
257
- import { EventDispatcher as zt, Vector3 as ve, MOUSE as Ae, TOUCH as Me, Quaternion as Ut, Spherical as Bt, Vector2 as Te, Object3D as Xt, Matrix4 as vn } from "three";
258
- import { BasePlugin as mn } from "@realsee/five/plugins";
259
- function gn(f) {
257
+ import { EventDispatcher as qt, Vector3 as ve, MOUSE as Ae, TOUCH as Me, Quaternion as jt, Spherical as Ht, Vector2 as Te, Object3D as Kt, Matrix4 as wn } from "three";
258
+ import { BasePlugin as Zt } from "@realsee/five/plugins";
259
+ function En(f) {
260
260
  return /^https?:\/\/|^\/\//.test(f) || /^data:/.test(f);
261
261
  }
262
- function yn(f, o) {
263
- return gn(o) ? o : "".concat(f).concat(o);
262
+ function xn(f, o) {
263
+ return En(o) ? o : "".concat(f).concat(o);
264
264
  }
265
- var ze;
265
+ var We;
266
266
  (function(f) {
267
267
  var o = (
268
268
  /** @class */
269
269
  function() {
270
270
  function e(a, t) {
271
- this.hooks = new pn(), this.staticPrefix = "//vr-image-4.realsee-cdn.cn", this.five = a, t != null && t.staticPrefix && (this.staticPrefix = t.staticPrefix);
271
+ this.hooks = new yn(), this.staticPrefix = "//vr-image-4.realsee-cdn.cn", this.five = a, t != null && t.staticPrefix && (this.staticPrefix = t.staticPrefix);
272
272
  }
273
273
  return e.prototype.getCurrentState = function() {
274
274
  return this.state;
275
275
  }, e.prototype.absoluteUrl = function(a) {
276
- return yn(this.staticPrefix, a);
276
+ return xn(this.staticPrefix, a);
277
277
  }, e;
278
278
  }()
279
279
  );
280
280
  f.Controller = o;
281
- })(ze || (ze = {}));
282
- var Et = function(f, o) {
283
- return Et = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, a) {
281
+ })(We || (We = {}));
282
+ var At = function(f, o) {
283
+ return At = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, a) {
284
284
  e.__proto__ = a;
285
285
  } || function(e, a) {
286
286
  for (var t in a) Object.prototype.hasOwnProperty.call(a, t) && (e[t] = a[t]);
287
- }, Et(f, o);
287
+ }, At(f, o);
288
288
  };
289
- function qe(f, o) {
289
+ function Fe(f, o) {
290
290
  if (typeof o != "function" && o !== null)
291
291
  throw new TypeError("Class extends value " + String(o) + " is not a constructor or null");
292
- Et(f, o);
292
+ At(f, o);
293
293
  function e() {
294
294
  this.constructor = f;
295
295
  }
296
296
  f.prototype = o === null ? Object.create(o) : (e.prototype = o.prototype, new e());
297
297
  }
298
- var q = function() {
299
- return q = Object.assign || function(o) {
298
+ var H = function() {
299
+ return H = Object.assign || function(o) {
300
300
  for (var e, a = 1, t = arguments.length; a < t; a++) {
301
301
  e = arguments[a];
302
302
  for (var s in e) Object.prototype.hasOwnProperty.call(e, s) && (o[s] = e[s]);
303
303
  }
304
304
  return o;
305
- }, q.apply(this, arguments);
305
+ }, H.apply(this, arguments);
306
306
  };
307
- function Xe(f, o, e, a) {
307
+ function De(f, o, e, a) {
308
308
  function t(s) {
309
- return s instanceof e ? s : new e(function(u) {
310
- u(s);
309
+ return s instanceof e ? s : new e(function(c) {
310
+ c(s);
311
311
  });
312
312
  }
313
- return new (e || (e = Promise))(function(s, u) {
313
+ return new (e || (e = Promise))(function(s, c) {
314
314
  function l(v) {
315
315
  try {
316
316
  d(a.next(v));
317
317
  } catch (T) {
318
- u(T);
318
+ c(T);
319
319
  }
320
320
  }
321
- function b(v) {
321
+ function g(v) {
322
322
  try {
323
323
  d(a.throw(v));
324
324
  } catch (T) {
325
- u(T);
325
+ c(T);
326
326
  }
327
327
  }
328
328
  function d(v) {
329
- v.done ? s(v.value) : t(v.value).then(l, b);
329
+ v.done ? s(v.value) : t(v.value).then(l, g);
330
330
  }
331
331
  d((a = a.apply(f, o || [])).next());
332
332
  });
333
333
  }
334
- function Ge(f, o) {
334
+ function Re(f, o) {
335
335
  var e = { label: 0, sent: function() {
336
336
  if (s[0] & 1) throw s[1];
337
337
  return s[1];
338
- }, trys: [], ops: [] }, a, t, s, u = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
339
- return u.next = l(0), u.throw = l(1), u.return = l(2), typeof Symbol == "function" && (u[Symbol.iterator] = function() {
338
+ }, trys: [], ops: [] }, a, t, s, c = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
339
+ return c.next = l(0), c.throw = l(1), c.return = l(2), typeof Symbol == "function" && (c[Symbol.iterator] = function() {
340
340
  return this;
341
- }), u;
341
+ }), c;
342
342
  function l(d) {
343
343
  return function(v) {
344
- return b([d, v]);
344
+ return g([d, v]);
345
345
  };
346
346
  }
347
- function b(d) {
347
+ function g(d) {
348
348
  if (a) throw new TypeError("Generator is already executing.");
349
- for (; u && (u = 0, d[0] && (e = 0)), e; ) try {
349
+ for (; c && (c = 0, d[0] && (e = 0)), e; ) try {
350
350
  if (a = 1, t && (s = d[0] & 2 ? t.return : d[0] ? t.throw || ((s = t.return) && s.call(t), 0) : t.next) && !(s = s.call(t, d[1])).done) return s;
351
351
  switch (t = 0, s && (d = [d[0] & 2, s.value]), d[0]) {
352
352
  case 0:
@@ -391,12 +391,12 @@ function Ge(f, o) {
391
391
  return { value: d[0] ? d[1] : void 0, done: !0 };
392
392
  }
393
393
  }
394
- function Vt(f, o, e) {
394
+ function zt(f, o, e) {
395
395
  if (e || arguments.length === 2) for (var a = 0, t = o.length, s; a < t; a++)
396
396
  (s || !(a in o)) && (s || (s = Array.prototype.slice.call(o, 0, a)), s[a] = o[a]);
397
397
  return f.concat(s || Array.prototype.slice.call(o));
398
398
  }
399
- function bn(f) {
399
+ function Pn(f) {
400
400
  return new Promise(function(o, e) {
401
401
  var a = new Image();
402
402
  a.onload = function() {
@@ -408,64 +408,64 @@ function bn(f) {
408
408
  }, a.crossOrigin = "", a.src = f;
409
409
  });
410
410
  }
411
- var Tn = typeof performance != "undefined" && typeof performance.timing != "undefined" ? performance.timing.navigationStart : Date.now(), bt = typeof performance != "undefined" ? function() {
412
- return Tn + performance.now();
411
+ var An = typeof performance != "undefined" && typeof performance.timing != "undefined" ? performance.timing.navigationStart : Date.now(), Tt = typeof performance != "undefined" ? function() {
412
+ return An + performance.now();
413
413
  } : function() {
414
414
  return Date.now();
415
415
  };
416
- function ot(f, o, e) {
416
+ function st(f, o, e) {
417
417
  return f + (o - f) * e;
418
418
  }
419
- function wn(f, o, e, a) {
420
- var t = (o * e + 2 * f) / Math.pow(e, 3), s = -(2 * o * e + 3 * f) / Math.pow(e, 2), u = o, l = f;
421
- return t * Math.pow(a, 3) + s * Math.pow(a, 2) + u * a + l;
419
+ function Mn(f, o, e, a) {
420
+ var t = (o * e + 2 * f) / Math.pow(e, 3), s = -(2 * o * e + 3 * f) / Math.pow(e, 2), c = o, l = f;
421
+ return t * Math.pow(a, 3) + s * Math.pow(a, 2) + c * a + l;
422
422
  }
423
- function En(f, o, e, a) {
424
- var t = (o * e + 2 * f) / Math.pow(e, 3), s = -(2 * o * e + 3 * f) / Math.pow(e, 2), u = o;
425
- return 3 * t * Math.pow(a, 2) + 2 * s * a + u;
423
+ function Cn(f, o, e, a) {
424
+ var t = (o * e + 2 * f) / Math.pow(e, 3), s = -(2 * o * e + 3 * f) / Math.pow(e, 2), c = o;
425
+ return 3 * t * Math.pow(a, 2) + 2 * s * a + c;
426
426
  }
427
- function Pn(f, o, e, a) {
427
+ function _n(f, o, e, a) {
428
428
  var t = a[1] - a[0];
429
- return f = st(f, a), o = st(o, a), o - f > t / 2 ? ot(f + t, o, e) : f - o > t / 2 ? ot(f - t, o, e) : ot(f, o, e);
429
+ return f = lt(f, a), o = lt(o, a), o - f > t / 2 ? st(f + t, o, e) : f - o > t / 2 ? st(f - t, o, e) : st(f, o, e);
430
430
  }
431
- function st(f, o) {
431
+ function lt(f, o) {
432
432
  var e = o[1] - o[0];
433
- return f < o[0] ? st(f + e, o) : f >= o[1] ? st(f - e, o) : f;
433
+ return f < o[0] ? lt(f + e, o) : f >= o[1] ? lt(f - e, o) : f;
434
434
  }
435
- function xn(f, o, e, a) {
436
- return a ? Pn(f, o, e, a) : ot(f, o, e);
435
+ function On(f, o, e, a) {
436
+ return a ? _n(f, o, e, a) : st(f, o, e);
437
437
  }
438
- var Yt = (
438
+ var Gt = (
439
439
  /** @class */
440
440
  function() {
441
441
  function f(o) {
442
- this.config = {}, this.progress = 1, this.ended = !0, this.value = {}, this.startTime = bt(), this.startVelocity = 0, this.duration = 0, this.keyframes = [];
442
+ this.config = {}, this.progress = 1, this.ended = !0, this.value = {}, this.startTime = Tt(), this.startVelocity = 0, this.duration = 0, this.keyframes = [];
443
443
  for (var e in o) {
444
444
  var a = o[e];
445
445
  typeof a == "number" ? (this.value[e] = a, this.config[e] = { circle: !1 }) : (this.value[e] = a.value, this.config[e] = { circle: a.circle });
446
446
  }
447
447
  this.keyframes = [
448
- { progress: 0, value: q({}, this.value) },
449
- { progress: 1, value: q({}, this.value) }
448
+ { progress: 0, value: H({}, this.value) },
449
+ { progress: 1, value: H({}, this.value) }
450
450
  ];
451
451
  }
452
452
  return f.prototype.getProgress = function(o) {
453
453
  var e = o - this.startTime;
454
- return e < 0 ? 0 : e >= this.duration ? 1 : 1 - wn(1, this.startVelocity, this.duration, e);
454
+ return e < 0 ? 0 : e >= this.duration ? 1 : 1 - Mn(1, this.startVelocity, this.duration, e);
455
455
  }, f.prototype.getValue = function(o) {
456
456
  for (var e = 1; e < this.keyframes.length; e++)
457
457
  if (this.keyframes[e].progress > o) {
458
458
  var a = this.keyframes[e - 1], t = this.keyframes[e], s = {};
459
- for (var u in this.config) {
459
+ for (var c in this.config) {
460
460
  var l = (o - a.progress) / (t.progress - a.progress);
461
- s[u] = xn(a.value[u], t.value[u], l, this.config[u].circle);
461
+ s[c] = On(a.value[c], t.value[c], l, this.config[c].circle);
462
462
  }
463
463
  return s;
464
464
  }
465
- return q({}, this.keyframes[this.keyframes.length - 1].value);
465
+ return H({}, this.keyframes[this.keyframes.length - 1].value);
466
466
  }, f.prototype.getProgressVelocity = function(o) {
467
467
  var e = o - this.startTime;
468
- return e >= this.duration ? 0 : En(1, this.startVelocity, this.duration, e);
468
+ return e >= this.duration ? 0 : Cn(1, this.startVelocity, this.duration, e);
469
469
  }, f.prototype.update = function(o) {
470
470
  return this.ended ? !0 : (this.progress = Math.min(1, Math.max(0, this.progress, this.getProgress(o))), this.value = this.getValue(this.progress), this.ended = this.progress >= 1, this.ended && this.callbacks && (this.callbacks[0](), this.callbacks = void 0), this.ended);
471
471
  }, f.prototype.getKeyFrameSegment = function(o) {
@@ -477,43 +477,43 @@ var Yt = (
477
477
  return this.keyframes[this.keyframes.length - 1];
478
478
  }, f.prototype.set = function(o, e, a, t) {
479
479
  var s;
480
- a === void 0 && (a = 0), isNaN(e) && (e = 0), isNaN(a) && (a = 0), t = t != null ? t : bt();
481
- var u = this.getProgress(t), l = this.getValue(u), b = {};
480
+ a === void 0 && (a = 0), isNaN(e) && (e = 0), isNaN(a) && (a = 0), t = t != null ? t : Tt();
481
+ var c = this.getProgress(t), l = this.getValue(c), g = {};
482
482
  for (var d in this.config)
483
- b[d] = (s = o[d]) !== null && s !== void 0 ? s : l[d];
483
+ g[d] = (s = o[d]) !== null && s !== void 0 ? s : l[d];
484
484
  var v = [
485
485
  { progress: 0, value: l },
486
- { progress: 1, value: b }
486
+ { progress: 1, value: g }
487
487
  ];
488
488
  return this.setKeyframes(v, e, a, t);
489
489
  }, f.prototype.setKeyframes = function(o, e, a, t) {
490
490
  var s = this;
491
491
  if (a === void 0 && (a = 0), o.length < 2)
492
492
  throw new Error("keyframes invalid.");
493
- return isNaN(e) && (e = 0), isNaN(a) && (a = 0), this.callbacks && (this.callbacks[1](new Error("motion aborted.")), this.callbacks = void 0), new Promise(function(u, l) {
494
- t = t != null ? t : bt(), s.progress = 0, s.ended = !1, s.startTime = t, s.startVelocity = a, s.keyframes = o, s.duration = e, e === 0 ? (s.progress = 1, s.value = q({}, o[o.length - 1].value)) : s.value = q({}, o[0].value), s.callbacks = [u, l];
493
+ return isNaN(e) && (e = 0), isNaN(a) && (a = 0), this.callbacks && (this.callbacks[1](new Error("motion aborted.")), this.callbacks = void 0), new Promise(function(c, l) {
494
+ t = t != null ? t : Tt(), s.progress = 0, s.ended = !1, s.startTime = t, s.startVelocity = a, s.keyframes = o, s.duration = e, e === 0 ? (s.progress = 1, s.value = H({}, o[o.length - 1].value)) : s.value = H({}, o[0].value), s.callbacks = [c, l];
495
495
  });
496
496
  }, f.prototype.dispose = function() {
497
497
  this.callbacks && (this.callbacks[1](new Error("motion dispose.")), this.callbacks = void 0);
498
498
  }, f;
499
499
  }()
500
- ), An = [
500
+ ), Sn = [
501
501
  { progress: 0, value: { scale: 0, opacity: 0, shadow: 2 } },
502
502
  { progress: 0.2, value: { scale: 0.5, opacity: 1, shadow: 1 } },
503
503
  { progress: 0.8, value: { scale: 2, opacity: 0, shadow: 0.5 } },
504
504
  { progress: 1, value: { scale: 2, opacity: 0, shadow: 0.5 } }
505
- ], Mn = [
505
+ ], In = [
506
506
  { progress: 0, value: { scale: 0, opacity: 0, shadow: 2 } },
507
507
  { progress: 0.2, value: { scale: 0.4, opacity: 1, shadow: 2 } },
508
508
  { progress: 0.8, value: { scale: 1.6, opacity: 0.4, shadow: 0.5 } },
509
509
  { progress: 1, value: { scale: 2, opacity: 0, shadow: 0.5 } }
510
- ], Cn = `
510
+ ], Nn = `
511
511
  varying vec2 vUv;
512
512
  void main() {
513
513
  vUv = uv;
514
514
  gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
515
515
  }
516
- `, On = `
516
+ `, kn = `
517
517
  varying vec2 vUv;
518
518
  uniform sampler2D map;
519
519
  uniform vec4 color;
@@ -559,16 +559,16 @@ void main() {
559
559
  }
560
560
  }
561
561
  }
562
- `, _n = (
562
+ `, Ln = (
563
563
  /** @class */
564
564
  function(f) {
565
- qe(o, f);
565
+ Fe(o, f);
566
566
  function o(e, a) {
567
567
  var t = f.call(this, e) || this;
568
568
  t.canvas = document.createElement("canvas"), t.group = new w.Group(), t.wrapper = document.createElement("div"), t.style = document.createElement("style"), t.itemMaskMesh = function() {
569
569
  var l = new w.Mesh(new w.SphereBufferGeometry(1, 60, 40), new w.ShaderMaterial({
570
- vertexShader: Cn,
571
- fragmentShader: On,
570
+ vertexShader: Nn,
571
+ fragmentShader: kn,
572
572
  uniforms: {
573
573
  map: {
574
574
  value: new w.Texture()
@@ -587,19 +587,19 @@ void main() {
587
587
  }, t.onFiveWantsMoveToPano = function(l) {
588
588
  t.state.mode === "box" && t.select();
589
589
  }, t.loadPanoMask = function(l) {
590
- return Xe(t, void 0, void 0, function() {
591
- var b, d, v, T, A, P, O, C, L, y;
592
- return Ge(this, function(g) {
593
- switch (g.label) {
590
+ return De(t, void 0, void 0, function() {
591
+ var g, d, v, T, A, x, _, C, L, b;
592
+ return Re(this, function(y) {
593
+ switch (y.label) {
594
594
  case 0:
595
- return b = this, d = b.five, v = b.canvas, T = b.itemMaskMesh, A = b.data, P = v.getContext("2d"), O = d.observers[l], C = (y = A == null ? void 0 : A.object_mask_list.find(function(x) {
596
- return x.derived_id === String(O.derivedId);
597
- })) === null || y === void 0 ? void 0 : y.object_mask_url, C ? [4, bn(C)] : [
595
+ return g = this, d = g.five, v = g.canvas, T = g.itemMaskMesh, A = g.data, x = v.getContext("2d"), _ = d.observers[l], C = (b = A == null ? void 0 : A.object_mask_list.find(function(P) {
596
+ return P.derived_id === String(_.derivedId);
597
+ })) === null || b === void 0 ? void 0 : b.object_mask_url, C ? [4, Pn(C)] : [
598
598
  2
599
599
  /*return*/
600
600
  ];
601
601
  case 1:
602
- return L = g.sent(), v.width = L.width, v.height = L.height, P == null || P.drawImage(L, 0, 0, L.width, L.height), T.material.uniforms.map.value.image = L, T.material.uniforms.map.value.minFilter = w.LinearFilter, T.material.uniforms.map.value.needsUpdate = !0, T.position.copy(O.position), T.quaternion.copy(O.quaternion), d.scene.add(T), d.needsRender = !0, [
602
+ return L = y.sent(), v.width = L.width, v.height = L.height, x == null || x.drawImage(L, 0, 0, L.width, L.height), T.material.uniforms.map.value.image = L, T.material.uniforms.map.value.minFilter = w.LinearFilter, T.material.uniforms.map.value.needsUpdate = !0, T.position.copy(_.position), T.quaternion.copy(_.quaternion), d.scene.add(T), d.needsRender = !0, [
603
603
  2
604
604
  /*return*/
605
605
  ];
@@ -607,43 +607,43 @@ void main() {
607
607
  });
608
608
  });
609
609
  }, t.onFiveMouseMove = function(l) {
610
- var b;
610
+ var g;
611
611
  if (t.state.mode === "mask" && t.five.state.mode === "Panorama") {
612
- var d = t, v = d.five, T = d.itemMaskMesh, A = v.observers[v.state.panoIndex], P = (b = l.pointers[0]) === null || b === void 0 ? void 0 : b.raycaster;
613
- if (P) {
614
- var O = P.intersectObjects(t.group.children.filter(function(C) {
612
+ var d = t, v = d.five, T = d.itemMaskMesh, A = v.observers[v.state.panoIndex], x = (g = l.pointers[0]) === null || g === void 0 ? void 0 : g.raycaster;
613
+ if (x) {
614
+ var _ = x.intersectObjects(t.group.children.filter(function(C) {
615
615
  return C.userData.visible_viewpoint.includes(String(A.derivedId));
616
616
  }), !0)[0];
617
- O ? T.material.uniforms.color.value = O.object.userData.color : T.material.uniforms.color.value = new w.Vector4(0, 0, 0, 1);
617
+ _ ? T.material.uniforms.color.value = _.object.userData.color : T.material.uniforms.color.value = new w.Vector4(0, 0, 0, 1);
618
618
  }
619
619
  }
620
620
  }, t.onFiveTapGesture = function(l) {
621
- var b = t.five, d = b.observers[b.state.panoIndex];
621
+ var g = t.five, d = g.observers[g.state.panoIndex];
622
622
  if (l) {
623
- var v = l.intersectObjects(t.group.children.filter(function(P) {
624
- return P.userData.visible_viewpoint.includes(String(d.derivedId));
623
+ var v = l.intersectObjects(t.group.children.filter(function(x) {
624
+ return x.userData.visible_viewpoint.includes(String(d.derivedId));
625
625
  }), !0)[0];
626
626
  if (v) {
627
627
  t.select(v.object.name), t.stopAnimation && t.stopAnimation(), t.tapPosition = v.point, t.changeTapScreenPosition();
628
- var T = new Yt({
628
+ var T = new Gt({
629
629
  opacity: 0,
630
630
  scale: 0,
631
631
  shadow: 2
632
- }), A = new Yt({
632
+ }), A = new Gt({
633
633
  opacity: 0,
634
634
  scale: 0,
635
635
  shadow: 2
636
636
  });
637
- return T.setKeyframes(An, 1e3), A.setKeyframes(Mn, 1e3), t.stopAnimation = Ht.shared.add(function(P, O) {
638
- var C, L = T.update(P), y = A.update(P);
639
- t.wrapper.firstChild.style.opacity = "".concat(T.value.opacity), t.wrapper.firstChild.style.transform = "scale(".concat(T.value.scale, ")"), t.wrapper.firstChild.style.boxShadow = "0 0 0 ".concat(T.value.shadow, "px #fff"), t.wrapper.lastChild.style.opacity = "".concat(A.value.opacity), t.wrapper.lastChild.style.transform = "scale(".concat(A.value.scale, ")"), t.wrapper.lastChild.style.boxShadow = "0 0 0 ".concat(A.value.shadow, "px #fff"), L && y && ((C = t.stopAnimation) === null || C === void 0 || C.call(t), t.stopAnimation = void 0, b.getElement().parentElement.removeChild(t.wrapper));
640
- }, !1, 0, 10), b.getElement().parentElement.appendChild(t.wrapper), !1;
637
+ return T.setKeyframes(Sn, 1e3), A.setKeyframes(In, 1e3), t.stopAnimation = Ct.shared.add(function(x, _) {
638
+ var C, L = T.update(x), b = A.update(x);
639
+ t.wrapper.firstChild.style.opacity = "".concat(T.value.opacity), t.wrapper.firstChild.style.transform = "scale(".concat(T.value.scale, ")"), t.wrapper.firstChild.style.boxShadow = "0 0 0 ".concat(T.value.shadow, "px #fff"), t.wrapper.lastChild.style.opacity = "".concat(A.value.opacity), t.wrapper.lastChild.style.transform = "scale(".concat(A.value.scale, ")"), t.wrapper.lastChild.style.boxShadow = "0 0 0 ".concat(A.value.shadow, "px #fff"), L && b && ((C = t.stopAnimation) === null || C === void 0 || C.call(t), t.stopAnimation = void 0, g.getElement().parentElement.removeChild(t.wrapper));
640
+ }, !1, 0, 10), g.getElement().parentElement.appendChild(t.wrapper), !1;
641
641
  }
642
642
  }
643
643
  }, t.changeTapScreenPosition = function() {
644
644
  if (t.tapPosition) {
645
- var l = t.tapPosition.clone().project(t.five.camera), b = (l.x + 1) / 2, d = -(l.y - 1) / 2;
646
- t.wrapper.style.opacity = l.z > 0 && l.z < 1 ? "1" : "0", t.wrapper.style.transform = "translate(".concat(b * 100, "%, ").concat(d * 100, "%)");
645
+ var l = t.tapPosition.clone().project(t.five.camera), g = (l.x + 1) / 2, d = -(l.y - 1) / 2;
646
+ t.wrapper.style.opacity = l.z > 0 && l.z < 1 ? "1" : "0", t.wrapper.style.transform = "translate(".concat(g * 100, "%, ").concat(d * 100, "%)");
647
647
  }
648
648
  }, t.onFiveCameraUpdate = function(l) {
649
649
  t.changeTapScreenPosition();
@@ -658,8 +658,8 @@ void main() {
658
658
  selectAll: !1
659
659
  };
660
660
  t.state = Object.assign(s, a == null ? void 0 : a.initialState);
661
- var u = q({}, a == null ? void 0 : a.config);
662
- return t._config = u, t.group.rotateX(Math.PI), t.wrapper.className = "ItemMaskPlugin", t.wrapper.innerHTML = '<span class="ItemMaskPluginCircle"></span><span class="ItemMaskPluginCircle"></span>', t.style.innerHTML = `
661
+ var c = H({}, a == null ? void 0 : a.config);
662
+ return t._config = c, t.group.rotateX(Math.PI), t.wrapper.className = "ItemMaskPlugin", t.wrapper.innerHTML = '<span class="ItemMaskPluginCircle"></span><span class="ItemMaskPluginCircle"></span>', t.style.innerHTML = `
663
663
  .ItemMaskPlugin {
664
664
  position: absolute;
665
665
  top: 0;
@@ -681,23 +681,23 @@ void main() {
681
681
  }
682
682
  return Object.defineProperty(o.prototype, "config", {
683
683
  get: function() {
684
- return q({}, this._config);
684
+ return H({}, this._config);
685
685
  },
686
686
  enumerable: !1,
687
687
  configurable: !0
688
688
  }), o.prototype.updateState = function(e, a) {
689
689
  var t = this.state;
690
- this.state = q(q({}, this.state), e), this.hooks.emit("stateChange", { state: this.state, prevState: t, userAction: a });
690
+ this.state = H(H({}, this.state), e), this.hooks.emit("stateChange", { state: this.state, prevState: t, userAction: a });
691
691
  }, o.prototype.load = function(e) {
692
- return Xe(this, void 0, void 0, function() {
692
+ return De(this, void 0, void 0, function() {
693
693
  var a, t, s = this;
694
- return Ge(this, function(u) {
694
+ return Re(this, function(c) {
695
695
  return this.data = e, a = e.data_list.map(function(l) {
696
- var b, d = l.position.end.map(function(S) {
696
+ var g, d = l.position.end.map(function(S) {
697
697
  return Number(S);
698
698
  }), v = l.position.start.map(function(S) {
699
699
  return Number(S);
700
- }), T = Math.abs(d[0] - v[0]), A = Math.abs(d[1] - v[1]), P = Math.abs(d[2] - v[2]), O = d[0] / 2 + v[0] / 2, C = d[1] / 2 + v[1] / 2, L = d[2] / 2 + v[2] / 2, y = new w.Vector3(O, C, L), g = new w.BoxBufferGeometry(T, A, P), x = new w.ShaderMaterial({
700
+ }), T = Math.abs(d[0] - v[0]), A = Math.abs(d[1] - v[1]), x = Math.abs(d[2] - v[2]), _ = d[0] / 2 + v[0] / 2, C = d[1] / 2 + v[1] / 2, L = d[2] / 2 + v[2] / 2, b = new w.Vector3(_, C, L), y = new w.BoxBufferGeometry(T, A, x), P = new w.ShaderMaterial({
701
701
  vertexShader: `
702
702
  varying vec2 vUv;
703
703
  void main() {
@@ -733,8 +733,8 @@ void main() {
733
733
  depthWrite: !1,
734
734
  depthTest: !1,
735
735
  transparent: !0
736
- }), p = new w.Mesh(g, x);
737
- return p.position.copy(y), p.name = "".concat(l.category_name).concat(l.index), p.userData.color = new ((b = w.Vector4).bind.apply(b, Vt(Vt([void 0], l.mask_color.map(function(S) {
736
+ }), p = new w.Mesh(y, P);
737
+ return p.position.copy(b), p.name = "".concat(l.category_name).concat(l.index), p.userData.color = new ((g = w.Vector4).bind.apply(g, zt(zt([void 0], l.mask_color.map(function(S) {
738
738
  return S / 255;
739
739
  }).reverse(), !1), [1], !1)))(), p.userData.visible_viewpoint = Object.keys(l.visible_viewpoint), p;
740
740
  }), (t = this.group).add.apply(t, a), [
@@ -747,8 +747,8 @@ void main() {
747
747
  a === void 0 && (a = {});
748
748
  var t = this.state, s = a.userAction !== void 0 ? a.userAction : !0;
749
749
  if (this.updateState(e, s), e.enabled !== void 0 && t.enabled !== e.enabled) {
750
- var u = { userAction: s };
751
- e.enabled ? this._enable(u) : this._disable(u);
750
+ var c = { userAction: s };
751
+ e.enabled ? this._enable(c) : this._disable(c);
752
752
  }
753
753
  }, o.prototype.setMode = function(e) {
754
754
  this.updateState({ mode: e }, !1), e === "mask" ? (this.group.children.forEach(function(a) {
@@ -758,8 +758,8 @@ void main() {
758
758
  }), this.five.needsRender = !0);
759
759
  }, o.prototype.select = function(e, a) {
760
760
  var t = this, s;
761
- this.updateState({ selectedId: e != null ? e : null }, (s = a == null ? void 0 : a.userAction) !== null && s !== void 0 ? s : !1), this.group.children.forEach(function(u) {
762
- u.material.visible = t.state.selectAll || u.name === e;
761
+ this.updateState({ selectedId: e != null ? e : null }, (s = a == null ? void 0 : a.userAction) !== null && s !== void 0 ? s : !1), this.group.children.forEach(function(c) {
762
+ c.material.visible = t.state.selectAll || c.name === e;
763
763
  }), this.five.needsRender = !0;
764
764
  }, o.prototype.selectAll = function(e) {
765
765
  e === void 0 && (e = !0), this.updateState({ selectAll: !!e }, !1), this.select();
@@ -780,19 +780,19 @@ void main() {
780
780
  this.updateState({ enabled: !1 }, t), this._disable({ userAction: t });
781
781
  }
782
782
  }, o;
783
- }(ze.Controller)
784
- ), Bn = function(f, o) {
785
- return new _n(f, o);
783
+ }(We.Controller)
784
+ ), qn = function(f, o) {
785
+ return new Ln(f, o);
786
786
  };
787
787
  /*! Hammer.JS - v2.0.7 - 2016-04-22
788
788
  * http://hammerjs.github.io/
789
789
  *
790
790
  * Copyright (c) 2016 Jorik Tangelder;
791
791
  * Licensed under the MIT license */
792
- var Tt = function(f, o, e, a) {
793
- var t = ["", "webkit", "Moz", "MS", "ms", "o"], s = o.createElement ? o.createElement("div") : a, u = "function", l = Math.round, b = Math.abs, d = Date.now;
792
+ var wt = function(f, o, e, a) {
793
+ var t = ["", "webkit", "Moz", "MS", "ms", "o"], s = o.createElement ? o.createElement("div") : a, c = "function", l = Math.round, g = Math.abs, d = Date.now;
794
794
  function v(n, r, i) {
795
- return setTimeout(g(n, i), r);
795
+ return setTimeout(y(n, i), r);
796
796
  }
797
797
  function T(n, r, i) {
798
798
  return Array.isArray(n) ? (A(n, i[r], i), !0) : !1;
@@ -809,7 +809,7 @@ var Tt = function(f, o, e, a) {
809
809
  for (h in n)
810
810
  n.hasOwnProperty(h) && r.call(i, n[h], h, n);
811
811
  }
812
- function P(n, r, i) {
812
+ function x(n, r, i) {
813
813
  var h = "DEPRECATED METHOD: " + r + `
814
814
  ` + i + ` AT
815
815
  `;
@@ -818,8 +818,8 @@ var Tt = function(f, o, e, a) {
818
818
  return N && N.call(f.console, h, E), n.apply(this, arguments);
819
819
  };
820
820
  }
821
- var O;
822
- typeof Object.assign != "function" ? O = function(r) {
821
+ var _;
822
+ typeof Object.assign != "function" ? _ = function(r) {
823
823
  if (r === a || r === null)
824
824
  throw new TypeError("Cannot convert undefined or null to object");
825
825
  for (var i = Object(r), h = 1; h < arguments.length; h++) {
@@ -829,25 +829,25 @@ var Tt = function(f, o, e, a) {
829
829
  m.hasOwnProperty(E) && (i[E] = m[E]);
830
830
  }
831
831
  return i;
832
- } : O = Object.assign;
833
- var C = P(function(r, i, h) {
832
+ } : _ = Object.assign;
833
+ var C = x(function(r, i, h) {
834
834
  for (var m = Object.keys(i), E = 0; E < m.length; )
835
835
  (!h || h && r[m[E]] === a) && (r[m[E]] = i[m[E]]), E++;
836
836
  return r;
837
- }, "extend", "Use `assign`."), L = P(function(r, i) {
837
+ }, "extend", "Use `assign`."), L = x(function(r, i) {
838
838
  return C(r, i, !0);
839
839
  }, "merge", "Use `assign`.");
840
- function y(n, r, i) {
840
+ function b(n, r, i) {
841
841
  var h = r.prototype, m;
842
- m = n.prototype = Object.create(h), m.constructor = n, m._super = h, i && O(m, i);
842
+ m = n.prototype = Object.create(h), m.constructor = n, m._super = h, i && _(m, i);
843
843
  }
844
- function g(n, r) {
844
+ function y(n, r) {
845
845
  return function() {
846
846
  return n.apply(r, arguments);
847
847
  };
848
848
  }
849
- function x(n, r) {
850
- return typeof n == u ? n.apply(r && r[0] || a, r) : n;
849
+ function P(n, r) {
850
+ return typeof n == c ? n.apply(r && r[0] || a, r) : n;
851
851
  }
852
852
  function p(n, r) {
853
853
  return n === a ? r : n;
@@ -894,8 +894,8 @@ var Tt = function(f, o, e, a) {
894
894
  var N = n[E][r];
895
895
  le(m, N) < 0 && h.push(n[E]), m[E] = N, E++;
896
896
  }
897
- return h = h.sort(function(se, G) {
898
- return se[r] > G[r];
897
+ return h = h.sort(function(se, W) {
898
+ return se[r] > W[r];
899
899
  }), h;
900
900
  }
901
901
  function re(n, r) {
@@ -914,11 +914,11 @@ var Tt = function(f, o, e, a) {
914
914
  var r = n.ownerDocument || n;
915
915
  return r.defaultView || r.parentWindow || f;
916
916
  }
917
- var _ = /mobile|tablet|ip(ad|hone|od)|android/i, F = "ontouchstart" in f, Y = re(f, "PointerEvent") !== a, ne = F && _.test(navigator.userAgent), H = "touch", U = "pen", W = "mouse", V = "kinect", B = 25, k = 1, $ = 2, j = 4, z = 8, Oe = 1, Ee = 2, _e = 4, Se = 8, Pe = 16, oe = Ee | _e, ue = Se | Pe, De = oe | ue, Re = ["x", "y"], Ie = ["clientX", "clientY"];
917
+ var O = /mobile|tablet|ip(ad|hone|od)|android/i, F = "ontouchstart" in f, Y = re(f, "PointerEvent") !== a, ne = F && O.test(navigator.userAgent), z = "touch", U = "pen", q = "mouse", V = "kinect", B = 25, k = 1, $ = 2, j = 4, G = 8, _e = 1, Ee = 2, Oe = 4, Se = 8, xe = 16, oe = Ee | Oe, ue = Se | xe, Ue = oe | ue, Be = ["x", "y"], Ie = ["clientX", "clientY"];
918
918
  function ae(n, r) {
919
919
  var i = this;
920
920
  this.manager = n, this.callback = r, this.element = n.element, this.target = n.options.inputTarget, this.domHandler = function(h) {
921
- x(n.options.enable, [n]) && i.handler(h);
921
+ P(n.options.enable, [n]) && i.handler(h);
922
922
  }, this.init();
923
923
  }
924
924
  ae.prototype = {
@@ -943,19 +943,19 @@ var Tt = function(f, o, e, a) {
943
943
  };
944
944
  function Ke(n) {
945
945
  var r, i = n.options.inputClass;
946
- return i ? r = i : Y ? r = ut : ne ? r = $e : F ? r = ht : r = Je, new r(n, Ze);
946
+ return i ? r = i : Y ? r = ht : ne ? r = $e : F ? r = ft : r = Je, new r(n, Ze);
947
947
  }
948
948
  function Ze(n, r, i) {
949
- var h = i.pointers.length, m = i.changedPointers.length, E = r & k && h - m === 0, N = r & (j | z) && h - m === 0;
950
- i.isFirst = !!E, i.isFinal = !!N, E && (n.session = {}), i.eventType = r, c(n, i), n.emit("hammer.input", i), n.recognize(i), n.session.prevInput = i;
949
+ var h = i.pointers.length, m = i.changedPointers.length, E = r & k && h - m === 0, N = r & (j | G) && h - m === 0;
950
+ i.isFirst = !!E, i.isFinal = !!N, E && (n.session = {}), i.eventType = r, u(n, i), n.emit("hammer.input", i), n.recognize(i), n.session.prevInput = i;
951
951
  }
952
- function c(n, r) {
952
+ function u(n, r) {
953
953
  var i = n.session, h = r.pointers, m = h.length;
954
954
  i.firstInput || (i.firstInput = K(r)), m > 1 && !i.firstMultiple ? i.firstMultiple = K(r) : m === 1 && (i.firstMultiple = !1);
955
955
  var E = i.firstInput, N = i.firstMultiple, Q = N ? N.center : E.center, se = r.center = fe(h);
956
- r.timeStamp = d(), r.deltaTime = r.timeStamp - E.timeStamp, r.angle = ct(Q, se), r.distance = Qe(Q, se), D(i, r), r.offsetDirection = ge(r.deltaX, r.deltaY);
957
- var G = Fe(r.deltaTime, r.deltaX, r.deltaY);
958
- r.overallVelocityX = G.x, r.overallVelocityY = G.y, r.overallVelocity = b(G.x) > b(G.y) ? G.x : G.y, r.scale = N ? Wt(N.pointers, h) : 1, r.rotation = N ? Gt(N.pointers, h) : 0, r.maxPointers = i.prevInput ? r.pointers.length > i.prevInput.maxPointers ? r.pointers.length : i.prevInput.maxPointers : r.pointers.length, X(i, r);
956
+ r.timeStamp = d(), r.deltaTime = r.timeStamp - E.timeStamp, r.angle = ut(Q, se), r.distance = Qe(Q, se), D(i, r), r.offsetDirection = ge(r.deltaX, r.deltaY);
957
+ var W = Ve(r.deltaTime, r.deltaX, r.deltaY);
958
+ r.overallVelocityX = W.x, r.overallVelocityY = W.y, r.overallVelocity = g(W.x) > g(W.y) ? W.x : W.y, r.scale = N ? Jt(N.pointers, h) : 1, r.rotation = N ? Qt(N.pointers, h) : 0, r.maxPointers = i.prevInput ? r.pointers.length > i.prevInput.maxPointers ? r.pointers.length : i.prevInput.maxPointers : r.pointers.length, X(i, r);
959
959
  var de = n.element;
960
960
  ee(r.srcEvent.target, de) && (de = r.srcEvent.target), r.target = de;
961
961
  }
@@ -971,9 +971,9 @@ var Tt = function(f, o, e, a) {
971
971
  }
972
972
  function X(n, r) {
973
973
  var i = n.lastInterval || r, h = r.timeStamp - i.timeStamp, m, E, N, Q;
974
- if (r.eventType != z && (h > B || i.velocity === a)) {
975
- var se = r.deltaX - i.deltaX, G = r.deltaY - i.deltaY, de = Fe(h, se, G);
976
- E = de.x, N = de.y, m = b(de.x) > b(de.y) ? de.x : de.y, Q = ge(se, G), n.lastInterval = r;
974
+ if (r.eventType != G && (h > B || i.velocity === a)) {
975
+ var se = r.deltaX - i.deltaX, W = r.deltaY - i.deltaY, de = Ve(h, se, W);
976
+ E = de.x, N = de.y, m = g(de.x) > g(de.y) ? de.x : de.y, Q = ge(se, W), n.lastInterval = r;
977
977
  } else
978
978
  m = i.velocity, E = i.velocityX, N = i.velocityY, Q = i.direction;
979
979
  r.velocity = m, r.velocityX = E, r.velocityY = N, r.direction = Q;
@@ -1006,145 +1006,145 @@ var Tt = function(f, o, e, a) {
1006
1006
  y: l(h / r)
1007
1007
  };
1008
1008
  }
1009
- function Fe(n, r, i) {
1009
+ function Ve(n, r, i) {
1010
1010
  return {
1011
1011
  x: r / n || 0,
1012
1012
  y: i / n || 0
1013
1013
  };
1014
1014
  }
1015
1015
  function ge(n, r) {
1016
- return n === r ? Oe : b(n) >= b(r) ? n < 0 ? Ee : _e : r < 0 ? Se : Pe;
1016
+ return n === r ? _e : g(n) >= g(r) ? n < 0 ? Ee : Oe : r < 0 ? Se : xe;
1017
1017
  }
1018
1018
  function Qe(n, r, i) {
1019
- i || (i = Re);
1019
+ i || (i = Be);
1020
1020
  var h = r[i[0]] - n[i[0]], m = r[i[1]] - n[i[1]];
1021
1021
  return Math.sqrt(h * h + m * m);
1022
1022
  }
1023
- function ct(n, r, i) {
1024
- i || (i = Re);
1023
+ function ut(n, r, i) {
1024
+ i || (i = Be);
1025
1025
  var h = r[i[0]] - n[i[0]], m = r[i[1]] - n[i[1]];
1026
1026
  return Math.atan2(m, h) * 180 / Math.PI;
1027
1027
  }
1028
- function Gt(n, r) {
1029
- return ct(r[1], r[0], Ie) + ct(n[1], n[0], Ie);
1028
+ function Qt(n, r) {
1029
+ return ut(r[1], r[0], Ie) + ut(n[1], n[0], Ie);
1030
1030
  }
1031
- function Wt(n, r) {
1031
+ function Jt(n, r) {
1032
1032
  return Qe(r[0], r[1], Ie) / Qe(n[0], n[1], Ie);
1033
1033
  }
1034
- var qt = {
1034
+ var $t = {
1035
1035
  mousedown: k,
1036
1036
  mousemove: $,
1037
1037
  mouseup: j
1038
- }, Kt = "mousedown", Zt = "mousemove mouseup";
1038
+ }, en = "mousedown", tn = "mousemove mouseup";
1039
1039
  function Je() {
1040
- this.evEl = Kt, this.evWin = Zt, this.pressed = !1, ae.apply(this, arguments);
1040
+ this.evEl = en, this.evWin = tn, this.pressed = !1, ae.apply(this, arguments);
1041
1041
  }
1042
- y(Je, ae, {
1042
+ b(Je, ae, {
1043
1043
  /**
1044
1044
  * handle mouse events
1045
1045
  * @param {Object} ev
1046
1046
  */
1047
1047
  handler: function(r) {
1048
- var i = qt[r.type];
1048
+ var i = $t[r.type];
1049
1049
  i & k && (r.button === 0 || r.button === 2) && (this.pressed = !0), i & $ && r.which !== 1 && (i = j), this.pressed && (i & j && (this.pressed = !1), this.callback(this.manager, i, {
1050
1050
  pointers: [r],
1051
1051
  changedPointers: [r],
1052
- pointerType: W,
1052
+ pointerType: q,
1053
1053
  srcEvent: r
1054
1054
  }));
1055
1055
  }
1056
1056
  });
1057
- var xt = {
1057
+ var _t = {
1058
1058
  pointerdown: k,
1059
1059
  pointermove: $,
1060
1060
  pointerup: j,
1061
- pointercancel: z,
1062
- pointerout: z
1063
- }, Qt = {
1064
- 2: H,
1061
+ pointercancel: G,
1062
+ pointerout: G
1063
+ }, nn = {
1064
+ 2: z,
1065
1065
  3: U,
1066
- 4: W,
1066
+ 4: q,
1067
1067
  5: V
1068
1068
  // see https://twitter.com/jacobrossi/status/480596438489890816
1069
- }, At = "pointerdown", Mt = "pointermove pointerup pointercancel";
1070
- f.MSPointerEvent && !f.PointerEvent && (At = "MSPointerDown", Mt = "MSPointerMove MSPointerUp MSPointerCancel");
1071
- function ut() {
1072
- this.evEl = At, this.evWin = Mt, ae.apply(this, arguments), this.store = this.manager.session.pointerEvents = [];
1069
+ }, Ot = "pointerdown", St = "pointermove pointerup pointercancel";
1070
+ f.MSPointerEvent && !f.PointerEvent && (Ot = "MSPointerDown", St = "MSPointerMove MSPointerUp MSPointerCancel");
1071
+ function ht() {
1072
+ this.evEl = Ot, this.evWin = St, ae.apply(this, arguments), this.store = this.manager.session.pointerEvents = [];
1073
1073
  }
1074
- y(ut, ae, {
1074
+ b(ht, ae, {
1075
1075
  /**
1076
1076
  * handle mouse events
1077
1077
  * @param {Object} ev
1078
1078
  */
1079
1079
  handler: function(r) {
1080
- var i = this.store, h = !1, m = !1, E = r.type.toLowerCase().replace("ms", ""), N = xt[E], Q = Qt[r.pointerType] || r.pointerType, se = Q == H, G = le(i, r.pointerId, "pointerId");
1081
- N & k && (r.button === 0 || r.button === 2 || se) ? G < 0 && (i.push(r), G = i.length - 1) : N & (j | z) ? h = !0 : !se && r.buttons === 0 && (h = !0, m = !0, N = xt.pointerup), !(G < 0) && (m || (i[G] = r), this.callback(this.manager, N, {
1080
+ var i = this.store, h = !1, m = !1, E = r.type.toLowerCase().replace("ms", ""), N = _t[E], Q = nn[r.pointerType] || r.pointerType, se = Q == z, W = le(i, r.pointerId, "pointerId");
1081
+ N & k && (r.button === 0 || r.button === 2 || se) ? W < 0 && (i.push(r), W = i.length - 1) : N & (j | G) ? h = !0 : !se && r.buttons === 0 && (h = !0, m = !0, N = _t.pointerup), !(W < 0) && (m || (i[W] = r), this.callback(this.manager, N, {
1082
1082
  pointers: i,
1083
1083
  changedPointers: [r],
1084
1084
  pointerType: Q,
1085
- srcEvent: i[G]
1086
- }), h && i.splice(G, 1));
1085
+ srcEvent: i[W]
1086
+ }), h && i.splice(W, 1));
1087
1087
  }
1088
1088
  });
1089
- var Jt = {
1089
+ var rn = {
1090
1090
  touchstart: k,
1091
1091
  touchmove: $,
1092
1092
  touchend: j,
1093
- touchcancel: z
1094
- }, $t = "touchstart", en = "touchstart touchmove touchend touchcancel";
1095
- function Ct() {
1096
- this.evTarget = $t, this.evWin = en, this.started = !1, ae.apply(this, arguments);
1093
+ touchcancel: G
1094
+ }, an = "touchstart", on = "touchstart touchmove touchend touchcancel";
1095
+ function It() {
1096
+ this.evTarget = an, this.evWin = on, this.started = !1, ae.apply(this, arguments);
1097
1097
  }
1098
- y(Ct, ae, {
1098
+ b(It, ae, {
1099
1099
  handler: function(r) {
1100
- var i = Jt[r.type];
1100
+ var i = rn[r.type];
1101
1101
  if (i === k && (this.started = !0), !!this.started) {
1102
- var h = tn.call(this, r, i);
1103
- i & (j | z) && h[0].length - h[1].length === 0 && (this.started = !1), this.callback(this.manager, i, {
1102
+ var h = sn.call(this, r, i);
1103
+ i & (j | G) && h[0].length - h[1].length === 0 && (this.started = !1), this.callback(this.manager, i, {
1104
1104
  pointers: h[0],
1105
1105
  changedPointers: h[1],
1106
- pointerType: H,
1106
+ pointerType: z,
1107
1107
  srcEvent: r
1108
1108
  });
1109
1109
  }
1110
1110
  }
1111
1111
  });
1112
- function tn(n, r) {
1112
+ function sn(n, r) {
1113
1113
  var i = me(n.touches), h = me(n.changedTouches);
1114
- return r & (j | z) && (i = Ce(i.concat(h), "identifier")), [i, h];
1114
+ return r & (j | G) && (i = Ce(i.concat(h), "identifier")), [i, h];
1115
1115
  }
1116
- var nn = {
1116
+ var ln = {
1117
1117
  touchstart: k,
1118
1118
  touchmove: $,
1119
1119
  touchend: j,
1120
- touchcancel: z
1121
- }, rn = "touchstart touchmove touchend touchcancel";
1120
+ touchcancel: G
1121
+ }, cn = "touchstart touchmove touchend touchcancel";
1122
1122
  function $e() {
1123
- this.evTarget = rn, this.targetIds = {}, ae.apply(this, arguments);
1123
+ this.evTarget = cn, this.targetIds = {}, ae.apply(this, arguments);
1124
1124
  }
1125
- y($e, ae, {
1125
+ b($e, ae, {
1126
1126
  handler: function(r) {
1127
- var i = nn[r.type], h = an.call(this, r, i);
1127
+ var i = ln[r.type], h = un.call(this, r, i);
1128
1128
  h && this.callback(this.manager, i, {
1129
1129
  pointers: h[0],
1130
1130
  changedPointers: h[1],
1131
- pointerType: H,
1131
+ pointerType: z,
1132
1132
  srcEvent: r
1133
1133
  });
1134
1134
  }
1135
1135
  });
1136
- function an(n, r) {
1136
+ function un(n, r) {
1137
1137
  var i = me(n.touches), h = this.targetIds;
1138
1138
  if (r & (k | $) && i.length === 1)
1139
1139
  return h[i[0].identifier] = !0, [i, i];
1140
1140
  var m, E, N = me(n.changedTouches), Q = [], se = this.target;
1141
- if (E = i.filter(function(G) {
1142
- return ee(G.target, se);
1141
+ if (E = i.filter(function(W) {
1142
+ return ee(W.target, se);
1143
1143
  }), r === k)
1144
1144
  for (m = 0; m < E.length; )
1145
1145
  h[E[m].identifier] = !0, m++;
1146
1146
  for (m = 0; m < N.length; )
1147
- h[N[m].identifier] && Q.push(N[m]), r & (j | z) && delete h[N[m].identifier], m++;
1147
+ h[N[m].identifier] && Q.push(N[m]), r & (j | G) && delete h[N[m].identifier], m++;
1148
1148
  if (Q.length)
1149
1149
  return [
1150
1150
  // merge targetTouches with changedTargetTouches so it contains ALL touches, including 'end' and 'cancel'
@@ -1152,13 +1152,13 @@ var Tt = function(f, o, e, a) {
1152
1152
  Q
1153
1153
  ];
1154
1154
  }
1155
- var on = 2500, Ot = 25;
1156
- function ht() {
1155
+ var hn = 2500, Nt = 25;
1156
+ function ft() {
1157
1157
  ae.apply(this, arguments);
1158
- var n = g(this.handler, this);
1158
+ var n = y(this.handler, this);
1159
1159
  this.touch = new $e(this.manager, n), this.mouse = new Je(this.manager, n), this.primaryTouch = null, this.lastTouches = [];
1160
1160
  }
1161
- y(ht, ae, {
1161
+ b(ft, ae, {
1162
1162
  /**
1163
1163
  * handle mouse and touch events
1164
1164
  * @param {Hammer} manager
@@ -1166,11 +1166,11 @@ var Tt = function(f, o, e, a) {
1166
1166
  * @param {Object} inputData
1167
1167
  */
1168
1168
  handler: function(r, i, h) {
1169
- var m = h.pointerType == H, E = h.pointerType == W;
1169
+ var m = h.pointerType == z, E = h.pointerType == q;
1170
1170
  if (!(E && h.sourceCapabilities && h.sourceCapabilities.firesTouchEvents)) {
1171
1171
  if (m)
1172
- sn.call(this, i, h);
1173
- else if (E && ln.call(this, h))
1172
+ fn.call(this, i, h);
1173
+ else if (E && pn.call(this, h))
1174
1174
  return;
1175
1175
  this.callback(r, i, h);
1176
1176
  }
@@ -1182,10 +1182,10 @@ var Tt = function(f, o, e, a) {
1182
1182
  this.touch.destroy(), this.mouse.destroy();
1183
1183
  }
1184
1184
  });
1185
- function sn(n, r) {
1186
- n & k ? (this.primaryTouch = r.changedPointers[0].identifier, _t.call(this, r)) : n & (j | z) && _t.call(this, r);
1185
+ function fn(n, r) {
1186
+ n & k ? (this.primaryTouch = r.changedPointers[0].identifier, kt.call(this, r)) : n & (j | G) && kt.call(this, r);
1187
1187
  }
1188
- function _t(n) {
1188
+ function kt(n) {
1189
1189
  var r = n.changedPointers[0];
1190
1190
  if (r.identifier === this.primaryTouch) {
1191
1191
  var i = { x: r.clientX, y: r.clientY };
@@ -1194,28 +1194,28 @@ var Tt = function(f, o, e, a) {
1194
1194
  var E = h.indexOf(i);
1195
1195
  E > -1 && h.splice(E, 1);
1196
1196
  };
1197
- setTimeout(m, on);
1197
+ setTimeout(m, hn);
1198
1198
  }
1199
1199
  }
1200
- function ln(n) {
1200
+ function pn(n) {
1201
1201
  for (var r = n.srcEvent.clientX, i = n.srcEvent.clientY, h = 0; h < this.lastTouches.length; h++) {
1202
1202
  var m = this.lastTouches[h], E = Math.abs(r - m.x), N = Math.abs(i - m.y);
1203
- if (E <= Ot && N <= Ot)
1203
+ if (E <= Nt && N <= Nt)
1204
1204
  return !0;
1205
1205
  }
1206
1206
  return !1;
1207
1207
  }
1208
- var St = s ? re(s.style, "touchAction") : a, It = St !== a, Nt = "compute", kt = "auto", ft = "manipulation", Ne = "none", Ue = "pan-x", Be = "pan-y", et = un();
1209
- function pt(n, r) {
1208
+ var Lt = s ? re(s.style, "touchAction") : a, Dt = Lt !== a, Rt = "compute", Ft = "auto", pt = "manipulation", Ne = "none", Ye = "pan-x", je = "pan-y", et = vn();
1209
+ function dt(n, r) {
1210
1210
  this.manager = n, this.set(r);
1211
1211
  }
1212
- pt.prototype = {
1212
+ dt.prototype = {
1213
1213
  /**
1214
1214
  * set the touchAction value on the element or enable the polyfill
1215
1215
  * @param {String} value
1216
1216
  */
1217
1217
  set: function(n) {
1218
- n == Nt && (n = this.compute()), It && this.manager.element.style && et[n] && (this.manager.element.style[St] = n), this.actions = n.toLowerCase().trim();
1218
+ n == Rt && (n = this.compute()), Dt && this.manager.element.style && et[n] && (this.manager.element.style[Lt] = n), this.actions = n.toLowerCase().trim();
1219
1219
  },
1220
1220
  /**
1221
1221
  * just re-set the touchAction value
@@ -1230,8 +1230,8 @@ var Tt = function(f, o, e, a) {
1230
1230
  compute: function() {
1231
1231
  var n = [];
1232
1232
  return A(this.manager.recognizers, function(r) {
1233
- x(r.options.enable, [r]) && (n = n.concat(r.getTouchAction()));
1234
- }), cn(n.join(" "));
1233
+ P(r.options.enable, [r]) && (n = n.concat(r.getTouchAction()));
1234
+ }), dn(n.join(" "));
1235
1235
  },
1236
1236
  /**
1237
1237
  * this method is called on each input cycle and provides the preventing of the browser behavior
@@ -1243,10 +1243,10 @@ var Tt = function(f, o, e, a) {
1243
1243
  r.preventDefault();
1244
1244
  return;
1245
1245
  }
1246
- var h = this.actions, m = Z(h, Ne) && !et[Ne], E = Z(h, Be) && !et[Be], N = Z(h, Ue) && !et[Ue];
1246
+ var h = this.actions, m = Z(h, Ne) && !et[Ne], E = Z(h, je) && !et[je], N = Z(h, Ye) && !et[Ye];
1247
1247
  if (m) {
1248
- var Q = n.pointers.length === 1, se = n.distance < 2, G = n.deltaTime < 250;
1249
- if (Q && se && G)
1248
+ var Q = n.pointers.length === 1, se = n.distance < 2, W = n.deltaTime < 250;
1249
+ if (Q && se && W)
1250
1250
  return;
1251
1251
  }
1252
1252
  if (!(N && E) && (m || E && i & oe || N && i & ue))
@@ -1260,23 +1260,23 @@ var Tt = function(f, o, e, a) {
1260
1260
  this.manager.session.prevented = !0, n.preventDefault();
1261
1261
  }
1262
1262
  };
1263
- function cn(n) {
1263
+ function dn(n) {
1264
1264
  if (Z(n, Ne))
1265
1265
  return Ne;
1266
- var r = Z(n, Ue), i = Z(n, Be);
1267
- return r && i ? Ne : r || i ? r ? Ue : Be : Z(n, ft) ? ft : kt;
1266
+ var r = Z(n, Ye), i = Z(n, je);
1267
+ return r && i ? Ne : r || i ? r ? Ye : je : Z(n, pt) ? pt : Ft;
1268
1268
  }
1269
- function un() {
1270
- if (!It)
1269
+ function vn() {
1270
+ if (!Dt)
1271
1271
  return !1;
1272
1272
  var n = {}, r = f.CSS && f.CSS.supports;
1273
1273
  return ["auto", "manipulation", "pan-y", "pan-x", "pan-x pan-y", "none"].forEach(function(i) {
1274
1274
  n[i] = r ? f.CSS.supports("touch-action", i) : !0;
1275
1275
  }), n;
1276
1276
  }
1277
- var tt = 1, ce = 2, ke = 4, xe = 8, ye = xe, Ve = 16, pe = 32;
1277
+ var tt = 1, ce = 2, ke = 4, Pe = 8, ye = Pe, He = 16, pe = 32;
1278
1278
  function be(n) {
1279
- this.options = O({}, this.defaults, n || {}), this.id = R(), this.manager = null, this.options.enable = p(this.options.enable, !0), this.state = tt, this.simultaneous = {}, this.requireFail = [];
1279
+ this.options = _({}, this.defaults, n || {}), this.id = R(), this.manager = null, this.options.enable = p(this.options.enable, !0), this.state = tt, this.simultaneous = {}, this.requireFail = [];
1280
1280
  }
1281
1281
  be.prototype = {
1282
1282
  /**
@@ -1290,7 +1290,7 @@ var Tt = function(f, o, e, a) {
1290
1290
  * @return {Recognizer}
1291
1291
  */
1292
1292
  set: function(n) {
1293
- return O(this.options, n), this.manager && this.manager.touchAction.update(), this;
1293
+ return _(this.options, n), this.manager && this.manager.touchAction.update(), this;
1294
1294
  },
1295
1295
  /**
1296
1296
  * recognize simultaneous with an other recognizer.
@@ -1359,7 +1359,7 @@ var Tt = function(f, o, e, a) {
1359
1359
  function h(m) {
1360
1360
  r.manager.emit(m, n);
1361
1361
  }
1362
- i < xe && h(r.options.event + Lt(i)), h(r.options.event), n.additionalEvent && h(n.additionalEvent), i >= xe && h(r.options.event + Lt(i));
1362
+ i < Pe && h(r.options.event + Ut(i)), h(r.options.event), n.additionalEvent && h(n.additionalEvent), i >= Pe && h(r.options.event + Ut(i));
1363
1363
  },
1364
1364
  /**
1365
1365
  * Check that all the require failure recognizers has failed,
@@ -1389,12 +1389,12 @@ var Tt = function(f, o, e, a) {
1389
1389
  * @param {Object} inputData
1390
1390
  */
1391
1391
  recognize: function(n) {
1392
- var r = O({}, n);
1393
- if (!x(this.options.enable, [this, r])) {
1392
+ var r = _({}, n);
1393
+ if (!P(this.options.enable, [this, r])) {
1394
1394
  this.reset(), this.state = pe;
1395
1395
  return;
1396
1396
  }
1397
- this.state & (ye | Ve | pe) && (this.state = tt), this.state = this.process(r), this.state & (ce | ke | xe | Ve) && this.tryEmit(r);
1397
+ this.state & (ye | He | pe) && (this.state = tt), this.state = this.process(r), this.state & (ce | ke | Pe | He) && this.tryEmit(r);
1398
1398
  },
1399
1399
  /**
1400
1400
  * return the state of the recognizer
@@ -1421,11 +1421,11 @@ var Tt = function(f, o, e, a) {
1421
1421
  reset: function() {
1422
1422
  }
1423
1423
  };
1424
- function Lt(n) {
1425
- return n & Ve ? "cancel" : n & xe ? "end" : n & ke ? "move" : n & ce ? "start" : "";
1424
+ function Ut(n) {
1425
+ return n & He ? "cancel" : n & Pe ? "end" : n & ke ? "move" : n & ce ? "start" : "";
1426
1426
  }
1427
- function Dt(n) {
1428
- return n == Pe ? "down" : n == Se ? "up" : n == Ee ? "left" : n == _e ? "right" : "";
1427
+ function Bt(n) {
1428
+ return n == xe ? "down" : n == Se ? "up" : n == Ee ? "left" : n == Oe ? "right" : "";
1429
1429
  }
1430
1430
  function nt(n, r) {
1431
1431
  var i = r.manager;
@@ -1434,7 +1434,7 @@ var Tt = function(f, o, e, a) {
1434
1434
  function he() {
1435
1435
  be.apply(this, arguments);
1436
1436
  }
1437
- y(he, be, {
1437
+ b(he, be, {
1438
1438
  /**
1439
1439
  * @namespace
1440
1440
  * @memberof AttrRecognizer
@@ -1464,13 +1464,13 @@ var Tt = function(f, o, e, a) {
1464
1464
  */
1465
1465
  process: function(n) {
1466
1466
  var r = this.state, i = n.eventType, h = r & (ce | ke), m = this.attrTest(n);
1467
- return h && (i & z || !m) ? r | Ve : h || m ? i & j ? r | xe : r & ce ? r | ke : ce : pe;
1467
+ return h && (i & G || !m) ? r | He : h || m ? i & j ? r | Pe : r & ce ? r | ke : ce : pe;
1468
1468
  }
1469
1469
  });
1470
1470
  function rt() {
1471
1471
  he.apply(this, arguments), this.pX = null, this.pY = null;
1472
1472
  }
1473
- y(rt, he, {
1473
+ b(rt, he, {
1474
1474
  /**
1475
1475
  * @namespace
1476
1476
  * @memberof PanRecognizer
@@ -1479,29 +1479,29 @@ var Tt = function(f, o, e, a) {
1479
1479
  event: "pan",
1480
1480
  threshold: 10,
1481
1481
  pointers: 1,
1482
- direction: De
1482
+ direction: Ue
1483
1483
  },
1484
1484
  getTouchAction: function() {
1485
1485
  var n = this.options.direction, r = [];
1486
- return n & oe && r.push(Be), n & ue && r.push(Ue), r;
1486
+ return n & oe && r.push(je), n & ue && r.push(Ye), r;
1487
1487
  },
1488
1488
  directionTest: function(n) {
1489
1489
  var r = this.options, i = !0, h = n.distance, m = n.direction, E = n.deltaX, N = n.deltaY;
1490
- return m & r.direction || (r.direction & oe ? (m = E === 0 ? Oe : E < 0 ? Ee : _e, i = E != this.pX, h = Math.abs(n.deltaX)) : (m = N === 0 ? Oe : N < 0 ? Se : Pe, i = N != this.pY, h = Math.abs(n.deltaY))), n.direction = m, i && h > r.threshold && m & r.direction;
1490
+ return m & r.direction || (r.direction & oe ? (m = E === 0 ? _e : E < 0 ? Ee : Oe, i = E != this.pX, h = Math.abs(n.deltaX)) : (m = N === 0 ? _e : N < 0 ? Se : xe, i = N != this.pY, h = Math.abs(n.deltaY))), n.direction = m, i && h > r.threshold && m & r.direction;
1491
1491
  },
1492
1492
  attrTest: function(n) {
1493
1493
  return he.prototype.attrTest.call(this, n) && (this.state & ce || !(this.state & ce) && this.directionTest(n));
1494
1494
  },
1495
1495
  emit: function(n) {
1496
1496
  this.pX = n.deltaX, this.pY = n.deltaY;
1497
- var r = Dt(n.direction);
1497
+ var r = Bt(n.direction);
1498
1498
  r && (n.additionalEvent = this.options.event + r), this._super.emit.call(this, n);
1499
1499
  }
1500
1500
  });
1501
- function dt() {
1501
+ function vt() {
1502
1502
  he.apply(this, arguments);
1503
1503
  }
1504
- y(dt, he, {
1504
+ b(vt, he, {
1505
1505
  /**
1506
1506
  * @namespace
1507
1507
  * @memberof PinchRecognizer
@@ -1525,10 +1525,10 @@ var Tt = function(f, o, e, a) {
1525
1525
  this._super.emit.call(this, n);
1526
1526
  }
1527
1527
  });
1528
- function vt() {
1528
+ function mt() {
1529
1529
  be.apply(this, arguments), this._timer = null, this._input = null;
1530
1530
  }
1531
- y(vt, be, {
1531
+ b(mt, be, {
1532
1532
  /**
1533
1533
  * @namespace
1534
1534
  * @memberof PressRecognizer
@@ -1542,11 +1542,11 @@ var Tt = function(f, o, e, a) {
1542
1542
  // a minimal movement is ok, but keep it low
1543
1543
  },
1544
1544
  getTouchAction: function() {
1545
- return [kt];
1545
+ return [Ft];
1546
1546
  },
1547
1547
  process: function(n) {
1548
1548
  var r = this.options, i = n.pointers.length === r.pointers, h = n.distance < r.threshold, m = n.deltaTime > r.time;
1549
- if (this._input = n, !h || !i || n.eventType & (j | z) && !m)
1549
+ if (this._input = n, !h || !i || n.eventType & (j | G) && !m)
1550
1550
  this.reset();
1551
1551
  else if (n.eventType & k)
1552
1552
  this.reset(), this._timer = v(function() {
@@ -1563,10 +1563,10 @@ var Tt = function(f, o, e, a) {
1563
1563
  this.state === ye && (n && n.eventType & j ? this.manager.emit(this.options.event + "up", n) : (this._input.timeStamp = d(), this.manager.emit(this.options.event, this._input)));
1564
1564
  }
1565
1565
  });
1566
- function mt() {
1566
+ function gt() {
1567
1567
  he.apply(this, arguments);
1568
1568
  }
1569
- y(mt, he, {
1569
+ b(gt, he, {
1570
1570
  /**
1571
1571
  * @namespace
1572
1572
  * @memberof RotateRecognizer
@@ -1583,10 +1583,10 @@ var Tt = function(f, o, e, a) {
1583
1583
  return this._super.attrTest.call(this, n) && (Math.abs(n.rotation) > this.options.threshold || this.state & ce);
1584
1584
  }
1585
1585
  });
1586
- function gt() {
1586
+ function yt() {
1587
1587
  he.apply(this, arguments);
1588
1588
  }
1589
- y(gt, he, {
1589
+ b(yt, he, {
1590
1590
  /**
1591
1591
  * @namespace
1592
1592
  * @memberof SwipeRecognizer
@@ -1603,17 +1603,17 @@ var Tt = function(f, o, e, a) {
1603
1603
  },
1604
1604
  attrTest: function(n) {
1605
1605
  var r = this.options.direction, i;
1606
- return r & (oe | ue) ? i = n.overallVelocity : r & oe ? i = n.overallVelocityX : r & ue && (i = n.overallVelocityY), this._super.attrTest.call(this, n) && r & n.offsetDirection && n.distance > this.options.threshold && n.maxPointers == this.options.pointers && b(i) > this.options.velocity && n.eventType & j;
1606
+ return r & (oe | ue) ? i = n.overallVelocity : r & oe ? i = n.overallVelocityX : r & ue && (i = n.overallVelocityY), this._super.attrTest.call(this, n) && r & n.offsetDirection && n.distance > this.options.threshold && n.maxPointers == this.options.pointers && g(i) > this.options.velocity && n.eventType & j;
1607
1607
  },
1608
1608
  emit: function(n) {
1609
- var r = Dt(n.offsetDirection);
1609
+ var r = Bt(n.offsetDirection);
1610
1610
  r && this.manager.emit(this.options.event + r, n), this.manager.emit(this.options.event, n);
1611
1611
  }
1612
1612
  });
1613
1613
  function at() {
1614
1614
  be.apply(this, arguments), this.pTime = !1, this.pCenter = !1, this._timer = null, this._input = null, this.count = 0;
1615
1615
  }
1616
- y(at, be, {
1616
+ b(at, be, {
1617
1617
  /**
1618
1618
  * @namespace
1619
1619
  * @memberof PinchRecognizer
@@ -1632,7 +1632,7 @@ var Tt = function(f, o, e, a) {
1632
1632
  // a multi-tap can be a bit off the initial position
1633
1633
  },
1634
1634
  getTouchAction: function() {
1635
- return [ft];
1635
+ return [pt];
1636
1636
  },
1637
1637
  process: function(n) {
1638
1638
  var r = this.options, i = n.pointers.length === r.pointers, h = n.distance < r.threshold, m = n.deltaTime < r.time;
@@ -1664,7 +1664,7 @@ var Tt = function(f, o, e, a) {
1664
1664
  }
1665
1665
  });
1666
1666
  function Le(n, r) {
1667
- return r = r || {}, r.recognizers = p(r.recognizers, Le.defaults.preset), new yt(n, r);
1667
+ return r = r || {}, r.recognizers = p(r.recognizers, Le.defaults.preset), new bt(n, r);
1668
1668
  }
1669
1669
  Le.VERSION = "2.0.7", Le.defaults = {
1670
1670
  /**
@@ -1680,7 +1680,7 @@ var Tt = function(f, o, e, a) {
1680
1680
  * @type {String}
1681
1681
  * @default compute
1682
1682
  */
1683
- touchAction: Nt,
1683
+ touchAction: Rt,
1684
1684
  /**
1685
1685
  * @type {Boolean}
1686
1686
  * @default true
@@ -1707,13 +1707,13 @@ var Tt = function(f, o, e, a) {
1707
1707
  */
1708
1708
  preset: [
1709
1709
  // RecognizerClass, options, [recognizeWith, ...], [requireFailure, ...]
1710
- [mt, { enable: !1 }],
1711
- [dt, { enable: !1 }, ["rotate"]],
1712
- [gt, { direction: oe }],
1710
+ [gt, { enable: !1 }],
1711
+ [vt, { enable: !1 }, ["rotate"]],
1712
+ [yt, { direction: oe }],
1713
1713
  [rt, { direction: oe }, ["swipe"]],
1714
1714
  [at],
1715
1715
  [at, { event: "doubletap", taps: 2 }, ["tap"]],
1716
- [vt]
1716
+ [mt]
1717
1717
  ],
1718
1718
  /**
1719
1719
  * Some CSS properties can be used to improve the working of Hammer.
@@ -1762,21 +1762,21 @@ var Tt = function(f, o, e, a) {
1762
1762
  tapHighlightColor: "rgba(0,0,0,0)"
1763
1763
  }
1764
1764
  };
1765
- var hn = 1, Rt = 2;
1766
- function yt(n, r) {
1767
- this.options = O({}, Le.defaults, r || {}), this.options.inputTarget = this.options.inputTarget || n, this.handlers = {}, this.session = {}, this.recognizers = [], this.oldCssProps = {}, this.element = n, this.input = Ke(this), this.touchAction = new pt(this, this.options.touchAction), Ft(this, !0), A(this.options.recognizers, function(i) {
1765
+ var mn = 1, Vt = 2;
1766
+ function bt(n, r) {
1767
+ this.options = _({}, Le.defaults, r || {}), this.options.inputTarget = this.options.inputTarget || n, this.handlers = {}, this.session = {}, this.recognizers = [], this.oldCssProps = {}, this.element = n, this.input = Ke(this), this.touchAction = new dt(this, this.options.touchAction), Yt(this, !0), A(this.options.recognizers, function(i) {
1768
1768
  var h = this.add(new i[0](i[1]));
1769
1769
  i[2] && h.recognizeWith(i[2]), i[3] && h.requireFailure(i[3]);
1770
1770
  }, this);
1771
1771
  }
1772
- yt.prototype = {
1772
+ bt.prototype = {
1773
1773
  /**
1774
1774
  * set options
1775
1775
  * @param {Object} options
1776
1776
  * @returns {Manager}
1777
1777
  */
1778
1778
  set: function(n) {
1779
- return O(this.options, n), n.touchAction && this.touchAction.update(), n.inputTarget && (this.input.destroy(), this.input.target = n.inputTarget, this.input.init()), this;
1779
+ return _(this.options, n), n.touchAction && this.touchAction.update(), n.inputTarget && (this.input.destroy(), this.input.target = n.inputTarget, this.input.init()), this;
1780
1780
  },
1781
1781
  /**
1782
1782
  * stop recognizing for this session.
@@ -1785,7 +1785,7 @@ var Tt = function(f, o, e, a) {
1785
1785
  * @param {Boolean} [force]
1786
1786
  */
1787
1787
  stop: function(n) {
1788
- this.session.stopped = n ? Rt : hn;
1788
+ this.session.stopped = n ? Vt : mn;
1789
1789
  },
1790
1790
  /**
1791
1791
  * run the recognizers!
@@ -1800,9 +1800,9 @@ var Tt = function(f, o, e, a) {
1800
1800
  var i, h = this.recognizers, m = r.curRecognizer;
1801
1801
  (!m || m && m.state & ye) && (m = r.curRecognizer = null);
1802
1802
  for (var E = 0; E < h.length; )
1803
- i = h[E], r.stopped !== Rt && // 1
1803
+ i = h[E], r.stopped !== Vt && // 1
1804
1804
  (!m || i == m || // 2
1805
- i.canRecognizeWith(m)) ? i.recognize(n) : i.reset(), !m && i.state & (ce | ke | xe) && (m = r.curRecognizer = i), E++;
1805
+ i.canRecognizeWith(m)) ? i.recognize(n) : i.reset(), !m && i.state & (ce | ke | Pe) && (m = r.curRecognizer = i), E++;
1806
1806
  }
1807
1807
  },
1808
1808
  /**
@@ -1878,7 +1878,7 @@ var Tt = function(f, o, e, a) {
1878
1878
  * @param {Object} data
1879
1879
  */
1880
1880
  emit: function(n, r) {
1881
- this.options.domEvents && fn(n, r);
1881
+ this.options.domEvents && gn(n, r);
1882
1882
  var i = this.handlers[n] && this.handlers[n].slice();
1883
1883
  if (!(!i || !i.length)) {
1884
1884
  r.type = n, r.preventDefault = function() {
@@ -1893,10 +1893,10 @@ var Tt = function(f, o, e, a) {
1893
1893
  * it doesn't unbind dom events, that is the user own responsibility
1894
1894
  */
1895
1895
  destroy: function() {
1896
- this.element && Ft(this, !1), this.handlers = {}, this.session = {}, this.input.destroy(), this.element = null;
1896
+ this.element && Yt(this, !1), this.handlers = {}, this.session = {}, this.input.destroy(), this.element = null;
1897
1897
  }
1898
1898
  };
1899
- function Ft(n, r) {
1899
+ function Yt(n, r) {
1900
1900
  var i = n.element;
1901
1901
  if (i.style) {
1902
1902
  var h;
@@ -1905,57 +1905,57 @@ var Tt = function(f, o, e, a) {
1905
1905
  }), r || (n.oldCssProps = {});
1906
1906
  }
1907
1907
  }
1908
- function fn(n, r) {
1908
+ function gn(n, r) {
1909
1909
  var i = o.createEvent("Event");
1910
1910
  i.initEvent(n, !0, !0), i.gesture = r, r.target.dispatchEvent(i);
1911
1911
  }
1912
- return O(Le, {
1912
+ return _(Le, {
1913
1913
  INPUT_START: k,
1914
1914
  INPUT_MOVE: $,
1915
1915
  INPUT_END: j,
1916
- INPUT_CANCEL: z,
1916
+ INPUT_CANCEL: G,
1917
1917
  STATE_POSSIBLE: tt,
1918
1918
  STATE_BEGAN: ce,
1919
1919
  STATE_CHANGED: ke,
1920
- STATE_ENDED: xe,
1920
+ STATE_ENDED: Pe,
1921
1921
  STATE_RECOGNIZED: ye,
1922
- STATE_CANCELLED: Ve,
1922
+ STATE_CANCELLED: He,
1923
1923
  STATE_FAILED: pe,
1924
- DIRECTION_NONE: Oe,
1924
+ DIRECTION_NONE: _e,
1925
1925
  DIRECTION_LEFT: Ee,
1926
- DIRECTION_RIGHT: _e,
1926
+ DIRECTION_RIGHT: Oe,
1927
1927
  DIRECTION_UP: Se,
1928
- DIRECTION_DOWN: Pe,
1928
+ DIRECTION_DOWN: xe,
1929
1929
  DIRECTION_HORIZONTAL: oe,
1930
1930
  DIRECTION_VERTICAL: ue,
1931
- DIRECTION_ALL: De,
1932
- Manager: yt,
1931
+ DIRECTION_ALL: Ue,
1932
+ Manager: bt,
1933
1933
  Input: ae,
1934
- TouchAction: pt,
1934
+ TouchAction: dt,
1935
1935
  TouchInput: $e,
1936
1936
  MouseInput: Je,
1937
- PointerEventInput: ut,
1938
- TouchMouseInput: ht,
1939
- SingleTouchInput: Ct,
1937
+ PointerEventInput: ht,
1938
+ TouchMouseInput: ft,
1939
+ SingleTouchInput: It,
1940
1940
  Recognizer: be,
1941
1941
  AttrRecognizer: he,
1942
1942
  Tap: at,
1943
1943
  Pan: rt,
1944
- Swipe: gt,
1945
- Pinch: dt,
1946
- Rotate: mt,
1947
- Press: vt,
1944
+ Swipe: yt,
1945
+ Pinch: vt,
1946
+ Rotate: gt,
1947
+ Press: mt,
1948
1948
  on: S,
1949
1949
  off: M,
1950
1950
  each: A,
1951
1951
  merge: L,
1952
1952
  extend: C,
1953
- assign: O,
1954
- inherit: y,
1955
- bindFn: g,
1953
+ assign: _,
1954
+ inherit: b,
1955
+ bindFn: y,
1956
1956
  prefixed: re
1957
1957
  }), Le;
1958
- }(typeof window != "undefined" ? window : {}, typeof document != "undefined" ? document : {}), We = function(f, o) {
1958
+ }(typeof window != "undefined" ? window : {}, typeof document != "undefined" ? document : {}), qe = function(f, o) {
1959
1959
  o === void 0 && console.warn('THREE.OrbitControls: The second parameter "domElement" is now mandatory.'), o === document && console.error('THREE.OrbitControls: "document" should not be used as the target "domElement". Please use "renderer.domElement" instead.'), this.object = f, this.domElement = o, this.enabled = !0, this.target = new ve(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 1 / 0, this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.enableDamping = !1, this.dampingFactor = 0.05, this.enableZoom = !0, this.zoomSpeed = 1, this.enableRotate = !0, this.rotateSpeed = 1, this.enablePan = !0, this.panSpeed = 1, this.screenSpacePanning = !1, this.keyPanSpeed = 7, this.autoRotate = !1, this.autoRotateSpeed = 2, this.enableKeys = !0, this.keys = { LEFT: 37, UP: 38, RIGHT: 39, BOTTOM: 40 }, this.mouseButtons = { LEFT: Ae.ROTATE, MIDDLE: Ae.DOLLY, RIGHT: Ae.PAN }, this.touches = { ONE: Me.ROTATE, TWO: Me.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this.getPolarAngle = function() {
1960
1960
  return d.phi;
1961
1961
  }, this.getAzimuthalAngle = function() {
@@ -1963,17 +1963,17 @@ var Tt = function(f, o, e, a) {
1963
1963
  }, this.saveState = function() {
1964
1964
  e.target0.copy(e.target), e.position0.copy(e.object.position), e.zoom0 = e.object.zoom;
1965
1965
  }, this.reset = function() {
1966
- e.target.copy(e.target0), e.object.position.copy(e.position0), e.object.zoom = e.zoom0, e.object.updateProjectionMatrix(), e.dispatchEvent(a), e.update(), l = u.NONE;
1966
+ e.target.copy(e.target0), e.object.position.copy(e.position0), e.object.zoom = e.zoom0, e.object.updateProjectionMatrix(), e.dispatchEvent(a), e.update(), l = c.NONE;
1967
1967
  }, this.update = function() {
1968
- var c = new ve(), D = new Ut().setFromUnitVectors(f.up, new ve(0, 1, 0)), X = D.clone().inverse(), K = new ve(), fe = new Ut();
1968
+ var u = new ve(), D = new jt().setFromUnitVectors(f.up, new ve(0, 1, 0)), X = D.clone().inverse(), K = new ve(), fe = new jt();
1969
1969
  return function() {
1970
1970
  var ge = e.object.position;
1971
- return c.copy(ge).sub(e.target), c.applyQuaternion(D), d.setFromVector3(c), e.autoRotate && l === u.NONE && te(ee()), e.enableDamping ? (d.theta += v.theta * e.dampingFactor, d.phi += v.phi * e.dampingFactor) : (d.theta += v.theta, d.phi += v.phi), d.theta = Math.max(e.minAzimuthAngle, Math.min(e.maxAzimuthAngle, d.theta)), d.phi = Math.max(e.minPolarAngle, Math.min(e.maxPolarAngle, d.phi)), d.makeSafe(), d.radius *= T, d.radius = Math.max(e.minDistance, Math.min(e.maxDistance, d.radius)), e.enableDamping === !0 ? e.target.addScaledVector(A, e.dampingFactor) : e.target.add(A), c.setFromSpherical(d), c.applyQuaternion(X), ge.copy(e.target).add(c), e.object.lookAt(e.target), e.enableDamping === !0 ? (v.theta *= 1 - e.dampingFactor, v.phi *= 1 - e.dampingFactor, A.multiplyScalar(1 - e.dampingFactor)) : (v.set(0, 0, 0), A.set(0, 0, 0)), T = 1, P || K.distanceToSquared(e.object.position) > b || 8 * (1 - fe.dot(e.object.quaternion)) > b ? (e.dispatchEvent(a), K.copy(e.object.position), fe.copy(e.object.quaternion), P = !1, !0) : !1;
1971
+ return u.copy(ge).sub(e.target), u.applyQuaternion(D), d.setFromVector3(u), e.autoRotate && l === c.NONE && te(ee()), e.enableDamping ? (d.theta += v.theta * e.dampingFactor, d.phi += v.phi * e.dampingFactor) : (d.theta += v.theta, d.phi += v.phi), d.theta = Math.max(e.minAzimuthAngle, Math.min(e.maxAzimuthAngle, d.theta)), d.phi = Math.max(e.minPolarAngle, Math.min(e.maxPolarAngle, d.phi)), d.makeSafe(), d.radius *= T, d.radius = Math.max(e.minDistance, Math.min(e.maxDistance, d.radius)), e.enableDamping === !0 ? e.target.addScaledVector(A, e.dampingFactor) : e.target.add(A), u.setFromSpherical(d), u.applyQuaternion(X), ge.copy(e.target).add(u), e.object.lookAt(e.target), e.enableDamping === !0 ? (v.theta *= 1 - e.dampingFactor, v.phi *= 1 - e.dampingFactor, A.multiplyScalar(1 - e.dampingFactor)) : (v.set(0, 0, 0), A.set(0, 0, 0)), T = 1, x || K.distanceToSquared(e.object.position) > g || 8 * (1 - fe.dot(e.object.quaternion)) > g ? (e.dispatchEvent(a), K.copy(e.object.position), fe.copy(e.object.quaternion), x = !1, !0) : !1;
1972
1972
  };
1973
1973
  }(), this.dispose = function() {
1974
- e.domElement.removeEventListener("contextmenu", Ze, !1), e.domElement.removeEventListener("mousedown", Pe, !1), e.domElement.removeEventListener("wheel", De, !1), e.domElement.removeEventListener("touchstart", Ie, !1), e.domElement.removeEventListener("touchend", Ke, !1), e.domElement.removeEventListener("touchmove", ae, !1), document.removeEventListener("mousemove", oe, !1), document.removeEventListener("mouseup", ue, !1), e.domElement.removeEventListener("keydown", Re, !1);
1974
+ e.domElement.removeEventListener("contextmenu", Ze, !1), e.domElement.removeEventListener("mousedown", xe, !1), e.domElement.removeEventListener("wheel", Ue, !1), e.domElement.removeEventListener("touchstart", Ie, !1), e.domElement.removeEventListener("touchend", Ke, !1), e.domElement.removeEventListener("touchmove", ae, !1), document.removeEventListener("mousemove", oe, !1), document.removeEventListener("mouseup", ue, !1), e.domElement.removeEventListener("keydown", Be, !1);
1975
1975
  };
1976
- var e = this, a = { type: "change" }, t = { type: "start" }, s = { type: "end" }, u = {
1976
+ var e = this, a = { type: "change" }, t = { type: "start" }, s = { type: "end" }, c = {
1977
1977
  NONE: -1,
1978
1978
  ROTATE: 0,
1979
1979
  DOLLY: 1,
@@ -1982,73 +1982,73 @@ var Tt = function(f, o, e, a) {
1982
1982
  TOUCH_PAN: 4,
1983
1983
  TOUCH_DOLLY_PAN: 5,
1984
1984
  TOUCH_DOLLY_ROTATE: 6
1985
- }, l = u.NONE, b = 1e-6, d = new Bt(), v = new Bt(), T = 1, A = new ve(), P = !1, O = new Te(), C = new Te(), L = new Te(), y = new Te(), g = new Te(), x = new Te(), p = new Te(), S = new Te(), M = new Te();
1985
+ }, l = c.NONE, g = 1e-6, d = new Ht(), v = new Ht(), T = 1, A = new ve(), x = !1, _ = new Te(), C = new Te(), L = new Te(), b = new Te(), y = new Te(), P = new Te(), p = new Te(), S = new Te(), M = new Te();
1986
1986
  function ee() {
1987
1987
  return 2 * Math.PI / 60 / 60 * e.autoRotateSpeed;
1988
1988
  }
1989
1989
  function Z() {
1990
1990
  return Math.pow(0.95, e.zoomSpeed);
1991
1991
  }
1992
- function te(c) {
1993
- v.theta -= c;
1992
+ function te(u) {
1993
+ v.theta -= u;
1994
1994
  }
1995
- function le(c) {
1996
- v.phi -= c;
1995
+ function le(u) {
1996
+ v.phi -= u;
1997
1997
  }
1998
1998
  var me = function() {
1999
- var c = new ve();
1999
+ var u = new ve();
2000
2000
  return function(X, K) {
2001
- c.setFromMatrixColumn(K, 0), c.multiplyScalar(-X), A.add(c);
2001
+ u.setFromMatrixColumn(K, 0), u.multiplyScalar(-X), A.add(u);
2002
2002
  };
2003
2003
  }(), Ce = function() {
2004
- var c = new ve();
2004
+ var u = new ve();
2005
2005
  return function(X, K) {
2006
- e.screenSpacePanning === !0 ? c.setFromMatrixColumn(K, 1) : (c.setFromMatrixColumn(K, 0), c.crossVectors(e.object.up, c)), c.multiplyScalar(X), A.add(c);
2006
+ e.screenSpacePanning === !0 ? u.setFromMatrixColumn(K, 1) : (u.setFromMatrixColumn(K, 0), u.crossVectors(e.object.up, u)), u.multiplyScalar(X), A.add(u);
2007
2007
  };
2008
2008
  }(), re = function() {
2009
- var c = new ve();
2009
+ var u = new ve();
2010
2010
  return function(X, K) {
2011
2011
  var fe = e.domElement;
2012
2012
  if (e.object.isPerspectiveCamera) {
2013
- var Fe = e.object.position;
2014
- c.copy(Fe).sub(e.target);
2015
- var ge = c.length();
2013
+ var Ve = e.object.position;
2014
+ u.copy(Ve).sub(e.target);
2015
+ var ge = u.length();
2016
2016
  ge *= Math.tan(e.object.fov / 2 * Math.PI / 180), me(2 * X * ge / fe.clientHeight, e.object.matrix), Ce(2 * K * ge / fe.clientHeight, e.object.matrix);
2017
2017
  } else e.object.isOrthographicCamera ? (me(X * (e.object.right - e.object.left) / e.object.zoom / fe.clientWidth, e.object.matrix), Ce(K * (e.object.top - e.object.bottom) / e.object.zoom / fe.clientHeight, e.object.matrix)) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."), e.enablePan = !1);
2018
2018
  };
2019
2019
  }();
2020
- function ie(c) {
2021
- e.object.isPerspectiveCamera ? T /= c : e.object.isOrthographicCamera ? (e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom * c)), e.object.updateProjectionMatrix(), P = !0) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
2020
+ function ie(u) {
2021
+ e.object.isPerspectiveCamera ? T /= u : e.object.isOrthographicCamera ? (e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom * u)), e.object.updateProjectionMatrix(), x = !0) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
2022
2022
  }
2023
- function R(c) {
2024
- e.object.isPerspectiveCamera ? T *= c : e.object.isOrthographicCamera ? (e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / c)), e.object.updateProjectionMatrix(), P = !0) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
2023
+ function R(u) {
2024
+ e.object.isPerspectiveCamera ? T *= u : e.object.isOrthographicCamera ? (e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / u)), e.object.updateProjectionMatrix(), x = !0) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
2025
2025
  }
2026
- function I(c) {
2027
- O.set(c.clientX, c.clientY);
2026
+ function I(u) {
2027
+ _.set(u.clientX, u.clientY);
2028
2028
  }
2029
- function _(c) {
2030
- p.set(c.clientX, c.clientY);
2029
+ function O(u) {
2030
+ p.set(u.clientX, u.clientY);
2031
2031
  }
2032
- function F(c) {
2033
- y.set(c.clientX, c.clientY);
2032
+ function F(u) {
2033
+ b.set(u.clientX, u.clientY);
2034
2034
  }
2035
- function Y(c) {
2036
- C.set(c.clientX, c.clientY), L.subVectors(C, O).multiplyScalar(e.rotateSpeed);
2035
+ function Y(u) {
2036
+ C.set(u.clientX, u.clientY), L.subVectors(C, _).multiplyScalar(e.rotateSpeed);
2037
2037
  var D = e.domElement;
2038
- te(2 * Math.PI * L.x / D.clientHeight), le(2 * Math.PI * L.y / D.clientHeight), O.copy(C), e.update();
2038
+ te(2 * Math.PI * L.x / D.clientHeight), le(2 * Math.PI * L.y / D.clientHeight), _.copy(C), e.update();
2039
2039
  }
2040
- function ne(c) {
2041
- S.set(c.clientX, c.clientY), M.subVectors(S, p), M.y > 0 ? ie(Z()) : M.y < 0 && R(Z()), p.copy(S), e.update();
2040
+ function ne(u) {
2041
+ S.set(u.clientX, u.clientY), M.subVectors(S, p), M.y > 0 ? ie(Z()) : M.y < 0 && R(Z()), p.copy(S), e.update();
2042
2042
  }
2043
- function H(c) {
2044
- g.set(c.clientX, c.clientY), x.subVectors(g, y).multiplyScalar(e.panSpeed), re(x.x, x.y), y.copy(g), e.update();
2043
+ function z(u) {
2044
+ y.set(u.clientX, u.clientY), P.subVectors(y, b).multiplyScalar(e.panSpeed), re(P.x, P.y), b.copy(y), e.update();
2045
2045
  }
2046
- function U(c) {
2047
- c.deltaY < 0 ? R(Z()) : c.deltaY > 0 && ie(Z()), e.update();
2046
+ function U(u) {
2047
+ u.deltaY < 0 ? R(Z()) : u.deltaY > 0 && ie(Z()), e.update();
2048
2048
  }
2049
- function W(c) {
2049
+ function q(u) {
2050
2050
  var D = !1;
2051
- switch (c.keyCode) {
2051
+ switch (u.keyCode) {
2052
2052
  case e.keys.UP:
2053
2053
  re(0, e.keyPanSpeed), D = !0;
2054
2054
  break;
@@ -2062,69 +2062,69 @@ var Tt = function(f, o, e, a) {
2062
2062
  re(-e.keyPanSpeed, 0), D = !0;
2063
2063
  break;
2064
2064
  }
2065
- D && (c.preventDefault(), e.update());
2065
+ D && (u.preventDefault(), e.update());
2066
2066
  }
2067
- function V(c) {
2068
- if (c.touches.length == 1)
2069
- O.set(c.touches[0].pageX, c.touches[0].pageY);
2067
+ function V(u) {
2068
+ if (u.touches.length == 1)
2069
+ _.set(u.touches[0].pageX, u.touches[0].pageY);
2070
2070
  else {
2071
- var D = 0.5 * (c.touches[0].pageX + c.touches[1].pageX), X = 0.5 * (c.touches[0].pageY + c.touches[1].pageY);
2072
- O.set(D, X);
2071
+ var D = 0.5 * (u.touches[0].pageX + u.touches[1].pageX), X = 0.5 * (u.touches[0].pageY + u.touches[1].pageY);
2072
+ _.set(D, X);
2073
2073
  }
2074
2074
  }
2075
- function B(c) {
2076
- if (c.touches.length == 1)
2077
- y.set(c.touches[0].pageX, c.touches[0].pageY);
2075
+ function B(u) {
2076
+ if (u.touches.length == 1)
2077
+ b.set(u.touches[0].pageX, u.touches[0].pageY);
2078
2078
  else {
2079
- var D = 0.5 * (c.touches[0].pageX + c.touches[1].pageX), X = 0.5 * (c.touches[0].pageY + c.touches[1].pageY);
2080
- y.set(D, X);
2079
+ var D = 0.5 * (u.touches[0].pageX + u.touches[1].pageX), X = 0.5 * (u.touches[0].pageY + u.touches[1].pageY);
2080
+ b.set(D, X);
2081
2081
  }
2082
2082
  }
2083
- function k(c) {
2084
- var D = c.touches[0].pageX - c.touches[1].pageX, X = c.touches[0].pageY - c.touches[1].pageY, K = Math.sqrt(D * D + X * X);
2083
+ function k(u) {
2084
+ var D = u.touches[0].pageX - u.touches[1].pageX, X = u.touches[0].pageY - u.touches[1].pageY, K = Math.sqrt(D * D + X * X);
2085
2085
  p.set(0, K);
2086
2086
  }
2087
- function $(c) {
2088
- e.enableZoom && k(c), e.enablePan && B(c);
2087
+ function $(u) {
2088
+ e.enableZoom && k(u), e.enablePan && B(u);
2089
2089
  }
2090
- function j(c) {
2091
- e.enableZoom && k(c), e.enableRotate && V(c);
2090
+ function j(u) {
2091
+ e.enableZoom && k(u), e.enableRotate && V(u);
2092
2092
  }
2093
- function z(c) {
2094
- if (c.touches.length == 1)
2095
- C.set(c.touches[0].pageX, c.touches[0].pageY);
2093
+ function G(u) {
2094
+ if (u.touches.length == 1)
2095
+ C.set(u.touches[0].pageX, u.touches[0].pageY);
2096
2096
  else {
2097
- var D = 0.5 * (c.touches[0].pageX + c.touches[1].pageX), X = 0.5 * (c.touches[0].pageY + c.touches[1].pageY);
2097
+ var D = 0.5 * (u.touches[0].pageX + u.touches[1].pageX), X = 0.5 * (u.touches[0].pageY + u.touches[1].pageY);
2098
2098
  C.set(D, X);
2099
2099
  }
2100
- L.subVectors(C, O).multiplyScalar(e.rotateSpeed);
2100
+ L.subVectors(C, _).multiplyScalar(e.rotateSpeed);
2101
2101
  var K = e.domElement;
2102
- te(2 * Math.PI * L.x / K.clientHeight), le(2 * Math.PI * L.y / K.clientHeight), O.copy(C);
2102
+ te(2 * Math.PI * L.x / K.clientHeight), le(2 * Math.PI * L.y / K.clientHeight), _.copy(C);
2103
2103
  }
2104
- function Oe(c) {
2105
- if (c.touches.length == 1)
2106
- g.set(c.touches[0].pageX, c.touches[0].pageY);
2104
+ function _e(u) {
2105
+ if (u.touches.length == 1)
2106
+ y.set(u.touches[0].pageX, u.touches[0].pageY);
2107
2107
  else {
2108
- var D = 0.5 * (c.touches[0].pageX + c.touches[1].pageX), X = 0.5 * (c.touches[0].pageY + c.touches[1].pageY);
2109
- g.set(D, X);
2108
+ var D = 0.5 * (u.touches[0].pageX + u.touches[1].pageX), X = 0.5 * (u.touches[0].pageY + u.touches[1].pageY);
2109
+ y.set(D, X);
2110
2110
  }
2111
- x.subVectors(g, y).multiplyScalar(e.panSpeed), re(x.x, x.y), y.copy(g);
2111
+ P.subVectors(y, b).multiplyScalar(e.panSpeed), re(P.x, P.y), b.copy(y);
2112
2112
  }
2113
- function Ee(c) {
2114
- var D = c.touches[0].pageX - c.touches[1].pageX, X = c.touches[0].pageY - c.touches[1].pageY, K = Math.sqrt(D * D + X * X);
2113
+ function Ee(u) {
2114
+ var D = u.touches[0].pageX - u.touches[1].pageX, X = u.touches[0].pageY - u.touches[1].pageY, K = Math.sqrt(D * D + X * X);
2115
2115
  S.set(0, K), M.set(0, Math.pow(S.y / p.y, e.zoomSpeed)), ie(M.y), p.copy(S);
2116
2116
  }
2117
- function _e(c) {
2118
- e.enableZoom && Ee(c), e.enablePan && Oe(c);
2117
+ function Oe(u) {
2118
+ e.enableZoom && Ee(u), e.enablePan && _e(u);
2119
2119
  }
2120
- function Se(c) {
2121
- e.enableZoom && Ee(c), e.enableRotate && z(c);
2120
+ function Se(u) {
2121
+ e.enableZoom && Ee(u), e.enableRotate && G(u);
2122
2122
  }
2123
- function Pe(c) {
2123
+ function xe(u) {
2124
2124
  if (e.enabled !== !1) {
2125
- c.preventDefault(), e.domElement.focus ? e.domElement.focus() : window.focus();
2125
+ u.preventDefault(), e.domElement.focus ? e.domElement.focus() : window.focus();
2126
2126
  var D;
2127
- switch (c.button) {
2127
+ switch (u.button) {
2128
2128
  case 0:
2129
2129
  D = e.mouseButtons.LEFT;
2130
2130
  break;
@@ -2140,240 +2140,240 @@ var Tt = function(f, o, e, a) {
2140
2140
  switch (D) {
2141
2141
  case Ae.DOLLY:
2142
2142
  if (e.enableZoom === !1) return;
2143
- _(c), l = u.DOLLY;
2143
+ O(u), l = c.DOLLY;
2144
2144
  break;
2145
2145
  case Ae.ROTATE:
2146
- if (c.ctrlKey || c.metaKey || c.shiftKey) {
2146
+ if (u.ctrlKey || u.metaKey || u.shiftKey) {
2147
2147
  if (e.enablePan === !1) return;
2148
- F(c), l = u.PAN;
2148
+ F(u), l = c.PAN;
2149
2149
  } else {
2150
2150
  if (e.enableRotate === !1) return;
2151
- I(c), l = u.ROTATE;
2151
+ I(u), l = c.ROTATE;
2152
2152
  }
2153
2153
  break;
2154
2154
  case Ae.PAN:
2155
- if (c.ctrlKey || c.metaKey || c.shiftKey) {
2155
+ if (u.ctrlKey || u.metaKey || u.shiftKey) {
2156
2156
  if (e.enableRotate === !1) return;
2157
- I(c), l = u.ROTATE;
2157
+ I(u), l = c.ROTATE;
2158
2158
  } else {
2159
2159
  if (e.enablePan === !1) return;
2160
- F(c), l = u.PAN;
2160
+ F(u), l = c.PAN;
2161
2161
  }
2162
2162
  break;
2163
2163
  default:
2164
- l = u.NONE;
2164
+ l = c.NONE;
2165
2165
  }
2166
- l !== u.NONE && (document.addEventListener("mousemove", oe, !1), document.addEventListener("mouseup", ue, !1), e.dispatchEvent(t));
2166
+ l !== c.NONE && (document.addEventListener("mousemove", oe, !1), document.addEventListener("mouseup", ue, !1), e.dispatchEvent(t));
2167
2167
  }
2168
2168
  }
2169
- function oe(c) {
2169
+ function oe(u) {
2170
2170
  if (e.enabled !== !1)
2171
- switch (c.preventDefault(), l) {
2172
- case u.ROTATE:
2171
+ switch (u.preventDefault(), l) {
2172
+ case c.ROTATE:
2173
2173
  if (e.enableRotate === !1) return;
2174
- Y(c);
2174
+ Y(u);
2175
2175
  break;
2176
- case u.DOLLY:
2176
+ case c.DOLLY:
2177
2177
  if (e.enableZoom === !1) return;
2178
- ne(c);
2178
+ ne(u);
2179
2179
  break;
2180
- case u.PAN:
2180
+ case c.PAN:
2181
2181
  if (e.enablePan === !1) return;
2182
- H(c);
2182
+ z(u);
2183
2183
  break;
2184
2184
  }
2185
2185
  }
2186
- function ue(c) {
2187
- e.enabled !== !1 && (document.removeEventListener("mousemove", oe, !1), document.removeEventListener("mouseup", ue, !1), e.dispatchEvent(s), l = u.NONE);
2186
+ function ue(u) {
2187
+ e.enabled !== !1 && (document.removeEventListener("mousemove", oe, !1), document.removeEventListener("mouseup", ue, !1), e.dispatchEvent(s), l = c.NONE);
2188
2188
  }
2189
- function De(c) {
2190
- e.enabled === !1 || e.enableZoom === !1 || l !== u.NONE && l !== u.ROTATE || (c.preventDefault(), c.stopPropagation(), e.dispatchEvent(t), U(c), e.dispatchEvent(s));
2189
+ function Ue(u) {
2190
+ e.enabled === !1 || e.enableZoom === !1 || l !== c.NONE && l !== c.ROTATE || (u.preventDefault(), u.stopPropagation(), e.dispatchEvent(t), U(u), e.dispatchEvent(s));
2191
2191
  }
2192
- function Re(c) {
2193
- e.enabled === !1 || e.enableKeys === !1 || e.enablePan === !1 || W(c);
2192
+ function Be(u) {
2193
+ e.enabled === !1 || e.enableKeys === !1 || e.enablePan === !1 || q(u);
2194
2194
  }
2195
- function Ie(c) {
2195
+ function Ie(u) {
2196
2196
  if (e.enabled !== !1) {
2197
- switch (c.preventDefault(), c.touches.length) {
2197
+ switch (u.preventDefault(), u.touches.length) {
2198
2198
  case 1:
2199
2199
  switch (e.touches.ONE) {
2200
2200
  case Me.ROTATE:
2201
2201
  if (e.enableRotate === !1) return;
2202
- V(c), l = u.TOUCH_ROTATE;
2202
+ V(u), l = c.TOUCH_ROTATE;
2203
2203
  break;
2204
2204
  case Me.PAN:
2205
2205
  if (e.enablePan === !1) return;
2206
- B(c), l = u.TOUCH_PAN;
2206
+ B(u), l = c.TOUCH_PAN;
2207
2207
  break;
2208
2208
  default:
2209
- l = u.NONE;
2209
+ l = c.NONE;
2210
2210
  }
2211
2211
  break;
2212
2212
  case 2:
2213
2213
  switch (e.touches.TWO) {
2214
2214
  case Me.DOLLY_PAN:
2215
2215
  if (e.enableZoom === !1 && e.enablePan === !1) return;
2216
- $(c), l = u.TOUCH_DOLLY_PAN;
2216
+ $(u), l = c.TOUCH_DOLLY_PAN;
2217
2217
  break;
2218
2218
  case Me.DOLLY_ROTATE:
2219
2219
  if (e.enableZoom === !1 && e.enableRotate === !1) return;
2220
- j(c), l = u.TOUCH_DOLLY_ROTATE;
2220
+ j(u), l = c.TOUCH_DOLLY_ROTATE;
2221
2221
  break;
2222
2222
  default:
2223
- l = u.NONE;
2223
+ l = c.NONE;
2224
2224
  }
2225
2225
  break;
2226
2226
  default:
2227
- l = u.NONE;
2227
+ l = c.NONE;
2228
2228
  }
2229
- l !== u.NONE && e.dispatchEvent(t);
2229
+ l !== c.NONE && e.dispatchEvent(t);
2230
2230
  }
2231
2231
  }
2232
- function ae(c) {
2232
+ function ae(u) {
2233
2233
  if (e.enabled !== !1)
2234
- switch (c.preventDefault(), c.stopPropagation(), l) {
2235
- case u.TOUCH_ROTATE:
2234
+ switch (u.preventDefault(), u.stopPropagation(), l) {
2235
+ case c.TOUCH_ROTATE:
2236
2236
  if (e.enableRotate === !1) return;
2237
- z(c), e.update();
2237
+ G(u), e.update();
2238
2238
  break;
2239
- case u.TOUCH_PAN:
2239
+ case c.TOUCH_PAN:
2240
2240
  if (e.enablePan === !1) return;
2241
- Oe(c), e.update();
2241
+ _e(u), e.update();
2242
2242
  break;
2243
- case u.TOUCH_DOLLY_PAN:
2243
+ case c.TOUCH_DOLLY_PAN:
2244
2244
  if (e.enableZoom === !1 && e.enablePan === !1) return;
2245
- _e(c), e.update();
2245
+ Oe(u), e.update();
2246
2246
  break;
2247
- case u.TOUCH_DOLLY_ROTATE:
2247
+ case c.TOUCH_DOLLY_ROTATE:
2248
2248
  if (e.enableZoom === !1 && e.enableRotate === !1) return;
2249
- Se(c), e.update();
2249
+ Se(u), e.update();
2250
2250
  break;
2251
2251
  default:
2252
- l = u.NONE;
2252
+ l = c.NONE;
2253
2253
  }
2254
2254
  }
2255
- function Ke(c) {
2256
- e.enabled !== !1 && (e.dispatchEvent(s), l = u.NONE);
2255
+ function Ke(u) {
2256
+ e.enabled !== !1 && (e.dispatchEvent(s), l = c.NONE);
2257
2257
  }
2258
- function Ze(c) {
2259
- e.enabled !== !1 && c.preventDefault();
2258
+ function Ze(u) {
2259
+ e.enabled !== !1 && u.preventDefault();
2260
2260
  }
2261
- e.domElement.addEventListener("contextmenu", Ze, !1), e.domElement.addEventListener("mousedown", Pe, !1), e.domElement.addEventListener("wheel", De, !1), e.domElement.addEventListener("touchstart", Ie, !1), e.domElement.addEventListener("touchend", Ke, !1), e.domElement.addEventListener("touchmove", ae, !1), e.domElement.addEventListener("keydown", Re, !1), e.domElement.tabIndex === -1 && (e.domElement.tabIndex = 0), this.update();
2261
+ e.domElement.addEventListener("contextmenu", Ze, !1), e.domElement.addEventListener("mousedown", xe, !1), e.domElement.addEventListener("wheel", Ue, !1), e.domElement.addEventListener("touchstart", Ie, !1), e.domElement.addEventListener("touchend", Ke, !1), e.domElement.addEventListener("touchmove", ae, !1), e.domElement.addEventListener("keydown", Be, !1), e.domElement.tabIndex === -1 && (e.domElement.tabIndex = 0), this.update();
2262
2262
  };
2263
- We.prototype = Object.create(zt.prototype);
2264
- We.prototype.constructor = We;
2265
- var Pt = function(f, o) {
2266
- We.call(this, f, o), this.mouseButtons.LEFT = Ae.PAN, this.mouseButtons.RIGHT = Ae.ROTATE, this.touches.ONE = Me.PAN, this.touches.TWO = Me.DOLLY_ROTATE;
2263
+ qe.prototype = Object.create(qt.prototype);
2264
+ qe.prototype.constructor = qe;
2265
+ var Mt = function(f, o) {
2266
+ qe.call(this, f, o), this.mouseButtons.LEFT = Ae.PAN, this.mouseButtons.RIGHT = Ae.ROTATE, this.touches.ONE = Me.PAN, this.touches.TWO = Me.DOLLY_ROTATE;
2267
2267
  };
2268
- Pt.prototype = Object.create(zt.prototype);
2269
- Pt.prototype.constructor = Pt;
2268
+ Mt.prototype = Object.create(qt.prototype);
2269
+ Mt.prototype.constructor = Mt;
2270
2270
  var we = function(f) {
2271
- Xt.call(this), this.element = f, this.element.style.position = "absolute", this.element.style.pointerEvents = "auto", this.addEventListener("removed", function() {
2271
+ Kt.call(this), this.element = f, this.element.style.position = "absolute", this.element.style.pointerEvents = "auto", this.addEventListener("removed", function() {
2272
2272
  this.traverse(function(o) {
2273
2273
  o.element instanceof Element && o.element.parentNode !== null && o.element.parentNode.removeChild(o.element);
2274
2274
  });
2275
2275
  });
2276
2276
  };
2277
- we.prototype = Object.create(Xt.prototype);
2277
+ we.prototype = Object.create(Kt.prototype);
2278
2278
  we.prototype.constructor = we;
2279
- var lt = function(f) {
2279
+ var ct = function(f) {
2280
2280
  we.call(this, f);
2281
2281
  };
2282
- lt.prototype = Object.create(we.prototype);
2283
- lt.prototype.constructor = lt;
2284
- var Sn = function() {
2285
- var f = this, o, e, a, t, s = new vn(), u = {
2282
+ ct.prototype = Object.create(we.prototype);
2283
+ ct.prototype.constructor = ct;
2284
+ var Dn = function() {
2285
+ var f = this, o, e, a, t, s = new wn(), c = {
2286
2286
  camera: { fov: 0, style: "" },
2287
2287
  objects: /* @__PURE__ */ new WeakMap()
2288
2288
  }, l = document.createElement("div");
2289
2289
  l.style.overflow = "hidden", this.domElement = l;
2290
- var b = document.createElement("div");
2291
- b.style.WebkitTransformStyle = "preserve-3d", b.style.transformStyle = "preserve-3d", b.style.pointerEvents = "none", l.appendChild(b);
2290
+ var g = document.createElement("div");
2291
+ g.style.WebkitTransformStyle = "preserve-3d", g.style.transformStyle = "preserve-3d", g.style.pointerEvents = "none", l.appendChild(g);
2292
2292
  var d = /Trident/i.test(navigator.userAgent);
2293
2293
  this.getSize = function() {
2294
2294
  return {
2295
2295
  width: o,
2296
2296
  height: e
2297
2297
  };
2298
- }, this.setSize = function(y, g) {
2299
- o = y, e = g, a = o / 2, t = e / 2, l.style.width = y + "px", l.style.height = g + "px", b.style.width = y + "px", b.style.height = g + "px";
2298
+ }, this.setSize = function(b, y) {
2299
+ o = b, e = y, a = o / 2, t = e / 2, l.style.width = b + "px", l.style.height = y + "px", g.style.width = b + "px", g.style.height = y + "px";
2300
2300
  };
2301
- function v(y) {
2302
- return Math.abs(y) < 1e-10 ? 0 : y;
2301
+ function v(b) {
2302
+ return Math.abs(b) < 1e-10 ? 0 : b;
2303
2303
  }
2304
- function T(y) {
2305
- var g = y.elements;
2306
- return "matrix3d(" + v(g[0]) + "," + v(-g[1]) + "," + v(g[2]) + "," + v(g[3]) + "," + v(g[4]) + "," + v(-g[5]) + "," + v(g[6]) + "," + v(g[7]) + "," + v(g[8]) + "," + v(-g[9]) + "," + v(g[10]) + "," + v(g[11]) + "," + v(g[12]) + "," + v(-g[13]) + "," + v(g[14]) + "," + v(g[15]) + ")";
2304
+ function T(b) {
2305
+ var y = b.elements;
2306
+ return "matrix3d(" + v(y[0]) + "," + v(-y[1]) + "," + v(y[2]) + "," + v(y[3]) + "," + v(y[4]) + "," + v(-y[5]) + "," + v(y[6]) + "," + v(y[7]) + "," + v(y[8]) + "," + v(-y[9]) + "," + v(y[10]) + "," + v(y[11]) + "," + v(y[12]) + "," + v(-y[13]) + "," + v(y[14]) + "," + v(y[15]) + ")";
2307
2307
  }
2308
- function A(y, g) {
2309
- var x = y.elements, p = "matrix3d(" + v(x[0]) + "," + v(x[1]) + "," + v(x[2]) + "," + v(x[3]) + "," + v(-x[4]) + "," + v(-x[5]) + "," + v(-x[6]) + "," + v(-x[7]) + "," + v(x[8]) + "," + v(x[9]) + "," + v(x[10]) + "," + v(x[11]) + "," + v(x[12]) + "," + v(x[13]) + "," + v(x[14]) + "," + v(x[15]) + ")";
2310
- return d ? "translate(-50%,-50%)translate(" + a + "px," + t + "px)" + g + p : "translate(-50%,-50%)" + p;
2308
+ function A(b, y) {
2309
+ var P = b.elements, p = "matrix3d(" + v(P[0]) + "," + v(P[1]) + "," + v(P[2]) + "," + v(P[3]) + "," + v(-P[4]) + "," + v(-P[5]) + "," + v(-P[6]) + "," + v(-P[7]) + "," + v(P[8]) + "," + v(P[9]) + "," + v(P[10]) + "," + v(P[11]) + "," + v(P[12]) + "," + v(P[13]) + "," + v(P[14]) + "," + v(P[15]) + ")";
2310
+ return d ? "translate(-50%,-50%)translate(" + a + "px," + t + "px)" + y + p : "translate(-50%,-50%)" + p;
2311
2311
  }
2312
- function P(y, g, x, p) {
2313
- if (y instanceof we) {
2314
- y.onBeforeRender(f, g, x);
2312
+ function x(b, y, P, p) {
2313
+ if (b instanceof we) {
2314
+ b.onBeforeRender(f, y, P);
2315
2315
  var S;
2316
- y instanceof lt ? (s.copy(x.matrixWorldInverse), s.transpose(), s.copyPosition(y.matrixWorld), s.scale(y.scale), s.elements[3] = 0, s.elements[7] = 0, s.elements[11] = 0, s.elements[15] = 1, S = A(s, p)) : S = A(y.matrixWorld, p);
2317
- var M = y.element, ee = u.objects.get(y);
2316
+ b instanceof ct ? (s.copy(P.matrixWorldInverse), s.transpose(), s.copyPosition(b.matrixWorld), s.scale(b.scale), s.elements[3] = 0, s.elements[7] = 0, s.elements[11] = 0, s.elements[15] = 1, S = A(s, p)) : S = A(b.matrixWorld, p);
2317
+ var M = b.element, ee = c.objects.get(b);
2318
2318
  if (ee === void 0 || ee.style !== S) {
2319
2319
  M.style.WebkitTransform = S, M.style.transform = S;
2320
2320
  var Z = { style: S };
2321
- d && (Z.distanceToCameraSquared = O(x, y)), u.objects.set(y, Z);
2321
+ d && (Z.distanceToCameraSquared = _(P, b)), c.objects.set(b, Z);
2322
2322
  }
2323
- M.style.display = y.visible ? "" : "none", M.parentNode !== b && b.appendChild(M), y.onAfterRender(f, g, x);
2323
+ M.style.display = b.visible ? "" : "none", M.parentNode !== g && g.appendChild(M), b.onAfterRender(f, y, P);
2324
2324
  }
2325
- for (var te = 0, le = y.children.length; te < le; te++)
2326
- P(y.children[te], g, x, p);
2325
+ for (var te = 0, le = b.children.length; te < le; te++)
2326
+ x(b.children[te], y, P, p);
2327
2327
  }
2328
- var O = function() {
2329
- var y = new ve(), g = new ve();
2330
- return function(x, p) {
2331
- return y.setFromMatrixPosition(x.matrixWorld), g.setFromMatrixPosition(p.matrixWorld), y.distanceToSquared(g);
2328
+ var _ = function() {
2329
+ var b = new ve(), y = new ve();
2330
+ return function(P, p) {
2331
+ return b.setFromMatrixPosition(P.matrixWorld), y.setFromMatrixPosition(p.matrixWorld), b.distanceToSquared(y);
2332
2332
  };
2333
2333
  }();
2334
- function C(y) {
2335
- var g = [];
2336
- return y.traverse(function(x) {
2337
- x instanceof we && g.push(x);
2338
- }), g;
2339
- }
2340
- function L(y) {
2341
- for (var g = C(y).sort(function(M, ee) {
2342
- var Z = u.objects.get(M).distanceToCameraSquared, te = u.objects.get(ee).distanceToCameraSquared;
2334
+ function C(b) {
2335
+ var y = [];
2336
+ return b.traverse(function(P) {
2337
+ P instanceof we && y.push(P);
2338
+ }), y;
2339
+ }
2340
+ function L(b) {
2341
+ for (var y = C(b).sort(function(M, ee) {
2342
+ var Z = c.objects.get(M).distanceToCameraSquared, te = c.objects.get(ee).distanceToCameraSquared;
2343
2343
  return Z - te;
2344
- }), x = g.length, p = 0, S = g.length; p < S; p++)
2345
- g[p].element.style.zIndex = x - p;
2346
- }
2347
- this.render = function(y, g) {
2348
- var x = g.projectionMatrix.elements[5] * t;
2349
- if (u.camera.fov !== x && (g.isPerspectiveCamera ? (l.style.WebkitPerspective = x + "px", l.style.perspective = x + "px") : (l.style.WebkitPerspective = "", l.style.perspective = ""), u.camera.fov = x), y.autoUpdate === !0 && y.updateMatrixWorld(), g.parent === null && g.updateMatrixWorld(), g.isOrthographicCamera)
2350
- var p = -(g.right + g.left) / 2, S = (g.top + g.bottom) / 2;
2351
- var M = g.isOrthographicCamera ? "scale(" + x + ")translate(" + v(p) + "px," + v(S) + "px)" + T(g.matrixWorldInverse) : "translateZ(" + x + "px)" + T(g.matrixWorldInverse), ee = M + "translate(" + a + "px," + t + "px)";
2352
- u.camera.style !== ee && !d && (b.style.WebkitTransform = ee, b.style.transform = ee, u.camera.style = ee), P(y, y, g, M), d && L(y);
2344
+ }), P = y.length, p = 0, S = y.length; p < S; p++)
2345
+ y[p].element.style.zIndex = P - p;
2346
+ }
2347
+ this.render = function(b, y) {
2348
+ var P = y.projectionMatrix.elements[5] * t;
2349
+ if (c.camera.fov !== P && (y.isPerspectiveCamera ? (l.style.WebkitPerspective = P + "px", l.style.perspective = P + "px") : (l.style.WebkitPerspective = "", l.style.perspective = ""), c.camera.fov = P), b.autoUpdate === !0 && b.updateMatrixWorld(), y.parent === null && y.updateMatrixWorld(), y.isOrthographicCamera)
2350
+ var p = -(y.right + y.left) / 2, S = (y.top + y.bottom) / 2;
2351
+ var M = y.isOrthographicCamera ? "scale(" + P + ")translate(" + v(p) + "px," + v(S) + "px)" + T(y.matrixWorldInverse) : "translateZ(" + P + "px)" + T(y.matrixWorldInverse), ee = M + "translate(" + a + "px," + t + "px)";
2352
+ c.camera.style !== ee && !d && (g.style.WebkitTransform = ee, g.style.transform = ee, c.camera.style = ee), x(b, b, y, M), d && L(b);
2353
2353
  };
2354
2354
  };
2355
- function jt(f, o, e) {
2356
- var a = o.getBoundingClientRect(), t = a.top, s = a.left, u = a.width, l = a.height;
2357
- return new w.Vector2((f.x - s) / u * 2 - 1, -(f.y - t) / l * 2 + 1);
2355
+ function Xt(f, o, e) {
2356
+ var a = o.getBoundingClientRect(), t = a.top, s = a.left, c = a.width, l = a.height;
2357
+ return new w.Vector2((f.x - s) / c * 2 - 1, -(f.y - t) / l * 2 + 1);
2358
2358
  }
2359
- var In = (
2359
+ var Rn = (
2360
2360
  /** @class */
2361
2361
  function(f) {
2362
- qe(o, f);
2363
- function o(e, a, t, s, u) {
2362
+ Fe(o, f);
2363
+ function o(e, a, t, s, c) {
2364
2364
  var l = f.call(this) || this;
2365
- l.type = "RoundedBoxGeometry", u = isNaN(u) ? 1 : Math.max(1, Math.floor(u)), e = isNaN(e) ? 1 : e, a = isNaN(a) ? 1 : a, t = isNaN(t) ? 1 : t, s = isNaN(s) ? 0.15 : s, s = Math.min(s, Math.min(e, Math.min(a, Math.min(t))) / 2);
2366
- var b = e / 2 - s, d = a / 2 - s, v = t / 2 - s;
2365
+ l.type = "RoundedBoxGeometry", c = isNaN(c) ? 1 : Math.max(1, Math.floor(c)), e = isNaN(e) ? 1 : e, a = isNaN(a) ? 1 : a, t = isNaN(t) ? 1 : t, s = isNaN(s) ? 0.15 : s, s = Math.min(s, Math.min(e, Math.min(a, Math.min(t))) / 2);
2366
+ var g = e / 2 - s, d = a / 2 - s, v = t / 2 - s;
2367
2367
  l.parameters = {
2368
2368
  width: e,
2369
2369
  height: a,
2370
2370
  depth: t,
2371
2371
  radius: s,
2372
- radiusSegments: u
2372
+ radiusSegments: c
2373
2373
  };
2374
- var T = u + 1, A = T * u + 1 << 3, P = new w.BufferAttribute(new Float32Array(A * 3), 3), O = new w.BufferAttribute(new Float32Array(A * 3), 3), C = [], L = [];
2374
+ var T = c + 1, A = T * c + 1 << 3, x = new w.BufferAttribute(new Float32Array(A * 3), 3), _ = new w.BufferAttribute(new Float32Array(A * 3), 3), C = [], L = [];
2375
2375
  new w.Vector3();
2376
- var y = new w.Vector3(), g = [], x = [], p = [], S = T * u, M = T * u + 1;
2376
+ var b = new w.Vector3(), y = [], P = [], p = [], S = T * c, M = T * c + 1;
2377
2377
  ee(), te(), Z(), le(), Ce(), me();
2378
2378
  function ee() {
2379
2379
  for (var R = [
@@ -2387,31 +2387,31 @@ var In = (
2387
2387
  new w.Vector3(-1, -1, 1)
2388
2388
  ], I = 0; I < 8; I++)
2389
2389
  C.push([]), L.push([]);
2390
- for (var _ = Math.PI / 2, F = new w.Vector3(b, d, v), Y = 0; Y <= u; Y++) {
2391
- var ne = Y / u, H = ne * _, U = Math.cos(H), W = Math.sin(H);
2392
- if (Y == u) {
2393
- y.set(0, 1, 0);
2394
- var V = y.clone().multiplyScalar(s).add(F);
2395
- C[0].push(V), g.push(V);
2396
- var B = y.clone();
2397
- L[0].push(B), x.push(B);
2390
+ for (var O = Math.PI / 2, F = new w.Vector3(g, d, v), Y = 0; Y <= c; Y++) {
2391
+ var ne = Y / c, z = ne * O, U = Math.cos(z), q = Math.sin(z);
2392
+ if (Y == c) {
2393
+ b.set(0, 1, 0);
2394
+ var V = b.clone().multiplyScalar(s).add(F);
2395
+ C[0].push(V), y.push(V);
2396
+ var B = b.clone();
2397
+ L[0].push(B), P.push(B);
2398
2398
  continue;
2399
2399
  }
2400
- for (var k = 0; k <= u; k++) {
2401
- var $ = k / u, j = $ * _;
2402
- y.x = U * Math.cos(j), y.y = W, y.z = U * Math.sin(j);
2403
- var V = y.clone().multiplyScalar(s).add(F);
2404
- C[0].push(V), g.push(V);
2405
- var B = y.clone().normalize();
2406
- L[0].push(B), x.push(B);
2400
+ for (var k = 0; k <= c; k++) {
2401
+ var $ = k / c, j = $ * O;
2402
+ b.x = U * Math.cos(j), b.y = q, b.z = U * Math.sin(j);
2403
+ var V = b.clone().multiplyScalar(s).add(F);
2404
+ C[0].push(V), y.push(V);
2405
+ var B = b.clone().normalize();
2406
+ L[0].push(B), P.push(B);
2407
2407
  }
2408
2408
  }
2409
- for (var z = 1; z < 8; z++)
2409
+ for (var G = 1; G < 8; G++)
2410
2410
  for (var I = 0; I < C[0].length; I++) {
2411
- var V = C[0][I].clone().multiply(R[z]);
2412
- C[z].push(V), g.push(V);
2413
- var B = L[0][I].clone().multiply(R[z]);
2414
- L[z].push(B), x.push(B);
2411
+ var V = C[0][I].clone().multiply(R[G]);
2412
+ C[G].push(V), y.push(V);
2413
+ var B = L[0][I].clone().multiply(R[G]);
2414
+ L[G].push(B), P.push(B);
2415
2415
  }
2416
2416
  }
2417
2417
  function Z() {
@@ -2424,54 +2424,54 @@ var In = (
2424
2424
  !0,
2425
2425
  !1,
2426
2426
  !0
2427
- ], I = T * (u - 1), _ = 0; _ < 8; _++) {
2428
- for (var F = M * _, Y = 0; Y < u - 1; Y++)
2429
- for (var ne = Y * T, H = (Y + 1) * T, U = 0; U < u; U++) {
2430
- var W = U + 1, V = F + ne + U, B = F + ne + W, k = F + H + U, $ = F + H + W;
2431
- R[_] ? (p.push(V), p.push(k), p.push(B), p.push(B), p.push(k), p.push($)) : (p.push(V), p.push(B), p.push(k), p.push(B), p.push($), p.push(k));
2427
+ ], I = T * (c - 1), O = 0; O < 8; O++) {
2428
+ for (var F = M * O, Y = 0; Y < c - 1; Y++)
2429
+ for (var ne = Y * T, z = (Y + 1) * T, U = 0; U < c; U++) {
2430
+ var q = U + 1, V = F + ne + U, B = F + ne + q, k = F + z + U, $ = F + z + q;
2431
+ R[O] ? (p.push(V), p.push(k), p.push(B), p.push(B), p.push(k), p.push($)) : (p.push(V), p.push(B), p.push(k), p.push(B), p.push($), p.push(k));
2432
2432
  }
2433
- for (var U = 0; U < u; U++) {
2433
+ for (var U = 0; U < c; U++) {
2434
2434
  var V = F + I + U, B = F + I + U + 1, k = F + S;
2435
- R[_] ? (p.push(V), p.push(k), p.push(B)) : (p.push(V), p.push(B), p.push(k));
2435
+ R[O] ? (p.push(V), p.push(k), p.push(B)) : (p.push(V), p.push(B), p.push(k));
2436
2436
  }
2437
2437
  }
2438
2438
  }
2439
2439
  function te() {
2440
- var R = S, I = S + M, _ = S + M * 2, F = S + M * 3;
2441
- p.push(R), p.push(I), p.push(_), p.push(R), p.push(_), p.push(F), R = S + M * 4, I = S + M * 5, _ = S + M * 6, F = S + M * 7, p.push(R), p.push(_), p.push(I), p.push(R), p.push(F), p.push(_), R = 0, I = M, _ = M * 4, F = M * 5, p.push(R), p.push(_), p.push(I), p.push(I), p.push(_), p.push(F), R = M * 2, I = M * 3, _ = M * 6, F = M * 7, p.push(R), p.push(_), p.push(I), p.push(I), p.push(_), p.push(F), R = u, I = u + M * 3, _ = u + M * 4, F = u + M * 7, p.push(R), p.push(I), p.push(_), p.push(I), p.push(F), p.push(_), R = u + M, I = u + M * 2, _ = u + M * 5, F = u + M * 6, p.push(R), p.push(_), p.push(I), p.push(I), p.push(_), p.push(F);
2440
+ var R = S, I = S + M, O = S + M * 2, F = S + M * 3;
2441
+ p.push(R), p.push(I), p.push(O), p.push(R), p.push(O), p.push(F), R = S + M * 4, I = S + M * 5, O = S + M * 6, F = S + M * 7, p.push(R), p.push(O), p.push(I), p.push(R), p.push(F), p.push(O), R = 0, I = M, O = M * 4, F = M * 5, p.push(R), p.push(O), p.push(I), p.push(I), p.push(O), p.push(F), R = M * 2, I = M * 3, O = M * 6, F = M * 7, p.push(R), p.push(O), p.push(I), p.push(I), p.push(O), p.push(F), R = c, I = c + M * 3, O = c + M * 4, F = c + M * 7, p.push(R), p.push(I), p.push(O), p.push(I), p.push(F), p.push(O), R = c + M, I = c + M * 2, O = c + M * 5, F = c + M * 6, p.push(R), p.push(O), p.push(I), p.push(I), p.push(O), p.push(F);
2442
2442
  }
2443
2443
  function le() {
2444
2444
  for (var R = 0; R < 4; R++)
2445
- for (var I = R * M, _ = 4 * M + I, F = (R & 1) === 1, Y = 0; Y < u; Y++) {
2446
- var ne = Y + 1, H = I + Y, U = I + ne, W = _ + Y, V = _ + ne;
2447
- F ? (p.push(H), p.push(W), p.push(U), p.push(U), p.push(W), p.push(V)) : (p.push(H), p.push(U), p.push(W), p.push(U), p.push(V), p.push(W));
2445
+ for (var I = R * M, O = 4 * M + I, F = (R & 1) === 1, Y = 0; Y < c; Y++) {
2446
+ var ne = Y + 1, z = I + Y, U = I + ne, q = O + Y, V = O + ne;
2447
+ F ? (p.push(z), p.push(q), p.push(U), p.push(U), p.push(q), p.push(V)) : (p.push(z), p.push(U), p.push(q), p.push(U), p.push(V), p.push(q));
2448
2448
  }
2449
2449
  }
2450
2450
  function me() {
2451
- for (var R = [0, 2, 4, 6], I = [1, 3, 5, 7], _ = 0; _ < 4; _++)
2452
- for (var F = M * R[_], Y = M * I[_], ne = 1 >= _, H = 0; H < u; H++) {
2453
- var U = H * T, W = (H + 1) * T, V = F + U, B = F + W, k = Y + U, $ = Y + W;
2451
+ for (var R = [0, 2, 4, 6], I = [1, 3, 5, 7], O = 0; O < 4; O++)
2452
+ for (var F = M * R[O], Y = M * I[O], ne = 1 >= O, z = 0; z < c; z++) {
2453
+ var U = z * T, q = (z + 1) * T, V = F + U, B = F + q, k = Y + U, $ = Y + q;
2454
2454
  ne ? (p.push(V), p.push(k), p.push(B), p.push(B), p.push(k), p.push($)) : (p.push(V), p.push(B), p.push(k), p.push(B), p.push($), p.push(k));
2455
2455
  }
2456
2456
  }
2457
2457
  function Ce() {
2458
- for (var R = u - 1, I = [0, 1, 4, 5], _ = [3, 2, 7, 6], F = [0, 1, 1, 0], Y = 0; Y < 4; Y++)
2459
- for (var ne = I[Y] * M, H = _[Y] * M, U = 0; U <= R; U++) {
2460
- var W = ne + u + U * T, V = ne + (U != R ? u + (U + 1) * T : M - 1), B = H + u + U * T, k = H + (U != R ? u + (U + 1) * T : M - 1);
2461
- F[Y] ? (p.push(W), p.push(B), p.push(V), p.push(V), p.push(B), p.push(k)) : (p.push(W), p.push(V), p.push(B), p.push(V), p.push(k), p.push(B));
2458
+ for (var R = c - 1, I = [0, 1, 4, 5], O = [3, 2, 7, 6], F = [0, 1, 1, 0], Y = 0; Y < 4; Y++)
2459
+ for (var ne = I[Y] * M, z = O[Y] * M, U = 0; U <= R; U++) {
2460
+ var q = ne + c + U * T, V = ne + (U != R ? c + (U + 1) * T : M - 1), B = z + c + U * T, k = z + (U != R ? c + (U + 1) * T : M - 1);
2461
+ F[Y] ? (p.push(q), p.push(B), p.push(V), p.push(V), p.push(B), p.push(k)) : (p.push(q), p.push(V), p.push(B), p.push(V), p.push(k), p.push(B));
2462
2462
  }
2463
2463
  }
2464
- for (var re = 0, ie = 0; ie < g.length; ie++)
2465
- P.setXYZ(re, g[ie].x, g[ie].y, g[ie].z), O.setXYZ(re, x[ie].x, x[ie].y, x[ie].z), re++;
2466
- return l.setIndex(new w.BufferAttribute(new Uint16Array(p), 1)), l.setAttribute("position", P), l.setAttribute("normal", O), l;
2464
+ for (var re = 0, ie = 0; ie < y.length; ie++)
2465
+ x.setXYZ(re, y[ie].x, y[ie].y, y[ie].z), _.setXYZ(re, P[ie].x, P[ie].y, P[ie].z), re++;
2466
+ return l.setIndex(new w.BufferAttribute(new Uint16Array(p), 1)), l.setAttribute("position", x), l.setAttribute("normal", _), l;
2467
2467
  }
2468
2468
  return o;
2469
2469
  }(w.BufferGeometry)
2470
2470
  );
2471
- function Ye(f, o) {
2471
+ function ze(f, o) {
2472
2472
  return typeof f != "number" || typeof o != "number" ? !1 : Math.abs(f - o) < 1e-3;
2473
2473
  }
2474
- function je(f, o, e, a) {
2474
+ function Ge(f, o, e, a) {
2475
2475
  a === void 0 && (a = function(s) {
2476
2476
  return s;
2477
2477
  });
@@ -2479,11 +2479,11 @@ function je(f, o, e, a) {
2479
2479
  return f * (1 - t) + o * t;
2480
2480
  }
2481
2481
  var J = Number((Math.PI / 2).toFixed(5));
2482
- function Nn(f, o, e) {
2482
+ function Fn(f, o, e) {
2483
2483
  var a = new w.Shape();
2484
2484
  return a.moveTo(e, 0), a.lineTo(f - e, 0), a.absarc(f - e, e, e, -J, 0, !1), a.lineTo(f, o - e), a.absarc(f - e, o - e, e, 0, J, !1), a.lineTo(e, o), a.absarc(e, o - e, e, J, Math.PI, !1), a.lineTo(0, e), a.absarc(e, e, e, Math.PI, Math.PI * 1.5, !1), a;
2485
2485
  }
2486
- var He = function(f) {
2486
+ var Xe = function(f) {
2487
2487
  var o = document.createElement("div");
2488
2488
  o.innerText = f;
2489
2489
  var e = new we(o);
@@ -2496,40 +2496,40 @@ var He = function(f) {
2496
2496
  t.innerText = f;
2497
2497
  var s = new we(t);
2498
2498
  return s.name = f, s.scale.set(0.3, 0.3, 0.3), t.style.color = "#ffffff", t.style.opacity = "0.5", t.style.pointerEvents = "none", t.style.backfaceVisibility = "hidden", a.rotateX(-J), a.add(s), a;
2499
- }, kn = (
2499
+ }, Un = (
2500
2500
  /** @class */
2501
2501
  function(f) {
2502
- qe(o, f);
2502
+ Fe(o, f);
2503
2503
  function o(e, a) {
2504
2504
  var t = f.call(this, e) || this;
2505
- t.camera = new dn(90), t.scene = new w.Scene(), t.renderer = new w.WebGLRenderer({ antialias: !0, alpha: !0 }), t.css3drenderer = new Sn(), t.ambientLight = new w.AmbientLight(16777215, 0.7), t.wrapper = document.createElement("div"), t.arrows = document.createElement("div"), t.arrowLeft = document.createElement("div"), t.arrowRight = document.createElement("div"), t.arrowFront = document.createElement("div"), t.arrowBack = document.createElement("div"), t.arrowTop = document.createElement("div"), t.arrowBottom = document.createElement("div"), t.spherical = null, t.dragging = !1, t.style = document.createElement("style"), t.directionalLight = new w.DirectionalLight(16777215, 0.2), t.box = new w.Mesh(new In(8, 8, 8, 0.5, 20), new w.MeshPhongMaterial({ color: 16777215 })), t.faces = new w.Group(), t.orient = function(l) {
2506
- var b = l.longitude, d = l.latitude;
2505
+ t.camera = new bn(90), t.scene = new w.Scene(), t.renderer = new w.WebGLRenderer({ antialias: !0, alpha: !0 }), t.css3drenderer = new Dn(), t.ambientLight = new w.AmbientLight(16777215, 0.7), t.wrapper = document.createElement("div"), t.arrows = document.createElement("div"), t.arrowLeft = document.createElement("div"), t.arrowRight = document.createElement("div"), t.arrowFront = document.createElement("div"), t.arrowBack = document.createElement("div"), t.arrowTop = document.createElement("div"), t.arrowBottom = document.createElement("div"), t.spherical = null, t.dragging = !1, t.style = document.createElement("style"), t.directionalLight = new w.DirectionalLight(16777215, 0.2), t.box = new w.Mesh(new Rn(8, 8, 8, 0.5, 20), new w.MeshPhongMaterial({ color: 16777215 })), t.faces = new w.Group(), t.orient = function(l) {
2506
+ var g = l.longitude, d = l.latitude;
2507
2507
  t.dragging = !1, t.spherical = null, t.controls.enableDamping = !1, t.five.setState(Object.assign({
2508
2508
  latitude: d
2509
- }, b !== void 0 ? {
2510
- longitude: b + t.config.fixedLongitude
2509
+ }, g !== void 0 ? {
2510
+ longitude: g + t.config.fixedLongitude
2511
2511
  } : {})), t.five.ready().then(function() {
2512
2512
  t.controls.enableDamping = !0, t.setState({ arrowsVisible: !0 });
2513
2513
  });
2514
2514
  }, t.onRenderFrame = function() {
2515
- var l, b, d, v, T;
2515
+ var l, g, d, v, T;
2516
2516
  if (t.renderer.render(t.scene, t.camera), t.css3drenderer.render(t.scene, t.camera), t.directionalLight.position.copy(t.camera.position), (l = t.controls) === null || l === void 0 || l.update(), t.dragging) {
2517
2517
  t.camera.computePose(), t.updateByCamera();
2518
- var A = t.camera.pose, P = A.longitude, O = A.latitude;
2519
- t.five.setState({ longitude: P, latitude: O }, !0), t.updateArrows({ longitude: P, latitude: O });
2520
- } else if (t.spherical && (!Ye(t.spherical.pi, (b = t.controls) === null || b === void 0 ? void 0 : b.getPolarAngle()) || !Ye(t.spherical.theta, (d = t.controls) === null || d === void 0 ? void 0 : d.getAzimuthalAngle()))) {
2518
+ var A = t.camera.pose, x = A.longitude, _ = A.latitude;
2519
+ t.five.setState({ longitude: x, latitude: _ }, !0), t.updateArrows({ longitude: x, latitude: _ });
2520
+ } else if (t.spherical && (!ze(t.spherical.pi, (g = t.controls) === null || g === void 0 ? void 0 : g.getPolarAngle()) || !ze(t.spherical.theta, (d = t.controls) === null || d === void 0 ? void 0 : d.getAzimuthalAngle()))) {
2521
2521
  t.spherical = { pi: (v = t.controls) === null || v === void 0 ? void 0 : v.getPolarAngle(), theta: (T = t.controls) === null || T === void 0 ? void 0 : T.getAzimuthalAngle() }, t.camera.computePose(), t.updateByCamera();
2522
- var C = t.camera.pose, P = C.longitude, O = C.latitude;
2523
- t.five.setState({ longitude: P, latitude: O }, !0), t.updateArrows({ longitude: P, latitude: O });
2522
+ var C = t.camera.pose, x = C.longitude, _ = C.latitude;
2523
+ t.five.setState({ longitude: x, latitude: _ }, !0), t.updateArrows({ longitude: x, latitude: _ });
2524
2524
  } else
2525
2525
  t.spherical = null;
2526
2526
  }, t.onTapGesture = function(l) {
2527
- var b = l.pointers[0].clientX, d = l.pointers[0].clientY, v = jt({ x: b, y: d }, t.wrapper), T = new w.Raycaster();
2527
+ var g = l.pointers[0].clientX, d = l.pointers[0].clientY, v = Xt({ x: g, y: d }, t.wrapper), T = new w.Raycaster();
2528
2528
  T.setFromCamera(v, t.camera);
2529
2529
  var A = T.intersectObjects(t.faces.children, !1)[0];
2530
2530
  if (A) {
2531
- var P = A.object.userData, O = P.longitude, C = P.latitude;
2532
- t.orient({ longitude: O, latitude: C });
2531
+ var x = A.object.userData, _ = x.longitude, C = x.latitude;
2532
+ t.orient({ longitude: _, latitude: C });
2533
2533
  }
2534
2534
  }, t.onFiveWantsGesture = function() {
2535
2535
  if (t.spherical)
@@ -2537,17 +2537,17 @@ var He = function(f) {
2537
2537
  }, t.onFiveModeChange = function(l) {
2538
2538
  t.controls && (t.controls.maxPolarAngle = l === "Topview" ? 0 : J);
2539
2539
  }, t.onCameraUpdate = function(l) {
2540
- var b = l.state;
2540
+ var g = l.state;
2541
2541
  if (!t.dragging && !t.spherical) {
2542
- var d = b.longitude, v = b.latitude;
2542
+ var d = g.longitude, v = g.latitude;
2543
2543
  t.camera.pose.longitude === d && t.camera.pose.latitude === v || (t.camera.setFromPose({ longitude: d, latitude: v, distance: 20, offset: new w.Vector3(0, 0, 0) }), t.updateByCamera(), t.updateArrows({ longitude: d, latitude: v }));
2544
2544
  }
2545
2545
  }, t.onPanStart = function(l) {
2546
2546
  t.dragging = !0, t.spherical = {};
2547
2547
  }, t.onMouseMove = function(l) {
2548
2548
  if (!t.dragging) {
2549
- var b = jt({ x: l.clientX, y: l.clientY }, t.wrapper), d = new w.Raycaster();
2550
- d.setFromCamera(b, t.camera);
2549
+ var g = Xt({ x: l.clientX, y: l.clientY }, t.wrapper), d = new w.Raycaster();
2550
+ d.setFromCamera(g, t.camera);
2551
2551
  var v = d.intersectObjects(t.faces.children, !1)[0];
2552
2552
  t.faces.children.forEach(function(T) {
2553
2553
  T.material.opacity = 0, T.children[0].element.style.color = "";
@@ -2564,8 +2564,8 @@ var He = function(f) {
2564
2564
  arrowsVisible: !1
2565
2565
  };
2566
2566
  t.state = Object.assign(s, a == null ? void 0 : a.initialState);
2567
- var u = q({ fixedLongitude: 0, orthoView: !0 }, a == null ? void 0 : a.config);
2568
- return t._config = u, t.state.enabled && t._enable({ userAction: !1 }), t.mc = new Tt.Manager(t.wrapper), t.mc.add(new Tt.Tap({ interval: 410 })), t.mc.add(new Tt.Pan({ threshold: 10, pointers: 0 })), t.camera.setFromPose({
2567
+ var c = H({ fixedLongitude: 0, orthoView: !0 }, a == null ? void 0 : a.config);
2568
+ return t._config = c, t.state.enabled && t._enable({ userAction: !1 }), t.mc = new wt.Manager(t.wrapper), t.mc.add(new wt.Tap({ interval: 410 })), t.mc.add(new wt.Pan({ threshold: 10, pointers: 0 })), t.camera.setFromPose({
2569
2569
  distance: 20,
2570
2570
  offset: new w.Vector3(0, 0, 0),
2571
2571
  longitude: e.camera.pose.latitude,
@@ -2619,13 +2619,13 @@ var He = function(f) {
2619
2619
  }
2620
2620
  return Object.defineProperty(o.prototype, "config", {
2621
2621
  get: function() {
2622
- return q({}, this._config);
2622
+ return H({}, this._config);
2623
2623
  },
2624
2624
  enumerable: !1,
2625
2625
  configurable: !0
2626
2626
  }), o.prototype.updateState = function(e, a) {
2627
2627
  var t = this.state;
2628
- this.state = q(q({}, this.state), e), typeof e.arrowsVisible == "boolean" && this.handleArrowsVisible(e.arrowsVisible), this.hooks.emit("stateChange", { state: this.state, prevState: t, userAction: a });
2628
+ this.state = H(H({}, this.state), e), typeof e.arrowsVisible == "boolean" && this.handleArrowsVisible(e.arrowsVisible), this.hooks.emit("stateChange", { state: this.state, prevState: t, userAction: a });
2629
2629
  }, o.prototype.appendTo = function(e) {
2630
2630
  if (e) {
2631
2631
  e.appendChild(this.wrapper);
@@ -2642,8 +2642,8 @@ var He = function(f) {
2642
2642
  t.position.set(19, 0, 0), e.add(t);
2643
2643
  var s = it("北");
2644
2644
  s.position.set(0, 0, -19), e.add(s);
2645
- var u = it("南");
2646
- u.position.set(0, 0, 19), e.add(u), this.updateByCamera(), this.scene.add(e, this.box, this.faces), this.scene.rotation.y = this.config.fixedLongitude;
2645
+ var c = it("南");
2646
+ c.position.set(0, 0, 19), e.add(c), this.updateByCamera(), this.scene.add(e, this.box, this.faces), this.scene.rotation.y = this.config.fixedLongitude;
2647
2647
  }, o.prototype.initDom = function() {
2648
2648
  this.style.innerHTML = `
2649
2649
  .OrientationPlugin .OrientationArrows {
@@ -2762,21 +2762,21 @@ var He = function(f) {
2762
2762
  }, o.prototype.unbindEvents = function() {
2763
2763
  this.five.off("renderFrame", this.onRenderFrame), this.five.off("camera.update", this.onCameraUpdate), this.five.off("wantsGesture", this.onFiveWantsGesture), this.five.off("modeChange", this.onFiveModeChange), this.mc.off("tap", this.onTapGesture), this.mc.off("panstart", this.onPanStart), this.mc.off("panend", this.onPanEnd), this.wrapper.removeEventListener("mousemove", this.onMouseMove), this.arrowTop.onclick = null, this.arrowLeft.onclick = null, this.arrowRight.onclick = null, this.arrowFront.onclick = null, this.arrowBack.onclick = null;
2764
2764
  }, o.prototype.updateByCamera = function() {
2765
- var e = je(0.2, 1, this.camera.pose.latitude / Math.PI * 2, function(l) {
2765
+ var e = Ge(0.2, 1, this.camera.pose.latitude / Math.PI * 2, function(l) {
2766
2766
  return l * l;
2767
- }), a = je(11, 13, this.camera.pose.latitude / Math.PI * 2, function(l) {
2767
+ }), a = Ge(11, 13, this.camera.pose.latitude / Math.PI * 2, function(l) {
2768
2768
  return l * l;
2769
- }), t = je(12, 15, this.camera.pose.latitude / Math.PI * 2, function(l) {
2769
+ }), t = Ge(12, 15, this.camera.pose.latitude / Math.PI * 2, function(l) {
2770
2770
  return l * l;
2771
- }), s = je(13, 19, this.camera.pose.latitude / Math.PI * 2, function(l) {
2771
+ }), s = Ge(13, 19, this.camera.pose.latitude / Math.PI * 2, function(l) {
2772
2772
  return l * l;
2773
- }), u = je(-0.2, 0.5, this.camera.pose.latitude / Math.PI * 2, function(l) {
2773
+ }), c = Ge(-0.2, 0.5, this.camera.pose.latitude / Math.PI * 2, function(l) {
2774
2774
  return l * l;
2775
2775
  });
2776
2776
  this.cylinder.geometry = new w.CylinderGeometry(a, t, 0.01, 50, 1, !0), this.cylinder.material.uniforms.radiusTop.value = a, this.cylinder.material.uniforms.radiusBottom.value = t, this.cylinder.material.needsUpdate = !0, this.cylinder.children.forEach(function(l) {
2777
2777
  l.position.normalize().multiplyScalar(s), l.scale.set(e, e, e);
2778
- var b = l.children[0];
2779
- b && (b.element.style.opacity = u.toString());
2778
+ var g = l.children[0];
2779
+ g && (g.element.style.opacity = c.toString());
2780
2780
  });
2781
2781
  }, o.prototype.updateArrows = function(e) {
2782
2782
  e.longitude;
@@ -2786,8 +2786,8 @@ var He = function(f) {
2786
2786
  var a = this;
2787
2787
  if (this.state.enabled)
2788
2788
  if (this.cylinder.material.uniforms.opacity.value = e ? 0.4 : 1, this.cylinder.material.needsUpdate = !0, e) {
2789
- var t = this.five.getCurrentState(), s = t.longitude, u = t.latitude;
2790
- if (J - u < 0.03)
2789
+ var t = this.five.getCurrentState(), s = t.longitude, c = t.latitude;
2790
+ if (J - c < 0.03)
2791
2791
  this.five.state.mode === "Topview" || this.five.state.mode === "Mapview" ? (this.faces.getObjectByName("上").element.className = "active", this.arrows.innerHTML = "", this.arrows.appendChild(this.arrowBack), this.arrows.appendChild(this.arrowLeft), this.arrows.appendChild(this.arrowRight), this.arrows.appendChild(this.arrowFront), this.arrows.style.transform = "rotate(".concat((s - this.config.fixedLongitude) / Math.PI * 180, "deg)")) : (this.arrows.innerHTML = "", this.faces.getObjectByName("上").element.className = "");
2792
2792
  else {
2793
2793
  switch (this.arrows.innerHTML = "", this.arrows.appendChild(this.arrowTop), this.config.orthoView && this.five.ready().then(function() {
@@ -2795,13 +2795,13 @@ var He = function(f) {
2795
2795
  return a.five.controller.cameraMotion.ended = !1;
2796
2796
  });
2797
2797
  }), !0) {
2798
- case Ye(0, s - this.config.fixedLongitude):
2798
+ case ze(0, s - this.config.fixedLongitude):
2799
2799
  this.arrows.appendChild(this.arrowLeft), this.arrows.appendChild(this.arrowRight), this.arrows.appendChild(this.arrowBottom), this.faces.getObjectByName("前").element.className = "active";
2800
2800
  break;
2801
- case Ye(J, s - this.config.fixedLongitude):
2801
+ case ze(J, s - this.config.fixedLongitude):
2802
2802
  this.arrows.appendChild(this.arrowFront), this.arrows.appendChild(this.arrowBack), this.arrows.appendChild(this.arrowBottom), this.faces.getObjectByName("右").element.className = "active";
2803
2803
  break;
2804
- case Ye(Math.PI, s - this.config.fixedLongitude):
2804
+ case ze(Math.PI, s - this.config.fixedLongitude):
2805
2805
  this.arrows.appendChild(this.arrowRight), this.arrows.appendChild(this.arrowLeft), this.arrows.appendChild(this.arrowBottom), this.faces.getObjectByName("后").element.className = "active";
2806
2806
  break;
2807
2807
  default:
@@ -2821,30 +2821,30 @@ var He = function(f) {
2821
2821
  a === void 0 && (a = {});
2822
2822
  var t = this.state, s = a.userAction !== void 0 ? a.userAction : !0;
2823
2823
  if (this.updateState(e, s), e.enabled !== void 0 && t.enabled !== e.enabled) {
2824
- var u = { userAction: s };
2825
- e.enabled ? this._enable(u) : this._disable(u);
2824
+ var c = { userAction: s };
2825
+ e.enabled ? this._enable(c) : this._disable(c);
2826
2826
  }
2827
2827
  }, o.prototype.initLights = function() {
2828
2828
  this.directionalLight.target = this.box, this.scene.add(this.ambientLight, this.directionalLight);
2829
2829
  }, o.prototype.initFaces = function() {
2830
- var e = Nn(7, 7, 0.5), a = new w.ShapeGeometry(e);
2830
+ var e = Fn(7, 7, 0.5), a = new w.ShapeGeometry(e);
2831
2831
  a.translate(-3.5, -3.5, 0);
2832
2832
  var t = new w.Mesh(a, new w.MeshBasicMaterial({ transparent: !0, color: 3370495, opacity: 0 }));
2833
- t.userData = { longitude: 0, latitude: 0 }, t.position.z = 4.1, t.add(He("前"));
2833
+ t.userData = { longitude: 0, latitude: 0 }, t.position.z = 4.1, t.add(Xe("前"));
2834
2834
  var s = new w.Mesh(a, new w.MeshBasicMaterial({ transparent: !0, color: 3370495, opacity: 0 }));
2835
- s.rotateY(Math.PI), s.position.z = -4.1, s.add(He("后")), s.userData = { longitude: Math.PI, latitude: 0 };
2836
- var u = new w.Mesh(a, new w.MeshBasicMaterial({ transparent: !0, color: 3370495, opacity: 0 }));
2837
- u.rotateY(J), u.position.x = 4.1, u.add(He("右")), u.userData = { longitude: J, latitude: 0 };
2835
+ s.rotateY(Math.PI), s.position.z = -4.1, s.add(Xe("后")), s.userData = { longitude: Math.PI, latitude: 0 };
2836
+ var c = new w.Mesh(a, new w.MeshBasicMaterial({ transparent: !0, color: 3370495, opacity: 0 }));
2837
+ c.rotateY(J), c.position.x = 4.1, c.add(Xe("右")), c.userData = { longitude: J, latitude: 0 };
2838
2838
  var l = new w.Mesh(a, new w.MeshBasicMaterial({ transparent: !0, color: 3370495, opacity: 0 }));
2839
- l.rotateY(-J), l.position.x = -4.1, l.add(He("左")), l.userData = { longitude: -J, latitude: 0 };
2840
- var b = new w.Mesh(a, new w.MeshBasicMaterial({ transparent: !0, color: 3370495, opacity: 0 }));
2841
- b.rotateX(-J), b.position.y = 4.1, b.add(He("上")), b.userData = { longitude: 0, latitude: J }, this.faces.add(t, s, l, u, b);
2839
+ l.rotateY(-J), l.position.x = -4.1, l.add(Xe("左")), l.userData = { longitude: -J, latitude: 0 };
2840
+ var g = new w.Mesh(a, new w.MeshBasicMaterial({ transparent: !0, color: 3370495, opacity: 0 }));
2841
+ g.rotateX(-J), g.position.y = 4.1, g.add(Xe("上")), g.userData = { longitude: 0, latitude: J }, this.faces.add(t, s, l, c, g);
2842
2842
  }, o.prototype.initControls = function() {
2843
- var e = this.controls = new We(this.camera, this.renderer.domElement);
2843
+ var e = this.controls = new qe(this.camera, this.renderer.domElement);
2844
2844
  e.enableZoom = !1, e.enableDamping = !0, e.enablePan = !1, e.maxPolarAngle = J, e.dampingFactor = 0.15, e.rotateSpeed = 0.25;
2845
2845
  }, o.prototype.load = function(e) {
2846
- return Xe(this, void 0, void 0, function() {
2847
- return Ge(this, function(a) {
2846
+ return De(this, void 0, void 0, function() {
2847
+ return Re(this, function(a) {
2848
2848
  return [
2849
2849
  2
2850
2850
  /*return*/
@@ -2869,44 +2869,44 @@ var He = function(f) {
2869
2869
  this.updateState({ enabled: !1 }, t), this._disable({ userAction: t }), document.head.removeChild(this.style);
2870
2870
  }
2871
2871
  }, o;
2872
- }(ze.Controller)
2873
- ), Vn = function(f, o) {
2874
- return new kn(f, o);
2875
- }, Ln = (
2872
+ }(We.Controller)
2873
+ ), Kn = function(f, o) {
2874
+ return new Un(f, o);
2875
+ }, Bn = (
2876
2876
  /** @class */
2877
2877
  function(f) {
2878
- qe(o, f);
2878
+ Fe(o, f);
2879
2879
  function o(e, a) {
2880
2880
  var t = f.call(this, e) || this;
2881
2881
  return t.data = {}, t.pluginName = "BackgroundPlugin", t._onFiveCameraUpdate = function(s) {
2882
- var u = (Math.PI / 2 - Math.max(s.latitude, 0)) / (Math.PI / 2), l = Math.max(0.2 - u, 0) * 10;
2883
- t.gradientBg && (t.gradientBg.style.transform = "translateY(-".concat((1 - u) * 50, "%)")), t.groundBg && (t.groundBg.style.backgroundImage = "radial-gradient(circle, #2E303350 ".concat(l * 100, "%, transparent ").concat(l * 120, "%)"));
2882
+ var c = (Math.PI / 2 - Math.max(s.latitude, 0)) / (Math.PI / 2), l = Math.max(0.2 - c, 0) * 10;
2883
+ t.gradientBg && (t.gradientBg.style.transform = "translateY(-".concat((1 - c) * 50, "%)")), t.groundBg && (t.groundBg.style.backgroundImage = "radial-gradient(circle, #2E303350 ".concat(l * 100, "%, transparent ").concat(l * 120, "%)"));
2884
2884
  }, t._addEventListener = function() {
2885
2885
  t.five.on("cameraUpdate", t._onFiveCameraUpdate);
2886
2886
  }, t._removeEventListener = function() {
2887
2887
  t.five.off("cameraUpdate", t._onFiveCameraUpdate);
2888
2888
  }, t.load = function() {
2889
- return Xe(t, void 0, void 0, function() {
2890
- return Ge(this, function(s) {
2889
+ return De(t, void 0, void 0, function() {
2890
+ return Re(this, function(s) {
2891
2891
  return [
2892
2892
  2
2893
2893
  /*return*/
2894
2894
  ];
2895
2895
  });
2896
2896
  });
2897
- }, t.setState = function(s, u) {
2897
+ }, t.setState = function(s, c) {
2898
2898
  }, t.enable = function() {
2899
- var s, u = (s = t.five.getElement()) === null || s === void 0 ? void 0 : s.parentNode;
2900
- if (!u) {
2899
+ var s, c = (s = t.five.getElement()) === null || s === void 0 ? void 0 : s.parentNode;
2900
+ if (!c) {
2901
2901
  t.five.ready().then(function() {
2902
2902
  return t.enable();
2903
2903
  });
2904
2904
  return;
2905
2905
  }
2906
- t.state.enabled || (t._onFiveCameraUpdate(t.five.getPose(), !1), t.gradientBg && u.appendChild(t.gradientBg), t.groundBg && u.appendChild(t.groundBg), t.style && document.head.appendChild(t.style), t._addEventListener(), t.hooks.emit("enable", { userAction: !0 }), t.state.enabled = !0);
2906
+ t.state.enabled || (t._onFiveCameraUpdate(t.five.getPose(), !1), t.gradientBg && c.appendChild(t.gradientBg), t.groundBg && c.appendChild(t.groundBg), t.style && document.head.appendChild(t.style), t._addEventListener(), t.hooks.emit("enable", { userAction: !0 }), t.state.enabled = !0);
2907
2907
  }, t.disable = function(s) {
2908
- var u, l, b, d;
2909
- t.state.enabled && ((l = (u = t.gradientBg) === null || u === void 0 ? void 0 : u.parentNode) === null || l === void 0 || l.removeChild(t.gradientBg), (d = (b = t.groundBg) === null || b === void 0 ? void 0 : b.parentNode) === null || d === void 0 || d.removeChild(t.groundBg), t.style && document.head.removeChild(t.style), t._removeEventListener(), t.hooks.emit("disable", { userAction: !0 }), t.state.enabled = !1);
2908
+ var c, l, g, d;
2909
+ t.state.enabled && ((l = (c = t.gradientBg) === null || c === void 0 ? void 0 : c.parentNode) === null || l === void 0 || l.removeChild(t.gradientBg), (d = (g = t.groundBg) === null || g === void 0 ? void 0 : g.parentNode) === null || d === void 0 || d.removeChild(t.groundBg), t.style && document.head.removeChild(t.style), t._removeEventListener(), t.hooks.emit("disable", { userAction: !0 }), t.state.enabled = !1);
2910
2910
  }, t.dispose = function() {
2911
2911
  t._removeEventListener(), t.hooks.emit("disable", { userAction: !0 }), t.state.enabled = !1;
2912
2912
  }, t.state = {
@@ -2935,9 +2935,9 @@ var He = function(f) {
2935
2935
  `, t.enable()), t;
2936
2936
  }
2937
2937
  return o;
2938
- }(mn.Controller)
2939
- ), Yn = function(f, o) {
2940
- return new Ln(f, o);
2938
+ }(Zt.Controller)
2939
+ ), Zn = function(f, o) {
2940
+ return new Bn(f, o);
2941
2941
  };
2942
2942
  new w.Matrix4().fromArray([
2943
2943
  1,
@@ -2957,7 +2957,7 @@ new w.Matrix4().fromArray([
2957
2957
  0,
2958
2958
  1
2959
2959
  ]);
2960
- var wt = (
2960
+ var Et = (
2961
2961
  /** @class */
2962
2962
  function() {
2963
2963
  function f(o, e, a, t, s) {
@@ -2973,10 +2973,10 @@ var wt = (
2973
2973
  return this.x;
2974
2974
  }, f;
2975
2975
  }()
2976
- ), Dn = (
2976
+ ), Vn = (
2977
2977
  /** @class */
2978
2978
  function(f) {
2979
- qe(o, f);
2979
+ Fe(o, f);
2980
2980
  function o(e, a) {
2981
2981
  var t = f.call(this, e) || this;
2982
2982
  t.dispose = function() {
@@ -2987,8 +2987,8 @@ var wt = (
2987
2987
  visible: !0
2988
2988
  };
2989
2989
  t.state = Object.assign(s, a == null ? void 0 : a.initialState);
2990
- var u = q({}, a == null ? void 0 : a.config);
2991
- return t._config = u, t.state.enabled && t._enable({ userAction: !1 }), t.cancelAnimation = null, t.skipStart = 0, t.skipEnd = 0, t.location = 0, t.totalDistance = 0, t.trajectory = null, t.currentKeyFrame = null, t.nextKeyframe = null, t.nextButOneKeyframe = null, t.keyframes = [], t.rate = t.config.rate || 1, t.virualCamera = t.five.camera.clone(), t.playingState = {
2990
+ var c = H({}, a == null ? void 0 : a.config);
2991
+ return t._config = c, t.state.enabled && t._enable({ userAction: !1 }), t.cancelAnimation = null, t.skipStart = 0, t.skipEnd = 0, t.location = 0, t.totalDistance = 0, t.trajectory = null, t.currentKeyFrame = null, t.nextKeyframe = null, t.nextButOneKeyframe = null, t.keyframes = [], t.rate = t.config.rate || 1, t.virualCamera = t.five.camera.clone(), t.playingState = {
2992
2992
  keyframeIndex: null,
2993
2993
  progress: null
2994
2994
  }, Object.defineProperties(t, {
@@ -3004,16 +3004,16 @@ var wt = (
3004
3004
  }
3005
3005
  return Object.defineProperty(o.prototype, "config", {
3006
3006
  get: function() {
3007
- return q({}, this._config);
3007
+ return H({}, this._config);
3008
3008
  },
3009
3009
  enumerable: !1,
3010
3010
  configurable: !0
3011
3011
  }), o.prototype.updateState = function(e, a) {
3012
3012
  var t = this.state;
3013
- this.state = q(q({}, this.state), e), this.hooks.emit("stateChange", { state: this.state, prevState: t, userAction: a });
3013
+ this.state = H(H({}, this.state), e), this.hooks.emit("stateChange", { state: this.state, prevState: t, userAction: a });
3014
3014
  }, o.prototype.load = function(e) {
3015
- return Xe(this, void 0, void 0, function() {
3016
- return Ge(this, function(a) {
3015
+ return De(this, void 0, void 0, function() {
3016
+ return Re(this, function(a) {
3017
3017
  return [
3018
3018
  2
3019
3019
  /*return*/
@@ -3022,23 +3022,23 @@ var wt = (
3022
3022
  });
3023
3023
  }, o.prototype.loadTrajectory = function(e) {
3024
3024
  this.trajectory = e, this.cancelAnimation && this.cancelAnimation(), this.playingState.keyframeIndex = null, this.playingState.progress = null;
3025
- var a = 0.01, t = 0.1, s = 1, u = 0, l = 1, b = new wt(a, t, s, u, l), d = new wt(a, t, s, u, l), v = new wt(a, t, s, u, l);
3025
+ var a = 0.01, t = 0.1, s = 1, c = 0, l = 1, g = new Et(a, t, s, c, l), d = new Et(a, t, s, c, l), v = new Et(a, t, s, c, l);
3026
3026
  if (this.trajectory && this.trajectory.content.loadState === "READY") {
3027
- for (var T = this.trajectory.content.data.positionArray, A = new Float32Array(T.length / 3), P = 0; P < A.length; P++)
3028
- if (P === 0)
3029
- A[P] = 0;
3027
+ for (var T = this.trajectory.content.data.positionArray, A = new Float32Array(T.length / 3), x = 0; x < A.length; x++)
3028
+ if (x === 0)
3029
+ A[x] = 0;
3030
3030
  else {
3031
- var O = new w.Vector3(T[P - 3], T[P - 2], T[P - 1]), C = new w.Vector3(T[P], T[P + 1], T[P + 2]);
3032
- A[P] = C.distanceTo(O) + A[P - 1];
3031
+ var _ = new w.Vector3(T[x - 3], T[x - 2], T[x - 1]), C = new w.Vector3(T[x], T[x + 1], T[x + 2]);
3032
+ A[x] = C.distanceTo(_) + A[x - 1];
3033
3033
  }
3034
3034
  this.totalDistance = A[A.length - 1];
3035
- for (var P = 0; P < A.length; P++) {
3036
- for (var L = new w.Vector3(0, 0, 0), y = 0, g = P - 5; g < P + 6; g++)
3037
- g >= 0 && g < A.length && (L.add(new w.Vector3(T[g * 3], T[g * 3 + 1], T[g * 3 + 2])), y++);
3038
- L.divideScalar(y).applyMatrix4(e.transform);
3039
- var x = b.filter(L.x), p = d.filter(L.y), S = v.filter(L.z), M = {
3040
- position: new w.Vector3(x, p, S),
3041
- location: A[P]
3035
+ for (var x = 0; x < A.length; x++) {
3036
+ for (var L = new w.Vector3(0, 0, 0), b = 0, y = x - 5; y < x + 6; y++)
3037
+ y >= 0 && y < A.length && (L.add(new w.Vector3(T[y * 3], T[y * 3 + 1], T[y * 3 + 2])), b++);
3038
+ L.divideScalar(b).applyMatrix4(e.transform);
3039
+ var P = g.filter(L.x), p = d.filter(L.y), S = v.filter(L.z), M = {
3040
+ position: new w.Vector3(P, p, S),
3041
+ location: A[x]
3042
3042
  };
3043
3043
  this.keyframes.push(M);
3044
3044
  }
@@ -3055,22 +3055,22 @@ var wt = (
3055
3055
  keyframeIndex: null,
3056
3056
  progress: null
3057
3057
  };
3058
- this.playingState.keyframeIndex !== null && this.playingState.progress !== null ? (t.keyframeIndex = this.playingState.keyframeIndex, t.progress = this.playingState.progress) : this.playingState.keyframeIndex === null && this.playingState.progress === null && (this.playingState.keyframeIndex = this.skipStart, this.playingState.progress = 0, this.virualCamera.position.copy(this.keyframes[this.playingState.keyframeIndex].position.clone()), this.virualCamera.lookAt(this.keyframes[1].position.clone()), this.virualCamera.computePose(), this.five.setState(q({}, this.virualCamera.pose)));
3059
- var s = this.playingState.keyframeIndex, u = 0;
3060
- this.cancelAnimation = Ht.shared.add(function(l, b) {
3058
+ this.playingState.keyframeIndex !== null && this.playingState.progress !== null ? (t.keyframeIndex = this.playingState.keyframeIndex, t.progress = this.playingState.progress) : this.playingState.keyframeIndex === null && this.playingState.progress === null && (this.playingState.keyframeIndex = this.skipStart, this.playingState.progress = 0, this.virualCamera.position.copy(this.keyframes[this.playingState.keyframeIndex].position.clone()), this.virualCamera.lookAt(this.keyframes[1].position.clone()), this.virualCamera.computePose(), this.five.setState(H({}, this.virualCamera.pose)));
3059
+ var s = this.playingState.keyframeIndex, c = 0;
3060
+ this.cancelAnimation = Ct.shared.add(function(l, g) {
3061
3061
  if (s === a - 1 - e.skipEnd && e.cancelAnimation) {
3062
3062
  e.cancelAnimation();
3063
3063
  return;
3064
3064
  }
3065
3065
  e.currentKeyFrame = e.keyframes[s], e.nextKeyframe = e.keyframes[s + 1], s + 2 <= a - 1 ? e.nextButOneKeyframe = e.keyframes[s + 2] : e.nextButOneKeyframe = null;
3066
- var d = e.currentKeyFrame.position.clone(), v = e.nextKeyframe.position.clone(), T = e.nextKeyframe.position.clone().sub(e.currentKeyFrame.position.clone()).normalize(), A = d.clone().add(T.clone().multiplyScalar(0.01)), P = new w.Vector3();
3067
- e.nextButOneKeyframe !== null ? P = e.nextButOneKeyframe.position.clone().sub(e.nextKeyframe.position.clone()).normalize() : P.copy(T);
3068
- var O = v.clone().add(P.clone().multiplyScalar(0.01));
3069
- u += b / 1e3 * e.rate;
3070
- var C = u / d.distanceTo(v);
3066
+ var d = e.currentKeyFrame.position.clone(), v = e.nextKeyframe.position.clone(), T = e.nextKeyframe.position.clone().sub(e.currentKeyFrame.position.clone()).normalize(), A = d.clone().add(T.clone().multiplyScalar(0.01)), x = new w.Vector3();
3067
+ e.nextButOneKeyframe !== null ? x = e.nextButOneKeyframe.position.clone().sub(e.nextKeyframe.position.clone()).normalize() : x.copy(T);
3068
+ var _ = v.clone().add(x.clone().multiplyScalar(0.01));
3069
+ c += g / 1e3 * e.rate;
3070
+ var C = c / d.distanceTo(v);
3071
3071
  C = C >= 1 ? 1 : C, t.keyframeIndex !== null && t.progress !== null && (C = t.progress, t.keyframeIndex = null, t.progress = null);
3072
- var L = d.clone().lerp(v, C), y = A.clone().lerp(O, C);
3073
- e.virualCamera.position.copy(L), e.virualCamera.lookAt(y), e.virualCamera.updateMatrixWorld(), e.virualCamera.updateMatrix(), e.virualCamera.computePose(), e.five.setState(q({}, e.virualCamera.pose)), e.location = e.keyframes[s].location + d.clone().distanceTo(L), C === 1 ? (u = 0, s++, e.playingState.keyframeIndex = s, e.playingState.progress = 0) : (e.playingState.keyframeIndex = s, e.playingState.progress = C);
3072
+ var L = d.clone().lerp(v, C), b = A.clone().lerp(_, C);
3073
+ e.virualCamera.position.copy(L), e.virualCamera.lookAt(b), e.virualCamera.updateMatrixWorld(), e.virualCamera.updateMatrix(), e.virualCamera.computePose(), e.five.setState(H({}, e.virualCamera.pose)), e.location = e.keyframes[s].location + d.clone().distanceTo(L), C === 1 ? (c = 0, s++, e.playingState.keyframeIndex = s, e.playingState.progress = 0) : (e.playingState.keyframeIndex = s, e.playingState.progress = C);
3074
3074
  });
3075
3075
  }, o.prototype.pause = function() {
3076
3076
  this.cancelAnimation && this.cancelAnimation();
@@ -3103,17 +3103,154 @@ var wt = (
3103
3103
  this.updateState({ enabled: !1 }, t), this._disable({ userAction: t });
3104
3104
  }
3105
3105
  }, o;
3106
- }(ze.Controller)
3107
- ), jn = function(f, o) {
3108
- return new Dn(f, o);
3106
+ }(We.Controller)
3107
+ ), Qn = function(f, o) {
3108
+ return new Vn(f, o);
3109
+ };
3110
+ function Wt(f, o, e) {
3111
+ return f < o ? o : f > e ? e : f;
3112
+ }
3113
+ var Yn = (
3114
+ /* glsl */
3115
+ `
3116
+ varying vec2 vUv;
3117
+ varying vec3 vPosition;
3118
+ void main() {
3119
+ vUv = uv;
3120
+ vPosition = position;
3121
+ gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
3122
+ }
3123
+ `
3124
+ ), jn = (
3125
+ /* glsl */
3126
+ `
3127
+ varying vec2 vUv;
3128
+ uniform sampler2D map;
3129
+ uniform float progress;
3130
+ uniform float opacity;
3131
+ varying vec3 vPosition;
3132
+
3133
+ void main() {
3134
+ vec3 white = vec3(1.0, 1.0, 1.0);
3135
+ vec4 image = texture2D(map, vUv);
3136
+ if (vUv.y > progress) {
3137
+ discard;
3138
+ }
3139
+ gl_FragColor = vec4(white, 0.7 * (progress - vPosition.y));
3140
+ if (progress == 1.0) {
3141
+ gl_FragColor = gl_FragColor + vec4(image.rgb, image.a * (1.0 - vPosition.y));
3142
+ }
3143
+ gl_FragColor.a = gl_FragColor.a * opacity;
3144
+ }
3145
+ `
3146
+ ), Hn = [1, 5, 2, 6, 3, 7, 4, 8, 9, 13, 10, 14, 11, 15, 12, 16], xt = 512, Pt = 512, ot = 128, zn = (
3147
+ /** @class */
3148
+ function(f) {
3149
+ Fe(o, f);
3150
+ function o(e, a) {
3151
+ var t = f.call(this, e) || this;
3152
+ t.group = new w.Group(), t.mesh = function() {
3153
+ var l = new w.CylinderGeometry(0.12, 0.12, 1, 32, 1, !0);
3154
+ l.translate(0, 0.5, 0);
3155
+ var g = new w.ShaderMaterial({
3156
+ vertexShader: Yn,
3157
+ fragmentShader: jn,
3158
+ uniforms: {
3159
+ map: { value: new w.Texture() },
3160
+ progress: { value: 0 },
3161
+ opacity: { value: 0 }
3162
+ },
3163
+ transparent: !0,
3164
+ depthTest: !1
3165
+ }), d = new w.Mesh(l, g);
3166
+ return d;
3167
+ }(), t.panoMesh = new Tn({ scale: 1.5 }), t.stop = function() {
3168
+ }, t.drawLine = function(l, g) {
3169
+ if (t.ctx) {
3170
+ var d = function() {
3171
+ var A, x = xt / 16 | 0;
3172
+ return x * ((A = Hn[l]) !== null && A !== void 0 ? A : 0);
3173
+ }(), v = (1 - (g + l * 150) % 1200 / 1200) * (Pt + ot), T = t.ctx.createLinearGradient(0, v - ot, 0, v);
3174
+ T.addColorStop(0, "rgba(255,255,255,0)"), T.addColorStop(0.5, "rgba(255,255,255,1)"), T.addColorStop(1, "rgba(255,255,255,0)"), t.ctx.fillStyle = T, t.ctx.fillRect(d, v - ot, 3, ot);
3175
+ }
3176
+ }, t.anime = function(l) {
3177
+ if (t.ctx && t.startTime) {
3178
+ t.ctx.clearRect(0, 0, xt, Pt);
3179
+ for (var g = 0; g < 16; g++)
3180
+ t.drawLine(g, l - t.startTime);
3181
+ var d = Wt((l - t.startTime) / 1e3, 0, 1), v = Wt((l - t.startTime) / 300, 0, 1);
3182
+ t.panoMesh.setOpacity(v), t.mesh.material.uniforms.progress.value = d, t.mesh.material.uniforms.opacity.value = v, t.mesh.material.uniforms.map.value.needsUpdate = !0, t.five.needsRender = !0;
3183
+ }
3184
+ }, t.dispose = function() {
3185
+ t.disable();
3186
+ }, t.five = e;
3187
+ var s = {
3188
+ enabled: !1,
3189
+ visible: !0
3190
+ };
3191
+ t.state = Object.assign(s, a == null ? void 0 : a.initialState);
3192
+ var c = H({}, a == null ? void 0 : a.config);
3193
+ return t._config = c, typeof document == "undefined" || (t.canvas = document.createElement("canvas"), t.ctx = t.canvas.getContext("2d"), t.canvas.width = xt, t.canvas.height = Pt, t.ctx.shadowColor = "rgba(255,255,255,0.5)", t.ctx.shadowBlur = 6, t.ctx.shadowOffsetX = 0, t.ctx.shadowOffsetY = 0, t.mesh.material.uniforms.map.value = new w.CanvasTexture(t.canvas), t.group.add(t.mesh), t.panoMesh.setProgress(1), t.panoMesh.setOpacity(0), t.group.add(t.panoMesh), t.state.enabled && t._enable({ userAction: !1 })), t;
3194
+ }
3195
+ return Object.defineProperty(o.prototype, "config", {
3196
+ get: function() {
3197
+ return H({}, this._config);
3198
+ },
3199
+ enumerable: !1,
3200
+ configurable: !0
3201
+ }), o.prototype.updateState = function(e, a) {
3202
+ var t = this.state;
3203
+ this.state = H(H({}, this.state), e), this.hooks.emit("stateChange", { state: this.state, prevState: t, userAction: a });
3204
+ }, o.prototype.load = function(e) {
3205
+ return De(this, void 0, void 0, function() {
3206
+ return Re(this, function(a) {
3207
+ return [
3208
+ 2
3209
+ /*return*/
3210
+ ];
3211
+ });
3212
+ });
3213
+ }, o.prototype._enable = function(e) {
3214
+ var a = this;
3215
+ this.mesh.position.copy(this.five.observers[this.five.state.panoIndex].standingPosition), this.panoMesh.position.copy(this.five.observers[this.five.state.panoIndex].standingPosition), this.five.ready().then(function() {
3216
+ a.five.scene.add(a.group), a.stop = Ct.shared.add(function(t, s) {
3217
+ a.startTime || (a.startTime = t), a.panoMesh.updateTime(t, s), a.anime(t);
3218
+ });
3219
+ });
3220
+ }, o.prototype._disable = function(e) {
3221
+ this.five.scene.remove(this.group), this.panoMesh.setOpacity(0), this.startTime = void 0, this.stop(), this.five.needsRender = !0;
3222
+ }, o.prototype.enable = function(e) {
3223
+ var a;
3224
+ if (this.ctx && !this.state.enabled && this.five.observers[this.five.state.panoIndex]) {
3225
+ var t = (a = e == null ? void 0 : e.userAction) !== null && a !== void 0 ? a : !0;
3226
+ this.updateState({ enabled: !0 }, t), this._enable({ userAction: t });
3227
+ }
3228
+ }, o.prototype.disable = function(e) {
3229
+ var a;
3230
+ if (this.state.enabled !== !1) {
3231
+ var t = (a = e == null ? void 0 : e.userAction) !== null && a !== void 0 ? a : !0;
3232
+ this.updateState({ enabled: !1 }, t), this._disable({ userAction: t });
3233
+ }
3234
+ }, o.prototype.setState = function(e, a) {
3235
+ a === void 0 && (a = {});
3236
+ var t = this.state, s = a.userAction !== void 0 ? a.userAction : !0;
3237
+ if (this.updateState(e, s), e.enabled !== void 0 && t.enabled !== e.enabled) {
3238
+ var c = { userAction: s };
3239
+ e.enabled ? this._enable(c) : this._disable(c);
3240
+ }
3241
+ }, o;
3242
+ }(Zt.Controller)
3243
+ ), Jn = function(f, o) {
3244
+ return new zn(f, o);
3109
3245
  };
3110
3246
  export {
3111
- Yn as BackgroundPlugin,
3112
- ze as BasePlugin,
3113
- Sn as CSS3DRenderer,
3114
- Bn as ItemMaskPlugin,
3115
- We as OrbitControls,
3116
- Vn as OrientationPlugin,
3117
- In as RoundedBoxGeometry,
3118
- jn as TrajectoryPlugin
3247
+ Zn as BackgroundPlugin,
3248
+ We as BasePlugin,
3249
+ Dn as CSS3DRenderer,
3250
+ qn as ItemMaskPlugin,
3251
+ qe as OrbitControls,
3252
+ Kn as OrientationPlugin,
3253
+ Jn as PanoAnimePlugin,
3254
+ Rn as RoundedBoxGeometry,
3255
+ Qn as TrajectoryPlugin
3119
3256
  };