build-dxf 0.0.43 → 0.0.44

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/src/index3.js CHANGED
@@ -1,71 +1,71 @@
1
- import * as u from "three";
1
+ import * as g from "three";
2
2
  import { i as ut, n as pt, r as Ue, t as qe, c as Pe, d as gt, e as vt, f as De, g as Q, _ as Ze, u as ft, h as fe, j as _e, w as yt, k as wt, l as bt, p as xt, m as Ct, o as Et, T as Ne, q as Be, s as Lt, v as Mt, x as Re, y as Ie, z as Me, A as kt, B as It, L as ye, D as Pt, b as Oe, E as re, S as Dt } from "./selectLocalFile.js";
3
- import { C as Ae, P as L, L as N, B as Ye, E as Xe, b as Fe, Q as ze, c as At, u as St, A as _t, r as Ke, W as Nt, T as Bt } from "./build.js";
3
+ import { C as Ae, P as L, L as N, B as Ye, E as Xe, b as ze, Q as Fe, c as At, u as St, A as _t, r as Ke, W as Nt, T as Bt } from "./build.js";
4
4
  import "clipper-lib";
5
5
  import "dxf-writer";
6
+ import { watch as J, ref as _, defineComponent as me, computed as A, createElementBlock as R, openBlock as D, normalizeClass as j, unref as v, renderSlot as be, createVNode as F, Transition as xe, withCtx as V, withDirectives as $e, createElementVNode as P, normalizeStyle as Se, createTextVNode as X, toDisplayString as de, vShow as et, shallowReactive as Rt, onMounted as tt, createBlock as ge, createCommentVNode as q, resolveDynamicComponent as Ot, Fragment as ve, withModifiers as zt, nextTick as we, isVNode as nt, render as Te, toRaw as Ft, onUnmounted as Kt, renderList as ke, createStaticVNode as Tt, TransitionGroup as Vt, createApp as jt } from "vue";
6
7
  import "three/addons/controls/OrbitControls.js";
