@tomorrowevening/hermes 0.0.57 → 0.0.58

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.
package/dist/hermes.es.js CHANGED
@@ -1,31 +1,31 @@
1
- import { EventDispatcher as dn, Texture as hn, CubeTexture as Vn, RepeatWrapping as Yt, Color as Ft, FrontSide as Yn, BackSide as fn, DoubleSide as mn, NoBlending as Gn, NormalBlending as Wn, AdditiveBlending as qn, SubtractiveBlending as Kn, MultiplyBlending as Xn, CustomBlending as Zn, AddEquation as Jn, SubtractEquation as Qn, ReverseSubtractEquation as ea, MinEquation as ta, MaxEquation as na, ZeroFactor as pn, OneFactor as gn, SrcColorFactor as vn, OneMinusSrcColorFactor as bn, SrcAlphaFactor as yn, OneMinusSrcAlphaFactor as xn, DstAlphaFactor as En, OneMinusDstAlphaFactor as Cn, DstColorFactor as Sn, OneMinusDstColorFactor as wn, SrcAlphaSaturateFactor as aa, ConstantColorFactor as Mn, OneMinusConstantColorFactor as On, ConstantAlphaFactor as Tn, OneMinusConstantAlphaFactor as _n, Matrix4 as ia, Vector3 as Y, Euler as ra, Line as sa, BufferGeometry as Gt, Float32BufferAttribute as Wt, LineBasicMaterial as oa, Mesh as Rn, MeshBasicMaterial as An, Ray as ca, Plane as la, MathUtils as ua, MOUSE as tt, TOUCH as nt, Quaternion as qt, Spherical as Kt, Vector2 as me, ShaderMaterial as Pn, GLSL3 as da, PlaneGeometry as ha, Scene as fa, Group as ma, AxesHelper as Xt, MeshDepthMaterial as pa, MeshNormalMaterial as ga, WebGLRenderer as va, PerspectiveCamera as kt, Raycaster as ba, OrthographicCamera as Zt, CameraHelper as ya, SpotLightHelper as xa, PointLightHelper as Ea, HemisphereLightHelper as Ca, DirectionalLightHelper as Sa } from "three";
1
+ import { EventDispatcher as dn, Texture as hn, CubeTexture as Hn, RepeatWrapping as Ht, Color as Lt, FrontSide as Yn, BackSide as fn, DoubleSide as mn, NoBlending as Gn, NormalBlending as Wn, AdditiveBlending as qn, SubtractiveBlending as Kn, MultiplyBlending as Xn, CustomBlending as Zn, AddEquation as Jn, SubtractEquation as Qn, ReverseSubtractEquation as ea, MinEquation as ta, MaxEquation as na, ZeroFactor as pn, OneFactor as gn, SrcColorFactor as vn, OneMinusSrcColorFactor as bn, SrcAlphaFactor as yn, OneMinusSrcAlphaFactor as xn, DstAlphaFactor as En, OneMinusDstAlphaFactor as Cn, DstColorFactor as Sn, OneMinusDstColorFactor as wn, SrcAlphaSaturateFactor as aa, ConstantColorFactor as Mn, OneMinusConstantColorFactor as On, ConstantAlphaFactor as _n, OneMinusConstantAlphaFactor as Tn, Matrix4 as ia, Vector3 as Y, Euler as ra, Line as sa, BufferGeometry as Yt, Float32BufferAttribute as Gt, LineBasicMaterial as oa, Mesh as Rn, MeshBasicMaterial as An, Ray as ca, Plane as la, MathUtils as ua, MOUSE as nt, TOUCH as at, Quaternion as Wt, Spherical as qt, Vector2 as fe, ShaderMaterial as kn, GLSL3 as da, PlaneGeometry as ha, Scene as fa, Group as ma, AxesHelper as Kt, MeshDepthMaterial as pa, MeshNormalMaterial as ga, WebGLRenderer as va, PerspectiveCamera as kt, Raycaster as ba, OrthographicCamera as Xt, CameraHelper as ya, SpotLightHelper as xa, PointLightHelper as Ea, HemisphereLightHelper as Ca, DirectionalLightHelper as Sa } from "three";
2
2
  import { Pane as wa } from "tweakpane";
3
3
  import * as Ma from "@tweakpane/plugin-essentials";
4
- import kn, { useState as q, useEffect as ke, useRef as Z, useMemo as le, forwardRef as Oa } from "react";
4
+ import Pn, { useState as K, useEffect as Pe, useRef as X, useMemo as ie, forwardRef as Oa } from "react";
5
5
  import { Reorder as jn } from "framer-motion";
