@tomorrowevening/hermes 0.0.57 → 0.0.59

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