build-dxf 0.0.35 → 0.0.37
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.d.ts +2 -1
- package/src/build.js +2579 -2369
- package/src/index.css +1 -1
- package/src/index.js +7 -6
- package/src/index3.js +717 -754
- package/src/selectLocalFile.js +903 -880
- package/src/utils/DxfSystem/DxfSystem.d.ts +18 -0
- package/src/utils/DxfSystem/components/Dxf.d.ts +4 -128
- package/src/utils/DxfSystem/index.d.ts +2 -18
- 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/MergeLine.d.ts +0 -2
- package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/VerticalCorrection.d.ts +2 -7
- package/src/utils/DxfSystem/plugin/Editor/components/RenderManager.d.ts +2 -7
- package/src/utils/DxfSystem/plugin/Editor/index.d.ts +1 -1
- package/src/utils/DxfSystem/plugin/Editor/pages/EditorTool.vue.d.ts +1 -1
- package/src/utils/DxfSystem/plugin/ModelDataPlugin/index.d.ts +1 -1
- package/src/utils/DxfSystem/plugin/RenderPlugin/components/Renderer.d.ts +7 -0
- package/src/utils/DxfSystem/plugin/RenderPlugin/index.d.ts +1 -1
- package/src/utils/DxfSystem/type.d.ts +106 -0
- package/src/utils/DxfSystem/utils/AxisAlignCorr.d.ts +14 -0
- package/src/utils/DxfSystem/utils/BoundExt.d.ts +16 -0
- package/src/utils/DxfSystem/utils/index.d.ts +5 -0
- package/src/utils/DxfSystem/utils/lineDataToOriginalData.d.ts +7 -0
- package/src/utils/DxfSystem/utils/lineSegmentClipping.d.ts +7 -0
- package/src/utils/DxfSystem/utils/recomputedWindow.d.ts +7 -0
- package/src/utils/Quadtree/LineSegment.d.ts +22 -0
- package/src/utils/Quadtree/Quadtree.d.ts +8 -3
- package/src/utils/DxfSystem/components/Dxf copy.d.ts +0 -276
package/src/index3.js
CHANGED
|
@@ -1,73 +1,73 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { i as
|
|
3
|
-
import { C as
|
|
1
|
+
import * as p from "three";
|
|
2
|
+
import { i as ut, n as pt, r as Je, t as Ue, c as Ie, d as gt, e as vt, f as Pe, g as Q, _ as qe, u as ft, h as ve, j as Se, w as yt, k as wt, l as bt, p as xt, m as Ct, o as Et, T as _e, q as Be, s as Lt, v as Mt, x as Ne, y as ke, z as Le, A as kt, B as It, L as fe, D as Pt, b as Re, E as re, S as Dt } from "./selectLocalFile.js";
|
|
3
|
+
import { C as De, P as L, L as B, B as Ze, E as Ye, b as Oe, Q as ze, u as At, A as St, r as Fe, W as _t, T as Bt } 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 _, defineComponent as me, computed as
|
|
8
|
-
function nt(
|
|
7
|
+
import { watch as J, ref as _, defineComponent as me, computed as S, createElementBlock as R, openBlock as A, normalizeClass as V, unref as v, renderSlot as we, createVNode as z, Transition as be, withCtx as T, withDirectives as Xe, createElementVNode as P, normalizeStyle as Ae, createTextVNode as Y, toDisplayString as de, vShow as $e, shallowReactive as Nt, onMounted as et, createBlock as pe, createCommentVNode as q, resolveDynamicComponent as Rt, Fragment as ge, withModifiers as Ot, nextTick as ye, isVNode as tt, render as Ke, toRaw as zt, onUnmounted as Ft, renderList as Me, createStaticVNode as Kt, TransitionGroup as Tt, createApp as Vt } from "vue";
|
|
8
|
+
function nt(d) {
|
|
9
9
|
var e;
|
|
10
|
-
const t = Je(
|
|
10
|
+
const t = Je(d);
|
|
11
11
|
return (e = t?.$el) != null ? e : t;
|
|
12
12
|
}
|
|
13
|
-
const ot =
|
|
14
|
-
function jt(...
|
|
13
|
+
const ot = Ie ? window : void 0;
|
|
14
|
+
function jt(...d) {
|
|
15
15
|
let e, t, n, o;
|
|
16
|
-
if (
|
|
17
|
-
return
|
|
16
|
+
if (ut(d[0]) || Array.isArray(d[0]) ? ([t, n, o] = d, e = ot) : [e, t, n, o] = d, !e)
|
|
17
|
+
return pt;
|
|
18
18
|
Array.isArray(t) || (t = [t]), Array.isArray(n) || (n = [n]);
|
|
19
19
|
const s = [], a = () => {
|
|
20
|
-
s.forEach((
|
|
21
|
-
},
|
|
22
|
-
a(),
|
|
20
|
+
s.forEach((c) => c()), s.length = 0;
|
|
21
|
+
}, l = (c, m, w, f) => (c.addEventListener(m, w, f), () => c.removeEventListener(m, w, f)), r = J(() => [nt(e), Je(o)], ([c, m]) => {
|
|
22
|
+
a(), c && s.push(...t.flatMap((w) => n.map((f) => l(c, w, f, m))));
|
|
23
23
|
}, { immediate: !0, flush: "post" }), i = () => {
|
|
24
|
-
|
|
24
|
+
r(), a();
|
|
25
25
|
};
|
|
26
26
|
return Ue(i), i;
|
|
27
27
|
}
|
|
28
|
-
function
|
|
29
|
-
const t = _(), n = () => t.value = !!
|
|
30
|
-
return n(),
|
|
28
|
+
function Gt(d, e = !1) {
|
|
29
|
+
const t = _(), n = () => t.value = !!d();
|
|
30
|
+
return n(), gt(n, e), t;
|
|
31
31
|
}
|
|
32
|
-
const Te = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {},
|
|
33
|
-
Te[
|
|
34
|
-
var
|
|
32
|
+
const Te = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Ve = "__vueuse_ssr_handlers__";
|
|
33
|
+
Te[Ve] = Te[Ve] || {};
|
|
34
|
+
var je = Object.getOwnPropertySymbols, Qt = Object.prototype.hasOwnProperty, Ht = Object.prototype.propertyIsEnumerable, Wt = (d, e) => {
|
|
35
35
|
var t = {};
|
|
36
|
-
for (var n in
|
|
37
|
-
|
|
38
|
-
if (
|
|
39
|
-
for (var n of
|
|
40
|
-
e.indexOf(n) < 0 &&
|
|
36
|
+
for (var n in d)
|
|
37
|
+
Qt.call(d, n) && e.indexOf(n) < 0 && (t[n] = d[n]);
|
|
38
|
+
if (d != null && je)
|
|
39
|
+
for (var n of je(d))
|
|
40
|
+
e.indexOf(n) < 0 && Ht.call(d, n) && (t[n] = d[n]);
|
|
41
41
|
return t;
|
|
42
42
|
};
|
|
43
|
-
function
|
|
44
|
-
const n = t, { window: o = ot } = n, s =
|
|
43
|
+
function Jt(d, e, t = {}) {
|
|
44
|
+
const n = t, { window: o = ot } = n, s = Wt(n, ["window"]);
|
|
45
45
|
let a;
|
|
46
|
-
const
|
|
46
|
+
const l = Gt(() => o && "ResizeObserver" in o), r = () => {
|
|
47
47
|
a && (a.disconnect(), a = void 0);
|
|
48
|
-
}, i = J(() => nt(
|
|
49
|
-
|
|
50
|
-
}, { immediate: !0, flush: "post" }),
|
|
51
|
-
|
|
48
|
+
}, i = J(() => nt(d), (m) => {
|
|
49
|
+
r(), l.value && o && m && (a = new ResizeObserver(e), a.observe(m, s));
|
|
50
|
+
}, { immediate: !0, flush: "post" }), c = () => {
|
|
51
|
+
r(), i();
|
|
52
52
|
};
|
|
53
|
-
return Ue(
|
|
54
|
-
isSupported:
|
|
55
|
-
stop:
|
|
53
|
+
return Ue(c), {
|
|
54
|
+
isSupported: l,
|
|
55
|
+
stop: c
|
|
56
56
|
};
|
|
57
57
|
}
|
|
58
58
|
var Ge;
|
|
59
|
-
(function(
|
|
60
|
-
|
|
59
|
+
(function(d) {
|
|
60
|
+
d.UP = "UP", d.RIGHT = "RIGHT", d.DOWN = "DOWN", d.LEFT = "LEFT", d.NONE = "NONE";
|
|
61
61
|
})(Ge || (Ge = {}));
|
|
62
|
-
var
|
|
62
|
+
var Ut = Object.defineProperty, Qe = Object.getOwnPropertySymbols, qt = Object.prototype.hasOwnProperty, Zt = Object.prototype.propertyIsEnumerable, He = (d, e, t) => e in d ? Ut(d, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : d[e] = t, Yt = (d, e) => {
|
|
63
63
|
for (var t in e || (e = {}))
|
|
64
|
-
|
|
64
|
+
qt.call(e, t) && He(d, t, e[t]);
|
|
65
65
|
if (Qe)
|
|
66
66
|
for (var t of Qe(e))
|
|
67
|
-
|
|
68
|
-
return
|
|
67
|
+
Zt.call(e, t) && He(d, t, e[t]);
|
|
68
|
+
return d;
|
|
69
69
|
};
|
|
70
|
-
const
|
|
70
|
+
const Xt = {
|
|
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 Yt = {
|
|
|
93
93
|
easeOutBack: [0.34, 1.56, 0.64, 1],
|
|
94
94
|
easeInOutBack: [0.68, -0.6, 0.32, 1.6]
|
|
95
95
|
};
|
|
96
|
-
|
|
97
|
-
linear:
|
|
98
|
-
},
|
|
99
|
-
const
|
|
96
|
+
Yt({
|
|
97
|
+
linear: vt
|
|
98
|
+
}, Xt);
|
|
99
|
+
const $t = (d) => d, en = {
|
|
100
100
|
esc: "Escape"
|
|
101
|
-
},
|
|
101
|
+
}, tn = Pe({
|
|
102
102
|
value: {
|
|
103
103
|
type: [String, Number],
|
|
104
104
|
default: ""
|
|
@@ -129,50 +129,50 @@ const Xt = (c) => c, $t = {
|
|
|
129
129
|
badgeClass: {
|
|
130
130
|
type: String
|
|
131
131
|
}
|
|
132
|
-
}),
|
|
132
|
+
}), nn = me({
|
|
133
133
|
name: "ElBadge"
|
|
134
|
-
}),
|
|
135
|
-
...
|
|
136
|
-
props:
|
|
137
|
-
setup(
|
|
138
|
-
const t =
|
|
139
|
-
var a,
|
|
134
|
+
}), on = /* @__PURE__ */ me({
|
|
135
|
+
...nn,
|
|
136
|
+
props: tn,
|
|
137
|
+
setup(d, { expose: e }) {
|
|
138
|
+
const t = d, n = ft("badge"), o = S(() => t.isDot ? "" : ve(t.value) && ve(t.max) ? t.max < t.value ? `${t.max}+` : `${t.value}` : `${t.value}`), s = S(() => {
|
|
139
|
+
var a, l, r, i, c;
|
|
140
140
|
return [
|
|
141
141
|
{
|
|
142
142
|
backgroundColor: t.color,
|
|
143
|
-
marginRight:
|
|
144
|
-
marginTop:
|
|
143
|
+
marginRight: Se(-((l = (a = t.offset) == null ? void 0 : a[0]) != null ? l : 0)),
|
|
144
|
+
marginTop: Se((i = (r = t.offset) == null ? void 0 : r[1]) != null ? i : 0)
|
|
145
145
|
},
|
|
146
|
-
(
|
|
146
|
+
(c = t.badgeStyle) != null ? c : {}
|
|
147
147
|
];
|
|
148
148
|
});
|
|
149
149
|
return e({
|
|
150
150
|
content: o
|
|
151
|
-
}), (a,
|
|
152
|
-
class: V(
|
|
151
|
+
}), (a, l) => (A(), R("div", {
|
|
152
|
+
class: V(v(n).b())
|
|
153
153
|
}, [
|
|
154
|
-
|
|
155
|
-
z(
|
|
156
|
-
name: `${
|
|
154
|
+
we(a.$slots, "default"),
|
|
155
|
+
z(be, {
|
|
156
|
+
name: `${v(n).namespace.value}-zoom-in-center`,
|
|
157
157
|
persisted: ""
|
|
158
158
|
}, {
|
|
159
|
-
default:
|
|
160
|
-
Xe(
|
|
159
|
+
default: T(() => [
|
|
160
|
+
Xe(P("sup", {
|
|
161
161
|
class: V([
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
162
|
+
v(n).e("content"),
|
|
163
|
+
v(n).em("content", a.type),
|
|
164
|
+
v(n).is("fixed", !!a.$slots.default),
|
|
165
|
+
v(n).is("dot", a.isDot),
|
|
166
|
+
v(n).is("hide-zero", !a.showZero && t.value === 0),
|
|
167
167
|
a.badgeClass
|
|
168
168
|
]),
|
|
169
|
-
style:
|
|
169
|
+
style: Ae(v(s))
|
|
170
170
|
}, [
|
|
171
|
-
|
|
172
|
-
|
|
171
|
+
we(a.$slots, "content", { value: v(o) }, () => [
|
|
172
|
+
Y(de(v(o)), 1)
|
|
173
173
|
])
|
|
174
174
|
], 6), [
|
|
175
|
-
[$e, !a.hidden && (
|
|
175
|
+
[$e, !a.hidden && (v(o) || a.isDot || a.$slots.content)]
|
|
176
176
|
])
|
|
177
177
|
]),
|
|
178
178
|
_: 3
|
|
@@ -180,8 +180,8 @@ const Xt = (c) => c, $t = {
|
|
|
180
180
|
], 2));
|
|
181
181
|
}
|
|
182
182
|
});
|
|
183
|
-
var
|
|
184
|
-
const
|
|
183
|
+
var sn = /* @__PURE__ */ qe(on, [["__file", "badge.vue"]]);
|
|
184
|
+
const an = yt(sn), rn = Pe({
|
|
185
185
|
a11y: {
|
|
186
186
|
type: Boolean,
|
|
187
187
|
default: !0
|
|
@@ -189,7 +189,7 @@ const sn = ft(on), an = Ae({
|
|
|
189
189
|
locale: {
|
|
190
190
|
type: Q(Object)
|
|
191
191
|
},
|
|
192
|
-
size:
|
|
192
|
+
size: bt,
|
|
193
193
|
button: {
|
|
194
194
|
type: Q(Object)
|
|
195
195
|
},
|
|
@@ -218,16 +218,16 @@ const sn = ft(on), an = Ae({
|
|
|
218
218
|
default: "el"
|
|
219
219
|
},
|
|
220
220
|
...wt
|
|
221
|
-
}),
|
|
221
|
+
}), K = {};
|
|
222
222
|
me({
|
|
223
223
|
name: "ElConfigProvider",
|
|
224
|
-
props:
|
|
225
|
-
setup(
|
|
226
|
-
const t =
|
|
227
|
-
return J(() =>
|
|
224
|
+
props: rn,
|
|
225
|
+
setup(d, { slots: e }) {
|
|
226
|
+
const t = xt(d);
|
|
227
|
+
return J(() => d.message, (n) => {
|
|
228
228
|
var o, s;
|
|
229
|
-
Object.assign(
|
|
230
|
-
}, { immediate: !0, deep: !0 }), () =>
|
|
229
|
+
Object.assign(K, (s = (o = t?.value) == null ? void 0 : o.message) != null ? s : {}, n ?? {});
|
|
230
|
+
}, { immediate: !0, deep: !0 }), () => we(e, "default", { config: t?.value });
|
|
231
231
|
}
|
|
232
232
|
});
|
|
233
233
|
const st = [
|
|
@@ -236,7 +236,7 @@ const st = [
|
|
|
236
236
|
"info",
|
|
237
237
|
"warning",
|
|
238
238
|
"error"
|
|
239
|
-
], N =
|
|
239
|
+
], N = $t({
|
|
240
240
|
customClass: "",
|
|
241
241
|
dangerouslyUseHTMLString: !1,
|
|
242
242
|
duration: 3e3,
|
|
@@ -251,8 +251,8 @@ const st = [
|
|
|
251
251
|
zIndex: 0,
|
|
252
252
|
grouping: !1,
|
|
253
253
|
repeatNum: 1,
|
|
254
|
-
appendTo:
|
|
255
|
-
}),
|
|
254
|
+
appendTo: Ie ? document.body : void 0
|
|
255
|
+
}), dn = Pe({
|
|
256
256
|
customClass: {
|
|
257
257
|
type: String,
|
|
258
258
|
default: N.customClass
|
|
@@ -266,7 +266,7 @@ const st = [
|
|
|
266
266
|
default: N.duration
|
|
267
267
|
},
|
|
268
268
|
icon: {
|
|
269
|
-
type:
|
|
269
|
+
type: Ct,
|
|
270
270
|
default: N.icon
|
|
271
271
|
},
|
|
272
272
|
id: {
|
|
@@ -314,179 +314,179 @@ const st = [
|
|
|
314
314
|
type: Number,
|
|
315
315
|
default: N.repeatNum
|
|
316
316
|
}
|
|
317
|
-
}),
|
|
317
|
+
}), ln = {
|
|
318
318
|
destroy: () => !0
|
|
319
|
-
}, H =
|
|
320
|
-
const e = H.findIndex((o) => o.id ===
|
|
319
|
+
}, H = Nt([]), cn = (d) => {
|
|
320
|
+
const e = H.findIndex((o) => o.id === d), 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
|
+
}, mn = (d) => {
|
|
324
|
+
const { prev: e } = cn(d);
|
|
325
325
|
return e ? e.vm.exposed.bottom.value : 0;
|
|
326
|
-
},
|
|
326
|
+
}, hn = (d, e) => H.findIndex((n) => n.id === d) > 0 ? 16 : e, un = me({
|
|
327
327
|
name: "ElMessage"
|
|
328
|
-
}),
|
|
329
|
-
...
|
|
330
|
-
props:
|
|
331
|
-
emits:
|
|
332
|
-
setup(
|
|
333
|
-
const n =
|
|
328
|
+
}), pn = /* @__PURE__ */ me({
|
|
329
|
+
...un,
|
|
330
|
+
props: dn,
|
|
331
|
+
emits: ln,
|
|
332
|
+
setup(d, { expose: e, emit: t }) {
|
|
333
|
+
const n = d, { Close: o } = Lt, s = _(!1), { ns: a, zIndex: l } = Et("message"), { currentZIndex: r, nextZIndex: i } = l, c = _(), m = _(!1), w = _(0);
|
|
334
334
|
let f;
|
|
335
|
-
const
|
|
336
|
-
const
|
|
337
|
-
return { [a.bm("icon",
|
|
338
|
-
}), E =
|
|
339
|
-
top: `${
|
|
340
|
-
zIndex:
|
|
335
|
+
const u = S(() => n.type ? n.type === "error" ? "danger" : n.type : "info"), h = S(() => {
|
|
336
|
+
const x = n.type;
|
|
337
|
+
return { [a.bm("icon", x)]: x && _e[x] };
|
|
338
|
+
}), E = S(() => n.icon || _e[n.type] || ""), b = S(() => mn(n.id)), D = S(() => hn(n.id, n.offset) + b.value), F = S(() => w.value + D.value), Z = S(() => ({
|
|
339
|
+
top: `${D.value}px`,
|
|
340
|
+
zIndex: r.value
|
|
341
341
|
}));
|
|
342
|
-
function
|
|
342
|
+
function G() {
|
|
343
343
|
n.duration !== 0 && ({ stop: f } = Mt(() => {
|
|
344
|
-
|
|
344
|
+
M();
|
|
345
345
|
}, n.duration));
|
|
346
346
|
}
|
|
347
|
-
function
|
|
347
|
+
function W() {
|
|
348
348
|
f?.();
|
|
349
349
|
}
|
|
350
|
-
function
|
|
351
|
-
|
|
352
|
-
var
|
|
353
|
-
s.value || ((
|
|
350
|
+
function M() {
|
|
351
|
+
m.value = !1, ye(() => {
|
|
352
|
+
var x;
|
|
353
|
+
s.value || ((x = n.onClose) == null || x.call(n), t("destroy"));
|
|
354
354
|
});
|
|
355
355
|
}
|
|
356
|
-
function
|
|
357
|
-
|
|
356
|
+
function I({ code: x }) {
|
|
357
|
+
x === en.esc && M();
|
|
358
358
|
}
|
|
359
359
|
return et(() => {
|
|
360
|
-
|
|
360
|
+
G(), i(), m.value = !0;
|
|
361
361
|
}), J(() => n.repeatNum, () => {
|
|
362
|
-
|
|
363
|
-
}), jt(document, "keydown",
|
|
364
|
-
|
|
362
|
+
W(), G();
|
|
363
|
+
}), jt(document, "keydown", I), Jt(c, () => {
|
|
364
|
+
w.value = c.value.getBoundingClientRect().height;
|
|
365
365
|
}), e({
|
|
366
|
-
visible:
|
|
367
|
-
bottom:
|
|
368
|
-
close:
|
|
369
|
-
}), (
|
|
370
|
-
name:
|
|
371
|
-
onBeforeEnter: (
|
|
372
|
-
onBeforeLeave:
|
|
373
|
-
onAfterLeave: (
|
|
366
|
+
visible: m,
|
|
367
|
+
bottom: F,
|
|
368
|
+
close: M
|
|
369
|
+
}), (x, j) => (A(), pe(be, {
|
|
370
|
+
name: v(a).b("fade"),
|
|
371
|
+
onBeforeEnter: (ie) => s.value = !0,
|
|
372
|
+
onBeforeLeave: x.onClose,
|
|
373
|
+
onAfterLeave: (ie) => x.$emit("destroy"),
|
|
374
374
|
persisted: ""
|
|
375
375
|
}, {
|
|
376
|
-
default:
|
|
377
|
-
Xe(
|
|
378
|
-
id:
|
|
376
|
+
default: T(() => [
|
|
377
|
+
Xe(P("div", {
|
|
378
|
+
id: x.id,
|
|
379
379
|
ref_key: "messageRef",
|
|
380
|
-
ref:
|
|
380
|
+
ref: c,
|
|
381
381
|
class: V([
|
|
382
|
-
|
|
383
|
-
{ [
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
382
|
+
v(a).b(),
|
|
383
|
+
{ [v(a).m(x.type)]: x.type },
|
|
384
|
+
v(a).is("closable", x.showClose),
|
|
385
|
+
v(a).is("plain", x.plain),
|
|
386
|
+
x.customClass
|
|
387
387
|
]),
|
|
388
|
-
style:
|
|
388
|
+
style: Ae(v(Z)),
|
|
389
389
|
role: "alert",
|
|
390
|
-
onMouseenter:
|
|
391
|
-
onMouseleave:
|
|
390
|
+
onMouseenter: W,
|
|
391
|
+
onMouseleave: G
|
|
392
392
|
}, [
|
|
393
|
-
|
|
393
|
+
x.repeatNum > 1 ? (A(), pe(v(an), {
|
|
394
394
|
key: 0,
|
|
395
|
-
value:
|
|
396
|
-
type:
|
|
397
|
-
class: V(
|
|
395
|
+
value: x.repeatNum,
|
|
396
|
+
type: v(u),
|
|
397
|
+
class: V(v(a).e("badge"))
|
|
398
398
|
}, null, 8, ["value", "type", "class"])) : q("v-if", !0),
|
|
399
|
-
|
|
399
|
+
v(E) ? (A(), pe(v(Be), {
|
|
400
400
|
key: 1,
|
|
401
|
-
class: V([
|
|
401
|
+
class: V([v(a).e("icon"), v(h)])
|
|
402
402
|
}, {
|
|
403
|
-
default:
|
|
404
|
-
(
|
|
403
|
+
default: T(() => [
|
|
404
|
+
(A(), pe(Rt(v(E))))
|
|
405
405
|
]),
|
|
406
406
|
_: 1
|
|
407
407
|
}, 8, ["class"])) : q("v-if", !0),
|
|
408
|
-
|
|
409
|
-
|
|
408
|
+
we(x.$slots, "default", {}, () => [
|
|
409
|
+
x.dangerouslyUseHTMLString ? (A(), R(ge, { key: 1 }, [
|
|
410
410
|
q(" Caution here, message could've been compromised, never use user's input as message "),
|
|
411
|
-
|
|
412
|
-
class: V(
|
|
413
|
-
innerHTML:
|
|
411
|
+
P("p", {
|
|
412
|
+
class: V(v(a).e("content")),
|
|
413
|
+
innerHTML: x.message
|
|
414
414
|
}, null, 10, ["innerHTML"])
|
|
415
|
-
], 2112)) : (
|
|
415
|
+
], 2112)) : (A(), R("p", {
|
|
416
416
|
key: 0,
|
|
417
|
-
class: V(
|
|
418
|
-
}, de(
|
|
417
|
+
class: V(v(a).e("content"))
|
|
418
|
+
}, de(x.message), 3))
|
|
419
419
|
]),
|
|
420
|
-
|
|
420
|
+
x.showClose ? (A(), pe(v(Be), {
|
|
421
421
|
key: 2,
|
|
422
|
-
class: V(
|
|
423
|
-
onClick:
|
|
422
|
+
class: V(v(a).e("closeBtn")),
|
|
423
|
+
onClick: Ot(M, ["stop"])
|
|
424
424
|
}, {
|
|
425
|
-
default:
|
|
426
|
-
z(
|
|
425
|
+
default: T(() => [
|
|
426
|
+
z(v(o))
|
|
427
427
|
]),
|
|
428
428
|
_: 1
|
|
429
429
|
}, 8, ["class", "onClick"])) : q("v-if", !0)
|
|
430
430
|
], 46, ["id"]), [
|
|
431
|
-
[$e,
|
|
431
|
+
[$e, m.value]
|
|
432
432
|
])
|
|
433
433
|
]),
|
|
434
434
|
_: 3
|
|
435
435
|
}, 8, ["name", "onBeforeEnter", "onBeforeLeave", "onAfterLeave"]));
|
|
436
436
|
}
|
|
437
437
|
});
|
|
438
|
-
var
|
|
439
|
-
let
|
|
440
|
-
const at = (
|
|
441
|
-
const e = !
|
|
438
|
+
var gn = /* @__PURE__ */ qe(pn, [["__file", "message.vue"]]);
|
|
439
|
+
let vn = 1;
|
|
440
|
+
const at = (d) => {
|
|
441
|
+
const e = !d || Ne(d) || tt(d) || ke(d) ? { message: d } : d, t = {
|
|
442
442
|
...N,
|
|
443
443
|
...e
|
|
444
444
|
};
|
|
445
445
|
if (!t.appendTo)
|
|
446
446
|
t.appendTo = document.body;
|
|
447
|
-
else if (
|
|
447
|
+
else if (Ne(t.appendTo)) {
|
|
448
448
|
let n = document.querySelector(t.appendTo);
|
|
449
|
-
|
|
449
|
+
kt(n) || (n = document.body), t.appendTo = n;
|
|
450
450
|
}
|
|
451
|
-
return Le(
|
|
452
|
-
},
|
|
453
|
-
const e = H.indexOf(
|
|
451
|
+
return Le(K.grouping) && !t.grouping && (t.grouping = K.grouping), ve(K.duration) && t.duration === 3e3 && (t.duration = K.duration), ve(K.offset) && t.offset === 16 && (t.offset = K.offset), Le(K.showClose) && !t.showClose && (t.showClose = K.showClose), Le(K.plain) && !t.plain && (t.plain = K.plain), t;
|
|
452
|
+
}, fn = (d) => {
|
|
453
|
+
const e = H.indexOf(d);
|
|
454
454
|
if (e === -1)
|
|
455
455
|
return;
|
|
456
456
|
H.splice(e, 1);
|
|
457
|
-
const { handler: t } =
|
|
457
|
+
const { handler: t } = d;
|
|
458
458
|
t.close();
|
|
459
|
-
},
|
|
460
|
-
const n = `message_${
|
|
459
|
+
}, yn = ({ appendTo: d, ...e }, t) => {
|
|
460
|
+
const n = `message_${vn++}`, o = e.onClose, s = document.createElement("div"), a = {
|
|
461
461
|
...e,
|
|
462
462
|
id: n,
|
|
463
463
|
onClose: () => {
|
|
464
|
-
o?.(),
|
|
464
|
+
o?.(), fn(c);
|
|
465
465
|
},
|
|
466
466
|
onDestroy: () => {
|
|
467
467
|
Ke(null, s);
|
|
468
468
|
}
|
|
469
|
-
},
|
|
470
|
-
default:
|
|
469
|
+
}, l = z(gn, a, ke(a.message) || tt(a.message) ? {
|
|
470
|
+
default: ke(a.message) ? a.message : () => a.message
|
|
471
471
|
} : null);
|
|
472
|
-
|
|
473
|
-
const
|
|
472
|
+
l.appContext = t || ce._context, Ke(l, s), d.appendChild(s.firstElementChild);
|
|
473
|
+
const r = l.component, c = {
|
|
474
474
|
id: n,
|
|
475
|
-
vnode:
|
|
476
|
-
vm:
|
|
475
|
+
vnode: l,
|
|
476
|
+
vm: r,
|
|
477
477
|
handler: {
|
|
478
478
|
close: () => {
|
|
479
|
-
|
|
479
|
+
r.exposed.close();
|
|
480
480
|
}
|
|
481
481
|
},
|
|
482
|
-
props:
|
|
482
|
+
props: l.component.props
|
|
483
483
|
};
|
|
484
|
-
return
|
|
485
|
-
}, ce = (
|
|
486
|
-
if (!
|
|
484
|
+
return c;
|
|
485
|
+
}, ce = (d = {}, e) => {
|
|
486
|
+
if (!Ie)
|
|
487
487
|
return { close: () => {
|
|
488
488
|
} };
|
|
489
|
-
const t = at(
|
|
489
|
+
const t = at(d);
|
|
490
490
|
if (t.grouping && H.length) {
|
|
491
491
|
const o = H.find(({ vnode: s }) => {
|
|
492
492
|
var a;
|
|
@@ -495,27 +495,27 @@ const at = (c) => {
|
|
|
495
495
|
if (o)
|
|
496
496
|
return o.props.repeatNum += 1, o.props.type = t.type, o.handler;
|
|
497
497
|
}
|
|
498
|
-
if (
|
|
498
|
+
if (ve(K.max) && H.length >= K.max)
|
|
499
499
|
return { close: () => {
|
|
500
500
|
} };
|
|
501
|
-
const n =
|
|
501
|
+
const n = yn(t, e);
|
|
502
502
|
return H.push(n), n.handler;
|
|
503
503
|
};
|
|
504
|
-
st.forEach((
|
|
505
|
-
ce[
|
|
504
|
+
st.forEach((d) => {
|
|
505
|
+
ce[d] = (e = {}, t) => {
|
|
506
506
|
const n = at(e);
|
|
507
|
-
return ce({ ...n, type:
|
|
507
|
+
return ce({ ...n, type: d }, t);
|
|
508
508
|
};
|
|
509
509
|
});
|
|
510
|
-
function wn(
|
|
510
|
+
function wn(d) {
|
|
511
511
|
const e = [...H];
|
|
512
512
|
for (const t of e)
|
|
513
|
-
(!
|
|
513
|
+
(!d || d === t.props.type) && t.handler.close();
|
|
514
514
|
}
|
|
515
515
|
ce.closeAll = wn;
|
|
516
516
|
ce._context = null;
|
|
517
|
-
const
|
|
518
|
-
class O extends
|
|
517
|
+
const k = It(ce, "$message");
|
|
518
|
+
class O extends De {
|
|
519
519
|
_renderer;
|
|
520
520
|
get renderer() {
|
|
521
521
|
return this._renderer || (this._renderer = this.parent?.findComponentByName("Renderer")), this._renderer;
|
|
@@ -603,40 +603,40 @@ class O extends Se {
|
|
|
603
603
|
* @returns
|
|
604
604
|
*/
|
|
605
605
|
createPointerMove(e) {
|
|
606
|
-
const t = this.editor, n = new
|
|
606
|
+
const t = this.editor, n = new L();
|
|
607
607
|
let o = null, s = null, a = null;
|
|
608
|
-
const
|
|
609
|
-
const
|
|
608
|
+
const l = t.addEventListener("pointerPositionChange", () => {
|
|
609
|
+
const r = L.from(t.pointerPosition);
|
|
610
610
|
if (o && t.eventInput.isKeyDown("shift")) {
|
|
611
|
-
const i = Math.abs(
|
|
612
|
-
i >
|
|
611
|
+
const i = Math.abs(r.x - o.x), c = Math.abs(r.y - o.y);
|
|
612
|
+
i > c ? n.set(r.x, o.y) : n.set(o.x, r.y), e(n, !1);
|
|
613
613
|
} else if (s && a && t.eventInput.isKeyDown("alt")) {
|
|
614
|
-
const i = s.projectPoint(
|
|
615
|
-
i &&
|
|
614
|
+
const i = s.projectPoint(r, !1), c = a.projectPoint(r, !1);
|
|
615
|
+
i && c ? r.distance(i) < r.distance(c) ? n.copy(i) : n.copy(c) : i ? n.copy(i) : c && n.copy(c), e(n, !1);
|
|
616
616
|
} else {
|
|
617
|
-
const { point: i, find:
|
|
618
|
-
n.copy(i), e(n,
|
|
617
|
+
const { point: i, find: c, line: m } = t.renderManager.adsorption();
|
|
618
|
+
n.copy(i), e(n, c, m);
|
|
619
619
|
}
|
|
620
620
|
});
|
|
621
621
|
return {
|
|
622
622
|
destroy() {
|
|
623
|
-
|
|
623
|
+
l();
|
|
624
624
|
},
|
|
625
|
-
setBaseLine(
|
|
626
|
-
if (s =
|
|
627
|
-
const
|
|
625
|
+
setBaseLine(r, i) {
|
|
626
|
+
if (s = r, o = i, r && i) {
|
|
627
|
+
const c = r.normal();
|
|
628
628
|
a = new B(
|
|
629
|
-
i.clone().add(
|
|
630
|
-
i.clone().add(
|
|
629
|
+
i.clone().add(c.clone().multiplyScalar(10)),
|
|
630
|
+
i.clone().add(c.multiplyScalar(-10))
|
|
631
631
|
);
|
|
632
632
|
} else a = null;
|
|
633
633
|
}
|
|
634
634
|
};
|
|
635
635
|
}
|
|
636
636
|
}
|
|
637
|
-
class
|
|
637
|
+
class bn extends O {
|
|
638
638
|
static name = "DrawLine";
|
|
639
|
-
container = new
|
|
639
|
+
container = new p.Group();
|
|
640
640
|
interruptKeys = ["escape"];
|
|
641
641
|
withdrawalKeys = ["control", "z"];
|
|
642
642
|
shortcutKeys = ["control", "l"];
|
|
@@ -651,24 +651,24 @@ class yn extends O {
|
|
|
651
651
|
* @param next
|
|
652
652
|
*/
|
|
653
653
|
selectPoint(e) {
|
|
654
|
-
let t = this.parent?.findComponentByName("Editor"), n = null, o = null, s = [], a =
|
|
655
|
-
new
|
|
656
|
-
new
|
|
657
|
-
new
|
|
658
|
-
new
|
|
654
|
+
let t = this.parent?.findComponentByName("Editor"), n = null, o = null, s = [], a = this.renderer.createCircle(L.zero(), { color: 65280 }), l = t.domContainer.domElement, r = new fe([], 16711935), i = new fe([
|
|
655
|
+
new p.Vector3(-1e4, 0, 0),
|
|
656
|
+
new p.Vector3(1e4, 0, 0),
|
|
657
|
+
new p.Vector3(0, -1e4, 0),
|
|
658
|
+
new p.Vector3(0, 1e4, 0)
|
|
659
659
|
], 16711935);
|
|
660
|
-
i.material = new
|
|
660
|
+
i.material = new p.LineDashedMaterial({
|
|
661
661
|
color: 4235007,
|
|
662
662
|
dashSize: 0.1,
|
|
663
663
|
gapSize: 0.1,
|
|
664
664
|
linewidth: 0.1
|
|
665
|
-
}), this.container.add(
|
|
666
|
-
const
|
|
667
|
-
|
|
668
|
-
},
|
|
669
|
-
let
|
|
670
|
-
const f = this.createPointerMove((
|
|
671
|
-
|
|
665
|
+
}), this.container.add(r);
|
|
666
|
+
const c = () => {
|
|
667
|
+
r.setPoint(...s, n, o), i.position.copy(o), this.container.add(i), i.computeLineDistances();
|
|
668
|
+
}, m = new p.Vector3();
|
|
669
|
+
let w;
|
|
670
|
+
const f = this.createPointerMove((u, h, E) => {
|
|
671
|
+
m.set(u.x, u.y, 0), this.dispatchEvent({ type: "pointerMove", point: m }), w = E, h ? (a.position.set(u.x, u.y, 0), this.container.add(a), l.style.cursor = "none") : (a.removeFromParent(), l.style.cursor = "crosshair"), n && o && (c(), o.copy(m));
|
|
672
672
|
});
|
|
673
673
|
this.addEventRecord(
|
|
674
674
|
"clear",
|
|
@@ -676,24 +676,24 @@ class yn extends O {
|
|
|
676
676
|
t.eventInput.addEventListener("codeChange", async () => {
|
|
677
677
|
if (t.eventInput.isKeyDown("mouse_0")) {
|
|
678
678
|
if (!n) {
|
|
679
|
-
n =
|
|
679
|
+
n = m.clone(), o = m.clone(), c(), f.setBaseLine(w ?? null, L.from(n));
|
|
680
680
|
return;
|
|
681
681
|
}
|
|
682
|
-
o =
|
|
683
|
-
const
|
|
684
|
-
f.setBaseLine(
|
|
682
|
+
o = m.clone(), s.push(n.clone(), o.clone());
|
|
683
|
+
const u = new B(L.from(n), L.from(o));
|
|
684
|
+
f.setBaseLine(u, u.end), n.copy(o), c();
|
|
685
685
|
} else if (t.eventInput.isOnlyKeyDowns(this.withdrawalKeys)) {
|
|
686
686
|
if (s.length) {
|
|
687
|
-
const { point:
|
|
688
|
-
if (s.pop(), o?.copy(
|
|
689
|
-
const
|
|
690
|
-
f.setBaseLine(
|
|
687
|
+
const { point: u } = t.renderManager.adsorption();
|
|
688
|
+
if (s.pop(), o?.copy(u), n?.copy(s.pop()), c(), s.length >= 2) {
|
|
689
|
+
const h = new B(L.from(s[s.length - 2]), L.from(s[s.length - 1]));
|
|
690
|
+
f.setBaseLine(h, h.end);
|
|
691
691
|
}
|
|
692
692
|
}
|
|
693
693
|
} else t.eventInput.isKeyDowns(this.confirmKeys) && e(s);
|
|
694
694
|
}),
|
|
695
695
|
function() {
|
|
696
|
-
|
|
696
|
+
r.removeFromParent(), a.removeFromParent(), i.removeFromParent();
|
|
697
697
|
}
|
|
698
698
|
);
|
|
699
699
|
}
|
|
@@ -703,7 +703,7 @@ class yn extends O {
|
|
|
703
703
|
end(e, t) {
|
|
704
704
|
const n = [];
|
|
705
705
|
for (let o = 0; o < t.length; o += 2)
|
|
706
|
-
n.push(new B(
|
|
706
|
+
n.push(new B(L.from(t[o]), L.from(t[o + 1])));
|
|
707
707
|
e(n);
|
|
708
708
|
}
|
|
709
709
|
/** 执行完成
|
|
@@ -727,7 +727,7 @@ class yn extends O {
|
|
|
727
727
|
}
|
|
728
728
|
class it extends O {
|
|
729
729
|
static name = "Default";
|
|
730
|
-
container = new
|
|
730
|
+
container = new p.Group();
|
|
731
731
|
onAddFromParent() {
|
|
732
732
|
const e = this.editor, t = e.commandManager;
|
|
733
733
|
e.container.add(this.container), t.addCommandFlow("default").add(this.start.bind(this)).addEventListener("finally", this.finally.bind(this)), t.addEventListener("startedBefore", (n) => {
|
|
@@ -735,7 +735,7 @@ class it extends O {
|
|
|
735
735
|
}), t.addEventListener("finally", (n) => n.name !== "default" && t.start("default")), e.eventInput.addCancelDefaultBehavior(() => e.eventInput.isOnlyKeyDowns(["control", "g"]));
|
|
736
736
|
}
|
|
737
737
|
selectLines = [];
|
|
738
|
-
selectLineObject3D = new
|
|
738
|
+
selectLineObject3D = new p.Mesh();
|
|
739
739
|
/** 添加选择的线段
|
|
740
740
|
* @param lineSegment
|
|
741
741
|
*/
|
|
@@ -778,63 +778,63 @@ class it extends O {
|
|
|
778
778
|
* @param next
|
|
779
779
|
*/
|
|
780
780
|
start() {
|
|
781
|
-
const e = this.editor, t = e.eventInput, n = new
|
|
781
|
+
const e = this.editor, t = e.eventInput, n = new p.Mesh(), o = e.domContainer.domElement;
|
|
782
782
|
let s = null;
|
|
783
|
-
n.position.z = 1e-3, this.selectLineObject3D.position.z = n.position.z + 1e-3, n.material = new
|
|
783
|
+
n.position.z = 1e-3, this.selectLineObject3D.position.z = n.position.z + 1e-3, n.material = new p.MeshBasicMaterial({ color: 55561 });
|
|
784
784
|
const a = () => {
|
|
785
|
-
const
|
|
786
|
-
this.container.add(
|
|
785
|
+
const r = e.pointerPosition.clone(), i = e.pointerPosition.clone(), c = new p.Mesh();
|
|
786
|
+
this.container.add(c), c.position.z = 0.05, c.material = new p.MeshBasicMaterial({
|
|
787
787
|
color: 16777215,
|
|
788
788
|
transparent: !0,
|
|
789
789
|
opacity: 0.5
|
|
790
790
|
});
|
|
791
|
-
const
|
|
792
|
-
const
|
|
793
|
-
p,
|
|
794
|
-
x,
|
|
795
|
-
0,
|
|
791
|
+
const m = () => {
|
|
792
|
+
const u = Math.min(r.x, i.x), h = Math.max(r.x, i.x), E = Math.min(r.y, i.y), b = Math.max(r.y, i.y), D = [
|
|
796
793
|
u,
|
|
794
|
+
b,
|
|
795
|
+
0,
|
|
796
|
+
h,
|
|
797
797
|
E,
|
|
798
798
|
0,
|
|
799
|
-
|
|
800
|
-
|
|
799
|
+
h,
|
|
800
|
+
b,
|
|
801
801
|
0,
|
|
802
|
-
|
|
803
|
-
|
|
802
|
+
u,
|
|
803
|
+
b,
|
|
804
804
|
0,
|
|
805
|
-
|
|
805
|
+
u,
|
|
806
806
|
E,
|
|
807
807
|
0,
|
|
808
|
-
|
|
808
|
+
h,
|
|
809
809
|
E,
|
|
810
810
|
0
|
|
811
811
|
];
|
|
812
|
-
|
|
813
|
-
},
|
|
814
|
-
i.copy(e.pointerPosition),
|
|
812
|
+
c.geometry = e.renderManager.createGeometry({ position: D }, D.length / 3);
|
|
813
|
+
}, w = () => {
|
|
814
|
+
i.copy(e.pointerPosition), m();
|
|
815
815
|
}, f = () => {
|
|
816
|
-
document.removeEventListener("mousemove",
|
|
817
|
-
const
|
|
818
|
-
this.removeSelectLineAll(),
|
|
816
|
+
document.removeEventListener("mousemove", w), document.removeEventListener("mouseup", f), c.removeFromParent();
|
|
817
|
+
const u = Math.min(r.x, i.x), h = Math.max(r.x, i.x), E = Math.min(r.y, i.y), b = Math.max(r.y, i.y), D = new Ze(u, h, E, b), F = e.renderManager.quadtree.queryBox(D);
|
|
818
|
+
this.removeSelectLineAll(), F.forEach((Z) => this.addSelectLine(Z.line)), this.updateSelectLinesGeometry();
|
|
819
819
|
};
|
|
820
|
-
document.addEventListener("mousemove",
|
|
821
|
-
},
|
|
820
|
+
document.addEventListener("mousemove", w), document.addEventListener("mouseup", f);
|
|
821
|
+
}, l = this.renderer.createText("", new p.Vector3(0, 0, 0), {
|
|
822
822
|
background: "rgba(0,0,0,0.5)",
|
|
823
823
|
padding: "2px",
|
|
824
824
|
borderRadius: "2px"
|
|
825
825
|
}, this.container);
|
|
826
|
-
|
|
826
|
+
l.visible = !1, this.addEventRecord(
|
|
827
827
|
"clear",
|
|
828
828
|
// 注册鼠标指针位置变化事件
|
|
829
829
|
e.addEventListener("pointerPositionChange", () => {
|
|
830
|
-
const { line:
|
|
831
|
-
if (
|
|
832
|
-
const i =
|
|
833
|
-
n.geometry = e.renderManager.createGeometry({ position: i.createGeometry() }, 6), this.container.add(n), o.style.cursor = "pointer", s =
|
|
834
|
-
const
|
|
835
|
-
|
|
830
|
+
const { line: r } = e.renderManager.adsorption();
|
|
831
|
+
if (r) {
|
|
832
|
+
const i = r.expandToRectangle(0.025, "bothSides");
|
|
833
|
+
n.geometry = e.renderManager.createGeometry({ position: i.createGeometry() }, 6), this.container.add(n), o.style.cursor = "pointer", s = r;
|
|
834
|
+
const c = r.center;
|
|
835
|
+
l.element.innerText = parseInt(r.length() * 1e3 + "") + " mm", l.position.set(c.x, c.y, 0), l.visible = !0;
|
|
836
836
|
} else
|
|
837
|
-
n.removeFromParent(), o.style.cursor = "default", s = null,
|
|
837
|
+
n.removeFromParent(), o.style.cursor = "default", s = null, l.visible = !1;
|
|
838
838
|
}),
|
|
839
839
|
t.addEventListener("codeChange", () => {
|
|
840
840
|
if (t.isKeyDown("mouse_0")) {
|
|
@@ -851,7 +851,7 @@ class it extends O {
|
|
|
851
851
|
} else t.isKeyDowns(["control", "z"]) ? e.commandManager.rollback() : t.isKeyDowns(["control", "y"]) && e.commandManager.revokeRollback();
|
|
852
852
|
}),
|
|
853
853
|
function() {
|
|
854
|
-
n.removeFromParent(),
|
|
854
|
+
n.removeFromParent(), l.removeFromParent();
|
|
855
855
|
}
|
|
856
856
|
);
|
|
857
857
|
}
|
|
@@ -862,7 +862,7 @@ class it extends O {
|
|
|
862
862
|
this.canceEventRecord("clear"), this.removeSelectLineAll(), this.updateSelectLinesGeometry();
|
|
863
863
|
}
|
|
864
864
|
}
|
|
865
|
-
class
|
|
865
|
+
class xn extends Ye {
|
|
866
866
|
list = [];
|
|
867
867
|
rollbacklist = [];
|
|
868
868
|
revokeRollbacklist = [];
|
|
@@ -890,7 +890,7 @@ class bn extends Ye {
|
|
|
890
890
|
return this.revokeRollbacklist.push(e), this;
|
|
891
891
|
}
|
|
892
892
|
}
|
|
893
|
-
class
|
|
893
|
+
class Cn extends Ye {
|
|
894
894
|
commandFlowMap = /* @__PURE__ */ new Map();
|
|
895
895
|
lock = !1;
|
|
896
896
|
abortController = null;
|
|
@@ -917,7 +917,7 @@ class xn extends Ye {
|
|
|
917
917
|
*/
|
|
918
918
|
addCommandFlow(e) {
|
|
919
919
|
if (this.commandFlowMap.has(e)) throw new Error(`${e} 命令已经存在`);
|
|
920
|
-
const t = new
|
|
920
|
+
const t = new xn();
|
|
921
921
|
return this.commandFlowMap.set(e, t), t;
|
|
922
922
|
}
|
|
923
923
|
executionPromise = null;
|
|
@@ -941,8 +941,8 @@ class xn extends Ye {
|
|
|
941
941
|
try {
|
|
942
942
|
for (let s = n; s < o.list.length; s++) {
|
|
943
943
|
const a = o.list[s];
|
|
944
|
-
if (o.dispatchEvent({ type: "executing", index: s }), this.dispatchEvent({ type: "executing", name: e, index: s }), t = await new Promise((
|
|
945
|
-
this.resolve =
|
|
944
|
+
if (o.dispatchEvent({ type: "executing", index: s }), this.dispatchEvent({ type: "executing", name: e, index: s }), t = await new Promise((l) => {
|
|
945
|
+
this.resolve = l, a(l, t);
|
|
946
946
|
}), this.abortController.signal.aborted) {
|
|
947
947
|
o.dispatchEvent({ type: "executionInterrupt", index: s }), this.dispatchEvent({ type: "executionInterrupt", name: e, index: s }), this.dispatchEvent({ type: "cancel", name: e });
|
|
948
948
|
break;
|
|
@@ -995,65 +995,65 @@ class xn extends Ye {
|
|
|
995
995
|
}
|
|
996
996
|
}
|
|
997
997
|
}
|
|
998
|
-
const
|
|
998
|
+
const En = "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", Ln = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
999
999
|
__proto__: null,
|
|
1000
|
-
default:
|
|
1001
|
-
}, 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",
|
|
1000
|
+
default: En
|
|
1001
|
+
}, 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", kn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1002
1002
|
__proto__: null,
|
|
1003
1003
|
default: Mn
|
|
1004
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1005
|
-
__proto__: null,
|
|
1006
|
-
default: kn
|
|
1007
|
-
}, 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({
|
|
1004
|
+
}, Symbol.toStringTag, { value: "Module" })), In = "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", Pn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1008
1005
|
__proto__: null,
|
|
1009
|
-
default:
|
|
1010
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1006
|
+
default: In
|
|
1007
|
+
}, Symbol.toStringTag, { value: "Module" })), Dn = "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", An = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1011
1008
|
__proto__: null,
|
|
1012
|
-
default:
|
|
1013
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1009
|
+
default: Dn
|
|
1010
|
+
}, Symbol.toStringTag, { value: "Module" })), Sn = "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", _n = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1014
1011
|
__proto__: null,
|
|
1015
|
-
default:
|
|
1016
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1012
|
+
default: Sn
|
|
1013
|
+
}, Symbol.toStringTag, { value: "Module" })), Bn = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1757902601497'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='9801'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M761.344%20119.296H226.816c-18.944%200-39.424%2011.776-39.424%2030.72V921.6h614.4V148.48c0.512-18.944-22.016-29.184-40.448-29.184z%20m-537.6%20768c-2.048%200-2.048%200%200%200L221.696%20163.84c0-5.12%205.12-10.24%2010.24-10.24h522.24c8.704%200%2013.824%205.12%2013.824%2013.824v720.384s0%201.536-1.536%201.536h-15.36V194.56c0-16.896-8.704-24.064-29.184-24.064H266.24c-18.944%200-27.136%208.704-27.136%2024.064v692.736h-15.36z%20m49.152%200V204.8H716.8v682.496H272.896z'%20p-id='9802'%3e%3c/path%3e%3cpath%20d='M648.704%20508.416c-16.896%200-32.256%2013.824-32.256%2032.256%200%2016.896%2013.824%2032.256%2032.256%2032.256s32.256-13.824%2032.256-32.256c0-16.896-13.824-32.256-32.256-32.256z'%20p-id='9803'%3e%3c/path%3e%3c/svg%3e", Nn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1017
1014
|
__proto__: null,
|
|
1018
|
-
default:
|
|
1019
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1015
|
+
default: Bn
|
|
1016
|
+
}, Symbol.toStringTag, { value: "Module" })), Rn = "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({
|
|
1020
1017
|
__proto__: null,
|
|
1021
|
-
default:
|
|
1022
|
-
}, Symbol.toStringTag, { value: "Module" })), zn = "data:image/svg+xml,%3csvg%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%
|
|
1018
|
+
default: Rn
|
|
1019
|
+
}, Symbol.toStringTag, { value: "Module" })), zn = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1757902422799'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='1735'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M843.2%20726.4c-20.2%200-39.2%205.2-55.8%2014.3L283.8%20237.2c9-16.5%2014.1-35.4%2014.1-55.5%200-64.2-52.3-116.5-116.5-116.5S65%20117.4%2065%20181.6s52.3%20116.5%20116.5%20116.5c20.2%200%2039.2-5.2%2055.8-14.2l503.5%20503.5c-9%2016.5-14.1%2035.4-14.1%2055.5%200%2064.2%2052.3%20116.5%20116.5%20116.5s116.5-52.3%20116.5-116.5-52.3-116.5-116.5-116.5zM181.4%20232.1c-27.8%200-50.5-22.6-50.5-50.5s22.6-50.5%2050.5-50.5%2050.5%2022.6%2050.5%2050.5-22.6%2050.5-50.5%2050.5z%20m661.8%20661.3c-27.8%200-50.5-22.6-50.5-50.5%200-27.8%2022.6-50.5%2050.5-50.5s50.5%2022.6%2050.5%2050.5c0%2027.8-22.7%2050.5-50.5%2050.5z'%20fill='%23231815'%20p-id='1736'%3e%3c/path%3e%3c/svg%3e", Fn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1023
1020
|
__proto__: null,
|
|
1024
1021
|
default: zn
|
|
1025
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1022
|
+
}, 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", Tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1026
1023
|
__proto__: null,
|
|
1027
|
-
default:
|
|
1028
|
-
}, Symbol.toStringTag, { value: "Module" })), Vn = "data:image/svg+xml,%3csvg%20viewBox='0%200%
|
|
1024
|
+
default: Kn
|
|
1025
|
+
}, Symbol.toStringTag, { value: "Module" })), Vn = "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({
|
|
1029
1026
|
__proto__: null,
|
|
1030
1027
|
default: Vn
|
|
1031
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1028
|
+
}, Symbol.toStringTag, { value: "Module" })), Gn = "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", Qn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1032
1029
|
__proto__: null,
|
|
1033
|
-
default:
|
|
1034
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1030
|
+
default: Gn
|
|
1031
|
+
}, Symbol.toStringTag, { value: "Module" })), Hn = "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", Wn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1035
1032
|
__proto__: null,
|
|
1036
|
-
default:
|
|
1037
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1033
|
+
default: Hn
|
|
1034
|
+
}, Symbol.toStringTag, { value: "Module" })), Jn = "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", Un = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1038
1035
|
__proto__: null,
|
|
1039
|
-
default:
|
|
1040
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1036
|
+
default: Jn
|
|
1037
|
+
}, 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='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", Zn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1041
1038
|
__proto__: null,
|
|
1042
|
-
default:
|
|
1043
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1039
|
+
default: qn
|
|
1040
|
+
}, Symbol.toStringTag, { value: "Module" })), Yn = "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", Xn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1044
1041
|
__proto__: null,
|
|
1045
|
-
default:
|
|
1046
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1047
|
-
|
|
1042
|
+
default: Yn
|
|
1043
|
+
}, 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='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", eo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1044
|
+
__proto__: null,
|
|
1045
|
+
default: $n
|
|
1046
|
+
}, Symbol.toStringTag, { value: "Module" })), to = "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==", no = new p.TextureLoader(), oo = no.load(to);
|
|
1047
|
+
class so extends De {
|
|
1048
1048
|
static name = "RenderManager";
|
|
1049
|
-
container = new
|
|
1049
|
+
container = new p.Group();
|
|
1050
1050
|
lines = [];
|
|
1051
|
-
pointVirtualGrid = new
|
|
1051
|
+
pointVirtualGrid = new Oe();
|
|
1052
1052
|
quadtree = new ze(new Ze());
|
|
1053
|
-
verticalReferenceLineFlag = new
|
|
1053
|
+
verticalReferenceLineFlag = new p.Mesh(new p.PlaneGeometry(0.3, 0.3), new p.MeshBasicMaterial({ map: oo, color: 58111, transparent: !0 }));
|
|
1054
1054
|
onAddFromParent() {
|
|
1055
1055
|
const e = this.dxfLineModel;
|
|
1056
|
-
this.editor.container.add(this.container), this.editor.container.add(e.dxfModelGroup), e.dxfLineModel.material = new
|
|
1056
|
+
this.editor.container.add(this.container), this.editor.container.add(e.dxfModelGroup), e.dxfLineModel.material = new p.LineBasicMaterial({
|
|
1057
1057
|
transparent: !0,
|
|
1058
1058
|
opacity: 0.5,
|
|
1059
1059
|
color: 16777215
|
|
@@ -1070,7 +1070,7 @@ class oo extends Se {
|
|
|
1070
1070
|
return;
|
|
1071
1071
|
} else
|
|
1072
1072
|
this.updatedMode = "dxf";
|
|
1073
|
-
this.pointVirtualGrid = new
|
|
1073
|
+
this.pointVirtualGrid = new Oe();
|
|
1074
1074
|
const e = this.dxf.box.clone().expansion(Math.max(this.dxf.box.width, this.dxf.box.height) * 2);
|
|
1075
1075
|
(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) => {
|
|
1076
1076
|
t.userData.isDoor || this.addLine(t.clone());
|
|
@@ -1138,9 +1138,9 @@ class oo extends Se {
|
|
|
1138
1138
|
this.lines.forEach((s) => {
|
|
1139
1139
|
if (s.points.forEach((a) => {
|
|
1140
1140
|
s.userData.isDoor ? n.push(a.x, a.y, 0) : t.push(a.x, a.y, 0);
|
|
1141
|
-
}), s.userData.isWindow && s.userData.drawWindow && s.userData.drawWindow.forEach(({ width: a, p:
|
|
1142
|
-
const
|
|
1143
|
-
o.push(
|
|
1141
|
+
}), s.userData.isWindow && s.userData.drawWindow && s.userData.drawWindow.forEach(({ width: a, p: l }) => {
|
|
1142
|
+
const r = L.from(l), i = s.direction(), c = r.clone().add(i.clone().multiplyScalar(a * 0.5)), m = r.clone().add(i.clone().multiplyScalar(-a * 0.5));
|
|
1143
|
+
o.push(c.x, c.y, 1e-3), o.push(m.x, m.y, 1e-3);
|
|
1144
1144
|
}), s.userData.isVerticalReferenceLine) {
|
|
1145
1145
|
const a = s.center;
|
|
1146
1146
|
this.verticalReferenceLineFlag.position.set(a.x, a.y, 0), this.container.add(this.verticalReferenceLineFlag);
|
|
@@ -1164,25 +1164,32 @@ class oo extends Se {
|
|
|
1164
1164
|
* @returns
|
|
1165
1165
|
*/
|
|
1166
1166
|
adsorption(e = 0.04, t = this.pointVirtualGrid, n = this.quadtree) {
|
|
1167
|
-
const o = this.parent?.findComponentByName("Editor"), s =
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1167
|
+
const o = this.parent?.findComponentByName("Editor"), s = L.from(o.pointerPosition);
|
|
1168
|
+
let a = n.queryCircle(s, e);
|
|
1169
|
+
if (a.length) {
|
|
1170
|
+
let l = a.map((r) => r.line.projectPoint(s));
|
|
1171
|
+
if (a = a.filter((r, i) => !!l[i]), l = l.filter((r, i) => !!l[i]), l.sort((r, i) => r && i ? r.distance(s) - i.distance(s) : 0), l.length) {
|
|
1172
|
+
const r = a[0].line, i = l[0];
|
|
1173
|
+
return r.start.distance(s) < e * 1.5 ? {
|
|
1174
|
+
point: new p.Vector3(r.start.x, r.start.y, 0),
|
|
1175
|
+
find: !0,
|
|
1176
|
+
mode: "point",
|
|
1177
|
+
line: r
|
|
1178
|
+
} : r.end.distance(s) < e * 1.5 ? {
|
|
1179
|
+
point: new p.Vector3(r.end.x, r.end.y, 0),
|
|
1180
|
+
find: !0,
|
|
1181
|
+
mode: "point",
|
|
1182
|
+
line: r
|
|
1183
|
+
} : {
|
|
1184
|
+
point: new p.Vector3(i.x, i.y, 0),
|
|
1185
|
+
find: !0,
|
|
1186
|
+
mode: "line",
|
|
1187
|
+
line: r
|
|
1188
|
+
};
|
|
1189
|
+
}
|
|
1183
1190
|
}
|
|
1184
1191
|
return {
|
|
1185
|
-
point: new
|
|
1192
|
+
point: new p.Vector3(o.pointerPosition.x, o.pointerPosition.y, 0),
|
|
1186
1193
|
find: !1
|
|
1187
1194
|
};
|
|
1188
1195
|
}
|
|
@@ -1190,9 +1197,9 @@ class oo extends Se {
|
|
|
1190
1197
|
* @param rectangle
|
|
1191
1198
|
*/
|
|
1192
1199
|
createGeometry(e, t) {
|
|
1193
|
-
const n = new
|
|
1200
|
+
const n = new p.BufferGeometry();
|
|
1194
1201
|
return Object.keys(e).forEach((o) => {
|
|
1195
|
-
n.setAttribute("position", new
|
|
1202
|
+
n.setAttribute("position", new p.BufferAttribute(new Float32Array(e[o]), e[o].length / t));
|
|
1196
1203
|
}), n;
|
|
1197
1204
|
}
|
|
1198
1205
|
/**
|
|
@@ -1255,9 +1262,9 @@ class oo extends Se {
|
|
|
1255
1262
|
return this.parent?.findComponentByName("DxfLineModel");
|
|
1256
1263
|
}
|
|
1257
1264
|
}
|
|
1258
|
-
class
|
|
1265
|
+
class ao extends O {
|
|
1259
1266
|
static name = "DrawDoorLine";
|
|
1260
|
-
container = new
|
|
1267
|
+
container = new p.Group();
|
|
1261
1268
|
interruptKeys = ["escape"];
|
|
1262
1269
|
shortcutKeys = ["control", "m"];
|
|
1263
1270
|
commandName = "draw-door-line";
|
|
@@ -1274,32 +1281,32 @@ class so extends O {
|
|
|
1274
1281
|
* @param next
|
|
1275
1282
|
*/
|
|
1276
1283
|
selectPoint(e) {
|
|
1277
|
-
let t = this.parent?.findComponentByName("Editor"), n = null, o =
|
|
1278
|
-
new
|
|
1279
|
-
new
|
|
1280
|
-
new
|
|
1281
|
-
new
|
|
1284
|
+
let t = this.parent?.findComponentByName("Editor"), n = null, o = this.renderer.createCircle(L.zero(), { color: 65280 }), s = new fe([], 16711935), a = new fe([
|
|
1285
|
+
new p.Vector3(-1e4, 0, 0),
|
|
1286
|
+
new p.Vector3(1e4, 0, 0),
|
|
1287
|
+
new p.Vector3(0, -1e4, 0),
|
|
1288
|
+
new p.Vector3(0, 1e4, 0)
|
|
1282
1289
|
], 16711935);
|
|
1283
|
-
a.material = new
|
|
1290
|
+
a.material = new p.LineDashedMaterial({
|
|
1284
1291
|
color: 4235007,
|
|
1285
1292
|
dashSize: 0.1,
|
|
1286
1293
|
gapSize: 0.1,
|
|
1287
1294
|
linewidth: 0.1
|
|
1288
1295
|
}), this.container.add(s);
|
|
1289
|
-
let
|
|
1296
|
+
let l = null;
|
|
1290
1297
|
this.addEventRecord(
|
|
1291
1298
|
"clear",
|
|
1292
1299
|
t.addEventListener("pointerPositionChange", () => {
|
|
1293
|
-
const { point:
|
|
1294
|
-
n && s.setPoint(n,
|
|
1300
|
+
const { point: r, find: i } = t.renderManager.adsorption();
|
|
1301
|
+
n && s.setPoint(n, r), this.dispatchEvent({ type: "pointerMove", point: r }), i ? (o.position.set(r.x, r.y, 0), this.container.add(o), this.domElement.style.cursor = "none", l = r.clone()) : (l = null, o.removeFromParent(), this.domElement.style.cursor = "no-drop");
|
|
1295
1302
|
}),
|
|
1296
1303
|
t.eventInput.addEventListener("codeChange", async () => {
|
|
1297
|
-
if (t.eventInput.isKeyDown("mouse_0") &&
|
|
1304
|
+
if (t.eventInput.isKeyDown("mouse_0") && l) {
|
|
1298
1305
|
if (!n) {
|
|
1299
|
-
n =
|
|
1306
|
+
n = l.clone();
|
|
1300
1307
|
return;
|
|
1301
1308
|
}
|
|
1302
|
-
e([n.clone(),
|
|
1309
|
+
e([n.clone(), l.clone()]);
|
|
1303
1310
|
}
|
|
1304
1311
|
}),
|
|
1305
1312
|
function() {
|
|
@@ -1315,22 +1322,22 @@ class so extends O {
|
|
|
1315
1322
|
end(e, t) {
|
|
1316
1323
|
const n = [];
|
|
1317
1324
|
for (let o = 0; o < t.length; o += 2) {
|
|
1318
|
-
const s =
|
|
1325
|
+
const s = L.from(t[o]), a = L.from(t[o + 1]), l = this.renderManager.quadtree.queryCircle(s, 1e-3)[0].line, r = this.renderManager.quadtree.queryCircle(a, 1e-3)[0].line;
|
|
1319
1326
|
let i = null;
|
|
1320
|
-
|
|
1321
|
-
oldLine:
|
|
1327
|
+
l === r && (i = {
|
|
1328
|
+
oldLine: l,
|
|
1322
1329
|
newLine1: new B(
|
|
1323
|
-
|
|
1324
|
-
|
|
1330
|
+
l.start,
|
|
1331
|
+
l.start.distance(s) < l.start.distance(a) ? s.clone() : a.clone()
|
|
1325
1332
|
),
|
|
1326
1333
|
newLine2: new B(
|
|
1327
|
-
|
|
1328
|
-
|
|
1334
|
+
l.end,
|
|
1335
|
+
l.end.distance(s) < l.end.distance(a) ? s.clone() : a.clone()
|
|
1329
1336
|
)
|
|
1330
1337
|
});
|
|
1331
|
-
const
|
|
1332
|
-
|
|
1333
|
-
line:
|
|
1338
|
+
const c = new B(s, a);
|
|
1339
|
+
c.userData.isDoor = !0, c.userData.doorDirectConnection = !0, n.push({
|
|
1340
|
+
line: c,
|
|
1334
1341
|
option: i
|
|
1335
1342
|
});
|
|
1336
1343
|
}
|
|
@@ -1359,9 +1366,9 @@ class so extends O {
|
|
|
1359
1366
|
return this.completed(e), e;
|
|
1360
1367
|
}
|
|
1361
1368
|
}
|
|
1362
|
-
class
|
|
1369
|
+
class io extends O {
|
|
1363
1370
|
static name = "DrawWindow";
|
|
1364
|
-
container = new
|
|
1371
|
+
container = new p.Group();
|
|
1365
1372
|
interruptKeys = ["escape"];
|
|
1366
1373
|
shortcutKeys = ["control", "q"];
|
|
1367
1374
|
commandName = "draw-window-line";
|
|
@@ -1374,10 +1381,10 @@ class ao extends O {
|
|
|
1374
1381
|
* @param next
|
|
1375
1382
|
*/
|
|
1376
1383
|
selectPointStart(e) {
|
|
1377
|
-
let t = null, n =
|
|
1384
|
+
let t = null, n = this.renderer.createCircle(L.zero(), { color: 16711935 }), o = null;
|
|
1378
1385
|
this.addEventRecord("selectPointStart").add(this.editor.addEventListener("pointerPositionChange", () => {
|
|
1379
|
-
const { point: s, line: a, find:
|
|
1380
|
-
this.dispatchEvent({ type: "pointerMove", point: s }),
|
|
1386
|
+
const { point: s, line: a, find: l } = this.editor.renderManager.adsorption();
|
|
1387
|
+
this.dispatchEvent({ type: "pointerMove", point: s }), l ? (this.domElement.style.cursor = "none", n.position.copy(s), o = a, t = s.clone(), this.container.add(n)) : (this.domElement.style.cursor = "no-drop", t = null, n.removeFromParent());
|
|
1381
1388
|
})).add(this.eventInput.addEventListener("codeChange", () => {
|
|
1382
1389
|
this.eventInput.isKeyDown("mouse_0") && t && (this.canceEventRecord("selectPointStart"), e({ point: t, line: o }));
|
|
1383
1390
|
})), this.addEventRecord("clear").add(() => n.removeFromParent());
|
|
@@ -1386,10 +1393,10 @@ class ao extends O {
|
|
|
1386
1393
|
* @param next
|
|
1387
1394
|
*/
|
|
1388
1395
|
selectPointEnd(e, { point: t, line: n }) {
|
|
1389
|
-
let o = null, s =
|
|
1396
|
+
let o = null, s = this.renderer.createCircle(L.zero(), { color: 16711935 });
|
|
1390
1397
|
this.addEventRecord("clear").add(() => s.removeFromParent()).add(this.editor.addEventListener("pointerPositionChange", () => {
|
|
1391
|
-
const { point: a, find:
|
|
1392
|
-
this.dispatchEvent({ type: "pointerMove", point: a }),
|
|
1398
|
+
const { point: a, find: l, line: r } = this.editor.renderManager.adsorption();
|
|
1399
|
+
this.dispatchEvent({ type: "pointerMove", point: a }), l && r === n ? (this.domElement.style.cursor = "none", s.position.copy(a), o = a.clone(), this.container.add(s)) : (this.domElement.style.cursor = "no-drop", o = null, s.removeFromParent());
|
|
1393
1400
|
})).add(this.eventInput.addEventListener("codeChange", () => {
|
|
1394
1401
|
this.eventInput.isKeyDown("mouse_0") && o && e({ line: n, start: t, end: o });
|
|
1395
1402
|
}));
|
|
@@ -1400,12 +1407,12 @@ class ao extends O {
|
|
|
1400
1407
|
* @param points
|
|
1401
1408
|
*/
|
|
1402
1409
|
end(e, { start: t, end: n, line: o }) {
|
|
1403
|
-
const s = new B(
|
|
1404
|
-
p: new
|
|
1405
|
-
width:
|
|
1406
|
-
full: Math.abs(
|
|
1410
|
+
const s = new B(L.from(t), L.from(n)), a = s.center, l = s.length(), r = {
|
|
1411
|
+
p: new p.Vector3(a.x, a.y, 0),
|
|
1412
|
+
width: l,
|
|
1413
|
+
full: Math.abs(l - o.length()) < 0.01
|
|
1407
1414
|
};
|
|
1408
|
-
e({ line: o, doorDataItem:
|
|
1415
|
+
e({ line: o, doorDataItem: r });
|
|
1409
1416
|
}
|
|
1410
1417
|
/** 执行完成
|
|
1411
1418
|
*/
|
|
@@ -1433,7 +1440,7 @@ class ao extends O {
|
|
|
1433
1440
|
}
|
|
1434
1441
|
class le extends O {
|
|
1435
1442
|
static name = "VerticalCorrection";
|
|
1436
|
-
container = new
|
|
1443
|
+
container = new p.Group();
|
|
1437
1444
|
shortcutKeys = ["control", "c"];
|
|
1438
1445
|
shortcutKeys3 = ["shift", "c"];
|
|
1439
1446
|
static commandName = "verticalCorrection";
|
|
@@ -1449,7 +1456,7 @@ class le extends O {
|
|
|
1449
1456
|
* 进入命令约束
|
|
1450
1457
|
*/
|
|
1451
1458
|
constraint(e, t) {
|
|
1452
|
-
Array.isArray(t) ? t.length !== 1 ? (
|
|
1459
|
+
Array.isArray(t) ? t.length !== 1 ? (k({ message: "请选择一条线段", type: "warning" }), this.cancel()) : e(t) : (k({ message: "进入命令失败", type: "warning" }), this.cancel());
|
|
1453
1460
|
}
|
|
1454
1461
|
/**
|
|
1455
1462
|
* @param line0
|
|
@@ -1467,46 +1474,46 @@ class le extends O {
|
|
|
1467
1474
|
* @param id
|
|
1468
1475
|
* @returns
|
|
1469
1476
|
*/
|
|
1470
|
-
setLinePoint(e, t, n, o = "all", s = [], a =
|
|
1477
|
+
setLinePoint(e, t, n, o = "all", s = [], a = At()) {
|
|
1471
1478
|
if (e.userData.setLinePointUUid === a) return [];
|
|
1472
1479
|
e.userData.setLinePointUUid = a;
|
|
1473
|
-
let
|
|
1474
|
-
(o === "start" || o === "all") && (
|
|
1480
|
+
let l = [], r = [];
|
|
1481
|
+
(o === "start" || o === "all") && (l = this.renderManager.pointVirtualGrid.queryPoint(e.start).filter((w) => w.userData !== e)), (o === "end" || o === "all") && (r = this.renderManager.pointVirtualGrid.queryPoint(e.end).filter((w) => w.userData !== e));
|
|
1475
1482
|
const i = e.clone();
|
|
1476
|
-
let
|
|
1477
|
-
t && (e.start.equal(t) || (
|
|
1483
|
+
let c = "";
|
|
1484
|
+
t && (e.start.equal(t) || (c = "start"), s.push({
|
|
1478
1485
|
point: e.start,
|
|
1479
1486
|
oldPoint: e.start.clone(),
|
|
1480
1487
|
newPoint: t,
|
|
1481
1488
|
line: e
|
|
1482
|
-
}), e.start.copy(t)), n && (e.end.equal(n) || (
|
|
1489
|
+
}), e.start.copy(t)), n && (e.end.equal(n) || (c = c === "start" ? "all" : "end"), s.push({
|
|
1483
1490
|
point: e.end,
|
|
1484
1491
|
oldPoint: e.end.clone(),
|
|
1485
1492
|
newPoint: n,
|
|
1486
1493
|
line: e
|
|
1487
1494
|
}), e.end.copy(n));
|
|
1488
|
-
const
|
|
1489
|
-
|
|
1490
|
-
const { point: E, userData:
|
|
1491
|
-
if (
|
|
1492
|
-
if (
|
|
1493
|
-
const
|
|
1494
|
-
if (
|
|
1495
|
+
const m = (w, f, u) => {
|
|
1496
|
+
w.forEach((h) => {
|
|
1497
|
+
const { point: E, userData: b } = h, D = b.start === E ? "start" : "end";
|
|
1498
|
+
if (b.directionEqual(i))
|
|
1499
|
+
if (D === "start") {
|
|
1500
|
+
const F = e.projectPoint(b.end, !1);
|
|
1501
|
+
if (F) return this.setLinePoint(b, f, F, "end", s, a);
|
|
1495
1502
|
} else {
|
|
1496
|
-
const
|
|
1497
|
-
if (
|
|
1503
|
+
const F = e.projectPoint(b.start, !1);
|
|
1504
|
+
if (F) return this.setLinePoint(b, F, f, "start", s, a);
|
|
1498
1505
|
}
|
|
1499
|
-
(
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1506
|
+
(c === "all" || u === c) && this.setLinePoint(
|
|
1507
|
+
b,
|
|
1508
|
+
b.start === E ? f : b.start,
|
|
1509
|
+
b.end === E ? f : b.end,
|
|
1510
|
+
b.start === E ? "end" : "start",
|
|
1504
1511
|
s,
|
|
1505
1512
|
a
|
|
1506
1513
|
);
|
|
1507
1514
|
});
|
|
1508
1515
|
};
|
|
1509
|
-
return
|
|
1516
|
+
return m(l, e.start, "start"), m(r, e.end, "end"), [...l, ...r];
|
|
1510
1517
|
}
|
|
1511
1518
|
/** 修正2
|
|
1512
1519
|
* 第一步:确定需要修复的线段
|
|
@@ -1520,72 +1527,72 @@ class le extends O {
|
|
|
1520
1527
|
*/
|
|
1521
1528
|
correction(e, t = [], n = /* @__PURE__ */ new Set()) {
|
|
1522
1529
|
n.add(e);
|
|
1523
|
-
const o = this.renderManager.quadtree.queryLineSegment(e).filter(({ line: i }) => !(i === e || i.userData.isDoor || n.has(i))).map((i) => i.line), s = e.direction(), [a,
|
|
1524
|
-
const [
|
|
1525
|
-
return
|
|
1530
|
+
const o = this.renderManager.quadtree.queryLineSegment(e).filter(({ line: i }) => !(i === e || i.userData.isDoor || n.has(i))).map((i) => i.line), s = e.direction(), [a, l] = o.reduce((i, c) => {
|
|
1531
|
+
const [m, w] = i;
|
|
1532
|
+
return c.sameEndpoint(e) ? m.push(c) : w.push(c), i;
|
|
1526
1533
|
}, [[], []]);
|
|
1527
1534
|
a.forEach((i) => {
|
|
1528
|
-
const
|
|
1529
|
-
if (Math.abs(90 -
|
|
1530
|
-
const f = e.sameEndpointAsStart(i) ? e.start : e.end,
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
), E =
|
|
1535
|
+
const c = i.direction(), m = s.angleBetween(c, "angle");
|
|
1536
|
+
if (Math.abs(90 - m) > 45) return !1;
|
|
1537
|
+
const f = e.sameEndpointAsStart(i) ? e.start : e.end, u = i.sameEndpointAsStart(e) ? i.end : i.start, h = new B(
|
|
1538
|
+
u.clone().add(s.clone().multiplyScalar(1)),
|
|
1539
|
+
u.clone().add(s.clone().multiplyScalar(-1))
|
|
1540
|
+
), E = h.projectPoint(f, !1);
|
|
1534
1541
|
if (E) {
|
|
1535
|
-
const
|
|
1542
|
+
const b = [];
|
|
1536
1543
|
this.setLinePoint(
|
|
1537
1544
|
i,
|
|
1538
|
-
i.start ===
|
|
1539
|
-
i.end ===
|
|
1540
|
-
i.start ===
|
|
1541
|
-
|
|
1542
|
-
), t.push(
|
|
1545
|
+
i.start === u ? E : i.start,
|
|
1546
|
+
i.end === u ? E : i.end,
|
|
1547
|
+
i.start === u ? "start" : "end",
|
|
1548
|
+
b
|
|
1549
|
+
), t.push(b);
|
|
1543
1550
|
}
|
|
1544
1551
|
return n.add(i), !1;
|
|
1545
1552
|
}), s.copy(e.direction());
|
|
1546
|
-
const
|
|
1547
|
-
const
|
|
1548
|
-
if (
|
|
1553
|
+
const r = (i, c, m) => {
|
|
1554
|
+
const w = e.projectPoint(c);
|
|
1555
|
+
if (w) i.copy(w);
|
|
1549
1556
|
else {
|
|
1550
1557
|
const f = new B(
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
),
|
|
1554
|
-
if (
|
|
1555
|
-
const
|
|
1558
|
+
c.clone().add(s.clone().multiplyScalar(1)),
|
|
1559
|
+
c.clone().add(s.clone().multiplyScalar(-1))
|
|
1560
|
+
), u = f.projectPoint(i, !1);
|
|
1561
|
+
if (u) {
|
|
1562
|
+
const h = [];
|
|
1556
1563
|
this.setLinePoint(
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
), t.push(
|
|
1564
|
+
m,
|
|
1565
|
+
m.start === c ? u : m.start,
|
|
1566
|
+
m.end === c ? u : m.end,
|
|
1567
|
+
m.start === c ? "start" : "end",
|
|
1568
|
+
h
|
|
1569
|
+
), t.push(h);
|
|
1563
1570
|
}
|
|
1564
1571
|
}
|
|
1565
1572
|
};
|
|
1566
|
-
return
|
|
1573
|
+
return l.forEach((i) => {
|
|
1567
1574
|
if (e.containsPoint(i.start))
|
|
1568
|
-
|
|
1575
|
+
r(i.start, i.end, i);
|
|
1569
1576
|
else if (e.containsPoint(i.end))
|
|
1570
|
-
|
|
1577
|
+
r(i.end, i.start, i);
|
|
1571
1578
|
else {
|
|
1572
|
-
const
|
|
1573
|
-
if (
|
|
1574
|
-
const
|
|
1579
|
+
const c = e.getIntersection(i);
|
|
1580
|
+
if (c) {
|
|
1581
|
+
const m = new B(
|
|
1575
1582
|
i.start.clone().add(s.clone().multiplyScalar(1)),
|
|
1576
1583
|
i.start.clone().add(s.clone().multiplyScalar(-1))
|
|
1577
|
-
),
|
|
1578
|
-
if (
|
|
1579
|
-
const
|
|
1580
|
-
this.setLinePoint(i,
|
|
1584
|
+
), w = m.projectPoint(c, !1);
|
|
1585
|
+
if (w) {
|
|
1586
|
+
const h = [];
|
|
1587
|
+
this.setLinePoint(i, w, i.end, "start", h), t.push(h);
|
|
1581
1588
|
}
|
|
1582
1589
|
const f = new B(
|
|
1583
1590
|
i.end.clone().add(s.clone().multiplyScalar(1)),
|
|
1584
1591
|
i.end.clone().add(s.clone().multiplyScalar(-1))
|
|
1585
|
-
),
|
|
1586
|
-
if (
|
|
1587
|
-
const
|
|
1588
|
-
this.setLinePoint(i, i.start,
|
|
1592
|
+
), u = f.projectPoint(c, !1);
|
|
1593
|
+
if (u) {
|
|
1594
|
+
const h = [];
|
|
1595
|
+
this.setLinePoint(i, i.start, u, "end", h), t.push(h);
|
|
1589
1596
|
}
|
|
1590
1597
|
}
|
|
1591
1598
|
}
|
|
@@ -1597,7 +1604,7 @@ class le extends O {
|
|
|
1597
1604
|
*/
|
|
1598
1605
|
axisAlignmentCorrection(e) {
|
|
1599
1606
|
const t = [...this.renderManager.lines];
|
|
1600
|
-
return { newLines:
|
|
1607
|
+
return { newLines: St.correction.call(this, t, e), oldLines: t };
|
|
1601
1608
|
}
|
|
1602
1609
|
/** 开始
|
|
1603
1610
|
* @param next
|
|
@@ -1606,23 +1613,6 @@ class le extends O {
|
|
|
1606
1613
|
const n = performance.now();
|
|
1607
1614
|
e(this.axisAlignment ? this.axisAlignmentCorrection(t[0]) : this.correction(t[0])), console.log("处理时间:", performance.now() - n, "ms");
|
|
1608
1615
|
}
|
|
1609
|
-
/**
|
|
1610
|
-
* 窗户恢复
|
|
1611
|
-
* @param doorLines
|
|
1612
|
-
*/
|
|
1613
|
-
windowRecover(e) {
|
|
1614
|
-
e.forEach((t) => {
|
|
1615
|
-
const n = t.direction();
|
|
1616
|
-
t.userData.drawWindow?.forEach((o) => {
|
|
1617
|
-
const s = A.from(o.p), a = t.projectPoint(
|
|
1618
|
-
s.clone().add(n.clone().multiplyScalar(o.width * 0.5))
|
|
1619
|
-
), d = t.projectPoint(
|
|
1620
|
-
s.clone().add(n.clone().multiplyScalar(o.width * -0.5))
|
|
1621
|
-
), l = new B(a, d), i = l.center;
|
|
1622
|
-
o.p = new m.Vector3(i?.x ?? 0, i?.y ?? 0, o.p.z);
|
|
1623
|
-
});
|
|
1624
|
-
});
|
|
1625
|
-
}
|
|
1626
1616
|
/** 执行完成
|
|
1627
1617
|
* @param data
|
|
1628
1618
|
*/
|
|
@@ -1631,10 +1621,10 @@ class le extends O {
|
|
|
1631
1621
|
const t = [];
|
|
1632
1622
|
e.forEach((n) => {
|
|
1633
1623
|
n.forEach((o) => {
|
|
1634
|
-
const { line: s, newPoint: a, point:
|
|
1635
|
-
|
|
1624
|
+
const { line: s, newPoint: a, point: l } = o;
|
|
1625
|
+
l.copy(a), this.renderManager.removeLine(s), this.renderManager.addLine(s), s.userData.isWindow && t.push(s);
|
|
1636
1626
|
});
|
|
1637
|
-
}),
|
|
1627
|
+
}), Fe(...t);
|
|
1638
1628
|
} else
|
|
1639
1629
|
this.renderManager.removeLines(e.oldLines), this.renderManager.addLines(e.newLines);
|
|
1640
1630
|
this.renderManager.draw();
|
|
@@ -1648,11 +1638,11 @@ class le extends O {
|
|
|
1648
1638
|
for (let n = e.length - 1; n >= 0; n--) {
|
|
1649
1639
|
const o = e[n];
|
|
1650
1640
|
for (let s = o.length - 1; s >= 0; s--) {
|
|
1651
|
-
const a = o[s], { line:
|
|
1652
|
-
i.copy(
|
|
1641
|
+
const a = o[s], { line: l, oldPoint: r, point: i } = a;
|
|
1642
|
+
i.copy(r), this.renderManager.removeLine(l), this.renderManager.addLine(l), l.userData.isWindow && t.push(l);
|
|
1653
1643
|
}
|
|
1654
1644
|
}
|
|
1655
|
-
|
|
1645
|
+
Fe(...t);
|
|
1656
1646
|
} else
|
|
1657
1647
|
this.renderManager.removeLines(e.newLines), this.renderManager.addLines(e.oldLines);
|
|
1658
1648
|
return this.renderManager.draw(), e;
|
|
@@ -1665,55 +1655,31 @@ class le extends O {
|
|
|
1665
1655
|
return this.completed(e), e;
|
|
1666
1656
|
}
|
|
1667
1657
|
}
|
|
1668
|
-
class
|
|
1658
|
+
class X extends O {
|
|
1669
1659
|
static name = "MergeLine";
|
|
1670
1660
|
shortcutKeys = ["control", "g"];
|
|
1671
1661
|
static commandName = "merge-line";
|
|
1672
1662
|
onAddFromParent(e) {
|
|
1673
1663
|
super.onAddFromParent(e);
|
|
1674
|
-
const t = this.commandManager.addCommandFlow(
|
|
1675
|
-
t.addEventListener("finally", this.createFinally()), t.addEventListener("completed", (n) => this.completed(n.data)), this.eventInput.addKeyCombination(
|
|
1676
|
-
this.eventInput.isKeyCombination(
|
|
1664
|
+
const t = this.commandManager.addCommandFlow(X.commandName).add(this.createInterrupt()).add(this.constraint.bind(this)).add(this.mergeLines.bind(this)).addRollback(this.rollback.bind(this)).addRevokeRollback(this.revokeRollback.bind(this));
|
|
1665
|
+
t.addEventListener("finally", this.createFinally()), t.addEventListener("completed", (n) => this.completed(n.data)), this.eventInput.addKeyCombination(X.commandName, this.shortcutKeys), this.eventInput.addEventListener("codeChange", async () => {
|
|
1666
|
+
this.eventInput.isKeyCombination(X.commandName) && await this.commandManager.start(X.commandName, [...this.default.selectLines]);
|
|
1677
1667
|
}), this.eventInput.addCancelDefaultBehavior(() => this.eventInput.isOnlyKeyDowns(this.shortcutKeys));
|
|
1678
1668
|
}
|
|
1679
1669
|
/**
|
|
1680
1670
|
* 进入命令约束
|
|
1681
1671
|
*/
|
|
1682
1672
|
constraint(e, t) {
|
|
1683
|
-
Array.isArray(t) ? t.length < 2 ? (
|
|
1684
|
-
}
|
|
1685
|
-
mergeLine(e, t) {
|
|
1686
|
-
for (let n = 0; n < e.points.length; n++) {
|
|
1687
|
-
const o = e.points[n];
|
|
1688
|
-
for (let s = 0; s < t.points.length; s++) {
|
|
1689
|
-
const a = t.points[s];
|
|
1690
|
-
if (o.equal(a)) {
|
|
1691
|
-
const d = e.points[(n + 1) % 2].clone(), l = t.points[(s + 1) % 2].clone();
|
|
1692
|
-
return new B(d, l);
|
|
1693
|
-
}
|
|
1694
|
-
}
|
|
1695
|
-
}
|
|
1696
|
-
return !1;
|
|
1673
|
+
Array.isArray(t) ? t.length < 2 ? (k({ message: "未执行线段合并,请选择至少两条线段", type: "warning" }), this.cancel()) : e(t) : (k({ message: "进入命令失败", type: "warning" }), this.cancel());
|
|
1697
1674
|
}
|
|
1698
1675
|
/** 开始
|
|
1699
1676
|
* @param next
|
|
1700
1677
|
* @todo 合并所有
|
|
1701
1678
|
*/
|
|
1702
1679
|
mergeLines(e, t) {
|
|
1703
|
-
t = t.filter((
|
|
1704
|
-
const n =
|
|
1705
|
-
|
|
1706
|
-
const o = [], s = [];
|
|
1707
|
-
for (let a = 0; a < t.length; a++) {
|
|
1708
|
-
if (s.indexOf(t[a]) > -1) continue;
|
|
1709
|
-
const d = t[a], l = n.queryPoint(d.start).filter((h) => h.userData !== d && d.isParallel(h.userData, 0.1)), i = n.queryPoint(d.end).filter((h) => h.userData !== d && d.isParallel(h.userData, 0.1)), r = [d];
|
|
1710
|
-
if (l.length && r.push(l[0].userData), i.length && r.push(i[0].userData), r.length > 1) {
|
|
1711
|
-
s.push(...r), s.forEach((v) => v.points.forEach((f) => n.remove(f)));
|
|
1712
|
-
const h = r.reduce((v, f) => this.mergeLine(v, f), r.pop().clone());
|
|
1713
|
-
h.points.forEach((v) => n.insert(v, h)), o.push(h);
|
|
1714
|
-
}
|
|
1715
|
-
}
|
|
1716
|
-
o.length ? (e({ newLines: o, deleteLines: s }), L({ message: "已合并", type: "success" })) : (L({ message: "合并失败,未找到共用点", type: "warning" }), this.commandManager.cancel());
|
|
1680
|
+
t = t.filter((s) => !s.userData.isDoor);
|
|
1681
|
+
const { newLines: n, deleteLines: o } = B.autoMergeLines(t);
|
|
1682
|
+
n.length ? (e({ newLines: n, deleteLines: o }), k({ message: "已合并", type: "success" })) : (k({ message: "合并失败,未找到共用点", type: "warning" }), this.commandManager.cancel());
|
|
1717
1683
|
}
|
|
1718
1684
|
/** 执行完成
|
|
1719
1685
|
* @param data
|
|
@@ -1736,26 +1702,26 @@ class $ extends O {
|
|
|
1736
1702
|
return this.completed(e), e;
|
|
1737
1703
|
}
|
|
1738
1704
|
}
|
|
1739
|
-
class
|
|
1705
|
+
class $ extends O {
|
|
1740
1706
|
static name = "DeleteSelectLine";
|
|
1741
1707
|
shortcutKeys = ["Delete"];
|
|
1742
1708
|
static commandName = "deleteSelectLine";
|
|
1743
1709
|
onAddFromParent(e) {
|
|
1744
|
-
super.onAddFromParent(e), this.commandManager.addCommandFlow(
|
|
1745
|
-
this.eventInput.isKeyCombination(
|
|
1710
|
+
super.onAddFromParent(e), this.commandManager.addCommandFlow($.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($.commandName, this.shortcutKeys), this.eventInput.addEventListener("codeChange", async () => {
|
|
1711
|
+
this.eventInput.isKeyCombination($.commandName) && await this.commandManager.start($.commandName, [...this.default.selectLines]);
|
|
1746
1712
|
}), this.eventInput.addCancelDefaultBehavior(() => this.eventInput.isOnlyKeyDowns(this.shortcutKeys));
|
|
1747
1713
|
}
|
|
1748
1714
|
/**
|
|
1749
1715
|
* 进入命令约束
|
|
1750
1716
|
*/
|
|
1751
1717
|
constraint(e, t) {
|
|
1752
|
-
Array.isArray(t) ? t.length === 0 ? (
|
|
1718
|
+
Array.isArray(t) ? t.length === 0 ? (k({ message: "请选择线段", type: "warning" }), this.cancel()) : e(t) : (k({ message: "进入命令失败", type: "warning" }), this.cancel());
|
|
1753
1719
|
}
|
|
1754
1720
|
/** 开始
|
|
1755
1721
|
* @param next
|
|
1756
1722
|
*/
|
|
1757
1723
|
delete(e, t) {
|
|
1758
|
-
t.forEach((n) => this.renderManager.removeLine(n)),
|
|
1724
|
+
t.forEach((n) => this.renderManager.removeLine(n)), k({ message: "删除成功", type: "success" }), e(t);
|
|
1759
1725
|
}
|
|
1760
1726
|
/** 回滚操作
|
|
1761
1727
|
* @param data
|
|
@@ -1771,22 +1737,22 @@ class ee extends O {
|
|
|
1771
1737
|
return e.forEach((t) => this.renderManager.removeLine(t)), e;
|
|
1772
1738
|
}
|
|
1773
1739
|
}
|
|
1774
|
-
class
|
|
1740
|
+
class ee extends O {
|
|
1775
1741
|
static name = "ConnectionLine";
|
|
1776
1742
|
shortcutKeys = ["Shift", "L"];
|
|
1777
1743
|
static commandName = "connectionLine";
|
|
1778
1744
|
onAddFromParent(e) {
|
|
1779
1745
|
super.onAddFromParent(e);
|
|
1780
|
-
const t = this.commandManager.addCommandFlow(
|
|
1781
|
-
t.addEventListener("finally", this.createFinally()), t.addEventListener("completed", (n) => this.completed(n.data)), this.eventInput.addKeyCombination(
|
|
1782
|
-
this.eventInput.isKeyCombination(
|
|
1746
|
+
const t = this.commandManager.addCommandFlow(ee.commandName).add(this.createInterrupt()).add(this.constraint.bind(this)).add(this.connection.bind(this)).addRollback(this.rollback.bind(this)).addRevokeRollback(this.revokeRollback.bind(this));
|
|
1747
|
+
t.addEventListener("finally", this.createFinally()), t.addEventListener("completed", (n) => this.completed(n.data)), this.eventInput.addKeyCombination(ee.commandName, this.shortcutKeys), this.eventInput.addEventListener("codeChange", async () => {
|
|
1748
|
+
this.eventInput.isKeyCombination(ee.commandName) && await this.commandManager.start(ee.commandName, [...this.default.selectLines]);
|
|
1783
1749
|
}), this.eventInput.addCancelDefaultBehavior(() => this.eventInput.isOnlyKeyDowns(this.shortcutKeys));
|
|
1784
1750
|
}
|
|
1785
1751
|
/**
|
|
1786
1752
|
* 进入命令约束
|
|
1787
1753
|
*/
|
|
1788
1754
|
constraint(e, t) {
|
|
1789
|
-
Array.isArray(t) ? t.length !== 2 ? (
|
|
1755
|
+
Array.isArray(t) ? t.length !== 2 ? (k({ message: "请选择2条线段", type: "warning" }), this.cancel()) : e(t) : (k({ message: "进入命令失败", type: "warning" }), this.cancel());
|
|
1790
1756
|
}
|
|
1791
1757
|
/** 连接
|
|
1792
1758
|
* @param next
|
|
@@ -1794,13 +1760,13 @@ class te extends O {
|
|
|
1794
1760
|
connection(e, t) {
|
|
1795
1761
|
let n, o, s = 1 / 0;
|
|
1796
1762
|
for (let a = 0; a < 2; a++)
|
|
1797
|
-
for (let
|
|
1798
|
-
const
|
|
1799
|
-
|
|
1763
|
+
for (let l = 0; l < 2; l++) {
|
|
1764
|
+
const r = t[0].points[a], i = t[1].points[l], c = r.distance(i);
|
|
1765
|
+
c < s && (n = r, o = i, s = c);
|
|
1800
1766
|
}
|
|
1801
1767
|
if (n && o) {
|
|
1802
1768
|
const a = new B(n.clone(), o.clone());
|
|
1803
|
-
e(a),
|
|
1769
|
+
e(a), k({ message: "连接成功", type: "success" });
|
|
1804
1770
|
} else this.cancel();
|
|
1805
1771
|
}
|
|
1806
1772
|
/** 成功
|
|
@@ -1824,22 +1790,22 @@ class te extends O {
|
|
|
1824
1790
|
return this.completed(e), e;
|
|
1825
1791
|
}
|
|
1826
1792
|
}
|
|
1827
|
-
class
|
|
1793
|
+
class te extends O {
|
|
1828
1794
|
static name = "IntersectionConnectionLine";
|
|
1829
1795
|
shortcutKeys = ["control", "Shift", "L"];
|
|
1830
1796
|
static commandName = "intersectionConnectionLine";
|
|
1831
1797
|
onAddFromParent(e) {
|
|
1832
1798
|
super.onAddFromParent(e);
|
|
1833
|
-
const t = this.commandManager.addCommandFlow(
|
|
1834
|
-
t.addEventListener("finally", this.createFinally()), t.addEventListener("completed", (n) => this.completed(n.data)), this.eventInput.addKeyCombination(
|
|
1835
|
-
this.eventInput.isKeyCombination(
|
|
1799
|
+
const t = this.commandManager.addCommandFlow(te.commandName).add(this.createInterrupt()).add(this.constraint.bind(this)).add(this.connection.bind(this)).addRollback(this.rollback.bind(this)).addRevokeRollback(this.revokeRollback.bind(this));
|
|
1800
|
+
t.addEventListener("finally", this.createFinally()), t.addEventListener("completed", (n) => this.completed(n.data)), this.eventInput.addKeyCombination(te.commandName, this.shortcutKeys), this.eventInput.addEventListener("codeChange", async () => {
|
|
1801
|
+
this.eventInput.isKeyCombination(te.commandName) && await this.commandManager.start(te.commandName, [...this.default.selectLines]);
|
|
1836
1802
|
}), this.eventInput.addCancelDefaultBehavior(() => this.eventInput.isOnlyKeyDowns(this.shortcutKeys));
|
|
1837
1803
|
}
|
|
1838
1804
|
/**
|
|
1839
1805
|
* 进入命令约束
|
|
1840
1806
|
*/
|
|
1841
1807
|
constraint(e, t) {
|
|
1842
|
-
Array.isArray(t) ? t.length !== 2 ? (
|
|
1808
|
+
Array.isArray(t) ? t.length !== 2 ? (k({ message: "请选择2条线段", type: "warning" }), this.cancel()) : e(t) : (k({ message: "进入命令失败", type: "warning" }), this.cancel());
|
|
1843
1809
|
}
|
|
1844
1810
|
/** 开始
|
|
1845
1811
|
* @param next
|
|
@@ -1847,10 +1813,10 @@ class ne extends O {
|
|
|
1847
1813
|
connection(e, t) {
|
|
1848
1814
|
const n = t[0], o = t[1], s = t[0].getIntersection(t[1]);
|
|
1849
1815
|
if (!s) return;
|
|
1850
|
-
const a = n.points.map((
|
|
1816
|
+
const a = n.points.map((c) => c.clone()), l = o.points.map((c) => c.clone());
|
|
1851
1817
|
n.start.distance(s) < n.end.distance(s) ? n.start.copy(s) : n.end.copy(s), o.start.distance(s) < o.end.distance(s) ? o.start.copy(s) : o.end.copy(s);
|
|
1852
|
-
const
|
|
1853
|
-
e({ line1: n, line2: o, oldLine1: a, oldLine2:
|
|
1818
|
+
const r = n.points.map((c) => c.clone()), i = o.points.map((c) => c.clone());
|
|
1819
|
+
e({ line1: n, line2: o, oldLine1: a, oldLine2: l, newLine1: r, newLine2: i }), k({ message: "连接成功", type: "success" });
|
|
1854
1820
|
}
|
|
1855
1821
|
/** 执行完成
|
|
1856
1822
|
* @param next
|
|
@@ -1874,22 +1840,22 @@ class ne extends O {
|
|
|
1874
1840
|
return this.completed(e), e;
|
|
1875
1841
|
}
|
|
1876
1842
|
}
|
|
1877
|
-
class
|
|
1843
|
+
class ne extends O {
|
|
1878
1844
|
static name = "DeleteSelectWindow";
|
|
1879
1845
|
shortcutKeys = ["Q", "Delete"];
|
|
1880
1846
|
static commandName = "deleteSelectWindow";
|
|
1881
1847
|
onAddFromParent(e) {
|
|
1882
1848
|
super.onAddFromParent(e);
|
|
1883
|
-
const t = this.commandManager.addCommandFlow(
|
|
1884
|
-
t.addEventListener("finally", this.createFinally()), t.addEventListener("completed", (n) => this.completed(n.data)), this.eventInput.addKeyCombination(
|
|
1885
|
-
this.eventInput.isKeyCombination(
|
|
1849
|
+
const t = this.commandManager.addCommandFlow(ne.commandName).add(this.createInterrupt()).add(this.constraint.bind(this)).add(this.end.bind(this)).addRollback(this.rollback.bind(this)).addRevokeRollback(this.revokeRollback.bind(this));
|
|
1850
|
+
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 () => {
|
|
1851
|
+
this.eventInput.isKeyCombination(ne.commandName) && await this.commandManager.start(ne.commandName, [...this.default.selectLines]);
|
|
1886
1852
|
}), this.eventInput.addCancelDefaultBehavior(() => this.eventInput.isOnlyKeyDowns(this.shortcutKeys));
|
|
1887
1853
|
}
|
|
1888
1854
|
/**
|
|
1889
1855
|
* 进入命令约束
|
|
1890
1856
|
*/
|
|
1891
1857
|
constraint(e, t) {
|
|
1892
|
-
Array.isArray(t) ? t.some((n) => n.userData.isWindow) ? e(t) : (
|
|
1858
|
+
Array.isArray(t) ? t.some((n) => n.userData.isWindow) ? e(t) : (k({ message: "请选择有窗户线段", type: "warning" }), this.cancel()) : (k({ message: "进入命令失败", type: "warning" }), this.cancel());
|
|
1893
1859
|
}
|
|
1894
1860
|
/** 开始
|
|
1895
1861
|
* @param next
|
|
@@ -1901,7 +1867,7 @@ class oe extends O {
|
|
|
1901
1867
|
line: s,
|
|
1902
1868
|
drawDoorData: s.userData.drawDoorData
|
|
1903
1869
|
}), n = !0);
|
|
1904
|
-
}), n &&
|
|
1870
|
+
}), n && k({ message: "删除窗户成功", type: "success" }), e(o);
|
|
1905
1871
|
}
|
|
1906
1872
|
/**
|
|
1907
1873
|
* 完成
|
|
@@ -1931,16 +1897,16 @@ class oe extends O {
|
|
|
1931
1897
|
return this.completed(e), e;
|
|
1932
1898
|
}
|
|
1933
1899
|
}
|
|
1934
|
-
class
|
|
1900
|
+
class oe extends O {
|
|
1935
1901
|
static name = "SelectAll";
|
|
1936
|
-
container = new
|
|
1902
|
+
container = new p.Group();
|
|
1937
1903
|
shortcutKeys = ["control", "a"];
|
|
1938
1904
|
static commandName = "selectAll";
|
|
1939
1905
|
onAddFromParent(e) {
|
|
1940
1906
|
super.onAddFromParent(e), this.editor.container.add(this.container), this.container.position.z = 1e-3;
|
|
1941
|
-
const t = this.commandManager.addCommandFlow(
|
|
1942
|
-
t.writeOperationList = !1, t.addEventListener("finally", this.createFinally()), t.addEventListener("completed", (n) => this.completed(n.data)), this.eventInput.addKeyCombination(
|
|
1943
|
-
this.eventInput.isKeyCombination(
|
|
1907
|
+
const t = this.commandManager.addCommandFlow(oe.commandName).add(this.createInterrupt()).add(this.selectAll.bind(this)).addRollback(this.rollback.bind(this)).addRevokeRollback(this.revokeRollback.bind(this));
|
|
1908
|
+
t.writeOperationList = !1, 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 () => {
|
|
1909
|
+
this.eventInput.isKeyCombination(oe.commandName) && await this.commandManager.start(oe.commandName);
|
|
1944
1910
|
}), this.eventInput.addCancelDefaultBehavior(() => this.eventInput.isOnlyKeyDowns(this.shortcutKeys));
|
|
1945
1911
|
}
|
|
1946
1912
|
/** 开始
|
|
@@ -1968,22 +1934,22 @@ class se extends O {
|
|
|
1968
1934
|
return this.completed(e), e;
|
|
1969
1935
|
}
|
|
1970
1936
|
}
|
|
1971
|
-
class
|
|
1937
|
+
class se extends O {
|
|
1972
1938
|
static name = "ViewAngle";
|
|
1973
1939
|
shortcutKeys = ["r"];
|
|
1974
1940
|
static commandName = "viewAngle";
|
|
1975
1941
|
onAddFromParent(e) {
|
|
1976
1942
|
super.onAddFromParent(e);
|
|
1977
|
-
const t = this.commandManager.addCommandFlow(
|
|
1978
|
-
t.writeOperationList = !1, t.addEventListener("finally", this.createFinally()), this.eventInput.addKeyCombination(
|
|
1979
|
-
this.eventInput.isKeyCombination(
|
|
1943
|
+
const t = this.commandManager.addCommandFlow(se.commandName).add(this.createInterrupt()).add(this.constraint.bind(this)).add(this.viewAngle.bind(this));
|
|
1944
|
+
t.writeOperationList = !1, t.addEventListener("finally", this.createFinally()), this.eventInput.addKeyCombination(se.commandName, this.shortcutKeys), this.eventInput.addEventListener("codeChange", async () => {
|
|
1945
|
+
this.eventInput.isKeyCombination(se.commandName) && await this.commandManager.start(se.commandName, [...this.default.selectLines]);
|
|
1980
1946
|
}), this.eventInput.addCancelDefaultBehavior(() => this.eventInput.isOnlyKeyDowns(this.shortcutKeys));
|
|
1981
1947
|
}
|
|
1982
1948
|
/**
|
|
1983
1949
|
* 进入命令约束
|
|
1984
1950
|
*/
|
|
1985
1951
|
constraint(e, t) {
|
|
1986
|
-
Array.isArray(t) ? t.length !== 2 || !t[0].sameEndpoint(t[1]) ? (
|
|
1952
|
+
Array.isArray(t) ? t.length !== 2 || !t[0].sameEndpoint(t[1]) ? (k({ message: "请选择两条具有端点相交的线段", type: "warning" }), this.cancel()) : e(t) : (k({ message: "进入命令失败", type: "warning" }), this.cancel());
|
|
1987
1953
|
}
|
|
1988
1954
|
/**
|
|
1989
1955
|
*
|
|
@@ -1991,38 +1957,35 @@ class ae extends O {
|
|
|
1991
1957
|
* @param selectLines
|
|
1992
1958
|
*/
|
|
1993
1959
|
viewAngle(e, t) {
|
|
1994
|
-
const [n, o] = t, s = Math.min(
|
|
1995
|
-
let a,
|
|
1996
|
-
n.sameEndpointAsStart(o) ? (a = n.start,
|
|
1997
|
-
function
|
|
1998
|
-
const
|
|
1999
|
-
let
|
|
2000
|
-
return
|
|
1960
|
+
const [n, o] = t, s = Math.min(n.length() * 0.8, o.length() * 0.8);
|
|
1961
|
+
let a, l, r, i = 0, c = 0;
|
|
1962
|
+
n.sameEndpointAsStart(o) ? (a = n.start, l = n.end) : (a = n.end, l = n.start), o.sameEndpointAsStart(n) ? r = o.end : r = o.start;
|
|
1963
|
+
function m(G, W) {
|
|
1964
|
+
const M = W.x - G.x, I = W.y - G.y;
|
|
1965
|
+
let x = Math.atan2(I, M) * (180 / Math.PI);
|
|
1966
|
+
return x < 0 && (x += 360), x;
|
|
2001
1967
|
}
|
|
2002
|
-
const
|
|
2003
|
-
function
|
|
2004
|
-
for (let
|
|
2005
|
-
const
|
|
2006
|
-
E.push(
|
|
1968
|
+
const w = m(a, l), f = m(a, r), u = Math.min(w, f), h = Math.max(w, f), E = [];
|
|
1969
|
+
function b(G, W) {
|
|
1970
|
+
for (let M = G; M <= W; M++) {
|
|
1971
|
+
const I = Math.cos(M * Math.PI / 180) * s + a.x, x = Math.sin(M * Math.PI / 180) * s + a.y, j = Math.cos((M + 1) * Math.PI / 180) * s + a.x, ie = Math.sin((M + 1) * Math.PI / 180) * s + a.y;
|
|
1972
|
+
E.push(I, x, 0, j, ie, 0);
|
|
2007
1973
|
}
|
|
2008
1974
|
}
|
|
2009
|
-
|
|
2010
|
-
const
|
|
2011
|
-
|
|
1975
|
+
h - u > 180 ? (b(0, u), b(h, 360), i = 360 - (h - u), c = (h + i / 2) % 360) : (b(u, h), i = h - u, c = u + i / 2);
|
|
1976
|
+
const D = new p.LineSegments();
|
|
1977
|
+
D.geometry = this.renderManager.createGeometry({
|
|
2012
1978
|
position: E
|
|
2013
|
-
}, E.length / 3),
|
|
2014
|
-
const
|
|
1979
|
+
}, E.length / 3), D.material = new p.LineBasicMaterial({ color: 16711935 }), this.renderManager.container.add(D);
|
|
1980
|
+
const F = Math.cos(c * Math.PI / 180) * s + a.x, Z = Math.sin(c * Math.PI / 180) * s + a.y;
|
|
1981
|
+
this.renderer.createText(Number(i.toFixed(2)), new p.Vector3(F, Z, 0), {
|
|
2015
1982
|
textShadow: "0px 0px 2px #000"
|
|
2016
|
-
}, this.renderManager.container);
|
|
2017
|
-
let G = 0;
|
|
2018
|
-
this.addEventRecord("clear").add(() => k.removeFromParent()).add(() => Z.removeFromParent()).add(this.eventInput.addEventListener("codeChange", () => {
|
|
2019
|
-
this.eventInput.isOnlyKeyDown("enter") ? e() : this.eventInput.isOnlyKeyDown("mouse_0") && (G++, G === 1 ? setTimeout(() => G = 0, 500) : G === 2 && (e(), G = 0));
|
|
2020
|
-
}));
|
|
1983
|
+
}, this.renderManager.container), this.addEventRecord("clear"), e();
|
|
2021
1984
|
}
|
|
2022
1985
|
}
|
|
2023
1986
|
class rt extends O {
|
|
2024
1987
|
static name = "ClippingLine";
|
|
2025
|
-
container = new
|
|
1988
|
+
container = new p.Group();
|
|
2026
1989
|
shortcutKeys = ["control", "x"];
|
|
2027
1990
|
commandName = "clippingLine";
|
|
2028
1991
|
static commandName = "clippingLine";
|
|
@@ -2035,10 +1998,10 @@ class rt extends O {
|
|
|
2035
1998
|
* @param next
|
|
2036
1999
|
*/
|
|
2037
2000
|
selectPointStart(e) {
|
|
2038
|
-
let t = null, n =
|
|
2001
|
+
let t = null, n = this.renderer.createCircle(L.zero(), { color: 16711935 }), o = null;
|
|
2039
2002
|
this.addEventRecord("selectPointStart").add(this.editor.addEventListener("pointerPositionChange", () => {
|
|
2040
|
-
const { point: s, line: a, find:
|
|
2041
|
-
this.dispatchEvent({ type: "pointerMove", point: s }),
|
|
2003
|
+
const { point: s, line: a, find: l } = this.editor.renderManager.adsorption();
|
|
2004
|
+
this.dispatchEvent({ type: "pointerMove", point: s }), l ? (this.domElement.style.cursor = "none", n.position.copy(s), o = a, t = s.clone(), this.container.add(n)) : (this.domElement.style.cursor = "no-drop", t = null, n.removeFromParent());
|
|
2042
2005
|
})).add(this.eventInput.addEventListener("codeChange", () => {
|
|
2043
2006
|
this.eventInput.isKeyDown("mouse_0") && t && (this.canceEventRecord("selectPointStart"), e({ point: t, line: o }));
|
|
2044
2007
|
})), this.addEventRecord("clear").add(() => n.removeFromParent());
|
|
@@ -2047,10 +2010,10 @@ class rt extends O {
|
|
|
2047
2010
|
* @param next
|
|
2048
2011
|
*/
|
|
2049
2012
|
selectPointEnd(e, { point: t, line: n }) {
|
|
2050
|
-
let o = null, s =
|
|
2013
|
+
let o = null, s = this.renderer.createCircle(L.zero(), { color: 16711935 });
|
|
2051
2014
|
this.addEventRecord("clear").add(() => s.removeFromParent()).add(this.editor.addEventListener("pointerPositionChange", () => {
|
|
2052
|
-
const { point: a, find:
|
|
2053
|
-
this.dispatchEvent({ type: "pointerMove", point: a }),
|
|
2015
|
+
const { point: a, find: l, line: r } = this.editor.renderManager.adsorption();
|
|
2016
|
+
this.dispatchEvent({ type: "pointerMove", point: a }), l && r === n ? (this.domElement.style.cursor = "none", s.position.copy(a), o = a.clone(), this.container.add(s)) : (this.domElement.style.cursor = "no-drop", o = null, s.removeFromParent());
|
|
2054
2017
|
})).add(this.eventInput.addEventListener("codeChange", () => {
|
|
2055
2018
|
this.eventInput.isKeyDown("mouse_0") && o && e({ line: n, start: t, end: o });
|
|
2056
2019
|
}));
|
|
@@ -2061,7 +2024,7 @@ class rt extends O {
|
|
|
2061
2024
|
* @param points
|
|
2062
2025
|
*/
|
|
2063
2026
|
end(e, { start: t, end: n, line: o }) {
|
|
2064
|
-
const s =
|
|
2027
|
+
const s = L.from(t), a = L.from(n);
|
|
2065
2028
|
e({
|
|
2066
2029
|
oldLine: o,
|
|
2067
2030
|
newLine1: new B(
|
|
@@ -2093,22 +2056,22 @@ class rt extends O {
|
|
|
2093
2056
|
return this.completed(e), e;
|
|
2094
2057
|
}
|
|
2095
2058
|
}
|
|
2096
|
-
class
|
|
2059
|
+
class ae extends O {
|
|
2097
2060
|
static name = "VerticalReferenceLine";
|
|
2098
2061
|
shortcutKeys = ["v"];
|
|
2099
2062
|
static commandName = "VerticalReferenceLine";
|
|
2100
2063
|
onAddFromParent(e) {
|
|
2101
2064
|
super.onAddFromParent(e);
|
|
2102
|
-
const t = this.commandManager.addCommandFlow(
|
|
2103
|
-
t.writeOperationList = !1, t.addEventListener("finally", this.createFinally()), this.eventInput.addKeyCombination(
|
|
2104
|
-
this.eventInput.isKeyCombination(
|
|
2065
|
+
const t = this.commandManager.addCommandFlow(ae.commandName).add(this.createInterrupt()).add(this.constraint.bind(this)).add(this.verticalReferenceLine.bind(this));
|
|
2066
|
+
t.writeOperationList = !1, t.addEventListener("finally", this.createFinally()), this.eventInput.addKeyCombination(ae.commandName, this.shortcutKeys), this.eventInput.addEventListener("codeChange", async () => {
|
|
2067
|
+
this.eventInput.isKeyCombination(ae.commandName) && await this.commandManager.start(ae.commandName, [...this.default.selectLines]);
|
|
2105
2068
|
}), this.eventInput.addCancelDefaultBehavior(() => this.eventInput.isOnlyKeyDowns(this.shortcutKeys));
|
|
2106
2069
|
}
|
|
2107
2070
|
/**
|
|
2108
2071
|
* 进入命令约束
|
|
2109
2072
|
*/
|
|
2110
2073
|
constraint(e, t) {
|
|
2111
|
-
Array.isArray(t) ? t.length !== 1 ? (
|
|
2074
|
+
Array.isArray(t) ? t.length !== 1 ? (k({ message: "请选择一条墙壁线段", type: "warning" }), this.cancel()) : t[0].userData.isDoor ? (k({ message: "请选择一条墙壁线段", type: "warning" }), this.cancel()) : e(t) : (k({ message: "进入命令失败", type: "warning" }), this.cancel());
|
|
2112
2075
|
}
|
|
2113
2076
|
/**
|
|
2114
2077
|
*
|
|
@@ -2121,67 +2084,67 @@ class ie extends O {
|
|
|
2121
2084
|
}), t[0].userData.isVerticalReferenceLine = !0, e(), this.renderManager.draw();
|
|
2122
2085
|
}
|
|
2123
2086
|
}
|
|
2124
|
-
const
|
|
2087
|
+
const ro = {
|
|
2125
2088
|
key: 0,
|
|
2126
2089
|
class: "mt-[5px] text-[#ccc] text-[11px] absolute left-[10px] bottom-[10px] rounded-[8px] min-w-[150px] bg-black/15 p-[10px]"
|
|
2127
|
-
},
|
|
2090
|
+
}, lo = { class: "text-start max-w-[150px]" }, co = { class: "inline-block ml-[10px] text-[var(--color-primary)]" }, mo = {
|
|
2128
2091
|
key: 0,
|
|
2129
2092
|
class: "p-[5px] max-w-[200px]"
|
|
2130
|
-
},
|
|
2093
|
+
}, ho = { class: "text-[14px] flex flex-col" }, uo = ["onClick"], po = { class: "flex flex-row items-center" }, go = { class: "flex justify-center items-center size-[20px] bg-[#f0f0f0] rounded-[2px] mr-[10px]" }, vo = ["src"], fo = { class: "text-wrap" }, yo = {
|
|
2131
2094
|
key: 1,
|
|
2132
2095
|
class: "text-[#999]"
|
|
2133
2096
|
}, wo = {
|
|
2134
2097
|
style: { "--el-color-primary": "var(--primary-color)" },
|
|
2135
2098
|
class: "flex flex-row items-center justify-between gap-[10px] mt-[10px] text-[10px]"
|
|
2136
|
-
},
|
|
2099
|
+
}, bo = {
|
|
2137
2100
|
key: 0,
|
|
2138
2101
|
class: "flex flex-row items-center flex-wrap justify-between gap-[10px] mt-[10px] text-[10px]"
|
|
2139
|
-
},
|
|
2102
|
+
}, xo = { class: "flex-wrap border-t-1 border-t-[#eee] mt-[5px] pt-[5px] flex items-center gap-[10px]" }, Co = ["onClick", "title"], Eo = ["src"], Lo = /* @__PURE__ */ me({
|
|
2140
2103
|
__name: "EditorTool",
|
|
2141
2104
|
props: {
|
|
2142
2105
|
dxfSystem: {},
|
|
2143
2106
|
permission: {}
|
|
2144
2107
|
},
|
|
2145
|
-
setup(
|
|
2146
|
-
function e(C, g, y =
|
|
2147
|
-
const
|
|
2148
|
-
C = Math.max(0, Math.min(C,
|
|
2108
|
+
setup(d) {
|
|
2109
|
+
function e(C, g, y = m.value.getBoundingClientRect(), U = w.value.getBoundingClientRect()) {
|
|
2110
|
+
const he = y.width - U.width, ue = 0, Ee = y.height - U.height;
|
|
2111
|
+
C = Math.max(0, Math.min(C, he)), g = Math.max(ue, Math.min(g, Ee)), M.value = { left: C, top: g };
|
|
2149
2112
|
}
|
|
2150
2113
|
function t(C) {
|
|
2151
|
-
|
|
2114
|
+
u.value === C.command || u.value !== "default" || b.commandManager.start(C.command);
|
|
2152
2115
|
}
|
|
2153
2116
|
function n(C) {
|
|
2154
2117
|
if (C) {
|
|
2155
2118
|
localStorage.setItem("lines", JSON.stringify(C));
|
|
2156
2119
|
try {
|
|
2157
|
-
|
|
2120
|
+
h.Dxf.set(C), h.Dxf.lineOffset();
|
|
2158
2121
|
} catch (g) {
|
|
2159
2122
|
console.log(g);
|
|
2160
2123
|
}
|
|
2161
2124
|
}
|
|
2162
2125
|
}
|
|
2163
2126
|
async function o() {
|
|
2164
|
-
const C = await
|
|
2127
|
+
const C = await Dt.json();
|
|
2165
2128
|
Array.isArray(C) && (localStorage.removeItem("orbitControls"), n(C));
|
|
2166
2129
|
}
|
|
2167
2130
|
function s({ offsetX: C, offsetY: g }) {
|
|
2168
2131
|
E.mouseMoveEventProxylock = !0;
|
|
2169
2132
|
const y = document.body.style.cursor;
|
|
2170
2133
|
document.body.style.cursor = "move";
|
|
2171
|
-
const U = (
|
|
2172
|
-
const
|
|
2134
|
+
const U = (he) => {
|
|
2135
|
+
const ue = m.value.getBoundingClientRect(), Ee = w.value.getBoundingClientRect();
|
|
2173
2136
|
e(
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
),
|
|
2179
|
-
},
|
|
2180
|
-
document.body.removeEventListener("mousemove", U), document.removeEventListener("mouseup",
|
|
2137
|
+
he.pageX - ue.left - C,
|
|
2138
|
+
he.pageY - ue.top - g,
|
|
2139
|
+
ue,
|
|
2140
|
+
Ee
|
|
2141
|
+
), he.stopPropagation(), document.body.style.cursor = "move";
|
|
2142
|
+
}, Ce = () => {
|
|
2143
|
+
document.body.removeEventListener("mousemove", U), document.removeEventListener("mouseup", Ce), document.body.style.cursor = y, E.mouseMoveEventProxylock = !1;
|
|
2181
2144
|
};
|
|
2182
|
-
document.body.addEventListener("mousemove", U), document.addEventListener("mouseup",
|
|
2145
|
+
document.body.addEventListener("mousemove", U), document.addEventListener("mouseup", Ce);
|
|
2183
2146
|
}
|
|
2184
|
-
const a =
|
|
2147
|
+
const a = d, l = _(!0), r = _(!0), i = _(!0), c = _(!1), m = _(), w = _(), f = _(!0), u = _(""), h = zt(a.dxfSystem), E = h.findComponentByType(Pt), b = h.findComponentByType(dt), D = h.findComponentByType(it), F = h.findComponentByType(_t), Z = h.findComponentByType(Bt), G = _(0), W = _(0), M = _({ left: 10, top: 100 }), I = /* @__PURE__ */ Object.assign({ "./assets/images/angle.svg": Ln, "./assets/images/connection.svg": kn, "./assets/images/cutLine.svg": Pn, "./assets/images/deleteSelectLine.svg": An, "./assets/images/deleteSelectWindow.svg": _n, "./assets/images/door.svg": Nn, "./assets/images/intersectionConnection.svg": On, "./assets/images/line.svg": Fn, "./assets/images/mergeLine.svg": Tn, "./assets/images/revokeRollback.svg": jn, "./assets/images/rollback.svg": Qn, "./assets/images/selectAll.svg": Wn, "./assets/images/selectPoint.svg": Un, "./assets/images/verticalCorrection.svg": Zn, "./assets/images/verticalLine.svg": Xn, "./assets/images/window.svg": eo }), x = _(!1), j = _(0), ie = _(!1), xe = new ResizeObserver(() => e(M.value.left, M.value.top)), lt = [
|
|
2185
2148
|
{ name: "开启绘制线段命令", shortcut: "Ctrl + L" },
|
|
2186
2149
|
{ name: "开启绘制门线命令", shortcut: "Ctrl + M" },
|
|
2187
2150
|
{ name: "开启绘制窗户线命令", shortcut: "Ctrl + Q" },
|
|
@@ -2201,7 +2164,7 @@ const io = {
|
|
|
2201
2164
|
{ name: "取消命令", shortcut: "Esc" },
|
|
2202
2165
|
{ name: "回滚操作", shortcut: "Ctrl + Z" },
|
|
2203
2166
|
{ name: "取消回滚操作", shortcut: "Ctrl + Y" }
|
|
2204
|
-
],
|
|
2167
|
+
], ct = [
|
|
2205
2168
|
{
|
|
2206
2169
|
command: "default",
|
|
2207
2170
|
name: "默认",
|
|
@@ -2211,7 +2174,7 @@ const io = {
|
|
|
2211
2174
|
{
|
|
2212
2175
|
command: "draw-line",
|
|
2213
2176
|
name: "绘制线段",
|
|
2214
|
-
src:
|
|
2177
|
+
src: I["./assets/images/line.svg"].default,
|
|
2215
2178
|
show: !0,
|
|
2216
2179
|
shortcut: "Ctrl + L"
|
|
2217
2180
|
},
|
|
@@ -2219,182 +2182,182 @@ const io = {
|
|
|
2219
2182
|
command: "draw-door-line",
|
|
2220
2183
|
name: "绘制门线",
|
|
2221
2184
|
show: !0,
|
|
2222
|
-
src:
|
|
2185
|
+
src: I["./assets/images/door.svg"].default,
|
|
2223
2186
|
shortcut: "Ctrl + M"
|
|
2224
2187
|
},
|
|
2225
2188
|
{
|
|
2226
2189
|
command: "draw-window-line",
|
|
2227
2190
|
name: "绘制窗户线",
|
|
2228
2191
|
show: !0,
|
|
2229
|
-
src:
|
|
2192
|
+
src: I["./assets/images/window.svg"].default,
|
|
2230
2193
|
shortcut: "Ctrl + Q"
|
|
2231
2194
|
},
|
|
2232
2195
|
{
|
|
2233
2196
|
command: "point",
|
|
2234
2197
|
name: "点修改",
|
|
2235
2198
|
show: !0,
|
|
2236
|
-
src:
|
|
2199
|
+
src: I["./assets/images/selectPoint.svg"].default,
|
|
2237
2200
|
shortcut: "Ctrl + P"
|
|
2238
2201
|
},
|
|
2239
2202
|
{
|
|
2240
2203
|
command: rt.commandName,
|
|
2241
2204
|
name: "裁剪线段",
|
|
2242
2205
|
show: !0,
|
|
2243
|
-
src:
|
|
2206
|
+
src: I["./assets/images/cutLine.svg"].default,
|
|
2244
2207
|
shortcut: "Ctrl + X"
|
|
2245
2208
|
}
|
|
2246
|
-
],
|
|
2209
|
+
], mt = [
|
|
2247
2210
|
{
|
|
2248
2211
|
command: "",
|
|
2249
2212
|
name: "操作回滚",
|
|
2250
|
-
src:
|
|
2251
|
-
show:
|
|
2213
|
+
src: I["./assets/images/rollback.svg"].default,
|
|
2214
|
+
show: S(() => G.value !== 0),
|
|
2252
2215
|
shortcut: "Ctrl + Z",
|
|
2253
2216
|
action() {
|
|
2254
|
-
|
|
2217
|
+
b.commandManager.rollback();
|
|
2255
2218
|
}
|
|
2256
2219
|
},
|
|
2257
2220
|
{
|
|
2258
2221
|
command: "",
|
|
2259
2222
|
name: "撤销操作回滚",
|
|
2260
|
-
src:
|
|
2261
|
-
show:
|
|
2223
|
+
src: I["./assets/images/revokeRollback.svg"].default,
|
|
2224
|
+
show: S(() => W.value !== 0),
|
|
2262
2225
|
shortcut: "Ctrl + Y",
|
|
2263
2226
|
class: "rotateY-[180deg]",
|
|
2264
2227
|
action() {
|
|
2265
|
-
|
|
2228
|
+
b.commandManager.revokeRollback();
|
|
2266
2229
|
}
|
|
2267
2230
|
},
|
|
2268
2231
|
{
|
|
2269
|
-
command:
|
|
2232
|
+
command: X.commandName,
|
|
2270
2233
|
name: "合并",
|
|
2271
|
-
src:
|
|
2272
|
-
show:
|
|
2234
|
+
src: I["./assets/images/mergeLine.svg"].default,
|
|
2235
|
+
show: S(() => j.value === 2),
|
|
2273
2236
|
shortcut: "Ctrl + G"
|
|
2274
2237
|
},
|
|
2275
2238
|
{
|
|
2276
|
-
command:
|
|
2239
|
+
command: ee.commandName,
|
|
2277
2240
|
name: "两点连接",
|
|
2278
|
-
show:
|
|
2279
|
-
src:
|
|
2241
|
+
show: S(() => j.value === 2),
|
|
2242
|
+
src: I["./assets/images/connection.svg"].default,
|
|
2280
2243
|
shortcut: "Shift + L"
|
|
2281
2244
|
},
|
|
2282
2245
|
{
|
|
2283
|
-
command:
|
|
2246
|
+
command: te.commandName,
|
|
2284
2247
|
name: "延长线交点连接",
|
|
2285
|
-
show:
|
|
2286
|
-
src:
|
|
2248
|
+
show: S(() => j.value === 2),
|
|
2249
|
+
src: I["./assets/images/intersectionConnection.svg"].default,
|
|
2287
2250
|
shortcut: "Ctrl + Shift + L"
|
|
2288
2251
|
},
|
|
2289
2252
|
{
|
|
2290
2253
|
command: le.commandName,
|
|
2291
2254
|
name: "线段垂直纠正",
|
|
2292
|
-
show:
|
|
2293
|
-
src:
|
|
2255
|
+
show: S(() => j.value === 1),
|
|
2256
|
+
src: I["./assets/images/verticalCorrection.svg"].default,
|
|
2294
2257
|
shortcut: `
|
|
2295
2258
|
Ctrl + C 垂直纠正
|
|
2296
2259
|
Shift + C 轴对齐垂直纠正
|
|
2297
2260
|
`
|
|
2298
2261
|
},
|
|
2299
2262
|
{
|
|
2300
|
-
command:
|
|
2263
|
+
command: ae.commandName,
|
|
2301
2264
|
name: "y轴垂直基准线",
|
|
2302
|
-
show:
|
|
2303
|
-
() =>
|
|
2265
|
+
show: S(
|
|
2266
|
+
() => j.value === 1 && !D.selectLines[0].userData.isDoor
|
|
2304
2267
|
),
|
|
2305
|
-
src:
|
|
2268
|
+
src: I["./assets/images/verticalLine.svg"].default,
|
|
2306
2269
|
shortcut: "V"
|
|
2307
2270
|
},
|
|
2308
2271
|
{
|
|
2309
|
-
command:
|
|
2272
|
+
command: se.commandName,
|
|
2310
2273
|
name: "角度显示",
|
|
2311
|
-
show:
|
|
2312
|
-
src:
|
|
2274
|
+
show: S(() => j.value === 2 && D.selectLines[0].sameEndpoint(D.selectLines[1])),
|
|
2275
|
+
src: I["./assets/images/angle.svg"].default,
|
|
2313
2276
|
shortcut: "r"
|
|
2314
2277
|
},
|
|
2315
2278
|
{
|
|
2316
|
-
command:
|
|
2279
|
+
command: oe.commandName,
|
|
2317
2280
|
name: "全选",
|
|
2318
|
-
show:
|
|
2319
|
-
src:
|
|
2281
|
+
show: S(() => j.value !== b.renderManager.lines.length),
|
|
2282
|
+
src: I["./assets/images/selectAll.svg"].default,
|
|
2320
2283
|
shortcut: "Ctrl + A"
|
|
2321
2284
|
},
|
|
2322
2285
|
{
|
|
2323
|
-
command:
|
|
2286
|
+
command: ne.commandName,
|
|
2324
2287
|
name: "清除窗户",
|
|
2325
|
-
show:
|
|
2326
|
-
src:
|
|
2288
|
+
show: S(() => ie.value),
|
|
2289
|
+
src: I["./assets/images/deleteSelectWindow.svg"].default,
|
|
2327
2290
|
shortcut: "Q + Delete"
|
|
2328
2291
|
},
|
|
2329
2292
|
{
|
|
2330
|
-
command:
|
|
2293
|
+
command: $.commandName,
|
|
2331
2294
|
name: "删除",
|
|
2332
|
-
show:
|
|
2333
|
-
src:
|
|
2295
|
+
show: S(() => j.value > 0),
|
|
2296
|
+
src: I["./assets/images/deleteSelectLine.svg"].default,
|
|
2334
2297
|
shortcut: "Delete"
|
|
2335
2298
|
}
|
|
2336
2299
|
];
|
|
2337
|
-
J(
|
|
2338
|
-
localStorage.setItem("toolBarExpand", f.value + ""), f.value && ye(() => e(
|
|
2339
|
-
}), J(
|
|
2340
|
-
const
|
|
2341
|
-
|
|
2300
|
+
J(M, () => localStorage.setItem("editorToolPosition", JSON.stringify(M.value))), J(x, () => localStorage.setItem("showShortcutKey", x.value + "")), J(f, () => {
|
|
2301
|
+
localStorage.setItem("toolBarExpand", f.value + ""), f.value && ye(() => e(M.value.left, M.value.top));
|
|
2302
|
+
}), J(l, () => h.Variable.set("originalLineVisible", l.value)), J(r, () => h.Variable.set("dxfVisible", r.value)), J(i, () => h.Variable.set("whiteModelVisible", i.value)), h.Variable.addEventListener("isLook", (C) => c.value = C.value), h.Variable.addEventListener("originalLineVisible", (C) => l.value = C.value), h.Variable.addEventListener("dxfVisible", (C) => r.value = C.value), h.Variable.addEventListener("whiteModelVisible", (C) => i.value = C.value);
|
|
2303
|
+
const ht = b.commandManager.addEventListener("started", (C) => {
|
|
2304
|
+
u.value = C.name;
|
|
2342
2305
|
});
|
|
2343
|
-
return localStorage.getItem("showShortcutKey") && (
|
|
2344
|
-
|
|
2345
|
-
if (
|
|
2306
|
+
return localStorage.getItem("showShortcutKey") && (x.value = localStorage.getItem("showShortcutKey") === "true"), localStorage.getItem("toolBarExpand") && (f.value = localStorage.getItem("toolBarExpand") === "true"), et(() => {
|
|
2307
|
+
w.value.style.display = "none", setTimeout(() => {
|
|
2308
|
+
if (w.value.style.display = "block", localStorage.getItem("editorToolPosition")) {
|
|
2346
2309
|
const { left: C, top: g } = JSON.parse(localStorage.getItem("editorToolPosition") ?? "{}");
|
|
2347
|
-
e(C, g), ye(() =>
|
|
2310
|
+
e(C, g), ye(() => xe.observe(m.value));
|
|
2348
2311
|
} else
|
|
2349
|
-
ye(() =>
|
|
2350
|
-
}, 100),
|
|
2351
|
-
|
|
2312
|
+
ye(() => xe.observe(m.value));
|
|
2313
|
+
}, 100), D.addEventListener("selectLineChange", () => {
|
|
2314
|
+
j.value = D.selectLines.length, ie.value = D.selectLines.some((C) => C.userData.isWindow);
|
|
2352
2315
|
}), ["rollback", "completed", "revokeRollback"].forEach((C) => {
|
|
2353
|
-
|
|
2316
|
+
b.commandManager.addEventListener(C, () => {
|
|
2354
2317
|
setTimeout(() => {
|
|
2355
|
-
|
|
2318
|
+
G.value = b.commandManager.operationList.length, W.value = b.commandManager.rollbackList.length;
|
|
2356
2319
|
});
|
|
2357
2320
|
});
|
|
2358
2321
|
});
|
|
2359
2322
|
}), Ft(() => {
|
|
2360
|
-
E.mouseMoveEventProxylock = !1,
|
|
2361
|
-
}), (C, g) => (
|
|
2323
|
+
E.mouseMoveEventProxylock = !1, ht(), xe.disconnect();
|
|
2324
|
+
}), (C, g) => (A(), R("div", {
|
|
2362
2325
|
ref_key: "elRef",
|
|
2363
|
-
ref:
|
|
2326
|
+
ref: m,
|
|
2364
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]"
|
|
2365
2328
|
}, [
|
|
2366
|
-
z(
|
|
2367
|
-
default:
|
|
2368
|
-
|
|
2369
|
-
(
|
|
2329
|
+
z(be, null, {
|
|
2330
|
+
default: T(() => [
|
|
2331
|
+
x.value ? (A(), R("div", ro, [
|
|
2332
|
+
(A(), R(ge, null, Me(lt, (y) => P("div", {
|
|
2370
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",
|
|
2371
2334
|
key: y.name
|
|
2372
2335
|
}, [
|
|
2373
|
-
|
|
2374
|
-
|
|
2336
|
+
P("p", lo, de(y.name), 1),
|
|
2337
|
+
P("span", co, de(y.shortcut), 1)
|
|
2375
2338
|
])), 64))
|
|
2376
2339
|
])) : q("", !0)
|
|
2377
2340
|
]),
|
|
2378
2341
|
_: 1
|
|
2379
2342
|
}),
|
|
2380
|
-
|
|
2343
|
+
P("div", {
|
|
2381
2344
|
ref_key: "toolBarRef",
|
|
2382
|
-
ref:
|
|
2383
|
-
style:
|
|
2345
|
+
ref: w,
|
|
2346
|
+
style: Ae({ left: M.value.left + "px", top: M.value.top + "px" }),
|
|
2384
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] ": f.value }]),
|
|
2385
2348
|
onMousedown: g[10] || (g[10] = (y) => y.stopPropagation())
|
|
2386
2349
|
}, [
|
|
2387
|
-
|
|
2350
|
+
P("div", {
|
|
2388
2351
|
onMousedown: s,
|
|
2389
2352
|
class: V([{ "border-b-[#eee] border-b-1": f.value }, "flex flex-row justify-between header text-[14px] font-bold p-[10px 0px]"])
|
|
2390
2353
|
}, [
|
|
2391
|
-
g[12] || (g[12] =
|
|
2392
|
-
|
|
2354
|
+
g[12] || (g[12] = Kt('<div class="flex flex-row" data-v-c0568cc8><div class="p-[2px_5px] flex items-center pointer-events-none" data-v-c0568cc8><svg fill="#aaa" width="20" height="20" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" data-v-c0568cc8><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-c0568cc8></path></svg></div><h5 class="flex text-nowrap text-[12px] items-center pointer-events-none" data-v-c0568cc8>绘制工具</h5></div>', 1)),
|
|
2355
|
+
P("div", {
|
|
2393
2356
|
onMousedown: g[0] || (g[0] = (y) => y.stopPropagation()),
|
|
2394
2357
|
onClick: g[1] || (g[1] = (y) => f.value = !f.value),
|
|
2395
2358
|
class: "cursor-pointer flex items-center p-[0px_5px]"
|
|
2396
2359
|
}, [
|
|
2397
|
-
(
|
|
2360
|
+
(A(), R("svg", {
|
|
2398
2361
|
fill: "#666",
|
|
2399
2362
|
class: V([{ "rotate-90": f.value }, "transition-all"]),
|
|
2400
2363
|
viewBox: "0 0 1024 1024",
|
|
@@ -2403,41 +2366,41 @@ const io = {
|
|
|
2403
2366
|
width: "12",
|
|
2404
2367
|
height: "12"
|
|
2405
2368
|
}, g[11] || (g[11] = [
|
|
2406
|
-
|
|
2369
|
+
P("path", { d: "M315.050667 938.666667a60.757333 60.757333 0 0 0 41.813333-16.298667L750.933333 551.338667a53.418667 53.418667 0 0 0 0-78.677334L356.864 101.632a61.696 61.696 0 0 0-83.541333 0 53.418667 53.418667 0 0 0-0.256 78.677333L625.408 512 273.066667 843.690667a53.418667 53.418667 0 0 0 0 78.677333 60.757333 60.757333 0 0 0 41.984 16.298667z" }, null, -1)
|
|
2407
2370
|
]), 2))
|
|
2408
2371
|
], 32)
|
|
2409
2372
|
], 34),
|
|
2410
|
-
f.value ? (
|
|
2411
|
-
|
|
2412
|
-
(
|
|
2373
|
+
f.value ? (A(), R("div", mo, [
|
|
2374
|
+
P("ul", ho, [
|
|
2375
|
+
(A(), R(ge, null, Me(ct, (y) => (A(), R(ge, {
|
|
2413
2376
|
key: y.command
|
|
2414
2377
|
}, [
|
|
2415
|
-
y.show ? (
|
|
2378
|
+
y.show ? (A(), R("li", {
|
|
2416
2379
|
key: 0,
|
|
2417
2380
|
onClick: (U) => t(y),
|
|
2418
2381
|
class: V([{
|
|
2419
|
-
"!bg-[var(--primary-color)] text-[#fff]":
|
|
2420
|
-
"!cursor-no-drop":
|
|
2382
|
+
"!bg-[var(--primary-color)] text-[#fff]": u.value === y.command,
|
|
2383
|
+
"!cursor-no-drop": u.value !== y.command && u.value !== "default"
|
|
2421
2384
|
}, "gap-[10px] text-[12px] hover:bg-[#ddd] transition-all rounded-[6px] p-[5px] flex flex-row items-center justify-between cursor-pointer"])
|
|
2422
2385
|
}, [
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2386
|
+
P("div", po, [
|
|
2387
|
+
P("div", go, [
|
|
2388
|
+
P("img", {
|
|
2426
2389
|
class: "size-[14px]",
|
|
2427
2390
|
src: y.src,
|
|
2428
2391
|
alt: "",
|
|
2429
2392
|
srcset: ""
|
|
2430
|
-
}, null, 8,
|
|
2393
|
+
}, null, 8, vo)
|
|
2431
2394
|
]),
|
|
2432
|
-
|
|
2395
|
+
P("span", fo, de(y.name), 1)
|
|
2433
2396
|
]),
|
|
2434
|
-
|
|
2397
|
+
u.value === y.command ? (A(), R("div", {
|
|
2435
2398
|
key: 0,
|
|
2436
2399
|
title: "取消命令(Esc)",
|
|
2437
2400
|
class: "active:scale-[0.7] transition-all",
|
|
2438
|
-
onClick: g[2] || (g[2] = (U) => (
|
|
2401
|
+
onClick: g[2] || (g[2] = (U) => (v(b).cancelCommand(), U.stopPropagation()))
|
|
2439
2402
|
}, g[13] || (g[13] = [
|
|
2440
|
-
|
|
2403
|
+
P("svg", {
|
|
2441
2404
|
fill: "#fff",
|
|
2442
2405
|
width: "16",
|
|
2443
2406
|
height: "16",
|
|
@@ -2445,120 +2408,120 @@ const io = {
|
|
|
2445
2408
|
version: "1.1",
|
|
2446
2409
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2447
2410
|
}, [
|
|
2448
|
-
|
|
2449
|
-
|
|
2411
|
+
P("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
|
+
P("path", { d: "M236.437333 463.914667l549.333333 0 0 96.874667-549.333333 0 0-96.874667Z" })
|
|
2450
2413
|
], -1)
|
|
2451
|
-
]))) : y.shortcut ? (
|
|
2452
|
-
], 10,
|
|
2414
|
+
]))) : y.shortcut ? (A(), R("div", yo, de(y.shortcut), 1)) : q("", !0)
|
|
2415
|
+
], 10, uo)) : q("", !0)
|
|
2453
2416
|
], 64))), 64))
|
|
2454
2417
|
]),
|
|
2455
|
-
|
|
2456
|
-
z(
|
|
2418
|
+
P("div", wo, [
|
|
2419
|
+
z(v(Re), {
|
|
2457
2420
|
size: "small",
|
|
2458
|
-
modelValue:
|
|
2459
|
-
"onUpdate:modelValue": g[3] || (g[3] = (y) =>
|
|
2421
|
+
modelValue: x.value,
|
|
2422
|
+
"onUpdate:modelValue": g[3] || (g[3] = (y) => x.value = y),
|
|
2460
2423
|
label: "快捷键提示"
|
|
2461
2424
|
}, null, 8, ["modelValue"]),
|
|
2462
|
-
z(
|
|
2425
|
+
z(v(Re), {
|
|
2463
2426
|
size: "small",
|
|
2464
|
-
modelValue:
|
|
2465
|
-
"onUpdate:modelValue": g[4] || (g[4] = (y) =>
|
|
2427
|
+
modelValue: r.value,
|
|
2428
|
+
"onUpdate:modelValue": g[4] || (g[4] = (y) => r.value = y),
|
|
2466
2429
|
label: "dxf"
|
|
2467
2430
|
}, null, 8, ["modelValue"])
|
|
2468
2431
|
]),
|
|
2469
|
-
C.permission === "admin" ? (
|
|
2470
|
-
z(
|
|
2432
|
+
C.permission === "admin" ? (A(), R("div", bo, [
|
|
2433
|
+
z(v(re), {
|
|
2471
2434
|
style: { padding: "5px", "font-size": "10px" },
|
|
2472
2435
|
size: "small",
|
|
2473
2436
|
type: "success",
|
|
2474
2437
|
onClick: o
|
|
2475
2438
|
}, {
|
|
2476
|
-
default:
|
|
2477
|
-
|
|
2439
|
+
default: T(() => g[14] || (g[14] = [
|
|
2440
|
+
Y(" 选择文件 ", -1)
|
|
2478
2441
|
])),
|
|
2479
2442
|
_: 1,
|
|
2480
2443
|
__: [14]
|
|
2481
2444
|
}),
|
|
2482
|
-
z(
|
|
2445
|
+
z(v(re), {
|
|
2483
2446
|
style: { padding: "5px", "font-size": "10px" },
|
|
2484
2447
|
size: "small",
|
|
2485
2448
|
type: "primary",
|
|
2486
|
-
onClick: g[5] || (g[5] = (y) =>
|
|
2449
|
+
onClick: g[5] || (g[5] = (y) => v(h).Dxf.downloadOriginalData("json.json"))
|
|
2487
2450
|
}, {
|
|
2488
|
-
default:
|
|
2489
|
-
|
|
2451
|
+
default: T(() => g[15] || (g[15] = [
|
|
2452
|
+
Y(" 下载Json ", -1)
|
|
2490
2453
|
])),
|
|
2491
2454
|
_: 1,
|
|
2492
2455
|
__: [15]
|
|
2493
2456
|
}),
|
|
2494
|
-
z(
|
|
2457
|
+
z(v(re), {
|
|
2495
2458
|
style: { padding: "5px", "font-size": "10px" },
|
|
2496
2459
|
size: "small",
|
|
2497
2460
|
type: "primary",
|
|
2498
|
-
onClick: g[6] || (g[6] = (y) =>
|
|
2461
|
+
onClick: g[6] || (g[6] = (y) => v(h).AngleCorrectionDxf.download("test.dxf"))
|
|
2499
2462
|
}, {
|
|
2500
|
-
default:
|
|
2501
|
-
|
|
2463
|
+
default: T(() => g[16] || (g[16] = [
|
|
2464
|
+
Y(" 下载DXF ", -1)
|
|
2502
2465
|
])),
|
|
2503
2466
|
_: 1,
|
|
2504
2467
|
__: [16]
|
|
2505
2468
|
}),
|
|
2506
|
-
z(
|
|
2469
|
+
z(v(re), {
|
|
2507
2470
|
style: { padding: "5px", "font-size": "10px" },
|
|
2508
2471
|
size: "small",
|
|
2509
2472
|
type: "primary",
|
|
2510
|
-
onClick: g[7] || (g[7] = (y) =>
|
|
2473
|
+
onClick: g[7] || (g[7] = (y) => v(h).AngleCorrectionDxf.downloadImage("dxf.jpg"))
|
|
2511
2474
|
}, {
|
|
2512
|
-
default:
|
|
2513
|
-
|
|
2475
|
+
default: T(() => g[17] || (g[17] = [
|
|
2476
|
+
Y(" 下载JPG ", -1)
|
|
2514
2477
|
])),
|
|
2515
2478
|
_: 1,
|
|
2516
2479
|
__: [17]
|
|
2517
2480
|
}),
|
|
2518
|
-
z(
|
|
2481
|
+
z(v(re), {
|
|
2519
2482
|
style: { padding: "5px", "font-size": "10px" },
|
|
2520
2483
|
size: "small",
|
|
2521
2484
|
type: "primary",
|
|
2522
|
-
onClick: g[8] || (g[8] = (y) =>
|
|
2485
|
+
onClick: g[8] || (g[8] = (y) => v(F).downloadGltf("test.glb", !0))
|
|
2523
2486
|
}, {
|
|
2524
|
-
default:
|
|
2525
|
-
|
|
2487
|
+
default: T(() => g[18] || (g[18] = [
|
|
2488
|
+
Y(" 下载白膜 ", -1)
|
|
2526
2489
|
])),
|
|
2527
2490
|
_: 1,
|
|
2528
2491
|
__: [18]
|
|
2529
2492
|
}),
|
|
2530
|
-
z(
|
|
2493
|
+
z(v(re), {
|
|
2531
2494
|
style: { padding: "5px", "font-size": "10px" },
|
|
2532
2495
|
size: "small",
|
|
2533
2496
|
type: "primary",
|
|
2534
|
-
onClick: g[9] || (g[9] = (y) =>
|
|
2497
|
+
onClick: g[9] || (g[9] = (y) => v(Z).download())
|
|
2535
2498
|
}, {
|
|
2536
|
-
default:
|
|
2537
|
-
|
|
2499
|
+
default: T(() => g[19] || (g[19] = [
|
|
2500
|
+
Y(" 下载三维家JSON ", -1)
|
|
2538
2501
|
])),
|
|
2539
2502
|
_: 1,
|
|
2540
2503
|
__: [19]
|
|
2541
2504
|
})
|
|
2542
2505
|
])) : q("", !0),
|
|
2543
|
-
z(
|
|
2544
|
-
default:
|
|
2545
|
-
|
|
2546
|
-
z(
|
|
2547
|
-
default:
|
|
2548
|
-
(
|
|
2549
|
-
onClick: (U) => y.show.value &&
|
|
2506
|
+
z(be, null, {
|
|
2507
|
+
default: T(() => [
|
|
2508
|
+
P("div", xo, [
|
|
2509
|
+
z(Tt, null, {
|
|
2510
|
+
default: T(() => [
|
|
2511
|
+
(A(), R(ge, null, Me(mt, (y) => P("div", {
|
|
2512
|
+
onClick: (U) => y.show.value && u.value === "default" && (y.action ? y.action() : v(b).commandManager.start(y.command, [...v(D).selectLines])),
|
|
2550
2513
|
title: `${y.name}(${y.shortcut})`,
|
|
2551
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", {
|
|
2552
|
-
"opacity-30 bg-[#ccc] !cursor-no-drop active:!scale-[1]": !y.show.value ||
|
|
2515
|
+
"opacity-30 bg-[#ccc] !cursor-no-drop active:!scale-[1]": !y.show.value || u.value !== "default",
|
|
2553
2516
|
[y.class ?? ""]: !0
|
|
2554
2517
|
}]),
|
|
2555
2518
|
key: y.command
|
|
2556
2519
|
}, [
|
|
2557
|
-
|
|
2520
|
+
P("img", {
|
|
2558
2521
|
class: "size-[14px]",
|
|
2559
2522
|
src: y.src
|
|
2560
|
-
}, null, 8,
|
|
2561
|
-
], 10,
|
|
2523
|
+
}, null, 8, Eo)
|
|
2524
|
+
], 10, Co)), 64))
|
|
2562
2525
|
]),
|
|
2563
2526
|
_: 1
|
|
2564
2527
|
})
|
|
@@ -2570,15 +2533,15 @@ const io = {
|
|
|
2570
2533
|
], 38)
|
|
2571
2534
|
], 512));
|
|
2572
2535
|
}
|
|
2573
|
-
}), Mo = (
|
|
2574
|
-
const t =
|
|
2536
|
+
}), Mo = (d, e) => {
|
|
2537
|
+
const t = d.__vccOpts || d;
|
|
2575
2538
|
for (const [n, o] of e)
|
|
2576
2539
|
t[n] = o;
|
|
2577
2540
|
return t;
|
|
2578
|
-
},
|
|
2579
|
-
let dt = class extends
|
|
2541
|
+
}, ko = /* @__PURE__ */ Mo(Lo, [["__scopeId", "data-v-c0568cc8"]]);
|
|
2542
|
+
let dt = class extends De {
|
|
2580
2543
|
static name = "Editor";
|
|
2581
|
-
container = new
|
|
2544
|
+
container = new p.Group();
|
|
2582
2545
|
get renderer() {
|
|
2583
2546
|
return this.parent?.findComponentByName("Renderer");
|
|
2584
2547
|
}
|
|
@@ -2600,8 +2563,8 @@ let dt = class extends Se {
|
|
|
2600
2563
|
get domContainer() {
|
|
2601
2564
|
return this.parent?.findComponentByName("DomContainer");
|
|
2602
2565
|
}
|
|
2603
|
-
commandManager = new
|
|
2604
|
-
plane = new
|
|
2566
|
+
commandManager = new Cn();
|
|
2567
|
+
plane = new p.Mesh(new p.PlaneGeometry(2e3, 2e3, 2, 2));
|
|
2605
2568
|
app;
|
|
2606
2569
|
domElement = document.createElement("div");
|
|
2607
2570
|
viewPermission;
|
|
@@ -2624,13 +2587,13 @@ let dt = class extends Se {
|
|
|
2624
2587
|
}
|
|
2625
2588
|
onAddFromParent(e) {
|
|
2626
2589
|
setTimeout(() => this.openEdit(), 10);
|
|
2627
|
-
const t = new
|
|
2590
|
+
const t = new p.GridHelper(200, 100, 6710886, 4473924);
|
|
2628
2591
|
t.rotation.x = Math.PI * 0.5, t.position.z = -0.01, this.container.add(t), this.container.add(this.plane), this.plane.visible = !1;
|
|
2629
2592
|
const n = this.addEventListener("update", () => {
|
|
2630
2593
|
this.domContainer.domElement.parentElement && (this.domContainer.domElement.parentElement.appendChild(this.domElement), this.domContainer.domElement.parentElement.appendChild(this.imgEl), n());
|
|
2631
2594
|
});
|
|
2632
2595
|
setTimeout(() => {
|
|
2633
|
-
this.app =
|
|
2596
|
+
this.app = Vt(ko, { dxfSystem: this.parent, permission: this.viewPermission }), this.app.mount(this.domElement);
|
|
2634
2597
|
}), e.AngleCorrectionDxf.addEventListener("lineOffset", async () => {
|
|
2635
2598
|
this.imgEl.src && URL.revokeObjectURL(this.imgEl.src), setTimeout(async () => {
|
|
2636
2599
|
this.imgEl.src = URL.createObjectURL(await e.AngleCorrectionDxf.toDxfImageBlob("Centimeters", "image/png", "transparent"));
|
|
@@ -2659,27 +2622,27 @@ let dt = class extends Se {
|
|
|
2659
2622
|
type: "cancelCommand"
|
|
2660
2623
|
});
|
|
2661
2624
|
}
|
|
2662
|
-
coords = new
|
|
2663
|
-
pointerPosition = new
|
|
2625
|
+
coords = new p.Vector2();
|
|
2626
|
+
pointerPosition = new p.Vector2();
|
|
2664
2627
|
_exitEditCallBack;
|
|
2665
2628
|
/**
|
|
2666
2629
|
* 打开编辑器
|
|
2667
2630
|
*/
|
|
2668
2631
|
openEdit() {
|
|
2669
|
-
const e = this.renderer, t = this.domEventRegister, n = this.dxf, o = e.orbitControls, s = e.camera, a = n.box.center,
|
|
2632
|
+
const e = this.renderer, t = this.domEventRegister, n = this.dxf, o = e.orbitControls, s = e.camera, a = n.box.center, l = e.camera.position.clone(), r = o?.target?.clone(), i = new p.Vector2(), c = new p.Raycaster(), m = this.coords, w = this.pointerPosition;
|
|
2670
2633
|
this.container.position.z = n.originalZAverage, e.scene.add(this.container), o && (s.position.set(a.x, a.y, 15), o.target.set(a.x, a.y, 0), o.enableRotate = !1);
|
|
2671
2634
|
const f = () => {
|
|
2672
2635
|
e.renderer.getSize(i);
|
|
2673
|
-
const
|
|
2674
|
-
|
|
2675
|
-
const E =
|
|
2676
|
-
E.length && (
|
|
2636
|
+
const u = t.pointer.x / i.x * 2 - 1, h = -(t.pointer.y / i.y * 2 - 1);
|
|
2637
|
+
m.set(u, h), c.setFromCamera(m, e.camera.children.length ? e.camera.children[0] : e.camera);
|
|
2638
|
+
const E = c.intersectObject(this.plane);
|
|
2639
|
+
E.length && (w.copy(E[0].point), this.dispatchEvent({
|
|
2677
2640
|
type: "pointerPositionChange",
|
|
2678
|
-
position:
|
|
2641
|
+
position: w
|
|
2679
2642
|
}));
|
|
2680
2643
|
};
|
|
2681
2644
|
t.addEventListener("mousemove", f), this.commandManager.disabled = !1, this.commandManager.start("default"), this._exitEditCallBack = () => {
|
|
2682
|
-
t.removeEventListener("mousemove", f), o && (s.position.copy(
|
|
2645
|
+
t.removeEventListener("mousemove", f), o && (s.position.copy(l), o.enableRotate = !0, o.target.copy(r));
|
|
2683
2646
|
};
|
|
2684
2647
|
}
|
|
2685
2648
|
/**
|
|
@@ -2692,9 +2655,9 @@ let dt = class extends Se {
|
|
|
2692
2655
|
super.destroy(), this.exitEdit(), this.renderer.scene.remove(this.container), this.domElement.remove(), this.app?.unmount();
|
|
2693
2656
|
}
|
|
2694
2657
|
};
|
|
2695
|
-
class
|
|
2658
|
+
class Io extends O {
|
|
2696
2659
|
static name = "PointDrag";
|
|
2697
|
-
container = new
|
|
2660
|
+
container = new p.Group();
|
|
2698
2661
|
interruptKeys = ["escape"];
|
|
2699
2662
|
shortcutKeys = ["control", "p"];
|
|
2700
2663
|
commandName = "point";
|
|
@@ -2707,10 +2670,10 @@ class ko extends O {
|
|
|
2707
2670
|
* @param next
|
|
2708
2671
|
*/
|
|
2709
2672
|
selectPoint(e) {
|
|
2710
|
-
let t = null, n =
|
|
2673
|
+
let t = null, n = this.renderer.createCircle(L.zero(), { color: 16711935 }), o = null;
|
|
2711
2674
|
this.addEventRecord("selectPointStart").add(this.editor.addEventListener("pointerPositionChange", () => {
|
|
2712
|
-
const { point: s, line: a, find:
|
|
2713
|
-
this.dispatchEvent({ type: "pointerMove", point: s }),
|
|
2675
|
+
const { point: s, line: a, find: l, mode: r } = this.editor.renderManager.adsorption();
|
|
2676
|
+
this.dispatchEvent({ type: "pointerMove", point: s }), l && r === "point" ? (this.domElement.style.cursor = "none", n.position.copy(s), o = a, t = s.clone(), this.container.add(n)) : (this.domElement.style.cursor = "no-drop", t = null, n.removeFromParent());
|
|
2714
2677
|
})).add(this.eventInput.addEventListener("codeChange", () => {
|
|
2715
2678
|
this.eventInput.isKeyDown("mouse_0") && t && (this.canceEventRecord("selectPointStart"), n.material.color.set(65280), e({ point: t, line: o }));
|
|
2716
2679
|
})), this.addEventRecord("clear").add(() => n.removeFromParent());
|
|
@@ -2722,19 +2685,19 @@ class ko extends O {
|
|
|
2722
2685
|
*/
|
|
2723
2686
|
drag(e, { point: t, line: n }) {
|
|
2724
2687
|
this.domElement.style.cursor = "crosshair";
|
|
2725
|
-
const o = n.start.equal(
|
|
2726
|
-
this.container.add(
|
|
2727
|
-
let { point: i, find:
|
|
2688
|
+
const o = n.start.equal(L.from(t)) ? "start" : "end", s = o == "start" ? new p.Vector3(n.end.x, n.end.y, 0) : new p.Vector3(n.start.x, n.start.y, 0), a = t.clone(), l = new fe([s, a], 16711935), r = this.renderer.createCircle(L.zero(), { color: 16711935, size: 10 });
|
|
2689
|
+
this.container.add(l), this.addEventRecord("clear").add(this.editor.addEventListener("pointerPositionChange", () => {
|
|
2690
|
+
let { point: i, find: c } = this.editor.renderManager.adsorption(), m = "none";
|
|
2728
2691
|
if (i) {
|
|
2729
2692
|
if (this.dispatchEvent({ type: "pointerMove", point: i }), this.eventInput.isKeyDown("shift")) {
|
|
2730
|
-
const
|
|
2731
|
-
i.set(
|
|
2693
|
+
const w = n.projectPoint(L.from(i), !1);
|
|
2694
|
+
i.set(w?.x ?? i.x, w?.y ?? i.y, 0), c = !0, m = "crosshair";
|
|
2732
2695
|
}
|
|
2733
|
-
|
|
2696
|
+
c ? (r.position.copy(i), this.container.add(r)) : (r.removeFromParent(), m = "crosshair"), a.copy(i), l.setPoint(s, a), this.domElement.style.cursor = m;
|
|
2734
2697
|
}
|
|
2735
2698
|
})).add(this.eventInput.addEventListener("codeChange", () => {
|
|
2736
2699
|
this.eventInput.isKeyDown("mouse_0") && (this.canceEventRecord("selectPointStart"), e({ point: a, oldPoint: o === "end" ? n.end.clone() : n.start.clone(), line: n, mode: o }));
|
|
2737
|
-
})).add(() =>
|
|
2700
|
+
})).add(() => r.removeFromParent()).add(() => l.removeFromParent());
|
|
2738
2701
|
}
|
|
2739
2702
|
/** 执行完成
|
|
2740
2703
|
*/
|
|
@@ -2757,15 +2720,15 @@ class ko extends O {
|
|
|
2757
2720
|
return this.completed(e), e;
|
|
2758
2721
|
}
|
|
2759
2722
|
}
|
|
2760
|
-
function We(
|
|
2761
|
-
|
|
2723
|
+
function We(d, e = {}) {
|
|
2724
|
+
d.addComponent(new dt(e.viewPermission)), d.addComponent(new so()), d.addComponent(new it()), d.addComponent(new bn()), d.addComponent(new ao()), d.addComponent(new io()), d.addComponent(new Io()), d.addComponent(new $()), d.addComponent(new X()), d.addComponent(new le()), d.addComponent(new ee()), d.addComponent(new te()), d.addComponent(new ne()), d.addComponent(new oe()), d.addComponent(new se()), d.addComponent(new ae()), d.addComponent(new rt());
|
|
2762
2725
|
}
|
|
2763
|
-
const
|
|
2764
|
-
create(
|
|
2765
|
-
return (e) => We(e,
|
|
2726
|
+
const Ro = Object.assign(We, {
|
|
2727
|
+
create(d = {}) {
|
|
2728
|
+
return (e) => We(e, d);
|
|
2766
2729
|
}
|
|
2767
2730
|
});
|
|
2768
2731
|
export {
|
|
2769
|
-
|
|
2732
|
+
Ro as Editor,
|
|
2770
2733
|
We as Editor_
|
|
2771
2734
|
};
|