6
- const Bt = () => {
7
- }, ki = () => {
6
+ const Ft = () => {
7
+ }, Ri = () => {
8
8
  };
9
- function Ot(e) {
9
+ function Mt(e) {
10
10
  return e.substring(0, 1).toUpperCase() + e.substring(1);
11
11
  }
12
12
  function Ke(e, n, a) {
13
13
  return Math.min(n, Math.max(e, a));
14
14
  }
15
- function Jt(e, n, a) {
15
+ function Zt(e, n, a) {
16
16
  return (a - e) / (n - e);
17
17
  }
18
- function Qt(e, n, a) {
18
+ function Jt(e, n, a) {
19
19
  return e * (1 - a) + n * a;
20
20
  }
21
- function ji(e, n) {
21
+ function Ai(e, n) {
22
22
  const a = e - n;
23
23
  return Math.sqrt(a * a);
24
24
  }
25
- function Ta() {
25
+ function _a() {
26
26
  return Math.round(Math.random() * 1e6).toString();
27
27
  }
28
- function _a(e) {
28
+ function Ta(e) {
29
29
  return e.r !== void 0 && e.g !== void 0 && e.b !== void 0;
30
30
  }
31
31
  function Ra(e) {
@@ -35,22 +35,22 @@ function Ra(e) {
35
35
  }, o = i(n), u = i(a), c = i(t);
36
36
  return "#" + o + u + c;
37
37
  }
38
- function mt(e, n = 1) {
38
+ function Qt(e, n = 1) {
39
39
  return Number(e.toFixed(n));
40
40
  }
41
- let Nt = 0;
41
+ let Dt = 0;
42
42
  const Aa = () => {
43
- Nt = 0;
43
+ Dt = 0;
44
44
  }, Dn = (e) => {
45
45
  if (!e)
46
46
  return;
47
47
  let n = e.name.replace(" ", "");
48
- n.length === 0 && (n = `obj_${Nt}`, Nt++), e.parent !== null && e.parent.uuid.length > 0 && (n = `${e.parent.uuid}.${n}`), e.uuid = n, e.children.forEach((a) => {
48
+ n.length === 0 && (n = `obj_${Dt}`, Dt++), e.parent !== null && e.parent.uuid.length > 0 && (n = `${e.parent.uuid}.${n}`), e.uuid = n, e.children.forEach((a) => {
49
49
  Dn(a);
50
50
  });
51
- }, Di = (e) => {
51
+ }, ki = (e) => {
52
52
  e?.dispose();
53
- }, Pa = (e) => {
53
+ }, ka = (e) => {
54
54
  e && (Array.isArray(e) ? e.forEach((n) => n.dispose()) : e.dispose());
55
55
  }, In = (e) => {
56
56
  if (e) {
@@ -60,12 +60,12 @@ const Aa = () => {
60
60
  }
61
61
  if (e.parent && e.parent.remove(e), e.isMesh) {
62
62
  const n = e;
63
- n.geometry?.dispose(), Pa(n.material);
63
+ n.geometry?.dispose(), ka(n.material);
64
64
  }
65
65
  e.dispose !== void 0 && e.dispose();
66
66
  }
67
67
  };
68
- class Ii {
68
+ class Pi {
69
69
  components = /* @__PURE__ */ new Map();
70
70
  listen;
71
71
  // Protected
@@ -139,7 +139,7 @@ const N = new dn(), L = {
139
139
  ADD_CAMERA: "ToolEvents::addCamera",
140
140
  REMOVE_CAMERA: "ToolEvents::removeCamera"
141
141
  };
142
- class Tt {
142
+ class Ot {
143
143
  app;
144
144
  constructor(n) {
145
145
  this.app = n;
@@ -151,7 +151,7 @@ class Tt {
151
151
  handleEditor(n, a, t) {
152
152
  }
153
153
  }
154
- class Ni extends Tt {
154
+ class ji extends Ot {
155
155
  selectDropdown(n, a) {
156
156
  this.app.send({
157
157
  event: "selectComponent",
@@ -183,7 +183,7 @@ class Ni extends Tt {
183
183
  }
184
184
  }
185
185
  }
186
- class Ut extends Tt {
186
+ class Bt extends Ot {
187
187
  project;
188
188
  sheets = /* @__PURE__ */ new Map();
189
189
  sheetObjects = /* @__PURE__ */ new Map();
@@ -237,12 +237,12 @@ class Ut extends Tt {
237
237
  return;
238
238
  const u = `${n}_${a}`;
239
239
  let c = this.sheetObjects.get(u);
240
- c !== void 0 ? c = o.object(a, { ...t, ...c.value }, { reconfigure: !0 }) : c = o.object(a, t), this.sheetObjects.set(u, c), this.sheetObjectCBs.set(u, i !== void 0 ? i : Bt);
240
+ c !== void 0 ? c = o.object(a, { ...t, ...c.value }, { reconfigure: !0 }) : c = o.object(a, t), this.sheetObjects.set(u, c), this.sheetObjectCBs.set(u, i !== void 0 ? i : Ft);
241
241
  const h = c.onValuesChange((d) => {
242
242
  if (this.app.editor) {
243
- for (const g in d) {
244
- const x = d[g];
245
- typeof x == "object" && _a(x) && (d[g] = {
243
+ for (const m in d) {
244
+ const x = d[m];
245
+ typeof x == "object" && Ta(x) && (d[m] = {
246
246
  r: x.r,
247
247
  g: x.g,
248
248
  b: x.b,
@@ -329,7 +329,7 @@ class Ut extends Tt {
329
329
  });
330
330
  let t = -1;
331
331
  const i = () => {
332
- if (Ut.rafDriver?.tick(performance.now()), a.activeSheet !== void 0 && t !== a.activeSheet.sequence.position) {
332
+ if (Bt.rafDriver?.tick(performance.now()), a.activeSheet !== void 0 && t !== a.activeSheet.sequence.position) {
333
333
  t = a.activeSheet.sequence.position;
334
334
  const u = a.activeSheet;
335
335
  n.send({
@@ -349,7 +349,7 @@ class Ut extends Tt {
349
349
  this.studio?.ui.hide();
350
350
  }
351
351
  }
352
- function Li(e, n, a) {
352
+ function Di(e, n, a) {
353
353
  if (e.editor) {
354
354
  a.ui.restore(), a.onSelectionChange((u) => {
355
355
  u.length < 1 || u.forEach((c) => {
@@ -373,7 +373,7 @@ function Li(e, n, a) {
373
373
  });
374
374
  let t = -1;
375
375
  const i = () => {
376
- if (Ut.rafDriver?.tick(performance.now()), n.activeSheet !== void 0 && t !== n.activeSheet.sequence.position) {
376
+ if (Bt.rafDriver?.tick(performance.now()), n.activeSheet !== void 0 && t !== n.activeSheet.sequence.position) {
377
377
  t = n.activeSheet.sequence.position;
378
378
  const u = n.activeSheet;
379
379
  e.send({
@@ -392,7 +392,7 @@ function Li(e, n, a) {
392
392
  } else
393
393
  a.ui.hide();
394
394
  }
395
- function ka(e) {
395
+ function Pa(e) {
396
396
  if (e.name === "cameras")
397
397
  return "camera";
398
398
  if (e.name === "interactive")
@@ -437,7 +437,7 @@ function Da(e) {
437
437
  }
438
438
  return !1;
439
439
  }
440
- function at(e) {
440
+ function it(e) {
441
441
  const n = {};
442
442
  for (const a in e) {
443
443
  if (a.substring(0, 1) === "_" || a.substring(0, 2) === "is" || Da(a))
@@ -456,7 +456,7 @@ function at(e) {
456
456
  const o = i.source.toJSON();
457
457
  n[a] = { src: o.url };
458
458
  } else
459
- i instanceof Vn && (console.log("env map"), console.log(i.source.data), console.log(i.source.toJSON()), n[a] = { src: "" });
459
+ i instanceof Hn && (console.log("env map"), console.log(i.source.data), console.log(i.source.toJSON()), n[a] = { src: "" });
460
460
  else
461
461
  a === "uniforms" && (n[a] = ja(n[a]));
462
462
  else
@@ -466,7 +466,7 @@ function at(e) {
466
466
  }
467
467
  return n;
468
468
  }
469
- function jt(e) {
469
+ function Pt(e) {
470
470
  e.updateMatrix();
471
471
  const n = {
472
472
  name: e.name,
@@ -493,28 +493,28 @@ function jt(e) {
493
493
  if (Array.isArray(t.material)) {
494
494
  const i = [];
495
495
  t.material.forEach((o) => {
496
- i.push(at(o));
496
+ i.push(it(o));
497
497
  }), n.material = i;
498
498
  } else
499
- n.material = at(t.material);
499
+ n.material = it(t.material);
500
500
  } else if (a.search("points") > -1) {
501
501
  const t = e;
502
502
  if (Array.isArray(t.material)) {
503
503
  const i = [];
504
504
  t.material.forEach((o) => {
505
- i.push(at(o));
505
+ i.push(it(o));
506
506
  }), n.material = i;
507
507
  } else
508
- n.material = at(t.material);
508
+ n.material = it(t.material);
509
509
  } else if (a.search("line") > -1) {
510
510
  const t = e;
511
511
  if (Array.isArray(t.material)) {
512
512
  const i = [];
513
513
  t.material.forEach((o) => {
514
- i.push(at(o));
514
+ i.push(it(o));
515
515
  }), n.material = i;
516
516
  } else
517
- n.material = at(t.material);
517
+ n.material = it(t.material);
518
518
  } else
519
519
  a.search("camera") > -1 ? e.type === "PerspectiveCamera" ? n.perspectiveCameraInfo = {
520
520
  fov: e.fov,
@@ -563,24 +563,50 @@ function Ia(e, n) {
563
563
  return e[a[0]][a[1]][a[2]][a[3]][a[4]][a[5]];
564
564
  }
565
565
  }
566
+ function Na(e, n) {
567
+ for (const a in n)
568
+ e[a] = n[a];
569
+ }
566
570
  function Q(e, n, a) {
567
- const t = n.split(".");
568
- switch (t.length) {
569
- case 1:
570
- e[t[0]] = a;
571
- break;
572
- case 2:
573
- e[t[0]][t[1]] = a;
574
- break;
575
- case 3:
576
- e[t[0]][t[1]][t[2]] = a;
577
- break;
578
- case 4:
579
- e[t[0]][t[1]][t[2]][t[3]] = a;
580
- break;
581
- case 5:
582
- e[t[0]][t[1]][t[2]][t[3]][t[4]] = a;
583
- break;
571
+ const t = n.split("."), i = t.length;
572
+ if (typeof a != "object")
573
+ switch (i) {
574
+ case 1:
575
+ e[t[0]] = a;
576
+ break;
577
+ case 2:
578
+ e[t[0]][t[1]] = a;
579
+ break;
580
+ case 3:
581
+ e[t[0]][t[1]][t[2]] = a;
582
+ break;
583
+ case 4:
584
+ e[t[0]][t[1]][t[2]][t[3]] = a;
585
+ break;
586
+ case 5:
587
+ e[t[0]][t[1]][t[2]][t[3]][t[4]] = a;
588
+ break;
589
+ }
590
+ else {
591
+ let u;
592
+ switch (i) {
593
+ case 1:
594
+ u = e[t[0]];
595
+ break;
596
+ case 2:
597
+ u = e[t[0]][t[1]];
598
+ break;
599
+ case 3:
600
+ u = e[t[0]][t[1]][t[2]];
601
+ break;
602
+ case 4:
603
+ u = e[t[0]][t[1]][t[2]][t[3]];
604
+ break;
605
+ case 5:
606
+ u = e[t[0]][t[1]][t[2]][t[3]][t[4]];
607
+ break;
608
+ }
609
+ u !== void 0 && Na(u, a);
584
610
  }
585
611
  }
586
612
  function Ln(e) {
@@ -588,11 +614,11 @@ function Ln(e) {
588
614
  const t = new Image();
589
615
  t.onload = () => {
590
616
  const i = new hn(t);
591
- i.wrapS = Yt, i.wrapT = Yt, i.needsUpdate = !0, n(i);
617
+ i.wrapS = Ht, i.wrapT = Ht, i.needsUpdate = !0, n(i);
592
618
  }, t.onerror = a, t.src = e;
593
619
  });
594
620
  }
595
- class Fi extends Tt {
621
+ class Ii extends Ot {
596
622
  scene = void 0;
597
623
  renderer = void 0;
598
624
  getObject(n) {
@@ -603,7 +629,7 @@ class Fi extends Tt {
603
629
  });
604
630
  }
605
631
  setObject(n) {
606
- const a = jt(n);
632
+ const a = Pt(n);
607
633
  this.app.send({
608
634
  event: "setObject",
609
635
  target: "editor",
@@ -658,7 +684,7 @@ class Fi extends Tt {
658
684
  addCamera(n) {
659
685
  if (!this.app.debugEnabled)
660
686
  return;
661
- const a = jt(n);
687
+ const a = Pt(n);
662
688
  this.app.send({
663
689
  event: "addCamera",
664
690
  target: "editor",
@@ -668,7 +694,7 @@ class Fi extends Tt {
668
694
  removeCamera(n) {
669
695
  if (!this.app.debugEnabled)
670
696
  return;
671
- const a = jt(n);
697
+ const a = Pt(n);
672
698
  this.app.send({
673
699
  event: "removeCamera",
674
700
  target: "editor",
@@ -727,7 +753,7 @@ class Fi extends Tt {
727
753
  return this.renderer !== void 0 ? this.renderer?.domElement : null;
728
754
  }
729
755
  }
730
- class Bi extends Tt {
756
+ class Ni extends Ot {
731
757
  bindCBs;
732
758
  buttonCBs;
733
759
  pane = void 0;
@@ -764,7 +790,7 @@ class Bi extends Tt {
764
790
  }
765
791
  // Binding
766
792
  bind(n, a, t, i = void 0) {
767
- const o = this.bindID, u = t.onChange !== void 0 ? t.onChange : Bt;
793
+ const o = this.bindID, u = t.onChange !== void 0 ? t.onChange : Ft;
768
794
  this.bindCBs.set(o, u), this.app.editor ? (this.pane === void 0 && this.createGUI(), (i !== void 0 ? i : this.pane).addBinding(n, a, t).on("change", (h) => {
769
795
  this.app.send({
770
796
  event: "updateBind",
@@ -845,7 +871,7 @@ class Bi extends Tt {
845
871
  }
846
872
  }
847
873
  }
848
- var Lt = { exports: {} }, lt = {};
874
+ var It = { exports: {} }, lt = {};
849
875
  /**
850
876
  * @license React
851
877
  * react-jsx-runtime.production.min.js
@@ -856,20 +882,20 @@ var Lt = { exports: {} }, lt = {};
856
882
  * LICENSE file in the root directory of this source tree.
857
883
  */
858
884
  var en;
859
- function Na() {
885
+ function La() {
860
886
  if (en)
861
887
  return lt;
862
888
  en = 1;
863
- var e = kn, n = Symbol.for("react.element"), a = Symbol.for("react.fragment"), t = Object.prototype.hasOwnProperty, i = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, o = { key: !0, ref: !0, __self: !0, __source: !0 };
889
+ var e = Pn, n = Symbol.for("react.element"), a = Symbol.for("react.fragment"), t = Object.prototype.hasOwnProperty, i = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, o = { key: !0, ref: !0, __self: !0, __source: !0 };
864
890
  function u(c, h, d) {
865
- var f, g = {}, x = null, T = null;
866
- d !== void 0 && (x = "" + d), h.key !== void 0 && (x = "" + h.key), h.ref !== void 0 && (T = h.ref);
891
+ var f, m = {}, x = null, O = null;
892
+ d !== void 0 && (x = "" + d), h.key !== void 0 && (x = "" + h.key), h.ref !== void 0 && (O = h.ref);
867
893
  for (f in h)
868
- t.call(h, f) && !o.hasOwnProperty(f) && (g[f] = h[f]);
894
+ t.call(h, f) && !o.hasOwnProperty(f) && (m[f] = h[f]);
869
895
  if (c && c.defaultProps)
870
896
  for (f in h = c.defaultProps, h)
871
- g[f] === void 0 && (g[f] = h[f]);
872
- return { $$typeof: n, type: c, key: x, ref: T, props: g, _owner: i.current };
897
+ m[f] === void 0 && (m[f] = h[f]);
898
+ return { $$typeof: n, type: c, key: x, ref: O, props: m, _owner: i.current };
873
899
  }
874
900
  return lt.Fragment = a, lt.jsx = u, lt.jsxs = u, lt;
875
901
  }
@@ -884,53 +910,53 @@ var ut = {};
884
910
  * LICENSE file in the root directory of this source tree.
885
911
  */
886
912
  var tn;
887
- function La() {
913
+ function Fa() {
888
914
  return tn || (tn = 1, process.env.NODE_ENV !== "production" && function() {
889
- var e = kn, n = Symbol.for("react.element"), a = Symbol.for("react.portal"), t = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), o = Symbol.for("react.profiler"), u = Symbol.for("react.provider"), c = Symbol.for("react.context"), h = Symbol.for("react.forward_ref"), d = Symbol.for("react.suspense"), f = Symbol.for("react.suspense_list"), g = Symbol.for("react.memo"), x = Symbol.for("react.lazy"), T = Symbol.for("react.offscreen"), V = Symbol.iterator, ee = "@@iterator";
890
- function pe(r) {
915
+ var e = Pn, n = Symbol.for("react.element"), a = Symbol.for("react.portal"), t = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), o = Symbol.for("react.profiler"), u = Symbol.for("react.provider"), c = Symbol.for("react.context"), h = Symbol.for("react.forward_ref"), d = Symbol.for("react.suspense"), f = Symbol.for("react.suspense_list"), m = Symbol.for("react.memo"), x = Symbol.for("react.lazy"), O = Symbol.for("react.offscreen"), H = Symbol.iterator, te = "@@iterator";
916
+ function me(r) {
891
917
  if (r === null || typeof r != "object")
892
918
  return null;
893
- var m = V && r[V] || r[ee];
894
- return typeof m == "function" ? m : null;
919
+ var p = H && r[H] || r[te];
920
+ return typeof p == "function" ? p : null;
895
921
  }
896
922
  var re = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
897
923
  function $(r) {
898
924
  {
899
- for (var m = arguments.length, b = new Array(m > 1 ? m - 1 : 0), E = 1; E < m; E++)
900
- b[E - 1] = arguments[E];
901
- j("error", r, b);
925
+ for (var p = arguments.length, b = new Array(p > 1 ? p - 1 : 0), C = 1; C < p; C++)
926
+ b[C - 1] = arguments[C];
927
+ D("error", r, b);
902
928
  }
903
929
  }
904
- function j(r, m, b) {
930
+ function D(r, p, b) {
905
931
  {
906
- var E = re.ReactDebugCurrentFrame, F = E.getStackAddendum();
907
- F !== "" && (m += "%s", b = b.concat([F]));
908
- var U = b.map(function(A) {
909
- return String(A);
932
+ var C = re.ReactDebugCurrentFrame, F = C.getStackAddendum();
933
+ F !== "" && (p += "%s", b = b.concat([F]));
934
+ var U = b.map(function(P) {
935
+ return String(P);
910
936
  });
911
- U.unshift("Warning: " + m), Function.prototype.apply.call(console[r], console, U);
937
+ U.unshift("Warning: " + p), Function.prototype.apply.call(console[r], console, U);
912
938
  }
913
939
  }
914
- var K = !1, te = !1, Se = !1, z = !1, ge = !1, ue;
915
- ue = Symbol.for("react.module.reference");
916
- function Te(r) {
917
- return !!(typeof r == "string" || typeof r == "function" || r === t || r === o || ge || r === i || r === d || r === f || z || r === T || K || te || Se || typeof r == "object" && r !== null && (r.$$typeof === x || r.$$typeof === g || r.$$typeof === u || r.$$typeof === c || r.$$typeof === h || // This needs to include all possible module reference object
940
+ var Z = !1, ne = !1, Se = !1, V = !1, pe = !1, le;
941
+ le = Symbol.for("react.module.reference");
942
+ function _e(r) {
943
+ return !!(typeof r == "string" || typeof r == "function" || r === t || r === o || pe || r === i || r === d || r === f || V || r === O || Z || ne || Se || typeof r == "object" && r !== null && (r.$$typeof === x || r.$$typeof === m || r.$$typeof === u || r.$$typeof === c || r.$$typeof === h || // This needs to include all possible module reference object
918
944
  // types supported by any Flight configuration anywhere since
919
945
  // we don't know which Flight build this will end up being used
920
946
  // with.
921
- r.$$typeof === ue || r.getModuleId !== void 0));
947
+ r.$$typeof === le || r.getModuleId !== void 0));
922
948
  }
923
- function _e(r, m, b) {
924
- var E = r.displayName;
925
- if (E)
926
- return E;
927
- var F = m.displayName || m.name || "";
949
+ function Te(r, p, b) {
950
+ var C = r.displayName;
951
+ if (C)
952
+ return C;
953
+ var F = p.displayName || p.name || "";
928
954
  return F !== "" ? b + "(" + F + ")" : b;
929
955
  }
930
956
  function ve(r) {
931
957
  return r.displayName || "Context";
932
958
  }
933
- function D(r) {
959
+ function I(r) {
934
960
  if (r == null)
935
961
  return null;
936
962
  if (typeof r.tag == "number" && $("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof r == "function")
@@ -954,20 +980,20 @@ function La() {
954
980
  if (typeof r == "object")
955
981
  switch (r.$$typeof) {
956
982
  case c:
957
- var m = r;
958
- return ve(m) + ".Consumer";
983
+ var p = r;
984
+ return ve(p) + ".Consumer";
959
985
  case u:
960
986
  var b = r;
961
987
  return ve(b._context) + ".Provider";
962
988
  case h:
963
- return _e(r, r.render, "ForwardRef");
964
- case g:
965
- var E = r.displayName || null;
966
- return E !== null ? E : D(r.type) || "Memo";
989
+ return Te(r, r.render, "ForwardRef");
990
+ case m:
991
+ var C = r.displayName || null;
992
+ return C !== null ? C : I(r.type) || "Memo";
967
993
  case x: {
968
- var F = r, U = F._payload, A = F._init;
994
+ var F = r, U = F._payload, P = F._init;
969
995
  try {
970
- return D(A(U));
996
+ return I(P(U));
971
997
  } catch {
972
998
  return null;
973
999
  }
@@ -975,14 +1001,14 @@ function La() {
975
1001
  }
976
1002
  return null;
977
1003
  }
978
- var be = Object.assign, C = 0, we, Re, je, Ae, Pe, De, Fe;
1004
+ var be = Object.assign, S = 0, we, Re, je, Ae, ke, De, Fe;
979
1005
  function Be() {
980
1006
  }
981
1007
  Be.__reactDisabledLog = !0;
982
- function ne() {
1008
+ function ae() {
983
1009
  {
984
- if (C === 0) {
985
- we = console.log, Re = console.info, je = console.warn, Ae = console.error, Pe = console.group, De = console.groupCollapsed, Fe = console.groupEnd;
1010
+ if (S === 0) {
1011
+ we = console.log, Re = console.info, je = console.warn, Ae = console.error, ke = console.group, De = console.groupCollapsed, Fe = console.groupEnd;
986
1012
  var r = {
987
1013
  configurable: !0,
988
1014
  enumerable: !0,
@@ -999,12 +1025,12 @@ function La() {
999
1025
  groupEnd: r
1000
1026
  });
1001
1027
  }
1002
- C++;
1028
+ S++;
1003
1029
  }
1004
1030
  }
1005
1031
  function Me() {
1006
1032
  {
1007
- if (C--, C === 0) {
1033
+ if (S--, S === 0) {
1008
1034
  var r = {
1009
1035
  configurable: !0,
1010
1036
  enumerable: !0,
@@ -1024,7 +1050,7 @@ function La() {
1024
1050
  value: Ae
1025
1051
  }),
1026
1052
  group: be({}, r, {
1027
- value: Pe
1053
+ value: ke
1028
1054
  }),
1029
1055
  groupCollapsed: be({}, r, {
1030
1056
  value: De
@@ -1034,219 +1060,219 @@ function La() {
1034
1060
  })
1035
1061
  });
1036
1062
  }
1037
- C < 0 && $("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
1063
+ S < 0 && $("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
1038
1064
  }
1039
1065
  }
1040
1066
  var Ye = re.ReactCurrentDispatcher, Ge;
1041
- function de(r, m, b) {
1067
+ function ue(r, p, b) {
1042
1068
  {
1043
1069
  if (Ge === void 0)
1044
1070
  try {
1045
1071
  throw Error();
1046
1072
  } catch (F) {
1047
- var E = F.stack.trim().match(/\n( *(at )?)/);
1048
- Ge = E && E[1] || "";
1073
+ var C = F.stack.trim().match(/\n( *(at )?)/);
1074
+ Ge = C && C[1] || "";
1049
1075
  }
1050
1076
  return `
1051
1077
  ` + Ge + r;
1052
1078
  }
1053
1079
  }
1054
- var p = !1, v;
1080
+ var g = !1, v;
1055
1081
  {
1056
- var S = typeof WeakMap == "function" ? WeakMap : Map;
1057
- v = new S();
1082
+ var w = typeof WeakMap == "function" ? WeakMap : Map;
1083
+ v = new w();
1058
1084
  }
1059
- function P(r, m) {
1060
- if (!r || p)
1085
+ function k(r, p) {
1086
+ if (!r || g)
1061
1087
  return "";
1062
1088
  {
1063
1089
  var b = v.get(r);
1064
1090
  if (b !== void 0)
1065
1091
  return b;
1066
1092
  }
1067
- var E;
1068
- p = !0;
1093
+ var C;
1094
+ g = !0;
1069
1095
  var F = Error.prepareStackTrace;
1070
1096
  Error.prepareStackTrace = void 0;
1071
1097
  var U;
1072
- U = Ye.current, Ye.current = null, ne();
1098
+ U = Ye.current, Ye.current = null, ae();
1073
1099
  try {
1074
- if (m) {
1075
- var A = function() {
1100
+ if (p) {
1101
+ var P = function() {
1076
1102
  throw Error();
1077
1103
  };
1078
- if (Object.defineProperty(A.prototype, "props", {
1104
+ if (Object.defineProperty(P.prototype, "props", {
1079
1105
  set: function() {
1080
1106
  throw Error();
1081
1107
  }
1082
1108
  }), typeof Reflect == "object" && Reflect.construct) {
1083
1109
  try {
1084
- Reflect.construct(A, []);
1110
+ Reflect.construct(P, []);
1085
1111
  } catch (Ne) {
1086
- E = Ne;
1112
+ C = Ne;
1087
1113
  }
1088
- Reflect.construct(r, [], A);
1114
+ Reflect.construct(r, [], P);
1089
1115
  } else {
1090
1116
  try {
1091
- A.call();
1117
+ P.call();
1092
1118
  } catch (Ne) {
1093
- E = Ne;
1119
+ C = Ne;
1094
1120
  }
1095
- r.call(A.prototype);
1121
+ r.call(P.prototype);
1096
1122
  }
1097
1123
  } else {
1098
1124
  try {
1099
1125
  throw Error();
1100
1126
  } catch (Ne) {
1101
- E = Ne;
1127
+ C = Ne;
1102
1128
  }
1103
1129
  r();
1104
1130
  }
1105
1131
  } catch (Ne) {
1106
- if (Ne && E && typeof Ne.stack == "string") {
1132
+ if (Ne && C && typeof Ne.stack == "string") {
1107
1133
  for (var R = Ne.stack.split(`
1108
- `), fe = E.stack.split(`
1109
- `), W = R.length - 1, X = fe.length - 1; W >= 1 && X >= 0 && R[W] !== fe[X]; )
1110
- X--;
1111
- for (; W >= 1 && X >= 0; W--, X--)
1112
- if (R[W] !== fe[X]) {
1113
- if (W !== 1 || X !== 1)
1134
+ `), he = C.stack.split(`
1135
+ `), q = R.length - 1, J = he.length - 1; q >= 1 && J >= 0 && R[q] !== he[J]; )
1136
+ J--;
1137
+ for (; q >= 1 && J >= 0; q--, J--)
1138
+ if (R[q] !== he[J]) {
1139
+ if (q !== 1 || J !== 1)
1114
1140
  do
1115
- if (W--, X--, X < 0 || R[W] !== fe[X]) {
1141
+ if (q--, J--, J < 0 || R[q] !== he[J]) {
1116
1142
  var Ce = `
1117
- ` + R[W].replace(" at new ", " at ");
1143
+ ` + R[q].replace(" at new ", " at ");
1118
1144
  return r.displayName && Ce.includes("<anonymous>") && (Ce = Ce.replace("<anonymous>", r.displayName)), typeof r == "function" && v.set(r, Ce), Ce;
1119
1145
  }
1120
- while (W >= 1 && X >= 0);
1146
+ while (q >= 1 && J >= 0);
1121
1147
  break;
1122
1148
  }
1123
1149
  }
1124
1150
  } finally {
1125
- p = !1, Ye.current = U, Me(), Error.prepareStackTrace = F;
1151
+ g = !1, Ye.current = U, Me(), Error.prepareStackTrace = F;
1126
1152
  }
1127
- var et = r ? r.displayName || r.name : "", Vt = et ? de(et) : "";
1128
- return typeof r == "function" && v.set(r, Vt), Vt;
1153
+ var tt = r ? r.displayName || r.name : "", zt = tt ? ue(tt) : "";
1154
+ return typeof r == "function" && v.set(r, zt), zt;
1129
1155
  }
1130
- function ae(r, m, b) {
1131
- return P(r, !1);
1156
+ function ge(r, p, b) {
1157
+ return k(r, !1);
1132
1158
  }
1133
- function M(r) {
1134
- var m = r.prototype;
1135
- return !!(m && m.isReactComponent);
1159
+ function _(r) {
1160
+ var p = r.prototype;
1161
+ return !!(p && p.isReactComponent);
1136
1162
  }
1137
- function w(r, m, b) {
1163
+ function E(r, p, b) {
1138
1164
  if (r == null)
1139
1165
  return "";
1140
1166
  if (typeof r == "function")
1141
- return P(r, M(r));
1167
+ return k(r, _(r));
1142
1168
  if (typeof r == "string")
1143
- return de(r);
1169
+ return ue(r);
1144
1170
  switch (r) {
1145
1171
  case d:
1146
- return de("Suspense");
1172
+ return ue("Suspense");
1147
1173
  case f:
1148
- return de("SuspenseList");
1174
+ return ue("SuspenseList");
1149
1175
  }
1150
1176
  if (typeof r == "object")
1151
1177
  switch (r.$$typeof) {
1152
1178
  case h:
1153
- return ae(r.render);
1154
- case g:
1155
- return w(r.type, m, b);
1179
+ return ge(r.render);
1180
+ case m:
1181
+ return E(r.type, p, b);
1156
1182
  case x: {
1157
- var E = r, F = E._payload, U = E._init;
1183
+ var C = r, F = C._payload, U = C._init;
1158
1184
  try {
1159
- return w(U(F), m, b);
1185
+ return E(U(F), p, b);
1160
1186
  } catch {
1161
1187
  }
1162
1188
  }
1163
1189
  }
1164
1190
  return "";
1165
1191
  }
1166
- var I = Object.prototype.hasOwnProperty, ie = {}, se = re.ReactDebugCurrentFrame;
1167
- function O(r) {
1192
+ var A = Object.prototype.hasOwnProperty, G = {}, se = re.ReactDebugCurrentFrame;
1193
+ function M(r) {
1168
1194
  if (r) {
1169
- var m = r._owner, b = w(r.type, r._source, m ? m.type : null);
1195
+ var p = r._owner, b = E(r.type, r._source, p ? p.type : null);
1170
1196
  se.setExtraStackFrame(b);
1171
1197
  } else
1172
1198
  se.setExtraStackFrame(null);
1173
1199
  }
1174
- function B(r, m, b, E, F) {
1200
+ function B(r, p, b, C, F) {
1175
1201
  {
1176
- var U = Function.call.bind(I);
1177
- for (var A in r)
1178
- if (U(r, A)) {
1202
+ var U = Function.call.bind(A);
1203
+ for (var P in r)
1204
+ if (U(r, P)) {
1179
1205
  var R = void 0;
1180
1206
  try {
1181
- if (typeof r[A] != "function") {
1182
- var fe = Error((E || "React class") + ": " + b + " type `" + A + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof r[A] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
1183
- throw fe.name = "Invariant Violation", fe;
1207
+ if (typeof r[P] != "function") {
1208
+ var he = Error((C || "React class") + ": " + b + " type `" + P + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof r[P] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
1209
+ throw he.name = "Invariant Violation", he;
1184
1210
  }
1185
- R = r[A](m, A, E, b, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
1186
- } catch (W) {
1187
- R = W;
1211
+ R = r[P](p, P, C, b, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
1212
+ } catch (q) {
1213
+ R = q;
1188
1214
  }
1189
- R && !(R instanceof Error) && (O(F), $("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", E || "React class", b, A, typeof R), O(null)), R instanceof Error && !(R.message in ie) && (ie[R.message] = !0, O(F), $("Failed %s type: %s", b, R.message), O(null));
1215
+ R && !(R instanceof Error) && (M(F), $("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", C || "React class", b, P, typeof R), M(null)), R instanceof Error && !(R.message in G) && (G[R.message] = !0, M(F), $("Failed %s type: %s", b, R.message), M(null));
1190
1216
  }
1191
1217
  }
1192
1218
  }
1193
- var G = Array.isArray;
1219
+ var W = Array.isArray;
1194
1220
  function Ie(r) {
1195
- return G(r);
1221
+ return W(r);
1196
1222
  }
1197
- function Ze(r) {
1223
+ function Je(r) {
1198
1224
  {
1199
- var m = typeof Symbol == "function" && Symbol.toStringTag, b = m && r[Symbol.toStringTag] || r.constructor.name || "Object";
1225
+ var p = typeof Symbol == "function" && Symbol.toStringTag, b = p && r[Symbol.toStringTag] || r.constructor.name || "Object";
1200
1226
  return b;
1201
1227
  }
1202
1228
  }
1203
- function pt(r) {
1229
+ function mt(r) {
1204
1230
  try {
1205
- return gt(r), !1;
1231
+ return pt(r), !1;
1206
1232
  } catch {
1207
1233
  return !0;
1208
1234
  }
1209
1235
  }
1210
- function gt(r) {
1236
+ function pt(r) {
1211
1237
  return "" + r;
1212
1238
  }
1213
1239
  function st(r) {
1214
- if (pt(r))
1215
- return $("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ze(r)), gt(r);
1240
+ if (mt(r))
1241
+ return $("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Je(r)), pt(r);
1216
1242
  }
1217
1243
  var Ue = re.ReactCurrentOwner, ot = {
1218
1244
  key: !0,
1219
1245
  ref: !0,
1220
1246
  __self: !0,
1221
1247
  __source: !0
1222
- }, ct, vt, Je;
1223
- Je = {};
1224
- function Rt(r) {
1225
- if (I.call(r, "ref")) {
1226
- var m = Object.getOwnPropertyDescriptor(r, "ref").get;
1227
- if (m && m.isReactWarning)
1248
+ }, ct, gt, Qe;
1249
+ Qe = {};
1250
+ function Tt(r) {
1251
+ if (A.call(r, "ref")) {
1252
+ var p = Object.getOwnPropertyDescriptor(r, "ref").get;
1253
+ if (p && p.isReactWarning)
1228
1254
  return !1;
1229
1255
  }
1230
1256
  return r.ref !== void 0;
1231
1257
  }
1232
- function At(r) {
1233
- if (I.call(r, "key")) {
1234
- var m = Object.getOwnPropertyDescriptor(r, "key").get;
1235
- if (m && m.isReactWarning)
1258
+ function Rt(r) {
1259
+ if (A.call(r, "key")) {
1260
+ var p = Object.getOwnPropertyDescriptor(r, "key").get;
1261
+ if (p && p.isReactWarning)
1236
1262
  return !1;
1237
1263
  }
1238
1264
  return r.key !== void 0;
1239
1265
  }
1240
- function Pt(r, m) {
1241
- if (typeof r.ref == "string" && Ue.current && m && Ue.current.stateNode !== m) {
1242
- var b = D(Ue.current.type);
1243
- Je[b] || ($('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', D(Ue.current.type), r.ref), Je[b] = !0);
1266
+ function At(r, p) {
1267
+ if (typeof r.ref == "string" && Ue.current && p && Ue.current.stateNode !== p) {
1268
+ var b = I(Ue.current.type);
1269
+ Qe[b] || ($('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', I(Ue.current.type), r.ref), Qe[b] = !0);
1244
1270
  }
1245
1271
  }
1246
- function bt(r, m) {
1272
+ function vt(r, p) {
1247
1273
  {
1248
1274
  var b = function() {
1249
- ct || (ct = !0, $("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", m));
1275
+ ct || (ct = !0, $("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", p));
1250
1276
  };
1251
1277
  b.isReactWarning = !0, Object.defineProperty(r, "key", {
1252
1278
  get: b,
@@ -1254,10 +1280,10 @@ function La() {
1254
1280
  });
1255
1281
  }
1256
1282
  }
1257
- function $e(r, m) {
1283
+ function $e(r, p) {
1258
1284
  {
1259
1285
  var b = function() {
1260
- vt || (vt = !0, $("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", m));
1286
+ gt || (gt = !0, $("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", p));
1261
1287
  };
1262
1288
  b.isReactWarning = !0, Object.defineProperty(r, "ref", {
1263
1289
  get: b,
@@ -1265,15 +1291,15 @@ function La() {
1265
1291
  });
1266
1292
  }
1267
1293
  }
1268
- var zt = function(r, m, b, E, F, U, A) {
1294
+ var $t = function(r, p, b, C, F, U, P) {
1269
1295
  var R = {
1270
1296
  // This tag allows us to uniquely identify this as a React Element
1271
1297
  $$typeof: n,
1272
1298
  // Built-in properties that belong on the element
1273
1299
  type: r,
1274
- key: m,
1300
+ key: p,
1275
1301
  ref: b,
1276
- props: A,
1302
+ props: P,
1277
1303
  // Record the component responsible for creating this element.
1278
1304
  _owner: U
1279
1305
  };
@@ -1286,7 +1312,7 @@ function La() {
1286
1312
  configurable: !1,
1287
1313
  enumerable: !1,
1288
1314
  writable: !1,
1289
- value: E
1315
+ value: C
1290
1316
  }), Object.defineProperty(R, "_source", {
1291
1317
  configurable: !1,
1292
1318
  enumerable: !1,
@@ -1294,41 +1320,41 @@ function La() {
1294
1320
  value: F
1295
1321
  }), Object.freeze && (Object.freeze(R.props), Object.freeze(R)), R;
1296
1322
  };
1297
- function s(r, m, b, E, F) {
1323
+ function s(r, p, b, C, F) {
1298
1324
  {
1299
- var U, A = {}, R = null, fe = null;
1300
- b !== void 0 && (st(b), R = "" + b), At(m) && (st(m.key), R = "" + m.key), Rt(m) && (fe = m.ref, Pt(m, F));
1301
- for (U in m)
1302
- I.call(m, U) && !ot.hasOwnProperty(U) && (A[U] = m[U]);
1325
+ var U, P = {}, R = null, he = null;
1326
+ b !== void 0 && (st(b), R = "" + b), Rt(p) && (st(p.key), R = "" + p.key), Tt(p) && (he = p.ref, At(p, F));
1327
+ for (U in p)
1328
+ A.call(p, U) && !ot.hasOwnProperty(U) && (P[U] = p[U]);
1303
1329
  if (r && r.defaultProps) {
1304
- var W = r.defaultProps;
1305
- for (U in W)
1306
- A[U] === void 0 && (A[U] = W[U]);
1330
+ var q = r.defaultProps;
1331
+ for (U in q)
1332
+ P[U] === void 0 && (P[U] = q[U]);
1307
1333
  }
1308
- if (R || fe) {
1309
- var X = typeof r == "function" ? r.displayName || r.name || "Unknown" : r;
1310
- R && bt(A, X), fe && $e(A, X);
1334
+ if (R || he) {
1335
+ var J = typeof r == "function" ? r.displayName || r.name || "Unknown" : r;
1336
+ R && vt(P, J), he && $e(P, J);
1311
1337
  }
1312
- return zt(r, R, fe, F, E, Ue.current, A);
1338
+ return $t(r, R, he, F, C, Ue.current, P);
1313
1339
  }
1314
1340
  }
1315
- var y = re.ReactCurrentOwner, _ = re.ReactDebugCurrentFrame;
1316
- function k(r) {
1341
+ var y = re.ReactCurrentOwner, T = re.ReactDebugCurrentFrame;
1342
+ function j(r) {
1317
1343
  if (r) {
1318
- var m = r._owner, b = w(r.type, r._source, m ? m.type : null);
1319
- _.setExtraStackFrame(b);
1344
+ var p = r._owner, b = E(r.type, r._source, p ? p.type : null);
1345
+ T.setExtraStackFrame(b);
1320
1346
  } else
1321
- _.setExtraStackFrame(null);
1347
+ T.setExtraStackFrame(null);
1322
1348
  }
1323
- var J;
1324
- J = !1;
1349
+ var ee;
1350
+ ee = !1;
1325
1351
  function ye(r) {
1326
1352
  return typeof r == "object" && r !== null && r.$$typeof === n;
1327
1353
  }
1328
- function he() {
1354
+ function de() {
1329
1355
  {
1330
1356
  if (y.current) {
1331
- var r = D(y.current.type);
1357
+ var r = I(y.current.type);
1332
1358
  if (r)
1333
1359
  return `
1334
1360
 
@@ -1337,149 +1363,149 @@ Check the render method of \`` + r + "`.";
1337
1363
  return "";
1338
1364
  }
1339
1365
  }
1340
- function Ht(r) {
1366
+ function Vt(r) {
1341
1367
  {
1342
1368
  if (r !== void 0) {
1343
- var m = r.fileName.replace(/^.*[\\\/]/, ""), b = r.lineNumber;
1369
+ var p = r.fileName.replace(/^.*[\\\/]/, ""), b = r.lineNumber;
1344
1370
  return `
1345
1371
 
1346
- Check your code at ` + m + ":" + b + ".";
1372
+ Check your code at ` + p + ":" + b + ".";
1347
1373
  }
1348
1374
  return "";
1349
1375
  }
1350
1376
  }
1351
- var yt = {};
1352
- function xt(r) {
1377
+ var bt = {};
1378
+ function yt(r) {
1353
1379
  {
1354
- var m = he();
1355
- if (!m) {
1380
+ var p = de();
1381
+ if (!p) {
1356
1382
  var b = typeof r == "string" ? r : r.displayName || r.name;
1357
- b && (m = `
1383
+ b && (p = `
1358
1384
 
1359
1385
  Check the top-level render call using <` + b + ">.");
1360
1386
  }
1361
- return m;
1387
+ return p;
1362
1388
  }
1363
1389
  }
1364
- function xe(r, m) {
1390
+ function xe(r, p) {
1365
1391
  {
1366
1392
  if (!r._store || r._store.validated || r.key != null)
1367
1393
  return;
1368
1394
  r._store.validated = !0;
1369
- var b = xt(m);
1370
- if (yt[b])
1395
+ var b = yt(p);
1396
+ if (bt[b])
1371
1397
  return;
1372
- yt[b] = !0;
1373
- var E = "";
1374
- r && r._owner && r._owner !== y.current && (E = " It was passed a child from " + D(r._owner.type) + "."), k(r), $('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', b, E), k(null);
1398
+ bt[b] = !0;
1399
+ var C = "";
1400
+ r && r._owner && r._owner !== y.current && (C = " It was passed a child from " + I(r._owner.type) + "."), j(r), $('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', b, C), j(null);
1375
1401
  }
1376
1402
  }
1377
- function Ee(r, m) {
1403
+ function Ee(r, p) {
1378
1404
  {
1379
1405
  if (typeof r != "object")
1380
1406
  return;
1381
1407
  if (Ie(r))
1382
1408
  for (var b = 0; b < r.length; b++) {
1383
- var E = r[b];
1384
- ye(E) && xe(E, m);
1409
+ var C = r[b];
1410
+ ye(C) && xe(C, p);
1385
1411
  }
1386
1412
  else if (ye(r))
1387
1413
  r._store && (r._store.validated = !0);
1388
1414
  else if (r) {
1389
- var F = pe(r);
1415
+ var F = me(r);
1390
1416
  if (typeof F == "function" && F !== r.entries)
1391
- for (var U = F.call(r), A; !(A = U.next()).done; )
1392
- ye(A.value) && xe(A.value, m);
1417
+ for (var U = F.call(r), P; !(P = U.next()).done; )
1418
+ ye(P.value) && xe(P.value, p);
1393
1419
  }
1394
1420
  }
1395
1421
  }
1396
1422
  function We(r) {
1397
1423
  {
1398
- var m = r.type;
1399
- if (m == null || typeof m == "string")
1424
+ var p = r.type;
1425
+ if (p == null || typeof p == "string")
1400
1426
  return;
1401
1427
  var b;
1402
- if (typeof m == "function")
1403
- b = m.propTypes;
1404
- else if (typeof m == "object" && (m.$$typeof === h || // Note: Memo only checks outer props here.
1428
+ if (typeof p == "function")
1429
+ b = p.propTypes;
1430
+ else if (typeof p == "object" && (p.$$typeof === h || // Note: Memo only checks outer props here.
1405
1431
  // Inner props are checked in the reconciler.
1406
- m.$$typeof === g))
1407
- b = m.propTypes;
1432
+ p.$$typeof === m))
1433
+ b = p.propTypes;
1408
1434
  else
1409
1435
  return;
1410
1436
  if (b) {
1411
- var E = D(m);
1412
- B(b, r.props, "prop", E, r);
1413
- } else if (m.PropTypes !== void 0 && !J) {
1414
- J = !0;
1415
- var F = D(m);
1437
+ var C = I(p);
1438
+ B(b, r.props, "prop", C, r);
1439
+ } else if (p.PropTypes !== void 0 && !ee) {
1440
+ ee = !0;
1441
+ var F = I(p);
1416
1442
  $("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", F || "Unknown");
1417
1443
  }
1418
- typeof m.getDefaultProps == "function" && !m.getDefaultProps.isReactClassApproved && $("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
1444
+ typeof p.getDefaultProps == "function" && !p.getDefaultProps.isReactClassApproved && $("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
1419
1445
  }
1420
1446
  }
1421
1447
  function Oe(r) {
1422
1448
  {
1423
- for (var m = Object.keys(r.props), b = 0; b < m.length; b++) {
1424
- var E = m[b];
1425
- if (E !== "children" && E !== "key") {
1426
- k(r), $("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", E), k(null);
1449
+ for (var p = Object.keys(r.props), b = 0; b < p.length; b++) {
1450
+ var C = p[b];
1451
+ if (C !== "children" && C !== "key") {
1452
+ j(r), $("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", C), j(null);
1427
1453
  break;
1428
1454
  }
1429
1455
  }
1430
- r.ref !== null && (k(r), $("Invalid attribute `ref` supplied to `React.Fragment`."), k(null));
1456
+ r.ref !== null && (j(r), $("Invalid attribute `ref` supplied to `React.Fragment`."), j(null));
1431
1457
  }
1432
1458
  }
1433
- function ze(r, m, b, E, F, U) {
1459
+ function Ve(r, p, b, C, F, U) {
1434
1460
  {
1435
- var A = Te(r);
1436
- if (!A) {
1461
+ var P = _e(r);
1462
+ if (!P) {
1437
1463
  var R = "";
1438
1464
  (r === void 0 || typeof r == "object" && r !== null && Object.keys(r).length === 0) && (R += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
1439
- var fe = Ht(F);
1440
- fe ? R += fe : R += he();
1441
- var W;
1442
- r === null ? W = "null" : Ie(r) ? W = "array" : r !== void 0 && r.$$typeof === n ? (W = "<" + (D(r.type) || "Unknown") + " />", R = " Did you accidentally export a JSX literal instead of a component?") : W = typeof r, $("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", W, R);
1465
+ var he = Vt(F);
1466
+ he ? R += he : R += de();
1467
+ var q;
1468
+ r === null ? q = "null" : Ie(r) ? q = "array" : r !== void 0 && r.$$typeof === n ? (q = "<" + (I(r.type) || "Unknown") + " />", R = " Did you accidentally export a JSX literal instead of a component?") : q = typeof r, $("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", q, R);
1443
1469
  }
1444
- var X = s(r, m, b, F, U);
1445
- if (X == null)
1446
- return X;
1447
- if (A) {
1448
- var Ce = m.children;
1470
+ var J = s(r, p, b, F, U);
1471
+ if (J == null)
1472
+ return J;
1473
+ if (P) {
1474
+ var Ce = p.children;
1449
1475
  if (Ce !== void 0)
1450
- if (E)
1476
+ if (C)
1451
1477
  if (Ie(Ce)) {
1452
- for (var et = 0; et < Ce.length; et++)
1453
- Ee(Ce[et], r);
1478
+ for (var tt = 0; tt < Ce.length; tt++)
1479
+ Ee(Ce[tt], r);
1454
1480
  Object.freeze && Object.freeze(Ce);
1455
1481
  } else
1456
1482
  $("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
1457
1483
  else
1458
1484
  Ee(Ce, r);
1459
1485
  }
1460
- return r === t ? Oe(X) : We(X), X;
1486
+ return r === t ? Oe(J) : We(J), J;
1461
1487
  }
1462
1488
  }
1463
- function Qe(r, m, b) {
1464
- return ze(r, m, b, !0);
1489
+ function et(r, p, b) {
1490
+ return Ve(r, p, b, !0);
1465
1491
  }
1466
- function Et(r, m, b) {
1467
- return ze(r, m, b, !1);
1492
+ function xt(r, p, b) {
1493
+ return Ve(r, p, b, !1);
1468
1494
  }
1469
- var zn = Et, Hn = Qe;
1470
- ut.Fragment = t, ut.jsx = zn, ut.jsxs = Hn;
1495
+ var Vn = xt, zn = et;
1496
+ ut.Fragment = t, ut.jsx = Vn, ut.jsxs = zn;
1471
1497
  }()), ut;
1472
1498
  }
1473
- process.env.NODE_ENV === "production" ? Lt.exports = Na() : Lt.exports = La();
1474
- var l = Lt.exports;
1499
+ process.env.NODE_ENV === "production" ? It.exports = La() : It.exports = Fa();
1500
+ var l = It.exports;
1475
1501
  function Fn(e) {
1476
1502
  return e.title.search("<") > -1 ? /* @__PURE__ */ l.jsx("button", { className: "svg", dangerouslySetInnerHTML: { __html: e.title } }) : /* @__PURE__ */ l.jsx("button", { children: e.title });
1477
1503
  }
1478
- const Fa = /* @__PURE__ */ l.jsxs("svg", { className: "closeIcon", width: "14", height: "14", fill: "none", stroke: "#666666", strokeMiterlimit: "10", children: [
1504
+ const Ba = /* @__PURE__ */ l.jsxs("svg", { className: "closeIcon", width: "14", height: "14", fill: "none", stroke: "#666666", strokeMiterlimit: "10", children: [
1479
1505
  /* @__PURE__ */ l.jsx("circle", { cx: "7", cy: "7", r: "6" }),
1480
1506
  /* @__PURE__ */ l.jsx("line", { x1: "4", y1: "4", x2: "10", y2: "10" }),
1481
1507
  /* @__PURE__ */ l.jsx("line", { x1: "4", y1: "10", x2: "10", y2: "4" })
1482
- ] }), Ba = /* @__PURE__ */ l.jsx("svg", { className: "dragIcon", width: "14", height: "14", fill: "#666666", stroke: "none", children: /* @__PURE__ */ l.jsx(
1508
+ ] }), Ua = /* @__PURE__ */ l.jsx("svg", { className: "dragIcon", width: "14", height: "14", fill: "#666666", stroke: "none", children: /* @__PURE__ */ l.jsx(
1483
1509
  "path",
1484
1510
  {
1485
1511
  d: `M10.43,4H3.57C3.26,4,3,4.22,3,4.5v1C3,5.78,3.26,6,3.57,6h6.86C10.74,6,11,5.78,11,5.5v-1
@@ -1487,24 +1513,24 @@ C11,4.22,10.74,4,10.43,4z M10.43,8H3.57C3.26,8,3,8.22,3,8.5v1C3,9.78,3.26,10,3.5
1487
1513
  C11,8.22,10.74,8,10.43,8z`
1488
1514
  }
1489
1515
  ) });
1490
- function Ua(e) {
1516
+ function $a(e) {
1491
1517
  return /* @__PURE__ */ l.jsx(jn.Item, { value: e.title, children: /* @__PURE__ */ l.jsxs("div", { children: [
1492
- Ba,
1518
+ Ua,
1493
1519
  /* @__PURE__ */ l.jsx("span", { children: e.title }),
1494
1520
  /* @__PURE__ */ l.jsx("button", { className: "closeIcon", onClick: () => {
1495
1521
  e.onDelete(e.index);
1496
- }, children: Fa })
1522
+ }, children: Ba })
1497
1523
  ] }) }, e.title);
1498
1524
  }
1499
- function $a(e) {
1500
- const [n, a] = q(!1), [t, i] = q(e.options), o = (d) => {
1525
+ function Va(e) {
1526
+ const [n, a] = K(!1), [t, i] = K(e.options), o = (d) => {
1501
1527
  e.onDragComplete(d), i(d);
1502
1528
  }, u = (d) => {
1503
1529
  const f = [...t];
1504
1530
  f.splice(d, 1), o(f);
1505
1531
  }, c = [];
1506
1532
  t.forEach((d, f) => {
1507
- c.push(/* @__PURE__ */ l.jsx(Ua, { index: f, title: d, onDelete: u }, d));
1533
+ c.push(/* @__PURE__ */ l.jsx($a, { index: f, title: d, onDelete: u }, d));
1508
1534
  });
1509
1535
  let h = "dropdown draggable";
1510
1536
  return e.subdropdown && (h += " subdropdown"), /* @__PURE__ */ l.jsxs("div", { className: h, onMouseEnter: () => a(!0), onMouseLeave: () => a(!1), children: [
@@ -1513,7 +1539,7 @@ function $a(e) {
1513
1539
  ] });
1514
1540
  }
1515
1541
  function za(e) {
1516
- const [n, a] = q(!1), t = [];
1542
+ const [n, a] = K(!1), t = [];
1517
1543
  e.options.map((o, u) => {
1518
1544
  e.onSelect !== void 0 && (o.onSelect = e.onSelect), t.push(/* @__PURE__ */ l.jsx(Ha, { option: o }, u));
1519
1545
  });
@@ -1538,12 +1564,12 @@ function za(e) {
1538
1564
  );
1539
1565
  }
1540
1566
  function Ha(e) {
1541
- const { option: n } = e, [a, t] = q("");
1567
+ const { option: n } = e, [a, t] = K("");
1542
1568
  let i;
1543
1569
  switch (n.type) {
1544
1570
  case "draggable":
1545
1571
  i = /* @__PURE__ */ l.jsx(
1546
- $a,
1572
+ Va,
1547
1573
  {
1548
1574
  title: n.title,
1549
1575
  options: n.value,
@@ -1577,9 +1603,9 @@ function Ha(e) {
1577
1603
  );
1578
1604
  break;
1579
1605
  }
1580
- return /* @__PURE__ */ l.jsx("li", { className: a === n.title ? "selected" : "", children: i }, Ta());
1606
+ return /* @__PURE__ */ l.jsx("li", { className: a === n.title ? "selected" : "", children: i }, _a());
1581
1607
  }
1582
- function Ui(e, n, a) {
1608
+ function Li(e, n, a) {
1583
1609
  function t(o) {
1584
1610
  switch (n.forEach((u) => {
1585
1611
  u.callback(e, u.remote, o);
@@ -1602,8 +1628,8 @@ function Ui(e, n, a) {
1602
1628
  o.target === "editor" ? i(o) : t(o);
1603
1629
  };
1604
1630
  }
1605
- function $t(e) {
1606
- const [n, a] = q(e.open !== void 0 ? e.open : !0), t = !n || e.children === void 0;
1631
+ function Ut(e) {
1632
+ const [n, a] = K(e.open !== void 0 ? e.open : !0), t = !n || e.children === void 0;
1607
1633
  return /* @__PURE__ */ l.jsxs("div", { className: `accordion ${t ? "hide" : ""}`, children: [
1608
1634
  /* @__PURE__ */ l.jsxs(
1609
1635
  "button",
@@ -1621,7 +1647,7 @@ function $t(e) {
1621
1647
  children: "Toggle"
1622
1648
  }
1623
1649
  ),
1624
- /* @__PURE__ */ l.jsx("p", { className: "label", children: Ot(e.label) })
1650
+ /* @__PURE__ */ l.jsx("p", { className: "label", children: Mt(e.label) })
1625
1651
  ]
1626
1652
  }
1627
1653
  ),
@@ -1630,7 +1656,7 @@ function $t(e) {
1630
1656
  ] });
1631
1657
  }
1632
1658
  function Bn(e) {
1633
- const [n, a] = q(!1), t = e.child !== void 0 && e.child.children.length > 0, i = [];
1659
+ const [n, a] = K(!1), t = e.child !== void 0 && e.child.children.length > 0, i = [];
1634
1660
  return e.child !== void 0 && e.child.children.length > 0 && e.child.children.map((o) => {
1635
1661
  i.push(/* @__PURE__ */ l.jsx(Bn, { child: o, three: e.three }, Math.random()));
1636
1662
  }), /* @__PURE__ */ l.jsx(l.Fragment, { children: e.child !== void 0 && /* @__PURE__ */ l.jsxs("div", { className: "childObject", children: [
@@ -1660,26 +1686,26 @@ function Bn(e) {
1660
1686
  children: e.child.name.length > 0 ? `${e.child.name} (${e.child.type})` : `${e.child.type}::${e.child.uuid}`
1661
1687
  }
1662
1688
  ),
1663
- /* @__PURE__ */ l.jsx("div", { className: `icon ${ka(e.child)}` })
1689
+ /* @__PURE__ */ l.jsx("div", { className: `icon ${Pa(e.child)}` })
1664
1690
  ] }),
1665
1691
  /* @__PURE__ */ l.jsx("div", { className: n ? "open" : "", children: /* @__PURE__ */ l.jsx("div", { className: "container", children: i }) })
1666
1692
  ] }, Math.random()) });
1667
1693
  }
1668
- function Va(e) {
1694
+ function Ya(e) {
1669
1695
  const n = [];
1670
1696
  return e.child?.children.map((a) => {
1671
1697
  n.push(/* @__PURE__ */ l.jsx(Bn, { child: a, three: e.three }, Math.random()));
1672
1698
  }), /* @__PURE__ */ l.jsx("div", { className: `scene ${e.class !== void 0 ? e.class : ""}`, children: n });
1673
1699
  }
1674
- const Ya = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAACXBIWXMAAAsTAAALEwEAmpwYAAAA5klEQVRoge2Y0Q6EIAwE6cX//+X6cCFpSMEKVTdk501OpRNKiyelFC0b8Ps6gCwoggZF0KAIGhRBgyJoUAQNiqCxjciR9SLV//eZiAyvK3U8i/QVaQO2YyLSFVvlkdTKDjJCukh2ykR5ZEW+kHmlatl90RaBtDkK/w7CYhuRUEO0ee3l+J3m55Vm+17vtwjTnV1V3QA8qfbeUXCzRWDpiLLS+OyzvRW7IzW9R+okvclsqR09743bo0yUpc1+lSJvNsa002+Euk9GKzV7SmZDRIMiaFAEDYqgQRE0KIIGRdCgCBoUQeMEMERadX7YUz8AAAAASUVORK5CYII=";
1675
- function Ga(e) {
1700
+ const Ga = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAACXBIWXMAAAsTAAALEwEAmpwYAAAA5klEQVRoge2Y0Q6EIAwE6cX//+X6cCFpSMEKVTdk501OpRNKiyelFC0b8Ps6gCwoggZF0KAIGhRBgyJoUAQNiqCxjciR9SLV//eZiAyvK3U8i/QVaQO2YyLSFVvlkdTKDjJCukh2ykR5ZEW+kHmlatl90RaBtDkK/w7CYhuRUEO0ee3l+J3m55Vm+17vtwjTnV1V3QA8qfbeUXCzRWDpiLLS+OyzvRW7IzW9R+okvclsqR09743bo0yUpc1+lSJvNsa002+Euk9GKzV7SmZDRIMiaFAEDYqgQRE0KIIGRdCgCBoUQeMEMERadX7YUz8AAAAASUVORK5CYII=";
1701
+ function Wa(e) {
1676
1702
  return "items" in e;
1677
1703
  }
1678
- function Xe(e) {
1704
+ function Ze(e) {
1679
1705
  const n = [];
1680
1706
  return e.items.forEach((a) => {
1681
- Ga(a) ? n.push(
1682
- /* @__PURE__ */ l.jsx(Xe, { title: Ot(a.title), items: a.items }, Math.random())
1707
+ Wa(a) ? n.push(
1708
+ /* @__PURE__ */ l.jsx(Ze, { title: Mt(a.title), items: a.items }, Math.random())
1683
1709
  ) : n.push(
1684
1710
  /* @__PURE__ */ l.jsx(
1685
1711
  ft,
@@ -1700,12 +1726,12 @@ function Xe(e) {
1700
1726
  Math.random()
1701
1727
  )
1702
1728
  );
1703
- }), /* @__PURE__ */ l.jsx($t, { label: e.title, open: e.expanded === !0, children: n });
1729
+ }), /* @__PURE__ */ l.jsx(Ut, { label: e.title, open: e.expanded === !0, children: n });
1704
1730
  }
1705
- function Wa(e) {
1731
+ function qa(e) {
1706
1732
  return !(e === "alphaHash" || e === "alphaToCoverage" || e === "attenuationDistance" || e === "blendAlpha" || e === "blendColor" || e === "blendDstAlpha" || e === "colorWrite" || e === "combine" || e === "defaultAttributeValues" || e === "depthFunc" || e === "forceSinglePass" || e === "glslVersion" || e === "linecap" || e === "linejoin" || e === "linewidth" || e === "normalMapType" || e === "precision" || e === "premultipliedAlpha" || e === "shadowSide" || e === "toneMapped" || e === "uniformsGroups" || e === "uniformsNeedUpdate" || e === "userData" || e === "vertexColors" || e === "version" || e === "wireframeLinecap" || e === "wireframeLinejoin" || e === "wireframeLinewidth" || e.slice(0, 4) === "clip" || e.slice(0, 7) === "polygon" || e.slice(0, 7) === "stencil" || e.slice(0, 2) === "is");
1707
1733
  }
1708
- function qa(e) {
1734
+ function Ka(e) {
1709
1735
  switch (e) {
1710
1736
  case "Alpha Map":
1711
1737
  return "alphaMap";
@@ -1929,7 +1955,7 @@ function Un(e) {
1929
1955
  const n = e.toLowerCase();
1930
1956
  return n.search("intensity") > -1 || n === "anisotropyrotation" || n === "blendalpha" || n === "bumpscale" || n === "clearcoatroughness" || n === "displacementbias" || n === "displacementscale" || n === "metalness" || n === "opacity" || n === "reflectivity" || n === "refractionratio" || n === "roughness" || n === "sheenroughness" || n === "thickness";
1931
1957
  }
1932
- function Ka() {
1958
+ function Xa() {
1933
1959
  const e = document.createElement("input");
1934
1960
  return e.type = "file", new Promise((n, a) => {
1935
1961
  e.addEventListener("change", function() {
@@ -1944,7 +1970,7 @@ function Ka() {
1944
1970
  }), e.click();
1945
1971
  });
1946
1972
  }
1947
- const Xa = [
1973
+ const Za = [
1948
1974
  {
1949
1975
  title: "Front",
1950
1976
  value: Yn
@@ -1957,7 +1983,7 @@ const Xa = [
1957
1983
  title: "Double",
1958
1984
  value: mn
1959
1985
  }
1960
- ], Za = [
1986
+ ], Ja = [
1961
1987
  {
1962
1988
  title: "No Blending",
1963
1989
  value: Gn
@@ -1982,7 +2008,7 @@ const Xa = [
1982
2008
  title: "Custom",
1983
2009
  value: Zn
1984
2010
  }
1985
- ], Ja = [
2011
+ ], Qa = [
1986
2012
  {
1987
2013
  title: "Add",
1988
2014
  value: Jn
@@ -2003,7 +2029,7 @@ const Xa = [
2003
2029
  title: "Max",
2004
2030
  value: na
2005
2031
  }
2006
- ], Qa = [
2032
+ ], ei = [
2007
2033
  {
2008
2034
  title: "Zero",
2009
2035
  valye: pn
@@ -2058,13 +2084,13 @@ const Xa = [
2058
2084
  },
2059
2085
  {
2060
2086
  title: "Constant Alpha",
2061
- valye: Tn
2087
+ valye: _n
2062
2088
  },
2063
2089
  {
2064
2090
  title: "One Minus Constant Alpha",
2065
- valye: _n
2091
+ valye: Tn
2066
2092
  }
2067
- ], ei = [
2093
+ ], ti = [
2068
2094
  {
2069
2095
  title: "Zero",
2070
2096
  valye: pn
@@ -2115,17 +2141,17 @@ const Xa = [
2115
2141
  },
2116
2142
  {
2117
2143
  title: "Constant Alpha",
2118
- valye: Tn
2144
+ valye: _n
2119
2145
  },
2120
2146
  {
2121
2147
  title: "One Minus Constant Alpha",
2122
- valye: _n
2148
+ valye: Tn
2123
2149
  }
2124
2150
  ];
2125
2151
  function dt(e, n) {
2126
2152
  e.needsUpdate = !0, e.type = "option", e.options = n;
2127
2153
  }
2128
- function ti(e, n, a, t) {
2154
+ function ni(e, n, a, t) {
2129
2155
  return {
2130
2156
  type: "boolean",
2131
2157
  title: _t(e),
@@ -2139,7 +2165,7 @@ function ti(e, n, a, t) {
2139
2165
  }
2140
2166
  };
2141
2167
  }
2142
- function ni(e, n, a, t) {
2168
+ function ai(e, n, a, t) {
2143
2169
  const i = {
2144
2170
  type: "number",
2145
2171
  title: _t(e),
@@ -2157,24 +2183,24 @@ function ni(e, n, a, t) {
2157
2183
  };
2158
2184
  switch (e) {
2159
2185
  case "blending":
2160
- dt(i, Za);
2186
+ dt(i, Ja);
2161
2187
  break;
2162
2188
  case "blendDst":
2163
- dt(i, ei);
2189
+ dt(i, ti);
2164
2190
  break;
2165
2191
  case "blendEquation":
2166
- dt(i, Ja);
2192
+ dt(i, Qa);
2167
2193
  break;
2168
2194
  case "blendSrc":
2169
- dt(i, Qa);
2195
+ dt(i, ei);
2170
2196
  break;
2171
2197
  case "side":
2172
- dt(i, Xa);
2198
+ dt(i, Za);
2173
2199
  break;
2174
2200
  }
2175
2201
  return Un(e) && (i.value = Number(n), i.type = "range", i.min = Math.min(0, i.value), i.max = Math.max(1, i.value), i.step = 0.01), i;
2176
2202
  }
2177
- function ai(e, n, a, t) {
2203
+ function ii(e, n, a, t) {
2178
2204
  const i = {
2179
2205
  type: "string",
2180
2206
  title: _t(e),
@@ -2191,16 +2217,16 @@ function ai(e, n, a, t) {
2191
2217
  i.latest = c;
2192
2218
  }), i;
2193
2219
  }
2194
- function ii(e) {
2220
+ function ri(e) {
2195
2221
  return e.x !== void 0 && e.y !== void 0 && e.z === void 0;
2196
2222
  }
2197
- function ri(e) {
2223
+ function si(e) {
2198
2224
  return e.x !== void 0 && e.y !== void 0 && e.z !== void 0 && e.w === void 0;
2199
2225
  }
2200
- function si(e) {
2226
+ function oi(e) {
2201
2227
  return e.x !== void 0 && e.y !== void 0 && e.z !== void 0 && e.w !== void 0;
2202
2228
  }
2203
- function nn(e) {
2229
+ function Nt(e) {
2204
2230
  e.sort((n, a) => n.title < a.title ? -1 : n.title > a.title ? 1 : 0);
2205
2231
  }
2206
2232
  function ht(e, n, a, t, i = "", o = !1) {
@@ -2214,8 +2240,8 @@ function ht(e, n, a, t, i = "", o = !1) {
2214
2240
  disabled: o,
2215
2241
  onChange: (d, f) => {
2216
2242
  t.updateObject(a.uuid, `material.${c}`, f);
2217
- const g = t.scene?.getObjectByProperty("uuid", a.uuid);
2218
- g !== void 0 && Q(g, `material.${c}`, f);
2243
+ const m = t.scene?.getObjectByProperty("uuid", a.uuid);
2244
+ m !== void 0 && Q(m, `material.${c}`, f);
2219
2245
  }
2220
2246
  };
2221
2247
  if (h === "number") {
@@ -2226,10 +2252,10 @@ function ht(e, n, a, t, i = "", o = !1) {
2226
2252
  value: n,
2227
2253
  step: 0.01,
2228
2254
  disabled: o,
2229
- onChange: (f, g) => {
2230
- t.updateObject(a.uuid, `material.${c}`, g);
2255
+ onChange: (f, m) => {
2256
+ t.updateObject(a.uuid, `material.${c}`, m);
2231
2257
  const x = t.scene?.getObjectByProperty("uuid", a.uuid);
2232
- x !== void 0 && Q(x, `material.${c}`, g);
2258
+ x !== void 0 && Q(x, `material.${c}`, m);
2233
2259
  }
2234
2260
  };
2235
2261
  return Un(u) && (d.type = "range", d.min = 0, d.max = 1), d;
@@ -2242,31 +2268,31 @@ function ht(e, n, a, t, i = "", o = !1) {
2242
2268
  value: n,
2243
2269
  disabled: o,
2244
2270
  onChange: (d, f) => {
2245
- const g = new Ft(f);
2246
- t.updateObject(a.uuid, `material.${c}`, g);
2271
+ const m = new Lt(f);
2272
+ t.updateObject(a.uuid, `material.${c}`, m);
2247
2273
  const x = t.scene?.getObjectByProperty("uuid", a.uuid);
2248
- x !== void 0 && Q(x, `material.${c}`, g);
2274
+ x !== void 0 && Q(x, `material.${c}`, m);
2249
2275
  }
2250
2276
  };
2251
2277
  if (Array.isArray(n)) {
2252
2278
  const d = [];
2253
2279
  for (const f in n) {
2254
- const g = n[f], x = `[${f.toString()}]`;
2255
- if (g.value !== void 0) {
2256
- const T = ht(`${x}.value`, g.value, a, t, c, o);
2257
- T !== void 0 && d.push(T);
2280
+ const m = n[f], x = `[${f.toString()}]`;
2281
+ if (m.value !== void 0) {
2282
+ const O = ht(`${x}.value`, m.value, a, t, c, o);
2283
+ O !== void 0 && d.push(O);
2258
2284
  } else {
2259
- const T = ht(x, g, a, t, c, o);
2260
- T !== void 0 && d.push(T);
2285
+ const O = ht(x, m, a, t, c, o);
2286
+ O !== void 0 && d.push(O);
2261
2287
  }
2262
2288
  }
2263
2289
  if (d.length > 0)
2264
- return nn(d), {
2290
+ return Nt(d), {
2265
2291
  title: u,
2266
2292
  items: d
2267
2293
  };
2268
2294
  } else {
2269
- if (ii(n))
2295
+ if (ri(n))
2270
2296
  return {
2271
2297
  title: u,
2272
2298
  prop: c,
@@ -2275,11 +2301,11 @@ function ht(e, n, a, t, i = "", o = !1) {
2275
2301
  disabled: o,
2276
2302
  onChange: (d, f) => {
2277
2303
  t.updateObject(a.uuid, `material.${c}`, f);
2278
- const g = t.scene?.getObjectByProperty("uuid", a.uuid);
2279
- g !== void 0 && Q(g, `material.${c}`, f);
2304
+ const m = t.scene?.getObjectByProperty("uuid", a.uuid);
2305
+ m !== void 0 && Q(m, `material.${c}`, f);
2280
2306
  }
2281
2307
  };
2282
- if (ri(n))
2308
+ if (si(n))
2283
2309
  return {
2284
2310
  title: u,
2285
2311
  prop: c,
@@ -2288,11 +2314,11 @@ function ht(e, n, a, t, i = "", o = !1) {
2288
2314
  disabled: o,
2289
2315
  onChange: (d, f) => {
2290
2316
  t.updateObject(a.uuid, `material.${c}`, f);
2291
- const g = t.scene?.getObjectByProperty("uuid", a.uuid);
2292
- g !== void 0 && Q(g, `material.${c}`, f);
2317
+ const m = t.scene?.getObjectByProperty("uuid", a.uuid);
2318
+ m !== void 0 && Q(m, `material.${c}`, f);
2293
2319
  }
2294
2320
  };
2295
- if (si(n))
2321
+ if (oi(n))
2296
2322
  return {
2297
2323
  title: u,
2298
2324
  prop: c,
@@ -2301,8 +2327,21 @@ function ht(e, n, a, t, i = "", o = !1) {
2301
2327
  disabled: o,
2302
2328
  onChange: (d, f) => {
2303
2329
  t.updateObject(a.uuid, `material.${c}`, f);
2304
- const g = t.scene?.getObjectByProperty("uuid", a.uuid);
2305
- g !== void 0 && Q(g, `material.${c}`, f);
2330
+ const m = t.scene?.getObjectByProperty("uuid", a.uuid);
2331
+ m !== void 0 && Q(m, `material.${c}`, f);
2332
+ }
2333
+ };
2334
+ if (n.isEuler)
2335
+ return {
2336
+ title: u,
2337
+ prop: c,
2338
+ type: "euler",
2339
+ value: n,
2340
+ disabled: o,
2341
+ onChange: (d, f) => {
2342
+ t.updateObject(a.uuid, `material.${c}`, f);
2343
+ const m = t.scene?.getObjectByProperty("uuid", a.uuid);
2344
+ m !== void 0 && Q(m, `material.${c}`, f);
2306
2345
  }
2307
2346
  };
2308
2347
  if (n.src !== void 0)
@@ -2312,11 +2351,11 @@ function ht(e, n, a, t, i = "", o = !1) {
2312
2351
  value: n,
2313
2352
  disabled: o,
2314
2353
  onChange: (d, f) => {
2315
- const g = qa(e), x = i.length > 0 ? `${i}.${g}` : g;
2354
+ const m = Ka(e), x = i.length > 0 ? `${i}.${m}` : m;
2316
2355
  t.createTexture(a.uuid, `material.${x}`, f);
2317
- const T = t.scene?.getObjectByProperty("uuid", a.uuid);
2318
- T !== void 0 && Ln(f).then((V) => {
2319
- Q(T, `material.${x}`, V), Q(T, "material.needsUpdate", !0);
2356
+ const O = t.scene?.getObjectByProperty("uuid", a.uuid);
2357
+ O !== void 0 && Ln(f).then((H) => {
2358
+ Q(O, `material.${x}`, H), Q(O, "material.needsUpdate", !0);
2320
2359
  });
2321
2360
  }
2322
2361
  };
@@ -2329,24 +2368,29 @@ function ht(e, n, a, t, i = "", o = !1) {
2329
2368
  disabled: o,
2330
2369
  onChange: (d, f) => {
2331
2370
  t.updateObject(a.uuid, `material.${c}`, f);
2332
- const g = t.scene?.getObjectByProperty("uuid", a.uuid);
2333
- g !== void 0 && Q(g, `material.${c}`, f);
2371
+ const m = t.scene?.getObjectByProperty("uuid", a.uuid);
2372
+ m !== void 0 && Q(m, `material.${c}`, f);
2334
2373
  }
2335
2374
  };
2336
2375
  {
2337
2376
  const d = [], f = e === "defines" || e === "extensions";
2338
- for (const g in n) {
2339
- const x = n[g];
2340
- if (x.value !== void 0) {
2341
- const T = ht(`${g}.value`, x.value, a, t, c, f);
2342
- T !== void 0 && d.push(T);
2343
- } else {
2344
- const T = ht(g, x, a, t, c, f);
2345
- T !== void 0 && d.push(T);
2377
+ try {
2378
+ for (const m in n) {
2379
+ const x = n[m];
2380
+ if (x !== void 0)
2381
+ if (x.value !== void 0) {
2382
+ const O = ht(`${m}.value`, x.value, a, t, c, f);
2383
+ O !== void 0 && d.push(O);
2384
+ } else {
2385
+ const O = ht(m, x, a, t, c, f);
2386
+ O !== void 0 && d.push(O);
2387
+ }
2346
2388
  }
2389
+ } catch {
2390
+ console.log("Issue cycling through material object:", e, n);
2347
2391
  }
2348
2392
  if (d.length > 0)
2349
- return nn(d), {
2393
+ return Nt(d), {
2350
2394
  title: u,
2351
2395
  items: d
2352
2396
  };
@@ -2354,25 +2398,25 @@ function ht(e, n, a, t, i = "", o = !1) {
2354
2398
  }
2355
2399
  }
2356
2400
  }
2357
- function an(e, n, a) {
2401
+ function nn(e, n, a) {
2358
2402
  const t = [];
2359
2403
  for (const i in e) {
2360
- if (!Wa(i))
2404
+ if (!qa(i))
2361
2405
  continue;
2362
2406
  const o = typeof e[i], u = e[i];
2363
2407
  if (o === "boolean")
2364
- t.push(ti(i, u, n, a));
2365
- else if (o === "number")
2366
2408
  t.push(ni(i, u, n, a));
2367
- else if (o === "string")
2409
+ else if (o === "number")
2368
2410
  t.push(ai(i, u, n, a));
2411
+ else if (o === "string")
2412
+ t.push(ii(i, u, n, a));
2369
2413
  else if (o === "object") {
2370
2414
  const c = ht(i, u, n, a);
2371
2415
  c !== void 0 && t.push(c);
2372
2416
  } else
2373
2417
  u !== void 0 && console.log("other:", i, o, u);
2374
2418
  }
2375
- return t.sort((i, o) => i.title < o.title ? -1 : i.title > o.title ? 1 : 0), t.push({
2419
+ return Nt(t), t.push({
2376
2420
  title: "Update Material",
2377
2421
  type: "button",
2378
2422
  onChange: () => {
@@ -2380,17 +2424,17 @@ function an(e, n, a) {
2380
2424
  }
2381
2425
  }), t;
2382
2426
  }
2383
- function oi(e, n) {
2427
+ function ci(e, n) {
2384
2428
  const a = e.material;
2385
2429
  if (Array.isArray(a)) {
2386
2430
  const t = [], i = a.length;
2387
2431
  for (let o = 0; o < i; o++)
2388
2432
  t.push(
2389
2433
  /* @__PURE__ */ l.jsx(
2390
- Xe,
2434
+ Ze,
2391
2435
  {
2392
2436
  title: `Material ${o}`,
2393
- items: an(a[o], e, n)
2437
+ items: nn(a[o], e, n)
2394
2438
  },
2395
2439
  `Material ${o}`
2396
2440
  )
@@ -2398,40 +2442,40 @@ function oi(e, n) {
2398
2442
  return /* @__PURE__ */ l.jsx(l.Fragment, { children: t });
2399
2443
  } else
2400
2444
  return /* @__PURE__ */ l.jsx(
2401
- Xe,
2445
+ Ze,
2402
2446
  {
2403
2447
  title: "Material",
2404
- items: an(a, e, n)
2448
+ items: nn(a, e, n)
2405
2449
  }
2406
2450
  );
2407
2451
  }
2408
- function ci(e) {
2409
- const [n, a] = q(e.defaultValue);
2410
- return ke(() => {
2452
+ function li(e) {
2453
+ const [n, a] = K(e.defaultValue);
2454
+ return Pe(() => {
2411
2455
  let t = !1, i = -1, o = 0, u = e.defaultValue;
2412
2456
  const c = (x) => {
2413
2457
  t = !0, o = Number(e.input.current?.value), i = x.clientX, document.addEventListener("mouseup", d, !1), document.addEventListener("mousemove", h, !1), document.addEventListener("contextmenu", d, !1);
2414
2458
  }, h = (x) => {
2415
2459
  if (!t)
2416
2460
  return;
2417
- const T = e.step !== void 0 ? e.step : 1, V = (x.clientX - i) * T;
2418
- u = Number((o + V).toFixed(4)), e.min !== void 0 && (u = Math.max(u, e.min)), e.max !== void 0 && (u = Math.min(u, e.max)), e.onChange !== void 0 && e.onChange(u), a(u);
2461
+ const O = e.step !== void 0 ? e.step : 1, H = (x.clientX - i) * O;
2462
+ u = Number((o + H).toFixed(4)), e.min !== void 0 && (u = Math.max(u, e.min)), e.max !== void 0 && (u = Math.min(u, e.max)), e.onChange !== void 0 && e.onChange(u), a(u);
2419
2463
  }, d = () => {
2420
2464
  t = !1, document.removeEventListener("mouseup", d), document.removeEventListener("mousemove", h), document.removeEventListener("contextmenu", d);
2421
2465
  }, f = (x) => {
2422
- const T = Number(x.target.value);
2423
- a(T);
2424
- }, g = (x) => {
2425
- const T = Number(x.target.value);
2426
- e.onChange !== void 0 && e.onChange(T), a(T);
2466
+ const O = Number(x.target.value);
2467
+ a(O);
2468
+ }, m = (x) => {
2469
+ const O = Number(x.target.value);
2470
+ e.onChange !== void 0 && e.onChange(O), a(O);
2427
2471
  };
2428
- return e.input.current?.addEventListener("input", f), e.label.current?.addEventListener("mousedown", c, !1), e.sliderRef !== void 0 && e.sliderRef.current?.addEventListener("input", g), () => {
2429
- e.input.current?.removeEventListener("input", f), e.label.current?.removeEventListener("mousedown", c), e.sliderRef !== void 0 && e.sliderRef.current?.removeEventListener("input", g), document.removeEventListener("mouseup", d), document.removeEventListener("mousemove", h), document.removeEventListener("contextmenu", d);
2472
+ return e.input.current?.addEventListener("input", f), e.label.current?.addEventListener("mousedown", c, !1), e.sliderRef !== void 0 && e.sliderRef.current?.addEventListener("input", m), () => {
2473
+ e.input.current?.removeEventListener("input", f), e.label.current?.removeEventListener("mousedown", c), e.sliderRef !== void 0 && e.sliderRef.current?.removeEventListener("input", m), document.removeEventListener("mouseup", d), document.removeEventListener("mousemove", h), document.removeEventListener("contextmenu", d);
2430
2474
  };
2431
2475
  }, []), n;
2432
2476
  }
2433
- function rt(e) {
2434
- const n = Z(null), a = Z(null), t = ci({
2477
+ function Xe(e) {
2478
+ const n = X(null), a = X(null), t = li({
2435
2479
  label: e.labelRef,
2436
2480
  input: n,
2437
2481
  sliderRef: a,
@@ -2487,42 +2531,42 @@ function rt(e) {
2487
2531
  max: e.max,
2488
2532
  step: e.step,
2489
2533
  ref: a,
2490
- onChange: Bt
2534
+ onChange: Ft
2491
2535
  }
2492
2536
  )
2493
2537
  ] })
2494
2538
  ] });
2495
2539
  }
2496
- function li(e) {
2497
- const n = Z(null), a = Z(null), t = Z(null), i = Z(null), o = Z(null), u = Z(null), [c, h] = q(e.value), [d, f] = q({
2540
+ function ui(e) {
2541
+ const n = X(null), a = X(null), t = X(null), i = X(null), o = X(null), u = X(null), [c, h] = K(e.value), [d, f] = K({
2498
2542
  min: Math.min(e.min, Math.min(e.value.x, e.value.y)),
2499
2543
  max: Math.max(e.max, Math.max(e.value.x, e.value.y))
2500
- }), [g, x] = q(!1);
2501
- function T() {
2502
- g || (window.addEventListener("mousemove", ee), window.addEventListener("mouseup", V), window.addEventListener("mouseup", V), x(!0));
2544
+ }), [m, x] = K(!1);
2545
+ function O() {
2546
+ m || (window.addEventListener("mousemove", te), window.addEventListener("mouseup", H), window.addEventListener("mouseup", H), x(!0));
2503
2547
  }
2504
- function V() {
2505
- window.removeEventListener("mousemove", ee), window.removeEventListener("mouseup", V), x(!1);
2548
+ function H() {
2549
+ window.removeEventListener("mousemove", te), window.removeEventListener("mouseup", H), x(!1);
2506
2550
  }
2507
- function ee(j) {
2508
- const K = o.current.getBoundingClientRect(), te = Ke(0, 99, j.clientX - K.left) / 99, Se = Ke(0, 99, j.clientY - K.top) / 99, z = mt(Qt(d.min, d.max, te), 3), ge = mt(Qt(d.min, d.max, Se), 3);
2509
- e.onChange({ target: { value: { x: z, y: ge } } }), h({ x: z, y: ge });
2551
+ function te(D) {
2552
+ const Z = o.current.getBoundingClientRect(), ne = Ke(0, 99, D.clientX - Z.left) / 99, Se = Ke(0, 99, D.clientY - Z.top) / 99, V = Qt(Jt(d.min, d.max, ne), 3), pe = Qt(Jt(d.min, d.max, Se), 3);
2553
+ e.onChange({ target: { value: { x: V, y: pe } } }), h({ x: V, y: pe });
2510
2554
  }
2511
- function pe(j) {
2512
- let K = c.x, te = c.y;
2513
- j.target === n.current ? K = Number(j.target.value) : te = Number(j.target.value), h({ x: K, y: te });
2555
+ function me(D) {
2556
+ let Z = c.x, ne = c.y;
2557
+ D.target === n.current ? Z = Number(D.target.value) : ne = Number(D.target.value), h({ x: Z, y: ne });
2514
2558
  }
2515
2559
  function re() {
2516
- const j = Number(t.current.value);
2517
- f({ min: j, max: d.max }), (c.x < j || c.y < j) && h({ x: Ke(j, d.max, c.x), y: Ke(j, d.max, c.y) });
2560
+ const D = Number(t.current.value);
2561
+ f({ min: D, max: d.max }), (c.x < D || c.y < D) && h({ x: Ke(D, d.max, c.x), y: Ke(D, d.max, c.y) });
2518
2562
  }
2519
2563
  function $() {
2520
- const j = Number(i.current.value);
2521
- f({ min: d.min, max: j }), (c.x > j || c.y > j) && h({ x: Ke(d.min, j, c.x), y: Ke(d.min, j, c.y) });
2564
+ const D = Number(i.current.value);
2565
+ f({ min: d.min, max: D }), (c.x > D || c.y > D) && h({ x: Ke(d.min, D, c.x), y: Ke(d.min, D, c.y) });
2522
2566
  }
2523
- return ke(() => {
2524
- const j = Jt(d.min, d.max, c.x), K = Jt(d.min, d.max, c.y);
2525
- u.current.style.left = `${j * 100}%`, u.current.style.top = `${K * 100}%`;
2567
+ return Pe(() => {
2568
+ const D = Zt(d.min, d.max, c.x), Z = Zt(d.min, d.max, c.y);
2569
+ u.current.style.left = `${D * 100}%`, u.current.style.top = `${Z * 100}%`;
2526
2570
  }, [d, c]), /* @__PURE__ */ l.jsxs("div", { className: "vector2", children: [
2527
2571
  /* @__PURE__ */ l.jsxs("div", { className: "fields", children: [
2528
2572
  /* @__PURE__ */ l.jsxs("div", { children: [
@@ -2536,7 +2580,7 @@ function li(e) {
2536
2580
  min: d.min,
2537
2581
  max: d.max,
2538
2582
  step: 0.01,
2539
- onChange: pe
2583
+ onChange: me
2540
2584
  }
2541
2585
  )
2542
2586
  ] }),
@@ -2551,7 +2595,7 @@ function li(e) {
2551
2595
  min: d.min,
2552
2596
  max: d.max,
2553
2597
  step: 0.01,
2554
- onChange: pe
2598
+ onChange: me
2555
2599
  }
2556
2600
  )
2557
2601
  ] }),
@@ -2582,78 +2626,101 @@ function li(e) {
2582
2626
  )
2583
2627
  ] })
2584
2628
  ] }),
2585
- /* @__PURE__ */ l.jsxs("div", { className: "input", ref: o, onMouseDown: T, onMouseUp: V, children: [
2629
+ /* @__PURE__ */ l.jsxs("div", { className: "input", ref: o, onMouseDown: O, onMouseUp: H, children: [
2586
2630
  /* @__PURE__ */ l.jsx("div", { className: "x" }),
2587
2631
  /* @__PURE__ */ l.jsx("div", { className: "y" }),
2588
2632
  /* @__PURE__ */ l.jsx("div", { className: "pt", ref: u })
2589
2633
  ] })
2590
2634
  ] });
2591
2635
  }
2592
- function ui(e) {
2593
- const n = e.value.x !== void 0, a = [];
2636
+ function an(e) {
2637
+ const n = e.value.isVector3 !== void 0, a = e.value.isEuler !== void 0, t = e.value.elements !== void 0, i = [];
2594
2638
  if (n) {
2595
- const t = le(() => e.value, []), i = (u, c) => {
2596
- t[u] = c, e.onChange({ target: { value: t } });
2639
+ const o = ie(() => e.value, []), u = (h, d) => {
2640
+ o[h] = d, e.onChange({ target: { value: o } });
2597
2641
  };
2598
- ["x", "y", "z"].forEach((u) => {
2599
- const c = Z(null);
2600
- a.push(
2642
+ ["x", "y", "z"].forEach((h) => {
2643
+ const d = X(null);
2644
+ i.push(
2601
2645
  /* @__PURE__ */ l.jsxs("div", { children: [
2602
- /* @__PURE__ */ l.jsx("label", { ref: c, children: u.toUpperCase() }),
2646
+ /* @__PURE__ */ l.jsx("label", { ref: d, children: h.toUpperCase() }),
2603
2647
  /* @__PURE__ */ l.jsx(
2604
- rt,
2648
+ Xe,
2605
2649
  {
2606
- value: t.x,
2650
+ value: o[h],
2607
2651
  type: "number",
2608
- prop: u,
2652
+ prop: h,
2609
2653
  step: 0.01,
2610
- labelRef: c,
2611
- onChange: i
2654
+ labelRef: d,
2655
+ onChange: u
2612
2656
  }
2613
2657
  )
2614
- ] }, u)
2658
+ ] }, h)
2615
2659
  );
2616
2660
  });
2617
- } else {
2618
- const t = le(() => e.value, []), i = (o, u) => {
2619
- const c = Number(o);
2620
- t.elements[c] = u, e.onChange({ target: { value: t } });
2661
+ } else if (a) {
2662
+ const o = ie(() => e.value, []), u = (h, d) => {
2663
+ o[h] = d, e.onChange({ target: { value: o } });
2621
2664
  };
2622
- for (let o = 0; o < 9; o++) {
2623
- const u = Z(null);
2624
- a.push(
2665
+ ["_x", "_y", "_z"].forEach((h) => {
2666
+ const d = X(null);
2667
+ i.push(
2625
2668
  /* @__PURE__ */ l.jsxs("div", { children: [
2626
- /* @__PURE__ */ l.jsx("label", { ref: u, children: o + 1 }),
2669
+ /* @__PURE__ */ l.jsx("label", { ref: d, children: h.substring(1).toUpperCase() }),
2627
2670
  /* @__PURE__ */ l.jsx(
2628
- rt,
2671
+ Xe,
2629
2672
  {
2630
- value: t.elements[o],
2673
+ value: o[h],
2631
2674
  type: "number",
2632
- prop: o.toString(),
2675
+ prop: h,
2633
2676
  step: 0.01,
2634
- labelRef: u,
2635
- onChange: i
2677
+ labelRef: d,
2678
+ onChange: u
2636
2679
  }
2637
2680
  )
2638
- ] }, o.toString())
2681
+ ] }, h)
2682
+ );
2683
+ });
2684
+ } else if (t) {
2685
+ const o = ie(() => e.value, []), u = (c, h) => {
2686
+ const d = Number(c);
2687
+ o.elements[d] = h, e.onChange({ target: { value: o } });
2688
+ };
2689
+ for (let c = 0; c < 9; c++) {
2690
+ const h = X(null);
2691
+ i.push(
2692
+ /* @__PURE__ */ l.jsxs("div", { children: [
2693
+ /* @__PURE__ */ l.jsx("label", { ref: h, children: c + 1 }),
2694
+ /* @__PURE__ */ l.jsx(
2695
+ Xe,
2696
+ {
2697
+ value: o.elements[c],
2698
+ type: "number",
2699
+ prop: c.toString(),
2700
+ step: 0.01,
2701
+ labelRef: h,
2702
+ onChange: u
2703
+ }
2704
+ )
2705
+ ] }, c.toString())
2639
2706
  );
2640
2707
  }
2641
2708
  }
2642
- return /* @__PURE__ */ l.jsx("div", { className: "grid3", children: a });
2709
+ return /* @__PURE__ */ l.jsx("div", { className: "grid3", children: i }, Math.random().toString());
2643
2710
  }
2644
2711
  function di(e) {
2645
2712
  const n = e.value.x !== void 0, a = [];
2646
2713
  if (n) {
2647
- const t = le(() => e.value, []), i = (u, c) => {
2714
+ const t = ie(() => e.value, []), i = (u, c) => {
2648
2715
  t[u] = c, e.onChange({ target: { value: t } });
2649
2716
  };
2650
2717
  ["x", "y", "z", "w"].forEach((u) => {
2651
- const c = Z(null);
2718
+ const c = X(null);
2652
2719
  a.push(
2653
2720
  /* @__PURE__ */ l.jsxs("div", { children: [
2654
2721
  /* @__PURE__ */ l.jsx("label", { ref: c, children: u.toUpperCase() }),
2655
2722
  /* @__PURE__ */ l.jsx(
2656
- rt,
2723
+ Xe,
2657
2724
  {
2658
2725
  value: t.x,
2659
2726
  type: "number",
@@ -2667,17 +2734,17 @@ function di(e) {
2667
2734
  );
2668
2735
  });
2669
2736
  } else {
2670
- const t = le(() => e.value, []), i = (o, u) => {
2737
+ const t = ie(() => e.value, []), i = (o, u) => {
2671
2738
  const c = Number(o);
2672
2739
  t.elements[c] = u, e.onChange({ target: { value: t } });
2673
2740
  };
2674
2741
  for (let o = 0; o < 16; o++) {
2675
- const u = Z(null);
2742
+ const u = X(null);
2676
2743
  a.push(
2677
2744
  /* @__PURE__ */ l.jsxs("div", { children: [
2678
2745
  /* @__PURE__ */ l.jsx("label", { ref: u, children: o + 1 }),
2679
2746
  /* @__PURE__ */ l.jsx(
2680
- rt,
2747
+ Xe,
2681
2748
  {
2682
2749
  value: t.elements[o],
2683
2750
  type: "number",
@@ -2696,15 +2763,15 @@ function di(e) {
2696
2763
  function ft(e) {
2697
2764
  let n = e.value;
2698
2765
  n !== void 0 && n.isColor !== void 0 && (n = Ra(e.value));
2699
- const [a, t] = q(n), i = Z(null), o = Z(null), u = (f) => {
2700
- let g = f.target.value;
2701
- e.type === "boolean" ? g = f.target.checked : e.type === "option" && (g = e.options[g].value), t(g), e.onChange !== void 0 && e.onChange(e.prop !== void 0 ? e.prop : e.title, g);
2766
+ const [a, t] = K(n), i = X(null), o = X(null), u = (f) => {
2767
+ let m = f.target.value;
2768
+ e.type === "boolean" ? m = f.target.checked : e.type === "option" && (m = e.options[m].value), t(m), e.onChange !== void 0 && e.onChange(e.prop !== void 0 ? e.prop : e.title, m);
2702
2769
  }, c = {};
2703
2770
  e.disabled && (c.opacity = 0.8);
2704
2771
  const h = e.type === "string" && (a.length > 100 || a.search(`
2705
2772
  `) > -1), d = h || e.type === "image" || e.type === "vector2";
2706
2773
  return /* @__PURE__ */ l.jsxs("div", { className: `field ${d ? "block" : ""}`, style: c, children: [
2707
- e.type !== "button" && /* @__PURE__ */ l.jsx("label", { ref: i, children: Ot(e.title) }, "fieldLabel"),
2774
+ e.type !== "button" && /* @__PURE__ */ l.jsx("label", { ref: i, children: Mt(e.title) }, "fieldLabel"),
2708
2775
  e.type === "string" && !h && /* @__PURE__ */ l.jsx(
2709
2776
  "input",
2710
2777
  {
@@ -2734,7 +2801,7 @@ function ft(e) {
2734
2801
  }
2735
2802
  ),
2736
2803
  e.type === "number" && /* @__PURE__ */ l.jsx(
2737
- rt,
2804
+ Xe,
2738
2805
  {
2739
2806
  value: a,
2740
2807
  type: e.type,
@@ -2748,7 +2815,7 @@ function ft(e) {
2748
2815
  }
2749
2816
  ),
2750
2817
  e.type === "range" && /* @__PURE__ */ l.jsx(
2751
- rt,
2818
+ Xe,
2752
2819
  {
2753
2820
  value: a,
2754
2821
  type: e.type,
@@ -2776,14 +2843,15 @@ function ft(e) {
2776
2843
  }
2777
2844
  ),
2778
2845
  e.type === "image" && /* @__PURE__ */ l.jsx("img", { ref: o, onClick: () => {
2779
- Ka().then((f) => {
2846
+ Xa().then((f) => {
2780
2847
  o.current.src = f, e.onChange !== void 0 && e.onChange(e.prop !== void 0 ? e.prop : e.title, f);
2781
2848
  });
2782
- }, src: a.length > 0 ? a : Ya }),
2783
- e.type === "option" && /* @__PURE__ */ l.jsx(l.Fragment, { children: /* @__PURE__ */ l.jsx("select", { onChange: u, disabled: e.disabled, defaultValue: e.value, children: e.options?.map((f, g) => /* @__PURE__ */ l.jsx("option", { value: f.value, children: Ot(f.title) }, g)) }) }),
2784
- e.type === "vector2" && /* @__PURE__ */ l.jsx(li, { value: a, min: 0, max: 1, onChange: u }),
2785
- e.type === "grid3" && /* @__PURE__ */ l.jsx(ui, { value: a, onChange: u }),
2786
- e.type === "grid4" && /* @__PURE__ */ l.jsx(di, { value: a, onChange: u })
2849
+ }, src: a.length > 0 ? a : Ga }),
2850
+ e.type === "option" && /* @__PURE__ */ l.jsx(l.Fragment, { children: /* @__PURE__ */ l.jsx("select", { onChange: u, disabled: e.disabled, defaultValue: e.value, children: e.options?.map((f, m) => /* @__PURE__ */ l.jsx("option", { value: f.value, children: Mt(f.title) }, m)) }) }),
2851
+ e.type === "vector2" && /* @__PURE__ */ l.jsx(ui, { value: a, min: 0, max: 1, onChange: u }),
2852
+ e.type === "grid3" && /* @__PURE__ */ l.jsx(an, { value: a, onChange: u }),
2853
+ e.type === "grid4" && /* @__PURE__ */ l.jsx(di, { value: a, onChange: u }),
2854
+ e.type === "euler" && /* @__PURE__ */ l.jsx(an, { value: a, onChange: u })
2787
2855
  ] });
2788
2856
  }
2789
2857
  function rn(e) {
@@ -2846,113 +2914,48 @@ function hi(e, n) {
2846
2914
  }
2847
2915
  });
2848
2916
  return /* @__PURE__ */ l.jsx(
2849
- Xe,
2917
+ Ze,
2850
2918
  {
2851
2919
  title: "Camera",
2852
2920
  items: a
2853
2921
  }
2854
2922
  );
2855
2923
  }
2856
- const fi = Math.PI / 180, mi = 180 / Math.PI;
2857
- function it(e, n, a, t, i) {
2858
- return t + (e - n) * (i - t) / (a - n);
2859
- }
2860
- function pi(e) {
2861
- return e * fi;
2862
- }
2863
- function Dt(e) {
2864
- return e * mi;
2865
- }
2866
- function gi(e, n) {
2924
+ function fi(e, n) {
2867
2925
  const a = new ia();
2868
2926
  a.elements = e.matrix;
2869
2927
  const t = new Y(), i = new ra(), o = new Y();
2870
2928
  e.uuid.length > 0 && (t.setFromMatrixPosition(a), i.setFromRotationMatrix(a), o.setFromMatrixScale(a));
2871
- const u = (h, d) => {
2872
- n.updateObject(e.uuid, h, d);
2929
+ const u = (c, h) => {
2930
+ const d = c === "rotation" ? { x: h._x, y: h._y, z: h._z } : h;
2931
+ n.updateObject(e.uuid, c, d);
2873
2932
  const f = n.scene?.getObjectByProperty("uuid", e.uuid);
2874
- f !== void 0 && Q(f, h, d);
2875
- }, c = (h, d) => {
2876
- u(h, pi(d));
2933
+ f !== void 0 && Q(f, c, d);
2877
2934
  };
2878
2935
  return /* @__PURE__ */ l.jsx(
2879
- Xe,
2936
+ Ze,
2880
2937
  {
2881
2938
  title: "Transform",
2882
2939
  items: [
2883
2940
  {
2884
- title: "Position X",
2885
- prop: "position.x",
2886
- type: "number",
2887
- value: t.x,
2888
- onChange: u
2889
- },
2890
- {
2891
- title: "Position Y",
2892
- prop: "position.y",
2893
- type: "number",
2894
- value: t.y,
2895
- onChange: u
2896
- },
2897
- {
2898
- title: "Position Z",
2899
- prop: "position.z",
2900
- type: "number",
2901
- value: t.z,
2902
- onChange: u
2903
- },
2904
- {
2905
- title: "Rotation X",
2906
- prop: "rotation.x",
2907
- type: "number",
2908
- value: mt(Dt(i.x)),
2909
- min: -360,
2910
- max: 360,
2911
- step: 0.1,
2912
- onChange: c
2913
- },
2914
- {
2915
- title: "Rotation Y",
2916
- prop: "rotation.y",
2917
- type: "number",
2918
- value: mt(Dt(i.y)),
2919
- min: -360,
2920
- max: 360,
2921
- step: 0.1,
2922
- onChange: c
2923
- },
2924
- {
2925
- title: "Rotation Z",
2926
- prop: "rotation.z",
2927
- type: "number",
2928
- value: mt(Dt(i.z)),
2929
- min: -360,
2930
- max: 360,
2931
- step: 0.1,
2932
- onChange: c
2933
- },
2934
- {
2935
- title: "Scale X",
2936
- prop: "scale.x",
2937
- type: "number",
2938
- value: o.x,
2939
- step: 0.01,
2941
+ title: "Position",
2942
+ prop: "position",
2943
+ type: "grid3",
2944
+ value: t,
2940
2945
  onChange: u
2941
2946
  },
2942
2947
  {
2943
- title: "Scale Y",
2944
- prop: "scale.y",
2945
- type: "number",
2946
- value: o.y,
2947
- step: 0.01,
2948
+ title: "Rotation",
2949
+ prop: "rotation",
2950
+ type: "grid3",
2951
+ value: i,
2948
2952
  onChange: u
2949
2953
  },
2950
2954
  {
2951
- title: "Scale Z",
2952
- prop: "scale.z",
2953
- type: "number",
2954
- value: o.z,
2955
- step: 0.01,
2955
+ title: "Scale",
2956
+ prop: "scale",
2957
+ type: "grid3",
2958
+ value: o,
2956
2959
  onChange: u
2957
2960
  }
2958
2961
  ]
@@ -2982,7 +2985,7 @@ function sn(e) {
2982
2985
  }
2983
2986
  return e;
2984
2987
  }
2985
- function vi(e, n) {
2988
+ function mi(e, n) {
2986
2989
  const a = [];
2987
2990
  if (e.lightInfo !== void 0)
2988
2991
  for (const t in e.lightInfo) {
@@ -2993,7 +2996,7 @@ function vi(e, n) {
2993
2996
  type: "color",
2994
2997
  value: i,
2995
2998
  onChange: (o, u) => {
2996
- const c = new Ft(u);
2999
+ const c = new Lt(u);
2997
3000
  n.updateObject(e.uuid, o, c);
2998
3001
  const h = n.scene?.getObjectByProperty("uuid", e.uuid);
2999
3002
  h !== void 0 && Q(h, o, c);
@@ -3012,14 +3015,14 @@ function vi(e, n) {
3012
3015
  }));
3013
3016
  }
3014
3017
  return /* @__PURE__ */ l.jsx(
3015
- Xe,
3018
+ Ze,
3016
3019
  {
3017
3020
  title: "Light",
3018
3021
  items: a
3019
3022
  }
3020
3023
  );
3021
3024
  }
3022
- function bi(e, n) {
3025
+ function pi(e, n) {
3023
3026
  const a = [], t = [];
3024
3027
  let i = 0;
3025
3028
  e.animations.forEach((c) => {
@@ -3083,7 +3086,7 @@ function bi(e, n) {
3083
3086
  });
3084
3087
  }
3085
3088
  }
3086
- return /* @__PURE__ */ l.jsx(Xe, { title: "Animation", items: a });
3089
+ return /* @__PURE__ */ l.jsx(Ze, { title: "Animation", items: a });
3087
3090
  }
3088
3091
  const $n = {
3089
3092
  name: "",
@@ -3098,9 +3101,9 @@ const $n = {
3098
3101
  lightInfo: void 0
3099
3102
  };
3100
3103
  let oe = { ...$n };
3101
- function yi(e) {
3102
- const [n, a] = q(-1);
3103
- ke(() => {
3104
+ function gi(e) {
3105
+ const [n, a] = K(-1);
3106
+ Pe(() => {
3104
3107
  function u(h) {
3105
3108
  oe = { ...h.value }, a(Date.now());
3106
3109
  }
@@ -3112,7 +3115,7 @@ function yi(e) {
3112
3115
  };
3113
3116
  }, []);
3114
3117
  const t = oe.type.toLowerCase(), i = oe.animations.length > 0 || oe.mixer !== void 0, o = t.search("mesh") > -1 || t.search("line") > -1 || t.search("points") > -1;
3115
- return /* @__PURE__ */ l.jsx($t, { label: "Inspector", children: /* @__PURE__ */ l.jsx("div", { id: "Inspector", className: e.class, children: oe.uuid.length > 0 && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
3118
+ return /* @__PURE__ */ l.jsx(Ut, { label: "Inspector", children: /* @__PURE__ */ l.jsx("div", { id: "Inspector", className: e.class, children: oe.uuid.length > 0 && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
3116
3119
  /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
3117
3120
  /* @__PURE__ */ l.jsx(
3118
3121
  ft,
@@ -3160,17 +3163,17 @@ function yi(e) {
3160
3163
  )
3161
3164
  ] }),
3162
3165
  /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
3163
- gi(oe, e.three),
3164
- i ? bi(oe, e.three) : null,
3166
+ fi(oe, e.three),
3167
+ i ? pi(oe, e.three) : null,
3165
3168
  t.search("camera") > -1 ? hi(oe, e.three) : null,
3166
- t.search("light") > -1 ? vi(oe, e.three) : null,
3167
- o ? oi(oe, e.three) : null
3169
+ t.search("light") > -1 ? mi(oe, e.three) : null,
3170
+ o ? ci(oe, e.three) : null
3168
3171
  ] })
3169
3172
  ] }) }, n) }, "Inspector");
3170
3173
  }
3171
- function $i(e) {
3172
- const [n, a] = q(e.scene);
3173
- ke(() => {
3174
+ function Fi(e) {
3175
+ const [n, a] = K(e.scene);
3176
+ Pe(() => {
3174
3177
  const o = (u) => {
3175
3178
  a(u.value);
3176
3179
  };
@@ -3180,11 +3183,11 @@ function $i(e) {
3180
3183
  }, []);
3181
3184
  const t = n !== null, i = "Hierarchy - " + (t ? `${n?.name}` : "No Scene");
3182
3185
  return /* @__PURE__ */ l.jsxs("div", { id: "SidePanel", children: [
3183
- /* @__PURE__ */ l.jsx($t, { label: i, open: !0, children: /* @__PURE__ */ l.jsx(l.Fragment, { children: t && /* @__PURE__ */ l.jsx(Va, { child: n, three: e.three }) }) }),
3184
- /* @__PURE__ */ l.jsx(yi, { three: e.three })
3186
+ /* @__PURE__ */ l.jsx(Ut, { label: i, open: !0, children: /* @__PURE__ */ l.jsx(l.Fragment, { children: t && /* @__PURE__ */ l.jsx(Ya, { child: n, three: e.three }) }) }),
3187
+ /* @__PURE__ */ l.jsx(gi, { three: e.three })
3185
3188
  ] }, "SidePanel");
3186
3189
  }
3187
- function zi(e) {
3190
+ function Bi(e) {
3188
3191
  function n() {
3189
3192
  return e.three.scene === void 0 ? (console.log("No scene:", e.three), !1) : !0;
3190
3193
  }
@@ -3201,8 +3204,8 @@ function zi(e) {
3201
3204
  }, i = (c) => {
3202
3205
  if (!n())
3203
3206
  return;
3204
- const h = c.value, { key: d, value: f, uuid: g } = h;
3205
- t(g, d, f);
3207
+ const h = c.value, { key: d, value: f, uuid: m } = h;
3208
+ t(m, d, f);
3206
3209
  }, o = (c) => {
3207
3210
  if (!n())
3208
3211
  return;
@@ -3213,26 +3216,26 @@ function zi(e) {
3213
3216
  }, u = (c) => {
3214
3217
  if (!n())
3215
3218
  return;
3216
- const { key: h, uuid: d, value: f, subitem: g } = c.value, x = e.three.scene?.getObjectByProperty("uuid", d);
3219
+ const { key: h, uuid: d, value: f, subitem: m } = c.value, x = e.three.scene?.getObjectByProperty("uuid", d);
3217
3220
  if (x !== void 0)
3218
3221
  try {
3219
- g !== void 0 ? Ia(x, g)[h](f) : x[h](f);
3220
- } catch (T) {
3221
- console.log("Error requesting method:"), console.log(T), console.log(h), console.log(f);
3222
+ m !== void 0 ? Ia(x, m)[h](f) : x[h](f);
3223
+ } catch (O) {
3224
+ console.log("Error requesting method:"), console.log(O), console.log(h), console.log(f);
3222
3225
  }
3223
3226
  };
3224
- return ke(() => (N.addEventListener(L.GET_OBJECT, a), N.addEventListener(L.UPDATE_OBJECT, i), N.addEventListener(L.CREATE_TEXTURE, o), N.addEventListener(L.REQUEST_METHOD, u), () => {
3227
+ return Pe(() => (N.addEventListener(L.GET_OBJECT, a), N.addEventListener(L.UPDATE_OBJECT, i), N.addEventListener(L.CREATE_TEXTURE, o), N.addEventListener(L.REQUEST_METHOD, u), () => {
3225
3228
  N.removeEventListener(L.GET_OBJECT, a), N.removeEventListener(L.UPDATE_OBJECT, i), N.removeEventListener(L.CREATE_TEXTURE, o), N.removeEventListener(L.REQUEST_METHOD, u);
3226
3229
  }), []), null;
3227
3230
  }
3228
- class xi extends sa {
3231
+ class vi extends sa {
3229
3232
  constructor(n, a) {
3230
- const t = [1, 1, 0, -1, 1, 0, -1, -1, 0, 1, -1, 0, 1, 1, 0], i = new Gt();
3231
- i.setAttribute("position", new Wt(t, 3)), i.computeBoundingSphere();
3233
+ const t = [1, 1, 0, -1, 1, 0, -1, -1, 0, 1, -1, 0, 1, 1, 0], i = new Yt();
3234
+ i.setAttribute("position", new Gt(t, 3)), i.computeBoundingSphere();
3232
3235
  const o = new oa({ fog: !1 });
3233
3236
  super(i, o), this.light = n, this.color = a, this.type = "RectAreaLightHelper";
3234
- const u = [1, 1, 0, -1, 1, 0, -1, -1, 0, 1, 1, 0, -1, -1, 0, 1, -1, 0], c = new Gt();
3235
- c.setAttribute("position", new Wt(u, 3)), c.computeBoundingSphere(), this.add(new Rn(c, new An({ side: fn, fog: !1 })));
3237
+ const u = [1, 1, 0, -1, 1, 0, -1, -1, 0, 1, 1, 0, -1, -1, 0, 1, -1, 0], c = new Yt();
3238
+ c.setAttribute("position", new Gt(u, 3)), c.computeBoundingSphere(), this.add(new Rn(c, new An({ side: fn, fog: !1 })));
3236
3239
  }
3237
3240
  updateMatrixWorld() {
3238
3241
  if (this.scale.set(0.5 * this.light.width, 0.5 * this.light.height, 1), this.color !== void 0)
@@ -3248,10 +3251,10 @@ class xi extends sa {
3248
3251
  this.geometry.dispose(), this.material.dispose(), this.children[0].geometry.dispose(), this.children[0].material.dispose();
3249
3252
  }
3250
3253
  }
3251
- const on = { type: "change" }, It = { type: "start" }, cn = { type: "end" }, Ct = new ca(), ln = new la(), Ei = Math.cos(70 * ua.DEG2RAD);
3252
- class Ci extends dn {
3254
+ const on = { type: "change" }, jt = { type: "start" }, cn = { type: "end" }, Et = new ca(), ln = new la(), bi = Math.cos(70 * ua.DEG2RAD);
3255
+ class yi extends dn {
3253
3256
  constructor(n, a) {
3254
- super(), this.object = n, this.domElement = a, this.domElement.style.touchAction = "none", this.enabled = !0, this.target = new Y(), this.cursor = new Y(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 1 / 0, this.minTargetRadius = 0, this.maxTargetRadius = 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 = !0, this.keyPanSpeed = 7, this.zoomToCursor = !1, this.autoRotate = !1, this.autoRotateSpeed = 2, this.keys = { LEFT: "ArrowLeft", UP: "ArrowUp", RIGHT: "ArrowRight", BOTTOM: "ArrowDown" }, this.mouseButtons = { LEFT: tt.ROTATE, MIDDLE: tt.DOLLY, RIGHT: tt.PAN }, this.touches = { ONE: nt.ROTATE, TWO: nt.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this.getPolarAngle = function() {
3257
+ super(), this.object = n, this.domElement = a, this.domElement.style.touchAction = "none", this.enabled = !0, this.target = new Y(), this.cursor = new Y(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 1 / 0, this.minTargetRadius = 0, this.maxTargetRadius = 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 = !0, this.keyPanSpeed = 7, this.zoomToCursor = !1, this.autoRotate = !1, this.autoRotateSpeed = 2, this.keys = { LEFT: "ArrowLeft", UP: "ArrowUp", RIGHT: "ArrowRight", BOTTOM: "ArrowDown" }, this.mouseButtons = { LEFT: nt.ROTATE, MIDDLE: nt.DOLLY, RIGHT: nt.PAN }, this.touches = { ONE: at.ROTATE, TWO: at.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this.getPolarAngle = function() {
3255
3258
  return c.phi;
3256
3259
  }, this.getAzimuthalAngle = function() {
3257
3260
  return c.theta;
@@ -3266,44 +3269,44 @@ class Ci extends dn {
3266
3269
  }, this.reset = function() {
3267
3270
  t.target.copy(t.target0), t.object.position.copy(t.position0), t.object.zoom = t.zoom0, t.object.updateProjectionMatrix(), t.dispatchEvent(on), t.update(), o = i.NONE;
3268
3271
  }, this.update = function() {
3269
- const s = new Y(), y = new qt().setFromUnitVectors(n.up, new Y(0, 1, 0)), _ = y.clone().invert(), k = new Y(), J = new qt(), ye = new Y(), he = 2 * Math.PI;
3270
- return function(yt = null) {
3271
- const xt = t.object.position;
3272
- s.copy(xt).sub(t.target), s.applyQuaternion(y), c.setFromVector3(s), t.autoRotate && o === i.NONE && ve(Te(yt)), t.enableDamping ? (c.theta += h.theta * t.dampingFactor, c.phi += h.phi * t.dampingFactor) : (c.theta += h.theta, c.phi += h.phi);
3272
+ const s = new Y(), y = new Wt().setFromUnitVectors(n.up, new Y(0, 1, 0)), T = y.clone().invert(), j = new Y(), ee = new Wt(), ye = new Y(), de = 2 * Math.PI;
3273
+ return function(bt = null) {
3274
+ const yt = t.object.position;
3275
+ s.copy(yt).sub(t.target), s.applyQuaternion(y), c.setFromVector3(s), t.autoRotate && o === i.NONE && ve(_e(bt)), t.enableDamping ? (c.theta += h.theta * t.dampingFactor, c.phi += h.phi * t.dampingFactor) : (c.theta += h.theta, c.phi += h.phi);
3273
3276
  let xe = t.minAzimuthAngle, Ee = t.maxAzimuthAngle;
3274
- isFinite(xe) && isFinite(Ee) && (xe < -Math.PI ? xe += he : xe > Math.PI && (xe -= he), Ee < -Math.PI ? Ee += he : Ee > Math.PI && (Ee -= he), xe <= Ee ? c.theta = Math.max(xe, Math.min(Ee, c.theta)) : c.theta = c.theta > (xe + Ee) / 2 ? Math.max(xe, c.theta) : Math.min(Ee, c.theta)), c.phi = Math.max(t.minPolarAngle, Math.min(t.maxPolarAngle, c.phi)), c.makeSafe(), t.enableDamping === !0 ? t.target.addScaledVector(f, t.dampingFactor) : t.target.add(f), t.target.sub(t.cursor), t.target.clampLength(t.minTargetRadius, t.maxTargetRadius), t.target.add(t.cursor);
3277
+ isFinite(xe) && isFinite(Ee) && (xe < -Math.PI ? xe += de : xe > Math.PI && (xe -= de), Ee < -Math.PI ? Ee += de : Ee > Math.PI && (Ee -= de), xe <= Ee ? c.theta = Math.max(xe, Math.min(Ee, c.theta)) : c.theta = c.theta > (xe + Ee) / 2 ? Math.max(xe, c.theta) : Math.min(Ee, c.theta)), c.phi = Math.max(t.minPolarAngle, Math.min(t.maxPolarAngle, c.phi)), c.makeSafe(), t.enableDamping === !0 ? t.target.addScaledVector(f, t.dampingFactor) : t.target.add(f), t.target.sub(t.cursor), t.target.clampLength(t.minTargetRadius, t.maxTargetRadius), t.target.add(t.cursor);
3275
3278
  let We = !1;
3276
3279
  if (t.zoomToCursor && Se || t.object.isOrthographicCamera)
3277
- c.radius = Pe(c.radius);
3280
+ c.radius = ke(c.radius);
3278
3281
  else {
3279
3282
  const Oe = c.radius;
3280
- c.radius = Pe(c.radius * d), We = Oe != c.radius;
3283
+ c.radius = ke(c.radius * d), We = Oe != c.radius;
3281
3284
  }
3282
- if (s.setFromSpherical(c), s.applyQuaternion(_), xt.copy(t.target).add(s), t.object.lookAt(t.target), t.enableDamping === !0 ? (h.theta *= 1 - t.dampingFactor, h.phi *= 1 - t.dampingFactor, f.multiplyScalar(1 - t.dampingFactor)) : (h.set(0, 0, 0), f.set(0, 0, 0)), t.zoomToCursor && Se) {
3285
+ if (s.setFromSpherical(c), s.applyQuaternion(T), yt.copy(t.target).add(s), t.object.lookAt(t.target), t.enableDamping === !0 ? (h.theta *= 1 - t.dampingFactor, h.phi *= 1 - t.dampingFactor, f.multiplyScalar(1 - t.dampingFactor)) : (h.set(0, 0, 0), f.set(0, 0, 0)), t.zoomToCursor && Se) {
3283
3286
  let Oe = null;
3284
3287
  if (t.object.isPerspectiveCamera) {
3285
- const ze = s.length();
3286
- Oe = Pe(ze * d);
3287
- const Qe = ze - Oe;
3288
- t.object.position.addScaledVector(K, Qe), t.object.updateMatrixWorld(), We = !!Qe;
3288
+ const Ve = s.length();
3289
+ Oe = ke(Ve * d);
3290
+ const et = Ve - Oe;
3291
+ t.object.position.addScaledVector(Z, et), t.object.updateMatrixWorld(), We = !!et;
3289
3292
  } else if (t.object.isOrthographicCamera) {
3290
- const ze = new Y(te.x, te.y, 0);
3291
- ze.unproject(t.object);
3292
- const Qe = t.object.zoom;
3293
- t.object.zoom = Math.max(t.minZoom, Math.min(t.maxZoom, t.object.zoom / d)), t.object.updateProjectionMatrix(), We = Qe !== t.object.zoom;
3294
- const Et = new Y(te.x, te.y, 0);
3295
- Et.unproject(t.object), t.object.position.sub(Et).add(ze), t.object.updateMatrixWorld(), Oe = s.length();
3293
+ const Ve = new Y(ne.x, ne.y, 0);
3294
+ Ve.unproject(t.object);
3295
+ const et = t.object.zoom;
3296
+ t.object.zoom = Math.max(t.minZoom, Math.min(t.maxZoom, t.object.zoom / d)), t.object.updateProjectionMatrix(), We = et !== t.object.zoom;
3297
+ const xt = new Y(ne.x, ne.y, 0);
3298
+ xt.unproject(t.object), t.object.position.sub(xt).add(Ve), t.object.updateMatrixWorld(), Oe = s.length();
3296
3299
  } else
3297
3300
  console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), t.zoomToCursor = !1;
3298
- Oe !== null && (this.screenSpacePanning ? t.target.set(0, 0, -1).transformDirection(t.object.matrix).multiplyScalar(Oe).add(t.object.position) : (Ct.origin.copy(t.object.position), Ct.direction.set(0, 0, -1).transformDirection(t.object.matrix), Math.abs(t.object.up.dot(Ct.direction)) < Ei ? n.lookAt(t.target) : (ln.setFromNormalAndCoplanarPoint(t.object.up, t.target), Ct.intersectPlane(ln, t.target))));
3301
+ Oe !== null && (this.screenSpacePanning ? t.target.set(0, 0, -1).transformDirection(t.object.matrix).multiplyScalar(Oe).add(t.object.position) : (Et.origin.copy(t.object.position), Et.direction.set(0, 0, -1).transformDirection(t.object.matrix), Math.abs(t.object.up.dot(Et.direction)) < bi ? n.lookAt(t.target) : (ln.setFromNormalAndCoplanarPoint(t.object.up, t.target), Et.intersectPlane(ln, t.target))));
3299
3302
  } else if (t.object.isOrthographicCamera) {
3300
3303
  const Oe = t.object.zoom;
3301
3304
  t.object.zoom = Math.max(t.minZoom, Math.min(t.maxZoom, t.object.zoom / d)), Oe !== t.object.zoom && (t.object.updateProjectionMatrix(), We = !0);
3302
3305
  }
3303
- return d = 1, Se = !1, We || k.distanceToSquared(t.object.position) > u || 8 * (1 - J.dot(t.object.quaternion)) > u || ye.distanceToSquared(t.target) > u ? (t.dispatchEvent(on), k.copy(t.object.position), J.copy(t.object.quaternion), ye.copy(t.target), !0) : !1;
3306
+ return d = 1, Se = !1, We || j.distanceToSquared(t.object.position) > u || 8 * (1 - ee.dot(t.object.quaternion)) > u || ye.distanceToSquared(t.target) > u ? (t.dispatchEvent(on), j.copy(t.object.position), ee.copy(t.object.quaternion), ye.copy(t.target), !0) : !1;
3304
3307
  };
3305
3308
  }(), this.dispose = function() {
3306
- t.domElement.removeEventListener("contextmenu", Je), t.domElement.removeEventListener("pointerdown", O), t.domElement.removeEventListener("pointercancel", G), t.domElement.removeEventListener("wheel", pt), t.domElement.removeEventListener("pointermove", B), t.domElement.removeEventListener("pointerup", G), t.domElement.getRootNode().removeEventListener("keydown", st, { capture: !0 }), t._domElementKeyEvents !== null && (t._domElementKeyEvents.removeEventListener("keydown", ot), t._domElementKeyEvents = null);
3309
+ t.domElement.removeEventListener("contextmenu", Qe), t.domElement.removeEventListener("pointerdown", M), t.domElement.removeEventListener("pointercancel", W), t.domElement.removeEventListener("wheel", mt), t.domElement.removeEventListener("pointermove", B), t.domElement.removeEventListener("pointerup", W), t.domElement.getRootNode().removeEventListener("keydown", st, { capture: !0 }), t._domElementKeyEvents !== null && (t._domElementKeyEvents.removeEventListener("keydown", ot), t._domElementKeyEvents = null);
3307
3310
  };
3308
3311
  const t = this, i = {
3309
3312
  NONE: -1,
@@ -3316,46 +3319,46 @@ class Ci extends dn {
3316
3319
  TOUCH_DOLLY_ROTATE: 6
3317
3320
  };
3318
3321
  let o = i.NONE;
3319
- const u = 1e-6, c = new Kt(), h = new Kt();
3322
+ const u = 1e-6, c = new qt(), h = new qt();
3320
3323
  let d = 1;
3321
- const f = new Y(), g = new me(), x = new me(), T = new me(), V = new me(), ee = new me(), pe = new me(), re = new me(), $ = new me(), j = new me(), K = new Y(), te = new me();
3324
+ const f = new Y(), m = new fe(), x = new fe(), O = new fe(), H = new fe(), te = new fe(), me = new fe(), re = new fe(), $ = new fe(), D = new fe(), Z = new Y(), ne = new fe();
3322
3325
  let Se = !1;
3323
- const z = [], ge = {};
3324
- let ue = !1;
3325
- function Te(s) {
3326
+ const V = [], pe = {};
3327
+ let le = !1;
3328
+ function _e(s) {
3326
3329
  return s !== null ? 2 * Math.PI / 60 * t.autoRotateSpeed * s : 2 * Math.PI / 60 / 60 * t.autoRotateSpeed;
3327
3330
  }
3328
- function _e(s) {
3331
+ function Te(s) {
3329
3332
  const y = Math.abs(s * 0.01);
3330
3333
  return Math.pow(0.95, t.zoomSpeed * y);
3331
3334
  }
3332
3335
  function ve(s) {
3333
3336
  h.theta -= s;
3334
3337
  }
3335
- function D(s) {
3338
+ function I(s) {
3336
3339
  h.phi -= s;
3337
3340
  }
3338
3341
  const be = function() {
3339
3342
  const s = new Y();
3340
- return function(_, k) {
3341
- s.setFromMatrixColumn(k, 0), s.multiplyScalar(-_), f.add(s);
3343
+ return function(T, j) {
3344
+ s.setFromMatrixColumn(j, 0), s.multiplyScalar(-T), f.add(s);
3342
3345
  };
3343
- }(), C = function() {
3346
+ }(), S = function() {
3344
3347
  const s = new Y();
3345
- return function(_, k) {
3346
- t.screenSpacePanning === !0 ? s.setFromMatrixColumn(k, 1) : (s.setFromMatrixColumn(k, 0), s.crossVectors(t.object.up, s)), s.multiplyScalar(_), f.add(s);
3348
+ return function(T, j) {
3349
+ t.screenSpacePanning === !0 ? s.setFromMatrixColumn(j, 1) : (s.setFromMatrixColumn(j, 0), s.crossVectors(t.object.up, s)), s.multiplyScalar(T), f.add(s);
3347
3350
  };
3348
3351
  }(), we = function() {
3349
3352
  const s = new Y();
3350
- return function(_, k) {
3351
- const J = t.domElement;
3353
+ return function(T, j) {
3354
+ const ee = t.domElement;
3352
3355
  if (t.object.isPerspectiveCamera) {
3353
3356
  const ye = t.object.position;
3354
3357
  s.copy(ye).sub(t.target);
3355
- let he = s.length();
3356
- he *= Math.tan(t.object.fov / 2 * Math.PI / 180), be(2 * _ * he / J.clientHeight, t.object.matrix), C(2 * k * he / J.clientHeight, t.object.matrix);
3358
+ let de = s.length();
3359
+ de *= Math.tan(t.object.fov / 2 * Math.PI / 180), be(2 * T * de / ee.clientHeight, t.object.matrix), S(2 * j * de / ee.clientHeight, t.object.matrix);
3357
3360
  } else
3358
- t.object.isOrthographicCamera ? (be(_ * (t.object.right - t.object.left) / t.object.zoom / J.clientWidth, t.object.matrix), C(k * (t.object.top - t.object.bottom) / t.object.zoom / J.clientHeight, t.object.matrix)) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."), t.enablePan = !1);
3361
+ t.object.isOrthographicCamera ? (be(T * (t.object.right - t.object.left) / t.object.zoom / ee.clientWidth, t.object.matrix), S(j * (t.object.top - t.object.bottom) / t.object.zoom / ee.clientHeight, t.object.matrix)) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."), t.enablePan = !1);
3359
3362
  };
3360
3363
  }();
3361
3364
  function Re(s) {
@@ -3368,43 +3371,43 @@ class Ci extends dn {
3368
3371
  if (!t.zoomToCursor)
3369
3372
  return;
3370
3373
  Se = !0;
3371
- const _ = t.domElement.getBoundingClientRect(), k = s - _.left, J = y - _.top, ye = _.width, he = _.height;
3372
- te.x = k / ye * 2 - 1, te.y = -(J / he) * 2 + 1, K.set(te.x, te.y, 1).unproject(t.object).sub(t.object.position).normalize();
3374
+ const T = t.domElement.getBoundingClientRect(), j = s - T.left, ee = y - T.top, ye = T.width, de = T.height;
3375
+ ne.x = j / ye * 2 - 1, ne.y = -(ee / de) * 2 + 1, Z.set(ne.x, ne.y, 1).unproject(t.object).sub(t.object.position).normalize();
3373
3376
  }
3374
- function Pe(s) {
3377
+ function ke(s) {
3375
3378
  return Math.max(t.minDistance, Math.min(t.maxDistance, s));
3376
3379
  }
3377
3380
  function De(s) {
3378
- g.set(s.clientX, s.clientY);
3381
+ m.set(s.clientX, s.clientY);
3379
3382
  }
3380
3383
  function Fe(s) {
3381
3384
  Ae(s.clientX, s.clientX), re.set(s.clientX, s.clientY);
3382
3385
  }
3383
3386
  function Be(s) {
3384
- V.set(s.clientX, s.clientY);
3387
+ H.set(s.clientX, s.clientY);
3385
3388
  }
3386
- function ne(s) {
3387
- x.set(s.clientX, s.clientY), T.subVectors(x, g).multiplyScalar(t.rotateSpeed);
3389
+ function ae(s) {
3390
+ x.set(s.clientX, s.clientY), O.subVectors(x, m).multiplyScalar(t.rotateSpeed);
3388
3391
  const y = t.domElement;
3389
- ve(2 * Math.PI * T.x / y.clientHeight), D(2 * Math.PI * T.y / y.clientHeight), g.copy(x), t.update();
3392
+ ve(2 * Math.PI * O.x / y.clientHeight), I(2 * Math.PI * O.y / y.clientHeight), m.copy(x), t.update();
3390
3393
  }
3391
3394
  function Me(s) {
3392
- $.set(s.clientX, s.clientY), j.subVectors($, re), j.y > 0 ? Re(_e(j.y)) : j.y < 0 && je(_e(j.y)), re.copy($), t.update();
3395
+ $.set(s.clientX, s.clientY), D.subVectors($, re), D.y > 0 ? Re(Te(D.y)) : D.y < 0 && je(Te(D.y)), re.copy($), t.update();
3393
3396
  }
3394
3397
  function Ye(s) {
3395
- ee.set(s.clientX, s.clientY), pe.subVectors(ee, V).multiplyScalar(t.panSpeed), we(pe.x, pe.y), V.copy(ee), t.update();
3398
+ te.set(s.clientX, s.clientY), me.subVectors(te, H).multiplyScalar(t.panSpeed), we(me.x, me.y), H.copy(te), t.update();
3396
3399
  }
3397
3400
  function Ge(s) {
3398
- Ae(s.clientX, s.clientY), s.deltaY < 0 ? je(_e(s.deltaY)) : s.deltaY > 0 && Re(_e(s.deltaY)), t.update();
3401
+ Ae(s.clientX, s.clientY), s.deltaY < 0 ? je(Te(s.deltaY)) : s.deltaY > 0 && Re(Te(s.deltaY)), t.update();
3399
3402
  }
3400
- function de(s) {
3403
+ function ue(s) {
3401
3404
  let y = !1;
3402
3405
  switch (s.code) {
3403
3406
  case t.keys.UP:
3404
- s.ctrlKey || s.metaKey || s.shiftKey ? D(2 * Math.PI * t.rotateSpeed / t.domElement.clientHeight) : we(0, t.keyPanSpeed), y = !0;
3407
+ s.ctrlKey || s.metaKey || s.shiftKey ? I(2 * Math.PI * t.rotateSpeed / t.domElement.clientHeight) : we(0, t.keyPanSpeed), y = !0;
3405
3408
  break;
3406
3409
  case t.keys.BOTTOM:
3407
- s.ctrlKey || s.metaKey || s.shiftKey ? D(-2 * Math.PI * t.rotateSpeed / t.domElement.clientHeight) : we(0, -t.keyPanSpeed), y = !0;
3410
+ s.ctrlKey || s.metaKey || s.shiftKey ? I(-2 * Math.PI * t.rotateSpeed / t.domElement.clientHeight) : we(0, -t.keyPanSpeed), y = !0;
3408
3411
  break;
3409
3412
  case t.keys.LEFT:
3410
3413
  s.ctrlKey || s.metaKey || s.shiftKey ? ve(2 * Math.PI * t.rotateSpeed / t.domElement.clientHeight) : we(t.keyPanSpeed, 0), y = !0;
@@ -3415,78 +3418,78 @@ class Ci extends dn {
3415
3418
  }
3416
3419
  y && (s.preventDefault(), t.update());
3417
3420
  }
3418
- function p(s) {
3419
- if (z.length === 1)
3420
- g.set(s.pageX, s.pageY);
3421
+ function g(s) {
3422
+ if (V.length === 1)
3423
+ m.set(s.pageX, s.pageY);
3421
3424
  else {
3422
- const y = $e(s), _ = 0.5 * (s.pageX + y.x), k = 0.5 * (s.pageY + y.y);
3423
- g.set(_, k);
3425
+ const y = $e(s), T = 0.5 * (s.pageX + y.x), j = 0.5 * (s.pageY + y.y);
3426
+ m.set(T, j);
3424
3427
  }
3425
3428
  }
3426
3429
  function v(s) {
3427
- if (z.length === 1)
3428
- V.set(s.pageX, s.pageY);
3430
+ if (V.length === 1)
3431
+ H.set(s.pageX, s.pageY);
3429
3432
  else {
3430
- const y = $e(s), _ = 0.5 * (s.pageX + y.x), k = 0.5 * (s.pageY + y.y);
3431
- V.set(_, k);
3433
+ const y = $e(s), T = 0.5 * (s.pageX + y.x), j = 0.5 * (s.pageY + y.y);
3434
+ H.set(T, j);
3432
3435
  }
3433
3436
  }
3434
- function S(s) {
3435
- const y = $e(s), _ = s.pageX - y.x, k = s.pageY - y.y, J = Math.sqrt(_ * _ + k * k);
3436
- re.set(0, J);
3437
+ function w(s) {
3438
+ const y = $e(s), T = s.pageX - y.x, j = s.pageY - y.y, ee = Math.sqrt(T * T + j * j);
3439
+ re.set(0, ee);
3437
3440
  }
3438
- function P(s) {
3439
- t.enableZoom && S(s), t.enablePan && v(s);
3441
+ function k(s) {
3442
+ t.enableZoom && w(s), t.enablePan && v(s);
3440
3443
  }
3441
- function ae(s) {
3442
- t.enableZoom && S(s), t.enableRotate && p(s);
3444
+ function ge(s) {
3445
+ t.enableZoom && w(s), t.enableRotate && g(s);
3443
3446
  }
3444
- function M(s) {
3445
- if (z.length == 1)
3447
+ function _(s) {
3448
+ if (V.length == 1)
3446
3449
  x.set(s.pageX, s.pageY);
3447
3450
  else {
3448
- const _ = $e(s), k = 0.5 * (s.pageX + _.x), J = 0.5 * (s.pageY + _.y);
3449
- x.set(k, J);
3451
+ const T = $e(s), j = 0.5 * (s.pageX + T.x), ee = 0.5 * (s.pageY + T.y);
3452
+ x.set(j, ee);
3450
3453
  }
3451
- T.subVectors(x, g).multiplyScalar(t.rotateSpeed);
3454
+ O.subVectors(x, m).multiplyScalar(t.rotateSpeed);
3452
3455
  const y = t.domElement;
3453
- ve(2 * Math.PI * T.x / y.clientHeight), D(2 * Math.PI * T.y / y.clientHeight), g.copy(x);
3456
+ ve(2 * Math.PI * O.x / y.clientHeight), I(2 * Math.PI * O.y / y.clientHeight), m.copy(x);
3454
3457
  }
3455
- function w(s) {
3456
- if (z.length === 1)
3457
- ee.set(s.pageX, s.pageY);
3458
+ function E(s) {
3459
+ if (V.length === 1)
3460
+ te.set(s.pageX, s.pageY);
3458
3461
  else {
3459
- const y = $e(s), _ = 0.5 * (s.pageX + y.x), k = 0.5 * (s.pageY + y.y);
3460
- ee.set(_, k);
3462
+ const y = $e(s), T = 0.5 * (s.pageX + y.x), j = 0.5 * (s.pageY + y.y);
3463
+ te.set(T, j);
3461
3464
  }
3462
- pe.subVectors(ee, V).multiplyScalar(t.panSpeed), we(pe.x, pe.y), V.copy(ee);
3465
+ me.subVectors(te, H).multiplyScalar(t.panSpeed), we(me.x, me.y), H.copy(te);
3463
3466
  }
3464
- function I(s) {
3465
- const y = $e(s), _ = s.pageX - y.x, k = s.pageY - y.y, J = Math.sqrt(_ * _ + k * k);
3466
- $.set(0, J), j.set(0, Math.pow($.y / re.y, t.zoomSpeed)), Re(j.y), re.copy($);
3467
- const ye = (s.pageX + y.x) * 0.5, he = (s.pageY + y.y) * 0.5;
3468
- Ae(ye, he);
3467
+ function A(s) {
3468
+ const y = $e(s), T = s.pageX - y.x, j = s.pageY - y.y, ee = Math.sqrt(T * T + j * j);
3469
+ $.set(0, ee), D.set(0, Math.pow($.y / re.y, t.zoomSpeed)), Re(D.y), re.copy($);
3470
+ const ye = (s.pageX + y.x) * 0.5, de = (s.pageY + y.y) * 0.5;
3471
+ Ae(ye, de);
3469
3472
  }
3470
- function ie(s) {
3471
- t.enableZoom && I(s), t.enablePan && w(s);
3473
+ function G(s) {
3474
+ t.enableZoom && A(s), t.enablePan && E(s);
3472
3475
  }
3473
3476
  function se(s) {
3474
- t.enableZoom && I(s), t.enableRotate && M(s);
3477
+ t.enableZoom && A(s), t.enableRotate && _(s);
3475
3478
  }
3476
- function O(s) {
3477
- t.enabled !== !1 && (z.length === 0 && (t.domElement.setPointerCapture(s.pointerId), t.domElement.addEventListener("pointermove", B), t.domElement.addEventListener("pointerup", G)), !Pt(s) && (Rt(s), s.pointerType === "touch" ? ct(s) : Ie(s)));
3479
+ function M(s) {
3480
+ t.enabled !== !1 && (V.length === 0 && (t.domElement.setPointerCapture(s.pointerId), t.domElement.addEventListener("pointermove", B), t.domElement.addEventListener("pointerup", W)), !At(s) && (Tt(s), s.pointerType === "touch" ? ct(s) : Ie(s)));
3478
3481
  }
3479
3482
  function B(s) {
3480
- t.enabled !== !1 && (s.pointerType === "touch" ? vt(s) : Ze(s));
3483
+ t.enabled !== !1 && (s.pointerType === "touch" ? gt(s) : Je(s));
3481
3484
  }
3482
- function G(s) {
3483
- switch (At(s), z.length) {
3485
+ function W(s) {
3486
+ switch (Rt(s), V.length) {
3484
3487
  case 0:
3485
- t.domElement.releasePointerCapture(s.pointerId), t.domElement.removeEventListener("pointermove", B), t.domElement.removeEventListener("pointerup", G), t.dispatchEvent(cn), o = i.NONE;
3488
+ t.domElement.releasePointerCapture(s.pointerId), t.domElement.removeEventListener("pointermove", B), t.domElement.removeEventListener("pointerup", W), t.dispatchEvent(cn), o = i.NONE;
3486
3489
  break;
3487
3490
  case 1:
3488
- const y = z[0], _ = ge[y];
3489
- ct({ pointerId: y, pageX: _.x, pageY: _.y });
3491
+ const y = V[0], T = pe[y];
3492
+ ct({ pointerId: y, pageX: T.x, pageY: T.y });
3490
3493
  break;
3491
3494
  }
3492
3495
  }
@@ -3506,12 +3509,12 @@ class Ci extends dn {
3506
3509
  y = -1;
3507
3510
  }
3508
3511
  switch (y) {
3509
- case tt.DOLLY:
3512
+ case nt.DOLLY:
3510
3513
  if (t.enableZoom === !1)
3511
3514
  return;
3512
3515
  Fe(s), o = i.DOLLY;
3513
3516
  break;
3514
- case tt.ROTATE:
3517
+ case nt.ROTATE:
3515
3518
  if (s.ctrlKey || s.metaKey || s.shiftKey) {
3516
3519
  if (t.enablePan === !1)
3517
3520
  return;
@@ -3522,7 +3525,7 @@ class Ci extends dn {
3522
3525
  De(s), o = i.ROTATE;
3523
3526
  }
3524
3527
  break;
3525
- case tt.PAN:
3528
+ case nt.PAN:
3526
3529
  if (s.ctrlKey || s.metaKey || s.shiftKey) {
3527
3530
  if (t.enableRotate === !1)
3528
3531
  return;
@@ -3536,14 +3539,14 @@ class Ci extends dn {
3536
3539
  default:
3537
3540
  o = i.NONE;
3538
3541
  }
3539
- o !== i.NONE && t.dispatchEvent(It);
3542
+ o !== i.NONE && t.dispatchEvent(jt);
3540
3543
  }
3541
- function Ze(s) {
3544
+ function Je(s) {
3542
3545
  switch (o) {
3543
3546
  case i.ROTATE:
3544
3547
  if (t.enableRotate === !1)
3545
3548
  return;
3546
- ne(s);
3549
+ ae(s);
3547
3550
  break;
3548
3551
  case i.DOLLY:
3549
3552
  if (t.enableZoom === !1)
@@ -3557,44 +3560,44 @@ class Ci extends dn {
3557
3560
  break;
3558
3561
  }
3559
3562
  }
3560
- function pt(s) {
3561
- t.enabled === !1 || t.enableZoom === !1 || o !== i.NONE || (s.preventDefault(), t.dispatchEvent(It), Ge(gt(s)), t.dispatchEvent(cn));
3563
+ function mt(s) {
3564
+ t.enabled === !1 || t.enableZoom === !1 || o !== i.NONE || (s.preventDefault(), t.dispatchEvent(jt), Ge(pt(s)), t.dispatchEvent(cn));
3562
3565
  }
3563
- function gt(s) {
3564
- const y = s.deltaMode, _ = {
3566
+ function pt(s) {
3567
+ const y = s.deltaMode, T = {
3565
3568
  clientX: s.clientX,
3566
3569
  clientY: s.clientY,
3567
3570
  deltaY: s.deltaY
3568
3571
  };
3569
3572
  switch (y) {
3570
3573
  case 1:
3571
- _.deltaY *= 16;
3574
+ T.deltaY *= 16;
3572
3575
  break;
3573
3576
  case 2:
3574
- _.deltaY *= 100;
3577
+ T.deltaY *= 100;
3575
3578
  break;
3576
3579
  }
3577
- return s.ctrlKey && !ue && (_.deltaY *= 10), _;
3580
+ return s.ctrlKey && !le && (T.deltaY *= 10), T;
3578
3581
  }
3579
3582
  function st(s) {
3580
- s.key === "Control" && (ue = !0, t.domElement.getRootNode().addEventListener("keyup", Ue, { passive: !0, capture: !0 }));
3583
+ s.key === "Control" && (le = !0, t.domElement.getRootNode().addEventListener("keyup", Ue, { passive: !0, capture: !0 }));
3581
3584
  }
3582
3585
  function Ue(s) {
3583
- s.key === "Control" && (ue = !1, t.domElement.getRootNode().removeEventListener("keyup", Ue, { passive: !0, capture: !0 }));
3586
+ s.key === "Control" && (le = !1, t.domElement.getRootNode().removeEventListener("keyup", Ue, { passive: !0, capture: !0 }));
3584
3587
  }
3585
3588
  function ot(s) {
3586
- t.enabled === !1 || t.enablePan === !1 || de(s);
3589
+ t.enabled === !1 || t.enablePan === !1 || ue(s);
3587
3590
  }
3588
3591
  function ct(s) {
3589
- switch (bt(s), z.length) {
3592
+ switch (vt(s), V.length) {
3590
3593
  case 1:
3591
3594
  switch (t.touches.ONE) {
3592
- case nt.ROTATE:
3595
+ case at.ROTATE:
3593
3596
  if (t.enableRotate === !1)
3594
3597
  return;
3595
- p(s), o = i.TOUCH_ROTATE;
3598
+ g(s), o = i.TOUCH_ROTATE;
3596
3599
  break;
3597
- case nt.PAN:
3600
+ case at.PAN:
3598
3601
  if (t.enablePan === !1)
3599
3602
  return;
3600
3603
  v(s), o = i.TOUCH_PAN;
@@ -3605,15 +3608,15 @@ class Ci extends dn {
3605
3608
  break;
3606
3609
  case 2:
3607
3610
  switch (t.touches.TWO) {
3608
- case nt.DOLLY_PAN:
3611
+ case at.DOLLY_PAN:
3609
3612
  if (t.enableZoom === !1 && t.enablePan === !1)
3610
3613
  return;
3611
- P(s), o = i.TOUCH_DOLLY_PAN;
3614
+ k(s), o = i.TOUCH_DOLLY_PAN;
3612
3615
  break;
3613
- case nt.DOLLY_ROTATE:
3616
+ case at.DOLLY_ROTATE:
3614
3617
  if (t.enableZoom === !1 && t.enableRotate === !1)
3615
3618
  return;
3616
- ae(s), o = i.TOUCH_DOLLY_ROTATE;
3619
+ ge(s), o = i.TOUCH_DOLLY_ROTATE;
3617
3620
  break;
3618
3621
  default:
3619
3622
  o = i.NONE;
@@ -3622,24 +3625,24 @@ class Ci extends dn {
3622
3625
  default:
3623
3626
  o = i.NONE;
3624
3627
  }
3625
- o !== i.NONE && t.dispatchEvent(It);
3628
+ o !== i.NONE && t.dispatchEvent(jt);
3626
3629
  }
3627
- function vt(s) {
3628
- switch (bt(s), o) {
3630
+ function gt(s) {
3631
+ switch (vt(s), o) {
3629
3632
  case i.TOUCH_ROTATE:
3630
3633
  if (t.enableRotate === !1)
3631
3634
  return;
3632
- M(s), t.update();
3635
+ _(s), t.update();
3633
3636
  break;
3634
3637
  case i.TOUCH_PAN:
3635
3638
  if (t.enablePan === !1)
3636
3639
  return;
3637
- w(s), t.update();
3640
+ E(s), t.update();
3638
3641
  break;
3639
3642
  case i.TOUCH_DOLLY_PAN:
3640
3643
  if (t.enableZoom === !1 && t.enablePan === !1)
3641
3644
  return;
3642
- ie(s), t.update();
3645
+ G(s), t.update();
3643
3646
  break;
3644
3647
  case i.TOUCH_DOLLY_ROTATE:
3645
3648
  if (t.enableZoom === !1 && t.enableRotate === !1)
@@ -3650,39 +3653,42 @@ class Ci extends dn {
3650
3653
  o = i.NONE;
3651
3654
  }
3652
3655
  }
3653
- function Je(s) {
3656
+ function Qe(s) {
3654
3657
  t.enabled !== !1 && s.preventDefault();
3655
3658
  }
3656
- function Rt(s) {
3657
- z.push(s.pointerId);
3659
+ function Tt(s) {
3660
+ V.push(s.pointerId);
3658
3661
  }
3659
- function At(s) {
3660
- delete ge[s.pointerId];
3661
- for (let y = 0; y < z.length; y++)
3662
- if (z[y] == s.pointerId) {
3663
- z.splice(y, 1);
3662
+ function Rt(s) {
3663
+ delete pe[s.pointerId];
3664
+ for (let y = 0; y < V.length; y++)
3665
+ if (V[y] == s.pointerId) {
3666
+ V.splice(y, 1);
3664
3667
  return;
3665
3668
  }
3666
3669
  }
3667
- function Pt(s) {
3668
- for (let y = 0; y < z.length; y++)
3669
- if (z[y] == s.pointerId)
3670
+ function At(s) {
3671
+ for (let y = 0; y < V.length; y++)
3672
+ if (V[y] == s.pointerId)
3670
3673
  return !0;
3671
3674
  return !1;
3672
3675
  }
3673
- function bt(s) {
3674
- let y = ge[s.pointerId];
3675
- y === void 0 && (y = new me(), ge[s.pointerId] = y), y.set(s.pageX, s.pageY);
3676
+ function vt(s) {
3677
+ let y = pe[s.pointerId];
3678
+ y === void 0 && (y = new fe(), pe[s.pointerId] = y), y.set(s.pageX, s.pageY);
3676
3679
  }
3677
3680
  function $e(s) {
3678
- const y = s.pointerId === z[0] ? z[1] : z[0];
3679
- return ge[y];
3681
+ const y = s.pointerId === V[0] ? V[1] : V[0];
3682
+ return pe[y];
3680
3683
  }
3681
- t.domElement.addEventListener("contextmenu", Je), t.domElement.addEventListener("pointerdown", O), t.domElement.addEventListener("pointercancel", G), t.domElement.addEventListener("wheel", pt, { passive: !1 }), t.domElement.getRootNode().addEventListener("keydown", st, { passive: !0, capture: !0 }), this.update();
3684
+ t.domElement.addEventListener("contextmenu", Qe), t.domElement.addEventListener("pointerdown", M), t.domElement.addEventListener("pointercancel", W), t.domElement.addEventListener("wheel", mt, { passive: !1 }), t.domElement.getRootNode().addEventListener("keydown", st, { passive: !0, capture: !0 }), this.update();
3682
3685
  }
3683
3686
  }
3684
- const Mt = (e) => {
3685
- const [n, a] = q(e.options[e.index]), t = () => {
3687
+ function rt(e, n, a, t, i) {
3688
+ return t + (e - n) * (i - t) / (a - n);
3689
+ }
3690
+ const wt = (e) => {
3691
+ const [n, a] = K(e.options[e.index]), t = () => {
3686
3692
  e.onToggle(!e.open);
3687
3693
  }, i = (o) => {
3688
3694
  o !== n && (e.onSelect(o), a(o)), e.onToggle(!1);
@@ -3692,13 +3698,13 @@ const Mt = (e) => {
3692
3698
  e.open && /* @__PURE__ */ l.jsx("ul", { className: "dropdown-menu", children: e.options.map((o) => /* @__PURE__ */ l.jsx("li", { onClick: () => i(o), children: o }, o)) })
3693
3699
  ] });
3694
3700
  }, qe = Oa(function(n, a) {
3695
- const [t, i] = q(!1), o = n.options.indexOf(n.camera.name);
3701
+ const [t, i] = K(!1), o = n.options.indexOf(n.camera.name);
3696
3702
  return /* @__PURE__ */ l.jsxs("div", { className: "CameraWindow", children: [
3697
3703
  /* @__PURE__ */ l.jsx("div", { ref: a, className: "clickable", onClick: () => {
3698
3704
  t && i(!1);
3699
3705
  } }),
3700
3706
  /* @__PURE__ */ l.jsx(
3701
- Mt,
3707
+ wt,
3702
3708
  {
3703
3709
  index: o,
3704
3710
  open: t,
@@ -3712,7 +3718,7 @@ const Mt = (e) => {
3712
3718
  )
3713
3719
  ] });
3714
3720
  });
3715
- class Si extends Pn {
3721
+ class xi extends kn {
3716
3722
  constructor(n) {
3717
3723
  super({
3718
3724
  extensions: {
@@ -3730,7 +3736,7 @@ class Si extends Pn {
3730
3736
  value: n?.divisions !== void 0 ? n?.divisions : 10
3731
3737
  },
3732
3738
  uColor: {
3733
- value: n?.color !== void 0 ? n?.color : new Ft(16777215)
3739
+ value: n?.color !== void 0 ? n?.color : new Lt(16777215)
3734
3740
  },
3735
3741
  uDistance: {
3736
3742
  value: n?.distance !== void 0 ? n?.distance : 1e4
@@ -3825,17 +3831,17 @@ class Si extends Pn {
3825
3831
  });
3826
3832
  }
3827
3833
  }
3828
- class wi extends Rn {
3834
+ class Ei extends Rn {
3829
3835
  gridMaterial;
3830
3836
  constructor() {
3831
- const n = new Si();
3837
+ const n = new xi();
3832
3838
  super(new ha(2, 2), n), this.gridMaterial = n, this.frustumCulled = !1, this.name = "InfiniteGridHelper", this.position.y = 0.1;
3833
3839
  }
3834
3840
  update() {
3835
3841
  this.gridMaterial.needsUpdate = !0;
3836
3842
  }
3837
3843
  }
3838
- const Mi = `#include <common>
3844
+ const Ci = `#include <common>
3839
3845
  #include <batching_pars_vertex>
3840
3846
  #include <uv_pars_vertex>
3841
3847
  #include <color_pars_vertex>
@@ -3865,7 +3871,7 @@ void main() {
3865
3871
  #include <logdepthbuf_vertex>
3866
3872
  #include <clipping_planes_vertex>
3867
3873
  #include <worldpos_vertex>
3868
- }`, Oi = `
3874
+ }`, Si = `
3869
3875
  #include <common>
3870
3876
  #include <uv_pars_fragment>
3871
3877
  #include <clipping_planes_pars_fragment>
@@ -3874,29 +3880,29 @@ void main() {
3874
3880
  #include <clipping_planes_fragment>
3875
3881
  gl_FragColor = vec4(vec3(vUv, 0.0), 1.0);
3876
3882
  }`;
3877
- class Ti extends Pn {
3883
+ class wi extends kn {
3878
3884
  constructor() {
3879
3885
  super({
3880
3886
  defines: {
3881
3887
  USE_UV: ""
3882
3888
  },
3883
- vertexShader: Mi,
3884
- fragmentShader: Oi
3889
+ vertexShader: Ci,
3890
+ fragmentShader: Si
3885
3891
  });
3886
3892
  }
3887
3893
  }
3888
- let St = "Renderer", Le, wt = !1, un = !1, H = null, ce = null, He = null, Ve = null;
3889
- function Hi(e) {
3890
- const n = e.three.app.appID, a = localStorage.getItem(`${n}_mode`), t = localStorage.getItem(`${n}_tlCam`) !== null ? localStorage.getItem(`${n}_tlCam`) : "Debug", i = localStorage.getItem(`${n}_trCam`) !== null ? localStorage.getItem(`${n}_trCam`) : "Orthographic", o = localStorage.getItem(`${n}_blCam`) !== null ? localStorage.getItem(`${n}_blCam`) : "Front", u = localStorage.getItem(`${n}_brCam`) !== null ? localStorage.getItem(`${n}_brCam`) : "Top", c = le(() => /* @__PURE__ */ new Map(), []), h = le(() => /* @__PURE__ */ new Map(), []), d = le(() => /* @__PURE__ */ new Map(), []), f = le(() => /* @__PURE__ */ new Map(), []), g = le(() => new fa(), []), x = le(() => new ma(), []), T = le(() => new wi(), []), V = le(() => new Xt(500), []), ee = le(() => new Xt(100), []), pe = le(() => new pa(), []), re = le(() => new ga(), []), $ = le(() => new Ti(), []), j = le(() => new An({
3894
+ let Ct = "Renderer", Le, St = !1, un = !1, z = null, ce = null, ze = null, He = null;
3895
+ function Ui(e) {
3896
+ const n = e.three.app.appID, a = localStorage.getItem(`${n}_mode`), t = localStorage.getItem(`${n}_tlCam`) !== null ? localStorage.getItem(`${n}_tlCam`) : "Debug", i = localStorage.getItem(`${n}_trCam`) !== null ? localStorage.getItem(`${n}_trCam`) : "Orthographic", o = localStorage.getItem(`${n}_blCam`) !== null ? localStorage.getItem(`${n}_blCam`) : "Front", u = localStorage.getItem(`${n}_brCam`) !== null ? localStorage.getItem(`${n}_brCam`) : "Top", c = ie(() => /* @__PURE__ */ new Map(), []), h = ie(() => /* @__PURE__ */ new Map(), []), d = ie(() => /* @__PURE__ */ new Map(), []), f = ie(() => /* @__PURE__ */ new Map(), []), m = ie(() => new fa(), []), x = ie(() => new ma(), []), O = ie(() => new Ei(), []), H = ie(() => new Kt(500), []), te = ie(() => new Kt(100), []), me = ie(() => new pa(), []), re = ie(() => new ga(), []), $ = ie(() => new wi(), []), D = ie(() => new An({
3891
3897
  opacity: 0.33,
3892
3898
  transparent: !0,
3893
3899
  wireframe: !0
3894
3900
  }), []);
3895
- function K(p, v) {
3896
- const S = new Zt(-100, 100, 100, -100, 50, 3e3);
3897
- return S.name = p, S.position.copy(v), S.lookAt(0, 0, 0), c.set(p, S), S;
3901
+ function Z(g, v) {
3902
+ const w = new Xt(-100, 100, 100, -100, 50, 3e3);
3903
+ return w.name = g, w.position.copy(v), w.lookAt(0, 0, 0), c.set(g, w), w;
3898
3904
  }
3899
- const te = [
3905
+ const ne = [
3900
3906
  "Renderer",
3901
3907
  "Depth",
3902
3908
  "Normals",
@@ -3907,330 +3913,330 @@ function Hi(e) {
3907
3913
  "Side by Side",
3908
3914
  "Stacked",
3909
3915
  "Quad"
3910
- ], z = Z(null), ge = Z(null), ue = Z(null), Te = Z(null), _e = Z(null), ve = Z(null), [D, be] = q(a !== null ? a : "Single"), [C, we] = q(null), [Re, je] = q(!1), [Ae, Pe] = q(!1), [De, Fe] = q(!1), [, Be] = q(Date.now());
3911
- localStorage.setItem(`${n}_mode`, D), localStorage.setItem(`${n}_tlCam`, t), localStorage.setItem(`${n}_trCam`, i), localStorage.setItem(`${n}_blCam`, o), localStorage.setItem(`${n}_brCam`, u);
3912
- const ne = (p, v) => {
3913
- const S = h.get(p.name);
3914
- S !== void 0 && S.dispose(), h.delete(p.name);
3915
- const P = d.get(p.name);
3916
- P !== void 0 && (g.remove(P), P.dispose()), d.delete(p.name);
3917
- const ae = new Ci(p, v);
3918
- switch (ae.enableDamping = !0, ae.dampingFactor = 0.05, p.name) {
3916
+ ], V = X(null), pe = X(null), le = X(null), _e = X(null), Te = X(null), ve = X(null), [I, be] = K(a !== null ? a : "Single"), [S, we] = K(null), [Re, je] = K(!1), [Ae, ke] = K(!1), [De, Fe] = K(!1), [, Be] = K(Date.now());
3917
+ localStorage.setItem(`${n}_mode`, I), localStorage.setItem(`${n}_tlCam`, t), localStorage.setItem(`${n}_trCam`, i), localStorage.setItem(`${n}_blCam`, o), localStorage.setItem(`${n}_brCam`, u);
3918
+ const ae = (g, v) => {
3919
+ const w = h.get(g.name);
3920
+ w !== void 0 && w.dispose(), h.delete(g.name);
3921
+ const k = new yi(g, v);
3922
+ switch (k.enableDamping = !0, k.dampingFactor = 0.05, g.name) {
3919
3923
  case "Top":
3920
3924
  case "Bottom":
3921
3925
  case "Left":
3922
3926
  case "Right":
3923
3927
  case "Front":
3924
3928
  case "Back":
3925
- ae.enableRotate = !1;
3929
+ k.enableRotate = !1;
3926
3930
  break;
3927
3931
  }
3928
- if (h.set(p.name, ae), p instanceof kt) {
3929
- const M = new ya(p);
3930
- d.set(p.name, M), g.add(M);
3931
- }
3932
- }, Me = (p) => {
3933
- const v = d.get(p.name);
3934
- v !== void 0 && (g.remove(v), v.dispose(), d.delete(p.name));
3935
- const S = h.get(p.name);
3936
- S !== void 0 && (S.dispose(), h.delete(p.name));
3932
+ h.set(g.name, k);
3933
+ }, Me = (g) => {
3934
+ const v = d.get(g.name);
3935
+ v !== void 0 && (m.remove(v), v.dispose(), d.delete(g.name));
3936
+ const w = h.get(g.name);
3937
+ w !== void 0 && (w.dispose(), h.delete(g.name));
3937
3938
  }, Ye = () => {
3938
- h.forEach((p, v) => {
3939
- p.dispose();
3940
- const S = d.get(v);
3941
- S !== void 0 && (g.remove(S), S.dispose()), d.delete(v), h.delete(v);
3939
+ h.forEach((g, v) => {
3940
+ g.dispose();
3941
+ const w = d.get(v);
3942
+ w !== void 0 && (m.remove(w), w.dispose()), d.delete(v), h.delete(v);
3942
3943
  }), h.clear(), d.clear();
3943
3944
  }, Ge = () => {
3944
- switch (D) {
3945
+ switch (I) {
3945
3946
  case "Single":
3946
- ne(H, ue.current);
3947
+ ae(z, le.current);
3947
3948
  break;
3948
3949
  case "Side by Side":
3949
3950
  case "Stacked":
3950
- ne(H, ue.current), ne(ce, Te.current);
3951
+ ae(z, le.current), ae(ce, _e.current);
3951
3952
  break;
3952
3953
  case "Quad":
3953
- ne(H, ue.current), ne(ce, Te.current), ne(He, _e.current), ne(Ve, ve.current);
3954
+ ae(z, le.current), ae(ce, _e.current), ae(ze, Te.current), ae(He, ve.current);
3954
3955
  break;
3955
3956
  }
3956
3957
  };
3957
- ke(() => {
3958
- const p = new va({
3959
- canvas: z.current,
3958
+ Pe(() => {
3959
+ const g = new va({
3960
+ canvas: V.current,
3960
3961
  stencil: !1
3961
3962
  });
3962
- p.autoClear = !1, p.shadowMap.enabled = !0, p.setPixelRatio(devicePixelRatio), p.setClearColor(0), e.three.renderer = p, we(p);
3963
- }, []), ke(() => {
3964
- g.name = "Debug Scene", g.uuid = "", x.name = "helpers", g.add(x), x.add(T), V.name = "axisHelper", x.add(V), ee.name = "interactionHelper", x.add(ee), ee.visible = !1, K("Top", new Y(0, 1e3, 0)), K("Bottom", new Y(0, -1e3, 0)), K("Left", new Y(-1e3, 0, 0)), K("Right", new Y(1e3, 0, 0)), K("Front", new Y(0, 0, 1e3)), K("Back", new Y(0, 0, -1e3)), K("Orthographic", new Y(1e3, 1e3, 1e3));
3965
- const p = new kt(60, 1, 50, 3e3);
3966
- p.name = "Debug", p.position.set(500, 500, 500), p.lookAt(0, 0, 0), c.set("Debug", p), H = c.get(localStorage.getItem(`${n}_tlCam`)), ce = c.get(localStorage.getItem(`${n}_trCam`)), He = c.get(localStorage.getItem(`${n}_blCam`)), Ve = c.get(localStorage.getItem(`${n}_brCam`));
3967
- }, []), ke(() => {
3968
- const p = () => {
3969
- f.forEach((M) => {
3970
- x.remove(M), M.dispose();
3963
+ g.autoClear = !1, g.shadowMap.enabled = !0, g.setPixelRatio(devicePixelRatio), g.setClearColor(0), e.three.renderer = g, we(g);
3964
+ }, []), Pe(() => {
3965
+ m.name = "Debug Scene", m.uuid = "", x.name = "helpers", m.add(x), x.add(O), H.name = "axisHelper", x.add(H), te.name = "interactionHelper", x.add(te), te.visible = !1, Z("Top", new Y(0, 1e3, 0)), Z("Bottom", new Y(0, -1e3, 0)), Z("Left", new Y(-1e3, 0, 0)), Z("Right", new Y(1e3, 0, 0)), Z("Front", new Y(0, 0, 1e3)), Z("Back", new Y(0, 0, -1e3)), Z("Orthographic", new Y(1e3, 1e3, 1e3));
3966
+ const g = new kt(60, 1, 50, 3e3);
3967
+ g.name = "Debug", g.position.set(500, 500, 500), g.lookAt(0, 0, 0), c.set("Debug", g), z = c.get(localStorage.getItem(`${n}_tlCam`)), ce = c.get(localStorage.getItem(`${n}_trCam`)), ze = c.get(localStorage.getItem(`${n}_blCam`)), He = c.get(localStorage.getItem(`${n}_brCam`));
3968
+ }, []), Pe(() => {
3969
+ const g = () => {
3970
+ f.forEach((_) => {
3971
+ x.remove(_), _.dispose();
3971
3972
  }), f.clear();
3972
3973
  }, v = () => {
3973
- Le.traverse((M) => {
3974
- if (M.type.search("Light") > -1) {
3975
- let w;
3976
- switch (M.type) {
3974
+ Le.traverse((_) => {
3975
+ if (_.type.search("Light") > -1) {
3976
+ let E;
3977
+ switch (_.type) {
3977
3978
  case "DirectionalLight":
3978
- w = new Sa(M), w.name = `${M.name}Helper`, f.set(M.name, w), x.add(w);
3979
+ E = new Sa(_, 100), E.name = `${_.name}Helper`, f.set(_.name, E), x.add(E);
3979
3980
  break;
3980
3981
  case "HemisphereLight":
3981
- w = new Ca(M, 250), w.name = `${M.name}Helper`, f.set(M.name, w), x.add(w);
3982
+ E = new Ca(_, 250), E.name = `${_.name}Helper`, f.set(_.name, E), x.add(E);
3982
3983
  break;
3983
3984
  case "RectAreaLight":
3984
- w = new xi(M), w.name = `${M.name}Helper`, f.set(M.name, w), x.add(w);
3985
+ E = new vi(_), E.name = `${_.name}Helper`, f.set(_.name, E), x.add(E);
3985
3986
  break;
3986
3987
  case "PointLight":
3987
- w = new Ea(M), w.name = `${M.name}Helper`, f.set(M.name, w), x.add(w);
3988
+ E = new Ea(_, 100), E.name = `${_.name}Helper`, f.set(_.name, E), x.add(E);
3988
3989
  break;
3989
3990
  case "SpotLight":
3990
- w = new xa(M), w.name = `${M.name}Helper`, f.set(M.name, w), x.add(w);
3991
+ E = new xa(_), E.name = `${_.name}Helper`, f.set(_.name, E), x.add(E);
3991
3992
  break;
3992
3993
  }
3993
3994
  }
3994
3995
  });
3995
- }, S = (M) => {
3996
- p(), In(Le), g.remove(Le);
3997
- const w = e.scenes.get(M.value.name);
3998
- if (w !== void 0) {
3999
- const I = new w();
4000
- e.onSceneSet !== void 0 && e.onSceneSet(I), Le = I, e.three.scene = Le, g.add(Le), un = !0, v();
3996
+ }, w = (_) => {
3997
+ g(), In(Le), m.remove(Le);
3998
+ const E = e.scenes.get(_.value.name);
3999
+ if (E !== void 0) {
4000
+ const A = new E();
4001
+ e.onSceneSet !== void 0 && e.onSceneSet(A), Le = A, e.three.scene = Le, m.add(Le), un = !0, v();
4002
+ }
4003
+ }, k = (_) => {
4004
+ const E = _.value, A = e.three.scene?.getObjectByProperty("uuid", E.uuid);
4005
+ if (A !== void 0 && c.set(E.name, A), A instanceof kt) {
4006
+ const G = new ya(A);
4007
+ d.set(A.name, G), m.add(G);
4001
4008
  }
4002
- }, P = (M) => {
4003
- const w = M.value, I = e.three.scene?.getObjectByProperty("uuid", w.uuid);
4004
- I !== void 0 && c.set(w.name, I), Be(Date.now());
4005
- }, ae = (M) => {
4006
- c.delete(M.value.name), Be(Date.now());
4009
+ Be(Date.now());
4010
+ }, ge = (_) => {
4011
+ const E = d.get(_.value.name);
4012
+ E !== void 0 && (m.remove(E), E.dispose()), c.delete(_.value.name), Be(Date.now());
4007
4013
  };
4008
- return N.addEventListener(L.SET_SCENE, S), N.addEventListener(L.ADD_CAMERA, P), N.addEventListener(L.REMOVE_CAMERA, ae), () => {
4009
- N.removeEventListener(L.SET_SCENE, S), N.removeEventListener(L.ADD_CAMERA, P), N.removeEventListener(L.REMOVE_CAMERA, ae);
4014
+ return N.addEventListener(L.SET_SCENE, w), N.addEventListener(L.ADD_CAMERA, k), N.addEventListener(L.REMOVE_CAMERA, ge), () => {
4015
+ N.removeEventListener(L.SET_SCENE, w), N.removeEventListener(L.ADD_CAMERA, k), N.removeEventListener(L.REMOVE_CAMERA, ge);
4010
4016
  };
4011
- }, []), ke(() => {
4012
- if (C === null)
4017
+ }, []), Pe(() => {
4018
+ if (S === null)
4013
4019
  return;
4014
- let p = window.innerWidth, v = window.innerHeight, S = Math.floor(p / 2), P = Math.floor(v / 2), ae = -1;
4015
- const M = () => {
4016
- p = window.innerWidth - 300, v = window.innerHeight, S = Math.floor(p / 2), P = Math.floor(v / 2), C.setSize(p, v);
4017
- let O = p, B = v;
4018
- switch (D) {
4020
+ let g = window.innerWidth, v = window.innerHeight, w = Math.floor(g / 2), k = Math.floor(v / 2), ge = -1;
4021
+ const _ = () => {
4022
+ g = window.innerWidth - 300, v = window.innerHeight, w = Math.floor(g / 2), k = Math.floor(v / 2), S.setSize(g, v);
4023
+ let M = g, B = v;
4024
+ switch (I) {
4019
4025
  case "Side by Side":
4020
- O = S, B = v;
4026
+ M = w, B = v;
4021
4027
  break;
4022
4028
  case "Stacked":
4023
- O = p, B = P;
4029
+ M = g, B = k;
4024
4030
  break;
4025
4031
  case "Quad":
4026
- O = S, B = P;
4032
+ M = w, B = k;
4027
4033
  break;
4028
4034
  }
4029
- c.forEach((G) => {
4030
- G instanceof Zt ? (G.left = O / -2, G.right = O / 2, G.top = B / 2, G.bottom = B / -2, G.updateProjectionMatrix()) : G instanceof kt && (G.aspect = O / B, G.updateProjectionMatrix(), d.get(G.name)?.update());
4035
+ c.forEach((W) => {
4036
+ W instanceof Xt ? (W.left = M / -2, W.right = M / 2, W.top = B / 2, W.bottom = B / -2, W.updateProjectionMatrix()) : W instanceof kt && (W.aspect = M / B, W.updateProjectionMatrix(), d.get(W.name)?.update());
4031
4037
  });
4032
- }, w = () => {
4033
- C.setViewport(0, 0, p, v), C.setScissor(0, 0, p, v), C.render(g, H);
4034
- }, I = () => {
4035
- if (D === "Side by Side")
4036
- C.setViewport(0, 0, S, v), C.setScissor(0, 0, S, v), C.render(g, H), C.setViewport(S, 0, S, v), C.setScissor(S, 0, S, v), C.render(g, ce);
4038
+ }, E = () => {
4039
+ S.setViewport(0, 0, g, v), S.setScissor(0, 0, g, v), S.render(m, z);
4040
+ }, A = () => {
4041
+ if (I === "Side by Side")
4042
+ S.setViewport(0, 0, w, v), S.setScissor(0, 0, w, v), S.render(m, z), S.setViewport(w, 0, w, v), S.setScissor(w, 0, w, v), S.render(m, ce);
4037
4043
  else {
4038
- const O = v - P;
4039
- C.setViewport(0, O, p, P), C.setScissor(0, O, p, P), C.render(g, H), C.setViewport(0, 0, p, P), C.setScissor(0, 0, p, P), C.render(g, ce);
4044
+ const M = v - k;
4045
+ S.setViewport(0, M, g, k), S.setScissor(0, M, g, k), S.render(m, z), S.setViewport(0, 0, g, k), S.setScissor(0, 0, g, k), S.render(m, ce);
4040
4046
  }
4041
- }, ie = () => {
4042
- let O = 0, B = 0;
4043
- B = v - P, O = 0, C.setViewport(O, B, S, P), C.setScissor(O, B, S, P), C.render(g, H), O = S, C.setViewport(O, B, S, P), C.setScissor(O, B, S, P), C.render(g, ce), B = 0, O = 0, C.setViewport(O, B, S, P), C.setScissor(O, B, S, P), C.render(g, He), O = S, C.setViewport(O, B, S, P), C.setScissor(O, B, S, P), C.render(g, Ve);
4047
+ }, G = () => {
4048
+ let M = 0, B = 0;
4049
+ B = v - k, M = 0, S.setViewport(M, B, w, k), S.setScissor(M, B, w, k), S.render(m, z), M = w, S.setViewport(M, B, w, k), S.setScissor(M, B, w, k), S.render(m, ce), B = 0, M = 0, S.setViewport(M, B, w, k), S.setScissor(M, B, w, k), S.render(m, ze), M = w, S.setViewport(M, B, w, k), S.setScissor(M, B, w, k), S.render(m, He);
4044
4050
  }, se = () => {
4045
- switch (h.forEach((O) => {
4046
- O.update();
4047
- }), d.forEach((O) => {
4048
- O.update();
4049
- }), f.forEach((O) => {
4050
- O.update !== void 0 && O.update();
4051
- }), e.onSceneUpdate !== void 0 && un && e.onSceneUpdate(Le), C.clear(), D) {
4051
+ switch (h.forEach((M) => {
4052
+ M.update();
4053
+ }), d.forEach((M) => {
4054
+ M.update();
4055
+ }), f.forEach((M) => {
4056
+ M.update !== void 0 && M.update();
4057
+ }), e.onSceneUpdate !== void 0 && un && e.onSceneUpdate(Le), S.clear(), I) {
4052
4058
  case "Single":
4053
- w();
4059
+ E();
4054
4060
  break;
4055
4061
  case "Side by Side":
4056
4062
  case "Stacked":
4057
- I();
4063
+ A();
4058
4064
  break;
4059
4065
  case "Quad":
4060
- ie();
4066
+ G();
4061
4067
  break;
4062
4068
  }
4063
- ae = requestAnimationFrame(se);
4069
+ ge = requestAnimationFrame(se);
4064
4070
  };
4065
- return Ge(), window.addEventListener("resize", M), M(), se(), () => {
4066
- window.removeEventListener("resize", M), cancelAnimationFrame(ae), ae = -1;
4071
+ return Ge(), window.addEventListener("resize", _), _(), se(), () => {
4072
+ window.removeEventListener("resize", _), cancelAnimationFrame(ge), ge = -1;
4067
4073
  };
4068
- }, [D, C]), ke(() => {
4069
- if (C !== null) {
4070
- const p = new ba(), v = new me(), S = (w, I, ie, se) => {
4071
- switch (D) {
4074
+ }, [I, S]), Pe(() => {
4075
+ if (S !== null) {
4076
+ const g = new ba(), v = new fe(), w = (E, A, G, se) => {
4077
+ switch (I) {
4072
4078
  case "Quad":
4073
- w < ie ? I < se ? p.setFromCamera(v, H) : p.setFromCamera(v, He) : I < se ? p.setFromCamera(v, ce) : p.setFromCamera(v, Ve);
4079
+ E < G ? A < se ? g.setFromCamera(v, z) : g.setFromCamera(v, ze) : A < se ? g.setFromCamera(v, ce) : g.setFromCamera(v, He);
4074
4080
  break;
4075
4081
  case "Side by Side":
4076
- w < ie ? p.setFromCamera(v, H) : p.setFromCamera(v, ce);
4082
+ E < G ? g.setFromCamera(v, z) : g.setFromCamera(v, ce);
4077
4083
  break;
4078
4084
  case "Single":
4079
- p.setFromCamera(v, H);
4085
+ g.setFromCamera(v, z);
4080
4086
  break;
4081
4087
  case "Stacked":
4082
- I < se ? p.setFromCamera(v, H) : p.setFromCamera(v, ce);
4088
+ A < se ? g.setFromCamera(v, z) : g.setFromCamera(v, ce);
4083
4089
  break;
4084
4090
  }
4085
- }, P = (w) => {
4086
- if (!wt)
4091
+ }, k = (E) => {
4092
+ if (!St)
4087
4093
  return;
4088
- const I = new me();
4089
- C.getSize(I);
4090
- const ie = Math.min(w.clientX, I.x), se = Math.min(w.clientY, I.y);
4091
- v.x = it(ie, 0, I.x, -1, 1), v.y = it(se, 0, I.y, 1, -1);
4092
- const O = I.x / 2, B = I.y / 2, G = () => {
4093
- ie < O ? v.x = it(ie, 0, O, -1, 1) : v.x = it(ie, O, I.x, -1, 1);
4094
+ const A = new fe();
4095
+ S.getSize(A);
4096
+ const G = Math.min(E.clientX, A.x), se = Math.min(E.clientY, A.y);
4097
+ v.x = rt(G, 0, A.x, -1, 1), v.y = rt(se, 0, A.y, 1, -1);
4098
+ const M = A.x / 2, B = A.y / 2, W = () => {
4099
+ G < M ? v.x = rt(G, 0, M, -1, 1) : v.x = rt(G, M, A.x, -1, 1);
4094
4100
  }, Ie = () => {
4095
- se < B ? v.y = it(se, 0, B, 1, -1) : v.y = it(se, B, I.y, 1, -1);
4101
+ se < B ? v.y = rt(se, 0, B, 1, -1) : v.y = rt(se, B, A.y, 1, -1);
4096
4102
  };
4097
- switch (D) {
4103
+ switch (I) {
4098
4104
  case "Quad":
4099
- G(), Ie();
4105
+ W(), Ie();
4100
4106
  break;
4101
4107
  case "Side by Side":
4102
- G();
4108
+ W();
4103
4109
  break;
4104
4110
  case "Stacked":
4105
4111
  Ie(), Ie();
4106
4112
  break;
4107
4113
  }
4108
- S(ie, se, O, B);
4109
- const Ze = p.intersectObjects(Le.children);
4110
- Ze.length > 0 && ee.position.copy(Ze[0].point);
4111
- }, ae = (w) => {
4112
- if (!wt)
4114
+ w(G, se, M, B);
4115
+ const Je = g.intersectObjects(Le.children);
4116
+ Je.length > 0 && te.position.copy(Je[0].point);
4117
+ }, ge = (E) => {
4118
+ if (!St)
4113
4119
  return;
4114
- const I = new me();
4115
- if (C.getSize(I), w.clientX >= I.x)
4120
+ const A = new fe();
4121
+ if (S.getSize(A), E.clientX >= A.x)
4116
4122
  return;
4117
- P(w);
4118
- const ie = p.intersectObjects(Le.children);
4119
- ie.length > 0 && e.three.getObject(ie[0].object.uuid);
4120
- }, M = ge.current;
4121
- return M.addEventListener("mousemove", P, !1), M.addEventListener("click", ae, !1), () => {
4122
- M.removeEventListener("mousemove", P), M.removeEventListener("click", ae);
4123
+ k(E);
4124
+ const G = g.intersectObjects(Le.children);
4125
+ G.length > 0 && e.three.getObject(G[0].object.uuid);
4126
+ }, _ = pe.current;
4127
+ return _.addEventListener("mousemove", k, !1), _.addEventListener("click", ge, !1), () => {
4128
+ _.removeEventListener("mousemove", k), _.removeEventListener("click", ge);
4123
4129
  };
4124
4130
  }
4125
- }, [D, C]);
4126
- const de = [];
4127
- return c.forEach((p, v) => {
4128
- de.push(v);
4131
+ }, [I, S]);
4132
+ const ue = [];
4133
+ return c.forEach((g, v) => {
4134
+ ue.push(v);
4129
4135
  }), /* @__PURE__ */ l.jsxs("div", { className: "multiview", children: [
4130
- /* @__PURE__ */ l.jsx("canvas", { ref: z }),
4131
- C !== null && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
4132
- /* @__PURE__ */ l.jsxs("div", { className: `cameras ${D === "Single" || D === "Stacked" ? "single" : ""}`, ref: ge, children: [
4133
- D === "Single" && /* @__PURE__ */ l.jsx(l.Fragment, { children: /* @__PURE__ */ l.jsx(qe, { camera: H, options: de, ref: ue, onSelect: (p) => {
4134
- h.get(H.name)?.dispose();
4135
- const v = c.get(p);
4136
- v !== void 0 && (Me(H), H = v, localStorage.setItem(`${n}_tlCam`, v.name), ne(v, ue.current));
4136
+ /* @__PURE__ */ l.jsx("canvas", { ref: V }),
4137
+ S !== null && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
4138
+ /* @__PURE__ */ l.jsxs("div", { className: `cameras ${I === "Single" || I === "Stacked" ? "single" : ""}`, ref: pe, children: [
4139
+ I === "Single" && /* @__PURE__ */ l.jsx(l.Fragment, { children: /* @__PURE__ */ l.jsx(qe, { camera: z, options: ue, ref: le, onSelect: (g) => {
4140
+ h.get(z.name)?.dispose();
4141
+ const v = c.get(g);
4142
+ v !== void 0 && (Me(z), z = v, localStorage.setItem(`${n}_tlCam`, v.name), ae(v, le.current));
4137
4143
  } }) }),
4138
- (D === "Side by Side" || D === "Stacked") && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
4139
- /* @__PURE__ */ l.jsx(qe, { camera: H, options: de, ref: ue, onSelect: (p) => {
4140
- h.get(H.name)?.dispose();
4141
- const v = c.get(p);
4142
- v !== void 0 && (Me(H), H = v, localStorage.setItem(`${n}_tlCam`, v.name), ne(v, ue.current));
4144
+ (I === "Side by Side" || I === "Stacked") && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
4145
+ /* @__PURE__ */ l.jsx(qe, { camera: z, options: ue, ref: le, onSelect: (g) => {
4146
+ h.get(z.name)?.dispose();
4147
+ const v = c.get(g);
4148
+ v !== void 0 && (Me(z), z = v, localStorage.setItem(`${n}_tlCam`, v.name), ae(v, le.current));
4143
4149
  } }),
4144
- /* @__PURE__ */ l.jsx(qe, { camera: ce, options: de, ref: Te, onSelect: (p) => {
4150
+ /* @__PURE__ */ l.jsx(qe, { camera: ce, options: ue, ref: _e, onSelect: (g) => {
4145
4151
  h.get(ce.name)?.dispose();
4146
- const v = c.get(p);
4147
- v !== void 0 && (Me(ce), ce = v, localStorage.setItem(`${n}_trCam`, v.name), ne(v, Te.current));
4152
+ const v = c.get(g);
4153
+ v !== void 0 && (Me(ce), ce = v, localStorage.setItem(`${n}_trCam`, v.name), ae(v, _e.current));
4148
4154
  } })
4149
4155
  ] }),
4150
- D === "Quad" && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
4151
- /* @__PURE__ */ l.jsx(qe, { camera: H, options: de, ref: ue, onSelect: (p) => {
4152
- h.get(H.name)?.dispose();
4153
- const v = c.get(p);
4154
- v !== void 0 && (Me(H), H = v, localStorage.setItem(`${n}_tlCam`, v.name), ne(v, ue.current));
4156
+ I === "Quad" && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
4157
+ /* @__PURE__ */ l.jsx(qe, { camera: z, options: ue, ref: le, onSelect: (g) => {
4158
+ h.get(z.name)?.dispose();
4159
+ const v = c.get(g);
4160
+ v !== void 0 && (Me(z), z = v, localStorage.setItem(`${n}_tlCam`, v.name), ae(v, le.current));
4155
4161
  } }),
4156
- /* @__PURE__ */ l.jsx(qe, { camera: ce, options: de, ref: Te, onSelect: (p) => {
4162
+ /* @__PURE__ */ l.jsx(qe, { camera: ce, options: ue, ref: _e, onSelect: (g) => {
4157
4163
  h.get(ce.name)?.dispose();
4158
- const v = c.get(p);
4159
- v !== void 0 && (Me(ce), ce = v, localStorage.setItem(`${n}_trCam`, v.name), ne(v, Te.current));
4164
+ const v = c.get(g);
4165
+ v !== void 0 && (Me(ce), ce = v, localStorage.setItem(`${n}_trCam`, v.name), ae(v, _e.current));
4160
4166
  } }),
4161
- /* @__PURE__ */ l.jsx(qe, { camera: He, options: de, ref: _e, onSelect: (p) => {
4162
- h.get(He.name)?.dispose();
4163
- const v = c.get(p);
4164
- v !== void 0 && (Me(He), He = v, localStorage.setItem(`${n}_blCam`, v.name), ne(v, _e.current));
4167
+ /* @__PURE__ */ l.jsx(qe, { camera: ze, options: ue, ref: Te, onSelect: (g) => {
4168
+ h.get(ze.name)?.dispose();
4169
+ const v = c.get(g);
4170
+ v !== void 0 && (Me(ze), ze = v, localStorage.setItem(`${n}_blCam`, v.name), ae(v, Te.current));
4165
4171
  } }),
4166
- /* @__PURE__ */ l.jsx(qe, { camera: Ve, options: de, ref: ve, onSelect: (p) => {
4167
- h.get(Ve.name)?.dispose();
4168
- const v = c.get(p);
4169
- v !== void 0 && (Me(Ve), Ve = v, localStorage.setItem(`${n}_brCam`, v.name), ne(v, ve.current));
4172
+ /* @__PURE__ */ l.jsx(qe, { camera: He, options: ue, ref: ve, onSelect: (g) => {
4173
+ h.get(He.name)?.dispose();
4174
+ const v = c.get(g);
4175
+ v !== void 0 && (Me(He), He = v, localStorage.setItem(`${n}_brCam`, v.name), ae(v, ve.current));
4170
4176
  } })
4171
4177
  ] })
4172
4178
  ] }),
4173
4179
  /* @__PURE__ */ l.jsxs("div", { className: "settings", children: [
4174
4180
  /* @__PURE__ */ l.jsx(
4175
- Mt,
4181
+ wt,
4176
4182
  {
4177
- index: Se.indexOf(D),
4183
+ index: Se.indexOf(I),
4178
4184
  options: Se,
4179
- onSelect: (p) => {
4180
- p !== D && (Ye(), be(p));
4185
+ onSelect: (g) => {
4186
+ g !== I && (Ye(), be(g));
4181
4187
  },
4182
4188
  open: Re,
4183
- onToggle: (p) => {
4184
- je(p), Ae && Pe(!1), De && Fe(!1);
4189
+ onToggle: (g) => {
4190
+ je(g), Ae && ke(!1), De && Fe(!1);
4185
4191
  }
4186
4192
  }
4187
4193
  ),
4188
4194
  /* @__PURE__ */ l.jsx(
4189
- Mt,
4195
+ wt,
4190
4196
  {
4191
- index: te.indexOf(St),
4192
- options: te,
4193
- onSelect: (p) => {
4194
- if (p !== St)
4195
- switch (St = p, St) {
4197
+ index: ne.indexOf(Ct),
4198
+ options: ne,
4199
+ onSelect: (g) => {
4200
+ if (g !== Ct)
4201
+ switch (Ct = g, Ct) {
4196
4202
  case "Depth":
4197
- g.overrideMaterial = pe;
4203
+ m.overrideMaterial = me;
4198
4204
  break;
4199
4205
  case "Normals":
4200
- g.overrideMaterial = re;
4206
+ m.overrideMaterial = re;
4201
4207
  break;
4202
4208
  default:
4203
4209
  case "Renderer":
4204
- g.overrideMaterial = null;
4210
+ m.overrideMaterial = null;
4205
4211
  break;
4206
4212
  case "Wireframe":
4207
- g.overrideMaterial = j;
4213
+ m.overrideMaterial = D;
4208
4214
  break;
4209
4215
  case "UVs":
4210
- g.overrideMaterial = $;
4216
+ m.overrideMaterial = $;
4211
4217
  break;
4212
4218
  }
4213
4219
  },
4214
4220
  open: Ae,
4215
- onToggle: (p) => {
4216
- Re && je(!1), Pe(p), De && Fe(!1);
4221
+ onToggle: (g) => {
4222
+ Re && je(!1), ke(g), De && Fe(!1);
4217
4223
  }
4218
4224
  }
4219
4225
  ),
4220
4226
  /* @__PURE__ */ l.jsx(
4221
- Mt,
4227
+ wt,
4222
4228
  {
4223
4229
  index: 0,
4224
4230
  options: [
4225
4231
  "Orbit Mode",
4226
4232
  "Selection Mode"
4227
4233
  ],
4228
- onSelect: (p) => {
4229
- wt = p === "Selection Mode", ee.visible = wt;
4234
+ onSelect: (g) => {
4235
+ St = g === "Selection Mode", te.visible = St;
4230
4236
  },
4231
4237
  open: De,
4232
- onToggle: (p) => {
4233
- Re && je(!1), Ae && Pe(!1), Fe(p);
4238
+ onToggle: (g) => {
4239
+ Re && je(!1), Ae && ke(!1), Fe(g);
4234
4240
  }
4235
4241
  }
4236
4242
  )
@@ -4238,7 +4244,7 @@ function Hi(e) {
4238
4244
  ] })
4239
4245
  ] });
4240
4246
  }
4241
- function Vi(e) {
4247
+ function $i(e) {
4242
4248
  return /* @__PURE__ */ l.jsxs("div", { className: "editor", ref: e.ref, style: e.style, children: [
4243
4249
  /* @__PURE__ */ l.jsx("div", { className: "header", children: e.header }),
4244
4250
  e.children,
@@ -4246,44 +4252,44 @@ function Vi(e) {
4246
4252
  ] });
4247
4253
  }
4248
4254
  export {
4249
- $t as Accordion,
4250
- Ii as Application,
4251
- Tt as BaseRemote,
4255
+ Ut as Accordion,
4256
+ Pi as Application,
4257
+ Ot as BaseRemote,
4252
4258
  Bn as ChildObject,
4253
- Va as ContainerObject,
4254
- $a as Draggable,
4255
- Ua as DraggableItem,
4259
+ Ya as ContainerObject,
4260
+ Va as Draggable,
4261
+ $a as DraggableItem,
4256
4262
  za as Dropdown,
4257
4263
  Ha as DropdownItem,
4258
- Vi as Editor,
4259
- yi as Inspector,
4260
- Hi as MultiView,
4264
+ $i as Editor,
4265
+ gi as Inspector,
4266
+ Ui as MultiView,
4261
4267
  Fn as NavButton,
4262
- Ni as RemoteComponents,
4263
- Ui as RemoteController,
4264
- Ut as RemoteTheatre,
4265
- Fi as RemoteThree,
4266
- Bi as RemoteTweakpane,
4267
- zi as SceneInspector,
4268
- $i as SidePanel,
4268
+ ji as RemoteComponents,
4269
+ Li as RemoteController,
4270
+ Bt as RemoteTheatre,
4271
+ Ii as RemoteThree,
4272
+ Ni as RemoteTweakpane,
4273
+ Bi as SceneInspector,
4274
+ Fi as SidePanel,
4269
4275
  L as ToolEvents,
4270
- Ot as capitalize,
4276
+ Mt as capitalize,
4271
4277
  Ke as clamp,
4272
4278
  Ra as colorToHex,
4273
4279
  N as debugDispatcher,
4274
- ki as defaultTheatreCallback,
4280
+ Ri as defaultTheatreCallback,
4275
4281
  In as dispose,
4276
- Pa as disposeMaterial,
4277
- Di as disposeTexture,
4278
- ji as distance,
4282
+ ka as disposeMaterial,
4283
+ ki as disposeTexture,
4284
+ Ai as distance,
4279
4285
  Dn as hierarchyUUID,
4280
- _a as isColor,
4281
- Qt as mix,
4282
- Bt as noop,
4283
- Jt as normalize,
4284
- Ta as randomID,
4286
+ Ta as isColor,
4287
+ Jt as mix,
4288
+ Ft as noop,
4289
+ Zt as normalize,
4290
+ _a as randomID,
4285
4291
  Aa as resetThreeObjects,
4286
- mt as round,
4287
- Li as theatreEditorApp,
4288
- Nt as totalThreeObjects
4292
+ Qt as round,
4293
+ Di as theatreEditorApp,
4294
+ Dt as totalThreeObjects
4289
4295
  };