@realsee/five 6.7.0-alpha.14 → 6.7.0-alpha.16

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 (149) hide show
  1. package/docs/assets/hierarchy.js +1 -1
  2. package/docs/assets/navigation.js +1 -1
  3. package/docs/assets/search.js +1 -1
  4. package/docs/classes/five.BoundingMesh.html +4 -0
  5. package/docs/classes/five.Five.html +57 -57
  6. package/docs/classes/five.Model.html +18 -18
  7. package/docs/classes/five.ModelScene.html +21 -20
  8. package/docs/classes/five.PBMContainer.html +1 -1
  9. package/docs/classes/five.PBMGroup.html +1 -1
  10. package/docs/classes/five.PBMMesh.html +1 -1
  11. package/docs/classes/five.PBMMeshMaterial.html +1 -1
  12. package/docs/classes/five.PBMPointCloud.html +1 -1
  13. package/docs/classes/five.PBMPointCloudMaterial.html +1 -1
  14. package/docs/classes/five.PBMSkinnedMesh.html +1 -1
  15. package/docs/classes/five.PanoCircleMesh.html +1 -1
  16. package/docs/classes/five.PanoCircleMeshCustom.html +1 -1
  17. package/docs/classes/five.PanoCircleMeshSolid.html +1 -1
  18. package/docs/classes/five.Parameter.html +1 -1
  19. package/docs/classes/five.Tile3D.html +21 -21
  20. package/docs/classes/five.TileNode.html +2 -2
  21. package/docs/classes/five.TrajectoryNode.html +1 -1
  22. package/docs/classes/five.Work.html +16 -16
  23. package/docs/classes/five.WorkResolvedObserver.html +20 -21
  24. package/docs/classes/gltf-loader.DDSLoader.html +1 -1
  25. package/docs/classes/gltf-loader.DRACOLoader.html +1 -1
  26. package/docs/classes/gltf-loader.GLTFObject.html +1 -1
  27. package/docs/classes/gltf-loader.THREEGLTFLoader.html +1 -1
  28. package/docs/classes/line.LineGeometry.html +1 -1
  29. package/docs/classes/line.LineMaterial.html +1 -1
  30. package/docs/classes/line.LineSegmentsGeometry.html +1 -1
  31. package/docs/classes/line.THREE_Line2.html +1 -1
  32. package/docs/classes/line.THREE_LineSegments2.html +1 -1
  33. package/docs/classes/plugins.RoundedBoxGeometry.html +1 -1
  34. package/docs/classes/vfx.Airflow.html +1 -1
  35. package/docs/classes/vfx.Flame.html +1 -1
  36. package/docs/classes/vfx.Particle.html +1 -1
  37. package/docs/classes/vfx.ParticleGPU.html +1 -1
  38. package/docs/classes/vfx.SpotLight.html +1 -1
  39. package/docs/functions/five.parseWork.html +1 -1
  40. package/docs/functions/five.workToJson.html +1 -1
  41. package/docs/functions/vue.useFiveWorks.html +2 -2
  42. package/docs/hierarchy.html +1 -1
  43. package/docs/interfaces/five.AddableObject.html +1 -1
  44. package/docs/interfaces/five.EventCallback.html +1 -1
  45. package/docs/interfaces/five.FiveLoadOptions.html +8 -10
  46. package/docs/interfaces/five.ImageOptions.html +1 -1
  47. package/docs/interfaces/five.IntersectMesh.html +1 -1
  48. package/docs/interfaces/five.IntersectMeshInterface.html +1 -1
  49. package/docs/interfaces/five.Intersection.html +1 -1
  50. package/docs/interfaces/five.LoosePanoWork.html +2 -2
  51. package/docs/interfaces/five.LooseWork.html +2 -2
  52. package/docs/interfaces/five.LooseWorkInitial.html +2 -2
  53. package/docs/interfaces/five.LooseWorkModel.html +2 -2
  54. package/docs/interfaces/five.LooseWorkObserver.html +3 -2
  55. package/docs/interfaces/five.LooseWorkPanorama.html +8 -8
  56. package/docs/interfaces/five.LooseWorkVideo.html +2 -2
  57. package/docs/interfaces/five.LooseWorkWithExtrinsics.html +7 -7
  58. package/docs/interfaces/five.ModelControllerCustomInitArgs.html +1 -1
  59. package/docs/interfaces/five.ModelOptions.html +9 -0
  60. package/docs/interfaces/five.MovePanoOptions.html +1 -1
  61. package/docs/interfaces/five.PBMMaterial.html +1 -1
  62. package/docs/interfaces/five.PBMMeshMaterialParameters.html +1 -1
  63. package/docs/interfaces/five.PBMPointCloudMaterialParameters.html +1 -1
  64. package/docs/interfaces/five.PanoCircleMeshInterface.html +1 -1
  65. package/docs/interfaces/five.PanoramaControllerCustomInitArgs.html +1 -1
  66. package/docs/interfaces/five.PanoramaLikeControllerCustomInitArgs.html +1 -1
  67. package/docs/interfaces/five.ParameterMaterialValue.html +1 -1
  68. package/docs/interfaces/five.ParameterTilesetValue.html +1 -1
  69. package/docs/interfaces/five.ParameterValue.html +1 -1
  70. package/docs/interfaces/five.Pose.html +1 -1
  71. package/docs/interfaces/five.ResolvedParameterValue.html +1 -1
  72. package/docs/interfaces/five.State.html +1 -1
  73. package/docs/interfaces/five.TextureOptions.html +1 -1
  74. package/docs/interfaces/five.TopviewControllerCustomInitArgs.html +1 -1
  75. package/docs/interfaces/five.VRPanoramaControllerCustomInitArgs.html +1 -1
  76. package/docs/interfaces/five.ViewLayer.html +21 -21
  77. package/docs/interfaces/five.WorkCubeImage.html +1 -1
  78. package/docs/interfaces/five.WorkImage.html +4 -2
  79. package/docs/interfaces/five.WorkInitial.html +8 -8
  80. package/docs/interfaces/five.WorkModel.html +8 -8
  81. package/docs/interfaces/five.WorkModelJson.html +3 -2
  82. package/docs/interfaces/five.WorkModelLayer.html +6 -6
  83. package/docs/interfaces/five.WorkModelLayerJson.html +2 -2
  84. package/docs/interfaces/five.WorkObserver.html +21 -22
  85. package/docs/interfaces/five.WorkObserverJson.html +4 -2
  86. package/docs/interfaces/five.WorkPanoramaJson.html +2 -2
  87. package/docs/interfaces/five.WorkPanoramasJson.html +2 -2
  88. package/docs/interfaces/five.WorkTile.html +1 -1
  89. package/docs/interfaces/five.XRPanoramaControllerCustomInitArgs.html +1 -1
  90. package/docs/interfaces/plugins.BackgroundPluginController.html +1 -1
  91. package/docs/interfaces/plugins.BackgroundPluginType.EventMap.html +1 -1
  92. package/docs/interfaces/plugins.DynamicPathLinePluginController.html +33 -29
  93. package/docs/interfaces/plugins.DynamicPathLinePluginType.Config.html +21 -17
  94. package/docs/interfaces/plugins.DynamicPathLinePluginType.EventMap.html +9 -9
  95. package/docs/interfaces/plugins.DynamicPathLinePluginType.Params.html +3 -3
  96. package/docs/interfaces/plugins.DynamicPathLinePluginType.PathConfig.html +8 -4
  97. package/docs/interfaces/plugins.DynamicPathLinePluginType.State.html +4 -4
  98. package/docs/interfaces/plugins.ItemMaskController.html +1 -1
  99. package/docs/interfaces/plugins.ItemMaskPluginType.EventMap.html +1 -1
  100. package/docs/interfaces/plugins.ItemMaskPluginType.State.html +1 -1
  101. package/docs/interfaces/plugins.OrientationPluginController.html +1 -1
  102. package/docs/interfaces/plugins.OrientationPluginType.EventMap.html +1 -1
  103. package/docs/interfaces/plugins.OrientationPluginType.State.html +1 -1
  104. package/docs/interfaces/plugins.PanoAnimeController.html +1 -1
  105. package/docs/interfaces/plugins.PanoAnimePluginType.EventMap.html +1 -1
  106. package/docs/interfaces/plugins.PanoAnimePluginType.State.html +1 -1
  107. package/docs/interfaces/plugins.PluginTemplateType.EventMap.html +1 -1
  108. package/docs/interfaces/plugins.PluginTemplateType.State.html +1 -1
  109. package/docs/interfaces/plugins.TrajectoryController.html +1 -1
  110. package/docs/interfaces/react.FiveInjectionTypes.html +1 -1
  111. package/docs/modules/five.html +1 -1
  112. package/docs/types/five.Models.html +4 -4
  113. package/docs/types/five.ParseOptions.html +6 -6
  114. package/docs/types/plugins.DynamicPathLinePluginType.PluginData.html +2 -2
  115. package/docs/types/plugins.DynamicPathLinePluginType.ServerData.html +2 -2
  116. package/five/index.d.ts +94 -39
  117. package/five/index.js +68 -68
  118. package/five/index.mjs +4481 -4371
  119. package/gltf-loader/index.js +3 -3
  120. package/gltf-loader/index.mjs +3 -3
  121. package/line/index.js +3 -3
  122. package/line/index.mjs +3 -3
  123. package/package.json +1 -1
  124. package/plugins/index.d.ts +23 -7
  125. package/plugins/index.js +22 -26
  126. package/plugins/index.mjs +1326 -1308
  127. package/react/index.js +2 -2
  128. package/react/index.mjs +2 -2
  129. package/shader-lib/index.js +2 -2
  130. package/shader-lib/index.mjs +2 -2
  131. package/sticker/index.js +3 -3
  132. package/sticker/index.mjs +3 -3
  133. package/umd/five-gltf-loader.js +3 -3
  134. package/umd/five-line.js +3 -3
  135. package/umd/five-plugins.js +23 -27
  136. package/umd/five-react.js +2 -2
  137. package/umd/five-shader-lib.js +2 -2
  138. package/umd/five-sticker.js +3 -3
  139. package/umd/five-vfx.js +2 -2
  140. package/umd/five-vue.js +2 -2
  141. package/umd/five.js +68 -68
  142. package/vfx/index.js +2 -2
  143. package/vfx/index.mjs +2 -2
  144. package/vue/index.js +2 -2
  145. package/vue/index.mjs +2 -2
  146. package/work-downloader/index.js +3 -3
  147. package/work-downloader/index.mjs +13 -11
  148. package/docs/interfaces/five.ModelLike.html +0 -3
  149. package/docs/types/five.Tile3dOptions.html +0 -1
package/plugins/index.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five
4
- * Generated: 2025/11/11
5
- * Version: 6.7.0-alpha.14
4
+ * Generated: 11/25/2025
5
+ * Version: 6.7.0-alpha.16
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -252,23 +252,23 @@
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 Mn, AnimationFrameLoop as ct, Camera as An, PanoCircleMesh as xn } from "@realsee/five";
256
- import * as v from "three";
255
+ */import { Subscribe as Pn, AnimationFrameLoop as ct, Camera as An, PanoCircleMesh as xn } from "@realsee/five";
256
+ import * as p from "three";
257
257
  import { EventDispatcher as Jt, Vector3 as ye, MOUSE as Se, TOUCH as _e, Spherical as Wt, Quaternion as Xt, Vector2 as Te, Object3D as $t, Matrix4 as Sn } from "three";
258
258
  import { BasePlugin as Ot } from "@realsee/five/plugins";