7
- import { watch as J, ref as _, defineComponent as me, computed as A, createElementBlock as R, openBlock as D, normalizeClass as j, unref as v, renderSlot as be, createVNode as z, Transition as xe, withCtx as V, withDirectives as $e, createElementVNode as P, normalizeStyle as Se, createTextVNode as X, toDisplayString as de, vShow as et, shallowReactive as Rt, onMounted as tt, createBlock as ge, createCommentVNode as q, resolveDynamicComponent as Ot, Fragment as ve, withModifiers as Ft, nextTick as we, isVNode as nt, render as Te, toRaw as zt, onUnmounted as Kt, renderList as ke, createStaticVNode as Tt, TransitionGroup as Vt, createApp as jt } from "vue";
8
- function st(l) {
8
+ function st(c) {
9
9
  var e;
10
- const t = Ue(l);
10
+ const t = Ue(c);
11
11
  return (e = t?.$el) != null ? e : t;
12
12
  }
13
13
  const ot = Pe ? window : void 0;
14
- function Gt(...l) {
14
+ function Gt(...c) {
15
15
  let e, t, n, s;
16
- if (ut(l[0]) || Array.isArray(l[0]) ? ([t, n, s] = l, e = ot) : [e, t, n, s] = l, !e)
16
+ if (ut(c[0]) || Array.isArray(c[0]) ? ([t, n, s] = c, e = ot) : [e, t, n, s] = c, !e)
17
17
  return pt;
18
18
  Array.isArray(t) || (t = [t]), Array.isArray(n) || (n = [n]);
19
19
  const o = [], a = () => {
20
- o.forEach((c) => c()), o.length = 0;
21
- }, d = (c, m, y, f) => (c.addEventListener(m, y, f), () => c.removeEventListener(m, y, f)), r = J(() => [st(e), Ue(s)], ([c, m]) => {
22
- a(), c && o.push(...t.flatMap((y) => n.map((f) => d(c, y, f, m))));
20
+ o.forEach((d) => d()), o.length = 0;
21
+ }, l = (d, m, y, f) => (d.addEventListener(m, y, f), () => d.removeEventListener(m, y, f)), r = J(() => [st(e), Ue(s)], ([d, m]) => {
22
+ a(), d && o.push(...t.flatMap((y) => n.map((f) => l(d, y, f, m))));
23
23
  }, { immediate: !0, flush: "post" }), i = () => {
24
24
  r(), a();
25
25
  };
26
26
  return qe(i), i;
27
27
  }
28
- function Qt(l, e = !1) {
29
- const t = _(), n = () => t.value = !!l();
28
+ function Qt(c, e = !1) {
29
+ const t = _(), n = () => t.value = !!c();
30
30
  return n(), gt(n, e), t;
31
31
  }
32
32
  const Ve = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, je = "__vueuse_ssr_handlers__";
33
33
  Ve[je] = Ve[je] || {};
34
- var Ge = Object.getOwnPropertySymbols, Ht = Object.prototype.hasOwnProperty, Wt = Object.prototype.propertyIsEnumerable, Jt = (l, e) => {
34
+ var Ge = Object.getOwnPropertySymbols, Ht = Object.prototype.hasOwnProperty, Wt = Object.prototype.propertyIsEnumerable, Jt = (c, e) => {
35
35
  var t = {};
36
- for (var n in l)
37
- Ht.call(l, n) && e.indexOf(n) < 0 && (t[n] = l[n]);
38
- if (l != null && Ge)
39
- for (var n of Ge(l))
40
- e.indexOf(n) < 0 && Wt.call(l, n) && (t[n] = l[n]);
36
+ for (var n in c)
37
+ Ht.call(c, n) && e.indexOf(n) < 0 && (t[n] = c[n]);
38
+ if (c != null && Ge)
39
+ for (var n of Ge(c))
40
+ e.indexOf(n) < 0 && Wt.call(c, n) && (t[n] = c[n]);
41
41
  return t;
42
42
  };
43
- function Ut(l, e, t = {}) {
43
+ function Ut(c, e, t = {}) {
44
44
  const n = t, { window: s = ot } = n, o = Jt(n, ["window"]);
45
45
  let a;
46
- const d = Qt(() => s && "ResizeObserver" in s), r = () => {
46
+ const l = Qt(() => s && "ResizeObserver" in s), r = () => {
47
47
  a && (a.disconnect(), a = void 0);
48
- }, i = J(() => st(l), (m) => {
49
- r(), d.value && s && m && (a = new ResizeObserver(e), a.observe(m, o));
50
- }, { immediate: !0, flush: "post" }), c = () => {
48
+ }, i = J(() => st(c), (m) => {
49
+ r(), l.value && s && m && (a = new ResizeObserver(e), a.observe(m, o));
50
+ }, { immediate: !0, flush: "post" }), d = () => {
51
51
  r(), i();
52
52
  };
53
- return qe(c), {
54
- isSupported: d,
55
- stop: c
53
+ return qe(d), {
54
+ isSupported: l,
55
+ stop: d
56
56
  };
57
57
  }
58
58
  var Qe;
59
- (function(l) {
60
- l.UP = "UP", l.RIGHT = "RIGHT", l.DOWN = "DOWN", l.LEFT = "LEFT", l.NONE = "NONE";
59
+ (function(c) {
60
+ c.UP = "UP", c.RIGHT = "RIGHT", c.DOWN = "DOWN", c.LEFT = "LEFT", c.NONE = "NONE";
61
61
  })(Qe || (Qe = {}));
62
- var qt = Object.defineProperty, He = Object.getOwnPropertySymbols, Zt = Object.prototype.hasOwnProperty, Yt = Object.prototype.propertyIsEnumerable, We = (l, e, t) => e in l ? qt(l, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : l[e] = t, Xt = (l, e) => {
62
+ var qt = Object.defineProperty, He = Object.getOwnPropertySymbols, Zt = Object.prototype.hasOwnProperty, Yt = Object.prototype.propertyIsEnumerable, We = (c, e, t) => e in c ? qt(c, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : c[e] = t, Xt = (c, e) => {
63
63
  for (var t in e || (e = {}))
64
- Zt.call(e, t) && We(l, t, e[t]);
64
+ Zt.call(e, t) && We(c, t, e[t]);
65
65
  if (He)
66
66
  for (var t of He(e))
67
- Yt.call(e, t) && We(l, t, e[t]);
68
- return l;
67
+ Yt.call(e, t) && We(c, t, e[t]);
68
+ return c;
69
69
  };
70
70
  const $t = {
71
71
  easeInSine: [0.12, 0, 0.39, 0],
@@ -96,7 +96,7 @@ const $t = {
96
96
  Xt({
97
97
  linear: vt
98
98
  }, $t);
99
- const en = (l) => l, tn = {
99
+ const en = (c) => c, tn = {
100
100
  esc: "Escape"
101
101
  }, nn = De({
102
102
  value: {
@@ -134,25 +134,25 @@ const en = (l) => l, tn = {
134
134
  }), on = /* @__PURE__ */ me({
135
135
  ...sn,
136
136
  props: nn,
137
- setup(l, { expose: e }) {
138
- const t = l, n = ft("badge"), s = A(() => t.isDot ? "" : fe(t.value) && fe(t.max) ? t.max < t.value ? `${t.max}+` : `${t.value}` : `${t.value}`), o = A(() => {
139
- var a, d, r, i, c;
137
+ setup(c, { expose: e }) {
138
+ const t = c, n = ft("badge"), s = A(() => t.isDot ? "" : fe(t.value) && fe(t.max) ? t.max < t.value ? `${t.max}+` : `${t.value}` : `${t.value}`), o = A(() => {
139
+ var a, l, r, i, d;
140
140
  return [
141
141
  {
142
142
  backgroundColor: t.color,
143
- marginRight: _e(-((d = (a = t.offset) == null ? void 0 : a[0]) != null ? d : 0)),
143
+ marginRight: _e(-((l = (a = t.offset) == null ? void 0 : a[0]) != null ? l : 0)),
144
144
  marginTop: _e((i = (r = t.offset) == null ? void 0 : r[1]) != null ? i : 0)
145
145
  },
146
- (c = t.badgeStyle) != null ? c : {}
146
+ (d = t.badgeStyle) != null ? d : {}
147
147
  ];
148
148
  });
149
149
  return e({
150
150
  content: s
151
- }), (a, d) => (D(), R("div", {
151
+ }), (a, l) => (D(), R("div", {
152
152
  class: j(v(n).b())
153
153
  }, [
154
154
  be(a.$slots, "default"),
155
- z(xe, {
155
+ F(xe, {
156
156
  name: `${v(n).namespace.value}-zoom-in-center`,
157
157
  persisted: ""
158
158
  }, {
@@ -222,9 +222,9 @@ const rn = yt(an), dn = De({
222
222
  me({
223
223
  name: "ElConfigProvider",
224
224
  props: dn,
225
- setup(l, { slots: e }) {
226
- const t = xt(l);
227
- return J(() => l.message, (n) => {
225
+ setup(c, { slots: e }) {
226
+ const t = xt(c);
227
+ return J(() => c.message, (n) => {
228
228
  var s, o;
229
229
  Object.assign(T, (o = (s = t?.value) == null ? void 0 : s.message) != null ? o : {}, n ?? {});
230
230
  }, { immediate: !0, deep: !0 }), () => be(e, "default", { config: t?.value });
@@ -316,23 +316,23 @@ const at = [
316
316
  }
317
317
  }), cn = {
318
318
  destroy: () => !0
319
- }, H = Rt([]), mn = (l) => {
320
- const e = H.findIndex((s) => s.id === l), t = H[e];
319
+ }, H = Rt([]), mn = (c) => {
320
+ const e = H.findIndex((s) => s.id === c), t = H[e];
321
321
  let n;
322
322
  return e > 0 && (n = H[e - 1]), { current: t, prev: n };
323
- }, hn = (l) => {
324
- const { prev: e } = mn(l);
323
+ }, hn = (c) => {
324
+ const { prev: e } = mn(c);
325
325
  return e ? e.vm.exposed.bottom.value : 0;
326
- }, un = (l, e) => H.findIndex((n) => n.id === l) > 0 ? 16 : e, pn = me({
326
+ }, un = (c, e) => H.findIndex((n) => n.id === c) > 0 ? 16 : e, pn = me({
327
327
  name: "ElMessage"
328
328
  }), gn = /* @__PURE__ */ me({
329
329
  ...pn,
330
330
  props: ln,
331
331
  emits: cn,
332
- setup(l, { expose: e, emit: t }) {
333
- const n = l, { Close: s } = Lt, o = _(!1), { ns: a, zIndex: d } = Et("message"), { currentZIndex: r, nextZIndex: i } = d, c = _(), m = _(!1), y = _(0);
332
+ setup(c, { expose: e, emit: t }) {
333
+ const n = c, { Close: s } = Lt, o = _(!1), { ns: a, zIndex: l } = Et("message"), { currentZIndex: r, nextZIndex: i } = l, d = _(), m = _(!1), y = _(0);
334
334
  let f;
335
- const g = A(() => n.type ? n.type === "error" ? "danger" : n.type : "info"), h = A(() => {
335
+ const p = A(() => n.type ? n.type === "error" ? "danger" : n.type : "info"), h = A(() => {
336
336
  const b = n.type;
337
337
  return { [a.bm("icon", b)]: b && Ne[b] };
338
338
  }), E = A(() => n.icon || Ne[n.type] || ""), x = A(() => hn(n.id)), I = A(() => un(n.id, n.offset) + x.value), K = A(() => y.value + I.value), Y = A(() => ({
@@ -360,13 +360,13 @@ const at = [
360
360
  Z(), i(), m.value = !0;
361
361
  }), J(() => n.repeatNum, () => {
362
362
  G(), Z();
363
- }), Gt(document, "keydown", M), Ut(c, () => {
364
- y.value = c.value.getBoundingClientRect().height;
363
+ }), Gt(document, "keydown", M), Ut(d, () => {
364
+ y.value = d.value.getBoundingClientRect().height;
365
365
  }), e({
366
366
  visible: m,
367
367
  bottom: K,
368
368
  close: S
369
- }), (b, F) => (D(), ge(xe, {
369
+ }), (b, z) => (D(), ge(xe, {
370
370
  name: v(a).b("fade"),
371
371
  onBeforeEnter: (W) => o.value = !0,
372
372
  onBeforeLeave: b.onClose,
@@ -377,7 +377,7 @@ const at = [
377
377
  $e(P("div", {
378
378
  id: b.id,
379
379
  ref_key: "messageRef",
380
- ref: c,
380
+ ref: d,
381
381
  class: j([
382
382
  v(a).b(),
383
383
  { [v(a).m(b.type)]: b.type },
@@ -393,7 +393,7 @@ const at = [
393
393
  b.repeatNum > 1 ? (D(), ge(v(rn), {
394
394
  key: 0,
395
395
  value: b.repeatNum,
396
- type: v(g),
396
+ type: v(p),
397
397
  class: j(v(a).e("badge"))
398
398
  }, null, 8, ["value", "type", "class"])) : q("v-if", !0),
399
399
  v(E) ? (D(), ge(v(Be), {
@@ -420,10 +420,10 @@ const at = [
420
420
  b.showClose ? (D(), ge(v(Be), {
421
421
  key: 2,
422
422
  class: j(v(a).e("closeBtn")),
423
- onClick: Ft(S, ["stop"])
423
+ onClick: zt(S, ["stop"])
424
424
  }, {
425
425
  default: V(() => [
426
- z(v(s))
426
+ F(v(s))
427
427
  ]),
428
428
  _: 1
429
429
  }, 8, ["class", "onClick"])) : q("v-if", !0)
@@ -437,8 +437,8 @@ const at = [
437
437
  });
438
438
  var vn = /* @__PURE__ */ Ze(gn, [["__file", "message.vue"]]);
439
439
  let fn = 1;
440
- const it = (l) => {
441
- const e = !l || Re(l) || nt(l) || Ie(l) ? { message: l } : l, t = {
440
+ const it = (c) => {
441
+ const e = !c || Re(c) || nt(c) || Ie(c) ? { message: c } : c, t = {
442
442
  ...B,
443
443
  ...e
444
444
  };
@@ -449,44 +449,44 @@ const it = (l) => {
449
449
  kt(n) || (n = document.body), t.appendTo = n;
450
450
  }
451
451
  return Me(T.grouping) && !t.grouping && (t.grouping = T.grouping), fe(T.duration) && t.duration === 3e3 && (t.duration = T.duration), fe(T.offset) && t.offset === 16 && (t.offset = T.offset), Me(T.showClose) && !t.showClose && (t.showClose = T.showClose), Me(T.plain) && !t.plain && (t.plain = T.plain), t;
452
- }, yn = (l) => {
453
- const e = H.indexOf(l);
452
+ }, yn = (c) => {
453
+ const e = H.indexOf(c);
454
454
  if (e === -1)
455
455
  return;
456
456
  H.splice(e, 1);
457
- const { handler: t } = l;
457
+ const { handler: t } = c;
458
458
  t.close();
459
- }, wn = ({ appendTo: l, ...e }, t) => {
459
+ }, wn = ({ appendTo: c, ...e }, t) => {
460
460
  const n = `message_${fn++}`, s = e.onClose, o = document.createElement("div"), a = {
461
461
  ...e,
462
462
  id: n,
463
463
  onClose: () => {
464
- s?.(), yn(c);
464
+ s?.(), yn(d);
465
465
  },
466
466
  onDestroy: () => {
467
467
  Te(null, o);
468
468
  }
469
- }, d = z(vn, a, Ie(a.message) || nt(a.message) ? {
469
+ }, l = F(vn, a, Ie(a.message) || nt(a.message) ? {
470
470
  default: Ie(a.message) ? a.message : () => a.message
471
471
  } : null);
472
- d.appContext = t || ce._context, Te(d, o), l.appendChild(o.firstElementChild);
473
- const r = d.component, c = {
472
+ l.appContext = t || ce._context, Te(l, o), c.appendChild(o.firstElementChild);
473
+ const r = l.component, d = {
474
474
  id: n,
475
- vnode: d,
475
+ vnode: l,
476
476
  vm: r,
477
477
  handler: {
478
478
  close: () => {
479
479
  r.exposed.close();
480
480
  }
481
481
  },
482
- props: d.component.props
482
+ props: l.component.props
483
483
  };
484
- return c;
485
- }, ce = (l = {}, e) => {
484
+ return d;
485
+ }, ce = (c = {}, e) => {
486
486
  if (!Pe)
487
487
  return { close: () => {
488
488
  } };
489
- const t = it(l);
489
+ const t = it(c);
490
490
  if (t.grouping && H.length) {
491
491
  const s = H.find(({ vnode: o }) => {
492
492
  var a;
@@ -501,16 +501,16 @@ const it = (l) => {
501
501
  const n = wn(t, e);
502
502
  return H.push(n), n.handler;
503
503
  };
504
- at.forEach((l) => {
505
- ce[l] = (e = {}, t) => {
504
+ at.forEach((c) => {
505
+ ce[c] = (e = {}, t) => {
506
506
  const n = it(e);
507
- return ce({ ...n, type: l }, t);
507
+ return ce({ ...n, type: c }, t);
508
508
  };
509
509
  });
510
- function bn(l) {
510
+ function bn(c) {
511
511
  const e = [...H];
512
512
  for (const t of e)
513
- (!l || l === t.props.type) && t.handler.close();
513
+ (!c || c === t.props.type) && t.handler.close();
514
514
  }
515
515
  ce.closeAll = bn;
516
516
  ce._context = null;
@@ -605,29 +605,29 @@ class O extends Ae {
605
605
  createPointerMove(e) {
606
606
  const t = this.editor, n = new L();
607
607
  let s = null, o = null, a = null;
608
- const d = t.addEventListener("pointerPositionChange", () => {
608
+ const l = t.addEventListener("pointerPositionChange", () => {
609
609
  const r = L.from(t.pointerPosition);
610
610
  if (s && t.eventInput.isKeyDown("shift")) {
611
- const i = Math.abs(r.x - s.x), c = Math.abs(r.y - s.y);
612
- i > c ? n.set(r.x, s.y) : n.set(s.x, r.y), e(n, !1);
611
+ const i = Math.abs(r.x - s.x), d = Math.abs(r.y - s.y);
612
+ i > d ? n.set(r.x, s.y) : n.set(s.x, r.y), e(n, !1);
613
613
  } else if (o && a && t.eventInput.isKeyDown("alt")) {
614
- const i = o.projectPoint(r, !1), c = a.projectPoint(r, !1);
615
- i && c ? r.distance(i) < r.distance(c) ? n.copy(i) : n.copy(c) : i ? n.copy(i) : c && n.copy(c), e(n, !1);
614
+ const i = o.projectPoint(r, !1), d = a.projectPoint(r, !1);
615
+ i && d ? r.distance(i) < r.distance(d) ? n.copy(i) : n.copy(d) : i ? n.copy(i) : d && n.copy(d), e(n, !1);
616
616
  } else {
617
- const { point: i, find: c, line: m } = t.renderManager.adsorption();
618
- n.copy(i), e(n, c, m);
617
+ const { point: i, find: d, line: m } = t.renderManager.adsorption();
618
+ n.copy(i), e(n, d, m);
619
619
  }
620
620
  });
621
621
  return {
622
622
  destroy() {
623
- d();
623
+ l();
624
624
  },
625
625
  setBaseLine(r, i) {
626
626
  if (o = r, s = i, r && i) {
627
- const c = r.normal();
627
+ const d = r.normal();
628
628
  a = new N(
629
- i.clone().add(c.clone().multiplyScalar(10)),
630
- i.clone().add(c.multiplyScalar(-10))
629
+ i.clone().add(d.clone().multiplyScalar(10)),
630
+ i.clone().add(d.multiplyScalar(-10))
631
631
  );
632
632
  } else a = null;
633
633
  }
@@ -636,7 +636,7 @@ class O extends Ae {
636
636
  }
637
637
  class xn extends O {
638
638
  static name = "DrawLine";
639
- container = new u.Group();
639
+ container = new g.Group();
640
640
  interruptKeys = ["escape"];
641
641
  withdrawalKeys = ["control", "z"];
642
642
  shortcutKeys = ["control", "l"];
@@ -651,24 +651,24 @@ class xn extends O {
651
651
  * @param next
652
652
  */
653
653
  selectPoint(e) {
654
- let t = this.parent?.findComponentByName("Editor"), n = null, s = null, o = [], a = this.renderer.createCircle(L.zero(), { color: 65280 }), d = t.domContainer.domElement, r = new ye([], 16711935), i = new ye([
655
- new u.Vector3(-1e4, 0, 0),
656
- new u.Vector3(1e4, 0, 0),
657
- new u.Vector3(0, -1e4, 0),
658
- new u.Vector3(0, 1e4, 0)
654
+ let t = this.parent?.findComponentByName("Editor"), n = null, s = null, o = [], a = this.renderer.createCircle(L.zero(), { color: 65280 }), l = t.domContainer.domElement, r = new ye([], 16711935), i = new ye([
655
+ new g.Vector3(-1e4, 0, 0),
656
+ new g.Vector3(1e4, 0, 0),
657
+ new g.Vector3(0, -1e4, 0),
658
+ new g.Vector3(0, 1e4, 0)
659
659
  ], 16711935);
660
- i.material = new u.LineDashedMaterial({
660
+ i.material = new g.LineDashedMaterial({
661
661
  color: 4235007,
662
662
  dashSize: 0.1,
663
663
  gapSize: 0.1,
664
664
  linewidth: 0.1
665
665
  }), this.container.add(r);
666
- const c = () => {
666
+ const d = () => {
667
667
  r.setPoint(...o, n, s), i.position.copy(s), this.container.add(i), i.computeLineDistances();
668
- }, m = new u.Vector3();
668
+ }, m = new g.Vector3();
669
669
  let y;
670
- const f = this.createPointerMove((g, h, E) => {
671
- m.set(g.x, g.y, 0), this.dispatchEvent({ type: "pointerMove", point: m }), y = E, h ? (a.position.set(g.x, g.y, 0), this.container.add(a), d.style.cursor = "none") : (a.removeFromParent(), d.style.cursor = "crosshair"), n && s && (c(), s.copy(m));
670
+ const f = this.createPointerMove((p, h, E) => {
671
+ m.set(p.x, p.y, 0), this.dispatchEvent({ type: "pointerMove", point: m }), y = E, h ? (a.position.set(p.x, p.y, 0), this.container.add(a), l.style.cursor = "none") : (a.removeFromParent(), l.style.cursor = "crosshair"), n && s && (d(), s.copy(m));
672
672
  });
673
673
  this.addEventRecord(
674
674
  "clear",
@@ -676,16 +676,16 @@ class xn extends O {
676
676
  t.eventInput.addEventListener("codeChange", async () => {
677
677
  if (t.eventInput.isKeyDown("mouse_0")) {
678
678
  if (!n) {
679
- n = m.clone(), s = m.clone(), c(), f.setBaseLine(y ?? null, L.from(n));
679
+ n = m.clone(), s = m.clone(), d(), f.setBaseLine(y ?? null, L.from(n));
680
680
  return;
681
681
  }
682
682
  s = m.clone(), o.push(n.clone(), s.clone());
683
- const g = new N(L.from(n), L.from(s));
684
- f.setBaseLine(g, g.end), n.copy(s), c();
683
+ const p = new N(L.from(n), L.from(s));
684
+ f.setBaseLine(p, p.end), n.copy(s), d();
685
685
  } else if (t.eventInput.isOnlyKeyDowns(this.withdrawalKeys)) {
686
686
  if (o.length) {
687
- const { point: g } = t.renderManager.adsorption();
688
- if (o.pop(), s?.copy(g), n?.copy(o.pop()), c(), o.length >= 2) {
687
+ const { point: p } = t.renderManager.adsorption();
688
+ if (o.pop(), s?.copy(p), n?.copy(o.pop()), d(), o.length >= 2) {
689
689
  const h = new N(L.from(o[o.length - 2]), L.from(o[o.length - 1]));
690
690
  f.setBaseLine(h, h.end);
691
691
  }
@@ -727,7 +727,7 @@ class xn extends O {
727
727
  }
728
728
  class rt extends O {
729
729
  static name = "Default";
730
- container = new u.Group();
730
+ container = new g.Group();
731
731
  onAddFromParent() {
732
732
  const e = this.editor, t = e.commandManager;
733
733
  e.container.add(this.container), t.addCommandFlow("default").add(this.start.bind(this)).addEventListener("finally", this.finally.bind(this)), t.addEventListener("startedBefore", (n) => {
@@ -735,7 +735,7 @@ class rt extends O {
735
735
  }), t.addEventListener("finally", (n) => n.name !== "default" && t.start("default")), e.eventInput.addCancelDefaultBehavior(() => e.eventInput.isOnlyKeyDowns(["control", "g"]));
736
736
  }
737
737
  selectLines = [];
738
- selectLineObject3D = new u.Mesh();
738
+ selectLineObject3D = new g.Mesh();
739
739
  /** 添加选择的线段
740
740
  * @param lineSegment
741
741
  */
@@ -778,19 +778,19 @@ class rt extends O {
778
778
  * @param next
779
779
  */
780
780
  start() {
781
- const e = this.editor, t = e.eventInput, n = new u.Mesh(), s = e.domContainer.domElement;
781
+ const e = this.editor, t = e.eventInput, n = new g.Mesh(), s = e.domContainer.domElement;
782
782
  let o = null;
783
- n.position.z = 1e-3, this.selectLineObject3D.position.z = n.position.z + 1e-3, n.material = new u.MeshBasicMaterial({ color: 55561 });
783
+ n.position.z = 1e-3, this.selectLineObject3D.position.z = n.position.z + 1e-3, n.material = new g.MeshBasicMaterial({ color: 55561 });
784
784
  const a = () => {
785
- const r = e.pointerPosition.clone(), i = e.pointerPosition.clone(), c = new u.Mesh();
786
- this.container.add(c), c.position.z = 0.05, c.material = new u.MeshBasicMaterial({
785
+ const r = e.pointerPosition.clone(), i = e.pointerPosition.clone(), d = new g.Mesh();
786
+ this.container.add(d), d.position.z = 0.05, d.material = new g.MeshBasicMaterial({
787
787
  color: 16777215,
788
788
  transparent: !0,
789
789
  opacity: 0.5
790
790
  });
791
791
  const m = () => {
792
- const g = Math.min(r.x, i.x), h = Math.max(r.x, i.x), E = Math.min(r.y, i.y), x = Math.max(r.y, i.y), I = [
793
- g,
792
+ const p = Math.min(r.x, i.x), h = Math.max(r.x, i.x), E = Math.min(r.y, i.y), x = Math.max(r.y, i.y), I = [
793
+ p,
794
794
  x,
795
795
  0,
796
796
  h,
@@ -799,31 +799,31 @@ class rt extends O {
799
799
  h,
800
800
  x,
801
801
  0,
802
- g,
802
+ p,
803
803
  x,
804
804
  0,
805
- g,
805
+ p,
806
806
  E,
807
807
  0,
808
808
  h,
809
809
  E,
810
810
  0
811
811
  ];
812
- c.geometry = e.renderManager.createGeometry({ position: I }, I.length / 3);
812
+ d.geometry = e.renderManager.createGeometry({ position: I }, I.length / 3);
813
813
  }, y = () => {
814
814
  i.copy(e.pointerPosition), m();
815
815
  }, f = () => {
816
- document.removeEventListener("mousemove", y), document.removeEventListener("mouseup", f), c.removeFromParent();
817
- const g = Math.min(r.x, i.x), h = Math.max(r.x, i.x), E = Math.min(r.y, i.y), x = Math.max(r.y, i.y), I = new Ye(g, h, E, x), K = e.renderManager.quadtree.queryBox(I);
816
+ document.removeEventListener("mousemove", y), document.removeEventListener("mouseup", f), d.removeFromParent();
817
+ const p = Math.min(r.x, i.x), h = Math.max(r.x, i.x), E = Math.min(r.y, i.y), x = Math.max(r.y, i.y), I = new Ye(p, h, E, x), K = e.renderManager.quadtree.queryBox(I);
818
818
  this.removeSelectLineAll(), K.forEach((Y) => this.addSelectLine(Y.line)), this.updateSelectLinesGeometry();
819
819
  };
820
820
  document.addEventListener("mousemove", y), document.addEventListener("mouseup", f);
821
- }, d = this.renderer.createText("", new u.Vector3(0, 0, 0), {
821
+ }, l = this.renderer.createText("", new g.Vector3(0, 0, 0), {
822
822
  background: "rgba(0,0,0,0.5)",
823
823
  padding: "2px",
824
824
  borderRadius: "2px"
825
825
  }, this.container);
826
- d.visible = !1, this.addEventRecord(
826
+ l.visible = !1, this.addEventRecord(
827
827
  "clear",
828
828
  // 注册鼠标指针位置变化事件
829
829
  e.addEventListener("pointerPositionChange", () => {
@@ -831,10 +831,10 @@ class rt extends O {
831
831
  if (r) {
832
832
  const i = r.expandToRectangle(0.025, "bothSides");
833
833
  n.geometry = e.renderManager.createGeometry({ position: i.createGeometry() }, 6), this.container.add(n), s.style.cursor = "pointer", o = r;
834
- const c = r.center;
835
- d.element.innerText = parseInt(r.length() * 1e3 + "") + " mm", d.position.set(c.x, c.y, 0), d.visible = !0;
834
+ const d = r.center;
835
+ l.element.innerText = parseInt(r.length() * 1e3 + "") + " mm", l.position.set(d.x, d.y, 0), l.visible = !0;
836
836
  } else
837
- n.removeFromParent(), s.style.cursor = "default", o = null, d.visible = !1;
837
+ n.removeFromParent(), s.style.cursor = "default", o = null, l.visible = !1;
838
838
  }),
839
839
  t.addEventListener("codeChange", () => {
840
840
  if (t.isKeyDown("mouse_0")) {
@@ -851,7 +851,7 @@ class rt extends O {
851
851
  } else t.isKeyDowns(["control", "z"]) ? e.commandManager.rollback() : t.isKeyDowns(["control", "y"]) && e.commandManager.revokeRollback();
852
852
  }),
853
853
  function() {
854
- n.removeFromParent(), d.removeFromParent();
854
+ n.removeFromParent(), l.removeFromParent();
855
855
  }
856
856
  );
857
857
  }
@@ -941,8 +941,8 @@ class En extends Xe {
941
941
  try {
942
942
  for (let o = n; o < s.list.length; o++) {
943
943
  const a = s.list[o];
944
- if (s.dispatchEvent({ type: "executing", index: o }), this.dispatchEvent({ type: "executing", name: e, index: o }), t = await new Promise((d) => {
945
- this.resolve = d, a(d, t);
944
+ if (s.dispatchEvent({ type: "executing", index: o }), this.dispatchEvent({ type: "executing", name: e, index: o }), t = await new Promise((l) => {
945
+ this.resolve = l, a(l, t);
946
946
  }), this.abortController.signal.aborted) {
947
947
  s.dispatchEvent({ type: "executionInterrupt", index: o }), this.dispatchEvent({ type: "executionInterrupt", name: e, index: o }), this.dispatchEvent({ type: "cancel", name: e });
948
948
  break;
@@ -995,7 +995,9 @@ class En extends Xe {
995
995
  }
996
996
  }
997
997
  destroy() {
998
- this.cancel(), this.commandFlowMap.clear(), this.lock = !1, this.abortController = null, this.resolve = null, this.executionResolve = null, this.executionPromise = null, this.currentName = null, this.operationList.length = 0, this.rollbackList.length = 0;
998
+ this.cancel(), this.addEventListener("cancel", () => {
999
+ this.commandFlowMap.clear(), this.lock = !1, this.abortController = null, this.resolve = null, this.executionResolve = null, this.executionPromise = null, this.currentName = null, this.operationList.length = 0, this.rollbackList.length = 0;
1000
+ }, { once: !0 });
999
1001
  }
1000
1002
  }
1001
1003
  const Ln = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='5569'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20fill='%23555'%20width='16'%20height='16'%3e%3cpath%20d='M522.1888%20811.3152a412.1088%20412.1088%200%200%200-114.5344-269.7728l-244.48%20269.7728h359.0144zM450.816%20493.824c83.5072%2085.3504%20132.7104%20197.4784%20136.5504%20317.4912h417.5872v63.232H18.9952L676.1472%20149.4016l48.9472%2041.7792-274.2784%20302.6432z'%20%3e%3c/path%3e%3c/svg%3e", Mn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
@@ -1016,12 +1018,12 @@ const Ln = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
1016
1018
  }, Symbol.toStringTag, { value: "Module" })), Bn = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1757902601497'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='9801'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M761.344%20119.296H226.816c-18.944%200-39.424%2011.776-39.424%2030.72V921.6h614.4V148.48c0.512-18.944-22.016-29.184-40.448-29.184z%20m-537.6%20768c-2.048%200-2.048%200%200%200L221.696%20163.84c0-5.12%205.12-10.24%2010.24-10.24h522.24c8.704%200%2013.824%205.12%2013.824%2013.824v720.384s0%201.536-1.536%201.536h-15.36V194.56c0-16.896-8.704-24.064-29.184-24.064H266.24c-18.944%200-27.136%208.704-27.136%2024.064v692.736h-15.36z%20m49.152%200V204.8H716.8v682.496H272.896z'%20p-id='9802'%3e%3c/path%3e%3cpath%20d='M648.704%20508.416c-16.896%200-32.256%2013.824-32.256%2032.256%200%2016.896%2013.824%2032.256%2032.256%2032.256s32.256-13.824%2032.256-32.256c0-16.896-13.824-32.256-32.256-32.256z'%20p-id='9803'%3e%3c/path%3e%3c/svg%3e", Rn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1017
1019
  __proto__: null,
1018
1020
  default: Bn
1019
- }, Symbol.toStringTag, { value: "Module" })), On = "data:image/svg+xml,%3csvg%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20fill='%23555'%20width='16'%20height='16'%3e%3cpath%20d='M491.80027198%20557.44938977c-10.0998647-15.14979706-20.19972802-25.24966037-35.34952507-35.34952507-15.14979706-10.0998647-30.29959271-15.14979706-50.49932211-15.14979704-55.54925309%200-100.99864286%2045.44938977-100.99864287%20100.99864285%200%2015.14979706%205.04993234%2035.34952507%2015.14979568%2050.49932212%2010.0998647%2015.14979706%2020.19972802%2030.29959271%2035.34952506%2035.34952508%2015.14979706%2010.0998647%2035.34952507%2015.14979706%2050.49932213%2015.14979567%2055.54925309%200%20100.99864286-45.44938977%20100.99864286-100.99864287%200-15.14979706-5.04993234-35.34952507-15.14979568-50.49932074z%20m-85.84884718%20100.99864286h-15.14979706c-20.19972802-5.04993234-30.29959271-20.19972802-35.34952507-35.34952507V612.99864286c0-30.29959271%2025.24966037-50.49932212%2050.49932213-50.49932074h10.09986469c15.14979706%205.04993234%2030.29959271%2015.14979706%2035.34952507%2035.34952507v15.14979567c5.04993234%2025.24966037-20.19972802%2045.44938977-45.44938976%2045.44938977z'%3e%3c/path%3e%3cpath%20d='M390.80162774%20658.44803263l-40.39945604%2040.39945743-227.24694747%20222.19701373-35.34952506-35.34952508%20227.24694745-227.24694608%2040.39945605-40.39945743c5.04993234%2020.19972802%2020.19972802%2035.34952507%2035.34952507%2040.39945743zM648.34816793%20405.9514248l-40.39945742%2040.3994574-116.14843853%20116.14843992-40.39945742%2035.34952507c-5.04993234-20.19972802-20.19972802-30.29959271-35.34952507-35.34952507l40.39945742-40.39945742%20116.14843853-111.09850756%2035.34952507-35.34952507c10.0998647%2015.14979706%2020.19972802%2025.24966037%2040.39945742%2030.29959273zM926.09443614%20133.25508894L749.34681078%20310.00271428l-40.3994574%2040.39945742c-5.04993234-20.19972802-15.14979706-35.34952507-30.29959272-40.39945742l35.34952506-40.39945742%20176.74762534-176.74762535%2035.34952508%2040.39945743z'%20%3e%3c/path%3e%3cpath%20d='M749.34681078%20310.00271428c-10.0998647-15.14979706-20.19972802-30.29959271-35.34952506-35.34952506-15.14979706-10.0998647-35.34952507-15.14979706-55.54925309-15.14979706-55.54925309%200-100.99864286%2045.44938977-100.99864286%20100.99864286%200%2020.19972802%205.04993234%2040.39945743%2015.14979567%2055.54925447%2010.0998647%2015.14979706%2020.19972802%2025.24966037%2035.34952507%2035.34952507%2015.14979706%2010.0998647%2030.29959271%2015.14979706%2050.49932212%2015.14979567%2055.54925309%200%20100.99864286-45.44938977%20100.99864286-100.99864286%200-25.24966037-5.04993234-40.39945743-10.09986471-55.54925309z%20m-90.89877815%2095.94871052h-10.0998647c-20.19972802-5.04993234-35.34952507-15.14979706-40.39945742-35.34952509%200-5.04993234-5.04993234-10.0998647-5.04993234-15.14979704%200-30.29959271%2025.24966037-50.49932212%2050.49932212-50.49932074%205.04993234%200%2010.0998647%200%2015.14979704%205.04993235%2015.14979706%205.04993234%2030.29959271%2020.19972802%2030.29959273%2040.39945742v10.09986332c10.0998647%2025.24966037-15.14979706%2045.44938977-40.39945743%2045.44938978z'%20%3e%3c/path%3e%3c/svg%3e", Fn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1021
+ }, Symbol.toStringTag, { value: "Module" })), On = "data:image/svg+xml,%3csvg%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20fill='%23555'%20width='16'%20height='16'%3e%3cpath%20d='M491.80027198%20557.44938977c-10.0998647-15.14979706-20.19972802-25.24966037-35.34952507-35.34952507-15.14979706-10.0998647-30.29959271-15.14979706-50.49932211-15.14979704-55.54925309%200-100.99864286%2045.44938977-100.99864287%20100.99864285%200%2015.14979706%205.04993234%2035.34952507%2015.14979568%2050.49932212%2010.0998647%2015.14979706%2020.19972802%2030.29959271%2035.34952506%2035.34952508%2015.14979706%2010.0998647%2035.34952507%2015.14979706%2050.49932213%2015.14979567%2055.54925309%200%20100.99864286-45.44938977%20100.99864286-100.99864287%200-15.14979706-5.04993234-35.34952507-15.14979568-50.49932074z%20m-85.84884718%20100.99864286h-15.14979706c-20.19972802-5.04993234-30.29959271-20.19972802-35.34952507-35.34952507V612.99864286c0-30.29959271%2025.24966037-50.49932212%2050.49932213-50.49932074h10.09986469c15.14979706%205.04993234%2030.29959271%2015.14979706%2035.34952507%2035.34952507v15.14979567c5.04993234%2025.24966037-20.19972802%2045.44938977-45.44938976%2045.44938977z'%3e%3c/path%3e%3cpath%20d='M390.80162774%20658.44803263l-40.39945604%2040.39945743-227.24694747%20222.19701373-35.34952506-35.34952508%20227.24694745-227.24694608%2040.39945605-40.39945743c5.04993234%2020.19972802%2020.19972802%2035.34952507%2035.34952507%2040.39945743zM648.34816793%20405.9514248l-40.39945742%2040.3994574-116.14843853%20116.14843992-40.39945742%2035.34952507c-5.04993234-20.19972802-20.19972802-30.29959271-35.34952507-35.34952507l40.39945742-40.39945742%20116.14843853-111.09850756%2035.34952507-35.34952507c10.0998647%2015.14979706%2020.19972802%2025.24966037%2040.39945742%2030.29959273zM926.09443614%20133.25508894L749.34681078%20310.00271428l-40.3994574%2040.39945742c-5.04993234-20.19972802-15.14979706-35.34952507-30.29959272-40.39945742l35.34952506-40.39945742%20176.74762534-176.74762535%2035.34952508%2040.39945743z'%20%3e%3c/path%3e%3cpath%20d='M749.34681078%20310.00271428c-10.0998647-15.14979706-20.19972802-30.29959271-35.34952506-35.34952506-15.14979706-10.0998647-35.34952507-15.14979706-55.54925309-15.14979706-55.54925309%200-100.99864286%2045.44938977-100.99864286%20100.99864286%200%2020.19972802%205.04993234%2040.39945743%2015.14979567%2055.54925447%2010.0998647%2015.14979706%2020.19972802%2025.24966037%2035.34952507%2035.34952507%2015.14979706%2010.0998647%2030.29959271%2015.14979706%2050.49932212%2015.14979567%2055.54925309%200%20100.99864286-45.44938977%20100.99864286-100.99864286%200-25.24966037-5.04993234-40.39945743-10.09986471-55.54925309z%20m-90.89877815%2095.94871052h-10.0998647c-20.19972802-5.04993234-35.34952507-15.14979706-40.39945742-35.34952509%200-5.04993234-5.04993234-10.0998647-5.04993234-15.14979704%200-30.29959271%2025.24966037-50.49932212%2050.49932212-50.49932074%205.04993234%200%2010.0998647%200%2015.14979704%205.04993235%2015.14979706%205.04993234%2030.29959271%2020.19972802%2030.29959273%2040.39945742v10.09986332c10.0998647%2025.24966037-15.14979706%2045.44938977-40.39945743%2045.44938978z'%20%3e%3c/path%3e%3c/svg%3e", zn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1020
1022
  __proto__: null,
1021
1023
  default: On
1022
- }, Symbol.toStringTag, { value: "Module" })), zn = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1757902422799'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='1735'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M843.2%20726.4c-20.2%200-39.2%205.2-55.8%2014.3L283.8%20237.2c9-16.5%2014.1-35.4%2014.1-55.5%200-64.2-52.3-116.5-116.5-116.5S65%20117.4%2065%20181.6s52.3%20116.5%20116.5%20116.5c20.2%200%2039.2-5.2%2055.8-14.2l503.5%20503.5c-9%2016.5-14.1%2035.4-14.1%2055.5%200%2064.2%2052.3%20116.5%20116.5%20116.5s116.5-52.3%20116.5-116.5-52.3-116.5-116.5-116.5zM181.4%20232.1c-27.8%200-50.5-22.6-50.5-50.5s22.6-50.5%2050.5-50.5%2050.5%2022.6%2050.5%2050.5-22.6%2050.5-50.5%2050.5z%20m661.8%20661.3c-27.8%200-50.5-22.6-50.5-50.5%200-27.8%2022.6-50.5%2050.5-50.5s50.5%2022.6%2050.5%2050.5c0%2027.8-22.7%2050.5-50.5%2050.5z'%20fill='%23231815'%20p-id='1736'%3e%3c/path%3e%3c/svg%3e", Kn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1024
+ }, Symbol.toStringTag, { value: "Module" })), Fn = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1757902422799'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='1735'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M843.2%20726.4c-20.2%200-39.2%205.2-55.8%2014.3L283.8%20237.2c9-16.5%2014.1-35.4%2014.1-55.5%200-64.2-52.3-116.5-116.5-116.5S65%20117.4%2065%20181.6s52.3%20116.5%20116.5%20116.5c20.2%200%2039.2-5.2%2055.8-14.2l503.5%20503.5c-9%2016.5-14.1%2035.4-14.1%2055.5%200%2064.2%2052.3%20116.5%20116.5%20116.5s116.5-52.3%20116.5-116.5-52.3-116.5-116.5-116.5zM181.4%20232.1c-27.8%200-50.5-22.6-50.5-50.5s22.6-50.5%2050.5-50.5%2050.5%2022.6%2050.5%2050.5-22.6%2050.5-50.5%2050.5z%20m661.8%20661.3c-27.8%200-50.5-22.6-50.5-50.5%200-27.8%2022.6-50.5%2050.5-50.5s50.5%2022.6%2050.5%2050.5c0%2027.8-22.7%2050.5-50.5%2050.5z'%20fill='%23231815'%20p-id='1736'%3e%3c/path%3e%3c/svg%3e", Kn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1023
1025
  __proto__: null,
1024
- default: zn
1026
+ default: Fn
1025
1027
  }, Symbol.toStringTag, { value: "Module" })), Tn = "data:image/svg+xml,%3csvg%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20fill='%23555'%20width='16'%20height='16'%3e%3cpath%20d='M114.176%2046.528h618.496c37.312%200.064%2067.584%2030.336%2067.648%2067.648v618.56c0%2037.248-30.336%2067.584-67.648%2067.584H114.176A67.776%2067.776%200%200%201%2046.528%20732.8V114.176c0-37.312%2030.336-67.648%2067.648-67.648z%20m2.176%20686.208l616.32-2.24-2.176-616.32-614.144%202.176v616.32zM907.648%20291.2l2.176%20616.32H291.264a34.88%2034.88%200%201%200%200%2069.888h618.56c37.312%200%2067.648-30.336%2067.648-67.648V291.264a34.88%2034.88%200%201%200-69.824%200z'%20%3e%3c/path%3e%3c/svg%3e", Vn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1026
1028
  __proto__: null,
1027
1029
  default: Tn
@@ -1046,17 +1048,17 @@ const Ln = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
1046
1048
  }, Symbol.toStringTag, { value: "Module" })), es = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1757902547951'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='5129'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M59.355%2091.776v867.881h867.881V91.776H59.356zM897.31%20929.73H89.282V121.703h808.027V929.73z'%20fill=''%20p-id='5130'%3e%3c/path%3e%3cpath%20d='M833.964%20185.048H152.627v681.337h681.337V185.048z%20m-355.632%20651.41H182.554V532.2h295.778v304.257z%20m0-334.184H182.554V214.975h295.778v287.299z%20m325.705%20334.184H508.259V532.2h295.778v304.257z%20m0-334.184H508.259V214.975h295.778v287.299z'%20fill=''%20p-id='5131'%3e%3c/path%3e%3c/svg%3e", ts = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1047
1049
  __proto__: null,
1048
1050
  default: es
1049
- }, Symbol.toStringTag, { value: "Module" })), ns = "data:image/png;base64,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", ss = new u.TextureLoader(), os = ss.load(ns);
1051
+ }, Symbol.toStringTag, { value: "Module" })), ns = "data:image/png;base64,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", ss = new g.TextureLoader(), os = ss.load(ns);
1050
1052
  class as extends Ae {
1051
1053
  static name = "RenderManager";
1052
- container = new u.Group();
1054
+ container = new g.Group();
1053
1055
  lines = [];
1054
- pointVirtualGrid = new Fe();
1055
- quadtree = new ze(new Ye());
1056
- verticalReferenceLineFlag = new u.Mesh(new u.PlaneGeometry(0.3, 0.3), new u.MeshBasicMaterial({ map: os, color: 58111, transparent: !0 }));
1056
+ pointVirtualGrid = new ze();
1057
+ quadtree = new Fe(new Ye());
1058
+ verticalReferenceLineFlag = new g.Mesh(new g.PlaneGeometry(0.3, 0.3), new g.MeshBasicMaterial({ map: os, color: 58111, transparent: !0 }));
1057
1059
  onAddFromParent() {
1058
1060
  const e = this.dxfLineModel;
1059
- this.editor.container.add(this.container), this.editor.container.add(e.dxfModelGroup), e.dxfLineModel.material = new u.LineBasicMaterial({
1061
+ this.editor.container.add(this.container), this.editor.container.add(e.dxfModelGroup), e.dxfLineModel.material = new g.LineBasicMaterial({
1060
1062
  transparent: !0,
1061
1063
  opacity: 0.5,
1062
1064
  color: 16777215
@@ -1073,8 +1075,8 @@ class as extends Ae {
1073
1075
  this.updatedMode = null;
1074
1076
  const s = this.dxf.doorLineSegment.filter((o) => {
1075
1077
  for (let a = 0; a < n.length; a++) {
1076
- const d = n[a];
1077
- if (d.start.equal(o.start) && d.end.equal(o.end) || d.end.equal(o.start) && d.start.equal(o.end)) return !1;
1078
+ const l = n[a];
1079
+ if (l.start.equal(o.start) && l.end.equal(o.end) || l.end.equal(o.start) && l.start.equal(o.end)) return !1;
1078
1080
  }
1079
1081
  return !0;
1080
1082
  });
@@ -1082,9 +1084,9 @@ class as extends Ae {
1082
1084
  return;
1083
1085
  } else
1084
1086
  this.updatedMode = "dxf";
1085
- this.pointVirtualGrid = new Fe();
1087
+ this.pointVirtualGrid = new ze();
1086
1088
  const e = this.dxf.box.clone().expansion(Math.max(this.dxf.box.width, this.dxf.box.height) * 2);
1087
- (e.width === 0 || e.height === 0) && e.set(-200, -200, 200, 200), this.quadtree = new ze(e), this.lines.length = 0;
1089
+ (e.width === 0 || e.height === 0) && e.set(-200, -200, 200, 200), this.quadtree = new Fe(e), this.lines.length = 0;
1088
1090
  const t = this.dxf.getLineSegments();
1089
1091
  this.addLines(t), this.draw();
1090
1092
  }
@@ -1144,9 +1146,9 @@ class as extends Ae {
1144
1146
  this.lines.forEach((o) => {
1145
1147
  if (o.points.forEach((a) => {
1146
1148
  o.userData.isDoor ? n.push(a.x, a.y, 0) : t.push(a.x, a.y, 0);
1147
- }), o.userData.isWindow && o.userData.drawWindow && o.userData.drawWindow.forEach(({ width: a, p: d }) => {
1148
- const r = L.from(d), i = o.direction(), c = r.clone().add(i.clone().multiplyScalar(a * 0.5)), m = r.clone().add(i.clone().multiplyScalar(-a * 0.5));
1149
- s.push(c.x, c.y, 1e-3), s.push(m.x, m.y, 1e-3);
1149
+ }), o.userData.isWindow && o.userData.drawWindow && o.userData.drawWindow.forEach(({ width: a, p: l }) => {
1150
+ const r = L.from(l), i = o.direction(), d = r.clone().add(i.clone().multiplyScalar(a * 0.5)), m = r.clone().add(i.clone().multiplyScalar(-a * 0.5));
1151
+ s.push(d.x, d.y, 1e-3), s.push(m.x, m.y, 1e-3);
1150
1152
  }), o.userData.isVerticalReferenceLine) {
1151
1153
  const a = o.center;
1152
1154
  this.verticalReferenceLineFlag.position.set(a.x, a.y, 0), this.container.add(this.verticalReferenceLineFlag);
@@ -1173,39 +1175,34 @@ class as extends Ae {
1173
1175
  const s = this.parent?.findComponentByName("Editor"), o = L.from(s.pointerPosition);
1174
1176
  let a = n.queryCircle(o, e);
1175
1177
  if (a.length) {
1176
- let d = a.map((r) => r.line.projectPoint(o));
1177
- if (a = a.filter((r, i) => !!d[i]), d = d.filter((r, i) => !!d[i]), d.sort((r, i) => r && i ? r.distance(o) - i.distance(o) : 0), d.length) {
1178
- const r = a[0].line, i = d[0];
1179
- return r.start.distance(o) < e * 1.5 ? {
1180
- point: new u.Vector3(r.start.x, r.start.y, 0),
1181
- find: !0,
1182
- mode: "point",
1183
- line: r
1184
- } : r.end.distance(o) < e * 1.5 ? {
1185
- point: new u.Vector3(r.end.x, r.end.y, 0),
1186
- find: !0,
1187
- mode: "point",
1188
- line: r
1189
- } : {
1190
- point: new u.Vector3(i.x, i.y, 0),
1178
+ let l = a.map((r) => ({
1179
+ point: r.line.projectPoint(o),
1180
+ line: r.line
1181
+ })).filter((r) => !!r.point);
1182
+ if (l.sort((r, i) => r.point.distance(o) - i.point.distance(o)), l.length) {
1183
+ const r = l[0].line, i = l[0].point, d = {
1184
+ point: new g.Vector3(i.x, i.y, 0),
1191
1185
  find: !0,
1192
1186
  mode: "line",
1193
1187
  line: r
1194
1188
  };
1189
+ return r.start.distance(o) < e * 1.5 ? (d.point.set(r.start.x, r.start.y, 0), d.mode = "point") : r.end.distance(o) < e * 1.5 && (d.point.set(r.end.x, r.end.y, 0), d.mode = "point"), d;
1195
1190
  }
1196
1191
  }
1197
1192
  return {
1198
- point: new u.Vector3(s.pointerPosition.x, s.pointerPosition.y, 0),
1199
- find: !1
1193
+ point: new g.Vector3(s.pointerPosition.x, s.pointerPosition.y, 0),
1194
+ find: !1,
1195
+ line: void 0,
1196
+ mode: void 0
1200
1197
  };
1201
1198
  }
1202
1199
  /** 创建几何体
1203
1200
  * @param rectangle
1204
1201
  */
1205
1202
  createGeometry(e, t) {
1206
- const n = new u.BufferGeometry();
1203
+ const n = new g.BufferGeometry();
1207
1204
  return Object.keys(e).forEach((s) => {
1208
- n.setAttribute("position", new u.BufferAttribute(new Float32Array(e[s]), e[s].length / t));
1205
+ n.setAttribute("position", new g.BufferAttribute(new Float32Array(e[s]), e[s].length / t));
1209
1206
  }), n;
1210
1207
  }
1211
1208
  /**
@@ -1227,7 +1224,8 @@ class as extends Ae {
1227
1224
  drawWindow: n && n.map((o) => ({
1228
1225
  p: { x: o.p.x, y: o.p.y, z: o.p.z },
1229
1226
  width: o.width,
1230
- full: o.full
1227
+ full: o.full,
1228
+ rooftopPz: o.rooftopPz
1231
1229
  }))
1232
1230
  };
1233
1231
  });
@@ -1268,7 +1266,7 @@ class as extends Ae {
1268
1266
  }
1269
1267
  class is extends O {
1270
1268
  static name = "DrawDoorLine";
1271
- container = new u.Group();
1269
+ container = new g.Group();
1272
1270
  interruptKeys = ["escape"];
1273
1271
  shortcutKeys = ["control", "m"];
1274
1272
  commandName = "draw-door-line";
@@ -1286,31 +1284,31 @@ class is extends O {
1286
1284
  */
1287
1285
  selectPoint(e) {
1288
1286
  let t = this.parent?.findComponentByName("Editor"), n = null, s = this.renderer.createCircle(L.zero(), { color: 65280 }), o = new ye([], 16711935), a = new ye([
1289
- new u.Vector3(-1e4, 0, 0),
1290
- new u.Vector3(1e4, 0, 0),
1291
- new u.Vector3(0, -1e4, 0),
1292
- new u.Vector3(0, 1e4, 0)
1287
+ new g.Vector3(-1e4, 0, 0),
1288
+ new g.Vector3(1e4, 0, 0),
1289
+ new g.Vector3(0, -1e4, 0),
1290
+ new g.Vector3(0, 1e4, 0)
1293
1291
  ], 16711935);
1294
- a.material = new u.LineDashedMaterial({
1292
+ a.material = new g.LineDashedMaterial({
1295
1293
  color: 4235007,
1296
1294
  dashSize: 0.1,
1297
1295
  gapSize: 0.1,
1298
1296
  linewidth: 0.1
1299
1297
  }), this.container.add(o);
1300
- let d = null;
1298
+ let l = null;
1301
1299
  this.addEventRecord(
1302
1300
  "clear",
1303
1301
  t.addEventListener("pointerPositionChange", () => {
1304
1302
  const { point: r, find: i } = t.renderManager.adsorption();
1305
- n && o.setPoint(n, r), this.dispatchEvent({ type: "pointerMove", point: r }), i ? (s.position.set(r.x, r.y, 0), this.container.add(s), this.domElement.style.cursor = "none", d = r.clone()) : (d = null, s.removeFromParent(), this.domElement.style.cursor = "no-drop");
1303
+ n && o.setPoint(n, r), this.dispatchEvent({ type: "pointerMove", point: r }), i ? (s.position.set(r.x, r.y, 0), this.container.add(s), this.domElement.style.cursor = "none", l = r.clone()) : (l = null, s.removeFromParent(), this.domElement.style.cursor = "no-drop");
1306
1304
  }),
1307
1305
  t.eventInput.addEventListener("codeChange", async () => {
1308
- if (t.eventInput.isKeyDown("mouse_0") && d) {
1306
+ if (t.eventInput.isKeyDown("mouse_0") && l) {
1309
1307
  if (!n) {
1310
- n = d.clone();
1308
+ n = l.clone();
1311
1309
  return;
1312
1310
  }
1313
- e([n.clone(), d.clone()]);
1311
+ e([n.clone(), l.clone()]);
1314
1312
  }
1315
1313
  }),
1316
1314
  function() {
@@ -1326,22 +1324,22 @@ class is extends O {
1326
1324
  end(e, t) {
1327
1325
  const n = [];
1328
1326
  for (let s = 0; s < t.length; s += 2) {
1329
- const o = L.from(t[s]), a = L.from(t[s + 1]), d = this.renderManager.quadtree.queryCircle(o, 1e-3)[0].line, r = this.renderManager.quadtree.queryCircle(a, 1e-3)[0].line;
1327
+ const o = L.from(t[s]), a = L.from(t[s + 1]), l = this.renderManager.quadtree.queryCircle(o, 1e-3)[0].line, r = this.renderManager.quadtree.queryCircle(a, 1e-3)[0].line;
1330
1328
  let i = null;
1331
- d === r && (i = {
1332
- oldLine: d,
1329
+ l === r && (i = {
1330
+ oldLine: l,
1333
1331
  newLine1: new N(
1334
- d.start,
1335
- d.start.distance(o) < d.start.distance(a) ? o.clone() : a.clone()
1332
+ l.start,
1333
+ l.start.distance(o) < l.start.distance(a) ? o.clone() : a.clone()
1336
1334
  ),
1337
1335
  newLine2: new N(
1338
- d.end,
1339
- d.end.distance(o) < d.end.distance(a) ? o.clone() : a.clone()
1336
+ l.end,
1337
+ l.end.distance(o) < l.end.distance(a) ? o.clone() : a.clone()
1340
1338
  )
1341
1339
  });
1342
- const c = new N(o, a);
1343
- c.userData.isDoor = !0, c.userData.doorDirectConnection = !0, n.push({
1344
- line: c,
1340
+ const d = new N(o, a);
1341
+ d.userData.isDoor = !0, d.userData.doorDirectConnection = !0, n.push({
1342
+ line: d,
1345
1343
  option: i
1346
1344
  });
1347
1345
  }
@@ -1372,7 +1370,7 @@ class is extends O {
1372
1370
  }
1373
1371
  class rs extends O {
1374
1372
  static name = "DrawWindow";
1375
- container = new u.Group();
1373
+ container = new g.Group();
1376
1374
  interruptKeys = ["escape"];
1377
1375
  shortcutKeys = ["control", "q"];
1378
1376
  commandName = "draw-window-line";
@@ -1387,8 +1385,8 @@ class rs extends O {
1387
1385
  selectPointStart(e) {
1388
1386
  let t = null, n = this.renderer.createCircle(L.zero(), { color: 16711935 }), s = null;
1389
1387
  this.addEventRecord("selectPointStart").add(this.editor.addEventListener("pointerPositionChange", () => {
1390
- const { point: o, line: a, find: d } = this.editor.renderManager.adsorption();
1391
- this.dispatchEvent({ type: "pointerMove", point: o }), d ? (this.domElement.style.cursor = "none", n.position.copy(o), s = a, t = o.clone(), this.container.add(n)) : (this.domElement.style.cursor = "no-drop", t = null, n.removeFromParent());
1388
+ const { point: o, line: a, find: l } = this.editor.renderManager.adsorption();
1389
+ this.dispatchEvent({ type: "pointerMove", point: o }), l ? (this.domElement.style.cursor = "none", n.position.copy(o), s = a, t = o.clone(), this.container.add(n)) : (this.domElement.style.cursor = "no-drop", t = null, n.removeFromParent());
1392
1390
  })).add(this.eventInput.addEventListener("codeChange", () => {
1393
1391
  this.eventInput.isKeyDown("mouse_0") && t && (this.canceEventRecord("selectPointStart"), e({ point: t, line: s }));
1394
1392
  })), this.addEventRecord("clear").add(() => n.removeFromParent());
@@ -1399,8 +1397,8 @@ class rs extends O {
1399
1397
  selectPointEnd(e, { point: t, line: n }) {
1400
1398
  let s = null, o = this.renderer.createCircle(L.zero(), { color: 16711935 });
1401
1399
  this.addEventRecord("clear").add(() => o.removeFromParent()).add(this.editor.addEventListener("pointerPositionChange", () => {
1402
- const { point: a, find: d, line: r } = this.editor.renderManager.adsorption();
1403
- this.dispatchEvent({ type: "pointerMove", point: a }), d && r === n ? (this.domElement.style.cursor = "none", o.position.copy(a), s = a.clone(), this.container.add(o)) : (this.domElement.style.cursor = "no-drop", s = null, o.removeFromParent());
1400
+ const { point: a, find: l, line: r } = this.editor.renderManager.adsorption();
1401
+ this.dispatchEvent({ type: "pointerMove", point: a }), l && r === n ? (this.domElement.style.cursor = "none", o.position.copy(a), s = a.clone(), this.container.add(o)) : (this.domElement.style.cursor = "no-drop", s = null, o.removeFromParent());
1404
1402
  })).add(this.eventInput.addEventListener("codeChange", () => {
1405
1403
  this.eventInput.isKeyDown("mouse_0") && s && e({ line: n, start: t, end: s });
1406
1404
  }));
@@ -1411,10 +1409,10 @@ class rs extends O {
1411
1409
  * @param points
1412
1410
  */
1413
1411
  end(e, { start: t, end: n, line: s }) {
1414
- const o = new N(L.from(t), L.from(n)), a = o.center, d = o.length(), r = {
1415
- p: new u.Vector3(a.x, a.y, 0),
1416
- width: d,
1417
- full: Math.abs(d - s.length()) < 0.01
1412
+ const o = new N(L.from(t), L.from(n)), a = o.center, l = o.length(), r = {
1413
+ p: new g.Vector3(a.x, a.y, 0),
1414
+ width: l,
1415
+ full: Math.abs(l - s.length()) < 0.01
1418
1416
  };
1419
1417
  e({ line: s, doorDataItem: r });
1420
1418
  }
@@ -1444,7 +1442,7 @@ class rs extends O {
1444
1442
  }
1445
1443
  class le extends O {
1446
1444
  static name = "VerticalCorrection";
1447
- container = new u.Group();
1445
+ container = new g.Group();
1448
1446
  shortcutKeys = ["control", "c"];
1449
1447
  shortcutKeys3 = ["shift", "c"];
1450
1448
  static commandName = "verticalCorrection";
@@ -1481,22 +1479,22 @@ class le extends O {
1481
1479
  setLinePoint(e, t, n, s = "all", o = [], a = St()) {
1482
1480
  if (e.userData.setLinePointUUid === a) return [];
1483
1481
  e.userData.setLinePointUUid = a;
1484
- let d = [], r = [];
1485
- (s === "start" || s === "all") && (d = this.renderManager.pointVirtualGrid.queryPoint(e.start).filter((y) => y.userData !== e)), (s === "end" || s === "all") && (r = this.renderManager.pointVirtualGrid.queryPoint(e.end).filter((y) => y.userData !== e));
1482
+ let l = [], r = [];
1483
+ (s === "start" || s === "all") && (l = this.renderManager.pointVirtualGrid.queryPoint(e.start).filter((y) => y.userData !== e)), (s === "end" || s === "all") && (r = this.renderManager.pointVirtualGrid.queryPoint(e.end).filter((y) => y.userData !== e));
1486
1484
  const i = e.clone();
1487
- let c = "";
1488
- t && (e.start.equal(t) || (c = "start"), o.push({
1485
+ let d = "";
1486
+ t && (e.start.equal(t) || (d = "start"), o.push({
1489
1487
  point: e.start,
1490
1488
  oldPoint: e.start.clone(),
1491
1489
  newPoint: t,
1492
1490
  line: e
1493
- }), e.start.copy(t)), n && (e.end.equal(n) || (c = c === "start" ? "all" : "end"), o.push({
1491
+ }), e.start.copy(t)), n && (e.end.equal(n) || (d = d === "start" ? "all" : "end"), o.push({
1494
1492
  point: e.end,
1495
1493
  oldPoint: e.end.clone(),
1496
1494
  newPoint: n,
1497
1495
  line: e
1498
1496
  }), e.end.copy(n));
1499
- const m = (y, f, g) => {
1497
+ const m = (y, f, p) => {
1500
1498
  y.forEach((h) => {
1501
1499
  const { point: E, userData: x } = h, I = x.start === E ? "start" : "end";
1502
1500
  if (x.directionEqual(i))
@@ -1507,7 +1505,7 @@ class le extends O {
1507
1505
  const K = e.projectPoint(x.start, !1);
1508
1506
  if (K) return this.setLinePoint(x, K, f, "start", o, a);
1509
1507
  }
1510
- (c === "all" || g === c) && this.setLinePoint(
1508
+ (d === "all" || p === d) && this.setLinePoint(
1511
1509
  x,
1512
1510
  x.start === E ? f : x.start,
1513
1511
  x.end === E ? f : x.end,
@@ -1517,7 +1515,7 @@ class le extends O {
1517
1515
  );
1518
1516
  });
1519
1517
  };
1520
- return m(d, e.start, "start"), m(r, e.end, "end"), [...d, ...r];
1518
+ return m(l, e.start, "start"), m(r, e.end, "end"), [...l, ...r];
1521
1519
  }
1522
1520
  /** 修正2
1523
1521
  * 第一步:确定需要修复的线段
@@ -1531,61 +1529,61 @@ class le extends O {
1531
1529
  */
1532
1530
  correction(e, t = [], n = /* @__PURE__ */ new Set()) {
1533
1531
  n.add(e);
1534
- const s = this.renderManager.quadtree.queryLineSegment(e).filter(({ line: i }) => !(i === e || i.userData.isDoor || n.has(i))).map((i) => i.line), o = e.direction(), [a, d] = s.reduce((i, c) => {
1532
+ const s = this.renderManager.quadtree.queryLineSegment(e).filter(({ line: i }) => !(i === e || i.userData.isDoor || n.has(i))).map((i) => i.line), o = e.direction(), [a, l] = s.reduce((i, d) => {
1535
1533
  const [m, y] = i;
1536
- return c.sameEndpoint(e) ? m.push(c) : y.push(c), i;
1534
+ return d.sameEndpoint(e) ? m.push(d) : y.push(d), i;
1537
1535
  }, [[], []]);
1538
1536
  a.forEach((i) => {
1539
- const c = i.direction(), m = o.angleBetween(c, "angle");
1537
+ const d = i.direction(), m = o.angleBetween(d, "angle");
1540
1538
  if (Math.abs(90 - m) > 45) return !1;
1541
- const f = e.sameEndpointAsStart(i) ? e.start : e.end, g = i.sameEndpointAsStart(e) ? i.end : i.start, h = new N(
1542
- g.clone().add(o.clone().multiplyScalar(1)),
1543
- g.clone().add(o.clone().multiplyScalar(-1))
1539
+ const f = e.sameEndpointAsStart(i) ? e.start : e.end, p = i.sameEndpointAsStart(e) ? i.end : i.start, h = new N(
1540
+ p.clone().add(o.clone().multiplyScalar(1)),
1541
+ p.clone().add(o.clone().multiplyScalar(-1))
1544
1542
  ), E = h.projectPoint(f, !1);
1545
1543
  if (E) {
1546
1544
  const x = [];
1547
1545
  this.setLinePoint(
1548
1546
  i,
1549
- i.start === g ? E : i.start,
1550
- i.end === g ? E : i.end,
1551
- i.start === g ? "start" : "end",
1547
+ i.start === p ? E : i.start,
1548
+ i.end === p ? E : i.end,
1549
+ i.start === p ? "start" : "end",
1552
1550
  x
1553
1551
  ), t.push(x);
1554
1552
  }
1555
1553
  return n.add(i), !1;
1556
1554
  }), o.copy(e.direction());
1557
- const r = (i, c, m) => {
1558
- const y = e.projectPoint(c);
1555
+ const r = (i, d, m) => {
1556
+ const y = e.projectPoint(d);
1559
1557
  if (y) i.copy(y);
1560
1558
  else {
1561
1559
  const f = new N(
1562
- c.clone().add(o.clone().multiplyScalar(1)),
1563
- c.clone().add(o.clone().multiplyScalar(-1))
1564
- ), g = f.projectPoint(i, !1);
1565
- if (g) {
1560
+ d.clone().add(o.clone().multiplyScalar(1)),
1561
+ d.clone().add(o.clone().multiplyScalar(-1))
1562
+ ), p = f.projectPoint(i, !1);
1563
+ if (p) {
1566
1564
  const h = [];
1567
1565
  this.setLinePoint(
1568
1566
  m,
1569
- m.start === c ? g : m.start,
1570
- m.end === c ? g : m.end,
1571
- m.start === c ? "start" : "end",
1567
+ m.start === d ? p : m.start,
1568
+ m.end === d ? p : m.end,
1569
+ m.start === d ? "start" : "end",
1572
1570
  h
1573
1571
  ), t.push(h);
1574
1572
  }
1575
1573
  }
1576
1574
  };
1577
- return d.forEach((i) => {
1575
+ return l.forEach((i) => {
1578
1576
  if (e.containsPoint(i.start))
1579
1577
  r(i.start, i.end, i);
1580
1578
  else if (e.containsPoint(i.end))
1581
1579
  r(i.end, i.start, i);
1582
1580
  else {
1583
- const c = e.getIntersection(i);
1584
- if (c) {
1581
+ const d = e.getIntersection(i);
1582
+ if (d) {
1585
1583
  const m = new N(
1586
1584
  i.start.clone().add(o.clone().multiplyScalar(1)),
1587
1585
  i.start.clone().add(o.clone().multiplyScalar(-1))
1588
- ), y = m.projectPoint(c, !1);
1586
+ ), y = m.projectPoint(d, !1);
1589
1587
  if (y) {
1590
1588
  const h = [];
1591
1589
  this.setLinePoint(i, y, i.end, "start", h), t.push(h);
@@ -1593,10 +1591,10 @@ class le extends O {
1593
1591
  const f = new N(
1594
1592
  i.end.clone().add(o.clone().multiplyScalar(1)),
1595
1593
  i.end.clone().add(o.clone().multiplyScalar(-1))
1596
- ), g = f.projectPoint(c, !1);
1597
- if (g) {
1594
+ ), p = f.projectPoint(d, !1);
1595
+ if (p) {
1598
1596
  const h = [];
1599
- this.setLinePoint(i, i.start, g, "end", h), t.push(h);
1597
+ this.setLinePoint(i, i.start, p, "end", h), t.push(h);
1600
1598
  }
1601
1599
  }
1602
1600
  }
@@ -1625,8 +1623,8 @@ class le extends O {
1625
1623
  const t = [];
1626
1624
  e.forEach((n) => {
1627
1625
  n.forEach((s) => {
1628
- const { line: o, newPoint: a, point: d } = s;
1629
- d.copy(a), this.renderManager.removeLine(o), this.renderManager.addLine(o), o.userData.isWindow && t.push(o);
1626
+ const { line: o, newPoint: a, point: l } = s;
1627
+ l.copy(a), this.renderManager.removeLine(o), this.renderManager.addLine(o), o.userData.isWindow && t.push(o);
1630
1628
  });
1631
1629
  }), Ke(...t);
1632
1630
  } else
@@ -1642,8 +1640,8 @@ class le extends O {
1642
1640
  for (let n = e.length - 1; n >= 0; n--) {
1643
1641
  const s = e[n];
1644
1642
  for (let o = s.length - 1; o >= 0; o--) {
1645
- const a = s[o], { line: d, oldPoint: r, point: i } = a;
1646
- i.copy(r), this.renderManager.removeLine(d), this.renderManager.addLine(d), d.userData.isWindow && t.push(d);
1643
+ const a = s[o], { line: l, oldPoint: r, point: i } = a;
1644
+ i.copy(r), this.renderManager.removeLine(l), this.renderManager.addLine(l), l.userData.isWindow && t.push(l);
1647
1645
  }
1648
1646
  }
1649
1647
  Ke(...t);
@@ -1764,9 +1762,9 @@ class te extends O {
1764
1762
  connection(e, t) {
1765
1763
  let n, s, o = 1 / 0;
1766
1764
  for (let a = 0; a < 2; a++)
1767
- for (let d = 0; d < 2; d++) {
1768
- const r = t[0].points[a], i = t[1].points[d], c = r.distance(i);
1769
- c < o && (n = r, s = i, o = c);
1765
+ for (let l = 0; l < 2; l++) {
1766
+ const r = t[0].points[a], i = t[1].points[l], d = r.distance(i);
1767
+ d < o && (n = r, s = i, o = d);
1770
1768
  }
1771
1769
  if (n && s) {
1772
1770
  const a = new N(n.clone(), s.clone());
@@ -1817,10 +1815,10 @@ class ne extends O {
1817
1815
  connection(e, t) {
1818
1816
  const n = t[0], s = t[1], o = t[0].getIntersection(t[1]);
1819
1817
  if (!o) return;
1820
- const a = n.points.map((c) => c.clone()), d = s.points.map((c) => c.clone());
1818
+ const a = n.points.map((d) => d.clone()), l = s.points.map((d) => d.clone());
1821
1819
  n.start.distance(o) < n.end.distance(o) ? n.start.copy(o) : n.end.copy(o), s.start.distance(o) < s.end.distance(o) ? s.start.copy(o) : s.end.copy(o);
1822
- const r = n.points.map((c) => c.clone()), i = s.points.map((c) => c.clone());
1823
- e({ line1: n, line2: s, oldLine1: a, oldLine2: d, newLine1: r, newLine2: i }), k({ message: "连接成功", type: "success" });
1820
+ const r = n.points.map((d) => d.clone()), i = s.points.map((d) => d.clone());
1821
+ e({ line1: n, line2: s, oldLine1: a, oldLine2: l, newLine1: r, newLine2: i }), k({ message: "连接成功", type: "success" });
1824
1822
  }
1825
1823
  /** 执行完成
1826
1824
  * @param next
@@ -1903,7 +1901,7 @@ class se extends O {
1903
1901
  }
1904
1902
  class oe extends O {
1905
1903
  static name = "SelectAll";
1906
- container = new u.Group();
1904
+ container = new g.Group();
1907
1905
  shortcutKeys = ["control", "a"];
1908
1906
  static commandName = "selectAll";
1909
1907
  onAddFromParent(e) {
@@ -1962,26 +1960,26 @@ class ae extends O {
1962
1960
  */
1963
1961
  viewAngle(e, t) {
1964
1962
  const [n, s] = t, o = Math.min(n.length() * 0.8, s.length() * 0.8);
1965
- let a, d, r, i = 0, c = 0;
1966
- n.sameEndpointAsStart(s) ? (a = n.start, d = n.end) : (a = n.end, d = n.start), s.sameEndpointAsStart(n) ? r = s.end : r = s.start;
1963
+ let a, l, r, i = 0, d = 0;
1964
+ n.sameEndpointAsStart(s) ? (a = n.start, l = n.end) : (a = n.end, l = n.start), s.sameEndpointAsStart(n) ? r = s.end : r = s.start;
1967
1965
  function m(S, M) {
1968
- const b = M.x - S.x, F = M.y - S.y;
1969
- let W = Math.atan2(F, b) * (180 / Math.PI);
1966
+ const b = M.x - S.x, z = M.y - S.y;
1967
+ let W = Math.atan2(z, b) * (180 / Math.PI);
1970
1968
  return W < 0 && (W += 360), W;
1971
1969
  }
1972
- const y = m(a, d), f = m(a, r), g = Math.min(y, f), h = Math.max(y, f), E = [];
1970
+ const y = m(a, l), f = m(a, r), p = Math.min(y, f), h = Math.max(y, f), E = [];
1973
1971
  function x(S, M) {
1974
1972
  for (let b = S; b <= M; b++) {
1975
- const F = Math.cos(b * Math.PI / 180) * o + a.x, W = Math.sin(b * Math.PI / 180) * o + a.y, he = Math.cos((b + 1) * Math.PI / 180) * o + a.x, Ce = Math.sin((b + 1) * Math.PI / 180) * o + a.y;
1976
- E.push(F, W, 0, he, Ce, 0);
1973
+ const z = Math.cos(b * Math.PI / 180) * o + a.x, W = Math.sin(b * Math.PI / 180) * o + a.y, he = Math.cos((b + 1) * Math.PI / 180) * o + a.x, Ce = Math.sin((b + 1) * Math.PI / 180) * o + a.y;
1974
+ E.push(z, W, 0, he, Ce, 0);
1977
1975
  }
1978
1976
  }
1979
- h - g > 180 ? (x(0, g), x(h, 360), i = 360 - (h - g), c = (h + i / 2) % 360) : (x(g, h), i = h - g, c = g + i / 2);
1980
- const I = new u.LineSegments();
1977
+ h - p > 180 ? (x(0, p), x(h, 360), i = 360 - (h - p), d = (h + i / 2) % 360) : (x(p, h), i = h - p, d = p + i / 2);
1978
+ const I = new g.LineSegments();
1981
1979
  I.geometry = this.renderManager.createGeometry({
1982
1980
  position: E
1983
- }, E.length / 3), I.material = new u.LineBasicMaterial({ color: 16711935 }), this.renderManager.container.add(I);
1984
- const K = Math.cos(c * Math.PI / 180) * o + a.x, Y = Math.sin(c * Math.PI / 180) * o + a.y, Z = this.renderer.createText(Number(i.toFixed(2)), new u.Vector3(K, Y, 0), {
1981
+ }, E.length / 3), I.material = new g.LineBasicMaterial({ color: 16711935 }), this.renderManager.container.add(I);
1982
+ const K = Math.cos(d * Math.PI / 180) * o + a.x, Y = Math.sin(d * Math.PI / 180) * o + a.y, Z = this.renderer.createText(Number(i.toFixed(2)), new g.Vector3(K, Y, 0), {
1985
1983
  textShadow: "0px 0px 2px #000"
1986
1984
  }, this.renderManager.container);
1987
1985
  let G = 0;
@@ -1992,7 +1990,7 @@ class ae extends O {
1992
1990
  }
1993
1991
  class dt extends O {
1994
1992
  static name = "ClippingLine";
1995
- container = new u.Group();
1993
+ container = new g.Group();
1996
1994
  shortcutKeys = ["control", "x"];
1997
1995
  commandName = "clippingLine";
1998
1996
  static commandName = "clippingLine";
@@ -2007,8 +2005,8 @@ class dt extends O {
2007
2005
  selectPointStart(e) {
2008
2006
  let t = null, n = this.renderer.createCircle(L.zero(), { color: 16711935 }), s = null;
2009
2007
  this.addEventRecord("selectPointStart").add(this.editor.addEventListener("pointerPositionChange", () => {
2010
- const { point: o, line: a, find: d } = this.editor.renderManager.adsorption();
2011
- this.dispatchEvent({ type: "pointerMove", point: o }), d ? (this.domElement.style.cursor = "none", n.position.copy(o), s = a, t = o.clone(), this.container.add(n)) : (this.domElement.style.cursor = "no-drop", t = null, n.removeFromParent());
2008
+ const { point: o, line: a, find: l } = this.editor.renderManager.adsorption();
2009
+ this.dispatchEvent({ type: "pointerMove", point: o }), l ? (this.domElement.style.cursor = "none", n.position.copy(o), s = a, t = o.clone(), this.container.add(n)) : (this.domElement.style.cursor = "no-drop", t = null, n.removeFromParent());
2012
2010
  })).add(this.eventInput.addEventListener("codeChange", () => {
2013
2011
  this.eventInput.isKeyDown("mouse_0") && t && (this.canceEventRecord("selectPointStart"), e({ point: t, line: s }));
2014
2012
  })), this.addEventRecord("clear").add(() => n.removeFromParent());
@@ -2019,8 +2017,8 @@ class dt extends O {
2019
2017
  selectPointEnd(e, { point: t, line: n }) {
2020
2018
  let s = null, o = this.renderer.createCircle(L.zero(), { color: 16711935 });
2021
2019
  this.addEventRecord("clear").add(() => o.removeFromParent()).add(this.editor.addEventListener("pointerPositionChange", () => {
2022
- const { point: a, find: d, line: r } = this.editor.renderManager.adsorption();
2023
- this.dispatchEvent({ type: "pointerMove", point: a }), d && r === n ? (this.domElement.style.cursor = "none", o.position.copy(a), s = a.clone(), this.container.add(o)) : (this.domElement.style.cursor = "no-drop", s = null, o.removeFromParent());
2020
+ const { point: a, find: l, line: r } = this.editor.renderManager.adsorption();
2021
+ this.dispatchEvent({ type: "pointerMove", point: a }), l && r === n ? (this.domElement.style.cursor = "none", o.position.copy(a), s = a.clone(), this.container.add(o)) : (this.domElement.style.cursor = "no-drop", s = null, o.removeFromParent());
2024
2022
  })).add(this.eventInput.addEventListener("codeChange", () => {
2025
2023
  this.eventInput.isKeyDown("mouse_0") && s && e({ line: n, start: t, end: s });
2026
2024
  }));
@@ -2112,21 +2110,21 @@ const ds = {
2112
2110
  dxfSystem: {},
2113
2111
  permission: {}
2114
2112
  },
2115
- setup(l) {
2116
- function e(C, p, w = m.value.getBoundingClientRect(), U = y.value.getBoundingClientRect()) {
2113
+ setup(c) {
2114
+ function e(C, u, w = m.value.getBoundingClientRect(), U = y.value.getBoundingClientRect()) {
2117
2115
  const ue = w.width - U.width, pe = 0, Le = w.height - U.height;
2118
- C = Math.max(0, Math.min(C, ue)), p = Math.max(pe, Math.min(p, Le)), S.value = { left: C, top: p };
2116
+ C = Math.max(0, Math.min(C, ue)), u = Math.max(pe, Math.min(u, Le)), S.value = { left: C, top: u };
2119
2117
  }
2120
2118
  function t(C) {
2121
- g.value !== C.command && (g.value !== "default" && x.commandManager.cancel(), setTimeout(() => x.commandManager.start(C.command)));
2119
+ p.value !== C.command && (p.value !== "default" && x.commandManager.cancel(), setTimeout(() => x.commandManager.start(C.command)));
2122
2120
  }
2123
2121
  function n(C) {
2124
2122
  if (C) {
2125
2123
  localStorage.setItem("lines", JSON.stringify(C));
2126
2124
  try {
2127
2125
  h.Dxf.set(C), h.Dxf.lineOffset();
2128
- } catch (p) {
2129
- console.log(p);
2126
+ } catch (u) {
2127
+ console.log(u);
2130
2128
  }
2131
2129
  }
2132
2130
  }
@@ -2134,7 +2132,7 @@ const ds = {
2134
2132
  const C = await Dt.json();
2135
2133
  Array.isArray(C) && (localStorage.removeItem("orbitControls"), n(C));
2136
2134
  }
2137
- function o({ offsetX: C, offsetY: p }) {
2135
+ function o({ offsetX: C, offsetY: u }) {
2138
2136
  E.mouseMoveEventProxylock = !0;
2139
2137
  const w = document.body.style.cursor;
2140
2138
  document.body.style.cursor = "move";
@@ -2142,7 +2140,7 @@ const ds = {
2142
2140
  const pe = m.value.getBoundingClientRect(), Le = y.value.getBoundingClientRect();
2143
2141
  e(
2144
2142
  ue.pageX - pe.left - C,
2145
- ue.pageY - pe.top - p,
2143
+ ue.pageY - pe.top - u,
2146
2144
  pe,
2147
2145
  Le
2148
2146
  ), ue.stopPropagation(), document.body.style.cursor = "move";
@@ -2151,7 +2149,7 @@ const ds = {
2151
2149
  };
2152
2150
  document.body.addEventListener("mousemove", U), document.addEventListener("mouseup", Ee);
2153
2151
  }
2154
- const a = l, d = _(!0), r = _(!0), i = _(!0), c = _(!1), m = _(), y = _(), f = _(!0), g = _(""), h = zt(a.dxfSystem), E = h.findComponentByType(Pt), x = h.findComponentByType(lt), I = h.findComponentByType(rt), K = h.findComponentByType(Nt), Y = h.findComponentByType(Bt), Z = _(0), G = _(0), S = _({ left: 10, top: 100 }), M = /* @__PURE__ */ Object.assign({ "./assets/images/angle.svg": Mn, "./assets/images/connection.svg": In, "./assets/images/cutLine.svg": Dn, "./assets/images/deleteSelectLine.svg": Sn, "./assets/images/deleteSelectWindow.svg": Nn, "./assets/images/door.svg": Rn, "./assets/images/intersectionConnection.svg": Fn, "./assets/images/line.svg": Kn, "./assets/images/mergeLine.svg": Vn, "./assets/images/revokeRollback.svg": Gn, "./assets/images/rollback.svg": Hn, "./assets/images/selectAll.svg": Jn, "./assets/images/selectPoint.svg": qn, "./assets/images/verticalCorrection.svg": Yn, "./assets/images/verticalLine.svg": $n, "./assets/images/window.svg": ts }), b = _(!1), F = _(0), W = _(!1), he = new ResizeObserver(() => e(S.value.left, S.value.top)), Ce = [
2152
+ const a = c, l = _(!0), r = _(!0), i = _(!0), d = _(!1), m = _(), y = _(), f = _(!0), p = _(""), h = Ft(a.dxfSystem), E = h.findComponentByType(Pt), x = h.findComponentByType(lt), I = h.findComponentByType(rt), K = h.findComponentByType(Nt), Y = h.findComponentByType(Bt), Z = _(0), G = _(0), S = _({ left: 10, top: 100 }), M = /* @__PURE__ */ Object.assign({ "./assets/images/angle.svg": Mn, "./assets/images/connection.svg": In, "./assets/images/cutLine.svg": Dn, "./assets/images/deleteSelectLine.svg": Sn, "./assets/images/deleteSelectWindow.svg": Nn, "./assets/images/door.svg": Rn, "./assets/images/intersectionConnection.svg": zn, "./assets/images/line.svg": Kn, "./assets/images/mergeLine.svg": Vn, "./assets/images/revokeRollback.svg": Gn, "./assets/images/rollback.svg": Hn, "./assets/images/selectAll.svg": Jn, "./assets/images/selectPoint.svg": qn, "./assets/images/verticalCorrection.svg": Yn, "./assets/images/verticalLine.svg": $n, "./assets/images/window.svg": ts }), b = _(!1), z = _(0), W = _(!1), he = new ResizeObserver(() => e(S.value.left, S.value.top)), Ce = [
2155
2153
  { name: "开启绘制线段命令", shortcut: "Ctrl + L" },
2156
2154
  { name: "开启绘制门线命令", shortcut: "Ctrl + M" },
2157
2155
  { name: "开启绘制窗户线命令", shortcut: "Ctrl + Q" },
@@ -2239,27 +2237,27 @@ const ds = {
2239
2237
  command: $.commandName,
2240
2238
  name: "合并",
2241
2239
  src: M["./assets/images/mergeLine.svg"].default,
2242
- show: A(() => F.value === 2),
2240
+ show: A(() => z.value === 2),
2243
2241
  shortcut: "Ctrl + G"
2244
2242
  },
2245
2243
  {
2246
2244
  command: te.commandName,
2247
2245
  name: "两点连接",
2248
- show: A(() => F.value === 2),
2246
+ show: A(() => z.value === 2),
2249
2247
  src: M["./assets/images/connection.svg"].default,
2250
2248
  shortcut: "Shift + L"
2251
2249
  },
2252
2250
  {
2253
2251
  command: ne.commandName,
2254
2252
  name: "延长线交点连接",
2255
- show: A(() => F.value === 2),
2253
+ show: A(() => z.value === 2),
2256
2254
  src: M["./assets/images/intersectionConnection.svg"].default,
2257
2255
  shortcut: "Ctrl + Shift + L"
2258
2256
  },
2259
2257
  {
2260
2258
  command: le.commandName,
2261
2259
  name: "线段垂直纠正",
2262
- show: A(() => F.value === 1),
2260
+ show: A(() => z.value === 1),
2263
2261
  src: M["./assets/images/verticalCorrection.svg"].default,
2264
2262
  shortcut: `
2265
2263
  Ctrl + C 垂直纠正
@@ -2270,7 +2268,7 @@ const ds = {
2270
2268
  command: ie.commandName,
2271
2269
  name: "y轴垂直基准线",
2272
2270
  show: A(
2273
- () => F.value === 1 && !I.selectLines[0].userData.isDoor
2271
+ () => z.value === 1 && !I.selectLines[0].userData.isDoor
2274
2272
  ),
2275
2273
  src: M["./assets/images/verticalLine.svg"].default,
2276
2274
  shortcut: "V"
@@ -2278,14 +2276,14 @@ const ds = {
2278
2276
  {
2279
2277
  command: ae.commandName,
2280
2278
  name: "角度显示",
2281
- show: A(() => F.value === 2 && I.selectLines[0].sameEndpoint(I.selectLines[1])),
2279
+ show: A(() => z.value === 2 && I.selectLines[0].sameEndpoint(I.selectLines[1])),
2282
2280
  src: M["./assets/images/angle.svg"].default,
2283
2281
  shortcut: "r"
2284
2282
  },
2285
2283
  {
2286
2284
  command: oe.commandName,
2287
2285
  name: "全选",
2288
- show: A(() => F.value !== x.renderManager.lines.length),
2286
+ show: A(() => z.value !== x.renderManager.lines.length),
2289
2287
  src: M["./assets/images/selectAll.svg"].default,
2290
2288
  shortcut: "Ctrl + A"
2291
2289
  },
@@ -2299,28 +2297,28 @@ const ds = {
2299
2297
  {
2300
2298
  command: ee.commandName,
2301
2299
  name: "删除",
2302
- show: A(() => F.value > 0),
2300
+ show: A(() => z.value > 0),
2303
2301
  src: M["./assets/images/deleteSelectLine.svg"].default,
2304
2302
  shortcut: "Delete"
2305
2303
  }
2306
2304
  ];
2307
2305
  J(S, () => localStorage.setItem("editorToolPosition", JSON.stringify(S.value))), J(b, () => localStorage.setItem("showShortcutKey", b.value + "")), J(f, () => {
2308
2306
  localStorage.setItem("toolBarExpand", f.value + ""), f.value && we(() => e(S.value.left, S.value.top));
2309
- }), J(d, () => h.Variable.set("originalLineVisible", d.value)), J(r, () => {
2307
+ }), J(l, () => h.Variable.set("originalLineVisible", l.value)), J(r, () => {
2310
2308
  localStorage.setItem("dxfVisible", r.value + ""), h.Variable.set("dxfVisible", r.value);
2311
- }), J(i, () => h.Variable.set("whiteModelVisible", i.value)), h.Variable.addEventListener("isLook", (C) => c.value = C.value), h.Variable.addEventListener("originalLineVisible", (C) => d.value = C.value), h.Variable.addEventListener("dxfVisible", (C) => r.value = C.value), h.Variable.addEventListener("whiteModelVisible", (C) => i.value = C.value);
2309
+ }), J(i, () => h.Variable.set("whiteModelVisible", i.value)), h.Variable.addEventListener("isLook", (C) => d.value = C.value), h.Variable.addEventListener("originalLineVisible", (C) => l.value = C.value), h.Variable.addEventListener("dxfVisible", (C) => r.value = C.value), h.Variable.addEventListener("whiteModelVisible", (C) => i.value = C.value);
2312
2310
  const ht = x.commandManager.addEventListener("started", (C) => {
2313
- g.value = C.name;
2311
+ p.value = C.name;
2314
2312
  });
2315
2313
  return localStorage.getItem("showShortcutKey") && (b.value = localStorage.getItem("showShortcutKey") === "true"), localStorage.getItem("toolBarExpand") && (f.value = localStorage.getItem("toolBarExpand") === "true"), tt(() => {
2316
2314
  y.value.style.display = "none", setTimeout(() => {
2317
2315
  if (y.value.style.display = "block", localStorage.getItem("editorToolPosition")) {
2318
- const { left: C, top: p } = JSON.parse(localStorage.getItem("editorToolPosition") ?? "{}");
2319
- e(C, p), we(() => he.observe(m.value));
2316
+ const { left: C, top: u } = JSON.parse(localStorage.getItem("editorToolPosition") ?? "{}");
2317
+ e(C, u), we(() => he.observe(m.value));
2320
2318
  } else
2321
2319
  we(() => he.observe(m.value));
2322
2320
  }, 100), I.addEventListener("selectLineChange", () => {
2323
- F.value = I.selectLines.length, W.value = I.selectLines.some((C) => C.userData.isWindow);
2321
+ z.value = I.selectLines.length, W.value = I.selectLines.some((C) => C.userData.isWindow);
2324
2322
  }), ["rollback", "completed", "revokeRollback"].forEach((C) => {
2325
2323
  x.commandManager.addEventListener(C, () => {
2326
2324
  setTimeout(() => {
@@ -2330,12 +2328,12 @@ const ds = {
2330
2328
  }), localStorage.getItem("dxfVisible") && (r.value = localStorage.getItem("dxfVisible") == "true");
2331
2329
  }), Kt(() => {
2332
2330
  E.mouseMoveEventProxylock = !1, ht(), he.disconnect();
2333
- }), (C, p) => (D(), R("div", {
2331
+ }), (C, u) => (D(), R("div", {
2334
2332
  ref_key: "elRef",
2335
2333
  ref: m,
2336
2334
  class: "editorTool pointer-events-none overflow-hidden absolute left-0 top-0 w-full h-full z-[20] flex flex-row justify-between p-[5px] box-border select-none pointer-events-[all]"
2337
2335
  }, [
2338
- z(xe, null, {
2336
+ F(xe, null, {
2339
2337
  default: V(() => [
2340
2338
  b.value ? (D(), R("div", ds, [
2341
2339
  (D(), R(ve, null, ke(Ce, (w) => P("div", {
@@ -2354,16 +2352,16 @@ const ds = {
2354
2352
  ref: y,
2355
2353
  style: Se({ left: S.value.left + "px", top: S.value.top + "px" }),
2356
2354
  class: j(["overflow-hidden pointer-events-auto w-fit max-w-[260px] transition-[border-radius] text-[#333] absolute z-[11] bg-white select-none", { "rounded-[8px] ": f.value }]),
2357
- onMousedown: p[10] || (p[10] = (w) => w.stopPropagation())
2355
+ onMousedown: u[10] || (u[10] = (w) => w.stopPropagation())
2358
2356
  }, [
2359
2357
  P("div", {
2360
2358
  onMousedown: o,
2361
2359
  class: j([{ "border-b-[#eee] border-b-1": f.value }, "flex flex-row justify-between header text-[14px] font-bold p-[10px 0px]"])
2362
2360
  }, [
2363
- p[12] || (p[12] = Tt('<div class="flex flex-row" data-v-1a5a6c9b><div class="p-[2px_5px] flex items-center pointer-events-none" data-v-1a5a6c9b><svg fill="#aaa" width="20" height="20" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" data-v-1a5a6c9b><path d="M341.333333 298.666667a85.333333 85.333333 0 1 0 0-170.666667 85.333333 85.333333 0 0 0 0 170.666667z m0 298.666666a85.333333 85.333333 0 1 0 0-170.666666 85.333333 85.333333 0 0 0 0 170.666666z m85.333334 213.333334a85.333333 85.333333 0 1 1-170.666667 0 85.333333 85.333333 0 0 1 170.666667 0z m256-512a85.333333 85.333333 0 1 0 0-170.666667 85.333333 85.333333 0 0 0 0 170.666667z m85.333333 213.333333a85.333333 85.333333 0 1 1-170.666667 0 85.333333 85.333333 0 0 1 170.666667 0z m-85.333333 384a85.333333 85.333333 0 1 0 0-170.666667 85.333333 85.333333 0 0 0 0 170.666667z" data-v-1a5a6c9b></path></svg></div><h5 class="flex text-nowrap text-[12px] items-center pointer-events-none" data-v-1a5a6c9b>绘制工具</h5></div>', 1)),
2361
+ u[12] || (u[12] = Tt('<div class="flex flex-row" data-v-1a5a6c9b><div class="p-[2px_5px] flex items-center pointer-events-none" data-v-1a5a6c9b><svg fill="#aaa" width="20" height="20" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" data-v-1a5a6c9b><path d="M341.333333 298.666667a85.333333 85.333333 0 1 0 0-170.666667 85.333333 85.333333 0 0 0 0 170.666667z m0 298.666666a85.333333 85.333333 0 1 0 0-170.666666 85.333333 85.333333 0 0 0 0 170.666666z m85.333334 213.333334a85.333333 85.333333 0 1 1-170.666667 0 85.333333 85.333333 0 0 1 170.666667 0z m256-512a85.333333 85.333333 0 1 0 0-170.666667 85.333333 85.333333 0 0 0 0 170.666667z m85.333333 213.333333a85.333333 85.333333 0 1 1-170.666667 0 85.333333 85.333333 0 0 1 170.666667 0z m-85.333333 384a85.333333 85.333333 0 1 0 0-170.666667 85.333333 85.333333 0 0 0 0 170.666667z" data-v-1a5a6c9b></path></svg></div><h5 class="flex text-nowrap text-[12px] items-center pointer-events-none" data-v-1a5a6c9b>绘制工具</h5></div>', 1)),
2364
2362
  P("div", {
2365
- onMousedown: p[0] || (p[0] = (w) => w.stopPropagation()),
2366
- onClick: p[1] || (p[1] = (w) => f.value = !f.value),
2363
+ onMousedown: u[0] || (u[0] = (w) => w.stopPropagation()),
2364
+ onClick: u[1] || (u[1] = (w) => f.value = !f.value),
2367
2365
  class: "cursor-pointer flex items-center p-[0px_5px]"
2368
2366
  }, [
2369
2367
  (D(), R("svg", {
@@ -2374,7 +2372,7 @@ const ds = {
2374
2372
  xmlns: "http://www.w3.org/2000/svg",
2375
2373
  width: "12",
2376
2374
  height: "12"
2377
- }, p[11] || (p[11] = [
2375
+ }, u[11] || (u[11] = [
2378
2376
  P("path", { d: "M315.050667 938.666667a60.757333 60.757333 0 0 0 41.813333-16.298667L750.933333 551.338667a53.418667 53.418667 0 0 0 0-78.677334L356.864 101.632a61.696 61.696 0 0 0-83.541333 0 53.418667 53.418667 0 0 0-0.256 78.677333L625.408 512 273.066667 843.690667a53.418667 53.418667 0 0 0 0 78.677333 60.757333 60.757333 0 0 0 41.984 16.298667z" }, null, -1)
2379
2377
  ]), 2))
2380
2378
  ], 32)
@@ -2388,7 +2386,7 @@ const ds = {
2388
2386
  key: 0,
2389
2387
  onClick: (U) => t(w),
2390
2388
  class: j([{
2391
- "!bg-[var(--primary-color)] text-[#fff]": g.value === w.command
2389
+ "!bg-[var(--primary-color)] text-[#fff]": p.value === w.command
2392
2390
  // '!cursor-no-drop': currentCommand !== item.command && currentCommand !== 'default',
2393
2391
  }, "gap-[10px] text-[12px] hover:bg-[#ddd] transition-all rounded-[6px] p-[5px] flex flex-row items-center justify-between cursor-pointer"])
2394
2392
  }, [
@@ -2403,12 +2401,12 @@ const ds = {
2403
2401
  ]),
2404
2402
  P("span", fs, de(w.name), 1)
2405
2403
  ]),
2406
- g.value === w.command ? (D(), R("div", {
2404
+ p.value === w.command ? (D(), R("div", {
2407
2405
  key: 0,
2408
2406
  title: "取消命令(Esc)",
2409
2407
  class: "active:scale-[0.7] transition-all",
2410
- onClick: p[2] || (p[2] = (U) => (v(x).cancelCommand(), U.stopPropagation()))
2411
- }, p[13] || (p[13] = [
2408
+ onClick: u[2] || (u[2] = (U) => (v(x).cancelCommand(), U.stopPropagation()))
2409
+ }, u[13] || (u[13] = [
2412
2410
  P("svg", {
2413
2411
  fill: "#fff",
2414
2412
  width: "16",
@@ -2425,103 +2423,103 @@ const ds = {
2425
2423
  ], 64))), 64))
2426
2424
  ]),
2427
2425
  P("div", ws, [
2428
- z(v(Oe), {
2426
+ F(v(Oe), {
2429
2427
  size: "small",
2430
2428
  modelValue: b.value,
2431
- "onUpdate:modelValue": p[3] || (p[3] = (w) => b.value = w),
2429
+ "onUpdate:modelValue": u[3] || (u[3] = (w) => b.value = w),
2432
2430
  label: "快捷键提示"
2433
2431
  }, null, 8, ["modelValue"]),
2434
- z(v(Oe), {
2432
+ F(v(Oe), {
2435
2433
  size: "small",
2436
2434
  modelValue: r.value,
2437
- "onUpdate:modelValue": p[4] || (p[4] = (w) => r.value = w),
2435
+ "onUpdate:modelValue": u[4] || (u[4] = (w) => r.value = w),
2438
2436
  label: "dxf"
2439
2437
  }, null, 8, ["modelValue"])
2440
2438
  ]),
2441
2439
  C.permission === "admin" ? (D(), R("div", bs, [
2442
- z(v(re), {
2440
+ F(v(re), {
2443
2441
  style: { padding: "5px", "font-size": "10px" },
2444
2442
  size: "small",
2445
2443
  type: "success",
2446
2444
  onClick: s
2447
2445
  }, {
2448
- default: V(() => p[14] || (p[14] = [
2446
+ default: V(() => u[14] || (u[14] = [
2449
2447
  X(" 选择文件 ", -1)
2450
2448
  ])),
2451
2449
  _: 1,
2452
2450
  __: [14]
2453
2451
  }),
2454
- z(v(re), {
2452
+ F(v(re), {
2455
2453
  style: { padding: "5px", "font-size": "10px" },
2456
2454
  size: "small",
2457
2455
  type: "primary",
2458
- onClick: p[5] || (p[5] = (w) => v(h).Dxf.downloadOriginalData("json.json"))
2456
+ onClick: u[5] || (u[5] = (w) => v(h).Dxf.downloadOriginalData("json.json"))
2459
2457
  }, {
2460
- default: V(() => p[15] || (p[15] = [
2458
+ default: V(() => u[15] || (u[15] = [
2461
2459
  X(" 下载Json ", -1)
2462
2460
  ])),
2463
2461
  _: 1,
2464
2462
  __: [15]
2465
2463
  }),
2466
- z(v(re), {
2464
+ F(v(re), {
2467
2465
  style: { padding: "5px", "font-size": "10px" },
2468
2466
  size: "small",
2469
2467
  type: "primary",
2470
- onClick: p[6] || (p[6] = (w) => v(h).AngleCorrectionDxf.download("test.dxf"))
2468
+ onClick: u[6] || (u[6] = (w) => v(h).AngleCorrectionDxf.download("test.dxf"))
2471
2469
  }, {
2472
- default: V(() => p[16] || (p[16] = [
2470
+ default: V(() => u[16] || (u[16] = [
2473
2471
  X(" 下载DXF ", -1)
2474
2472
  ])),
2475
2473
  _: 1,
2476
2474
  __: [16]
2477
2475
  }),
2478
- z(v(re), {
2476
+ F(v(re), {
2479
2477
  style: { padding: "5px", "font-size": "10px" },
2480
2478
  size: "small",
2481
2479
  type: "primary",
2482
- onClick: p[7] || (p[7] = (w) => v(h).AngleCorrectionDxf.downloadImage("dxf.jpg"))
2480
+ onClick: u[7] || (u[7] = (w) => v(h).AngleCorrectionDxf.downloadImage("dxf.jpg"))
2483
2481
  }, {
2484
- default: V(() => p[17] || (p[17] = [
2482
+ default: V(() => u[17] || (u[17] = [
2485
2483
  X(" 下载JPG ", -1)
2486
2484
  ])),
2487
2485
  _: 1,
2488
2486
  __: [17]
2489
2487
  }),
2490
- z(v(re), {
2488
+ F(v(re), {
2491
2489
  style: { padding: "5px", "font-size": "10px" },
2492
2490
  size: "small",
2493
2491
  type: "primary",
2494
- onClick: p[8] || (p[8] = (w) => v(K).downloadGltf("test.glb", !0))
2492
+ onClick: u[8] || (u[8] = (w) => v(K).downloadGltf("test.glb", !0))
2495
2493
  }, {
2496
- default: V(() => p[18] || (p[18] = [
2494
+ default: V(() => u[18] || (u[18] = [
2497
2495
  X(" 下载白膜 ", -1)
2498
2496
  ])),
2499
2497
  _: 1,
2500
2498
  __: [18]
2501
2499
  }),
2502
- z(v(re), {
2500
+ F(v(re), {
2503
2501
  style: { padding: "5px", "font-size": "10px" },
2504
2502
  size: "small",
2505
2503
  type: "primary",
2506
- onClick: p[9] || (p[9] = (w) => v(Y).download())
2504
+ onClick: u[9] || (u[9] = (w) => v(Y).download())
2507
2505
  }, {
2508
- default: V(() => p[19] || (p[19] = [
2506
+ default: V(() => u[19] || (u[19] = [
2509
2507
  X(" 下载三维家JSON ", -1)
2510
2508
  ])),
2511
2509
  _: 1,
2512
2510
  __: [19]
2513
2511
  })
2514
2512
  ])) : q("", !0),
2515
- z(xe, null, {
2513
+ F(xe, null, {
2516
2514
  default: V(() => [
2517
2515
  P("div", xs, [
2518
- z(Vt, null, {
2516
+ F(Vt, null, {
2519
2517
  default: V(() => [
2520
2518
  (D(), R(ve, null, ke(mt, (w) => P("div", {
2521
- onClick: (U) => w.show.value && g.value === "default" && (w.action ? w.action() : v(x).commandManager.start(w.command, [...v(I).selectLines])),
2519
+ onClick: (U) => w.show.value && p.value === "default" && (w.action ? w.action() : v(x).commandManager.start(w.command, [...v(I).selectLines])),
2522
2520
  title: `${w.name}(${w.shortcut})`,
2523
2521
  class: j(["size-[20px] flex justify-center items-center relative overflow-hidden active:scale-[0.8] border-1 border-[#ccc] rounded-[4px] transition-all cursor-pointer", {
2524
- "opacity-30 bg-[#ccc] !cursor-no-drop active:!scale-[1]": !w.show.value || g.value !== "default",
2522
+ "opacity-30 bg-[#ccc] !cursor-no-drop active:!scale-[1]": !w.show.value || p.value !== "default",
2525
2523
  [w.class ?? ""]: !0
2526
2524
  }]),
2527
2525
  key: w.command
@@ -2542,15 +2540,15 @@ const ds = {
2542
2540
  ], 38)
2543
2541
  ], 512));
2544
2542
  }
2545
- }), Ms = (l, e) => {
2546
- const t = l.__vccOpts || l;
2543
+ }), Ms = (c, e) => {
2544
+ const t = c.__vccOpts || c;
2547
2545
  for (const [n, s] of e)
2548
2546
  t[n] = s;
2549
2547
  return t;
2550
2548
  }, ks = /* @__PURE__ */ Ms(Ls, [["__scopeId", "data-v-1a5a6c9b"]]);
2551
2549
  let lt = class extends Ae {
2552
2550
  static name = "Editor";
2553
- container = new u.Group();
2551
+ container = new g.Group();
2554
2552
  get renderer() {
2555
2553
  return this.parent?.findComponentByName("Renderer");
2556
2554
  }
@@ -2573,7 +2571,7 @@ let lt = class extends Ae {
2573
2571
  return this.parent?.findComponentByName("DomContainer");
2574
2572
  }
2575
2573
  commandManager = new En();
2576
- plane = new u.Mesh(new u.PlaneGeometry(2e3, 2e3, 2, 2));
2574
+ plane = new g.Mesh(new g.PlaneGeometry(2e3, 2e3, 2, 2));
2577
2575
  app;
2578
2576
  domElement = document.createElement("div");
2579
2577
  viewPermission;
@@ -2596,7 +2594,7 @@ let lt = class extends Ae {
2596
2594
  }
2597
2595
  onAddFromParent(e) {
2598
2596
  setTimeout(() => this.openEdit(), 10);
2599
- const t = new u.GridHelper(200, 100, 6710886, 4473924);
2597
+ const t = new g.GridHelper(200, 100, 6710886, 4473924);
2600
2598
  t.rotation.x = Math.PI * 0.5, t.position.z = -0.01, this.container.add(t), this.container.add(this.plane), this.plane.visible = !1;
2601
2599
  const n = this.addEventListener("update", () => {
2602
2600
  this.domContainer.domElement.parentElement && (this.domContainer.domElement.parentElement.appendChild(this.domElement), this.domContainer.domElement.parentElement.appendChild(this.imgEl), n());
@@ -2631,27 +2629,27 @@ let lt = class extends Ae {
2631
2629
  type: "cancelCommand"
2632
2630
  });
2633
2631
  }
2634
- coords = new u.Vector2();
2635
- pointerPosition = new u.Vector2();
2632
+ coords = new g.Vector2();
2633
+ pointerPosition = new g.Vector2();
2636
2634
  _exitEditCallBack;
2637
2635
  /**
2638
2636
  * 打开编辑器
2639
2637
  */
2640
2638
  openEdit() {
2641
- const e = this.renderer, t = this.domEventRegister, n = this.dxf, s = e.orbitControls, o = e.camera, a = n.box.center, d = e.camera.position.clone(), r = s?.target?.clone(), i = new u.Vector2(), c = new u.Raycaster(), m = this.coords, y = this.pointerPosition;
2639
+ const e = this.renderer, t = this.domEventRegister, n = this.dxf, s = e.orbitControls, o = e.camera, a = n.box.center, l = e.camera.position.clone(), r = s?.target?.clone(), i = new g.Vector2(), d = new g.Raycaster(), m = this.coords, y = this.pointerPosition;
2642
2640
  this.container.position.z = n.originalZAverage, e.scene.add(this.container), s && (o.position.set(a.x, a.y, 15), s.target.set(a.x, a.y, 0), s.enableRotate = !1);
2643
2641
  const f = () => {
2644
2642
  e.renderer.getSize(i);
2645
- const g = t.pointer.x / i.x * 2 - 1, h = -(t.pointer.y / i.y * 2 - 1);
2646
- m.set(g, h), c.setFromCamera(m, e.camera.children.length ? e.camera.children[0] : e.camera);
2647
- const E = c.intersectObject(this.plane);
2643
+ const p = t.pointer.x / i.x * 2 - 1, h = -(t.pointer.y / i.y * 2 - 1);
2644
+ m.set(p, h), d.setFromCamera(m, e.camera.children.length ? e.camera.children[0] : e.camera);
2645
+ const E = d.intersectObject(this.plane);
2648
2646
  E.length && (y.copy(E[0].point), this.dispatchEvent({
2649
2647
  type: "pointerPositionChange",
2650
2648
  position: y
2651
2649
  }));
2652
2650
  };
2653
2651
  t.addEventListener("mousemove", f), this.commandManager.disabled = !1, this.commandManager.start("default"), this._exitEditCallBack = () => {
2654
- t.removeEventListener("mousemove", f), s && (o.position.copy(d), s.enableRotate = !0, s.target.copy(r));
2652
+ t.removeEventListener("mousemove", f), s && (o.position.copy(l), s.enableRotate = !0, s.target.copy(r));
2655
2653
  };
2656
2654
  }
2657
2655
  /**
@@ -2661,12 +2659,12 @@ let lt = class extends Ae {
2661
2659
  typeof this._exitEditCallBack == "function" && (this._exitEditCallBack(), this._exitEditCallBack = void 0, this.commandManager.disabled = !0);
2662
2660
  }
2663
2661
  destroy() {
2664
- super.destroy(), this.exitEdit(), this.renderer.scene.remove(this.container), this.domElement.remove(), this.app?.unmount(), this.commandManager.destroy();
2662
+ this.commandManager.destroy(), super.destroy(), this.exitEdit(), this.renderer.scene.remove(this.container), this.domElement.remove(), this.app?.unmount();
2665
2663
  }
2666
2664
  };
2667
2665
  class Is extends O {
2668
2666
  static name = "PointDrag";
2669
- container = new u.Group();
2667
+ container = new g.Group();
2670
2668
  interruptKeys = ["escape"];
2671
2669
  shortcutKeys = ["control", "p"];
2672
2670
  commandName = "point";
@@ -2681,8 +2679,8 @@ class Is extends O {
2681
2679
  selectPoint(e) {
2682
2680
  let t = null, n = this.renderer.createCircle(L.zero(), { color: 16711935 }), s = null;
2683
2681
  const o = this.editor.addEventListener("pointerPositionChange", () => {
2684
- const { point: a, line: d, find: r, mode: i } = this.editor.renderManager.adsorption();
2685
- this.dispatchEvent({ type: "pointerMove", point: a }), r && i === "point" ? (this.domElement.style.cursor = "none", n.position.copy(a), s = d, t = a.clone(), this.container.add(n)) : (this.domElement.style.cursor = "no-drop", t = null, n.removeFromParent());
2682
+ const { point: a, line: l, find: r, mode: i } = this.editor.renderManager.adsorption();
2683
+ this.dispatchEvent({ type: "pointerMove", point: a }), r && i === "point" ? (this.domElement.style.cursor = "none", n.position.copy(a), s = l, t = a.clone(), this.container.add(n)) : (this.domElement.style.cursor = "no-drop", t = null, n.removeFromParent());
2686
2684
  });
2687
2685
  this.addEventRecord("selectPointStart").add(o).add(this.eventInput.addEventListener("codeChange", () => {
2688
2686
  this.eventInput.isKeyDown("mouse_0") && t && (this.canceEventRecord("selectPointStart"), n.material.color.set(65280), e({ point: t, line: s }));
@@ -2697,19 +2695,19 @@ class Is extends O {
2697
2695
  */
2698
2696
  drag(e, { point: t, line: n }) {
2699
2697
  this.domElement.style.cursor = "crosshair";
2700
- const s = n.start.equal(L.from(t)) ? "start" : "end", o = s == "start" ? new u.Vector3(n.end.x, n.end.y, 0) : new u.Vector3(n.start.x, n.start.y, 0), a = t.clone(), d = new ye([o, a], 16711935), r = this.renderer.createCircle(L.zero(), { color: 16711935, size: 10 });
2701
- this.container.add(d), this.addEventRecord("clear").add(this.editor.addEventListener("pointerPositionChange", () => {
2702
- let { point: i, find: c } = this.editor.renderManager.adsorption(), m = "none";
2698
+ const s = n.start.equal(L.from(t)) ? "start" : "end", o = s == "start" ? new g.Vector3(n.end.x, n.end.y, 0) : new g.Vector3(n.start.x, n.start.y, 0), a = t.clone(), l = new ye([o, a], 16711935), r = this.renderer.createCircle(L.zero(), { color: 16711935, size: 10 });
2699
+ this.container.add(l), this.addEventRecord("clear").add(this.editor.addEventListener("pointerPositionChange", () => {
2700
+ let { point: i, find: d } = this.editor.renderManager.adsorption(), m = "none";
2703
2701
  if (i) {
2704
2702
  if (this.dispatchEvent({ type: "pointerMove", point: i }), this.eventInput.isKeyDown("shift")) {
2705
2703
  const y = n.projectPoint(L.from(i), !1);
2706
- i.set(y?.x ?? i.x, y?.y ?? i.y, 0), c = !0, m = "crosshair";
2704
+ i.set(y?.x ?? i.x, y?.y ?? i.y, 0), d = !0, m = "crosshair";
2707
2705
  }
2708
- c ? (r.position.copy(i), this.container.add(r)) : (r.removeFromParent(), m = "crosshair"), a.copy(i), d.setPoint(o, a), this.domElement.style.cursor = m;
2706
+ d ? (r.position.copy(i), this.container.add(r)) : (r.removeFromParent(), m = "crosshair"), a.copy(i), l.setPoint(o, a), this.domElement.style.cursor = m;
2709
2707
  }
2710
2708
  })).add(this.eventInput.addEventListener("codeChange", () => {
2711
2709
  this.eventInput.isKeyDown("mouse_0") && (this.canceEventRecord("selectPointStart"), e({ point: a, oldPoint: s === "end" ? n.end.clone() : n.start.clone(), line: n, mode: s }));
2712
- })).add(() => r.removeFromParent()).add(() => d.removeFromParent());
2710
+ })).add(() => r.removeFromParent()).add(() => l.removeFromParent());
2713
2711
  }
2714
2712
  /** 执行完成
2715
2713
  */
@@ -2732,12 +2730,12 @@ class Is extends O {
2732
2730
  return this.completed(e), e;
2733
2731
  }
2734
2732
  }
2735
- function Je(l, e = {}) {
2736
- l.addComponent(new lt(e.viewPermission)), l.addComponent(new as()), l.addComponent(new rt()), l.addComponent(new xn()), l.addComponent(new is()), l.addComponent(new rs()), l.addComponent(new Is()), l.addComponent(new ee()), l.addComponent(new $()), l.addComponent(new le()), l.addComponent(new te()), l.addComponent(new ne()), l.addComponent(new se()), l.addComponent(new oe()), l.addComponent(new ae()), l.addComponent(new ie()), l.addComponent(new dt());
2733
+ function Je(c, e = {}) {
2734
+ c.addComponent(new lt(e.viewPermission)), c.addComponent(new as()), c.addComponent(new rt()), c.addComponent(new xn()), c.addComponent(new is()), c.addComponent(new rs()), c.addComponent(new Is()), c.addComponent(new ee()), c.addComponent(new $()), c.addComponent(new le()), c.addComponent(new te()), c.addComponent(new ne()), c.addComponent(new se()), c.addComponent(new oe()), c.addComponent(new ae()), c.addComponent(new ie()), c.addComponent(new dt());
2737
2735
  }
2738
2736
  const Rs = Object.assign(Je, {
2739
- create(l = {}) {
2740
- return (e) => Je(e, l);
2737
+ create(c = {}) {
2738
+ return (e) => Je(e, c);
2741
2739
  }
2742
2740
  });
2743
2741
  export {