@tomorrowevening/hermes 0.0.44 → 0.0.45

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,66 +1,65 @@
1
- import { PositionalAudio as jn, EventDispatcher as tn, Texture as nn, CubeTexture as Dn, RepeatWrapping as Ut, Color as St, FrontSide as In, BackSide as Ln, DoubleSide as an, NoBlending as Nn, NormalBlending as Fn, AdditiveBlending as Bn, SubtractiveBlending as Un, MultiplyBlending as $n, CustomBlending as zn, AddEquation as Yn, SubtractEquation as Gn, ReverseSubtractEquation as Vn, MinEquation as Hn, MaxEquation as Wn, ZeroFactor as rn, OneFactor as sn, SrcColorFactor as on, OneMinusSrcColorFactor as cn, SrcAlphaFactor as ln, OneMinusSrcAlphaFactor as un, DstAlphaFactor as dn, OneMinusDstAlphaFactor as fn, DstColorFactor as hn, OneMinusDstColorFactor as pn, SrcAlphaSaturateFactor as qn, ConstantColorFactor as mn, OneMinusConstantColorFactor as vn, ConstantAlphaFactor as gn, OneMinusConstantAlphaFactor as bn, Matrix4 as Kn, Vector3 as W, Euler as Xn, Ray as Zn, Plane as Jn, MathUtils as Qn, MOUSE as Xe, TOUCH as Ze, Quaternion as $t, Spherical as zt, Vector2 as he, ShaderMaterial as yn, GLSL3 as ea, Mesh as ta, PlaneGeometry as na, Scene as aa, Group as ia, AxesHelper as Yt, MeshDepthMaterial as ra, MeshNormalMaterial as sa, MeshBasicMaterial as oa, PerspectiveCamera as Rt, WebGLRenderer as ca, Raycaster as la, OrthographicCamera as Gt, CameraHelper as ua } from "three";
2
- import Vt from "@theatre/studio";
3
- import { Pane as da } from "tweakpane";
4
- import * as fa from "@tweakpane/plugin-essentials";
5
- import En, { useState as oe, useRef as _e, useEffect as Re, forwardRef as ha, useMemo as Ce } from "react";
6
- import { Reorder as Cn } from "framer-motion";
1
+ import { EventDispatcher as en, Texture as tn, CubeTexture as kn, RepeatWrapping as Ut, Color as St, FrontSide as jn, BackSide as Dn, DoubleSide as nn, NoBlending as In, NormalBlending as Nn, AdditiveBlending as Ln, SubtractiveBlending as Fn, MultiplyBlending as Bn, CustomBlending as Un, AddEquation as $n, SubtractEquation as zn, ReverseSubtractEquation as Yn, MinEquation as Gn, MaxEquation as Vn, ZeroFactor as an, OneFactor as rn, SrcColorFactor as sn, OneMinusSrcColorFactor as on, SrcAlphaFactor as cn, OneMinusSrcAlphaFactor as ln, DstAlphaFactor as dn, OneMinusDstAlphaFactor as un, DstColorFactor as hn, OneMinusDstColorFactor as fn, SrcAlphaSaturateFactor as Hn, ConstantColorFactor as pn, OneMinusConstantColorFactor as mn, ConstantAlphaFactor as vn, OneMinusConstantAlphaFactor as gn, Matrix4 as Wn, Vector3 as W, Euler as qn, Ray as Kn, Plane as Xn, MathUtils as Zn, MOUSE as Xe, TOUCH as Ze, Quaternion as $t, Spherical as zt, Vector2 as fe, ShaderMaterial as bn, GLSL3 as Jn, Mesh as Qn, PlaneGeometry as ea, Scene as ta, Group as na, AxesHelper as Yt, MeshDepthMaterial as aa, MeshNormalMaterial as ia, MeshBasicMaterial as ra, PerspectiveCamera as Rt, WebGLRenderer as sa, Raycaster as oa, OrthographicCamera as Gt, CameraHelper as ca } from "three";
2
+ import { Pane as la } from "tweakpane";
3
+ import * as da from "@tweakpane/plugin-essentials";
4
+ import yn, { useState as oe, useRef as Re, useEffect as _e, forwardRef as ua, useMemo as Se } from "react";
5
+ import { Reorder as En } from "framer-motion";
7
6
  const Sn = () => {
8
- }, ui = () => {
7
+ }, si = () => {
9
8
  };