259
- function _n(f) {
260
- return /^https?:\/\/|^\/\//.test(f) || /^data:/.test(f);
259
+ function _n(h) {
260
+ return /^https?:\/\/|^\/\//.test(h) || /^data:/.test(h);
261
261
  }
262
- function On(f, o) {
263
- return _n(o) ? o : "".concat(f).concat(o);
262
+ function On(h, o) {
263
+ return _n(o) ? o : "".concat(h).concat(o);
264
264
  }
265
265
  var Xe;
266
- (function(f) {
266
+ (function(h) {
267
267
  var o = (
268
268
  /** @class */
269
269
  (function() {
270
270
  function e(n, t) {
271
- this.hooks = new Mn(), this.staticPrefix = "//vr-image-4.realsee-cdn.cn", this.five = n, t != null && t.staticPrefix && (this.staticPrefix = t.staticPrefix);
271
+ this.hooks = new Pn(), this.staticPrefix = "//vr-image-4.realsee-cdn.cn", this.five = n, t != null && t.staticPrefix && (this.staticPrefix = t.staticPrefix);
272
272
  }
273
273
  return e.prototype.getCurrentState = function() {
274
274
  return this.state;
@@ -277,126 +277,126 @@ var Xe;
277
277
  }, e;
278
278
  })()
279
279
  );
280
- f.Controller = o;
280
+ h.Controller = o;
281
281
  })(Xe || (Xe = {}));
282
- var St = function(f, o) {
282
+ var St = function(h, o) {
283
283
  return St = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, n) {
284
284
  e.__proto__ = n;
285
285
  } || function(e, n) {
286
286
  for (var t in n) Object.prototype.hasOwnProperty.call(n, t) && (e[t] = n[t]);
287
- }, St(f, o);
287
+ }, St(h, o);
288
288
  };
289
- function he(f, o) {
289
+ function he(h, 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
- St(f, o);
292
+ St(h, o);
293
293
  function e() {
294
- this.constructor = f;
294
+ this.constructor = h;
295
295
  }
296
- f.prototype = o === null ? Object.create(o) : (e.prototype = o.prototype, new e());
296
+ h.prototype = o === null ? Object.create(o) : (e.prototype = o.prototype, new e());
297
297
  }
298
- var z = function() {
299
- return z = Object.assign || function(o) {
298
+ var V = function() {
299
+ return V = Object.assign || function(o) {
300
300
  for (var e, n = 1, t = arguments.length; n < t; n++) {
301
301
  e = arguments[n];
302
- for (var a in e) Object.prototype.hasOwnProperty.call(e, a) && (o[a] = e[a]);
302
+ for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && (o[r] = e[r]);
303
303
  }
304
304
  return o;
305
- }, z.apply(this, arguments);
305
+ }, V.apply(this, arguments);
306
306
  };
307
- function De(f, o, e, n) {
308
- function t(a) {
309
- return a instanceof e ? a : new e(function(s) {
310
- s(a);
307
+ function De(h, o, e, n) {
308
+ function t(r) {
309
+ return r instanceof e ? r : new e(function(s) {
310
+ s(r);
311
311
  });
312
312
  }
313
- return new (e || (e = Promise))(function(a, s) {
314
- function l(g) {
313
+ return new (e || (e = Promise))(function(r, s) {
314
+ function l(m) {
315
315
  try {
316
- c(n.next(g));
317
- } catch (w) {
318
- s(w);
316
+ f(n.next(m));
317
+ } catch (y) {
318
+ s(y);
319
319
  }
320
320
  }
321
- function h(g) {
321
+ function d(m) {
322
322
  try {
323
- c(n.throw(g));
324
- } catch (w) {
325
- s(w);
323
+ f(n.throw(m));
324
+ } catch (y) {
325
+ s(y);
326
326
  }
327
327
  }
328
- function c(g) {
329
- g.done ? a(g.value) : t(g.value).then(l, h);
328
+ function f(m) {
329
+ m.done ? r(m.value) : t(m.value).then(l, d);
330
330
  }
331
- c((n = n.apply(f, o || [])).next());
331
+ f((n = n.apply(h, o || [])).next());
332
332
  });
333
333
  }
334
- function Ne(f, o) {
334
+ function Ne(h, o) {
335
335
  var e = { label: 0, sent: function() {
336
- if (a[0] & 1) throw a[1];
337
- return a[1];
338
- }, trys: [], ops: [] }, n, t, a, s = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
336
+ if (r[0] & 1) throw r[1];
337
+ return r[1];
338
+ }, trys: [], ops: [] }, n, t, r, s = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
339
339
  return s.next = l(0), s.throw = l(1), s.return = l(2), typeof Symbol == "function" && (s[Symbol.iterator] = function() {
340
340
  return this;
341
341
  }), s;
342
- function l(c) {
343
- return function(g) {
344
- return h([c, g]);
342
+ function l(f) {
343
+ return function(m) {
344
+ return d([f, m]);
345
345
  };
346
346
  }
347
- function h(c) {
347
+ function d(f) {
348
348
  if (n) throw new TypeError("Generator is already executing.");
349
- for (; s && (s = 0, c[0] && (e = 0)), e; ) try {
350
- if (n = 1, t && (a = c[0] & 2 ? t.return : c[0] ? t.throw || ((a = t.return) && a.call(t), 0) : t.next) && !(a = a.call(t, c[1])).done) return a;
351
- switch (t = 0, a && (c = [c[0] & 2, a.value]), c[0]) {
349
+ for (; s && (s = 0, f[0] && (e = 0)), e; ) try {
350
+ if (n = 1, t && (r = f[0] & 2 ? t.return : f[0] ? t.throw || ((r = t.return) && r.call(t), 0) : t.next) && !(r = r.call(t, f[1])).done) return r;
351
+ switch (t = 0, r && (f = [f[0] & 2, r.value]), f[0]) {
352
352
  case 0:
353
353
  case 1:
354
- a = c;
354
+ r = f;
355
355
  break;
356
356
  case 4:
357
- return e.label++, { value: c[1], done: !1 };
357
+ return e.label++, { value: f[1], done: !1 };
358
358
  case 5:
359
- e.label++, t = c[1], c = [0];
359
+ e.label++, t = f[1], f = [0];
360
360
  continue;
361
361
  case 7:
362
- c = e.ops.pop(), e.trys.pop();
362
+ f = e.ops.pop(), e.trys.pop();
363
363
  continue;
364
364
  default:
365
- if (a = e.trys, !(a = a.length > 0 && a[a.length - 1]) && (c[0] === 6 || c[0] === 2)) {
365
+ if (r = e.trys, !(r = r.length > 0 && r[r.length - 1]) && (f[0] === 6 || f[0] === 2)) {
366
366
  e = 0;
367
367
  continue;
368
368
  }
369
- if (c[0] === 3 && (!a || c[1] > a[0] && c[1] < a[3])) {
370
- e.label = c[1];
369
+ if (f[0] === 3 && (!r || f[1] > r[0] && f[1] < r[3])) {
370
+ e.label = f[1];
371
371
  break;
372
372
  }
373
- if (c[0] === 6 && e.label < a[1]) {
374
- e.label = a[1], a = c;
373
+ if (f[0] === 6 && e.label < r[1]) {
374
+ e.label = r[1], r = f;
375
375
  break;
376
376
  }
377
- if (a && e.label < a[2]) {
378
- e.label = a[2], e.ops.push(c);
377
+ if (r && e.label < r[2]) {
378
+ e.label = r[2], e.ops.push(f);
379
379
  break;
380
380
  }
381
- a[2] && e.ops.pop(), e.trys.pop();
381
+ r[2] && e.ops.pop(), e.trys.pop();
382
382
  continue;
383
383
  }
384
- c = o.call(f, e);
385
- } catch (g) {
386
- c = [6, g], t = 0;
384
+ f = o.call(h, e);
385
+ } catch (m) {
386
+ f = [6, m], t = 0;
387
387
  } finally {
388
- n = a = 0;
388
+ n = r = 0;
389
389
  }
390
- if (c[0] & 5) throw c[1];
391
- return { value: c[0] ? c[1] : void 0, done: !0 };
390
+ if (f[0] & 5) throw f[1];
391
+ return { value: f[0] ? f[1] : void 0, done: !0 };
392
392
  }
393
393
  }
394
- function qt(f, o, e) {
395
- if (e || arguments.length === 2) for (var n = 0, t = o.length, a; n < t; n++)
396
- (a || !(n in o)) && (a || (a = Array.prototype.slice.call(o, 0, n)), a[n] = o[n]);
397
- return f.concat(a || Array.prototype.slice.call(o));
394
+ function qt(h, o, e) {
395
+ if (e || arguments.length === 2) for (var n = 0, t = o.length, r; n < t; n++)
396
+ (r || !(n in o)) && (r || (r = Array.prototype.slice.call(o, 0, n)), r[n] = o[n]);
397
+ return h.concat(r || Array.prototype.slice.call(o));
398
398
  }
399
- function Cn(f) {
399
+ function Cn(h) {
400
400
  return new Promise(function(o, e) {
401
401
  var n = new Image();
402
402
  n.onload = function() {
@@ -405,7 +405,7 @@ function Cn(f) {
405
405
  }, n.onerror = function(t) {
406
406
  n.onload = n.onerror = function() {
407
407
  }, e(t);
408
- }, n.crossOrigin = "", n.src = f;
408
+ }, n.crossOrigin = "", n.src = h;
409
409
  });
410
410
  }
411
411
  var Ln = typeof performance != "undefined" && typeof performance.timing != "undefined" ? performance.timing.navigationStart : Date.now(), Et = typeof performance != "undefined" ? (function() {
@@ -413,89 +413,89 @@ var Ln = typeof performance != "undefined" && typeof performance.timing != "unde
413
413
  }) : (function() {
414
414
  return Date.now();
415
415
  });
416
- function st(f, o, e) {
417
- return f + (o - f) * e;
416
+ function st(h, o, e) {
417
+ return h + (o - h) * e;
418
418
  }
419
- function Fn(f, o, e, n) {
420
- var t = (o * e + 2 * f) / Math.pow(e, 3), a = -(2 * o * e + 3 * f) / Math.pow(e, 2), s = o, l = f;
421
- return t * Math.pow(n, 3) + a * Math.pow(n, 2) + s * n + l;
419
+ function Fn(h, o, e, n) {
420
+ var t = (o * e + 2 * h) / Math.pow(e, 3), r = -(2 * o * e + 3 * h) / Math.pow(e, 2), s = o, l = h;
421
+ return t * Math.pow(n, 3) + r * Math.pow(n, 2) + s * n + l;
422
422
  }
423
- function In(f, o, e, n) {
424
- var t = (o * e + 2 * f) / Math.pow(e, 3), a = -(2 * o * e + 3 * f) / Math.pow(e, 2), s = o;
425
- return 3 * t * Math.pow(n, 2) + 2 * a * n + s;
423
+ function In(h, o, e, n) {
424
+ var t = (o * e + 2 * h) / Math.pow(e, 3), r = -(2 * o * e + 3 * h) / Math.pow(e, 2), s = o;
425
+ return 3 * t * Math.pow(n, 2) + 2 * r * n + s;
426
426
  }
427
- function Dn(f, o, e, n) {
427
+ function Dn(h, o, e, n) {
428
428
  var t = n[1] - n[0];
429
- return f = lt(f, n), o = lt(o, n), o - f > t / 2 ? st(f + t, o, e) : f - o > t / 2 ? st(f - t, o, e) : st(f, o, e);
429
+ return h = lt(h, n), o = lt(o, n), o - h > t / 2 ? st(h + t, o, e) : h - o > t / 2 ? st(h - t, o, e) : st(h, o, e);
430
430
  }
431
- function lt(f, o) {
431
+ function lt(h, o) {
432
432
  var e = o[1] - o[0];
433
- return f < o[0] ? lt(f + e, o) : f >= o[1] ? lt(f - e, o) : f;
433
+ return h < o[0] ? lt(h + e, o) : h >= o[1] ? lt(h - e, o) : h;
434
434
  }
435
- function Nn(f, o, e, n) {
436
- return n ? Dn(f, o, e, n) : st(f, o, e);
435
+ function Nn(h, o, e, n) {
436
+ return n ? Dn(h, o, e, n) : st(h, o, e);
437
437
  }
438
438
  var Kt = (
439
439
  /** @class */
440
440
  (function() {
441
- function f(o) {
441
+ function h(o) {
442
442
  this.config = {}, this.progress = 1, this.ended = !0, this.value = {}, this.startTime = Et(), this.startVelocity = 0, this.duration = 0, this.keyframes = [];
443
443
  for (var e in o) {
444
444
  var n = o[e];
445
445
  typeof n == "number" ? (this.value[e] = n, this.config[e] = { circle: !1 }) : (this.value[e] = n.value, this.config[e] = { circle: n.circle });
446
446
  }
447
447
  this.keyframes = [
448
- { progress: 0, value: z({}, this.value) },
449
- { progress: 1, value: z({}, this.value) }
448
+ { progress: 0, value: V({}, this.value) },
449
+ { progress: 1, value: V({}, this.value) }
450
450
  ];
451
451
  }
452
- return f.prototype.getProgress = function(o) {
452
+ return h.prototype.getProgress = function(o) {
453
453
  var e = o - this.startTime;
454
454
  return e < 0 ? 0 : e >= this.duration ? 1 : 1 - Fn(1, this.startVelocity, this.duration, e);
455
- }, f.prototype.getValue = function(o) {
455
+ }, h.prototype.getValue = function(o) {
456
456
  for (var e = 1; e < this.keyframes.length; e++)
457
457
  if (this.keyframes[e].progress > o) {
458
- var n = this.keyframes[e - 1], t = this.keyframes[e], a = {};
458
+ var n = this.keyframes[e - 1], t = this.keyframes[e], r = {};
459
459
  for (var s in this.config) {
460
460
  var l = (o - n.progress) / (t.progress - n.progress);
461
- a[s] = Nn(n.value[s], t.value[s], l, this.config[s].circle);
461
+ r[s] = Nn(n.value[s], t.value[s], l, this.config[s].circle);
462
462
  }
463
- return a;
463
+ return r;
464
464
  }
465
- return z({}, this.keyframes[this.keyframes.length - 1].value);
466
- }, f.prototype.getProgressVelocity = function(o) {
465
+ return V({}, this.keyframes[this.keyframes.length - 1].value);
466
+ }, h.prototype.getProgressVelocity = function(o) {
467
467
  var e = o - this.startTime;
468
468
  return e >= this.duration ? 0 : In(1, this.startVelocity, this.duration, e);
469
- }, f.prototype.update = function(o) {
469
+ }, h.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
- }, f.prototype.getKeyFrameSegment = function(o) {
471
+ }, h.prototype.getKeyFrameSegment = function(o) {
472
472
  for (var e = this.getProgress(o), n = 1; n < this.keyframes.length; n++)
473
473
  if (this.keyframes[n].progress > e)
474
474
  return [this.keyframes[n - 1], this.keyframes[n]];
475
475
  return [this.keyframes[this.keyframes.length - 2], this.keyframes[this.keyframes.length - 1]];
476
- }, f.prototype.getTargetKeyframe = function() {
476
+ }, h.prototype.getTargetKeyframe = function() {
477
477
  return this.keyframes[this.keyframes.length - 1];
478
- }, f.prototype.set = function(o, e, n, t) {
479
- var a;
478
+ }, h.prototype.set = function(o, e, n, t) {
479
+ var r;
480
480
  n === void 0 && (n = 0), isNaN(e) && (e = 0), isNaN(n) && (n = 0), t = t != null ? t : Et();
481
- var s = this.getProgress(t), l = this.getValue(s), h = {};
482
- for (var c in this.config)
483
- h[c] = (a = o[c]) !== null && a !== void 0 ? a : l[c];
484
- var g = [
481
+ var s = this.getProgress(t), l = this.getValue(s), d = {};
482
+ for (var f in this.config)
483
+ d[f] = (r = o[f]) !== null && r !== void 0 ? r : l[f];
484
+ var m = [
485
485
  { progress: 0, value: l },
486
- { progress: 1, value: h }
486
+ { progress: 1, value: d }
487
487
  ];
488
- return this.setKeyframes(g, e, n, t);
489
- }, f.prototype.setKeyframes = function(o, e, n, t) {
490
- var a = this;
488
+ return this.setKeyframes(m, e, n, t);
489
+ }, h.prototype.setKeyframes = function(o, e, n, t) {
490
+ var r = this;
491
491
  if (n === void 0 && (n = 0), o.length < 2)
492
492
  throw new Error("keyframes invalid.");
493
493
  return isNaN(e) && (e = 0), isNaN(n) && (n = 0), this.callbacks && (this.callbacks[1](new Error("motion aborted.")), this.callbacks = void 0), new Promise(function(s, l) {
494
- t = t != null ? t : Et(), a.progress = 0, a.ended = !1, a.startTime = t, a.startVelocity = n, a.keyframes = o, a.duration = e, e === 0 ? (a.progress = 1, a.value = z({}, o[o.length - 1].value)) : a.value = z({}, o[0].value), a.callbacks = [s, l];
494
+ t = t != null ? t : Et(), r.progress = 0, r.ended = !1, r.startTime = t, r.startVelocity = n, r.keyframes = o, r.duration = e, e === 0 ? (r.progress = 1, r.value = V({}, o[o.length - 1].value)) : r.value = V({}, o[0].value), r.callbacks = [s, l];
495
495
  });
496
- }, f.prototype.dispose = function() {
496
+ }, h.prototype.dispose = function() {
497
497
  this.callbacks && (this.callbacks[1](new Error("motion dispose.")), this.callbacks = void 0);
498
- }, f;
498
+ }, h;
499
499
  })()
500
500
  ), kn = [
501
501
  { progress: 0, value: { scale: 0, opacity: 0, shadow: 2 } },
@@ -561,20 +561,20 @@ void main() {
561
561
  }
562
562
  `, Vn = (
563
563
  /** @class */
564
- (function(f) {
565
- he(o, f);
564
+ (function(h) {
565
+ he(o, h);
566
566
  function o(e, n) {
567
- var t = f.call(this, e) || this;
568
- t.canvas = document.createElement("canvas"), t.group = new v.Group(), t.wrapper = document.createElement("div"), t.style = document.createElement("style"), t.itemMaskMesh = (function() {
569
- var l = new v.Mesh(new v.SphereBufferGeometry(1, 60, 40), new v.ShaderMaterial({
567
+ var t = h.call(this, e) || this;
568
+ t.canvas = document.createElement("canvas"), t.group = new p.Group(), t.wrapper = document.createElement("div"), t.style = document.createElement("style"), t.itemMaskMesh = (function() {
569
+ var l = new p.Mesh(new p.SphereBufferGeometry(1, 60, 40), new p.ShaderMaterial({
570
570
  vertexShader: Un,
571
571
  fragmentShader: Rn,
572
572
  uniforms: {
573
573
  map: {
574
- value: new v.Texture()
574
+ value: new p.Texture()
575
575
  },
576
576
  color: {
577
- value: new v.Vector4()
577
+ value: new p.Vector4()
578
578
  }
579
579
  },
580
580
  depthWrite: !1,
@@ -588,18 +588,18 @@ void main() {
588
588
  t.state.mode === "box" && t.select();
589
589
  }, t.loadPanoMask = function(l) {
590
590
  return De(t, void 0, void 0, function() {
591
- var h, c, g, w, P, T, M, x, C, b;
592
- return Ne(this, function(y) {
593
- switch (y.label) {
591
+ var d, f, m, y, A, E, P, x, C, w;
592
+ return Ne(this, function(b) {
593
+ switch (b.label) {
594
594
  case 0:
595
- return h = this, c = h.five, g = h.canvas, w = h.itemMaskMesh, P = h.data, T = g.getContext("2d"), M = c.observers[l], x = (b = P == null ? void 0 : P.object_mask_list.find(function(A) {
596
- return A.derived_id === String(M.derivedId);
597
- })) === null || b === void 0 ? void 0 : b.object_mask_url, x ? [4, Cn(x)] : [
595
+ return d = this, f = d.five, m = d.canvas, y = d.itemMaskMesh, A = d.data, E = m.getContext("2d"), P = f.observers[l], x = (w = A == null ? void 0 : A.object_mask_list.find(function(M) {
596
+ return M.derived_id === String(P.derivedId);
597
+ })) === null || w === void 0 ? void 0 : w.object_mask_url, x ? [4, Cn(x)] : [
598
598
  2
599
599
  /*return*/
600
600
  ];
601
601
  case 1:
602
- return C = y.sent(), g.width = C.width, g.height = C.height, T == null || T.drawImage(C, 0, 0, C.width, C.height), w.material.uniforms.map.value.image = C, w.material.uniforms.map.value.minFilter = v.LinearFilter, w.material.uniforms.map.value.needsUpdate = !0, w.position.copy(M.position), w.quaternion.copy(M.quaternion), c.scene.add(w), c.needsRender = !0, [
602
+ return C = b.sent(), m.width = C.width, m.height = C.height, E == null || E.drawImage(C, 0, 0, C.width, C.height), y.material.uniforms.map.value.image = C, y.material.uniforms.map.value.minFilter = p.LinearFilter, y.material.uniforms.map.value.needsUpdate = !0, y.position.copy(P.position), y.quaternion.copy(P.quaternion), f.scene.add(y), f.needsRender = !0, [
603
603
  2
604
604
  /*return*/
605
605
  ];
@@ -607,58 +607,58 @@ void main() {
607
607
  });
608
608
  });
609
609
  }, t.onFiveMouseMove = function(l) {
610
- var h;
610
+ var d;
611
611
  if (t.state.mode === "mask" && t.five.state.mode === "Panorama") {
612
- var c = t, g = c.five, w = c.itemMaskMesh, P = g.observers[g.state.panoIndex], T = (h = l.pointers[0]) === null || h === void 0 ? void 0 : h.raycaster;
613
- if (T) {
614
- var M = T.intersectObjects(t.group.children.filter(function(x) {
615
- return x.userData.visible_viewpoint.includes(String(P.derivedId));
612
+ var f = t, m = f.five, y = f.itemMaskMesh, A = m.observers[m.state.panoIndex], E = (d = l.pointers[0]) === null || d === void 0 ? void 0 : d.raycaster;
613
+ if (E) {
614
+ var P = E.intersectObjects(t.group.children.filter(function(x) {
615
+ return x.userData.visible_viewpoint.includes(String(A.derivedId));
616
616
  }), !0)[0];
617
- M ? w.material.uniforms.color.value = M.object.userData.color : w.material.uniforms.color.value = new v.Vector4(0, 0, 0, 1);
617
+ P ? y.material.uniforms.color.value = P.object.userData.color : y.material.uniforms.color.value = new p.Vector4(0, 0, 0, 1);
618
618
  }
619
619
  }
620
620
  }, t.onFiveTapGesture = function(l) {
621
- var h = t.five, c = h.observers[h.state.panoIndex];
621
+ var d = t.five, f = d.observers[d.state.panoIndex];
622
622
  if (l) {
623
- var g = l.intersectObjects(t.group.children.filter(function(T) {
624
- return T.userData.visible_viewpoint.includes(String(c.derivedId));
623
+ var m = l.intersectObjects(t.group.children.filter(function(E) {
624
+ return E.userData.visible_viewpoint.includes(String(f.derivedId));
625
625
  }), !0)[0];
626
- if (g) {
627
- t.select(g.object.name), t.stopAnimation && t.stopAnimation(), t.tapPosition = g.point, t.changeTapScreenPosition();
628
- var w = new Kt({
626
+ if (m) {
627
+ t.select(m.object.name), t.stopAnimation && t.stopAnimation(), t.tapPosition = m.point, t.changeTapScreenPosition();
628
+ var y = new Kt({
629
629
  opacity: 0,
630
630
  scale: 0,
631
631
  shadow: 2
632
- }), P = new Kt({
632
+ }), A = new Kt({
633
633
  opacity: 0,
634
634
  scale: 0,
635
635
  shadow: 2
636
636
  });
637
- return w.setKeyframes(kn, 1e3), P.setKeyframes(Bn, 1e3), t.stopAnimation = ct.shared.add(function(T, M) {
638
- var x, C = w.update(T), b = P.update(T);
639
- t.wrapper.firstChild.style.opacity = "".concat(w.value.opacity), t.wrapper.firstChild.style.transform = "scale(".concat(w.value.scale, ")"), t.wrapper.firstChild.style.boxShadow = "0 0 0 ".concat(w.value.shadow, "px #fff"), t.wrapper.lastChild.style.opacity = "".concat(P.value.opacity), t.wrapper.lastChild.style.transform = "scale(".concat(P.value.scale, ")"), t.wrapper.lastChild.style.boxShadow = "0 0 0 ".concat(P.value.shadow, "px #fff"), C && b && ((x = t.stopAnimation) === null || x === void 0 || x.call(t), t.stopAnimation = void 0, h.getElement().parentElement.removeChild(t.wrapper));
640
- }, !1, 0, 10), h.getElement().parentElement.appendChild(t.wrapper), !1;
637
+ return y.setKeyframes(kn, 1e3), A.setKeyframes(Bn, 1e3), t.stopAnimation = ct.shared.add(function(E, P) {
638
+ var x, C = y.update(E), w = A.update(E);
639
+ t.wrapper.firstChild.style.opacity = "".concat(y.value.opacity), t.wrapper.firstChild.style.transform = "scale(".concat(y.value.scale, ")"), t.wrapper.firstChild.style.boxShadow = "0 0 0 ".concat(y.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"), C && w && ((x = t.stopAnimation) === null || x === void 0 || x.call(t), t.stopAnimation = void 0, d.getElement().parentElement.removeChild(t.wrapper));
640
+ }, !1, 0, 10), d.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), h = (l.x + 1) / 2, c = -(l.y - 1) / 2;
646
- t.wrapper.style.opacity = l.z > 0 && l.z < 1 ? "1" : "0", t.wrapper.style.transform = "translate(".concat(h * 100, "%, ").concat(c * 100, "%)");
645
+ var l = t.tapPosition.clone().project(t.five.camera), d = (l.x + 1) / 2, f = -(l.y - 1) / 2;
646
+ t.wrapper.style.opacity = l.z > 0 && l.z < 1 ? "1" : "0", t.wrapper.style.transform = "translate(".concat(d * 100, "%, ").concat(f * 100, "%)");
647
647
  }
648
648
  }, t.onFiveCameraUpdate = function(l) {
649
649
  t.changeTapScreenPosition();
650
650
  }, t.dispose = function() {
651
651
  t.disable();
652
652
  }, t.five = e;
653
- var a = {
653
+ var r = {
654
654
  enabled: !0,
655
655
  visible: !0,
656
656
  mode: "box",
657
657
  selectedId: null,
658
658
  selectAll: !1
659
659
  };
660
- t.state = Object.assign(a, n == null ? void 0 : n.initialState);
661
- var s = z({}, n == null ? void 0 : n.config);
660
+ t.state = Object.assign(r, n == null ? void 0 : n.initialState);
661
+ var s = V({}, n == null ? void 0 : n.config);
662
662
  return t._config = s, 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;
@@ -681,23 +681,23 @@ void main() {
681
681
  }
682
682
  return Object.defineProperty(o.prototype, "config", {
683
683
  get: function() {
684
- return z({}, this._config);
684
+ return V({}, this._config);
685
685
  },
686
686
  enumerable: !1,
687
687
  configurable: !0
688
688
  }), o.prototype.updateState = function(e, n) {
689
689
  var t = this.state;
690
- this.state = z(z({}, this.state), e), this.hooks.emit("stateChange", { state: this.state, prevState: t, userAction: n });
690
+ this.state = V(V({}, this.state), e), this.hooks.emit("stateChange", { state: this.state, prevState: t, userAction: n });
691
691
  }, o.prototype.load = function(e) {
692
692
  return De(this, void 0, void 0, function() {
693
- var n, t, a = this;
693
+ var n, t, r = this;
694
694
  return Ne(this, function(s) {
695
695
  return this.data = e, n = e.data_list.map(function(l) {
696
- var h, c = l.position.end.map(function(_) {
697
- return Number(_);
698
- }), g = l.position.start.map(function(_) {
699
- return Number(_);
700
- }), w = Math.abs(c[0] - g[0]), P = Math.abs(c[1] - g[1]), T = Math.abs(c[2] - g[2]), M = c[0] / 2 + g[0] / 2, x = c[1] / 2 + g[1] / 2, C = c[2] / 2 + g[2] / 2, b = new v.Vector3(M, x, C), y = new v.BoxBufferGeometry(w, P, T), A = new v.ShaderMaterial({
696
+ var d, f = l.position.end.map(function(O) {
697
+ return Number(O);
698
+ }), m = l.position.start.map(function(O) {
699
+ return Number(O);
700
+ }), y = Math.abs(f[0] - m[0]), A = Math.abs(f[1] - m[1]), E = Math.abs(f[2] - m[2]), P = f[0] / 2 + m[0] / 2, x = f[1] / 2 + m[1] / 2, C = f[2] / 2 + m[2] / 2, w = new p.Vector3(P, x, C), b = new p.BoxBufferGeometry(y, A, E), M = new p.ShaderMaterial({
701
701
  vertexShader: `
702
702
  varying vec2 vUv;
703
703
  void main() {
@@ -725,18 +725,18 @@ void main() {
725
725
  }
726
726
  }
727
727
  `,
728
- side: v.DoubleSide,
729
- visible: a.state.selectedId === "".concat(l.category_name).concat(l.index),
728
+ side: p.DoubleSide,
729
+ visible: r.state.selectedId === "".concat(l.category_name).concat(l.index),
730
730
  uniforms: {
731
- opacity: { value: a.state.mode === "box" ? 1 : 0 }
731
+ opacity: { value: r.state.mode === "box" ? 1 : 0 }
732
732
  },
733
733
  depthWrite: !1,
734
734
  depthTest: !1,
735
735
  transparent: !0
736
- }), m = new v.Mesh(y, A);
737
- return m.position.copy(b), m.name = "".concat(l.category_name).concat(l.index), m.userData.color = new ((h = v.Vector4).bind.apply(h, qt(qt([void 0], l.mask_color.map(function(_) {
738
- return _ / 255;
739
- }).reverse(), !1), [1], !1)))(), m.userData.visible_viewpoint = Object.keys(l.visible_viewpoint), m;
736
+ }), c = new p.Mesh(b, M);
737
+ return c.position.copy(w), c.name = "".concat(l.category_name).concat(l.index), c.userData.color = new ((d = p.Vector4).bind.apply(d, qt(qt([void 0], l.mask_color.map(function(O) {
738
+ return O / 255;
739
+ }).reverse(), !1), [1], !1)))(), c.userData.visible_viewpoint = Object.keys(l.visible_viewpoint), c;
740
740
  }), (t = this.group).add.apply(t, n), [
741
741
  2
742
742
  /*return*/
@@ -745,20 +745,20 @@ void main() {
745
745
  });
746
746
  }, o.prototype.setState = function(e, n) {
747
747
  n === void 0 && (n = {});
748
- var t = this.state, a = n.userAction !== void 0 ? n.userAction : !0;
749
- if (this.updateState(e, a), e.enabled !== void 0 && t.enabled !== e.enabled) {
750
- var s = { userAction: a };
748
+ var t = this.state, r = n.userAction !== void 0 ? n.userAction : !0;
749
+ if (this.updateState(e, r), e.enabled !== void 0 && t.enabled !== e.enabled) {
750
+ var s = { userAction: r };
751
751
  e.enabled ? this._enable(s) : this._disable(s);
752
752
  }
753
753
  }, o.prototype.setMode = function(e) {
754
754
  this.updateState({ mode: e }, !1), e === "mask" ? (this.group.children.forEach(function(n) {
755
755
  n.material.uniforms.opacity.value = 0;
756
- }), this.loadPanoMask(this.five.state.panoIndex)) : e === "box" && (this.itemMaskMesh.material.uniforms.color.value = new v.Vector4(0, 0, 0, 1), this.group.children.forEach(function(n) {
756
+ }), this.loadPanoMask(this.five.state.panoIndex)) : e === "box" && (this.itemMaskMesh.material.uniforms.color.value = new p.Vector4(0, 0, 0, 1), this.group.children.forEach(function(n) {
757
757
  n.material.uniforms.opacity.value = 1;
758
758
  }), this.five.needsRender = !0);
759
759
  }, o.prototype.select = function(e, n) {
760
- var t = this, a;
761
- this.updateState({ selectedId: e != null ? e : null }, (a = n == null ? void 0 : n.userAction) !== null && a !== void 0 ? a : !1), this.group.children.forEach(function(s) {
760
+ var t = this, r;
761
+ this.updateState({ selectedId: e != null ? e : null }, (r = n == null ? void 0 : n.userAction) !== null && r !== void 0 ? r : !1), this.group.children.forEach(function(s) {
762
762
  s.material.visible = t.state.selectAll || s.name === e;
763
763
  }), this.five.needsRender = !0;
764
764
  }, o.prototype.selectAll = function(e) {
@@ -781,128 +781,128 @@ void main() {
781
781
  }
782
782
  }, o;
783
783
  })(Xe.Controller)
784
- ), tr = function(f, o) {
785
- return new Vn(f, o);
784
+ ), tr = function(h, o) {
785
+ return new Vn(h, 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, n) {
793
- var t = ["", "webkit", "Moz", "MS", "ms", "o"], a = o.createElement ? o.createElement("div") : n, s = "function", l = Math.round, h = Math.abs, c = Date.now;
794
- function g(r, i, u) {
795
- return setTimeout(y(r, u), i);
792
+ var Tt = (function(h, o, e, n) {
793
+ var t = ["", "webkit", "Moz", "MS", "ms", "o"], r = o.createElement ? o.createElement("div") : n, s = "function", l = Math.round, d = Math.abs, f = Date.now;
794
+ function m(a, i, u) {
795
+ return setTimeout(b(a, u), i);
796
796
  }
797
- function w(r, i, u) {
798
- return Array.isArray(r) ? (P(r, u[i], u), !0) : !1;
797
+ function y(a, i, u) {
798
+ return Array.isArray(a) ? (A(a, u[i], u), !0) : !1;
799
799
  }
800
- function P(r, i, u) {
801
- var p;
802
- if (r)
803
- if (r.forEach)
804
- r.forEach(i, u);
805
- else if (r.length !== n)
806
- for (p = 0; p < r.length; )
807
- i.call(u, r[p], p, r), p++;
800
+ function A(a, i, u) {
801
+ var g;
802
+ if (a)
803
+ if (a.forEach)
804
+ a.forEach(i, u);
805
+ else if (a.length !== n)
806
+ for (g = 0; g < a.length; )
807
+ i.call(u, a[g], g, a), g++;
808
808
  else
809
- for (p in r)
810
- r.hasOwnProperty(p) && i.call(u, r[p], p, r);
809
+ for (g in a)
810
+ a.hasOwnProperty(g) && i.call(u, a[g], g, a);
811
811
  }
812
- function T(r, i, u) {
813
- var p = "DEPRECATED METHOD: " + i + `
812
+ function E(a, i, u) {
813
+ var g = "DEPRECATED METHOD: " + i + `
814
814
  ` + u + ` AT
815
815
  `;
816
816
  return function() {
817
- var E = new Error("get-stack-trace"), O = E && E.stack ? E.stack.replace(/^[^\(]+?[\n$]/gm, "").replace(/^\s+at\s+/gm, "").replace(/^Object.<anonymous>\s*\(/gm, "{anonymous}()@") : "Unknown Stack Trace", N = f.console && (f.console.warn || f.console.log);
818
- return N && N.call(f.console, p, O), r.apply(this, arguments);
817
+ var T = new Error("get-stack-trace"), _ = T && T.stack ? T.stack.replace(/^[^\(]+?[\n$]/gm, "").replace(/^\s+at\s+/gm, "").replace(/^Object.<anonymous>\s*\(/gm, "{anonymous}()@") : "Unknown Stack Trace", k = h.console && (h.console.warn || h.console.log);
818
+ return k && k.call(h.console, g, _), a.apply(this, arguments);
819
819
  };
820
820
  }
821
- var M;
822
- typeof Object.assign != "function" ? M = function(i) {
821
+ var P;
822
+ typeof Object.assign != "function" ? P = function(i) {
823
823
  if (i === n || i === null)
824
824
  throw new TypeError("Cannot convert undefined or null to object");
825
- for (var u = Object(i), p = 1; p < arguments.length; p++) {
826
- var E = arguments[p];
827
- if (E !== n && E !== null)
828
- for (var O in E)
829
- E.hasOwnProperty(O) && (u[O] = E[O]);
825
+ for (var u = Object(i), g = 1; g < arguments.length; g++) {
826
+ var T = arguments[g];
827
+ if (T !== n && T !== null)
828
+ for (var _ in T)
829
+ T.hasOwnProperty(_) && (u[_] = T[_]);
830
830
  }
831
831
  return u;
832
- } : M = Object.assign;
833
- var x = T(function(i, u, p) {
834
- for (var E = Object.keys(u), O = 0; O < E.length; )
835
- (!p || p && i[E[O]] === n) && (i[E[O]] = u[E[O]]), O++;
832
+ } : P = Object.assign;
833
+ var x = E(function(i, u, g) {
834
+ for (var T = Object.keys(u), _ = 0; _ < T.length; )
835
+ (!g || g && i[T[_]] === n) && (i[T[_]] = u[T[_]]), _++;
836
836
  return i;
837
- }, "extend", "Use `assign`."), C = T(function(i, u) {
837
+ }, "extend", "Use `assign`."), C = E(function(i, u) {
838
838
  return x(i, u, !0);
839
839
  }, "merge", "Use `assign`.");
840
- function b(r, i, u) {
841
- var p = i.prototype, E;
842
- E = r.prototype = Object.create(p), E.constructor = r, E._super = p, u && M(E, u);
840
+ function w(a, i, u) {
841
+ var g = i.prototype, T;
842
+ T = a.prototype = Object.create(g), T.constructor = a, T._super = g, u && P(T, u);
843
843
  }
844
- function y(r, i) {
844
+ function b(a, i) {
845
845
  return function() {
846
- return r.apply(i, arguments);
846
+ return a.apply(i, arguments);
847
847
  };
848
848
  }
849
- function A(r, i) {
850
- return typeof r == s ? r.apply(i && i[0] || n, i) : r;
849
+ function M(a, i) {
850
+ return typeof a == s ? a.apply(i && i[0] || n, i) : a;
851
851
  }
852
- function m(r, i) {
853
- return r === n ? i : r;
852
+ function c(a, i) {
853
+ return a === n ? i : a;
854
854
  }
855
- function _(r, i, u) {
856
- P(W(i), function(p) {
857
- r.addEventListener(p, u, !1);
855
+ function O(a, i, u) {
856
+ A(H(i), function(g) {
857
+ a.addEventListener(g, u, !1);
858
858
  });
859
859
  }
860
- function S(r, i, u) {
861
- P(W(i), function(p) {
862
- r.removeEventListener(p, u, !1);
860
+ function S(a, i, u) {
861
+ A(H(i), function(g) {
862
+ a.removeEventListener(g, u, !1);
863
863
  });
864
864
  }
865
- function U(r, i) {
866
- for (; r; ) {
867
- if (r == i)
865
+ function D(a, i) {
866
+ for (; a; ) {
867
+ if (a == i)
868
868
  return !0;
869
- r = r.parentNode;
869
+ a = a.parentNode;
870
870
  }
871
871
  return !1;
872
872
  }
873
- function R(r, i) {
874
- return r.indexOf(i) > -1;
873
+ function W(a, i) {
874
+ return a.indexOf(i) > -1;
875
875
  }
876
- function W(r) {
877
- return r.trim().split(/\s+/g);
876
+ function H(a) {
877
+ return a.trim().split(/\s+/g);
878
878
  }
879
- function Z(r, i, u) {
880
- if (r.indexOf && !u)
881
- return r.indexOf(i);
882
- for (var p = 0; p < r.length; ) {
883
- if (u && r[p][u] == i || !u && r[p] === i)
884
- return p;
885
- p++;
879
+ function X(a, i, u) {
880
+ if (a.indexOf && !u)
881
+ return a.indexOf(i);
882
+ for (var g = 0; g < a.length; ) {
883
+ if (u && a[g][u] == i || !u && a[g] === i)
884
+ return g;
885
+ g++;
886
886
  }
887
887
  return -1;
888
888
  }
889
- function X(r) {
890
- return Array.prototype.slice.call(r, 0);
889
+ function $(a) {
890
+ return Array.prototype.slice.call(a, 0);
891
891
  }
892
- function oe(r, i, u) {
893
- for (var p = [], E = [], O = 0; O < r.length; ) {
894
- var N = r[O][i];
895
- Z(E, N) < 0 && p.push(r[O]), E[O] = N, O++;
892
+ function ae(a, i, u) {
893
+ for (var g = [], T = [], _ = 0; _ < a.length; ) {
894
+ var k = a[_][i];
895
+ X(T, k) < 0 && g.push(a[_]), T[_] = k, _++;
896
896
  }
897
- return p = p.sort(function(ce, ee) {
897
+ return g = g.sort(function(ce, ee) {
898
898
  return ce[i] > ee[i];
899
- }), p;
899
+ }), g;
900
900
  }
901
- function H(r, i) {
902
- for (var u, p, E = i[0].toUpperCase() + i.slice(1), O = 0; O < t.length; ) {
903
- if (u = t[O], p = u ? u + E : i, p in r)
904
- return p;
905
- O++;
901
+ function z(a, i) {
902
+ for (var u, g, T = i[0].toUpperCase() + i.slice(1), _ = 0; _ < t.length; ) {
903
+ if (u = t[_], g = u ? u + T : i, g in a)
904
+ return g;
905
+ _++;
906
906
  }
907
907
  return n;
908
908
  }
@@ -910,15 +910,15 @@ var Tt = (function(f, o, e, n) {
910
910
  function I() {
911
911
  return q++;
912
912
  }
913
- function F(r) {
914
- var i = r.ownerDocument || r;
915
- return i.defaultView || i.parentWindow || f;
913
+ function L(a) {
914
+ var i = a.ownerDocument || a;
915
+ return i.defaultView || i.parentWindow || h;
916
916
  }
917
- var L = /mobile|tablet|ip(ad|hone|od)|android/i, D = "ontouchstart" in f, G = H(f, "PointerEvent") !== n, re = D && L.test(navigator.userAgent), Q = "touch", V = "pen", te = "mouse", Y = "kinect", j = 25, k = 1, se = 2, K = 4, J = 8, Oe = 1, Me = 2, Ce = 4, Le = 8, Ae = 16, ue = Me | Ce, de = Le | Ae, Ue = ue | de, Re = ["x", "y"], Fe = ["clientX", "clientY"];
918
- function le(r, i) {
917
+ var F = /mobile|tablet|ip(ad|hone|od)|android/i, N = "ontouchstart" in h, j = z(h, "PointerEvent") !== n, ne = N && F.test(navigator.userAgent), K = "touch", U = "pen", te = "mouse", Y = "kinect", G = 25, B = 1, se = 2, Z = 4, Q = 8, Oe = 1, Pe = 2, Ce = 4, Le = 8, Ae = 16, ue = Pe | Ce, de = Le | Ae, Ue = ue | de, Re = ["x", "y"], Fe = ["clientX", "clientY"];
918
+ function le(a, i) {
919
919
  var u = this;
920
- this.manager = r, this.callback = i, this.element = r.element, this.target = r.options.inputTarget, this.domHandler = function(p) {
921
- A(r.options.enable, [r]) && u.handler(p);
920
+ this.manager = a, this.callback = i, this.element = a.element, this.target = a.options.inputTarget, this.domHandler = function(g) {
921
+ M(a.options.enable, [a]) && u.handler(g);
922
922
  }, this.init();
923
923
  }
924
924
  le.prototype = {
@@ -932,121 +932,121 @@ var Tt = (function(f, o, e, n) {
932
932
  * bind the events
933
933
  */
934
934
  init: function() {
935
- this.evEl && _(this.element, this.evEl, this.domHandler), this.evTarget && _(this.target, this.evTarget, this.domHandler), this.evWin && _(F(this.element), this.evWin, this.domHandler);
935
+ this.evEl && O(this.element, this.evEl, this.domHandler), this.evTarget && O(this.target, this.evTarget, this.domHandler), this.evWin && O(L(this.element), this.evWin, this.domHandler);
936
936
  },
937
937
  /**
938
938
  * unbind the events
939
939
  */
940
940
  destroy: function() {
941
- this.evEl && S(this.element, this.evEl, this.domHandler), this.evTarget && S(this.target, this.evTarget, this.domHandler), this.evWin && S(F(this.element), this.evWin, this.domHandler);
941
+ this.evEl && S(this.element, this.evEl, this.domHandler), this.evTarget && S(this.target, this.evTarget, this.domHandler), this.evWin && S(L(this.element), this.evWin, this.domHandler);
942
942
  }
943
943
  };
944
- function Ke(r) {
945
- var i, u = r.options.inputClass;
946
- return u ? i = u : G ? i = ht : re ? i = $e : D ? i = dt : i = Je, new i(r, Ze);
944
+ function Ke(a) {
945
+ var i, u = a.options.inputClass;
946
+ return u ? i = u : j ? i = ht : ne ? i = $e : N ? i = dt : i = Je, new i(a, Ze);
947
947
  }
948
- function Ze(r, i, u) {
949
- var p = u.pointers.length, E = u.changedPointers.length, O = i & k && p - E === 0, N = i & (K | J) && p - E === 0;
950
- u.isFirst = !!O, u.isFinal = !!N, O && (r.session = {}), u.eventType = i, d(r, u), r.emit("hammer.input", u), r.recognize(u), r.session.prevInput = u;
948
+ function Ze(a, i, u) {
949
+ var g = u.pointers.length, T = u.changedPointers.length, _ = i & B && g - T === 0, k = i & (Z | Q) && g - T === 0;
950
+ u.isFirst = !!_, u.isFinal = !!k, _ && (a.session = {}), u.eventType = i, v(a, u), a.emit("hammer.input", u), a.recognize(u), a.session.prevInput = u;
951
951
  }
952
- function d(r, i) {
953
- var u = r.session, p = i.pointers, E = p.length;
954
- u.firstInput || (u.firstInput = ne(i)), E > 1 && !u.firstMultiple ? u.firstMultiple = ne(i) : E === 1 && (u.firstMultiple = !1);
955
- var O = u.firstInput, N = u.firstMultiple, ae = N ? N.center : O.center, ce = i.center = pe(p);
956
- i.timeStamp = c(), i.deltaTime = i.timeStamp - O.timeStamp, i.angle = ft(ae, ce), i.distance = Qe(ae, ce), B(u, i), i.offsetDirection = be(i.deltaX, i.deltaY);
952
+ function v(a, i) {
953
+ var u = a.session, g = i.pointers, T = g.length;
954
+ u.firstInput || (u.firstInput = re(i)), T > 1 && !u.firstMultiple ? u.firstMultiple = re(i) : T === 1 && (u.firstMultiple = !1);
955
+ var _ = u.firstInput, k = u.firstMultiple, ie = k ? k.center : _.center, ce = i.center = pe(g);
956
+ i.timeStamp = f(), i.deltaTime = i.timeStamp - _.timeStamp, i.angle = ft(ie, ce), i.distance = Qe(ie, ce), R(u, i), i.offsetDirection = be(i.deltaX, i.deltaY);
957
957
  var ee = Ve(i.deltaTime, i.deltaX, i.deltaY);
958
- i.overallVelocityX = ee.x, i.overallVelocityY = ee.y, i.overallVelocity = h(ee.x) > h(ee.y) ? ee.x : ee.y, i.scale = N ? an(N.pointers, p) : 1, i.rotation = N ? rn(N.pointers, p) : 0, i.maxPointers = u.prevInput ? i.pointers.length > u.prevInput.maxPointers ? i.pointers.length : u.prevInput.maxPointers : i.pointers.length, $(u, i);
959
- var ge = r.element;
960
- U(i.srcEvent.target, ge) && (ge = i.srcEvent.target), i.target = ge;
958
+ i.overallVelocityX = ee.x, i.overallVelocityY = ee.y, i.overallVelocity = d(ee.x) > d(ee.y) ? ee.x : ee.y, i.scale = k ? an(k.pointers, g) : 1, i.rotation = k ? rn(k.pointers, g) : 0, i.maxPointers = u.prevInput ? i.pointers.length > u.prevInput.maxPointers ? i.pointers.length : u.prevInput.maxPointers : i.pointers.length, J(u, i);
959
+ var ge = a.element;
960
+ D(i.srcEvent.target, ge) && (ge = i.srcEvent.target), i.target = ge;
961
961
  }
962
- function B(r, i) {
963
- var u = i.center, p = r.offsetDelta || {}, E = r.prevDelta || {}, O = r.prevInput || {};
964
- (i.eventType === k || O.eventType === K) && (E = r.prevDelta = {
965
- x: O.deltaX || 0,
966
- y: O.deltaY || 0
967
- }, p = r.offsetDelta = {
962
+ function R(a, i) {
963
+ var u = i.center, g = a.offsetDelta || {}, T = a.prevDelta || {}, _ = a.prevInput || {};
964
+ (i.eventType === B || _.eventType === Z) && (T = a.prevDelta = {
965
+ x: _.deltaX || 0,
966
+ y: _.deltaY || 0
967
+ }, g = a.offsetDelta = {
968
968
  x: u.x,
969
969
  y: u.y
970
- }), i.deltaX = E.x + (u.x - p.x), i.deltaY = E.y + (u.y - p.y);
970
+ }), i.deltaX = T.x + (u.x - g.x), i.deltaY = T.y + (u.y - g.y);
971
971
  }
972
- function $(r, i) {
973
- var u = r.lastInterval || i, p = i.timeStamp - u.timeStamp, E, O, N, ae;
974
- if (i.eventType != J && (p > j || u.velocity === n)) {
975
- var ce = i.deltaX - u.deltaX, ee = i.deltaY - u.deltaY, ge = Ve(p, ce, ee);
976
- O = ge.x, N = ge.y, E = h(ge.x) > h(ge.y) ? ge.x : ge.y, ae = be(ce, ee), r.lastInterval = i;
972
+ function J(a, i) {
973
+ var u = a.lastInterval || i, g = i.timeStamp - u.timeStamp, T, _, k, ie;
974
+ if (i.eventType != Q && (g > G || u.velocity === n)) {
975
+ var ce = i.deltaX - u.deltaX, ee = i.deltaY - u.deltaY, ge = Ve(g, ce, ee);
976
+ _ = ge.x, k = ge.y, T = d(ge.x) > d(ge.y) ? ge.x : ge.y, ie = be(ce, ee), a.lastInterval = i;
977
977
  } else
978
- E = u.velocity, O = u.velocityX, N = u.velocityY, ae = u.direction;
979
- i.velocity = E, i.velocityX = O, i.velocityY = N, i.direction = ae;
978
+ T = u.velocity, _ = u.velocityX, k = u.velocityY, ie = u.direction;
979
+ i.velocity = T, i.velocityX = _, i.velocityY = k, i.direction = ie;
980
980
  }
981
- function ne(r) {
982
- for (var i = [], u = 0; u < r.pointers.length; )
981
+ function re(a) {
982
+ for (var i = [], u = 0; u < a.pointers.length; )
983
983
  i[u] = {
984
- clientX: l(r.pointers[u].clientX),
985
- clientY: l(r.pointers[u].clientY)
984
+ clientX: l(a.pointers[u].clientX),
985
+ clientY: l(a.pointers[u].clientY)
986
986
  }, u++;
987
987
  return {
988
- timeStamp: c(),
988
+ timeStamp: f(),
989
989
  pointers: i,
990
990
  center: pe(i),
991
- deltaX: r.deltaX,
992
- deltaY: r.deltaY
991
+ deltaX: a.deltaX,
992
+ deltaY: a.deltaY
993
993
  };
994
994
  }
995
- function pe(r) {
996
- var i = r.length;
995
+ function pe(a) {
996
+ var i = a.length;
997
997
  if (i === 1)
998
998
  return {
999
- x: l(r[0].clientX),
1000
- y: l(r[0].clientY)
999
+ x: l(a[0].clientX),
1000
+ y: l(a[0].clientY)
1001
1001
  };
1002
- for (var u = 0, p = 0, E = 0; E < i; )
1003
- u += r[E].clientX, p += r[E].clientY, E++;
1002
+ for (var u = 0, g = 0, T = 0; T < i; )
1003
+ u += a[T].clientX, g += a[T].clientY, T++;
1004
1004
  return {
1005
1005
  x: l(u / i),
1006
- y: l(p / i)
1006
+ y: l(g / i)
1007
1007
  };
1008
1008
  }
1009
- function Ve(r, i, u) {
1009
+ function Ve(a, i, u) {
1010
1010
  return {
1011
- x: i / r || 0,
1012
- y: u / r || 0
1011
+ x: i / a || 0,
1012
+ y: u / a || 0
1013
1013
  };
1014
1014
  }
1015
- function be(r, i) {
1016
- return r === i ? Oe : h(r) >= h(i) ? r < 0 ? Me : Ce : i < 0 ? Le : Ae;
1015
+ function be(a, i) {
1016
+ return a === i ? Oe : d(a) >= d(i) ? a < 0 ? Pe : Ce : i < 0 ? Le : Ae;
1017
1017
  }
1018
- function Qe(r, i, u) {
1018
+ function Qe(a, i, u) {
1019
1019
  u || (u = Re);
1020
- var p = i[u[0]] - r[u[0]], E = i[u[1]] - r[u[1]];
1021
- return Math.sqrt(p * p + E * E);
1020
+ var g = i[u[0]] - a[u[0]], T = i[u[1]] - a[u[1]];
1021
+ return Math.sqrt(g * g + T * T);
1022
1022
  }
1023
- function ft(r, i, u) {
1023
+ function ft(a, i, u) {
1024
1024
  u || (u = Re);
1025
- var p = i[u[0]] - r[u[0]], E = i[u[1]] - r[u[1]];
1026
- return Math.atan2(E, p) * 180 / Math.PI;
1025
+ var g = i[u[0]] - a[u[0]], T = i[u[1]] - a[u[1]];
1026
+ return Math.atan2(T, g) * 180 / Math.PI;
1027
1027
  }
1028
- function rn(r, i) {
1029
- return ft(i[1], i[0], Fe) + ft(r[1], r[0], Fe);
1028
+ function rn(a, i) {
1029
+ return ft(i[1], i[0], Fe) + ft(a[1], a[0], Fe);
1030
1030
  }
1031
- function an(r, i) {
1032
- return Qe(i[0], i[1], Fe) / Qe(r[0], r[1], Fe);
1031
+ function an(a, i) {
1032
+ return Qe(i[0], i[1], Fe) / Qe(a[0], a[1], Fe);
1033
1033
  }
1034
1034
  var on = {
1035
- mousedown: k,
1035
+ mousedown: B,
1036
1036
  mousemove: se,
1037
- mouseup: K
1037
+ mouseup: Z
1038
1038
  }, sn = "mousedown", ln = "mousemove mouseup";
1039
1039
  function Je() {
1040
1040
  this.evEl = sn, this.evWin = ln, this.pressed = !1, le.apply(this, arguments);
1041
1041
  }
1042
- b(Je, le, {
1042
+ w(Je, le, {
1043
1043
  /**
1044
1044
  * handle mouse events
1045
1045
  * @param {Object} ev
1046
1046
  */
1047
1047
  handler: function(i) {
1048
1048
  var u = on[i.type];
1049
- u & k && (i.button === 0 || i.button === 2) && (this.pressed = !0), u & se && i.which !== 1 && (u = K), this.pressed && (u & K && (this.pressed = !1), this.callback(this.manager, u, {
1049
+ u & B && (i.button === 0 || i.button === 2) && (this.pressed = !0), u & se && i.which !== 1 && (u = Z), this.pressed && (u & Z && (this.pressed = !1), this.callback(this.manager, u, {
1050
1050
  pointers: [i],
1051
1051
  changedPointers: [i],
1052
1052
  pointerType: te,
@@ -1055,124 +1055,124 @@ var Tt = (function(f, o, e, n) {
1055
1055
  }
1056
1056
  });
1057
1057
  var Ft = {
1058
- pointerdown: k,
1058
+ pointerdown: B,
1059
1059
  pointermove: se,
1060
- pointerup: K,
1061
- pointercancel: J,
1062
- pointerout: J
1060
+ pointerup: Z,
1061
+ pointercancel: Q,
1062
+ pointerout: Q
1063
1063
  }, un = {
1064
- 2: Q,
1065
- 3: V,
1064
+ 2: K,
1065
+ 3: U,
1066
1066
  4: te,
1067
1067
  5: Y
1068
1068
  // see https://twitter.com/jacobrossi/status/480596438489890816
1069
1069
  }, It = "pointerdown", Dt = "pointermove pointerup pointercancel";
1070
- f.MSPointerEvent && !f.PointerEvent && (It = "MSPointerDown", Dt = "MSPointerMove MSPointerUp MSPointerCancel");
1070
+ h.MSPointerEvent && !h.PointerEvent && (It = "MSPointerDown", Dt = "MSPointerMove MSPointerUp MSPointerCancel");
1071
1071
  function ht() {
1072
1072
  this.evEl = It, this.evWin = Dt, le.apply(this, arguments), this.store = this.manager.session.pointerEvents = [];
1073
1073
  }
1074
- b(ht, le, {
1074
+ w(ht, le, {
1075
1075
  /**
1076
1076
  * handle mouse events
1077
1077
  * @param {Object} ev
1078
1078
  */
1079
1079
  handler: function(i) {
1080
- var u = this.store, p = !1, E = !1, O = i.type.toLowerCase().replace("ms", ""), N = Ft[O], ae = un[i.pointerType] || i.pointerType, ce = ae == Q, ee = Z(u, i.pointerId, "pointerId");
1081
- N & k && (i.button === 0 || i.button === 2 || ce) ? ee < 0 && (u.push(i), ee = u.length - 1) : N & (K | J) ? p = !0 : !ce && i.buttons === 0 && (p = !0, E = !0, N = Ft.pointerup), !(ee < 0) && (E || (u[ee] = i), this.callback(this.manager, N, {
1080
+ var u = this.store, g = !1, T = !1, _ = i.type.toLowerCase().replace("ms", ""), k = Ft[_], ie = un[i.pointerType] || i.pointerType, ce = ie == K, ee = X(u, i.pointerId, "pointerId");
1081
+ k & B && (i.button === 0 || i.button === 2 || ce) ? ee < 0 && (u.push(i), ee = u.length - 1) : k & (Z | Q) ? g = !0 : !ce && i.buttons === 0 && (g = !0, T = !0, k = Ft.pointerup), !(ee < 0) && (T || (u[ee] = i), this.callback(this.manager, k, {
1082
1082
  pointers: u,
1083
1083
  changedPointers: [i],
1084
- pointerType: ae,
1084
+ pointerType: ie,
1085
1085
  srcEvent: u[ee]
1086
- }), p && u.splice(ee, 1));
1086
+ }), g && u.splice(ee, 1));
1087
1087
  }
1088
1088
  });
1089
1089
  var cn = {
1090
- touchstart: k,
1090
+ touchstart: B,
1091
1091
  touchmove: se,
1092
- touchend: K,
1093
- touchcancel: J
1092
+ touchend: Z,
1093
+ touchcancel: Q
1094
1094
  }, fn = "touchstart", hn = "touchstart touchmove touchend touchcancel";
1095
1095
  function Nt() {
1096
1096
  this.evTarget = fn, this.evWin = hn, this.started = !1, le.apply(this, arguments);
1097
1097
  }
1098
- b(Nt, le, {
1098
+ w(Nt, le, {
1099
1099
  handler: function(i) {
1100
1100
  var u = cn[i.type];
1101
- if (u === k && (this.started = !0), !!this.started) {
1102
- var p = dn.call(this, i, u);
1103
- u & (K | J) && p[0].length - p[1].length === 0 && (this.started = !1), this.callback(this.manager, u, {
1104
- pointers: p[0],
1105
- changedPointers: p[1],
1106
- pointerType: Q,
1101
+ if (u === B && (this.started = !0), !!this.started) {
1102
+ var g = dn.call(this, i, u);
1103
+ u & (Z | Q) && g[0].length - g[1].length === 0 && (this.started = !1), this.callback(this.manager, u, {
1104
+ pointers: g[0],
1105
+ changedPointers: g[1],
1106
+ pointerType: K,
1107
1107
  srcEvent: i
1108
1108
  });
1109
1109
  }
1110
1110
  }
1111
1111
  });
1112
- function dn(r, i) {
1113
- var u = X(r.touches), p = X(r.changedTouches);
1114
- return i & (K | J) && (u = oe(u.concat(p), "identifier")), [u, p];
1112
+ function dn(a, i) {
1113
+ var u = $(a.touches), g = $(a.changedTouches);
1114
+ return i & (Z | Q) && (u = ae(u.concat(g), "identifier")), [u, g];
1115
1115
  }
1116
1116
  var vn = {
1117
- touchstart: k,
1117
+ touchstart: B,
1118
1118
  touchmove: se,
1119
- touchend: K,
1120
- touchcancel: J
1119
+ touchend: Z,
1120
+ touchcancel: Q
1121
1121
  }, pn = "touchstart touchmove touchend touchcancel";
1122
1122
  function $e() {
1123
1123
  this.evTarget = pn, this.targetIds = {}, le.apply(this, arguments);
1124
1124
  }
1125
- b($e, le, {
1125
+ w($e, le, {
1126
1126
  handler: function(i) {
1127
- var u = vn[i.type], p = mn.call(this, i, u);
1128
- p && this.callback(this.manager, u, {
1129
- pointers: p[0],
1130
- changedPointers: p[1],
1131
- pointerType: Q,
1127
+ var u = vn[i.type], g = mn.call(this, i, u);
1128
+ g && this.callback(this.manager, u, {
1129
+ pointers: g[0],
1130
+ changedPointers: g[1],
1131
+ pointerType: K,
1132
1132
  srcEvent: i
1133
1133
  });
1134
1134
  }
1135
1135
  });
1136
- function mn(r, i) {
1137
- var u = X(r.touches), p = this.targetIds;
1138
- if (i & (k | se) && u.length === 1)
1139
- return p[u[0].identifier] = !0, [u, u];
1140
- var E, O, N = X(r.changedTouches), ae = [], ce = this.target;
1141
- if (O = u.filter(function(ee) {
1142
- return U(ee.target, ce);
1143
- }), i === k)
1144
- for (E = 0; E < O.length; )
1145
- p[O[E].identifier] = !0, E++;
1146
- for (E = 0; E < N.length; )
1147
- p[N[E].identifier] && ae.push(N[E]), i & (K | J) && delete p[N[E].identifier], E++;
1148
- if (ae.length)
1136
+ function mn(a, i) {
1137
+ var u = $(a.touches), g = this.targetIds;
1138
+ if (i & (B | se) && u.length === 1)
1139
+ return g[u[0].identifier] = !0, [u, u];
1140
+ var T, _, k = $(a.changedTouches), ie = [], ce = this.target;
1141
+ if (_ = u.filter(function(ee) {
1142
+ return D(ee.target, ce);
1143
+ }), i === B)
1144
+ for (T = 0; T < _.length; )
1145
+ g[_[T].identifier] = !0, T++;
1146
+ for (T = 0; T < k.length; )
1147
+ g[k[T].identifier] && ie.push(k[T]), i & (Z | Q) && delete g[k[T].identifier], T++;
1148
+ if (ie.length)
1149
1149
  return [
1150
1150
  // merge targetTouches with changedTargetTouches so it contains ALL touches, including 'end' and 'cancel'
1151
- oe(O.concat(ae), "identifier"),
1152
- ae
1151
+ ae(_.concat(ie), "identifier"),
1152
+ ie
1153
1153
  ];
1154
1154
  }
1155
1155
  var gn = 2500, kt = 25;
1156
1156
  function dt() {
1157
1157
  le.apply(this, arguments);
1158
- var r = y(this.handler, this);
1159
- this.touch = new $e(this.manager, r), this.mouse = new Je(this.manager, r), this.primaryTouch = null, this.lastTouches = [];
1158
+ var a = b(this.handler, this);
1159
+ this.touch = new $e(this.manager, a), this.mouse = new Je(this.manager, a), this.primaryTouch = null, this.lastTouches = [];
1160
1160
  }
1161
- b(dt, le, {
1161
+ w(dt, le, {
1162
1162
  /**
1163
1163
  * handle mouse and touch events
1164
1164
  * @param {Hammer} manager
1165
1165
  * @param {String} inputEvent
1166
1166
  * @param {Object} inputData
1167
1167
  */
1168
- handler: function(i, u, p) {
1169
- var E = p.pointerType == Q, O = p.pointerType == te;
1170
- if (!(O && p.sourceCapabilities && p.sourceCapabilities.firesTouchEvents)) {
1171
- if (E)
1172
- yn.call(this, u, p);
1173
- else if (O && bn.call(this, p))
1168
+ handler: function(i, u, g) {
1169
+ var T = g.pointerType == K, _ = g.pointerType == te;
1170
+ if (!(_ && g.sourceCapabilities && g.sourceCapabilities.firesTouchEvents)) {
1171
+ if (T)
1172
+ yn.call(this, u, g);
1173
+ else if (_ && bn.call(this, g))
1174
1174
  return;
1175
- this.callback(i, u, p);
1175
+ this.callback(i, u, g);
1176
1176
  }
1177
1177
  },
1178
1178
  /**
@@ -1182,40 +1182,40 @@ var Tt = (function(f, o, e, n) {
1182
1182
  this.touch.destroy(), this.mouse.destroy();
1183
1183
  }
1184
1184
  });
1185
- function yn(r, i) {
1186
- r & k ? (this.primaryTouch = i.changedPointers[0].identifier, Bt.call(this, i)) : r & (K | J) && Bt.call(this, i);
1185
+ function yn(a, i) {
1186
+ a & B ? (this.primaryTouch = i.changedPointers[0].identifier, Bt.call(this, i)) : a & (Z | Q) && Bt.call(this, i);
1187
1187
  }
1188
- function Bt(r) {
1189
- var i = r.changedPointers[0];
1188
+ function Bt(a) {
1189
+ var i = a.changedPointers[0];
1190
1190
  if (i.identifier === this.primaryTouch) {
1191
1191
  var u = { x: i.clientX, y: i.clientY };
1192
1192
  this.lastTouches.push(u);
1193
- var p = this.lastTouches, E = function() {
1194
- var O = p.indexOf(u);
1195
- O > -1 && p.splice(O, 1);
1193
+ var g = this.lastTouches, T = function() {
1194
+ var _ = g.indexOf(u);
1195
+ _ > -1 && g.splice(_, 1);
1196
1196
  };
1197
- setTimeout(E, gn);
1197
+ setTimeout(T, gn);
1198
1198
  }
1199
1199
  }
1200
- function bn(r) {
1201
- for (var i = r.srcEvent.clientX, u = r.srcEvent.clientY, p = 0; p < this.lastTouches.length; p++) {
1202
- var E = this.lastTouches[p], O = Math.abs(i - E.x), N = Math.abs(u - E.y);
1203
- if (O <= kt && N <= kt)
1200
+ function bn(a) {
1201
+ for (var i = a.srcEvent.clientX, u = a.srcEvent.clientY, g = 0; g < this.lastTouches.length; g++) {
1202
+ var T = this.lastTouches[g], _ = Math.abs(i - T.x), k = Math.abs(u - T.y);
1203
+ if (_ <= kt && k <= kt)
1204
1204
  return !0;
1205
1205
  }
1206
1206
  return !1;
1207
1207
  }
1208
- var Ut = a ? H(a.style, "touchAction") : n, Rt = Ut !== n, Vt = "compute", zt = "auto", vt = "manipulation", Ie = "none", ze = "pan-x", je = "pan-y", et = En();
1209
- function pt(r, i) {
1210
- this.manager = r, this.set(i);
1208
+ var Ut = r ? z(r.style, "touchAction") : n, Rt = Ut !== n, Vt = "compute", zt = "auto", vt = "manipulation", Ie = "none", ze = "pan-x", je = "pan-y", et = En();
1209
+ function pt(a, i) {
1210
+ this.manager = a, this.set(i);
1211
1211
  }
1212
1212
  pt.prototype = {
1213
1213
  /**
1214
1214
  * set the touchAction value on the element or enable the polyfill
1215
1215
  * @param {String} value
1216
1216
  */
1217
- set: function(r) {
1218
- r == Vt && (r = this.compute()), Rt && this.manager.element.style && et[r] && (this.manager.element.style[Ut] = r), this.actions = r.toLowerCase().trim();
1217
+ set: function(a) {
1218
+ a == Vt && (a = this.compute()), Rt && this.manager.element.style && et[a] && (this.manager.element.style[Ut] = a), this.actions = a.toLowerCase().trim();
1219
1219
  },
1220
1220
  /**
1221
1221
  * just re-set the touchAction value
@@ -1228,55 +1228,55 @@ var Tt = (function(f, o, e, n) {
1228
1228
  * @returns {String} value
1229
1229
  */
1230
1230
  compute: function() {
1231
- var r = [];
1232
- return P(this.manager.recognizers, function(i) {
1233
- A(i.options.enable, [i]) && (r = r.concat(i.getTouchAction()));
1234
- }), wn(r.join(" "));
1231
+ var a = [];
1232
+ return A(this.manager.recognizers, function(i) {
1233
+ M(i.options.enable, [i]) && (a = a.concat(i.getTouchAction()));
1234
+ }), wn(a.join(" "));
1235
1235
  },
1236
1236
  /**
1237
1237
  * this method is called on each input cycle and provides the preventing of the browser behavior
1238
1238
  * @param {Object} input
1239
1239
  */
1240
- preventDefaults: function(r) {
1241
- var i = r.srcEvent, u = r.offsetDirection;
1240
+ preventDefaults: function(a) {
1241
+ var i = a.srcEvent, u = a.offsetDirection;
1242
1242
  if (this.manager.session.prevented) {
1243
1243
  i.preventDefault();
1244
1244
  return;
1245
1245
  }
1246
- var p = this.actions, E = R(p, Ie) && !et[Ie], O = R(p, je) && !et[je], N = R(p, ze) && !et[ze];
1247
- if (E) {
1248
- var ae = r.pointers.length === 1, ce = r.distance < 2, ee = r.deltaTime < 250;
1249
- if (ae && ce && ee)
1246
+ var g = this.actions, T = W(g, Ie) && !et[Ie], _ = W(g, je) && !et[je], k = W(g, ze) && !et[ze];
1247
+ if (T) {
1248
+ var ie = a.pointers.length === 1, ce = a.distance < 2, ee = a.deltaTime < 250;
1249
+ if (ie && ce && ee)
1250
1250
  return;
1251
1251
  }
1252
- if (!(N && O) && (E || O && u & ue || N && u & de))
1252
+ if (!(k && _) && (T || _ && u & ue || k && u & de))
1253
1253
  return this.preventSrc(i);
1254
1254
  },
1255
1255
  /**
1256
1256
  * call preventDefault to prevent the browser's default behavior (scrolling in most cases)
1257
1257
  * @param {Object} srcEvent
1258
1258
  */
1259
- preventSrc: function(r) {
1260
- this.manager.session.prevented = !0, r.preventDefault();
1259
+ preventSrc: function(a) {
1260
+ this.manager.session.prevented = !0, a.preventDefault();
1261
1261
  }
1262
1262
  };
1263
- function wn(r) {
1264
- if (R(r, Ie))
1263
+ function wn(a) {
1264
+ if (W(a, Ie))
1265
1265
  return Ie;
1266
- var i = R(r, ze), u = R(r, je);
1267
- return i && u ? Ie : i || u ? i ? ze : je : R(r, vt) ? vt : zt;
1266
+ var i = W(a, ze), u = W(a, je);
1267
+ return i && u ? Ie : i || u ? i ? ze : je : W(a, vt) ? vt : zt;
1268
1268
  }
1269
1269
  function En() {
1270
1270
  if (!Rt)
1271
1271
  return !1;
1272
- var r = {}, i = f.CSS && f.CSS.supports;
1272
+ var a = {}, i = h.CSS && h.CSS.supports;
1273
1273
  return ["auto", "manipulation", "pan-y", "pan-x", "pan-x pan-y", "none"].forEach(function(u) {
1274
- r[u] = i ? f.CSS.supports("touch-action", u) : !0;
1275
- }), r;
1274
+ a[u] = i ? h.CSS.supports("touch-action", u) : !0;
1275
+ }), a;
1276
1276
  }
1277
1277
  var tt = 1, fe = 2, ke = 4, xe = 8, we = xe, Ge = 16, me = 32;
1278
- function Ee(r) {
1279
- this.options = M({}, this.defaults, r || {}), this.id = I(), this.manager = null, this.options.enable = m(this.options.enable, !0), this.state = tt, this.simultaneous = {}, this.requireFail = [];
1278
+ function Ee(a) {
1279
+ this.options = P({}, this.defaults, a || {}), this.id = I(), this.manager = null, this.options.enable = c(this.options.enable, !0), this.state = tt, this.simultaneous = {}, this.requireFail = [];
1280
1280
  }
1281
1281
  Ee.prototype = {
1282
1282
  /**
@@ -1289,49 +1289,49 @@ var Tt = (function(f, o, e, n) {
1289
1289
  * @param {Object} options
1290
1290
  * @return {Recognizer}
1291
1291
  */
1292
- set: function(r) {
1293
- return M(this.options, r), this.manager && this.manager.touchAction.update(), this;
1292
+ set: function(a) {
1293
+ return P(this.options, a), this.manager && this.manager.touchAction.update(), this;
1294
1294
  },
1295
1295
  /**
1296
1296
  * recognize simultaneous with an other recognizer.
1297
1297
  * @param {Recognizer} otherRecognizer
1298
1298
  * @returns {Recognizer} this
1299
1299
  */
1300
- recognizeWith: function(r) {
1301
- if (w(r, "recognizeWith", this))
1300
+ recognizeWith: function(a) {
1301
+ if (y(a, "recognizeWith", this))
1302
1302
  return this;
1303
1303
  var i = this.simultaneous;
1304
- return r = nt(r, this), i[r.id] || (i[r.id] = r, r.recognizeWith(this)), this;
1304
+ return a = nt(a, this), i[a.id] || (i[a.id] = a, a.recognizeWith(this)), this;
1305
1305
  },
1306
1306
  /**
1307
1307
  * drop the simultaneous link. it doesnt remove the link on the other recognizer.
1308
1308
  * @param {Recognizer} otherRecognizer
1309
1309
  * @returns {Recognizer} this
1310
1310
  */
1311
- dropRecognizeWith: function(r) {
1312
- return w(r, "dropRecognizeWith", this) ? this : (r = nt(r, this), delete this.simultaneous[r.id], this);
1311
+ dropRecognizeWith: function(a) {
1312
+ return y(a, "dropRecognizeWith", this) ? this : (a = nt(a, this), delete this.simultaneous[a.id], this);
1313
1313
  },
1314
1314
  /**
1315
1315
  * recognizer can only run when an other is failing
1316
1316
  * @param {Recognizer} otherRecognizer
1317
1317
  * @returns {Recognizer} this
1318
1318
  */
1319
- requireFailure: function(r) {
1320
- if (w(r, "requireFailure", this))
1319
+ requireFailure: function(a) {
1320
+ if (y(a, "requireFailure", this))
1321
1321
  return this;
1322
1322
  var i = this.requireFail;
1323
- return r = nt(r, this), Z(i, r) === -1 && (i.push(r), r.requireFailure(this)), this;
1323
+ return a = nt(a, this), X(i, a) === -1 && (i.push(a), a.requireFailure(this)), this;
1324
1324
  },
1325
1325
  /**
1326
1326
  * drop the requireFailure link. it does not remove the link on the other recognizer.
1327
1327
  * @param {Recognizer} otherRecognizer
1328
1328
  * @returns {Recognizer} this
1329
1329
  */
1330
- dropRequireFailure: function(r) {
1331
- if (w(r, "dropRequireFailure", this))
1330
+ dropRequireFailure: function(a) {
1331
+ if (y(a, "dropRequireFailure", this))
1332
1332
  return this;
1333
- r = nt(r, this);
1334
- var i = Z(this.requireFail, r);
1333
+ a = nt(a, this);
1334
+ var i = X(this.requireFail, a);
1335
1335
  return i > -1 && this.requireFail.splice(i, 1), this;
1336
1336
  },
1337
1337
  /**
@@ -1346,20 +1346,20 @@ var Tt = (function(f, o, e, n) {
1346
1346
  * @param {Recognizer} otherRecognizer
1347
1347
  * @returns {Boolean}
1348
1348
  */
1349
- canRecognizeWith: function(r) {
1350
- return !!this.simultaneous[r.id];
1349
+ canRecognizeWith: function(a) {
1350
+ return !!this.simultaneous[a.id];
1351
1351
  },
1352
1352
  /**
1353
1353
  * You should use `tryEmit` instead of `emit` directly to check
1354
1354
  * that all the needed recognizers has failed before emitting.
1355
1355
  * @param {Object} input
1356
1356
  */
1357
- emit: function(r) {
1357
+ emit: function(a) {
1358
1358
  var i = this, u = this.state;
1359
- function p(E) {
1360
- i.manager.emit(E, r);
1359
+ function g(T) {
1360
+ i.manager.emit(T, a);
1361
1361
  }
1362
- u < xe && p(i.options.event + jt(u)), p(i.options.event), r.additionalEvent && p(r.additionalEvent), u >= xe && p(i.options.event + jt(u));
1362
+ u < xe && g(i.options.event + jt(u)), g(i.options.event), a.additionalEvent && g(a.additionalEvent), u >= xe && g(i.options.event + jt(u));
1363
1363
  },
1364
1364
  /**
1365
1365
  * Check that all the require failure recognizers has failed,
@@ -1367,9 +1367,9 @@ var Tt = (function(f, o, e, n) {
1367
1367
  * otherwise, setup the state to FAILED.
1368
1368
  * @param {Object} input
1369
1369
  */
1370
- tryEmit: function(r) {
1370
+ tryEmit: function(a) {
1371
1371
  if (this.canEmit())
1372
- return this.emit(r);
1372
+ return this.emit(a);
1373
1373
  this.state = me;
1374
1374
  },
1375
1375
  /**
@@ -1377,10 +1377,10 @@ var Tt = (function(f, o, e, n) {
1377
1377
  * @returns {boolean}
1378
1378
  */
1379
1379
  canEmit: function() {
1380
- for (var r = 0; r < this.requireFail.length; ) {
1381
- if (!(this.requireFail[r].state & (me | tt)))
1380
+ for (var a = 0; a < this.requireFail.length; ) {
1381
+ if (!(this.requireFail[a].state & (me | tt)))
1382
1382
  return !1;
1383
- r++;
1383
+ a++;
1384
1384
  }
1385
1385
  return !0;
1386
1386
  },
@@ -1388,9 +1388,9 @@ var Tt = (function(f, o, e, n) {
1388
1388
  * update the recognizer
1389
1389
  * @param {Object} inputData
1390
1390
  */
1391
- recognize: function(r) {
1392
- var i = M({}, r);
1393
- if (!A(this.options.enable, [this, i])) {
1391
+ recognize: function(a) {
1392
+ var i = P({}, a);
1393
+ if (!M(this.options.enable, [this, i])) {
1394
1394
  this.reset(), this.state = me;
1395
1395
  return;
1396
1396
  }
@@ -1403,7 +1403,7 @@ var Tt = (function(f, o, e, n) {
1403
1403
  * @param {Object} inputData
1404
1404
  * @returns {Const} STATE
1405
1405
  */
1406
- process: function(r) {
1406
+ process: function(a) {
1407
1407
  },
1408
1408
  // jshint ignore:line
1409
1409
  /**
@@ -1421,20 +1421,20 @@ var Tt = (function(f, o, e, n) {
1421
1421
  reset: function() {
1422
1422
  }
1423
1423
  };
1424
- function jt(r) {
1425
- return r & Ge ? "cancel" : r & xe ? "end" : r & ke ? "move" : r & fe ? "start" : "";
1424
+ function jt(a) {
1425
+ return a & Ge ? "cancel" : a & xe ? "end" : a & ke ? "move" : a & fe ? "start" : "";
1426
1426
  }
1427
- function Gt(r) {
1428
- return r == Ae ? "down" : r == Le ? "up" : r == Me ? "left" : r == Ce ? "right" : "";
1427
+ function Gt(a) {
1428
+ return a == Ae ? "down" : a == Le ? "up" : a == Pe ? "left" : a == Ce ? "right" : "";
1429
1429
  }
1430
- function nt(r, i) {
1430
+ function nt(a, i) {
1431
1431
  var u = i.manager;
1432
- return u ? u.get(r) : r;
1432
+ return u ? u.get(a) : a;
1433
1433
  }
1434
1434
  function ve() {
1435
1435
  Ee.apply(this, arguments);
1436
1436
  }
1437
- b(ve, Ee, {
1437
+ w(ve, Ee, {
1438
1438
  /**
1439
1439
  * @namespace
1440
1440
  * @memberof AttrRecognizer
@@ -1452,9 +1452,9 @@ var Tt = (function(f, o, e, n) {
1452
1452
  * @param {Object} input
1453
1453
  * @returns {Boolean} recognized
1454
1454
  */
1455
- attrTest: function(r) {
1455
+ attrTest: function(a) {
1456
1456
  var i = this.options.pointers;
1457
- return i === 0 || r.pointers.length === i;
1457
+ return i === 0 || a.pointers.length === i;
1458
1458
  },
1459
1459
  /**
1460
1460
  * Process the input and return the state for the recognizer
@@ -1462,15 +1462,15 @@ var Tt = (function(f, o, e, n) {
1462
1462
  * @param {Object} input
1463
1463
  * @returns {*} State
1464
1464
  */
1465
- process: function(r) {
1466
- var i = this.state, u = r.eventType, p = i & (fe | ke), E = this.attrTest(r);
1467
- return p && (u & J || !E) ? i | Ge : p || E ? u & K ? i | xe : i & fe ? i | ke : fe : me;
1465
+ process: function(a) {
1466
+ var i = this.state, u = a.eventType, g = i & (fe | ke), T = this.attrTest(a);
1467
+ return g && (u & Q || !T) ? i | Ge : g || T ? u & Z ? i | xe : i & fe ? i | ke : fe : me;
1468
1468
  }
1469
1469
  });
1470
1470
  function rt() {
1471
1471
  ve.apply(this, arguments), this.pX = null, this.pY = null;
1472
1472
  }
1473
- b(rt, ve, {
1473
+ w(rt, ve, {
1474
1474
  /**
1475
1475
  * @namespace
1476
1476
  * @memberof PanRecognizer
@@ -1482,26 +1482,26 @@ var Tt = (function(f, o, e, n) {
1482
1482
  direction: Ue
1483
1483
  },
1484
1484
  getTouchAction: function() {
1485
- var r = this.options.direction, i = [];
1486
- return r & ue && i.push(je), r & de && i.push(ze), i;
1485
+ var a = this.options.direction, i = [];
1486
+ return a & ue && i.push(je), a & de && i.push(ze), i;
1487
1487
  },
1488
- directionTest: function(r) {
1489
- var i = this.options, u = !0, p = r.distance, E = r.direction, O = r.deltaX, N = r.deltaY;
1490
- return E & i.direction || (i.direction & ue ? (E = O === 0 ? Oe : O < 0 ? Me : Ce, u = O != this.pX, p = Math.abs(r.deltaX)) : (E = N === 0 ? Oe : N < 0 ? Le : Ae, u = N != this.pY, p = Math.abs(r.deltaY))), r.direction = E, u && p > i.threshold && E & i.direction;
1488
+ directionTest: function(a) {
1489
+ var i = this.options, u = !0, g = a.distance, T = a.direction, _ = a.deltaX, k = a.deltaY;
1490
+ return T & i.direction || (i.direction & ue ? (T = _ === 0 ? Oe : _ < 0 ? Pe : Ce, u = _ != this.pX, g = Math.abs(a.deltaX)) : (T = k === 0 ? Oe : k < 0 ? Le : Ae, u = k != this.pY, g = Math.abs(a.deltaY))), a.direction = T, u && g > i.threshold && T & i.direction;
1491
1491
  },
1492
- attrTest: function(r) {
1493
- return ve.prototype.attrTest.call(this, r) && (this.state & fe || !(this.state & fe) && this.directionTest(r));
1492
+ attrTest: function(a) {
1493
+ return ve.prototype.attrTest.call(this, a) && (this.state & fe || !(this.state & fe) && this.directionTest(a));
1494
1494
  },
1495
- emit: function(r) {
1496
- this.pX = r.deltaX, this.pY = r.deltaY;
1497
- var i = Gt(r.direction);
1498
- i && (r.additionalEvent = this.options.event + i), this._super.emit.call(this, r);
1495
+ emit: function(a) {
1496
+ this.pX = a.deltaX, this.pY = a.deltaY;
1497
+ var i = Gt(a.direction);
1498
+ i && (a.additionalEvent = this.options.event + i), this._super.emit.call(this, a);
1499
1499
  }
1500
1500
  });
1501
1501
  function mt() {
1502
1502
  ve.apply(this, arguments);
1503
1503
  }
1504
- b(mt, ve, {
1504
+ w(mt, ve, {
1505
1505
  /**
1506
1506
  * @namespace
1507
1507
  * @memberof PinchRecognizer
@@ -1514,21 +1514,21 @@ var Tt = (function(f, o, e, n) {
1514
1514
  getTouchAction: function() {
1515
1515
  return [Ie];
1516
1516
  },
1517
- attrTest: function(r) {
1518
- return this._super.attrTest.call(this, r) && (Math.abs(r.scale - 1) > this.options.threshold || this.state & fe);
1517
+ attrTest: function(a) {
1518
+ return this._super.attrTest.call(this, a) && (Math.abs(a.scale - 1) > this.options.threshold || this.state & fe);
1519
1519
  },
1520
- emit: function(r) {
1521
- if (r.scale !== 1) {
1522
- var i = r.scale < 1 ? "in" : "out";
1523
- r.additionalEvent = this.options.event + i;
1520
+ emit: function(a) {
1521
+ if (a.scale !== 1) {
1522
+ var i = a.scale < 1 ? "in" : "out";
1523
+ a.additionalEvent = this.options.event + i;
1524
1524
  }
1525
- this._super.emit.call(this, r);
1525
+ this._super.emit.call(this, a);
1526
1526
  }
1527
1527
  });
1528
1528
  function gt() {
1529
1529
  Ee.apply(this, arguments), this._timer = null, this._input = null;
1530
1530
  }
1531
- b(gt, Ee, {
1531
+ w(gt, Ee, {
1532
1532
  /**
1533
1533
  * @namespace
1534
1534
  * @memberof PressRecognizer
@@ -1544,29 +1544,29 @@ var Tt = (function(f, o, e, n) {
1544
1544
  getTouchAction: function() {
1545
1545
  return [zt];
1546
1546
  },
1547
- process: function(r) {
1548
- var i = this.options, u = r.pointers.length === i.pointers, p = r.distance < i.threshold, E = r.deltaTime > i.time;
1549
- if (this._input = r, !p || !u || r.eventType & (K | J) && !E)
1547
+ process: function(a) {
1548
+ var i = this.options, u = a.pointers.length === i.pointers, g = a.distance < i.threshold, T = a.deltaTime > i.time;
1549
+ if (this._input = a, !g || !u || a.eventType & (Z | Q) && !T)
1550
1550
  this.reset();
1551
- else if (r.eventType & k)
1552
- this.reset(), this._timer = g(function() {
1551
+ else if (a.eventType & B)
1552
+ this.reset(), this._timer = m(function() {
1553
1553
  this.state = we, this.tryEmit();
1554
1554
  }, i.time, this);
1555
- else if (r.eventType & K)
1555
+ else if (a.eventType & Z)
1556
1556
  return we;
1557
1557
  return me;
1558
1558
  },
1559
1559
  reset: function() {
1560
1560
  clearTimeout(this._timer);
1561
1561
  },
1562
- emit: function(r) {
1563
- this.state === we && (r && r.eventType & K ? this.manager.emit(this.options.event + "up", r) : (this._input.timeStamp = c(), this.manager.emit(this.options.event, this._input)));
1562
+ emit: function(a) {
1563
+ this.state === we && (a && a.eventType & Z ? this.manager.emit(this.options.event + "up", a) : (this._input.timeStamp = f(), this.manager.emit(this.options.event, this._input)));
1564
1564
  }
1565
1565
  });
1566
1566
  function yt() {
1567
1567
  ve.apply(this, arguments);
1568
1568
  }
1569
- b(yt, ve, {
1569
+ w(yt, ve, {
1570
1570
  /**
1571
1571
  * @namespace
1572
1572
  * @memberof RotateRecognizer
@@ -1579,14 +1579,14 @@ var Tt = (function(f, o, e, n) {
1579
1579
  getTouchAction: function() {
1580
1580
  return [Ie];
1581
1581
  },
1582
- attrTest: function(r) {
1583
- return this._super.attrTest.call(this, r) && (Math.abs(r.rotation) > this.options.threshold || this.state & fe);
1582
+ attrTest: function(a) {
1583
+ return this._super.attrTest.call(this, a) && (Math.abs(a.rotation) > this.options.threshold || this.state & fe);
1584
1584
  }
1585
1585
  });
1586
1586
  function bt() {
1587
1587
  ve.apply(this, arguments);
1588
1588
  }
1589
- b(bt, ve, {
1589
+ w(bt, ve, {
1590
1590
  /**
1591
1591
  * @namespace
1592
1592
  * @memberof SwipeRecognizer
@@ -1601,19 +1601,19 @@ var Tt = (function(f, o, e, n) {
1601
1601
  getTouchAction: function() {
1602
1602
  return rt.prototype.getTouchAction.call(this);
1603
1603
  },
1604
- attrTest: function(r) {
1604
+ attrTest: function(a) {
1605
1605
  var i = this.options.direction, u;
1606
- return i & (ue | de) ? u = r.overallVelocity : i & ue ? u = r.overallVelocityX : i & de && (u = r.overallVelocityY), this._super.attrTest.call(this, r) && i & r.offsetDirection && r.distance > this.options.threshold && r.maxPointers == this.options.pointers && h(u) > this.options.velocity && r.eventType & K;
1606
+ return i & (ue | de) ? u = a.overallVelocity : i & ue ? u = a.overallVelocityX : i & de && (u = a.overallVelocityY), this._super.attrTest.call(this, a) && i & a.offsetDirection && a.distance > this.options.threshold && a.maxPointers == this.options.pointers && d(u) > this.options.velocity && a.eventType & Z;
1607
1607
  },
1608
- emit: function(r) {
1609
- var i = Gt(r.offsetDirection);
1610
- i && this.manager.emit(this.options.event + i, r), this.manager.emit(this.options.event, r);
1608
+ emit: function(a) {
1609
+ var i = Gt(a.offsetDirection);
1610
+ i && this.manager.emit(this.options.event + i, a), this.manager.emit(this.options.event, a);
1611
1611
  }
1612
1612
  });
1613
1613
  function at() {
1614
1614
  Ee.apply(this, arguments), this.pTime = !1, this.pCenter = !1, this._timer = null, this._input = null, this.count = 0;
1615
1615
  }
1616
- b(at, Ee, {
1616
+ w(at, Ee, {
1617
1617
  /**
1618
1618
  * @namespace
1619
1619
  * @memberof PinchRecognizer
@@ -1634,25 +1634,25 @@ var Tt = (function(f, o, e, n) {
1634
1634
  getTouchAction: function() {
1635
1635
  return [vt];
1636
1636
  },
1637
- process: function(r) {
1638
- var i = this.options, u = r.pointers.length === i.pointers, p = r.distance < i.threshold, E = r.deltaTime < i.time;
1639
- if (this.reset(), r.eventType & k && this.count === 0)
1637
+ process: function(a) {
1638
+ var i = this.options, u = a.pointers.length === i.pointers, g = a.distance < i.threshold, T = a.deltaTime < i.time;
1639
+ if (this.reset(), a.eventType & B && this.count === 0)
1640
1640
  return this.failTimeout();
1641
- if (p && E && u) {
1642
- if (r.eventType != K)
1641
+ if (g && T && u) {
1642
+ if (a.eventType != Z)
1643
1643
  return this.failTimeout();
1644
- var O = this.pTime ? r.timeStamp - this.pTime < i.interval : !0, N = !this.pCenter || Qe(this.pCenter, r.center) < i.posThreshold;
1645
- this.pTime = r.timeStamp, this.pCenter = r.center, !N || !O ? this.count = 1 : this.count += 1, this._input = r;
1646
- var ae = this.count % i.taps;
1647
- if (ae === 0)
1648
- return this.hasRequireFailures() ? (this._timer = g(function() {
1644
+ var _ = this.pTime ? a.timeStamp - this.pTime < i.interval : !0, k = !this.pCenter || Qe(this.pCenter, a.center) < i.posThreshold;
1645
+ this.pTime = a.timeStamp, this.pCenter = a.center, !k || !_ ? this.count = 1 : this.count += 1, this._input = a;
1646
+ var ie = this.count % i.taps;
1647
+ if (ie === 0)
1648
+ return this.hasRequireFailures() ? (this._timer = m(function() {
1649
1649
  this.state = we, this.tryEmit();
1650
1650
  }, i.interval, this), fe) : we;
1651
1651
  }
1652
1652
  return me;
1653
1653
  },
1654
1654
  failTimeout: function() {
1655
- return this._timer = g(function() {
1655
+ return this._timer = m(function() {
1656
1656
  this.state = me;
1657
1657
  }, this.options.interval, this), me;
1658
1658
  },
@@ -1663,8 +1663,8 @@ var Tt = (function(f, o, e, n) {
1663
1663
  this.state == we && (this._input.tapCount = this.count, this.manager.emit(this.options.event, this._input));
1664
1664
  }
1665
1665
  });
1666
- function Be(r, i) {
1667
- return i = i || {}, i.recognizers = m(i.recognizers, Be.defaults.preset), new wt(r, i);
1666
+ function Be(a, i) {
1667
+ return i = i || {}, i.recognizers = c(i.recognizers, Be.defaults.preset), new wt(a, i);
1668
1668
  }
1669
1669
  Be.VERSION = "2.0.7", Be.defaults = {
1670
1670
  /**
@@ -1763,10 +1763,10 @@ var Tt = (function(f, o, e, n) {
1763
1763
  }
1764
1764
  };
1765
1765
  var Tn = 1, Yt = 2;
1766
- function wt(r, i) {
1767
- this.options = M({}, Be.defaults, i || {}), this.options.inputTarget = this.options.inputTarget || r, this.handlers = {}, this.session = {}, this.recognizers = [], this.oldCssProps = {}, this.element = r, this.input = Ke(this), this.touchAction = new pt(this, this.options.touchAction), Ht(this, !0), P(this.options.recognizers, function(u) {
1768
- var p = this.add(new u[0](u[1]));
1769
- u[2] && p.recognizeWith(u[2]), u[3] && p.requireFailure(u[3]);
1766
+ function wt(a, i) {
1767
+ this.options = P({}, Be.defaults, i || {}), this.options.inputTarget = this.options.inputTarget || a, this.handlers = {}, this.session = {}, this.recognizers = [], this.oldCssProps = {}, this.element = a, this.input = Ke(this), this.touchAction = new pt(this, this.options.touchAction), Ht(this, !0), A(this.options.recognizers, function(u) {
1768
+ var g = this.add(new u[0](u[1]));
1769
+ u[2] && g.recognizeWith(u[2]), u[3] && g.requireFailure(u[3]);
1770
1770
  }, this);
1771
1771
  }
1772
1772
  wt.prototype = {
@@ -1775,8 +1775,8 @@ var Tt = (function(f, o, e, n) {
1775
1775
  * @param {Object} options
1776
1776
  * @returns {Manager}
1777
1777
  */
1778
- set: function(r) {
1779
- return M(this.options, r), r.touchAction && this.touchAction.update(), r.inputTarget && (this.input.destroy(), this.input.target = r.inputTarget, this.input.init()), this;
1778
+ set: function(a) {
1779
+ return P(this.options, a), a.touchAction && this.touchAction.update(), a.inputTarget && (this.input.destroy(), this.input.target = a.inputTarget, this.input.init()), this;
1780
1780
  },
1781
1781
  /**
1782
1782
  * stop recognizing for this session.
@@ -1784,8 +1784,8 @@ var Tt = (function(f, o, e, n) {
1784
1784
  * When forced, the recognizer cycle is stopped immediately.
1785
1785
  * @param {Boolean} [force]
1786
1786
  */
1787
- stop: function(r) {
1788
- this.session.stopped = r ? Yt : Tn;
1787
+ stop: function(a) {
1788
+ this.session.stopped = a ? Yt : Tn;
1789
1789
  },
1790
1790
  /**
1791
1791
  * run the recognizers!
@@ -1793,16 +1793,16 @@ var Tt = (function(f, o, e, n) {
1793
1793
  * it walks through all the recognizers and tries to detect the gesture that is being made
1794
1794
  * @param {Object} inputData
1795
1795
  */
1796
- recognize: function(r) {
1796
+ recognize: function(a) {
1797
1797
  var i = this.session;
1798
1798
  if (!i.stopped) {
1799
- this.touchAction.preventDefaults(r);
1800
- var u, p = this.recognizers, E = i.curRecognizer;
1801
- (!E || E && E.state & we) && (E = i.curRecognizer = null);
1802
- for (var O = 0; O < p.length; )
1803
- u = p[O], i.stopped !== Yt && // 1
1804
- (!E || u == E || // 2
1805
- u.canRecognizeWith(E)) ? u.recognize(r) : u.reset(), !E && u.state & (fe | ke | xe) && (E = i.curRecognizer = u), O++;
1799
+ this.touchAction.preventDefaults(a);
1800
+ var u, g = this.recognizers, T = i.curRecognizer;
1801
+ (!T || T && T.state & we) && (T = i.curRecognizer = null);
1802
+ for (var _ = 0; _ < g.length; )
1803
+ u = g[_], i.stopped !== Yt && // 1
1804
+ (!T || u == T || // 2
1805
+ u.canRecognizeWith(T)) ? u.recognize(a) : u.reset(), !T && u.state & (fe | ke | xe) && (T = i.curRecognizer = u), _++;
1806
1806
  }
1807
1807
  },
1808
1808
  /**
@@ -1810,11 +1810,11 @@ var Tt = (function(f, o, e, n) {
1810
1810
  * @param {Recognizer|String} recognizer
1811
1811
  * @returns {Recognizer|Null}
1812
1812
  */
1813
- get: function(r) {
1814
- if (r instanceof Ee)
1815
- return r;
1813
+ get: function(a) {
1814
+ if (a instanceof Ee)
1815
+ return a;
1816
1816
  for (var i = this.recognizers, u = 0; u < i.length; u++)
1817
- if (i[u].options.event == r)
1817
+ if (i[u].options.event == a)
1818
1818
  return i[u];
1819
1819
  return null;
1820
1820
  },
@@ -1824,22 +1824,22 @@ var Tt = (function(f, o, e, n) {
1824
1824
  * @param {Recognizer} recognizer
1825
1825
  * @returns {Recognizer|Manager}
1826
1826
  */
1827
- add: function(r) {
1828
- if (w(r, "add", this))
1827
+ add: function(a) {
1828
+ if (y(a, "add", this))
1829
1829
  return this;
1830
- var i = this.get(r.options.event);
1831
- return i && this.remove(i), this.recognizers.push(r), r.manager = this, this.touchAction.update(), r;
1830
+ var i = this.get(a.options.event);
1831
+ return i && this.remove(i), this.recognizers.push(a), a.manager = this, this.touchAction.update(), a;
1832
1832
  },
1833
1833
  /**
1834
1834
  * remove a recognizer by name or instance
1835
1835
  * @param {Recognizer|String} recognizer
1836
1836
  * @returns {Manager}
1837
1837
  */
1838
- remove: function(r) {
1839
- if (w(r, "remove", this))
1838
+ remove: function(a) {
1839
+ if (y(a, "remove", this))
1840
1840
  return this;
1841
- if (r = this.get(r), r) {
1842
- var i = this.recognizers, u = Z(i, r);
1841
+ if (a = this.get(a), a) {
1842
+ var i = this.recognizers, u = X(i, a);
1843
1843
  u !== -1 && (i.splice(u, 1), this.touchAction.update());
1844
1844
  }
1845
1845
  return this;
@@ -1850,11 +1850,11 @@ var Tt = (function(f, o, e, n) {
1850
1850
  * @param {Function} handler
1851
1851
  * @returns {EventEmitter} this
1852
1852
  */
1853
- on: function(r, i) {
1854
- if (r !== n && i !== n) {
1853
+ on: function(a, i) {
1854
+ if (a !== n && i !== n) {
1855
1855
  var u = this.handlers;
1856
- return P(W(r), function(p) {
1857
- u[p] = u[p] || [], u[p].push(i);
1856
+ return A(H(a), function(g) {
1857
+ u[g] = u[g] || [], u[g].push(i);
1858
1858
  }), this;
1859
1859
  }
1860
1860
  },
@@ -1864,11 +1864,11 @@ var Tt = (function(f, o, e, n) {
1864
1864
  * @param {Function} [handler]
1865
1865
  * @returns {EventEmitter} this
1866
1866
  */
1867
- off: function(r, i) {
1868
- if (r !== n) {
1867
+ off: function(a, i) {
1868
+ if (a !== n) {
1869
1869
  var u = this.handlers;
1870
- return P(W(r), function(p) {
1871
- i ? u[p] && u[p].splice(Z(u[p], i), 1) : delete u[p];
1870
+ return A(H(a), function(g) {
1871
+ i ? u[g] && u[g].splice(X(u[g], i), 1) : delete u[g];
1872
1872
  }), this;
1873
1873
  }
1874
1874
  },
@@ -1877,15 +1877,15 @@ var Tt = (function(f, o, e, n) {
1877
1877
  * @param {String} event
1878
1878
  * @param {Object} data
1879
1879
  */
1880
- emit: function(r, i) {
1881
- this.options.domEvents && Pn(r, i);
1882
- var u = this.handlers[r] && this.handlers[r].slice();
1880
+ emit: function(a, i) {
1881
+ this.options.domEvents && Mn(a, i);
1882
+ var u = this.handlers[a] && this.handlers[a].slice();
1883
1883
  if (!(!u || !u.length)) {
1884
- i.type = r, i.preventDefault = function() {
1884
+ i.type = a, i.preventDefault = function() {
1885
1885
  i.srcEvent.preventDefault();
1886
1886
  };
1887
- for (var p = 0; p < u.length; )
1888
- u[p](i), p++;
1887
+ for (var g = 0; g < u.length; )
1888
+ u[g](i), g++;
1889
1889
  }
1890
1890
  },
1891
1891
  /**
@@ -1896,24 +1896,24 @@ var Tt = (function(f, o, e, n) {
1896
1896
  this.element && Ht(this, !1), this.handlers = {}, this.session = {}, this.input.destroy(), this.element = null;
1897
1897
  }
1898
1898
  };
1899
- function Ht(r, i) {
1900
- var u = r.element;
1899
+ function Ht(a, i) {
1900
+ var u = a.element;
1901
1901
  if (u.style) {
1902
- var p;
1903
- P(r.options.cssProps, function(E, O) {
1904
- p = H(u.style, O), i ? (r.oldCssProps[p] = u.style[p], u.style[p] = E) : u.style[p] = r.oldCssProps[p] || "";
1905
- }), i || (r.oldCssProps = {});
1902
+ var g;
1903
+ A(a.options.cssProps, function(T, _) {
1904
+ g = z(u.style, _), i ? (a.oldCssProps[g] = u.style[g], u.style[g] = T) : u.style[g] = a.oldCssProps[g] || "";
1905
+ }), i || (a.oldCssProps = {});
1906
1906
  }
1907
1907
  }
1908
- function Pn(r, i) {
1908
+ function Mn(a, i) {
1909
1909
  var u = o.createEvent("Event");
1910
- u.initEvent(r, !0, !0), u.gesture = i, i.target.dispatchEvent(u);
1910
+ u.initEvent(a, !0, !0), u.gesture = i, i.target.dispatchEvent(u);
1911
1911
  }
1912
- return M(Be, {
1913
- INPUT_START: k,
1912
+ return P(Be, {
1913
+ INPUT_START: B,
1914
1914
  INPUT_MOVE: se,
1915
- INPUT_END: K,
1916
- INPUT_CANCEL: J,
1915
+ INPUT_END: Z,
1916
+ INPUT_CANCEL: Q,
1917
1917
  STATE_POSSIBLE: tt,
1918
1918
  STATE_BEGAN: fe,
1919
1919
  STATE_CHANGED: ke,
@@ -1922,7 +1922,7 @@ var Tt = (function(f, o, e, n) {
1922
1922
  STATE_CANCELLED: Ge,
1923
1923
  STATE_FAILED: me,
1924
1924
  DIRECTION_NONE: Oe,
1925
- DIRECTION_LEFT: Me,
1925
+ DIRECTION_LEFT: Pe,
1926
1926
  DIRECTION_RIGHT: Ce,
1927
1927
  DIRECTION_UP: Le,
1928
1928
  DIRECTION_DOWN: Ae,
@@ -1945,35 +1945,35 @@ var Tt = (function(f, o, e, n) {
1945
1945
  Pinch: mt,
1946
1946
  Rotate: yt,
1947
1947
  Press: gt,
1948
- on: _,
1948
+ on: O,
1949
1949
  off: S,
1950
- each: P,
1950
+ each: A,
1951
1951
  merge: C,
1952
1952
  extend: x,
1953
- assign: M,
1954
- inherit: b,
1955
- bindFn: y,
1956
- prefixed: H
1953
+ assign: P,
1954
+ inherit: w,
1955
+ bindFn: b,
1956
+ prefixed: z
1957
1957
  }), Be;
1958
- })(typeof window != "undefined" ? window : {}, typeof document != "undefined" ? document : {}), qe = function(f, o) {
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 ye(), 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: Se.ROTATE, MIDDLE: Se.DOLLY, RIGHT: Se.PAN }, this.touches = { ONE: _e.ROTATE, TWO: _e.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this.getPolarAngle = function() {
1960
- return c.phi;
1958
+ })(typeof window != "undefined" ? window : {}, typeof document != "undefined" ? document : {}), qe = function(h, o) {
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 = h, this.domElement = o, this.enabled = !0, this.target = new ye(), 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: Se.ROTATE, MIDDLE: Se.DOLLY, RIGHT: Se.PAN }, this.touches = { ONE: _e.ROTATE, TWO: _e.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this.getPolarAngle = function() {
1960
+ return f.phi;
1961
1961
  }, this.getAzimuthalAngle = function() {
1962
- return c.theta;
1962
+ return f.theta;
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
1966
  e.target.copy(e.target0), e.object.position.copy(e.position0), e.object.zoom = e.zoom0, e.object.updateProjectionMatrix(), e.dispatchEvent(n), e.update(), l = s.NONE;
1967
1967
  }, this.update = (function() {
1968
- var d = new ye(), B = new Xt().setFromUnitVectors(f.up, new ye(0, 1, 0)), $ = B.clone().inverse(), ne = new ye(), pe = new Xt();
1968
+ var v = new ye(), R = new Xt().setFromUnitVectors(h.up, new ye(0, 1, 0)), J = R.clone().inverse(), re = new ye(), pe = new Xt();
1969
1969
  return function() {
1970
1970
  var be = e.object.position;
1971
- return d.copy(be).sub(e.target), d.applyQuaternion(B), c.setFromVector3(d), e.autoRotate && l === s.NONE && W(U()), e.enableDamping ? (c.theta += g.theta * e.dampingFactor, c.phi += g.phi * e.dampingFactor) : (c.theta += g.theta, c.phi += g.phi), c.theta = Math.max(e.minAzimuthAngle, Math.min(e.maxAzimuthAngle, c.theta)), c.phi = Math.max(e.minPolarAngle, Math.min(e.maxPolarAngle, c.phi)), c.makeSafe(), c.radius *= w, c.radius = Math.max(e.minDistance, Math.min(e.maxDistance, c.radius)), e.enableDamping === !0 ? e.target.addScaledVector(P, e.dampingFactor) : e.target.add(P), d.setFromSpherical(c), d.applyQuaternion($), be.copy(e.target).add(d), e.object.lookAt(e.target), e.enableDamping === !0 ? (g.theta *= 1 - e.dampingFactor, g.phi *= 1 - e.dampingFactor, P.multiplyScalar(1 - e.dampingFactor)) : (g.set(0, 0, 0), P.set(0, 0, 0)), w = 1, T || ne.distanceToSquared(e.object.position) > h || 8 * (1 - pe.dot(e.object.quaternion)) > h ? (e.dispatchEvent(n), ne.copy(e.object.position), pe.copy(e.object.quaternion), T = !1, !0) : !1;
1971
+ return v.copy(be).sub(e.target), v.applyQuaternion(R), f.setFromVector3(v), e.autoRotate && l === s.NONE && H(D()), e.enableDamping ? (f.theta += m.theta * e.dampingFactor, f.phi += m.phi * e.dampingFactor) : (f.theta += m.theta, f.phi += m.phi), f.theta = Math.max(e.minAzimuthAngle, Math.min(e.maxAzimuthAngle, f.theta)), f.phi = Math.max(e.minPolarAngle, Math.min(e.maxPolarAngle, f.phi)), f.makeSafe(), f.radius *= y, f.radius = Math.max(e.minDistance, Math.min(e.maxDistance, f.radius)), e.enableDamping === !0 ? e.target.addScaledVector(A, e.dampingFactor) : e.target.add(A), v.setFromSpherical(f), v.applyQuaternion(J), be.copy(e.target).add(v), e.object.lookAt(e.target), e.enableDamping === !0 ? (m.theta *= 1 - e.dampingFactor, m.phi *= 1 - e.dampingFactor, A.multiplyScalar(1 - e.dampingFactor)) : (m.set(0, 0, 0), A.set(0, 0, 0)), y = 1, E || re.distanceToSquared(e.object.position) > d || 8 * (1 - pe.dot(e.object.quaternion)) > d ? (e.dispatchEvent(n), re.copy(e.object.position), pe.copy(e.object.quaternion), E = !1, !0) : !1;
1972
1972
  };
1973
1973
  })(), this.dispose = function() {
1974
1974
  e.domElement.removeEventListener("contextmenu", Ze, !1), e.domElement.removeEventListener("mousedown", Ae, !1), e.domElement.removeEventListener("wheel", Ue, !1), e.domElement.removeEventListener("touchstart", Fe, !1), e.domElement.removeEventListener("touchend", Ke, !1), e.domElement.removeEventListener("touchmove", le, !1), document.removeEventListener("mousemove", ue, !1), document.removeEventListener("mouseup", de, !1), e.domElement.removeEventListener("keydown", Re, !1);
1975
1975
  };
1976
- var e = this, n = { type: "change" }, t = { type: "start" }, a = { type: "end" }, s = {
1976
+ var e = this, n = { type: "change" }, t = { type: "start" }, r = { type: "end" }, s = {
1977
1977
  NONE: -1,
1978
1978
  ROTATE: 0,
1979
1979
  DOLLY: 1,
@@ -1982,182 +1982,182 @@ var Tt = (function(f, o, e, n) {
1982
1982
  TOUCH_PAN: 4,
1983
1983
  TOUCH_DOLLY_PAN: 5,
1984
1984
  TOUCH_DOLLY_ROTATE: 6
1985
- }, l = s.NONE, h = 1e-6, c = new Wt(), g = new Wt(), w = 1, P = new ye(), T = !1, M = new Te(), x = new Te(), C = new Te(), b = new Te(), y = new Te(), A = new Te(), m = new Te(), _ = new Te(), S = new Te();
1986
- function U() {
1985
+ }, l = s.NONE, d = 1e-6, f = new Wt(), m = new Wt(), y = 1, A = new ye(), E = !1, P = new Te(), x = new Te(), C = new Te(), w = new Te(), b = new Te(), M = new Te(), c = new Te(), O = new Te(), S = new Te();
1986
+ function D() {
1987
1987
  return 2 * Math.PI / 60 / 60 * e.autoRotateSpeed;
1988
1988
  }
1989
- function R() {
1989
+ function W() {
1990
1990
  return Math.pow(0.95, e.zoomSpeed);
1991
1991
  }
1992
- function W(d) {
1993
- g.theta -= d;
1992
+ function H(v) {
1993
+ m.theta -= v;
1994
1994
  }
1995
- function Z(d) {
1996
- g.phi -= d;
1995
+ function X(v) {
1996
+ m.phi -= v;
1997
1997
  }
1998
- var X = (function() {
1999
- var d = new ye();
2000
- return function($, ne) {
2001
- d.setFromMatrixColumn(ne, 0), d.multiplyScalar(-$), P.add(d);
1998
+ var $ = (function() {
1999
+ var v = new ye();
2000
+ return function(J, re) {
2001
+ v.setFromMatrixColumn(re, 0), v.multiplyScalar(-J), A.add(v);
2002
2002
  };
2003
- })(), oe = (function() {
2004
- var d = new ye();
2005
- return function($, ne) {
2006
- e.screenSpacePanning === !0 ? d.setFromMatrixColumn(ne, 1) : (d.setFromMatrixColumn(ne, 0), d.crossVectors(e.object.up, d)), d.multiplyScalar($), P.add(d);
2003
+ })(), ae = (function() {
2004
+ var v = new ye();
2005
+ return function(J, re) {
2006
+ e.screenSpacePanning === !0 ? v.setFromMatrixColumn(re, 1) : (v.setFromMatrixColumn(re, 0), v.crossVectors(e.object.up, v)), v.multiplyScalar(J), A.add(v);
2007
2007
  };
2008
- })(), H = (function() {
2009
- var d = new ye();
2010
- return function($, ne) {
2008
+ })(), z = (function() {
2009
+ var v = new ye();
2010
+ return function(J, re) {
2011
2011
  var pe = e.domElement;
2012
2012
  if (e.object.isPerspectiveCamera) {
2013
2013
  var Ve = e.object.position;
2014
- d.copy(Ve).sub(e.target);
2015
- var be = d.length();
2016
- be *= Math.tan(e.object.fov / 2 * Math.PI / 180), X(2 * $ * be / pe.clientHeight, e.object.matrix), oe(2 * ne * be / pe.clientHeight, e.object.matrix);
2017
- } else e.object.isOrthographicCamera ? (X($ * (e.object.right - e.object.left) / e.object.zoom / pe.clientWidth, e.object.matrix), oe(ne * (e.object.top - e.object.bottom) / e.object.zoom / pe.clientHeight, e.object.matrix)) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."), e.enablePan = !1);
2014
+ v.copy(Ve).sub(e.target);
2015
+ var be = v.length();
2016
+ be *= Math.tan(e.object.fov / 2 * Math.PI / 180), $(2 * J * be / pe.clientHeight, e.object.matrix), ae(2 * re * be / pe.clientHeight, e.object.matrix);
2017
+ } else e.object.isOrthographicCamera ? ($(J * (e.object.right - e.object.left) / e.object.zoom / pe.clientWidth, e.object.matrix), ae(re * (e.object.top - e.object.bottom) / e.object.zoom / pe.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 q(d) {
2021
- e.object.isPerspectiveCamera ? w /= d : e.object.isOrthographicCamera ? (e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom * d)), e.object.updateProjectionMatrix(), T = !0) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
2020
+ function q(v) {
2021
+ e.object.isPerspectiveCamera ? y /= v : e.object.isOrthographicCamera ? (e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom * v)), e.object.updateProjectionMatrix(), E = !0) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
2022
2022
  }
2023
- function I(d) {
2024
- e.object.isPerspectiveCamera ? w *= d : e.object.isOrthographicCamera ? (e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / d)), e.object.updateProjectionMatrix(), T = !0) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
2023
+ function I(v) {
2024
+ e.object.isPerspectiveCamera ? y *= v : e.object.isOrthographicCamera ? (e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / v)), e.object.updateProjectionMatrix(), E = !0) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
2025
2025
  }
2026
- function F(d) {
2027
- M.set(d.clientX, d.clientY);
2026
+ function L(v) {
2027
+ P.set(v.clientX, v.clientY);
2028
2028
  }
2029
- function L(d) {
2030
- m.set(d.clientX, d.clientY);
2029
+ function F(v) {
2030
+ c.set(v.clientX, v.clientY);
2031
2031
  }
2032
- function D(d) {
2033
- b.set(d.clientX, d.clientY);
2032
+ function N(v) {
2033
+ w.set(v.clientX, v.clientY);
2034
2034
  }
2035
- function G(d) {
2036
- x.set(d.clientX, d.clientY), C.subVectors(x, M).multiplyScalar(e.rotateSpeed);
2037
- var B = e.domElement;
2038
- W(2 * Math.PI * C.x / B.clientHeight), Z(2 * Math.PI * C.y / B.clientHeight), M.copy(x), e.update();
2035
+ function j(v) {
2036
+ x.set(v.clientX, v.clientY), C.subVectors(x, P).multiplyScalar(e.rotateSpeed);
2037
+ var R = e.domElement;
2038
+ H(2 * Math.PI * C.x / R.clientHeight), X(2 * Math.PI * C.y / R.clientHeight), P.copy(x), e.update();
2039
2039
  }
2040
- function re(d) {
2041
- _.set(d.clientX, d.clientY), S.subVectors(_, m), S.y > 0 ? q(R()) : S.y < 0 && I(R()), m.copy(_), e.update();
2040
+ function ne(v) {
2041
+ O.set(v.clientX, v.clientY), S.subVectors(O, c), S.y > 0 ? q(W()) : S.y < 0 && I(W()), c.copy(O), e.update();
2042
2042
  }
2043
- function Q(d) {
2044
- y.set(d.clientX, d.clientY), A.subVectors(y, b).multiplyScalar(e.panSpeed), H(A.x, A.y), b.copy(y), e.update();
2043
+ function K(v) {
2044
+ b.set(v.clientX, v.clientY), M.subVectors(b, w).multiplyScalar(e.panSpeed), z(M.x, M.y), w.copy(b), e.update();
2045
2045
  }
2046
- function V(d) {
2047
- d.deltaY < 0 ? I(R()) : d.deltaY > 0 && q(R()), e.update();
2046
+ function U(v) {
2047
+ v.deltaY < 0 ? I(W()) : v.deltaY > 0 && q(W()), e.update();
2048
2048
  }
2049
- function te(d) {
2050
- var B = !1;
2051
- switch (d.keyCode) {
2049
+ function te(v) {
2050
+ var R = !1;
2051
+ switch (v.keyCode) {
2052
2052
  case e.keys.UP:
2053
- H(0, e.keyPanSpeed), B = !0;
2053
+ z(0, e.keyPanSpeed), R = !0;
2054
2054
  break;
2055
2055
  case e.keys.BOTTOM:
2056
- H(0, -e.keyPanSpeed), B = !0;
2056
+ z(0, -e.keyPanSpeed), R = !0;
2057
2057
  break;
2058
2058
  case e.keys.LEFT:
2059
- H(e.keyPanSpeed, 0), B = !0;
2059
+ z(e.keyPanSpeed, 0), R = !0;
2060
2060
  break;
2061
2061
  case e.keys.RIGHT:
2062
- H(-e.keyPanSpeed, 0), B = !0;
2062
+ z(-e.keyPanSpeed, 0), R = !0;
2063
2063
  break;
2064
2064
  }
2065
- B && (d.preventDefault(), e.update());
2065
+ R && (v.preventDefault(), e.update());
2066
2066
  }
2067
- function Y(d) {
2068
- if (d.touches.length == 1)
2069
- M.set(d.touches[0].pageX, d.touches[0].pageY);
2067
+ function Y(v) {
2068
+ if (v.touches.length == 1)
2069
+ P.set(v.touches[0].pageX, v.touches[0].pageY);
2070
2070
  else {
2071
- var B = 0.5 * (d.touches[0].pageX + d.touches[1].pageX), $ = 0.5 * (d.touches[0].pageY + d.touches[1].pageY);
2072
- M.set(B, $);
2071
+ var R = 0.5 * (v.touches[0].pageX + v.touches[1].pageX), J = 0.5 * (v.touches[0].pageY + v.touches[1].pageY);
2072
+ P.set(R, J);
2073
2073
  }
2074
2074
  }
2075
- function j(d) {
2076
- if (d.touches.length == 1)
2077
- b.set(d.touches[0].pageX, d.touches[0].pageY);
2075
+ function G(v) {
2076
+ if (v.touches.length == 1)
2077
+ w.set(v.touches[0].pageX, v.touches[0].pageY);
2078
2078
  else {
2079
- var B = 0.5 * (d.touches[0].pageX + d.touches[1].pageX), $ = 0.5 * (d.touches[0].pageY + d.touches[1].pageY);
2080
- b.set(B, $);
2079
+ var R = 0.5 * (v.touches[0].pageX + v.touches[1].pageX), J = 0.5 * (v.touches[0].pageY + v.touches[1].pageY);
2080
+ w.set(R, J);
2081
2081
  }
2082
2082
  }
2083
- function k(d) {
2084
- var B = d.touches[0].pageX - d.touches[1].pageX, $ = d.touches[0].pageY - d.touches[1].pageY, ne = Math.sqrt(B * B + $ * $);
2085
- m.set(0, ne);
2083
+ function B(v) {
2084
+ var R = v.touches[0].pageX - v.touches[1].pageX, J = v.touches[0].pageY - v.touches[1].pageY, re = Math.sqrt(R * R + J * J);
2085
+ c.set(0, re);
2086
2086
  }
2087
- function se(d) {
2088
- e.enableZoom && k(d), e.enablePan && j(d);
2087
+ function se(v) {
2088
+ e.enableZoom && B(v), e.enablePan && G(v);
2089
2089
  }
2090
- function K(d) {
2091
- e.enableZoom && k(d), e.enableRotate && Y(d);
2090
+ function Z(v) {
2091
+ e.enableZoom && B(v), e.enableRotate && Y(v);
2092
2092
  }
2093
- function J(d) {
2094
- if (d.touches.length == 1)
2095
- x.set(d.touches[0].pageX, d.touches[0].pageY);
2093
+ function Q(v) {
2094
+ if (v.touches.length == 1)
2095
+ x.set(v.touches[0].pageX, v.touches[0].pageY);
2096
2096
  else {
2097
- var B = 0.5 * (d.touches[0].pageX + d.touches[1].pageX), $ = 0.5 * (d.touches[0].pageY + d.touches[1].pageY);
2098
- x.set(B, $);
2097
+ var R = 0.5 * (v.touches[0].pageX + v.touches[1].pageX), J = 0.5 * (v.touches[0].pageY + v.touches[1].pageY);
2098
+ x.set(R, J);
2099
2099
  }
2100
- C.subVectors(x, M).multiplyScalar(e.rotateSpeed);
2101
- var ne = e.domElement;
2102
- W(2 * Math.PI * C.x / ne.clientHeight), Z(2 * Math.PI * C.y / ne.clientHeight), M.copy(x);
2100
+ C.subVectors(x, P).multiplyScalar(e.rotateSpeed);
2101
+ var re = e.domElement;
2102
+ H(2 * Math.PI * C.x / re.clientHeight), X(2 * Math.PI * C.y / re.clientHeight), P.copy(x);
2103
2103
  }
2104
- function Oe(d) {
2105
- if (d.touches.length == 1)
2106
- y.set(d.touches[0].pageX, d.touches[0].pageY);
2104
+ function Oe(v) {
2105
+ if (v.touches.length == 1)
2106
+ b.set(v.touches[0].pageX, v.touches[0].pageY);
2107
2107
  else {
2108
- var B = 0.5 * (d.touches[0].pageX + d.touches[1].pageX), $ = 0.5 * (d.touches[0].pageY + d.touches[1].pageY);
2109
- y.set(B, $);
2108
+ var R = 0.5 * (v.touches[0].pageX + v.touches[1].pageX), J = 0.5 * (v.touches[0].pageY + v.touches[1].pageY);
2109
+ b.set(R, J);
2110
2110
  }
2111
- A.subVectors(y, b).multiplyScalar(e.panSpeed), H(A.x, A.y), b.copy(y);
2111
+ M.subVectors(b, w).multiplyScalar(e.panSpeed), z(M.x, M.y), w.copy(b);
2112
2112
  }
2113
- function Me(d) {
2114
- var B = d.touches[0].pageX - d.touches[1].pageX, $ = d.touches[0].pageY - d.touches[1].pageY, ne = Math.sqrt(B * B + $ * $);
2115
- _.set(0, ne), S.set(0, Math.pow(_.y / m.y, e.zoomSpeed)), q(S.y), m.copy(_);
2113
+ function Pe(v) {
2114
+ var R = v.touches[0].pageX - v.touches[1].pageX, J = v.touches[0].pageY - v.touches[1].pageY, re = Math.sqrt(R * R + J * J);
2115
+ O.set(0, re), S.set(0, Math.pow(O.y / c.y, e.zoomSpeed)), q(S.y), c.copy(O);
2116
2116
  }
2117
- function Ce(d) {
2118
- e.enableZoom && Me(d), e.enablePan && Oe(d);
2117
+ function Ce(v) {
2118
+ e.enableZoom && Pe(v), e.enablePan && Oe(v);
2119
2119
  }
2120
- function Le(d) {
2121
- e.enableZoom && Me(d), e.enableRotate && J(d);
2120
+ function Le(v) {
2121
+ e.enableZoom && Pe(v), e.enableRotate && Q(v);
2122
2122
  }
2123
- function Ae(d) {
2123
+ function Ae(v) {
2124
2124
  if (e.enabled !== !1) {
2125
- d.preventDefault(), e.domElement.focus ? e.domElement.focus() : window.focus();
2126
- var B;
2127
- switch (d.button) {
2125
+ v.preventDefault(), e.domElement.focus ? e.domElement.focus() : window.focus();
2126
+ var R;
2127
+ switch (v.button) {
2128
2128
  case 0:
2129
- B = e.mouseButtons.LEFT;
2129
+ R = e.mouseButtons.LEFT;
2130
2130
  break;
2131
2131
  case 1:
2132
- B = e.mouseButtons.MIDDLE;
2132
+ R = e.mouseButtons.MIDDLE;
2133
2133
  break;
2134
2134
  case 2:
2135
- B = e.mouseButtons.RIGHT;
2135
+ R = e.mouseButtons.RIGHT;
2136
2136
  break;
2137
2137
  default:
2138
- B = -1;
2138
+ R = -1;
2139
2139
  }
2140
- switch (B) {
2140
+ switch (R) {
2141
2141
  case Se.DOLLY:
2142
2142
  if (e.enableZoom === !1) return;
2143
- L(d), l = s.DOLLY;
2143
+ F(v), l = s.DOLLY;
2144
2144
  break;
2145
2145
  case Se.ROTATE:
2146
- if (d.ctrlKey || d.metaKey || d.shiftKey) {
2146
+ if (v.ctrlKey || v.metaKey || v.shiftKey) {
2147
2147
  if (e.enablePan === !1) return;
2148
- D(d), l = s.PAN;
2148
+ N(v), l = s.PAN;
2149
2149
  } else {
2150
2150
  if (e.enableRotate === !1) return;
2151
- F(d), l = s.ROTATE;
2151
+ L(v), l = s.ROTATE;
2152
2152
  }
2153
2153
  break;
2154
2154
  case Se.PAN:
2155
- if (d.ctrlKey || d.metaKey || d.shiftKey) {
2155
+ if (v.ctrlKey || v.metaKey || v.shiftKey) {
2156
2156
  if (e.enableRotate === !1) return;
2157
- F(d), l = s.ROTATE;
2157
+ L(v), l = s.ROTATE;
2158
2158
  } else {
2159
2159
  if (e.enablePan === !1) return;
2160
- D(d), l = s.PAN;
2160
+ N(v), l = s.PAN;
2161
2161
  }
2162
2162
  break;
2163
2163
  default:
@@ -2166,44 +2166,44 @@ var Tt = (function(f, o, e, n) {
2166
2166
  l !== s.NONE && (document.addEventListener("mousemove", ue, !1), document.addEventListener("mouseup", de, !1), e.dispatchEvent(t));
2167
2167
  }
2168
2168
  }
2169
- function ue(d) {
2169
+ function ue(v) {
2170
2170
  if (e.enabled !== !1)
2171
- switch (d.preventDefault(), l) {
2171
+ switch (v.preventDefault(), l) {
2172
2172
  case s.ROTATE:
2173
2173
  if (e.enableRotate === !1) return;
2174
- G(d);
2174
+ j(v);
2175
2175
  break;
2176
2176
  case s.DOLLY:
2177
2177
  if (e.enableZoom === !1) return;
2178
- re(d);
2178
+ ne(v);
2179
2179
  break;
2180
2180
  case s.PAN:
2181
2181
  if (e.enablePan === !1) return;
2182
- Q(d);
2182
+ K(v);
2183
2183
  break;
2184
2184
  }
2185
2185
  }
2186
- function de(d) {
2187
- e.enabled !== !1 && (document.removeEventListener("mousemove", ue, !1), document.removeEventListener("mouseup", de, !1), e.dispatchEvent(a), l = s.NONE);
2186
+ function de(v) {
2187
+ e.enabled !== !1 && (document.removeEventListener("mousemove", ue, !1), document.removeEventListener("mouseup", de, !1), e.dispatchEvent(r), l = s.NONE);
2188
2188
  }
2189
- function Ue(d) {
2190
- e.enabled === !1 || e.enableZoom === !1 || l !== s.NONE && l !== s.ROTATE || (d.preventDefault(), d.stopPropagation(), e.dispatchEvent(t), V(d), e.dispatchEvent(a));
2189
+ function Ue(v) {
2190
+ e.enabled === !1 || e.enableZoom === !1 || l !== s.NONE && l !== s.ROTATE || (v.preventDefault(), v.stopPropagation(), e.dispatchEvent(t), U(v), e.dispatchEvent(r));
2191
2191
  }
2192
- function Re(d) {
2193
- e.enabled === !1 || e.enableKeys === !1 || e.enablePan === !1 || te(d);
2192
+ function Re(v) {
2193
+ e.enabled === !1 || e.enableKeys === !1 || e.enablePan === !1 || te(v);
2194
2194
  }
2195
- function Fe(d) {
2195
+ function Fe(v) {
2196
2196
  if (e.enabled !== !1) {
2197
- switch (d.preventDefault(), d.touches.length) {
2197
+ switch (v.preventDefault(), v.touches.length) {
2198
2198
  case 1:
2199
2199
  switch (e.touches.ONE) {
2200
2200
  case _e.ROTATE:
2201
2201
  if (e.enableRotate === !1) return;
2202
- Y(d), l = s.TOUCH_ROTATE;
2202
+ Y(v), l = s.TOUCH_ROTATE;
2203
2203
  break;
2204
2204
  case _e.PAN:
2205
2205
  if (e.enablePan === !1) return;
2206
- j(d), l = s.TOUCH_PAN;
2206
+ G(v), l = s.TOUCH_PAN;
2207
2207
  break;
2208
2208
  default:
2209
2209
  l = s.NONE;
@@ -2213,11 +2213,11 @@ var Tt = (function(f, o, e, n) {
2213
2213
  switch (e.touches.TWO) {
2214
2214
  case _e.DOLLY_PAN:
2215
2215
  if (e.enableZoom === !1 && e.enablePan === !1) return;
2216
- se(d), l = s.TOUCH_DOLLY_PAN;
2216
+ se(v), l = s.TOUCH_DOLLY_PAN;
2217
2217
  break;
2218
2218
  case _e.DOLLY_ROTATE:
2219
2219
  if (e.enableZoom === !1 && e.enableRotate === !1) return;
2220
- K(d), l = s.TOUCH_DOLLY_ROTATE;
2220
+ Z(v), l = s.TOUCH_DOLLY_ROTATE;
2221
2221
  break;
2222
2222
  default:
2223
2223
  l = s.NONE;
@@ -2229,192 +2229,192 @@ var Tt = (function(f, o, e, n) {
2229
2229
  l !== s.NONE && e.dispatchEvent(t);
2230
2230
  }
2231
2231
  }
2232
- function le(d) {
2232
+ function le(v) {
2233
2233
  if (e.enabled !== !1)
2234
- switch (d.preventDefault(), d.stopPropagation(), l) {
2234
+ switch (v.preventDefault(), v.stopPropagation(), l) {
2235
2235
  case s.TOUCH_ROTATE:
2236
2236
  if (e.enableRotate === !1) return;
2237
- J(d), e.update();
2237
+ Q(v), e.update();
2238
2238
  break;
2239
2239
  case s.TOUCH_PAN:
2240
2240
  if (e.enablePan === !1) return;
2241
- Oe(d), e.update();
2241
+ Oe(v), e.update();
2242
2242
  break;
2243
2243
  case s.TOUCH_DOLLY_PAN:
2244
2244
  if (e.enableZoom === !1 && e.enablePan === !1) return;
2245
- Ce(d), e.update();
2245
+ Ce(v), e.update();
2246
2246
  break;
2247
2247
  case s.TOUCH_DOLLY_ROTATE:
2248
2248
  if (e.enableZoom === !1 && e.enableRotate === !1) return;
2249
- Le(d), e.update();
2249
+ Le(v), e.update();
2250
2250
  break;
2251
2251
  default:
2252
2252
  l = s.NONE;
2253
2253
  }
2254
2254
  }
2255
- function Ke(d) {
2256
- e.enabled !== !1 && (e.dispatchEvent(a), l = s.NONE);
2255
+ function Ke(v) {
2256
+ e.enabled !== !1 && (e.dispatchEvent(r), l = s.NONE);
2257
2257
  }
2258
- function Ze(d) {
2259
- e.enabled !== !1 && d.preventDefault();
2258
+ function Ze(v) {
2259
+ e.enabled !== !1 && v.preventDefault();
2260
2260
  }
2261
2261
  e.domElement.addEventListener("contextmenu", Ze, !1), e.domElement.addEventListener("mousedown", Ae, !1), e.domElement.addEventListener("wheel", Ue, !1), e.domElement.addEventListener("touchstart", Fe, !1), e.domElement.addEventListener("touchend", Ke, !1), e.domElement.addEventListener("touchmove", le, !1), e.domElement.addEventListener("keydown", Re, !1), e.domElement.tabIndex === -1 && (e.domElement.tabIndex = 0), this.update();
2262
2262
  };
2263
2263
  qe.prototype = Object.create(Jt.prototype);
2264
2264
  qe.prototype.constructor = qe;
2265
- var _t = function(f, o) {
2266
- qe.call(this, f, o), this.mouseButtons.LEFT = Se.PAN, this.mouseButtons.RIGHT = Se.ROTATE, this.touches.ONE = _e.PAN, this.touches.TWO = _e.DOLLY_ROTATE;
2265
+ var _t = function(h, o) {
2266
+ qe.call(this, h, o), this.mouseButtons.LEFT = Se.PAN, this.mouseButtons.RIGHT = Se.ROTATE, this.touches.ONE = _e.PAN, this.touches.TWO = _e.DOLLY_ROTATE;
2267
2267
  };
2268
2268
  _t.prototype = Object.create(Jt.prototype);
2269
2269
  _t.prototype.constructor = _t;
2270
- var Pe = function(f) {
2271
- $t.call(this), this.element = f, this.element.style.position = "absolute", this.element.style.pointerEvents = "auto", this.addEventListener("removed", function() {
2270
+ var Me = function(h) {
2271
+ $t.call(this), this.element = h, 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
- Pe.prototype = Object.create($t.prototype);
2278
- Pe.prototype.constructor = Pe;
2279
- var ut = function(f) {
2280
- Pe.call(this, f);
2277
+ Me.prototype = Object.create($t.prototype);
2278
+ Me.prototype.constructor = Me;
2279
+ var ut = function(h) {
2280
+ Me.call(this, h);
2281
2281
  };
2282
- ut.prototype = Object.create(Pe.prototype);
2282
+ ut.prototype = Object.create(Me.prototype);
2283
2283
  ut.prototype.constructor = ut;
2284
2284
  var zn = function() {
2285
- var f = this, o, e, n, t, a = new Sn(), s = {
2285
+ var h = this, o, e, n, t, r = new Sn(), s = {
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 h = document.createElement("div");
2291
- h.style.WebkitTransformStyle = "preserve-3d", h.style.transformStyle = "preserve-3d", h.style.pointerEvents = "none", l.appendChild(h);
2292
- var c = /Trident/i.test(navigator.userAgent);
2290
+ var d = document.createElement("div");
2291
+ d.style.WebkitTransformStyle = "preserve-3d", d.style.transformStyle = "preserve-3d", d.style.pointerEvents = "none", l.appendChild(d);
2292
+ var f = /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(b, y) {
2299
- o = b, e = y, n = o / 2, t = e / 2, l.style.width = b + "px", l.style.height = y + "px", h.style.width = b + "px", h.style.height = y + "px";
2298
+ }, this.setSize = function(w, b) {
2299
+ o = w, e = b, n = o / 2, t = e / 2, l.style.width = w + "px", l.style.height = b + "px", d.style.width = w + "px", d.style.height = b + "px";
2300
2300
  };
2301
- function g(b) {
2302
- return Math.abs(b) < 1e-10 ? 0 : b;
2301
+ function m(w) {
2302
+ return Math.abs(w) < 1e-10 ? 0 : w;
2303
2303
  }
2304
- function w(b) {
2305
- var y = b.elements;
2306
- return "matrix3d(" + g(y[0]) + "," + g(-y[1]) + "," + g(y[2]) + "," + g(y[3]) + "," + g(y[4]) + "," + g(-y[5]) + "," + g(y[6]) + "," + g(y[7]) + "," + g(y[8]) + "," + g(-y[9]) + "," + g(y[10]) + "," + g(y[11]) + "," + g(y[12]) + "," + g(-y[13]) + "," + g(y[14]) + "," + g(y[15]) + ")";
2304
+ function y(w) {
2305
+ var b = w.elements;
2306
+ return "matrix3d(" + m(b[0]) + "," + m(-b[1]) + "," + m(b[2]) + "," + m(b[3]) + "," + m(b[4]) + "," + m(-b[5]) + "," + m(b[6]) + "," + m(b[7]) + "," + m(b[8]) + "," + m(-b[9]) + "," + m(b[10]) + "," + m(b[11]) + "," + m(b[12]) + "," + m(-b[13]) + "," + m(b[14]) + "," + m(b[15]) + ")";
2307
2307
  }
2308
- function P(b, y) {
2309
- var A = b.elements, m = "matrix3d(" + g(A[0]) + "," + g(A[1]) + "," + g(A[2]) + "," + g(A[3]) + "," + g(-A[4]) + "," + g(-A[5]) + "," + g(-A[6]) + "," + g(-A[7]) + "," + g(A[8]) + "," + g(A[9]) + "," + g(A[10]) + "," + g(A[11]) + "," + g(A[12]) + "," + g(A[13]) + "," + g(A[14]) + "," + g(A[15]) + ")";
2310
- return c ? "translate(-50%,-50%)translate(" + n + "px," + t + "px)" + y + m : "translate(-50%,-50%)" + m;
2308
+ function A(w, b) {
2309
+ var M = w.elements, c = "matrix3d(" + m(M[0]) + "," + m(M[1]) + "," + m(M[2]) + "," + m(M[3]) + "," + m(-M[4]) + "," + m(-M[5]) + "," + m(-M[6]) + "," + m(-M[7]) + "," + m(M[8]) + "," + m(M[9]) + "," + m(M[10]) + "," + m(M[11]) + "," + m(M[12]) + "," + m(M[13]) + "," + m(M[14]) + "," + m(M[15]) + ")";
2310
+ return f ? "translate(-50%,-50%)translate(" + n + "px," + t + "px)" + b + c : "translate(-50%,-50%)" + c;
2311
2311
  }
2312
- function T(b, y, A, m) {
2313
- if (b instanceof Pe) {
2314
- b.onBeforeRender(f, y, A);
2315
- var _;
2316
- b instanceof ut ? (a.copy(A.matrixWorldInverse), a.transpose(), a.copyPosition(b.matrixWorld), a.scale(b.scale), a.elements[3] = 0, a.elements[7] = 0, a.elements[11] = 0, a.elements[15] = 1, _ = P(a, m)) : _ = P(b.matrixWorld, m);
2317
- var S = b.element, U = s.objects.get(b);
2318
- if (U === void 0 || U.style !== _) {
2319
- S.style.WebkitTransform = _, S.style.transform = _;
2320
- var R = { style: _ };
2321
- c && (R.distanceToCameraSquared = M(A, b)), s.objects.set(b, R);
2312
+ function E(w, b, M, c) {
2313
+ if (w instanceof Me) {
2314
+ w.onBeforeRender(h, b, M);
2315
+ var O;
2316
+ w instanceof ut ? (r.copy(M.matrixWorldInverse), r.transpose(), r.copyPosition(w.matrixWorld), r.scale(w.scale), r.elements[3] = 0, r.elements[7] = 0, r.elements[11] = 0, r.elements[15] = 1, O = A(r, c)) : O = A(w.matrixWorld, c);
2317
+ var S = w.element, D = s.objects.get(w);
2318
+ if (D === void 0 || D.style !== O) {
2319
+ S.style.WebkitTransform = O, S.style.transform = O;
2320
+ var W = { style: O };
2321
+ f && (W.distanceToCameraSquared = P(M, w)), s.objects.set(w, W);
2322
2322
  }
2323
- S.style.display = b.visible ? "" : "none", S.parentNode !== h && h.appendChild(S), b.onAfterRender(f, y, A);
2323
+ S.style.display = w.visible ? "" : "none", S.parentNode !== d && d.appendChild(S), w.onAfterRender(h, b, M);
2324
2324
  }
2325
- for (var W = 0, Z = b.children.length; W < Z; W++)
2326
- T(b.children[W], y, A, m);
2325
+ for (var H = 0, X = w.children.length; H < X; H++)
2326
+ E(w.children[H], b, M, c);
2327
2327
  }
2328
- var M = (function() {
2329
- var b = new ye(), y = new ye();
2330
- return function(A, m) {
2331
- return b.setFromMatrixPosition(A.matrixWorld), y.setFromMatrixPosition(m.matrixWorld), b.distanceToSquared(y);
2328
+ var P = (function() {
2329
+ var w = new ye(), b = new ye();
2330
+ return function(M, c) {
2331
+ return w.setFromMatrixPosition(M.matrixWorld), b.setFromMatrixPosition(c.matrixWorld), w.distanceToSquared(b);
2332
2332
  };
2333
2333
  })();
2334
- function x(b) {
2335
- var y = [];
2336
- return b.traverse(function(A) {
2337
- A instanceof Pe && y.push(A);
2338
- }), y;
2334
+ function x(w) {
2335
+ var b = [];
2336
+ return w.traverse(function(M) {
2337
+ M instanceof Me && b.push(M);
2338
+ }), b;
2339
2339
  }
2340
- function C(b) {
2341
- for (var y = x(b).sort(function(S, U) {
2342
- var R = s.objects.get(S).distanceToCameraSquared, W = s.objects.get(U).distanceToCameraSquared;
2343
- return R - W;
2344
- }), A = y.length, m = 0, _ = y.length; m < _; m++)
2345
- y[m].element.style.zIndex = A - m;
2340
+ function C(w) {
2341
+ for (var b = x(w).sort(function(S, D) {
2342
+ var W = s.objects.get(S).distanceToCameraSquared, H = s.objects.get(D).distanceToCameraSquared;
2343
+ return W - H;
2344
+ }), M = b.length, c = 0, O = b.length; c < O; c++)
2345
+ b[c].element.style.zIndex = M - c;
2346
2346
  }
2347
- this.render = function(b, y) {
2348
- var A = y.projectionMatrix.elements[5] * t;
2349
- if (s.camera.fov !== A && (y.isPerspectiveCamera ? (l.style.WebkitPerspective = A + "px", l.style.perspective = A + "px") : (l.style.WebkitPerspective = "", l.style.perspective = ""), s.camera.fov = A), b.autoUpdate === !0 && b.updateMatrixWorld(), y.parent === null && y.updateMatrixWorld(), y.isOrthographicCamera)
2350
- var m = -(y.right + y.left) / 2, _ = (y.top + y.bottom) / 2;
2351
- var S = y.isOrthographicCamera ? "scale(" + A + ")translate(" + g(m) + "px," + g(_) + "px)" + w(y.matrixWorldInverse) : "translateZ(" + A + "px)" + w(y.matrixWorldInverse), U = S + "translate(" + n + "px," + t + "px)";
2352
- s.camera.style !== U && !c && (h.style.WebkitTransform = U, h.style.transform = U, s.camera.style = U), T(b, b, y, S), c && C(b);
2347
+ this.render = function(w, b) {
2348
+ var M = b.projectionMatrix.elements[5] * t;
2349
+ if (s.camera.fov !== M && (b.isPerspectiveCamera ? (l.style.WebkitPerspective = M + "px", l.style.perspective = M + "px") : (l.style.WebkitPerspective = "", l.style.perspective = ""), s.camera.fov = M), w.autoUpdate === !0 && w.updateMatrixWorld(), b.parent === null && b.updateMatrixWorld(), b.isOrthographicCamera)
2350
+ var c = -(b.right + b.left) / 2, O = (b.top + b.bottom) / 2;
2351
+ var S = b.isOrthographicCamera ? "scale(" + M + ")translate(" + m(c) + "px," + m(O) + "px)" + y(b.matrixWorldInverse) : "translateZ(" + M + "px)" + y(b.matrixWorldInverse), D = S + "translate(" + n + "px," + t + "px)";
2352
+ s.camera.style !== D && !f && (d.style.WebkitTransform = D, d.style.transform = D, s.camera.style = D), E(w, w, b, S), f && C(w);
2353
2353
  };
2354
2354
  };
2355
- function Zt(f, o, e) {
2356
- var n = o.getBoundingClientRect(), t = n.top, a = n.left, s = n.width, l = n.height;
2357
- return new v.Vector2((f.x - a) / s * 2 - 1, -(f.y - t) / l * 2 + 1);
2355
+ function Zt(h, o, e) {
2356
+ var n = o.getBoundingClientRect(), t = n.top, r = n.left, s = n.width, l = n.height;
2357
+ return new p.Vector2((h.x - r) / s * 2 - 1, -(h.y - t) / l * 2 + 1);
2358
2358
  }
2359
2359
  var jn = (
2360
2360
  /** @class */
2361
- (function(f) {
2362
- he(o, f);
2363
- function o(e, n, t, a, s) {
2364
- var l = f.call(this) || this;
2365
- l.type = "RoundedBoxGeometry", s = isNaN(s) ? 1 : Math.max(1, Math.floor(s)), e = isNaN(e) ? 1 : e, n = isNaN(n) ? 1 : n, t = isNaN(t) ? 1 : t, a = isNaN(a) ? 0.15 : a, a = Math.min(a, Math.min(e, Math.min(n, Math.min(t))) / 2);
2366
- var h = e / 2 - a, c = n / 2 - a, g = t / 2 - a;
2361
+ (function(h) {
2362
+ he(o, h);
2363
+ function o(e, n, t, r, s) {
2364
+ var l = h.call(this) || this;
2365
+ l.type = "RoundedBoxGeometry", s = isNaN(s) ? 1 : Math.max(1, Math.floor(s)), e = isNaN(e) ? 1 : e, n = isNaN(n) ? 1 : n, t = isNaN(t) ? 1 : t, r = isNaN(r) ? 0.15 : r, r = Math.min(r, Math.min(e, Math.min(n, Math.min(t))) / 2);
2366
+ var d = e / 2 - r, f = n / 2 - r, m = t / 2 - r;
2367
2367
  l.parameters = {
2368
2368
  width: e,
2369
2369
  height: n,
2370
2370
  depth: t,
2371
- radius: a,
2371
+ radius: r,
2372
2372
  radiusSegments: s
2373
2373
  };
2374
- var w = s + 1, P = w * s + 1 << 3, T = new v.BufferAttribute(new Float32Array(P * 3), 3), M = new v.BufferAttribute(new Float32Array(P * 3), 3), x = [], C = [];
2375
- new v.Vector3();
2376
- var b = new v.Vector3(), y = [], A = [], m = [], _ = w * s, S = w * s + 1;
2377
- U(), W(), R(), Z(), oe(), X();
2378
- function U() {
2374
+ var y = s + 1, A = y * s + 1 << 3, E = new p.BufferAttribute(new Float32Array(A * 3), 3), P = new p.BufferAttribute(new Float32Array(A * 3), 3), x = [], C = [];
2375
+ new p.Vector3();
2376
+ var w = new p.Vector3(), b = [], M = [], c = [], O = y * s, S = y * s + 1;
2377
+ D(), H(), W(), X(), ae(), $();
2378
+ function D() {
2379
2379
  for (var I = [
2380
- new v.Vector3(1, 1, 1),
2381
- new v.Vector3(1, 1, -1),
2382
- new v.Vector3(-1, 1, -1),
2383
- new v.Vector3(-1, 1, 1),
2384
- new v.Vector3(1, -1, 1),
2385
- new v.Vector3(1, -1, -1),
2386
- new v.Vector3(-1, -1, -1),
2387
- new v.Vector3(-1, -1, 1)
2388
- ], F = 0; F < 8; F++)
2380
+ new p.Vector3(1, 1, 1),
2381
+ new p.Vector3(1, 1, -1),
2382
+ new p.Vector3(-1, 1, -1),
2383
+ new p.Vector3(-1, 1, 1),
2384
+ new p.Vector3(1, -1, 1),
2385
+ new p.Vector3(1, -1, -1),
2386
+ new p.Vector3(-1, -1, -1),
2387
+ new p.Vector3(-1, -1, 1)
2388
+ ], L = 0; L < 8; L++)
2389
2389
  x.push([]), C.push([]);
2390
- for (var L = Math.PI / 2, D = new v.Vector3(h, c, g), G = 0; G <= s; G++) {
2391
- var re = G / s, Q = re * L, V = Math.cos(Q), te = Math.sin(Q);
2392
- if (G == s) {
2393
- b.set(0, 1, 0);
2394
- var Y = b.clone().multiplyScalar(a).add(D);
2395
- x[0].push(Y), y.push(Y);
2396
- var j = b.clone();
2397
- C[0].push(j), A.push(j);
2390
+ for (var F = Math.PI / 2, N = new p.Vector3(d, f, m), j = 0; j <= s; j++) {
2391
+ var ne = j / s, K = ne * F, U = Math.cos(K), te = Math.sin(K);
2392
+ if (j == s) {
2393
+ w.set(0, 1, 0);
2394
+ var Y = w.clone().multiplyScalar(r).add(N);
2395
+ x[0].push(Y), b.push(Y);
2396
+ var G = w.clone();
2397
+ C[0].push(G), M.push(G);
2398
2398
  continue;
2399
2399
  }
2400
- for (var k = 0; k <= s; k++) {
2401
- var se = k / s, K = se * L;
2402
- b.x = V * Math.cos(K), b.y = te, b.z = V * Math.sin(K);
2403
- var Y = b.clone().multiplyScalar(a).add(D);
2404
- x[0].push(Y), y.push(Y);
2405
- var j = b.clone().normalize();
2406
- C[0].push(j), A.push(j);
2400
+ for (var B = 0; B <= s; B++) {
2401
+ var se = B / s, Z = se * F;
2402
+ w.x = U * Math.cos(Z), w.y = te, w.z = U * Math.sin(Z);
2403
+ var Y = w.clone().multiplyScalar(r).add(N);
2404
+ x[0].push(Y), b.push(Y);
2405
+ var G = w.clone().normalize();
2406
+ C[0].push(G), M.push(G);
2407
2407
  }
2408
2408
  }
2409
- for (var J = 1; J < 8; J++)
2410
- for (var F = 0; F < x[0].length; F++) {
2411
- var Y = x[0][F].clone().multiply(I[J]);
2412
- x[J].push(Y), y.push(Y);
2413
- var j = C[0][F].clone().multiply(I[J]);
2414
- C[J].push(j), A.push(j);
2409
+ for (var Q = 1; Q < 8; Q++)
2410
+ for (var L = 0; L < x[0].length; L++) {
2411
+ var Y = x[0][L].clone().multiply(I[Q]);
2412
+ x[Q].push(Y), b.push(Y);
2413
+ var G = C[0][L].clone().multiply(I[Q]);
2414
+ C[Q].push(G), M.push(G);
2415
2415
  }
2416
2416
  }
2417
- function R() {
2417
+ function W() {
2418
2418
  for (var I = [
2419
2419
  !0,
2420
2420
  !1,
@@ -2424,153 +2424,153 @@ var jn = (
2424
2424
  !0,
2425
2425
  !1,
2426
2426
  !0
2427
- ], F = w * (s - 1), L = 0; L < 8; L++) {
2428
- for (var D = S * L, G = 0; G < s - 1; G++)
2429
- for (var re = G * w, Q = (G + 1) * w, V = 0; V < s; V++) {
2430
- var te = V + 1, Y = D + re + V, j = D + re + te, k = D + Q + V, se = D + Q + te;
2431
- I[L] ? (m.push(Y), m.push(k), m.push(j), m.push(j), m.push(k), m.push(se)) : (m.push(Y), m.push(j), m.push(k), m.push(j), m.push(se), m.push(k));
2427
+ ], L = y * (s - 1), F = 0; F < 8; F++) {
2428
+ for (var N = S * F, j = 0; j < s - 1; j++)
2429
+ for (var ne = j * y, K = (j + 1) * y, U = 0; U < s; U++) {
2430
+ var te = U + 1, Y = N + ne + U, G = N + ne + te, B = N + K + U, se = N + K + te;
2431
+ I[F] ? (c.push(Y), c.push(B), c.push(G), c.push(G), c.push(B), c.push(se)) : (c.push(Y), c.push(G), c.push(B), c.push(G), c.push(se), c.push(B));
2432
2432
  }
2433
- for (var V = 0; V < s; V++) {
2434
- var Y = D + F + V, j = D + F + V + 1, k = D + _;
2435
- I[L] ? (m.push(Y), m.push(k), m.push(j)) : (m.push(Y), m.push(j), m.push(k));
2433
+ for (var U = 0; U < s; U++) {
2434
+ var Y = N + L + U, G = N + L + U + 1, B = N + O;
2435
+ I[F] ? (c.push(Y), c.push(B), c.push(G)) : (c.push(Y), c.push(G), c.push(B));
2436
2436
  }
2437
2437
  }
2438
2438
  }
2439
- function W() {
2440
- var I = _, F = _ + S, L = _ + S * 2, D = _ + S * 3;
2441
- m.push(I), m.push(F), m.push(L), m.push(I), m.push(L), m.push(D), I = _ + S * 4, F = _ + S * 5, L = _ + S * 6, D = _ + S * 7, m.push(I), m.push(L), m.push(F), m.push(I), m.push(D), m.push(L), I = 0, F = S, L = S * 4, D = S * 5, m.push(I), m.push(L), m.push(F), m.push(F), m.push(L), m.push(D), I = S * 2, F = S * 3, L = S * 6, D = S * 7, m.push(I), m.push(L), m.push(F), m.push(F), m.push(L), m.push(D), I = s, F = s + S * 3, L = s + S * 4, D = s + S * 7, m.push(I), m.push(F), m.push(L), m.push(F), m.push(D), m.push(L), I = s + S, F = s + S * 2, L = s + S * 5, D = s + S * 6, m.push(I), m.push(L), m.push(F), m.push(F), m.push(L), m.push(D);
2439
+ function H() {
2440
+ var I = O, L = O + S, F = O + S * 2, N = O + S * 3;
2441
+ c.push(I), c.push(L), c.push(F), c.push(I), c.push(F), c.push(N), I = O + S * 4, L = O + S * 5, F = O + S * 6, N = O + S * 7, c.push(I), c.push(F), c.push(L), c.push(I), c.push(N), c.push(F), I = 0, L = S, F = S * 4, N = S * 5, c.push(I), c.push(F), c.push(L), c.push(L), c.push(F), c.push(N), I = S * 2, L = S * 3, F = S * 6, N = S * 7, c.push(I), c.push(F), c.push(L), c.push(L), c.push(F), c.push(N), I = s, L = s + S * 3, F = s + S * 4, N = s + S * 7, c.push(I), c.push(L), c.push(F), c.push(L), c.push(N), c.push(F), I = s + S, L = s + S * 2, F = s + S * 5, N = s + S * 6, c.push(I), c.push(F), c.push(L), c.push(L), c.push(F), c.push(N);
2442
2442
  }
2443
- function Z() {
2443
+ function X() {
2444
2444
  for (var I = 0; I < 4; I++)
2445
- for (var F = I * S, L = 4 * S + F, D = (I & 1) === 1, G = 0; G < s; G++) {
2446
- var re = G + 1, Q = F + G, V = F + re, te = L + G, Y = L + re;
2447
- D ? (m.push(Q), m.push(te), m.push(V), m.push(V), m.push(te), m.push(Y)) : (m.push(Q), m.push(V), m.push(te), m.push(V), m.push(Y), m.push(te));
2445
+ for (var L = I * S, F = 4 * S + L, N = (I & 1) === 1, j = 0; j < s; j++) {
2446
+ var ne = j + 1, K = L + j, U = L + ne, te = F + j, Y = F + ne;
2447
+ N ? (c.push(K), c.push(te), c.push(U), c.push(U), c.push(te), c.push(Y)) : (c.push(K), c.push(U), c.push(te), c.push(U), c.push(Y), c.push(te));
2448
2448
  }
2449
2449
  }
2450
- function X() {
2451
- for (var I = [0, 2, 4, 6], F = [1, 3, 5, 7], L = 0; L < 4; L++)
2452
- for (var D = S * I[L], G = S * F[L], re = 1 >= L, Q = 0; Q < s; Q++) {
2453
- var V = Q * w, te = (Q + 1) * w, Y = D + V, j = D + te, k = G + V, se = G + te;
2454
- re ? (m.push(Y), m.push(k), m.push(j), m.push(j), m.push(k), m.push(se)) : (m.push(Y), m.push(j), m.push(k), m.push(j), m.push(se), m.push(k));
2450
+ function $() {
2451
+ for (var I = [0, 2, 4, 6], L = [1, 3, 5, 7], F = 0; F < 4; F++)
2452
+ for (var N = S * I[F], j = S * L[F], ne = 1 >= F, K = 0; K < s; K++) {
2453
+ var U = K * y, te = (K + 1) * y, Y = N + U, G = N + te, B = j + U, se = j + te;
2454
+ ne ? (c.push(Y), c.push(B), c.push(G), c.push(G), c.push(B), c.push(se)) : (c.push(Y), c.push(G), c.push(B), c.push(G), c.push(se), c.push(B));
2455
2455
  }
2456
2456
  }
2457
- function oe() {
2458
- for (var I = s - 1, F = [0, 1, 4, 5], L = [3, 2, 7, 6], D = [0, 1, 1, 0], G = 0; G < 4; G++)
2459
- for (var re = F[G] * S, Q = L[G] * S, V = 0; V <= I; V++) {
2460
- var te = re + s + V * w, Y = re + (V != I ? s + (V + 1) * w : S - 1), j = Q + s + V * w, k = Q + (V != I ? s + (V + 1) * w : S - 1);
2461
- D[G] ? (m.push(te), m.push(j), m.push(Y), m.push(Y), m.push(j), m.push(k)) : (m.push(te), m.push(Y), m.push(j), m.push(Y), m.push(k), m.push(j));
2457
+ function ae() {
2458
+ for (var I = s - 1, L = [0, 1, 4, 5], F = [3, 2, 7, 6], N = [0, 1, 1, 0], j = 0; j < 4; j++)
2459
+ for (var ne = L[j] * S, K = F[j] * S, U = 0; U <= I; U++) {
2460
+ var te = ne + s + U * y, Y = ne + (U != I ? s + (U + 1) * y : S - 1), G = K + s + U * y, B = K + (U != I ? s + (U + 1) * y : S - 1);
2461
+ N[j] ? (c.push(te), c.push(G), c.push(Y), c.push(Y), c.push(G), c.push(B)) : (c.push(te), c.push(Y), c.push(G), c.push(Y), c.push(B), c.push(G));
2462
2462
  }
2463
2463
  }
2464
- for (var H = 0, q = 0; q < y.length; q++)
2465
- T.setXYZ(H, y[q].x, y[q].y, y[q].z), M.setXYZ(H, A[q].x, A[q].y, A[q].z), H++;
2466
- return l.setIndex(new v.BufferAttribute(new Uint16Array(m), 1)), l.setAttribute("position", T), l.setAttribute("normal", M), l;
2464
+ for (var z = 0, q = 0; q < b.length; q++)
2465
+ E.setXYZ(z, b[q].x, b[q].y, b[q].z), P.setXYZ(z, M[q].x, M[q].y, M[q].z), z++;
2466
+ return l.setIndex(new p.BufferAttribute(new Uint16Array(c), 1)), l.setAttribute("position", E), l.setAttribute("normal", P), l;
2467
2467
  }
2468
2468
  return o;
2469
- })(v.BufferGeometry)
2469
+ })(p.BufferGeometry)
2470
2470
  );
2471
- function Ye(f, o) {
2472
- return typeof f != "number" || typeof o != "number" ? !1 : Math.abs(f - o) < 1e-3;
2471
+ function Ye(h, o) {
2472
+ return typeof h != "number" || typeof o != "number" ? !1 : Math.abs(h - o) < 1e-3;
2473
2473
  }
2474
- function He(f, o, e, n) {
2475
- n === void 0 && (n = function(a) {
2476
- return a;
2474
+ function He(h, o, e, n) {
2475
+ n === void 0 && (n = function(r) {
2476
+ return r;
2477
2477
  });
2478
2478
  var t = n(e);
2479
- return f * (1 - t) + o * t;
2479
+ return h * (1 - t) + o * t;
2480
2480
  }
2481
- var ie = Number((Math.PI / 2).toFixed(5));
2482
- function Gn(f, o, e) {
2483
- var n = new v.Shape();
2484
- return n.moveTo(e, 0), n.lineTo(f - e, 0), n.absarc(f - e, e, e, -ie, 0, !1), n.lineTo(f, o - e), n.absarc(f - e, o - e, e, 0, ie, !1), n.lineTo(e, o), n.absarc(e, o - e, e, ie, Math.PI, !1), n.lineTo(0, e), n.absarc(e, e, e, Math.PI, Math.PI * 1.5, !1), n;
2481
+ var oe = Number((Math.PI / 2).toFixed(5));
2482
+ function Gn(h, o, e) {
2483
+ var n = new p.Shape();
2484
+ return n.moveTo(e, 0), n.lineTo(h - e, 0), n.absarc(h - e, e, e, -oe, 0, !1), n.lineTo(h, o - e), n.absarc(h - e, o - e, e, 0, oe, !1), n.lineTo(e, o), n.absarc(e, o - e, e, oe, Math.PI, !1), n.lineTo(0, e), n.absarc(e, e, e, Math.PI, Math.PI * 1.5, !1), n;
2485
2485
  }
2486
- var We = function(f) {
2486
+ var We = function(h) {
2487
2487
  var o = document.createElement("div");
2488
- o.innerText = f;
2489
- var e = new Pe(o);
2490
- return e.name = f, e.scale.set(0.3, 0.3, 0.3), o.style.pointerEvents = "none", o.style.backfaceVisibility = "hidden", e;
2491
- }, it = function(f) {
2492
- var o = new v.PlaneGeometry(5, 5), e = new v.MeshBasicMaterial({
2488
+ o.innerText = h;
2489
+ var e = new Me(o);
2490
+ return e.name = h, e.scale.set(0.3, 0.3, 0.3), o.style.pointerEvents = "none", o.style.backfaceVisibility = "hidden", e;
2491
+ }, it = function(h) {
2492
+ var o = new p.PlaneGeometry(5, 5), e = new p.MeshBasicMaterial({
2493
2493
  transparent: !0,
2494
2494
  opacity: 0
2495
- }), n = new v.Mesh(o, e), t = document.createElement("div");
2496
- t.innerText = f;
2497
- var a = new Pe(t);
2498
- return a.name = f, a.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", n.rotateX(-ie), n.add(a), n;
2495
+ }), n = new p.Mesh(o, e), t = document.createElement("div");
2496
+ t.innerText = h;
2497
+ var r = new Me(t);
2498
+ return r.name = h, r.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", n.rotateX(-oe), n.add(r), n;
2499
2499
  }, Yn = (
2500
2500
  /** @class */
2501
- (function(f) {
2502
- he(o, f);
2501
+ (function(h) {
2502
+ he(o, h);
2503
2503
  function o(e, n) {
2504
- var t = f.call(this, e) || this;
2505
- t.camera = new An(90), t.scene = new v.Scene(), t.renderer = new v.WebGLRenderer({ antialias: !0, alpha: !0 }), t.css3drenderer = new zn(), t.ambientLight = new v.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 v.DirectionalLight(16777215, 0.2), t.box = new v.Mesh(new jn(8, 8, 8, 0.5, 20), new v.MeshPhongMaterial({ color: 16777215 })), t.faces = new v.Group(), t.orient = function(l) {
2506
- var h = l.longitude, c = l.latitude;
2504
+ var t = h.call(this, e) || this;
2505
+ t.camera = new An(90), t.scene = new p.Scene(), t.renderer = new p.WebGLRenderer({ antialias: !0, alpha: !0 }), t.css3drenderer = new zn(), t.ambientLight = new p.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 p.DirectionalLight(16777215, 0.2), t.box = new p.Mesh(new jn(8, 8, 8, 0.5, 20), new p.MeshPhongMaterial({ color: 16777215 })), t.faces = new p.Group(), t.orient = function(l) {
2506
+ var d = l.longitude, f = l.latitude;
2507
2507
  t.dragging = !1, t.spherical = null, t.controls.enableDamping = !1, t.five.setState(Object.assign({
2508
- latitude: c
2509
- }, h !== void 0 ? {
2510
- longitude: h + t.config.fixedLongitude
2508
+ latitude: f
2509
+ }, d !== void 0 ? {
2510
+ longitude: d + 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, h, c, g, w;
2515
+ var l, d, f, m, y;
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 P = t.camera.pose, T = P.longitude, M = P.latitude;
2519
- t.five.setState({ longitude: T, latitude: M }, !0), t.updateArrows({ longitude: T, latitude: M });
2520
- } else if (t.spherical && (!Ye(t.spherical.pi, (h = t.controls) === null || h === void 0 ? void 0 : h.getPolarAngle()) || !Ye(t.spherical.theta, (c = t.controls) === null || c === void 0 ? void 0 : c.getAzimuthalAngle()))) {
2521
- t.spherical = { pi: (g = t.controls) === null || g === void 0 ? void 0 : g.getPolarAngle(), theta: (w = t.controls) === null || w === void 0 ? void 0 : w.getAzimuthalAngle() }, t.camera.computePose(), t.updateByCamera();
2522
- var x = t.camera.pose, T = x.longitude, M = x.latitude;
2523
- t.five.setState({ longitude: T, latitude: M }, !0), t.updateArrows({ longitude: T, latitude: M });
2518
+ var A = t.camera.pose, E = A.longitude, P = A.latitude;
2519
+ t.five.setState({ longitude: E, latitude: P }, !0), t.updateArrows({ longitude: E, latitude: P });
2520
+ } else if (t.spherical && (!Ye(t.spherical.pi, (d = t.controls) === null || d === void 0 ? void 0 : d.getPolarAngle()) || !Ye(t.spherical.theta, (f = t.controls) === null || f === void 0 ? void 0 : f.getAzimuthalAngle()))) {
2521
+ t.spherical = { pi: (m = t.controls) === null || m === void 0 ? void 0 : m.getPolarAngle(), theta: (y = t.controls) === null || y === void 0 ? void 0 : y.getAzimuthalAngle() }, t.camera.computePose(), t.updateByCamera();
2522
+ var x = t.camera.pose, E = x.longitude, P = x.latitude;
2523
+ t.five.setState({ longitude: E, latitude: P }, !0), t.updateArrows({ longitude: E, latitude: P });
2524
2524
  } else
2525
2525
  t.spherical = null;
2526
2526
  }, t.onTapGesture = function(l) {
2527
- var h = l.pointers[0].clientX, c = l.pointers[0].clientY, g = Zt({ x: h, y: c }, t.wrapper), w = new v.Raycaster();
2528
- w.setFromCamera(g, t.camera);
2529
- var P = w.intersectObjects(t.faces.children, !1)[0];
2530
- if (P) {
2531
- var T = P.object.userData, M = T.longitude, x = T.latitude;
2532
- t.orient({ longitude: M, latitude: x });
2527
+ var d = l.pointers[0].clientX, f = l.pointers[0].clientY, m = Zt({ x: d, y: f }, t.wrapper), y = new p.Raycaster();
2528
+ y.setFromCamera(m, t.camera);
2529
+ var A = y.intersectObjects(t.faces.children, !1)[0];
2530
+ if (A) {
2531
+ var E = A.object.userData, P = E.longitude, x = E.latitude;
2532
+ t.orient({ longitude: P, latitude: x });
2533
2533
  }
2534
2534
  }, t.onFiveWantsGesture = function() {
2535
2535
  if (t.spherical)
2536
2536
  return !1;
2537
2537
  }, t.onFiveModeChange = function(l) {
2538
- t.controls && (t.controls.maxPolarAngle = l === "Topview" ? 0 : ie);
2538
+ t.controls && (t.controls.maxPolarAngle = l === "Topview" ? 0 : oe);
2539
2539
  }, t.onCameraUpdate = function(l) {
2540
- var h = l.state;
2540
+ var d = l.state;
2541
2541
  if (!t.dragging && !t.spherical) {
2542
- var c = h.longitude, g = h.latitude;
2543
- t.camera.pose.longitude === c && t.camera.pose.latitude === g || (t.camera.setFromPose({ longitude: c, latitude: g, distance: 20, offset: new v.Vector3(0, 0, 0) }), t.updateByCamera(), t.updateArrows({ longitude: c, latitude: g }));
2542
+ var f = d.longitude, m = d.latitude;
2543
+ t.camera.pose.longitude === f && t.camera.pose.latitude === m || (t.camera.setFromPose({ longitude: f, latitude: m, distance: 20, offset: new p.Vector3(0, 0, 0) }), t.updateByCamera(), t.updateArrows({ longitude: f, latitude: m }));
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 h = Zt({ x: l.clientX, y: l.clientY }, t.wrapper), c = new v.Raycaster();
2550
- c.setFromCamera(h, t.camera);
2551
- var g = c.intersectObjects(t.faces.children, !1)[0];
2552
- t.faces.children.forEach(function(w) {
2553
- w.material.opacity = 0, w.children[0].element.style.color = "";
2554
- }), g && (g.object.material.opacity = 0.3, g.object.children[0].element.style.color = "#336dff");
2549
+ var d = Zt({ x: l.clientX, y: l.clientY }, t.wrapper), f = new p.Raycaster();
2550
+ f.setFromCamera(d, t.camera);
2551
+ var m = f.intersectObjects(t.faces.children, !1)[0];
2552
+ t.faces.children.forEach(function(y) {
2553
+ y.material.opacity = 0, y.children[0].element.style.color = "";
2554
+ }), m && (m.object.material.opacity = 0.3, m.object.children[0].element.style.color = "#336dff");
2555
2555
  }
2556
2556
  }, t.onPanEnd = function(l) {
2557
2557
  t.dragging = !1, t.spherical = { pi: t.controls.getPolarAngle(), theta: t.controls.getAzimuthalAngle() };
2558
2558
  }, t.dispose = function() {
2559
2559
  t.disable();
2560
2560
  }, t.five = e;
2561
- var a = {
2561
+ var r = {
2562
2562
  enabled: !1,
2563
2563
  visible: !0,
2564
2564
  arrowsVisible: !1
2565
2565
  };
2566
- t.state = Object.assign(a, n == null ? void 0 : n.initialState);
2567
- var s = z({ fixedLongitude: 0, orthoView: !0 }, n == null ? void 0 : n.config);
2566
+ t.state = Object.assign(r, n == null ? void 0 : n.initialState);
2567
+ var s = V({ fixedLongitude: 0, orthoView: !0 }, n == null ? void 0 : n.config);
2568
2568
  return t._config = s, 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({
2569
2569
  distance: 20,
2570
- offset: new v.Vector3(0, 0, 0),
2570
+ offset: new p.Vector3(0, 0, 0),
2571
2571
  longitude: e.camera.pose.latitude,
2572
2572
  latitude: e.camera.pose.latitude
2573
- }), t.cylinder = new v.Mesh(new v.CylinderGeometry(13.2, 14, 0.01, 50, 1, !0), new v.ShaderMaterial({
2573
+ }), t.cylinder = new p.Mesh(new p.CylinderGeometry(13.2, 14, 0.01, 50, 1, !0), new p.ShaderMaterial({
2574
2574
  uniforms: {
2575
2575
  radiusTop: { value: 13.2 },
2576
2576
  radiusBottom: { value: 14 },
@@ -2619,18 +2619,18 @@ var We = function(f) {
2619
2619
  }
2620
2620
  return Object.defineProperty(o.prototype, "config", {
2621
2621
  get: function() {
2622
- return z({}, this._config);
2622
+ return V({}, this._config);
2623
2623
  },
2624
2624
  enumerable: !1,
2625
2625
  configurable: !0
2626
2626
  }), o.prototype.updateState = function(e, n) {
2627
2627
  var t = this.state;
2628
- this.state = z(z({}, this.state), e), typeof e.arrowsVisible == "boolean" && this.handleArrowsVisible(e.arrowsVisible), this.hooks.emit("stateChange", { state: this.state, prevState: t, userAction: n });
2628
+ this.state = V(V({}, this.state), e), typeof e.arrowsVisible == "boolean" && this.handleArrowsVisible(e.arrowsVisible), this.hooks.emit("stateChange", { state: this.state, prevState: t, userAction: n });
2629
2629
  }, o.prototype.appendTo = function(e) {
2630
2630
  if (e) {
2631
2631
  e.appendChild(this.wrapper);
2632
- var n = this.wrapper.getBoundingClientRect(), t = n.width, a = n.height;
2633
- this.renderer.setSize(t, a), this.css3drenderer.setSize(t, a);
2632
+ var n = this.wrapper.getBoundingClientRect(), t = n.width, r = n.height;
2633
+ this.renderer.setSize(t, r), this.css3drenderer.setSize(t, r);
2634
2634
  }
2635
2635
  }, o.prototype.init = function() {
2636
2636
  this.renderer.setClearAlpha(0), this.renderer.domElement.style.outline = "none", this.initDom(), this.initFaces(), this.initControls(), this.initLights();
@@ -2640,8 +2640,8 @@ var We = function(f) {
2640
2640
  n.position.set(-19, 0, 0), e.add(n);
2641
2641
  var t = it("东");
2642
2642
  t.position.set(19, 0, 0), e.add(t);
2643
- var a = it("北");
2644
- a.position.set(0, 0, -19), e.add(a);
2643
+ var r = it("北");
2644
+ r.position.set(0, 0, -19), e.add(r);
2645
2645
  var s = it("南");
2646
2646
  s.position.set(0, 0, 19), e.add(s), this.updateByCamera(), this.scene.add(e, this.box, this.faces), this.scene.rotation.y = this.config.fixedLongitude;
2647
2647
  }, o.prototype.initDom = function() {
@@ -2749,11 +2749,11 @@ var We = function(f) {
2749
2749
  }, o.prototype.bindEvents = function() {
2750
2750
  var e = this;
2751
2751
  this.five.on("renderFrame", this.onRenderFrame), this.five.on("camera.update", this.onCameraUpdate), this.five.on("wantsGesture", this.onFiveWantsGesture), this.five.on("modeChange", this.onFiveModeChange), this.mc.on("tap", this.onTapGesture), this.mc.on("panstart", this.onPanStart), this.mc.on("panend", this.onPanEnd), this.wrapper.addEventListener("mousemove", this.onMouseMove), this.arrowTop.onclick = function() {
2752
- return e.orient({ longitude: 0, latitude: ie });
2752
+ return e.orient({ longitude: 0, latitude: oe });
2753
2753
  }, this.arrowLeft.onclick = function() {
2754
- return e.orient({ longitude: -ie, latitude: 0 });
2754
+ return e.orient({ longitude: -oe, latitude: 0 });
2755
2755
  }, this.arrowRight.onclick = function() {
2756
- return e.orient({ longitude: ie, latitude: 0 });
2756
+ return e.orient({ longitude: oe, latitude: 0 });
2757
2757
  }, this.arrowFront.onclick = function() {
2758
2758
  return e.orient({ longitude: 0, latitude: 0 });
2759
2759
  }, this.arrowBack.onclick = function() {
@@ -2768,40 +2768,40 @@ var We = function(f) {
2768
2768
  return l * l;
2769
2769
  }), t = He(12, 15, this.camera.pose.latitude / Math.PI * 2, function(l) {
2770
2770
  return l * l;
2771
- }), a = He(13, 19, this.camera.pose.latitude / Math.PI * 2, function(l) {
2771
+ }), r = He(13, 19, this.camera.pose.latitude / Math.PI * 2, function(l) {
2772
2772
  return l * l;
2773
2773
  }), s = He(-0.2, 0.5, this.camera.pose.latitude / Math.PI * 2, function(l) {
2774
2774
  return l * l;
2775
2775
  });
2776
- this.cylinder.geometry = new v.CylinderGeometry(n, t, 0.01, 50, 1, !0), this.cylinder.material.uniforms.radiusTop.value = n, this.cylinder.material.uniforms.radiusBottom.value = t, this.cylinder.material.needsUpdate = !0, this.cylinder.children.forEach(function(l) {
2777
- l.position.normalize().multiplyScalar(a), l.scale.set(e, e, e);
2778
- var h = l.children[0];
2779
- h && (h.element.style.opacity = s.toString());
2776
+ this.cylinder.geometry = new p.CylinderGeometry(n, t, 0.01, 50, 1, !0), this.cylinder.material.uniforms.radiusTop.value = n, this.cylinder.material.uniforms.radiusBottom.value = t, this.cylinder.material.needsUpdate = !0, this.cylinder.children.forEach(function(l) {
2777
+ l.position.normalize().multiplyScalar(r), l.scale.set(e, e, e);
2778
+ var d = l.children[0];
2779
+ d && (d.element.style.opacity = s.toString());
2780
2780
  });
2781
2781
  }, o.prototype.updateArrows = function(e) {
2782
2782
  e.longitude;
2783
- var n = e.latitude, t = ie - n < 0.02;
2783
+ var n = e.latitude, t = oe - n < 0.02;
2784
2784
  this.setState({ arrowsVisible: t });
2785
2785
  }, o.prototype.handleArrowsVisible = function(e) {
2786
2786
  var n = 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(), a = t.longitude, s = t.latitude;
2790
- if (ie - s < 0.03)
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((a - this.config.fixedLongitude) / Math.PI * 180, "deg)")) : (this.arrows.innerHTML = "", this.faces.getObjectByName("上").element.className = "");
2789
+ var t = this.five.getCurrentState(), r = t.longitude, s = t.latitude;
2790
+ if (oe - s < 0.03)
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((r - 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() {
2794
2794
  n.five.controller.cameraType = "orthographic", n.five.ready().then(function() {
2795
2795
  return n.five.controller.cameraMotion.ended = !1;
2796
2796
  });
2797
2797
  }), !0) {
2798
- case Ye(0, a - this.config.fixedLongitude):
2798
+ case Ye(0, r - 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(ie, a - this.config.fixedLongitude):
2801
+ case Ye(oe, r - 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, a - this.config.fixedLongitude):
2804
+ case Ye(Math.PI, r - 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:
@@ -2819,29 +2819,29 @@ var We = function(f) {
2819
2819
  });
2820
2820
  }, o.prototype.setState = function(e, n) {
2821
2821
  n === void 0 && (n = {});
2822
- var t = this.state, a = n.userAction !== void 0 ? n.userAction : !0;
2823
- if (this.updateState(e, a), e.enabled !== void 0 && t.enabled !== e.enabled) {
2824
- var s = { userAction: a };
2822
+ var t = this.state, r = n.userAction !== void 0 ? n.userAction : !0;
2823
+ if (this.updateState(e, r), e.enabled !== void 0 && t.enabled !== e.enabled) {
2824
+ var s = { userAction: r };
2825
2825
  e.enabled ? this._enable(s) : this._disable(s);
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 = Gn(7, 7, 0.5), n = new v.ShapeGeometry(e);
2830
+ var e = Gn(7, 7, 0.5), n = new p.ShapeGeometry(e);
2831
2831
  n.translate(-3.5, -3.5, 0);
2832
- var t = new v.Mesh(n, new v.MeshBasicMaterial({ transparent: !0, color: 3370495, opacity: 0 }));
2832
+ var t = new p.Mesh(n, new p.MeshBasicMaterial({ transparent: !0, color: 3370495, opacity: 0 }));
2833
2833
  t.userData = { longitude: 0, latitude: 0 }, t.position.z = 4.1, t.add(We("前"));
2834
- var a = new v.Mesh(n, new v.MeshBasicMaterial({ transparent: !0, color: 3370495, opacity: 0 }));
2835
- a.rotateY(Math.PI), a.position.z = -4.1, a.add(We("后")), a.userData = { longitude: Math.PI, latitude: 0 };
2836
- var s = new v.Mesh(n, new v.MeshBasicMaterial({ transparent: !0, color: 3370495, opacity: 0 }));
2837
- s.rotateY(ie), s.position.x = 4.1, s.add(We("右")), s.userData = { longitude: ie, latitude: 0 };
2838
- var l = new v.Mesh(n, new v.MeshBasicMaterial({ transparent: !0, color: 3370495, opacity: 0 }));
2839
- l.rotateY(-ie), l.position.x = -4.1, l.add(We("左")), l.userData = { longitude: -ie, latitude: 0 };
2840
- var h = new v.Mesh(n, new v.MeshBasicMaterial({ transparent: !0, color: 3370495, opacity: 0 }));
2841
- h.rotateX(-ie), h.position.y = 4.1, h.add(We("上")), h.userData = { longitude: 0, latitude: ie }, this.faces.add(t, a, l, s, h);
2834
+ var r = new p.Mesh(n, new p.MeshBasicMaterial({ transparent: !0, color: 3370495, opacity: 0 }));
2835
+ r.rotateY(Math.PI), r.position.z = -4.1, r.add(We("后")), r.userData = { longitude: Math.PI, latitude: 0 };
2836
+ var s = new p.Mesh(n, new p.MeshBasicMaterial({ transparent: !0, color: 3370495, opacity: 0 }));
2837
+ s.rotateY(oe), s.position.x = 4.1, s.add(We("右")), s.userData = { longitude: oe, latitude: 0 };
2838
+ var l = new p.Mesh(n, new p.MeshBasicMaterial({ transparent: !0, color: 3370495, opacity: 0 }));
2839
+ l.rotateY(-oe), l.position.x = -4.1, l.add(We("左")), l.userData = { longitude: -oe, latitude: 0 };
2840
+ var d = new p.Mesh(n, new p.MeshBasicMaterial({ transparent: !0, color: 3370495, opacity: 0 }));
2841
+ d.rotateX(-oe), d.position.y = 4.1, d.add(We("上")), d.userData = { longitude: 0, latitude: oe }, this.faces.add(t, r, l, s, d);
2842
2842
  }, o.prototype.initControls = function() {
2843
2843
  var e = this.controls = new qe(this.camera, this.renderer.domElement);
2844
- e.enableZoom = !1, e.enableDamping = !0, e.enablePan = !1, e.maxPolarAngle = ie, e.dampingFactor = 0.15, e.rotateSpeed = 0.25;
2844
+ e.enableZoom = !1, e.enableDamping = !0, e.enablePan = !1, e.maxPolarAngle = oe, e.dampingFactor = 0.15, e.rotateSpeed = 0.25;
2845
2845
  }, o.prototype.load = function(e) {
2846
2846
  return De(this, void 0, void 0, function() {
2847
2847
  return Ne(this, function(n) {
@@ -2852,8 +2852,8 @@ var We = function(f) {
2852
2852
  });
2853
2853
  });
2854
2854
  }, o.prototype._enable = function(e) {
2855
- var n = this.five.getCurrentState(), t = n.longitude, a = n.latitude;
2856
- this.camera.setFromPose({ longitude: t, latitude: a, distance: 20, offset: new v.Vector3(0, 0, 0) }), this.updateByCamera(), this.wrapper.appendChild(this.renderer.domElement), this.wrapper.appendChild(this.css3drenderer.domElement), this.bindEvents();
2855
+ var n = this.five.getCurrentState(), t = n.longitude, r = n.latitude;
2856
+ this.camera.setFromPose({ longitude: t, latitude: r, distance: 20, offset: new p.Vector3(0, 0, 0) }), this.updateByCamera(), this.wrapper.appendChild(this.renderer.domElement), this.wrapper.appendChild(this.css3drenderer.domElement), this.bindEvents();
2857
2857
  }, o.prototype._disable = function(e) {
2858
2858
  this.wrapper.removeChild(this.renderer.domElement), this.wrapper.removeChild(this.css3drenderer.domElement), this.unbindEvents();
2859
2859
  }, o.prototype.enable = function(e) {
@@ -2870,16 +2870,16 @@ var We = function(f) {
2870
2870
  }
2871
2871
  }, o;
2872
2872
  })(Xe.Controller)
2873
- ), nr = function(f, o) {
2874
- return new Yn(f, o);
2873
+ ), nr = function(h, o) {
2874
+ return new Yn(h, o);
2875
2875
  }, Hn = (
2876
2876
  /** @class */
2877
- (function(f) {
2878
- he(o, f);
2877
+ (function(h) {
2878
+ he(o, h);
2879
2879
  function o(e, n) {
2880
- var t = f.call(this, e) || this;
2881
- return t.data = {}, t.pluginName = "BackgroundPlugin", t._onFiveCameraUpdate = function(a) {
2882
- var s = (Math.PI / 2 - Math.max(a.latitude, 0)) / (Math.PI / 2), l = Math.max(0.2 - s, 0) * 10;
2880
+ var t = h.call(this, e) || this;
2881
+ return t.data = {}, t.pluginName = "BackgroundPlugin", t._onFiveCameraUpdate = function(r) {
2882
+ var s = (Math.PI / 2 - Math.max(r.latitude, 0)) / (Math.PI / 2), l = Math.max(0.2 - s, 0) * 10;
2883
2883
  t.gradientBg && (t.gradientBg.style.transform = "translateY(-".concat((1 - s) * 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);
@@ -2887,16 +2887,16 @@ var We = function(f) {
2887
2887
  t.five.off("cameraUpdate", t._onFiveCameraUpdate);
2888
2888
  }, t.load = function() {
2889
2889
  return De(t, void 0, void 0, function() {
2890
- return Ne(this, function(a) {
2890
+ return Ne(this, function(r) {
2891
2891
  return [
2892
2892
  2
2893
2893
  /*return*/
2894
2894
  ];
2895
2895
  });
2896
2896
  });
2897
- }, t.setState = function(a, s) {
2897
+ }, t.setState = function(r, s) {
2898
2898
  }, t.enable = function() {
2899
- var a, s = (a = t.five.getElement()) === null || a === void 0 ? void 0 : a.parentNode;
2899
+ var r, s = (r = t.five.getElement()) === null || r === void 0 ? void 0 : r.parentNode;
2900
2900
  if (!s) {
2901
2901
  t.five.ready().then(function() {
2902
2902
  return t.enable();
@@ -2904,9 +2904,9 @@ var We = function(f) {
2904
2904
  return;
2905
2905
  }
2906
2906
  t.state.enabled || (t._onFiveCameraUpdate(t.five.getPose(), !1), t.gradientBg && s.appendChild(t.gradientBg), t.groundBg && s.appendChild(t.groundBg), t.style && document.head.appendChild(t.style), t._addEventListener(), t.hooks.emit("enable", { userAction: !0 }), t.state.enabled = !0);
2907
- }, t.disable = function(a) {
2908
- var s, l, h, c;
2909
- t.state.enabled && ((l = (s = t.gradientBg) === null || s === void 0 ? void 0 : s.parentNode) === null || l === void 0 || l.removeChild(t.gradientBg), (c = (h = t.groundBg) === null || h === void 0 ? void 0 : h.parentNode) === null || c === void 0 || c.removeChild(t.groundBg), t.style && document.head.removeChild(t.style), t._removeEventListener(), t.hooks.emit("disable", { userAction: !0 }), t.state.enabled = !1);
2907
+ }, t.disable = function(r) {
2908
+ var s, l, d, f;
2909
+ t.state.enabled && ((l = (s = t.gradientBg) === null || s === void 0 ? void 0 : s.parentNode) === null || l === void 0 || l.removeChild(t.gradientBg), (f = (d = t.groundBg) === null || d === void 0 ? void 0 : d.parentNode) === null || f === void 0 || f.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 = {
@@ -2936,10 +2936,10 @@ var We = function(f) {
2936
2936
  }
2937
2937
  return o;
2938
2938
  })(Ot.Controller)
2939
- ), rr = function(f, o) {
2940
- return new Hn(f, o);
2939
+ ), rr = function(h, o) {
2940
+ return new Hn(h, o);
2941
2941
  };
2942
- new v.Matrix4().fromArray([
2942
+ new p.Matrix4().fromArray([
2943
2943
  1,
2944
2944
  0,
2945
2945
  0,
@@ -2957,37 +2957,37 @@ new v.Matrix4().fromArray([
2957
2957
  0,
2958
2958
  1
2959
2959
  ]);
2960
- var Pt = (
2960
+ var Mt = (
2961
2961
  /** @class */
2962
2962
  (function() {
2963
- function f(o, e, n, t, a) {
2964
- this.R = o, this.Q = e, this.A = n, this.B = t, this.C = a, this.cov = NaN, this.x = NaN;
2963
+ function h(o, e, n, t, r) {
2964
+ this.R = o, this.Q = e, this.A = n, this.B = t, this.C = r, this.cov = NaN, this.x = NaN;
2965
2965
  }
2966
- return f.prototype.filter = function(o, e) {
2966
+ return h.prototype.filter = function(o, e) {
2967
2967
  if (e === void 0 && (e = 0), isNaN(this.x))
2968
2968
  this.x = 1 / this.C * o, this.cov = 1 / this.C * this.Q * (1 / this.C);
2969
2969
  else {
2970
- var n = this.A * this.x + this.B * e, t = this.A * this.cov * this.A + this.R, a = t * this.C * (1 / (this.C * t * this.C + this.Q));
2971
- this.x = n + a * (o - this.C * n), this.cov = t - a * this.C * t;
2970
+ var n = this.A * this.x + this.B * e, t = this.A * this.cov * this.A + this.R, r = t * this.C * (1 / (this.C * t * this.C + this.Q));
2971
+ this.x = n + r * (o - this.C * n), this.cov = t - r * this.C * t;
2972
2972
  }
2973
2973
  return this.x;
2974
- }, f;
2974
+ }, h;
2975
2975
  })()
2976
2976
  ), Wn = (
2977
2977
  /** @class */
2978
- (function(f) {
2979
- he(o, f);
2978
+ (function(h) {
2979
+ he(o, h);
2980
2980
  function o(e, n) {
2981
- var t = f.call(this, e) || this;
2981
+ var t = h.call(this, e) || this;
2982
2982
  t.dispose = function() {
2983
2983
  t.disable();
2984
2984
  }, t.five = e;
2985
- var a = {
2985
+ var r = {
2986
2986
  enabled: !0,
2987
2987
  visible: !0
2988
2988
  };
2989
- t.state = Object.assign(a, n == null ? void 0 : n.initialState);
2990
- var s = z({}, n == null ? void 0 : n.config);
2989
+ t.state = Object.assign(r, n == null ? void 0 : n.initialState);
2990
+ var s = V({}, n == null ? void 0 : n.config);
2991
2991
  return t._config = s, 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
@@ -3004,13 +3004,13 @@ var Pt = (
3004
3004
  }
3005
3005
  return Object.defineProperty(o.prototype, "config", {
3006
3006
  get: function() {
3007
- return z({}, this._config);
3007
+ return V({}, this._config);
3008
3008
  },
3009
3009
  enumerable: !1,
3010
3010
  configurable: !0
3011
3011
  }), o.prototype.updateState = function(e, n) {
3012
3012
  var t = this.state;
3013
- this.state = z(z({}, this.state), e), this.hooks.emit("stateChange", { state: this.state, prevState: t, userAction: n });
3013
+ this.state = V(V({}, this.state), e), this.hooks.emit("stateChange", { state: this.state, prevState: t, userAction: n });
3014
3014
  }, o.prototype.load = function(e) {
3015
3015
  return De(this, void 0, void 0, function() {
3016
3016
  return Ne(this, function(n) {
@@ -3022,23 +3022,23 @@ var Pt = (
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 n = 0.01, t = 0.1, a = 1, s = 0, l = 1, h = new Pt(n, t, a, s, l), c = new Pt(n, t, a, s, l), g = new Pt(n, t, a, s, l);
3025
+ var n = 0.01, t = 0.1, r = 1, s = 0, l = 1, d = new Mt(n, t, r, s, l), f = new Mt(n, t, r, s, l), m = new Mt(n, t, r, s, l);
3026
3026
  if (this.trajectory && this.trajectory.content.loadState === "READY") {
3027
- for (var w = this.trajectory.content.data.positionArray, P = new Float32Array(w.length / 3), T = 0; T < P.length; T++)
3028
- if (T === 0)
3029
- P[T] = 0;
3027
+ for (var y = this.trajectory.content.data.positionArray, A = new Float32Array(y.length / 3), E = 0; E < A.length; E++)
3028
+ if (E === 0)
3029
+ A[E] = 0;
3030
3030
  else {
3031
- var M = new v.Vector3(w[T - 3], w[T - 2], w[T - 1]), x = new v.Vector3(w[T], w[T + 1], w[T + 2]);
3032
- P[T] = x.distanceTo(M) + P[T - 1];
3031
+ var P = new p.Vector3(y[E - 3], y[E - 2], y[E - 1]), x = new p.Vector3(y[E], y[E + 1], y[E + 2]);
3032
+ A[E] = x.distanceTo(P) + A[E - 1];
3033
3033
  }
3034
- this.totalDistance = P[P.length - 1];
3035
- for (var T = 0; T < P.length; T++) {
3036
- for (var C = new v.Vector3(0, 0, 0), b = 0, y = T - 5; y < T + 6; y++)
3037
- y >= 0 && y < P.length && (C.add(new v.Vector3(w[y * 3], w[y * 3 + 1], w[y * 3 + 2])), b++);
3038
- C.divideScalar(b).applyMatrix4(e.transform);
3039
- var A = h.filter(C.x), m = c.filter(C.y), _ = g.filter(C.z), S = {
3040
- position: new v.Vector3(A, m, _),
3041
- location: P[T]
3034
+ this.totalDistance = A[A.length - 1];
3035
+ for (var E = 0; E < A.length; E++) {
3036
+ for (var C = new p.Vector3(0, 0, 0), w = 0, b = E - 5; b < E + 6; b++)
3037
+ b >= 0 && b < A.length && (C.add(new p.Vector3(y[b * 3], y[b * 3 + 1], y[b * 3 + 2])), w++);
3038
+ C.divideScalar(w).applyMatrix4(e.transform);
3039
+ var M = d.filter(C.x), c = f.filter(C.y), O = m.filter(C.z), S = {
3040
+ position: new p.Vector3(M, c, O),
3041
+ location: A[E]
3042
3042
  };
3043
3043
  this.keyframes.push(S);
3044
3044
  }
@@ -3055,32 +3055,32 @@ var Pt = (
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(z({}, this.virualCamera.pose)));
3059
- var a = this.playingState.keyframeIndex, s = 0;
3060
- this.cancelAnimation = ct.shared.add(function(l, h) {
3061
- if (a === n - 1 - e.skipEnd && e.cancelAnimation) {
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(V({}, this.virualCamera.pose)));
3059
+ var r = this.playingState.keyframeIndex, s = 0;
3060
+ this.cancelAnimation = ct.shared.add(function(l, d) {
3061
+ if (r === n - 1 - e.skipEnd && e.cancelAnimation) {
3062
3062
  e.cancelAnimation();
3063
3063
  return;
3064
3064
  }
3065
- e.currentKeyFrame = e.keyframes[a], e.nextKeyframe = e.keyframes[a + 1], a + 2 <= n - 1 ? e.nextButOneKeyframe = e.keyframes[a + 2] : e.nextButOneKeyframe = null;
3066
- var c = e.currentKeyFrame.position.clone(), g = e.nextKeyframe.position.clone(), w = e.nextKeyframe.position.clone().sub(e.currentKeyFrame.position.clone()).normalize(), P = c.clone().add(w.clone().multiplyScalar(0.01)), T = new v.Vector3();
3067
- e.nextButOneKeyframe !== null ? T = e.nextButOneKeyframe.position.clone().sub(e.nextKeyframe.position.clone()).normalize() : T.copy(w);
3068
- var M = g.clone().add(T.clone().multiplyScalar(0.01));
3069
- s += h / 1e3 * e.rate;
3070
- var x = s / c.distanceTo(g);
3065
+ e.currentKeyFrame = e.keyframes[r], e.nextKeyframe = e.keyframes[r + 1], r + 2 <= n - 1 ? e.nextButOneKeyframe = e.keyframes[r + 2] : e.nextButOneKeyframe = null;
3066
+ var f = e.currentKeyFrame.position.clone(), m = e.nextKeyframe.position.clone(), y = e.nextKeyframe.position.clone().sub(e.currentKeyFrame.position.clone()).normalize(), A = f.clone().add(y.clone().multiplyScalar(0.01)), E = new p.Vector3();
3067
+ e.nextButOneKeyframe !== null ? E = e.nextButOneKeyframe.position.clone().sub(e.nextKeyframe.position.clone()).normalize() : E.copy(y);
3068
+ var P = m.clone().add(E.clone().multiplyScalar(0.01));
3069
+ s += d / 1e3 * e.rate;
3070
+ var x = s / f.distanceTo(m);
3071
3071
  x = x >= 1 ? 1 : x, t.keyframeIndex !== null && t.progress !== null && (x = t.progress, t.keyframeIndex = null, t.progress = null);
3072
- var C = c.clone().lerp(g, x), b = P.clone().lerp(M, x);
3073
- e.virualCamera.position.copy(C), e.virualCamera.lookAt(b), e.virualCamera.updateMatrixWorld(), e.virualCamera.updateMatrix(), e.virualCamera.computePose(), e.five.setState(z({}, e.virualCamera.pose)), e.location = e.keyframes[a].location + c.clone().distanceTo(C), x === 1 ? (s = 0, a++, e.playingState.keyframeIndex = a, e.playingState.progress = 0) : (e.playingState.keyframeIndex = a, e.playingState.progress = x);
3072
+ var C = f.clone().lerp(m, x), w = A.clone().lerp(P, x);
3073
+ e.virualCamera.position.copy(C), e.virualCamera.lookAt(w), e.virualCamera.updateMatrixWorld(), e.virualCamera.updateMatrix(), e.virualCamera.computePose(), e.five.setState(V({}, e.virualCamera.pose)), e.location = e.keyframes[r].location + f.clone().distanceTo(C), x === 1 ? (s = 0, r++, e.playingState.keyframeIndex = r, e.playingState.progress = 0) : (e.playingState.keyframeIndex = r, e.playingState.progress = x);
3074
3074
  });
3075
3075
  }, o.prototype.pause = function() {
3076
3076
  this.cancelAnimation && this.cancelAnimation();
3077
3077
  }, o.prototype.findKeyFrameByLocation = function(e) {
3078
3078
  if (this.keyframes.length !== 0) {
3079
3079
  for (var n = 0, t = this.keyframes.length - 1; n <= t; ) {
3080
- var a = Math.floor((n + t) / 2);
3081
- if (this.keyframes[a].location === e)
3082
- return a;
3083
- this.keyframes[a].location < e ? n = a + 1 : t = a - 1;
3080
+ var r = Math.floor((n + t) / 2);
3081
+ if (this.keyframes[r].location === e)
3082
+ return r;
3083
+ this.keyframes[r].location < e ? n = r + 1 : t = r - 1;
3084
3084
  }
3085
3085
  return {
3086
3086
  keyframeIndex: n - 1,
@@ -3104,11 +3104,11 @@ var Pt = (
3104
3104
  }
3105
3105
  }, o;
3106
3106
  })(Xe.Controller)
3107
- ), ar = function(f, o) {
3108
- return new Wn(f, o);
3107
+ ), ar = function(h, o) {
3108
+ return new Wn(h, o);
3109
3109
  };
3110
- function Qt(f, o, e) {
3111
- return f < o ? o : f > e ? e : f;
3110
+ function Qt(h, o, e) {
3111
+ return h < o ? o : h > e ? e : h;
3112
3112
  }
3113
3113
  var Xn = (
3114
3114
  /* glsl */
@@ -3143,69 +3143,69 @@ void main() {
3143
3143
  gl_FragColor.a = gl_FragColor.a * opacity;
3144
3144
  }
3145
3145
  `
3146
- ), Kn = [1, 5, 2, 6, 3, 7, 4, 8, 9, 13, 10, 14, 11, 15, 12, 16], Mt = 512, At = 512, ot = 128, Zn = (
3146
+ ), Kn = [1, 5, 2, 6, 3, 7, 4, 8, 9, 13, 10, 14, 11, 15, 12, 16], Pt = 512, At = 512, ot = 128, Zn = (
3147
3147
  /** @class */
3148
- (function(f) {
3149
- he(o, f);
3148
+ (function(h) {
3149
+ he(o, h);
3150
3150
  function o(e, n) {
3151
- var t = f.call(this, e) || this;
3152
- t.group = new v.Group(), t.mesh = (function() {
3153
- var l = new v.CylinderGeometry(0.12, 0.12, 1, 32, 1, !0);
3151
+ var t = h.call(this, e) || this;
3152
+ t.group = new p.Group(), t.mesh = (function() {
3153
+ var l = new p.CylinderGeometry(0.12, 0.12, 1, 32, 1, !0);
3154
3154
  l.translate(0, 0.5, 0);
3155
- var h = new v.ShaderMaterial({
3155
+ var d = new p.ShaderMaterial({
3156
3156
  vertexShader: Xn,
3157
3157
  fragmentShader: qn,
3158
3158
  uniforms: {
3159
- map: { value: new v.Texture() },
3159
+ map: { value: new p.Texture() },
3160
3160
  progress: { value: 0 },
3161
3161
  opacity: { value: 0 }
3162
3162
  },
3163
3163
  transparent: !0,
3164
3164
  depthTest: !1
3165
- }), c = new v.Mesh(l, h);
3166
- return c;
3165
+ }), f = new p.Mesh(l, d);
3166
+ return f;
3167
3167
  })(), t.panoMesh = new xn({ scale: 1.5 }), t.stop = function() {
3168
- }, t.drawLine = function(l, h) {
3168
+ }, t.drawLine = function(l, d) {
3169
3169
  if (t.ctx) {
3170
- var c = (function() {
3171
- var P, T = Mt / 16 | 0;
3172
- return T * ((P = Kn[l]) !== null && P !== void 0 ? P : 0);
3173
- })(), g = (1 - (h + l * 150) % 1200 / 1200) * (At + ot), w = t.ctx.createLinearGradient(0, g - ot, 0, g);
3174
- w.addColorStop(0, "rgba(255,255,255,0)"), w.addColorStop(0.5, "rgba(255,255,255,1)"), w.addColorStop(1, "rgba(255,255,255,0)"), t.ctx.fillStyle = w, t.ctx.fillRect(c, g - ot, 3, ot);
3170
+ var f = (function() {
3171
+ var A, E = Pt / 16 | 0;
3172
+ return E * ((A = Kn[l]) !== null && A !== void 0 ? A : 0);
3173
+ })(), m = (1 - (d + l * 150) % 1200 / 1200) * (At + ot), y = t.ctx.createLinearGradient(0, m - ot, 0, m);
3174
+ y.addColorStop(0, "rgba(255,255,255,0)"), y.addColorStop(0.5, "rgba(255,255,255,1)"), y.addColorStop(1, "rgba(255,255,255,0)"), t.ctx.fillStyle = y, t.ctx.fillRect(f, m - ot, 3, ot);
3175
3175
  }
3176
3176
  }, t.anime = function(l) {
3177
3177
  if (t.ctx && t.startTime) {
3178
- t.ctx.clearRect(0, 0, Mt, At);
3179
- for (var h = 0; h < 16; h++)
3180
- t.drawLine(h, l - t.startTime);
3181
- var c = Qt((l - t.startTime) / 1e3, 0, 1), g = Qt((l - t.startTime) / 300, 0, t.config.maxOpacity);
3182
- t.panoMesh.setOpacity(g), t.mesh.material.uniforms.progress.value = c, t.mesh.material.uniforms.opacity.value = g, t.mesh.material.uniforms.map.value.needsUpdate = !0, t.five.needsRender = !0;
3178
+ t.ctx.clearRect(0, 0, Pt, At);
3179
+ for (var d = 0; d < 16; d++)
3180
+ t.drawLine(d, l - t.startTime);
3181
+ var f = Qt((l - t.startTime) / 1e3, 0, 1), m = Qt((l - t.startTime) / 300, 0, t.config.maxOpacity);
3182
+ t.panoMesh.setOpacity(m), t.mesh.material.uniforms.progress.value = f, t.mesh.material.uniforms.opacity.value = m, t.mesh.material.uniforms.map.value.needsUpdate = !0, t.five.needsRender = !0;
3183
3183
  }
3184
3184
  }, t.dispose = function() {
3185
3185
  t.disable();
3186
3186
  }, t.five = e;
3187
- var a = {
3187
+ var r = {
3188
3188
  enabled: !1,
3189
3189
  visible: !0
3190
3190
  };
3191
- t.state = Object.assign(a, n == null ? void 0 : n.initialState);
3192
- var s = z(z({}, n == null ? void 0 : n.config), { maxOpacity: 1 });
3193
- return t._config = s, typeof document == "undefined" || (t.canvas = document.createElement("canvas"), t.ctx = t.canvas.getContext("2d"), t.canvas.width = Mt, t.canvas.height = At, 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 v.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;
3191
+ t.state = Object.assign(r, n == null ? void 0 : n.initialState);
3192
+ var s = V(V({}, n == null ? void 0 : n.config), { maxOpacity: 1 });
3193
+ return t._config = s, typeof document == "undefined" || (t.canvas = document.createElement("canvas"), t.ctx = t.canvas.getContext("2d"), t.canvas.width = Pt, t.canvas.height = At, 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 p.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
3194
  }
3195
3195
  return Object.defineProperty(o.prototype, "config", {
3196
3196
  get: function() {
3197
- return z({}, this._config);
3197
+ return V({}, this._config);
3198
3198
  },
3199
3199
  enumerable: !1,
3200
3200
  configurable: !0
3201
3201
  }), o.prototype.updateState = function(e, n) {
3202
3202
  var t = this.state;
3203
- this.state = z(z({}, this.state), e), this.hooks.emit("stateChange", { state: this.state, prevState: t, userAction: n });
3203
+ this.state = V(V({}, this.state), e), this.hooks.emit("stateChange", { state: this.state, prevState: t, userAction: n });
3204
3204
  }, o.prototype.updateConfig = function(e, n) {
3205
3205
  var t;
3206
3206
  n === void 0 && (n = {});
3207
- var a = this.config, s = z(z({}, a), e);
3208
- this._config = s, this.hooks.emit("configChange", { prevConfig: a, config: s, userAction: (t = n.userAction) !== null && t !== void 0 ? t : !0 });
3207
+ var r = this.config, s = V(V({}, r), e);
3208
+ this._config = s, this.hooks.emit("configChange", { prevConfig: r, config: s, userAction: (t = n.userAction) !== null && t !== void 0 ? t : !0 });
3209
3209
  }, o.prototype.load = function(e) {
3210
3210
  return De(this, void 0, void 0, function() {
3211
3211
  return Ne(this, function(n) {
@@ -3218,8 +3218,8 @@ void main() {
3218
3218
  }, o.prototype._enable = function(e) {
3219
3219
  var n = this;
3220
3220
  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() {
3221
- n.five.scene.add(n.group), n.stop = ct.shared.add(function(t, a) {
3222
- n.startTime || (n.startTime = t), n.panoMesh.updateTime(t, a), n.anime(t);
3221
+ n.five.scene.add(n.group), n.stop = ct.shared.add(function(t, r) {
3222
+ n.startTime || (n.startTime = t), n.panoMesh.updateTime(t, r), n.anime(t);
3223
3223
  });
3224
3224
  });
3225
3225
  }, o.prototype._disable = function(e) {
@@ -3238,24 +3238,24 @@ void main() {
3238
3238
  }
3239
3239
  }, o.prototype.setState = function(e, n) {
3240
3240
  n === void 0 && (n = {});
3241
- var t = this.state, a = n.userAction !== void 0 ? n.userAction : !0;
3242
- if (this.updateState(e, a), e.enabled !== void 0 && t.enabled !== e.enabled) {
3243
- var s = { userAction: a };
3241
+ var t = this.state, r = n.userAction !== void 0 ? n.userAction : !0;
3242
+ if (this.updateState(e, r), e.enabled !== void 0 && t.enabled !== e.enabled) {
3243
+ var s = { userAction: r };
3244
3244
  e.enabled ? this._enable(s) : this._disable(s);
3245
3245
  }
3246
3246
  }, o;
3247
3247
  })(Ot.Controller)
3248
- ), ir = function(f, o) {
3249
- return new Zn(f, o);
3248
+ ), ir = function(h, o) {
3249
+ return new Zn(h, o);
3250
3250
  }, Ct = (
3251
3251
  /** @class */
3252
- (function(f) {
3253
- he(o, f);
3252
+ (function(h) {
3253
+ he(o, h);
3254
3254
  function o() {
3255
- var e = f.call(this) || this;
3255
+ var e = h.call(this) || this;
3256
3256
  e.type = "LineSegmentsGeometry";
3257
- var n = [-1, 2, 0, 1, 2, 0, -1, 1, 0, 1, 1, 0, -1, 0, 0, 1, 0, 0, -1, -1, 0, 1, -1, 0], t = [-1, 2, 1, 2, -1, 1, 1, 1, -1, -1, 1, -1, -1, -2, 1, -2], a = [0, 2, 1, 2, 3, 1, 2, 4, 3, 4, 5, 3, 4, 6, 5, 6, 7, 5];
3258
- return e.setIndex(a), e.setAttribute("position", new v.Float32BufferAttribute(n, 3)), e.setAttribute("uv", new v.Float32BufferAttribute(t, 2)), e;
3257
+ var n = [-1, 2, 0, 1, 2, 0, -1, 1, 0, 1, 1, 0, -1, 0, 0, 1, 0, 0, -1, -1, 0, 1, -1, 0], t = [-1, 2, 1, 2, -1, 1, 1, 1, -1, -1, 1, -1, -1, -2, 1, -2], r = [0, 2, 1, 2, 3, 1, 2, 4, 3, 4, 5, 3, 4, 6, 5, 6, 7, 5];
3258
+ return e.setIndex(r), e.setAttribute("position", new p.Float32BufferAttribute(n, 3)), e.setAttribute("uv", new p.Float32BufferAttribute(t, 2)), e;
3259
3259
  }
3260
3260
  return o.prototype.applyMatrix4 = function(e) {
3261
3261
  var n = this.attributes.instanceStart, t = this.attributes.instanceEnd;
@@ -3263,55 +3263,55 @@ void main() {
3263
3263
  }, o.prototype.setPositions = function(e) {
3264
3264
  var n;
3265
3265
  e instanceof Float32Array ? n = e : Array.isArray(e) ? n = new Float32Array(e) : n = new Float32Array();
3266
- var t = new v.InstancedInterleavedBuffer(n, 6, 1);
3267
- return this.setAttribute("instanceStart", new v.InterleavedBufferAttribute(t, 3, 0)), this.setAttribute("instanceEnd", new v.InterleavedBufferAttribute(t, 3, 3)), this.computeBoundingBox(), this.computeBoundingSphere(), this;
3266
+ var t = new p.InstancedInterleavedBuffer(n, 6, 1);
3267
+ return this.setAttribute("instanceStart", new p.InterleavedBufferAttribute(t, 3, 0)), this.setAttribute("instanceEnd", new p.InterleavedBufferAttribute(t, 3, 3)), this.computeBoundingBox(), this.computeBoundingSphere(), this;
3268
3268
  }, o.prototype.setColors = function(e) {
3269
3269
  var n;
3270
3270
  e instanceof Float32Array ? n = e : Array.isArray(e) ? n = new Float32Array(e) : n = new Float32Array();
3271
- var t = new v.InstancedInterleavedBuffer(n, 6, 1);
3272
- return this.setAttribute("instanceColorStart", new v.InterleavedBufferAttribute(t, 3, 0)), this.setAttribute("instanceColorEnd", new v.InterleavedBufferAttribute(t, 3, 3)), this;
3271
+ var t = new p.InstancedInterleavedBuffer(n, 6, 1);
3272
+ return this.setAttribute("instanceColorStart", new p.InterleavedBufferAttribute(t, 3, 0)), this.setAttribute("instanceColorEnd", new p.InterleavedBufferAttribute(t, 3, 3)), this;
3273
3273
  }, o.prototype.fromWireframeGeometry = function(e) {
3274
3274
  return this.setPositions(e.attributes.position.array), this;
3275
3275
  }, o.prototype.fromEdgesGeometry = function(e) {
3276
3276
  return this.setPositions(e.attributes.position.array), this;
3277
3277
  }, o.prototype.fromMesh = function(e) {
3278
- return this.fromWireframeGeometry(new v.WireframeGeometry(e.geometry)), this;
3278
+ return this.fromWireframeGeometry(new p.WireframeGeometry(e.geometry)), this;
3279
3279
  }, o.prototype.fromLineSegments = function(e) {
3280
3280
  var n = e.geometry;
3281
- if (n instanceof v.Geometry) {
3282
- var t = new v.BufferGeometry().fromGeometry(n);
3281
+ if (n instanceof p.Geometry) {
3282
+ var t = new p.BufferGeometry().fromGeometry(n);
3283
3283
  this.setPositions(t.attributes.position.array);
3284
- } else n instanceof v.BufferGeometry && this.setPositions(n.attributes.position.array);
3284
+ } else n instanceof p.BufferGeometry && this.setPositions(n.attributes.position.array);
3285
3285
  return this;
3286
3286
  }, o.prototype.computeBoundingBox = function() {
3287
- this.boundingBox === null && (this.boundingBox = new v.Box3());
3287
+ this.boundingBox === null && (this.boundingBox = new p.Box3());
3288
3288
  var e = this.attributes.instanceStart, n = this.attributes.instanceEnd;
3289
3289
  if (e !== void 0 && n !== void 0) {
3290
- var t = new v.Box3();
3290
+ var t = new p.Box3();
3291
3291
  this.boundingBox.setFromBufferAttribute(e), t.setFromBufferAttribute(n), this.boundingBox.union(t);
3292
3292
  }
3293
3293
  }, o.prototype.computeBoundingSphere = function() {
3294
- this.boundingSphere === null && (this.boundingSphere = new v.Sphere()), this.boundingBox === null && this.computeBoundingBox();
3294
+ this.boundingSphere === null && (this.boundingSphere = new p.Sphere()), this.boundingBox === null && this.computeBoundingBox();
3295
3295
  var e = this.attributes.instanceStart, n = this.attributes.instanceEnd;
3296
3296
  if (e !== void 0 && n !== void 0) {
3297
3297
  var t = this.boundingSphere.center;
3298
3298
  this.boundingBox.getCenter(t);
3299
- for (var a = 0, s = new v.Vector3(), l = 0, h = e.count; l < h; l++)
3300
- s.fromBufferAttribute(e, l), a = Math.max(a, t.distanceToSquared(s)), s.fromBufferAttribute(n, l), a = Math.max(a, t.distanceToSquared(s));
3301
- this.boundingSphere.radius = Math.sqrt(a), isNaN(this.boundingSphere.radius) && console.error("THREE.LineSegmentsGeometry.computeBoundingSphere(): Computed radius is NaN. The instanced position data is likely to have NaN values.", this);
3299
+ for (var r = 0, s = new p.Vector3(), l = 0, d = e.count; l < d; l++)
3300
+ s.fromBufferAttribute(e, l), r = Math.max(r, t.distanceToSquared(s)), s.fromBufferAttribute(n, l), r = Math.max(r, t.distanceToSquared(s));
3301
+ this.boundingSphere.radius = Math.sqrt(r), isNaN(this.boundingSphere.radius) && console.error("THREE.LineSegmentsGeometry.computeBoundingSphere(): Computed radius is NaN. The instanced position data is likely to have NaN values.", this);
3302
3302
  }
3303
3303
  }, o.prototype.toJSON = function() {
3304
3304
  }, o;
3305
- })(v.InstancedBufferGeometry)
3305
+ })(p.InstancedBufferGeometry)
3306
3306
  );
3307
3307
  Object.assign(Ct.prototype, { isLineSegmentsGeometry: !0 });
3308
3308
  var xt = {
3309
- uniforms: v.UniformsUtils.merge([
3310
- v.UniformsLib.common,
3311
- v.UniformsLib.fog,
3309
+ uniforms: p.UniformsUtils.merge([
3310
+ p.UniformsLib.common,
3311
+ p.UniformsLib.fog,
3312
3312
  {
3313
3313
  linewidth: { value: 1 },
3314
- resolution: { value: new v.Vector2(1, 1) },
3314
+ resolution: { value: new p.Vector2(1, 1) },
3315
3315
  dashScale: { value: 1 },
3316
3316
  dashSize: { value: 1 },
3317
3317
  gapSize: { value: 1 },
@@ -3469,6 +3469,7 @@ var xt = {
3469
3469
  uniform float opacity;
3470
3470
  uniform float animationProgress;
3471
3471
  uniform float range;
3472
+ uniform float totalLength;
3472
3473
  varying float vDistanceProgress;
3473
3474
 
3474
3475
  #ifdef USE_DASH
@@ -3505,11 +3506,6 @@ var xt = {
3505
3506
 
3506
3507
  gl_FragColor = vec4(diffuseColor.rgb, diffuseColor.a);
3507
3508
 
3508
- // 裁剪超出终点的部分
3509
- if (vDistanceProgress > 1.0) {
3510
- discard;
3511
- }
3512
-
3513
3509
  float alpha = 0.0;
3514
3510
  float diff = (1.0 - 2.0 * range) * vDistanceProgress + range - animationProgress;
3515
3511
  // 使用绝对值计算,在animationProgress前后range范围内过渡
@@ -3522,8 +3518,8 @@ var xt = {
3522
3518
  alpha = clamp(alpha, 0.0, 1.0);
3523
3519
  gl_FragColor.a = alpha;
3524
3520
 
3525
- //增加开头和结尾的渐变alpha遮罩,长度为0.1
3526
- float startFadeLength = 0.05;
3521
+ // 增加开头和结尾的渐变alpha遮罩,固定物理距离为 1
3522
+ float startFadeLength = 1.0 / totalLength;
3527
3523
  if (vDistanceProgress < startFadeLength) {
3528
3524
  gl_FragColor.a *= vDistanceProgress / startFadeLength;
3529
3525
  }
@@ -3538,11 +3534,11 @@ var xt = {
3538
3534
  `
3539
3535
  }, Lt = (
3540
3536
  /** @class */
3541
- (function(f) {
3542
- he(o, f);
3537
+ (function(h) {
3538
+ he(o, h);
3543
3539
  function o(e) {
3544
- var n = f.call(this, {
3545
- uniforms: v.UniformsUtils.clone(xt.uniforms),
3540
+ var n = h.call(this, {
3541
+ uniforms: p.UniformsUtils.clone(xt.uniforms),
3546
3542
  vertexShader: xt.vertexShader,
3547
3543
  fragmentShader: xt.fragmentShader,
3548
3544
  clipping: !0
@@ -3686,65 +3682,65 @@ var xt = {
3686
3682
  }), n.setValues(e), n;
3687
3683
  }
3688
3684
  return o;
3689
- })(v.ShaderMaterial)
3685
+ })(p.ShaderMaterial)
3690
3686
  );
3691
3687
  Object.assign(Lt.prototype, { isLineMaterial: !0 });
3692
3688
  var en = (
3693
3689
  /** @class */
3694
- (function(f) {
3695
- he(o, f);
3690
+ (function(h) {
3691
+ he(o, h);
3696
3692
  function o(e, n) {
3697
- var t = f.call(this) || this;
3693
+ var t = h.call(this) || this;
3698
3694
  return t.type = "LineSegments2", t.geometry = e !== void 0 ? e : new Ct(), t.material = n !== void 0 ? n : new Lt({ color: Math.random() * 16777215 }), t;
3699
3695
  }
3700
3696
  return o.prototype.computeLineDistances = function() {
3701
- for (var e = this.geometry, n = e.attributes.instanceStart, t = e.attributes.instanceEnd, a = new Float32Array(2 * n.count), s = new v.Vector3(), l = new v.Vector3(), h = 0, c = 0, g = n.count; c < g; c++)
3702
- s.fromBufferAttribute(n, c), l.fromBufferAttribute(t, c), h += s.distanceTo(l);
3703
- this.material.uniforms.totalLength.value = h;
3704
- for (var c = 0, w = 0, g = n.count; c < g; c++, w += 2) {
3705
- s.fromBufferAttribute(n, c), l.fromBufferAttribute(t, c);
3706
- var P = s.distanceTo(l);
3707
- a[w] = w === 0 ? 0 : a[w - 1], a[w + 1] = a[w] + P;
3697
+ for (var e = this.geometry, n = e.attributes.instanceStart, t = e.attributes.instanceEnd, r = new Float32Array(2 * n.count), s = new p.Vector3(), l = new p.Vector3(), d = 0, f = 0, m = n.count; f < m; f++)
3698
+ s.fromBufferAttribute(n, f), l.fromBufferAttribute(t, f), d += s.distanceTo(l);
3699
+ this.material.uniforms.totalLength.value = d;
3700
+ for (var f = 0, y = 0, m = n.count; f < m; f++, y += 2) {
3701
+ s.fromBufferAttribute(n, f), l.fromBufferAttribute(t, f);
3702
+ var A = s.distanceTo(l);
3703
+ r[y] = y === 0 ? 0 : r[y - 1], r[y + 1] = r[y] + A;
3708
3704
  }
3709
- var T = new v.InstancedInterleavedBuffer(a, 2, 1);
3710
- return e.setAttribute("instanceDistanceStart", new v.InterleavedBufferAttribute(T, 1, 0)), e.setAttribute("instanceDistanceEnd", new v.InterleavedBufferAttribute(T, 1, 1)), this;
3705
+ var E = new p.InstancedInterleavedBuffer(r, 2, 1);
3706
+ return e.setAttribute("instanceDistanceStart", new p.InterleavedBufferAttribute(E, 1, 0)), e.setAttribute("instanceDistanceEnd", new p.InterleavedBufferAttribute(E, 1, 1)), this;
3711
3707
  }, o.prototype.raycast = function(e, n) {
3712
3708
  e.camera === null && console.error('LineSegments2: "Raycaster.camera" needs to be set in order to raycast against LineSegments2.');
3713
- var t = e.ray, a = e.camera, s = a.projectionMatrix, l = this.geometry, h = this.material, c = h.resolution, g = h.linewidth, w = l.attributes.instanceStart, P = l.attributes.instanceEnd, T = new v.Vector4(), M = new v.Vector4(), x = new v.Vector4(), C = new v.Vector3(), b = new v.Matrix4(), y = new v.Line3(), A = new v.Vector3();
3714
- t.at(1, x), x.w = 1, x.applyMatrix4(a.matrixWorldInverse), x.applyMatrix4(s), x.multiplyScalar(1 / x.w), x.x *= c.x / 2, x.y *= c.y / 2, x.z = 0, C.copy(x);
3715
- var m = this.matrixWorld;
3716
- b.multiplyMatrices(a.matrixWorldInverse, m);
3717
- for (var _ = 0, S = w.count; _ < S; _++) {
3718
- T.fromBufferAttribute(w, _), M.fromBufferAttribute(P, _), T.w = 1, M.w = 1, T.applyMatrix4(b), M.applyMatrix4(b), T.applyMatrix4(s), M.applyMatrix4(s), T.multiplyScalar(1 / T.w), M.multiplyScalar(1 / M.w);
3719
- var U = T.z < -1 && M.z < -1, R = T.z > 1 && M.z > 1;
3720
- if (!(U || R)) {
3721
- T.x *= c.x / 2, T.y *= c.y / 2, M.x *= c.x / 2, M.y *= c.y / 2, y.start.copy(T), y.start.z = 0, y.end.copy(M), y.end.z = 0;
3722
- var W = y.closestPointToPointParameter(C, !0);
3723
- y.at(W, A);
3724
- var Z = v.MathUtils.lerp(T.z, M.z, W), X = Z >= -1 && Z <= 1, oe = C.distanceTo(A) < g * 0.5;
3725
- if (X && oe) {
3726
- y.start.fromBufferAttribute(w, _), y.end.fromBufferAttribute(P, _), y.start.applyMatrix4(m), y.end.applyMatrix4(m);
3727
- var H = new v.Vector3(), q = new v.Vector3();
3728
- t.distanceSqToSegment(y.start, y.end, q, H), n.push({
3709
+ var t = e.ray, r = e.camera, s = r.projectionMatrix, l = this.geometry, d = this.material, f = d.resolution, m = d.linewidth, y = l.attributes.instanceStart, A = l.attributes.instanceEnd, E = new p.Vector4(), P = new p.Vector4(), x = new p.Vector4(), C = new p.Vector3(), w = new p.Matrix4(), b = new p.Line3(), M = new p.Vector3();
3710
+ t.at(1, x), x.w = 1, x.applyMatrix4(r.matrixWorldInverse), x.applyMatrix4(s), x.multiplyScalar(1 / x.w), x.x *= f.x / 2, x.y *= f.y / 2, x.z = 0, C.copy(x);
3711
+ var c = this.matrixWorld;
3712
+ w.multiplyMatrices(r.matrixWorldInverse, c);
3713
+ for (var O = 0, S = y.count; O < S; O++) {
3714
+ E.fromBufferAttribute(y, O), P.fromBufferAttribute(A, O), E.w = 1, P.w = 1, E.applyMatrix4(w), P.applyMatrix4(w), E.applyMatrix4(s), P.applyMatrix4(s), E.multiplyScalar(1 / E.w), P.multiplyScalar(1 / P.w);
3715
+ var D = E.z < -1 && P.z < -1, W = E.z > 1 && P.z > 1;
3716
+ if (!(D || W)) {
3717
+ E.x *= f.x / 2, E.y *= f.y / 2, P.x *= f.x / 2, P.y *= f.y / 2, b.start.copy(E), b.start.z = 0, b.end.copy(P), b.end.z = 0;
3718
+ var H = b.closestPointToPointParameter(C, !0);
3719
+ b.at(H, M);
3720
+ var X = p.MathUtils.lerp(E.z, P.z, H), $ = X >= -1 && X <= 1, ae = C.distanceTo(M) < m * 0.5;
3721
+ if ($ && ae) {
3722
+ b.start.fromBufferAttribute(y, O), b.end.fromBufferAttribute(A, O), b.start.applyMatrix4(c), b.end.applyMatrix4(c);
3723
+ var z = new p.Vector3(), q = new p.Vector3();
3724
+ t.distanceSqToSegment(b.start, b.end, q, z), n.push({
3729
3725
  point: q,
3730
- pointOnLine: H,
3726
+ pointOnLine: z,
3731
3727
  distance: t.origin.distanceTo(q),
3732
3728
  object: this,
3733
- faceIndex: _
3729
+ faceIndex: O
3734
3730
  });
3735
3731
  }
3736
3732
  }
3737
3733
  }
3738
3734
  }, o;
3739
- })(v.Mesh)
3735
+ })(p.Mesh)
3740
3736
  );
3741
3737
  Object.assign(en.prototype, { isLineSegments2: !0 });
3742
3738
  var tn = (
3743
3739
  /** @class */
3744
- (function(f) {
3745
- he(o, f);
3740
+ (function(h) {
3741
+ he(o, h);
3746
3742
  function o(e, n) {
3747
- var t = f.call(this, e, n) || this;
3743
+ var t = h.call(this, e, n) || this;
3748
3744
  return t.type = "Line2", t;
3749
3745
  }
3750
3746
  return o;
@@ -3753,26 +3749,26 @@ var tn = (
3753
3749
  Object.assign(tn.prototype, { isLine2: !0 });
3754
3750
  var nn = (
3755
3751
  /** @class */
3756
- (function(f) {
3757
- he(o, f);
3752
+ (function(h) {
3753
+ he(o, h);
3758
3754
  function o() {
3759
- var e = f.call(this) || this;
3755
+ var e = h.call(this) || this;
3760
3756
  return e.type = "LineGeometry", e;
3761
3757
  }
3762
3758
  return o.prototype.setPositions = function(e) {
3763
- for (var n = e.length - 3, t = new Float32Array(2 * n), a = 0; a < n; a += 3)
3764
- t[2 * a] = e[a], t[2 * a + 1] = e[a + 1], t[2 * a + 2] = e[a + 2], t[2 * a + 3] = e[a + 3], t[2 * a + 4] = e[a + 4], t[2 * a + 5] = e[a + 5];
3765
- return f.prototype.setPositions.call(this, t), this;
3759
+ for (var n = e.length - 3, t = new Float32Array(2 * n), r = 0; r < n; r += 3)
3760
+ t[2 * r] = e[r], t[2 * r + 1] = e[r + 1], t[2 * r + 2] = e[r + 2], t[2 * r + 3] = e[r + 3], t[2 * r + 4] = e[r + 4], t[2 * r + 5] = e[r + 5];
3761
+ return h.prototype.setPositions.call(this, t), this;
3766
3762
  }, o.prototype.setColors = function(e) {
3767
- for (var n = e.length - 3, t = new Float32Array(2 * n), a = 0; a < n; a += 3)
3768
- t[2 * a] = e[a], t[2 * a + 1] = e[a + 1], t[2 * a + 2] = e[a + 2], t[2 * a + 3] = e[a + 3], t[2 * a + 4] = e[a + 4], t[2 * a + 5] = e[a + 5];
3769
- return f.prototype.setColors.call(this, t), this;
3763
+ for (var n = e.length - 3, t = new Float32Array(2 * n), r = 0; r < n; r += 3)
3764
+ t[2 * r] = e[r], t[2 * r + 1] = e[r + 1], t[2 * r + 2] = e[r + 2], t[2 * r + 3] = e[r + 3], t[2 * r + 4] = e[r + 4], t[2 * r + 5] = e[r + 5];
3765
+ return h.prototype.setColors.call(this, t), this;
3770
3766
  }, o.prototype.fromLine = function(e) {
3771
3767
  var n = e.geometry;
3772
- if (n instanceof v.Geometry) {
3773
- var t = new v.BufferGeometry().fromGeometry(n);
3768
+ if (n instanceof p.Geometry) {
3769
+ var t = new p.BufferGeometry().fromGeometry(n);
3774
3770
  this.setPositions(t.attributes.position.array);
3775
- } else n instanceof v.BufferGeometry && this.setPositions(n.attributes.position.array);
3771
+ } else n instanceof p.BufferGeometry && this.setPositions(n.attributes.position.array);
3776
3772
  return this;
3777
3773
  }, o.prototype.copy = function() {
3778
3774
  return this;
@@ -3782,24 +3778,23 @@ var nn = (
3782
3778
  Object.assign(nn.prototype, { isLineGeometry: !0 });
3783
3779
  var Qn = (
3784
3780
  /** @class */
3785
- (function(f) {
3786
- he(o, f);
3781
+ (function(h) {
3782
+ he(o, h);
3787
3783
  function o(e, n) {
3788
- var t = f.call(this, e) || this;
3789
- t.paths = /* @__PURE__ */ new Map(), t.up = new v.Vector3(0, 1, 0);
3790
- var a = {
3784
+ var t = h.call(this, e) || this;
3785
+ t.paths = /* @__PURE__ */ new Map(), t.up = new p.Vector3(0, 1, 0);
3786
+ var r = {
3791
3787
  enabled: !0,
3792
3788
  visible: !0,
3793
3789
  playing: !1
3794
3790
  };
3795
- t.state = Object.assign(a, n == null ? void 0 : n.initialState);
3791
+ t.state = Object.assign(r, n == null ? void 0 : n.initialState);
3796
3792
  var s = {
3797
3793
  lineCount: 6,
3798
3794
  spacing: 0.02,
3799
- divisions: 100,
3800
3795
  lineWidth: 2,
3801
3796
  color: 16777215,
3802
- speed: 3,
3797
+ speed: 2,
3803
3798
  range: 0.3,
3804
3799
  waveAmp: 0.05,
3805
3800
  waveFreq: 20,
@@ -3808,39 +3803,46 @@ var Qn = (
3808
3803
  lineYOffset: 0.1,
3809
3804
  subMeshWidth: 0.3,
3810
3805
  subMeshColor: 65535,
3811
- subMeshOpacity: 0.3
3806
+ subMeshOpacity: 0.3,
3807
+ subMeshMaxOpacity: 0.5,
3808
+ // 添加这一行
3809
+ subMeshSegmentInterval: 3,
3810
+ // 每 3 米一个分段
3811
+ subMeshHighlightWidth: 1
3812
+ // 添加这一行
3812
3813
  };
3813
- return t._config = z(z({}, s), n == null ? void 0 : n.config), n != null && n.paths && n.paths.length > 0 && n.paths.forEach(function(l) {
3814
+ return t._config = V(V({}, s), n == null ? void 0 : n.config), n != null && n.paths && n.paths.length > 0 && n.paths.forEach(function(l) {
3814
3815
  t.addPath(l);
3815
3816
  }), t.state.enabled && t._enable({ userAction: !1 }), t;
3816
3817
  }
3817
3818
  return Object.defineProperty(o.prototype, "config", {
3818
3819
  get: function() {
3819
- return z({}, this._config);
3820
+ return V({}, this._config);
3820
3821
  },
3821
3822
  enumerable: !1,
3822
3823
  configurable: !0
3823
3824
  }), o.prototype.updateState = function(e, n) {
3824
3825
  var t = this.state;
3825
- this.state = z(z({}, this.state), e), this.hooks.emit("stateChange", { state: this.state, prevState: t, userAction: n });
3826
+ this.state = V(V({}, this.state), e), this.hooks.emit("stateChange", { state: this.state, prevState: t, userAction: n });
3826
3827
  }, o.prototype.load = function(e, n) {
3827
3828
  return De(this, void 0, void 0, function() {
3828
- var t, a = this;
3829
+ var t, r = this;
3829
3830
  return Ne(this, function(s) {
3830
3831
  return this.clearAllPaths(), e.paths.forEach(function(l) {
3831
- var h, c, g = l.points.map(function(w) {
3832
- return new v.Vector3(w.x, w.y, w.z);
3832
+ var d, f, m = l.points.map(function(y) {
3833
+ return new p.Vector3(y.x, y.y, y.z);
3833
3834
  });
3834
- a.addPath({
3835
+ r.addPath({
3835
3836
  id: l.id,
3836
- points: g,
3837
- enabled: (h = l.enabled) !== null && h !== void 0 ? h : !0,
3838
- visible: (c = l.visible) !== null && c !== void 0 ? c : !0,
3837
+ points: m,
3838
+ enabled: (d = l.enabled) !== null && d !== void 0 ? d : !0,
3839
+ visible: (f = l.visible) !== null && f !== void 0 ? f : !0,
3839
3840
  color: l.color,
3840
- lineWidth: l.lineWidth
3841
+ lineWidth: l.lineWidth,
3842
+ speed: l.speed
3841
3843
  });
3842
- }), t = /* @__PURE__ */ new Map(), this.paths.forEach(function(l, h) {
3843
- t.set(h, l.config);
3844
+ }), t = /* @__PURE__ */ new Map(), this.paths.forEach(function(l, d) {
3845
+ t.set(d, l.config);
3844
3846
  }), this.data = { paths: t }, this.hooks.emit("dataLoaded", this.data), n && this.setState(n), [
3845
3847
  2
3846
3848
  /*return*/
@@ -3848,58 +3850,61 @@ var Qn = (
3848
3850
  });
3849
3851
  });
3850
3852
  }, o.prototype.addPath = function(e) {
3851
- var n, t, a, s, l, h;
3853
+ var n, t, r, s, l, d, f, m;
3852
3854
  if (e.points.length < 2)
3853
3855
  return console.warn("DynamicPathLinePlugin: 路径 ".concat(e.id, " 至少需要2个点")), !1;
3854
3856
  if (this.paths.has(e.id))
3855
3857
  return console.warn("DynamicPathLinePlugin: 路径 ".concat(e.id, " 已存在")), !1;
3856
- var c = new v.CatmullRomCurve3(e.points), g = this.createLines(e, c), w = this.createParticles(), P = w.particles, T = w.particleGeometry, M = w.particleMaterial, x = w.particleInfos, C = w.particlePositions, b = (n = e.subMeshColor) !== null && n !== void 0 ? n : this._config.subMeshColor, y = (t = e.subMeshWidth) !== null && t !== void 0 ? t : this._config.subMeshWidth, A = (a = e.subMeshOpacity) !== null && a !== void 0 ? a : this._config.subMeshOpacity, m = (s = e.enableSubMesh) !== null && s !== void 0 ? s : !0, _ = this.createSubMeshGeometry(e, c, y), S = this.createSubMeshMaterial(b, A), U = c.getLength();
3857
- S.uniforms.totalLength.value = U;
3858
- var R = new v.Mesh(_, S);
3859
- R.visible = m, this.five.scene.add(R);
3860
- var W = {
3858
+ var y = new p.CatmullRomCurve3(e.points), A = (n = e.subMeshColor) !== null && n !== void 0 ? n : this._config.subMeshColor, E = (t = e.subMeshWidth) !== null && t !== void 0 ? t : this._config.subMeshWidth, P = (r = e.subMeshOpacity) !== null && r !== void 0 ? r : this._config.subMeshOpacity, x = (s = e.enableSubMesh) !== null && s !== void 0 ? s : !0, C = (l = e.speed) !== null && l !== void 0 ? l : this._config.speed, w = (d = e.range) !== null && d !== void 0 ? d : this._config.range, b = this.createLines(e, y, w), M = this.createParticles(), c = M.particles, O = M.particleGeometry, S = M.particleMaterial, D = M.particleInfos, W = M.particlePositions, H = this.createSubMeshGeometry(e, y, E), X = y.getLength(), $ = this.createSubMeshMaterial(A, P, X, w);
3859
+ $.uniforms.totalLength.value = X;
3860
+ var ae = new p.Mesh(H, $);
3861
+ ae.visible = x, this.five.scene.add(ae);
3862
+ var z = {
3861
3863
  id: e.id,
3862
3864
  config: e,
3863
- curve: c,
3864
- lines: g,
3865
- particles: P,
3866
- particleGeometry: T,
3867
- particleMaterial: M,
3868
- particleInfos: x,
3869
- particlePositions: C,
3870
- enabled: (l = e.enabled) !== null && l !== void 0 ? l : !0,
3871
- visible: (h = e.visible) !== null && h !== void 0 ? h : !0,
3865
+ curve: y,
3866
+ lines: b,
3867
+ particles: c,
3868
+ particleGeometry: O,
3869
+ particleMaterial: S,
3870
+ particleInfos: D,
3871
+ particlePositions: W,
3872
+ enabled: (f = e.enabled) !== null && f !== void 0 ? f : !0,
3873
+ visible: (m = e.visible) !== null && m !== void 0 ? m : !0,
3872
3874
  startOffset: 0,
3873
3875
  endOffset: 0,
3874
3876
  lastAnimationProgress: 0,
3875
3877
  cycleStartTime: performance.now() / 1e3,
3876
3878
  isInitialAnimation: !0,
3879
+ isPathlineInitialAnimation: !0,
3877
3880
  subMeshUnfoldProgress: 0,
3878
3881
  subMeshUnfoldStarted: !1,
3882
+ subMeshUnfoldStartTime: 0,
3879
3883
  lastUpdateTime: performance.now() / 1e3,
3880
- subMesh: R,
3881
- subMeshGeometry: _,
3882
- subMeshMaterial: S,
3883
- subMeshColor: b,
3884
- subMeshWidth: y,
3885
- subMeshOpacity: A,
3884
+ subMesh: ae,
3885
+ subMeshGeometry: H,
3886
+ subMeshMaterial: $,
3887
+ subMeshColor: A,
3888
+ subMeshWidth: E,
3889
+ subMeshOpacity: P,
3890
+ speed: C,
3886
3891
  animationId: null,
3887
- enableSubMesh: m
3892
+ enableSubMesh: x
3888
3893
  };
3889
- this.paths.set(e.id, W);
3890
- var Z = this.data, X = /* @__PURE__ */ new Map();
3891
- return this.paths.forEach(function(oe, H) {
3892
- X.set(H, oe.config);
3893
- }), this.data = { paths: X }, this.hooks.emit("dataChange", this.data, Z), this.hooks.emit("pathAdd", e.id, e), this.state.playing && this.startPathAnimation(e.id), !0;
3894
+ this.paths.set(e.id, z);
3895
+ var q = this.data, I = /* @__PURE__ */ new Map();
3896
+ return this.paths.forEach(function(L, F) {
3897
+ I.set(F, L.config);
3898
+ }), this.data = { paths: I }, this.hooks.emit("dataChange", this.data, q), this.hooks.emit("pathAdd", e.id, e), this.state.playing && this.startPathAnimation(e.id), !0;
3894
3899
  }, o.prototype.removePath = function(e) {
3895
3900
  var n = this.paths.get(e);
3896
3901
  if (!n)
3897
3902
  return console.warn("DynamicPathLinePlugin: 路径 ".concat(e, " 不存在")), !1;
3898
3903
  this.stopPathAnimation(e), this.disposePathResources(n), this.paths.delete(e);
3899
- var t = this.data, a = /* @__PURE__ */ new Map();
3904
+ var t = this.data, r = /* @__PURE__ */ new Map();
3900
3905
  return this.paths.forEach(function(s, l) {
3901
- a.set(l, s.config);
3902
- }), this.data = { paths: a }, this.hooks.emit("dataChange", this.data, t), this.hooks.emit("pathRemove", e), !0;
3906
+ r.set(l, s.config);
3907
+ }), this.data = { paths: r }, this.hooks.emit("dataChange", this.data, t), this.hooks.emit("pathRemove", e), !0;
3903
3908
  }, o.prototype.enablePath = function(e) {
3904
3909
  var n = this.paths.get(e);
3905
3910
  return n ? (n.enabled = !0, this.hooks.emit("pathEnable", e), !0) : (console.warn("DynamicPathLinePlugin: 路径 ".concat(e, " 不存在")), !1);
@@ -3920,58 +3925,58 @@ var Qn = (
3920
3925
  return Array.from(this.paths.keys());
3921
3926
  }, o.prototype.getPathConfig = function(e) {
3922
3927
  var n = this.paths.get(e);
3923
- return n ? z({}, n.config) : void 0;
3928
+ return n ? V({}, n.config) : void 0;
3924
3929
  }, o.prototype.clearAllPaths = function() {
3925
3930
  var e = this;
3926
- this.paths.forEach(function(a, s) {
3927
- e.stopPathAnimation(s), e.disposePathResources(a);
3931
+ this.paths.forEach(function(r, s) {
3932
+ e.stopPathAnimation(s), e.disposePathResources(r);
3928
3933
  }), this.paths.clear();
3929
3934
  var n = this.data, t = /* @__PURE__ */ new Map();
3930
- this.paths.forEach(function(a, s) {
3931
- t.set(s, a.config);
3935
+ this.paths.forEach(function(r, s) {
3936
+ t.set(s, r.config);
3932
3937
  }), this.data = { paths: t }, this.hooks.emit("dataChange", this.data, n);
3933
3938
  }, o.prototype.getPositions = function(e, n) {
3934
- for (var t = [], a = [], s = 0, l = [], h = 0; h <= n; h++) {
3935
- var c = h / n, g = e.getPoint(c);
3936
- l.push(g.clone()), h > 0 && (s += g.distanceTo(l[h - 1]));
3939
+ for (var t = [], r = [], s = 0, l = [], d = 0; d <= n; d++) {
3940
+ var f = d / n, m = e.getPoint(f);
3941
+ l.push(m.clone()), d > 0 && (s += m.distanceTo(l[d - 1]));
3937
3942
  }
3938
- for (var w = 0, h = 0; h < n; h++) {
3939
- h > 0 && (w += l[h].distanceTo(l[h - 1]));
3940
- var P = w / s;
3941
- t.push(l[h].x, l[h].y, l[h].z), a.push(P);
3943
+ for (var y = 0, d = 0; d < n; d++) {
3944
+ d > 0 && (y += l[d].distanceTo(l[d - 1]));
3945
+ var A = y / s;
3946
+ t.push(l[d].x, l[d].y, l[d].z), r.push(A);
3942
3947
  }
3943
- return { positions: t, distanceProgress: a };
3944
- }, o.prototype.createLines = function(e, n) {
3945
- for (var t = this, a, s, l = [], h = this._config, c = h.lineCount, g = h.spacing, w = h.divisions, P = h.waveAmp, T = h.waveFreq, M = h.range, x = h.lineYOffset, C = (a = e.lineWidth) !== null && a !== void 0 ? a : this._config.lineWidth, b = (s = e.color) !== null && s !== void 0 ? s : this._config.color, y = function(_) {
3946
- var S = (_ - (c - 1) / 2) * g, U = e.points.map(function(H, q) {
3947
- var I = q / (e.points.length - 1), F = n.getTangent(I).normalize(), L = new v.Vector3().crossVectors(t.up, F).normalize(), D = S * Math.abs((q - e.points.length / 2) / e.points.length - 0.5) * -1;
3948
- return H.clone().addScaledVector(L, S + D).add(new v.Vector3(0, x + 0.02 * (_ % 2 === 0 ? 1 : 0), 0));
3949
- }), R = new v.CatmullRomCurve3(U), W = A.getPositions(R, w).positions, Z = new nn();
3950
- Z.setPositions(W);
3951
- var X = new Lt({
3952
- color: b,
3953
- linewidth: C * (_ % 2 === 0 ? 1 : 0.5),
3948
+ return { positions: t, distanceProgress: r };
3949
+ }, o.prototype.createLines = function(e, n, t) {
3950
+ for (var r = this, s, l, d = [], f = e.points.length * 40, m = this._config, y = m.lineCount, A = m.spacing, E = m.waveAmp, P = m.waveFreq, x = m.lineYOffset, C = (s = e.lineWidth) !== null && s !== void 0 ? s : this._config.lineWidth, w = (l = e.color) !== null && l !== void 0 ? l : this._config.color, b = n.getLength(), M = t / b, c = function(D) {
3951
+ var W = (D - (y - 1) / 2) * A, H = e.points.map(function(I, L) {
3952
+ var F = L / (e.points.length - 1), N = n.getTangent(F).normalize(), j = new p.Vector3().crossVectors(r.up, N).normalize(), ne = W * Math.abs((L - e.points.length / 2) / e.points.length - 0.5) * -1;
3953
+ return I.clone().addScaledVector(j, W + ne).add(new p.Vector3(0, x + 0.02 * (D % 2 === 0 ? 1 : 0), 0));
3954
+ }), X = new p.CatmullRomCurve3(H), $ = O.getPositions(X, f).positions, ae = new nn();
3955
+ ae.setPositions($);
3956
+ var z = new Lt({
3957
+ color: w,
3958
+ linewidth: C * (D % 2 === 0 ? 1 : 0.5),
3954
3959
  transparent: !0,
3955
3960
  opacity: 1,
3956
3961
  depthWrite: !1
3957
3962
  });
3958
- X.resolution.set(A.five.camera.resolution.x, A.five.camera.resolution.y), _ === 0 ? X.waveDir = 1 : _ === 1 ? X.waveDir = 2 : _ === 2 ? X.waveDir = 0 : _ === 3 ? X.waveDir = 3 : _ === 4 && (X.waveDir = 1), X.waveAmp = P, X.waveFreq = T, Object.assign(X.uniforms, {
3963
+ z.resolution.set(O.five.camera.resolution.x, O.five.camera.resolution.y), D === 0 ? z.waveDir = 1 : D === 1 ? z.waveDir = 2 : D === 2 ? z.waveDir = 0 : D === 3 ? z.waveDir = 3 : D === 4 && (z.waveDir = 1), z.waveAmp = E, z.waveFreq = P, Object.assign(z.uniforms, {
3959
3964
  time: { value: 0 },
3960
3965
  startOffset: { value: 0 },
3961
3966
  range: { value: M }
3962
3967
  });
3963
- var oe = new tn(Z, X);
3964
- oe.computeLineDistances(), l.push(oe), A.five.scene.add(oe);
3965
- }, A = this, m = 0; m < c; m++)
3966
- y(m);
3967
- return l;
3968
+ var q = new tn(ae, z);
3969
+ q.computeLineDistances(), d.push(q), O.five.scene.add(q);
3970
+ }, O = this, S = 0; S < y; S++)
3971
+ c(S);
3972
+ return d;
3968
3973
  }, o.prototype.createParticleMaterial = function() {
3969
- return new v.ShaderMaterial({
3974
+ return new p.ShaderMaterial({
3970
3975
  transparent: !0,
3971
- blending: v.AdditiveBlending,
3976
+ blending: p.AdditiveBlending,
3972
3977
  depthWrite: !1,
3973
3978
  uniforms: {
3974
- pointTexture: { value: new v.TextureLoader().load("https://threejs.org/examples/textures/sprites/circle.png") }
3979
+ pointTexture: { value: new p.TextureLoader().load("https://threejs.org/examples/textures/sprites/circle.png") }
3975
3980
  },
3976
3981
  vertexShader: `
3977
3982
  attribute float size;
@@ -3992,58 +3997,58 @@ var Qn = (
3992
3997
  `
3993
3998
  });
3994
3999
  }, o.prototype.createParticles = function() {
3995
- for (var e = this._config.particleCount, n = new Float32Array(e * 3), t = new v.BufferGeometry(), a = this.createParticleMaterial(), s = new v.Points(t, a), l = new Float32Array(e), h = [], c = 0; c < e; c++)
3996
- n[c * 3] = 9999, n[c * 3 + 1] = 9999, n[c * 3 + 2] = 9999, l[c] = v.MathUtils.randFloat(3, 9), h.push({
3997
- velocity: new v.Vector3(),
4000
+ for (var e = this._config.particleCount, n = new Float32Array(e * 3), t = new p.BufferGeometry(), r = this.createParticleMaterial(), s = new p.Points(t, r), l = new Float32Array(e), d = [], f = 0; f < e; f++)
4001
+ n[f * 3] = 9999, n[f * 3 + 1] = 9999, n[f * 3 + 2] = 9999, l[f] = p.MathUtils.randFloat(3, 9), d.push({
4002
+ velocity: new p.Vector3(),
3998
4003
  life: 3 + Math.random() * 2,
3999
4004
  age: 0,
4000
4005
  active: !1,
4001
4006
  alpha: 0,
4002
- startPos: new v.Vector3()
4007
+ startPos: new p.Vector3()
4003
4008
  });
4004
- return t.setAttribute("position", new v.BufferAttribute(n, 3)), t.setAttribute("size", new v.BufferAttribute(l, 1)), s.frustumCulled = !1, this.five.scene.add(s), { particles: s, particleGeometry: t, particleMaterial: a, particleInfos: h, particlePositions: n };
4009
+ return t.setAttribute("position", new p.BufferAttribute(n, 3)), t.setAttribute("size", new p.BufferAttribute(l, 1)), s.frustumCulled = !1, this.five.scene.add(s), { particles: s, particleGeometry: t, particleMaterial: r, particleInfos: d, particlePositions: n };
4005
4010
  }, o.prototype.createSubMeshGeometry = function(e, n, t) {
4006
- for (var a = this._config.divisions, s = new v.BufferGeometry(), l = n.getPoints(a), h = [], c = [], g = [], w = [], P = 0, T = [0], M = 1; M < l.length; M++)
4007
- P += l[M].distanceTo(l[M - 1]), T.push(P);
4008
- for (var x = P, M = 0; M < l.length; M++) {
4009
- var C = l[M], b = M / (l.length - 1), y = n.getTangent(b).normalize(), A = new v.Vector3().crossVectors(this.up, y).normalize(), m = t / 2, _ = C.clone().addScaledVector(A, -m);
4010
- h.push(_.x, _.y, _.z), c.push(0, T[M] / x), w.push(T[M] / x);
4011
- var S = C.clone().addScaledVector(A, m);
4012
- h.push(S.x, S.y, S.z), c.push(1, T[M] / x), w.push(T[M] / x);
4011
+ for (var r = e.points.length * 40, s = new p.BufferGeometry(), l = n.getPoints(r), d = [], f = [], m = [], y = [], A = 0, E = [0], P = 1; P < l.length; P++)
4012
+ A += l[P].distanceTo(l[P - 1]), E.push(A);
4013
+ for (var x = A, P = 0; P < l.length; P++) {
4014
+ var C = l[P], w = P / (l.length - 1), b = n.getTangent(w).normalize(), M = new p.Vector3().crossVectors(this.up, b).normalize(), c = t / 2, O = C.clone().addScaledVector(M, -c);
4015
+ d.push(O.x, O.y, O.z), f.push(0, E[P] / x), y.push(E[P] / x);
4016
+ var S = C.clone().addScaledVector(M, c);
4017
+ d.push(S.x, S.y, S.z), f.push(1, E[P] / x), y.push(E[P] / x);
4013
4018
  }
4014
- for (var M = 0; M < l.length - 1; M++) {
4015
- var U = M * 2;
4016
- g.push(U, U + 1, U + 2), g.push(U + 1, U + 3, U + 2);
4019
+ for (var P = 0; P < l.length - 1; P++) {
4020
+ var D = P * 2;
4021
+ m.push(D, D + 1, D + 2), m.push(D + 1, D + 3, D + 2);
4017
4022
  }
4018
- return s.setAttribute("position", new v.Float32BufferAttribute(h, 3)), s.setAttribute("uv", new v.Float32BufferAttribute(c, 2)), s.setAttribute("distanceProgress", new v.Float32BufferAttribute(w, 1)), s.setIndex(g), s.computeVertexNormals(), s;
4019
- }, o.prototype.createAlphaMapTexture = function(e, n, t) {
4020
- for (var a = 256, s = 1, l = a * s, h = new Uint8Array(l), c = 1 / e, g = n / 2, w = 0; w < a; w++) {
4021
- var P = w / a, T = Math.floor(P / c), M = (P - T * c) / c, x = 0, C = M;
4022
- if (C > 0.5 && (C = 1 - C), C < g) {
4023
- var b = 1 - C / g, y = b * b * b;
4024
- x = t + (1 - t) * y;
4023
+ return s.setAttribute("position", new p.Float32BufferAttribute(d, 3)), s.setAttribute("uv", new p.Float32BufferAttribute(f, 2)), s.setAttribute("distanceProgress", new p.Float32BufferAttribute(y, 1)), s.setIndex(m), s.computeVertexNormals(), s;
4024
+ }, o.prototype.createAlphaMapTexture = function(e, n, t, r, s) {
4025
+ for (var l = 1024, d = 1, f = l * d, m = new Uint8Array(f), y = 1 / e, A = t / e, E = n / A, P = E / 2, x = 0; x < l; x++) {
4026
+ var C = x / l, w = Math.floor(C / y), b = (C - w * y) / y, M = 0, c = b;
4027
+ if (c > 0.5 && (c = 1 - c), c < P) {
4028
+ var O = 1 - c / P, S = O;
4029
+ M = r + (s - r) * S;
4025
4030
  } else
4026
- x = t;
4027
- h[w] = Math.floor(x * 255);
4031
+ M = r;
4032
+ m[x] = Math.floor(M * 255);
4028
4033
  }
4029
- var A = new v.DataTexture(h, a, s, v.RedFormat);
4030
- return A.needsUpdate = !0, A.wrapS = v.RepeatWrapping, A.wrapT = v.ClampToEdgeWrapping, A.minFilter = v.LinearFilter, A.magFilter = v.LinearFilter, A;
4031
- }, o.prototype.createSubMeshMaterial = function(e, n) {
4032
- var t = this._config.range, a = this.createAlphaMapTexture(3, 1, n);
4033
- return new v.ShaderMaterial({
4034
+ var D = new p.DataTexture(m, l, d, p.RedFormat);
4035
+ return D.needsUpdate = !0, D.wrapS = p.RepeatWrapping, D.wrapT = p.ClampToEdgeWrapping, D.minFilter = p.LinearFilter, D.magFilter = p.LinearFilter, D;
4036
+ }, o.prototype.createSubMeshMaterial = function(e, n, t, r) {
4037
+ var s = this._config, l = s.subMeshSegmentInterval, d = s.subMeshHighlightWidth, f = s.subMeshMaxOpacity, m = Math.max(1, Math.round(t / l)), y = r / t, A = this.createAlphaMapTexture(m, d, t, n, f);
4038
+ return new p.ShaderMaterial({
4034
4039
  transparent: !0,
4035
- side: v.BackSide,
4040
+ side: p.BackSide,
4036
4041
  depthWrite: !1,
4037
4042
  uniforms: {
4038
- baseColor: { value: new v.Color(e) },
4043
+ baseColor: { value: new p.Color(e) },
4039
4044
  baseOpacity: { value: n },
4040
4045
  animationProgress: { value: 0 },
4041
- range: { value: t },
4046
+ range: { value: y },
4042
4047
  startOffset: { value: 0 },
4043
4048
  endOffset: { value: 0 },
4044
4049
  totalLength: { value: 1 },
4045
4050
  unfoldProgress: { value: 0 },
4046
- alphaMap: { value: a }
4051
+ alphaMap: { value: A }
4047
4052
  },
4048
4053
  vertexShader: `
4049
4054
  attribute float distanceProgress;
@@ -4095,15 +4100,15 @@ var Qn = (
4095
4100
  // 从 alphaMap 采样透明度
4096
4101
  float sampledAlpha = texture2D(alphaMap, uv).r;
4097
4102
 
4098
- // 展开前进头部的渐变遮罩(0.05 的百分比)
4099
- float unfoldFadeLength = 0.05;
4103
+ // 展开前进头部的渐变遮罩,固定物理距离为 1 米
4104
+ float unfoldFadeLength = 1.0 / totalLength; // 1米 / 总长度 = 百分比
4100
4105
  float distanceToUnfoldEdge = unfoldProgress - adjustedProgress;
4101
4106
  if (distanceToUnfoldEdge < unfoldFadeLength && distanceToUnfoldEdge > 0.0) {
4102
4107
  sampledAlpha *= distanceToUnfoldEdge / unfoldFadeLength;
4103
4108
  }
4104
4109
 
4105
- // 增加开头和结尾的渐变 alpha 遮罩
4106
- float fadeLength = 0.05;
4110
+ // 增加开头和结尾的渐变 alpha 遮罩,固定物理距离为 1 米
4111
+ float fadeLength = 1.0 / totalLength; // 1米 / 总长度 = 百分比
4107
4112
  if (adjustedProgress < fadeLength) {
4108
4113
  sampledAlpha *= adjustedProgress / fadeLength;
4109
4114
  }
@@ -4117,27 +4122,27 @@ var Qn = (
4117
4122
  `
4118
4123
  });
4119
4124
  }, o.prototype.projectPointsToScreen = function(e, n) {
4120
- for (var t = [], a = 0, s = 0; s < e.length; s++) {
4125
+ for (var t = [], r = 0, s = 0; s < e.length; s++) {
4121
4126
  var l = e[s];
4122
- s > 0 && (a += l.distanceTo(e[s - 1]));
4123
- var h = l.clone().project(n), c = h.x < -1 || h.x > 1 || h.y < -1 || h.y > 1 || h.z < -1 || h.z > 1;
4127
+ s > 0 && (r += l.distanceTo(e[s - 1]));
4128
+ var d = l.clone().project(n), f = d.x < -1 || d.x > 1 || d.y < -1 || d.y > 1 || d.z < -1 || d.z > 1;
4124
4129
  t.push({
4125
4130
  point: l.clone(),
4126
- screenPos: new v.Vector2(h.x, h.y),
4127
- distanceFromStart: a,
4128
- isOffscreen: c
4131
+ screenPos: new p.Vector2(d.x, d.y),
4132
+ distanceFromStart: r,
4133
+ isOffscreen: f
4129
4134
  });
4130
4135
  }
4131
4136
  return t;
4132
4137
  }, o.prototype.findNearestOffscreenPoint = function(e) {
4133
- for (var n = -1, t = 0, a = -1, s = 0; s < e.length; s++)
4138
+ for (var n = -1, t = 0, r = -1, s = 0; s < e.length; s++)
4134
4139
  if (!e[s].isOffscreen) {
4135
- a = s;
4140
+ r = s;
4136
4141
  break;
4137
4142
  }
4138
- if (a === -1)
4143
+ if (r === -1)
4139
4144
  return null;
4140
- for (var s = a - 1; s >= 0; s--)
4145
+ for (var s = r - 1; s >= 0; s--)
4141
4146
  if (e[s].isOffscreen) {
4142
4147
  n = s, t = e[s].distanceFromStart;
4143
4148
  break;
@@ -4147,71 +4152,84 @@ var Qn = (
4147
4152
  distance: t
4148
4153
  };
4149
4154
  }, o.prototype.findFarestOffscreenPoint = function(e) {
4150
- for (var n, t = ((n = e[e.length - 1]) === null || n === void 0 ? void 0 : n.distanceFromStart) || 0, a = -1, s = e.length - 1; s >= 0; s--)
4155
+ for (var n, t = ((n = e[e.length - 1]) === null || n === void 0 ? void 0 : n.distanceFromStart) || 0, r = -1, s = e.length - 1; s >= 0; s--)
4151
4156
  if (!e[s].isOffscreen) {
4152
- a = s;
4157
+ r = s;
4153
4158
  break;
4154
4159
  }
4155
- if (a === -1)
4160
+ if (r === -1)
4156
4161
  return null;
4157
- var l = a + 1;
4162
+ var l = r + 1;
4158
4163
  return l < e.length && e[l].isOffscreen ? {
4159
4164
  index: l,
4160
4165
  distance: e[l].distanceFromStart,
4161
4166
  totalLength: t
4162
4167
  } : { index: e.length - 1, distance: t, totalLength: t };
4163
4168
  }, o.prototype.updatePathAnimation = function(e) {
4164
- var n, t = this.paths.get(e);
4165
- if (!(!t || !t.enabled)) {
4166
- var a = performance.now() / 1e3, s = this._config, l = s.speed, h = s.particleCount, c = s.maxDistance, g = ((n = t.lines[0]) === null || n === void 0 ? void 0 : n.material.uniforms.totalLength.value) || 1, w = Math.max(0.01, g - t.startOffset - t.endOffset), P = (a - t.cycleStartTime) * l / w % 1;
4167
- if (t.isInitialAnimation) {
4168
- if (t.enableSubMesh && P >= 0.2 && !t.subMeshUnfoldStarted && (t.subMeshUnfoldStarted = !0), t.enableSubMesh && t.subMeshUnfoldStarted && t.subMeshUnfoldProgress < 1) {
4169
- var T = a - t.lastUpdateTime, M = 0.5;
4170
- t.subMeshUnfoldProgress = Math.min(1, t.subMeshUnfoldProgress + M * T), t.subMeshMaterial.uniforms.unfoldProgress.value = t.subMeshUnfoldProgress;
4169
+ var n, t, r = this.paths.get(e);
4170
+ if (!(!r || !r.enabled)) {
4171
+ var s = performance.now() / 1e3, l = this._config, d = l.particleCount, f = l.maxDistance, m = ((n = r.lines[0]) === null || n === void 0 ? void 0 : n.material.uniforms.totalLength.value) || 1, y = Math.max(0.01, m - r.startOffset - r.endOffset), A = r.speed, E = (s - r.cycleStartTime) * A / y % 1;
4172
+ if (r.isInitialAnimation) {
4173
+ var P = E * y;
4174
+ if (r.enableSubMesh && P >= 1 && !r.subMeshUnfoldStarted && (r.subMeshUnfoldStarted = !0, r.subMeshUnfoldStartTime = s), r.enableSubMesh && r.subMeshUnfoldStarted && r.subMeshUnfoldProgress < 1) {
4175
+ var x = (t = r.config.range) !== null && t !== void 0 ? t : this._config.range, C = s - r.subMeshUnfoldStartTime;
4176
+ r.subMeshUnfoldProgress = Math.min(1, C * A / (y - 2 * x)), r.subMeshMaterial.uniforms.unfoldProgress.value = r.subMeshUnfoldProgress;
4171
4177
  }
4172
- P < t.lastAnimationProgress && (!t.enableSubMesh || t.subMeshUnfoldProgress >= 1) && (t.isInitialAnimation = !1);
4178
+ E < r.lastAnimationProgress && (r.isPathlineInitialAnimation = !1, (!r.enableSubMesh || r.subMeshUnfoldProgress >= 1) && (r.isInitialAnimation = !1));
4173
4179
  } else
4174
- t.enableSubMesh && (t.subMeshMaterial.uniforms.unfoldProgress.value = 1);
4175
- if (t.lastAnimationProgress = P, t.lastUpdateTime = a, t.isInitialAnimation && t.lines.forEach(function(R) {
4176
- R.material.uniforms.time.value = a, R.material.uniforms.animationProgress.value = P;
4177
- }), t.isInitialAnimation) {
4178
- var x = null, C = 1 / 0;
4179
- if (t.lines.forEach(function(R) {
4180
- for (var W = R.geometry, Z = W.attributes.instanceDistanceStart, X = W.attributes.instanceDistanceEnd, oe = Z.count, H = 0; H < oe; H++) {
4181
- var q = Z.getX(H) / R.material.uniforms.totalLength.value, I = X.getX(H) / R.material.uniforms.totalLength.value;
4182
- if (P >= q && P <= I) {
4183
- var F = (P - q) / (I - q), L = new v.Vector3().fromBufferAttribute(W.attributes.instanceStart, H), D = new v.Vector3().fromBufferAttribute(W.attributes.instanceEnd, H), G = new v.Vector3().lerpVectors(L, D, F), re = Math.abs(P - (q + I) / 2);
4184
- re < C && (C = re, x = G);
4180
+ r.enableSubMesh && (r.subMeshMaterial.uniforms.unfoldProgress.value = 1);
4181
+ if (r.lastAnimationProgress = E, r.lastUpdateTime = s, r.isPathlineInitialAnimation && r.lines.forEach(function(X) {
4182
+ X.material.uniforms.time.value = s, X.material.uniforms.animationProgress.value = E;
4183
+ }), r.isPathlineInitialAnimation) {
4184
+ var w = null, b = 1 / 0;
4185
+ if (r.lines.forEach(function(X) {
4186
+ for (var $ = X.geometry, ae = $.attributes.instanceDistanceStart, z = $.attributes.instanceDistanceEnd, q = ae.count, I = 0; I < q; I++) {
4187
+ var L = ae.getX(I) / X.material.uniforms.totalLength.value, F = z.getX(I) / X.material.uniforms.totalLength.value;
4188
+ if (E >= L && E <= F) {
4189
+ var N = (E - L) / (F - L), j = new p.Vector3().fromBufferAttribute($.attributes.instanceStart, I), ne = new p.Vector3().fromBufferAttribute($.attributes.instanceEnd, I), K = new p.Vector3().lerpVectors(j, ne, N), U = Math.abs(E - (L + F) / 2);
4190
+ U < b && (b = U, w = K);
4185
4191
  }
4186
4192
  }
4187
- }), x)
4188
- for (var b = 0; b < h; b++) {
4189
- var y = t.particleInfos[b];
4190
- !y.active && Math.random() < 0.05 && (y.active = !0, y.age = 0, y.life = 3 + Math.random() * 2, y.velocity.set((Math.random() - 0.5) * 1e-4, (Math.random() - 0.5) * 1e-4, (Math.random() - 0.5) * 1e-4), t.particlePositions[b * 3] = x.x, t.particlePositions[b * 3 + 1] = x.y, t.particlePositions[b * 3 + 2] = x.z, y.startPos.copy(x), y.alpha = 0);
4193
+ }), w)
4194
+ for (var M = 0; M < d; M++) {
4195
+ var c = r.particleInfos[M];
4196
+ !c.active && Math.random() < 0.05 && (c.active = !0, c.age = 0, c.life = 3 + Math.random() * 2, c.velocity.set((Math.random() - 0.5) * 1e-4, (Math.random() - 0.5) * 1e-4, (Math.random() - 0.5) * 1e-4), r.particlePositions[M * 3] = w.x, r.particlePositions[M * 3 + 1] = w.y, r.particlePositions[M * 3 + 2] = w.z, c.startPos.copy(w), c.alpha = 0);
4191
4197
  }
4192
- for (var b = 0; b < h; b++) {
4193
- var y = t.particleInfos[b];
4194
- if (y.active) {
4195
- y.age += 0.016;
4196
- var A = t.particlePositions[b * 3] - y.startPos.x, m = t.particlePositions[b * 3 + 1] - y.startPos.y, _ = t.particlePositions[b * 3 + 2] - y.startPos.z, S = Math.sqrt(A * A + m * m + _ * _);
4197
- (S >= c || y.age >= y.life) && (y.active = !1, t.particlePositions[b * 3] = 9999, t.particlePositions[b * 3 + 1] = 9999, t.particlePositions[b * 3 + 2] = 9999, y.alpha = 0), y.velocity.x += (Math.random() - 0.5) * 1e-4, y.velocity.z += (Math.random() - 0.5) * 1e-4, y.velocity.y += 1e-4, y.velocity.multiplyScalar(0.99), t.particlePositions[b * 3] += y.velocity.x, t.particlePositions[b * 3 + 1] += y.velocity.y, t.particlePositions[b * 3 + 2] += y.velocity.z;
4198
- var U = y.age / y.life;
4199
- U < 0.2 ? y.alpha = U / 0.2 : U > 0.8 ? y.alpha = (1 - U) / 0.2 : y.alpha = 1;
4198
+ for (var M = 0; M < d; M++) {
4199
+ var c = r.particleInfos[M];
4200
+ if (c.active) {
4201
+ c.age += 0.016;
4202
+ var O = r.particlePositions[M * 3] - c.startPos.x, S = r.particlePositions[M * 3 + 1] - c.startPos.y, D = r.particlePositions[M * 3 + 2] - c.startPos.z, W = Math.sqrt(O * O + S * S + D * D);
4203
+ (W >= f || c.age >= c.life) && (c.active = !1, r.particlePositions[M * 3] = 9999, r.particlePositions[M * 3 + 1] = 9999, r.particlePositions[M * 3 + 2] = 9999, c.alpha = 0), c.velocity.x += (Math.random() - 0.5) * 1e-4, c.velocity.z += (Math.random() - 0.5) * 1e-4, c.velocity.y += 1e-4, c.velocity.multiplyScalar(0.99), r.particlePositions[M * 3] += c.velocity.x, r.particlePositions[M * 3 + 1] += c.velocity.y, r.particlePositions[M * 3 + 2] += c.velocity.z;
4204
+ var H = c.age / c.life;
4205
+ H < 0.2 ? c.alpha = H / 0.2 : H > 0.8 ? c.alpha = (1 - H) / 0.2 : c.alpha = 1;
4200
4206
  }
4201
4207
  }
4202
- t.particleGeometry.attributes.position.needsUpdate = !0, t.particleMaterial.opacity = 0.6;
4208
+ r.particleGeometry.attributes.position.needsUpdate = !0, r.particleMaterial.opacity = 0.6;
4203
4209
  }
4204
- t.enableSubMesh && (t.subMeshMaterial.uniforms.animationProgress.value = P), this.five.needsRender = !0;
4210
+ r.enableSubMesh && (r.subMeshMaterial.uniforms.animationProgress.value = E), this.five.needsRender = !0;
4205
4211
  }
4206
- }, o.prototype.startPathAnimation = function(e) {
4207
- var n = this, t = this.paths.get(e);
4208
- if (!t)
4212
+ }, o.prototype.startPathAnimation = function(e, n) {
4213
+ var t = this;
4214
+ n === void 0 && (n = 0);
4215
+ var r = this.paths.get(e);
4216
+ if (!r)
4209
4217
  return console.warn("DynamicPathLinePlugin: 路径 ".concat(e, " 不存在")), !1;
4210
- if (t.animationId !== null)
4218
+ if (r.animationId !== null)
4211
4219
  return !1;
4212
- var a = performance.now() / 1e3;
4213
- return t.cycleStartTime = a, t.lastUpdateTime = a, t.animationId = ct.shared.add(function() {
4214
- n.updatePathAnimation(e);
4220
+ var s = 0;
4221
+ if (n > 0) {
4222
+ var l = r.config.points;
4223
+ n >= l.length && (console.warn("DynamicPathLinePlugin: startPointIndex ".concat(n, " 超出范围,路径只有 ").concat(l.length, " 个点")), n = l.length - 1);
4224
+ for (var d = 0; d < n; d++)
4225
+ s += l[d].distanceTo(l[d + 1]);
4226
+ }
4227
+ r.startOffset = s, r.lines.forEach(function(m) {
4228
+ m.material.uniforms.startOffset.value = s;
4229
+ }), r.enableSubMesh && (r.subMeshMaterial.uniforms.startOffset.value = s);
4230
+ var f = performance.now() / 1e3;
4231
+ return r.cycleStartTime = f, r.lastUpdateTime = f, r.animationId = ct.shared.add(function() {
4232
+ t.updatePathAnimation(e);
4215
4233
  }), !0;
4216
4234
  }, o.prototype.stopPathAnimation = function(e) {
4217
4235
  var n = this.paths.get(e);
@@ -4234,17 +4252,17 @@ var Qn = (
4234
4252
  }
4235
4253
  }, o.prototype.show = function(e) {
4236
4254
  var n, t = (n = e == null ? void 0 : e.userAction) !== null && n !== void 0 ? n : !0;
4237
- this.paths.forEach(function(a) {
4238
- a.lines.forEach(function(s) {
4255
+ this.paths.forEach(function(r) {
4256
+ r.lines.forEach(function(s) {
4239
4257
  return s.visible = !0;
4240
- }), a.particles.visible = !0, a.subMesh.visible = !0;
4258
+ }), r.particles.visible = !0, r.subMesh.visible = !0;
4241
4259
  }), this.updateState({ visible: !0 }, t);
4242
4260
  }, o.prototype.hide = function(e) {
4243
4261
  var n, t = (n = e == null ? void 0 : e.userAction) !== null && n !== void 0 ? n : !0;
4244
- this.paths.forEach(function(a) {
4245
- a.lines.forEach(function(s) {
4262
+ this.paths.forEach(function(r) {
4263
+ r.lines.forEach(function(s) {
4246
4264
  return s.visible = !1;
4247
- }), a.particles.visible = !1, a.subMesh.visible = !1;
4265
+ }), r.particles.visible = !1, r.subMesh.visible = !1;
4248
4266
  }), this.updateState({ visible: !1 }, t);
4249
4267
  }, o.prototype.setState = function(e, n) {
4250
4268
  var t;
@@ -4264,27 +4282,27 @@ var Qn = (
4264
4282
  this.paths.forEach(function(n, t) {
4265
4283
  e.stopPathAnimation(t);
4266
4284
  }), this.paths.forEach(function(n) {
4267
- n.isInitialAnimation = !0, n.subMeshUnfoldProgress = 0, n.subMeshUnfoldStarted = !1, n.lastAnimationProgress = 0, n.cycleStartTime = performance.now() / 1e3, n.lastUpdateTime = performance.now() / 1e3, n.startOffset = 0, n.endOffset = 0, n.lines.forEach(function(l) {
4285
+ n.isInitialAnimation = !0, n.isPathlineInitialAnimation = !0, n.subMeshUnfoldProgress = 0, n.subMeshUnfoldStarted = !1, n.subMeshUnfoldStartTime = 0, n.lastAnimationProgress = 0, n.cycleStartTime = performance.now() / 1e3, n.lastUpdateTime = performance.now() / 1e3, n.startOffset = 0, n.endOffset = 0, n.lines.forEach(function(l) {
4268
4286
  l.visible = !0, l.material.uniforms.time.value = 0, l.material.uniforms.animationProgress.value = 0, l.material.uniforms.startOffset.value = 0, l.material.uniforms.endOffset.value = 0;
4269
4287
  }), n.particles.visible = !0;
4270
- for (var t = e._config.particleCount, a = 0; a < t; a++) {
4271
- var s = n.particleInfos[a];
4272
- s.active = !1, s.age = 0, s.alpha = 0, n.particlePositions[a * 3] = 9999, n.particlePositions[a * 3 + 1] = 9999, n.particlePositions[a * 3 + 2] = 9999;
4288
+ for (var t = e._config.particleCount, r = 0; r < t; r++) {
4289
+ var s = n.particleInfos[r];
4290
+ s.active = !1, s.age = 0, s.alpha = 0, n.particlePositions[r * 3] = 9999, n.particlePositions[r * 3 + 1] = 9999, n.particlePositions[r * 3 + 2] = 9999;
4273
4291
  }
4274
4292
  n.particleGeometry.attributes.position.needsUpdate = !0, n.subMeshMaterial && (n.subMeshMaterial.uniforms.unfoldProgress.value = 0, n.subMeshMaterial.uniforms.animationProgress.value = 0, n.subMeshMaterial.uniforms.startOffset.value = 0, n.subMeshMaterial.uniforms.endOffset.value = 0);
4275
4293
  });
4276
4294
  }, o.prototype.updateScreenProjection = function(e) {
4277
4295
  var n = this, t = function(s) {
4278
- var l = n.projectPointsToScreen(s.config.points, n.five.camera), h = n.findNearestOffscreenPoint(l);
4279
- h && (s.startOffset = h.distance);
4280
- var c = n.findFarestOffscreenPoint(l);
4281
- c && (s.endOffset = c.totalLength - c.distance), s.lines.forEach(function(g) {
4282
- g.material.uniforms.startOffset.value = s.startOffset, g.material.uniforms.endOffset.value = s.endOffset;
4296
+ var l = n.projectPointsToScreen(s.config.points, n.five.camera), d = n.findNearestOffscreenPoint(l);
4297
+ d && (s.startOffset = d.distance);
4298
+ var f = n.findFarestOffscreenPoint(l);
4299
+ f && (s.endOffset = f.totalLength - f.distance), s.lines.forEach(function(m) {
4300
+ m.material.uniforms.startOffset.value = s.startOffset, m.material.uniforms.endOffset.value = s.endOffset;
4283
4301
  }), s.subMeshMaterial.uniforms.startOffset.value = s.startOffset, s.subMeshMaterial.uniforms.endOffset.value = s.endOffset, s.cycleStartTime = performance.now() / 1e3, s.lastAnimationProgress = 0;
4284
4302
  };
4285
4303
  if (e) {
4286
- var a = this.paths.get(e);
4287
- a && t(a);
4304
+ var r = this.paths.get(e);
4305
+ r && t(r);
4288
4306
  } else
4289
4307
  this.paths.forEach(function(s) {
4290
4308
  s.enabled && t(s);
@@ -4298,8 +4316,8 @@ var Qn = (
4298
4316
  this.pause(), this.clearAllPaths(), this.hooks.emit("dispose");
4299
4317
  }, o;
4300
4318
  })(Ot.Controller)
4301
- ), or = function(f, o) {
4302
- return new Qn(f, o);
4319
+ ), or = function(h, o) {
4320
+ return new Qn(h, o);
4303
4321
  };
4304
4322
  export {
4305
4323
  rr as BackgroundPlugin,