@tomorrowevening/hermes 0.0.48 → 0.0.49

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,71 +1,71 @@
1
- import { EventDispatcher as an, Texture as rn, CubeTexture as In, RepeatWrapping as $t, Color as Ct, FrontSide as Nn, BackSide as Ln, DoubleSide as sn, NoBlending as Fn, NormalBlending as Bn, AdditiveBlending as Un, SubtractiveBlending as $n, MultiplyBlending as zn, CustomBlending as Yn, AddEquation as Vn, SubtractEquation as Gn, ReverseSubtractEquation as Hn, MinEquation as Wn, MaxEquation as qn, ZeroFactor as on, OneFactor as cn, SrcColorFactor as ln, OneMinusSrcColorFactor as un, SrcAlphaFactor as dn, OneMinusSrcAlphaFactor as hn, DstAlphaFactor as fn, OneMinusDstAlphaFactor as pn, DstColorFactor as mn, OneMinusDstColorFactor as vn, SrcAlphaSaturateFactor as Kn, ConstantColorFactor as gn, OneMinusConstantColorFactor as bn, ConstantAlphaFactor as yn, OneMinusConstantAlphaFactor as En, Matrix4 as Xn, Vector3 as q, Euler as Zn, Ray as Jn, Plane as Qn, MathUtils as ea, MOUSE as et, TOUCH as tt, Quaternion as zt, Spherical as Yt, Vector2 as me, ShaderMaterial as xn, GLSL3 as ta, Mesh as na, PlaneGeometry as aa, Scene as ia, Group as ra, AxesHelper as Vt, MeshDepthMaterial as sa, MeshNormalMaterial as oa, MeshBasicMaterial as ca, WebGLRenderer as la, PerspectiveCamera as Pt, Raycaster as ua, OrthographicCamera as Gt, CameraHelper as da } from "three";
2
- import { Pane as ha } from "tweakpane";
3
- import * as fa from "@tweakpane/plugin-essentials";
4
- import Cn, { useState as ae, useRef as fe, useEffect as ke, forwardRef as pa, useMemo as xe } from "react";
5
- import { Reorder as Sn } from "framer-motion";
6
- const wn = () => {
7
- }, fi = () => {
1
+ import { EventDispatcher as sn, Texture as on, CubeTexture as $n, RepeatWrapping as Ut, Color as Ct, FrontSide as Un, BackSide as cn, DoubleSide as ln, NoBlending as zn, NormalBlending as Hn, AdditiveBlending as Yn, SubtractiveBlending as Gn, MultiplyBlending as Vn, CustomBlending as Wn, AddEquation as qn, SubtractEquation as Kn, ReverseSubtractEquation as Xn, MinEquation as Zn, MaxEquation as Jn, ZeroFactor as dn, OneFactor as un, SrcColorFactor as hn, OneMinusSrcColorFactor as fn, SrcAlphaFactor as pn, OneMinusSrcAlphaFactor as mn, DstAlphaFactor as vn, OneMinusDstAlphaFactor as gn, DstColorFactor as bn, OneMinusDstColorFactor as yn, SrcAlphaSaturateFactor as Qn, ConstantColorFactor as En, OneMinusConstantColorFactor as xn, ConstantAlphaFactor as Sn, OneMinusConstantAlphaFactor as Cn, Matrix4 as ea, Vector3 as X, Euler as ta, Line as na, BufferGeometry as zt, Float32BufferAttribute as Ht, LineBasicMaterial as aa, Mesh as wn, MeshBasicMaterial as On, Ray as ia, Plane as ra, MathUtils as sa, MOUSE as nt, TOUCH as at, Quaternion as Yt, Spherical as Gt, Vector2 as pe, ShaderMaterial as Mn, GLSL3 as oa, PlaneGeometry as ca, Scene as la, Group as da, AxesHelper as Vt, MeshDepthMaterial as ua, MeshNormalMaterial as ha, WebGLRenderer as fa, PerspectiveCamera as Pt, Raycaster as pa, OrthographicCamera as Wt, CameraHelper as ma, SpotLightHelper as va, PointLightHelper as ga, HemisphereLightHelper as ba, DirectionalLightHelper as ya } from "three";
2
+ import { Pane as Ea } from "tweakpane";
3
+ import * as xa from "@tweakpane/plugin-essentials";
4
+ import Tn, { useState as ne, useRef as fe, useEffect as ke, forwardRef as Sa, useMemo as ve } from "react";
5
+ import { Reorder as _n } from "framer-motion";
6
+ const Rn = () => {
7
+ }, Si = () => {
8
8
  };
9
- function St(t) {
9
+ function wt(t) {
10
10
  return t.substring(0, 1).toUpperCase() + t.substring(1);
11
11
  }
12
- function Xe(t, n, a) {
12
+ function Ze(t, n, a) {
13
13
  return Math.min(n, Math.max(t, a));
14
14
  }
15
- function Ht(t, n, a) {
15
+ function qt(t, n, a) {
16
16
  return (a - t) / (n - t);
17
17
  }
18
- function Wt(t, n, a) {
18
+ function Kt(t, n, a) {
19
19
  return t * (1 - a) + n * a;
20
20
  }
21
- function pi(t, n) {
21
+ function Ci(t, n) {
22
22
  const a = t - n;
23
23
  return Math.sqrt(a * a);
24
24
  }
25
- function ma() {
25
+ function Ca() {
26
26
  return Math.round(Math.random() * 1e6).toString();
27
27
  }
28
- function va(t) {
28
+ function wa(t) {
29
29
  return t.r !== void 0 && t.g !== void 0 && t.b !== void 0;
30
30
  }
31
- function ga(t) {
32
- const n = Math.round(t.r * 255), a = Math.round(t.g * 255), e = Math.round(t.b * 255), i = (u) => {
33
- const d = u.toString(16);
34
- return d.length === 1 ? "0" + d : d;
31
+ function Oa(t) {
32
+ const n = Math.round(t.r * 255), a = Math.round(t.g * 255), e = Math.round(t.b * 255), i = (d) => {
33
+ const u = d.toString(16);
34
+ return u.length === 1 ? "0" + u : u;
35
35
  }, c = i(n), h = i(a), o = i(e);
36
36
  return "#" + c + h + o;
37
37
  }
38
- function ht(t, n = 1) {
38
+ function ft(t, n = 1) {
39
39
  return Number(t.toFixed(n));
40
40
  }
41
- let Dt = 0;
42
- const ba = () => {
43
- Dt = 0;
44
- }, On = (t) => {
41
+ let jt = 0;
42
+ const Ma = () => {
43
+ jt = 0;
44
+ }, Pn = (t) => {
45
45
  if (!t)
46
46
  return;
47
47
  let n = t.name.replace(" ", "");
48
- n.length === 0 && (n = `obj_${Dt}`, Dt++), t.parent !== null && (n = `${t.parent.uuid}.${n}`), t.uuid = n, t.children.forEach((a) => {
49
- On(a);
48
+ n.length === 0 && (n = `obj_${jt}`, jt++), t.parent !== null && (n = `${t.parent.uuid}.${n}`), t.uuid = n, t.children.forEach((a) => {
49
+ Pn(a);
50
50
  });
51
- }, mi = (t) => {
51
+ }, wi = (t) => {
52
52
  t?.dispose();
53
- }, ya = (t) => {
53
+ }, Ta = (t) => {
54
54
  t && (Array.isArray(t) ? t.forEach((n) => n.dispose()) : t.dispose());
55
- }, Mn = (t) => {
55
+ }, An = (t) => {
56
56
  if (t) {
57
57
  for (; t.children.length > 0; ) {
58
58
  const n = t.children[0];
59
- n.type === "Audio" ? (n.pause(), n.parent && n.parent.remove(n)) : Mn(n);
59
+ n.type === "Audio" ? (n.pause(), n.parent && n.parent.remove(n)) : An(n);
60
60
  }
61
61
  if (t.parent && t.parent.remove(t), t.isMesh) {
62
62
  const n = t;
63
- n.geometry?.dispose(), ya(n.material);
63
+ n.geometry?.dispose(), Ta(n.material);
64
64
  }
65
65
  t.dispose !== void 0 && t.dispose();
66
66
  }
67
67
  };
68
- class vi {
68
+ class Oi {
69
69
  components = /* @__PURE__ */ new Map();
70
70
  listen;
71
71
  // Protected
@@ -123,7 +123,7 @@ class vi {
123
123
  n && (this._mode = "editor");
124
124
  }
125
125
  }
126
- const D = new an(), I = {
126
+ const F = new sn(), B = {
127
127
  CUSTOM: "ToolEvents::custom",
128
128
  // Components
129
129
  SELECT_DROPDOWN: "ToolEvents::selectDropdown",
@@ -139,7 +139,7 @@ const D = new an(), I = {
139
139
  ADD_CAMERA: "ToolEvents::addCamera",
140
140
  REMOVE_CAMERA: "ToolEvents::removeCamera"
141
141
  };
142
- class wt {
142
+ class Ot {
143
143
  app;
144
144
  constructor(n) {
145
145
  this.app = n;
@@ -151,7 +151,7 @@ class wt {
151
151
  handleEditor(n, a, e) {
152
152
  }
153
153
  }
154
- class gi extends wt {
154
+ class Mi extends Ot {
155
155
  selectDropdown(n, a) {
156
156
  this.app.send({
157
157
  event: "selectComponent",
@@ -175,15 +175,15 @@ class gi extends wt {
175
175
  handleApp(n, a, e) {
176
176
  switch (e.event) {
177
177
  case "selectComponent":
178
- D.dispatchEvent({ type: I.SELECT_DROPDOWN, value: e.data });
178
+ F.dispatchEvent({ type: B.SELECT_DROPDOWN, value: e.data });
179
179
  break;
180
180
  case "draggableListUpdate":
181
- D.dispatchEvent({ type: I.DRAG_UPDATE, value: e.data });
181
+ F.dispatchEvent({ type: B.DRAG_UPDATE, value: e.data });
182
182
  break;
183
183
  }
184
184
  }
185
185
  }
186
- class Lt extends wt {
186
+ class Nt extends Ot {
187
187
  project;
188
188
  sheets = /* @__PURE__ */ new Map();
189
189
  sheetObjects = /* @__PURE__ */ new Map();
@@ -237,12 +237,12 @@ class Lt extends wt {
237
237
  return;
238
238
  const h = `${n}_${a}`;
239
239
  let o = this.sheetObjects.get(h);
240
- o !== void 0 ? o = c.object(a, { ...e, ...o.value }, { reconfigure: !0 }) : o = c.object(a, e), this.sheetObjects.set(h, o), this.sheetObjectCBs.set(h, i !== void 0 ? i : wn);
241
- const u = o.onValuesChange((d) => {
240
+ o !== void 0 ? o = c.object(a, { ...e, ...o.value }, { reconfigure: !0 }) : o = c.object(a, e), this.sheetObjects.set(h, o), this.sheetObjectCBs.set(h, i !== void 0 ? i : Rn);
241
+ const d = o.onValuesChange((u) => {
242
242
  if (this.app.editor) {
243
- for (const b in d) {
244
- const E = d[b];
245
- typeof E == "object" && va(E) && (d[b] = {
243
+ for (const v in u) {
244
+ const E = u[v];
245
+ typeof E == "object" && wa(E) && (u[v] = {
246
246
  r: E.r,
247
247
  g: E.g,
248
248
  b: E.b,
@@ -255,14 +255,14 @@ class Lt extends wt {
255
255
  data: {
256
256
  sheet: n,
257
257
  sheetObject: h,
258
- values: d
258
+ values: u
259
259
  }
260
260
  });
261
261
  }
262
- const f = this.sheetObjectCBs.get(h);
263
- f !== void 0 && f(d);
262
+ const g = this.sheetObjectCBs.get(h);
263
+ g !== void 0 && g(u);
264
264
  });
265
- return this.sheetObjectUnsubscribe.set(h, u), o;
265
+ return this.sheetObjectUnsubscribe.set(h, d), o;
266
266
  }
267
267
  unsubscribe(n) {
268
268
  if (this.project === void 0) {
@@ -309,27 +309,27 @@ class Lt extends wt {
309
309
  if (n.editor) {
310
310
  this.studio?.ui.restore(), this.studio?.onSelectionChange((h) => {
311
311
  h.length < 1 || h.forEach((o) => {
312
- let u = o.address.sheetId, d = "setSheet", f = {};
312
+ let d = o.address.sheetId, u = "setSheet", g = {};
313
313
  switch (o.type) {
314
314
  case "Theatre_Sheet_PublicAPI":
315
- d = "setSheet", f = {
315
+ u = "setSheet", g = {
316
316
  sheet: o.address.sheetId
317
317
  }, a.activeSheet = a.sheets.get(o.address.sheetId);
318
318
  break;
319
319
  case "Theatre_SheetObject_PublicAPI":
320
- d = "setSheetObject", u += `_${o.address.objectKey}`, f = {
321
- id: u,
320
+ u = "setSheetObject", d += `_${o.address.objectKey}`, g = {
321
+ id: d,
322
322
  sheet: o.address.sheetId,
323
323
  key: o.address.objectKey
324
324
  }, a.activeSheet = a.sheets.get(o.address.sheetId);
325
325
  break;
326
326
  }
327
- n.send({ event: d, target: "app", data: f });
327
+ n.send({ event: u, target: "app", data: g });
328
328
  });
329
329
  });
330
330
  let e = -1;
331
331
  const i = () => {
332
- if (Lt.rafDriver?.tick(performance.now()), a.activeSheet !== void 0 && e !== a.activeSheet.sequence.position) {
332
+ if (Nt.rafDriver?.tick(performance.now()), a.activeSheet !== void 0 && e !== a.activeSheet.sequence.position) {
333
333
  e = a.activeSheet.sequence.position;
334
334
  const h = a.activeSheet;
335
335
  n.send({
@@ -349,31 +349,31 @@ class Lt extends wt {
349
349
  this.studio?.ui.hide();
350
350
  }
351
351
  }
352
- function bi(t, n, a) {
352
+ function Ti(t, n, a) {
353
353
  if (t.editor) {
354
354
  a.ui.restore(), a.onSelectionChange((h) => {
355
355
  h.length < 1 || h.forEach((o) => {
356
- let u = o.address.sheetId, d = "setSheet", f = {};
356
+ let d = o.address.sheetId, u = "setSheet", g = {};
357
357
  switch (o.type) {
358
358
  case "Theatre_Sheet_PublicAPI":
359
- d = "setSheet", f = {
359
+ u = "setSheet", g = {
360
360
  sheet: o.address.sheetId
361
361
  }, n.activeSheet = n.sheets.get(o.address.sheetId);
362
362
  break;
363
363
  case "Theatre_SheetObject_PublicAPI":
364
- d = "setSheetObject", u += `_${o.address.objectKey}`, f = {
365
- id: u,
364
+ u = "setSheetObject", d += `_${o.address.objectKey}`, g = {
365
+ id: d,
366
366
  sheet: o.address.sheetId,
367
367
  key: o.address.objectKey
368
368
  }, n.activeSheet = n.sheets.get(o.address.sheetId);
369
369
  break;
370
370
  }
371
- t.send({ event: d, target: "app", data: f });
371
+ t.send({ event: u, target: "app", data: g });
372
372
  });
373
373
  });
374
374
  let e = -1;
375
375
  const i = () => {
376
- if (Lt.rafDriver?.tick(performance.now()), n.activeSheet !== void 0 && e !== n.activeSheet.sequence.position) {
376
+ if (Nt.rafDriver?.tick(performance.now()), n.activeSheet !== void 0 && e !== n.activeSheet.sequence.position) {
377
377
  e = n.activeSheet.sequence.position;
378
378
  const h = n.activeSheet;
379
379
  t.send({
@@ -392,7 +392,7 @@ function bi(t, n, a) {
392
392
  } else
393
393
  a.ui.hide();
394
394
  }
395
- function Ea(t) {
395
+ function _a(t) {
396
396
  if (t.name === "cameras")
397
397
  return "camera";
398
398
  if (t.name === "interactive")
@@ -406,7 +406,7 @@ function Ea(t) {
406
406
  const n = t.type;
407
407
  return n.search("Helper") > -1 ? "icon_utils" : n.search("Camera") > -1 ? "camera" : n.search("Light") > -1 ? "light" : "obj3D";
408
408
  }
409
- function Tn(t) {
409
+ function kn(t) {
410
410
  const n = {
411
411
  name: t.name,
412
412
  type: t.type,
@@ -414,10 +414,10 @@ function Tn(t) {
414
414
  children: []
415
415
  };
416
416
  return t.children.forEach((a) => {
417
- n.children.push(Tn(a));
417
+ n.children.push(kn(a));
418
418
  }), n;
419
419
  }
420
- function xa(t) {
420
+ function Ra(t) {
421
421
  const n = {};
422
422
  for (const a in t) {
423
423
  const e = t[a].value;
@@ -425,7 +425,7 @@ function xa(t) {
425
425
  }
426
426
  return n;
427
427
  }
428
- function Ca(t) {
428
+ function Pa(t) {
429
429
  switch (t) {
430
430
  case "blendSrcAlpha":
431
431
  case "blendDstAlpha":
@@ -437,10 +437,10 @@ function Ca(t) {
437
437
  }
438
438
  return !1;
439
439
  }
440
- function nt(t) {
440
+ function it(t) {
441
441
  const n = {};
442
442
  for (const a in t) {
443
- if (a.substring(0, 1) === "_" || a.substring(0, 2) === "is" || Ca(a))
443
+ if (a.substring(0, 1) === "_" || a.substring(0, 2) === "is" || Pa(a))
444
444
  continue;
445
445
  const e = typeof t[a], i = t[a];
446
446
  switch (e) {
@@ -452,13 +452,13 @@ function nt(t) {
452
452
  case "object":
453
453
  if (i !== null)
454
454
  if (n[a] = i, i.isTexture)
455
- if (i instanceof rn) {
455
+ if (i instanceof on) {
456
456
  const c = i.source.toJSON();
457
457
  n[a] = { src: c.url };
458
458
  } else
459
- i instanceof In && (console.log("env map"), console.log(i.source.data), console.log(i.source.toJSON()), n[a] = { src: "" });
459
+ i instanceof $n && (console.log("env map"), console.log(i.source.data), console.log(i.source.toJSON()), n[a] = { src: "" });
460
460
  else
461
- a === "uniforms" && (n[a] = xa(n[a]));
461
+ a === "uniforms" && (n[a] = Ra(n[a]));
462
462
  else
463
463
  n[a] = { src: "" };
464
464
  break;
@@ -493,28 +493,28 @@ function At(t) {
493
493
  if (Array.isArray(e.material)) {
494
494
  const i = [];
495
495
  e.material.forEach((c) => {
496
- i.push(nt(c));
496
+ i.push(it(c));
497
497
  }), n.material = i;
498
498
  } else
499
- n.material = nt(e.material);
499
+ n.material = it(e.material);
500
500
  } else if (a.search("points") > -1) {
501
501
  const e = t;
502
502
  if (Array.isArray(e.material)) {
503
503
  const i = [];
504
504
  e.material.forEach((c) => {
505
- i.push(nt(c));
505
+ i.push(it(c));
506
506
  }), n.material = i;
507
507
  } else
508
- n.material = nt(e.material);
508
+ n.material = it(e.material);
509
509
  } else if (a.search("line") > -1) {
510
510
  const e = t;
511
511
  if (Array.isArray(e.material)) {
512
512
  const i = [];
513
513
  e.material.forEach((c) => {
514
- i.push(nt(c));
514
+ i.push(it(c));
515
515
  }), n.material = i;
516
516
  } else
517
- n.material = nt(e.material);
517
+ n.material = it(e.material);
518
518
  } else
519
519
  a.search("camera") > -1 ? t.type === "PerspectiveCamera" ? n.perspectiveCameraInfo = {
520
520
  fov: t.fov,
@@ -544,7 +544,7 @@ function At(t) {
544
544
  });
545
545
  return n;
546
546
  }
547
- function Sa(t, n) {
547
+ function Aa(t, n) {
548
548
  const a = n.split(".");
549
549
  switch (a.length) {
550
550
  case 1:
@@ -561,7 +561,7 @@ function Sa(t, n) {
561
561
  return t[a[0]][a[1]][a[2]][a[3]][a[4]][a[5]];
562
562
  }
563
563
  }
564
- function K(t, n, a) {
564
+ function Z(t, n, a) {
565
565
  const e = n.split(".");
566
566
  switch (e.length) {
567
567
  case 1:
@@ -585,12 +585,12 @@ function It(t) {
585
585
  return new Promise((n, a) => {
586
586
  const e = new Image();
587
587
  e.onload = () => {
588
- const i = new rn(e);
589
- i.wrapS = $t, i.wrapT = $t, i.needsUpdate = !0, n(i);
588
+ const i = new on(e);
589
+ i.wrapS = Ut, i.wrapT = Ut, i.needsUpdate = !0, n(i);
590
590
  }, e.onerror = a, e.src = t;
591
591
  });
592
592
  }
593
- class yi extends wt {
593
+ class _i extends Ot {
594
594
  scene = void 0;
595
595
  renderer = void 0;
596
596
  getObject(n) {
@@ -645,8 +645,8 @@ class yi extends wt {
645
645
  setScene(n) {
646
646
  if (n === void 0 || (this.scene = n, !this.app.debugEnabled))
647
647
  return;
648
- ba(), On(this.scene);
649
- const a = Tn(this.scene);
648
+ Ma(), Pn(this.scene);
649
+ const a = kn(this.scene);
650
650
  this.app.send({
651
651
  event: "setScene",
652
652
  target: "editor",
@@ -676,32 +676,32 @@ class yi extends wt {
676
676
  handleApp(n, a, e) {
677
677
  switch (e.event) {
678
678
  case "getObject":
679
- D.dispatchEvent({ type: I.GET_OBJECT, value: e.data });
679
+ F.dispatchEvent({ type: B.GET_OBJECT, value: e.data });
680
680
  break;
681
681
  case "updateObject":
682
- D.dispatchEvent({ type: I.UPDATE_OBJECT, value: e.data });
682
+ F.dispatchEvent({ type: B.UPDATE_OBJECT, value: e.data });
683
683
  break;
684
684
  case "createTexture":
685
- D.dispatchEvent({ type: I.CREATE_TEXTURE, value: e.data });
685
+ F.dispatchEvent({ type: B.CREATE_TEXTURE, value: e.data });
686
686
  break;
687
687
  case "requestMethod":
688
- D.dispatchEvent({ type: I.REQUEST_METHOD, value: e.data });
688
+ F.dispatchEvent({ type: B.REQUEST_METHOD, value: e.data });
689
689
  break;
690
690
  }
691
691
  }
692
692
  handleEditor(n, a, e) {
693
693
  switch (e.event) {
694
694
  case "setObject":
695
- D.dispatchEvent({ type: I.SET_OBJECT, value: e.data });
695
+ F.dispatchEvent({ type: B.SET_OBJECT, value: e.data });
696
696
  break;
697
697
  case "setScene":
698
- D.dispatchEvent({ type: I.SET_SCENE, value: e.data });
698
+ F.dispatchEvent({ type: B.SET_SCENE, value: e.data });
699
699
  break;
700
700
  case "addCamera":
701
- D.dispatchEvent({ type: I.ADD_CAMERA, value: e.data });
701
+ F.dispatchEvent({ type: B.ADD_CAMERA, value: e.data });
702
702
  break;
703
703
  case "removeCamera":
704
- D.dispatchEvent({ type: I.REMOVE_CAMERA, value: e.data });
704
+ F.dispatchEvent({ type: B.REMOVE_CAMERA, value: e.data });
705
705
  break;
706
706
  }
707
707
  }
@@ -710,7 +710,7 @@ class yi extends wt {
710
710
  this.renderer?.setSize(n, a);
711
711
  }
712
712
  set dpr(n) {
713
- this.renderer?.setPixelRatio(Xe(1, 2, n));
713
+ this.renderer?.setPixelRatio(Ze(1, 2, n));
714
714
  }
715
715
  get dpr() {
716
716
  return this.renderer !== void 0 ? this.renderer?.getPixelRatio() : 1;
@@ -725,7 +725,7 @@ class yi extends wt {
725
725
  return this.renderer !== void 0 ? this.renderer?.domElement : null;
726
726
  }
727
727
  }
728
- class Ei extends wt {
728
+ class Ri extends Ot {
729
729
  bindCBs;
730
730
  buttonCBs;
731
731
  pane = void 0;
@@ -736,7 +736,7 @@ class Ei extends wt {
736
736
  super(n), this.bindCBs = /* @__PURE__ */ new Map(), this.buttonCBs = /* @__PURE__ */ new Map(), n.editor && this.createGUI();
737
737
  }
738
738
  createGUI() {
739
- this.pane = new ha({ title: "GUI" }), this.pane.registerPlugin(fa);
739
+ this.pane = new Ea({ title: "GUI" }), this.pane.registerPlugin(xa);
740
740
  }
741
741
  dispose() {
742
742
  this.bindCBs.clear(), this.buttonCBs.clear(), this.appCallbacks = 0, this.editorCallbacks = 0, this.app.editor && (this.pane?.dispose(), this.pane = void 0);
@@ -762,14 +762,14 @@ class Ei extends wt {
762
762
  }
763
763
  // Binding
764
764
  bind(n, a, e, i = void 0) {
765
- const c = this.bindID, h = e.onChange !== void 0 ? e.onChange : wn;
766
- this.bindCBs.set(c, h), this.app.editor ? (this.pane === void 0 && this.createGUI(), (i !== void 0 ? i : this.pane).addBinding(n, a, e).on("change", (u) => {
765
+ const c = this.bindID, h = e.onChange !== void 0 ? e.onChange : Rn;
766
+ this.bindCBs.set(c, h), this.app.editor ? (this.pane === void 0 && this.createGUI(), (i !== void 0 ? i : this.pane).addBinding(n, a, e).on("change", (d) => {
767
767
  this.app.send({
768
768
  event: "updateBind",
769
769
  target: "app",
770
770
  data: {
771
771
  id: c,
772
- value: u.value
772
+ value: d.value
773
773
  }
774
774
  });
775
775
  }), this.editorCallbacks++) : (this.app.send({
@@ -843,7 +843,7 @@ class Ei extends wt {
843
843
  }
844
844
  }
845
845
  }
846
- var Nt = { exports: {} }, ct = {};
846
+ var Lt = { exports: {} }, lt = {};
847
847
  /**
848
848
  * @license React
849
849
  * react-jsx-runtime.production.min.js
@@ -853,25 +853,25 @@ var Nt = { exports: {} }, ct = {};
853
853
  * This source code is licensed under the MIT license found in the
854
854
  * LICENSE file in the root directory of this source tree.
855
855
  */
856
- var qt;
857
- function wa() {
858
- if (qt)
859
- return ct;
860
- qt = 1;
861
- var t = Cn, n = Symbol.for("react.element"), a = Symbol.for("react.fragment"), e = Object.prototype.hasOwnProperty, i = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, c = { key: !0, ref: !0, __self: !0, __source: !0 };
862
- function h(o, u, d) {
863
- var f, b = {}, E = null, x = null;
864
- d !== void 0 && (E = "" + d), u.key !== void 0 && (E = "" + u.key), u.ref !== void 0 && (x = u.ref);
865
- for (f in u)
866
- e.call(u, f) && !c.hasOwnProperty(f) && (b[f] = u[f]);
856
+ var Xt;
857
+ function ka() {
858
+ if (Xt)
859
+ return lt;
860
+ Xt = 1;
861
+ var t = Tn, n = Symbol.for("react.element"), a = Symbol.for("react.fragment"), e = Object.prototype.hasOwnProperty, i = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, c = { key: !0, ref: !0, __self: !0, __source: !0 };
862
+ function h(o, d, u) {
863
+ var g, v = {}, E = null, x = null;
864
+ u !== void 0 && (E = "" + u), d.key !== void 0 && (E = "" + d.key), d.ref !== void 0 && (x = d.ref);
865
+ for (g in d)
866
+ e.call(d, g) && !c.hasOwnProperty(g) && (v[g] = d[g]);
867
867
  if (o && o.defaultProps)
868
- for (f in u = o.defaultProps, u)
869
- b[f] === void 0 && (b[f] = u[f]);
870
- return { $$typeof: n, type: o, key: E, ref: x, props: b, _owner: i.current };
868
+ for (g in d = o.defaultProps, d)
869
+ v[g] === void 0 && (v[g] = d[g]);
870
+ return { $$typeof: n, type: o, key: E, ref: x, props: v, _owner: i.current };
871
871
  }
872
- return ct.Fragment = a, ct.jsx = h, ct.jsxs = h, ct;
872
+ return lt.Fragment = a, lt.jsx = h, lt.jsxs = h, lt;
873
873
  }
874
- var lt = {};
874
+ var dt = {};
875
875
  /**
876
876
  * @license React
877
877
  * react-jsx-runtime.development.js
@@ -881,57 +881,57 @@ var lt = {};
881
881
  * This source code is licensed under the MIT license found in the
882
882
  * LICENSE file in the root directory of this source tree.
883
883
  */
884
- var Kt;
885
- function Oa() {
886
- return Kt || (Kt = 1, process.env.NODE_ENV !== "production" && function() {
887
- var t = Cn, n = Symbol.for("react.element"), a = Symbol.for("react.portal"), e = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), c = Symbol.for("react.profiler"), h = Symbol.for("react.provider"), o = Symbol.for("react.context"), u = Symbol.for("react.forward_ref"), d = Symbol.for("react.suspense"), f = Symbol.for("react.suspense_list"), b = Symbol.for("react.memo"), E = Symbol.for("react.lazy"), x = Symbol.for("react.offscreen"), M = Symbol.iterator, P = "@@iterator";
884
+ var Zt;
885
+ function Da() {
886
+ return Zt || (Zt = 1, process.env.NODE_ENV !== "production" && function() {
887
+ var t = Tn, n = Symbol.for("react.element"), a = Symbol.for("react.portal"), e = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), c = Symbol.for("react.profiler"), h = Symbol.for("react.provider"), o = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), u = Symbol.for("react.suspense"), g = Symbol.for("react.suspense_list"), v = Symbol.for("react.memo"), E = Symbol.for("react.lazy"), x = Symbol.for("react.offscreen"), R = Symbol.iterator, P = "@@iterator";
888
888
  function V(r) {
889
889
  if (r === null || typeof r != "object")
890
890
  return null;
891
- var m = M && r[M] || r[P];
892
- return typeof m == "function" ? m : null;
891
+ var f = R && r[R] || r[P];
892
+ return typeof f == "function" ? f : null;
893
893
  }
894
- var U = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
895
- function j(r) {
894
+ var Y = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
895
+ function I(r) {
896
896
  {
897
- for (var m = arguments.length, g = new Array(m > 1 ? m - 1 : 0), w = 1; w < m; w++)
898
- g[w - 1] = arguments[w];
899
- O("error", r, g);
897
+ for (var f = arguments.length, b = new Array(f > 1 ? f - 1 : 0), S = 1; S < f; S++)
898
+ b[S - 1] = arguments[S];
899
+ _("error", r, b);
900
900
  }
901
901
  }
902
- function O(r, m, g) {
902
+ function _(r, f, b) {
903
903
  {
904
- var w = U.ReactDebugCurrentFrame, N = w.getStackAddendum();
905
- N !== "" && (m += "%s", g = g.concat([N]));
906
- var B = g.map(function(k) {
907
- return String(k);
904
+ var S = Y.ReactDebugCurrentFrame, $ = S.getStackAddendum();
905
+ $ !== "" && (f += "%s", b = b.concat([$]));
906
+ var H = b.map(function(D) {
907
+ return String(D);
908
908
  });
909
- B.unshift("Warning: " + m), Function.prototype.apply.call(console[r], console, B);
909
+ H.unshift("Warning: " + f), Function.prototype.apply.call(console[r], console, H);
910
910
  }
911
911
  }
912
- var re = !1, Q = !1, Ce = !1, G = !1, ee = !1, ve;
913
- ve = Symbol.for("react.module.reference");
914
- function ze(r) {
915
- return !!(typeof r == "string" || typeof r == "function" || r === e || r === c || ee || r === i || r === d || r === f || G || r === x || re || Q || Ce || typeof r == "object" && r !== null && (r.$$typeof === E || r.$$typeof === b || r.$$typeof === h || r.$$typeof === o || r.$$typeof === u || // This needs to include all possible module reference object
912
+ var q = !1, ee = !1, Se = !1, W = !1, me = !1, le;
913
+ le = Symbol.for("react.module.reference");
914
+ function Me(r) {
915
+ return !!(typeof r == "string" || typeof r == "function" || r === e || r === c || me || r === i || r === u || r === g || W || r === x || q || ee || Se || typeof r == "object" && r !== null && (r.$$typeof === E || r.$$typeof === v || r.$$typeof === h || r.$$typeof === o || r.$$typeof === d || // This needs to include all possible module reference object
916
916
  // types supported by any Flight configuration anywhere since
917
917
  // we don't know which Flight build this will end up being used
918
918
  // with.
919
- r.$$typeof === ve || r.getModuleId !== void 0));
919
+ r.$$typeof === le || r.getModuleId !== void 0));
920
920
  }
921
- function Me(r, m, g) {
922
- var w = r.displayName;
923
- if (w)
924
- return w;
925
- var N = m.displayName || m.name || "";
926
- return N !== "" ? g + "(" + N + ")" : g;
921
+ function Te(r, f, b) {
922
+ var S = r.displayName;
923
+ if (S)
924
+ return S;
925
+ var $ = f.displayName || f.name || "";
926
+ return $ !== "" ? b + "(" + $ + ")" : b;
927
927
  }
928
- function $(r) {
928
+ function ge(r) {
929
929
  return r.displayName || "Context";
930
930
  }
931
- function le(r) {
931
+ function L(r) {
932
932
  if (r == null)
933
933
  return null;
934
- if (typeof r.tag == "number" && j("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof r == "function")
934
+ if (typeof r.tag == "number" && I("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof r == "function")
935
935
  return r.displayName || r.name || null;
936
936
  if (typeof r == "string")
937
937
  return r;
@@ -944,28 +944,28 @@ function Oa() {
944
944
  return "Profiler";
945
945
  case i:
946
946
  return "StrictMode";
947
- case d:
947
+ case u:
948
948
  return "Suspense";
949
- case f:
949
+ case g:
950
950
  return "SuspenseList";
951
951
  }
952
952
  if (typeof r == "object")
953
953
  switch (r.$$typeof) {
954
954
  case o:
955
- var m = r;
956
- return $(m) + ".Consumer";
955
+ var f = r;
956
+ return ge(f) + ".Consumer";
957
957
  case h:
958
- var g = r;
959
- return $(g._context) + ".Provider";
960
- case u:
961
- return Me(r, r.render, "ForwardRef");
962
- case b:
963
- var w = r.displayName || null;
964
- return w !== null ? w : le(r.type) || "Memo";
958
+ var b = r;
959
+ return ge(b._context) + ".Provider";
960
+ case d:
961
+ return Te(r, r.render, "ForwardRef");
962
+ case v:
963
+ var S = r.displayName || null;
964
+ return S !== null ? S : L(r.type) || "Memo";
965
965
  case E: {
966
- var N = r, B = N._payload, k = N._init;
966
+ var $ = r, H = $._payload, D = $._init;
967
967
  try {
968
- return le(k(B));
968
+ return L(D(H));
969
969
  } catch {
970
970
  return null;
971
971
  }
@@ -973,18 +973,18 @@ function Oa() {
973
973
  }
974
974
  return null;
975
975
  }
976
- var S = Object.assign, Te = 0, ge, _e, je, Re, Pe, De, Ye;
977
- function te() {
976
+ var be = Object.assign, C = 0, Ce, _e, De, Re, Pe, je, Fe;
977
+ function Be() {
978
978
  }
979
- te.__reactDisabledLog = !0;
980
- function Se() {
979
+ Be.__reactDisabledLog = !0;
980
+ function ae() {
981
981
  {
982
- if (Te === 0) {
983
- ge = console.log, _e = console.info, je = console.warn, Re = console.error, Pe = console.group, De = console.groupCollapsed, Ye = console.groupEnd;
982
+ if (C === 0) {
983
+ Ce = console.log, _e = console.info, De = console.warn, Re = console.error, Pe = console.group, je = console.groupCollapsed, Fe = console.groupEnd;
984
984
  var r = {
985
985
  configurable: !0,
986
986
  enumerable: !0,
987
- value: te,
987
+ value: Be,
988
988
  writable: !0
989
989
  };
990
990
  Object.defineProperties(console, {
@@ -997,336 +997,336 @@ function Oa() {
997
997
  groupEnd: r
998
998
  });
999
999
  }
1000
- Te++;
1000
+ C++;
1001
1001
  }
1002
1002
  }
1003
- function it() {
1003
+ function we() {
1004
1004
  {
1005
- if (Te--, Te === 0) {
1005
+ if (C--, C === 0) {
1006
1006
  var r = {
1007
1007
  configurable: !0,
1008
1008
  enumerable: !0,
1009
1009
  writable: !0
1010
1010
  };
1011
1011
  Object.defineProperties(console, {
1012
- log: S({}, r, {
1013
- value: ge
1012
+ log: be({}, r, {
1013
+ value: Ce
1014
1014
  }),
1015
- info: S({}, r, {
1015
+ info: be({}, r, {
1016
1016
  value: _e
1017
1017
  }),
1018
- warn: S({}, r, {
1019
- value: je
1018
+ warn: be({}, r, {
1019
+ value: De
1020
1020
  }),
1021
- error: S({}, r, {
1021
+ error: be({}, r, {
1022
1022
  value: Re
1023
1023
  }),
1024
- group: S({}, r, {
1024
+ group: be({}, r, {
1025
1025
  value: Pe
1026
1026
  }),
1027
- groupCollapsed: S({}, r, {
1028
- value: De
1027
+ groupCollapsed: be({}, r, {
1028
+ value: je
1029
1029
  }),
1030
- groupEnd: S({}, r, {
1031
- value: Ye
1030
+ groupEnd: be({}, r, {
1031
+ value: Fe
1032
1032
  })
1033
1033
  });
1034
1034
  }
1035
- Te < 0 && j("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
1035
+ C < 0 && I("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
1036
1036
  }
1037
1037
  }
1038
- var Ve = U.ReactCurrentDispatcher, pe;
1039
- function p(r, m, g) {
1038
+ var Ye = Y.ReactCurrentDispatcher, Ge;
1039
+ function ue(r, f, b) {
1040
1040
  {
1041
- if (pe === void 0)
1041
+ if (Ge === void 0)
1042
1042
  try {
1043
1043
  throw Error();
1044
- } catch (N) {
1045
- var w = N.stack.trim().match(/\n( *(at )?)/);
1046
- pe = w && w[1] || "";
1044
+ } catch ($) {
1045
+ var S = $.stack.trim().match(/\n( *(at )?)/);
1046
+ Ge = S && S[1] || "";
1047
1047
  }
1048
1048
  return `
1049
- ` + pe + r;
1049
+ ` + Ge + r;
1050
1050
  }
1051
1051
  }
1052
- var v = !1, C;
1052
+ var p = !1, m;
1053
1053
  {
1054
- var _ = typeof WeakMap == "function" ? WeakMap : Map;
1055
- C = new _();
1054
+ var w = typeof WeakMap == "function" ? WeakMap : Map;
1055
+ m = new w();
1056
1056
  }
1057
- function H(r, m) {
1058
- if (!r || v)
1057
+ function j(r, f) {
1058
+ if (!r || p)
1059
1059
  return "";
1060
1060
  {
1061
- var g = C.get(r);
1062
- if (g !== void 0)
1063
- return g;
1061
+ var b = m.get(r);
1062
+ if (b !== void 0)
1063
+ return b;
1064
1064
  }
1065
- var w;
1066
- v = !0;
1067
- var N = Error.prepareStackTrace;
1065
+ var S;
1066
+ p = !0;
1067
+ var $ = Error.prepareStackTrace;
1068
1068
  Error.prepareStackTrace = void 0;
1069
- var B;
1070
- B = Ve.current, Ve.current = null, Se();
1069
+ var H;
1070
+ H = Ye.current, Ye.current = null, ae();
1071
1071
  try {
1072
- if (m) {
1073
- var k = function() {
1072
+ if (f) {
1073
+ var D = function() {
1074
1074
  throw Error();
1075
1075
  };
1076
- if (Object.defineProperty(k.prototype, "props", {
1076
+ if (Object.defineProperty(D.prototype, "props", {
1077
1077
  set: function() {
1078
1078
  throw Error();
1079
1079
  }
1080
1080
  }), typeof Reflect == "object" && Reflect.construct) {
1081
1081
  try {
1082
- Reflect.construct(k, []);
1083
- } catch (Ie) {
1084
- w = Ie;
1082
+ Reflect.construct(D, []);
1083
+ } catch (Le) {
1084
+ S = Le;
1085
1085
  }
1086
- Reflect.construct(r, [], k);
1086
+ Reflect.construct(r, [], D);
1087
1087
  } else {
1088
1088
  try {
1089
- k.call();
1090
- } catch (Ie) {
1091
- w = Ie;
1089
+ D.call();
1090
+ } catch (Le) {
1091
+ S = Le;
1092
1092
  }
1093
- r.call(k.prototype);
1093
+ r.call(D.prototype);
1094
1094
  }
1095
1095
  } else {
1096
1096
  try {
1097
1097
  throw Error();
1098
- } catch (Ie) {
1099
- w = Ie;
1098
+ } catch (Le) {
1099
+ S = Le;
1100
1100
  }
1101
1101
  r();
1102
1102
  }
1103
- } catch (Ie) {
1104
- if (Ie && w && typeof Ie.stack == "string") {
1105
- for (var R = Ie.stack.split(`
1106
- `), he = w.stack.split(`
1107
- `), J = R.length - 1, ne = he.length - 1; J >= 1 && ne >= 0 && R[J] !== he[ne]; )
1108
- ne--;
1109
- for (; J >= 1 && ne >= 0; J--, ne--)
1110
- if (R[J] !== he[ne]) {
1111
- if (J !== 1 || ne !== 1)
1103
+ } catch (Le) {
1104
+ if (Le && S && typeof Le.stack == "string") {
1105
+ for (var k = Le.stack.split(`
1106
+ `), he = S.stack.split(`
1107
+ `), Q = k.length - 1, te = he.length - 1; Q >= 1 && te >= 0 && k[Q] !== he[te]; )
1108
+ te--;
1109
+ for (; Q >= 1 && te >= 0; Q--, te--)
1110
+ if (k[Q] !== he[te]) {
1111
+ if (Q !== 1 || te !== 1)
1112
1112
  do
1113
- if (J--, ne--, ne < 0 || R[J] !== he[ne]) {
1114
- var Ee = `
1115
- ` + R[J].replace(" at new ", " at ");
1116
- return r.displayName && Ee.includes("<anonymous>") && (Ee = Ee.replace("<anonymous>", r.displayName)), typeof r == "function" && C.set(r, Ee), Ee;
1113
+ if (Q--, te--, te < 0 || k[Q] !== he[te]) {
1114
+ var xe = `
1115
+ ` + k[Q].replace(" at new ", " at ");
1116
+ return r.displayName && xe.includes("<anonymous>") && (xe = xe.replace("<anonymous>", r.displayName)), typeof r == "function" && m.set(r, xe), xe;
1117
1117
  }
1118
- while (J >= 1 && ne >= 0);
1118
+ while (Q >= 1 && te >= 0);
1119
1119
  break;
1120
1120
  }
1121
1121
  }
1122
1122
  } finally {
1123
- v = !1, Ve.current = B, it(), Error.prepareStackTrace = N;
1123
+ p = !1, Ye.current = H, we(), Error.prepareStackTrace = $;
1124
1124
  }
1125
- var Qe = r ? r.displayName || r.name : "", Ut = Qe ? p(Qe) : "";
1126
- return typeof r == "function" && C.set(r, Ut), Ut;
1125
+ var tt = r ? r.displayName || r.name : "", $t = tt ? ue(tt) : "";
1126
+ return typeof r == "function" && m.set(r, $t), $t;
1127
1127
  }
1128
- function X(r, m, g) {
1129
- return H(r, !1);
1128
+ function ie(r, f, b) {
1129
+ return j(r, !1);
1130
1130
  }
1131
- function de(r) {
1132
- var m = r.prototype;
1133
- return !!(m && m.isReactComponent);
1131
+ function M(r) {
1132
+ var f = r.prototype;
1133
+ return !!(f && f.isReactComponent);
1134
1134
  }
1135
- function z(r, m, g) {
1135
+ function O(r, f, b) {
1136
1136
  if (r == null)
1137
1137
  return "";
1138
1138
  if (typeof r == "function")
1139
- return H(r, de(r));
1139
+ return j(r, M(r));
1140
1140
  if (typeof r == "string")
1141
- return p(r);
1141
+ return ue(r);
1142
1142
  switch (r) {
1143
- case d:
1144
- return p("Suspense");
1145
- case f:
1146
- return p("SuspenseList");
1143
+ case u:
1144
+ return ue("Suspense");
1145
+ case g:
1146
+ return ue("SuspenseList");
1147
1147
  }
1148
1148
  if (typeof r == "object")
1149
1149
  switch (r.$$typeof) {
1150
- case u:
1151
- return X(r.render);
1152
- case b:
1153
- return z(r.type, m, g);
1150
+ case d:
1151
+ return ie(r.render);
1152
+ case v:
1153
+ return O(r.type, f, b);
1154
1154
  case E: {
1155
- var w = r, N = w._payload, B = w._init;
1155
+ var S = r, $ = S._payload, H = S._init;
1156
1156
  try {
1157
- return z(B(N), m, g);
1157
+ return O(H($), f, b);
1158
1158
  } catch {
1159
1159
  }
1160
1160
  }
1161
1161
  }
1162
1162
  return "";
1163
1163
  }
1164
- var Z = Object.prototype.hasOwnProperty, se = {}, A = U.ReactDebugCurrentFrame;
1165
- function L(r) {
1164
+ var N = Object.prototype.hasOwnProperty, re = {}, se = Y.ReactDebugCurrentFrame;
1165
+ function A(r) {
1166
1166
  if (r) {
1167
- var m = r._owner, g = z(r.type, r._source, m ? m.type : null);
1168
- A.setExtraStackFrame(g);
1167
+ var f = r._owner, b = O(r.type, r._source, f ? f.type : null);
1168
+ se.setExtraStackFrame(b);
1169
1169
  } else
1170
- A.setExtraStackFrame(null);
1170
+ se.setExtraStackFrame(null);
1171
1171
  }
1172
- function ie(r, m, g, w, N) {
1172
+ function z(r, f, b, S, $) {
1173
1173
  {
1174
- var B = Function.call.bind(Z);
1175
- for (var k in r)
1176
- if (B(r, k)) {
1177
- var R = void 0;
1174
+ var H = Function.call.bind(N);
1175
+ for (var D in r)
1176
+ if (H(r, D)) {
1177
+ var k = void 0;
1178
1178
  try {
1179
- if (typeof r[k] != "function") {
1180
- var he = Error((w || "React class") + ": " + g + " type `" + k + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof r[k] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
1179
+ if (typeof r[D] != "function") {
1180
+ var he = Error((S || "React class") + ": " + b + " type `" + D + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof r[D] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
1181
1181
  throw he.name = "Invariant Violation", he;
1182
1182
  }
1183
- R = r[k](m, k, w, g, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
1184
- } catch (J) {
1185
- R = J;
1183
+ k = r[D](f, D, S, b, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
1184
+ } catch (Q) {
1185
+ k = Q;
1186
1186
  }
1187
- R && !(R instanceof Error) && (L(N), j("%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).", w || "React class", g, k, typeof R), L(null)), R instanceof Error && !(R.message in se) && (se[R.message] = !0, L(N), j("Failed %s type: %s", g, R.message), L(null));
1187
+ k && !(k instanceof Error) && (A($), I("%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).", S || "React class", b, D, typeof k), A(null)), k instanceof Error && !(k.message in re) && (re[k.message] = !0, A($), I("Failed %s type: %s", b, k.message), A(null));
1188
1188
  }
1189
1189
  }
1190
1190
  }
1191
- var we = Array.isArray;
1192
- function Ne(r) {
1193
- return we(r);
1191
+ var J = Array.isArray;
1192
+ function Ie(r) {
1193
+ return J(r);
1194
1194
  }
1195
- function Ot(r) {
1195
+ function Qe(r) {
1196
1196
  {
1197
- var m = typeof Symbol == "function" && Symbol.toStringTag, g = m && r[Symbol.toStringTag] || r.constructor.name || "Object";
1198
- return g;
1197
+ var f = typeof Symbol == "function" && Symbol.toStringTag, b = f && r[Symbol.toStringTag] || r.constructor.name || "Object";
1198
+ return b;
1199
1199
  }
1200
1200
  }
1201
- function ft(r) {
1201
+ function pt(r) {
1202
1202
  try {
1203
- return pt(r), !1;
1203
+ return mt(r), !1;
1204
1204
  } catch {
1205
1205
  return !0;
1206
1206
  }
1207
1207
  }
1208
- function pt(r) {
1208
+ function mt(r) {
1209
1209
  return "" + r;
1210
1210
  }
1211
- function mt(r) {
1212
- if (ft(r))
1213
- return j("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ot(r)), pt(r);
1211
+ function vt(r) {
1212
+ if (pt(r))
1213
+ return I("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Qe(r)), mt(r);
1214
1214
  }
1215
- var Le = U.ReactCurrentOwner, rt = {
1215
+ var $e = Y.ReactCurrentOwner, st = {
1216
1216
  key: !0,
1217
1217
  ref: !0,
1218
1218
  __self: !0,
1219
1219
  __source: !0
1220
- }, st, vt, Je;
1221
- Je = {};
1220
+ }, ot, gt, et;
1221
+ et = {};
1222
1222
  function Mt(r) {
1223
- if (Z.call(r, "ref")) {
1224
- var m = Object.getOwnPropertyDescriptor(r, "ref").get;
1225
- if (m && m.isReactWarning)
1223
+ if (N.call(r, "ref")) {
1224
+ var f = Object.getOwnPropertyDescriptor(r, "ref").get;
1225
+ if (f && f.isReactWarning)
1226
1226
  return !1;
1227
1227
  }
1228
1228
  return r.ref !== void 0;
1229
1229
  }
1230
1230
  function Tt(r) {
1231
- if (Z.call(r, "key")) {
1232
- var m = Object.getOwnPropertyDescriptor(r, "key").get;
1233
- if (m && m.isReactWarning)
1231
+ if (N.call(r, "key")) {
1232
+ var f = Object.getOwnPropertyDescriptor(r, "key").get;
1233
+ if (f && f.isReactWarning)
1234
1234
  return !1;
1235
1235
  }
1236
1236
  return r.key !== void 0;
1237
1237
  }
1238
- function gt(r, m) {
1239
- if (typeof r.ref == "string" && Le.current && m && Le.current.stateNode !== m) {
1240
- var g = le(Le.current.type);
1241
- Je[g] || (j('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', le(Le.current.type), r.ref), Je[g] = !0);
1238
+ function bt(r, f) {
1239
+ if (typeof r.ref == "string" && $e.current && f && $e.current.stateNode !== f) {
1240
+ var b = L($e.current.type);
1241
+ et[b] || (I('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', L($e.current.type), r.ref), et[b] = !0);
1242
1242
  }
1243
1243
  }
1244
- function Fe(r, m) {
1244
+ function Ue(r, f) {
1245
1245
  {
1246
- var g = function() {
1247
- st || (st = !0, j("%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));
1246
+ var b = function() {
1247
+ ot || (ot = !0, I("%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)", f));
1248
1248
  };
1249
- g.isReactWarning = !0, Object.defineProperty(r, "key", {
1250
- get: g,
1249
+ b.isReactWarning = !0, Object.defineProperty(r, "key", {
1250
+ get: b,
1251
1251
  configurable: !0
1252
1252
  });
1253
1253
  }
1254
1254
  }
1255
- function Bt(r, m) {
1255
+ function Bt(r, f) {
1256
1256
  {
1257
- var g = function() {
1258
- vt || (vt = !0, j("%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));
1257
+ var b = function() {
1258
+ gt || (gt = !0, I("%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)", f));
1259
1259
  };
1260
- g.isReactWarning = !0, Object.defineProperty(r, "ref", {
1261
- get: g,
1260
+ b.isReactWarning = !0, Object.defineProperty(r, "ref", {
1261
+ get: b,
1262
1262
  configurable: !0
1263
1263
  });
1264
1264
  }
1265
1265
  }
1266
- var s = function(r, m, g, w, N, B, k) {
1267
- var R = {
1266
+ var s = function(r, f, b, S, $, H, D) {
1267
+ var k = {
1268
1268
  // This tag allows us to uniquely identify this as a React Element
1269
1269
  $$typeof: n,
1270
1270
  // Built-in properties that belong on the element
1271
1271
  type: r,
1272
- key: m,
1273
- ref: g,
1274
- props: k,
1272
+ key: f,
1273
+ ref: b,
1274
+ props: D,
1275
1275
  // Record the component responsible for creating this element.
1276
- _owner: B
1276
+ _owner: H
1277
1277
  };
1278
- return R._store = {}, Object.defineProperty(R._store, "validated", {
1278
+ return k._store = {}, Object.defineProperty(k._store, "validated", {
1279
1279
  configurable: !1,
1280
1280
  enumerable: !1,
1281
1281
  writable: !0,
1282
1282
  value: !1
1283
- }), Object.defineProperty(R, "_self", {
1283
+ }), Object.defineProperty(k, "_self", {
1284
1284
  configurable: !1,
1285
1285
  enumerable: !1,
1286
1286
  writable: !1,
1287
- value: w
1288
- }), Object.defineProperty(R, "_source", {
1287
+ value: S
1288
+ }), Object.defineProperty(k, "_source", {
1289
1289
  configurable: !1,
1290
1290
  enumerable: !1,
1291
1291
  writable: !1,
1292
- value: N
1293
- }), Object.freeze && (Object.freeze(R.props), Object.freeze(R)), R;
1292
+ value: $
1293
+ }), Object.freeze && (Object.freeze(k.props), Object.freeze(k)), k;
1294
1294
  };
1295
- function y(r, m, g, w, N) {
1295
+ function y(r, f, b, S, $) {
1296
1296
  {
1297
- var B, k = {}, R = null, he = null;
1298
- g !== void 0 && (mt(g), R = "" + g), Tt(m) && (mt(m.key), R = "" + m.key), Mt(m) && (he = m.ref, gt(m, N));
1299
- for (B in m)
1300
- Z.call(m, B) && !rt.hasOwnProperty(B) && (k[B] = m[B]);
1297
+ var H, D = {}, k = null, he = null;
1298
+ b !== void 0 && (vt(b), k = "" + b), Tt(f) && (vt(f.key), k = "" + f.key), Mt(f) && (he = f.ref, bt(f, $));
1299
+ for (H in f)
1300
+ N.call(f, H) && !st.hasOwnProperty(H) && (D[H] = f[H]);
1301
1301
  if (r && r.defaultProps) {
1302
- var J = r.defaultProps;
1303
- for (B in J)
1304
- k[B] === void 0 && (k[B] = J[B]);
1302
+ var Q = r.defaultProps;
1303
+ for (H in Q)
1304
+ D[H] === void 0 && (D[H] = Q[H]);
1305
1305
  }
1306
- if (R || he) {
1307
- var ne = typeof r == "function" ? r.displayName || r.name || "Unknown" : r;
1308
- R && Fe(k, ne), he && Bt(k, ne);
1306
+ if (k || he) {
1307
+ var te = typeof r == "function" ? r.displayName || r.name || "Unknown" : r;
1308
+ k && Ue(D, te), he && Bt(D, te);
1309
1309
  }
1310
- return s(r, R, he, N, w, Le.current, k);
1310
+ return s(r, k, he, $, S, $e.current, D);
1311
1311
  }
1312
1312
  }
1313
- var T = U.ReactCurrentOwner, F = U.ReactDebugCurrentFrame;
1314
- function W(r) {
1313
+ var T = Y.ReactCurrentOwner, U = Y.ReactDebugCurrentFrame;
1314
+ function K(r) {
1315
1315
  if (r) {
1316
- var m = r._owner, g = z(r.type, r._source, m ? m.type : null);
1317
- F.setExtraStackFrame(g);
1316
+ var f = r._owner, b = O(r.type, r._source, f ? f.type : null);
1317
+ U.setExtraStackFrame(b);
1318
1318
  } else
1319
- F.setExtraStackFrame(null);
1319
+ U.setExtraStackFrame(null);
1320
1320
  }
1321
- var be;
1322
- be = !1;
1323
- function ue(r) {
1321
+ var ye;
1322
+ ye = !1;
1323
+ function de(r) {
1324
1324
  return typeof r == "object" && r !== null && r.$$typeof === n;
1325
1325
  }
1326
1326
  function _t() {
1327
1327
  {
1328
1328
  if (T.current) {
1329
- var r = le(T.current.type);
1329
+ var r = L(T.current.type);
1330
1330
  if (r)
1331
1331
  return `
1332
1332
 
@@ -1338,146 +1338,146 @@ Check the render method of \`` + r + "`.";
1338
1338
  function Rt(r) {
1339
1339
  {
1340
1340
  if (r !== void 0) {
1341
- var m = r.fileName.replace(/^.*[\\\/]/, ""), g = r.lineNumber;
1341
+ var f = r.fileName.replace(/^.*[\\\/]/, ""), b = r.lineNumber;
1342
1342
  return `
1343
1343
 
1344
- Check your code at ` + m + ":" + g + ".";
1344
+ Check your code at ` + f + ":" + b + ".";
1345
1345
  }
1346
1346
  return "";
1347
1347
  }
1348
1348
  }
1349
- var ot = {};
1349
+ var ct = {};
1350
1350
  function Oe(r) {
1351
1351
  {
1352
- var m = _t();
1353
- if (!m) {
1354
- var g = typeof r == "string" ? r : r.displayName || r.name;
1355
- g && (m = `
1352
+ var f = _t();
1353
+ if (!f) {
1354
+ var b = typeof r == "string" ? r : r.displayName || r.name;
1355
+ b && (f = `
1356
1356
 
1357
- Check the top-level render call using <` + g + ">.");
1357
+ Check the top-level render call using <` + b + ">.");
1358
1358
  }
1359
- return m;
1359
+ return f;
1360
1360
  }
1361
1361
  }
1362
- function ye(r, m) {
1362
+ function Ee(r, f) {
1363
1363
  {
1364
1364
  if (!r._store || r._store.validated || r.key != null)
1365
1365
  return;
1366
1366
  r._store.validated = !0;
1367
- var g = Oe(m);
1368
- if (ot[g])
1367
+ var b = Oe(f);
1368
+ if (ct[b])
1369
1369
  return;
1370
- ot[g] = !0;
1371
- var w = "";
1372
- r && r._owner && r._owner !== T.current && (w = " It was passed a child from " + le(r._owner.type) + "."), W(r), j('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', g, w), W(null);
1370
+ ct[b] = !0;
1371
+ var S = "";
1372
+ r && r._owner && r._owner !== T.current && (S = " It was passed a child from " + L(r._owner.type) + "."), K(r), I('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', b, S), K(null);
1373
1373
  }
1374
1374
  }
1375
- function Ge(r, m) {
1375
+ function Ve(r, f) {
1376
1376
  {
1377
1377
  if (typeof r != "object")
1378
1378
  return;
1379
- if (Ne(r))
1380
- for (var g = 0; g < r.length; g++) {
1381
- var w = r[g];
1382
- ue(w) && ye(w, m);
1379
+ if (Ie(r))
1380
+ for (var b = 0; b < r.length; b++) {
1381
+ var S = r[b];
1382
+ de(S) && Ee(S, f);
1383
1383
  }
1384
- else if (ue(r))
1384
+ else if (de(r))
1385
1385
  r._store && (r._store.validated = !0);
1386
1386
  else if (r) {
1387
- var N = V(r);
1388
- if (typeof N == "function" && N !== r.entries)
1389
- for (var B = N.call(r), k; !(k = B.next()).done; )
1390
- ue(k.value) && ye(k.value, m);
1387
+ var $ = V(r);
1388
+ if (typeof $ == "function" && $ !== r.entries)
1389
+ for (var H = $.call(r), D; !(D = H.next()).done; )
1390
+ de(D.value) && Ee(D.value, f);
1391
1391
  }
1392
1392
  }
1393
1393
  }
1394
- function He(r) {
1394
+ function We(r) {
1395
1395
  {
1396
- var m = r.type;
1397
- if (m == null || typeof m == "string")
1396
+ var f = r.type;
1397
+ if (f == null || typeof f == "string")
1398
1398
  return;
1399
- var g;
1400
- if (typeof m == "function")
1401
- g = m.propTypes;
1402
- else if (typeof m == "object" && (m.$$typeof === u || // Note: Memo only checks outer props here.
1399
+ var b;
1400
+ if (typeof f == "function")
1401
+ b = f.propTypes;
1402
+ else if (typeof f == "object" && (f.$$typeof === d || // Note: Memo only checks outer props here.
1403
1403
  // Inner props are checked in the reconciler.
1404
- m.$$typeof === b))
1405
- g = m.propTypes;
1404
+ f.$$typeof === v))
1405
+ b = f.propTypes;
1406
1406
  else
1407
1407
  return;
1408
- if (g) {
1409
- var w = le(m);
1410
- ie(g, r.props, "prop", w, r);
1411
- } else if (m.PropTypes !== void 0 && !be) {
1412
- be = !0;
1413
- var N = le(m);
1414
- j("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", N || "Unknown");
1408
+ if (b) {
1409
+ var S = L(f);
1410
+ z(b, r.props, "prop", S, r);
1411
+ } else if (f.PropTypes !== void 0 && !ye) {
1412
+ ye = !0;
1413
+ var $ = L(f);
1414
+ I("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", $ || "Unknown");
1415
1415
  }
1416
- typeof m.getDefaultProps == "function" && !m.getDefaultProps.isReactClassApproved && j("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
1416
+ typeof f.getDefaultProps == "function" && !f.getDefaultProps.isReactClassApproved && I("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
1417
1417
  }
1418
1418
  }
1419
- function We(r) {
1419
+ function qe(r) {
1420
1420
  {
1421
- for (var m = Object.keys(r.props), g = 0; g < m.length; g++) {
1422
- var w = m[g];
1423
- if (w !== "children" && w !== "key") {
1424
- W(r), j("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", w), W(null);
1421
+ for (var f = Object.keys(r.props), b = 0; b < f.length; b++) {
1422
+ var S = f[b];
1423
+ if (S !== "children" && S !== "key") {
1424
+ K(r), I("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", S), K(null);
1425
1425
  break;
1426
1426
  }
1427
1427
  }
1428
- r.ref !== null && (W(r), j("Invalid attribute `ref` supplied to `React.Fragment`."), W(null));
1428
+ r.ref !== null && (K(r), I("Invalid attribute `ref` supplied to `React.Fragment`."), K(null));
1429
1429
  }
1430
1430
  }
1431
- function qe(r, m, g, w, N, B) {
1431
+ function Ke(r, f, b, S, $, H) {
1432
1432
  {
1433
- var k = ze(r);
1434
- if (!k) {
1435
- var R = "";
1436
- (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.");
1437
- var he = Rt(N);
1438
- he ? R += he : R += _t();
1439
- var J;
1440
- r === null ? J = "null" : Ne(r) ? J = "array" : r !== void 0 && r.$$typeof === n ? (J = "<" + (le(r.type) || "Unknown") + " />", R = " Did you accidentally export a JSX literal instead of a component?") : J = typeof r, j("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", J, R);
1433
+ var D = Me(r);
1434
+ if (!D) {
1435
+ var k = "";
1436
+ (r === void 0 || typeof r == "object" && r !== null && Object.keys(r).length === 0) && (k += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
1437
+ var he = Rt($);
1438
+ he ? k += he : k += _t();
1439
+ var Q;
1440
+ r === null ? Q = "null" : Ie(r) ? Q = "array" : r !== void 0 && r.$$typeof === n ? (Q = "<" + (L(r.type) || "Unknown") + " />", k = " Did you accidentally export a JSX literal instead of a component?") : Q = typeof r, I("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", Q, k);
1441
1441
  }
1442
- var ne = y(r, m, g, N, B);
1443
- if (ne == null)
1444
- return ne;
1445
- if (k) {
1446
- var Ee = m.children;
1447
- if (Ee !== void 0)
1448
- if (w)
1449
- if (Ne(Ee)) {
1450
- for (var Qe = 0; Qe < Ee.length; Qe++)
1451
- Ge(Ee[Qe], r);
1452
- Object.freeze && Object.freeze(Ee);
1442
+ var te = y(r, f, b, $, H);
1443
+ if (te == null)
1444
+ return te;
1445
+ if (D) {
1446
+ var xe = f.children;
1447
+ if (xe !== void 0)
1448
+ if (S)
1449
+ if (Ie(xe)) {
1450
+ for (var tt = 0; tt < xe.length; tt++)
1451
+ Ve(xe[tt], r);
1452
+ Object.freeze && Object.freeze(xe);
1453
1453
  } else
1454
- j("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
1454
+ I("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
1455
1455
  else
1456
- Ge(Ee, r);
1456
+ Ve(xe, r);
1457
1457
  }
1458
- return r === e ? We(ne) : He(ne), ne;
1458
+ return r === e ? qe(te) : We(te), te;
1459
1459
  }
1460
1460
  }
1461
- function An(r, m, g) {
1462
- return qe(r, m, g, !0);
1461
+ function Ln(r, f, b) {
1462
+ return Ke(r, f, b, !0);
1463
1463
  }
1464
- function kn(r, m, g) {
1465
- return qe(r, m, g, !1);
1464
+ function Nn(r, f, b) {
1465
+ return Ke(r, f, b, !1);
1466
1466
  }
1467
- var jn = kn, Dn = An;
1468
- lt.Fragment = e, lt.jsx = jn, lt.jsxs = Dn;
1469
- }()), lt;
1467
+ var Fn = Nn, Bn = Ln;
1468
+ dt.Fragment = e, dt.jsx = Fn, dt.jsxs = Bn;
1469
+ }()), dt;
1470
1470
  }
1471
- process.env.NODE_ENV === "production" ? Nt.exports = wa() : Nt.exports = Oa();
1472
- var l = Nt.exports;
1473
- function _n(t) {
1471
+ process.env.NODE_ENV === "production" ? Lt.exports = ka() : Lt.exports = Da();
1472
+ var l = Lt.exports;
1473
+ function Dn(t) {
1474
1474
  return t.title.search("<") > -1 ? /* @__PURE__ */ l.jsx("button", { className: "svg", dangerouslySetInnerHTML: { __html: t.title } }) : /* @__PURE__ */ l.jsx("button", { children: t.title });
1475
1475
  }
1476
- const Ma = /* @__PURE__ */ l.jsxs("svg", { className: "closeIcon", width: "14", height: "14", fill: "none", stroke: "#666666", strokeMiterlimit: "10", children: [
1476
+ const ja = /* @__PURE__ */ l.jsxs("svg", { className: "closeIcon", width: "14", height: "14", fill: "none", stroke: "#666666", strokeMiterlimit: "10", children: [
1477
1477
  /* @__PURE__ */ l.jsx("circle", { cx: "7", cy: "7", r: "6" }),
1478
1478
  /* @__PURE__ */ l.jsx("line", { x1: "4", y1: "4", x2: "10", y2: "10" }),
1479
1479
  /* @__PURE__ */ l.jsx("line", { x1: "4", y1: "10", x2: "10", y2: "4" })
1480
- ] }), Ta = /* @__PURE__ */ l.jsx("svg", { className: "dragIcon", width: "14", height: "14", fill: "#666666", stroke: "none", children: /* @__PURE__ */ l.jsx(
1480
+ ] }), Ia = /* @__PURE__ */ l.jsx("svg", { className: "dragIcon", width: "14", height: "14", fill: "#666666", stroke: "none", children: /* @__PURE__ */ l.jsx(
1481
1481
  "path",
1482
1482
  {
1483
1483
  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
@@ -1485,35 +1485,35 @@ 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
1485
1485
  C11,8.22,10.74,8,10.43,8z`
1486
1486
  }
1487
1487
  ) });
1488
- function _a(t) {
1489
- return /* @__PURE__ */ l.jsx(Sn.Item, { value: t.title, children: /* @__PURE__ */ l.jsxs("div", { children: [
1490
- Ta,
1488
+ function La(t) {
1489
+ return /* @__PURE__ */ l.jsx(_n.Item, { value: t.title, children: /* @__PURE__ */ l.jsxs("div", { children: [
1490
+ Ia,
1491
1491
  /* @__PURE__ */ l.jsx("span", { children: t.title }),
1492
1492
  /* @__PURE__ */ l.jsx("button", { className: "closeIcon", onClick: () => {
1493
1493
  t.onDelete(t.index);
1494
- }, children: Ma })
1494
+ }, children: ja })
1495
1495
  ] }) }, t.title);
1496
1496
  }
1497
- function Ra(t) {
1498
- const [n, a] = ae(!1), [e, i] = ae(t.options), c = (d) => {
1499
- t.onDragComplete(d), i(d);
1500
- }, h = (d) => {
1501
- const f = [...e];
1502
- f.splice(d, 1), c(f);
1497
+ function Na(t) {
1498
+ const [n, a] = ne(!1), [e, i] = ne(t.options), c = (u) => {
1499
+ t.onDragComplete(u), i(u);
1500
+ }, h = (u) => {
1501
+ const g = [...e];
1502
+ g.splice(u, 1), c(g);
1503
1503
  }, o = [];
1504
- e.forEach((d, f) => {
1505
- o.push(/* @__PURE__ */ l.jsx(_a, { index: f, title: d, onDelete: h }, d));
1504
+ e.forEach((u, g) => {
1505
+ o.push(/* @__PURE__ */ l.jsx(La, { index: g, title: u, onDelete: h }, u));
1506
1506
  });
1507
- let u = "dropdown draggable";
1508
- return t.subdropdown && (u += " subdropdown"), /* @__PURE__ */ l.jsxs("div", { className: u, onMouseEnter: () => a(!0), onMouseLeave: () => a(!1), children: [
1509
- /* @__PURE__ */ l.jsx(_n, { title: t.title }),
1510
- /* @__PURE__ */ l.jsx(Sn.Group, { axis: "y", values: e, onReorder: c, style: { visibility: n ? "visible" : "hidden" }, children: o })
1507
+ let d = "dropdown draggable";
1508
+ return t.subdropdown && (d += " subdropdown"), /* @__PURE__ */ l.jsxs("div", { className: d, onMouseEnter: () => a(!0), onMouseLeave: () => a(!1), children: [
1509
+ /* @__PURE__ */ l.jsx(Dn, { title: t.title }),
1510
+ /* @__PURE__ */ l.jsx(_n.Group, { axis: "y", values: e, onReorder: c, style: { visibility: n ? "visible" : "hidden" }, children: o })
1511
1511
  ] });
1512
1512
  }
1513
- function Pa(t) {
1514
- const [n, a] = ae(!1), e = [];
1513
+ function Fa(t) {
1514
+ const [n, a] = ne(!1), e = [];
1515
1515
  t.options.map((c, h) => {
1516
- t.onSelect !== void 0 && (c.onSelect = t.onSelect), e.push(/* @__PURE__ */ l.jsx(Aa, { option: c }, h));
1516
+ t.onSelect !== void 0 && (c.onSelect = t.onSelect), e.push(/* @__PURE__ */ l.jsx(Ba, { option: c }, h));
1517
1517
  });
1518
1518
  let i = "dropdown";
1519
1519
  return t.subdropdown && (i += " subdropdown"), /* @__PURE__ */ l.jsxs(
@@ -1523,7 +1523,7 @@ function Pa(t) {
1523
1523
  onMouseEnter: () => a(!0),
1524
1524
  onMouseLeave: () => a(!1),
1525
1525
  children: [
1526
- /* @__PURE__ */ l.jsx(_n, { title: t.title }),
1526
+ /* @__PURE__ */ l.jsx(Dn, { title: t.title }),
1527
1527
  /* @__PURE__ */ l.jsx(
1528
1528
  "ul",
1529
1529
  {
@@ -1535,13 +1535,13 @@ function Pa(t) {
1535
1535
  }
1536
1536
  );
1537
1537
  }
1538
- function Aa(t) {
1539
- const { option: n } = t, [a, e] = ae("");
1538
+ function Ba(t) {
1539
+ const { option: n } = t, [a, e] = ne("");
1540
1540
  let i;
1541
1541
  switch (n.type) {
1542
1542
  case "draggable":
1543
1543
  i = /* @__PURE__ */ l.jsx(
1544
- Ra,
1544
+ Na,
1545
1545
  {
1546
1546
  title: n.title,
1547
1547
  options: n.value,
@@ -1554,7 +1554,7 @@ function Aa(t) {
1554
1554
  break;
1555
1555
  case "dropdown":
1556
1556
  i = /* @__PURE__ */ l.jsx(
1557
- Pa,
1557
+ Fa,
1558
1558
  {
1559
1559
  title: n.title,
1560
1560
  options: n.value,
@@ -1575,15 +1575,15 @@ function Aa(t) {
1575
1575
  );
1576
1576
  break;
1577
1577
  }
1578
- return /* @__PURE__ */ l.jsx("li", { className: a === n.title ? "selected" : "", children: i }, ma());
1578
+ return /* @__PURE__ */ l.jsx("li", { className: a === n.title ? "selected" : "", children: i }, Ca());
1579
1579
  }
1580
- function xi(t, n, a) {
1580
+ function Pi(t, n, a) {
1581
1581
  function e(c) {
1582
1582
  switch (n.forEach((h) => {
1583
1583
  h.callback(t, h.remote, c);
1584
1584
  }), c.event) {
1585
1585
  case "custom":
1586
- D.dispatchEvent({ type: I.CUSTOM, value: c.data });
1586
+ F.dispatchEvent({ type: B.CUSTOM, value: c.data });
1587
1587
  break;
1588
1588
  }
1589
1589
  }
@@ -1592,7 +1592,7 @@ function xi(t, n, a) {
1592
1592
  h.callback(t, h.remote, c);
1593
1593
  }), c.event) {
1594
1594
  case "custom":
1595
- D.dispatchEvent({ type: I.CUSTOM, value: c.data });
1595
+ F.dispatchEvent({ type: B.CUSTOM, value: c.data });
1596
1596
  break;
1597
1597
  }
1598
1598
  }
@@ -1601,7 +1601,7 @@ function xi(t, n, a) {
1601
1601
  };
1602
1602
  }
1603
1603
  function Ft(t) {
1604
- const [n, a] = ae(t.open !== void 0 ? t.open : !0), e = !n || t.children === void 0;
1604
+ const [n, a] = ne(t.open !== void 0 ? t.open : !0), e = !n || t.children === void 0;
1605
1605
  return /* @__PURE__ */ l.jsxs("div", { className: `accordion ${e ? "hide" : ""}`, children: [
1606
1606
  /* @__PURE__ */ l.jsxs(
1607
1607
  "button",
@@ -1619,7 +1619,7 @@ function Ft(t) {
1619
1619
  children: "Toggle"
1620
1620
  }
1621
1621
  ),
1622
- /* @__PURE__ */ l.jsx("p", { className: "label", children: St(t.label) })
1622
+ /* @__PURE__ */ l.jsx("p", { className: "label", children: wt(t.label) })
1623
1623
  ]
1624
1624
  }
1625
1625
  ),
@@ -1627,10 +1627,10 @@ function Ft(t) {
1627
1627
  /* @__PURE__ */ l.jsx("div", { className: n ? "open" : "", children: /* @__PURE__ */ l.jsx("div", { children: t.children }) })
1628
1628
  ] });
1629
1629
  }
1630
- function Rn(t) {
1631
- const [n, a] = ae(!1), e = t.child !== void 0 && t.child.children.length > 0, i = [];
1630
+ function jn(t) {
1631
+ const [n, a] = ne(!1), e = t.child !== void 0 && t.child.children.length > 0, i = [];
1632
1632
  return t.child !== void 0 && t.child.children.length > 0 && t.child.children.map((c) => {
1633
- i.push(/* @__PURE__ */ l.jsx(Rn, { child: c, three: t.three }, Math.random()));
1633
+ i.push(/* @__PURE__ */ l.jsx(jn, { child: c, three: t.three }, Math.random()));
1634
1634
  }), /* @__PURE__ */ l.jsx(l.Fragment, { children: t.child !== void 0 && /* @__PURE__ */ l.jsxs("div", { className: "childObject", children: [
1635
1635
  /* @__PURE__ */ l.jsxs("div", { className: "child", children: [
1636
1636
  e ? /* @__PURE__ */ l.jsx(
@@ -1658,29 +1658,29 @@ function Rn(t) {
1658
1658
  children: t.child.name.length > 0 ? `${t.child.name} (${t.child.type})` : `${t.child.type}::${t.child.uuid}`
1659
1659
  }
1660
1660
  ),
1661
- /* @__PURE__ */ l.jsx("div", { className: `icon ${Ea(t.child)}` })
1661
+ /* @__PURE__ */ l.jsx("div", { className: `icon ${_a(t.child)}` })
1662
1662
  ] }),
1663
1663
  /* @__PURE__ */ l.jsx("div", { className: n ? "open" : "", children: /* @__PURE__ */ l.jsx("div", { className: "container", children: i }) })
1664
1664
  ] }, Math.random()) });
1665
1665
  }
1666
- function ka(t) {
1666
+ function $a(t) {
1667
1667
  const n = [];
1668
1668
  return t.child?.children.map((a) => {
1669
- n.push(/* @__PURE__ */ l.jsx(Rn, { child: a, three: t.three }, Math.random()));
1669
+ n.push(/* @__PURE__ */ l.jsx(jn, { child: a, three: t.three }, Math.random()));
1670
1670
  }), /* @__PURE__ */ l.jsx("div", { className: `scene ${t.class !== void 0 ? t.class : ""}`, children: n });
1671
1671
  }
1672
- const ja = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAACXBIWXMAAAsTAAALEwEAmpwYAAAA5klEQVRoge2Y0Q6EIAwE6cX//+X6cCFpSMEKVTdk501OpRNKiyelFC0b8Ps6gCwoggZF0KAIGhRBgyJoUAQNiqCxjciR9SLV//eZiAyvK3U8i/QVaQO2YyLSFVvlkdTKDjJCukh2ykR5ZEW+kHmlatl90RaBtDkK/w7CYhuRUEO0ee3l+J3m55Vm+17vtwjTnV1V3QA8qfbeUXCzRWDpiLLS+OyzvRW7IzW9R+okvclsqR09743bo0yUpc1+lSJvNsa002+Euk9GKzV7SmZDRIMiaFAEDYqgQRE0KIIGRdCgCBoUQeMEMERadX7YUz8AAAAASUVORK5CYII=";
1673
- function Da(t) {
1672
+ const Ua = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAACXBIWXMAAAsTAAALEwEAmpwYAAAA5klEQVRoge2Y0Q6EIAwE6cX//+X6cCFpSMEKVTdk501OpRNKiyelFC0b8Ps6gCwoggZF0KAIGhRBgyJoUAQNiqCxjciR9SLV//eZiAyvK3U8i/QVaQO2YyLSFVvlkdTKDjJCukh2ykR5ZEW+kHmlatl90RaBtDkK/w7CYhuRUEO0ee3l+J3m55Vm+17vtwjTnV1V3QA8qfbeUXCzRWDpiLLS+OyzvRW7IzW9R+okvclsqR09743bo0yUpc1+lSJvNsa002+Euk9GKzV7SmZDRIMiaFAEDYqgQRE0KIIGRdCgCBoUQeMEMERadX7YUz8AAAAASUVORK5CYII=";
1673
+ function za(t) {
1674
1674
  return "items" in t;
1675
1675
  }
1676
- function Ze(t) {
1676
+ function Je(t) {
1677
1677
  const n = [];
1678
1678
  return t.items.forEach((a) => {
1679
- Da(a) ? n.push(
1680
- /* @__PURE__ */ l.jsx(Ze, { title: St(a.title), items: a.items }, Math.random())
1679
+ za(a) ? n.push(
1680
+ /* @__PURE__ */ l.jsx(Je, { title: wt(a.title), items: a.items }, Math.random())
1681
1681
  ) : n.push(
1682
1682
  /* @__PURE__ */ l.jsx(
1683
- dt,
1683
+ ht,
1684
1684
  {
1685
1685
  title: a.title,
1686
1686
  prop: a.prop,
@@ -1700,7 +1700,7 @@ function Ze(t) {
1700
1700
  );
1701
1701
  }), /* @__PURE__ */ l.jsx(Ft, { label: t.title, open: t.expanded === !0, children: n });
1702
1702
  }
1703
- function Ia(t) {
1703
+ function Ha(t) {
1704
1704
  return !(t === "alphaHash" || t === "alphaToCoverage" || t === "attenuationDistance" || t === "blendDstAlpha" || t === "colorWrite" || t === "combine" || t === "defaultAttributeValues" || t === "depthFunc" || t === "forceSinglePass" || t === "glslVersion" || t === "linecap" || t === "linejoin" || t === "linewidth" || t === "normalMapType" || t === "precision" || t === "premultipliedAlpha" || t === "shadowSide" || t === "toneMapped" || t === "uniformsGroups" || t === "uniformsNeedUpdate" || t === "userData" || t === "vertexColors" || t === "version" || t === "wireframeLinecap" || t === "wireframeLinejoin" || t === "wireframeLinewidth" || t.slice(0, 4) === "clip" || t.slice(0, 7) === "polygon" || t.slice(0, 7) === "stencil" || t.slice(0, 2) === "is");
1705
1705
  }
1706
1706
  function Ae(t) {
@@ -1876,10 +1876,10 @@ function Ae(t) {
1876
1876
  }
1877
1877
  return t;
1878
1878
  }
1879
- function Na(t) {
1879
+ function Ya(t) {
1880
1880
  return t.toLowerCase().search("intensity") > -1 || t === "anisotropyRotation" || t === "blendAlpha" || t === "bumpScale" || t === "clearcoatRoughness" || t === "displacementBias" || t === "displacementScale" || t === "metalness" || t === "opacity" || t === "reflectivity" || t === "refractionRatio" || t === "roughness" || t === "sheenRoughness" || t === "thickness";
1881
1881
  }
1882
- function La() {
1882
+ function Ga() {
1883
1883
  const t = document.createElement("input");
1884
1884
  return t.type = "file", new Promise((n, a) => {
1885
1885
  t.addEventListener("change", function() {
@@ -1894,188 +1894,188 @@ function La() {
1894
1894
  }), t.click();
1895
1895
  });
1896
1896
  }
1897
- const Fa = [
1897
+ const Va = [
1898
1898
  {
1899
1899
  title: "Front",
1900
- value: Nn
1900
+ value: Un
1901
1901
  },
1902
1902
  {
1903
1903
  title: "Back",
1904
- value: Ln
1904
+ value: cn
1905
1905
  },
1906
1906
  {
1907
1907
  title: "Double",
1908
- value: sn
1908
+ value: ln
1909
1909
  }
1910
- ], Ba = [
1910
+ ], Wa = [
1911
1911
  {
1912
1912
  title: "No Blending",
1913
- value: Fn
1913
+ value: zn
1914
1914
  },
1915
1915
  {
1916
1916
  title: "Normal",
1917
- value: Bn
1917
+ value: Hn
1918
1918
  },
1919
1919
  {
1920
1920
  title: "Additive",
1921
- value: Un
1921
+ value: Yn
1922
1922
  },
1923
1923
  {
1924
1924
  title: "Subtractive",
1925
- value: $n
1925
+ value: Gn
1926
1926
  },
1927
1927
  {
1928
1928
  title: "Multiply",
1929
- value: zn
1929
+ value: Vn
1930
1930
  },
1931
1931
  {
1932
1932
  title: "Custom",
1933
- value: Yn
1933
+ value: Wn
1934
1934
  }
1935
- ], Ua = [
1935
+ ], qa = [
1936
1936
  {
1937
1937
  title: "Add",
1938
- value: Vn
1938
+ value: qn
1939
1939
  },
1940
1940
  {
1941
1941
  title: "Subtract",
1942
- value: Gn
1942
+ value: Kn
1943
1943
  },
1944
1944
  {
1945
1945
  title: "Reverse Subtract",
1946
- value: Hn
1946
+ value: Xn
1947
1947
  },
1948
1948
  {
1949
1949
  title: "Min",
1950
- value: Wn
1950
+ value: Zn
1951
1951
  },
1952
1952
  {
1953
1953
  title: "Max",
1954
- value: qn
1954
+ value: Jn
1955
1955
  }
1956
- ], $a = [
1956
+ ], Ka = [
1957
1957
  {
1958
1958
  title: "Zero",
1959
- valye: on
1959
+ valye: dn
1960
1960
  },
1961
1961
  {
1962
1962
  title: "One",
1963
- valye: cn
1963
+ valye: un
1964
1964
  },
1965
1965
  {
1966
1966
  title: "Src Color",
1967
- valye: ln
1967
+ valye: hn
1968
1968
  },
1969
1969
  {
1970
1970
  title: "One Minus Src Color",
1971
- valye: un
1971
+ valye: fn
1972
1972
  },
1973
1973
  {
1974
1974
  title: "Src Alpha",
1975
- valye: dn
1975
+ valye: pn
1976
1976
  },
1977
1977
  {
1978
1978
  title: "One Minus Src Alpha",
1979
- valye: hn
1979
+ valye: mn
1980
1980
  },
1981
1981
  {
1982
1982
  title: "Dst Alpha",
1983
- valye: fn
1983
+ valye: vn
1984
1984
  },
1985
1985
  {
1986
1986
  title: "One Minus Dst Alpha",
1987
- valye: pn
1987
+ valye: gn
1988
1988
  },
1989
1989
  {
1990
1990
  title: "Dst Color",
1991
- valye: mn
1991
+ valye: bn
1992
1992
  },
1993
1993
  {
1994
1994
  title: "One Minus Dst Color",
1995
- valye: vn
1995
+ valye: yn
1996
1996
  },
1997
1997
  {
1998
1998
  title: "Src Alpha Saturate",
1999
- valye: Kn
1999
+ valye: Qn
2000
2000
  },
2001
2001
  {
2002
2002
  title: "Constant Color",
2003
- valye: gn
2003
+ valye: En
2004
2004
  },
2005
2005
  {
2006
2006
  title: "One Minus Constant Color",
2007
- valye: bn
2007
+ valye: xn
2008
2008
  },
2009
2009
  {
2010
2010
  title: "Constant Alpha",
2011
- valye: yn
2011
+ valye: Sn
2012
2012
  },
2013
2013
  {
2014
2014
  title: "One Minus Constant Alpha",
2015
- valye: En
2015
+ valye: Cn
2016
2016
  }
2017
- ], za = [
2017
+ ], Xa = [
2018
2018
  {
2019
2019
  title: "Zero",
2020
- valye: on
2020
+ valye: dn
2021
2021
  },
2022
2022
  {
2023
2023
  title: "One",
2024
- valye: cn
2024
+ valye: un
2025
2025
  },
2026
2026
  {
2027
2027
  title: "Src Color",
2028
- valye: ln
2028
+ valye: hn
2029
2029
  },
2030
2030
  {
2031
2031
  title: "One Minus Src Color",
2032
- valye: un
2032
+ valye: fn
2033
2033
  },
2034
2034
  {
2035
2035
  title: "Src Alpha",
2036
- valye: dn
2036
+ valye: pn
2037
2037
  },
2038
2038
  {
2039
2039
  title: "One Minus Src Alpha",
2040
- valye: hn
2040
+ valye: mn
2041
2041
  },
2042
2042
  {
2043
2043
  title: "Dst Alpha",
2044
- valye: fn
2044
+ valye: vn
2045
2045
  },
2046
2046
  {
2047
2047
  title: "One Minus Dst Alpha",
2048
- valye: pn
2048
+ valye: gn
2049
2049
  },
2050
2050
  {
2051
2051
  title: "Dst Color",
2052
- valye: mn
2052
+ valye: bn
2053
2053
  },
2054
2054
  {
2055
2055
  title: "One Minus Dst Color",
2056
- valye: vn
2056
+ valye: yn
2057
2057
  },
2058
2058
  {
2059
2059
  title: "Constant Color",
2060
- valye: gn
2060
+ valye: En
2061
2061
  },
2062
2062
  {
2063
2063
  title: "One Minus Constant Color",
2064
- valye: bn
2064
+ valye: xn
2065
2065
  },
2066
2066
  {
2067
2067
  title: "Constant Alpha",
2068
- valye: yn
2068
+ valye: Sn
2069
2069
  },
2070
2070
  {
2071
2071
  title: "One Minus Constant Alpha",
2072
- valye: En
2072
+ valye: Cn
2073
2073
  }
2074
2074
  ];
2075
2075
  function ut(t, n) {
2076
2076
  t.needsUpdate = !0, t.type = "option", t.options = n;
2077
2077
  }
2078
- function Ya(t, n, a, e) {
2078
+ function Za(t, n, a, e) {
2079
2079
  return {
2080
2080
  type: "boolean",
2081
2081
  title: Ae(t),
@@ -2085,11 +2085,11 @@ function Ya(t, n, a, e) {
2085
2085
  onChange: (i, c) => {
2086
2086
  e.updateObject(a.uuid, `material.${t}`, c), e.updateObject(a.uuid, "material.needsUpdate", !0);
2087
2087
  const h = e.scene?.getObjectByProperty("uuid", a.uuid);
2088
- h !== void 0 && K(h, `material.${t}`, c);
2088
+ h !== void 0 && Z(h, `material.${t}`, c);
2089
2089
  }
2090
2090
  };
2091
2091
  }
2092
- function Va(t, n, a, e) {
2092
+ function Ja(t, n, a, e) {
2093
2093
  const i = {
2094
2094
  type: "number",
2095
2095
  title: Ae(t),
@@ -2102,29 +2102,29 @@ function Va(t, n, a, e) {
2102
2102
  onChange: (c, h) => {
2103
2103
  e.updateObject(a.uuid, `material.${t}`, h), e.updateObject(a.uuid, "material.needsUpdate", !0);
2104
2104
  const o = e.scene?.getObjectByProperty("uuid", a.uuid);
2105
- o !== void 0 && K(o, `material.${t}`, h);
2105
+ o !== void 0 && Z(o, `material.${t}`, h);
2106
2106
  }
2107
2107
  };
2108
2108
  switch (t) {
2109
2109
  case "blending":
2110
- ut(i, Ba);
2110
+ ut(i, Wa);
2111
2111
  break;
2112
2112
  case "blendDst":
2113
- ut(i, za);
2113
+ ut(i, Xa);
2114
2114
  break;
2115
2115
  case "blendEquation":
2116
- ut(i, Ua);
2116
+ ut(i, qa);
2117
2117
  break;
2118
2118
  case "blendSrc":
2119
- ut(i, $a);
2119
+ ut(i, Ka);
2120
2120
  break;
2121
2121
  case "side":
2122
- ut(i, Fa);
2122
+ ut(i, Va);
2123
2123
  break;
2124
2124
  }
2125
- return Na(t) && (i.value = Number(n), i.type = "range", i.min = 0, i.max = 1, i.step = 0.01), i;
2125
+ return Ya(t) && (i.value = Number(n), i.type = "range", i.min = 0, i.max = 1, i.step = 0.01), i;
2126
2126
  }
2127
- function Ga(t, n, a, e) {
2127
+ function Qa(t, n, a, e) {
2128
2128
  const i = {
2129
2129
  type: "string",
2130
2130
  title: Ae(t),
@@ -2133,26 +2133,26 @@ function Ga(t, n, a, e) {
2133
2133
  needsUpdate: !0,
2134
2134
  onChange: (h, o) => {
2135
2135
  e.updateObject(a.uuid, `material.${t}`, o), e.updateObject(a.uuid, "material.needsUpdate", !0);
2136
- const u = e.scene?.getObjectByProperty("uuid", a.uuid);
2137
- u !== void 0 && K(u, `material.${t}`, o);
2136
+ const d = e.scene?.getObjectByProperty("uuid", a.uuid);
2137
+ d !== void 0 && Z(d, `material.${t}`, o);
2138
2138
  }
2139
2139
  };
2140
2140
  return (t === "vertexShader" || t === "fragmentShader") && (i.disabled = !1, i.latest = i.value, i.onChange = (h, o) => {
2141
2141
  i.latest = o;
2142
2142
  }), i;
2143
2143
  }
2144
- function Xt(t, n, a) {
2144
+ function Jt(t, n, a) {
2145
2145
  const e = [];
2146
2146
  for (const i in t) {
2147
- if (!Ia(i))
2147
+ if (!Ha(i))
2148
2148
  continue;
2149
2149
  const c = typeof t[i], h = t[i];
2150
2150
  if (c === "boolean")
2151
- e.push(Ya(i, h, n, a));
2151
+ e.push(Za(i, h, n, a));
2152
2152
  else if (c === "number")
2153
- e.push(Va(i, h, n, a));
2153
+ e.push(Ja(i, h, n, a));
2154
2154
  else if (c === "string")
2155
- e.push(Ga(i, h, n, a));
2155
+ e.push(Qa(i, h, n, a));
2156
2156
  else if (c === "object")
2157
2157
  if (h.isColor)
2158
2158
  e.push({
@@ -2160,24 +2160,24 @@ function Xt(t, n, a) {
2160
2160
  prop: i,
2161
2161
  type: "color",
2162
2162
  value: h,
2163
- onChange: (o, u) => {
2164
- const d = new Ct(u);
2165
- a.updateObject(n.uuid, `material.${o}`, d);
2166
- const f = a.scene?.getObjectByProperty("uuid", n.uuid);
2167
- f !== void 0 && K(f, `material.${o}`, d);
2163
+ onChange: (o, d) => {
2164
+ const u = new Ct(d);
2165
+ a.updateObject(n.uuid, `material.${o}`, u);
2166
+ const g = a.scene?.getObjectByProperty("uuid", n.uuid);
2167
+ g !== void 0 && Z(g, `material.${o}`, u);
2168
2168
  }
2169
2169
  });
2170
2170
  else if (Array.isArray(h)) {
2171
2171
  const o = [];
2172
- for (const u in h)
2172
+ for (const d in h)
2173
2173
  o.push({
2174
- title: `${u}`,
2175
- type: `${typeof h[u]}`,
2176
- value: h[u],
2177
- onChange: (d, f) => {
2178
- a.updateObject(n.uuid, `material.${i}`, f);
2179
- const b = a.scene?.getObjectByProperty("uuid", n.uuid);
2180
- b !== void 0 && K(b, `material.${i}`, f);
2174
+ title: `${d}`,
2175
+ type: `${typeof h[d]}`,
2176
+ value: h[d],
2177
+ onChange: (u, g) => {
2178
+ a.updateObject(n.uuid, `material.${i}`, g);
2179
+ const v = a.scene?.getObjectByProperty("uuid", n.uuid);
2180
+ v !== void 0 && Z(v, `material.${i}`, g);
2181
2181
  }
2182
2182
  });
2183
2183
  e.push({
@@ -2190,151 +2190,151 @@ function Xt(t, n, a) {
2190
2190
  prop: i,
2191
2191
  type: "vector",
2192
2192
  value: h,
2193
- onChange: (o, u) => {
2194
- a.updateObject(n.uuid, `material.${o}`, u);
2195
- const d = a.scene?.getObjectByProperty("uuid", n.uuid);
2196
- d !== void 0 && K(d, `material.${o}`, u);
2193
+ onChange: (o, d) => {
2194
+ a.updateObject(n.uuid, `material.${o}`, d);
2195
+ const u = a.scene?.getObjectByProperty("uuid", n.uuid);
2196
+ u !== void 0 && Z(u, `material.${o}`, d);
2197
2197
  }
2198
2198
  });
2199
2199
  else {
2200
2200
  const o = [];
2201
- for (const u in h) {
2202
- const d = h[u];
2203
- switch (typeof d) {
2201
+ for (const d in h) {
2202
+ const u = h[d];
2203
+ switch (typeof u) {
2204
2204
  case "boolean":
2205
2205
  case "number":
2206
2206
  case "string":
2207
- u === "src" ? e.push({
2207
+ d === "src" ? e.push({
2208
2208
  title: Ae(i),
2209
2209
  type: "image",
2210
- value: d,
2211
- onChange: (b, E) => {
2210
+ value: u,
2211
+ onChange: (v, E) => {
2212
2212
  a.createTexture(n.uuid, `material.${i}`, E);
2213
2213
  const x = a.scene?.getObjectByProperty("uuid", n.uuid);
2214
- x !== void 0 && It(E).then((M) => {
2215
- K(x, `material.${i}`, M), K(x, "material.needsUpdate", !0);
2214
+ x !== void 0 && It(E).then((R) => {
2215
+ Z(x, `material.${i}`, R), Z(x, "material.needsUpdate", !0);
2216
2216
  });
2217
2217
  }
2218
2218
  }) : o.push({
2219
- title: `${Ae(u)}`,
2220
- prop: `material.${i}.${u}`,
2221
- type: `${typeof t[i][u]}`,
2222
- value: h[u],
2223
- onChange: (b, E) => {
2224
- a.updateObject(n.uuid, `material.${i}.${u}`, E);
2219
+ title: `${Ae(d)}`,
2220
+ prop: `material.${i}.${d}`,
2221
+ type: `${typeof t[i][d]}`,
2222
+ value: h[d],
2223
+ onChange: (v, E) => {
2224
+ a.updateObject(n.uuid, `material.${i}.${d}`, E);
2225
2225
  const x = a.scene?.getObjectByProperty("uuid", n.uuid);
2226
- x !== void 0 && K(x, `material.${i}.${u}`, E);
2226
+ x !== void 0 && Z(x, `material.${i}.${d}`, E);
2227
2227
  }
2228
2228
  });
2229
2229
  break;
2230
2230
  case "object":
2231
- if (d.value !== void 0 && d.value.src !== void 0)
2231
+ if (u.value !== void 0 && u.value.src !== void 0)
2232
2232
  o.push({
2233
- title: Ae(u),
2233
+ title: Ae(d),
2234
2234
  type: "image",
2235
- value: d.value.src,
2236
- onChange: (b, E) => {
2237
- a.createTexture(n.uuid, `material.${i}.${u}.value`, h);
2235
+ value: u.value.src,
2236
+ onChange: (v, E) => {
2237
+ a.createTexture(n.uuid, `material.${i}.${d}.value`, h);
2238
2238
  const x = a.scene?.getObjectByProperty("uuid", n.uuid);
2239
- x !== void 0 && It(E).then((M) => {
2240
- K(x, `material.${i}.${u}.value`, M);
2239
+ x !== void 0 && It(E).then((R) => {
2240
+ Z(x, `material.${i}.${d}.value`, R);
2241
2241
  });
2242
2242
  }
2243
2243
  });
2244
2244
  else if (i === "uniforms") {
2245
- const b = d.value, E = (x, M, P) => ({
2245
+ const v = u.value, E = (x, R, P) => ({
2246
2246
  title: x,
2247
2247
  type: "number",
2248
2248
  value: P,
2249
2249
  step: 0.01,
2250
- onChange: (V, U) => {
2251
- const j = `material.uniforms.${u}.value.${M}`;
2252
- a.updateObject(n.uuid, j, U);
2253
- const O = a.scene?.getObjectByProperty("uuid", n.uuid);
2254
- O !== void 0 && K(O, j, U);
2250
+ onChange: (V, Y) => {
2251
+ const I = `material.uniforms.${d}.value.${R}`;
2252
+ a.updateObject(n.uuid, I, Y);
2253
+ const _ = a.scene?.getObjectByProperty("uuid", n.uuid);
2254
+ _ !== void 0 && Z(_, I, Y);
2255
2255
  }
2256
2256
  });
2257
- if (typeof d.value == "number")
2257
+ if (typeof u.value == "number")
2258
2258
  o.push({
2259
- title: u,
2259
+ title: d,
2260
2260
  type: "number",
2261
- value: d.value,
2261
+ value: u.value,
2262
2262
  step: 0.01,
2263
- onChange: (x, M) => {
2263
+ onChange: (x, R) => {
2264
2264
  const P = `material.${i}.${x}.value`;
2265
- a.updateObject(n.uuid, P, M);
2265
+ a.updateObject(n.uuid, P, R);
2266
2266
  const V = a.scene?.getObjectByProperty("uuid", n.uuid);
2267
- V !== void 0 && K(V, P, M);
2267
+ V !== void 0 && Z(V, P, R);
2268
2268
  }
2269
2269
  });
2270
- else if (b.r !== void 0 && b.g !== void 0 && b.b !== void 0)
2270
+ else if (v.r !== void 0 && v.g !== void 0 && v.b !== void 0)
2271
2271
  o.push({
2272
- title: u,
2272
+ title: d,
2273
2273
  type: "color",
2274
- value: d.value,
2275
- onChange: (x, M) => {
2276
- const P = new Ct(M), V = `material.${i}.${x}.value`;
2274
+ value: u.value,
2275
+ onChange: (x, R) => {
2276
+ const P = new Ct(R), V = `material.${i}.${x}.value`;
2277
2277
  a.updateObject(n.uuid, V, P);
2278
- const U = a.scene?.getObjectByProperty("uuid", n.uuid);
2279
- U !== void 0 && K(U, V, P);
2278
+ const Y = a.scene?.getObjectByProperty("uuid", n.uuid);
2279
+ Y !== void 0 && Z(Y, V, P);
2280
2280
  }
2281
2281
  });
2282
- else if (b.x !== void 0 && b.y !== void 0 && b.z === void 0 && b.w === void 0)
2282
+ else if (v.x !== void 0 && v.y !== void 0 && v.z === void 0 && v.w === void 0)
2283
2283
  o.push({
2284
- title: u,
2284
+ title: d,
2285
2285
  type: "vector",
2286
- value: d.value,
2287
- prop: `material.${i}.${u}.value`,
2288
- onChange: (x, M) => {
2289
- a.updateObject(n.uuid, x, M);
2286
+ value: u.value,
2287
+ prop: `material.${i}.${d}.value`,
2288
+ onChange: (x, R) => {
2289
+ a.updateObject(n.uuid, x, R);
2290
2290
  const P = a.scene?.getObjectByProperty("uuid", n.uuid);
2291
- P !== void 0 && K(P, x, M);
2291
+ P !== void 0 && Z(P, x, R);
2292
2292
  }
2293
2293
  });
2294
- else if (b.x !== void 0 && b.y !== void 0 && b.z !== void 0 && b.w === void 0)
2294
+ else if (v.x !== void 0 && v.y !== void 0 && v.z !== void 0 && v.w === void 0)
2295
2295
  o.push(
2296
2296
  {
2297
- title: u,
2297
+ title: d,
2298
2298
  items: [
2299
- E("X", "x", d.value.x),
2300
- E("Y", "y", d.value.y),
2301
- E("Z", "z", d.value.z)
2299
+ E("X", "x", u.value.x),
2300
+ E("Y", "y", u.value.y),
2301
+ E("Z", "z", u.value.z)
2302
2302
  ]
2303
2303
  }
2304
2304
  );
2305
- else if (b.x !== void 0 && b.y !== void 0 && b.z !== void 0 && b.w !== void 0)
2305
+ else if (v.x !== void 0 && v.y !== void 0 && v.z !== void 0 && v.w !== void 0)
2306
2306
  o.push(
2307
2307
  {
2308
- title: u,
2308
+ title: d,
2309
2309
  items: [
2310
- E("X", "x", d.value.x),
2311
- E("Y", "y", d.value.y),
2312
- E("Z", "z", d.value.z),
2313
- E("W", "w", d.value.w)
2310
+ E("X", "x", u.value.x),
2311
+ E("Y", "y", u.value.y),
2312
+ E("Z", "z", u.value.z),
2313
+ E("W", "w", u.value.w)
2314
2314
  ]
2315
2315
  }
2316
2316
  );
2317
- else if (b.elements !== void 0) {
2318
- const x = b.elements, M = [];
2317
+ else if (v.elements !== void 0) {
2318
+ const x = v.elements, R = [];
2319
2319
  for (let P = 0; P < x.length; P++)
2320
- M.push(E(P.toString(), P.toString(), x[P]));
2320
+ R.push(E(P.toString(), P.toString(), x[P]));
2321
2321
  o.push(
2322
2322
  {
2323
- title: u,
2324
- items: M
2323
+ title: d,
2324
+ items: R
2325
2325
  }
2326
2326
  );
2327
2327
  } else
2328
- console.log(">>> need to add this format:", u, b);
2328
+ console.log(">>> need to add this format:", d, v);
2329
2329
  } else
2330
2330
  o.push({
2331
- title: u,
2332
- type: `${typeof d.value}`,
2333
- value: d.value,
2334
- onChange: (b, E) => {
2335
- a.updateObject(n.uuid, `material.${i}.${u}.value`, E);
2331
+ title: d,
2332
+ type: `${typeof u.value}`,
2333
+ value: u.value,
2334
+ onChange: (v, E) => {
2335
+ a.updateObject(n.uuid, `material.${i}.${d}.value`, E);
2336
2336
  const x = a.scene?.getObjectByProperty("uuid", n.uuid);
2337
- x !== void 0 && K(x, `material.${i}.${u}.value`, E);
2337
+ x !== void 0 && Z(x, `material.${i}.${d}.value`, E);
2338
2338
  }
2339
2339
  });
2340
2340
  break;
@@ -2356,17 +2356,17 @@ function Xt(t, n, a) {
2356
2356
  }
2357
2357
  }), e;
2358
2358
  }
2359
- function Ha(t, n) {
2359
+ function ei(t, n) {
2360
2360
  const a = t.material;
2361
2361
  if (Array.isArray(a)) {
2362
2362
  const e = [], i = a.length;
2363
2363
  for (let c = 0; c < i; c++)
2364
2364
  e.push(
2365
2365
  /* @__PURE__ */ l.jsx(
2366
- Ze,
2366
+ Je,
2367
2367
  {
2368
2368
  title: `Material ${c}`,
2369
- items: Xt(a[c], t, n)
2369
+ items: Jt(a[c], t, n)
2370
2370
  },
2371
2371
  `Material ${c}`
2372
2372
  )
@@ -2374,41 +2374,41 @@ function Ha(t, n) {
2374
2374
  return /* @__PURE__ */ l.jsx(l.Fragment, { children: e });
2375
2375
  } else
2376
2376
  return /* @__PURE__ */ l.jsx(
2377
- Ze,
2377
+ Je,
2378
2378
  {
2379
2379
  title: "Material",
2380
- items: Xt(a, t, n)
2380
+ items: Jt(a, t, n)
2381
2381
  }
2382
2382
  );
2383
2383
  }
2384
- function Wa(t) {
2385
- const n = fe(null), a = fe(null), e = fe(null), i = fe(null), c = fe(null), h = fe(null), [o, u] = ae(t.value), [d, f] = ae({ min: t.min, max: t.max }), [b, E] = ae(!1);
2384
+ function ti(t) {
2385
+ const n = fe(null), a = fe(null), e = fe(null), i = fe(null), c = fe(null), h = fe(null), [o, d] = ne(t.value), [u, g] = ne({ min: t.min, max: t.max }), [v, E] = ne(!1);
2386
2386
  function x() {
2387
- b || (window.addEventListener("mousemove", P), window.addEventListener("mouseup", M), window.addEventListener("mouseup", M), E(!0));
2387
+ v || (window.addEventListener("mousemove", P), window.addEventListener("mouseup", R), window.addEventListener("mouseup", R), E(!0));
2388
2388
  }
2389
- function M() {
2390
- window.removeEventListener("mousemove", P), window.removeEventListener("mouseup", M), E(!1);
2389
+ function R() {
2390
+ window.removeEventListener("mousemove", P), window.removeEventListener("mouseup", R), E(!1);
2391
2391
  }
2392
- function P(O) {
2393
- const re = c.current.getBoundingClientRect(), Q = Xe(0, 99, O.clientX - re.left) / 99, Ce = Xe(0, 99, O.clientY - re.top) / 99, G = ht(Wt(d.min, d.max, Q), 3), ee = ht(Wt(d.min, d.max, Ce), 3);
2394
- t.onChange({ target: { value: { x: G, y: ee } } }), u({ x: G, y: ee });
2392
+ function P(_) {
2393
+ const q = c.current.getBoundingClientRect(), ee = Ze(0, 99, _.clientX - q.left) / 99, Se = Ze(0, 99, _.clientY - q.top) / 99, W = ft(Kt(u.min, u.max, ee), 3), me = ft(Kt(u.min, u.max, Se), 3);
2394
+ t.onChange({ target: { value: { x: W, y: me } } }), d({ x: W, y: me });
2395
2395
  }
2396
- function V(O) {
2397
- let re = o.x, Q = o.y;
2398
- O.target === n.current ? re = Number(O.target.value) : Q = Number(O.target.value), u({ x: re, y: Q });
2396
+ function V(_) {
2397
+ let q = o.x, ee = o.y;
2398
+ _.target === n.current ? q = Number(_.target.value) : ee = Number(_.target.value), d({ x: q, y: ee });
2399
2399
  }
2400
- function U() {
2401
- const O = Number(e.current.value);
2402
- f({ min: O, max: d.max }), (o.x < O || o.y < O) && u({ x: Xe(O, d.max, o.x), y: Xe(O, d.max, o.y) });
2400
+ function Y() {
2401
+ const _ = Number(e.current.value);
2402
+ g({ min: _, max: u.max }), (o.x < _ || o.y < _) && d({ x: Ze(_, u.max, o.x), y: Ze(_, u.max, o.y) });
2403
2403
  }
2404
- function j() {
2405
- const O = Number(i.current.value);
2406
- f({ min: d.min, max: O }), (o.x > O || o.y > O) && u({ x: Xe(d.min, O, o.x), y: Xe(d.min, O, o.y) });
2404
+ function I() {
2405
+ const _ = Number(i.current.value);
2406
+ g({ min: u.min, max: _ }), (o.x > _ || o.y > _) && d({ x: Ze(u.min, _, o.x), y: Ze(u.min, _, o.y) });
2407
2407
  }
2408
2408
  return ke(() => {
2409
- const O = Ht(d.min, d.max, o.x), re = Ht(d.min, d.max, o.y);
2410
- h.current.style.left = `${O * 100}%`, h.current.style.top = `${re * 100}%`;
2411
- }, [d, o]), /* @__PURE__ */ l.jsxs("div", { className: "vector", children: [
2409
+ const _ = qt(u.min, u.max, o.x), q = qt(u.min, u.max, o.y);
2410
+ h.current.style.left = `${_ * 100}%`, h.current.style.top = `${q * 100}%`;
2411
+ }, [u, o]), /* @__PURE__ */ l.jsxs("div", { className: "vector", children: [
2412
2412
  /* @__PURE__ */ l.jsxs("div", { className: "fields", children: [
2413
2413
  /* @__PURE__ */ l.jsxs("div", { children: [
2414
2414
  /* @__PURE__ */ l.jsx("label", { children: "X:" }),
@@ -2418,8 +2418,8 @@ function Wa(t) {
2418
2418
  ref: n,
2419
2419
  type: "number",
2420
2420
  value: o.x,
2421
- min: d.min,
2422
- max: d.max,
2421
+ min: u.min,
2422
+ max: u.max,
2423
2423
  step: 0.01,
2424
2424
  onChange: V
2425
2425
  }
@@ -2433,8 +2433,8 @@ function Wa(t) {
2433
2433
  ref: a,
2434
2434
  type: "number",
2435
2435
  value: o.y,
2436
- min: d.min,
2437
- max: d.max,
2436
+ min: u.min,
2437
+ max: u.max,
2438
2438
  step: 0.01,
2439
2439
  onChange: V
2440
2440
  }
@@ -2447,9 +2447,9 @@ function Wa(t) {
2447
2447
  {
2448
2448
  ref: e,
2449
2449
  type: "number",
2450
- value: d.min,
2450
+ value: u.min,
2451
2451
  step: 0.01,
2452
- onChange: U
2452
+ onChange: Y
2453
2453
  }
2454
2454
  )
2455
2455
  ] }),
@@ -2460,55 +2460,55 @@ function Wa(t) {
2460
2460
  {
2461
2461
  ref: i,
2462
2462
  type: "number",
2463
- value: d.max,
2463
+ value: u.max,
2464
2464
  step: 0.01,
2465
- onChange: j
2465
+ onChange: I
2466
2466
  }
2467
2467
  )
2468
2468
  ] })
2469
2469
  ] }),
2470
- /* @__PURE__ */ l.jsxs("div", { className: "input", ref: c, onMouseDown: x, onMouseUp: M, children: [
2470
+ /* @__PURE__ */ l.jsxs("div", { className: "input", ref: c, onMouseDown: x, onMouseUp: R, children: [
2471
2471
  /* @__PURE__ */ l.jsx("div", { className: "x" }),
2472
2472
  /* @__PURE__ */ l.jsx("div", { className: "y" }),
2473
2473
  /* @__PURE__ */ l.jsx("div", { className: "pt", ref: h })
2474
2474
  ] })
2475
2475
  ] });
2476
2476
  }
2477
- function dt(t) {
2477
+ function ht(t) {
2478
2478
  let n = t.value;
2479
- n !== void 0 && n.isColor !== void 0 && (n = ga(t.value));
2480
- const [a, e] = ae(n), i = fe(null), c = fe(null), h = fe(null);
2479
+ n !== void 0 && n.isColor !== void 0 && (n = Oa(t.value));
2480
+ const [a, e] = ne(n), i = fe(null), c = fe(null), h = fe(null);
2481
2481
  ke(() => {
2482
- let f = !1, b = -1, E = 0, x = Number(a);
2483
- const M = (O) => {
2484
- f = !0, E = x, b = O.clientX;
2485
- }, P = (O) => {
2486
- if (!f)
2482
+ let g = !1, v = -1, E = 0, x = Number(a);
2483
+ const R = (_) => {
2484
+ g = !0, E = x, v = _.clientX;
2485
+ }, P = (_) => {
2486
+ if (!g)
2487
2487
  return;
2488
- const re = t.step !== void 0 ? t.step : 1, Q = (O.clientX - b) * re;
2489
- x = Number((E + Q).toFixed(4)), c.current !== null && (c.current.value = x.toString()), t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, x);
2488
+ const q = t.step !== void 0 ? t.step : 1, ee = (_.clientX - v) * q;
2489
+ x = Number((E + ee).toFixed(4)), c.current !== null && (c.current.value = x.toString()), t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, x);
2490
2490
  }, V = () => {
2491
- f = !1;
2492
- }, U = () => {
2493
- f = !1;
2494
- }, j = t.type === "number";
2495
- return j && (i.current?.addEventListener("mousedown", M, !1), document.addEventListener("mouseup", V, !1), document.addEventListener("mousemove", P, !1), document.addEventListener("contextmenu", U, !1)), () => {
2496
- j && (i.current?.removeEventListener("mousedown", M), document.removeEventListener("mouseup", V), document.removeEventListener("mousemove", P), document.removeEventListener("contextmenu", U));
2491
+ g = !1;
2492
+ }, Y = () => {
2493
+ g = !1;
2494
+ }, I = t.type === "number";
2495
+ return I && (i.current?.addEventListener("mousedown", R, !1), document.addEventListener("mouseup", V, !1), document.addEventListener("mousemove", P, !1), document.addEventListener("contextmenu", Y, !1)), () => {
2496
+ I && (i.current?.removeEventListener("mousedown", R), document.removeEventListener("mouseup", V), document.removeEventListener("mousemove", P), document.removeEventListener("contextmenu", Y));
2497
2497
  };
2498
2498
  }, [a]);
2499
2499
  const o = t.type === "string" && (a.length > 100 || a.search(`
2500
- `) > -1), u = o || t.type === "image" || t.type === "vector", d = (f) => {
2501
- let b = f.target.value;
2502
- t.type === "boolean" ? b = f.target.checked : t.type === "option" && (b = t.options[b].value), e(b), t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, b);
2500
+ `) > -1), d = o || t.type === "image" || t.type === "vector", u = (g) => {
2501
+ let v = g.target.value;
2502
+ t.type === "boolean" ? v = g.target.checked : t.type === "option" && (v = t.options[v].value), e(v), t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, v);
2503
2503
  };
2504
- return /* @__PURE__ */ l.jsxs("div", { className: `field ${u ? "block" : ""}`, children: [
2505
- t.type !== "button" && /* @__PURE__ */ l.jsx("label", { ref: i, children: St(t.title) }, "fieldLabel"),
2504
+ return /* @__PURE__ */ l.jsxs("div", { className: `field ${d ? "block" : ""}`, children: [
2505
+ t.type !== "button" && /* @__PURE__ */ l.jsx("label", { ref: i, children: wt(t.title) }, "fieldLabel"),
2506
2506
  t.type === "string" && !o && /* @__PURE__ */ l.jsx(
2507
2507
  "input",
2508
2508
  {
2509
2509
  type: "text",
2510
2510
  disabled: t.disabled,
2511
- onChange: d,
2511
+ onChange: u,
2512
2512
  value: a
2513
2513
  }
2514
2514
  ),
@@ -2518,7 +2518,7 @@ function dt(t) {
2518
2518
  cols: 50,
2519
2519
  rows: 10,
2520
2520
  disabled: t.disabled !== void 0 ? t.disabled : !0,
2521
- onChange: d,
2521
+ onChange: u,
2522
2522
  value: a
2523
2523
  }
2524
2524
  ),
@@ -2527,7 +2527,7 @@ function dt(t) {
2527
2527
  {
2528
2528
  type: "checkbox",
2529
2529
  disabled: t.disabled,
2530
- onChange: d,
2530
+ onChange: u,
2531
2531
  checked: a
2532
2532
  }
2533
2533
  ),
@@ -2541,11 +2541,11 @@ function dt(t) {
2541
2541
  max: t.max,
2542
2542
  step: t.step,
2543
2543
  disabled: t.disabled,
2544
- onChange: d
2544
+ onChange: u
2545
2545
  }
2546
2546
  ),
2547
2547
  t.type === "range" && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
2548
- /* @__PURE__ */ l.jsx("input", { type: "text", value: a.toString(), onChange: d, disabled: t.disabled, className: "min" }),
2548
+ /* @__PURE__ */ l.jsx("input", { type: "text", value: a.toString(), onChange: u, disabled: t.disabled, className: "min" }),
2549
2549
  /* @__PURE__ */ l.jsx(
2550
2550
  "input",
2551
2551
  {
@@ -2555,13 +2555,13 @@ function dt(t) {
2555
2555
  min: t.min,
2556
2556
  max: t.max,
2557
2557
  step: t.step,
2558
- onChange: d
2558
+ onChange: u
2559
2559
  }
2560
2560
  )
2561
2561
  ] }),
2562
2562
  t.type === "color" && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
2563
- /* @__PURE__ */ l.jsx("input", { type: "text", value: a.toString(), onChange: d, disabled: t.disabled, className: "color" }),
2564
- /* @__PURE__ */ l.jsx("input", { type: "color", value: a, onChange: d, disabled: t.disabled })
2563
+ /* @__PURE__ */ l.jsx("input", { type: "text", value: a.toString(), onChange: u, disabled: t.disabled, className: "color" }),
2564
+ /* @__PURE__ */ l.jsx("input", { type: "color", value: a, onChange: u, disabled: t.disabled })
2565
2565
  ] }),
2566
2566
  t.type === "button" && /* @__PURE__ */ l.jsx(
2567
2567
  "button",
@@ -2574,15 +2574,15 @@ function dt(t) {
2574
2574
  }
2575
2575
  ),
2576
2576
  t.type === "image" && /* @__PURE__ */ l.jsx("img", { ref: h, onClick: () => {
2577
- La().then((f) => {
2578
- h.current.src = f, t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, f);
2577
+ Ga().then((g) => {
2578
+ h.current.src = g, t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, g);
2579
2579
  });
2580
- }, src: a.length > 0 ? a : ja }),
2581
- t.type === "option" && /* @__PURE__ */ l.jsx(l.Fragment, { children: /* @__PURE__ */ l.jsx("select", { onChange: d, disabled: t.disabled, defaultValue: t.value, children: t.options?.map((f, b) => /* @__PURE__ */ l.jsx("option", { value: f.value, children: St(f.title) }, b)) }) }),
2582
- t.type === "vector" && /* @__PURE__ */ l.jsx(Wa, { value: a, min: -1, max: 1, onChange: d })
2580
+ }, src: a.length > 0 ? a : Ua }),
2581
+ t.type === "option" && /* @__PURE__ */ l.jsx(l.Fragment, { children: /* @__PURE__ */ l.jsx("select", { onChange: u, disabled: t.disabled, defaultValue: t.value, children: t.options?.map((g, v) => /* @__PURE__ */ l.jsx("option", { value: g.value, children: wt(g.title) }, v)) }) }),
2582
+ t.type === "vector" && /* @__PURE__ */ l.jsx(ti, { value: a, min: -1, max: 1, onChange: u })
2583
2583
  ] });
2584
2584
  }
2585
- function Zt(t) {
2585
+ function Qt(t) {
2586
2586
  switch (t) {
2587
2587
  case "fov":
2588
2588
  return "FOV";
@@ -2611,12 +2611,12 @@ function Zt(t) {
2611
2611
  }
2612
2612
  return t;
2613
2613
  }
2614
- function qa(t, n) {
2614
+ function ni(t, n) {
2615
2615
  const a = [];
2616
2616
  if (t.perspectiveCameraInfo !== void 0)
2617
2617
  for (const e in t.perspectiveCameraInfo)
2618
2618
  a.push({
2619
- title: Zt(e),
2619
+ title: Qt(e),
2620
2620
  prop: e,
2621
2621
  type: "number",
2622
2622
  step: 0.01,
@@ -2624,13 +2624,13 @@ function qa(t, n) {
2624
2624
  onChange: (i, c) => {
2625
2625
  n.updateObject(t.uuid, i, c), n.requestMethod(t.uuid, "updateProjectionMatrix");
2626
2626
  const h = n.scene?.getObjectByProperty("uuid", t.uuid);
2627
- h !== void 0 && (K(h, i, c), h.updateProjectionMatrix());
2627
+ h !== void 0 && (Z(h, i, c), h.updateProjectionMatrix());
2628
2628
  }
2629
2629
  });
2630
2630
  else if (t.orthographicCameraInfo !== void 0)
2631
2631
  for (const e in t.orthographicCameraInfo)
2632
2632
  a.push({
2633
- title: Zt(e),
2633
+ title: Qt(e),
2634
2634
  prop: e,
2635
2635
  type: "number",
2636
2636
  step: 0.01,
@@ -2638,41 +2638,41 @@ function qa(t, n) {
2638
2638
  onChange: (i, c) => {
2639
2639
  n.updateObject(t.uuid, i, c), n.requestMethod(t.uuid, "updateProjectionMatrix");
2640
2640
  const h = n.scene?.getObjectByProperty("uuid", t.uuid);
2641
- h !== void 0 && (K(h, i, c), h.updateProjectionMatrix());
2641
+ h !== void 0 && (Z(h, i, c), h.updateProjectionMatrix());
2642
2642
  }
2643
2643
  });
2644
2644
  return /* @__PURE__ */ l.jsx(
2645
- Ze,
2645
+ Je,
2646
2646
  {
2647
2647
  title: "Camera",
2648
2648
  items: a
2649
2649
  }
2650
2650
  );
2651
2651
  }
2652
- const Ka = Math.PI / 180, Xa = 180 / Math.PI;
2653
- function at(t, n, a, e, i) {
2652
+ const ai = Math.PI / 180, ii = 180 / Math.PI;
2653
+ function rt(t, n, a, e, i) {
2654
2654
  return e + (t - n) * (i - e) / (a - n);
2655
2655
  }
2656
- function Za(t) {
2657
- return t * Ka;
2656
+ function ri(t) {
2657
+ return t * ai;
2658
2658
  }
2659
2659
  function kt(t) {
2660
- return t * Xa;
2660
+ return t * ii;
2661
2661
  }
2662
- function Ja(t, n) {
2663
- const a = new Xn();
2662
+ function si(t, n) {
2663
+ const a = new ea();
2664
2664
  a.elements = t.matrix;
2665
- const e = new q(), i = new Zn(), c = new q();
2665
+ const e = new X(), i = new ta(), c = new X();
2666
2666
  t.uuid.length > 0 && (e.setFromMatrixPosition(a), i.setFromRotationMatrix(a), c.setFromMatrixScale(a));
2667
- const h = (u, d) => {
2668
- n.updateObject(t.uuid, u, d);
2669
- const f = n.scene?.getObjectByProperty("uuid", t.uuid);
2670
- f !== void 0 && K(f, u, d);
2671
- }, o = (u, d) => {
2672
- h(u, Za(d));
2667
+ const h = (d, u) => {
2668
+ n.updateObject(t.uuid, d, u);
2669
+ const g = n.scene?.getObjectByProperty("uuid", t.uuid);
2670
+ g !== void 0 && Z(g, d, u);
2671
+ }, o = (d, u) => {
2672
+ h(d, ri(u));
2673
2673
  };
2674
2674
  return /* @__PURE__ */ l.jsx(
2675
- Ze,
2675
+ Je,
2676
2676
  {
2677
2677
  title: "Transform",
2678
2678
  items: [
@@ -2701,7 +2701,7 @@ function Ja(t, n) {
2701
2701
  title: "Rotation X",
2702
2702
  prop: "rotation.x",
2703
2703
  type: "number",
2704
- value: ht(kt(i.x)),
2704
+ value: ft(kt(i.x)),
2705
2705
  min: -360,
2706
2706
  max: 360,
2707
2707
  step: 0.1,
@@ -2711,7 +2711,7 @@ function Ja(t, n) {
2711
2711
  title: "Rotation Y",
2712
2712
  prop: "rotation.y",
2713
2713
  type: "number",
2714
- value: ht(kt(i.y)),
2714
+ value: ft(kt(i.y)),
2715
2715
  min: -360,
2716
2716
  max: 360,
2717
2717
  step: 0.1,
@@ -2721,7 +2721,7 @@ function Ja(t, n) {
2721
2721
  title: "Rotation Z",
2722
2722
  prop: "rotation.z",
2723
2723
  type: "number",
2724
- value: ht(kt(i.z)),
2724
+ value: ft(kt(i.z)),
2725
2725
  min: -360,
2726
2726
  max: 360,
2727
2727
  step: 0.1,
@@ -2755,7 +2755,7 @@ function Ja(t, n) {
2755
2755
  }
2756
2756
  );
2757
2757
  }
2758
- function Jt(t) {
2758
+ function en(t) {
2759
2759
  switch (t) {
2760
2760
  case "color":
2761
2761
  return "Color";
@@ -2774,24 +2774,24 @@ function Jt(t) {
2774
2774
  }
2775
2775
  return t;
2776
2776
  }
2777
- function Qa(t, n) {
2777
+ function oi(t, n) {
2778
2778
  const a = [];
2779
2779
  if (t.lightInfo !== void 0)
2780
2780
  for (const e in t.lightInfo) {
2781
2781
  const i = t.lightInfo[e];
2782
2782
  i !== void 0 && (i.isColor !== void 0 ? a.push({
2783
- title: Jt(e),
2783
+ title: en(e),
2784
2784
  prop: e,
2785
2785
  type: "color",
2786
2786
  value: i,
2787
2787
  onChange: (c, h) => {
2788
2788
  const o = new Ct(h);
2789
2789
  n.updateObject(t.uuid, c, o);
2790
- const u = n.scene?.getObjectByProperty("uuid", t.uuid);
2791
- u !== void 0 && K(u, c, o);
2790
+ const d = n.scene?.getObjectByProperty("uuid", t.uuid);
2791
+ d !== void 0 && Z(d, c, o);
2792
2792
  }
2793
2793
  }) : a.push({
2794
- title: Jt(e),
2794
+ title: en(e),
2795
2795
  prop: e,
2796
2796
  type: typeof i,
2797
2797
  value: i,
@@ -2799,19 +2799,19 @@ function Qa(t, n) {
2799
2799
  onChange: (c, h) => {
2800
2800
  n.updateObject(t.uuid, c, h);
2801
2801
  const o = n.scene?.getObjectByProperty("uuid", t.uuid);
2802
- o !== void 0 && K(o, c, h);
2802
+ o !== void 0 && Z(o, c, h);
2803
2803
  }
2804
2804
  }));
2805
2805
  }
2806
2806
  return /* @__PURE__ */ l.jsx(
2807
- Ze,
2807
+ Je,
2808
2808
  {
2809
2809
  title: "Light",
2810
2810
  items: a
2811
2811
  }
2812
2812
  );
2813
2813
  }
2814
- function ei(t, n) {
2814
+ function ci(t, n) {
2815
2815
  const a = [], e = [];
2816
2816
  let i = 0;
2817
2817
  t.animations.forEach((o) => {
@@ -2850,7 +2850,7 @@ function ei(t, n) {
2850
2850
  if (c !== void 0) {
2851
2851
  const o = c.mixer;
2852
2852
  if (h = o !== void 0, h) {
2853
- const u = [
2853
+ const d = [
2854
2854
  {
2855
2855
  title: "Time Scale",
2856
2856
  type: "range",
@@ -2858,12 +2858,12 @@ function ei(t, n) {
2858
2858
  step: 0.01,
2859
2859
  min: -1,
2860
2860
  max: 2,
2861
- onChange: (d, f) => {
2862
- o.timeScale = f, n.updateObject(t.uuid, "mixer.timeScale", f);
2861
+ onChange: (u, g) => {
2862
+ o.timeScale = g, n.updateObject(t.uuid, "mixer.timeScale", g);
2863
2863
  }
2864
2864
  }
2865
2865
  ];
2866
- u.push({
2866
+ d.push({
2867
2867
  title: "Stop All",
2868
2868
  type: "button",
2869
2869
  onChange: () => {
@@ -2871,13 +2871,13 @@ function ei(t, n) {
2871
2871
  }
2872
2872
  }), a.push({
2873
2873
  title: "Mixer",
2874
- items: u
2874
+ items: d
2875
2875
  });
2876
2876
  }
2877
2877
  }
2878
- return /* @__PURE__ */ l.jsx(Ze, { title: "Animation", items: a });
2878
+ return /* @__PURE__ */ l.jsx(Je, { title: "Animation", items: a });
2879
2879
  }
2880
- const Pn = {
2880
+ const In = {
2881
2881
  name: "",
2882
2882
  uuid: "",
2883
2883
  type: "",
@@ -2889,25 +2889,25 @@ const Pn = {
2889
2889
  orthographicCameraInfo: void 0,
2890
2890
  lightInfo: void 0
2891
2891
  };
2892
- let oe = { ...Pn };
2893
- function ti(t) {
2894
- const [n, a] = ae(-1);
2892
+ let oe = { ...In };
2893
+ function li(t) {
2894
+ const [n, a] = ne(-1);
2895
2895
  ke(() => {
2896
- function h(u) {
2897
- oe = { ...u.value }, a(Date.now());
2896
+ function h(d) {
2897
+ oe = { ...d.value }, a(Date.now());
2898
2898
  }
2899
2899
  function o() {
2900
- oe = { ...Pn }, a(Date.now());
2900
+ oe = { ...In }, a(Date.now());
2901
2901
  }
2902
- return D.addEventListener(I.SET_SCENE, o), D.addEventListener(I.SET_OBJECT, h), () => {
2903
- D.removeEventListener(I.SET_SCENE, o), D.removeEventListener(I.SET_OBJECT, h);
2902
+ return F.addEventListener(B.SET_SCENE, o), F.addEventListener(B.SET_OBJECT, h), () => {
2903
+ F.removeEventListener(B.SET_SCENE, o), F.removeEventListener(B.SET_OBJECT, h);
2904
2904
  };
2905
2905
  }, []);
2906
2906
  const e = oe.type.toLowerCase(), i = oe.animations.length > 0 || oe.mixer !== void 0, c = e.search("mesh") > -1 || e.search("line") > -1 || e.search("points") > -1;
2907
2907
  return /* @__PURE__ */ l.jsx(Ft, { label: "Inspector", children: /* @__PURE__ */ l.jsx("div", { id: "Inspector", className: t.class, children: oe.uuid.length > 0 && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
2908
2908
  /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
2909
2909
  /* @__PURE__ */ l.jsx(
2910
- dt,
2910
+ ht,
2911
2911
  {
2912
2912
  type: "string",
2913
2913
  title: "Name",
@@ -2917,7 +2917,7 @@ function ti(t) {
2917
2917
  }
2918
2918
  ),
2919
2919
  /* @__PURE__ */ l.jsx(
2920
- dt,
2920
+ ht,
2921
2921
  {
2922
2922
  type: "string",
2923
2923
  title: "Type",
@@ -2927,7 +2927,7 @@ function ti(t) {
2927
2927
  }
2928
2928
  ),
2929
2929
  /* @__PURE__ */ l.jsx(
2930
- dt,
2930
+ ht,
2931
2931
  {
2932
2932
  type: "string",
2933
2933
  title: "UUID",
@@ -2937,7 +2937,7 @@ function ti(t) {
2937
2937
  }
2938
2938
  ),
2939
2939
  /* @__PURE__ */ l.jsx(
2940
- dt,
2940
+ ht,
2941
2941
  {
2942
2942
  type: "boolean",
2943
2943
  title: "Visible",
@@ -2945,124 +2945,147 @@ function ti(t) {
2945
2945
  value: oe.visible,
2946
2946
  onChange: (h, o) => {
2947
2947
  t.three.updateObject(oe.uuid, h, o);
2948
- const u = t.three.scene?.getObjectByProperty("uuid", oe.uuid);
2949
- u !== void 0 && K(u, h, o);
2948
+ const d = t.three.scene?.getObjectByProperty("uuid", oe.uuid);
2949
+ d !== void 0 && Z(d, h, o);
2950
2950
  }
2951
2951
  }
2952
2952
  )
2953
2953
  ] }),
2954
2954
  /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
2955
- Ja(oe, t.three),
2956
- i ? ei(oe, t.three) : null,
2957
- e.search("camera") > -1 ? qa(oe, t.three) : null,
2958
- e.search("light") > -1 ? Qa(oe, t.three) : null,
2959
- c ? Ha(oe, t.three) : null
2955
+ si(oe, t.three),
2956
+ i ? ci(oe, t.three) : null,
2957
+ e.search("camera") > -1 ? ni(oe, t.three) : null,
2958
+ e.search("light") > -1 ? oi(oe, t.three) : null,
2959
+ c ? ei(oe, t.three) : null
2960
2960
  ] })
2961
2961
  ] }) }, n) }, "Inspector");
2962
2962
  }
2963
- function Ci(t) {
2964
- const [n, a] = ae(t.scene);
2963
+ function Ai(t) {
2964
+ const [n, a] = ne(t.scene);
2965
2965
  ke(() => {
2966
2966
  const c = (h) => {
2967
2967
  a(h.value);
2968
2968
  };
2969
- return D.addEventListener(I.SET_SCENE, c), () => {
2970
- D.removeEventListener(I.SET_SCENE, c);
2969
+ return F.addEventListener(B.SET_SCENE, c), () => {
2970
+ F.removeEventListener(B.SET_SCENE, c);
2971
2971
  };
2972
2972
  }, []);
2973
2973
  const e = n !== null, i = "Hierarchy - " + (e ? `${n?.name}` : "No Scene");
2974
2974
  return /* @__PURE__ */ l.jsxs("div", { id: "SidePanel", children: [
2975
- /* @__PURE__ */ l.jsx(Ft, { label: i, open: !0, children: /* @__PURE__ */ l.jsx(l.Fragment, { children: e && /* @__PURE__ */ l.jsx(ka, { child: n, three: t.three }) }) }),
2976
- /* @__PURE__ */ l.jsx(ti, { three: t.three })
2975
+ /* @__PURE__ */ l.jsx(Ft, { label: i, open: !0, children: /* @__PURE__ */ l.jsx(l.Fragment, { children: e && /* @__PURE__ */ l.jsx($a, { child: n, three: t.three }) }) }),
2976
+ /* @__PURE__ */ l.jsx(li, { three: t.three })
2977
2977
  ] }, "SidePanel");
2978
2978
  }
2979
- function Si(t) {
2979
+ function ki(t) {
2980
2980
  function n() {
2981
2981
  return t.three.scene === void 0 ? (console.log("No scene:", t.three), !1) : !0;
2982
2982
  }
2983
2983
  const a = (o) => {
2984
2984
  if (!n())
2985
2985
  return;
2986
- const u = t.three.scene?.getObjectByProperty("uuid", o.value);
2987
- u !== void 0 && t.three.setObject(u);
2988
- }, e = (o, u, d) => {
2986
+ const d = t.three.scene?.getObjectByProperty("uuid", o.value);
2987
+ d !== void 0 && t.three.setObject(d);
2988
+ }, e = (o, d, u) => {
2989
2989
  if (!n())
2990
2990
  return;
2991
- const f = t.three.scene?.getObjectByProperty("uuid", o);
2992
- f !== void 0 && K(f, u, d);
2991
+ const g = t.three.scene?.getObjectByProperty("uuid", o);
2992
+ g !== void 0 && Z(g, d, u);
2993
2993
  }, i = (o) => {
2994
2994
  if (!n())
2995
2995
  return;
2996
- const u = o.value, { key: d, value: f, uuid: b } = u;
2997
- e(b, d, f);
2996
+ const d = o.value, { key: u, value: g, uuid: v } = d;
2997
+ e(v, u, g);
2998
2998
  }, c = (o) => {
2999
2999
  if (!n())
3000
3000
  return;
3001
- const u = o.value;
3002
- It(u.value).then((d) => {
3003
- e(u.uuid, u.key, d), e(u.uuid, "material.needsUpdate", !0);
3001
+ const d = o.value;
3002
+ It(d.value).then((u) => {
3003
+ e(d.uuid, d.key, u), e(d.uuid, "material.needsUpdate", !0);
3004
3004
  });
3005
3005
  }, h = (o) => {
3006
3006
  if (!n())
3007
3007
  return;
3008
- const { key: u, uuid: d, value: f, subitem: b } = o.value, E = t.three.scene?.getObjectByProperty("uuid", d);
3008
+ const { key: d, uuid: u, value: g, subitem: v } = o.value, E = t.three.scene?.getObjectByProperty("uuid", u);
3009
3009
  if (E !== void 0)
3010
3010
  try {
3011
- b !== void 0 ? Sa(E, b)[u](f) : E[u](f);
3011
+ v !== void 0 ? Aa(E, v)[d](g) : E[d](g);
3012
3012
  } catch (x) {
3013
- console.log("Error requesting method:"), console.log(x), console.log(u), console.log(f);
3013
+ console.log("Error requesting method:"), console.log(x), console.log(d), console.log(g);
3014
3014
  }
3015
3015
  };
3016
- return ke(() => (D.addEventListener(I.GET_OBJECT, a), D.addEventListener(I.UPDATE_OBJECT, i), D.addEventListener(I.CREATE_TEXTURE, c), D.addEventListener(I.REQUEST_METHOD, h), () => {
3017
- D.removeEventListener(I.GET_OBJECT, a), D.removeEventListener(I.UPDATE_OBJECT, i), D.removeEventListener(I.CREATE_TEXTURE, c), D.removeEventListener(I.REQUEST_METHOD, h);
3016
+ return ke(() => (F.addEventListener(B.GET_OBJECT, a), F.addEventListener(B.UPDATE_OBJECT, i), F.addEventListener(B.CREATE_TEXTURE, c), F.addEventListener(B.REQUEST_METHOD, h), () => {
3017
+ F.removeEventListener(B.GET_OBJECT, a), F.removeEventListener(B.UPDATE_OBJECT, i), F.removeEventListener(B.CREATE_TEXTURE, c), F.removeEventListener(B.REQUEST_METHOD, h);
3018
3018
  }), []), null;
3019
3019
  }
3020
- const Qt = { type: "change" }, jt = { type: "start" }, en = { type: "end" }, bt = new Jn(), tn = new Qn(), ni = Math.cos(70 * ea.DEG2RAD);
3021
- class ai extends an {
3020
+ class di extends na {
3022
3021
  constructor(n, a) {
3023
- super(), this.object = n, this.domElement = a, this.domElement.style.touchAction = "none", this.enabled = !0, this.target = new q(), this.cursor = new q(), 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: et.ROTATE, MIDDLE: et.DOLLY, RIGHT: et.PAN }, this.touches = { ONE: tt.ROTATE, TWO: tt.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this.getPolarAngle = function() {
3022
+ const e = [1, 1, 0, -1, 1, 0, -1, -1, 0, 1, -1, 0, 1, 1, 0], i = new zt();
3023
+ i.setAttribute("position", new Ht(e, 3)), i.computeBoundingSphere();
3024
+ const c = new aa({ fog: !1 });
3025
+ super(i, c), this.light = n, this.color = a, this.type = "RectAreaLightHelper";
3026
+ const h = [1, 1, 0, -1, 1, 0, -1, -1, 0, 1, 1, 0, -1, -1, 0, 1, -1, 0], o = new zt();
3027
+ o.setAttribute("position", new Ht(h, 3)), o.computeBoundingSphere(), this.add(new wn(o, new On({ side: cn, fog: !1 })));
3028
+ }
3029
+ updateMatrixWorld() {
3030
+ if (this.scale.set(0.5 * this.light.width, 0.5 * this.light.height, 1), this.color !== void 0)
3031
+ this.material.color.set(this.color), this.children[0].material.color.set(this.color);
3032
+ else {
3033
+ this.material.color.copy(this.light.color).multiplyScalar(this.light.intensity);
3034
+ const n = this.material.color, a = Math.max(n.r, n.g, n.b);
3035
+ a > 1 && n.multiplyScalar(1 / a), this.children[0].material.color.copy(this.material.color);
3036
+ }
3037
+ this.matrixWorld.extractRotation(this.light.matrixWorld).scale(this.scale).copyPosition(this.light.matrixWorld), this.children[0].matrixWorld.copy(this.matrixWorld);
3038
+ }
3039
+ dispose() {
3040
+ this.geometry.dispose(), this.material.dispose(), this.children[0].geometry.dispose(), this.children[0].material.dispose();
3041
+ }
3042
+ }
3043
+ const tn = { type: "change" }, Dt = { type: "start" }, nn = { type: "end" }, yt = new ia(), an = new ra(), ui = Math.cos(70 * sa.DEG2RAD);
3044
+ class hi extends sn {
3045
+ constructor(n, a) {
3046
+ super(), this.object = n, this.domElement = a, this.domElement.style.touchAction = "none", this.enabled = !0, this.target = new X(), this.cursor = new X(), 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() {
3024
3047
  return o.phi;
3025
3048
  }, this.getAzimuthalAngle = function() {
3026
3049
  return o.theta;
3027
3050
  }, this.getDistance = function() {
3028
3051
  return this.object.position.distanceTo(this.target);
3029
3052
  }, this.listenToKeyEvents = function(s) {
3030
- s.addEventListener("keydown", rt), this._domElementKeyEvents = s;
3053
+ s.addEventListener("keydown", st), this._domElementKeyEvents = s;
3031
3054
  }, this.stopListenToKeyEvents = function() {
3032
- this._domElementKeyEvents.removeEventListener("keydown", rt), this._domElementKeyEvents = null;
3055
+ this._domElementKeyEvents.removeEventListener("keydown", st), this._domElementKeyEvents = null;
3033
3056
  }, this.saveState = function() {
3034
3057
  e.target0.copy(e.target), e.position0.copy(e.object.position), e.zoom0 = e.object.zoom;
3035
3058
  }, this.reset = function() {
3036
- e.target.copy(e.target0), e.object.position.copy(e.position0), e.object.zoom = e.zoom0, e.object.updateProjectionMatrix(), e.dispatchEvent(Qt), e.update(), c = i.NONE;
3059
+ e.target.copy(e.target0), e.object.position.copy(e.position0), e.object.zoom = e.zoom0, e.object.updateProjectionMatrix(), e.dispatchEvent(tn), e.update(), c = i.NONE;
3037
3060
  }, this.update = function() {
3038
- const s = new q(), y = new zt().setFromUnitVectors(n.up, new q(0, 1, 0)), T = y.clone().invert(), F = new q(), W = new zt(), be = new q(), ue = 2 * Math.PI;
3061
+ const s = new X(), y = new Yt().setFromUnitVectors(n.up, new X(0, 1, 0)), T = y.clone().invert(), U = new X(), K = new Yt(), ye = new X(), de = 2 * Math.PI;
3039
3062
  return function(Rt = null) {
3040
- const ot = e.object.position;
3041
- s.copy(ot).sub(e.target), s.applyQuaternion(y), o.setFromVector3(s), e.autoRotate && c === i.NONE && $(ze(Rt)), e.enableDamping ? (o.theta += u.theta * e.dampingFactor, o.phi += u.phi * e.dampingFactor) : (o.theta += u.theta, o.phi += u.phi);
3042
- let Oe = e.minAzimuthAngle, ye = e.maxAzimuthAngle;
3043
- isFinite(Oe) && isFinite(ye) && (Oe < -Math.PI ? Oe += ue : Oe > Math.PI && (Oe -= ue), ye < -Math.PI ? ye += ue : ye > Math.PI && (ye -= ue), Oe <= ye ? o.theta = Math.max(Oe, Math.min(ye, o.theta)) : o.theta = o.theta > (Oe + ye) / 2 ? Math.max(Oe, o.theta) : Math.min(ye, o.theta)), o.phi = Math.max(e.minPolarAngle, Math.min(e.maxPolarAngle, o.phi)), o.makeSafe(), e.enableDamping === !0 ? e.target.addScaledVector(f, e.dampingFactor) : e.target.add(f), e.target.sub(e.cursor), e.target.clampLength(e.minTargetRadius, e.maxTargetRadius), e.target.add(e.cursor), e.zoomToCursor && Ce || e.object.isOrthographicCamera ? o.radius = Pe(o.radius) : o.radius = Pe(o.radius * d), s.setFromSpherical(o), s.applyQuaternion(T), ot.copy(e.target).add(s), e.object.lookAt(e.target), e.enableDamping === !0 ? (u.theta *= 1 - e.dampingFactor, u.phi *= 1 - e.dampingFactor, f.multiplyScalar(1 - e.dampingFactor)) : (u.set(0, 0, 0), f.set(0, 0, 0));
3044
- let Ge = !1;
3045
- if (e.zoomToCursor && Ce) {
3046
- let He = null;
3063
+ const ct = e.object.position;
3064
+ s.copy(ct).sub(e.target), s.applyQuaternion(y), o.setFromVector3(s), e.autoRotate && c === i.NONE && ge(Me(Rt)), e.enableDamping ? (o.theta += d.theta * e.dampingFactor, o.phi += d.phi * e.dampingFactor) : (o.theta += d.theta, o.phi += d.phi);
3065
+ let Oe = e.minAzimuthAngle, Ee = e.maxAzimuthAngle;
3066
+ isFinite(Oe) && isFinite(Ee) && (Oe < -Math.PI ? Oe += de : Oe > Math.PI && (Oe -= de), Ee < -Math.PI ? Ee += de : Ee > Math.PI && (Ee -= de), Oe <= Ee ? o.theta = Math.max(Oe, Math.min(Ee, o.theta)) : o.theta = o.theta > (Oe + Ee) / 2 ? Math.max(Oe, o.theta) : Math.min(Ee, o.theta)), o.phi = Math.max(e.minPolarAngle, Math.min(e.maxPolarAngle, o.phi)), o.makeSafe(), e.enableDamping === !0 ? e.target.addScaledVector(g, e.dampingFactor) : e.target.add(g), e.target.sub(e.cursor), e.target.clampLength(e.minTargetRadius, e.maxTargetRadius), e.target.add(e.cursor), e.zoomToCursor && Se || e.object.isOrthographicCamera ? o.radius = Pe(o.radius) : o.radius = Pe(o.radius * u), s.setFromSpherical(o), s.applyQuaternion(T), ct.copy(e.target).add(s), e.object.lookAt(e.target), e.enableDamping === !0 ? (d.theta *= 1 - e.dampingFactor, d.phi *= 1 - e.dampingFactor, g.multiplyScalar(1 - e.dampingFactor)) : (d.set(0, 0, 0), g.set(0, 0, 0));
3067
+ let Ve = !1;
3068
+ if (e.zoomToCursor && Se) {
3069
+ let We = null;
3047
3070
  if (e.object.isPerspectiveCamera) {
3048
- const We = s.length();
3049
- He = Pe(We * d);
3050
- const qe = We - He;
3051
- e.object.position.addScaledVector(re, qe), e.object.updateMatrixWorld();
3071
+ const qe = s.length();
3072
+ We = Pe(qe * u);
3073
+ const Ke = qe - We;
3074
+ e.object.position.addScaledVector(q, Ke), e.object.updateMatrixWorld();
3052
3075
  } else if (e.object.isOrthographicCamera) {
3053
- const We = new q(Q.x, Q.y, 0);
3054
- We.unproject(e.object), e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / d)), e.object.updateProjectionMatrix(), Ge = !0;
3055
- const qe = new q(Q.x, Q.y, 0);
3056
- qe.unproject(e.object), e.object.position.sub(qe).add(We), e.object.updateMatrixWorld(), He = s.length();
3076
+ const qe = new X(ee.x, ee.y, 0);
3077
+ qe.unproject(e.object), e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / u)), e.object.updateProjectionMatrix(), Ve = !0;
3078
+ const Ke = new X(ee.x, ee.y, 0);
3079
+ Ke.unproject(e.object), e.object.position.sub(Ke).add(qe), e.object.updateMatrixWorld(), We = s.length();
3057
3080
  } else
3058
3081
  console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), e.zoomToCursor = !1;
3059
- He !== null && (this.screenSpacePanning ? e.target.set(0, 0, -1).transformDirection(e.object.matrix).multiplyScalar(He).add(e.object.position) : (bt.origin.copy(e.object.position), bt.direction.set(0, 0, -1).transformDirection(e.object.matrix), Math.abs(e.object.up.dot(bt.direction)) < ni ? n.lookAt(e.target) : (tn.setFromNormalAndCoplanarPoint(e.object.up, e.target), bt.intersectPlane(tn, e.target))));
3082
+ We !== null && (this.screenSpacePanning ? e.target.set(0, 0, -1).transformDirection(e.object.matrix).multiplyScalar(We).add(e.object.position) : (yt.origin.copy(e.object.position), yt.direction.set(0, 0, -1).transformDirection(e.object.matrix), Math.abs(e.object.up.dot(yt.direction)) < ui ? n.lookAt(e.target) : (an.setFromNormalAndCoplanarPoint(e.object.up, e.target), yt.intersectPlane(an, e.target))));
3060
3083
  } else
3061
- e.object.isOrthographicCamera && (Ge = d !== 1, Ge && (e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / d)), e.object.updateProjectionMatrix()));
3062
- return d = 1, Ce = !1, Ge || F.distanceToSquared(e.object.position) > h || 8 * (1 - W.dot(e.object.quaternion)) > h || be.distanceToSquared(e.target) > 0 ? (e.dispatchEvent(Qt), F.copy(e.object.position), W.copy(e.object.quaternion), be.copy(e.target), !0) : !1;
3084
+ e.object.isOrthographicCamera && (Ve = u !== 1, Ve && (e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / u)), e.object.updateProjectionMatrix()));
3085
+ return u = 1, Se = !1, Ve || U.distanceToSquared(e.object.position) > h || 8 * (1 - K.dot(e.object.quaternion)) > h || ye.distanceToSquared(e.target) > 0 ? (e.dispatchEvent(tn), U.copy(e.object.position), K.copy(e.object.quaternion), ye.copy(e.target), !0) : !1;
3063
3086
  };
3064
3087
  }(), this.dispose = function() {
3065
- e.domElement.removeEventListener("contextmenu", Je), e.domElement.removeEventListener("pointerdown", L), e.domElement.removeEventListener("pointercancel", we), e.domElement.removeEventListener("wheel", ft), e.domElement.removeEventListener("pointermove", ie), e.domElement.removeEventListener("pointerup", we), e._domElementKeyEvents !== null && (e._domElementKeyEvents.removeEventListener("keydown", rt), e._domElementKeyEvents = null);
3088
+ e.domElement.removeEventListener("contextmenu", et), e.domElement.removeEventListener("pointerdown", A), e.domElement.removeEventListener("pointercancel", J), e.domElement.removeEventListener("wheel", pt), e.domElement.removeEventListener("pointermove", z), e.domElement.removeEventListener("pointerup", J), e._domElementKeyEvents !== null && (e._domElementKeyEvents.removeEventListener("keydown", st), e._domElementKeyEvents = null);
3066
3089
  };
3067
3090
  const e = this, i = {
3068
3091
  NONE: -1,
@@ -3075,181 +3098,181 @@ class ai extends an {
3075
3098
  TOUCH_DOLLY_ROTATE: 6
3076
3099
  };
3077
3100
  let c = i.NONE;
3078
- const h = 1e-6, o = new Yt(), u = new Yt();
3079
- let d = 1;
3080
- const f = new q(), b = new me(), E = new me(), x = new me(), M = new me(), P = new me(), V = new me(), U = new me(), j = new me(), O = new me(), re = new q(), Q = new me();
3081
- let Ce = !1;
3082
- const G = [], ee = {};
3083
- let ve = !1;
3084
- function ze(s) {
3101
+ const h = 1e-6, o = new Gt(), d = new Gt();
3102
+ let u = 1;
3103
+ const g = new X(), v = new pe(), E = new pe(), x = new pe(), R = new pe(), P = new pe(), V = new pe(), Y = new pe(), I = new pe(), _ = new pe(), q = new X(), ee = new pe();
3104
+ let Se = !1;
3105
+ const W = [], me = {};
3106
+ let le = !1;
3107
+ function Me(s) {
3085
3108
  return s !== null ? 2 * Math.PI / 60 * e.autoRotateSpeed * s : 2 * Math.PI / 60 / 60 * e.autoRotateSpeed;
3086
3109
  }
3087
- function Me(s) {
3110
+ function Te(s) {
3088
3111
  const y = Math.abs(s * 0.01);
3089
3112
  return Math.pow(0.95, e.zoomSpeed * y);
3090
3113
  }
3091
- function $(s) {
3092
- u.theta -= s;
3114
+ function ge(s) {
3115
+ d.theta -= s;
3093
3116
  }
3094
- function le(s) {
3095
- u.phi -= s;
3117
+ function L(s) {
3118
+ d.phi -= s;
3096
3119
  }
3097
- const S = function() {
3098
- const s = new q();
3099
- return function(T, F) {
3100
- s.setFromMatrixColumn(F, 0), s.multiplyScalar(-T), f.add(s);
3120
+ const be = function() {
3121
+ const s = new X();
3122
+ return function(T, U) {
3123
+ s.setFromMatrixColumn(U, 0), s.multiplyScalar(-T), g.add(s);
3101
3124
  };
3102
- }(), Te = function() {
3103
- const s = new q();
3104
- return function(T, F) {
3105
- e.screenSpacePanning === !0 ? s.setFromMatrixColumn(F, 1) : (s.setFromMatrixColumn(F, 0), s.crossVectors(e.object.up, s)), s.multiplyScalar(T), f.add(s);
3125
+ }(), C = function() {
3126
+ const s = new X();
3127
+ return function(T, U) {
3128
+ e.screenSpacePanning === !0 ? s.setFromMatrixColumn(U, 1) : (s.setFromMatrixColumn(U, 0), s.crossVectors(e.object.up, s)), s.multiplyScalar(T), g.add(s);
3106
3129
  };
3107
- }(), ge = function() {
3108
- const s = new q();
3109
- return function(T, F) {
3110
- const W = e.domElement;
3130
+ }(), Ce = function() {
3131
+ const s = new X();
3132
+ return function(T, U) {
3133
+ const K = e.domElement;
3111
3134
  if (e.object.isPerspectiveCamera) {
3112
- const be = e.object.position;
3113
- s.copy(be).sub(e.target);
3114
- let ue = s.length();
3115
- ue *= Math.tan(e.object.fov / 2 * Math.PI / 180), S(2 * T * ue / W.clientHeight, e.object.matrix), Te(2 * F * ue / W.clientHeight, e.object.matrix);
3135
+ const ye = e.object.position;
3136
+ s.copy(ye).sub(e.target);
3137
+ let de = s.length();
3138
+ de *= Math.tan(e.object.fov / 2 * Math.PI / 180), be(2 * T * de / K.clientHeight, e.object.matrix), C(2 * U * de / K.clientHeight, e.object.matrix);
3116
3139
  } else
3117
- e.object.isOrthographicCamera ? (S(T * (e.object.right - e.object.left) / e.object.zoom / W.clientWidth, e.object.matrix), Te(F * (e.object.top - e.object.bottom) / e.object.zoom / W.clientHeight, e.object.matrix)) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."), e.enablePan = !1);
3140
+ e.object.isOrthographicCamera ? (be(T * (e.object.right - e.object.left) / e.object.zoom / K.clientWidth, e.object.matrix), C(U * (e.object.top - e.object.bottom) / e.object.zoom / K.clientHeight, e.object.matrix)) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."), e.enablePan = !1);
3118
3141
  };
3119
3142
  }();
3120
3143
  function _e(s) {
3121
- e.object.isPerspectiveCamera || e.object.isOrthographicCamera ? d /= s : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
3144
+ e.object.isPerspectiveCamera || e.object.isOrthographicCamera ? u /= s : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
3122
3145
  }
3123
- function je(s) {
3124
- e.object.isPerspectiveCamera || e.object.isOrthographicCamera ? d *= s : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
3146
+ function De(s) {
3147
+ e.object.isPerspectiveCamera || e.object.isOrthographicCamera ? u *= s : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
3125
3148
  }
3126
3149
  function Re(s, y) {
3127
3150
  if (!e.zoomToCursor)
3128
3151
  return;
3129
- Ce = !0;
3130
- const T = e.domElement.getBoundingClientRect(), F = s - T.left, W = y - T.top, be = T.width, ue = T.height;
3131
- Q.x = F / be * 2 - 1, Q.y = -(W / ue) * 2 + 1, re.set(Q.x, Q.y, 1).unproject(e.object).sub(e.object.position).normalize();
3152
+ Se = !0;
3153
+ const T = e.domElement.getBoundingClientRect(), U = s - T.left, K = y - T.top, ye = T.width, de = T.height;
3154
+ ee.x = U / ye * 2 - 1, ee.y = -(K / de) * 2 + 1, q.set(ee.x, ee.y, 1).unproject(e.object).sub(e.object.position).normalize();
3132
3155
  }
3133
3156
  function Pe(s) {
3134
3157
  return Math.max(e.minDistance, Math.min(e.maxDistance, s));
3135
3158
  }
3136
- function De(s) {
3137
- b.set(s.clientX, s.clientY);
3159
+ function je(s) {
3160
+ v.set(s.clientX, s.clientY);
3138
3161
  }
3139
- function Ye(s) {
3140
- Re(s.clientX, s.clientX), U.set(s.clientX, s.clientY);
3162
+ function Fe(s) {
3163
+ Re(s.clientX, s.clientX), Y.set(s.clientX, s.clientY);
3141
3164
  }
3142
- function te(s) {
3143
- M.set(s.clientX, s.clientY);
3165
+ function Be(s) {
3166
+ R.set(s.clientX, s.clientY);
3144
3167
  }
3145
- function Se(s) {
3146
- E.set(s.clientX, s.clientY), x.subVectors(E, b).multiplyScalar(e.rotateSpeed);
3168
+ function ae(s) {
3169
+ E.set(s.clientX, s.clientY), x.subVectors(E, v).multiplyScalar(e.rotateSpeed);
3147
3170
  const y = e.domElement;
3148
- $(2 * Math.PI * x.x / y.clientHeight), le(2 * Math.PI * x.y / y.clientHeight), b.copy(E), e.update();
3171
+ ge(2 * Math.PI * x.x / y.clientHeight), L(2 * Math.PI * x.y / y.clientHeight), v.copy(E), e.update();
3149
3172
  }
3150
- function it(s) {
3151
- j.set(s.clientX, s.clientY), O.subVectors(j, U), O.y > 0 ? _e(Me(O.y)) : O.y < 0 && je(Me(O.y)), U.copy(j), e.update();
3173
+ function we(s) {
3174
+ I.set(s.clientX, s.clientY), _.subVectors(I, Y), _.y > 0 ? _e(Te(_.y)) : _.y < 0 && De(Te(_.y)), Y.copy(I), e.update();
3152
3175
  }
3153
- function Ve(s) {
3154
- P.set(s.clientX, s.clientY), V.subVectors(P, M).multiplyScalar(e.panSpeed), ge(V.x, V.y), M.copy(P), e.update();
3176
+ function Ye(s) {
3177
+ P.set(s.clientX, s.clientY), V.subVectors(P, R).multiplyScalar(e.panSpeed), Ce(V.x, V.y), R.copy(P), e.update();
3155
3178
  }
3156
- function pe(s) {
3157
- Re(s.clientX, s.clientY), s.deltaY < 0 ? je(Me(s.deltaY)) : s.deltaY > 0 && _e(Me(s.deltaY)), e.update();
3179
+ function Ge(s) {
3180
+ Re(s.clientX, s.clientY), s.deltaY < 0 ? De(Te(s.deltaY)) : s.deltaY > 0 && _e(Te(s.deltaY)), e.update();
3158
3181
  }
3159
- function p(s) {
3182
+ function ue(s) {
3160
3183
  let y = !1;
3161
3184
  switch (s.code) {
3162
3185
  case e.keys.UP:
3163
- s.ctrlKey || s.metaKey || s.shiftKey ? le(2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : ge(0, e.keyPanSpeed), y = !0;
3186
+ s.ctrlKey || s.metaKey || s.shiftKey ? L(2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : Ce(0, e.keyPanSpeed), y = !0;
3164
3187
  break;
3165
3188
  case e.keys.BOTTOM:
3166
- s.ctrlKey || s.metaKey || s.shiftKey ? le(-2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : ge(0, -e.keyPanSpeed), y = !0;
3189
+ s.ctrlKey || s.metaKey || s.shiftKey ? L(-2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : Ce(0, -e.keyPanSpeed), y = !0;
3167
3190
  break;
3168
3191
  case e.keys.LEFT:
3169
- s.ctrlKey || s.metaKey || s.shiftKey ? $(2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : ge(e.keyPanSpeed, 0), y = !0;
3192
+ s.ctrlKey || s.metaKey || s.shiftKey ? ge(2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : Ce(e.keyPanSpeed, 0), y = !0;
3170
3193
  break;
3171
3194
  case e.keys.RIGHT:
3172
- s.ctrlKey || s.metaKey || s.shiftKey ? $(-2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : ge(-e.keyPanSpeed, 0), y = !0;
3195
+ s.ctrlKey || s.metaKey || s.shiftKey ? ge(-2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : Ce(-e.keyPanSpeed, 0), y = !0;
3173
3196
  break;
3174
3197
  }
3175
3198
  y && (s.preventDefault(), e.update());
3176
3199
  }
3177
- function v(s) {
3178
- if (G.length === 1)
3179
- b.set(s.pageX, s.pageY);
3200
+ function p(s) {
3201
+ if (W.length === 1)
3202
+ v.set(s.pageX, s.pageY);
3180
3203
  else {
3181
- const y = Fe(s), T = 0.5 * (s.pageX + y.x), F = 0.5 * (s.pageY + y.y);
3182
- b.set(T, F);
3204
+ const y = Ue(s), T = 0.5 * (s.pageX + y.x), U = 0.5 * (s.pageY + y.y);
3205
+ v.set(T, U);
3183
3206
  }
3184
3207
  }
3185
- function C(s) {
3186
- if (G.length === 1)
3187
- M.set(s.pageX, s.pageY);
3208
+ function m(s) {
3209
+ if (W.length === 1)
3210
+ R.set(s.pageX, s.pageY);
3188
3211
  else {
3189
- const y = Fe(s), T = 0.5 * (s.pageX + y.x), F = 0.5 * (s.pageY + y.y);
3190
- M.set(T, F);
3212
+ const y = Ue(s), T = 0.5 * (s.pageX + y.x), U = 0.5 * (s.pageY + y.y);
3213
+ R.set(T, U);
3191
3214
  }
3192
3215
  }
3193
- function _(s) {
3194
- const y = Fe(s), T = s.pageX - y.x, F = s.pageY - y.y, W = Math.sqrt(T * T + F * F);
3195
- U.set(0, W);
3216
+ function w(s) {
3217
+ const y = Ue(s), T = s.pageX - y.x, U = s.pageY - y.y, K = Math.sqrt(T * T + U * U);
3218
+ Y.set(0, K);
3196
3219
  }
3197
- function H(s) {
3198
- e.enableZoom && _(s), e.enablePan && C(s);
3220
+ function j(s) {
3221
+ e.enableZoom && w(s), e.enablePan && m(s);
3199
3222
  }
3200
- function X(s) {
3201
- e.enableZoom && _(s), e.enableRotate && v(s);
3223
+ function ie(s) {
3224
+ e.enableZoom && w(s), e.enableRotate && p(s);
3202
3225
  }
3203
- function de(s) {
3204
- if (G.length == 1)
3226
+ function M(s) {
3227
+ if (W.length == 1)
3205
3228
  E.set(s.pageX, s.pageY);
3206
3229
  else {
3207
- const T = Fe(s), F = 0.5 * (s.pageX + T.x), W = 0.5 * (s.pageY + T.y);
3208
- E.set(F, W);
3230
+ const T = Ue(s), U = 0.5 * (s.pageX + T.x), K = 0.5 * (s.pageY + T.y);
3231
+ E.set(U, K);
3209
3232
  }
3210
- x.subVectors(E, b).multiplyScalar(e.rotateSpeed);
3233
+ x.subVectors(E, v).multiplyScalar(e.rotateSpeed);
3211
3234
  const y = e.domElement;
3212
- $(2 * Math.PI * x.x / y.clientHeight), le(2 * Math.PI * x.y / y.clientHeight), b.copy(E);
3235
+ ge(2 * Math.PI * x.x / y.clientHeight), L(2 * Math.PI * x.y / y.clientHeight), v.copy(E);
3213
3236
  }
3214
- function z(s) {
3215
- if (G.length === 1)
3237
+ function O(s) {
3238
+ if (W.length === 1)
3216
3239
  P.set(s.pageX, s.pageY);
3217
3240
  else {
3218
- const y = Fe(s), T = 0.5 * (s.pageX + y.x), F = 0.5 * (s.pageY + y.y);
3219
- P.set(T, F);
3241
+ const y = Ue(s), T = 0.5 * (s.pageX + y.x), U = 0.5 * (s.pageY + y.y);
3242
+ P.set(T, U);
3220
3243
  }
3221
- V.subVectors(P, M).multiplyScalar(e.panSpeed), ge(V.x, V.y), M.copy(P);
3244
+ V.subVectors(P, R).multiplyScalar(e.panSpeed), Ce(V.x, V.y), R.copy(P);
3222
3245
  }
3223
- function Z(s) {
3224
- const y = Fe(s), T = s.pageX - y.x, F = s.pageY - y.y, W = Math.sqrt(T * T + F * F);
3225
- j.set(0, W), O.set(0, Math.pow(j.y / U.y, e.zoomSpeed)), _e(O.y), U.copy(j);
3226
- const be = (s.pageX + y.x) * 0.5, ue = (s.pageY + y.y) * 0.5;
3227
- Re(be, ue);
3246
+ function N(s) {
3247
+ const y = Ue(s), T = s.pageX - y.x, U = s.pageY - y.y, K = Math.sqrt(T * T + U * U);
3248
+ I.set(0, K), _.set(0, Math.pow(I.y / Y.y, e.zoomSpeed)), _e(_.y), Y.copy(I);
3249
+ const ye = (s.pageX + y.x) * 0.5, de = (s.pageY + y.y) * 0.5;
3250
+ Re(ye, de);
3251
+ }
3252
+ function re(s) {
3253
+ e.enableZoom && N(s), e.enablePan && O(s);
3228
3254
  }
3229
3255
  function se(s) {
3230
- e.enableZoom && Z(s), e.enablePan && z(s);
3256
+ e.enableZoom && N(s), e.enableRotate && M(s);
3231
3257
  }
3232
3258
  function A(s) {
3233
- e.enableZoom && Z(s), e.enableRotate && de(s);
3234
- }
3235
- function L(s) {
3236
- e.enabled !== !1 && (G.length === 0 && (e.domElement.setPointerCapture(s.pointerId), e.domElement.addEventListener("pointermove", ie), e.domElement.addEventListener("pointerup", we)), Mt(s), s.pointerType === "touch" ? st(s) : Ne(s));
3259
+ e.enabled !== !1 && (W.length === 0 && (e.domElement.setPointerCapture(s.pointerId), e.domElement.addEventListener("pointermove", z), e.domElement.addEventListener("pointerup", J)), Mt(s), s.pointerType === "touch" ? ot(s) : Ie(s));
3237
3260
  }
3238
- function ie(s) {
3239
- e.enabled !== !1 && (s.pointerType === "touch" ? vt(s) : Ot(s));
3261
+ function z(s) {
3262
+ e.enabled !== !1 && (s.pointerType === "touch" ? gt(s) : Qe(s));
3240
3263
  }
3241
- function we(s) {
3242
- switch (Tt(s), G.length) {
3264
+ function J(s) {
3265
+ switch (Tt(s), W.length) {
3243
3266
  case 0:
3244
- e.domElement.releasePointerCapture(s.pointerId), e.domElement.removeEventListener("pointermove", ie), e.domElement.removeEventListener("pointerup", we), e.dispatchEvent(en), c = i.NONE;
3267
+ e.domElement.releasePointerCapture(s.pointerId), e.domElement.removeEventListener("pointermove", z), e.domElement.removeEventListener("pointerup", J), e.dispatchEvent(nn), c = i.NONE;
3245
3268
  break;
3246
3269
  case 1:
3247
- const y = G[0], T = ee[y];
3248
- st({ pointerId: y, pageX: T.x, pageY: T.y });
3270
+ const y = W[0], T = me[y];
3271
+ ot({ pointerId: y, pageX: T.x, pageY: T.y });
3249
3272
  break;
3250
3273
  }
3251
3274
  }
3252
- function Ne(s) {
3275
+ function Ie(s) {
3253
3276
  let y;
3254
3277
  switch (s.button) {
3255
3278
  case 0:
@@ -3265,61 +3288,61 @@ class ai extends an {
3265
3288
  y = -1;
3266
3289
  }
3267
3290
  switch (y) {
3268
- case et.DOLLY:
3291
+ case nt.DOLLY:
3269
3292
  if (e.enableZoom === !1)
3270
3293
  return;
3271
- Ye(s), c = i.DOLLY;
3294
+ Fe(s), c = i.DOLLY;
3272
3295
  break;
3273
- case et.ROTATE:
3296
+ case nt.ROTATE:
3274
3297
  if (s.ctrlKey || s.metaKey || s.shiftKey) {
3275
3298
  if (e.enablePan === !1)
3276
3299
  return;
3277
- te(s), c = i.PAN;
3300
+ Be(s), c = i.PAN;
3278
3301
  } else {
3279
3302
  if (e.enableRotate === !1)
3280
3303
  return;
3281
- De(s), c = i.ROTATE;
3304
+ je(s), c = i.ROTATE;
3282
3305
  }
3283
3306
  break;
3284
- case et.PAN:
3307
+ case nt.PAN:
3285
3308
  if (s.ctrlKey || s.metaKey || s.shiftKey) {
3286
3309
  if (e.enableRotate === !1)
3287
3310
  return;
3288
- De(s), c = i.ROTATE;
3311
+ je(s), c = i.ROTATE;
3289
3312
  } else {
3290
3313
  if (e.enablePan === !1)
3291
3314
  return;
3292
- te(s), c = i.PAN;
3315
+ Be(s), c = i.PAN;
3293
3316
  }
3294
3317
  break;
3295
3318
  default:
3296
3319
  c = i.NONE;
3297
3320
  }
3298
- c !== i.NONE && e.dispatchEvent(jt);
3321
+ c !== i.NONE && e.dispatchEvent(Dt);
3299
3322
  }
3300
- function Ot(s) {
3323
+ function Qe(s) {
3301
3324
  switch (c) {
3302
3325
  case i.ROTATE:
3303
3326
  if (e.enableRotate === !1)
3304
3327
  return;
3305
- Se(s);
3328
+ ae(s);
3306
3329
  break;
3307
3330
  case i.DOLLY:
3308
3331
  if (e.enableZoom === !1)
3309
3332
  return;
3310
- it(s);
3333
+ we(s);
3311
3334
  break;
3312
3335
  case i.PAN:
3313
3336
  if (e.enablePan === !1)
3314
3337
  return;
3315
- Ve(s);
3338
+ Ye(s);
3316
3339
  break;
3317
3340
  }
3318
3341
  }
3319
- function ft(s) {
3320
- e.enabled === !1 || e.enableZoom === !1 || c !== i.NONE || (s.preventDefault(), e.dispatchEvent(jt), pe(pt(s)), e.dispatchEvent(en));
3321
- }
3322
3342
  function pt(s) {
3343
+ e.enabled === !1 || e.enableZoom === !1 || c !== i.NONE || (s.preventDefault(), e.dispatchEvent(Dt), Ge(mt(s)), e.dispatchEvent(nn));
3344
+ }
3345
+ function mt(s) {
3323
3346
  const y = s.deltaMode, T = {
3324
3347
  clientX: s.clientX,
3325
3348
  clientY: s.clientY,
@@ -3333,30 +3356,30 @@ class ai extends an {
3333
3356
  T.deltaY *= 100;
3334
3357
  break;
3335
3358
  }
3336
- return s.ctrlKey && !ve && (T.deltaY *= 10), T;
3337
- }
3338
- function mt(s) {
3339
- s.key === "Control" && (ve = !0, e.domElement.getRootNode().addEventListener("keyup", Le, { passive: !0, capture: !0 }));
3359
+ return s.ctrlKey && !le && (T.deltaY *= 10), T;
3340
3360
  }
3341
- function Le(s) {
3342
- s.key === "Control" && (ve = !1, e.domElement.getRootNode().removeEventListener("keyup", Le, { passive: !0, capture: !0 }));
3361
+ function vt(s) {
3362
+ s.key === "Control" && (le = !0, e.domElement.getRootNode().addEventListener("keyup", $e, { passive: !0, capture: !0 }));
3343
3363
  }
3344
- function rt(s) {
3345
- e.enabled === !1 || e.enablePan === !1 || p(s);
3364
+ function $e(s) {
3365
+ s.key === "Control" && (le = !1, e.domElement.getRootNode().removeEventListener("keyup", $e, { passive: !0, capture: !0 }));
3346
3366
  }
3347
3367
  function st(s) {
3348
- switch (gt(s), G.length) {
3368
+ e.enabled === !1 || e.enablePan === !1 || ue(s);
3369
+ }
3370
+ function ot(s) {
3371
+ switch (bt(s), W.length) {
3349
3372
  case 1:
3350
3373
  switch (e.touches.ONE) {
3351
- case tt.ROTATE:
3374
+ case at.ROTATE:
3352
3375
  if (e.enableRotate === !1)
3353
3376
  return;
3354
- v(s), c = i.TOUCH_ROTATE;
3377
+ p(s), c = i.TOUCH_ROTATE;
3355
3378
  break;
3356
- case tt.PAN:
3379
+ case at.PAN:
3357
3380
  if (e.enablePan === !1)
3358
3381
  return;
3359
- C(s), c = i.TOUCH_PAN;
3382
+ m(s), c = i.TOUCH_PAN;
3360
3383
  break;
3361
3384
  default:
3362
3385
  c = i.NONE;
@@ -3364,15 +3387,15 @@ class ai extends an {
3364
3387
  break;
3365
3388
  case 2:
3366
3389
  switch (e.touches.TWO) {
3367
- case tt.DOLLY_PAN:
3390
+ case at.DOLLY_PAN:
3368
3391
  if (e.enableZoom === !1 && e.enablePan === !1)
3369
3392
  return;
3370
- H(s), c = i.TOUCH_DOLLY_PAN;
3393
+ j(s), c = i.TOUCH_DOLLY_PAN;
3371
3394
  break;
3372
- case tt.DOLLY_ROTATE:
3395
+ case at.DOLLY_ROTATE:
3373
3396
  if (e.enableZoom === !1 && e.enableRotate === !1)
3374
3397
  return;
3375
- X(s), c = i.TOUCH_DOLLY_ROTATE;
3398
+ ie(s), c = i.TOUCH_DOLLY_ROTATE;
3376
3399
  break;
3377
3400
  default:
3378
3401
  c = i.NONE;
@@ -3381,61 +3404,61 @@ class ai extends an {
3381
3404
  default:
3382
3405
  c = i.NONE;
3383
3406
  }
3384
- c !== i.NONE && e.dispatchEvent(jt);
3407
+ c !== i.NONE && e.dispatchEvent(Dt);
3385
3408
  }
3386
- function vt(s) {
3387
- switch (gt(s), c) {
3409
+ function gt(s) {
3410
+ switch (bt(s), c) {
3388
3411
  case i.TOUCH_ROTATE:
3389
3412
  if (e.enableRotate === !1)
3390
3413
  return;
3391
- de(s), e.update();
3414
+ M(s), e.update();
3392
3415
  break;
3393
3416
  case i.TOUCH_PAN:
3394
3417
  if (e.enablePan === !1)
3395
3418
  return;
3396
- z(s), e.update();
3419
+ O(s), e.update();
3397
3420
  break;
3398
3421
  case i.TOUCH_DOLLY_PAN:
3399
3422
  if (e.enableZoom === !1 && e.enablePan === !1)
3400
3423
  return;
3401
- se(s), e.update();
3424
+ re(s), e.update();
3402
3425
  break;
3403
3426
  case i.TOUCH_DOLLY_ROTATE:
3404
3427
  if (e.enableZoom === !1 && e.enableRotate === !1)
3405
3428
  return;
3406
- A(s), e.update();
3429
+ se(s), e.update();
3407
3430
  break;
3408
3431
  default:
3409
3432
  c = i.NONE;
3410
3433
  }
3411
3434
  }
3412
- function Je(s) {
3435
+ function et(s) {
3413
3436
  e.enabled !== !1 && s.preventDefault();
3414
3437
  }
3415
3438
  function Mt(s) {
3416
- G.push(s.pointerId);
3439
+ W.push(s.pointerId);
3417
3440
  }
3418
3441
  function Tt(s) {
3419
- delete ee[s.pointerId];
3420
- for (let y = 0; y < G.length; y++)
3421
- if (G[y] == s.pointerId) {
3422
- G.splice(y, 1);
3442
+ delete me[s.pointerId];
3443
+ for (let y = 0; y < W.length; y++)
3444
+ if (W[y] == s.pointerId) {
3445
+ W.splice(y, 1);
3423
3446
  return;
3424
3447
  }
3425
3448
  }
3426
- function gt(s) {
3427
- let y = ee[s.pointerId];
3428
- y === void 0 && (y = new me(), ee[s.pointerId] = y), y.set(s.pageX, s.pageY);
3449
+ function bt(s) {
3450
+ let y = me[s.pointerId];
3451
+ y === void 0 && (y = new pe(), me[s.pointerId] = y), y.set(s.pageX, s.pageY);
3429
3452
  }
3430
- function Fe(s) {
3431
- const y = s.pointerId === G[0] ? G[1] : G[0];
3432
- return ee[y];
3453
+ function Ue(s) {
3454
+ const y = s.pointerId === W[0] ? W[1] : W[0];
3455
+ return me[y];
3433
3456
  }
3434
- e.domElement.addEventListener("contextmenu", Je), e.domElement.addEventListener("pointerdown", L), e.domElement.addEventListener("pointercancel", we), e.domElement.addEventListener("wheel", ft, { passive: !1 }), e.domElement.getRootNode().addEventListener("keydown", mt, { passive: !0, capture: !0 }), this.update();
3457
+ e.domElement.addEventListener("contextmenu", et), e.domElement.addEventListener("pointerdown", A), e.domElement.addEventListener("pointercancel", J), e.domElement.addEventListener("wheel", pt, { passive: !1 }), e.domElement.getRootNode().addEventListener("keydown", vt, { passive: !0, capture: !0 }), this.update();
3435
3458
  }
3436
3459
  }
3437
- const xt = (t) => {
3438
- const [n, a] = ae(t.options[t.index]), e = () => {
3460
+ const St = (t) => {
3461
+ const [n, a] = ne(t.options[t.index]), e = () => {
3439
3462
  t.onToggle(!t.open);
3440
3463
  }, i = (c) => {
3441
3464
  c !== n && (t.onSelect(c), a(c)), t.onToggle(!1);
@@ -3444,14 +3467,14 @@ const xt = (t) => {
3444
3467
  /* @__PURE__ */ l.jsx("div", { className: "dropdown-toggle", onClick: e, children: n }),
3445
3468
  t.open && /* @__PURE__ */ l.jsx("ul", { className: "dropdown-menu", children: t.options.map((c) => /* @__PURE__ */ l.jsx("li", { onClick: () => i(c), children: c }, c)) })
3446
3469
  ] });
3447
- }, Ke = pa(function(n, a) {
3448
- const [e, i] = ae(!1), c = n.options.indexOf(n.camera.name);
3470
+ }, Xe = Sa(function(n, a) {
3471
+ const [e, i] = ne(!1), c = n.options.indexOf(n.camera.name);
3449
3472
  return /* @__PURE__ */ l.jsxs("div", { className: "CameraWindow", children: [
3450
3473
  /* @__PURE__ */ l.jsx("div", { ref: a, className: "clickable", onClick: () => {
3451
3474
  e && i(!1);
3452
3475
  } }),
3453
3476
  /* @__PURE__ */ l.jsx(
3454
- xt,
3477
+ St,
3455
3478
  {
3456
3479
  index: c,
3457
3480
  open: e,
@@ -3465,14 +3488,14 @@ const xt = (t) => {
3465
3488
  )
3466
3489
  ] });
3467
3490
  });
3468
- class ii extends xn {
3491
+ class fi extends Mn {
3469
3492
  constructor(n) {
3470
3493
  super({
3471
3494
  extensions: {
3472
3495
  derivatives: !0
3473
3496
  },
3474
- glslVersion: ta,
3475
- side: sn,
3497
+ glslVersion: oa,
3498
+ side: ln,
3476
3499
  transparent: !0,
3477
3500
  uniforms: {
3478
3501
  uScale: {
@@ -3577,17 +3600,17 @@ class ii extends xn {
3577
3600
  });
3578
3601
  }
3579
3602
  }
3580
- class ri extends na {
3603
+ class pi extends wn {
3581
3604
  gridMaterial;
3582
3605
  constructor() {
3583
- const n = new ii();
3584
- super(new aa(2, 2), n), this.gridMaterial = n, this.frustumCulled = !1, this.name = "InfiniteGridHelper", this.position.y = 0.1;
3606
+ const n = new fi();
3607
+ super(new ca(2, 2), n), this.gridMaterial = n, this.frustumCulled = !1, this.name = "InfiniteGridHelper", this.position.y = 0.1;
3585
3608
  }
3586
3609
  update() {
3587
3610
  this.gridMaterial.needsUpdate = !0;
3588
3611
  }
3589
3612
  }
3590
- const si = `#include <common>
3613
+ const mi = `#include <common>
3591
3614
  #include <batching_pars_vertex>
3592
3615
  #include <uv_pars_vertex>
3593
3616
  #include <color_pars_vertex>
@@ -3617,7 +3640,7 @@ void main() {
3617
3640
  #include <logdepthbuf_vertex>
3618
3641
  #include <clipping_planes_vertex>
3619
3642
  #include <worldpos_vertex>
3620
- }`, oi = `
3643
+ }`, vi = `
3621
3644
  #include <common>
3622
3645
  #include <uv_pars_fragment>
3623
3646
  #include <clipping_planes_pars_fragment>
@@ -3626,320 +3649,347 @@ void main() {
3626
3649
  #include <clipping_planes_fragment>
3627
3650
  gl_FragColor = vec4(vec3(vUv, 0.0), 1.0);
3628
3651
  }`;
3629
- class ci extends xn {
3652
+ class gi extends Mn {
3630
3653
  constructor() {
3631
3654
  super({
3632
3655
  defines: {
3633
3656
  USE_UV: ""
3634
3657
  },
3635
- vertexShader: si,
3636
- fragmentShader: oi
3658
+ vertexShader: mi,
3659
+ fragmentShader: vi
3637
3660
  });
3638
3661
  }
3639
3662
  }
3640
- let yt = "Renderer", Be, Et = !1, nn = !1, Y = null, ce = null, Ue = null, $e = null;
3641
- function wi(t) {
3642
- const n = t.three.app.appID, a = localStorage.getItem(`${n}_mode`), e = localStorage.getItem(`${n}_tlCam`) !== null ? localStorage.getItem(`${n}_tlCam`) : "Debug", i = localStorage.getItem(`${n}_trCam`) !== null ? localStorage.getItem(`${n}_trCam`) : "Orthographic", c = localStorage.getItem(`${n}_blCam`) !== null ? localStorage.getItem(`${n}_blCam`) : "Front", h = localStorage.getItem(`${n}_brCam`) !== null ? localStorage.getItem(`${n}_brCam`) : "Top", o = xe(() => /* @__PURE__ */ new Map(), []), u = xe(() => /* @__PURE__ */ new Map(), []), d = xe(() => /* @__PURE__ */ new Map(), []), f = xe(() => new ia(), []), b = xe(() => new ra(), []), E = xe(() => new ri(), []), x = xe(() => new Vt(500), []), M = xe(() => new Vt(100), []), P = xe(() => new sa(), []), V = xe(() => new oa(), []), U = xe(() => new ci(), []), j = xe(() => new ca({
3663
+ let Et = "Renderer", Ne, xt = !1, rn = !1, G = null, ce = null, ze = null, He = null;
3664
+ function Di(t) {
3665
+ const n = t.three.app.appID, a = localStorage.getItem(`${n}_mode`), e = localStorage.getItem(`${n}_tlCam`) !== null ? localStorage.getItem(`${n}_tlCam`) : "Debug", i = localStorage.getItem(`${n}_trCam`) !== null ? localStorage.getItem(`${n}_trCam`) : "Orthographic", c = localStorage.getItem(`${n}_blCam`) !== null ? localStorage.getItem(`${n}_blCam`) : "Front", h = localStorage.getItem(`${n}_brCam`) !== null ? localStorage.getItem(`${n}_brCam`) : "Top", o = ve(() => /* @__PURE__ */ new Map(), []), d = ve(() => /* @__PURE__ */ new Map(), []), u = ve(() => /* @__PURE__ */ new Map(), []), g = ve(() => /* @__PURE__ */ new Map(), []), v = ve(() => new la(), []), E = ve(() => new da(), []), x = ve(() => new pi(), []), R = ve(() => new Vt(500), []), P = ve(() => new Vt(100), []), V = ve(() => new ua(), []), Y = ve(() => new ha(), []), I = ve(() => new gi(), []), _ = ve(() => new On({
3643
3666
  opacity: 0.33,
3644
3667
  transparent: !0,
3645
3668
  wireframe: !0
3646
3669
  }), []);
3647
- function O(p, v) {
3648
- const C = new Gt(-100, 100, 100, -100, 50, 3e3);
3649
- return C.name = p, C.position.copy(v), C.lookAt(0, 0, 0), o.set(p, C), C;
3670
+ function q(p, m) {
3671
+ const w = new Wt(-100, 100, 100, -100, 50, 3e3);
3672
+ return w.name = p, w.position.copy(m), w.lookAt(0, 0, 0), o.set(p, w), w;
3650
3673
  }
3651
- const re = [
3674
+ const ee = [
3652
3675
  "Renderer",
3653
3676
  "Depth",
3654
3677
  "Normals",
3655
3678
  "UVs",
3656
3679
  "Wireframe"
3657
- ], Q = [
3680
+ ], Se = [
3658
3681
  "Single",
3659
3682
  "Side by Side",
3660
3683
  "Stacked",
3661
3684
  "Quad"
3662
- ], Ce = fe(null), G = fe(null), ee = fe(null), ve = fe(null), ze = fe(null), Me = fe(null), [$, le] = ae(a !== null ? a : "Single"), [S, Te] = ae(null), [ge, _e] = ae(!1), [je, Re] = ae(!1), [Pe, De] = ae(!1), [, Ye] = ae(Date.now());
3663
- localStorage.setItem(`${n}_mode`, $), localStorage.setItem(`${n}_tlCam`, e), localStorage.setItem(`${n}_trCam`, i), localStorage.setItem(`${n}_blCam`, c), localStorage.setItem(`${n}_brCam`, h);
3664
- const te = (p, v) => {
3665
- const C = u.get(p.name);
3666
- C !== void 0 && C.dispose(), u.delete(p.name);
3667
- const _ = d.get(p.name);
3668
- _ !== void 0 && (f.remove(_), _.dispose()), d.delete(p.name);
3669
- const H = new ai(p, v);
3670
- switch (H.enableDamping = !0, H.dampingFactor = 0.05, p.name) {
3685
+ ], W = fe(null), me = fe(null), le = fe(null), Me = fe(null), Te = fe(null), ge = fe(null), [L, be] = ne(a !== null ? a : "Single"), [C, Ce] = ne(null), [_e, De] = ne(!1), [Re, Pe] = ne(!1), [je, Fe] = ne(!1), [, Be] = ne(Date.now());
3686
+ localStorage.setItem(`${n}_mode`, L), localStorage.setItem(`${n}_tlCam`, e), localStorage.setItem(`${n}_trCam`, i), localStorage.setItem(`${n}_blCam`, c), localStorage.setItem(`${n}_brCam`, h);
3687
+ const ae = (p, m) => {
3688
+ const w = d.get(p.name);
3689
+ w !== void 0 && w.dispose(), d.delete(p.name);
3690
+ const j = u.get(p.name);
3691
+ j !== void 0 && (v.remove(j), j.dispose()), u.delete(p.name);
3692
+ const ie = new hi(p, m);
3693
+ switch (ie.enableDamping = !0, ie.dampingFactor = 0.05, p.name) {
3671
3694
  case "Top":
3672
3695
  case "Bottom":
3673
3696
  case "Left":
3674
3697
  case "Right":
3675
3698
  case "Front":
3676
3699
  case "Back":
3677
- H.enableRotate = !1;
3700
+ ie.enableRotate = !1;
3678
3701
  break;
3679
3702
  }
3680
- if (u.set(p.name, H), p instanceof Pt) {
3681
- const X = new da(p);
3682
- d.set(p.name, X), f.add(X);
3683
- }
3684
- }, Se = (p) => {
3685
- const v = d.get(p.name);
3686
- v !== void 0 && (f.remove(v), v.dispose(), d.delete(p.name));
3687
- const C = u.get(p.name);
3688
- C !== void 0 && (C.dispose(), u.delete(p.name));
3689
- }, it = () => {
3690
- u.forEach((p, v) => {
3703
+ if (d.set(p.name, ie), p instanceof Pt) {
3704
+ const M = new ma(p);
3705
+ u.set(p.name, M), v.add(M);
3706
+ }
3707
+ }, we = (p) => {
3708
+ const m = u.get(p.name);
3709
+ m !== void 0 && (v.remove(m), m.dispose(), u.delete(p.name));
3710
+ const w = d.get(p.name);
3711
+ w !== void 0 && (w.dispose(), d.delete(p.name));
3712
+ }, Ye = () => {
3713
+ d.forEach((p, m) => {
3691
3714
  p.dispose();
3692
- const C = d.get(v);
3693
- C !== void 0 && (f.remove(C), C.dispose()), d.delete(v), u.delete(v);
3694
- }), u.clear(), d.clear();
3695
- }, Ve = () => {
3696
- switch ($) {
3715
+ const w = u.get(m);
3716
+ w !== void 0 && (v.remove(w), w.dispose()), u.delete(m), d.delete(m);
3717
+ }), d.clear(), u.clear();
3718
+ }, Ge = () => {
3719
+ switch (L) {
3697
3720
  case "Single":
3698
- te(Y, ee.current);
3721
+ ae(G, le.current);
3699
3722
  break;
3700
3723
  case "Side by Side":
3701
3724
  case "Stacked":
3702
- te(Y, ee.current), te(ce, ve.current);
3725
+ ae(G, le.current), ae(ce, Me.current);
3703
3726
  break;
3704
3727
  case "Quad":
3705
- te(Y, ee.current), te(ce, ve.current), te(Ue, ze.current), te($e, Me.current);
3728
+ ae(G, le.current), ae(ce, Me.current), ae(ze, Te.current), ae(He, ge.current);
3706
3729
  break;
3707
3730
  }
3708
3731
  };
3709
3732
  ke(() => {
3710
- const p = new la({
3711
- canvas: Ce.current,
3733
+ const p = new fa({
3734
+ canvas: W.current,
3712
3735
  stencil: !1
3713
3736
  });
3714
- p.autoClear = !1, p.shadowMap.enabled = !0, p.setPixelRatio(devicePixelRatio), p.setClearColor(0), t.three.renderer = p, Te(p);
3737
+ p.autoClear = !1, p.shadowMap.enabled = !0, p.setPixelRatio(devicePixelRatio), p.setClearColor(0), t.three.renderer = p, Ce(p);
3715
3738
  }, []), ke(() => {
3716
- f.name = "Debug Scene", b.name = "helpers", f.add(b), b.add(E), x.name = "axisHelper", b.add(x), M.name = "interactionHelper", b.add(M), M.visible = !1, O("Top", new q(0, 1e3, 0)), O("Bottom", new q(0, -1e3, 0)), O("Left", new q(-1e3, 0, 0)), O("Right", new q(1e3, 0, 0)), O("Front", new q(0, 0, 1e3)), O("Back", new q(0, 0, -1e3)), O("Orthographic", new q(1e3, 1e3, 1e3));
3739
+ v.name = "Debug Scene", E.name = "helpers", v.add(E), E.add(x), R.name = "axisHelper", E.add(R), P.name = "interactionHelper", E.add(P), P.visible = !1, q("Top", new X(0, 1e3, 0)), q("Bottom", new X(0, -1e3, 0)), q("Left", new X(-1e3, 0, 0)), q("Right", new X(1e3, 0, 0)), q("Front", new X(0, 0, 1e3)), q("Back", new X(0, 0, -1e3)), q("Orthographic", new X(1e3, 1e3, 1e3));
3717
3740
  const p = new Pt(60, 1, 50, 3e3);
3718
- p.name = "Debug", p.position.set(500, 500, 500), p.lookAt(0, 0, 0), o.set("Debug", p), Y = o.get(localStorage.getItem(`${n}_tlCam`)), ce = o.get(localStorage.getItem(`${n}_trCam`)), Ue = o.get(localStorage.getItem(`${n}_blCam`)), $e = o.get(localStorage.getItem(`${n}_brCam`));
3741
+ p.name = "Debug", p.position.set(500, 500, 500), p.lookAt(0, 0, 0), o.set("Debug", p), G = o.get(localStorage.getItem(`${n}_tlCam`)), ce = o.get(localStorage.getItem(`${n}_trCam`)), ze = o.get(localStorage.getItem(`${n}_blCam`)), He = o.get(localStorage.getItem(`${n}_brCam`));
3719
3742
  }, []), ke(() => {
3720
- const p = (_) => {
3721
- Mn(Be), f.remove(Be);
3722
- const H = t.scenes.get(_.value.name);
3723
- if (H !== void 0) {
3724
- const X = new H();
3725
- t.onSceneSet !== void 0 && t.onSceneSet(X), Be = X, t.three.scene = Be, f.add(Be), nn = !0;
3726
- }
3727
- }, v = (_) => {
3728
- const H = _.value, X = t.three.scene?.getObjectByProperty("uuid", H.uuid);
3729
- X !== void 0 && o.set(H.name, X), Ye(Date.now());
3730
- }, C = (_) => {
3731
- o.delete(_.value.name), Ye(Date.now());
3743
+ const p = () => {
3744
+ g.forEach((M) => {
3745
+ E.remove(M), M.dispose();
3746
+ }), g.clear();
3747
+ }, m = () => {
3748
+ Ne.traverse((M) => {
3749
+ if (M.type.search("Light") > -1) {
3750
+ let O;
3751
+ switch (M.type) {
3752
+ case "DirectionalLight":
3753
+ O = new ya(M, 100), O.name = `${M.name}Helper`, g.set(M.name, O), E.add(O);
3754
+ break;
3755
+ case "HemisphereLight":
3756
+ O = new ba(M, 100), O.name = `${M.name}Helper`, g.set(M.name, O), E.add(O);
3757
+ break;
3758
+ case "RectAreaLight":
3759
+ O = new di(M, 100), O.name = `${M.name}Helper`, g.set(M.name, O), E.add(O);
3760
+ break;
3761
+ case "PointLight":
3762
+ O = new ga(M, 100), O.name = `${M.name}Helper`, g.set(M.name, O), E.add(O);
3763
+ break;
3764
+ case "SpotLight":
3765
+ O = new va(M, 100), O.name = `${M.name}Helper`, g.set(M.name, O), E.add(O);
3766
+ break;
3767
+ }
3768
+ }
3769
+ });
3770
+ }, w = (M) => {
3771
+ p(), An(Ne), v.remove(Ne);
3772
+ const O = t.scenes.get(M.value.name);
3773
+ if (O !== void 0) {
3774
+ const N = new O();
3775
+ t.onSceneSet !== void 0 && t.onSceneSet(N), Ne = N, t.three.scene = Ne, v.add(Ne), rn = !0, m();
3776
+ }
3777
+ }, j = (M) => {
3778
+ const O = M.value, N = t.three.scene?.getObjectByProperty("uuid", O.uuid);
3779
+ N !== void 0 && o.set(O.name, N), Be(Date.now());
3780
+ }, ie = (M) => {
3781
+ o.delete(M.value.name), Be(Date.now());
3732
3782
  };
3733
- return D.addEventListener(I.SET_SCENE, p), D.addEventListener(I.ADD_CAMERA, v), D.addEventListener(I.REMOVE_CAMERA, C), () => {
3734
- D.removeEventListener(I.SET_SCENE, p), D.removeEventListener(I.ADD_CAMERA, v), D.removeEventListener(I.REMOVE_CAMERA, C);
3783
+ return F.addEventListener(B.SET_SCENE, w), F.addEventListener(B.ADD_CAMERA, j), F.addEventListener(B.REMOVE_CAMERA, ie), () => {
3784
+ F.removeEventListener(B.SET_SCENE, w), F.removeEventListener(B.ADD_CAMERA, j), F.removeEventListener(B.REMOVE_CAMERA, ie);
3735
3785
  };
3736
3786
  }, []), ke(() => {
3737
- if (S === null)
3787
+ if (C === null)
3738
3788
  return;
3739
- let p = window.innerWidth, v = window.innerHeight, C = Math.floor(p / 2), _ = Math.floor(v / 2), H = -1;
3740
- const X = () => {
3741
- p = window.innerWidth - 300, v = window.innerHeight, C = Math.floor(p / 2), _ = Math.floor(v / 2), S.setSize(p, v);
3742
- let A = p, L = v;
3743
- switch ($) {
3789
+ let p = window.innerWidth, m = window.innerHeight, w = Math.floor(p / 2), j = Math.floor(m / 2), ie = -1;
3790
+ const M = () => {
3791
+ p = window.innerWidth - 300, m = window.innerHeight, w = Math.floor(p / 2), j = Math.floor(m / 2), C.setSize(p, m);
3792
+ let A = p, z = m;
3793
+ switch (L) {
3744
3794
  case "Side by Side":
3745
- A = C, L = v;
3795
+ A = w, z = m;
3746
3796
  break;
3747
3797
  case "Stacked":
3748
- A = p, L = _;
3798
+ A = p, z = j;
3749
3799
  break;
3750
3800
  case "Quad":
3751
- A = C, L = _;
3801
+ A = w, z = j;
3752
3802
  break;
3753
3803
  }
3754
- o.forEach((ie) => {
3755
- ie instanceof Gt ? (ie.left = A / -2, ie.right = A / 2, ie.top = L / 2, ie.bottom = L / -2, ie.updateProjectionMatrix()) : ie instanceof Pt && (ie.aspect = A / L, ie.updateProjectionMatrix(), d.get(ie.name)?.update());
3804
+ o.forEach((J) => {
3805
+ J instanceof Wt ? (J.left = A / -2, J.right = A / 2, J.top = z / 2, J.bottom = z / -2, J.updateProjectionMatrix()) : J instanceof Pt && (J.aspect = A / z, J.updateProjectionMatrix(), u.get(J.name)?.update());
3756
3806
  });
3757
- }, de = () => {
3758
- S.setViewport(0, 0, p, v), S.setScissor(0, 0, p, v), S.render(f, Y);
3759
- }, z = () => {
3760
- if ($ === "Side by Side")
3761
- S.setViewport(0, 0, C, v), S.setScissor(0, 0, C, v), S.render(f, Y), S.setViewport(C, 0, C, v), S.setScissor(C, 0, C, v), S.render(f, ce);
3807
+ }, O = () => {
3808
+ C.setViewport(0, 0, p, m), C.setScissor(0, 0, p, m), C.render(v, G);
3809
+ }, N = () => {
3810
+ if (L === "Side by Side")
3811
+ C.setViewport(0, 0, w, m), C.setScissor(0, 0, w, m), C.render(v, G), C.setViewport(w, 0, w, m), C.setScissor(w, 0, w, m), C.render(v, ce);
3762
3812
  else {
3763
- const A = v - _;
3764
- S.setViewport(0, A, p, _), S.setScissor(0, A, p, _), S.render(f, Y), S.setViewport(0, 0, p, _), S.setScissor(0, 0, p, _), S.render(f, ce);
3813
+ const A = m - j;
3814
+ C.setViewport(0, A, p, j), C.setScissor(0, A, p, j), C.render(v, G), C.setViewport(0, 0, p, j), C.setScissor(0, 0, p, j), C.render(v, ce);
3765
3815
  }
3766
- }, Z = () => {
3767
- let A = 0, L = 0;
3768
- L = v - _, A = 0, S.setViewport(A, L, C, _), S.setScissor(A, L, C, _), S.render(f, Y), A = C, S.setViewport(A, L, C, _), S.setScissor(A, L, C, _), S.render(f, ce), L = 0, A = 0, S.setViewport(A, L, C, _), S.setScissor(A, L, C, _), S.render(f, Ue), A = C, S.setViewport(A, L, C, _), S.setScissor(A, L, C, _), S.render(f, $e);
3816
+ }, re = () => {
3817
+ let A = 0, z = 0;
3818
+ z = m - j, A = 0, C.setViewport(A, z, w, j), C.setScissor(A, z, w, j), C.render(v, G), A = w, C.setViewport(A, z, w, j), C.setScissor(A, z, w, j), C.render(v, ce), z = 0, A = 0, C.setViewport(A, z, w, j), C.setScissor(A, z, w, j), C.render(v, ze), A = w, C.setViewport(A, z, w, j), C.setScissor(A, z, w, j), C.render(v, He);
3769
3819
  }, se = () => {
3770
- switch (u.forEach((A) => {
3820
+ switch (d.forEach((A) => {
3771
3821
  A.update();
3772
- }), t.onSceneUpdate !== void 0 && nn && t.onSceneUpdate(Be), S.clear(), $) {
3822
+ }), t.onSceneUpdate !== void 0 && rn && t.onSceneUpdate(Ne), C.clear(), L) {
3773
3823
  case "Single":
3774
- de();
3824
+ O();
3775
3825
  break;
3776
3826
  case "Side by Side":
3777
3827
  case "Stacked":
3778
- z();
3828
+ N();
3779
3829
  break;
3780
3830
  case "Quad":
3781
- Z();
3831
+ re();
3782
3832
  break;
3783
3833
  }
3784
- H = requestAnimationFrame(se);
3834
+ ie = requestAnimationFrame(se);
3785
3835
  };
3786
- return Ve(), window.addEventListener("resize", X), X(), se(), () => {
3787
- window.removeEventListener("resize", X), cancelAnimationFrame(H), H = -1;
3836
+ return Ge(), window.addEventListener("resize", M), M(), se(), () => {
3837
+ window.removeEventListener("resize", M), cancelAnimationFrame(ie), ie = -1;
3788
3838
  };
3789
- }, [$, S]), ke(() => {
3790
- if (S !== null) {
3791
- const p = new ua(), v = new me(), C = (de, z, Z, se) => {
3792
- switch ($) {
3839
+ }, [L, C]), ke(() => {
3840
+ if (C !== null) {
3841
+ const p = new pa(), m = new pe(), w = (O, N, re, se) => {
3842
+ switch (L) {
3793
3843
  case "Quad":
3794
- de < Z ? z < se ? p.setFromCamera(v, Y) : p.setFromCamera(v, Ue) : z < se ? p.setFromCamera(v, ce) : p.setFromCamera(v, $e);
3844
+ O < re ? N < se ? p.setFromCamera(m, G) : p.setFromCamera(m, ze) : N < se ? p.setFromCamera(m, ce) : p.setFromCamera(m, He);
3795
3845
  break;
3796
3846
  case "Side by Side":
3797
- de < Z ? p.setFromCamera(v, Y) : p.setFromCamera(v, ce);
3847
+ O < re ? p.setFromCamera(m, G) : p.setFromCamera(m, ce);
3798
3848
  break;
3799
3849
  case "Single":
3800
- p.setFromCamera(v, Y);
3850
+ p.setFromCamera(m, G);
3801
3851
  break;
3802
3852
  case "Stacked":
3803
- z < se ? p.setFromCamera(v, Y) : p.setFromCamera(v, ce);
3853
+ N < se ? p.setFromCamera(m, G) : p.setFromCamera(m, ce);
3804
3854
  break;
3805
3855
  }
3806
- }, _ = (de) => {
3807
- if (!Et)
3856
+ }, j = (O) => {
3857
+ if (!xt)
3808
3858
  return;
3809
- const z = new me();
3810
- S.getSize(z);
3811
- const Z = Math.min(de.clientX, z.x), se = Math.min(de.clientY, z.y);
3812
- v.x = at(Z, 0, z.x, -1, 1), v.y = at(se, 0, z.y, 1, -1);
3813
- const A = z.x / 2, L = z.y / 2, ie = () => {
3814
- Z < A ? v.x = at(Z, 0, A, -1, 1) : v.x = at(Z, A, z.x, -1, 1);
3815
- }, we = () => {
3816
- se < L ? v.y = at(se, 0, L, 1, -1) : v.y = at(se, L, z.y, 1, -1);
3859
+ const N = new pe();
3860
+ C.getSize(N);
3861
+ const re = Math.min(O.clientX, N.x), se = Math.min(O.clientY, N.y);
3862
+ m.x = rt(re, 0, N.x, -1, 1), m.y = rt(se, 0, N.y, 1, -1);
3863
+ const A = N.x / 2, z = N.y / 2, J = () => {
3864
+ re < A ? m.x = rt(re, 0, A, -1, 1) : m.x = rt(re, A, N.x, -1, 1);
3865
+ }, Ie = () => {
3866
+ se < z ? m.y = rt(se, 0, z, 1, -1) : m.y = rt(se, z, N.y, 1, -1);
3817
3867
  };
3818
- switch ($) {
3868
+ switch (L) {
3819
3869
  case "Quad":
3820
- ie(), we();
3870
+ J(), Ie();
3821
3871
  break;
3822
3872
  case "Side by Side":
3823
- ie();
3873
+ J();
3824
3874
  break;
3825
3875
  case "Stacked":
3826
- we(), we();
3876
+ Ie(), Ie();
3827
3877
  break;
3828
3878
  }
3829
- C(Z, se, A, L);
3830
- const Ne = p.intersectObjects(Be.children);
3831
- Ne.length > 0 && M.position.copy(Ne[0].point);
3832
- }, H = (de) => {
3833
- if (!Et)
3879
+ w(re, se, A, z);
3880
+ const Qe = p.intersectObjects(Ne.children);
3881
+ Qe.length > 0 && P.position.copy(Qe[0].point);
3882
+ }, ie = (O) => {
3883
+ if (!xt)
3834
3884
  return;
3835
- const z = new me();
3836
- if (S.getSize(z), de.clientX >= z.x)
3885
+ const N = new pe();
3886
+ if (C.getSize(N), O.clientX >= N.x)
3837
3887
  return;
3838
- _(de);
3839
- const Z = p.intersectObjects(Be.children);
3840
- Z.length > 0 && t.three.getObject(Z[0].object.uuid);
3841
- }, X = G.current;
3842
- return X.addEventListener("mousemove", _, !1), X.addEventListener("click", H, !1), () => {
3843
- X.removeEventListener("mousemove", _), X.removeEventListener("click", H);
3888
+ j(O);
3889
+ const re = p.intersectObjects(Ne.children);
3890
+ re.length > 0 && t.three.getObject(re[0].object.uuid);
3891
+ }, M = me.current;
3892
+ return M.addEventListener("mousemove", j, !1), M.addEventListener("click", ie, !1), () => {
3893
+ M.removeEventListener("mousemove", j), M.removeEventListener("click", ie);
3844
3894
  };
3845
3895
  }
3846
- }, [$, S]);
3847
- const pe = [];
3848
- return o.forEach((p, v) => {
3849
- pe.push(v);
3896
+ }, [L, C]);
3897
+ const ue = [];
3898
+ return o.forEach((p, m) => {
3899
+ ue.push(m);
3850
3900
  }), /* @__PURE__ */ l.jsxs("div", { className: "multiview", children: [
3851
- /* @__PURE__ */ l.jsx("canvas", { ref: Ce }),
3852
- S !== null && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
3853
- /* @__PURE__ */ l.jsxs("div", { className: `cameras ${$ === "Single" || $ === "Stacked" ? "single" : ""}`, ref: G, children: [
3854
- $ === "Single" && /* @__PURE__ */ l.jsx(l.Fragment, { children: /* @__PURE__ */ l.jsx(Ke, { camera: Y, options: pe, ref: ee, onSelect: (p) => {
3855
- u.get(Y.name)?.dispose();
3856
- const v = o.get(p);
3857
- v !== void 0 && (Se(Y), Y = v, localStorage.setItem(`${n}_tlCam`, v.name), te(v, ee.current));
3901
+ /* @__PURE__ */ l.jsx("canvas", { ref: W }),
3902
+ C !== null && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
3903
+ /* @__PURE__ */ l.jsxs("div", { className: `cameras ${L === "Single" || L === "Stacked" ? "single" : ""}`, ref: me, children: [
3904
+ L === "Single" && /* @__PURE__ */ l.jsx(l.Fragment, { children: /* @__PURE__ */ l.jsx(Xe, { camera: G, options: ue, ref: le, onSelect: (p) => {
3905
+ d.get(G.name)?.dispose();
3906
+ const m = o.get(p);
3907
+ m !== void 0 && (we(G), G = m, localStorage.setItem(`${n}_tlCam`, m.name), ae(m, le.current));
3858
3908
  } }) }),
3859
- ($ === "Side by Side" || $ === "Stacked") && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
3860
- /* @__PURE__ */ l.jsx(Ke, { camera: Y, options: pe, ref: ee, onSelect: (p) => {
3861
- u.get(Y.name)?.dispose();
3862
- const v = o.get(p);
3863
- v !== void 0 && (Se(Y), Y = v, localStorage.setItem(`${n}_tlCam`, v.name), te(v, ee.current));
3909
+ (L === "Side by Side" || L === "Stacked") && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
3910
+ /* @__PURE__ */ l.jsx(Xe, { camera: G, options: ue, ref: le, onSelect: (p) => {
3911
+ d.get(G.name)?.dispose();
3912
+ const m = o.get(p);
3913
+ m !== void 0 && (we(G), G = m, localStorage.setItem(`${n}_tlCam`, m.name), ae(m, le.current));
3864
3914
  } }),
3865
- /* @__PURE__ */ l.jsx(Ke, { camera: ce, options: pe, ref: ve, onSelect: (p) => {
3866
- u.get(ce.name)?.dispose();
3867
- const v = o.get(p);
3868
- v !== void 0 && (Se(ce), ce = v, localStorage.setItem(`${n}_trCam`, v.name), te(v, ve.current));
3915
+ /* @__PURE__ */ l.jsx(Xe, { camera: ce, options: ue, ref: Me, onSelect: (p) => {
3916
+ d.get(ce.name)?.dispose();
3917
+ const m = o.get(p);
3918
+ m !== void 0 && (we(ce), ce = m, localStorage.setItem(`${n}_trCam`, m.name), ae(m, Me.current));
3869
3919
  } })
3870
3920
  ] }),
3871
- $ === "Quad" && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
3872
- /* @__PURE__ */ l.jsx(Ke, { camera: Y, options: pe, ref: ee, onSelect: (p) => {
3873
- u.get(Y.name)?.dispose();
3874
- const v = o.get(p);
3875
- v !== void 0 && (Se(Y), Y = v, localStorage.setItem(`${n}_tlCam`, v.name), te(v, ee.current));
3921
+ L === "Quad" && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
3922
+ /* @__PURE__ */ l.jsx(Xe, { camera: G, options: ue, ref: le, onSelect: (p) => {
3923
+ d.get(G.name)?.dispose();
3924
+ const m = o.get(p);
3925
+ m !== void 0 && (we(G), G = m, localStorage.setItem(`${n}_tlCam`, m.name), ae(m, le.current));
3876
3926
  } }),
3877
- /* @__PURE__ */ l.jsx(Ke, { camera: ce, options: pe, ref: ve, onSelect: (p) => {
3878
- u.get(ce.name)?.dispose();
3879
- const v = o.get(p);
3880
- v !== void 0 && (Se(ce), ce = v, localStorage.setItem(`${n}_trCam`, v.name), te(v, ve.current));
3927
+ /* @__PURE__ */ l.jsx(Xe, { camera: ce, options: ue, ref: Me, onSelect: (p) => {
3928
+ d.get(ce.name)?.dispose();
3929
+ const m = o.get(p);
3930
+ m !== void 0 && (we(ce), ce = m, localStorage.setItem(`${n}_trCam`, m.name), ae(m, Me.current));
3881
3931
  } }),
3882
- /* @__PURE__ */ l.jsx(Ke, { camera: Ue, options: pe, ref: ze, onSelect: (p) => {
3883
- u.get(Ue.name)?.dispose();
3884
- const v = o.get(p);
3885
- v !== void 0 && (Se(Ue), Ue = v, localStorage.setItem(`${n}_blCam`, v.name), te(v, ze.current));
3932
+ /* @__PURE__ */ l.jsx(Xe, { camera: ze, options: ue, ref: Te, onSelect: (p) => {
3933
+ d.get(ze.name)?.dispose();
3934
+ const m = o.get(p);
3935
+ m !== void 0 && (we(ze), ze = m, localStorage.setItem(`${n}_blCam`, m.name), ae(m, Te.current));
3886
3936
  } }),
3887
- /* @__PURE__ */ l.jsx(Ke, { camera: $e, options: pe, ref: Me, onSelect: (p) => {
3888
- u.get($e.name)?.dispose();
3889
- const v = o.get(p);
3890
- v !== void 0 && (Se($e), $e = v, localStorage.setItem(`${n}_brCam`, v.name), te(v, Me.current));
3937
+ /* @__PURE__ */ l.jsx(Xe, { camera: He, options: ue, ref: ge, onSelect: (p) => {
3938
+ d.get(He.name)?.dispose();
3939
+ const m = o.get(p);
3940
+ m !== void 0 && (we(He), He = m, localStorage.setItem(`${n}_brCam`, m.name), ae(m, ge.current));
3891
3941
  } })
3892
3942
  ] })
3893
3943
  ] }),
3894
3944
  /* @__PURE__ */ l.jsxs("div", { className: "settings", children: [
3895
3945
  /* @__PURE__ */ l.jsx(
3896
- xt,
3946
+ St,
3897
3947
  {
3898
- index: Q.indexOf($),
3899
- options: Q,
3948
+ index: Se.indexOf(L),
3949
+ options: Se,
3900
3950
  onSelect: (p) => {
3901
- p !== $ && (it(), le(p));
3951
+ p !== L && (Ye(), be(p));
3902
3952
  },
3903
- open: ge,
3953
+ open: _e,
3904
3954
  onToggle: (p) => {
3905
- _e(p), je && Re(!1), Pe && De(!1);
3955
+ De(p), Re && Pe(!1), je && Fe(!1);
3906
3956
  }
3907
3957
  }
3908
3958
  ),
3909
3959
  /* @__PURE__ */ l.jsx(
3910
- xt,
3960
+ St,
3911
3961
  {
3912
- index: re.indexOf(yt),
3913
- options: re,
3962
+ index: ee.indexOf(Et),
3963
+ options: ee,
3914
3964
  onSelect: (p) => {
3915
- if (p !== yt)
3916
- switch (yt = p, yt) {
3965
+ if (p !== Et)
3966
+ switch (Et = p, Et) {
3917
3967
  case "Depth":
3918
- f.overrideMaterial = P;
3968
+ v.overrideMaterial = V;
3919
3969
  break;
3920
3970
  case "Normals":
3921
- f.overrideMaterial = V;
3971
+ v.overrideMaterial = Y;
3922
3972
  break;
3923
3973
  default:
3924
3974
  case "Renderer":
3925
- f.overrideMaterial = null;
3975
+ v.overrideMaterial = null;
3926
3976
  break;
3927
3977
  case "Wireframe":
3928
- f.overrideMaterial = j;
3978
+ v.overrideMaterial = _;
3929
3979
  break;
3930
3980
  case "UVs":
3931
- f.overrideMaterial = U;
3981
+ v.overrideMaterial = I;
3932
3982
  break;
3933
3983
  }
3934
3984
  },
3935
- open: je,
3985
+ open: Re,
3936
3986
  onToggle: (p) => {
3937
- ge && _e(!1), Re(p), Pe && De(!1);
3987
+ _e && De(!1), Pe(p), je && Fe(!1);
3938
3988
  }
3939
3989
  }
3940
3990
  ),
3941
3991
  /* @__PURE__ */ l.jsx(
3942
- xt,
3992
+ St,
3943
3993
  {
3944
3994
  index: 0,
3945
3995
  options: [
@@ -3947,11 +3997,11 @@ function wi(t) {
3947
3997
  "Selection Mode"
3948
3998
  ],
3949
3999
  onSelect: (p) => {
3950
- Et = p === "Selection Mode", M.visible = Et;
4000
+ xt = p === "Selection Mode", P.visible = xt;
3951
4001
  },
3952
- open: Pe,
4002
+ open: je,
3953
4003
  onToggle: (p) => {
3954
- ge && _e(!1), je && Re(!1), De(p);
4004
+ _e && De(!1), Re && Pe(!1), Fe(p);
3955
4005
  }
3956
4006
  }
3957
4007
  )
@@ -3959,7 +4009,7 @@ function wi(t) {
3959
4009
  ] })
3960
4010
  ] });
3961
4011
  }
3962
- function Oi(t) {
4012
+ function ji(t) {
3963
4013
  return /* @__PURE__ */ l.jsxs("div", { className: "editor", ref: t.ref, style: t.style, children: [
3964
4014
  /* @__PURE__ */ l.jsx("div", { className: "header", children: t.header }),
3965
4015
  t.children,
@@ -3968,43 +4018,43 @@ function Oi(t) {
3968
4018
  }
3969
4019
  export {
3970
4020
  Ft as Accordion,
3971
- vi as Application,
3972
- wt as BaseRemote,
3973
- Rn as ChildObject,
3974
- ka as ContainerObject,
3975
- Ra as Draggable,
3976
- _a as DraggableItem,
3977
- Pa as Dropdown,
3978
- Aa as DropdownItem,
3979
- Oi as Editor,
3980
- ti as Inspector,
3981
- wi as MultiView,
3982
- _n as NavButton,
3983
- gi as RemoteComponents,
3984
- xi as RemoteController,
3985
- Lt as RemoteTheatre,
3986
- yi as RemoteThree,
3987
- Ei as RemoteTweakpane,
3988
- Si as SceneInspector,
3989
- Ci as SidePanel,
3990
- I as ToolEvents,
3991
- St as capitalize,
3992
- Xe as clamp,
3993
- ga as colorToHex,
3994
- D as debugDispatcher,
3995
- fi as defaultTheatreCallback,
3996
- Mn as dispose,
3997
- ya as disposeMaterial,
3998
- mi as disposeTexture,
3999
- pi as distance,
4000
- On as hierarchyUUID,
4001
- va as isColor,
4002
- Wt as mix,
4003
- wn as noop,
4004
- Ht as normalize,
4005
- ma as randomID,
4006
- ba as resetThreeObjects,
4007
- ht as round,
4008
- bi as theatreEditorApp,
4009
- Dt as totalThreeObjects
4021
+ Oi as Application,
4022
+ Ot as BaseRemote,
4023
+ jn as ChildObject,
4024
+ $a as ContainerObject,
4025
+ Na as Draggable,
4026
+ La as DraggableItem,
4027
+ Fa as Dropdown,
4028
+ Ba as DropdownItem,
4029
+ ji as Editor,
4030
+ li as Inspector,
4031
+ Di as MultiView,
4032
+ Dn as NavButton,
4033
+ Mi as RemoteComponents,
4034
+ Pi as RemoteController,
4035
+ Nt as RemoteTheatre,
4036
+ _i as RemoteThree,
4037
+ Ri as RemoteTweakpane,
4038
+ ki as SceneInspector,
4039
+ Ai as SidePanel,
4040
+ B as ToolEvents,
4041
+ wt as capitalize,
4042
+ Ze as clamp,
4043
+ Oa as colorToHex,
4044
+ F as debugDispatcher,
4045
+ Si as defaultTheatreCallback,
4046
+ An as dispose,
4047
+ Ta as disposeMaterial,
4048
+ wi as disposeTexture,
4049
+ Ci as distance,
4050
+ Pn as hierarchyUUID,
4051
+ wa as isColor,
4052
+ Kt as mix,
4053
+ Rn as noop,
4054
+ qt as normalize,
4055
+ Ca as randomID,
4056
+ Ma as resetThreeObjects,
4057
+ ft as round,
4058
+ Ti as theatreEditorApp,
4059
+ jt as totalThreeObjects
4010
4060
  };