10
- function ut(e) {
11
- return e.substring(0, 1).toUpperCase() + e.substring(1);
9
+ function lt(t) {
10
+ return t.substring(0, 1).toUpperCase() + t.substring(1);
12
11
  }
13
- function di(e, n, a) {
14
- return Math.min(n, Math.max(e, a));
12
+ function oi(t, n, a) {
13
+ return Math.min(n, Math.max(t, a));
15
14
  }
16
- function fi(e, n) {
17
- const a = e - n;
15
+ function ci(t, n) {
16
+ const a = t - n;
18
17
  return Math.sqrt(a * a);
19
18
  }
20
- function pa() {
19
+ function ha() {
21
20
  return Math.round(Math.random() * 1e6).toString();
22
21
  }
23
- function ma(e) {
24
- return e.r !== void 0 && e.g !== void 0 && e.b !== void 0;
22
+ function fa(t) {
23
+ return t.r !== void 0 && t.g !== void 0 && t.b !== void 0;
25
24
  }
26
- function va(e) {
27
- const n = Math.round(e.r * 255), a = Math.round(e.g * 255), t = Math.round(e.b * 255), r = (u) => {
28
- const d = u.toString(16);
29
- return d.length === 1 ? "0" + d : d;
30
- }, c = r(n), p = r(a), o = r(t);
31
- return "#" + c + p + o;
25
+ function pa(t) {
26
+ const n = Math.round(t.r * 255), a = Math.round(t.g * 255), e = Math.round(t.b * 255), i = (d) => {
27
+ const u = d.toString(16);
28
+ return u.length === 1 ? "0" + u : u;
29
+ }, o = i(n), h = i(a), c = i(e);
30
+ return "#" + o + h + c;
32
31
  }
33
- function At(e, n = 1) {
34
- return Number(e.toFixed(n));
32
+ function _t(t, n = 1) {
33
+ return Number(t.toFixed(n));
35
34
  }
36
- let Dt = 0;
37
- const ga = () => {
38
- Dt = 0;
39
- }, xn = (e) => {
40
- if (!e)
35
+ let jt = 0;
36
+ const ma = () => {
37
+ jt = 0;
38
+ }, Cn = (t) => {
39
+ if (!t)
41
40
  return;
42
- let n = e.name.replace(" ", "");
43
- n.length === 0 && (n = `obj_${Dt}`, Dt++), e.parent !== null && (n = `${e.parent.uuid}.${n}`), e.uuid = n, e.children.forEach((a) => {
44
- xn(a);
41
+ let n = t.name.replace(" ", "");
42
+ n.length === 0 && (n = `obj_${jt}`, jt++), t.parent !== null && (n = `${t.parent.uuid}.${n}`), t.uuid = n, t.children.forEach((a) => {
43
+ Cn(a);
45
44
  });
46
- }, hi = (e) => {
47
- e?.dispose();
48
- }, ba = (e) => {
49
- e && (Array.isArray(e) ? e.forEach((n) => n.dispose()) : e.dispose());
50
- }, wn = (e) => {
51
- if (e) {
52
- for (; e.children.length > 0; ) {
53
- const n = e.children[0];
54
- n instanceof jn ? (n.pause(), n.parent && n.parent.remove(n)) : wn(n);
55
- }
56
- if (e.parent && e.parent.remove(e), e.isMesh) {
57
- const n = e;
58
- n.geometry?.dispose(), ba(n.material);
59
- }
60
- e.dispose !== void 0 && e.dispose();
45
+ }, li = (t) => {
46
+ t?.dispose();
47
+ }, va = (t) => {
48
+ t && (Array.isArray(t) ? t.forEach((n) => n.dispose()) : t.dispose());
49
+ }, xn = (t) => {
50
+ if (t) {
51
+ for (; t.children.length > 0; ) {
52
+ const n = t.children[0];
53
+ n.type === "Audio" ? (n.pause(), n.parent && n.parent.remove(n)) : xn(n);
54
+ }
55
+ if (t.parent && t.parent.remove(t), t.isMesh) {
56
+ const n = t;
57
+ n.geometry?.dispose(), va(n.material);
58
+ }
59
+ t.dispose !== void 0 && t.dispose();
61
60
  }
62
61
  };
63
- class pi {
62
+ class di {
64
63
  components = /* @__PURE__ */ new Map();
65
64
  listen;
66
65
  // Protected
@@ -70,8 +69,8 @@ class pi {
70
69
  _mode = "app";
71
70
  _connected = !1;
72
71
  _useBC = !1;
73
- constructor(n, a, t = !0) {
74
- this._debugEnabled = a, a && (this._useBC = t, t ? (this._broadcastChannel = new BroadcastChannel(n), this._broadcastChannel.addEventListener("message", this.messageHandler)) : (this._webSocket = new WebSocket(n), this._webSocket.addEventListener("open", this.openHandler), this._webSocket.addEventListener("close", this.closeHandler), this._webSocket.addEventListener("message", this.messageHandler)));
72
+ constructor(n, a, e = !0) {
73
+ this._debugEnabled = a, a && (this._useBC = e, e ? (this._broadcastChannel = new BroadcastChannel(n), this._broadcastChannel.addEventListener("message", this.messageHandler)) : (this._webSocket = new WebSocket(n), this._webSocket.addEventListener("open", this.openHandler), this._webSocket.addEventListener("close", this.closeHandler), this._webSocket.addEventListener("message", this.messageHandler)));
75
74
  }
76
75
  addComponent(n, a) {
77
76
  this.components.set(n, a);
@@ -114,7 +113,7 @@ class pi {
114
113
  n && (this._mode = "editor");
115
114
  }
116
115
  }
117
- const P = new tn(), k = {
116
+ const P = new en(), k = {
118
117
  CUSTOM: "ToolEvents::custom",
119
118
  // Components
120
119
  SELECT_DROPDOWN: "ToolEvents::selectDropdown",
@@ -130,15 +129,19 @@ const P = new tn(), k = {
130
129
  ADD_CAMERA: "ToolEvents::addCamera",
131
130
  REMOVE_CAMERA: "ToolEvents::removeCamera"
132
131
  };
133
- class xt {
132
+ class Ct {
134
133
  app;
135
134
  constructor(n) {
136
135
  this.app = n;
137
136
  }
138
137
  dispose() {
139
138
  }
139
+ handleApp(n, a, e) {
140
+ }
141
+ handleEditor(n, a, e) {
142
+ }
140
143
  }
141
- class mi extends xt {
144
+ class ui extends Ct {
142
145
  selectDropdown(n, a) {
143
146
  this.app.send({
144
147
  event: "selectComponent",
@@ -159,103 +162,25 @@ class mi extends xt {
159
162
  }
160
163
  });
161
164
  }
162
- }
163
- function vi(e, n, a) {
164
- switch (a.event) {
165
- case "selectComponent":
166
- P.dispatchEvent({ type: k.SELECT_DROPDOWN, value: a.data });
167
- break;
168
- case "draggableListUpdate":
169
- P.dispatchEvent({ type: k.DRAG_UPDATE, value: a.data });
170
- break;
171
- }
172
- }
173
- function gi(e, n, a) {
174
- let t;
175
- switch (a.event) {
176
- case "setSheet":
177
- t = n.sheets.get(a.data.sheet), t !== void 0 && (n.activeSheet = t, Vt.setSelection([t]));
178
- break;
179
- case "setSheetObject":
180
- t = n.sheetObjects.get(`${a.data.sheet}_${a.data.key}`), t !== void 0 && Vt.setSelection([t]);
181
- break;
182
- case "updateSheetObject":
183
- t = n.sheets.get(a.data.sheet), t !== void 0 && t.sequence.pause(), t = n.sheetObjectCBs.get(a.data.sheetObject), t !== void 0 && t(a.data.values);
184
- break;
185
- case "updateTimeline":
186
- t = n.sheets.get(a.data.sheet), n.activeSheet !== void 0 && (n.activeSheet.sequence.position = a.data.position);
187
- break;
188
- }
189
- }
190
- function bi(e, n, a) {
191
- if (e.editor)
192
- switch (a.event) {
193
- case "playSheet":
194
- n.sheet(a.data.sheet)?.sequence.play(a.data.value);
165
+ handleApp(n, a, e) {
166
+ switch (e.event) {
167
+ case "selectComponent":
168
+ P.dispatchEvent({ type: k.SELECT_DROPDOWN, value: e.data });
195
169
  break;
196
- case "pauseSheet":
197
- n.sheet(a.data.sheet)?.sequence.pause();
170
+ case "draggableListUpdate":
171
+ P.dispatchEvent({ type: k.DRAG_UPDATE, value: e.data });
198
172
  break;
199
173
  }
200
- }
201
- function yi(e, n, a) {
202
- switch (a.event) {
203
- case "getObject":
204
- P.dispatchEvent({ type: k.GET_OBJECT, value: a.data });
205
- break;
206
- case "updateObject":
207
- P.dispatchEvent({ type: k.UPDATE_OBJECT, value: a.data });
208
- break;
209
- case "createTexture":
210
- P.dispatchEvent({ type: k.CREATE_TEXTURE, value: a.data });
211
- break;
212
- case "requestMethod":
213
- P.dispatchEvent({ type: k.REQUEST_METHOD, value: a.data });
214
- break;
215
174
  }
216
175
  }
217
- function Ei(e, n, a) {
218
- switch (a.event) {
219
- case "setObject":
220
- P.dispatchEvent({ type: k.SET_OBJECT, value: a.data });
221
- break;
222
- case "setScene":
223
- P.dispatchEvent({ type: k.SET_SCENE, value: a.data });
224
- break;
225
- case "addCamera":
226
- P.dispatchEvent({ type: k.ADD_CAMERA, value: a.data });
227
- break;
228
- case "removeCamera":
229
- P.dispatchEvent({ type: k.REMOVE_CAMERA, value: a.data });
230
- break;
231
- }
232
- }
233
- function Ci(e, n, a) {
234
- switch (a.event) {
235
- case "addFolder":
236
- n.addFolder(a.data.name, a.data.params, a.data.parent);
237
- break;
238
- case "bindObject":
239
- n.bind(a.data.name, a.data.params, a.data.parent);
240
- break;
241
- case "updateBind":
242
- n.triggerBind(a.data.id, a.data.value);
243
- break;
244
- case "addButton":
245
- n.button(a.data.name, a.data.callback, a.data.parent);
246
- break;
247
- case "clickButton":
248
- n.triggerButton(a.data.id);
249
- break;
250
- }
251
- }
252
- class ya extends xt {
176
+ class Nt extends Ct {
253
177
  project;
254
178
  sheets = /* @__PURE__ */ new Map();
255
179
  sheetObjects = /* @__PURE__ */ new Map();
256
180
  sheetObjectCBs = /* @__PURE__ */ new Map();
257
181
  sheetObjectUnsubscribe = /* @__PURE__ */ new Map();
258
182
  activeSheet;
183
+ studio;
259
184
  static rafDriver = void 0;
260
185
  dispose() {
261
186
  this.project = void 0, this.sheets = /* @__PURE__ */ new Map(), this.sheetObjects = /* @__PURE__ */ new Map(), this.sheetObjectCBs = /* @__PURE__ */ new Map(), this.sheetObjectUnsubscribe = /* @__PURE__ */ new Map();
@@ -288,26 +213,26 @@ class ya extends xt {
288
213
  });
289
214
  }
290
215
  clearSheetObjects(n) {
291
- this.sheetObjects.forEach((a, t) => {
292
- t.search(`${n}_`) > -1 && this.unsubscribe(a);
216
+ this.sheetObjects.forEach((a, e) => {
217
+ e.search(`${n}_`) > -1 && this.unsubscribe(a);
293
218
  });
294
219
  }
295
- sheetObject(n, a, t, r) {
220
+ sheetObject(n, a, e, i) {
296
221
  if (this.project === void 0) {
297
222
  console.error("Theatre Project hasn't been created yet.");
298
223
  return;
299
224
  }
300
- const c = this.sheet(n);
301
- if (c === void 0)
225
+ const o = this.sheet(n);
226
+ if (o === void 0)
302
227
  return;
303
- const p = `${n}_${a}`;
304
- let o = this.sheetObjects.get(p);
305
- o !== void 0 ? o = c.object(a, { ...t, ...o.value }, { reconfigure: !0 }) : o = c.object(a, t), this.sheetObjects.set(p, o), this.sheetObjectCBs.set(p, r !== void 0 ? r : Sn);
306
- const u = o.onValuesChange((d) => {
228
+ const h = `${n}_${a}`;
229
+ let c = this.sheetObjects.get(h);
230
+ c !== void 0 ? c = o.object(a, { ...e, ...c.value }, { reconfigure: !0 }) : c = o.object(a, e), this.sheetObjects.set(h, c), this.sheetObjectCBs.set(h, i !== void 0 ? i : Sn);
231
+ const d = c.onValuesChange((u) => {
307
232
  if (this.app.editor) {
308
- for (const b in d) {
309
- const E = d[b];
310
- typeof E == "object" && ma(E) && (d[b] = {
233
+ for (const b in u) {
234
+ const E = u[b];
235
+ typeof E == "object" && fa(E) && (u[b] = {
311
236
  r: E.r,
312
237
  g: E.g,
313
238
  b: E.b,
@@ -319,105 +244,179 @@ class ya extends xt {
319
244
  target: "app",
320
245
  data: {
321
246
  sheet: n,
322
- sheetObject: p,
323
- values: d
247
+ sheetObject: h,
248
+ values: u
324
249
  }
325
250
  });
326
251
  }
327
- const v = this.sheetObjectCBs.get(p);
328
- v !== void 0 && v(d);
252
+ const v = this.sheetObjectCBs.get(h);
253
+ v !== void 0 && v(u);
329
254
  });
330
- return this.sheetObjectUnsubscribe.set(p, u), o;
255
+ return this.sheetObjectUnsubscribe.set(h, d), c;
331
256
  }
332
257
  unsubscribe(n) {
333
258
  if (this.project === void 0) {
334
259
  console.error("Theatre Project hasn't been created yet.");
335
260
  return;
336
261
  }
337
- const a = n.address.sheetId, t = n.address.objectKey;
338
- this.sheets.get(a)?.detachObject(t);
339
- const c = `${a}_${t}`, p = this.sheetObjectUnsubscribe.get(c);
340
- p !== void 0 && (this.sheetObjects.delete(c), this.sheetObjectCBs.delete(c), this.sheetObjectUnsubscribe.delete(c), p());
262
+ const a = n.address.sheetId, e = n.address.objectKey;
263
+ this.sheets.get(a)?.detachObject(e);
264
+ const o = `${a}_${e}`, h = this.sheetObjectUnsubscribe.get(o);
265
+ h !== void 0 && (this.sheetObjects.delete(o), this.sheetObjectCBs.delete(o), this.sheetObjectUnsubscribe.delete(o), h());
266
+ }
267
+ handleApp(n, a, e) {
268
+ const i = a;
269
+ let o;
270
+ switch (e.event) {
271
+ case "setSheet":
272
+ o = i.sheets.get(e.data.sheet), o !== void 0 && (i.activeSheet = o, this.studio.setSelection([o]));
273
+ break;
274
+ case "setSheetObject":
275
+ o = i.sheetObjects.get(`${e.data.sheet}_${e.data.key}`), o !== void 0 && this.studio.setSelection([o]);
276
+ break;
277
+ case "updateSheetObject":
278
+ o = i.sheets.get(e.data.sheet), o !== void 0 && o.sequence.pause(), o = i.sheetObjectCBs.get(e.data.sheetObject), o !== void 0 && o(e.data.values);
279
+ break;
280
+ case "updateTimeline":
281
+ o = i.sheets.get(e.data.sheet), i.activeSheet !== void 0 && (i.activeSheet.sequence.position = e.data.position);
282
+ break;
283
+ }
284
+ }
285
+ handleEditor(n, a, e) {
286
+ if (n.editor) {
287
+ const i = a;
288
+ switch (e.event) {
289
+ case "playSheet":
290
+ i.sheet(e.data.sheet)?.sequence.play(e.data.value);
291
+ break;
292
+ case "pauseSheet":
293
+ i.sheet(e.data.sheet)?.sequence.pause();
294
+ break;
295
+ }
296
+ }
297
+ }
298
+ handleEditorApp(n, a) {
299
+ if (n.editor) {
300
+ this.studio.ui.restore(), this.studio.onSelectionChange((h) => {
301
+ h.length < 1 || h.forEach((c) => {
302
+ let d = c.address.sheetId, u = "setSheet", v = {};
303
+ switch (c.type) {
304
+ case "Theatre_Sheet_PublicAPI":
305
+ u = "setSheet", v = {
306
+ sheet: c.address.sheetId
307
+ }, a.activeSheet = a.sheets.get(c.address.sheetId);
308
+ break;
309
+ case "Theatre_SheetObject_PublicAPI":
310
+ u = "setSheetObject", d += `_${c.address.objectKey}`, v = {
311
+ id: d,
312
+ sheet: c.address.sheetId,
313
+ key: c.address.objectKey
314
+ }, a.activeSheet = a.sheets.get(c.address.sheetId);
315
+ break;
316
+ }
317
+ n.send({ event: u, target: "app", data: v });
318
+ });
319
+ });
320
+ let e = -1;
321
+ const i = () => {
322
+ if (Nt.rafDriver?.tick(performance.now()), a.activeSheet !== void 0 && e !== a.activeSheet.sequence.position) {
323
+ e = a.activeSheet.sequence.position;
324
+ const h = a.activeSheet;
325
+ n.send({
326
+ event: "updateTimeline",
327
+ target: "app",
328
+ data: {
329
+ position: e,
330
+ sheet: h.address.sheetId
331
+ }
332
+ });
333
+ }
334
+ }, o = () => {
335
+ i(), requestAnimationFrame(o);
336
+ };
337
+ i(), o();
338
+ } else
339
+ this.studio.ui.hide();
341
340
  }
342
341
  }
343
- function Si(e, n, a) {
344
- if (e.editor) {
345
- a.ui.restore(), a.onSelectionChange((p) => {
346
- p.length < 1 || p.forEach((o) => {
347
- let u = o.address.sheetId, d = "setSheet", v = {};
348
- switch (o.type) {
342
+ function hi(t, n, a) {
343
+ if (t.editor) {
344
+ a.ui.restore(), a.onSelectionChange((h) => {
345
+ h.length < 1 || h.forEach((c) => {
346
+ let d = c.address.sheetId, u = "setSheet", v = {};
347
+ switch (c.type) {
349
348
  case "Theatre_Sheet_PublicAPI":
350
- d = "setSheet", v = {
351
- sheet: o.address.sheetId
352
- }, n.activeSheet = n.sheets.get(o.address.sheetId);
349
+ u = "setSheet", v = {
350
+ sheet: c.address.sheetId
351
+ }, n.activeSheet = n.sheets.get(c.address.sheetId);
353
352
  break;
354
353
  case "Theatre_SheetObject_PublicAPI":
355
- d = "setSheetObject", u += `_${o.address.objectKey}`, v = {
356
- id: u,
357
- sheet: o.address.sheetId,
358
- key: o.address.objectKey
359
- }, n.activeSheet = n.sheets.get(o.address.sheetId);
354
+ u = "setSheetObject", d += `_${c.address.objectKey}`, v = {
355
+ id: d,
356
+ sheet: c.address.sheetId,
357
+ key: c.address.objectKey
358
+ }, n.activeSheet = n.sheets.get(c.address.sheetId);
360
359
  break;
361
360
  }
362
- e.send({ event: d, target: "app", data: v });
361
+ t.send({ event: u, target: "app", data: v });
363
362
  });
364
363
  });
365
- let t = -1;
366
- const r = () => {
367
- if (ya.rafDriver?.tick(performance.now()), n.activeSheet !== void 0 && t !== n.activeSheet.sequence.position) {
368
- t = n.activeSheet.sequence.position;
369
- const p = n.activeSheet;
370
- e.send({
364
+ let e = -1;
365
+ const i = () => {
366
+ if (Nt.rafDriver?.tick(performance.now()), n.activeSheet !== void 0 && e !== n.activeSheet.sequence.position) {
367
+ e = n.activeSheet.sequence.position;
368
+ const h = n.activeSheet;
369
+ t.send({
371
370
  event: "updateTimeline",
372
371
  target: "app",
373
372
  data: {
374
- position: t,
375
- sheet: p.address.sheetId
373
+ position: e,
374
+ sheet: h.address.sheetId
376
375
  }
377
376
  });
378
377
  }
379
- }, c = () => {
380
- r(), requestAnimationFrame(c);
378
+ }, o = () => {
379
+ i(), requestAnimationFrame(o);
381
380
  };
382
- r(), c();
381
+ i(), o();
383
382
  } else
384
383
  a.ui.hide();
385
384
  }
386
- function Ea(e) {
387
- if (e.name === "cameras")
385
+ function ga(t) {
386
+ if (t.name === "cameras")
388
387
  return "camera";
389
- if (e.name === "interactive")
388
+ if (t.name === "interactive")
390
389
  return "interactive";
391
- if (e.name === "lights")
390
+ if (t.name === "lights")
392
391
  return "light";
393
- if (e.name === "ui")
392
+ if (t.name === "ui")
394
393
  return "ui";
395
- if (e.name === "utils")
394
+ if (t.name === "utils")
396
395
  return "utils";
397
- const n = e.type;
396
+ const n = t.type;
398
397
  return n.search("Helper") > -1 ? "icon_utils" : n.search("Camera") > -1 ? "camera" : n.search("Light") > -1 ? "light" : "obj3D";
399
398
  }
400
- function On(e) {
399
+ function wn(t) {
401
400
  const n = {
402
- name: e.name,
403
- type: e.type,
404
- uuid: e.uuid,
401
+ name: t.name,
402
+ type: t.type,
403
+ uuid: t.uuid,
405
404
  children: []
406
405
  };
407
- return e.children.forEach((a) => {
408
- n.children.push(On(a));
406
+ return t.children.forEach((a) => {
407
+ n.children.push(wn(a));
409
408
  }), n;
410
409
  }
411
- function Ca(e) {
410
+ function ba(t) {
412
411
  const n = {};
413
- for (const a in e) {
414
- const t = e[a].value;
415
- n[a] = { value: t }, t === null ? n[a].value = { src: "" } : t.isTexture && (n[a].value = { src: t.image.src });
412
+ for (const a in t) {
413
+ const e = t[a].value;
414
+ n[a] = { value: e }, e === null ? n[a].value = { src: "" } : e.isTexture && (n[a].value = { src: e.image.src });
416
415
  }
417
416
  return n;
418
417
  }
419
- function Sa(e) {
420
- switch (e) {
418
+ function ya(t) {
419
+ switch (t) {
421
420
  case "blendSrcAlpha":
422
421
  case "blendDstAlpha":
423
422
  case "blendEquationAlpha":
@@ -428,28 +427,28 @@ function Sa(e) {
428
427
  }
429
428
  return !1;
430
429
  }
431
- function Je(e) {
430
+ function Je(t) {
432
431
  const n = {};
433
- for (const a in e) {
434
- if (a.substring(0, 1) === "_" || a.substring(0, 2) === "is" || Sa(a))
432
+ for (const a in t) {
433
+ if (a.substring(0, 1) === "_" || a.substring(0, 2) === "is" || ya(a))
435
434
  continue;
436
- const t = typeof e[a], r = e[a];
437
- switch (t) {
435
+ const e = typeof t[a], i = t[a];
436
+ switch (e) {
438
437
  case "boolean":
439
438
  case "number":
440
439
  case "string":
441
- n[a] = r;
440
+ n[a] = i;
442
441
  break;
443
442
  case "object":
444
- if (r !== null)
445
- if (n[a] = r, r.isTexture)
446
- if (r instanceof nn) {
447
- const c = r.source.toJSON();
448
- n[a] = { src: c.url };
443
+ if (i !== null)
444
+ if (n[a] = i, i.isTexture)
445
+ if (i instanceof tn) {
446
+ const o = i.source.toJSON();
447
+ n[a] = { src: o.url };
449
448
  } else
450
- r instanceof Dn && (console.log("env map"), console.log(r.source.data), console.log(r.source.toJSON()), n[a] = { src: "" });
449
+ i instanceof kn && (console.log("env map"), console.log(i.source.data), console.log(i.source.toJSON()), n[a] = { src: "" });
451
450
  else
452
- a === "uniforms" && (n[a] = Ca(n[a]));
451
+ a === "uniforms" && (n[a] = ba(n[a]));
453
452
  else
454
453
  n[a] = { src: "" };
455
454
  break;
@@ -457,131 +456,131 @@ function Je(e) {
457
456
  }
458
457
  return n;
459
458
  }
460
- function Pt(e) {
461
- e.updateMatrix();
459
+ function At(t) {
460
+ t.updateMatrix();
462
461
  const n = {
463
- name: e.name,
464
- type: e.type,
465
- uuid: e.uuid,
466
- visible: e.visible,
467
- matrix: e.matrix.elements,
462
+ name: t.name,
463
+ type: t.type,
464
+ uuid: t.uuid,
465
+ visible: t.visible,
466
+ matrix: t.matrix.elements,
468
467
  animations: [],
469
468
  material: void 0,
470
469
  perspectiveCameraInfo: void 0,
471
470
  orthographicCameraInfo: void 0,
472
471
  lightInfo: void 0
473
472
  };
474
- e.animations.forEach((t) => {
473
+ t.animations.forEach((e) => {
475
474
  n.animations.push({
476
- name: t.name,
477
- duration: t.duration,
478
- blendMode: t.blendMode
475
+ name: e.name,
476
+ duration: e.duration,
477
+ blendMode: e.blendMode
479
478
  });
480
479
  });
481
- const a = e.type.toLowerCase();
480
+ const a = t.type.toLowerCase();
482
481
  if (a.search("mesh") > -1) {
483
- const t = e;
484
- if (Array.isArray(t.material)) {
485
- const r = [];
486
- t.material.forEach((c) => {
487
- r.push(Je(c));
488
- }), n.material = r;
482
+ const e = t;
483
+ if (Array.isArray(e.material)) {
484
+ const i = [];
485
+ e.material.forEach((o) => {
486
+ i.push(Je(o));
487
+ }), n.material = i;
489
488
  } else
490
- n.material = Je(t.material);
489
+ n.material = Je(e.material);
491
490
  } else if (a.search("points") > -1) {
492
- const t = e;
493
- if (Array.isArray(t.material)) {
494
- const r = [];
495
- t.material.forEach((c) => {
496
- r.push(Je(c));
497
- }), n.material = r;
491
+ const e = t;
492
+ if (Array.isArray(e.material)) {
493
+ const i = [];
494
+ e.material.forEach((o) => {
495
+ i.push(Je(o));
496
+ }), n.material = i;
498
497
  } else
499
- n.material = Je(t.material);
498
+ n.material = Je(e.material);
500
499
  } else if (a.search("line") > -1) {
501
- const t = e;
502
- if (Array.isArray(t.material)) {
503
- const r = [];
504
- t.material.forEach((c) => {
505
- r.push(Je(c));
506
- }), n.material = r;
500
+ const e = t;
501
+ if (Array.isArray(e.material)) {
502
+ const i = [];
503
+ e.material.forEach((o) => {
504
+ i.push(Je(o));
505
+ }), n.material = i;
507
506
  } else
508
- n.material = Je(t.material);
507
+ n.material = Je(e.material);
509
508
  } else
510
- a.search("camera") > -1 ? e.type === "PerspectiveCamera" ? n.perspectiveCameraInfo = {
511
- fov: e.fov,
512
- zoom: e.zoom,
513
- near: e.near,
514
- far: e.far,
515
- focus: e.focus,
516
- aspect: e.aspect,
517
- filmGauge: e.filmGauge,
518
- filmOffset: e.filmOffset
519
- } : e.type === "OrthographicCamera" && (n.orthographicCameraInfo = {
520
- zoom: e.zoom,
521
- near: e.near,
522
- far: e.far,
523
- left: e.left,
524
- right: e.right,
525
- top: e.top,
526
- bottom: e.bottom
509
+ a.search("camera") > -1 ? t.type === "PerspectiveCamera" ? n.perspectiveCameraInfo = {
510
+ fov: t.fov,
511
+ zoom: t.zoom,
512
+ near: t.near,
513
+ far: t.far,
514
+ focus: t.focus,
515
+ aspect: t.aspect,
516
+ filmGauge: t.filmGauge,
517
+ filmOffset: t.filmOffset
518
+ } : t.type === "OrthographicCamera" && (n.orthographicCameraInfo = {
519
+ zoom: t.zoom,
520
+ near: t.near,
521
+ far: t.far,
522
+ left: t.left,
523
+ right: t.right,
524
+ top: t.top,
525
+ bottom: t.bottom
527
526
  }) : a.search("light") > -1 && (n.lightInfo = {
528
- color: e.color,
529
- intensity: e.intensity,
530
- decay: e.decay,
531
- distance: e.distance,
532
- angle: e.angle,
533
- penumbra: e.penumbra,
534
- groundColor: e.groundColor
527
+ color: t.color,
528
+ intensity: t.intensity,
529
+ decay: t.decay,
530
+ distance: t.distance,
531
+ angle: t.angle,
532
+ penumbra: t.penumbra,
533
+ groundColor: t.groundColor
535
534
  });
536
535
  return n;
537
536
  }
538
- function xa(e, n) {
537
+ function Ea(t, n) {
539
538
  const a = n.split(".");
540
539
  switch (a.length) {
541
540
  case 1:
542
- return e[a[0]];
541
+ return t[a[0]];
543
542
  case 2:
544
- return e[a[0]][a[1]];
543
+ return t[a[0]][a[1]];
545
544
  case 3:
546
- return e[a[0]][a[1]][a[2]];
545
+ return t[a[0]][a[1]][a[2]];
547
546
  case 4:
548
- return e[a[0]][a[1]][a[2]][a[3]];
547
+ return t[a[0]][a[1]][a[2]][a[3]];
549
548
  case 5:
550
- return e[a[0]][a[1]][a[2]][a[3]][a[4]];
549
+ return t[a[0]][a[1]][a[2]][a[3]][a[4]];
551
550
  case 6:
552
- return e[a[0]][a[1]][a[2]][a[3]][a[4]][a[5]];
551
+ return t[a[0]][a[1]][a[2]][a[3]][a[4]][a[5]];
553
552
  }
554
553
  }
555
- function ee(e, n, a) {
556
- const t = n.split(".");
557
- switch (t.length) {
554
+ function ee(t, n, a) {
555
+ const e = n.split(".");
556
+ switch (e.length) {
558
557
  case 1:
559
- e[t[0]] = a;
558
+ t[e[0]] = a;
560
559
  break;
561
560
  case 2:
562
- e[t[0]][t[1]] = a;
561
+ t[e[0]][e[1]] = a;
563
562
  break;
564
563
  case 3:
565
- e[t[0]][t[1]][t[2]] = a;
564
+ t[e[0]][e[1]][e[2]] = a;
566
565
  break;
567
566
  case 4:
568
- e[t[0]][t[1]][t[2]][t[3]] = a;
567
+ t[e[0]][e[1]][e[2]][e[3]] = a;
569
568
  break;
570
569
  case 5:
571
- e[t[0]][t[1]][t[2]][t[3]][t[4]] = a;
570
+ t[e[0]][e[1]][e[2]][e[3]][e[4]] = a;
572
571
  break;
573
572
  }
574
573
  }
575
- function It(e) {
574
+ function Dt(t) {
576
575
  return new Promise((n, a) => {
577
- const t = new Image();
578
- t.onload = () => {
579
- const r = new nn(t);
580
- r.wrapS = Ut, r.wrapT = Ut, r.needsUpdate = !0, n(r);
581
- }, t.onerror = a, t.src = e;
576
+ const e = new Image();
577
+ e.onload = () => {
578
+ const i = new tn(e);
579
+ i.wrapS = Ut, i.wrapT = Ut, i.needsUpdate = !0, n(i);
580
+ }, e.onerror = a, e.src = t;
582
581
  });
583
582
  }
584
- class xi extends xt {
583
+ class fi extends Ct {
585
584
  scene = void 0;
586
585
  getObject(n) {
587
586
  this.app.debugEnabled && this.app.send({
@@ -591,52 +590,52 @@ class xi extends xt {
591
590
  });
592
591
  }
593
592
  setObject(n) {
594
- const a = Pt(n);
593
+ const a = At(n);
595
594
  this.app.send({
596
595
  event: "setObject",
597
596
  target: "editor",
598
597
  data: a
599
598
  });
600
599
  }
601
- requestMethod(n, a, t, r) {
600
+ requestMethod(n, a, e, i) {
602
601
  this.app.send({
603
602
  event: "requestMethod",
604
603
  target: "app",
605
604
  data: {
606
605
  uuid: n,
607
606
  key: a,
608
- value: t,
609
- subitem: r
607
+ value: e,
608
+ subitem: i
610
609
  }
611
610
  });
612
611
  }
613
- updateObject(n, a, t) {
612
+ updateObject(n, a, e) {
614
613
  this.app.send({
615
614
  event: "updateObject",
616
615
  target: "app",
617
616
  data: {
618
617
  uuid: n,
619
618
  key: a,
620
- value: t
619
+ value: e
621
620
  }
622
621
  });
623
622
  }
624
- createTexture(n, a, t) {
623
+ createTexture(n, a, e) {
625
624
  this.app.send({
626
625
  event: "createTexture",
627
626
  target: "app",
628
627
  data: {
629
628
  uuid: n,
630
629
  key: a,
631
- value: t
630
+ value: e
632
631
  }
633
632
  });
634
633
  }
635
634
  setScene(n) {
636
635
  if (n === void 0 || (this.scene = n, !this.app.debugEnabled))
637
636
  return;
638
- ga(), xn(this.scene);
639
- const a = On(this.scene);
637
+ ma(), Cn(this.scene);
638
+ const a = wn(this.scene);
640
639
  this.app.send({
641
640
  event: "setScene",
642
641
  target: "editor",
@@ -646,7 +645,7 @@ class xi extends xt {
646
645
  addCamera(n) {
647
646
  if (!this.app.debugEnabled)
648
647
  return;
649
- const a = Pt(n);
648
+ const a = At(n);
650
649
  this.app.send({
651
650
  event: "addCamera",
652
651
  target: "editor",
@@ -656,15 +655,47 @@ class xi extends xt {
656
655
  removeCamera(n) {
657
656
  if (!this.app.debugEnabled)
658
657
  return;
659
- const a = Pt(n);
658
+ const a = At(n);
660
659
  this.app.send({
661
660
  event: "removeCamera",
662
661
  target: "editor",
663
662
  data: a
664
663
  });
665
664
  }
665
+ handleApp(n, a, e) {
666
+ switch (e.event) {
667
+ case "getObject":
668
+ P.dispatchEvent({ type: k.GET_OBJECT, value: e.data });
669
+ break;
670
+ case "updateObject":
671
+ P.dispatchEvent({ type: k.UPDATE_OBJECT, value: e.data });
672
+ break;
673
+ case "createTexture":
674
+ P.dispatchEvent({ type: k.CREATE_TEXTURE, value: e.data });
675
+ break;
676
+ case "requestMethod":
677
+ P.dispatchEvent({ type: k.REQUEST_METHOD, value: e.data });
678
+ break;
679
+ }
680
+ }
681
+ handleEditor(n, a, e) {
682
+ switch (e.event) {
683
+ case "setObject":
684
+ P.dispatchEvent({ type: k.SET_OBJECT, value: e.data });
685
+ break;
686
+ case "setScene":
687
+ P.dispatchEvent({ type: k.SET_SCENE, value: e.data });
688
+ break;
689
+ case "addCamera":
690
+ P.dispatchEvent({ type: k.ADD_CAMERA, value: e.data });
691
+ break;
692
+ case "removeCamera":
693
+ P.dispatchEvent({ type: k.REMOVE_CAMERA, value: e.data });
694
+ break;
695
+ }
696
+ }
666
697
  }
667
- class wi extends xt {
698
+ class pi extends Ct {
668
699
  bindCBs;
669
700
  buttonCBs;
670
701
  pane = void 0;
@@ -675,14 +706,14 @@ class wi extends xt {
675
706
  super(n), this.bindCBs = /* @__PURE__ */ new Map(), this.buttonCBs = /* @__PURE__ */ new Map(), n.editor && this.createGUI();
676
707
  }
677
708
  createGUI() {
678
- this.pane = new da({ title: "GUI" }), this.pane.registerPlugin(fa);
709
+ this.pane = new la({ title: "GUI" }), this.pane.registerPlugin(da);
679
710
  }
680
711
  dispose() {
681
712
  this.bindCBs.clear(), this.buttonCBs.clear(), this.appCallbacks = 0, this.editorCallbacks = 0, this.app.editor && (this.pane?.dispose(), this.pane = void 0);
682
713
  }
683
- addFolder(n, a = void 0, t = void 0) {
714
+ addFolder(n, a = void 0, e = void 0) {
684
715
  if (this.app.editor)
685
- return this.pane === void 0 && this.createGUI(), (t !== void 0 ? t : this.pane).addFolder({
716
+ return this.pane === void 0 && this.createGUI(), (e !== void 0 ? e : this.pane).addFolder({
686
717
  title: n,
687
718
  ...a
688
719
  });
@@ -692,7 +723,7 @@ class wi extends xt {
692
723
  data: {
693
724
  name: n,
694
725
  params: a,
695
- parent: t
726
+ parent: e
696
727
  }
697
728
  });
698
729
  }
@@ -700,51 +731,51 @@ class wi extends xt {
700
731
  return `debug_${Math.max(this.appCallbacks, this.editorCallbacks)}`;
701
732
  }
702
733
  // Binding
703
- bind(n, a, t, r = void 0) {
704
- const c = this.bindID, p = t.onChange !== void 0 ? t.onChange : Sn;
705
- this.bindCBs.set(c, p), this.app.editor ? (this.pane === void 0 && this.createGUI(), (r !== void 0 ? r : this.pane).addBinding(n, a, t).on("change", (u) => {
734
+ bind(n, a, e, i = void 0) {
735
+ const o = this.bindID, h = e.onChange !== void 0 ? e.onChange : Sn;
736
+ this.bindCBs.set(o, h), this.app.editor ? (this.pane === void 0 && this.createGUI(), (i !== void 0 ? i : this.pane).addBinding(n, a, e).on("change", (d) => {
706
737
  this.app.send({
707
738
  event: "updateBind",
708
739
  target: "app",
709
740
  data: {
710
- id: c,
711
- value: u.value
741
+ id: o,
742
+ value: d.value
712
743
  }
713
744
  });
714
745
  }), this.editorCallbacks++) : (this.app.send({
715
746
  event: "bindObject",
716
747
  target: "app",
717
748
  data: {
718
- id: c,
749
+ id: o,
719
750
  name: a,
720
- params: t,
721
- parent: r
751
+ params: e,
752
+ parent: i
722
753
  }
723
754
  }), this.appCallbacks++);
724
755
  }
725
756
  triggerBind(n, a) {
726
- const t = this.bindCBs.get(n);
727
- t !== void 0 ? t(a) : console.warn(`No callback for: ${n}`, a);
757
+ const e = this.bindCBs.get(n);
758
+ e !== void 0 ? e(a) : console.warn(`No callback for: ${n}`, a);
728
759
  }
729
760
  // Buttons
730
- button(n, a, t = void 0) {
731
- const r = this.bindID;
732
- this.buttonCBs.set(r, a), this.app.editor ? (this.pane === void 0 && this.createGUI(), (t !== void 0 ? t : this.pane).addButton({ title: n }).on("click", () => {
761
+ button(n, a, e = void 0) {
762
+ const i = this.bindID;
763
+ this.buttonCBs.set(i, a), this.app.editor ? (this.pane === void 0 && this.createGUI(), (e !== void 0 ? e : this.pane).addButton({ title: n }).on("click", () => {
733
764
  this.app.send({
734
765
  event: "clickButton",
735
766
  target: "app",
736
767
  data: {
737
- id: r
768
+ id: i
738
769
  }
739
770
  });
740
771
  }), this.editorCallbacks++) : (this.app.send({
741
772
  event: "addButton",
742
773
  target: "app",
743
774
  data: {
744
- id: r,
775
+ id: i,
745
776
  name: n,
746
777
  callback: a,
747
- parent: t
778
+ parent: e
748
779
  }
749
780
  }), this.appCallbacks++);
750
781
  }
@@ -761,8 +792,28 @@ class wi extends xt {
761
792
  for (let a = n; a > -1; --a)
762
793
  this.inspectorFolder.remove(this.inspectorFolder.children[a]);
763
794
  }
795
+ handleApp(n, a, e) {
796
+ const i = a;
797
+ switch (e.event) {
798
+ case "addFolder":
799
+ i.addFolder(e.data.name, e.data.params, e.data.parent);
800
+ break;
801
+ case "bindObject":
802
+ i.bind(e.data.name, e.data.params, e.data.parent);
803
+ break;
804
+ case "updateBind":
805
+ i.triggerBind(e.data.id, e.data.value);
806
+ break;
807
+ case "addButton":
808
+ i.button(e.data.name, e.data.callback, e.data.parent);
809
+ break;
810
+ case "clickButton":
811
+ i.triggerButton(e.data.id);
812
+ break;
813
+ }
814
+ }
764
815
  }
765
- var Lt = { exports: {} }, rt = {};
816
+ var It = { exports: {} }, rt = {};
766
817
  /**
767
818
  * @license React
768
819
  * react-jsx-runtime.production.min.js
@@ -772,23 +823,23 @@ var Lt = { exports: {} }, rt = {};
772
823
  * This source code is licensed under the MIT license found in the
773
824
  * LICENSE file in the root directory of this source tree.
774
825
  */
775
- var Ht;
776
- function wa() {
777
- if (Ht)
826
+ var Vt;
827
+ function Sa() {
828
+ if (Vt)
778
829
  return rt;
779
- Ht = 1;
780
- var e = En, n = Symbol.for("react.element"), a = Symbol.for("react.fragment"), t = Object.prototype.hasOwnProperty, r = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, c = { key: !0, ref: !0, __self: !0, __source: !0 };
781
- function p(o, u, d) {
782
- var v, b = {}, E = null, C = null;
783
- d !== void 0 && (E = "" + d), u.key !== void 0 && (E = "" + u.key), u.ref !== void 0 && (C = u.ref);
784
- for (v in u)
785
- t.call(u, v) && !c.hasOwnProperty(v) && (b[v] = u[v]);
786
- if (o && o.defaultProps)
787
- for (v in u = o.defaultProps, u)
788
- b[v] === void 0 && (b[v] = u[v]);
789
- return { $$typeof: n, type: o, key: E, ref: C, props: b, _owner: r.current };
790
- }
791
- return rt.Fragment = a, rt.jsx = p, rt.jsxs = p, rt;
830
+ Vt = 1;
831
+ var t = yn, n = Symbol.for("react.element"), a = Symbol.for("react.fragment"), e = Object.prototype.hasOwnProperty, i = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, o = { key: !0, ref: !0, __self: !0, __source: !0 };
832
+ function h(c, d, u) {
833
+ var v, b = {}, E = null, S = null;
834
+ u !== void 0 && (E = "" + u), d.key !== void 0 && (E = "" + d.key), d.ref !== void 0 && (S = d.ref);
835
+ for (v in d)
836
+ e.call(d, v) && !o.hasOwnProperty(v) && (b[v] = d[v]);
837
+ if (c && c.defaultProps)
838
+ for (v in d = c.defaultProps, d)
839
+ b[v] === void 0 && (b[v] = d[v]);
840
+ return { $$typeof: n, type: c, key: E, ref: S, props: b, _owner: i.current };
841
+ }
842
+ return rt.Fragment = a, rt.jsx = h, rt.jsxs = h, rt;
792
843
  }
793
844
  var st = {};
794
845
  /**
@@ -800,91 +851,91 @@ var st = {};
800
851
  * This source code is licensed under the MIT license found in the
801
852
  * LICENSE file in the root directory of this source tree.
802
853
  */
803
- var Wt;
804
- function Oa() {
805
- return Wt || (Wt = 1, process.env.NODE_ENV !== "production" && function() {
806
- var e = En, n = Symbol.for("react.element"), a = Symbol.for("react.portal"), t = Symbol.for("react.fragment"), r = Symbol.for("react.strict_mode"), c = Symbol.for("react.profiler"), p = Symbol.for("react.provider"), o = Symbol.for("react.context"), u = Symbol.for("react.forward_ref"), d = Symbol.for("react.suspense"), v = Symbol.for("react.suspense_list"), b = Symbol.for("react.memo"), E = Symbol.for("react.lazy"), C = Symbol.for("react.offscreen"), D = Symbol.iterator, I = "@@iterator";
807
- function q(i) {
808
- if (i === null || typeof i != "object")
854
+ var Ht;
855
+ function Ca() {
856
+ return Ht || (Ht = 1, process.env.NODE_ENV !== "production" && function() {
857
+ var t = yn, n = Symbol.for("react.element"), a = Symbol.for("react.portal"), e = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), o = Symbol.for("react.profiler"), h = Symbol.for("react.provider"), c = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), u = Symbol.for("react.suspense"), v = Symbol.for("react.suspense_list"), b = Symbol.for("react.memo"), E = Symbol.for("react.lazy"), S = Symbol.for("react.offscreen"), D = Symbol.iterator, I = "@@iterator";
858
+ function q(r) {
859
+ if (r === null || typeof r != "object")
809
860
  return null;
810
- var f = D && i[D] || i[I];
861
+ var f = D && r[D] || r[I];
811
862
  return typeof f == "function" ? f : null;
812
863
  }
813
- var B = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
814
- function M(i) {
864
+ var B = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
865
+ function M(r) {
815
866
  {
816
- for (var f = arguments.length, g = new Array(f > 1 ? f - 1 : 0), S = 1; S < f; S++)
817
- g[S - 1] = arguments[S];
818
- z("error", i, g);
867
+ for (var f = arguments.length, g = new Array(f > 1 ? f - 1 : 0), C = 1; C < f; C++)
868
+ g[C - 1] = arguments[C];
869
+ z("error", r, g);
819
870
  }
820
871
  }
821
- function z(i, f, g) {
872
+ function z(r, f, g) {
822
873
  {
823
- var S = B.ReactDebugCurrentFrame, j = S.getStackAddendum();
874
+ var C = B.ReactDebugCurrentFrame, j = C.getStackAddendum();
824
875
  j !== "" && (f += "%s", g = g.concat([j]));
825
- var N = g.map(function(A) {
876
+ var L = g.map(function(A) {
826
877
  return String(A);
827
878
  });
828
- N.unshift("Warning: " + f), Function.prototype.apply.call(console[i], console, N);
879
+ L.unshift("Warning: " + f), Function.prototype.apply.call(console[r], console, L);
829
880
  }
830
881
  }
831
882
  var we = !1, ce = !1, Y = !1, Q = !1, x = !1, Ae;
832
883
  Ae = Symbol.for("react.module.reference");
833
- function Fe(i) {
834
- return !!(typeof i == "string" || typeof i == "function" || i === t || i === c || x || i === r || i === d || i === v || Q || i === C || we || ce || Y || typeof i == "object" && i !== null && (i.$$typeof === E || i.$$typeof === b || i.$$typeof === p || i.$$typeof === o || i.$$typeof === u || // This needs to include all possible module reference object
884
+ function Fe(r) {
885
+ return !!(typeof r == "string" || typeof r == "function" || r === e || r === o || x || r === i || r === u || r === v || Q || r === S || we || ce || Y || typeof r == "object" && r !== null && (r.$$typeof === E || r.$$typeof === b || r.$$typeof === h || r.$$typeof === c || r.$$typeof === d || // This needs to include all possible module reference object
835
886
  // types supported by any Flight configuration anywhere since
836
887
  // we don't know which Flight build this will end up being used
837
888
  // with.
838
- i.$$typeof === Ae || i.getModuleId !== void 0));
889
+ r.$$typeof === Ae || r.getModuleId !== void 0));
839
890
  }
840
- function Oe(i, f, g) {
841
- var S = i.displayName;
842
- if (S)
843
- return S;
891
+ function Oe(r, f, g) {
892
+ var C = r.displayName;
893
+ if (C)
894
+ return C;
844
895
  var j = f.displayName || f.name || "";
845
896
  return j !== "" ? g + "(" + j + ")" : g;
846
897
  }
847
- function me(i) {
848
- return i.displayName || "Context";
898
+ function me(r) {
899
+ return r.displayName || "Context";
849
900
  }
850
- function te(i) {
851
- if (i == null)
901
+ function te(r) {
902
+ if (r == null)
852
903
  return null;
853
- if (typeof i.tag == "number" && M("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof i == "function")
854
- return i.displayName || i.name || null;
855
- if (typeof i == "string")
856
- return i;
857
- switch (i) {
858
- case t:
904
+ if (typeof r.tag == "number" && M("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof r == "function")
905
+ return r.displayName || r.name || null;
906
+ if (typeof r == "string")
907
+ return r;
908
+ switch (r) {
909
+ case e:
859
910
  return "Fragment";
860
911
  case a:
861
912
  return "Portal";
862
- case c:
913
+ case o:
863
914
  return "Profiler";
864
- case r:
915
+ case i:
865
916
  return "StrictMode";
866
- case d:
917
+ case u:
867
918
  return "Suspense";
868
919
  case v:
869
920
  return "SuspenseList";
870
921
  }
871
- if (typeof i == "object")
872
- switch (i.$$typeof) {
873
- case o:
874
- var f = i;
922
+ if (typeof r == "object")
923
+ switch (r.$$typeof) {
924
+ case c:
925
+ var f = r;
875
926
  return me(f) + ".Consumer";
876
- case p:
877
- var g = i;
927
+ case h:
928
+ var g = r;
878
929
  return me(g._context) + ".Provider";
879
- case u:
880
- return Oe(i, i.render, "ForwardRef");
930
+ case d:
931
+ return Oe(r, r.render, "ForwardRef");
881
932
  case b:
882
- var S = i.displayName || null;
883
- return S !== null ? S : te(i.type) || "Memo";
933
+ var C = r.displayName || null;
934
+ return C !== null ? C : te(r.type) || "Memo";
884
935
  case E: {
885
- var j = i, N = j._payload, A = j._init;
936
+ var j = r, L = j._payload, A = j._init;
886
937
  try {
887
- return te(A(N));
938
+ return te(A(L));
888
939
  } catch {
889
940
  return null;
890
941
  }
@@ -892,62 +943,62 @@ function Oa() {
892
943
  }
893
944
  return null;
894
945
  }
895
- var de = Object.assign, ve = 0, ge, K, pe, Pe, ke, fe, h;
946
+ var ue = Object.assign, ve = 0, ge, K, pe, Pe, ke, he, p;
896
947
  function m() {
897
948
  }
898
949
  m.__reactDisabledLog = !0;
899
950
  function w() {
900
951
  {
901
952
  if (ve === 0) {
902
- ge = console.log, K = console.info, pe = console.warn, Pe = console.error, ke = console.group, fe = console.groupCollapsed, h = console.groupEnd;
903
- var i = {
953
+ ge = console.log, K = console.info, pe = console.warn, Pe = console.error, ke = console.group, he = console.groupCollapsed, p = console.groupEnd;
954
+ var r = {
904
955
  configurable: !0,
905
956
  enumerable: !0,
906
957
  value: m,
907
958
  writable: !0
908
959
  };
909
960
  Object.defineProperties(console, {
910
- info: i,
911
- log: i,
912
- warn: i,
913
- error: i,
914
- group: i,
915
- groupCollapsed: i,
916
- groupEnd: i
961
+ info: r,
962
+ log: r,
963
+ warn: r,
964
+ error: r,
965
+ group: r,
966
+ groupCollapsed: r,
967
+ groupEnd: r
917
968
  });
918
969
  }
919
970
  ve++;
920
971
  }
921
972
  }
922
- function _() {
973
+ function R() {
923
974
  {
924
975
  if (ve--, ve === 0) {
925
- var i = {
976
+ var r = {
926
977
  configurable: !0,
927
978
  enumerable: !0,
928
979
  writable: !0
929
980
  };
930
981
  Object.defineProperties(console, {
931
- log: de({}, i, {
982
+ log: ue({}, r, {
932
983
  value: ge
933
984
  }),
934
- info: de({}, i, {
985
+ info: ue({}, r, {
935
986
  value: K
936
987
  }),
937
- warn: de({}, i, {
988
+ warn: ue({}, r, {
938
989
  value: pe
939
990
  }),
940
- error: de({}, i, {
991
+ error: ue({}, r, {
941
992
  value: Pe
942
993
  }),
943
- group: de({}, i, {
994
+ group: ue({}, r, {
944
995
  value: ke
945
996
  }),
946
- groupCollapsed: de({}, i, {
947
- value: fe
997
+ groupCollapsed: ue({}, r, {
998
+ value: he
948
999
  }),
949
- groupEnd: de({}, i, {
950
- value: h
1000
+ groupEnd: ue({}, r, {
1001
+ value: p
951
1002
  })
952
1003
  });
953
1004
  }
@@ -955,17 +1006,17 @@ function Oa() {
955
1006
  }
956
1007
  }
957
1008
  var G = B.ReactCurrentDispatcher, V;
958
- function ae(i, f, g) {
1009
+ function ae(r, f, g) {
959
1010
  {
960
1011
  if (V === void 0)
961
1012
  try {
962
1013
  throw Error();
963
1014
  } catch (j) {
964
- var S = j.stack.trim().match(/\n( *(at )?)/);
965
- V = S && S[1] || "";
1015
+ var C = j.stack.trim().match(/\n( *(at )?)/);
1016
+ V = C && C[1] || "";
966
1017
  }
967
1018
  return `
968
- ` + V + i;
1019
+ ` + V + r;
969
1020
  }
970
1021
  }
971
1022
  var U = !1, X;
@@ -973,20 +1024,20 @@ function Oa() {
973
1024
  var ie = typeof WeakMap == "function" ? WeakMap : Map;
974
1025
  X = new ie();
975
1026
  }
976
- function R(i, f) {
977
- if (!i || U)
1027
+ function _(r, f) {
1028
+ if (!r || U)
978
1029
  return "";
979
1030
  {
980
- var g = X.get(i);
1031
+ var g = X.get(r);
981
1032
  if (g !== void 0)
982
1033
  return g;
983
1034
  }
984
- var S;
1035
+ var C;
985
1036
  U = !0;
986
1037
  var j = Error.prepareStackTrace;
987
1038
  Error.prepareStackTrace = void 0;
988
- var N;
989
- N = G.current, G.current = null, w();
1039
+ var L;
1040
+ L = G.current, G.current = null, w();
990
1041
  try {
991
1042
  if (f) {
992
1043
  var A = function() {
@@ -1000,199 +1051,199 @@ function Oa() {
1000
1051
  try {
1001
1052
  Reflect.construct(A, []);
1002
1053
  } catch (Te) {
1003
- S = Te;
1054
+ C = Te;
1004
1055
  }
1005
- Reflect.construct(i, [], A);
1056
+ Reflect.construct(r, [], A);
1006
1057
  } else {
1007
1058
  try {
1008
1059
  A.call();
1009
1060
  } catch (Te) {
1010
- S = Te;
1061
+ C = Te;
1011
1062
  }
1012
- i.call(A.prototype);
1063
+ r.call(A.prototype);
1013
1064
  }
1014
1065
  } else {
1015
1066
  try {
1016
1067
  throw Error();
1017
1068
  } catch (Te) {
1018
- S = Te;
1069
+ C = Te;
1019
1070
  }
1020
- i();
1071
+ r();
1021
1072
  }
1022
1073
  } catch (Te) {
1023
- if (Te && S && typeof Te.stack == "string") {
1074
+ if (Te && C && typeof Te.stack == "string") {
1024
1075
  for (var T = Te.stack.split(`
1025
- `), ue = S.stack.split(`
1026
- `), Z = T.length - 1, J = ue.length - 1; Z >= 1 && J >= 0 && T[Z] !== ue[J]; )
1076
+ `), de = C.stack.split(`
1077
+ `), Z = T.length - 1, J = de.length - 1; Z >= 1 && J >= 0 && T[Z] !== de[J]; )
1027
1078
  J--;
1028
1079
  for (; Z >= 1 && J >= 0; Z--, J--)
1029
- if (T[Z] !== ue[J]) {
1080
+ if (T[Z] !== de[J]) {
1030
1081
  if (Z !== 1 || J !== 1)
1031
1082
  do
1032
- if (Z--, J--, J < 0 || T[Z] !== ue[J]) {
1083
+ if (Z--, J--, J < 0 || T[Z] !== de[J]) {
1033
1084
  var Ee = `
1034
1085
  ` + T[Z].replace(" at new ", " at ");
1035
- return i.displayName && Ee.includes("<anonymous>") && (Ee = Ee.replace("<anonymous>", i.displayName)), typeof i == "function" && X.set(i, Ee), Ee;
1086
+ return r.displayName && Ee.includes("<anonymous>") && (Ee = Ee.replace("<anonymous>", r.displayName)), typeof r == "function" && X.set(r, Ee), Ee;
1036
1087
  }
1037
1088
  while (Z >= 1 && J >= 0);
1038
1089
  break;
1039
1090
  }
1040
1091
  }
1041
1092
  } finally {
1042
- U = !1, G.current = N, _(), Error.prepareStackTrace = j;
1093
+ U = !1, G.current = L, R(), Error.prepareStackTrace = j;
1043
1094
  }
1044
- var Ke = i ? i.displayName || i.name : "", Bt = Ke ? ae(Ke) : "";
1045
- return typeof i == "function" && X.set(i, Bt), Bt;
1095
+ var Ke = r ? r.displayName || r.name : "", Bt = Ke ? ae(Ke) : "";
1096
+ return typeof r == "function" && X.set(r, Bt), Bt;
1046
1097
  }
1047
- function F(i, f, g) {
1048
- return R(i, !1);
1098
+ function F(r, f, g) {
1099
+ return _(r, !1);
1049
1100
  }
1050
- function ne(i) {
1051
- var f = i.prototype;
1101
+ function ne(r) {
1102
+ var f = r.prototype;
1052
1103
  return !!(f && f.isReactComponent);
1053
1104
  }
1054
- function Se(i, f, g) {
1055
- if (i == null)
1105
+ function Ce(r, f, g) {
1106
+ if (r == null)
1056
1107
  return "";
1057
- if (typeof i == "function")
1058
- return R(i, ne(i));
1059
- if (typeof i == "string")
1060
- return ae(i);
1061
- switch (i) {
1062
- case d:
1108
+ if (typeof r == "function")
1109
+ return _(r, ne(r));
1110
+ if (typeof r == "string")
1111
+ return ae(r);
1112
+ switch (r) {
1113
+ case u:
1063
1114
  return ae("Suspense");
1064
1115
  case v:
1065
1116
  return ae("SuspenseList");
1066
1117
  }
1067
- if (typeof i == "object")
1068
- switch (i.$$typeof) {
1069
- case u:
1070
- return F(i.render);
1118
+ if (typeof r == "object")
1119
+ switch (r.$$typeof) {
1120
+ case d:
1121
+ return F(r.render);
1071
1122
  case b:
1072
- return Se(i.type, f, g);
1123
+ return Ce(r.type, f, g);
1073
1124
  case E: {
1074
- var S = i, j = S._payload, N = S._init;
1125
+ var C = r, j = C._payload, L = C._init;
1075
1126
  try {
1076
- return Se(N(j), f, g);
1127
+ return Ce(L(j), f, g);
1077
1128
  } catch {
1078
1129
  }
1079
1130
  }
1080
1131
  }
1081
1132
  return "";
1082
1133
  }
1083
- var Me = Object.prototype.hasOwnProperty, dt = {}, ft = B.ReactDebugCurrentFrame;
1084
- function Be(i) {
1085
- if (i) {
1086
- var f = i._owner, g = Se(i.type, i._source, f ? f.type : null);
1087
- ft.setExtraStackFrame(g);
1134
+ var Me = Object.prototype.hasOwnProperty, dt = {}, ut = B.ReactDebugCurrentFrame;
1135
+ function Be(r) {
1136
+ if (r) {
1137
+ var f = r._owner, g = Ce(r.type, r._source, f ? f.type : null);
1138
+ ut.setExtraStackFrame(g);
1088
1139
  } else
1089
- ft.setExtraStackFrame(null);
1140
+ ut.setExtraStackFrame(null);
1090
1141
  }
1091
- function et(i, f, g, S, j) {
1142
+ function et(r, f, g, C, j) {
1092
1143
  {
1093
- var N = Function.call.bind(Me);
1094
- for (var A in i)
1095
- if (N(i, A)) {
1144
+ var L = Function.call.bind(Me);
1145
+ for (var A in r)
1146
+ if (L(r, A)) {
1096
1147
  var T = void 0;
1097
1148
  try {
1098
- if (typeof i[A] != "function") {
1099
- var ue = Error((S || "React class") + ": " + g + " type `" + A + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof i[A] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
1100
- throw ue.name = "Invariant Violation", ue;
1149
+ if (typeof r[A] != "function") {
1150
+ var de = Error((C || "React class") + ": " + g + " 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`.");
1151
+ throw de.name = "Invariant Violation", de;
1101
1152
  }
1102
- T = i[A](f, A, S, g, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
1153
+ T = r[A](f, A, C, g, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
1103
1154
  } catch (Z) {
1104
1155
  T = Z;
1105
1156
  }
1106
- T && !(T instanceof Error) && (Be(j), M("%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", g, A, typeof T), Be(null)), T instanceof Error && !(T.message in dt) && (dt[T.message] = !0, Be(j), M("Failed %s type: %s", g, T.message), Be(null));
1157
+ T && !(T instanceof Error) && (Be(j), M("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", C || "React class", g, A, typeof T), Be(null)), T instanceof Error && !(T.message in dt) && (dt[T.message] = !0, Be(j), M("Failed %s type: %s", g, T.message), Be(null));
1107
1158
  }
1108
1159
  }
1109
1160
  }
1110
1161
  var Ue = Array.isArray;
1111
- function tt(i) {
1112
- return Ue(i);
1162
+ function tt(r) {
1163
+ return Ue(r);
1113
1164
  }
1114
- function wt(i) {
1165
+ function xt(r) {
1115
1166
  {
1116
- var f = typeof Symbol == "function" && Symbol.toStringTag, g = f && i[Symbol.toStringTag] || i.constructor.name || "Object";
1167
+ var f = typeof Symbol == "function" && Symbol.toStringTag, g = f && r[Symbol.toStringTag] || r.constructor.name || "Object";
1117
1168
  return g;
1118
1169
  }
1119
1170
  }
1120
- function ht(i) {
1171
+ function ht(r) {
1121
1172
  try {
1122
- return pt(i), !1;
1173
+ return ft(r), !1;
1123
1174
  } catch {
1124
1175
  return !0;
1125
1176
  }
1126
1177
  }
1127
- function pt(i) {
1128
- return "" + i;
1178
+ function ft(r) {
1179
+ return "" + r;
1129
1180
  }
1130
- function mt(i) {
1131
- if (ht(i))
1132
- return M("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", wt(i)), pt(i);
1181
+ function pt(r) {
1182
+ if (ht(r))
1183
+ return M("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", xt(r)), ft(r);
1133
1184
  }
1134
1185
  var je = B.ReactCurrentOwner, nt = {
1135
1186
  key: !0,
1136
1187
  ref: !0,
1137
1188
  __self: !0,
1138
1189
  __source: !0
1139
- }, at, vt, qe;
1190
+ }, at, mt, qe;
1140
1191
  qe = {};
1141
- function Ot(i) {
1142
- if (Me.call(i, "ref")) {
1143
- var f = Object.getOwnPropertyDescriptor(i, "ref").get;
1192
+ function wt(r) {
1193
+ if (Me.call(r, "ref")) {
1194
+ var f = Object.getOwnPropertyDescriptor(r, "ref").get;
1144
1195
  if (f && f.isReactWarning)
1145
1196
  return !1;
1146
1197
  }
1147
- return i.ref !== void 0;
1198
+ return r.ref !== void 0;
1148
1199
  }
1149
- function Mt(i) {
1150
- if (Me.call(i, "key")) {
1151
- var f = Object.getOwnPropertyDescriptor(i, "key").get;
1200
+ function Ot(r) {
1201
+ if (Me.call(r, "key")) {
1202
+ var f = Object.getOwnPropertyDescriptor(r, "key").get;
1152
1203
  if (f && f.isReactWarning)
1153
1204
  return !1;
1154
1205
  }
1155
- return i.key !== void 0;
1206
+ return r.key !== void 0;
1156
1207
  }
1157
- function gt(i, f) {
1158
- if (typeof i.ref == "string" && je.current && f && je.current.stateNode !== f) {
1208
+ function vt(r, f) {
1209
+ if (typeof r.ref == "string" && je.current && f && je.current.stateNode !== f) {
1159
1210
  var g = te(je.current.type);
1160
- qe[g] || (M('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', te(je.current.type), i.ref), qe[g] = !0);
1211
+ qe[g] || (M('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', te(je.current.type), r.ref), qe[g] = !0);
1161
1212
  }
1162
1213
  }
1163
- function De(i, f) {
1214
+ function De(r, f) {
1164
1215
  {
1165
1216
  var g = function() {
1166
1217
  at || (at = !0, M("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", f));
1167
1218
  };
1168
- g.isReactWarning = !0, Object.defineProperty(i, "key", {
1219
+ g.isReactWarning = !0, Object.defineProperty(r, "key", {
1169
1220
  get: g,
1170
1221
  configurable: !0
1171
1222
  });
1172
1223
  }
1173
1224
  }
1174
- function Ft(i, f) {
1225
+ function Ft(r, f) {
1175
1226
  {
1176
1227
  var g = function() {
1177
- vt || (vt = !0, M("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", f));
1228
+ mt || (mt = !0, M("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", f));
1178
1229
  };
1179
- g.isReactWarning = !0, Object.defineProperty(i, "ref", {
1230
+ g.isReactWarning = !0, Object.defineProperty(r, "ref", {
1180
1231
  get: g,
1181
1232
  configurable: !0
1182
1233
  });
1183
1234
  }
1184
1235
  }
1185
- var s = function(i, f, g, S, j, N, A) {
1236
+ var s = function(r, f, g, C, j, L, A) {
1186
1237
  var T = {
1187
1238
  // This tag allows us to uniquely identify this as a React Element
1188
1239
  $$typeof: n,
1189
1240
  // Built-in properties that belong on the element
1190
- type: i,
1241
+ type: r,
1191
1242
  key: f,
1192
1243
  ref: g,
1193
1244
  props: A,
1194
1245
  // Record the component responsible for creating this element.
1195
- _owner: N
1246
+ _owner: L
1196
1247
  };
1197
1248
  return T._store = {}, Object.defineProperty(T._store, "validated", {
1198
1249
  configurable: !1,
@@ -1203,7 +1254,7 @@ function Oa() {
1203
1254
  configurable: !1,
1204
1255
  enumerable: !1,
1205
1256
  writable: !1,
1206
- value: S
1257
+ value: C
1207
1258
  }), Object.defineProperty(T, "_source", {
1208
1259
  configurable: !1,
1209
1260
  enumerable: !1,
@@ -1211,53 +1262,53 @@ function Oa() {
1211
1262
  value: j
1212
1263
  }), Object.freeze && (Object.freeze(T.props), Object.freeze(T)), T;
1213
1264
  };
1214
- function y(i, f, g, S, j) {
1265
+ function y(r, f, g, C, j) {
1215
1266
  {
1216
- var N, A = {}, T = null, ue = null;
1217
- g !== void 0 && (mt(g), T = "" + g), Mt(f) && (mt(f.key), T = "" + f.key), Ot(f) && (ue = f.ref, gt(f, j));
1218
- for (N in f)
1219
- Me.call(f, N) && !nt.hasOwnProperty(N) && (A[N] = f[N]);
1220
- if (i && i.defaultProps) {
1221
- var Z = i.defaultProps;
1222
- for (N in Z)
1223
- A[N] === void 0 && (A[N] = Z[N]);
1267
+ var L, A = {}, T = null, de = null;
1268
+ g !== void 0 && (pt(g), T = "" + g), Ot(f) && (pt(f.key), T = "" + f.key), wt(f) && (de = f.ref, vt(f, j));
1269
+ for (L in f)
1270
+ Me.call(f, L) && !nt.hasOwnProperty(L) && (A[L] = f[L]);
1271
+ if (r && r.defaultProps) {
1272
+ var Z = r.defaultProps;
1273
+ for (L in Z)
1274
+ A[L] === void 0 && (A[L] = Z[L]);
1224
1275
  }
1225
- if (T || ue) {
1226
- var J = typeof i == "function" ? i.displayName || i.name || "Unknown" : i;
1227
- T && De(A, J), ue && Ft(A, J);
1276
+ if (T || de) {
1277
+ var J = typeof r == "function" ? r.displayName || r.name || "Unknown" : r;
1278
+ T && De(A, J), de && Ft(A, J);
1228
1279
  }
1229
- return s(i, T, ue, j, S, je.current, A);
1280
+ return s(r, T, de, j, C, je.current, A);
1230
1281
  }
1231
1282
  }
1232
- var O = B.ReactCurrentOwner, L = B.ReactDebugCurrentFrame;
1233
- function H(i) {
1234
- if (i) {
1235
- var f = i._owner, g = Se(i.type, i._source, f ? f.type : null);
1236
- L.setExtraStackFrame(g);
1283
+ var O = B.ReactCurrentOwner, N = B.ReactDebugCurrentFrame;
1284
+ function H(r) {
1285
+ if (r) {
1286
+ var f = r._owner, g = Ce(r.type, r._source, f ? f.type : null);
1287
+ N.setExtraStackFrame(g);
1237
1288
  } else
1238
- L.setExtraStackFrame(null);
1289
+ N.setExtraStackFrame(null);
1239
1290
  }
1240
1291
  var be;
1241
1292
  be = !1;
1242
- function le(i) {
1243
- return typeof i == "object" && i !== null && i.$$typeof === n;
1293
+ function le(r) {
1294
+ return typeof r == "object" && r !== null && r.$$typeof === n;
1244
1295
  }
1245
- function Tt() {
1296
+ function Mt() {
1246
1297
  {
1247
1298
  if (O.current) {
1248
- var i = te(O.current.type);
1249
- if (i)
1299
+ var r = te(O.current.type);
1300
+ if (r)
1250
1301
  return `
1251
1302
 
1252
- Check the render method of \`` + i + "`.";
1303
+ Check the render method of \`` + r + "`.";
1253
1304
  }
1254
1305
  return "";
1255
1306
  }
1256
1307
  }
1257
- function _t(i) {
1308
+ function Tt(r) {
1258
1309
  {
1259
- if (i !== void 0) {
1260
- var f = i.fileName.replace(/^.*[\\\/]/, ""), g = i.lineNumber;
1310
+ if (r !== void 0) {
1311
+ var f = r.fileName.replace(/^.*[\\\/]/, ""), g = r.lineNumber;
1261
1312
  return `
1262
1313
 
1263
1314
  Check your code at ` + f + ":" + g + ".";
@@ -1266,11 +1317,11 @@ Check your code at ` + f + ":" + g + ".";
1266
1317
  }
1267
1318
  }
1268
1319
  var it = {};
1269
- function xe(i) {
1320
+ function xe(r) {
1270
1321
  {
1271
- var f = Tt();
1322
+ var f = Mt();
1272
1323
  if (!f) {
1273
- var g = typeof i == "string" ? i : i.displayName || i.name;
1324
+ var g = typeof r == "string" ? r : r.displayName || r.name;
1274
1325
  g && (f = `
1275
1326
 
1276
1327
  Check the top-level render call using <` + g + ">.");
@@ -1278,55 +1329,55 @@ Check the top-level render call using <` + g + ">.");
1278
1329
  return f;
1279
1330
  }
1280
1331
  }
1281
- function ye(i, f) {
1332
+ function ye(r, f) {
1282
1333
  {
1283
- if (!i._store || i._store.validated || i.key != null)
1334
+ if (!r._store || r._store.validated || r.key != null)
1284
1335
  return;
1285
- i._store.validated = !0;
1336
+ r._store.validated = !0;
1286
1337
  var g = xe(f);
1287
1338
  if (it[g])
1288
1339
  return;
1289
1340
  it[g] = !0;
1290
- var S = "";
1291
- i && i._owner && i._owner !== O.current && (S = " It was passed a child from " + te(i._owner.type) + "."), H(i), M('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', g, S), H(null);
1341
+ var C = "";
1342
+ r && r._owner && r._owner !== O.current && (C = " It was passed a child from " + te(r._owner.type) + "."), H(r), M('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', g, C), H(null);
1292
1343
  }
1293
1344
  }
1294
- function $e(i, f) {
1345
+ function $e(r, f) {
1295
1346
  {
1296
- if (typeof i != "object")
1347
+ if (typeof r != "object")
1297
1348
  return;
1298
- if (tt(i))
1299
- for (var g = 0; g < i.length; g++) {
1300
- var S = i[g];
1301
- le(S) && ye(S, f);
1349
+ if (tt(r))
1350
+ for (var g = 0; g < r.length; g++) {
1351
+ var C = r[g];
1352
+ le(C) && ye(C, f);
1302
1353
  }
1303
- else if (le(i))
1304
- i._store && (i._store.validated = !0);
1305
- else if (i) {
1306
- var j = q(i);
1307
- if (typeof j == "function" && j !== i.entries)
1308
- for (var N = j.call(i), A; !(A = N.next()).done; )
1354
+ else if (le(r))
1355
+ r._store && (r._store.validated = !0);
1356
+ else if (r) {
1357
+ var j = q(r);
1358
+ if (typeof j == "function" && j !== r.entries)
1359
+ for (var L = j.call(r), A; !(A = L.next()).done; )
1309
1360
  le(A.value) && ye(A.value, f);
1310
1361
  }
1311
1362
  }
1312
1363
  }
1313
- function ze(i) {
1364
+ function ze(r) {
1314
1365
  {
1315
- var f = i.type;
1366
+ var f = r.type;
1316
1367
  if (f == null || typeof f == "string")
1317
1368
  return;
1318
1369
  var g;
1319
1370
  if (typeof f == "function")
1320
1371
  g = f.propTypes;
1321
- else if (typeof f == "object" && (f.$$typeof === u || // Note: Memo only checks outer props here.
1372
+ else if (typeof f == "object" && (f.$$typeof === d || // Note: Memo only checks outer props here.
1322
1373
  // Inner props are checked in the reconciler.
1323
1374
  f.$$typeof === b))
1324
1375
  g = f.propTypes;
1325
1376
  else
1326
1377
  return;
1327
1378
  if (g) {
1328
- var S = te(f);
1329
- et(g, i.props, "prop", S, i);
1379
+ var C = te(f);
1380
+ et(g, r.props, "prop", C, r);
1330
1381
  } else if (f.PropTypes !== void 0 && !be) {
1331
1382
  be = !0;
1332
1383
  var j = te(f);
@@ -1335,68 +1386,68 @@ Check the top-level render call using <` + g + ">.");
1335
1386
  typeof f.getDefaultProps == "function" && !f.getDefaultProps.isReactClassApproved && M("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
1336
1387
  }
1337
1388
  }
1338
- function Ye(i) {
1389
+ function Ye(r) {
1339
1390
  {
1340
- for (var f = Object.keys(i.props), g = 0; g < f.length; g++) {
1341
- var S = f[g];
1342
- if (S !== "children" && S !== "key") {
1343
- H(i), M("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", S), H(null);
1391
+ for (var f = Object.keys(r.props), g = 0; g < f.length; g++) {
1392
+ var C = f[g];
1393
+ if (C !== "children" && C !== "key") {
1394
+ H(r), M("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", C), H(null);
1344
1395
  break;
1345
1396
  }
1346
1397
  }
1347
- i.ref !== null && (H(i), M("Invalid attribute `ref` supplied to `React.Fragment`."), H(null));
1398
+ r.ref !== null && (H(r), M("Invalid attribute `ref` supplied to `React.Fragment`."), H(null));
1348
1399
  }
1349
1400
  }
1350
- function Ge(i, f, g, S, j, N) {
1401
+ function Ge(r, f, g, C, j, L) {
1351
1402
  {
1352
- var A = Fe(i);
1403
+ var A = Fe(r);
1353
1404
  if (!A) {
1354
1405
  var T = "";
1355
- (i === void 0 || typeof i == "object" && i !== null && Object.keys(i).length === 0) && (T += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
1356
- var ue = _t(j);
1357
- ue ? T += ue : T += Tt();
1406
+ (r === void 0 || typeof r == "object" && r !== null && Object.keys(r).length === 0) && (T += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
1407
+ var de = Tt(j);
1408
+ de ? T += de : T += Mt();
1358
1409
  var Z;
1359
- i === null ? Z = "null" : tt(i) ? Z = "array" : i !== void 0 && i.$$typeof === n ? (Z = "<" + (te(i.type) || "Unknown") + " />", T = " Did you accidentally export a JSX literal instead of a component?") : Z = typeof i, M("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", Z, T);
1410
+ r === null ? Z = "null" : tt(r) ? Z = "array" : r !== void 0 && r.$$typeof === n ? (Z = "<" + (te(r.type) || "Unknown") + " />", T = " Did you accidentally export a JSX literal instead of a component?") : Z = typeof r, M("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", Z, T);
1360
1411
  }
1361
- var J = y(i, f, g, j, N);
1412
+ var J = y(r, f, g, j, L);
1362
1413
  if (J == null)
1363
1414
  return J;
1364
1415
  if (A) {
1365
1416
  var Ee = f.children;
1366
1417
  if (Ee !== void 0)
1367
- if (S)
1418
+ if (C)
1368
1419
  if (tt(Ee)) {
1369
1420
  for (var Ke = 0; Ke < Ee.length; Ke++)
1370
- $e(Ee[Ke], i);
1421
+ $e(Ee[Ke], r);
1371
1422
  Object.freeze && Object.freeze(Ee);
1372
1423
  } else
1373
1424
  M("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
1374
1425
  else
1375
- $e(Ee, i);
1426
+ $e(Ee, r);
1376
1427
  }
1377
- return i === t ? Ye(J) : ze(J), J;
1428
+ return r === e ? Ye(J) : ze(J), J;
1378
1429
  }
1379
1430
  }
1380
- function Rn(i, f, g) {
1381
- return Ge(i, f, g, !0);
1431
+ function Rn(r, f, g) {
1432
+ return Ge(r, f, g, !0);
1382
1433
  }
1383
- function An(i, f, g) {
1384
- return Ge(i, f, g, !1);
1434
+ function _n(r, f, g) {
1435
+ return Ge(r, f, g, !1);
1385
1436
  }
1386
- var Pn = An, kn = Rn;
1387
- st.Fragment = t, st.jsx = Pn, st.jsxs = kn;
1437
+ var An = _n, Pn = Rn;
1438
+ st.Fragment = e, st.jsx = An, st.jsxs = Pn;
1388
1439
  }()), st;
1389
1440
  }
1390
- process.env.NODE_ENV === "production" ? Lt.exports = wa() : Lt.exports = Oa();
1391
- var l = Lt.exports;
1392
- function Mn(e) {
1393
- return e.title.search("<") > -1 ? /* @__PURE__ */ l.jsx("button", { className: "svg", dangerouslySetInnerHTML: { __html: e.title } }) : /* @__PURE__ */ l.jsx("button", { children: e.title });
1441
+ process.env.NODE_ENV === "production" ? It.exports = Sa() : It.exports = Ca();
1442
+ var l = It.exports;
1443
+ function On(t) {
1444
+ return t.title.search("<") > -1 ? /* @__PURE__ */ l.jsx("button", { className: "svg", dangerouslySetInnerHTML: { __html: t.title } }) : /* @__PURE__ */ l.jsx("button", { children: t.title });
1394
1445
  }
1395
- const Ma = /* @__PURE__ */ l.jsxs("svg", { className: "closeIcon", width: "14", height: "14", fill: "none", stroke: "#666666", strokeMiterlimit: "10", children: [
1446
+ const xa = /* @__PURE__ */ l.jsxs("svg", { className: "closeIcon", width: "14", height: "14", fill: "none", stroke: "#666666", strokeMiterlimit: "10", children: [
1396
1447
  /* @__PURE__ */ l.jsx("circle", { cx: "7", cy: "7", r: "6" }),
1397
1448
  /* @__PURE__ */ l.jsx("line", { x1: "4", y1: "4", x2: "10", y2: "10" }),
1398
1449
  /* @__PURE__ */ l.jsx("line", { x1: "4", y1: "10", x2: "10", y2: "4" })
1399
- ] }), Ta = /* @__PURE__ */ l.jsx("svg", { className: "dragIcon", width: "14", height: "14", fill: "#666666", stroke: "none", children: /* @__PURE__ */ l.jsx(
1450
+ ] }), wa = /* @__PURE__ */ l.jsx("svg", { className: "dragIcon", width: "14", height: "14", fill: "#666666", stroke: "none", children: /* @__PURE__ */ l.jsx(
1400
1451
  "path",
1401
1452
  {
1402
1453
  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
@@ -1404,76 +1455,76 @@ 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
1404
1455
  C11,8.22,10.74,8,10.43,8z`
1405
1456
  }
1406
1457
  ) });
1407
- function _a(e) {
1408
- return /* @__PURE__ */ l.jsx(Cn.Item, { value: e.title, children: /* @__PURE__ */ l.jsxs("div", { children: [
1409
- Ta,
1410
- /* @__PURE__ */ l.jsx("span", { children: e.title }),
1458
+ function Oa(t) {
1459
+ return /* @__PURE__ */ l.jsx(En.Item, { value: t.title, children: /* @__PURE__ */ l.jsxs("div", { children: [
1460
+ wa,
1461
+ /* @__PURE__ */ l.jsx("span", { children: t.title }),
1411
1462
  /* @__PURE__ */ l.jsx("button", { className: "closeIcon", onClick: () => {
1412
- e.onDelete(e.index);
1413
- }, children: Ma })
1414
- ] }) }, e.title);
1415
- }
1416
- function Ra(e) {
1417
- const [n, a] = oe(!1), [t, r] = oe(e.options), c = (d) => {
1418
- e.onDragComplete(d), r(d);
1419
- }, p = (d) => {
1420
- const v = [...t];
1421
- v.splice(d, 1), c(v);
1422
- }, o = [];
1423
- t.forEach((d, v) => {
1424
- o.push(/* @__PURE__ */ l.jsx(_a, { index: v, title: d, onDelete: p }, d));
1463
+ t.onDelete(t.index);
1464
+ }, children: xa })
1465
+ ] }) }, t.title);
1466
+ }
1467
+ function Ma(t) {
1468
+ const [n, a] = oe(!1), [e, i] = oe(t.options), o = (u) => {
1469
+ t.onDragComplete(u), i(u);
1470
+ }, h = (u) => {
1471
+ const v = [...e];
1472
+ v.splice(u, 1), o(v);
1473
+ }, c = [];
1474
+ e.forEach((u, v) => {
1475
+ c.push(/* @__PURE__ */ l.jsx(Oa, { index: v, title: u, onDelete: h }, u));
1425
1476
  });
1426
- let u = "dropdown draggable";
1427
- return e.subdropdown && (u += " subdropdown"), /* @__PURE__ */ l.jsxs("div", { className: u, onMouseEnter: () => a(!0), onMouseLeave: () => a(!1), children: [
1428
- /* @__PURE__ */ l.jsx(Mn, { title: e.title }),
1429
- /* @__PURE__ */ l.jsx(Cn.Group, { axis: "y", values: t, onReorder: c, style: { visibility: n ? "visible" : "hidden" }, children: o })
1477
+ let d = "dropdown draggable";
1478
+ return t.subdropdown && (d += " subdropdown"), /* @__PURE__ */ l.jsxs("div", { className: d, onMouseEnter: () => a(!0), onMouseLeave: () => a(!1), children: [
1479
+ /* @__PURE__ */ l.jsx(On, { title: t.title }),
1480
+ /* @__PURE__ */ l.jsx(En.Group, { axis: "y", values: e, onReorder: o, style: { visibility: n ? "visible" : "hidden" }, children: c })
1430
1481
  ] });
1431
1482
  }
1432
- function Aa(e) {
1433
- const [n, a] = oe(!1), t = [];
1434
- e.options.map((c, p) => {
1435
- e.onSelect !== void 0 && (c.onSelect = e.onSelect), t.push(/* @__PURE__ */ l.jsx(Pa, { option: c }, p));
1483
+ function Ta(t) {
1484
+ const [n, a] = oe(!1), e = [];
1485
+ t.options.map((o, h) => {
1486
+ t.onSelect !== void 0 && (o.onSelect = t.onSelect), e.push(/* @__PURE__ */ l.jsx(Ra, { option: o }, h));
1436
1487
  });
1437
- let r = "dropdown";
1438
- return e.subdropdown && (r += " subdropdown"), /* @__PURE__ */ l.jsxs(
1488
+ let i = "dropdown";
1489
+ return t.subdropdown && (i += " subdropdown"), /* @__PURE__ */ l.jsxs(
1439
1490
  "div",
1440
1491
  {
1441
- className: r,
1492
+ className: i,
1442
1493
  onMouseEnter: () => a(!0),
1443
1494
  onMouseLeave: () => a(!1),
1444
1495
  children: [
1445
- /* @__PURE__ */ l.jsx(Mn, { title: e.title }),
1496
+ /* @__PURE__ */ l.jsx(On, { title: t.title }),
1446
1497
  /* @__PURE__ */ l.jsx(
1447
1498
  "ul",
1448
1499
  {
1449
1500
  style: { visibility: n ? "visible" : "hidden" },
1450
- children: t
1501
+ children: e
1451
1502
  }
1452
1503
  )
1453
1504
  ]
1454
1505
  }
1455
1506
  );
1456
1507
  }
1457
- function Pa(e) {
1458
- const { option: n } = e, [a, t] = oe("");
1459
- let r;
1508
+ function Ra(t) {
1509
+ const { option: n } = t, [a, e] = oe("");
1510
+ let i;
1460
1511
  switch (n.type) {
1461
1512
  case "draggable":
1462
- r = /* @__PURE__ */ l.jsx(
1463
- Ra,
1513
+ i = /* @__PURE__ */ l.jsx(
1514
+ Ma,
1464
1515
  {
1465
1516
  title: n.title,
1466
1517
  options: n.value,
1467
- onDragComplete: (c) => {
1468
- n.onDragComplete !== void 0 && n.onDragComplete(c);
1518
+ onDragComplete: (o) => {
1519
+ n.onDragComplete !== void 0 && n.onDragComplete(o);
1469
1520
  },
1470
1521
  subdropdown: !0
1471
1522
  }
1472
1523
  );
1473
1524
  break;
1474
1525
  case "dropdown":
1475
- r = /* @__PURE__ */ l.jsx(
1476
- Aa,
1526
+ i = /* @__PURE__ */ l.jsx(
1527
+ Ta,
1477
1528
  {
1478
1529
  title: n.title,
1479
1530
  options: n.value,
@@ -1483,62 +1534,52 @@ function Pa(e) {
1483
1534
  );
1484
1535
  break;
1485
1536
  case "option":
1486
- r = /* @__PURE__ */ l.jsx(
1537
+ i = /* @__PURE__ */ l.jsx(
1487
1538
  "button",
1488
1539
  {
1489
1540
  onClick: () => {
1490
- n.onSelect !== void 0 && n.onSelect(n.value), n.selectable && (a !== n.title ? t(n.title) : t(""));
1541
+ n.onSelect !== void 0 && n.onSelect(n.value), n.selectable && (a !== n.title ? e(n.title) : e(""));
1491
1542
  },
1492
1543
  children: n.title
1493
1544
  }
1494
1545
  );
1495
1546
  break;
1496
1547
  }
1497
- return /* @__PURE__ */ l.jsx("li", { className: a === n.title ? "selected" : "", children: r }, pa());
1548
+ return /* @__PURE__ */ l.jsx("li", { className: a === n.title ? "selected" : "", children: i }, ha());
1498
1549
  }
1499
- class ct {
1500
- appHandlers = [];
1501
- editorHandlers = [];
1502
- _app;
1503
- static _instance;
1504
- handleAppBroadcast = (n) => {
1505
- switch (this.appHandlers.forEach((a) => {
1506
- a.callback(this._app, a.remote, n);
1507
- }), n.event) {
1550
+ function mi(t, n, a) {
1551
+ function e(o) {
1552
+ switch (n.forEach((h) => {
1553
+ h.callback(t, h.remote, o);
1554
+ }), o.event) {
1508
1555
  case "custom":
1509
- P.dispatchEvent({ type: k.CUSTOM, value: n.data });
1556
+ P.dispatchEvent({ type: k.CUSTOM, value: o.data });
1510
1557
  break;
1511
1558
  }
1512
- };
1513
- handleEditorBroadcast = (n) => {
1514
- switch (this.editorHandlers.forEach((a) => {
1515
- a.callback(this._app, a.remote, n);
1516
- }), n.event) {
1559
+ }
1560
+ function i(o) {
1561
+ switch (a.forEach((h) => {
1562
+ h.callback(t, h.remote, o);
1563
+ }), o.event) {
1517
1564
  case "custom":
1518
- P.dispatchEvent({ type: k.CUSTOM, value: n.data });
1565
+ P.dispatchEvent({ type: k.CUSTOM, value: o.data });
1519
1566
  break;
1520
1567
  }
1521
- };
1522
- set app(n) {
1523
- this._app = n, n.listen = (a) => {
1524
- a.target === "editor" ? this.handleEditorBroadcast(a) : this.handleAppBroadcast(a);
1525
- };
1526
- }
1527
- // Singleton
1528
- static get instance() {
1529
- return ct._instance === void 0 && (ct._instance = new ct()), ct._instance;
1530
1568
  }
1569
+ t.listen = (o) => {
1570
+ o.target === "editor" ? i(o) : e(o);
1571
+ };
1531
1572
  }
1532
- function Nt(e) {
1533
- const [n, a] = oe(e.open !== void 0 ? e.open : !0), t = !n || e.children === void 0;
1534
- return /* @__PURE__ */ l.jsxs("div", { className: `accordion ${t ? "hide" : ""}`, children: [
1573
+ function Lt(t) {
1574
+ const [n, a] = oe(t.open !== void 0 ? t.open : !0), e = !n || t.children === void 0;
1575
+ return /* @__PURE__ */ l.jsxs("div", { className: `accordion ${e ? "hide" : ""}`, children: [
1535
1576
  /* @__PURE__ */ l.jsxs(
1536
1577
  "button",
1537
1578
  {
1538
1579
  className: "toggle",
1539
1580
  onClick: () => {
1540
- const r = !n;
1541
- e.onToggle !== void 0 && e.onToggle(r), a(r);
1581
+ const i = !n;
1582
+ t.onToggle !== void 0 && t.onToggle(i), a(i);
1542
1583
  },
1543
1584
  children: [
1544
1585
  /* @__PURE__ */ l.jsx(
@@ -1548,21 +1589,21 @@ function Nt(e) {
1548
1589
  children: "Toggle"
1549
1590
  }
1550
1591
  ),
1551
- /* @__PURE__ */ l.jsx("p", { className: "label", children: ut(e.label) })
1592
+ /* @__PURE__ */ l.jsx("p", { className: "label", children: lt(t.label) })
1552
1593
  ]
1553
1594
  }
1554
1595
  ),
1555
- e.button,
1556
- /* @__PURE__ */ l.jsx("div", { className: n ? "open" : "", children: /* @__PURE__ */ l.jsx("div", { children: e.children }) })
1596
+ t.button,
1597
+ /* @__PURE__ */ l.jsx("div", { className: n ? "open" : "", children: /* @__PURE__ */ l.jsx("div", { children: t.children }) })
1557
1598
  ] });
1558
1599
  }
1559
- function Tn(e) {
1560
- const [n, a] = oe(!1), t = e.child !== void 0 && e.child.children.length > 0, r = [];
1561
- return e.child !== void 0 && e.child.children.length > 0 && e.child.children.map((c) => {
1562
- r.push(/* @__PURE__ */ l.jsx(Tn, { child: c, three: e.three }, Math.random()));
1563
- }), /* @__PURE__ */ l.jsx(l.Fragment, { children: e.child !== void 0 && /* @__PURE__ */ l.jsxs("div", { className: "childObject", children: [
1600
+ function Mn(t) {
1601
+ const [n, a] = oe(!1), e = t.child !== void 0 && t.child.children.length > 0, i = [];
1602
+ return t.child !== void 0 && t.child.children.length > 0 && t.child.children.map((o) => {
1603
+ i.push(/* @__PURE__ */ l.jsx(Mn, { child: o, three: t.three }, Math.random()));
1604
+ }), /* @__PURE__ */ l.jsx(l.Fragment, { children: t.child !== void 0 && /* @__PURE__ */ l.jsxs("div", { className: "childObject", children: [
1564
1605
  /* @__PURE__ */ l.jsxs("div", { className: "child", children: [
1565
- t ? /* @__PURE__ */ l.jsx(
1606
+ e ? /* @__PURE__ */ l.jsx(
1566
1607
  "button",
1567
1608
  {
1568
1609
  className: "status",
@@ -1579,37 +1620,37 @@ function Tn(e) {
1579
1620
  {
1580
1621
  className: "name",
1581
1622
  style: {
1582
- left: t ? "20px" : "5px"
1623
+ left: e ? "20px" : "5px"
1583
1624
  },
1584
1625
  onClick: () => {
1585
- e.child !== void 0 && (e.three.getObject(e.child.uuid), n || a(!0));
1626
+ t.child !== void 0 && (t.three.getObject(t.child.uuid), n || a(!0));
1586
1627
  },
1587
- children: e.child.name.length > 0 ? `${e.child.name} (${e.child.type})` : `${e.child.type}::${e.child.uuid}`
1628
+ children: t.child.name.length > 0 ? `${t.child.name} (${t.child.type})` : `${t.child.type}::${t.child.uuid}`
1588
1629
  }
1589
1630
  ),
1590
- /* @__PURE__ */ l.jsx("div", { className: `icon ${Ea(e.child)}` })
1631
+ /* @__PURE__ */ l.jsx("div", { className: `icon ${ga(t.child)}` })
1591
1632
  ] }),
1592
- /* @__PURE__ */ l.jsx("div", { className: n ? "open" : "", children: /* @__PURE__ */ l.jsx("div", { className: "container", children: r }) })
1633
+ /* @__PURE__ */ l.jsx("div", { className: n ? "open" : "", children: /* @__PURE__ */ l.jsx("div", { className: "container", children: i }) })
1593
1634
  ] }, Math.random()) });
1594
1635
  }
1595
- function ka(e) {
1636
+ function _a(t) {
1596
1637
  const n = [];
1597
- return e.child?.children.map((a) => {
1598
- n.push(/* @__PURE__ */ l.jsx(Tn, { child: a, three: e.three }, Math.random()));
1599
- }), /* @__PURE__ */ l.jsx("div", { className: `scene ${e.class !== void 0 ? e.class : ""}`, children: n });
1638
+ return t.child?.children.map((a) => {
1639
+ n.push(/* @__PURE__ */ l.jsx(Mn, { child: a, three: t.three }, Math.random()));
1640
+ }), /* @__PURE__ */ l.jsx("div", { className: `scene ${t.class !== void 0 ? t.class : ""}`, children: n });
1600
1641
  }
1601
- const ja = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAACXBIWXMAAAsTAAALEwEAmpwYAAAA5klEQVRoge2Y0Q6EIAwE6cX//+X6cCFpSMEKVTdk501OpRNKiyelFC0b8Ps6gCwoggZF0KAIGhRBgyJoUAQNiqCxjciR9SLV//eZiAyvK3U8i/QVaQO2YyLSFVvlkdTKDjJCukh2ykR5ZEW+kHmlatl90RaBtDkK/w7CYhuRUEO0ee3l+J3m55Vm+17vtwjTnV1V3QA8qfbeUXCzRWDpiLLS+OyzvRW7IzW9R+okvclsqR09743bo0yUpc1+lSJvNsa002+Euk9GKzV7SmZDRIMiaFAEDYqgQRE0KIIGRdCgCBoUQeMEMERadX7YUz8AAAAASUVORK5CYII=";
1602
- function Da(e) {
1603
- return "items" in e;
1642
+ const Aa = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAACXBIWXMAAAsTAAALEwEAmpwYAAAA5klEQVRoge2Y0Q6EIAwE6cX//+X6cCFpSMEKVTdk501OpRNKiyelFC0b8Ps6gCwoggZF0KAIGhRBgyJoUAQNiqCxjciR9SLV//eZiAyvK3U8i/QVaQO2YyLSFVvlkdTKDjJCukh2ykR5ZEW+kHmlatl90RaBtDkK/w7CYhuRUEO0ee3l+J3m55Vm+17vtwjTnV1V3QA8qfbeUXCzRWDpiLLS+OyzvRW7IzW9R+okvclsqR09743bo0yUpc1+lSJvNsa002+Euk9GKzV7SmZDRIMiaFAEDYqgQRE0KIIGRdCgCBoUQeMEMERadX7YUz8AAAAASUVORK5CYII=";
1643
+ function Pa(t) {
1644
+ return "items" in t;
1604
1645
  }
1605
- function We(e) {
1646
+ function We(t) {
1606
1647
  const n = [];
1607
- return e.items.forEach((a) => {
1608
- Da(a) ? n.push(
1609
- /* @__PURE__ */ l.jsx(We, { title: ut(a.title), items: a.items }, Math.random())
1648
+ return t.items.forEach((a) => {
1649
+ Pa(a) ? n.push(
1650
+ /* @__PURE__ */ l.jsx(We, { title: lt(a.title), items: a.items }, Math.random())
1610
1651
  ) : n.push(
1611
1652
  /* @__PURE__ */ l.jsx(
1612
- lt,
1653
+ ct,
1613
1654
  {
1614
1655
  title: a.title,
1615
1656
  prop: a.prop,
@@ -1620,20 +1661,20 @@ function We(e) {
1620
1661
  step: a.step,
1621
1662
  disabled: a.disabled,
1622
1663
  options: a.options,
1623
- onChange: (t, r) => {
1624
- a.onChange !== void 0 && a.onChange(t, r);
1664
+ onChange: (e, i) => {
1665
+ a.onChange !== void 0 && a.onChange(e, i);
1625
1666
  }
1626
1667
  },
1627
1668
  Math.random()
1628
1669
  )
1629
1670
  );
1630
- }), /* @__PURE__ */ l.jsx(Nt, { label: e.title, open: e.expanded === !0, children: n });
1671
+ }), /* @__PURE__ */ l.jsx(Lt, { label: t.title, open: t.expanded === !0, children: n });
1631
1672
  }
1632
- function Ia(e) {
1633
- return !(e === "alphaHash" || e === "alphaToCoverage" || e === "attenuationDistance" || 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");
1673
+ function ka(t) {
1674
+ return !(t === "alphaHash" || t === "alphaToCoverage" || t === "attenuationDistance" || t === "blendDstAlpha" || t === "colorWrite" || t === "combine" || t === "defaultAttributeValues" || t === "depthFunc" || t === "forceSinglePass" || t === "glslVersion" || t === "linecap" || t === "linejoin" || t === "linewidth" || t === "normalMapType" || t === "precision" || t === "premultipliedAlpha" || t === "shadowSide" || t === "toneMapped" || t === "uniformsGroups" || t === "uniformsNeedUpdate" || t === "userData" || t === "vertexColors" || t === "version" || t === "wireframeLinecap" || t === "wireframeLinejoin" || t === "wireframeLinewidth" || t.slice(0, 4) === "clip" || t.slice(0, 7) === "polygon" || t.slice(0, 7) === "stencil" || t.slice(0, 2) === "is");
1634
1675
  }
1635
- function Ve(e) {
1636
- switch (e) {
1676
+ function Ve(t) {
1677
+ switch (t) {
1637
1678
  case "alphaMap":
1638
1679
  return "Alpha Map";
1639
1680
  case "anisotropyMap":
@@ -1803,109 +1844,109 @@ function Ve(e) {
1803
1844
  case "wireframe":
1804
1845
  return "Wireframe";
1805
1846
  }
1806
- return e;
1847
+ return t;
1807
1848
  }
1808
- function La(e) {
1809
- return e.toLowerCase().search("intensity") > -1 || e === "anisotropyRotation" || e === "blendAlpha" || e === "bumpScale" || e === "clearcoatRoughness" || e === "displacementBias" || e === "displacementScale" || e === "metalness" || e === "opacity" || e === "reflectivity" || e === "refractionRatio" || e === "roughness" || e === "sheenRoughness" || e === "thickness";
1849
+ function ja(t) {
1850
+ return t.toLowerCase().search("intensity") > -1 || t === "anisotropyRotation" || t === "blendAlpha" || t === "bumpScale" || t === "clearcoatRoughness" || t === "displacementBias" || t === "displacementScale" || t === "metalness" || t === "opacity" || t === "reflectivity" || t === "refractionRatio" || t === "roughness" || t === "sheenRoughness" || t === "thickness";
1810
1851
  }
1811
- function Na() {
1812
- const e = document.createElement("input");
1813
- return e.type = "file", new Promise((n, a) => {
1814
- e.addEventListener("change", function() {
1815
- if (e.files === null)
1852
+ function Da() {
1853
+ const t = document.createElement("input");
1854
+ return t.type = "file", new Promise((n, a) => {
1855
+ t.addEventListener("change", function() {
1856
+ if (t.files === null)
1816
1857
  a();
1817
1858
  else {
1818
- const t = e.files[0], r = new FileReader();
1819
- r.onload = function(c) {
1820
- n(c.target.result);
1821
- }, r.readAsDataURL(t);
1859
+ const e = t.files[0], i = new FileReader();
1860
+ i.onload = function(o) {
1861
+ n(o.target.result);
1862
+ }, i.readAsDataURL(e);
1822
1863
  }
1823
- }), e.click();
1864
+ }), t.click();
1824
1865
  });
1825
1866
  }
1826
- const Fa = [
1867
+ const Ia = [
1827
1868
  {
1828
1869
  title: "Front",
1829
- value: In
1870
+ value: jn
1830
1871
  },
1831
1872
  {
1832
1873
  title: "Back",
1833
- value: Ln
1874
+ value: Dn
1834
1875
  },
1835
1876
  {
1836
1877
  title: "Double",
1837
- value: an
1878
+ value: nn
1838
1879
  }
1839
- ], Ba = [
1880
+ ], Na = [
1840
1881
  {
1841
1882
  title: "No Blending",
1842
- value: Nn
1883
+ value: In
1843
1884
  },
1844
1885
  {
1845
1886
  title: "Normal",
1846
- value: Fn
1887
+ value: Nn
1847
1888
  },
1848
1889
  {
1849
1890
  title: "Additive",
1850
- value: Bn
1891
+ value: Ln
1851
1892
  },
1852
1893
  {
1853
1894
  title: "Subtractive",
1854
- value: Un
1895
+ value: Fn
1855
1896
  },
1856
1897
  {
1857
1898
  title: "Multiply",
1858
- value: $n
1899
+ value: Bn
1859
1900
  },
1860
1901
  {
1861
1902
  title: "Custom",
1862
- value: zn
1903
+ value: Un
1863
1904
  }
1864
- ], Ua = [
1905
+ ], La = [
1865
1906
  {
1866
1907
  title: "Add",
1867
- value: Yn
1908
+ value: $n
1868
1909
  },
1869
1910
  {
1870
1911
  title: "Subtract",
1871
- value: Gn
1912
+ value: zn
1872
1913
  },
1873
1914
  {
1874
1915
  title: "Reverse Subtract",
1875
- value: Vn
1916
+ value: Yn
1876
1917
  },
1877
1918
  {
1878
1919
  title: "Min",
1879
- value: Hn
1920
+ value: Gn
1880
1921
  },
1881
1922
  {
1882
1923
  title: "Max",
1883
- value: Wn
1924
+ value: Vn
1884
1925
  }
1885
- ], $a = [
1926
+ ], Fa = [
1886
1927
  {
1887
1928
  title: "Zero",
1888
- valye: rn
1929
+ valye: an
1889
1930
  },
1890
1931
  {
1891
1932
  title: "One",
1892
- valye: sn
1933
+ valye: rn
1893
1934
  },
1894
1935
  {
1895
1936
  title: "Src Color",
1896
- valye: on
1937
+ valye: sn
1897
1938
  },
1898
1939
  {
1899
1940
  title: "One Minus Src Color",
1900
- valye: cn
1941
+ valye: on
1901
1942
  },
1902
1943
  {
1903
1944
  title: "Src Alpha",
1904
- valye: ln
1945
+ valye: cn
1905
1946
  },
1906
1947
  {
1907
1948
  title: "One Minus Src Alpha",
1908
- valye: un
1949
+ valye: ln
1909
1950
  },
1910
1951
  {
1911
1952
  title: "Dst Alpha",
@@ -1913,7 +1954,7 @@ const Fa = [
1913
1954
  },
1914
1955
  {
1915
1956
  title: "One Minus Dst Alpha",
1916
- valye: fn
1957
+ valye: un
1917
1958
  },
1918
1959
  {
1919
1960
  title: "Dst Color",
@@ -1921,52 +1962,52 @@ const Fa = [
1921
1962
  },
1922
1963
  {
1923
1964
  title: "One Minus Dst Color",
1924
- valye: pn
1965
+ valye: fn
1925
1966
  },
1926
1967
  {
1927
1968
  title: "Src Alpha Saturate",
1928
- valye: qn
1969
+ valye: Hn
1929
1970
  },
1930
1971
  {
1931
1972
  title: "Constant Color",
1932
- valye: mn
1973
+ valye: pn
1933
1974
  },
1934
1975
  {
1935
1976
  title: "One Minus Constant Color",
1936
- valye: vn
1977
+ valye: mn
1937
1978
  },
1938
1979
  {
1939
1980
  title: "Constant Alpha",
1940
- valye: gn
1981
+ valye: vn
1941
1982
  },
1942
1983
  {
1943
1984
  title: "One Minus Constant Alpha",
1944
- valye: bn
1985
+ valye: gn
1945
1986
  }
1946
- ], za = [
1987
+ ], Ba = [
1947
1988
  {
1948
1989
  title: "Zero",
1949
- valye: rn
1990
+ valye: an
1950
1991
  },
1951
1992
  {
1952
1993
  title: "One",
1953
- valye: sn
1994
+ valye: rn
1954
1995
  },
1955
1996
  {
1956
1997
  title: "Src Color",
1957
- valye: on
1998
+ valye: sn
1958
1999
  },
1959
2000
  {
1960
2001
  title: "One Minus Src Color",
1961
- valye: cn
2002
+ valye: on
1962
2003
  },
1963
2004
  {
1964
2005
  title: "Src Alpha",
1965
- valye: ln
2006
+ valye: cn
1966
2007
  },
1967
2008
  {
1968
2009
  title: "One Minus Src Alpha",
1969
- valye: un
2010
+ valye: ln
1970
2011
  },
1971
2012
  {
1972
2013
  title: "Dst Alpha",
@@ -1974,7 +2015,7 @@ const Fa = [
1974
2015
  },
1975
2016
  {
1976
2017
  title: "One Minus Dst Alpha",
1977
- valye: fn
2018
+ valye: un
1978
2019
  },
1979
2020
  {
1980
2021
  title: "Dst Color",
@@ -1982,401 +2023,401 @@ const Fa = [
1982
2023
  },
1983
2024
  {
1984
2025
  title: "One Minus Dst Color",
1985
- valye: pn
2026
+ valye: fn
1986
2027
  },
1987
2028
  {
1988
2029
  title: "Constant Color",
1989
- valye: mn
2030
+ valye: pn
1990
2031
  },
1991
2032
  {
1992
2033
  title: "One Minus Constant Color",
1993
- valye: vn
2034
+ valye: mn
1994
2035
  },
1995
2036
  {
1996
2037
  title: "Constant Alpha",
1997
- valye: gn
2038
+ valye: vn
1998
2039
  },
1999
2040
  {
2000
2041
  title: "One Minus Constant Alpha",
2001
- valye: bn
2042
+ valye: gn
2002
2043
  }
2003
2044
  ];
2004
- function ot(e, n) {
2005
- e.needsUpdate = !0, e.type = "option", e.options = n;
2045
+ function ot(t, n) {
2046
+ t.needsUpdate = !0, t.type = "option", t.options = n;
2006
2047
  }
2007
- function qt(e, n, a) {
2008
- const t = [];
2009
- for (const r in e) {
2010
- if (!Ia(r))
2048
+ function Wt(t, n, a) {
2049
+ const e = [];
2050
+ for (const i in t) {
2051
+ if (!ka(i))
2011
2052
  continue;
2012
- const c = typeof e[r], p = e[r];
2013
- if (c === "boolean" || c === "number" || c === "string") {
2014
- const o = {
2015
- title: Ve(r),
2016
- prop: r,
2017
- type: c,
2018
- value: p,
2053
+ const o = typeof t[i], h = t[i];
2054
+ if (o === "boolean" || o === "number" || o === "string") {
2055
+ const c = {
2056
+ title: Ve(i),
2057
+ prop: i,
2058
+ type: o,
2059
+ value: h,
2019
2060
  min: void 0,
2020
2061
  max: void 0,
2021
- needsUpdate: c === "boolean",
2022
- onChange: (d, v) => {
2023
- a.updateObject(n.uuid, `material.${d}`, v), o.needsUpdate && a.updateObject(n.uuid, "material.needsUpdate", !0);
2062
+ needsUpdate: o === "boolean",
2063
+ onChange: (u, v) => {
2064
+ a.updateObject(n.uuid, `material.${u}`, v), c.needsUpdate && a.updateObject(n.uuid, "material.needsUpdate", !0);
2024
2065
  const b = a.scene?.getObjectByProperty("uuid", n.uuid);
2025
- b !== void 0 && ee(b, `material.${d}`, v);
2066
+ b !== void 0 && ee(b, `material.${u}`, v);
2026
2067
  }
2027
2068
  };
2028
- switch (r) {
2069
+ switch (i) {
2029
2070
  case "blending":
2030
- ot(o, Ba);
2071
+ ot(c, Na);
2031
2072
  break;
2032
2073
  case "blendDst":
2033
- ot(o, za);
2074
+ ot(c, Ba);
2034
2075
  break;
2035
2076
  case "blendEquation":
2036
- ot(o, Ua);
2077
+ ot(c, La);
2037
2078
  break;
2038
2079
  case "blendSrc":
2039
- ot(o, $a);
2080
+ ot(c, Fa);
2040
2081
  break;
2041
2082
  case "side":
2042
- ot(o, Fa);
2083
+ ot(c, Ia);
2043
2084
  break;
2044
2085
  }
2045
- La(r) && (o.value = Number(p), o.type = "range", o.min = 0, o.max = 1, o.step = 0.01);
2046
- const u = c === "string" && (r === "vertexShader" || r === "fragmentShader");
2047
- u && (o.disabled = !1, o.latest = o.value, o.onChange = (d, v) => {
2048
- o.latest = v;
2049
- }), t.push(o), u && t.push({
2050
- title: `${ut(r)} - Update`,
2086
+ ja(i) && (c.value = Number(h), c.type = "range", c.min = 0, c.max = 1, c.step = 0.01);
2087
+ const d = o === "string" && (i === "vertexShader" || i === "fragmentShader");
2088
+ d && (c.disabled = !1, c.latest = c.value, c.onChange = (u, v) => {
2089
+ c.latest = v;
2090
+ }), e.push(c), d && e.push({
2091
+ title: `${lt(i)} - Update`,
2051
2092
  type: "button",
2052
2093
  onChange: () => {
2053
- a.updateObject(n.uuid, `material.${r}`, o.latest), a.updateObject(n.uuid, "material.needsUpdate", !0);
2054
- const d = a.scene?.getObjectByProperty("uuid", n.uuid);
2055
- d !== void 0 && (ee(d, `material.${r}`, o.latest), d.material.needsUpdate = !0);
2094
+ a.updateObject(n.uuid, `material.${i}`, c.latest), a.updateObject(n.uuid, "material.needsUpdate", !0);
2095
+ const u = a.scene?.getObjectByProperty("uuid", n.uuid);
2096
+ u !== void 0 && (ee(u, `material.${i}`, c.latest), u.material.needsUpdate = !0);
2056
2097
  }
2057
2098
  });
2058
- } else if (c === "object")
2059
- if (p.isColor)
2060
- t.push({
2061
- title: Ve(r),
2062
- prop: r,
2099
+ } else if (o === "object")
2100
+ if (h.isColor)
2101
+ e.push({
2102
+ title: Ve(i),
2103
+ prop: i,
2063
2104
  type: "color",
2064
- value: p,
2065
- onChange: (o, u) => {
2066
- const d = new St(u);
2067
- a.updateObject(n.uuid, `material.${o}`, d);
2105
+ value: h,
2106
+ onChange: (c, d) => {
2107
+ const u = new St(d);
2108
+ a.updateObject(n.uuid, `material.${c}`, u);
2068
2109
  const v = a.scene?.getObjectByProperty("uuid", n.uuid);
2069
- v !== void 0 && ee(v, `material.${o}`, d);
2110
+ v !== void 0 && ee(v, `material.${c}`, u);
2070
2111
  }
2071
2112
  });
2072
- else if (Array.isArray(p)) {
2073
- const o = [];
2074
- for (const u in p)
2075
- o.push({
2076
- title: `${u}`,
2077
- type: `${typeof p[u]}`,
2078
- value: p[u],
2079
- onChange: (d, v) => {
2080
- a.updateObject(n.uuid, `material.${r}`, v);
2113
+ else if (Array.isArray(h)) {
2114
+ const c = [];
2115
+ for (const d in h)
2116
+ c.push({
2117
+ title: `${d}`,
2118
+ type: `${typeof h[d]}`,
2119
+ value: h[d],
2120
+ onChange: (u, v) => {
2121
+ a.updateObject(n.uuid, `material.${i}`, v);
2081
2122
  const b = a.scene?.getObjectByProperty("uuid", n.uuid);
2082
- b !== void 0 && ee(b, `material.${r}`, v);
2123
+ b !== void 0 && ee(b, `material.${i}`, v);
2083
2124
  }
2084
2125
  });
2085
- t.push({
2086
- title: Ve(r),
2087
- items: o
2126
+ e.push({
2127
+ title: Ve(i),
2128
+ items: c
2088
2129
  });
2089
2130
  } else {
2090
- const o = [];
2091
- for (const u in p) {
2092
- const d = p[u];
2093
- switch (typeof d) {
2131
+ const c = [];
2132
+ for (const d in h) {
2133
+ const u = h[d];
2134
+ switch (typeof u) {
2094
2135
  case "boolean":
2095
2136
  case "number":
2096
2137
  case "string":
2097
- u === "src" ? t.push({
2098
- title: Ve(r),
2138
+ d === "src" ? e.push({
2139
+ title: Ve(i),
2099
2140
  type: "image",
2100
- value: d,
2141
+ value: u,
2101
2142
  onChange: (b, E) => {
2102
- a.createTexture(n.uuid, `material.${r}`, E);
2103
- const C = a.scene?.getObjectByProperty("uuid", n.uuid);
2104
- C !== void 0 && It(E).then((D) => {
2105
- ee(C, `material.${r}`, D), ee(C, "material.needsUpdate", !0);
2143
+ a.createTexture(n.uuid, `material.${i}`, E);
2144
+ const S = a.scene?.getObjectByProperty("uuid", n.uuid);
2145
+ S !== void 0 && Dt(E).then((D) => {
2146
+ ee(S, `material.${i}`, D), ee(S, "material.needsUpdate", !0);
2106
2147
  });
2107
2148
  }
2108
- }) : o.push({
2109
- title: `${Ve(u)}`,
2110
- prop: `material.${r}.${u}`,
2111
- type: `${typeof e[r][u]}`,
2112
- value: p[u],
2149
+ }) : c.push({
2150
+ title: `${Ve(d)}`,
2151
+ prop: `material.${i}.${d}`,
2152
+ type: `${typeof t[i][d]}`,
2153
+ value: h[d],
2113
2154
  onChange: (b, E) => {
2114
- a.updateObject(n.uuid, `material.${r}.${u}`, E);
2115
- const C = a.scene?.getObjectByProperty("uuid", n.uuid);
2116
- C !== void 0 && ee(C, `material.${r}.${u}`, E);
2155
+ a.updateObject(n.uuid, `material.${i}.${d}`, E);
2156
+ const S = a.scene?.getObjectByProperty("uuid", n.uuid);
2157
+ S !== void 0 && ee(S, `material.${i}.${d}`, E);
2117
2158
  }
2118
2159
  });
2119
2160
  break;
2120
2161
  case "object":
2121
- if (d.value !== void 0 && d.value.src !== void 0)
2122
- o.push({
2123
- title: Ve(u),
2162
+ if (u.value !== void 0 && u.value.src !== void 0)
2163
+ c.push({
2164
+ title: Ve(d),
2124
2165
  type: "image",
2125
- value: d.value.src,
2166
+ value: u.value.src,
2126
2167
  onChange: (b, E) => {
2127
- a.createTexture(n.uuid, `material.${r}.${u}.value`, p);
2128
- const C = a.scene?.getObjectByProperty("uuid", n.uuid);
2129
- C !== void 0 && It(E).then((D) => {
2130
- ee(C, `material.${r}.${u}.value`, D);
2168
+ a.createTexture(n.uuid, `material.${i}.${d}.value`, h);
2169
+ const S = a.scene?.getObjectByProperty("uuid", n.uuid);
2170
+ S !== void 0 && Dt(E).then((D) => {
2171
+ ee(S, `material.${i}.${d}.value`, D);
2131
2172
  });
2132
2173
  }
2133
2174
  });
2134
- else if (r === "uniforms") {
2135
- const b = d.value, E = (C, D, I) => ({
2136
- title: C,
2175
+ else if (i === "uniforms") {
2176
+ const b = u.value, E = (S, D, I) => ({
2177
+ title: S,
2137
2178
  type: "number",
2138
2179
  value: I,
2139
2180
  step: 0.01,
2140
2181
  onChange: (q, B) => {
2141
- const M = `material.uniforms.${u}.value.${D}`;
2182
+ const M = `material.uniforms.${d}.value.${D}`;
2142
2183
  a.updateObject(n.uuid, M, B);
2143
2184
  const z = a.scene?.getObjectByProperty("uuid", n.uuid);
2144
2185
  z !== void 0 && ee(z, M, B);
2145
2186
  }
2146
2187
  });
2147
- if (typeof d.value == "number")
2148
- o.push({
2149
- title: u,
2188
+ if (typeof u.value == "number")
2189
+ c.push({
2190
+ title: d,
2150
2191
  type: "number",
2151
- value: d.value,
2152
- onChange: (C, D) => {
2153
- const I = `material.${r}.${C}.value`;
2192
+ value: u.value,
2193
+ onChange: (S, D) => {
2194
+ const I = `material.${i}.${S}.value`;
2154
2195
  a.updateObject(n.uuid, I, D);
2155
2196
  const q = a.scene?.getObjectByProperty("uuid", n.uuid);
2156
2197
  q !== void 0 && ee(q, I, D);
2157
2198
  }
2158
2199
  });
2159
2200
  else if (b.r !== void 0 && b.g !== void 0 && b.b !== void 0)
2160
- o.push({
2161
- title: u,
2201
+ c.push({
2202
+ title: d,
2162
2203
  type: "color",
2163
- value: d.value,
2164
- onChange: (C, D) => {
2165
- const I = new St(D), q = `material.${r}.${C}.value`;
2204
+ value: u.value,
2205
+ onChange: (S, D) => {
2206
+ const I = new St(D), q = `material.${i}.${S}.value`;
2166
2207
  a.updateObject(n.uuid, q, I);
2167
2208
  const B = a.scene?.getObjectByProperty("uuid", n.uuid);
2168
2209
  B !== void 0 && ee(B, q, I);
2169
2210
  }
2170
2211
  });
2171
2212
  else if (b.x !== void 0 && b.y !== void 0 && b.z === void 0 && b.w === void 0)
2172
- o.push(
2213
+ c.push(
2173
2214
  {
2174
- title: u,
2215
+ title: d,
2175
2216
  items: [
2176
- E("X", "x", d.value.x),
2177
- E("Y", "y", d.value.y)
2217
+ E("X", "x", u.value.x),
2218
+ E("Y", "y", u.value.y)
2178
2219
  ]
2179
2220
  }
2180
2221
  );
2181
2222
  else if (b.x !== void 0 && b.y !== void 0 && b.z !== void 0 && b.w === void 0)
2182
- o.push(
2223
+ c.push(
2183
2224
  {
2184
- title: u,
2225
+ title: d,
2185
2226
  items: [
2186
- E("X", "x", d.value.x),
2187
- E("Y", "y", d.value.y),
2188
- E("Z", "z", d.value.z)
2227
+ E("X", "x", u.value.x),
2228
+ E("Y", "y", u.value.y),
2229
+ E("Z", "z", u.value.z)
2189
2230
  ]
2190
2231
  }
2191
2232
  );
2192
2233
  else if (b.x !== void 0 && b.y !== void 0 && b.z !== void 0 && b.w !== void 0)
2193
- o.push(
2234
+ c.push(
2194
2235
  {
2195
- title: u,
2236
+ title: d,
2196
2237
  items: [
2197
- E("X", "x", d.value.x),
2198
- E("Y", "y", d.value.y),
2199
- E("Z", "z", d.value.z),
2200
- E("W", "w", d.value.w)
2238
+ E("X", "x", u.value.x),
2239
+ E("Y", "y", u.value.y),
2240
+ E("Z", "z", u.value.z),
2241
+ E("W", "w", u.value.w)
2201
2242
  ]
2202
2243
  }
2203
2244
  );
2204
2245
  else if (b.elements !== void 0) {
2205
- const C = b.elements, D = [];
2206
- for (let I = 0; I < C.length; I++)
2207
- D.push(E(I.toString(), I.toString(), C[I]));
2208
- o.push(
2246
+ const S = b.elements, D = [];
2247
+ for (let I = 0; I < S.length; I++)
2248
+ D.push(E(I.toString(), I.toString(), S[I]));
2249
+ c.push(
2209
2250
  {
2210
- title: u,
2251
+ title: d,
2211
2252
  items: D
2212
2253
  }
2213
2254
  );
2214
2255
  } else
2215
- console.log(">>> need to add this format:", u, b);
2256
+ console.log(">>> need to add this format:", d, b);
2216
2257
  } else
2217
- o.push({
2218
- title: u,
2219
- type: `${typeof d.value}`,
2220
- value: d.value,
2258
+ c.push({
2259
+ title: d,
2260
+ type: `${typeof u.value}`,
2261
+ value: u.value,
2221
2262
  onChange: (b, E) => {
2222
- a.updateObject(n.uuid, `material.${r}.${u}.value`, E);
2223
- const C = a.scene?.getObjectByProperty("uuid", n.uuid);
2224
- C !== void 0 && ee(C, `material.${r}.${u}.value`, E);
2263
+ a.updateObject(n.uuid, `material.${i}.${d}.value`, E);
2264
+ const S = a.scene?.getObjectByProperty("uuid", n.uuid);
2265
+ S !== void 0 && ee(S, `material.${i}.${d}.value`, E);
2225
2266
  }
2226
2267
  });
2227
2268
  break;
2228
2269
  }
2229
2270
  }
2230
- o.length > 0 && t.push({
2231
- title: Ve(r),
2232
- items: o
2271
+ c.length > 0 && e.push({
2272
+ title: Ve(i),
2273
+ items: c
2233
2274
  });
2234
2275
  }
2235
2276
  else
2236
- p !== void 0 && console.log("other:", r, c, p);
2277
+ h !== void 0 && console.log("other:", i, o, h);
2237
2278
  }
2238
- return t.sort((r, c) => r.title < c.title ? -1 : r.title > c.title ? 1 : 0), t.push({
2279
+ return e.sort((i, o) => i.title < o.title ? -1 : i.title > o.title ? 1 : 0), e.push({
2239
2280
  title: "Update Material",
2240
2281
  type: "button",
2241
2282
  onChange: () => {
2242
2283
  a.updateObject(n.uuid, "material.needsUpdate", !0);
2243
2284
  }
2244
- }), t;
2285
+ }), e;
2245
2286
  }
2246
- function Ya(e, n) {
2247
- const a = e.material;
2287
+ function Ua(t, n) {
2288
+ const a = t.material;
2248
2289
  if (Array.isArray(a)) {
2249
- const t = [], r = a.length;
2250
- for (let c = 0; c < r; c++)
2251
- t.push(
2290
+ const e = [], i = a.length;
2291
+ for (let o = 0; o < i; o++)
2292
+ e.push(
2252
2293
  /* @__PURE__ */ l.jsx(
2253
2294
  We,
2254
2295
  {
2255
- title: `Material ${c}`,
2256
- items: qt(a[c], e, n)
2296
+ title: `Material ${o}`,
2297
+ items: Wt(a[o], t, n)
2257
2298
  },
2258
- `Material ${c}`
2299
+ `Material ${o}`
2259
2300
  )
2260
2301
  );
2261
- return /* @__PURE__ */ l.jsx(l.Fragment, { children: t });
2302
+ return /* @__PURE__ */ l.jsx(l.Fragment, { children: e });
2262
2303
  } else
2263
2304
  return /* @__PURE__ */ l.jsx(
2264
2305
  We,
2265
2306
  {
2266
2307
  title: "Material",
2267
- items: qt(a, e, n)
2308
+ items: Wt(a, t, n)
2268
2309
  }
2269
2310
  );
2270
2311
  }
2271
- function lt(e) {
2272
- let n = e.value;
2273
- n !== void 0 && n.isColor !== void 0 && (n = va(e.value));
2274
- const [a, t] = oe(n), r = _e(null), c = _e(null), p = _e(null);
2275
- Re(() => {
2276
- let v = !1, b = -1, E = 0, C = Number(a);
2312
+ function ct(t) {
2313
+ let n = t.value;
2314
+ n !== void 0 && n.isColor !== void 0 && (n = pa(t.value));
2315
+ const [a, e] = oe(n), i = Re(null), o = Re(null), h = Re(null);
2316
+ _e(() => {
2317
+ let v = !1, b = -1, E = 0, S = Number(a);
2277
2318
  const D = (z) => {
2278
- v = !0, E = C, b = z.clientX;
2319
+ v = !0, E = S, b = z.clientX;
2279
2320
  }, I = (z) => {
2280
2321
  if (!v)
2281
2322
  return;
2282
- const we = e.step !== void 0 ? e.step : 1, ce = (z.clientX - b) * we;
2283
- C = Number((E + ce).toFixed(4)), c.current !== null && (c.current.value = C.toString()), e.onChange !== void 0 && e.onChange(e.prop !== void 0 ? e.prop : e.title, C);
2323
+ const we = t.step !== void 0 ? t.step : 1, ce = (z.clientX - b) * we;
2324
+ S = Number((E + ce).toFixed(4)), o.current !== null && (o.current.value = S.toString()), t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, S);
2284
2325
  }, q = () => {
2285
2326
  v = !1;
2286
2327
  }, B = () => {
2287
2328
  v = !1;
2288
- }, M = e.type === "number";
2289
- return M && (r.current?.addEventListener("mousedown", D, !1), document.addEventListener("mouseup", q, !1), document.addEventListener("mousemove", I, !1), document.addEventListener("contextmenu", B, !1)), () => {
2290
- M && (r.current?.removeEventListener("mousedown", D), document.removeEventListener("mouseup", q), document.removeEventListener("mousemove", I), document.removeEventListener("contextmenu", B));
2329
+ }, M = t.type === "number";
2330
+ return M && (i.current?.addEventListener("mousedown", D, !1), document.addEventListener("mouseup", q, !1), document.addEventListener("mousemove", I, !1), document.addEventListener("contextmenu", B, !1)), () => {
2331
+ M && (i.current?.removeEventListener("mousedown", D), document.removeEventListener("mouseup", q), document.removeEventListener("mousemove", I), document.removeEventListener("contextmenu", B));
2291
2332
  };
2292
2333
  }, [a]);
2293
- const o = e.type === "string" && (a.length > 100 || a.search(`
2294
- `) > -1), u = o || e.type === "image", d = (v) => {
2334
+ const c = t.type === "string" && (a.length > 100 || a.search(`
2335
+ `) > -1), d = c || t.type === "image", u = (v) => {
2295
2336
  let b = v.target.value;
2296
- e.type === "boolean" ? b = v.target.checked : e.type === "option" && (b = e.options[b].value), t(b), e.onChange !== void 0 && e.onChange(e.prop !== void 0 ? e.prop : e.title, b);
2337
+ t.type === "boolean" ? b = v.target.checked : t.type === "option" && (b = t.options[b].value), e(b), t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, b);
2297
2338
  };
2298
- return /* @__PURE__ */ l.jsxs("div", { className: `field ${u ? "block" : ""}`, children: [
2299
- e.type !== "button" && /* @__PURE__ */ l.jsx("label", { ref: r, children: ut(e.title) }, "fieldLabel"),
2300
- e.type === "string" && !o && /* @__PURE__ */ l.jsx(
2339
+ return /* @__PURE__ */ l.jsxs("div", { className: `field ${d ? "block" : ""}`, children: [
2340
+ t.type !== "button" && /* @__PURE__ */ l.jsx("label", { ref: i, children: lt(t.title) }, "fieldLabel"),
2341
+ t.type === "string" && !c && /* @__PURE__ */ l.jsx(
2301
2342
  "input",
2302
2343
  {
2303
2344
  type: "text",
2304
- disabled: e.disabled,
2305
- onChange: d,
2345
+ disabled: t.disabled,
2346
+ onChange: u,
2306
2347
  value: a
2307
2348
  }
2308
2349
  ),
2309
- e.type === "string" && o && /* @__PURE__ */ l.jsx(
2350
+ t.type === "string" && c && /* @__PURE__ */ l.jsx(
2310
2351
  "textarea",
2311
2352
  {
2312
2353
  cols: 50,
2313
2354
  rows: 10,
2314
- disabled: e.disabled !== void 0 ? e.disabled : !0,
2315
- onChange: d,
2355
+ disabled: t.disabled !== void 0 ? t.disabled : !0,
2356
+ onChange: u,
2316
2357
  value: a
2317
2358
  }
2318
2359
  ),
2319
- e.type === "boolean" && /* @__PURE__ */ l.jsx(
2360
+ t.type === "boolean" && /* @__PURE__ */ l.jsx(
2320
2361
  "input",
2321
2362
  {
2322
2363
  type: "checkbox",
2323
- disabled: e.disabled,
2324
- onChange: d,
2364
+ disabled: t.disabled,
2365
+ onChange: u,
2325
2366
  checked: a
2326
2367
  }
2327
2368
  ),
2328
- e.type === "number" && /* @__PURE__ */ l.jsx(
2369
+ t.type === "number" && /* @__PURE__ */ l.jsx(
2329
2370
  "input",
2330
2371
  {
2331
- ref: c,
2372
+ ref: o,
2332
2373
  type: "number",
2333
2374
  value: a,
2334
- min: e.min,
2335
- max: e.max,
2336
- step: e.step,
2337
- disabled: e.disabled,
2338
- onChange: d
2375
+ min: t.min,
2376
+ max: t.max,
2377
+ step: t.step,
2378
+ disabled: t.disabled,
2379
+ onChange: u
2339
2380
  }
2340
2381
  ),
2341
- e.type === "range" && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
2342
- /* @__PURE__ */ l.jsx("input", { type: "text", value: a.toString(), onChange: d, disabled: e.disabled, className: "min" }),
2382
+ t.type === "range" && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
2383
+ /* @__PURE__ */ l.jsx("input", { type: "text", value: a.toString(), onChange: u, disabled: t.disabled, className: "min" }),
2343
2384
  /* @__PURE__ */ l.jsx(
2344
2385
  "input",
2345
2386
  {
2346
- disabled: e.disabled,
2387
+ disabled: t.disabled,
2347
2388
  type: "range",
2348
2389
  value: a,
2349
- min: e.min,
2350
- max: e.max,
2351
- step: e.step,
2352
- onChange: d
2390
+ min: t.min,
2391
+ max: t.max,
2392
+ step: t.step,
2393
+ onChange: u
2353
2394
  }
2354
2395
  )
2355
2396
  ] }),
2356
- e.type === "color" && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
2357
- /* @__PURE__ */ l.jsx("input", { type: "text", value: a.toString(), onChange: d, disabled: e.disabled, className: "color" }),
2358
- /* @__PURE__ */ l.jsx("input", { type: "color", value: a, onChange: d, disabled: e.disabled })
2397
+ t.type === "color" && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
2398
+ /* @__PURE__ */ l.jsx("input", { type: "text", value: a.toString(), onChange: u, disabled: t.disabled, className: "color" }),
2399
+ /* @__PURE__ */ l.jsx("input", { type: "color", value: a, onChange: u, disabled: t.disabled })
2359
2400
  ] }),
2360
- e.type === "button" && /* @__PURE__ */ l.jsx(
2401
+ t.type === "button" && /* @__PURE__ */ l.jsx(
2361
2402
  "button",
2362
2403
  {
2363
- disabled: e.disabled,
2404
+ disabled: t.disabled,
2364
2405
  onClick: () => {
2365
- e.onChange !== void 0 && e.onChange(e.prop !== void 0 ? e.prop : e.title, !0);
2406
+ t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, !0);
2366
2407
  },
2367
- children: e.title
2408
+ children: t.title
2368
2409
  }
2369
2410
  ),
2370
- e.type === "image" && /* @__PURE__ */ l.jsx("img", { ref: p, onClick: () => {
2371
- Na().then((v) => {
2372
- p.current.src = v, e.onChange !== void 0 && e.onChange(e.prop !== void 0 ? e.prop : e.title, v);
2411
+ t.type === "image" && /* @__PURE__ */ l.jsx("img", { ref: h, onClick: () => {
2412
+ Da().then((v) => {
2413
+ h.current.src = v, t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, v);
2373
2414
  });
2374
- }, src: a.length > 0 ? a : ja }),
2375
- e.type === "option" && /* @__PURE__ */ l.jsx(l.Fragment, { children: /* @__PURE__ */ l.jsx("select", { onChange: d, disabled: e.disabled, defaultValue: e.value, children: e.options?.map((v, b) => /* @__PURE__ */ l.jsx("option", { value: v.value, children: ut(v.title) }, b)) }) })
2415
+ }, src: a.length > 0 ? a : Aa }),
2416
+ t.type === "option" && /* @__PURE__ */ l.jsx(l.Fragment, { children: /* @__PURE__ */ l.jsx("select", { onChange: u, disabled: t.disabled, defaultValue: t.value, children: t.options?.map((v, b) => /* @__PURE__ */ l.jsx("option", { value: v.value, children: lt(v.title) }, b)) }) })
2376
2417
  ] });
2377
2418
  }
2378
- function Kt(e) {
2379
- switch (e) {
2419
+ function qt(t) {
2420
+ switch (t) {
2380
2421
  case "fov":
2381
2422
  return "FOV";
2382
2423
  case "zoom":
@@ -2402,36 +2443,36 @@ function Kt(e) {
2402
2443
  case "bottom":
2403
2444
  return "Bottom";
2404
2445
  }
2405
- return e;
2446
+ return t;
2406
2447
  }
2407
- function Ga(e, n) {
2448
+ function $a(t, n) {
2408
2449
  const a = [];
2409
- if (e.perspectiveCameraInfo !== void 0)
2410
- for (const t in e.perspectiveCameraInfo)
2450
+ if (t.perspectiveCameraInfo !== void 0)
2451
+ for (const e in t.perspectiveCameraInfo)
2411
2452
  a.push({
2412
- title: Kt(t),
2413
- prop: t,
2453
+ title: qt(e),
2454
+ prop: e,
2414
2455
  type: "number",
2415
2456
  step: 0.01,
2416
- value: e.perspectiveCameraInfo[t],
2417
- onChange: (r, c) => {
2418
- n.updateObject(e.uuid, r, c), n.requestMethod(e.uuid, "updateProjectionMatrix");
2419
- const p = n.scene?.getObjectByProperty("uuid", e.uuid);
2420
- p !== void 0 && (ee(p, r, c), p.updateProjectionMatrix());
2457
+ value: t.perspectiveCameraInfo[e],
2458
+ onChange: (i, o) => {
2459
+ n.updateObject(t.uuid, i, o), n.requestMethod(t.uuid, "updateProjectionMatrix");
2460
+ const h = n.scene?.getObjectByProperty("uuid", t.uuid);
2461
+ h !== void 0 && (ee(h, i, o), h.updateProjectionMatrix());
2421
2462
  }
2422
2463
  });
2423
- else if (e.orthographicCameraInfo !== void 0)
2424
- for (const t in e.orthographicCameraInfo)
2464
+ else if (t.orthographicCameraInfo !== void 0)
2465
+ for (const e in t.orthographicCameraInfo)
2425
2466
  a.push({
2426
- title: Kt(t),
2427
- prop: t,
2467
+ title: qt(e),
2468
+ prop: e,
2428
2469
  type: "number",
2429
2470
  step: 0.01,
2430
- value: e.perspectiveCameraInfo[t],
2431
- onChange: (r, c) => {
2432
- n.updateObject(e.uuid, r, c), n.requestMethod(e.uuid, "updateProjectionMatrix");
2433
- const p = n.scene?.getObjectByProperty("uuid", e.uuid);
2434
- p !== void 0 && (ee(p, r, c), p.updateProjectionMatrix());
2471
+ value: t.perspectiveCameraInfo[e],
2472
+ onChange: (i, o) => {
2473
+ n.updateObject(t.uuid, i, o), n.requestMethod(t.uuid, "updateProjectionMatrix");
2474
+ const h = n.scene?.getObjectByProperty("uuid", t.uuid);
2475
+ h !== void 0 && (ee(h, i, o), h.updateProjectionMatrix());
2435
2476
  }
2436
2477
  });
2437
2478
  return /* @__PURE__ */ l.jsx(
@@ -2442,27 +2483,27 @@ function Ga(e, n) {
2442
2483
  }
2443
2484
  );
2444
2485
  }
2445
- const Va = Math.PI / 180, Ha = 180 / Math.PI;
2446
- function Qe(e, n, a, t, r) {
2447
- return t + (e - n) * (r - t) / (a - n);
2448
- }
2449
- function Wa(e) {
2450
- return e * Va;
2451
- }
2452
- function kt(e) {
2453
- return e * Ha;
2454
- }
2455
- function qa(e, n) {
2456
- const a = new Kn();
2457
- a.elements = e.matrix;
2458
- const t = new W(), r = new Xn(), c = new W();
2459
- e.uuid.length > 0 && (t.setFromMatrixPosition(a), r.setFromRotationMatrix(a), c.setFromMatrixScale(a));
2460
- const p = (u, d) => {
2461
- n.updateObject(e.uuid, u, d);
2462
- const v = n.scene?.getObjectByProperty("uuid", e.uuid);
2463
- v !== void 0 && ee(v, u, d);
2464
- }, o = (u, d) => {
2465
- p(u, Wa(d));
2486
+ const za = Math.PI / 180, Ya = 180 / Math.PI;
2487
+ function Qe(t, n, a, e, i) {
2488
+ return e + (t - n) * (i - e) / (a - n);
2489
+ }
2490
+ function Ga(t) {
2491
+ return t * za;
2492
+ }
2493
+ function Pt(t) {
2494
+ return t * Ya;
2495
+ }
2496
+ function Va(t, n) {
2497
+ const a = new Wn();
2498
+ a.elements = t.matrix;
2499
+ const e = new W(), i = new qn(), o = new W();
2500
+ t.uuid.length > 0 && (e.setFromMatrixPosition(a), i.setFromRotationMatrix(a), o.setFromMatrixScale(a));
2501
+ const h = (d, u) => {
2502
+ n.updateObject(t.uuid, d, u);
2503
+ const v = n.scene?.getObjectByProperty("uuid", t.uuid);
2504
+ v !== void 0 && ee(v, d, u);
2505
+ }, c = (d, u) => {
2506
+ h(d, Ga(u));
2466
2507
  };
2467
2508
  return /* @__PURE__ */ l.jsx(
2468
2509
  We,
@@ -2473,83 +2514,83 @@ function qa(e, n) {
2473
2514
  title: "Position X",
2474
2515
  prop: "position.x",
2475
2516
  type: "number",
2476
- value: t.x,
2477
- onChange: p
2517
+ value: e.x,
2518
+ onChange: h
2478
2519
  },
2479
2520
  {
2480
2521
  title: "Position Y",
2481
2522
  prop: "position.y",
2482
2523
  type: "number",
2483
- value: t.y,
2484
- onChange: p
2524
+ value: e.y,
2525
+ onChange: h
2485
2526
  },
2486
2527
  {
2487
2528
  title: "Position Z",
2488
2529
  prop: "position.z",
2489
2530
  type: "number",
2490
- value: t.z,
2491
- onChange: p
2531
+ value: e.z,
2532
+ onChange: h
2492
2533
  },
2493
2534
  {
2494
2535
  title: "Rotation X",
2495
2536
  prop: "rotation.x",
2496
2537
  type: "number",
2497
- value: At(kt(r.x)),
2538
+ value: _t(Pt(i.x)),
2498
2539
  min: -360,
2499
2540
  max: 360,
2500
2541
  step: 0.1,
2501
- onChange: o
2542
+ onChange: c
2502
2543
  },
2503
2544
  {
2504
2545
  title: "Rotation Y",
2505
2546
  prop: "rotation.y",
2506
2547
  type: "number",
2507
- value: At(kt(r.y)),
2548
+ value: _t(Pt(i.y)),
2508
2549
  min: -360,
2509
2550
  max: 360,
2510
2551
  step: 0.1,
2511
- onChange: o
2552
+ onChange: c
2512
2553
  },
2513
2554
  {
2514
2555
  title: "Rotation Z",
2515
2556
  prop: "rotation.z",
2516
2557
  type: "number",
2517
- value: At(kt(r.z)),
2558
+ value: _t(Pt(i.z)),
2518
2559
  min: -360,
2519
2560
  max: 360,
2520
2561
  step: 0.1,
2521
- onChange: o
2562
+ onChange: c
2522
2563
  },
2523
2564
  {
2524
2565
  title: "Scale X",
2525
2566
  prop: "scale.x",
2526
2567
  type: "number",
2527
- value: c.x,
2568
+ value: o.x,
2528
2569
  step: 0.01,
2529
- onChange: p
2570
+ onChange: h
2530
2571
  },
2531
2572
  {
2532
2573
  title: "Scale Y",
2533
2574
  prop: "scale.y",
2534
2575
  type: "number",
2535
- value: c.y,
2576
+ value: o.y,
2536
2577
  step: 0.01,
2537
- onChange: p
2578
+ onChange: h
2538
2579
  },
2539
2580
  {
2540
2581
  title: "Scale Z",
2541
2582
  prop: "scale.z",
2542
2583
  type: "number",
2543
- value: c.z,
2584
+ value: o.z,
2544
2585
  step: 0.01,
2545
- onChange: p
2586
+ onChange: h
2546
2587
  }
2547
2588
  ]
2548
2589
  }
2549
2590
  );
2550
2591
  }
2551
- function Xt(e) {
2552
- switch (e) {
2592
+ function Kt(t) {
2593
+ switch (t) {
2553
2594
  case "color":
2554
2595
  return "Color";
2555
2596
  case "intensity":
@@ -2565,34 +2606,34 @@ function Xt(e) {
2565
2606
  case "groundColor":
2566
2607
  return "Ground Color";
2567
2608
  }
2568
- return e;
2609
+ return t;
2569
2610
  }
2570
- function Ka(e, n) {
2611
+ function Ha(t, n) {
2571
2612
  const a = [];
2572
- if (e.lightInfo !== void 0)
2573
- for (const t in e.lightInfo) {
2574
- const r = e.lightInfo[t];
2575
- r !== void 0 && (r.isColor !== void 0 ? a.push({
2576
- title: Xt(t),
2577
- prop: t,
2613
+ if (t.lightInfo !== void 0)
2614
+ for (const e in t.lightInfo) {
2615
+ const i = t.lightInfo[e];
2616
+ i !== void 0 && (i.isColor !== void 0 ? a.push({
2617
+ title: Kt(e),
2618
+ prop: e,
2578
2619
  type: "color",
2579
- value: r,
2580
- onChange: (c, p) => {
2581
- const o = new St(p);
2582
- n.updateObject(e.uuid, c, o);
2583
- const u = n.scene?.getObjectByProperty("uuid", e.uuid);
2584
- u !== void 0 && ee(u, c, o);
2620
+ value: i,
2621
+ onChange: (o, h) => {
2622
+ const c = new St(h);
2623
+ n.updateObject(t.uuid, o, c);
2624
+ const d = n.scene?.getObjectByProperty("uuid", t.uuid);
2625
+ d !== void 0 && ee(d, o, c);
2585
2626
  }
2586
2627
  }) : a.push({
2587
- title: Xt(t),
2588
- prop: t,
2589
- type: typeof r,
2590
- value: r,
2591
- step: typeof r == "number" ? 0.01 : void 0,
2592
- onChange: (c, p) => {
2593
- n.updateObject(e.uuid, c, p);
2594
- const o = n.scene?.getObjectByProperty("uuid", e.uuid);
2595
- o !== void 0 && ee(o, c, p);
2628
+ title: Kt(e),
2629
+ prop: e,
2630
+ type: typeof i,
2631
+ value: i,
2632
+ step: typeof i == "number" ? 0.01 : void 0,
2633
+ onChange: (o, h) => {
2634
+ n.updateObject(t.uuid, o, h);
2635
+ const c = n.scene?.getObjectByProperty("uuid", t.uuid);
2636
+ c !== void 0 && ee(c, o, h);
2596
2637
  }
2597
2638
  }));
2598
2639
  }
@@ -2604,17 +2645,17 @@ function Ka(e, n) {
2604
2645
  }
2605
2646
  );
2606
2647
  }
2607
- function Xa(e, n) {
2608
- const a = [], t = [];
2609
- let r = 0;
2610
- e.animations.forEach((o) => {
2611
- r = Math.max(r, o.duration), o.duration > 0 && t.push({
2612
- title: o.name,
2648
+ function Wa(t, n) {
2649
+ const a = [], e = [];
2650
+ let i = 0;
2651
+ t.animations.forEach((c) => {
2652
+ i = Math.max(i, c.duration), c.duration > 0 && e.push({
2653
+ title: c.name,
2613
2654
  items: [
2614
2655
  {
2615
2656
  title: "Duration",
2616
2657
  type: "number",
2617
- value: o.duration,
2658
+ value: c.duration,
2618
2659
  disabled: !0
2619
2660
  },
2620
2661
  {
@@ -2636,41 +2677,41 @@ function Xa(e, n) {
2636
2677
  });
2637
2678
  }), a.push({
2638
2679
  title: "Animations",
2639
- items: t
2680
+ items: e
2640
2681
  });
2641
- const c = n.scene?.getObjectByProperty("uuid", e.uuid);
2642
- let p = !1;
2643
- if (c !== void 0) {
2644
- const o = c.mixer;
2645
- if (p = o !== void 0, p) {
2646
- const u = [
2682
+ const o = n.scene?.getObjectByProperty("uuid", t.uuid);
2683
+ let h = !1;
2684
+ if (o !== void 0) {
2685
+ const c = o.mixer;
2686
+ if (h = c !== void 0, h) {
2687
+ const d = [
2647
2688
  {
2648
2689
  title: "Time Scale",
2649
2690
  type: "range",
2650
- value: o.timeScale,
2691
+ value: c.timeScale,
2651
2692
  step: 0.01,
2652
2693
  min: -1,
2653
2694
  max: 2,
2654
- onChange: (d, v) => {
2655
- o.timeScale = v, n.updateObject(e.uuid, "mixer.timeScale", v);
2695
+ onChange: (u, v) => {
2696
+ c.timeScale = v, n.updateObject(t.uuid, "mixer.timeScale", v);
2656
2697
  }
2657
2698
  }
2658
2699
  ];
2659
- u.push({
2700
+ d.push({
2660
2701
  title: "Stop All",
2661
2702
  type: "button",
2662
2703
  onChange: () => {
2663
- o.stopAllAction(), n.requestMethod(e.uuid, "stopAllAction", void 0, "mixer");
2704
+ c.stopAllAction(), n.requestMethod(t.uuid, "stopAllAction", void 0, "mixer");
2664
2705
  }
2665
2706
  }), a.push({
2666
2707
  title: "Mixer",
2667
- items: u
2708
+ items: d
2668
2709
  });
2669
2710
  }
2670
2711
  }
2671
2712
  return /* @__PURE__ */ l.jsx(We, { title: "Animation", items: a });
2672
2713
  }
2673
- const _n = {
2714
+ const Tn = {
2674
2715
  name: "",
2675
2716
  uuid: "",
2676
2717
  type: "",
@@ -2682,25 +2723,25 @@ const _n = {
2682
2723
  orthographicCameraInfo: void 0,
2683
2724
  lightInfo: void 0
2684
2725
  };
2685
- let re = { ..._n };
2686
- function Za(e) {
2726
+ let re = { ...Tn };
2727
+ function qa(t) {
2687
2728
  const [n, a] = oe(-1);
2688
- Re(() => {
2689
- function p(u) {
2690
- re = { ...u.value }, a(Date.now());
2729
+ _e(() => {
2730
+ function h(d) {
2731
+ re = { ...d.value }, a(Date.now());
2691
2732
  }
2692
- function o() {
2693
- re = { ..._n }, a(Date.now());
2733
+ function c() {
2734
+ re = { ...Tn }, a(Date.now());
2694
2735
  }
2695
- return P.addEventListener(k.SET_SCENE, o), P.addEventListener(k.SET_OBJECT, p), () => {
2696
- P.removeEventListener(k.SET_SCENE, o), P.removeEventListener(k.SET_OBJECT, p);
2736
+ return P.addEventListener(k.SET_SCENE, c), P.addEventListener(k.SET_OBJECT, h), () => {
2737
+ P.removeEventListener(k.SET_SCENE, c), P.removeEventListener(k.SET_OBJECT, h);
2697
2738
  };
2698
2739
  }, []);
2699
- const t = re.type.toLowerCase(), r = re.animations.length > 0 || re.mixer !== void 0, c = t.search("mesh") > -1 || t.search("line") > -1 || t.search("points") > -1;
2700
- return /* @__PURE__ */ l.jsx(Nt, { label: "Inspector", children: /* @__PURE__ */ l.jsx("div", { id: "Inspector", className: e.class, children: re.uuid.length > 0 && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
2740
+ const e = re.type.toLowerCase(), i = re.animations.length > 0 || re.mixer !== void 0, o = e.search("mesh") > -1 || e.search("line") > -1 || e.search("points") > -1;
2741
+ return /* @__PURE__ */ l.jsx(Lt, { label: "Inspector", children: /* @__PURE__ */ l.jsx("div", { id: "Inspector", className: t.class, children: re.uuid.length > 0 && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
2701
2742
  /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
2702
2743
  /* @__PURE__ */ l.jsx(
2703
- lt,
2744
+ ct,
2704
2745
  {
2705
2746
  type: "string",
2706
2747
  title: "Name",
@@ -2710,7 +2751,7 @@ function Za(e) {
2710
2751
  }
2711
2752
  ),
2712
2753
  /* @__PURE__ */ l.jsx(
2713
- lt,
2754
+ ct,
2714
2755
  {
2715
2756
  type: "string",
2716
2757
  title: "Type",
@@ -2720,7 +2761,7 @@ function Za(e) {
2720
2761
  }
2721
2762
  ),
2722
2763
  /* @__PURE__ */ l.jsx(
2723
- lt,
2764
+ ct,
2724
2765
  {
2725
2766
  type: "string",
2726
2767
  title: "UUID",
@@ -2730,93 +2771,93 @@ function Za(e) {
2730
2771
  }
2731
2772
  ),
2732
2773
  /* @__PURE__ */ l.jsx(
2733
- lt,
2774
+ ct,
2734
2775
  {
2735
2776
  type: "boolean",
2736
2777
  title: "Visible",
2737
2778
  prop: "visible",
2738
2779
  value: re.visible,
2739
- onChange: (p, o) => {
2740
- e.three.updateObject(re.uuid, p, o);
2741
- const u = e.three.scene?.getObjectByProperty("uuid", re.uuid);
2742
- u !== void 0 && ee(u, p, o);
2780
+ onChange: (h, c) => {
2781
+ t.three.updateObject(re.uuid, h, c);
2782
+ const d = t.three.scene?.getObjectByProperty("uuid", re.uuid);
2783
+ d !== void 0 && ee(d, h, c);
2743
2784
  }
2744
2785
  }
2745
2786
  )
2746
2787
  ] }),
2747
2788
  /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
2748
- qa(re, e.three),
2749
- r ? Xa(re, e.three) : null,
2750
- t.search("camera") > -1 ? Ga(re, e.three) : null,
2751
- t.search("light") > -1 ? Ka(re, e.three) : null,
2752
- c ? Ya(re, e.three) : null
2789
+ Va(re, t.three),
2790
+ i ? Wa(re, t.three) : null,
2791
+ e.search("camera") > -1 ? $a(re, t.three) : null,
2792
+ e.search("light") > -1 ? Ha(re, t.three) : null,
2793
+ o ? Ua(re, t.three) : null
2753
2794
  ] })
2754
2795
  ] }) }, n) }, "Inspector");
2755
2796
  }
2756
- function Oi(e) {
2757
- const [n, a] = oe(e.scene);
2758
- Re(() => {
2759
- const c = (p) => {
2760
- a(p.value);
2797
+ function vi(t) {
2798
+ const [n, a] = oe(t.scene);
2799
+ _e(() => {
2800
+ const o = (h) => {
2801
+ a(h.value);
2761
2802
  };
2762
- return P.addEventListener(k.SET_SCENE, c), () => {
2763
- P.removeEventListener(k.SET_SCENE, c);
2803
+ return P.addEventListener(k.SET_SCENE, o), () => {
2804
+ P.removeEventListener(k.SET_SCENE, o);
2764
2805
  };
2765
2806
  }, []);
2766
- const t = n !== null, r = "Hierarchy - " + (t ? `${n?.name}` : "No Scene");
2807
+ const e = n !== null, i = "Hierarchy - " + (e ? `${n?.name}` : "No Scene");
2767
2808
  return /* @__PURE__ */ l.jsxs("div", { id: "SidePanel", children: [
2768
- /* @__PURE__ */ l.jsx(Nt, { label: r, open: !0, children: /* @__PURE__ */ l.jsx(l.Fragment, { children: t && /* @__PURE__ */ l.jsx(ka, { child: n, three: e.three }) }) }),
2769
- /* @__PURE__ */ l.jsx(Za, { three: e.three })
2809
+ /* @__PURE__ */ l.jsx(Lt, { label: i, open: !0, children: /* @__PURE__ */ l.jsx(l.Fragment, { children: e && /* @__PURE__ */ l.jsx(_a, { child: n, three: t.three }) }) }),
2810
+ /* @__PURE__ */ l.jsx(qa, { three: t.three })
2770
2811
  ] }, "SidePanel");
2771
2812
  }
2772
- function Mi(e) {
2813
+ function gi(t) {
2773
2814
  function n() {
2774
- return e.three.scene === void 0 ? (console.log("No scene:", e.three), !1) : !0;
2815
+ return t.three.scene === void 0 ? (console.log("No scene:", t.three), !1) : !0;
2775
2816
  }
2776
- const a = (o) => {
2817
+ const a = (c) => {
2777
2818
  if (!n())
2778
2819
  return;
2779
- const u = e.three.scene?.getObjectByProperty("uuid", o.value);
2780
- u !== void 0 && e.three.setObject(u);
2781
- }, t = (o, u, d) => {
2820
+ const d = t.three.scene?.getObjectByProperty("uuid", c.value);
2821
+ d !== void 0 && t.three.setObject(d);
2822
+ }, e = (c, d, u) => {
2782
2823
  if (!n())
2783
2824
  return;
2784
- const v = e.three.scene?.getObjectByProperty("uuid", o);
2785
- v !== void 0 && ee(v, u, d);
2786
- }, r = (o) => {
2825
+ const v = t.three.scene?.getObjectByProperty("uuid", c);
2826
+ v !== void 0 && ee(v, d, u);
2827
+ }, i = (c) => {
2787
2828
  if (!n())
2788
2829
  return;
2789
- const u = o.value, { key: d, value: v, uuid: b } = u;
2790
- t(b, d, v);
2791
- }, c = (o) => {
2830
+ const d = c.value, { key: u, value: v, uuid: b } = d;
2831
+ e(b, u, v);
2832
+ }, o = (c) => {
2792
2833
  if (!n())
2793
2834
  return;
2794
- const u = o.value;
2795
- It(u.value).then((d) => {
2796
- t(u.uuid, u.key, d), t(u.uuid, "material.needsUpdate", !0);
2835
+ const d = c.value;
2836
+ Dt(d.value).then((u) => {
2837
+ e(d.uuid, d.key, u), e(d.uuid, "material.needsUpdate", !0);
2797
2838
  });
2798
- }, p = (o) => {
2839
+ }, h = (c) => {
2799
2840
  if (!n())
2800
2841
  return;
2801
- const { key: u, uuid: d, value: v, subitem: b } = o.value, E = e.three.scene?.getObjectByProperty("uuid", d);
2842
+ const { key: d, uuid: u, value: v, subitem: b } = c.value, E = t.three.scene?.getObjectByProperty("uuid", u);
2802
2843
  if (E !== void 0)
2803
2844
  try {
2804
- b !== void 0 ? xa(E, b)[u](v) : E[u](v);
2805
- } catch (C) {
2806
- console.log("Error requesting method:"), console.log(C), console.log(u), console.log(v);
2845
+ b !== void 0 ? Ea(E, b)[d](v) : E[d](v);
2846
+ } catch (S) {
2847
+ console.log("Error requesting method:"), console.log(S), console.log(d), console.log(v);
2807
2848
  }
2808
2849
  };
2809
- return Re(() => (P.addEventListener(k.GET_OBJECT, a), P.addEventListener(k.UPDATE_OBJECT, r), P.addEventListener(k.CREATE_TEXTURE, c), P.addEventListener(k.REQUEST_METHOD, p), () => {
2810
- P.removeEventListener(k.GET_OBJECT, a), P.removeEventListener(k.UPDATE_OBJECT, r), P.removeEventListener(k.CREATE_TEXTURE, c), P.removeEventListener(k.REQUEST_METHOD, p);
2850
+ return _e(() => (P.addEventListener(k.GET_OBJECT, a), P.addEventListener(k.UPDATE_OBJECT, i), P.addEventListener(k.CREATE_TEXTURE, o), P.addEventListener(k.REQUEST_METHOD, h), () => {
2851
+ P.removeEventListener(k.GET_OBJECT, a), P.removeEventListener(k.UPDATE_OBJECT, i), P.removeEventListener(k.CREATE_TEXTURE, o), P.removeEventListener(k.REQUEST_METHOD, h);
2811
2852
  }), []), null;
2812
2853
  }
2813
- const Zt = { type: "change" }, jt = { type: "start" }, Jt = { type: "end" }, bt = new Zn(), Qt = new Jn(), Ja = Math.cos(70 * Qn.DEG2RAD);
2814
- class Qa extends tn {
2854
+ const Xt = { type: "change" }, kt = { type: "start" }, Zt = { type: "end" }, gt = new Kn(), Jt = new Xn(), Ka = Math.cos(70 * Zn.DEG2RAD);
2855
+ class Xa extends en {
2815
2856
  constructor(n, a) {
2816
2857
  super(), this.object = n, this.domElement = a, this.domElement.style.touchAction = "none", this.enabled = !0, this.target = new W(), this.cursor = new W(), 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: Xe.ROTATE, MIDDLE: Xe.DOLLY, RIGHT: Xe.PAN }, this.touches = { ONE: Ze.ROTATE, TWO: Ze.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this.getPolarAngle = function() {
2817
- return o.phi;
2858
+ return c.phi;
2818
2859
  }, this.getAzimuthalAngle = function() {
2819
- return o.theta;
2860
+ return c.theta;
2820
2861
  }, this.getDistance = function() {
2821
2862
  return this.object.position.distanceTo(this.target);
2822
2863
  }, this.listenToKeyEvents = function(s) {
@@ -2824,40 +2865,40 @@ class Qa extends tn {
2824
2865
  }, this.stopListenToKeyEvents = function() {
2825
2866
  this._domElementKeyEvents.removeEventListener("keydown", nt), this._domElementKeyEvents = null;
2826
2867
  }, this.saveState = function() {
2827
- t.target0.copy(t.target), t.position0.copy(t.object.position), t.zoom0 = t.object.zoom;
2868
+ e.target0.copy(e.target), e.position0.copy(e.object.position), e.zoom0 = e.object.zoom;
2828
2869
  }, this.reset = function() {
2829
- t.target.copy(t.target0), t.object.position.copy(t.position0), t.object.zoom = t.zoom0, t.object.updateProjectionMatrix(), t.dispatchEvent(Zt), t.update(), c = r.NONE;
2870
+ e.target.copy(e.target0), e.object.position.copy(e.position0), e.object.zoom = e.zoom0, e.object.updateProjectionMatrix(), e.dispatchEvent(Xt), e.update(), o = i.NONE;
2830
2871
  }, this.update = function() {
2831
- const s = new W(), y = new $t().setFromUnitVectors(n.up, new W(0, 1, 0)), O = y.clone().invert(), L = new W(), H = new $t(), be = new W(), le = 2 * Math.PI;
2832
- return function(_t = null) {
2833
- const it = t.object.position;
2834
- s.copy(it).sub(t.target), s.applyQuaternion(y), o.setFromVector3(s), t.autoRotate && c === r.NONE && me(Fe(_t)), t.enableDamping ? (o.theta += u.theta * t.dampingFactor, o.phi += u.phi * t.dampingFactor) : (o.theta += u.theta, o.phi += u.phi);
2835
- let xe = t.minAzimuthAngle, ye = t.maxAzimuthAngle;
2836
- isFinite(xe) && isFinite(ye) && (xe < -Math.PI ? xe += le : xe > Math.PI && (xe -= le), ye < -Math.PI ? ye += le : ye > Math.PI && (ye -= le), xe <= ye ? o.theta = Math.max(xe, Math.min(ye, o.theta)) : o.theta = o.theta > (xe + ye) / 2 ? Math.max(xe, o.theta) : Math.min(ye, o.theta)), o.phi = Math.max(t.minPolarAngle, Math.min(t.maxPolarAngle, o.phi)), o.makeSafe(), t.enableDamping === !0 ? t.target.addScaledVector(v, t.dampingFactor) : t.target.add(v), t.target.sub(t.cursor), t.target.clampLength(t.minTargetRadius, t.maxTargetRadius), t.target.add(t.cursor), t.zoomToCursor && Y || t.object.isOrthographicCamera ? o.radius = ke(o.radius) : o.radius = ke(o.radius * d), s.setFromSpherical(o), s.applyQuaternion(O), it.copy(t.target).add(s), t.object.lookAt(t.target), t.enableDamping === !0 ? (u.theta *= 1 - t.dampingFactor, u.phi *= 1 - t.dampingFactor, v.multiplyScalar(1 - t.dampingFactor)) : (u.set(0, 0, 0), v.set(0, 0, 0));
2872
+ const s = new W(), y = new $t().setFromUnitVectors(n.up, new W(0, 1, 0)), O = y.clone().invert(), N = new W(), H = new $t(), be = new W(), le = 2 * Math.PI;
2873
+ return function(Tt = null) {
2874
+ const it = e.object.position;
2875
+ s.copy(it).sub(e.target), s.applyQuaternion(y), c.setFromVector3(s), e.autoRotate && o === i.NONE && me(Fe(Tt)), e.enableDamping ? (c.theta += d.theta * e.dampingFactor, c.phi += d.phi * e.dampingFactor) : (c.theta += d.theta, c.phi += d.phi);
2876
+ let xe = e.minAzimuthAngle, ye = e.maxAzimuthAngle;
2877
+ isFinite(xe) && isFinite(ye) && (xe < -Math.PI ? xe += le : xe > Math.PI && (xe -= le), ye < -Math.PI ? ye += le : ye > Math.PI && (ye -= le), xe <= ye ? c.theta = Math.max(xe, Math.min(ye, c.theta)) : c.theta = c.theta > (xe + ye) / 2 ? Math.max(xe, c.theta) : Math.min(ye, c.theta)), c.phi = Math.max(e.minPolarAngle, Math.min(e.maxPolarAngle, c.phi)), c.makeSafe(), e.enableDamping === !0 ? e.target.addScaledVector(v, e.dampingFactor) : e.target.add(v), e.target.sub(e.cursor), e.target.clampLength(e.minTargetRadius, e.maxTargetRadius), e.target.add(e.cursor), e.zoomToCursor && Y || e.object.isOrthographicCamera ? c.radius = ke(c.radius) : c.radius = ke(c.radius * u), s.setFromSpherical(c), s.applyQuaternion(O), it.copy(e.target).add(s), e.object.lookAt(e.target), e.enableDamping === !0 ? (d.theta *= 1 - e.dampingFactor, d.phi *= 1 - e.dampingFactor, v.multiplyScalar(1 - e.dampingFactor)) : (d.set(0, 0, 0), v.set(0, 0, 0));
2837
2878
  let $e = !1;
2838
- if (t.zoomToCursor && Y) {
2879
+ if (e.zoomToCursor && Y) {
2839
2880
  let ze = null;
2840
- if (t.object.isPerspectiveCamera) {
2881
+ if (e.object.isPerspectiveCamera) {
2841
2882
  const Ye = s.length();
2842
- ze = ke(Ye * d);
2883
+ ze = ke(Ye * u);
2843
2884
  const Ge = Ye - ze;
2844
- t.object.position.addScaledVector(we, Ge), t.object.updateMatrixWorld();
2845
- } else if (t.object.isOrthographicCamera) {
2885
+ e.object.position.addScaledVector(we, Ge), e.object.updateMatrixWorld();
2886
+ } else if (e.object.isOrthographicCamera) {
2846
2887
  const Ye = new W(ce.x, ce.y, 0);
2847
- Ye.unproject(t.object), t.object.zoom = Math.max(t.minZoom, Math.min(t.maxZoom, t.object.zoom / d)), t.object.updateProjectionMatrix(), $e = !0;
2888
+ Ye.unproject(e.object), e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / u)), e.object.updateProjectionMatrix(), $e = !0;
2848
2889
  const Ge = new W(ce.x, ce.y, 0);
2849
- Ge.unproject(t.object), t.object.position.sub(Ge).add(Ye), t.object.updateMatrixWorld(), ze = s.length();
2890
+ Ge.unproject(e.object), e.object.position.sub(Ge).add(Ye), e.object.updateMatrixWorld(), ze = s.length();
2850
2891
  } else
2851
- console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), t.zoomToCursor = !1;
2852
- ze !== null && (this.screenSpacePanning ? t.target.set(0, 0, -1).transformDirection(t.object.matrix).multiplyScalar(ze).add(t.object.position) : (bt.origin.copy(t.object.position), bt.direction.set(0, 0, -1).transformDirection(t.object.matrix), Math.abs(t.object.up.dot(bt.direction)) < Ja ? n.lookAt(t.target) : (Qt.setFromNormalAndCoplanarPoint(t.object.up, t.target), bt.intersectPlane(Qt, t.target))));
2892
+ console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), e.zoomToCursor = !1;
2893
+ ze !== null && (this.screenSpacePanning ? e.target.set(0, 0, -1).transformDirection(e.object.matrix).multiplyScalar(ze).add(e.object.position) : (gt.origin.copy(e.object.position), gt.direction.set(0, 0, -1).transformDirection(e.object.matrix), Math.abs(e.object.up.dot(gt.direction)) < Ka ? n.lookAt(e.target) : (Jt.setFromNormalAndCoplanarPoint(e.object.up, e.target), gt.intersectPlane(Jt, e.target))));
2853
2894
  } else
2854
- t.object.isOrthographicCamera && ($e = d !== 1, $e && (t.object.zoom = Math.max(t.minZoom, Math.min(t.maxZoom, t.object.zoom / d)), t.object.updateProjectionMatrix()));
2855
- return d = 1, Y = !1, $e || L.distanceToSquared(t.object.position) > p || 8 * (1 - H.dot(t.object.quaternion)) > p || be.distanceToSquared(t.target) > 0 ? (t.dispatchEvent(Zt), L.copy(t.object.position), H.copy(t.object.quaternion), be.copy(t.target), !0) : !1;
2895
+ e.object.isOrthographicCamera && ($e = u !== 1, $e && (e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / u)), e.object.updateProjectionMatrix()));
2896
+ return u = 1, Y = !1, $e || N.distanceToSquared(e.object.position) > h || 8 * (1 - H.dot(e.object.quaternion)) > h || be.distanceToSquared(e.target) > 0 ? (e.dispatchEvent(Xt), N.copy(e.object.position), H.copy(e.object.quaternion), be.copy(e.target), !0) : !1;
2856
2897
  };
2857
2898
  }(), this.dispose = function() {
2858
- t.domElement.removeEventListener("contextmenu", qe), t.domElement.removeEventListener("pointerdown", Be), t.domElement.removeEventListener("pointercancel", Ue), t.domElement.removeEventListener("wheel", ht), t.domElement.removeEventListener("pointermove", et), t.domElement.removeEventListener("pointerup", Ue), t._domElementKeyEvents !== null && (t._domElementKeyEvents.removeEventListener("keydown", nt), t._domElementKeyEvents = null);
2899
+ e.domElement.removeEventListener("contextmenu", qe), e.domElement.removeEventListener("pointerdown", Be), e.domElement.removeEventListener("pointercancel", Ue), e.domElement.removeEventListener("wheel", ht), e.domElement.removeEventListener("pointermove", et), e.domElement.removeEventListener("pointerup", Ue), e._domElementKeyEvents !== null && (e._domElementKeyEvents.removeEventListener("keydown", nt), e._domElementKeyEvents = null);
2859
2900
  };
2860
- const t = this, r = {
2901
+ const e = this, i = {
2861
2902
  NONE: -1,
2862
2903
  ROTATE: 0,
2863
2904
  DOLLY: 1,
@@ -2867,174 +2908,174 @@ class Qa extends tn {
2867
2908
  TOUCH_DOLLY_PAN: 5,
2868
2909
  TOUCH_DOLLY_ROTATE: 6
2869
2910
  };
2870
- let c = r.NONE;
2871
- const p = 1e-6, o = new zt(), u = new zt();
2872
- let d = 1;
2873
- const v = new W(), b = new he(), E = new he(), C = new he(), D = new he(), I = new he(), q = new he(), B = new he(), M = new he(), z = new he(), we = new W(), ce = new he();
2911
+ let o = i.NONE;
2912
+ const h = 1e-6, c = new zt(), d = new zt();
2913
+ let u = 1;
2914
+ const v = new W(), b = new fe(), E = new fe(), S = new fe(), D = new fe(), I = new fe(), q = new fe(), B = new fe(), M = new fe(), z = new fe(), we = new W(), ce = new fe();
2874
2915
  let Y = !1;
2875
2916
  const Q = [], x = {};
2876
2917
  let Ae = !1;
2877
2918
  function Fe(s) {
2878
- return s !== null ? 2 * Math.PI / 60 * t.autoRotateSpeed * s : 2 * Math.PI / 60 / 60 * t.autoRotateSpeed;
2919
+ return s !== null ? 2 * Math.PI / 60 * e.autoRotateSpeed * s : 2 * Math.PI / 60 / 60 * e.autoRotateSpeed;
2879
2920
  }
2880
2921
  function Oe(s) {
2881
2922
  const y = Math.abs(s * 0.01);
2882
- return Math.pow(0.95, t.zoomSpeed * y);
2923
+ return Math.pow(0.95, e.zoomSpeed * y);
2883
2924
  }
2884
2925
  function me(s) {
2885
- u.theta -= s;
2926
+ d.theta -= s;
2886
2927
  }
2887
2928
  function te(s) {
2888
- u.phi -= s;
2929
+ d.phi -= s;
2889
2930
  }
2890
- const de = function() {
2931
+ const ue = function() {
2891
2932
  const s = new W();
2892
- return function(O, L) {
2893
- s.setFromMatrixColumn(L, 0), s.multiplyScalar(-O), v.add(s);
2933
+ return function(O, N) {
2934
+ s.setFromMatrixColumn(N, 0), s.multiplyScalar(-O), v.add(s);
2894
2935
  };
2895
2936
  }(), ve = function() {
2896
2937
  const s = new W();
2897
- return function(O, L) {
2898
- t.screenSpacePanning === !0 ? s.setFromMatrixColumn(L, 1) : (s.setFromMatrixColumn(L, 0), s.crossVectors(t.object.up, s)), s.multiplyScalar(O), v.add(s);
2938
+ return function(O, N) {
2939
+ e.screenSpacePanning === !0 ? s.setFromMatrixColumn(N, 1) : (s.setFromMatrixColumn(N, 0), s.crossVectors(e.object.up, s)), s.multiplyScalar(O), v.add(s);
2899
2940
  };
2900
2941
  }(), ge = function() {
2901
2942
  const s = new W();
2902
- return function(O, L) {
2903
- const H = t.domElement;
2904
- if (t.object.isPerspectiveCamera) {
2905
- const be = t.object.position;
2906
- s.copy(be).sub(t.target);
2943
+ return function(O, N) {
2944
+ const H = e.domElement;
2945
+ if (e.object.isPerspectiveCamera) {
2946
+ const be = e.object.position;
2947
+ s.copy(be).sub(e.target);
2907
2948
  let le = s.length();
2908
- le *= Math.tan(t.object.fov / 2 * Math.PI / 180), de(2 * O * le / H.clientHeight, t.object.matrix), ve(2 * L * le / H.clientHeight, t.object.matrix);
2949
+ le *= Math.tan(e.object.fov / 2 * Math.PI / 180), ue(2 * O * le / H.clientHeight, e.object.matrix), ve(2 * N * le / H.clientHeight, e.object.matrix);
2909
2950
  } else
2910
- t.object.isOrthographicCamera ? (de(O * (t.object.right - t.object.left) / t.object.zoom / H.clientWidth, t.object.matrix), ve(L * (t.object.top - t.object.bottom) / t.object.zoom / H.clientHeight, t.object.matrix)) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."), t.enablePan = !1);
2951
+ e.object.isOrthographicCamera ? (ue(O * (e.object.right - e.object.left) / e.object.zoom / H.clientWidth, e.object.matrix), ve(N * (e.object.top - e.object.bottom) / e.object.zoom / H.clientHeight, e.object.matrix)) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."), e.enablePan = !1);
2911
2952
  };
2912
2953
  }();
2913
2954
  function K(s) {
2914
- t.object.isPerspectiveCamera || t.object.isOrthographicCamera ? d /= s : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), t.enableZoom = !1);
2955
+ e.object.isPerspectiveCamera || e.object.isOrthographicCamera ? u /= s : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
2915
2956
  }
2916
2957
  function pe(s) {
2917
- t.object.isPerspectiveCamera || t.object.isOrthographicCamera ? d *= s : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), t.enableZoom = !1);
2958
+ e.object.isPerspectiveCamera || e.object.isOrthographicCamera ? u *= s : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
2918
2959
  }
2919
2960
  function Pe(s, y) {
2920
- if (!t.zoomToCursor)
2961
+ if (!e.zoomToCursor)
2921
2962
  return;
2922
2963
  Y = !0;
2923
- const O = t.domElement.getBoundingClientRect(), L = s - O.left, H = y - O.top, be = O.width, le = O.height;
2924
- ce.x = L / be * 2 - 1, ce.y = -(H / le) * 2 + 1, we.set(ce.x, ce.y, 1).unproject(t.object).sub(t.object.position).normalize();
2964
+ const O = e.domElement.getBoundingClientRect(), N = s - O.left, H = y - O.top, be = O.width, le = O.height;
2965
+ ce.x = N / be * 2 - 1, ce.y = -(H / le) * 2 + 1, we.set(ce.x, ce.y, 1).unproject(e.object).sub(e.object.position).normalize();
2925
2966
  }
2926
2967
  function ke(s) {
2927
- return Math.max(t.minDistance, Math.min(t.maxDistance, s));
2968
+ return Math.max(e.minDistance, Math.min(e.maxDistance, s));
2928
2969
  }
2929
- function fe(s) {
2970
+ function he(s) {
2930
2971
  b.set(s.clientX, s.clientY);
2931
2972
  }
2932
- function h(s) {
2973
+ function p(s) {
2933
2974
  Pe(s.clientX, s.clientX), B.set(s.clientX, s.clientY);
2934
2975
  }
2935
2976
  function m(s) {
2936
2977
  D.set(s.clientX, s.clientY);
2937
2978
  }
2938
2979
  function w(s) {
2939
- E.set(s.clientX, s.clientY), C.subVectors(E, b).multiplyScalar(t.rotateSpeed);
2940
- const y = t.domElement;
2941
- me(2 * Math.PI * C.x / y.clientHeight), te(2 * Math.PI * C.y / y.clientHeight), b.copy(E), t.update();
2980
+ E.set(s.clientX, s.clientY), S.subVectors(E, b).multiplyScalar(e.rotateSpeed);
2981
+ const y = e.domElement;
2982
+ me(2 * Math.PI * S.x / y.clientHeight), te(2 * Math.PI * S.y / y.clientHeight), b.copy(E), e.update();
2942
2983
  }
2943
- function _(s) {
2944
- M.set(s.clientX, s.clientY), z.subVectors(M, B), z.y > 0 ? K(Oe(z.y)) : z.y < 0 && pe(Oe(z.y)), B.copy(M), t.update();
2984
+ function R(s) {
2985
+ M.set(s.clientX, s.clientY), z.subVectors(M, B), z.y > 0 ? K(Oe(z.y)) : z.y < 0 && pe(Oe(z.y)), B.copy(M), e.update();
2945
2986
  }
2946
2987
  function G(s) {
2947
- I.set(s.clientX, s.clientY), q.subVectors(I, D).multiplyScalar(t.panSpeed), ge(q.x, q.y), D.copy(I), t.update();
2988
+ I.set(s.clientX, s.clientY), q.subVectors(I, D).multiplyScalar(e.panSpeed), ge(q.x, q.y), D.copy(I), e.update();
2948
2989
  }
2949
2990
  function V(s) {
2950
- Pe(s.clientX, s.clientY), s.deltaY < 0 ? pe(Oe(s.deltaY)) : s.deltaY > 0 && K(Oe(s.deltaY)), t.update();
2991
+ Pe(s.clientX, s.clientY), s.deltaY < 0 ? pe(Oe(s.deltaY)) : s.deltaY > 0 && K(Oe(s.deltaY)), e.update();
2951
2992
  }
2952
2993
  function ae(s) {
2953
2994
  let y = !1;
2954
2995
  switch (s.code) {
2955
- case t.keys.UP:
2956
- s.ctrlKey || s.metaKey || s.shiftKey ? te(2 * Math.PI * t.rotateSpeed / t.domElement.clientHeight) : ge(0, t.keyPanSpeed), y = !0;
2996
+ case e.keys.UP:
2997
+ s.ctrlKey || s.metaKey || s.shiftKey ? te(2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : ge(0, e.keyPanSpeed), y = !0;
2957
2998
  break;
2958
- case t.keys.BOTTOM:
2959
- s.ctrlKey || s.metaKey || s.shiftKey ? te(-2 * Math.PI * t.rotateSpeed / t.domElement.clientHeight) : ge(0, -t.keyPanSpeed), y = !0;
2999
+ case e.keys.BOTTOM:
3000
+ s.ctrlKey || s.metaKey || s.shiftKey ? te(-2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : ge(0, -e.keyPanSpeed), y = !0;
2960
3001
  break;
2961
- case t.keys.LEFT:
2962
- s.ctrlKey || s.metaKey || s.shiftKey ? me(2 * Math.PI * t.rotateSpeed / t.domElement.clientHeight) : ge(t.keyPanSpeed, 0), y = !0;
3002
+ case e.keys.LEFT:
3003
+ s.ctrlKey || s.metaKey || s.shiftKey ? me(2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : ge(e.keyPanSpeed, 0), y = !0;
2963
3004
  break;
2964
- case t.keys.RIGHT:
2965
- s.ctrlKey || s.metaKey || s.shiftKey ? me(-2 * Math.PI * t.rotateSpeed / t.domElement.clientHeight) : ge(-t.keyPanSpeed, 0), y = !0;
3005
+ case e.keys.RIGHT:
3006
+ s.ctrlKey || s.metaKey || s.shiftKey ? me(-2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : ge(-e.keyPanSpeed, 0), y = !0;
2966
3007
  break;
2967
3008
  }
2968
- y && (s.preventDefault(), t.update());
3009
+ y && (s.preventDefault(), e.update());
2969
3010
  }
2970
3011
  function U(s) {
2971
3012
  if (Q.length === 1)
2972
3013
  b.set(s.pageX, s.pageY);
2973
3014
  else {
2974
- const y = De(s), O = 0.5 * (s.pageX + y.x), L = 0.5 * (s.pageY + y.y);
2975
- b.set(O, L);
3015
+ const y = De(s), O = 0.5 * (s.pageX + y.x), N = 0.5 * (s.pageY + y.y);
3016
+ b.set(O, N);
2976
3017
  }
2977
3018
  }
2978
3019
  function X(s) {
2979
3020
  if (Q.length === 1)
2980
3021
  D.set(s.pageX, s.pageY);
2981
3022
  else {
2982
- const y = De(s), O = 0.5 * (s.pageX + y.x), L = 0.5 * (s.pageY + y.y);
2983
- D.set(O, L);
3023
+ const y = De(s), O = 0.5 * (s.pageX + y.x), N = 0.5 * (s.pageY + y.y);
3024
+ D.set(O, N);
2984
3025
  }
2985
3026
  }
2986
3027
  function ie(s) {
2987
- const y = De(s), O = s.pageX - y.x, L = s.pageY - y.y, H = Math.sqrt(O * O + L * L);
3028
+ const y = De(s), O = s.pageX - y.x, N = s.pageY - y.y, H = Math.sqrt(O * O + N * N);
2988
3029
  B.set(0, H);
2989
3030
  }
2990
- function R(s) {
2991
- t.enableZoom && ie(s), t.enablePan && X(s);
3031
+ function _(s) {
3032
+ e.enableZoom && ie(s), e.enablePan && X(s);
2992
3033
  }
2993
3034
  function F(s) {
2994
- t.enableZoom && ie(s), t.enableRotate && U(s);
3035
+ e.enableZoom && ie(s), e.enableRotate && U(s);
2995
3036
  }
2996
3037
  function ne(s) {
2997
3038
  if (Q.length == 1)
2998
3039
  E.set(s.pageX, s.pageY);
2999
3040
  else {
3000
- const O = De(s), L = 0.5 * (s.pageX + O.x), H = 0.5 * (s.pageY + O.y);
3001
- E.set(L, H);
3041
+ const O = De(s), N = 0.5 * (s.pageX + O.x), H = 0.5 * (s.pageY + O.y);
3042
+ E.set(N, H);
3002
3043
  }
3003
- C.subVectors(E, b).multiplyScalar(t.rotateSpeed);
3004
- const y = t.domElement;
3005
- me(2 * Math.PI * C.x / y.clientHeight), te(2 * Math.PI * C.y / y.clientHeight), b.copy(E);
3044
+ S.subVectors(E, b).multiplyScalar(e.rotateSpeed);
3045
+ const y = e.domElement;
3046
+ me(2 * Math.PI * S.x / y.clientHeight), te(2 * Math.PI * S.y / y.clientHeight), b.copy(E);
3006
3047
  }
3007
- function Se(s) {
3048
+ function Ce(s) {
3008
3049
  if (Q.length === 1)
3009
3050
  I.set(s.pageX, s.pageY);
3010
3051
  else {
3011
- const y = De(s), O = 0.5 * (s.pageX + y.x), L = 0.5 * (s.pageY + y.y);
3012
- I.set(O, L);
3052
+ const y = De(s), O = 0.5 * (s.pageX + y.x), N = 0.5 * (s.pageY + y.y);
3053
+ I.set(O, N);
3013
3054
  }
3014
- q.subVectors(I, D).multiplyScalar(t.panSpeed), ge(q.x, q.y), D.copy(I);
3055
+ q.subVectors(I, D).multiplyScalar(e.panSpeed), ge(q.x, q.y), D.copy(I);
3015
3056
  }
3016
3057
  function Me(s) {
3017
- const y = De(s), O = s.pageX - y.x, L = s.pageY - y.y, H = Math.sqrt(O * O + L * L);
3018
- M.set(0, H), z.set(0, Math.pow(M.y / B.y, t.zoomSpeed)), K(z.y), B.copy(M);
3058
+ const y = De(s), O = s.pageX - y.x, N = s.pageY - y.y, H = Math.sqrt(O * O + N * N);
3059
+ M.set(0, H), z.set(0, Math.pow(M.y / B.y, e.zoomSpeed)), K(z.y), B.copy(M);
3019
3060
  const be = (s.pageX + y.x) * 0.5, le = (s.pageY + y.y) * 0.5;
3020
3061
  Pe(be, le);
3021
3062
  }
3022
3063
  function dt(s) {
3023
- t.enableZoom && Me(s), t.enablePan && Se(s);
3064
+ e.enableZoom && Me(s), e.enablePan && Ce(s);
3024
3065
  }
3025
- function ft(s) {
3026
- t.enableZoom && Me(s), t.enableRotate && ne(s);
3066
+ function ut(s) {
3067
+ e.enableZoom && Me(s), e.enableRotate && ne(s);
3027
3068
  }
3028
3069
  function Be(s) {
3029
- t.enabled !== !1 && (Q.length === 0 && (t.domElement.setPointerCapture(s.pointerId), t.domElement.addEventListener("pointermove", et), t.domElement.addEventListener("pointerup", Ue)), Ot(s), s.pointerType === "touch" ? at(s) : tt(s));
3070
+ e.enabled !== !1 && (Q.length === 0 && (e.domElement.setPointerCapture(s.pointerId), e.domElement.addEventListener("pointermove", et), e.domElement.addEventListener("pointerup", Ue)), wt(s), s.pointerType === "touch" ? at(s) : tt(s));
3030
3071
  }
3031
3072
  function et(s) {
3032
- t.enabled !== !1 && (s.pointerType === "touch" ? vt(s) : wt(s));
3073
+ e.enabled !== !1 && (s.pointerType === "touch" ? mt(s) : xt(s));
3033
3074
  }
3034
3075
  function Ue(s) {
3035
- switch (Mt(s), Q.length) {
3076
+ switch (Ot(s), Q.length) {
3036
3077
  case 0:
3037
- t.domElement.releasePointerCapture(s.pointerId), t.domElement.removeEventListener("pointermove", et), t.domElement.removeEventListener("pointerup", Ue), t.dispatchEvent(Jt), c = r.NONE;
3078
+ e.domElement.releasePointerCapture(s.pointerId), e.domElement.removeEventListener("pointermove", et), e.domElement.removeEventListener("pointerup", Ue), e.dispatchEvent(Zt), o = i.NONE;
3038
3079
  break;
3039
3080
  case 1:
3040
3081
  const y = Q[0], O = x[y];
@@ -3046,73 +3087,73 @@ class Qa extends tn {
3046
3087
  let y;
3047
3088
  switch (s.button) {
3048
3089
  case 0:
3049
- y = t.mouseButtons.LEFT;
3090
+ y = e.mouseButtons.LEFT;
3050
3091
  break;
3051
3092
  case 1:
3052
- y = t.mouseButtons.MIDDLE;
3093
+ y = e.mouseButtons.MIDDLE;
3053
3094
  break;
3054
3095
  case 2:
3055
- y = t.mouseButtons.RIGHT;
3096
+ y = e.mouseButtons.RIGHT;
3056
3097
  break;
3057
3098
  default:
3058
3099
  y = -1;
3059
3100
  }
3060
3101
  switch (y) {
3061
3102
  case Xe.DOLLY:
3062
- if (t.enableZoom === !1)
3103
+ if (e.enableZoom === !1)
3063
3104
  return;
3064
- h(s), c = r.DOLLY;
3105
+ p(s), o = i.DOLLY;
3065
3106
  break;
3066
3107
  case Xe.ROTATE:
3067
3108
  if (s.ctrlKey || s.metaKey || s.shiftKey) {
3068
- if (t.enablePan === !1)
3109
+ if (e.enablePan === !1)
3069
3110
  return;
3070
- m(s), c = r.PAN;
3111
+ m(s), o = i.PAN;
3071
3112
  } else {
3072
- if (t.enableRotate === !1)
3113
+ if (e.enableRotate === !1)
3073
3114
  return;
3074
- fe(s), c = r.ROTATE;
3115
+ he(s), o = i.ROTATE;
3075
3116
  }
3076
3117
  break;
3077
3118
  case Xe.PAN:
3078
3119
  if (s.ctrlKey || s.metaKey || s.shiftKey) {
3079
- if (t.enableRotate === !1)
3120
+ if (e.enableRotate === !1)
3080
3121
  return;
3081
- fe(s), c = r.ROTATE;
3122
+ he(s), o = i.ROTATE;
3082
3123
  } else {
3083
- if (t.enablePan === !1)
3124
+ if (e.enablePan === !1)
3084
3125
  return;
3085
- m(s), c = r.PAN;
3126
+ m(s), o = i.PAN;
3086
3127
  }
3087
3128
  break;
3088
3129
  default:
3089
- c = r.NONE;
3130
+ o = i.NONE;
3090
3131
  }
3091
- c !== r.NONE && t.dispatchEvent(jt);
3132
+ o !== i.NONE && e.dispatchEvent(kt);
3092
3133
  }
3093
- function wt(s) {
3094
- switch (c) {
3095
- case r.ROTATE:
3096
- if (t.enableRotate === !1)
3134
+ function xt(s) {
3135
+ switch (o) {
3136
+ case i.ROTATE:
3137
+ if (e.enableRotate === !1)
3097
3138
  return;
3098
3139
  w(s);
3099
3140
  break;
3100
- case r.DOLLY:
3101
- if (t.enableZoom === !1)
3141
+ case i.DOLLY:
3142
+ if (e.enableZoom === !1)
3102
3143
  return;
3103
- _(s);
3144
+ R(s);
3104
3145
  break;
3105
- case r.PAN:
3106
- if (t.enablePan === !1)
3146
+ case i.PAN:
3147
+ if (e.enablePan === !1)
3107
3148
  return;
3108
3149
  G(s);
3109
3150
  break;
3110
3151
  }
3111
3152
  }
3112
3153
  function ht(s) {
3113
- t.enabled === !1 || t.enableZoom === !1 || c !== r.NONE || (s.preventDefault(), t.dispatchEvent(jt), V(pt(s)), t.dispatchEvent(Jt));
3154
+ e.enabled === !1 || e.enableZoom === !1 || o !== i.NONE || (s.preventDefault(), e.dispatchEvent(kt), V(ft(s)), e.dispatchEvent(Zt));
3114
3155
  }
3115
- function pt(s) {
3156
+ function ft(s) {
3116
3157
  const y = s.deltaMode, O = {
3117
3158
  clientX: s.clientX,
3118
3159
  clientY: s.clientY,
@@ -3128,87 +3169,87 @@ class Qa extends tn {
3128
3169
  }
3129
3170
  return s.ctrlKey && !Ae && (O.deltaY *= 10), O;
3130
3171
  }
3131
- function mt(s) {
3132
- s.key === "Control" && (Ae = !0, t.domElement.getRootNode().addEventListener("keyup", je, { passive: !0, capture: !0 }));
3172
+ function pt(s) {
3173
+ s.key === "Control" && (Ae = !0, e.domElement.getRootNode().addEventListener("keyup", je, { passive: !0, capture: !0 }));
3133
3174
  }
3134
3175
  function je(s) {
3135
- s.key === "Control" && (Ae = !1, t.domElement.getRootNode().removeEventListener("keyup", je, { passive: !0, capture: !0 }));
3176
+ s.key === "Control" && (Ae = !1, e.domElement.getRootNode().removeEventListener("keyup", je, { passive: !0, capture: !0 }));
3136
3177
  }
3137
3178
  function nt(s) {
3138
- t.enabled === !1 || t.enablePan === !1 || ae(s);
3179
+ e.enabled === !1 || e.enablePan === !1 || ae(s);
3139
3180
  }
3140
3181
  function at(s) {
3141
- switch (gt(s), Q.length) {
3182
+ switch (vt(s), Q.length) {
3142
3183
  case 1:
3143
- switch (t.touches.ONE) {
3184
+ switch (e.touches.ONE) {
3144
3185
  case Ze.ROTATE:
3145
- if (t.enableRotate === !1)
3186
+ if (e.enableRotate === !1)
3146
3187
  return;
3147
- U(s), c = r.TOUCH_ROTATE;
3188
+ U(s), o = i.TOUCH_ROTATE;
3148
3189
  break;
3149
3190
  case Ze.PAN:
3150
- if (t.enablePan === !1)
3191
+ if (e.enablePan === !1)
3151
3192
  return;
3152
- X(s), c = r.TOUCH_PAN;
3193
+ X(s), o = i.TOUCH_PAN;
3153
3194
  break;
3154
3195
  default:
3155
- c = r.NONE;
3196
+ o = i.NONE;
3156
3197
  }
3157
3198
  break;
3158
3199
  case 2:
3159
- switch (t.touches.TWO) {
3200
+ switch (e.touches.TWO) {
3160
3201
  case Ze.DOLLY_PAN:
3161
- if (t.enableZoom === !1 && t.enablePan === !1)
3202
+ if (e.enableZoom === !1 && e.enablePan === !1)
3162
3203
  return;
3163
- R(s), c = r.TOUCH_DOLLY_PAN;
3204
+ _(s), o = i.TOUCH_DOLLY_PAN;
3164
3205
  break;
3165
3206
  case Ze.DOLLY_ROTATE:
3166
- if (t.enableZoom === !1 && t.enableRotate === !1)
3207
+ if (e.enableZoom === !1 && e.enableRotate === !1)
3167
3208
  return;
3168
- F(s), c = r.TOUCH_DOLLY_ROTATE;
3209
+ F(s), o = i.TOUCH_DOLLY_ROTATE;
3169
3210
  break;
3170
3211
  default:
3171
- c = r.NONE;
3212
+ o = i.NONE;
3172
3213
  }
3173
3214
  break;
3174
3215
  default:
3175
- c = r.NONE;
3216
+ o = i.NONE;
3176
3217
  }
3177
- c !== r.NONE && t.dispatchEvent(jt);
3218
+ o !== i.NONE && e.dispatchEvent(kt);
3178
3219
  }
3179
- function vt(s) {
3180
- switch (gt(s), c) {
3181
- case r.TOUCH_ROTATE:
3182
- if (t.enableRotate === !1)
3220
+ function mt(s) {
3221
+ switch (vt(s), o) {
3222
+ case i.TOUCH_ROTATE:
3223
+ if (e.enableRotate === !1)
3183
3224
  return;
3184
- ne(s), t.update();
3225
+ ne(s), e.update();
3185
3226
  break;
3186
- case r.TOUCH_PAN:
3187
- if (t.enablePan === !1)
3227
+ case i.TOUCH_PAN:
3228
+ if (e.enablePan === !1)
3188
3229
  return;
3189
- Se(s), t.update();
3230
+ Ce(s), e.update();
3190
3231
  break;
3191
- case r.TOUCH_DOLLY_PAN:
3192
- if (t.enableZoom === !1 && t.enablePan === !1)
3232
+ case i.TOUCH_DOLLY_PAN:
3233
+ if (e.enableZoom === !1 && e.enablePan === !1)
3193
3234
  return;
3194
- dt(s), t.update();
3235
+ dt(s), e.update();
3195
3236
  break;
3196
- case r.TOUCH_DOLLY_ROTATE:
3197
- if (t.enableZoom === !1 && t.enableRotate === !1)
3237
+ case i.TOUCH_DOLLY_ROTATE:
3238
+ if (e.enableZoom === !1 && e.enableRotate === !1)
3198
3239
  return;
3199
- ft(s), t.update();
3240
+ ut(s), e.update();
3200
3241
  break;
3201
3242
  default:
3202
- c = r.NONE;
3243
+ o = i.NONE;
3203
3244
  }
3204
3245
  }
3205
3246
  function qe(s) {
3206
- t.enabled !== !1 && s.preventDefault();
3247
+ e.enabled !== !1 && s.preventDefault();
3207
3248
  }
3208
- function Ot(s) {
3249
+ function wt(s) {
3209
3250
  Q.push(s.pointerId);
3210
3251
  }
3211
- function Mt(s) {
3252
+ function Ot(s) {
3212
3253
  delete x[s.pointerId];
3213
3254
  for (let y = 0; y < Q.length; y++)
3214
3255
  if (Q[y] == s.pointerId) {
@@ -3216,56 +3257,56 @@ class Qa extends tn {
3216
3257
  return;
3217
3258
  }
3218
3259
  }
3219
- function gt(s) {
3260
+ function vt(s) {
3220
3261
  let y = x[s.pointerId];
3221
- y === void 0 && (y = new he(), x[s.pointerId] = y), y.set(s.pageX, s.pageY);
3262
+ y === void 0 && (y = new fe(), x[s.pointerId] = y), y.set(s.pageX, s.pageY);
3222
3263
  }
3223
3264
  function De(s) {
3224
3265
  const y = s.pointerId === Q[0] ? Q[1] : Q[0];
3225
3266
  return x[y];
3226
3267
  }
3227
- t.domElement.addEventListener("contextmenu", qe), t.domElement.addEventListener("pointerdown", Be), t.domElement.addEventListener("pointercancel", Ue), t.domElement.addEventListener("wheel", ht, { passive: !1 }), t.domElement.getRootNode().addEventListener("keydown", mt, { passive: !0, capture: !0 }), this.update();
3268
+ e.domElement.addEventListener("contextmenu", qe), e.domElement.addEventListener("pointerdown", Be), e.domElement.addEventListener("pointercancel", Ue), e.domElement.addEventListener("wheel", ht, { passive: !1 }), e.domElement.getRootNode().addEventListener("keydown", pt, { passive: !0, capture: !0 }), this.update();
3228
3269
  }
3229
3270
  }
3230
- const Ct = (e) => {
3231
- const [n, a] = oe(e.options[e.index]), t = () => {
3232
- e.onToggle(!e.open);
3233
- }, r = (c) => {
3234
- c !== n && (e.onSelect(c), a(c)), e.onToggle(!1);
3271
+ const Et = (t) => {
3272
+ const [n, a] = oe(t.options[t.index]), e = () => {
3273
+ t.onToggle(!t.open);
3274
+ }, i = (o) => {
3275
+ o !== n && (t.onSelect(o), a(o)), t.onToggle(!1);
3235
3276
  };
3236
- return /* @__PURE__ */ l.jsxs("div", { className: `dropdown ${e.up === !0 ? "up" : ""}`, children: [
3237
- /* @__PURE__ */ l.jsx("div", { className: "dropdown-toggle", onClick: t, children: n }),
3238
- e.open && /* @__PURE__ */ l.jsx("ul", { className: "dropdown-menu", children: e.options.map((c) => /* @__PURE__ */ l.jsx("li", { onClick: () => r(c), children: c }, c)) })
3277
+ return /* @__PURE__ */ l.jsxs("div", { className: `dropdown ${t.up === !0 ? "up" : ""}`, children: [
3278
+ /* @__PURE__ */ l.jsx("div", { className: "dropdown-toggle", onClick: e, children: n }),
3279
+ t.open && /* @__PURE__ */ l.jsx("ul", { className: "dropdown-menu", children: t.options.map((o) => /* @__PURE__ */ l.jsx("li", { onClick: () => i(o), children: o }, o)) })
3239
3280
  ] });
3240
- }, He = ha(function(n, a) {
3241
- const [t, r] = oe(!1), c = n.options.indexOf(n.camera.name);
3281
+ }, He = ua(function(n, a) {
3282
+ const [e, i] = oe(!1), o = n.options.indexOf(n.camera.name);
3242
3283
  return /* @__PURE__ */ l.jsxs("div", { className: "CameraWindow", children: [
3243
3284
  /* @__PURE__ */ l.jsx("div", { ref: a, className: "clickable", onClick: () => {
3244
- t && r(!1);
3285
+ e && i(!1);
3245
3286
  } }),
3246
3287
  /* @__PURE__ */ l.jsx(
3247
- Ct,
3288
+ Et,
3248
3289
  {
3249
- index: c,
3250
- open: t,
3290
+ index: o,
3291
+ open: e,
3251
3292
  options: n.options,
3252
3293
  onSelect: n.onSelect,
3253
- onToggle: (p) => {
3254
- r(p);
3294
+ onToggle: (h) => {
3295
+ i(h);
3255
3296
  },
3256
3297
  up: !0
3257
3298
  }
3258
3299
  )
3259
3300
  ] });
3260
3301
  });
3261
- class ei extends yn {
3302
+ class Za extends bn {
3262
3303
  constructor(n) {
3263
3304
  super({
3264
3305
  extensions: {
3265
3306
  derivatives: !0
3266
3307
  },
3267
- glslVersion: ea,
3268
- side: an,
3308
+ glslVersion: Jn,
3309
+ side: nn,
3269
3310
  transparent: !0,
3270
3311
  uniforms: {
3271
3312
  uScale: {
@@ -3370,17 +3411,17 @@ class ei extends yn {
3370
3411
  });
3371
3412
  }
3372
3413
  }
3373
- class ti extends ta {
3414
+ class Ja extends Qn {
3374
3415
  gridMaterial;
3375
3416
  constructor() {
3376
- const n = new ei();
3377
- super(new na(2, 2), n), this.gridMaterial = n, this.frustumCulled = !1, this.name = "InfiniteGridHelper", this.position.y = 0.1;
3417
+ const n = new Za();
3418
+ super(new ea(2, 2), n), this.gridMaterial = n, this.frustumCulled = !1, this.name = "InfiniteGridHelper", this.position.y = 0.1;
3378
3419
  }
3379
3420
  update() {
3380
3421
  this.gridMaterial.needsUpdate = !0;
3381
3422
  }
3382
3423
  }
3383
- const ni = `#include <common>
3424
+ const Qa = `#include <common>
3384
3425
  #include <batching_pars_vertex>
3385
3426
  #include <uv_pars_vertex>
3386
3427
  #include <color_pars_vertex>
@@ -3410,7 +3451,7 @@ void main() {
3410
3451
  #include <logdepthbuf_vertex>
3411
3452
  #include <clipping_planes_vertex>
3412
3453
  #include <worldpos_vertex>
3413
- }`, ai = `
3454
+ }`, ei = `
3414
3455
  #include <common>
3415
3456
  #include <uv_pars_fragment>
3416
3457
  #include <clipping_planes_pars_fragment>
@@ -3419,27 +3460,27 @@ void main() {
3419
3460
  #include <clipping_planes_fragment>
3420
3461
  gl_FragColor = vec4(vec3(vUv, 0.0), 1.0);
3421
3462
  }`;
3422
- class ii extends yn {
3463
+ class ti extends bn {
3423
3464
  constructor() {
3424
3465
  super({
3425
3466
  defines: {
3426
3467
  USE_UV: ""
3427
3468
  },
3428
- vertexShader: ni,
3429
- fragmentShader: ai
3469
+ vertexShader: Qa,
3470
+ fragmentShader: ei
3430
3471
  });
3431
3472
  }
3432
3473
  }
3433
- let yt = "Renderer", Ie, Et = !1, en = !1, $, se, Le, Ne;
3434
- function Ti(e) {
3435
- const n = Ce(() => /* @__PURE__ */ new Map(), []), a = Ce(() => /* @__PURE__ */ new Map(), []), t = Ce(() => /* @__PURE__ */ new Map(), []), r = Ce(() => new aa(), []), c = Ce(() => new ia(), []), p = Ce(() => new ti(), []), o = Ce(() => new Yt(500), []), u = Ce(() => new Yt(100), []), d = Ce(() => new ra(), []), v = Ce(() => new sa(), []), b = Ce(() => new ii(), []), E = Ce(() => new oa({
3474
+ let bt = "Renderer", Ie, yt = !1, Qt = !1, $, se, Ne, Le;
3475
+ function bi(t) {
3476
+ const n = Se(() => /* @__PURE__ */ new Map(), []), a = Se(() => /* @__PURE__ */ new Map(), []), e = Se(() => /* @__PURE__ */ new Map(), []), i = Se(() => new ta(), []), o = Se(() => new na(), []), h = Se(() => new Ja(), []), c = Se(() => new Yt(500), []), d = Se(() => new Yt(100), []), u = Se(() => new aa(), []), v = Se(() => new ia(), []), b = Se(() => new ti(), []), E = Se(() => new ra({
3436
3477
  opacity: 0.33,
3437
3478
  transparent: !0,
3438
3479
  wireframe: !0
3439
3480
  }), []);
3440
- function C(h, m) {
3481
+ function S(p, m) {
3441
3482
  const w = new Gt(-100, 100, 100, -100, 50, 3e3);
3442
- return w.name = h, w.position.copy(m), w.lookAt(0, 0, 0), n.set(h, w), w;
3483
+ return w.name = p, w.position.copy(m), w.lookAt(0, 0, 0), n.set(p, w), w;
3443
3484
  }
3444
3485
  const D = [
3445
3486
  "Renderer",
@@ -3453,18 +3494,18 @@ function Ti(e) {
3453
3494
  "Stacked",
3454
3495
  "Quad"
3455
3496
  ];
3456
- Re(() => {
3457
- r.name = "Debug Scene", c.name = "helpers", r.add(c), c.add(p), o.name = "axisHelper", c.add(o), u.name = "interactionHelper", c.add(u), u.visible = !1, C("Top", new W(0, 1e3, 0)), C("Bottom", new W(0, -1e3, 0)), C("Left", new W(-1e3, 0, 0)), C("Right", new W(1e3, 0, 0)), C("Front", new W(0, 0, 1e3)), C("Back", new W(0, 0, -1e3)), C("Orthographic", new W(1e3, 1e3, 1e3));
3458
- const h = new Rt(60, 1, 50, 3e3);
3459
- h.name = "Debug", h.position.set(500, 500, 500), h.lookAt(0, 0, 0), n.set("Debug", h), $ = n.get("Debug"), se = n.get("Orthographic"), Le = n.get("Front"), Ne = n.get("Top");
3497
+ _e(() => {
3498
+ i.name = "Debug Scene", o.name = "helpers", i.add(o), o.add(h), c.name = "axisHelper", o.add(c), d.name = "interactionHelper", o.add(d), d.visible = !1, S("Top", new W(0, 1e3, 0)), S("Bottom", new W(0, -1e3, 0)), S("Left", new W(-1e3, 0, 0)), S("Right", new W(1e3, 0, 0)), S("Front", new W(0, 0, 1e3)), S("Back", new W(0, 0, -1e3)), S("Orthographic", new W(1e3, 1e3, 1e3));
3499
+ const p = new Rt(60, 1, 50, 3e3);
3500
+ p.name = "Debug", p.position.set(500, 500, 500), p.lookAt(0, 0, 0), n.set("Debug", p), $ = n.get("Debug"), se = n.get("Orthographic"), Ne = n.get("Front"), Le = n.get("Top");
3460
3501
  }, []);
3461
- const q = _e(null), B = _e(null), M = _e(null), z = _e(null), we = _e(null), ce = _e(null), [Y, Q] = oe(e.mode !== void 0 ? e.mode : "Single"), [x, Ae] = oe(null), [Fe, Oe] = oe(!1), [me, te] = oe(!1), [de, ve] = oe(!1), [, ge] = oe(Date.now()), K = (h, m) => {
3462
- const w = a.get(h.name);
3463
- w !== void 0 && w.dispose(), a.delete(h.name);
3464
- const _ = t.get(h.name);
3465
- _ !== void 0 && (r.remove(_), _.dispose()), t.delete(h.name);
3466
- const G = new Qa(h, m);
3467
- switch (G.enableDamping = !0, G.dampingFactor = 0.05, h.name) {
3502
+ const q = Re(null), B = Re(null), M = Re(null), z = Re(null), we = Re(null), ce = Re(null), [Y, Q] = oe(t.mode !== void 0 ? t.mode : "Single"), [x, Ae] = oe(null), [Fe, Oe] = oe(!1), [me, te] = oe(!1), [ue, ve] = oe(!1), [, ge] = oe(Date.now()), K = (p, m) => {
3503
+ const w = a.get(p.name);
3504
+ w !== void 0 && w.dispose(), a.delete(p.name);
3505
+ const R = e.get(p.name);
3506
+ R !== void 0 && (i.remove(R), R.dispose()), e.delete(p.name);
3507
+ const G = new Xa(p, m);
3508
+ switch (G.enableDamping = !0, G.dampingFactor = 0.05, p.name) {
3468
3509
  case "Top":
3469
3510
  case "Bottom":
3470
3511
  case "Left":
@@ -3474,21 +3515,21 @@ function Ti(e) {
3474
3515
  G.enableRotate = !1;
3475
3516
  break;
3476
3517
  }
3477
- if (a.set(h.name, G), h instanceof Rt) {
3478
- const V = new ua(h);
3479
- t.set(h.name, V), r.add(V);
3518
+ if (a.set(p.name, G), p instanceof Rt) {
3519
+ const V = new ca(p);
3520
+ e.set(p.name, V), i.add(V);
3480
3521
  }
3481
- }, pe = (h) => {
3482
- const m = t.get(h.name);
3483
- m !== void 0 && (r.remove(m), m.dispose(), t.delete(h.name));
3484
- const w = a.get(h.name);
3485
- w !== void 0 && (w.dispose(), a.delete(h.name));
3522
+ }, pe = (p) => {
3523
+ const m = e.get(p.name);
3524
+ m !== void 0 && (i.remove(m), m.dispose(), e.delete(p.name));
3525
+ const w = a.get(p.name);
3526
+ w !== void 0 && (w.dispose(), a.delete(p.name));
3486
3527
  }, Pe = () => {
3487
- a.forEach((h, m) => {
3488
- h.dispose();
3489
- const w = t.get(m);
3490
- w !== void 0 && (r.remove(w), w.dispose()), t.delete(m), a.delete(m);
3491
- }), a.clear(), t.clear();
3528
+ a.forEach((p, m) => {
3529
+ p.dispose();
3530
+ const w = e.get(m);
3531
+ w !== void 0 && (i.remove(w), w.dispose()), e.delete(m), a.delete(m);
3532
+ }), a.clear(), e.clear();
3492
3533
  }, ke = () => {
3493
3534
  switch (Y) {
3494
3535
  case "Single":
@@ -3499,70 +3540,70 @@ function Ti(e) {
3499
3540
  K($, M.current), K(se, z.current);
3500
3541
  break;
3501
3542
  case "Quad":
3502
- K($, M.current), K(se, z.current), K(Le, we.current), K(Ne, ce.current);
3543
+ K($, M.current), K(se, z.current), K(Ne, we.current), K(Le, ce.current);
3503
3544
  break;
3504
3545
  }
3505
3546
  };
3506
- Re(() => {
3507
- const h = new ca({
3547
+ _e(() => {
3548
+ const p = new sa({
3508
3549
  canvas: q.current,
3509
3550
  stencil: !1
3510
3551
  });
3511
- h.autoClear = !1, h.shadowMap.enabled = !0, h.setPixelRatio(devicePixelRatio), h.setClearColor(0), Ae(h);
3512
- }, []), Re(() => {
3513
- const h = (_) => {
3514
- wn(Ie), r.remove(Ie);
3515
- const G = e.scenes.get(_.value.name);
3552
+ p.autoClear = !1, p.shadowMap.enabled = !0, p.setPixelRatio(devicePixelRatio), p.setClearColor(0), Ae(p);
3553
+ }, []), _e(() => {
3554
+ const p = (R) => {
3555
+ xn(Ie), i.remove(Ie);
3556
+ const G = t.scenes.get(R.value.name);
3516
3557
  if (G !== void 0) {
3517
3558
  const V = new G();
3518
- e.onSceneSet !== void 0 && e.onSceneSet(V), Ie = V, e.three.scene = Ie, r.add(Ie), en = !0;
3559
+ t.onSceneSet !== void 0 && t.onSceneSet(V), Ie = V, t.three.scene = Ie, i.add(Ie), Qt = !0;
3519
3560
  }
3520
- }, m = (_) => {
3521
- const G = _.value, V = e.three.scene?.getObjectByProperty("uuid", G.uuid);
3561
+ }, m = (R) => {
3562
+ const G = R.value, V = t.three.scene?.getObjectByProperty("uuid", G.uuid);
3522
3563
  V !== void 0 && n.set(G.name, V), ge(Date.now());
3523
- }, w = (_) => {
3524
- n.delete(_.value.name), ge(Date.now());
3564
+ }, w = (R) => {
3565
+ n.delete(R.value.name), ge(Date.now());
3525
3566
  };
3526
- return P.addEventListener(k.SET_SCENE, h), P.addEventListener(k.ADD_CAMERA, m), P.addEventListener(k.REMOVE_CAMERA, w), () => {
3527
- P.removeEventListener(k.SET_SCENE, h), P.removeEventListener(k.ADD_CAMERA, m), P.removeEventListener(k.REMOVE_CAMERA, w);
3567
+ return P.addEventListener(k.SET_SCENE, p), P.addEventListener(k.ADD_CAMERA, m), P.addEventListener(k.REMOVE_CAMERA, w), () => {
3568
+ P.removeEventListener(k.SET_SCENE, p), P.removeEventListener(k.ADD_CAMERA, m), P.removeEventListener(k.REMOVE_CAMERA, w);
3528
3569
  };
3529
- }, []), Re(() => {
3570
+ }, []), _e(() => {
3530
3571
  if (x === null)
3531
3572
  return;
3532
- let h = window.innerWidth, m = window.innerHeight, w = Math.floor(h / 2), _ = Math.floor(m / 2), G = -1;
3573
+ let p = window.innerWidth, m = window.innerHeight, w = Math.floor(p / 2), R = Math.floor(m / 2), G = -1;
3533
3574
  const V = () => {
3534
- h = window.innerWidth - 300, m = window.innerHeight, w = Math.floor(h / 2), _ = Math.floor(m / 2), x.setSize(h, m);
3535
- let R = h, F = m;
3575
+ p = window.innerWidth - 300, m = window.innerHeight, w = Math.floor(p / 2), R = Math.floor(m / 2), x.setSize(p, m);
3576
+ let _ = p, F = m;
3536
3577
  switch (Y) {
3537
3578
  case "Side by Side":
3538
- R = w, F = m;
3579
+ _ = w, F = m;
3539
3580
  break;
3540
3581
  case "Stacked":
3541
- R = h, F = _;
3582
+ _ = p, F = R;
3542
3583
  break;
3543
3584
  case "Quad":
3544
- R = w, F = _;
3585
+ _ = w, F = R;
3545
3586
  break;
3546
3587
  }
3547
3588
  n.forEach((ne) => {
3548
- ne instanceof Gt ? (ne.left = R / -2, ne.right = R / 2, ne.top = F / 2, ne.bottom = F / -2, ne.updateProjectionMatrix()) : ne instanceof Rt && (ne.aspect = R / F, ne.updateProjectionMatrix(), t.get(ne.name)?.update());
3589
+ ne instanceof Gt ? (ne.left = _ / -2, ne.right = _ / 2, ne.top = F / 2, ne.bottom = F / -2, ne.updateProjectionMatrix()) : ne instanceof Rt && (ne.aspect = _ / F, ne.updateProjectionMatrix(), e.get(ne.name)?.update());
3549
3590
  });
3550
3591
  }, ae = () => {
3551
- x.setViewport(0, 0, h, m), x.setScissor(0, 0, h, m), x.render(r, $);
3592
+ x.setViewport(0, 0, p, m), x.setScissor(0, 0, p, m), x.render(i, $);
3552
3593
  }, U = () => {
3553
3594
  if (Y === "Side by Side")
3554
- x.setViewport(0, 0, w, m), x.setScissor(0, 0, w, m), x.render(r, $), x.setViewport(w, 0, w, m), x.setScissor(w, 0, w, m), x.render(r, se);
3595
+ x.setViewport(0, 0, w, m), x.setScissor(0, 0, w, m), x.render(i, $), x.setViewport(w, 0, w, m), x.setScissor(w, 0, w, m), x.render(i, se);
3555
3596
  else {
3556
- const R = m - _;
3557
- x.setViewport(0, R, h, _), x.setScissor(0, R, h, _), x.render(r, $), x.setViewport(0, 0, h, _), x.setScissor(0, 0, h, _), x.render(r, se);
3597
+ const _ = m - R;
3598
+ x.setViewport(0, _, p, R), x.setScissor(0, _, p, R), x.render(i, $), x.setViewport(0, 0, p, R), x.setScissor(0, 0, p, R), x.render(i, se);
3558
3599
  }
3559
3600
  }, X = () => {
3560
- let R = 0, F = 0;
3561
- F = m - _, R = 0, x.setViewport(R, F, w, _), x.setScissor(R, F, w, _), x.render(r, $), R = w, x.setViewport(R, F, w, _), x.setScissor(R, F, w, _), x.render(r, se), F = 0, R = 0, x.setViewport(R, F, w, _), x.setScissor(R, F, w, _), x.render(r, Le), R = w, x.setViewport(R, F, w, _), x.setScissor(R, F, w, _), x.render(r, Ne);
3601
+ let _ = 0, F = 0;
3602
+ F = m - R, _ = 0, x.setViewport(_, F, w, R), x.setScissor(_, F, w, R), x.render(i, $), _ = w, x.setViewport(_, F, w, R), x.setScissor(_, F, w, R), x.render(i, se), F = 0, _ = 0, x.setViewport(_, F, w, R), x.setScissor(_, F, w, R), x.render(i, Ne), _ = w, x.setViewport(_, F, w, R), x.setScissor(_, F, w, R), x.render(i, Le);
3562
3603
  }, ie = () => {
3563
- switch (a.forEach((R) => {
3564
- R.update();
3565
- }), e.onSceneUpdate !== void 0 && en && e.onSceneUpdate(Ie), x.clear(), Y) {
3604
+ switch (a.forEach((_) => {
3605
+ _.update();
3606
+ }), t.onSceneUpdate !== void 0 && Qt && t.onSceneUpdate(Ie), x.clear(), Y) {
3566
3607
  case "Single":
3567
3608
  ae();
3568
3609
  break;
@@ -3579,172 +3620,172 @@ function Ti(e) {
3579
3620
  return ke(), window.addEventListener("resize", V), V(), ie(), () => {
3580
3621
  window.removeEventListener("resize", V), cancelAnimationFrame(G), G = -1;
3581
3622
  };
3582
- }, [Y, x]), Re(() => {
3623
+ }, [Y, x]), _e(() => {
3583
3624
  if (x !== null) {
3584
- const h = new la(), m = new he(), w = (ae, U, X, ie) => {
3625
+ const p = new oa(), m = new fe(), w = (ae, U, X, ie) => {
3585
3626
  switch (Y) {
3586
3627
  case "Quad":
3587
- ae < X ? U < ie ? h.setFromCamera(m, $) : h.setFromCamera(m, Le) : U < ie ? h.setFromCamera(m, se) : h.setFromCamera(m, Ne);
3628
+ ae < X ? U < ie ? p.setFromCamera(m, $) : p.setFromCamera(m, Ne) : U < ie ? p.setFromCamera(m, se) : p.setFromCamera(m, Le);
3588
3629
  break;
3589
3630
  case "Side by Side":
3590
- ae < X ? h.setFromCamera(m, $) : h.setFromCamera(m, se);
3631
+ ae < X ? p.setFromCamera(m, $) : p.setFromCamera(m, se);
3591
3632
  break;
3592
3633
  case "Single":
3593
- h.setFromCamera(m, $);
3634
+ p.setFromCamera(m, $);
3594
3635
  break;
3595
3636
  case "Stacked":
3596
- U < ie ? h.setFromCamera(m, $) : h.setFromCamera(m, se);
3637
+ U < ie ? p.setFromCamera(m, $) : p.setFromCamera(m, se);
3597
3638
  break;
3598
3639
  }
3599
- }, _ = (ae) => {
3600
- if (!Et)
3640
+ }, R = (ae) => {
3641
+ if (!yt)
3601
3642
  return;
3602
- const U = new he();
3643
+ const U = new fe();
3603
3644
  x.getSize(U);
3604
3645
  const X = Math.min(ae.clientX, U.x), ie = Math.min(ae.clientY, U.y);
3605
3646
  m.x = Qe(X, 0, U.x, -1, 1), m.y = Qe(ie, 0, U.y, 1, -1);
3606
- const R = U.x / 2, F = U.y / 2, ne = () => {
3607
- X < R ? m.x = Qe(X, 0, R, -1, 1) : m.x = Qe(X, R, U.x, -1, 1);
3608
- }, Se = () => {
3647
+ const _ = U.x / 2, F = U.y / 2, ne = () => {
3648
+ X < _ ? m.x = Qe(X, 0, _, -1, 1) : m.x = Qe(X, _, U.x, -1, 1);
3649
+ }, Ce = () => {
3609
3650
  ie < F ? m.y = Qe(ie, 0, F, 1, -1) : m.y = Qe(ie, F, U.y, 1, -1);
3610
3651
  };
3611
3652
  switch (Y) {
3612
3653
  case "Quad":
3613
- ne(), Se();
3654
+ ne(), Ce();
3614
3655
  break;
3615
3656
  case "Side by Side":
3616
3657
  ne();
3617
3658
  break;
3618
3659
  case "Stacked":
3619
- Se(), Se();
3660
+ Ce(), Ce();
3620
3661
  break;
3621
3662
  }
3622
- w(X, ie, R, F);
3623
- const Me = h.intersectObjects(Ie.children);
3624
- Me.length > 0 && u.position.copy(Me[0].point);
3663
+ w(X, ie, _, F);
3664
+ const Me = p.intersectObjects(Ie.children);
3665
+ Me.length > 0 && d.position.copy(Me[0].point);
3625
3666
  }, G = (ae) => {
3626
- if (!Et)
3667
+ if (!yt)
3627
3668
  return;
3628
- const U = new he();
3669
+ const U = new fe();
3629
3670
  if (x.getSize(U), ae.clientX >= U.x)
3630
3671
  return;
3631
- _(ae);
3632
- const X = h.intersectObjects(Ie.children);
3633
- X.length > 0 && e.three.getObject(X[0].object.uuid);
3672
+ R(ae);
3673
+ const X = p.intersectObjects(Ie.children);
3674
+ X.length > 0 && t.three.getObject(X[0].object.uuid);
3634
3675
  }, V = B.current;
3635
- return V.addEventListener("mousemove", _, !1), V.addEventListener("click", G, !1), () => {
3636
- V.removeEventListener("mousemove", _), V.removeEventListener("click", G);
3676
+ return V.addEventListener("mousemove", R, !1), V.addEventListener("click", G, !1), () => {
3677
+ V.removeEventListener("mousemove", R), V.removeEventListener("click", G);
3637
3678
  };
3638
3679
  }
3639
3680
  }, [Y, x]);
3640
- const fe = [];
3641
- return n.forEach((h, m) => {
3642
- fe.push(m);
3681
+ const he = [];
3682
+ return n.forEach((p, m) => {
3683
+ he.push(m);
3643
3684
  }), /* @__PURE__ */ l.jsxs("div", { className: "multiview", children: [
3644
3685
  /* @__PURE__ */ l.jsx("canvas", { ref: q }),
3645
3686
  x !== null && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
3646
3687
  /* @__PURE__ */ l.jsxs("div", { className: `cameras ${Y === "Single" || Y === "Stacked" ? "single" : ""}`, ref: B, children: [
3647
- Y === "Single" && /* @__PURE__ */ l.jsx(l.Fragment, { children: /* @__PURE__ */ l.jsx(He, { camera: $, options: fe, ref: M, onSelect: (h) => {
3688
+ Y === "Single" && /* @__PURE__ */ l.jsx(l.Fragment, { children: /* @__PURE__ */ l.jsx(He, { camera: $, options: he, ref: M, onSelect: (p) => {
3648
3689
  a.get($.name)?.dispose();
3649
- const m = n.get(h);
3690
+ const m = n.get(p);
3650
3691
  m !== void 0 && (pe($), $ = m, K(m, M.current));
3651
3692
  } }) }),
3652
3693
  (Y === "Side by Side" || Y === "Stacked") && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
3653
- /* @__PURE__ */ l.jsx(He, { camera: $, options: fe, ref: M, onSelect: (h) => {
3694
+ /* @__PURE__ */ l.jsx(He, { camera: $, options: he, ref: M, onSelect: (p) => {
3654
3695
  a.get($.name)?.dispose();
3655
- const m = n.get(h);
3696
+ const m = n.get(p);
3656
3697
  m !== void 0 && (pe($), $ = m, K(m, M.current));
3657
3698
  } }),
3658
- /* @__PURE__ */ l.jsx(He, { camera: se, options: fe, ref: z, onSelect: (h) => {
3699
+ /* @__PURE__ */ l.jsx(He, { camera: se, options: he, ref: z, onSelect: (p) => {
3659
3700
  a.get(se.name)?.dispose();
3660
- const m = n.get(h);
3701
+ const m = n.get(p);
3661
3702
  m !== void 0 && (pe(se), se = m, K(m, z.current));
3662
3703
  } })
3663
3704
  ] }),
3664
3705
  Y === "Quad" && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
3665
- /* @__PURE__ */ l.jsx(He, { camera: $, options: fe, ref: M, onSelect: (h) => {
3706
+ /* @__PURE__ */ l.jsx(He, { camera: $, options: he, ref: M, onSelect: (p) => {
3666
3707
  a.get($.name)?.dispose();
3667
- const m = n.get(h);
3708
+ const m = n.get(p);
3668
3709
  m !== void 0 && (pe($), $ = m, K(m, M.current));
3669
3710
  } }),
3670
- /* @__PURE__ */ l.jsx(He, { camera: se, options: fe, ref: z, onSelect: (h) => {
3711
+ /* @__PURE__ */ l.jsx(He, { camera: se, options: he, ref: z, onSelect: (p) => {
3671
3712
  a.get(se.name)?.dispose();
3672
- const m = n.get(h);
3713
+ const m = n.get(p);
3673
3714
  m !== void 0 && (pe(se), se = m, K(m, z.current));
3674
3715
  } }),
3675
- /* @__PURE__ */ l.jsx(He, { camera: Le, options: fe, ref: we, onSelect: (h) => {
3676
- a.get(Le.name)?.dispose();
3677
- const m = n.get(h);
3678
- m !== void 0 && (pe(Le), Le = m, K(m, we.current));
3679
- } }),
3680
- /* @__PURE__ */ l.jsx(He, { camera: Ne, options: fe, ref: ce, onSelect: (h) => {
3716
+ /* @__PURE__ */ l.jsx(He, { camera: Ne, options: he, ref: we, onSelect: (p) => {
3681
3717
  a.get(Ne.name)?.dispose();
3682
- const m = n.get(h);
3683
- m !== void 0 && (pe(Ne), Ne = m, K(m, ce.current));
3718
+ const m = n.get(p);
3719
+ m !== void 0 && (pe(Ne), Ne = m, K(m, we.current));
3720
+ } }),
3721
+ /* @__PURE__ */ l.jsx(He, { camera: Le, options: he, ref: ce, onSelect: (p) => {
3722
+ a.get(Le.name)?.dispose();
3723
+ const m = n.get(p);
3724
+ m !== void 0 && (pe(Le), Le = m, K(m, ce.current));
3684
3725
  } })
3685
3726
  ] })
3686
3727
  ] }),
3687
3728
  /* @__PURE__ */ l.jsxs("div", { className: "settings", children: [
3688
3729
  /* @__PURE__ */ l.jsx(
3689
- Ct,
3730
+ Et,
3690
3731
  {
3691
3732
  index: I.indexOf(Y),
3692
3733
  options: I,
3693
- onSelect: (h) => {
3694
- h !== Y && (Pe(), Q(h));
3734
+ onSelect: (p) => {
3735
+ p !== Y && (Pe(), Q(p));
3695
3736
  },
3696
3737
  open: Fe,
3697
- onToggle: (h) => {
3698
- Oe(h), me && te(!1), de && ve(!1);
3738
+ onToggle: (p) => {
3739
+ Oe(p), me && te(!1), ue && ve(!1);
3699
3740
  }
3700
3741
  }
3701
3742
  ),
3702
3743
  /* @__PURE__ */ l.jsx(
3703
- Ct,
3744
+ Et,
3704
3745
  {
3705
- index: D.indexOf(yt),
3746
+ index: D.indexOf(bt),
3706
3747
  options: D,
3707
- onSelect: (h) => {
3708
- if (h !== yt)
3709
- switch (yt = h, yt) {
3748
+ onSelect: (p) => {
3749
+ if (p !== bt)
3750
+ switch (bt = p, bt) {
3710
3751
  case "Depth":
3711
- r.overrideMaterial = d;
3752
+ i.overrideMaterial = u;
3712
3753
  break;
3713
3754
  case "Normals":
3714
- r.overrideMaterial = v;
3755
+ i.overrideMaterial = v;
3715
3756
  break;
3716
3757
  default:
3717
3758
  case "Renderer":
3718
- r.overrideMaterial = null;
3759
+ i.overrideMaterial = null;
3719
3760
  break;
3720
3761
  case "Wireframe":
3721
- r.overrideMaterial = E;
3762
+ i.overrideMaterial = E;
3722
3763
  break;
3723
3764
  case "UVs":
3724
- r.overrideMaterial = b;
3765
+ i.overrideMaterial = b;
3725
3766
  break;
3726
3767
  }
3727
3768
  },
3728
3769
  open: me,
3729
- onToggle: (h) => {
3730
- Fe && Oe(!1), te(h), de && ve(!1);
3770
+ onToggle: (p) => {
3771
+ Fe && Oe(!1), te(p), ue && ve(!1);
3731
3772
  }
3732
3773
  }
3733
3774
  ),
3734
3775
  /* @__PURE__ */ l.jsx(
3735
- Ct,
3776
+ Et,
3736
3777
  {
3737
3778
  index: 0,
3738
3779
  options: [
3739
3780
  "Orbit Mode",
3740
3781
  "Selection Mode"
3741
3782
  ],
3742
- onSelect: (h) => {
3743
- Et = h === "Selection Mode", u.visible = Et;
3783
+ onSelect: (p) => {
3784
+ yt = p === "Selection Mode", d.visible = yt;
3744
3785
  },
3745
- open: de,
3746
- onToggle: (h) => {
3747
- Fe && Oe(!1), me && te(!1), ve(h);
3786
+ open: ue,
3787
+ onToggle: (p) => {
3788
+ Fe && Oe(!1), me && te(!1), ve(p);
3748
3789
  }
3749
3790
  }
3750
3791
  )
@@ -3752,56 +3793,50 @@ function Ti(e) {
3752
3793
  ] })
3753
3794
  ] });
3754
3795
  }
3755
- function _i(e) {
3756
- return /* @__PURE__ */ l.jsxs("div", { className: "editor", ref: e.ref, style: e.style, children: [
3757
- /* @__PURE__ */ l.jsx("header", { children: e.header }),
3758
- e.children,
3759
- /* @__PURE__ */ l.jsx("footer", { children: e.footer })
3796
+ function yi(t) {
3797
+ return /* @__PURE__ */ l.jsxs("div", { className: "editor", ref: t.ref, style: t.style, children: [
3798
+ /* @__PURE__ */ l.jsx("div", { className: "header", children: t.header }),
3799
+ t.children,
3800
+ /* @__PURE__ */ l.jsx("div", { className: "footer", children: t.footer })
3760
3801
  ] });
3761
3802
  }
3762
3803
  export {
3763
- Nt as Accordion,
3764
- pi as Application,
3765
- xt as BaseRemote,
3766
- Tn as ChildObject,
3767
- ka as ContainerObject,
3768
- Ra as Draggable,
3769
- _a as DraggableItem,
3770
- Aa as Dropdown,
3771
- Pa as DropdownItem,
3772
- _i as Editor,
3773
- Za as Inspector,
3774
- Ti as MultiView,
3775
- Mn as NavButton,
3776
- mi as RemoteComponents,
3777
- ct as RemoteController,
3778
- ya as RemoteTheatre,
3779
- xi as RemoteThree,
3780
- wi as RemoteTweakpane,
3781
- Mi as SceneInspector,
3782
- Oi as SidePanel,
3804
+ Lt as Accordion,
3805
+ di as Application,
3806
+ Ct as BaseRemote,
3807
+ Mn as ChildObject,
3808
+ _a as ContainerObject,
3809
+ Ma as Draggable,
3810
+ Oa as DraggableItem,
3811
+ Ta as Dropdown,
3812
+ Ra as DropdownItem,
3813
+ yi as Editor,
3814
+ qa as Inspector,
3815
+ bi as MultiView,
3816
+ On as NavButton,
3817
+ ui as RemoteComponents,
3818
+ mi as RemoteController,
3819
+ Nt as RemoteTheatre,
3820
+ fi as RemoteThree,
3821
+ pi as RemoteTweakpane,
3822
+ gi as SceneInspector,
3823
+ vi as SidePanel,
3783
3824
  k as ToolEvents,
3784
- ut as capitalize,
3785
- di as clamp,
3786
- va as colorToHex,
3787
- vi as componentsApp,
3825
+ lt as capitalize,
3826
+ oi as clamp,
3827
+ pa as colorToHex,
3788
3828
  P as debugDispatcher,
3789
- ui as defaultTheatreCallback,
3790
- wn as dispose,
3791
- ba as disposeMaterial,
3792
- hi as disposeTexture,
3793
- fi as distance,
3794
- xn as hierarchyUUID,
3795
- ma as isColor,
3829
+ si as defaultTheatreCallback,
3830
+ xn as dispose,
3831
+ va as disposeMaterial,
3832
+ li as disposeTexture,
3833
+ ci as distance,
3834
+ Cn as hierarchyUUID,
3835
+ fa as isColor,
3796
3836
  Sn as noop,
3797
- pa as randomID,
3798
- ga as resetThreeObjects,
3799
- At as round,
3800
- gi as theatreApp,
3801
- bi as theatreEditor,
3802
- Si as theatreEditorApp,
3803
- yi as threeApp,
3804
- Ei as threeEditor,
3805
- Dt as totalThreeObjects,
3806
- Ci as tweakpaneApp
3837
+ ha as randomID,
3838
+ ma as resetThreeObjects,
3839
+ _t as round,
3840
+ hi as theatreEditorApp,
3841
+ jt as totalThreeObjects
3807
3842
  };