build-dxf 0.0.30 → 0.0.31
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/package.json +1 -1
- package/src/build.js +701 -662
- package/src/index.js +1 -1
- package/src/index3.js +509 -503
- package/src/utils/DxfSystem/components/Dxf.d.ts +8 -4
- package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/Default.d.ts +1 -1
- package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/DrawWindow.d.ts +1 -1
- package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/VerticalCorrection.d.ts +3 -3
- package/src/utils/DxfSystem/plugin/Editor/components/RenderManager.d.ts +6 -1
- package/src/utils/DxfSystem/plugin/ModelDataPlugin/components/WhiteModel.d.ts +1 -1
- package/src/utils/Quadtree/LineSegment.d.ts +7 -8
package/src/index3.js
CHANGED
|
@@ -1,73 +1,73 @@
|
|
|
1
1
|
import * as m from "three";
|
|
2
|
-
import { i as ht, n as ut, r as Ue, t as qe, c as Pe, d as pt, e as gt, f as De, g as Q, _ as Ze, u as vt, h as fe, j as Be, w as ft, k as yt, l as wt, p as bt, m as xt, o as Ct, T as Ne, q as Oe, s as Et, v as Mt, x as Re, y as Ie, z as Le, A as Lt, B as kt, L as ye, D as It, b as
|
|
3
|
-
import { C as Ae, P as _, L as B, B as Ye, E as Xe, b as
|
|
2
|
+
import { i as ht, n as ut, r as Ue, t as qe, c as Pe, d as pt, e as gt, f as De, g as Q, _ as Ze, u as vt, h as fe, j as Be, w as ft, k as yt, l as wt, p as bt, m as xt, o as Ct, T as Ne, q as Oe, s as Et, v as Mt, x as Re, y as Ie, z as Le, A as Lt, B as kt, L as ye, D as It, b as Fe, E as de, S as Pt } from "./selectLocalFile.js";
|
|
3
|
+
import { C as Ae, P as _, L as B, B as Ye, E as Xe, b as Ke, Q as ze, u as Dt, c as At, W as St, T as _t } from "./build.js";
|
|
4
4
|
import "clipper-lib";
|
|
5
5
|
import "dxf-writer";
|
|
6
6
|
import "three/addons/controls/OrbitControls.js";
|
|
7
|
-
import { watch as J, ref as S, defineComponent as
|
|
8
|
-
function st(
|
|
7
|
+
import { watch as J, ref as S, defineComponent as me, computed as D, createElementBlock as O, openBlock as P, normalizeClass as V, unref as f, renderSlot as be, createVNode as K, Transition as xe, withCtx as j, withDirectives as $e, createElementVNode as I, normalizeStyle as Se, createTextVNode as X, toDisplayString as le, vShow as et, shallowReactive as Bt, onMounted as tt, createBlock as ge, createCommentVNode as q, resolveDynamicComponent as Nt, Fragment as ve, withModifiers as Ot, nextTick as we, isVNode as nt, render as Te, toRaw as Rt, onUnmounted as Ft, renderList as ke, createStaticVNode as Kt, TransitionGroup as zt, createApp as Tt } from "vue";
|
|
8
|
+
function st(l) {
|
|
9
9
|
var e;
|
|
10
|
-
const t = Ue(
|
|
10
|
+
const t = Ue(l);
|
|
11
11
|
return (e = t?.$el) != null ? e : t;
|
|
12
12
|
}
|
|
13
13
|
const ot = Pe ? window : void 0;
|
|
14
|
-
function
|
|
14
|
+
function jt(...l) {
|
|
15
15
|
let e, t, n, s;
|
|
16
|
-
if (ht(
|
|
16
|
+
if (ht(l[0]) || Array.isArray(l[0]) ? ([t, n, s] = l, e = ot) : [e, t, n, s] = l, !e)
|
|
17
17
|
return ut;
|
|
18
18
|
Array.isArray(t) || (t = [t]), Array.isArray(n) || (n = [n]);
|
|
19
19
|
const o = [], a = () => {
|
|
20
|
-
o.forEach((
|
|
21
|
-
},
|
|
22
|
-
a(),
|
|
20
|
+
o.forEach((r) => r()), o.length = 0;
|
|
21
|
+
}, c = (r, h, y, p) => (r.addEventListener(h, y, p), () => r.removeEventListener(h, y, p)), d = J(() => [st(e), Ue(s)], ([r, h]) => {
|
|
22
|
+
a(), r && o.push(...t.flatMap((y) => n.map((p) => c(r, y, p, h))));
|
|
23
23
|
}, { immediate: !0, flush: "post" }), i = () => {
|
|
24
|
-
|
|
24
|
+
d(), a();
|
|
25
25
|
};
|
|
26
26
|
return qe(i), i;
|
|
27
27
|
}
|
|
28
|
-
function
|
|
29
|
-
const t = S(), n = () => t.value = !!
|
|
28
|
+
function Vt(l, e = !1) {
|
|
29
|
+
const t = S(), n = () => t.value = !!l();
|
|
30
30
|
return n(), pt(n, e), t;
|
|
31
31
|
}
|
|
32
32
|
const je = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Ve = "__vueuse_ssr_handlers__";
|
|
33
33
|
je[Ve] = je[Ve] || {};
|
|
34
|
-
var Ge = Object.getOwnPropertySymbols,
|
|
34
|
+
var Ge = Object.getOwnPropertySymbols, Gt = Object.prototype.hasOwnProperty, Qt = Object.prototype.propertyIsEnumerable, Ht = (l, e) => {
|
|
35
35
|
var t = {};
|
|
36
|
-
for (var n in
|
|
37
|
-
|
|
38
|
-
if (
|
|
39
|
-
for (var n of Ge(
|
|
40
|
-
e.indexOf(n) < 0 &&
|
|
36
|
+
for (var n in l)
|
|
37
|
+
Gt.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 && Qt.call(l, n) && (t[n] = l[n]);
|
|
41
41
|
return t;
|
|
42
42
|
};
|
|
43
|
-
function
|
|
44
|
-
const n = t, { window: s = ot } = n, o =
|
|
43
|
+
function Wt(l, e, t = {}) {
|
|
44
|
+
const n = t, { window: s = ot } = n, o = Ht(n, ["window"]);
|
|
45
45
|
let a;
|
|
46
|
-
const
|
|
46
|
+
const c = Vt(() => s && "ResizeObserver" in s), d = () => {
|
|
47
47
|
a && (a.disconnect(), a = void 0);
|
|
48
|
-
}, i = J(() => st(
|
|
49
|
-
|
|
50
|
-
}, { immediate: !0, flush: "post" }),
|
|
51
|
-
|
|
48
|
+
}, i = J(() => st(l), (h) => {
|
|
49
|
+
d(), c.value && s && h && (a = new ResizeObserver(e), a.observe(h, o));
|
|
50
|
+
}, { immediate: !0, flush: "post" }), r = () => {
|
|
51
|
+
d(), i();
|
|
52
52
|
};
|
|
53
|
-
return qe(
|
|
54
|
-
isSupported:
|
|
55
|
-
stop:
|
|
53
|
+
return qe(r), {
|
|
54
|
+
isSupported: c,
|
|
55
|
+
stop: r
|
|
56
56
|
};
|
|
57
57
|
}
|
|
58
58
|
var Qe;
|
|
59
|
-
(function(
|
|
60
|
-
|
|
59
|
+
(function(l) {
|
|
60
|
+
l.UP = "UP", l.RIGHT = "RIGHT", l.DOWN = "DOWN", l.LEFT = "LEFT", l.NONE = "NONE";
|
|
61
61
|
})(Qe || (Qe = {}));
|
|
62
|
-
var
|
|
62
|
+
var Jt = Object.defineProperty, He = Object.getOwnPropertySymbols, Ut = Object.prototype.hasOwnProperty, qt = Object.prototype.propertyIsEnumerable, We = (l, e, t) => e in l ? Jt(l, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : l[e] = t, Zt = (l, e) => {
|
|
63
63
|
for (var t in e || (e = {}))
|
|
64
|
-
|
|
64
|
+
Ut.call(e, t) && We(l, t, e[t]);
|
|
65
65
|
if (He)
|
|
66
66
|
for (var t of He(e))
|
|
67
|
-
|
|
68
|
-
return
|
|
67
|
+
qt.call(e, t) && We(l, t, e[t]);
|
|
68
|
+
return l;
|
|
69
69
|
};
|
|
70
|
-
const
|
|
70
|
+
const Yt = {
|
|
71
71
|
easeInSine: [0.12, 0, 0.39, 0],
|
|
72
72
|
easeOutSine: [0.61, 1, 0.88, 1],
|
|
73
73
|
easeInOutSine: [0.37, 0, 0.63, 1],
|
|
@@ -93,12 +93,12 @@ const Zt = {
|
|
|
93
93
|
easeOutBack: [0.34, 1.56, 0.64, 1],
|
|
94
94
|
easeInOutBack: [0.68, -0.6, 0.32, 1.6]
|
|
95
95
|
};
|
|
96
|
-
|
|
96
|
+
Zt({
|
|
97
97
|
linear: gt
|
|
98
|
-
},
|
|
99
|
-
const
|
|
98
|
+
}, Yt);
|
|
99
|
+
const Xt = (l) => l, $t = {
|
|
100
100
|
esc: "Escape"
|
|
101
|
-
},
|
|
101
|
+
}, en = De({
|
|
102
102
|
value: {
|
|
103
103
|
type: [String, Number],
|
|
104
104
|
default: ""
|
|
@@ -129,35 +129,35 @@ const Yt = (d) => d, Xt = {
|
|
|
129
129
|
badgeClass: {
|
|
130
130
|
type: String
|
|
131
131
|
}
|
|
132
|
-
}),
|
|
132
|
+
}), tn = me({
|
|
133
133
|
name: "ElBadge"
|
|
134
|
-
}),
|
|
135
|
-
...
|
|
136
|
-
props:
|
|
137
|
-
setup(
|
|
138
|
-
const t =
|
|
139
|
-
var a,
|
|
134
|
+
}), nn = /* @__PURE__ */ me({
|
|
135
|
+
...tn,
|
|
136
|
+
props: en,
|
|
137
|
+
setup(l, { expose: e }) {
|
|
138
|
+
const t = l, n = vt("badge"), s = D(() => t.isDot ? "" : fe(t.value) && fe(t.max) ? t.max < t.value ? `${t.max}+` : `${t.value}` : `${t.value}`), o = D(() => {
|
|
139
|
+
var a, c, d, i, r;
|
|
140
140
|
return [
|
|
141
141
|
{
|
|
142
142
|
backgroundColor: t.color,
|
|
143
|
-
marginRight: Be(-((
|
|
144
|
-
marginTop: Be((i = (
|
|
143
|
+
marginRight: Be(-((c = (a = t.offset) == null ? void 0 : a[0]) != null ? c : 0)),
|
|
144
|
+
marginTop: Be((i = (d = t.offset) == null ? void 0 : d[1]) != null ? i : 0)
|
|
145
145
|
},
|
|
146
|
-
(
|
|
146
|
+
(r = t.badgeStyle) != null ? r : {}
|
|
147
147
|
];
|
|
148
148
|
});
|
|
149
149
|
return e({
|
|
150
150
|
content: s
|
|
151
|
-
}), (a,
|
|
151
|
+
}), (a, c) => (P(), O("div", {
|
|
152
152
|
class: V(f(n).b())
|
|
153
153
|
}, [
|
|
154
154
|
be(a.$slots, "default"),
|
|
155
|
-
|
|
155
|
+
K(xe, {
|
|
156
156
|
name: `${f(n).namespace.value}-zoom-in-center`,
|
|
157
157
|
persisted: ""
|
|
158
158
|
}, {
|
|
159
159
|
default: j(() => [
|
|
160
|
-
$e(
|
|
160
|
+
$e(I("sup", {
|
|
161
161
|
class: V([
|
|
162
162
|
f(n).e("content"),
|
|
163
163
|
f(n).em("content", a.type),
|
|
@@ -169,7 +169,7 @@ const Yt = (d) => d, Xt = {
|
|
|
169
169
|
style: Se(f(o))
|
|
170
170
|
}, [
|
|
171
171
|
be(a.$slots, "content", { value: f(s) }, () => [
|
|
172
|
-
|
|
172
|
+
X(le(f(s)), 1)
|
|
173
173
|
])
|
|
174
174
|
], 6), [
|
|
175
175
|
[et, !a.hidden && (f(s) || a.isDot || a.$slots.content)]
|
|
@@ -180,8 +180,8 @@ const Yt = (d) => d, Xt = {
|
|
|
180
180
|
], 2));
|
|
181
181
|
}
|
|
182
182
|
});
|
|
183
|
-
var
|
|
184
|
-
const
|
|
183
|
+
var sn = /* @__PURE__ */ Ze(nn, [["__file", "badge.vue"]]);
|
|
184
|
+
const on = ft(sn), an = De({
|
|
185
185
|
a11y: {
|
|
186
186
|
type: Boolean,
|
|
187
187
|
default: !0
|
|
@@ -219,12 +219,12 @@ const sn = ft(nn), on = De({
|
|
|
219
219
|
},
|
|
220
220
|
...yt
|
|
221
221
|
}), T = {};
|
|
222
|
-
|
|
222
|
+
me({
|
|
223
223
|
name: "ElConfigProvider",
|
|
224
|
-
props:
|
|
225
|
-
setup(
|
|
226
|
-
const t = bt(
|
|
227
|
-
return J(() =>
|
|
224
|
+
props: an,
|
|
225
|
+
setup(l, { slots: e }) {
|
|
226
|
+
const t = bt(l);
|
|
227
|
+
return J(() => l.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 });
|
|
@@ -236,7 +236,7 @@ const at = [
|
|
|
236
236
|
"info",
|
|
237
237
|
"warning",
|
|
238
238
|
"error"
|
|
239
|
-
], N =
|
|
239
|
+
], N = Xt({
|
|
240
240
|
customClass: "",
|
|
241
241
|
dangerouslyUseHTMLString: !1,
|
|
242
242
|
duration: 3e3,
|
|
@@ -252,7 +252,7 @@ const at = [
|
|
|
252
252
|
grouping: !1,
|
|
253
253
|
repeatNum: 1,
|
|
254
254
|
appendTo: Pe ? document.body : void 0
|
|
255
|
-
}),
|
|
255
|
+
}), rn = De({
|
|
256
256
|
customClass: {
|
|
257
257
|
type: String,
|
|
258
258
|
default: N.customClass
|
|
@@ -314,38 +314,38 @@ const at = [
|
|
|
314
314
|
type: Number,
|
|
315
315
|
default: N.repeatNum
|
|
316
316
|
}
|
|
317
|
-
}),
|
|
317
|
+
}), dn = {
|
|
318
318
|
destroy: () => !0
|
|
319
|
-
}, H =
|
|
320
|
-
const e = H.findIndex((s) => s.id ===
|
|
319
|
+
}, H = Bt([]), ln = (l) => {
|
|
320
|
+
const e = H.findIndex((s) => s.id === l), t = H[e];
|
|
321
321
|
let n;
|
|
322
322
|
return e > 0 && (n = H[e - 1]), { current: t, prev: n };
|
|
323
|
-
},
|
|
324
|
-
const { prev: e } =
|
|
323
|
+
}, cn = (l) => {
|
|
324
|
+
const { prev: e } = ln(l);
|
|
325
325
|
return e ? e.vm.exposed.bottom.value : 0;
|
|
326
|
-
},
|
|
326
|
+
}, mn = (l, e) => H.findIndex((n) => n.id === l) > 0 ? 16 : e, hn = me({
|
|
327
327
|
name: "ElMessage"
|
|
328
|
-
}),
|
|
329
|
-
...
|
|
330
|
-
props:
|
|
331
|
-
emits:
|
|
332
|
-
setup(
|
|
333
|
-
const n =
|
|
334
|
-
let
|
|
335
|
-
const v =
|
|
328
|
+
}), un = /* @__PURE__ */ me({
|
|
329
|
+
...hn,
|
|
330
|
+
props: rn,
|
|
331
|
+
emits: dn,
|
|
332
|
+
setup(l, { expose: e, emit: t }) {
|
|
333
|
+
const n = l, { Close: s } = Et, o = S(!1), { ns: a, zIndex: c } = Ct("message"), { currentZIndex: d, nextZIndex: i } = c, r = S(), h = S(!1), y = S(0);
|
|
334
|
+
let p;
|
|
335
|
+
const v = D(() => n.type ? n.type === "error" ? "danger" : n.type : "info"), g = D(() => {
|
|
336
336
|
const b = n.type;
|
|
337
337
|
return { [a.bm("icon", b)]: b && Ne[b] };
|
|
338
|
-
}), E =
|
|
339
|
-
top: `${
|
|
340
|
-
zIndex:
|
|
338
|
+
}), E = D(() => n.icon || Ne[n.type] || ""), x = D(() => cn(n.id)), k = D(() => mn(n.id, n.offset) + x.value), z = D(() => y.value + k.value), Y = D(() => ({
|
|
339
|
+
top: `${k.value}px`,
|
|
340
|
+
zIndex: d.value
|
|
341
341
|
}));
|
|
342
342
|
function Z() {
|
|
343
|
-
n.duration !== 0 && ({ stop:
|
|
343
|
+
n.duration !== 0 && ({ stop: p } = Mt(() => {
|
|
344
344
|
A();
|
|
345
345
|
}, n.duration));
|
|
346
346
|
}
|
|
347
347
|
function G() {
|
|
348
|
-
|
|
348
|
+
p?.();
|
|
349
349
|
}
|
|
350
350
|
function A() {
|
|
351
351
|
h.value = !1, we(() => {
|
|
@@ -354,19 +354,19 @@ const at = [
|
|
|
354
354
|
});
|
|
355
355
|
}
|
|
356
356
|
function M({ code: b }) {
|
|
357
|
-
b ===
|
|
357
|
+
b === $t.esc && A();
|
|
358
358
|
}
|
|
359
359
|
return tt(() => {
|
|
360
360
|
Z(), i(), h.value = !0;
|
|
361
361
|
}), J(() => n.repeatNum, () => {
|
|
362
362
|
G(), Z();
|
|
363
|
-
}),
|
|
364
|
-
y.value =
|
|
363
|
+
}), jt(document, "keydown", M), Wt(r, () => {
|
|
364
|
+
y.value = r.value.getBoundingClientRect().height;
|
|
365
365
|
}), e({
|
|
366
366
|
visible: h,
|
|
367
367
|
bottom: z,
|
|
368
368
|
close: A
|
|
369
|
-
}), (b,
|
|
369
|
+
}), (b, F) => (P(), ge(xe, {
|
|
370
370
|
name: f(a).b("fade"),
|
|
371
371
|
onBeforeEnter: (W) => o.value = !0,
|
|
372
372
|
onBeforeLeave: b.onClose,
|
|
@@ -374,10 +374,10 @@ const at = [
|
|
|
374
374
|
persisted: ""
|
|
375
375
|
}, {
|
|
376
376
|
default: j(() => [
|
|
377
|
-
$e(
|
|
377
|
+
$e(I("div", {
|
|
378
378
|
id: b.id,
|
|
379
379
|
ref_key: "messageRef",
|
|
380
|
-
ref:
|
|
380
|
+
ref: r,
|
|
381
381
|
class: V([
|
|
382
382
|
f(a).b(),
|
|
383
383
|
{ [f(a).m(b.type)]: b.type },
|
|
@@ -385,45 +385,45 @@ const at = [
|
|
|
385
385
|
f(a).is("plain", b.plain),
|
|
386
386
|
b.customClass
|
|
387
387
|
]),
|
|
388
|
-
style: Se(f(
|
|
388
|
+
style: Se(f(Y)),
|
|
389
389
|
role: "alert",
|
|
390
390
|
onMouseenter: G,
|
|
391
391
|
onMouseleave: Z
|
|
392
392
|
}, [
|
|
393
|
-
b.repeatNum > 1 ? (
|
|
393
|
+
b.repeatNum > 1 ? (P(), ge(f(on), {
|
|
394
394
|
key: 0,
|
|
395
395
|
value: b.repeatNum,
|
|
396
396
|
type: f(v),
|
|
397
397
|
class: V(f(a).e("badge"))
|
|
398
398
|
}, null, 8, ["value", "type", "class"])) : q("v-if", !0),
|
|
399
|
-
f(E) ? (
|
|
399
|
+
f(E) ? (P(), ge(f(Oe), {
|
|
400
400
|
key: 1,
|
|
401
401
|
class: V([f(a).e("icon"), f(g)])
|
|
402
402
|
}, {
|
|
403
403
|
default: j(() => [
|
|
404
|
-
(
|
|
404
|
+
(P(), ge(Nt(f(E))))
|
|
405
405
|
]),
|
|
406
406
|
_: 1
|
|
407
407
|
}, 8, ["class"])) : q("v-if", !0),
|
|
408
408
|
be(b.$slots, "default", {}, () => [
|
|
409
|
-
b.dangerouslyUseHTMLString ? (
|
|
409
|
+
b.dangerouslyUseHTMLString ? (P(), O(ve, { key: 1 }, [
|
|
410
410
|
q(" Caution here, message could've been compromised, never use user's input as message "),
|
|
411
|
-
|
|
411
|
+
I("p", {
|
|
412
412
|
class: V(f(a).e("content")),
|
|
413
413
|
innerHTML: b.message
|
|
414
414
|
}, null, 10, ["innerHTML"])
|
|
415
|
-
], 2112)) : (
|
|
415
|
+
], 2112)) : (P(), O("p", {
|
|
416
416
|
key: 0,
|
|
417
417
|
class: V(f(a).e("content"))
|
|
418
|
-
},
|
|
418
|
+
}, le(b.message), 3))
|
|
419
419
|
]),
|
|
420
|
-
b.showClose ? (
|
|
420
|
+
b.showClose ? (P(), ge(f(Oe), {
|
|
421
421
|
key: 2,
|
|
422
422
|
class: V(f(a).e("closeBtn")),
|
|
423
|
-
onClick:
|
|
423
|
+
onClick: Ot(A, ["stop"])
|
|
424
424
|
}, {
|
|
425
425
|
default: j(() => [
|
|
426
|
-
|
|
426
|
+
K(f(s))
|
|
427
427
|
]),
|
|
428
428
|
_: 1
|
|
429
429
|
}, 8, ["class", "onClick"])) : q("v-if", !0)
|
|
@@ -435,10 +435,10 @@ const at = [
|
|
|
435
435
|
}, 8, ["name", "onBeforeEnter", "onBeforeLeave", "onAfterLeave"]));
|
|
436
436
|
}
|
|
437
437
|
});
|
|
438
|
-
var
|
|
439
|
-
let
|
|
440
|
-
const it = (
|
|
441
|
-
const e = !
|
|
438
|
+
var pn = /* @__PURE__ */ Ze(un, [["__file", "message.vue"]]);
|
|
439
|
+
let gn = 1;
|
|
440
|
+
const it = (l) => {
|
|
441
|
+
const e = !l || Re(l) || nt(l) || Ie(l) ? { message: l } : l, t = {
|
|
442
442
|
...N,
|
|
443
443
|
...e
|
|
444
444
|
};
|
|
@@ -449,44 +449,44 @@ const it = (d) => {
|
|
|
449
449
|
Lt(n) || (n = document.body), t.appendTo = n;
|
|
450
450
|
}
|
|
451
451
|
return Le(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), Le(T.showClose) && !t.showClose && (t.showClose = T.showClose), Le(T.plain) && !t.plain && (t.plain = T.plain), t;
|
|
452
|
-
},
|
|
453
|
-
const e = H.indexOf(
|
|
452
|
+
}, vn = (l) => {
|
|
453
|
+
const e = H.indexOf(l);
|
|
454
454
|
if (e === -1)
|
|
455
455
|
return;
|
|
456
456
|
H.splice(e, 1);
|
|
457
|
-
const { handler: t } =
|
|
457
|
+
const { handler: t } = l;
|
|
458
458
|
t.close();
|
|
459
|
-
},
|
|
460
|
-
const n = `message_${
|
|
459
|
+
}, fn = ({ appendTo: l, ...e }, t) => {
|
|
460
|
+
const n = `message_${gn++}`, s = e.onClose, o = document.createElement("div"), a = {
|
|
461
461
|
...e,
|
|
462
462
|
id: n,
|
|
463
463
|
onClose: () => {
|
|
464
|
-
s?.(),
|
|
464
|
+
s?.(), vn(r);
|
|
465
465
|
},
|
|
466
466
|
onDestroy: () => {
|
|
467
467
|
Te(null, o);
|
|
468
468
|
}
|
|
469
|
-
},
|
|
469
|
+
}, c = K(pn, a, Ie(a.message) || nt(a.message) ? {
|
|
470
470
|
default: Ie(a.message) ? a.message : () => a.message
|
|
471
471
|
} : null);
|
|
472
|
-
|
|
473
|
-
const
|
|
472
|
+
c.appContext = t || ce._context, Te(c, o), l.appendChild(o.firstElementChild);
|
|
473
|
+
const d = c.component, r = {
|
|
474
474
|
id: n,
|
|
475
|
-
vnode:
|
|
476
|
-
vm:
|
|
475
|
+
vnode: c,
|
|
476
|
+
vm: d,
|
|
477
477
|
handler: {
|
|
478
478
|
close: () => {
|
|
479
|
-
|
|
479
|
+
d.exposed.close();
|
|
480
480
|
}
|
|
481
481
|
},
|
|
482
|
-
props:
|
|
482
|
+
props: c.component.props
|
|
483
483
|
};
|
|
484
|
-
return
|
|
485
|
-
},
|
|
484
|
+
return r;
|
|
485
|
+
}, ce = (l = {}, e) => {
|
|
486
486
|
if (!Pe)
|
|
487
487
|
return { close: () => {
|
|
488
488
|
} };
|
|
489
|
-
const t = it(
|
|
489
|
+
const t = it(l);
|
|
490
490
|
if (t.grouping && H.length) {
|
|
491
491
|
const s = H.find(({ vnode: o }) => {
|
|
492
492
|
var a;
|
|
@@ -498,23 +498,23 @@ const it = (d) => {
|
|
|
498
498
|
if (fe(T.max) && H.length >= T.max)
|
|
499
499
|
return { close: () => {
|
|
500
500
|
} };
|
|
501
|
-
const n =
|
|
501
|
+
const n = fn(t, e);
|
|
502
502
|
return H.push(n), n.handler;
|
|
503
503
|
};
|
|
504
|
-
at.forEach((
|
|
505
|
-
|
|
504
|
+
at.forEach((l) => {
|
|
505
|
+
ce[l] = (e = {}, t) => {
|
|
506
506
|
const n = it(e);
|
|
507
|
-
return
|
|
507
|
+
return ce({ ...n, type: l }, t);
|
|
508
508
|
};
|
|
509
509
|
});
|
|
510
|
-
function
|
|
510
|
+
function yn(l) {
|
|
511
511
|
const e = [...H];
|
|
512
512
|
for (const t of e)
|
|
513
|
-
(!
|
|
513
|
+
(!l || l === t.props.type) && t.handler.close();
|
|
514
514
|
}
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
const L = kt(
|
|
515
|
+
ce.closeAll = yn;
|
|
516
|
+
ce._context = null;
|
|
517
|
+
const L = kt(ce, "$message");
|
|
518
518
|
class R extends Ae {
|
|
519
519
|
_renderer;
|
|
520
520
|
get renderer() {
|
|
@@ -605,36 +605,36 @@ class R extends Ae {
|
|
|
605
605
|
createPointerMove(e) {
|
|
606
606
|
const t = this.editor, n = new _();
|
|
607
607
|
let s = null, o = null, a = null;
|
|
608
|
-
const
|
|
609
|
-
const
|
|
608
|
+
const c = t.addEventListener("pointerPositionChange", () => {
|
|
609
|
+
const d = _.from(t.pointerPosition);
|
|
610
610
|
if (s && t.eventInput.isKeyDown("shift")) {
|
|
611
|
-
const i = Math.abs(
|
|
612
|
-
i >
|
|
611
|
+
const i = Math.abs(d.x - s.x), r = Math.abs(d.y - s.y);
|
|
612
|
+
i > r ? n.set(d.x, s.y) : n.set(s.x, d.y), e(n, !1);
|
|
613
613
|
} else if (o && a && t.eventInput.isKeyDown("alt")) {
|
|
614
|
-
const i = o.projectPoint(
|
|
615
|
-
i &&
|
|
614
|
+
const i = o.projectPoint(d, !1), r = a.projectPoint(d, !1);
|
|
615
|
+
i && r ? d.distance(i) < d.distance(r) ? n.copy(i) : n.copy(r) : i ? n.copy(i) : r && n.copy(r), e(n, !1);
|
|
616
616
|
} else {
|
|
617
|
-
const { point: i, find:
|
|
618
|
-
n.copy(i), e(n,
|
|
617
|
+
const { point: i, find: r } = t.renderManager.adsorption();
|
|
618
|
+
n.copy(i), e(n, r);
|
|
619
619
|
}
|
|
620
620
|
});
|
|
621
621
|
return {
|
|
622
622
|
destroy() {
|
|
623
|
-
|
|
623
|
+
c();
|
|
624
624
|
},
|
|
625
|
-
setBaseLine(
|
|
626
|
-
if (o =
|
|
627
|
-
const
|
|
625
|
+
setBaseLine(d, i) {
|
|
626
|
+
if (o = d, s = i, d && i) {
|
|
627
|
+
const r = d.normal();
|
|
628
628
|
a = new B(
|
|
629
|
-
i.clone().add(
|
|
630
|
-
i.clone().add(
|
|
629
|
+
i.clone().add(r.clone().multiplyScalar(10)),
|
|
630
|
+
i.clone().add(r.multiplyScalar(-10))
|
|
631
631
|
);
|
|
632
632
|
} else a = null;
|
|
633
633
|
}
|
|
634
634
|
};
|
|
635
635
|
}
|
|
636
636
|
}
|
|
637
|
-
class
|
|
637
|
+
class wn extends R {
|
|
638
638
|
static name = "DrawLine";
|
|
639
639
|
container = new m.Group();
|
|
640
640
|
interruptKeys = ["escape"];
|
|
@@ -651,7 +651,7 @@ class yn extends R {
|
|
|
651
651
|
* @param next
|
|
652
652
|
*/
|
|
653
653
|
selectPoint(e) {
|
|
654
|
-
let t = this.parent?.findComponentByName("Editor"), n = null, s = null, o = [], a = new m.Mesh(new m.SphereGeometry(0.04), new m.MeshBasicMaterial({ color: 65280 })),
|
|
654
|
+
let t = this.parent?.findComponentByName("Editor"), n = null, s = null, o = [], a = new m.Mesh(new m.SphereGeometry(0.04), new m.MeshBasicMaterial({ color: 65280 })), c = t.domContainer.domElement, d = new ye([], 16711935), i = new ye([
|
|
655
655
|
new m.Vector3(-1e4, 0, 0),
|
|
656
656
|
new m.Vector3(1e4, 0, 0),
|
|
657
657
|
new m.Vector3(0, -1e4, 0),
|
|
@@ -662,11 +662,11 @@ class yn extends R {
|
|
|
662
662
|
dashSize: 0.1,
|
|
663
663
|
gapSize: 0.1,
|
|
664
664
|
linewidth: 0.1
|
|
665
|
-
}), this.container.add(
|
|
666
|
-
const
|
|
667
|
-
|
|
668
|
-
}, h = new m.Vector3(), y = this.createPointerMove((
|
|
669
|
-
h.set(
|
|
665
|
+
}), this.container.add(d);
|
|
666
|
+
const r = () => {
|
|
667
|
+
d.setPoint(...o, n, s), i.position.copy(s), this.container.add(i), i.computeLineDistances();
|
|
668
|
+
}, h = new m.Vector3(), y = this.createPointerMove((p, v) => {
|
|
669
|
+
h.set(p.x, p.y, 0), this.dispatchEvent({ type: "pointerMove", point: h }), v ? (a.position.set(p.x, p.y, 0), this.container.add(a), c.style.cursor = "none") : (a.removeFromParent(), c.style.cursor = "crosshair"), n && s && (r(), s.copy(h));
|
|
670
670
|
});
|
|
671
671
|
this.addEventRecord(
|
|
672
672
|
"clear",
|
|
@@ -674,16 +674,16 @@ class yn extends R {
|
|
|
674
674
|
t.eventInput.addEventListener("codeChange", async () => {
|
|
675
675
|
if (t.eventInput.isKeyDown("mouse_0")) {
|
|
676
676
|
if (!n) {
|
|
677
|
-
n = h.clone(), s = h.clone(),
|
|
677
|
+
n = h.clone(), s = h.clone(), r(), y.setBaseLine(null, _.from(n));
|
|
678
678
|
return;
|
|
679
679
|
}
|
|
680
680
|
s = h.clone(), o.push(n.clone(), s.clone());
|
|
681
|
-
const
|
|
682
|
-
y.setBaseLine(
|
|
681
|
+
const p = new B(_.from(n), _.from(s));
|
|
682
|
+
y.setBaseLine(p, p.end), n.copy(s), r();
|
|
683
683
|
} else if (t.eventInput.isOnlyKeyDowns(this.withdrawalKeys)) {
|
|
684
684
|
if (o.length) {
|
|
685
|
-
const { point:
|
|
686
|
-
if (o.pop(), s?.copy(
|
|
685
|
+
const { point: p } = t.renderManager.adsorption();
|
|
686
|
+
if (o.pop(), s?.copy(p), n?.copy(o.pop()), r(), o.length >= 2) {
|
|
687
687
|
const v = new B(_.from(o[o.length - 2]), _.from(o[o.length - 1]));
|
|
688
688
|
y.setBaseLine(v, v.end);
|
|
689
689
|
}
|
|
@@ -691,7 +691,7 @@ class yn extends R {
|
|
|
691
691
|
} else t.eventInput.isKeyDowns(this.confirmKeys) && e(o);
|
|
692
692
|
}),
|
|
693
693
|
function() {
|
|
694
|
-
|
|
694
|
+
d.removeFromParent(), a.removeFromParent(), i.removeFromParent();
|
|
695
695
|
}
|
|
696
696
|
);
|
|
697
697
|
}
|
|
@@ -780,53 +780,59 @@ class _e extends R {
|
|
|
780
780
|
let o = null;
|
|
781
781
|
n.position.z = 1e-3, this.selectLineObject3D.position.z = n.position.z + 1e-3, n.material = new m.MeshBasicMaterial({ color: 55561 });
|
|
782
782
|
const a = () => {
|
|
783
|
-
const
|
|
784
|
-
this.container.add(
|
|
783
|
+
const d = e.pointerPosition.clone(), i = e.pointerPosition.clone(), r = new m.Mesh();
|
|
784
|
+
this.container.add(r), r.position.z = 0.05, r.material = new m.MeshBasicMaterial({
|
|
785
785
|
color: 16777215,
|
|
786
786
|
transparent: !0,
|
|
787
787
|
opacity: 0.5
|
|
788
788
|
});
|
|
789
|
-
const
|
|
790
|
-
const
|
|
791
|
-
|
|
789
|
+
const h = () => {
|
|
790
|
+
const v = Math.min(d.x, i.x), g = Math.max(d.x, i.x), E = Math.min(d.y, i.y), x = Math.max(d.y, i.y), k = [
|
|
791
|
+
v,
|
|
792
|
+
x,
|
|
793
|
+
0,
|
|
794
|
+
g,
|
|
792
795
|
E,
|
|
793
796
|
0,
|
|
794
|
-
v,
|
|
795
797
|
g,
|
|
798
|
+
x,
|
|
796
799
|
0,
|
|
797
800
|
v,
|
|
798
|
-
|
|
801
|
+
x,
|
|
799
802
|
0,
|
|
800
|
-
|
|
803
|
+
v,
|
|
801
804
|
E,
|
|
802
805
|
0,
|
|
803
|
-
u,
|
|
804
|
-
g,
|
|
805
|
-
0,
|
|
806
|
-
v,
|
|
807
806
|
g,
|
|
807
|
+
E,
|
|
808
808
|
0
|
|
809
809
|
];
|
|
810
|
-
|
|
811
|
-
}, h = () => {
|
|
812
|
-
l.copy(e.pointerPosition), c();
|
|
810
|
+
r.geometry = e.renderManager.createGeometry({ position: k }, k.length / 3);
|
|
813
811
|
}, y = () => {
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
812
|
+
i.copy(e.pointerPosition), h();
|
|
813
|
+
}, p = () => {
|
|
814
|
+
document.removeEventListener("mousemove", y), document.removeEventListener("mouseup", p), r.removeFromParent();
|
|
815
|
+
const v = Math.min(d.x, i.x), g = Math.max(d.x, i.x), E = Math.min(d.y, i.y), x = Math.max(d.y, i.y), k = new Ye(v, g, E, x), z = e.renderManager.quadtree.queryBox(k);
|
|
816
|
+
this.removeSelectLineAll(), z.forEach((Y) => this.addSelectLine(Y.line)), this.updateSelectLinesGeometry();
|
|
817
817
|
};
|
|
818
|
-
document.addEventListener("mousemove",
|
|
819
|
-
}
|
|
820
|
-
|
|
818
|
+
document.addEventListener("mousemove", y), document.addEventListener("mouseup", p);
|
|
819
|
+
}, c = this.renderer.createText("", new m.Vector3(0, 0, 0), {
|
|
820
|
+
background: "rgba(0,0,0,0.5)",
|
|
821
|
+
padding: "2px",
|
|
822
|
+
borderRadius: "2px"
|
|
823
|
+
}, this.container);
|
|
824
|
+
c.visible = !1, this.addEventRecord(
|
|
821
825
|
"clear",
|
|
822
826
|
// 注册鼠标指针位置变化事件
|
|
823
827
|
e.addEventListener("pointerPositionChange", () => {
|
|
824
|
-
const { line:
|
|
825
|
-
if (
|
|
826
|
-
const
|
|
827
|
-
n.geometry = e.renderManager.createGeometry({ position:
|
|
828
|
+
const { line: d } = e.renderManager.adsorption();
|
|
829
|
+
if (d) {
|
|
830
|
+
const i = d.expandToRectangle(0.025, "bothSides");
|
|
831
|
+
n.geometry = e.renderManager.createGeometry({ position: i.createGeometry() }, 6), this.container.add(n), s.style.cursor = "pointer", o = d;
|
|
832
|
+
const r = d.center;
|
|
833
|
+
c.element.innerText = d.length().toFixed(3) + "m", c.position.set(r.x, r.y, 0), c.visible = !0;
|
|
828
834
|
} else
|
|
829
|
-
n.removeFromParent(), s.style.cursor = "default", o = null;
|
|
835
|
+
n.removeFromParent(), s.style.cursor = "default", o = null, c.visible = !1;
|
|
830
836
|
}),
|
|
831
837
|
t.addEventListener("codeChange", () => {
|
|
832
838
|
if (t.isKeyDown("mouse_0")) {
|
|
@@ -843,7 +849,7 @@ class _e extends R {
|
|
|
843
849
|
} else t.isKeyDowns(["control", "z"]) ? e.commandManager.rollback() : t.isKeyDowns(["control", "y"]) && e.commandManager.revokeRollback();
|
|
844
850
|
}),
|
|
845
851
|
function() {
|
|
846
|
-
n.removeFromParent();
|
|
852
|
+
n.removeFromParent(), c.removeFromParent();
|
|
847
853
|
}
|
|
848
854
|
);
|
|
849
855
|
}
|
|
@@ -854,7 +860,7 @@ class _e extends R {
|
|
|
854
860
|
this.canceEventRecord("clear"), this.removeSelectLineAll(), this.updateSelectLinesGeometry();
|
|
855
861
|
}
|
|
856
862
|
}
|
|
857
|
-
class
|
|
863
|
+
class bn extends Xe {
|
|
858
864
|
list = [];
|
|
859
865
|
rollbacklist = [];
|
|
860
866
|
revokeRollbacklist = [];
|
|
@@ -882,7 +888,7 @@ class wn extends Xe {
|
|
|
882
888
|
return this.revokeRollbacklist.push(e), this;
|
|
883
889
|
}
|
|
884
890
|
}
|
|
885
|
-
class
|
|
891
|
+
class xn extends Xe {
|
|
886
892
|
commandFlowMap = /* @__PURE__ */ new Map();
|
|
887
893
|
lock = !1;
|
|
888
894
|
abortController = null;
|
|
@@ -909,7 +915,7 @@ class bn extends Xe {
|
|
|
909
915
|
*/
|
|
910
916
|
addCommandFlow(e) {
|
|
911
917
|
if (this.commandFlowMap.has(e)) throw new Error(`${e} 命令已经存在`);
|
|
912
|
-
const t = new
|
|
918
|
+
const t = new bn();
|
|
913
919
|
return this.commandFlowMap.set(e, t), t;
|
|
914
920
|
}
|
|
915
921
|
executionPromise = null;
|
|
@@ -933,8 +939,8 @@ class bn extends Xe {
|
|
|
933
939
|
try {
|
|
934
940
|
for (let o = n; o < s.list.length; o++) {
|
|
935
941
|
const a = s.list[o];
|
|
936
|
-
if (s.dispatchEvent({ type: "executing", index: o }), this.dispatchEvent({ type: "executing", name: e, index: o }), t = await new Promise((
|
|
937
|
-
this.resolve =
|
|
942
|
+
if (s.dispatchEvent({ type: "executing", index: o }), this.dispatchEvent({ type: "executing", name: e, index: o }), t = await new Promise((c) => {
|
|
943
|
+
this.resolve = c, a(c, t);
|
|
938
944
|
}), this.abortController.signal.aborted) {
|
|
939
945
|
s.dispatchEvent({ type: "executionInterrupt", index: o }), this.dispatchEvent({ type: "executionInterrupt", name: e, index: o }), this.dispatchEvent({ type: "cancel", name: e });
|
|
940
946
|
break;
|
|
@@ -987,62 +993,62 @@ class bn extends Xe {
|
|
|
987
993
|
}
|
|
988
994
|
}
|
|
989
995
|
}
|
|
990
|
-
const
|
|
996
|
+
const Cn = "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", En = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
991
997
|
__proto__: null,
|
|
992
|
-
default:
|
|
993
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
998
|
+
default: Cn
|
|
999
|
+
}, Symbol.toStringTag, { value: "Module" })), Mn = "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='M639.999191%20893.597594c-0.999994-54.699654-36.39977-101.099361-85.39946-118.399252-6.39996-2.199986-10.599933-8.299948-10.599933-14.999905V263.801573c0-6.699958%204.199973-12.799919%2010.599933-14.999905%2049.09969-17.299891%2084.399467-63.599598%2085.39946-118.399252C641.299183%2059.902862%20583.399549%200.503237%20512.899994%200.00324%20441.800444-0.496757%20384.000809%2057.00288%20384.000809%20128.002431c0%2055.699648%2035.599775%20103.099349%2085.299461%20120.699238%206.39996%202.299985%2010.699932%208.299948%2010.699932%2015.099904v496.396864c0%206.799957-4.299973%2012.799919-10.699932%2015.099904-49.699686%2017.599889-85.299461%2064.999589-85.299461%20120.699238%200%2070.999551%2057.799635%20128.499188%20128.899185%20127.999191%2070.499555-0.499997%20128.399189-59.899622%20127.099197-130.399176zM448.000404%20128.002431c0-35.299777%2028.699819-63.999596%2063.999596-63.999595s63.999596%2028.699819%2063.999596%2063.999595-28.699819%2063.999596-63.999596%2063.999596-63.999596-28.699819-63.999596-63.999596z%20m0%20767.995148c0-35.299777%2028.699819-63.999596%2063.999596-63.999596s63.999596%2028.699819%2063.999596%2063.999596-28.699819%2063.999596-63.999596%2063.999595-63.999596-28.699819-63.999596-63.999595z'%3e%3c/path%3e%3c/svg%3e", Ln = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
994
1000
|
__proto__: null,
|
|
995
|
-
default:
|
|
996
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1001
|
+
default: Mn
|
|
1002
|
+
}, Symbol.toStringTag, { value: "Module" })), kn = "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='8193'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20fill='%23555'%20width='16'%20height='16'%3e%3cpath%20d='M426.666667%20255.872c0%2031.232-8.405333%2060.544-23.04%2085.76L512%20451.498667l287.061333-287.061334a85.333333%2085.333333%200%200%201%20120.661334%200l-516.693334%20516.693334a170.666667%20170.666667%200%201%201-60.330666-60.330667l108.970666-108.970667-108.970666-108.970666A170.666667%20170.666667%200%201%201%20426.666667%20255.872z%20m-85.333334%200a85.333333%2085.333333%200%201%200-170.666666%200%2085.333333%2085.333333%200%200%200%20170.666666%200z%20m578.389334%20603.392a85.333333%2085.333333%200%200%201-120.661334%200l-226.858666-226.858667%2060.373333-60.330666%20287.146667%20287.146666zM682.666667%20469.205333h85.333333v85.333334h-85.333333v-85.333334z%20m170.666666%200h85.333334v85.333334h-85.333334v-85.333334z%20m-597.333333%200h85.333333v85.333334H256v-85.333334z%20m-170.666667%200h85.333334v85.333334H85.333333v-85.333334z%20m170.666667%20384a85.333333%2085.333333%200%201%200%200-170.666666%2085.333333%2085.333333%200%200%200%200%20170.666666z'%3e%3c/path%3e%3c/svg%3e", In = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
997
1003
|
__proto__: null,
|
|
998
|
-
default:
|
|
999
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1004
|
+
default: kn
|
|
1005
|
+
}, Symbol.toStringTag, { value: "Module" })), Pn = "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='M909.050991%20169.476903l-217.554898%200%200-31.346939c0-39.5866-32.205493-71.792093-71.793116-71.792093L408.15591%2066.337871c-39.5866%200-71.792093%2032.205493-71.792093%2071.792093l0%2031.346939L113.349581%20169.476903c-11.013845%200-19.942191%208.940626-19.942191%2019.954471s8.928347%2019.954471%2019.942191%2019.954471l84.264149%200%200%20640.687918c0%2060.479443%2049.203632%20109.683075%20109.683075%20109.683075l416.474366%200c60.479443%200%20109.683075-49.203632%20109.683075-109.683075L833.454246%20209.385844l75.595722%200c11.012821%200%2019.942191-8.940626%2019.942191-19.954471S920.063813%20169.476903%20909.050991%20169.476903zM376.2482%20138.130987c0-17.593703%2014.314007-31.907711%2031.907711-31.907711l211.547067%200c17.593703%200%2031.907711%2014.314007%2031.907711%2031.907711l0%2031.346939L376.2482%20169.477926%20376.2482%20138.130987zM793.569864%20850.074785c0%2038.486546-31.312146%2069.798692-69.798692%2069.798692L307.297828%20919.873478c-38.486546%200-69.798692-31.312146-69.798692-69.798692L237.499136%20211.042577l556.070728%200L793.569864%20850.074785zM510.662539%20861.276918c11.012821%200%2019.954471-8.92937%2019.954471-19.942191L530.61701%20294.912753c0-11.013845-8.94165-19.942191-19.954471-19.942191s-19.954471%208.928347-19.954471%2019.942191L490.708068%20841.334727C490.708068%20852.347548%20499.649717%20861.276918%20510.662539%20861.276918zM374.562814%20801.449321c11.012821%200%2019.954471-8.92937%2019.954471-19.942191L394.517285%20354.74035c0-11.013845-8.94165-19.942191-19.954471-19.942191s-19.954471%208.928347-19.954471%2019.942191l0%20426.76678C354.608344%20792.519951%20363.549993%20801.449321%20374.562814%20801.449321zM649.832182%20801.449321c11.012821%200%2019.954471-8.92937%2019.954471-19.942191L669.786653%20354.74035c0-11.013845-8.94165-19.942191-19.954471-19.942191s-19.954471%208.928347-19.954471%2019.942191l0%20426.76678C629.877711%20792.519951%20638.81936%20801.449321%20649.832182%20801.449321z'%20%3e%3c/path%3e%3c/svg%3e", Dn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1000
1006
|
__proto__: null,
|
|
1001
|
-
default:
|
|
1002
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1007
|
+
default: Pn
|
|
1008
|
+
}, Symbol.toStringTag, { value: "Module" })), An = "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='M220.451548%20913.518482V318.145854c0-27.62038%2022.505495-50.125874%2050.125875-50.125874H865.95005c27.62038%200%2050.125874%2022.505495%2050.125874%2050.125874v218.917083h59.332667V318.145854c0-60.355644-49.102897-109.458541-109.458541-109.458541h-39.896104v-99.228772C826.053946%2049.102897%20776.951049%200%20716.595405%200H121.222777C60.867133%200%2011.764236%2049.102897%2011.764236%20109.458541V705.854146c0%2060.355644%2049.102897%20109.458541%20109.458541%20109.458541h39.896104v99.228772c0%2060.355644%2049.102897%20109.458541%20109.458542%20109.458541h257.790209v-59.332667H269.554446c-26.597403-1.022977-49.102897-23.528472-49.102898-51.148851z%20m-59.332667-595.372628v436.811189h-39.896104c-27.62038%200-50.125874-22.505495-50.125874-50.125874V109.458541c0-27.62038%2022.505495-50.125874%2050.125874-50.125874H716.595405c27.62038%200%2050.125874%2022.505495%2050.125874%2050.125874v99.228772H269.554446c-59.332667%200-108.435564%2049.102897-108.435565%20109.458541z'%20%3e%3c/path%3e%3cpath%20d='M902.777223%20854.185814l98.205794-98.205794c15.344655-15.344655%2015.344655-40.919081%200-56.263736s-40.919081-15.344655-56.263736%200L846.513487%20797.922078%20747.284715%20699.716284c-15.344655-15.344655-40.919081-15.344655-56.263736%200s-15.344655%2040.919081%200%2056.263736l98.205794%2098.205794-98.205794%2098.205794c-15.344655%2015.344655-15.344655%2040.919081%200%2056.263737s40.919081%2015.344655%2056.263736%200l98.205794-98.205795%2098.205795%2098.205795c15.344655%2015.344655%2040.919081%2015.344655%2056.263736%200s15.344655-40.919081%200-56.263737l-97.182817-98.205794z'%20%3e%3c/path%3e%3c/svg%3e", Sn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1003
1009
|
__proto__: null,
|
|
1004
|
-
default:
|
|
1005
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1010
|
+
default: An
|
|
1011
|
+
}, Symbol.toStringTag, { value: "Module" })), _n = "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", Bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1006
1012
|
__proto__: null,
|
|
1007
|
-
default:
|
|
1008
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1013
|
+
default: _n
|
|
1014
|
+
}, Symbol.toStringTag, { value: "Module" })), Nn = "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", On = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1009
1015
|
__proto__: null,
|
|
1010
|
-
default:
|
|
1011
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1016
|
+
default: Nn
|
|
1017
|
+
}, Symbol.toStringTag, { value: "Module" })), Rn = "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", Fn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1012
1018
|
__proto__: null,
|
|
1013
|
-
default:
|
|
1014
|
-
}, Symbol.toStringTag, { value: "Module" })), Kn = "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",
|
|
1019
|
+
default: Rn
|
|
1020
|
+
}, Symbol.toStringTag, { value: "Module" })), Kn = "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", zn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1015
1021
|
__proto__: null,
|
|
1016
1022
|
default: Kn
|
|
1017
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1023
|
+
}, Symbol.toStringTag, { value: "Module" })), Tn = "data:image/svg+xml,%3csvg%20viewBox='0%200%201029%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20fill='%23555'%20width='16'%20height='16'%3e%3cpath%20d='M788.17984%2016l-55.424%2060.672%20116.48%20106.56H418.13184a410.816%20410.816%200%201%200%200%20821.632h547.712v-82.176H418.13184a328.64%20328.64%200%200%201%200-657.28l441.792-0.128-124.8%2098.368%2050.752%2064.512%20243.328-191.488L788.17984%2016z'%3e%3c/path%3e%3c/svg%3e", jn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1018
1024
|
__proto__: null,
|
|
1019
|
-
default:
|
|
1020
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1025
|
+
default: Tn
|
|
1026
|
+
}, Symbol.toStringTag, { value: "Module" })), Vn = "data:image/svg+xml,%3csvg%20viewBox='0%200%201048%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20fill='%23555'%20width='16'%20height='16'%3e%3cpath%20d='M310.04722%20451.334244A49.95122%2049.95122%200%200%201%20239.416195%20521.990244L27.473171%20310.04722a49.95122%2049.95122%200%200%201%200-70.631025L239.416195%2027.473171a49.95122%2049.95122%200%200%201%2070.631025%2070.631024l-126.651318%20126.626342L649.365854%20224.780488c220.709463%200%20399.609756%20178.900293%20399.609756%20399.609756s-178.900293%20399.609756-399.609756%20399.609756H124.878049a49.95122%2049.95122%200%201%201%200-99.902439h524.487805c165.513366%200%20299.707317-134.193951%20299.707317-299.707317s-134.193951-299.707317-299.707317-299.707317H183.395902l126.651318%20126.651317z'%3e%3c/path%3e%3c/svg%3e", Gn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1021
1027
|
__proto__: null,
|
|
1022
|
-
default:
|
|
1023
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1028
|
+
default: Vn
|
|
1029
|
+
}, Symbol.toStringTag, { value: "Module" })), Qn = "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='11576'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20fill='%23555'%20width='16'%20height='16'%3e%3cpath%20d='M102.4%20302.08c5.12%205.12%2015.36%2010.24%2025.6%2010.24s15.36-5.12%2025.6-10.24l174.08-174.08c5.12-5.12%2010.24-15.36%2010.24-25.6s-5.12-15.36-10.24-25.6c-20.48-5.12-40.96-5.12-51.2%2010.24l-148.48%20153.6-71.68-76.8C51.2%20158.72%2040.96%20158.72%2035.84%20158.72c-10.24%200-15.36%205.12-25.6%2010.24-5.12%205.12-10.24%2010.24-10.24%2020.48s5.12%2015.36%2010.24%2025.6L102.4%20302.08zM276.48%20409.6l-148.48%20153.6-71.68-71.68C51.2%20486.4%2040.96%20481.28%2035.84%20481.28c-10.24%200-15.36%205.12-25.6%2010.24-5.12%2010.24-10.24%2015.36-10.24%2025.6s5.12%2015.36%2010.24%2025.6L102.4%20629.76c5.12%205.12%2015.36%2010.24%2025.6%2010.24s15.36-5.12%2025.6-10.24L322.56%20460.8c5.12-5.12%2010.24-15.36%2010.24-25.6s-5.12-15.36-10.24-25.6c-10.24-10.24-30.72-10.24-46.08%200z%20m0%20327.68l-148.48%20153.6L56.32%20819.2c-5.12-5.12-15.36-10.24-25.6-10.24s-15.36%205.12-25.6%2010.24c0%205.12-5.12%2015.36-5.12%2025.6s5.12%2015.36%2010.24%2025.6L102.4%20957.44c5.12%205.12%2015.36%2010.24%2025.6%2010.24h5.12c10.24%200%2015.36-5.12%2025.6-10.24l174.08-174.08c5.12-5.12%2010.24-15.36%2010.24-25.6s-5.12-15.36-10.24-25.6c-25.6-5.12-40.96-5.12-56.32%205.12zM1024%20153.6c0%2030.72-25.6%2056.32-56.32%2056.32h-460.8c-30.72%200-61.44-25.6-61.44-56.32%200-30.72%2025.6-56.32%2056.32-56.32h455.68c35.84-5.12%2066.56%2020.48%2066.56%2056.32z%20m0%20358.4c0%2030.72-25.6%2056.32-56.32%2056.32h-460.8c-30.72%200-56.32-25.6-56.32-56.32s25.6-56.32%2056.32-56.32h455.68c35.84%200%2061.44%2025.6%2061.44%2056.32z%20m-5.12%20358.4c0%2030.72-25.6%2056.32-56.32%2056.32h-460.8c-30.72%200-56.32-25.6-56.32-56.32%200-30.72%2025.6-56.32%2056.32-56.32h455.68c35.84%200%2061.44%2025.6%2061.44%2056.32z%20m0%200'%20%3e%3c/path%3e%3c/svg%3e", Hn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1024
1030
|
__proto__: null,
|
|
1025
|
-
default:
|
|
1026
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1031
|
+
default: Qn
|
|
1032
|
+
}, Symbol.toStringTag, { value: "Module" })), Wn = "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='1757902488735'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='3957'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M520.416%20179.392c-12.384%200-22.4%204.672-22.4%2010.432l-0.032%20139.136c0%205.76%2010.016%2010.432%2022.368%2010.432%2012.352%200%2022.368-4.672%2022.368-10.432l0.064-139.136c0-5.76-10.016-10.432-22.4-10.432M520.32%20623.04c-12.352%200-22.368%204.64-22.368%2010.4l-0.032%20139.168c0%205.76%2010.016%2010.432%2022.368%2010.432%2012.352%200%2022.368-4.672%2022.368-10.432l0.064-139.168c0-5.76-10.016-10.4-22.4-10.4M800.256%20458.72l-139.168-0.064c-5.76%200-10.432%2010.016-10.432%2022.4%200%2012.352%204.672%2022.368%2010.432%2022.368l139.168%200.032c5.76%200%2010.4-10.016%2010.4-22.368%200-12.352-4.64-22.368-10.4-22.4zM352.256%20458.72l-139.168-0.064c-5.76%200-10.432%2010.016-10.432%2022.4%200%2012.352%204.672%2022.368%2010.432%2022.368l139.168%200.032c5.76%200%2010.4-10.016%2010.4-22.368%200-12.352-4.64-22.368-10.4-22.4M801.568%20748.672l-72.544-72.544%2073.792-23.2a4.416%204.416%200%200%200%200.096-8.384l-183.136-62.4a4.416%204.416%200%200%200-5.6%205.568l62.464%20183.168a4.416%204.416%200%200%200%208.352-0.064l23.36-73.6%2072.32%2072.32a14.752%2014.752%200%200%200%2020.896-20.864M510.688%20382.112c49.952%200%2092.8%2040.832%2092.8%2092.8%200%2051.968-42.848%2092.8-92.8%2092.8-49.984%200-92.8-40.832-92.8-92.8%200-51.968%2042.816-92.8%2092.8-92.8z'%20p-id='3958'%3e%3c/path%3e%3c/svg%3e", Jn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1027
1033
|
__proto__: null,
|
|
1028
|
-
default:
|
|
1029
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1034
|
+
default: Wn
|
|
1035
|
+
}, Symbol.toStringTag, { value: "Module" })), Un = "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='10587'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20fill='%23555'%20width='16'%20height='16'%3e%3cpath%20d='M64.21%20703.88h888.34M64.21%20667.88h888.34v72H64.21z'%3e%3c/path%3e%3cpath%20d='M509.58%20102.72v566.13M473.58%20102.72h72v566.14h-72z'%3e%3c/path%3e%3c/svg%3e", qn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1030
1036
|
__proto__: null,
|
|
1031
|
-
default:
|
|
1032
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1037
|
+
default: Un
|
|
1038
|
+
}, 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='1759051895215'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='1800'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M272.5888%20886.784v70.8608H203.2128V886.784h69.376z%20m416.256-256.6144l270.6944%20152.5248-270.6944%20148.1216v-114.8928H64.4608v-70.8608h624.384v-114.8928z%20m-416.256-26.88v70.912H203.2128v-70.912h69.376z%20m0-141.7216V532.48H203.2128V461.568h69.376z%20m-34.7136-398.336L385.024%20319.7952H272.5888V390.656H203.2128V319.8464H90.7776l147.0976-256.6656z'%20fill='%23444444'%20p-id='1801'%3e%3c/path%3e%3cpath%20d='M566.272%2073.3184l173.2608%20264.192V512h71.8848V337.5104l173.2608-264.192H898.048l-122.2656%20197.2224-122.88-197.2224H566.272z'%20fill='%230077FF'%20p-id='1802'%3e%3c/path%3e%3c/svg%3e", Yn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1033
1039
|
__proto__: null,
|
|
1034
|
-
default:
|
|
1035
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1040
|
+
default: Zn
|
|
1041
|
+
}, Symbol.toStringTag, { value: "Module" })), Xn = "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", $n = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1036
1042
|
__proto__: null,
|
|
1037
|
-
default:
|
|
1038
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1039
|
-
class
|
|
1043
|
+
default: Xn
|
|
1044
|
+
}, Symbol.toStringTag, { value: "Module" })), es = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAKdUlEQVR4AeydbZrUKBRGq2YjOjvpWYntStSVjK5EdzLOSsr7arBLOkkBAcLHmacwlQQInMsZUvdP/3Xhv+oEbrfbk5XYz1P1gfLAC4KwCCCwQwBBduBwCwIIwhqAwA4BBNmBwy0IFBQEuBDonwCC9B9DZlCQAIIUhEvX/RNAkP5jyAwKEkCQgnDpun8CfQrSP3dm0AkBBOkkUAzzHAIIcg53ntoJAQTpJFAM8xwCCHIOd57aCQEE8QLFKQTuCSDIPQ2+Q8AjgCAeEE4hcE8AQe5p8B0CHgEE8YBwCoF7AghyT6Psd3rvkACCdBg0hlyPAILUY82TOiSAIB0GjSHXI4Ag9VjzpA4JIEiHQXs9ZK6UIoAgpcjS7xAEEGSIMDKJUgQQpBRZ+h2CAIIMEUYmUYoAgpQiO0q/k88DQSZfAEx/nwCC7PPh7uQEEGTyBcD09wkgyD4f7k5OAEEmXwBnTr+HZyNID1FijKcRQBAP/e12e2vl2cqHUsUe+c5K7OddqfG4fmMHNEN9BPGifL1ev9ulN1Y+FizP1nfsR21Kjun/2AHNUB9BVqJsknyyy1qMdpji89nm/HmKmUZOEkE2gNmCkSTaTTZqDHP5m831/TCz+TWRbP8iyA5KWzh/2+2RJfluc/zH5shngwCCbIC5u6wFNKIkmhM7x12g174iyBqVu2v2f1gtpBFft97b3L7dTZWvKwQQZAWKf8kWkn7Aqvi3ej1HjsDIIUggKJNEu8gImS0yVoExV7XXgugqZZXAIoleuVbvd3CRjFVkkBAkEphJ0mtmi4xVZKxVHUFEIb70ltnSrkfGKj7OFwRJgGa7iBacfpPomNBD9Sb8KE9EjiCJ4EwSZbVUEnuo1gw5DqCuKsiBcTbZ1CTRLtJyZouM1cGVgyAHAS6StPiqRcbqYGzVHEFE4WAxSVrLbJGxOhhT1xxBHInjx1YyW9rNyFgdj+fPHhDkJ4bj/9guooWp3yQ6Hu8wvQd+lKeze9VyFEFeTeyMCyaJsloqZzxez0QOUchYECQjTHVlkmgXOSOzRcZKAchcECQzUHW3SFLzVYuMlcAXKAhSAKq6NElqZbbIWAl4oYIghcAu3ZbObGmXImO1wC5xQJCHVNMr2C6iBazfJDqmd7Tdkh/l22yy3EGQLBi3OzFJlNVS2a6Udgc50rhFtUKQKFxplU0S7SI5M1tkrNJCEd0KQaKRpTVYJMnxqkXGKi0ESa0QJAlbWiOT5Ghmi4xVGvrkVgiSjC654UtmK64L7T5krOKYHa6NIIcRxnVgu4gWun6T6BjTmB/lMbQy1UWQTCBjujFJlNVSCW2GHKGkMtdDkMxAQ7szSbSLhGS2yFiFQi1QD0EKQA3tcpFk71WLjFUozEL1EKQQ2NBuTZKtzNahjFXo86m3TwBB9vnUuutntrSrkLGqRX/nOQiyA6fWLdtFJIR+k+iox/KjXBQaKAjSQBA0BJNEWS0V5BCQRgqCNBIIDcMk+WRFkuiU0gABBGkgCJ0NYarhIshU4WaysQQQJJYY9acigCBThZvJxhJAkFhi1J+KAIJMFe7WJ9ve+BCkvZgwooYIIEhDwWAo7RFAkPZiwogaIoAgDQWDobRHAEHaiwkjKkEgsU8ESQRHszkIIMgccWaWiQQQJBEczeYggCBzxJlZJhJAkERwNJuDQIggc5BglhBYIZBNkNvt9kSBQStrYGWtJ13KJsjy9K92pFwuMDiXgS3DPJ/cguQZFb1AoBECCNJIIBhGmwROFqRNKIwKAo4AgjgSHCGwQgBBVqBwCQKOAII4EhwhsEIAQVagcAkCjsC4grgZcoTAAQIIcgAeTccngCDjx5gZHiCAIAfg0XR8ArkF0V9KolwuMDiXQTZzswlyvV71ByenKMy1/VjnMiSbILkGRD8QaIkAgrQUDcbSHAEEaS4kDKglAgjSUjQYS3MEEKStkDCaxgggSGMBYThtEUCQtuLBaBojgCCNBYThtEUAQdqKB6NpjACCNBaQcsOh5xQCCJJCjTbTEECQaULNRFMIIEgKNdpMQwBBpgk1E00hgCAp1GjzJ4GBzxBk4OAyteMEEOQ4Q3oYmACCNBTc2+32bOVDQ0OafigI0sgSMDGebCj/Wvlo39/akU8DBBCkgSAsQuiP7rjR/Ldcc+fTHs+eOIKcHIFFBO0c/ki+Lvf865xXJIAgFWFvPEpy6PXKv63XrA9I4mOpe44gdXn/8TRb/FtyuHrP9uWdFT4nEUCQk8CbHFr8Ko9GoB/tZLYeUSp0H0EKgd3r1uTQK5V2j71q9/ckiV657q/x/RiBoNYIEoQpXyWTQwv9PmMV2jmZrVBSGeshSEaYj7pa5IjZOfwuyWz5RAqfI0hhwF73kkOvV97l4FPtPmS2gnEdr4ggxxkG9WC7x1E53HP0w57MlqNR+IgghQGre5NDi1pFpzmKfrST2cpB8kEfaYI86JTbLwRMDr1Safd4uZjnmyTRK1ee3uhllQCCrGLJc9Hk0AJOyViFDoDMViipxHoIkgjuUbNFjhI7h/9oMls+kYznCJIRpteV5NDrlXc5+6l2KTJb2bH+6hBBfnHI+q/tHrXkcONWAoDMlqOR8dicIBnndkpXJocWq0rt5+tHO5mtzNQRJCNQk0OvVNo9MvYa1ZUk0StXVCMqbxNAkG02UXdMDi3Mkhmr0PGQ2QolFVAPQQIgPaqyyHHmzuEPkcyWTyTxHEESwXnNJIder7zLp51qNyOzlQH/TIJkwPW6C9s9WpPDDVKJAjJbjkbiEUESwamZyaFFqKLTFot+tJPZOhAZBEmEZ3LolUq7R2IP1ZpJEr1yVXvgSA9CkIRomhxacC1krEJHT2YrlJRXD0E8II9OFzl62Dn8qZDZ8okEnCNIACSviuTQ69Xd5S6+atcjsxUZKgSJAGa7R69yuFkqoUBmy9EIOCJIACRVMTm0uFR02nPRj3YyW4ERRJAAUCaHXqm0ewTU7qKKJNErVxeDPXOQCPKAvsmhhdRTxurBjH7fJrP1G8X2FwTZZnNZ5Dh359gZX4ZbZLYeQESQfUCSQ69X+7X6vavdkczWTvwQZAOO7R6jy+FmrsQDmS1HwzsiiAdEpyaHFo2KTmco+tFOZmsl0giyAsUuvbHysWD5bH3HftSm5JhixzNFfQRZCfP1ev10LVjskV+sxH6+5B6T31/sgGaojyAzRJk5JhNAkGR0NJyBAILMEGXmmEwAQZLR0XAGAggyQ5Trz3GYJyLIMKFkIiUIIEgJqvQ5DAEEGSaUTKQEAQQpQZU+hyGAIMOEcpaJ1J0ngtTlzdM6I4AgnQWM4dYlgCB1efO0zgggSGcBY7h1CSBIXd48rWUCK2NDkBUoXIKAI4AgjgRHCKwQQJAVKFyCgCOAII4ERwisEECQFShcgoAjkEsQ1x9HCAxFAEGGCieTyU0AQXITpb+hCCDIUOFkMrkJIEhuovQ3FIEOBBmKN5PpjACCdBYwhluXAILU5c3TOiOAIJ0FjOHWJYAgdXnztM4IzC1IZ8FiuPUJIEh95jyxIwII0lGwGGp9AghSnzlP7IgAgnQULIZanwCCFGJOt2MQ+AEAAP//U3PGlQAAAAZJREFUAwA3ILMm/jaVEAAAAABJRU5ErkJggg==", ts = new m.TextureLoader(), ns = ts.load(es);
|
|
1045
|
+
class ss extends Ae {
|
|
1040
1046
|
static name = "RenderManager";
|
|
1041
1047
|
container = new m.Group();
|
|
1042
1048
|
lines = [];
|
|
1043
|
-
pointVirtualGrid = new
|
|
1049
|
+
pointVirtualGrid = new Ke();
|
|
1044
1050
|
quadtree = new ze(new Ye());
|
|
1045
|
-
verticalReferenceLineFlag = new m.Mesh(new m.PlaneGeometry(0.3, 0.3), new m.MeshBasicMaterial({ map:
|
|
1051
|
+
verticalReferenceLineFlag = new m.Mesh(new m.PlaneGeometry(0.3, 0.3), new m.MeshBasicMaterial({ map: ns, color: 58111, transparent: !0 }));
|
|
1046
1052
|
onAddFromParent() {
|
|
1047
1053
|
const e = this.dxfLineModel;
|
|
1048
1054
|
this.editor.container.add(this.container), this.editor.container.add(e.dxfModelGroup), e.dxfLineModel.material = new m.LineBasicMaterial({
|
|
@@ -1062,7 +1068,7 @@ class ns extends Ae {
|
|
|
1062
1068
|
return;
|
|
1063
1069
|
} else
|
|
1064
1070
|
this.updatedMode = "dxf";
|
|
1065
|
-
this.pointVirtualGrid = new
|
|
1071
|
+
this.pointVirtualGrid = new Ke();
|
|
1066
1072
|
const e = this.dxf.box.clone().expansion(Math.max(this.dxf.box.width, this.dxf.box.height) * 2);
|
|
1067
1073
|
(e.width === 0 || e.height === 0) && e.set(-200, -200, 200, 200), this.quadtree = new ze(e), this.lines.length = 0, this.dxf.lineSegments.forEach((t) => {
|
|
1068
1074
|
t.userData.isDoor || this.addLine(t.clone());
|
|
@@ -1130,9 +1136,9 @@ class ns extends Ae {
|
|
|
1130
1136
|
this.lines.forEach((o) => {
|
|
1131
1137
|
if (o.points.forEach((a) => {
|
|
1132
1138
|
o.userData.isDoor ? n.push(a.x, a.y, 0) : t.push(a.x, a.y, 0);
|
|
1133
|
-
}), o.userData.isWindow && o.userData.drawWindow && o.userData.drawWindow.forEach(({ width: a, p:
|
|
1134
|
-
const
|
|
1135
|
-
s.push(
|
|
1139
|
+
}), o.userData.isWindow && o.userData.drawWindow && o.userData.drawWindow.forEach(({ width: a, p: c }) => {
|
|
1140
|
+
const d = _.from(c), i = o.direction(), r = d.clone().add(i.clone().multiplyScalar(a * 0.5)), h = d.clone().add(i.clone().multiplyScalar(-a * 0.5));
|
|
1141
|
+
s.push(r.x, r.y, 1e-3), s.push(h.x, h.y, 1e-3);
|
|
1136
1142
|
}), o.userData.isVerticalReferenceLine) {
|
|
1137
1143
|
const a = o.center;
|
|
1138
1144
|
this.verticalReferenceLineFlag.position.set(a.x, a.y, 0), this.container.add(this.verticalReferenceLineFlag);
|
|
@@ -1156,21 +1162,21 @@ class ns extends Ae {
|
|
|
1156
1162
|
* @returns
|
|
1157
1163
|
*/
|
|
1158
1164
|
adsorption(e = 0.04, t = this.pointVirtualGrid, n = this.quadtree) {
|
|
1159
|
-
const s = this.parent?.findComponentByName("Editor"), o = _.from(s.pointerPosition), a = t.queryCircle(o, e).sort((
|
|
1165
|
+
const s = this.parent?.findComponentByName("Editor"), o = _.from(s.pointerPosition), a = t.queryCircle(o, e).sort((d, i) => d.point.distance(o) - i.point.distance(o));
|
|
1160
1166
|
if (a.length) return {
|
|
1161
1167
|
point: new m.Vector3(a[0].point.x, a[0].point.y, 0),
|
|
1162
1168
|
find: !0,
|
|
1163
1169
|
mode: "point",
|
|
1164
1170
|
line: a[0].userData
|
|
1165
1171
|
};
|
|
1166
|
-
let
|
|
1167
|
-
if (
|
|
1168
|
-
let
|
|
1169
|
-
return
|
|
1170
|
-
point: new m.Vector3(
|
|
1172
|
+
let c = n.queryCircle(o, e);
|
|
1173
|
+
if (c.length) {
|
|
1174
|
+
let d = c.map((i) => i.line.projectPoint(o));
|
|
1175
|
+
return d.sort((i, r) => i && r ? i.distance(o) - r.distance(o) : 0), c = c.filter((i, r) => !!d[r]), d = d.filter((i, r) => !!d[r]), {
|
|
1176
|
+
point: new m.Vector3(d[0].x, d[0].y, 0),
|
|
1171
1177
|
find: !0,
|
|
1172
1178
|
mode: "line",
|
|
1173
|
-
line:
|
|
1179
|
+
line: c[0].line
|
|
1174
1180
|
};
|
|
1175
1181
|
}
|
|
1176
1182
|
return {
|
|
@@ -1247,7 +1253,7 @@ class ns extends Ae {
|
|
|
1247
1253
|
return this.parent?.findComponentByName("DxfLineModel");
|
|
1248
1254
|
}
|
|
1249
1255
|
}
|
|
1250
|
-
class
|
|
1256
|
+
class os extends R {
|
|
1251
1257
|
static name = "DrawDoorLine";
|
|
1252
1258
|
container = new m.Group();
|
|
1253
1259
|
interruptKeys = ["escape"];
|
|
@@ -1278,20 +1284,20 @@ class ss extends R {
|
|
|
1278
1284
|
gapSize: 0.1,
|
|
1279
1285
|
linewidth: 0.1
|
|
1280
1286
|
}), this.container.add(o);
|
|
1281
|
-
let
|
|
1287
|
+
let c = null;
|
|
1282
1288
|
this.addEventRecord(
|
|
1283
1289
|
"clear",
|
|
1284
1290
|
t.addEventListener("pointerPositionChange", () => {
|
|
1285
|
-
const { point:
|
|
1286
|
-
n && o.setPoint(n,
|
|
1291
|
+
const { point: d, find: i } = t.renderManager.adsorption();
|
|
1292
|
+
n && o.setPoint(n, d), this.dispatchEvent({ type: "pointerMove", point: d }), i ? (s.position.set(d.x, d.y, 0), this.container.add(s), this.domElement.style.cursor = "none", c = d.clone()) : (c = null, s.removeFromParent(), this.domElement.style.cursor = "no-drop");
|
|
1287
1293
|
}),
|
|
1288
1294
|
t.eventInput.addEventListener("codeChange", async () => {
|
|
1289
|
-
if (t.eventInput.isKeyDown("mouse_0") &&
|
|
1295
|
+
if (t.eventInput.isKeyDown("mouse_0") && c) {
|
|
1290
1296
|
if (!n) {
|
|
1291
|
-
n =
|
|
1297
|
+
n = c.clone();
|
|
1292
1298
|
return;
|
|
1293
1299
|
}
|
|
1294
|
-
e([n.clone(),
|
|
1300
|
+
e([n.clone(), c.clone()]);
|
|
1295
1301
|
}
|
|
1296
1302
|
}),
|
|
1297
1303
|
function() {
|
|
@@ -1307,22 +1313,22 @@ class ss extends R {
|
|
|
1307
1313
|
end(e, t) {
|
|
1308
1314
|
const n = [];
|
|
1309
1315
|
for (let s = 0; s < t.length; s += 2) {
|
|
1310
|
-
const o = _.from(t[s]), a = _.from(t[s + 1]),
|
|
1316
|
+
const o = _.from(t[s]), a = _.from(t[s + 1]), c = this.renderManager.quadtree.queryCircle(o, 1e-3)[0].line, d = this.renderManager.quadtree.queryCircle(a, 1e-3)[0].line;
|
|
1311
1317
|
let i = null;
|
|
1312
|
-
|
|
1313
|
-
oldLine:
|
|
1318
|
+
c === d && (i = {
|
|
1319
|
+
oldLine: c,
|
|
1314
1320
|
newLine1: new B(
|
|
1315
|
-
|
|
1316
|
-
|
|
1321
|
+
c.start,
|
|
1322
|
+
c.start.distance(o) < c.start.distance(a) ? o.clone() : a.clone()
|
|
1317
1323
|
),
|
|
1318
1324
|
newLine2: new B(
|
|
1319
|
-
|
|
1320
|
-
|
|
1325
|
+
c.end,
|
|
1326
|
+
c.end.distance(o) < c.end.distance(a) ? o.clone() : a.clone()
|
|
1321
1327
|
)
|
|
1322
1328
|
});
|
|
1323
|
-
const
|
|
1324
|
-
|
|
1325
|
-
line:
|
|
1329
|
+
const r = new B(o, a);
|
|
1330
|
+
r.userData.isDoor = !0, r.userData.doorDirectConnection = !0, n.push({
|
|
1331
|
+
line: r,
|
|
1326
1332
|
option: i
|
|
1327
1333
|
});
|
|
1328
1334
|
}
|
|
@@ -1351,7 +1357,7 @@ class ss extends R {
|
|
|
1351
1357
|
return this.completed(e), e;
|
|
1352
1358
|
}
|
|
1353
1359
|
}
|
|
1354
|
-
class
|
|
1360
|
+
class as extends R {
|
|
1355
1361
|
static name = "DrawWindow";
|
|
1356
1362
|
container = new m.Group();
|
|
1357
1363
|
interruptKeys = ["escape"];
|
|
@@ -1368,8 +1374,8 @@ class os extends R {
|
|
|
1368
1374
|
selectPointStart(e) {
|
|
1369
1375
|
let t = null, n = new m.Mesh(new m.SphereGeometry(0.04), new m.MeshBasicMaterial({ color: 16711935 })), s = null;
|
|
1370
1376
|
this.addEventRecord("selectPointStart").add(this.editor.addEventListener("pointerPositionChange", () => {
|
|
1371
|
-
const { point: o, line: a, find:
|
|
1372
|
-
this.dispatchEvent({ type: "pointerMove", point: o }),
|
|
1377
|
+
const { point: o, line: a, find: c } = this.editor.renderManager.adsorption();
|
|
1378
|
+
this.dispatchEvent({ type: "pointerMove", point: o }), c ? (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());
|
|
1373
1379
|
})).add(this.eventInput.addEventListener("codeChange", () => {
|
|
1374
1380
|
this.eventInput.isKeyDown("mouse_0") && t && (this.canceEventRecord("selectPointStart"), e({ point: t, line: s }));
|
|
1375
1381
|
})), this.addEventRecord("clear").add(() => n.removeFromParent());
|
|
@@ -1380,8 +1386,8 @@ class os extends R {
|
|
|
1380
1386
|
selectPointEnd(e, { point: t, line: n }) {
|
|
1381
1387
|
let s = null, o = new m.Mesh(new m.SphereGeometry(0.04), new m.MeshBasicMaterial({ color: 16711935 }));
|
|
1382
1388
|
this.addEventRecord("clear").add(() => o.removeFromParent()).add(this.editor.addEventListener("pointerPositionChange", () => {
|
|
1383
|
-
const { point: a, find:
|
|
1384
|
-
this.dispatchEvent({ type: "pointerMove", point: a }),
|
|
1389
|
+
const { point: a, find: c, line: d } = this.editor.renderManager.adsorption();
|
|
1390
|
+
this.dispatchEvent({ type: "pointerMove", point: a }), c && d === 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());
|
|
1385
1391
|
})).add(this.eventInput.addEventListener("codeChange", () => {
|
|
1386
1392
|
this.eventInput.isKeyDown("mouse_0") && s && e({ line: n, start: t, end: s });
|
|
1387
1393
|
}));
|
|
@@ -1392,12 +1398,12 @@ class os extends R {
|
|
|
1392
1398
|
* @param points
|
|
1393
1399
|
*/
|
|
1394
1400
|
end(e, { start: t, end: n, line: s }) {
|
|
1395
|
-
const o = new B(_.from(t), _.from(n)), a = o.center,
|
|
1401
|
+
const o = new B(_.from(t), _.from(n)), a = o.center, c = o.length(), d = {
|
|
1396
1402
|
p: new m.Vector3(a.x, a.y, 0),
|
|
1397
|
-
width:
|
|
1398
|
-
full: Math.abs(
|
|
1403
|
+
width: c,
|
|
1404
|
+
full: Math.abs(c - s.length()) < 0.01
|
|
1399
1405
|
};
|
|
1400
|
-
e({ line: s, doorDataItem:
|
|
1406
|
+
e({ line: s, doorDataItem: d });
|
|
1401
1407
|
}
|
|
1402
1408
|
/** 执行完成
|
|
1403
1409
|
*/
|
|
@@ -1423,7 +1429,7 @@ class os extends R {
|
|
|
1423
1429
|
return this.completed(e), e;
|
|
1424
1430
|
}
|
|
1425
1431
|
}
|
|
1426
|
-
class
|
|
1432
|
+
class $ extends R {
|
|
1427
1433
|
static name = "VerticalCorrection";
|
|
1428
1434
|
container = new m.Group();
|
|
1429
1435
|
shortcutKeys = ["control", "c"];
|
|
@@ -1434,11 +1440,11 @@ class X extends R {
|
|
|
1434
1440
|
axisAlignment = !1;
|
|
1435
1441
|
onAddFromParent(e) {
|
|
1436
1442
|
super.onAddFromParent(e), this.editor.container.add(this.container), this.container.position.z = 1e-3;
|
|
1437
|
-
const t = this.commandManager.addCommandFlow(
|
|
1443
|
+
const t = this.commandManager.addCommandFlow($.commandName).add(this.createInterrupt()).add(this.constraint.bind(this)).add(this.verticalCorrection.bind(this)).addRollback(this.rollback.bind(this)).addRevokeRollback(this.revokeRollback.bind(this));
|
|
1438
1444
|
t.addEventListener("finally", this.createFinally()), t.addEventListener("completed", (n) => this.completed(n.data)), t.addEventListener("started", () => {
|
|
1439
1445
|
!this.eventInput.isOnlyKeyDowns(this.shortcutKeys) && !this.eventInput.isOnlyKeyDowns(this.shortcutKeys2) && (this.recursion = !1);
|
|
1440
1446
|
}), this.eventInput.addEventListener("codeChange", async () => {
|
|
1441
|
-
this.eventInput.isOnlyKeyDowns(this.shortcutKeys) ? (this.recursion = !1, this.axisAlignment = !1, this.commandManager.start(
|
|
1447
|
+
this.eventInput.isOnlyKeyDowns(this.shortcutKeys) ? (this.recursion = !1, this.axisAlignment = !1, this.commandManager.start($.commandName, [...this.default.selectLines])) : this.eventInput.isOnlyKeyDowns(this.shortcutKeys2) ? (this.recursion = !0, this.axisAlignment = !1, this.commandManager.start($.commandName, [...this.default.selectLines])) : this.eventInput.isOnlyKeyDowns(this.shortcutKeys3) && (this.axisAlignment = !0, this.commandManager.start($.commandName, [...this.default.selectLines]));
|
|
1442
1448
|
}), this.eventInput.addCancelDefaultBehavior(() => this.eventInput.isOnlyKeyDowns(this.shortcutKeys) || this.eventInput.isOnlyKeyDowns(this.shortcutKeys2));
|
|
1443
1449
|
}
|
|
1444
1450
|
/**
|
|
@@ -1466,43 +1472,43 @@ class X extends R {
|
|
|
1466
1472
|
setLinePoint(e, t, n, s = "all", o = [], a = Dt()) {
|
|
1467
1473
|
if (e.userData.setLinePointUUid === a) return [];
|
|
1468
1474
|
e.userData.setLinePointUUid = a;
|
|
1469
|
-
let
|
|
1470
|
-
(s === "start" || s === "all") && (
|
|
1475
|
+
let c = [], d = [];
|
|
1476
|
+
(s === "start" || s === "all") && (c = this.renderManager.pointVirtualGrid.queryPoint(e.start).filter((y) => y.userData !== e)), (s === "end" || s === "all") && (d = this.renderManager.pointVirtualGrid.queryPoint(e.end).filter((y) => y.userData !== e));
|
|
1471
1477
|
const i = e.clone();
|
|
1472
|
-
let
|
|
1473
|
-
t && (e.start.equal(t) || (
|
|
1478
|
+
let r = "";
|
|
1479
|
+
t && (e.start.equal(t) || (r = "start"), o.push({
|
|
1474
1480
|
point: e.start,
|
|
1475
1481
|
oldPoint: e.start.clone(),
|
|
1476
1482
|
newPoint: t,
|
|
1477
1483
|
line: e
|
|
1478
|
-
}), e.start.copy(t)), n && (e.end.equal(n) || (
|
|
1484
|
+
}), e.start.copy(t)), n && (e.end.equal(n) || (r = r === "start" ? "all" : "end"), o.push({
|
|
1479
1485
|
point: e.end,
|
|
1480
1486
|
oldPoint: e.end.clone(),
|
|
1481
1487
|
newPoint: n,
|
|
1482
1488
|
line: e
|
|
1483
1489
|
}), e.end.copy(n));
|
|
1484
|
-
const h = (y,
|
|
1490
|
+
const h = (y, p, v) => {
|
|
1485
1491
|
y.forEach((g) => {
|
|
1486
|
-
const { point: E, userData: x } = g,
|
|
1492
|
+
const { point: E, userData: x } = g, k = x.start === E ? "start" : "end";
|
|
1487
1493
|
if (x.directionEqual(i))
|
|
1488
|
-
if (
|
|
1494
|
+
if (k === "start") {
|
|
1489
1495
|
const z = e.projectPoint(x.end, !1);
|
|
1490
|
-
if (z) return this.setLinePoint(x,
|
|
1496
|
+
if (z) return this.setLinePoint(x, p, z, "end", o, a);
|
|
1491
1497
|
} else {
|
|
1492
1498
|
const z = e.projectPoint(x.start, !1);
|
|
1493
|
-
if (z) return this.setLinePoint(x, z,
|
|
1499
|
+
if (z) return this.setLinePoint(x, z, p, "start", o, a);
|
|
1494
1500
|
}
|
|
1495
|
-
(
|
|
1501
|
+
(r === "all" || v === r) && this.setLinePoint(
|
|
1496
1502
|
x,
|
|
1497
|
-
x.start === E ?
|
|
1498
|
-
x.end === E ?
|
|
1503
|
+
x.start === E ? p : x.start,
|
|
1504
|
+
x.end === E ? p : x.end,
|
|
1499
1505
|
x.start === E ? "end" : "start",
|
|
1500
1506
|
o,
|
|
1501
1507
|
a
|
|
1502
1508
|
);
|
|
1503
1509
|
});
|
|
1504
1510
|
};
|
|
1505
|
-
return h(
|
|
1511
|
+
return h(c, e.start, "start"), h(d, e.end, "end"), [...c, ...d];
|
|
1506
1512
|
}
|
|
1507
1513
|
/** 修正2
|
|
1508
1514
|
* 第一步:确定需要修复的线段
|
|
@@ -1516,17 +1522,17 @@ class X extends R {
|
|
|
1516
1522
|
*/
|
|
1517
1523
|
correction(e, t = [], n = /* @__PURE__ */ new Set()) {
|
|
1518
1524
|
n.add(e);
|
|
1519
|
-
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,
|
|
1525
|
+
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, c] = s.reduce((i, r) => {
|
|
1520
1526
|
const [h, y] = i;
|
|
1521
|
-
return
|
|
1527
|
+
return r.sameEndpoint(e) ? h.push(r) : y.push(r), i;
|
|
1522
1528
|
}, [[], []]);
|
|
1523
1529
|
a.forEach((i) => {
|
|
1524
|
-
const
|
|
1530
|
+
const r = i.direction(), h = o.angleBetween(r, "angle");
|
|
1525
1531
|
if (Math.abs(90 - h) > 45) return !1;
|
|
1526
|
-
const
|
|
1532
|
+
const p = e.sameEndpointAsStart(i) ? e.start : e.end, v = i.sameEndpointAsStart(e) ? i.end : i.start, g = new B(
|
|
1527
1533
|
v.clone().add(o.clone().multiplyScalar(1)),
|
|
1528
1534
|
v.clone().add(o.clone().multiplyScalar(-1))
|
|
1529
|
-
), E = g.projectPoint(
|
|
1535
|
+
), E = g.projectPoint(p, !1);
|
|
1530
1536
|
if (E) {
|
|
1531
1537
|
const x = [];
|
|
1532
1538
|
this.setLinePoint(
|
|
@@ -1539,46 +1545,46 @@ class X extends R {
|
|
|
1539
1545
|
}
|
|
1540
1546
|
return n.add(i), !1;
|
|
1541
1547
|
}), o.copy(e.direction());
|
|
1542
|
-
const
|
|
1543
|
-
const y = e.projectPoint(
|
|
1548
|
+
const d = (i, r, h) => {
|
|
1549
|
+
const y = e.projectPoint(r);
|
|
1544
1550
|
if (y) i.copy(y);
|
|
1545
1551
|
else {
|
|
1546
|
-
const
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
), v =
|
|
1552
|
+
const p = new B(
|
|
1553
|
+
r.clone().add(o.clone().multiplyScalar(1)),
|
|
1554
|
+
r.clone().add(o.clone().multiplyScalar(-1))
|
|
1555
|
+
), v = p.projectPoint(i, !1);
|
|
1550
1556
|
if (v) {
|
|
1551
1557
|
const g = [];
|
|
1552
1558
|
this.setLinePoint(
|
|
1553
1559
|
h,
|
|
1554
|
-
h.start ===
|
|
1555
|
-
h.end ===
|
|
1556
|
-
h.start ===
|
|
1560
|
+
h.start === r ? v : h.start,
|
|
1561
|
+
h.end === r ? v : h.end,
|
|
1562
|
+
h.start === r ? "start" : "end",
|
|
1557
1563
|
g
|
|
1558
1564
|
), t.push(g);
|
|
1559
1565
|
}
|
|
1560
1566
|
}
|
|
1561
1567
|
};
|
|
1562
|
-
return
|
|
1568
|
+
return c.forEach((i) => {
|
|
1563
1569
|
if (e.containsPoint(i.start))
|
|
1564
|
-
|
|
1570
|
+
d(i.start, i.end, i);
|
|
1565
1571
|
else if (e.containsPoint(i.end))
|
|
1566
|
-
|
|
1572
|
+
d(i.end, i.start, i);
|
|
1567
1573
|
else {
|
|
1568
|
-
const
|
|
1569
|
-
if (
|
|
1574
|
+
const r = e.getIntersection(i);
|
|
1575
|
+
if (r) {
|
|
1570
1576
|
const h = new B(
|
|
1571
1577
|
i.start.clone().add(o.clone().multiplyScalar(1)),
|
|
1572
1578
|
i.start.clone().add(o.clone().multiplyScalar(-1))
|
|
1573
|
-
), y = h.projectPoint(
|
|
1579
|
+
), y = h.projectPoint(r, !1);
|
|
1574
1580
|
if (y) {
|
|
1575
1581
|
const g = [];
|
|
1576
1582
|
this.setLinePoint(i, y, i.end, "start", g), t.push(g);
|
|
1577
1583
|
}
|
|
1578
|
-
const
|
|
1584
|
+
const p = new B(
|
|
1579
1585
|
i.end.clone().add(o.clone().multiplyScalar(1)),
|
|
1580
1586
|
i.end.clone().add(o.clone().multiplyScalar(-1))
|
|
1581
|
-
), v =
|
|
1587
|
+
), v = p.projectPoint(r, !1);
|
|
1582
1588
|
if (v) {
|
|
1583
1589
|
const g = [];
|
|
1584
1590
|
this.setLinePoint(i, i.start, v, "end", g), t.push(g);
|
|
@@ -1593,7 +1599,7 @@ class X extends R {
|
|
|
1593
1599
|
*/
|
|
1594
1600
|
axisAlignmentCorrection(e) {
|
|
1595
1601
|
const t = [...this.renderManager.lines];
|
|
1596
|
-
return { newLines:
|
|
1602
|
+
return { newLines: At.axisAlignmentCorrection(t, e), oldLines: t };
|
|
1597
1603
|
}
|
|
1598
1604
|
/** 开始
|
|
1599
1605
|
* @param next
|
|
@@ -1621,8 +1627,8 @@ class X extends R {
|
|
|
1621
1627
|
for (let t = e.length - 1; t >= 0; t--) {
|
|
1622
1628
|
const n = e[t];
|
|
1623
1629
|
for (let s = n.length - 1; s >= 0; s--) {
|
|
1624
|
-
const o = n[s], { line: a, oldPoint:
|
|
1625
|
-
|
|
1630
|
+
const o = n[s], { line: a, oldPoint: c, point: d } = o;
|
|
1631
|
+
d.copy(c), this.renderManager.removeLine(a), this.renderManager.addLine(a);
|
|
1626
1632
|
}
|
|
1627
1633
|
}
|
|
1628
1634
|
else
|
|
@@ -1637,15 +1643,15 @@ class X extends R {
|
|
|
1637
1643
|
return this.completed(e), e;
|
|
1638
1644
|
}
|
|
1639
1645
|
}
|
|
1640
|
-
class
|
|
1646
|
+
class ee extends R {
|
|
1641
1647
|
static name = "MergeLine";
|
|
1642
1648
|
shortcutKeys = ["control", "g"];
|
|
1643
1649
|
static commandName = "merge-line";
|
|
1644
1650
|
onAddFromParent(e) {
|
|
1645
1651
|
super.onAddFromParent(e);
|
|
1646
|
-
const t = e.findComponentByType(_e), n = this.commandManager.addCommandFlow(
|
|
1647
|
-
n.addEventListener("finally", this.createFinally()), n.addEventListener("completed", (s) => this.completed(s.data)), this.eventInput.addKeyCombination(
|
|
1648
|
-
t?.selectLines.length === 2 && this.eventInput.isKeyCombination(
|
|
1652
|
+
const t = e.findComponentByType(_e), n = this.commandManager.addCommandFlow(ee.commandName).add(this.createInterrupt()).add(this.constraint.bind(this)).add(this.mergeLine.bind(this)).addRollback(this.rollback.bind(this)).addRevokeRollback(this.revokeRollback.bind(this));
|
|
1653
|
+
n.addEventListener("finally", this.createFinally()), n.addEventListener("completed", (s) => this.completed(s.data)), this.eventInput.addKeyCombination(ee.commandName, this.shortcutKeys), this.eventInput.addEventListener("codeChange", async () => {
|
|
1654
|
+
t?.selectLines.length === 2 && this.eventInput.isKeyCombination(ee.commandName) && await this.commandManager.start(ee.commandName, [...this.default.selectLines]);
|
|
1649
1655
|
}), this.eventInput.addCancelDefaultBehavior(() => this.eventInput.isOnlyKeyDowns(this.shortcutKeys));
|
|
1650
1656
|
}
|
|
1651
1657
|
/**
|
|
@@ -1662,10 +1668,10 @@ class $ extends R {
|
|
|
1662
1668
|
const n = t[0], s = t[1];
|
|
1663
1669
|
for (let o = 0; o < n.points.length; o++) {
|
|
1664
1670
|
const a = n.points[o];
|
|
1665
|
-
for (let
|
|
1666
|
-
const
|
|
1667
|
-
if (a.equal(
|
|
1668
|
-
const i = n.points[(o + 1) % 2],
|
|
1671
|
+
for (let c = 0; c < s.points.length; c++) {
|
|
1672
|
+
const d = s.points[c];
|
|
1673
|
+
if (a.equal(d)) {
|
|
1674
|
+
const i = n.points[(o + 1) % 2], r = s.points[(c + 1) % 2], h = new B(i, r);
|
|
1669
1675
|
return e({ line1: n, line2: s, newLine: h }), L({ message: "已合并", type: "success" });
|
|
1670
1676
|
}
|
|
1671
1677
|
}
|
|
@@ -1692,13 +1698,13 @@ class $ extends R {
|
|
|
1692
1698
|
return this.completed(e), e;
|
|
1693
1699
|
}
|
|
1694
1700
|
}
|
|
1695
|
-
class
|
|
1701
|
+
class te extends R {
|
|
1696
1702
|
static name = "DeleteSelectLine";
|
|
1697
1703
|
shortcutKeys = ["Delete"];
|
|
1698
1704
|
static commandName = "deleteSelectLine";
|
|
1699
1705
|
onAddFromParent(e) {
|
|
1700
|
-
super.onAddFromParent(e), this.commandManager.addCommandFlow(
|
|
1701
|
-
this.eventInput.isKeyCombination(
|
|
1706
|
+
super.onAddFromParent(e), this.commandManager.addCommandFlow(te.commandName).add(this.createInterrupt()).add(this.constraint.bind(this)).add(this.delete.bind(this)).addRollback(this.rollback.bind(this)).addRevokeRollback(this.revokeRollback.bind(this)).addEventListener("finally", this.createFinally()), this.eventInput.addKeyCombination(te.commandName, this.shortcutKeys), this.eventInput.addEventListener("codeChange", async () => {
|
|
1707
|
+
this.eventInput.isKeyCombination(te.commandName) && await this.commandManager.start(te.commandName, [...this.default.selectLines]);
|
|
1702
1708
|
}), this.eventInput.addCancelDefaultBehavior(() => this.eventInput.isOnlyKeyDowns(this.shortcutKeys));
|
|
1703
1709
|
}
|
|
1704
1710
|
/**
|
|
@@ -1727,15 +1733,15 @@ class ee extends R {
|
|
|
1727
1733
|
return e.forEach((t) => this.renderManager.removeLine(t)), e;
|
|
1728
1734
|
}
|
|
1729
1735
|
}
|
|
1730
|
-
class
|
|
1736
|
+
class ne extends R {
|
|
1731
1737
|
static name = "ConnectionLine";
|
|
1732
1738
|
shortcutKeys = ["Shift", "L"];
|
|
1733
1739
|
static commandName = "connectionLine";
|
|
1734
1740
|
onAddFromParent(e) {
|
|
1735
1741
|
super.onAddFromParent(e);
|
|
1736
|
-
const t = this.commandManager.addCommandFlow(
|
|
1737
|
-
t.addEventListener("finally", this.createFinally()), t.addEventListener("completed", (n) => this.completed(n.data)), this.eventInput.addKeyCombination(
|
|
1738
|
-
this.eventInput.isKeyCombination(
|
|
1742
|
+
const t = this.commandManager.addCommandFlow(ne.commandName).add(this.createInterrupt()).add(this.constraint.bind(this)).add(this.connection.bind(this)).addRollback(this.rollback.bind(this)).addRevokeRollback(this.revokeRollback.bind(this));
|
|
1743
|
+
t.addEventListener("finally", this.createFinally()), t.addEventListener("completed", (n) => this.completed(n.data)), this.eventInput.addKeyCombination(ne.commandName, this.shortcutKeys), this.eventInput.addEventListener("codeChange", async () => {
|
|
1744
|
+
this.eventInput.isKeyCombination(ne.commandName) && await this.commandManager.start(ne.commandName, [...this.default.selectLines]);
|
|
1739
1745
|
}), this.eventInput.addCancelDefaultBehavior(() => this.eventInput.isOnlyKeyDowns(this.shortcutKeys));
|
|
1740
1746
|
}
|
|
1741
1747
|
/**
|
|
@@ -1750,9 +1756,9 @@ class te extends R {
|
|
|
1750
1756
|
connection(e, t) {
|
|
1751
1757
|
let n, s, o = 1 / 0;
|
|
1752
1758
|
for (let a = 0; a < 2; a++)
|
|
1753
|
-
for (let
|
|
1754
|
-
const
|
|
1755
|
-
|
|
1759
|
+
for (let c = 0; c < 2; c++) {
|
|
1760
|
+
const d = t[0].points[a], i = t[1].points[c], r = d.distance(i);
|
|
1761
|
+
r < o && (n = d, s = i, o = r);
|
|
1756
1762
|
}
|
|
1757
1763
|
if (n && s) {
|
|
1758
1764
|
const a = new B(n.clone(), s.clone());
|
|
@@ -1780,15 +1786,15 @@ class te extends R {
|
|
|
1780
1786
|
return this.completed(e), e;
|
|
1781
1787
|
}
|
|
1782
1788
|
}
|
|
1783
|
-
class
|
|
1789
|
+
class se extends R {
|
|
1784
1790
|
static name = "IntersectionConnectionLine";
|
|
1785
1791
|
shortcutKeys = ["control", "Shift", "L"];
|
|
1786
1792
|
static commandName = "intersectionConnectionLine";
|
|
1787
1793
|
onAddFromParent(e) {
|
|
1788
1794
|
super.onAddFromParent(e);
|
|
1789
|
-
const t = this.commandManager.addCommandFlow(
|
|
1790
|
-
t.addEventListener("finally", this.createFinally()), t.addEventListener("completed", (n) => this.completed(n.data)), this.eventInput.addKeyCombination(
|
|
1791
|
-
this.eventInput.isKeyCombination(
|
|
1795
|
+
const t = this.commandManager.addCommandFlow(se.commandName).add(this.createInterrupt()).add(this.constraint.bind(this)).add(this.connection.bind(this)).addRollback(this.rollback.bind(this)).addRevokeRollback(this.revokeRollback.bind(this));
|
|
1796
|
+
t.addEventListener("finally", this.createFinally()), t.addEventListener("completed", (n) => this.completed(n.data)), this.eventInput.addKeyCombination(se.commandName, this.shortcutKeys), this.eventInput.addEventListener("codeChange", async () => {
|
|
1797
|
+
this.eventInput.isKeyCombination(se.commandName) && await this.commandManager.start(se.commandName, [...this.default.selectLines]);
|
|
1792
1798
|
}), this.eventInput.addCancelDefaultBehavior(() => this.eventInput.isOnlyKeyDowns(this.shortcutKeys));
|
|
1793
1799
|
}
|
|
1794
1800
|
/**
|
|
@@ -1803,10 +1809,10 @@ class ne extends R {
|
|
|
1803
1809
|
connection(e, t) {
|
|
1804
1810
|
const n = t[0], s = t[1], o = t[0].getIntersection(t[1]);
|
|
1805
1811
|
if (!o) return;
|
|
1806
|
-
const a = n.points.map((
|
|
1812
|
+
const a = n.points.map((r) => r.clone()), c = s.points.map((r) => r.clone());
|
|
1807
1813
|
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);
|
|
1808
|
-
const
|
|
1809
|
-
e({ line1: n, line2: s, oldLine1: a, oldLine2:
|
|
1814
|
+
const d = n.points.map((r) => r.clone()), i = s.points.map((r) => r.clone());
|
|
1815
|
+
e({ line1: n, line2: s, oldLine1: a, oldLine2: c, newLine1: d, newLine2: i }), L({ message: "连接成功", type: "success" });
|
|
1810
1816
|
}
|
|
1811
1817
|
/** 执行完成
|
|
1812
1818
|
* @param next
|
|
@@ -1830,15 +1836,15 @@ class ne extends R {
|
|
|
1830
1836
|
return this.completed(e), e;
|
|
1831
1837
|
}
|
|
1832
1838
|
}
|
|
1833
|
-
class
|
|
1839
|
+
class oe extends R {
|
|
1834
1840
|
static name = "DeleteSelectWindow";
|
|
1835
1841
|
shortcutKeys = ["Q", "Delete"];
|
|
1836
1842
|
static commandName = "deleteSelectWindow";
|
|
1837
1843
|
onAddFromParent(e) {
|
|
1838
1844
|
super.onAddFromParent(e);
|
|
1839
|
-
const t = this.commandManager.addCommandFlow(
|
|
1840
|
-
t.addEventListener("finally", this.createFinally()), t.addEventListener("completed", (n) => this.completed(n.data)), this.eventInput.addKeyCombination(
|
|
1841
|
-
this.eventInput.isKeyCombination(
|
|
1845
|
+
const t = this.commandManager.addCommandFlow(oe.commandName).add(this.createInterrupt()).add(this.constraint.bind(this)).add(this.end.bind(this)).addRollback(this.rollback.bind(this)).addRevokeRollback(this.revokeRollback.bind(this));
|
|
1846
|
+
t.addEventListener("finally", this.createFinally()), t.addEventListener("completed", (n) => this.completed(n.data)), this.eventInput.addKeyCombination(oe.commandName, this.shortcutKeys), this.eventInput.addEventListener("codeChange", async () => {
|
|
1847
|
+
this.eventInput.isKeyCombination(oe.commandName) && await this.commandManager.start(oe.commandName, [...this.default.selectLines]);
|
|
1842
1848
|
}), this.eventInput.addCancelDefaultBehavior(() => this.eventInput.isOnlyKeyDowns(this.shortcutKeys));
|
|
1843
1849
|
}
|
|
1844
1850
|
/**
|
|
@@ -1887,16 +1893,16 @@ class se extends R {
|
|
|
1887
1893
|
return this.completed(e), e;
|
|
1888
1894
|
}
|
|
1889
1895
|
}
|
|
1890
|
-
class
|
|
1896
|
+
class ae extends R {
|
|
1891
1897
|
static name = "SelectAll";
|
|
1892
1898
|
container = new m.Group();
|
|
1893
1899
|
shortcutKeys = ["control", "a"];
|
|
1894
1900
|
static commandName = "selectAll";
|
|
1895
1901
|
onAddFromParent(e) {
|
|
1896
1902
|
super.onAddFromParent(e), this.editor.container.add(this.container), this.container.position.z = 1e-3;
|
|
1897
|
-
const t = this.commandManager.addCommandFlow(
|
|
1898
|
-
t.writeOperationList = !1, t.addEventListener("finally", this.createFinally()), t.addEventListener("completed", (n) => this.completed(n.data)), this.eventInput.addKeyCombination(
|
|
1899
|
-
this.eventInput.isKeyCombination(
|
|
1903
|
+
const t = this.commandManager.addCommandFlow(ae.commandName).add(this.createInterrupt()).add(this.selectAll.bind(this)).addRollback(this.rollback.bind(this)).addRevokeRollback(this.revokeRollback.bind(this));
|
|
1904
|
+
t.writeOperationList = !1, t.addEventListener("finally", this.createFinally()), t.addEventListener("completed", (n) => this.completed(n.data)), this.eventInput.addKeyCombination(ae.commandName, this.shortcutKeys), this.eventInput.addEventListener("codeChange", async () => {
|
|
1905
|
+
this.eventInput.isKeyCombination(ae.commandName) && await this.commandManager.start(ae.commandName);
|
|
1900
1906
|
}), this.eventInput.addCancelDefaultBehavior(() => this.eventInput.isOnlyKeyDowns(this.shortcutKeys));
|
|
1901
1907
|
}
|
|
1902
1908
|
/** 开始
|
|
@@ -1924,15 +1930,15 @@ class oe extends R {
|
|
|
1924
1930
|
return this.completed(e), e;
|
|
1925
1931
|
}
|
|
1926
1932
|
}
|
|
1927
|
-
class
|
|
1933
|
+
class ie extends R {
|
|
1928
1934
|
static name = "ViewAngle";
|
|
1929
1935
|
shortcutKeys = ["r"];
|
|
1930
1936
|
static commandName = "viewAngle";
|
|
1931
1937
|
onAddFromParent(e) {
|
|
1932
1938
|
super.onAddFromParent(e);
|
|
1933
|
-
const t = this.commandManager.addCommandFlow(
|
|
1934
|
-
t.writeOperationList = !1, t.addEventListener("finally", this.createFinally()), this.eventInput.addKeyCombination(
|
|
1935
|
-
this.eventInput.isKeyCombination(
|
|
1939
|
+
const t = this.commandManager.addCommandFlow(ie.commandName).add(this.createInterrupt()).add(this.constraint.bind(this)).add(this.viewAngle.bind(this));
|
|
1940
|
+
t.writeOperationList = !1, t.addEventListener("finally", this.createFinally()), this.eventInput.addKeyCombination(ie.commandName, this.shortcutKeys), this.eventInput.addEventListener("codeChange", async () => {
|
|
1941
|
+
this.eventInput.isKeyCombination(ie.commandName) && await this.commandManager.start(ie.commandName, [...this.default.selectLines]);
|
|
1936
1942
|
}), this.eventInput.addCancelDefaultBehavior(() => this.eventInput.isOnlyKeyDowns(this.shortcutKeys));
|
|
1937
1943
|
}
|
|
1938
1944
|
/**
|
|
@@ -1948,30 +1954,30 @@ class ae extends R {
|
|
|
1948
1954
|
*/
|
|
1949
1955
|
viewAngle(e, t) {
|
|
1950
1956
|
const [n, s] = t, o = Math.min(0.5, n.length(), s.length());
|
|
1951
|
-
let a,
|
|
1952
|
-
n.sameEndpointAsStart(s) ? (a = n.start,
|
|
1957
|
+
let a, c, d, i = 0, r = 0;
|
|
1958
|
+
n.sameEndpointAsStart(s) ? (a = n.start, c = n.end) : (a = n.end, c = n.start), s.sameEndpointAsStart(n) ? d = s.end : d = s.start;
|
|
1953
1959
|
function h(A, M) {
|
|
1954
|
-
const b = M.x - A.x,
|
|
1955
|
-
let W = Math.atan2(
|
|
1960
|
+
const b = M.x - A.x, F = M.y - A.y;
|
|
1961
|
+
let W = Math.atan2(F, b) * (180 / Math.PI);
|
|
1956
1962
|
return W < 0 && (W += 360), W;
|
|
1957
1963
|
}
|
|
1958
|
-
const y = h(a,
|
|
1964
|
+
const y = h(a, c), p = h(a, d), v = Math.min(y, p), g = Math.max(y, p), E = [];
|
|
1959
1965
|
function x(A, M) {
|
|
1960
1966
|
for (let b = A; b <= M; b++) {
|
|
1961
|
-
const
|
|
1962
|
-
E.push(
|
|
1967
|
+
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;
|
|
1968
|
+
E.push(F, W, 0, he, Ce, 0);
|
|
1963
1969
|
}
|
|
1964
1970
|
}
|
|
1965
|
-
g - v > 180 ? (x(0, v), x(g, 360), i = 360 - (g - v),
|
|
1966
|
-
const
|
|
1967
|
-
|
|
1971
|
+
g - v > 180 ? (x(0, v), x(g, 360), i = 360 - (g - v), r = (g + i / 2) % 360) : (x(v, g), i = g - v, r = v + i / 2);
|
|
1972
|
+
const k = new m.LineSegments();
|
|
1973
|
+
k.geometry = this.renderManager.createGeometry({
|
|
1968
1974
|
position: E
|
|
1969
|
-
}, E.length / 3),
|
|
1970
|
-
const z = Math.cos(
|
|
1975
|
+
}, E.length / 3), k.material = new m.LineBasicMaterial({ color: 16711935 }), this.renderManager.container.add(k);
|
|
1976
|
+
const z = Math.cos(r * Math.PI / 180) * o + a.x, Y = Math.sin(r * Math.PI / 180) * o + a.y, Z = this.renderer.createText(Number(i.toFixed(2)), new m.Vector3(z, Y, 0), {
|
|
1971
1977
|
textShadow: "0px 0px 2px #000"
|
|
1972
1978
|
}, this.renderManager.container);
|
|
1973
1979
|
let G = 0;
|
|
1974
|
-
this.addEventRecord("clear").add(() =>
|
|
1980
|
+
this.addEventRecord("clear").add(() => k.removeFromParent()).add(() => Z.removeFromParent()).add(this.eventInput.addEventListener("codeChange", () => {
|
|
1975
1981
|
this.eventInput.isOnlyKeyDown("enter") ? e() : this.eventInput.isOnlyKeyDown("mouse_0") && (G++, G === 1 ? setTimeout(() => G = 0, 500) : G === 2 && (e(), G = 0));
|
|
1976
1982
|
}));
|
|
1977
1983
|
}
|
|
@@ -1993,8 +1999,8 @@ class rt extends R {
|
|
|
1993
1999
|
selectPointStart(e) {
|
|
1994
2000
|
let t = null, n = new m.Mesh(new m.SphereGeometry(0.04), new m.MeshBasicMaterial({ color: 16711935 })), s = null;
|
|
1995
2001
|
this.addEventRecord("selectPointStart").add(this.editor.addEventListener("pointerPositionChange", () => {
|
|
1996
|
-
const { point: o, line: a, find:
|
|
1997
|
-
this.dispatchEvent({ type: "pointerMove", point: o }),
|
|
2002
|
+
const { point: o, line: a, find: c } = this.editor.renderManager.adsorption();
|
|
2003
|
+
this.dispatchEvent({ type: "pointerMove", point: o }), c ? (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());
|
|
1998
2004
|
})).add(this.eventInput.addEventListener("codeChange", () => {
|
|
1999
2005
|
this.eventInput.isKeyDown("mouse_0") && t && (this.canceEventRecord("selectPointStart"), e({ point: t, line: s }));
|
|
2000
2006
|
})), this.addEventRecord("clear").add(() => n.removeFromParent());
|
|
@@ -2005,8 +2011,8 @@ class rt extends R {
|
|
|
2005
2011
|
selectPointEnd(e, { point: t, line: n }) {
|
|
2006
2012
|
let s = null, o = new m.Mesh(new m.SphereGeometry(0.04), new m.MeshBasicMaterial({ color: 16711935 }));
|
|
2007
2013
|
this.addEventRecord("clear").add(() => o.removeFromParent()).add(this.editor.addEventListener("pointerPositionChange", () => {
|
|
2008
|
-
const { point: a, find:
|
|
2009
|
-
this.dispatchEvent({ type: "pointerMove", point: a }),
|
|
2014
|
+
const { point: a, find: c, line: d } = this.editor.renderManager.adsorption();
|
|
2015
|
+
this.dispatchEvent({ type: "pointerMove", point: a }), c && d === 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());
|
|
2010
2016
|
})).add(this.eventInput.addEventListener("codeChange", () => {
|
|
2011
2017
|
this.eventInput.isKeyDown("mouse_0") && s && e({ line: n, start: t, end: s });
|
|
2012
2018
|
}));
|
|
@@ -2049,15 +2055,15 @@ class rt extends R {
|
|
|
2049
2055
|
return this.completed(e), e;
|
|
2050
2056
|
}
|
|
2051
2057
|
}
|
|
2052
|
-
class
|
|
2058
|
+
class re extends R {
|
|
2053
2059
|
static name = "VerticalReferenceLine";
|
|
2054
2060
|
shortcutKeys = ["v"];
|
|
2055
2061
|
static commandName = "VerticalReferenceLine";
|
|
2056
2062
|
onAddFromParent(e) {
|
|
2057
2063
|
super.onAddFromParent(e);
|
|
2058
|
-
const t = this.commandManager.addCommandFlow(
|
|
2059
|
-
t.writeOperationList = !1, t.addEventListener("finally", this.createFinally()), this.eventInput.addKeyCombination(
|
|
2060
|
-
this.eventInput.isKeyCombination(
|
|
2064
|
+
const t = this.commandManager.addCommandFlow(re.commandName).add(this.createInterrupt()).add(this.constraint.bind(this)).add(this.verticalReferenceLine.bind(this));
|
|
2065
|
+
t.writeOperationList = !1, t.addEventListener("finally", this.createFinally()), this.eventInput.addKeyCombination(re.commandName, this.shortcutKeys), this.eventInput.addEventListener("codeChange", async () => {
|
|
2066
|
+
this.eventInput.isKeyCombination(re.commandName) && await this.commandManager.start(re.commandName, [...this.default.selectLines]);
|
|
2061
2067
|
}), this.eventInput.addCancelDefaultBehavior(() => this.eventInput.isOnlyKeyDowns(this.shortcutKeys));
|
|
2062
2068
|
}
|
|
2063
2069
|
/**
|
|
@@ -2077,31 +2083,31 @@ class ie extends R {
|
|
|
2077
2083
|
}), t[0].userData.isVerticalReferenceLine = !0, e(), this.renderManager.draw();
|
|
2078
2084
|
}
|
|
2079
2085
|
}
|
|
2080
|
-
const
|
|
2086
|
+
const is = {
|
|
2081
2087
|
key: 0,
|
|
2082
2088
|
class: "mt-[5px] text-[#ccc] text-[11px] absolute left-[10px] bottom-[10px] rounded-[8px] min-w-[150px] bg-black/15 p-[10px]"
|
|
2083
|
-
},
|
|
2089
|
+
}, rs = { class: "text-start max-w-[150px]" }, ds = { class: "inline-block ml-[10px] text-[var(--color-primary)]" }, ls = {
|
|
2084
2090
|
key: 0,
|
|
2085
2091
|
class: "p-[5px] max-w-[200px]"
|
|
2086
|
-
},
|
|
2092
|
+
}, cs = { class: "text-[14px] flex flex-col" }, ms = ["onClick"], hs = { class: "flex flex-row items-center" }, us = { class: "flex justify-center items-center size-[20px] bg-[#f0f0f0] rounded-[2px] mr-[10px]" }, ps = ["src"], gs = { class: "text-wrap" }, vs = {
|
|
2087
2093
|
key: 1,
|
|
2088
2094
|
class: "text-[#999]"
|
|
2089
|
-
},
|
|
2095
|
+
}, fs = {
|
|
2090
2096
|
style: { "--el-color-primary": "var(--primary-color)" },
|
|
2091
2097
|
class: "flex flex-row items-center justify-between gap-[10px] mt-[10px] text-[10px]"
|
|
2092
|
-
},
|
|
2098
|
+
}, ys = {
|
|
2093
2099
|
key: 0,
|
|
2094
2100
|
class: "flex flex-row items-center flex-wrap justify-between gap-[10px] mt-[10px] text-[10px]"
|
|
2095
|
-
},
|
|
2101
|
+
}, ws = { class: "flex-wrap border-t-1 border-t-[#eee] mt-[5px] pt-[5px] flex items-center gap-[10px]" }, bs = ["onClick", "title"], xs = ["src"], Cs = /* @__PURE__ */ me({
|
|
2096
2102
|
__name: "EditorTool",
|
|
2097
2103
|
props: {
|
|
2098
2104
|
dxfSystem: {},
|
|
2099
2105
|
permission: {}
|
|
2100
2106
|
},
|
|
2101
|
-
setup(
|
|
2102
|
-
function e(C,
|
|
2107
|
+
setup(l) {
|
|
2108
|
+
function e(C, u, w = h.value.getBoundingClientRect(), U = y.value.getBoundingClientRect()) {
|
|
2103
2109
|
const ue = w.width - U.width, pe = 0, Me = w.height - U.height;
|
|
2104
|
-
C = Math.max(0, Math.min(C, ue)),
|
|
2110
|
+
C = Math.max(0, Math.min(C, ue)), u = Math.max(pe, Math.min(u, Me)), A.value = { left: C, top: u };
|
|
2105
2111
|
}
|
|
2106
2112
|
function t(C) {
|
|
2107
2113
|
v.value === C.command || v.value !== "default" || x.commandManager.start(C.command);
|
|
@@ -2111,8 +2117,8 @@ const as = {
|
|
|
2111
2117
|
localStorage.setItem("lines", JSON.stringify(C));
|
|
2112
2118
|
try {
|
|
2113
2119
|
g.Dxf.set(C), g.Dxf.lineOffset();
|
|
2114
|
-
} catch (
|
|
2115
|
-
console.log(
|
|
2120
|
+
} catch (u) {
|
|
2121
|
+
console.log(u);
|
|
2116
2122
|
}
|
|
2117
2123
|
}
|
|
2118
2124
|
}
|
|
@@ -2120,7 +2126,7 @@ const as = {
|
|
|
2120
2126
|
const C = await Pt.json();
|
|
2121
2127
|
Array.isArray(C) && (localStorage.removeItem("orbitControls"), n(C));
|
|
2122
2128
|
}
|
|
2123
|
-
function o({ offsetX: C, offsetY:
|
|
2129
|
+
function o({ offsetX: C, offsetY: u }) {
|
|
2124
2130
|
E.mouseMoveEventProxylock = !0;
|
|
2125
2131
|
const w = document.body.style.cursor;
|
|
2126
2132
|
document.body.style.cursor = "move";
|
|
@@ -2128,7 +2134,7 @@ const as = {
|
|
|
2128
2134
|
const pe = h.value.getBoundingClientRect(), Me = y.value.getBoundingClientRect();
|
|
2129
2135
|
e(
|
|
2130
2136
|
ue.pageX - pe.left - C,
|
|
2131
|
-
ue.pageY - pe.top -
|
|
2137
|
+
ue.pageY - pe.top - u,
|
|
2132
2138
|
pe,
|
|
2133
2139
|
Me
|
|
2134
2140
|
), ue.stopPropagation(), document.body.style.cursor = "move";
|
|
@@ -2137,7 +2143,7 @@ const as = {
|
|
|
2137
2143
|
};
|
|
2138
2144
|
document.body.addEventListener("mousemove", U), document.addEventListener("mouseup", Ee);
|
|
2139
2145
|
}
|
|
2140
|
-
const a =
|
|
2146
|
+
const a = l, c = S(!0), d = S(!0), i = S(!0), r = S(!1), h = S(), y = S(), p = S(!0), v = S(""), g = Rt(a.dxfSystem), E = g.findComponentByType(It), x = g.findComponentByType(dt), k = g.findComponentByType(_e), z = g.findComponentByType(St), Y = g.findComponentByType(_t), Z = S(0), G = S(0), A = S({ left: 10, top: 100 }), M = /* @__PURE__ */ Object.assign({ "./assets/images/angle.svg": En, "./assets/images/connection.svg": Ln, "./assets/images/cutLine.svg": In, "./assets/images/deleteSelectLine.svg": Dn, "./assets/images/deleteSelectWindow.svg": Sn, "./assets/images/door.svg": Bn, "./assets/images/intersectionConnection.svg": On, "./assets/images/line.svg": Fn, "./assets/images/mergeLine.svg": zn, "./assets/images/revokeRollback.svg": jn, "./assets/images/rollback.svg": Gn, "./assets/images/selectAll.svg": Hn, "./assets/images/selectPoint.svg": Jn, "./assets/images/verticalCorrection.svg": qn, "./assets/images/verticalLine.svg": Yn, "./assets/images/window.svg": $n }), b = S(!1), F = S(0), W = S(!1), he = new ResizeObserver(() => e(A.value.left, A.value.top)), Ce = [
|
|
2141
2147
|
{ name: "开启绘制线段命令", shortcut: "Ctrl + L" },
|
|
2142
2148
|
{ name: "开启绘制门线命令", shortcut: "Ctrl + M" },
|
|
2143
2149
|
{ name: "开启绘制窗户线命令", shortcut: "Ctrl + Q" },
|
|
@@ -2204,7 +2210,7 @@ const as = {
|
|
|
2204
2210
|
command: "",
|
|
2205
2211
|
name: "操作回滚",
|
|
2206
2212
|
src: M["./assets/images/rollback.svg"].default,
|
|
2207
|
-
show:
|
|
2213
|
+
show: D(() => Z.value !== 0),
|
|
2208
2214
|
shortcut: "Ctrl + Z",
|
|
2209
2215
|
action() {
|
|
2210
2216
|
x.commandManager.rollback();
|
|
@@ -2214,7 +2220,7 @@ const as = {
|
|
|
2214
2220
|
command: "",
|
|
2215
2221
|
name: "撤销操作回滚",
|
|
2216
2222
|
src: M["./assets/images/revokeRollback.svg"].default,
|
|
2217
|
-
show:
|
|
2223
|
+
show: D(() => G.value !== 0),
|
|
2218
2224
|
shortcut: "Ctrl + Y",
|
|
2219
2225
|
class: "rotateY-[180deg]",
|
|
2220
2226
|
action() {
|
|
@@ -2222,30 +2228,30 @@ const as = {
|
|
|
2222
2228
|
}
|
|
2223
2229
|
},
|
|
2224
2230
|
{
|
|
2225
|
-
command:
|
|
2231
|
+
command: ee.commandName,
|
|
2226
2232
|
name: "合并",
|
|
2227
2233
|
src: M["./assets/images/mergeLine.svg"].default,
|
|
2228
|
-
show:
|
|
2234
|
+
show: D(() => F.value === 2),
|
|
2229
2235
|
shortcut: "Ctrl + G"
|
|
2230
2236
|
},
|
|
2231
2237
|
{
|
|
2232
|
-
command:
|
|
2238
|
+
command: ne.commandName,
|
|
2233
2239
|
name: "两点连接",
|
|
2234
|
-
show:
|
|
2240
|
+
show: D(() => F.value === 2),
|
|
2235
2241
|
src: M["./assets/images/connection.svg"].default,
|
|
2236
2242
|
shortcut: "Shift + L"
|
|
2237
2243
|
},
|
|
2238
2244
|
{
|
|
2239
|
-
command:
|
|
2245
|
+
command: se.commandName,
|
|
2240
2246
|
name: "延长线交点连接",
|
|
2241
|
-
show:
|
|
2247
|
+
show: D(() => F.value === 2),
|
|
2242
2248
|
src: M["./assets/images/intersectionConnection.svg"].default,
|
|
2243
2249
|
shortcut: "Ctrl + Shift + L"
|
|
2244
2250
|
},
|
|
2245
2251
|
{
|
|
2246
|
-
command:
|
|
2252
|
+
command: $.commandName,
|
|
2247
2253
|
name: "线段垂直纠正",
|
|
2248
|
-
show:
|
|
2254
|
+
show: D(() => F.value === 1),
|
|
2249
2255
|
src: M["./assets/images/verticalCorrection.svg"].default,
|
|
2250
2256
|
shortcut: `
|
|
2251
2257
|
Ctrl + C 垂直纠正
|
|
@@ -2254,58 +2260,58 @@ const as = {
|
|
|
2254
2260
|
`
|
|
2255
2261
|
},
|
|
2256
2262
|
{
|
|
2257
|
-
command:
|
|
2263
|
+
command: re.commandName,
|
|
2258
2264
|
name: "y轴垂直基准线",
|
|
2259
|
-
show:
|
|
2260
|
-
() =>
|
|
2265
|
+
show: D(
|
|
2266
|
+
() => F.value === 1 && !k.selectLines[0].userData.isDoor
|
|
2261
2267
|
),
|
|
2262
2268
|
src: M["./assets/images/verticalLine.svg"].default,
|
|
2263
2269
|
shortcut: "V"
|
|
2264
2270
|
},
|
|
2265
2271
|
{
|
|
2266
|
-
command:
|
|
2272
|
+
command: ie.commandName,
|
|
2267
2273
|
name: "角度显示",
|
|
2268
|
-
show:
|
|
2274
|
+
show: D(() => F.value === 2 && k.selectLines[0].sameEndpoint(k.selectLines[1])),
|
|
2269
2275
|
src: M["./assets/images/angle.svg"].default,
|
|
2270
2276
|
shortcut: "r"
|
|
2271
2277
|
},
|
|
2272
2278
|
{
|
|
2273
|
-
command:
|
|
2279
|
+
command: ae.commandName,
|
|
2274
2280
|
name: "全选",
|
|
2275
|
-
show:
|
|
2281
|
+
show: D(() => F.value !== x.renderManager.lines.length),
|
|
2276
2282
|
src: M["./assets/images/selectAll.svg"].default,
|
|
2277
2283
|
shortcut: "Ctrl + A"
|
|
2278
2284
|
},
|
|
2279
2285
|
{
|
|
2280
|
-
command:
|
|
2286
|
+
command: oe.commandName,
|
|
2281
2287
|
name: "清除窗户",
|
|
2282
|
-
show:
|
|
2288
|
+
show: D(() => W.value),
|
|
2283
2289
|
src: M["./assets/images/deleteSelectWindow.svg"].default,
|
|
2284
2290
|
shortcut: "Q + Delete"
|
|
2285
2291
|
},
|
|
2286
2292
|
{
|
|
2287
|
-
command:
|
|
2293
|
+
command: te.commandName,
|
|
2288
2294
|
name: "删除",
|
|
2289
|
-
show:
|
|
2295
|
+
show: D(() => F.value > 0),
|
|
2290
2296
|
src: M["./assets/images/deleteSelectLine.svg"].default,
|
|
2291
2297
|
shortcut: "Delete"
|
|
2292
2298
|
}
|
|
2293
2299
|
];
|
|
2294
|
-
J(A, () => localStorage.setItem("editorToolPosition", JSON.stringify(A.value))), J(b, () => localStorage.setItem("showShortcutKey", b.value + "")), J(
|
|
2295
|
-
localStorage.setItem("toolBarExpand",
|
|
2296
|
-
}), J(
|
|
2300
|
+
J(A, () => localStorage.setItem("editorToolPosition", JSON.stringify(A.value))), J(b, () => localStorage.setItem("showShortcutKey", b.value + "")), J(p, () => {
|
|
2301
|
+
localStorage.setItem("toolBarExpand", p.value + ""), p.value && we(() => e(A.value.left, A.value.top));
|
|
2302
|
+
}), J(c, () => g.Variable.set("originalLineVisible", c.value)), J(d, () => g.Variable.set("dxfVisible", d.value)), J(i, () => g.Variable.set("whiteModelVisible", i.value)), g.Variable.addEventListener("isLook", (C) => r.value = C.value), g.Variable.addEventListener("originalLineVisible", (C) => c.value = C.value), g.Variable.addEventListener("dxfVisible", (C) => d.value = C.value), g.Variable.addEventListener("whiteModelVisible", (C) => i.value = C.value);
|
|
2297
2303
|
const mt = x.commandManager.addEventListener("started", (C) => {
|
|
2298
2304
|
v.value = C.name;
|
|
2299
2305
|
});
|
|
2300
|
-
return localStorage.getItem("showShortcutKey") && (b.value = localStorage.getItem("showShortcutKey") === "true"), localStorage.getItem("toolBarExpand") && (
|
|
2306
|
+
return localStorage.getItem("showShortcutKey") && (b.value = localStorage.getItem("showShortcutKey") === "true"), localStorage.getItem("toolBarExpand") && (p.value = localStorage.getItem("toolBarExpand") === "true"), tt(() => {
|
|
2301
2307
|
y.value.style.display = "none", setTimeout(() => {
|
|
2302
2308
|
if (y.value.style.display = "block", localStorage.getItem("editorToolPosition")) {
|
|
2303
|
-
const { left: C, top:
|
|
2304
|
-
e(C,
|
|
2309
|
+
const { left: C, top: u } = JSON.parse(localStorage.getItem("editorToolPosition") ?? "{}");
|
|
2310
|
+
e(C, u), we(() => he.observe(h.value));
|
|
2305
2311
|
} else
|
|
2306
2312
|
we(() => he.observe(h.value));
|
|
2307
|
-
}, 100),
|
|
2308
|
-
|
|
2313
|
+
}, 100), k.addEventListener("selectLineChange", () => {
|
|
2314
|
+
F.value = k.selectLines.length, W.value = k.selectLines.some((C) => C.userData.isWindow);
|
|
2309
2315
|
}), ["rollback", "completed", "revokeRollback"].forEach((C) => {
|
|
2310
2316
|
x.commandManager.addEventListener(C, () => {
|
|
2311
2317
|
setTimeout(() => {
|
|
@@ -2313,63 +2319,63 @@ const as = {
|
|
|
2313
2319
|
});
|
|
2314
2320
|
});
|
|
2315
2321
|
});
|
|
2316
|
-
}),
|
|
2322
|
+
}), Ft(() => {
|
|
2317
2323
|
E.mouseMoveEventProxylock = !1, mt(), he.disconnect();
|
|
2318
|
-
}), (C,
|
|
2324
|
+
}), (C, u) => (P(), O("div", {
|
|
2319
2325
|
ref_key: "elRef",
|
|
2320
2326
|
ref: h,
|
|
2321
2327
|
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]"
|
|
2322
2328
|
}, [
|
|
2323
|
-
|
|
2329
|
+
K(xe, null, {
|
|
2324
2330
|
default: j(() => [
|
|
2325
|
-
b.value ? (
|
|
2326
|
-
(
|
|
2331
|
+
b.value ? (P(), O("div", is, [
|
|
2332
|
+
(P(), O(ve, null, ke(Ce, (w) => I("div", {
|
|
2327
2333
|
class: "p-[4px_0px] flex justify-between text-right border-b-1 border-b-[rgba(255,255,255,0.1)] last-of-type:border-b-0",
|
|
2328
2334
|
key: w.name
|
|
2329
2335
|
}, [
|
|
2330
|
-
|
|
2331
|
-
|
|
2336
|
+
I("p", rs, le(w.name), 1),
|
|
2337
|
+
I("span", ds, le(w.shortcut), 1)
|
|
2332
2338
|
])), 64))
|
|
2333
2339
|
])) : q("", !0)
|
|
2334
2340
|
]),
|
|
2335
2341
|
_: 1
|
|
2336
2342
|
}),
|
|
2337
|
-
|
|
2343
|
+
I("div", {
|
|
2338
2344
|
ref_key: "toolBarRef",
|
|
2339
2345
|
ref: y,
|
|
2340
2346
|
style: Se({ left: A.value.left + "px", top: A.value.top + "px" }),
|
|
2341
|
-
class: V(["overflow-hidden pointer-events-auto w-fit max-w-[260px] transition-[border-radius] text-[#333] absolute z-[11] bg-white select-none", { "rounded-[8px] ":
|
|
2342
|
-
onMousedown:
|
|
2347
|
+
class: V(["overflow-hidden pointer-events-auto w-fit max-w-[260px] transition-[border-radius] text-[#333] absolute z-[11] bg-white select-none", { "rounded-[8px] ": p.value }]),
|
|
2348
|
+
onMousedown: u[10] || (u[10] = (w) => w.stopPropagation())
|
|
2343
2349
|
}, [
|
|
2344
|
-
|
|
2350
|
+
I("div", {
|
|
2345
2351
|
onMousedown: o,
|
|
2346
|
-
class: V([{ "border-b-[#eee] border-b-1":
|
|
2352
|
+
class: V([{ "border-b-[#eee] border-b-1": p.value }, "flex flex-row justify-between header text-[14px] font-bold p-[10px 0px]"])
|
|
2347
2353
|
}, [
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
onMousedown:
|
|
2351
|
-
onClick:
|
|
2354
|
+
u[12] || (u[12] = Kt('<div class="flex flex-row" data-v-d038f1d5><div class="p-[2px_5px] flex items-center pointer-events-none" data-v-d038f1d5><svg fill="#aaa" width="20" height="20" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" data-v-d038f1d5><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-d038f1d5></path></svg></div><h5 class="flex text-nowrap text-[12px] items-center pointer-events-none" data-v-d038f1d5>绘制工具</h5></div>', 1)),
|
|
2355
|
+
I("div", {
|
|
2356
|
+
onMousedown: u[0] || (u[0] = (w) => w.stopPropagation()),
|
|
2357
|
+
onClick: u[1] || (u[1] = (w) => p.value = !p.value),
|
|
2352
2358
|
class: "cursor-pointer flex items-center p-[0px_5px]"
|
|
2353
2359
|
}, [
|
|
2354
|
-
(
|
|
2360
|
+
(P(), O("svg", {
|
|
2355
2361
|
fill: "#666",
|
|
2356
|
-
class: V([{ "rotate-90":
|
|
2362
|
+
class: V([{ "rotate-90": p.value }, "transition-all"]),
|
|
2357
2363
|
viewBox: "0 0 1024 1024",
|
|
2358
2364
|
version: "1.1",
|
|
2359
2365
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2360
2366
|
width: "12",
|
|
2361
2367
|
height: "12"
|
|
2362
|
-
},
|
|
2363
|
-
|
|
2368
|
+
}, u[11] || (u[11] = [
|
|
2369
|
+
I("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)
|
|
2364
2370
|
]), 2))
|
|
2365
2371
|
], 32)
|
|
2366
2372
|
], 34),
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
(
|
|
2373
|
+
p.value ? (P(), O("div", ls, [
|
|
2374
|
+
I("ul", cs, [
|
|
2375
|
+
(P(), O(ve, null, ke(lt, (w) => (P(), O(ve, {
|
|
2370
2376
|
key: w.command
|
|
2371
2377
|
}, [
|
|
2372
|
-
w.show ? (
|
|
2378
|
+
w.show ? (P(), O("li", {
|
|
2373
2379
|
key: 0,
|
|
2374
2380
|
onClick: (U) => t(w),
|
|
2375
2381
|
class: V([{
|
|
@@ -2377,24 +2383,24 @@ const as = {
|
|
|
2377
2383
|
"!cursor-no-drop": v.value !== w.command && v.value !== "default"
|
|
2378
2384
|
}, "gap-[10px] text-[12px] hover:bg-[#ddd] transition-all rounded-[6px] p-[5px] flex flex-row items-center justify-between cursor-pointer"])
|
|
2379
2385
|
}, [
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2386
|
+
I("div", hs, [
|
|
2387
|
+
I("div", us, [
|
|
2388
|
+
I("img", {
|
|
2383
2389
|
class: "size-[14px]",
|
|
2384
2390
|
src: w.src,
|
|
2385
2391
|
alt: "",
|
|
2386
2392
|
srcset: ""
|
|
2387
|
-
}, null, 8,
|
|
2393
|
+
}, null, 8, ps)
|
|
2388
2394
|
]),
|
|
2389
|
-
|
|
2395
|
+
I("span", gs, le(w.name), 1)
|
|
2390
2396
|
]),
|
|
2391
|
-
v.value === w.command ? (
|
|
2397
|
+
v.value === w.command ? (P(), O("div", {
|
|
2392
2398
|
key: 0,
|
|
2393
2399
|
title: "取消命令(Esc)",
|
|
2394
2400
|
class: "active:scale-[0.7] transition-all",
|
|
2395
|
-
onClick:
|
|
2396
|
-
},
|
|
2397
|
-
|
|
2401
|
+
onClick: u[2] || (u[2] = (U) => (f(x).cancelCommand(), U.stopPropagation()))
|
|
2402
|
+
}, u[13] || (u[13] = [
|
|
2403
|
+
I("svg", {
|
|
2398
2404
|
fill: "#fff",
|
|
2399
2405
|
width: "16",
|
|
2400
2406
|
height: "16",
|
|
@@ -2402,108 +2408,108 @@ const as = {
|
|
|
2402
2408
|
version: "1.1",
|
|
2403
2409
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2404
2410
|
}, [
|
|
2405
|
-
|
|
2406
|
-
|
|
2411
|
+
I("path", { d: "M511.104 0C228.821333 0 0 228.821333 0 511.104c0 282.282667 228.821333 511.104 511.104 511.104 282.282667 0 511.104-228.842667 511.104-511.104C1022.208 228.821333 793.386667 0 511.104 0zM511.104 898.496c-213.973333 0-387.434667-173.44-387.434667-387.413333 0-213.952 173.44-387.413333 387.434667-387.413333 213.952 0 387.392 173.44 387.392 387.413333C898.496 725.056 725.056 898.496 511.104 898.496z" }),
|
|
2412
|
+
I("path", { d: "M236.437333 463.914667l549.333333 0 0 96.874667-549.333333 0 0-96.874667Z" })
|
|
2407
2413
|
], -1)
|
|
2408
|
-
]))) : w.shortcut ? (
|
|
2409
|
-
], 10,
|
|
2414
|
+
]))) : w.shortcut ? (P(), O("div", vs, le(w.shortcut), 1)) : q("", !0)
|
|
2415
|
+
], 10, ms)) : q("", !0)
|
|
2410
2416
|
], 64))), 64))
|
|
2411
2417
|
]),
|
|
2412
|
-
|
|
2413
|
-
|
|
2418
|
+
I("div", fs, [
|
|
2419
|
+
K(f(Fe), {
|
|
2414
2420
|
size: "small",
|
|
2415
2421
|
modelValue: b.value,
|
|
2416
|
-
"onUpdate:modelValue":
|
|
2422
|
+
"onUpdate:modelValue": u[3] || (u[3] = (w) => b.value = w),
|
|
2417
2423
|
label: "快捷键提示"
|
|
2418
2424
|
}, null, 8, ["modelValue"]),
|
|
2419
|
-
|
|
2425
|
+
K(f(Fe), {
|
|
2420
2426
|
size: "small",
|
|
2421
|
-
modelValue:
|
|
2422
|
-
"onUpdate:modelValue":
|
|
2427
|
+
modelValue: d.value,
|
|
2428
|
+
"onUpdate:modelValue": u[4] || (u[4] = (w) => d.value = w),
|
|
2423
2429
|
label: "dxf"
|
|
2424
2430
|
}, null, 8, ["modelValue"])
|
|
2425
2431
|
]),
|
|
2426
|
-
C.permission === "admin" ? (
|
|
2427
|
-
|
|
2432
|
+
C.permission === "admin" ? (P(), O("div", ys, [
|
|
2433
|
+
K(f(de), {
|
|
2428
2434
|
style: { padding: "5px", "font-size": "10px" },
|
|
2429
2435
|
size: "small",
|
|
2430
2436
|
type: "success",
|
|
2431
2437
|
onClick: s
|
|
2432
2438
|
}, {
|
|
2433
|
-
default: j(() =>
|
|
2434
|
-
|
|
2439
|
+
default: j(() => u[14] || (u[14] = [
|
|
2440
|
+
X(" 选择文件 ", -1)
|
|
2435
2441
|
])),
|
|
2436
2442
|
_: 1,
|
|
2437
2443
|
__: [14]
|
|
2438
2444
|
}),
|
|
2439
|
-
|
|
2445
|
+
K(f(de), {
|
|
2440
2446
|
style: { padding: "5px", "font-size": "10px" },
|
|
2441
2447
|
size: "small",
|
|
2442
2448
|
type: "primary",
|
|
2443
|
-
onClick:
|
|
2449
|
+
onClick: u[5] || (u[5] = (w) => f(g).Dxf.downloadOriginalData("json.json"))
|
|
2444
2450
|
}, {
|
|
2445
|
-
default: j(() =>
|
|
2446
|
-
|
|
2451
|
+
default: j(() => u[15] || (u[15] = [
|
|
2452
|
+
X(" 下载Json ", -1)
|
|
2447
2453
|
])),
|
|
2448
2454
|
_: 1,
|
|
2449
2455
|
__: [15]
|
|
2450
2456
|
}),
|
|
2451
|
-
|
|
2457
|
+
K(f(de), {
|
|
2452
2458
|
style: { padding: "5px", "font-size": "10px" },
|
|
2453
2459
|
size: "small",
|
|
2454
2460
|
type: "primary",
|
|
2455
|
-
onClick:
|
|
2461
|
+
onClick: u[6] || (u[6] = (w) => f(g).AngleCorrectionDxf.download("test.dxf"))
|
|
2456
2462
|
}, {
|
|
2457
|
-
default: j(() =>
|
|
2458
|
-
|
|
2463
|
+
default: j(() => u[16] || (u[16] = [
|
|
2464
|
+
X(" 下载DXF ", -1)
|
|
2459
2465
|
])),
|
|
2460
2466
|
_: 1,
|
|
2461
2467
|
__: [16]
|
|
2462
2468
|
}),
|
|
2463
|
-
|
|
2469
|
+
K(f(de), {
|
|
2464
2470
|
style: { padding: "5px", "font-size": "10px" },
|
|
2465
2471
|
size: "small",
|
|
2466
2472
|
type: "primary",
|
|
2467
|
-
onClick:
|
|
2473
|
+
onClick: u[7] || (u[7] = (w) => f(g).AngleCorrectionDxf.downloadImage("dxf.jpg"))
|
|
2468
2474
|
}, {
|
|
2469
|
-
default: j(() =>
|
|
2470
|
-
|
|
2475
|
+
default: j(() => u[17] || (u[17] = [
|
|
2476
|
+
X(" 下载JPG ", -1)
|
|
2471
2477
|
])),
|
|
2472
2478
|
_: 1,
|
|
2473
2479
|
__: [17]
|
|
2474
2480
|
}),
|
|
2475
|
-
|
|
2481
|
+
K(f(de), {
|
|
2476
2482
|
style: { padding: "5px", "font-size": "10px" },
|
|
2477
2483
|
size: "small",
|
|
2478
2484
|
type: "primary",
|
|
2479
|
-
onClick:
|
|
2485
|
+
onClick: u[8] || (u[8] = (w) => f(z).downloadGltf("test.glb", !0))
|
|
2480
2486
|
}, {
|
|
2481
|
-
default: j(() =>
|
|
2482
|
-
|
|
2487
|
+
default: j(() => u[18] || (u[18] = [
|
|
2488
|
+
X(" 下载白膜 ", -1)
|
|
2483
2489
|
])),
|
|
2484
2490
|
_: 1,
|
|
2485
2491
|
__: [18]
|
|
2486
2492
|
}),
|
|
2487
|
-
|
|
2493
|
+
K(f(de), {
|
|
2488
2494
|
style: { padding: "5px", "font-size": "10px" },
|
|
2489
2495
|
size: "small",
|
|
2490
2496
|
type: "primary",
|
|
2491
|
-
onClick:
|
|
2497
|
+
onClick: u[9] || (u[9] = (w) => f(Y).download())
|
|
2492
2498
|
}, {
|
|
2493
|
-
default: j(() =>
|
|
2494
|
-
|
|
2499
|
+
default: j(() => u[19] || (u[19] = [
|
|
2500
|
+
X(" 下载三维家JSON ", -1)
|
|
2495
2501
|
])),
|
|
2496
2502
|
_: 1,
|
|
2497
2503
|
__: [19]
|
|
2498
2504
|
})
|
|
2499
2505
|
])) : q("", !0),
|
|
2500
|
-
|
|
2506
|
+
K(xe, null, {
|
|
2501
2507
|
default: j(() => [
|
|
2502
|
-
|
|
2503
|
-
|
|
2508
|
+
I("div", ws, [
|
|
2509
|
+
K(zt, null, {
|
|
2504
2510
|
default: j(() => [
|
|
2505
|
-
(
|
|
2506
|
-
onClick: (U) => w.show.value && v.value === "default" && (w.action ? w.action() : f(x).commandManager.start(w.command, [...f(
|
|
2511
|
+
(P(), O(ve, null, ke(ct, (w) => I("div", {
|
|
2512
|
+
onClick: (U) => w.show.value && v.value === "default" && (w.action ? w.action() : f(x).commandManager.start(w.command, [...f(k).selectLines])),
|
|
2507
2513
|
title: `${w.name}(${w.shortcut})`,
|
|
2508
2514
|
class: V(["size-[20px] flex justify-center items-center relative overflow-hidden active:scale-[0.8] border-1 border-[#ccc] rounded-[4px] transition-all cursor-pointer", {
|
|
2509
2515
|
"opacity-30 bg-[#ccc] !cursor-no-drop active:!scale-[1]": !w.show.value || v.value !== "default",
|
|
@@ -2511,11 +2517,11 @@ const as = {
|
|
|
2511
2517
|
}]),
|
|
2512
2518
|
key: w.command
|
|
2513
2519
|
}, [
|
|
2514
|
-
|
|
2520
|
+
I("img", {
|
|
2515
2521
|
class: "size-[14px]",
|
|
2516
2522
|
src: w.src
|
|
2517
|
-
}, null, 8,
|
|
2518
|
-
], 10,
|
|
2523
|
+
}, null, 8, xs)
|
|
2524
|
+
], 10, bs)), 64))
|
|
2519
2525
|
]),
|
|
2520
2526
|
_: 1
|
|
2521
2527
|
})
|
|
@@ -2527,12 +2533,12 @@ const as = {
|
|
|
2527
2533
|
], 38)
|
|
2528
2534
|
], 512));
|
|
2529
2535
|
}
|
|
2530
|
-
}),
|
|
2531
|
-
const t =
|
|
2536
|
+
}), Es = (l, e) => {
|
|
2537
|
+
const t = l.__vccOpts || l;
|
|
2532
2538
|
for (const [n, s] of e)
|
|
2533
2539
|
t[n] = s;
|
|
2534
2540
|
return t;
|
|
2535
|
-
},
|
|
2541
|
+
}, Ms = /* @__PURE__ */ Es(Cs, [["__scopeId", "data-v-d038f1d5"]]);
|
|
2536
2542
|
let dt = class extends Ae {
|
|
2537
2543
|
static name = "Editor";
|
|
2538
2544
|
container = new m.Group();
|
|
@@ -2557,7 +2563,7 @@ let dt = class extends Ae {
|
|
|
2557
2563
|
get domContainer() {
|
|
2558
2564
|
return this.parent?.findComponentByName("DomContainer");
|
|
2559
2565
|
}
|
|
2560
|
-
commandManager = new
|
|
2566
|
+
commandManager = new xn();
|
|
2561
2567
|
plane = new m.Mesh(new m.PlaneGeometry(2e3, 2e3, 2, 2));
|
|
2562
2568
|
app;
|
|
2563
2569
|
domElement = document.createElement("div");
|
|
@@ -2587,7 +2593,7 @@ let dt = class extends Ae {
|
|
|
2587
2593
|
this.domContainer.domElement.parentElement && (this.domContainer.domElement.parentElement.appendChild(this.domElement), this.domContainer.domElement.parentElement.appendChild(this.imgEl), n());
|
|
2588
2594
|
});
|
|
2589
2595
|
setTimeout(() => {
|
|
2590
|
-
this.app =
|
|
2596
|
+
this.app = Tt(Ms, { dxfSystem: this.parent, permission: this.viewPermission }), this.app.mount(this.domElement);
|
|
2591
2597
|
}), e.AngleCorrectionDxf.addEventListener("lineOffset", async () => {
|
|
2592
2598
|
this.imgEl.src && URL.revokeObjectURL(this.imgEl.src), setTimeout(async () => {
|
|
2593
2599
|
this.imgEl.src = URL.createObjectURL(await e.AngleCorrectionDxf.toDxfImageBlob("Centimeters", "image/png", "transparent"));
|
|
@@ -2623,20 +2629,20 @@ let dt = class extends Ae {
|
|
|
2623
2629
|
* 打开编辑器
|
|
2624
2630
|
*/
|
|
2625
2631
|
openEdit() {
|
|
2626
|
-
const e = this.renderer, t = this.domEventRegister, n = this.dxf, s = e.orbitControls, o = e.camera, a = n.box.center,
|
|
2632
|
+
const e = this.renderer, t = this.domEventRegister, n = this.dxf, s = e.orbitControls, o = e.camera, a = n.box.center, c = e.camera.position.clone(), d = s?.target?.clone(), i = new m.Vector2(), r = new m.Raycaster(), h = this.coords, y = this.pointerPosition;
|
|
2627
2633
|
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);
|
|
2628
|
-
const
|
|
2634
|
+
const p = () => {
|
|
2629
2635
|
e.renderer.getSize(i);
|
|
2630
2636
|
const v = t.pointer.x / i.x * 2 - 1, g = -(t.pointer.y / i.y * 2 - 1);
|
|
2631
|
-
h.set(v, g),
|
|
2632
|
-
const E =
|
|
2637
|
+
h.set(v, g), r.setFromCamera(h, e.camera.children.length ? e.camera.children[0] : e.camera);
|
|
2638
|
+
const E = r.intersectObject(this.plane);
|
|
2633
2639
|
E.length && (y.copy(E[0].point), this.dispatchEvent({
|
|
2634
2640
|
type: "pointerPositionChange",
|
|
2635
2641
|
position: y
|
|
2636
2642
|
}));
|
|
2637
2643
|
};
|
|
2638
|
-
t.addEventListener("mousemove",
|
|
2639
|
-
t.removeEventListener("mousemove",
|
|
2644
|
+
t.addEventListener("mousemove", p), this.commandManager.disabled = !1, this.commandManager.start("default"), this._exitEditCallBack = () => {
|
|
2645
|
+
t.removeEventListener("mousemove", p), s && (o.position.copy(c), s.enableRotate = !0, s.target.copy(d));
|
|
2640
2646
|
};
|
|
2641
2647
|
}
|
|
2642
2648
|
/**
|
|
@@ -2649,7 +2655,7 @@ let dt = class extends Ae {
|
|
|
2649
2655
|
super.destroy(), this.exitEdit(), this.renderer.scene.remove(this.container), this.domElement.remove(), this.app?.unmount();
|
|
2650
2656
|
}
|
|
2651
2657
|
};
|
|
2652
|
-
class
|
|
2658
|
+
class Ls extends R {
|
|
2653
2659
|
static name = "PointDrag";
|
|
2654
2660
|
container = new m.Group();
|
|
2655
2661
|
interruptKeys = ["escape"];
|
|
@@ -2666,8 +2672,8 @@ class Ms extends R {
|
|
|
2666
2672
|
selectPoint(e) {
|
|
2667
2673
|
let t = null, n = new m.Mesh(new m.SphereGeometry(0.04), new m.MeshBasicMaterial({ color: 16711935 })), s = null;
|
|
2668
2674
|
this.addEventRecord("selectPointStart").add(this.editor.addEventListener("pointerPositionChange", () => {
|
|
2669
|
-
const { point: o, line: a, find:
|
|
2670
|
-
this.dispatchEvent({ type: "pointerMove", point: o }),
|
|
2675
|
+
const { point: o, line: a, find: c, mode: d } = this.editor.renderManager.adsorption();
|
|
2676
|
+
this.dispatchEvent({ type: "pointerMove", point: o }), c && d === "point" ? (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());
|
|
2671
2677
|
})).add(this.eventInput.addEventListener("codeChange", () => {
|
|
2672
2678
|
this.eventInput.isKeyDown("mouse_0") && t && (this.canceEventRecord("selectPointStart"), n.material.color.set(65280), e({ point: t, line: s }));
|
|
2673
2679
|
})), this.addEventRecord("clear").add(() => n.removeFromParent());
|
|
@@ -2679,19 +2685,19 @@ class Ms extends R {
|
|
|
2679
2685
|
*/
|
|
2680
2686
|
drag(e, { point: t, line: n }) {
|
|
2681
2687
|
this.domElement.style.cursor = "crosshair";
|
|
2682
|
-
const s = n.start.equal(_.from(t)) ? "start" : "end", o = s == "start" ? new m.Vector3(n.end.x, n.end.y, 0) : new m.Vector3(n.start.x, n.start.y, 0), a = t.clone(),
|
|
2683
|
-
this.container.add(
|
|
2684
|
-
let { point: i, find:
|
|
2688
|
+
const s = n.start.equal(_.from(t)) ? "start" : "end", o = s == "start" ? new m.Vector3(n.end.x, n.end.y, 0) : new m.Vector3(n.start.x, n.start.y, 0), a = t.clone(), c = new ye([o, a], 16711935), d = new m.Mesh(new m.SphereGeometry(0.03), new m.MeshBasicMaterial({ color: 16711935 }));
|
|
2689
|
+
this.container.add(c), this.addEventRecord("clear").add(this.editor.addEventListener("pointerPositionChange", () => {
|
|
2690
|
+
let { point: i, find: r } = this.editor.renderManager.adsorption(), h = "none";
|
|
2685
2691
|
if (i) {
|
|
2686
2692
|
if (this.dispatchEvent({ type: "pointerMove", point: i }), this.eventInput.isKeyDown("shift")) {
|
|
2687
2693
|
const y = n.projectPoint(_.from(i), !1);
|
|
2688
|
-
i.set(y?.x ?? i.x, y?.y ?? i.y, 0),
|
|
2694
|
+
i.set(y?.x ?? i.x, y?.y ?? i.y, 0), r = !0, h = "crosshair";
|
|
2689
2695
|
}
|
|
2690
|
-
|
|
2696
|
+
r ? (d.position.copy(i), this.container.add(d)) : (d.removeFromParent(), h = "crosshair"), a.copy(i), c.setPoint(o, a), this.domElement.style.cursor = h;
|
|
2691
2697
|
}
|
|
2692
2698
|
})).add(this.eventInput.addEventListener("codeChange", () => {
|
|
2693
2699
|
this.eventInput.isKeyDown("mouse_0") && (this.canceEventRecord("selectPointStart"), e({ point: a, oldPoint: s === "end" ? n.end.clone() : n.start.clone(), line: n, mode: s }));
|
|
2694
|
-
})).add(() =>
|
|
2700
|
+
})).add(() => d.removeFromParent()).add(() => c.removeFromParent());
|
|
2695
2701
|
}
|
|
2696
2702
|
/** 执行完成
|
|
2697
2703
|
*/
|
|
@@ -2714,15 +2720,15 @@ class Ms extends R {
|
|
|
2714
2720
|
return this.completed(e), e;
|
|
2715
2721
|
}
|
|
2716
2722
|
}
|
|
2717
|
-
function Je(
|
|
2718
|
-
|
|
2723
|
+
function Je(l, e = {}) {
|
|
2724
|
+
l.addComponent(new dt(e.viewPermission)), l.addComponent(new ss()), l.addComponent(new _e()), l.addComponent(new wn()), l.addComponent(new os()), l.addComponent(new as()), l.addComponent(new Ls()), l.addComponent(new te()), l.addComponent(new ee()), l.addComponent(new $()), l.addComponent(new ne()), l.addComponent(new se()), l.addComponent(new oe()), l.addComponent(new ae()), l.addComponent(new ie()), l.addComponent(new re()), l.addComponent(new rt());
|
|
2719
2725
|
}
|
|
2720
|
-
const
|
|
2721
|
-
create(
|
|
2722
|
-
return (e) => Je(e,
|
|
2726
|
+
const Bs = Object.assign(Je, {
|
|
2727
|
+
create(l = {}) {
|
|
2728
|
+
return (e) => Je(e, l);
|
|
2723
2729
|
}
|
|
2724
2730
|
});
|
|
2725
2731
|
export {
|
|
2726
|
-
|
|
2732
|
+
Bs as Editor,
|
|
2727
2733
|
Je as Editor_
|
|
2728
2734
|
};
|