@billtaofbj/diagram 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -5,23 +5,42 @@ import { ElMessage as P } from "element-plus";
5
5
  import F from "axios";
6
6
  import * as I from "yjs";
7
7
  import { HocuspocusProvider as L } from "@hocuspocus/provider";
8
- import { ArrowDown as R, ArrowLeft as z, Bell as B, Clock as V, Close as H, Delete as U, Link as W, Loading as G, Monitor as K, Picture as q, Plus as J, Promotion as Y, Setting as X, Share as ee } from "@element-plus/icons-vue";
9
- //#region ../../src/api/index.js
10
- var Z = F.create({
8
+ import { ArrowDown as R, ArrowLeft as z, Bell as B, Clock as V, Close as H, Delete as U, Link as W, Loading as G, Monitor as K, Picture as ee, Plus as q, Promotion as te, Setting as J, Share as Y } from "@element-plus/icons-vue";
9
+ F.create({
11
10
  baseURL: "/api",
12
11
  timeout: 3e4
13
- }), te = {
14
- list: (e) => Z.get("/documents/", { params: e }),
15
- get: (e) => Z.get(`/documents/${e}`),
16
- create: (e) => Z.post("/documents/", e),
17
- update: (e, t) => Z.put(`/documents/${e}`, t),
18
- delete: (e) => Z.delete(`/documents/${e}`),
19
- addAttachment: (e, t) => Z.post(`/documents/${e}/attachments`, t),
20
- listAttachments: (e) => Z.get(`/documents/${e}/attachments`)
21
- };
12
+ });
13
+ function ne(e = "/api") {
14
+ let t = F.create({
15
+ baseURL: e,
16
+ timeout: 3e4
17
+ });
18
+ return {
19
+ list: (e) => t.get("/documents/", { params: e }),
20
+ get: (e) => t.get(`/documents/${e}`),
21
+ create: (e) => t.post("/documents/", e),
22
+ update: (e, n) => t.put(`/documents/${e}`, n),
23
+ delete: (e) => t.delete(`/documents/${e}`),
24
+ addAttachment: (e, n) => t.post(`/documents/${e}/attachments`, n),
25
+ listAttachments: (e) => t.get(`/documents/${e}/attachments`)
26
+ };
27
+ }
28
+ function re(e = "/api") {
29
+ let t = F.create({
30
+ baseURL: e,
31
+ timeout: 3e4
32
+ });
33
+ return {
34
+ get: (e) => t.get(`/questionnaires/${e}`),
35
+ create: (e) => t.post("/questionnaires/", e),
36
+ update: (e, n) => t.put(`/questionnaires/${e}`, n)
37
+ };
38
+ }
39
+ re("/api");
40
+ var ie = ne("/api");
22
41
  //#endregion
23
42
  //#region ../../src/composables/useCollaboration.js
24
- function ne(e, t = {}) {
43
+ function ae(e, t = {}) {
25
44
  let n = new I.Doc(), r = y(!1), i = y(!1), a = y(null), o = y([]), s = y(!1), c = v({
26
45
  name: `用户${Math.floor(Math.random() * 1e3)}`,
27
46
  color: `#${Math.floor(Math.random() * 16777215).toString(16).padStart(6, "0")}`
@@ -157,7 +176,7 @@ function ne(e, t = {}) {
157
176
  }
158
177
  //#endregion
159
178
  //#region ../../src/utils/diagram-themes.js
160
- var re = {
179
+ var X = {
161
180
  classic: {
162
181
  name: "经典",
163
182
  description: "扁平化设计,简洁清晰",
@@ -488,7 +507,7 @@ var re = {
488
507
  },
489
508
  animation: { defaultDuration: 2 }
490
509
  }
491
- }, ie = {
510
+ }, oe = {
492
511
  none: {
493
512
  name: "无",
494
513
  description: "默认无动画",
@@ -559,7 +578,7 @@ var re = {
559
578
  description: "霓虹灯边框流动效果",
560
579
  category: "glow"
561
580
  }
562
- }, ae = {
581
+ }, se = {
563
582
  none: {
564
583
  name: "无",
565
584
  description: "默认无动画"
@@ -585,8 +604,8 @@ var re = {
585
604
  description: "霓虹灯效果流动"
586
605
  }
587
606
  };
588
- function oe(e, t, n) {
589
- let r = (re[e] || re.classic).nodeStyle;
607
+ function ce(e, t, n) {
608
+ let r = (X[e] || X.classic).nodeStyle;
590
609
  return t ? {
591
610
  color: "#409eff",
592
611
  width: 3,
@@ -607,13 +626,13 @@ function oe(e, t, n) {
607
626
  dasharray: "none"
608
627
  };
609
628
  }
610
- function se(e) {
611
- let t = (re[e] || re.classic).nodeStyle;
629
+ function le(e) {
630
+ let t = (X[e] || X.classic).nodeStyle;
612
631
  return t.sketchStyle ? "sketch" : t.shadow ? t.glowEffect ? "neon-glow" : t.backdropFilter ? "glass-shadow" : "shadow" : "none";
613
632
  }
614
633
  //#endregion
615
634
  //#region ../../src/composables/useProcessDiagram.js
616
- var ce = {
635
+ var ue = {
617
636
  start: {
618
637
  label: "开始",
619
638
  desc: "流程的起点,每个流程图只能有一个开始节点",
@@ -785,22 +804,22 @@ var ce = {
785
804
  shape: "rect",
786
805
  color: "#dcdfe6"
787
806
  }
788
- }, le = ie, ue = {
807
+ }, de = oe, fe = {
789
808
  solid: { label: "实线" },
790
809
  dashed: { label: "虚线" },
791
810
  dotted: { label: "点线" },
792
811
  animated: { label: "动画线" }
793
- }, de = {
812
+ }, pe = {
794
813
  flow: "业务流程图",
795
814
  swimlane: "泳道图",
796
815
  architecture: "架构图"
797
- }, fe = {
816
+ }, me = {
798
817
  approval: "审批流程图",
799
818
  execution: "执行流程图",
800
819
  dataflow: "数据流程图"
801
820
  };
802
- function pe(e, t, n, r = {}) {
803
- let i = ce[e] || ce.process;
821
+ function Z(e, t, n, r = {}) {
822
+ let i = ue[e] || ue.process;
804
823
  return {
805
824
  id: "node_" + Date.now() + "_" + Math.random().toString(36).substr(2, 6),
806
825
  type: e,
@@ -831,7 +850,7 @@ function pe(e, t, n, r = {}) {
831
850
  ...r
832
851
  };
833
852
  }
834
- function me(e, t, n = {}) {
853
+ function he(e, t, n = {}) {
835
854
  return {
836
855
  id: "edge_" + Date.now() + "_" + Math.random().toString(36).substr(2, 6),
837
856
  sourceId: e,
@@ -853,7 +872,7 @@ function me(e, t, n = {}) {
853
872
  ...n
854
873
  };
855
874
  }
856
- function he(e, t = "horizontal", n = {}) {
875
+ function ge(e, t = "horizontal", n = {}) {
857
876
  return {
858
877
  id: "swim_" + Date.now() + "_" + Math.random().toString(36).substr(2, 6),
859
878
  name: e,
@@ -876,7 +895,7 @@ function he(e, t = "horizontal", n = {}) {
876
895
  ...n
877
896
  };
878
897
  }
879
- function ge(e, t, n = {}) {
898
+ function _e(e, t, n = {}) {
880
899
  return {
881
900
  id: "lane_" + Date.now() + "_" + Math.random().toString(36).substr(2, 6),
882
901
  swimlaneId: e,
@@ -895,7 +914,7 @@ function ge(e, t, n = {}) {
895
914
  ...n
896
915
  };
897
916
  }
898
- function _e(e = "process", n = null) {
917
+ function ve(e = "process", n = null) {
899
918
  let r = e === "process", i = [
900
919
  "start",
901
920
  "end",
@@ -958,7 +977,7 @@ function _e(e = "process", n = null) {
958
977
  dataflow: o,
959
978
  execution: s
960
979
  }[g.value] || i;
961
- return Object.fromEntries(e.map((e) => [e, ce[e]]));
980
+ return Object.fromEntries(e.map((e) => [e, ue[e]]));
962
981
  }), w = t(() => c.find((e) => e.id === d.value) || null), T = t(() => l.find((e) => e.id === f.value) || null), E = () => {
963
982
  x.value.push(JSON.parse(JSON.stringify({
964
983
  nodes: c,
@@ -985,23 +1004,23 @@ function _e(e = "process", n = null) {
985
1004
  c.length = 0, l.length = 0, u.length = 0, c.push(...e.nodes), l.push(...e.edges), u.push(...e.swimlanes);
986
1005
  }, k = (e, t, n, r) => {
987
1006
  E();
988
- let i = pe(e, t, n, r);
1007
+ let i = Z(e, t, n, r);
989
1008
  return c.push(i), i;
990
1009
  }, A = (e, t, n) => {
991
1010
  let r = l.find((n) => n.sourceId === e && n.targetId === t);
992
1011
  if (r) return r;
993
1012
  E();
994
- let i = me(e, t, n);
1013
+ let i = he(e, t, n);
995
1014
  return l.push(i), i;
996
1015
  }, j = (e, t, n) => {
997
1016
  E();
998
- let r = he(e, t, n);
1017
+ let r = ge(e, t, n);
999
1018
  return u.push(r), r;
1000
1019
  }, M = (e, t, n) => {
1001
1020
  E();
1002
1021
  let r = u.find((t) => t.id === e);
1003
1022
  if (!r) return null;
1004
- let i = r.lanes?.reduce((e, t) => e + (t.width || 200), 0) || 0, a = r.lanes?.length || 0, o = ge(e, t, {
1023
+ let i = r.lanes?.reduce((e, t) => e + (t.width || 200), 0) || 0, a = r.lanes?.length || 0, o = _e(e, t, {
1005
1024
  width: r.direction === "vertical" && a > 0 ? Math.floor(i / a) : 200,
1006
1025
  ...n
1007
1026
  });
@@ -1052,28 +1071,28 @@ function _e(e = "process", n = null) {
1052
1071
  c.forEach((r, i) => {
1053
1072
  e === "vertical" ? (r.x = 300, r.y = n, n += r.height + t) : (r.x = 50 + i * (r.width + t), r.y = 200);
1054
1073
  });
1055
- }, q = (e) => {
1074
+ }, ee = (e) => {
1056
1075
  switch (R(), e) {
1057
1076
  case "approval":
1058
- J();
1077
+ q();
1059
1078
  break;
1060
1079
  case "execution":
1061
- Y();
1080
+ te();
1062
1081
  break;
1063
1082
  case "dataflow":
1064
- X();
1083
+ J();
1065
1084
  break;
1066
1085
  case "business":
1067
- ee();
1086
+ Y();
1068
1087
  break;
1069
1088
  case "h-swimlane":
1070
- Z();
1089
+ ne();
1071
1090
  break;
1072
1091
  case "v-swimlane":
1073
- te();
1092
+ re();
1074
1093
  break;
1075
1094
  }
1076
- }, J = () => {
1095
+ }, q = () => {
1077
1096
  _.value = "审批流程";
1078
1097
  let e = k("start", 300, 30), t = k("person", 290, 130);
1079
1098
  t.label = "申请人";
@@ -1087,7 +1106,7 @@ function _e(e = "process", n = null) {
1087
1106
  a.label = "系统通知";
1088
1107
  let o = k("end", 300, 730);
1089
1108
  A(e.id, t.id), A(t.id, n.id), A(n.id, r.id), A(r.id, i.id, { label: "否" }), A(r.id, a.id, { label: "是" }), A(i.id, a.id), A(a.id, o.id);
1090
- }, Y = () => {
1109
+ }, te = () => {
1091
1110
  _.value = "程序执行流程";
1092
1111
  let e = k("start", 300, 30), t = k("api", 260, 130);
1093
1112
  t.label = "接收请求";
@@ -1103,7 +1122,7 @@ function _e(e = "process", n = null) {
1103
1122
  o.label = "返回响应";
1104
1123
  let s = k("end", 300, 850), c = k("code", 480, 370);
1105
1124
  c.label = "返回错误码", A(e.id, t.id), A(t.id, n.id), A(n.id, r.id), A(r.id, i.id, { label: "是" }), A(r.id, c.id, { label: "否" }), A(i.id, a.id), A(a.id, o.id), A(o.id, s.id), A(c.id, s.id);
1106
- }, X = () => {
1125
+ }, J = () => {
1107
1126
  _.value = "数据流程图";
1108
1127
  let e = k("start", 300, 30), t = k("data", 260, 130);
1109
1128
  t.label = "数据源输入";
@@ -1119,7 +1138,7 @@ function _e(e = "process", n = null) {
1119
1138
  o.label = "生成报表";
1120
1139
  let s = k("end", 300, 890);
1121
1140
  A(e.id, t.id), A(t.id, n.id), A(n.id, r.id), A(r.id, i.id), A(i.id, a.id, { label: "通过" }), A(a.id, o.id), A(o.id, s.id);
1122
- }, ee = () => {
1141
+ }, Y = () => {
1123
1142
  _.value = "业务流程图";
1124
1143
  let e = k("start", 300, 30);
1125
1144
  e.label = "客户提交申请";
@@ -1143,7 +1162,7 @@ function _e(e = "process", n = null) {
1143
1162
  l.label = "退回补正";
1144
1163
  let u = k("annotation", 480, 610);
1145
1164
  u.label = "驳回并说明原因", A(e.id, t.id), A(t.id, n.id), A(n.id, r.id), A(r.id, i.id, { label: "是" }), A(r.id, l.id, { label: "否" }), A(l.id, t.id), A(i.id, a.id), A(a.id, o.id, { label: "通过" }), A(a.id, u.id, { label: "驳回" }), A(u.id, c.id), A(o.id, s.id), A(s.id, c.id);
1146
- }, Z = () => {
1165
+ }, ne = () => {
1147
1166
  _.value = "水平泳道图 - 订单处理";
1148
1167
  let e = j("订单处理流程", "horizontal", {
1149
1168
  width: 900,
@@ -1168,7 +1187,7 @@ function _e(e = "process", n = null) {
1168
1187
  c.label = "安排物流";
1169
1188
  let l = k("end", 460, 370);
1170
1189
  l.label = "送达客户", A(t.id, n.id), A(n.id, r.id), A(r.id, i.id), A(i.id, a.id), A(a.id, o.id, { label: "有货" }), A(a.id, s.id, { label: "缺货" }), A(o.id, s.id), A(s.id, c.id), A(c.id, l.id);
1171
- }, te = () => {
1190
+ }, re = () => {
1172
1191
  _.value = "垂直泳道图 - 审批流程";
1173
1192
  let e = j("审批流程", "vertical", {
1174
1193
  width: 750,
@@ -1194,8 +1213,8 @@ function _e(e = "process", n = null) {
1194
1213
  };
1195
1214
  return {
1196
1215
  NODE_TYPES: C,
1197
- ANIMATION_TYPES: le,
1198
- LINE_STYLES: ue,
1216
+ ANIMATION_TYPES: de,
1217
+ LINE_STYLES: fe,
1199
1218
  nodes: c,
1200
1219
  edges: l,
1201
1220
  swimlanes: u,
@@ -1232,14 +1251,14 @@ function _e(e = "process", n = null) {
1232
1251
  toJSON: W,
1233
1252
  fromJSON: G,
1234
1253
  autoLayout: K,
1235
- loadTemplate: q,
1236
- createNode: pe,
1237
- createEdge: me,
1238
- PROCESS_TYPE_LABELS: de,
1239
- EXECUTION_TYPE_LABELS: fe,
1240
- THEMES: re,
1241
- ANIMATIONS: ie,
1242
- EDGE_ANIMATIONS: ae
1254
+ loadTemplate: ee,
1255
+ createNode: Z,
1256
+ createEdge: he,
1257
+ PROCESS_TYPE_LABELS: pe,
1258
+ EXECUTION_TYPE_LABELS: me,
1259
+ THEMES: X,
1260
+ ANIMATIONS: oe,
1261
+ EDGE_ANIMATIONS: se
1243
1262
  };
1244
1263
  }
1245
1264
  //#endregion
@@ -1248,22 +1267,22 @@ var Q = (e, t) => {
1248
1267
  let n = e.__vccOpts || e;
1249
1268
  for (let [e, r] of t) n[e] = r;
1250
1269
  return n;
1251
- }, $ = { class: "chat-header" }, ve = { class: "chat-header-left" }, ye = { class: "chat-title" }, be = { class: "online-users-list" }, xe = { class: "online-user-item" }, Se = { class: "online-user-name" }, Ce = { key: 1 }, we = { class: "online-user-name" }, Te = { class: "chat-header-right" }, Ee = {
1270
+ }, ye = { class: "chat-header" }, be = { class: "chat-header-left" }, xe = { class: "chat-title" }, Se = { class: "online-users-list" }, Ce = { class: "online-user-item" }, we = { class: "online-user-name" }, $ = { key: 1 }, Te = { class: "online-user-name" }, Ee = { class: "chat-header-right" }, De = {
1252
1271
  key: 0,
1253
1272
  class: "chat-empty"
1254
- }, De = { class: "chat-empty-hint" }, Oe = { key: 1 }, ke = { class: "message-content" }, Ae = {
1273
+ }, Oe = { class: "chat-empty-hint" }, ke = { key: 1 }, Ae = { class: "message-content" }, je = {
1255
1274
  key: 0,
1256
1275
  class: "message-meta"
1257
- }, je = {
1276
+ }, Me = {
1258
1277
  key: 0,
1259
1278
  class: "message-mention"
1260
- }, Me = ["innerHTML"], Ne = { class: "message-time" }, Pe = {
1279
+ }, Ne = ["innerHTML"], Pe = { class: "message-time" }, Fe = {
1261
1280
  key: 1,
1262
1281
  class: "chat-message chat-message-ai"
1263
- }, Fe = { class: "message-avatar ai" }, Ie = { class: "chat-input-area" }, Le = {
1282
+ }, Ie = { class: "message-avatar ai" }, Le = { class: "chat-input-area" }, Re = {
1264
1283
  key: 0,
1265
1284
  class: "mention-popup"
1266
- }, Re = ["onClick", "onMouseenter"], ze = { key: 1 }, Be = /*#__PURE__*/ Q({
1285
+ }, ze = ["onClick", "onMouseenter"], Be = { key: 1 }, Ve = /*#__PURE__*/ Q({
1267
1286
  __name: "AiChatPanel",
1268
1287
  props: {
1269
1288
  visible: {
@@ -1345,7 +1364,7 @@ var Q = (e, t) => {
1345
1364
  }, G = (e) => {
1346
1365
  let t = h.value.slice(0, M), n = h.value.slice(M + j.length + 1);
1347
1366
  h.value = `${t}@${e.name} ${n}`, w.value = !1;
1348
- }, q = (e) => {
1367
+ }, ee = (e) => {
1349
1368
  if (e) {
1350
1369
  if (e.shiftKey) return;
1351
1370
  if (w.value) {
@@ -1365,19 +1384,19 @@ var Q = (e, t) => {
1365
1384
  e && (n = e[1]);
1366
1385
  }
1367
1386
  d("send", t, { mentionedUser: n }), h.value = "", w.value = !1;
1368
- }, J = () => {
1387
+ }, q = () => {
1369
1388
  f(() => {
1370
1389
  g.value && (g.value.scrollTop = g.value.scrollHeight);
1371
1390
  });
1372
1391
  };
1373
- return E(() => u.messages.length, J), E(() => u.messages, J, { deep: !0 }), (t, l) => {
1392
+ return E(() => u.messages.length, q), E(() => u.messages, q, { deep: !0 }), (t, l) => {
1374
1393
  let u = x("el-icon"), f = x("el-tag"), y = x("el-popover"), E = x("el-button"), j = x("el-input");
1375
1394
  return o.visible ? (_(), i("div", {
1376
1395
  key: 0,
1377
1396
  class: "ai-chat-panel",
1378
1397
  style: m({ width: o.panelWidth + "px" })
1379
1398
  }, [
1380
- a("div", $, [a("div", ve, [
1399
+ a("div", ye, [a("div", be, [
1381
1400
  c(u, {
1382
1401
  size: 18,
1383
1402
  color: "#409EFF"
@@ -1385,7 +1404,7 @@ var Q = (e, t) => {
1385
1404
  default: D(() => [c(C(K))]),
1386
1405
  _: 1
1387
1406
  }),
1388
- a("span", ye, S(o.isCollab ? "协作聊天" : "AI 助手"), 1),
1407
+ a("span", xe, S(o.isCollab ? "协作聊天" : "AI 助手"), 1),
1389
1408
  o.isCollab ? (_(), n(y, {
1390
1409
  key: 0,
1391
1410
  width: 200,
@@ -1401,12 +1420,12 @@ var Q = (e, t) => {
1401
1420
  default: D(() => [s(S(F.value) + "人在线 ", 1)]),
1402
1421
  _: 1
1403
1422
  })]),
1404
- default: D(() => [a("div", be, [a("div", xe, [
1423
+ default: D(() => [a("div", Se, [a("div", Ce, [
1405
1424
  a("div", {
1406
1425
  class: "online-user-avatar",
1407
1426
  style: m({ background: o.currentUser.color || "#409EFF" })
1408
1427
  }, S((o.currentUser.name || "U").charAt(0)), 5),
1409
- a("span", Se, S(o.currentUser.name || "我"), 1),
1428
+ a("span", we, S(o.currentUser.name || "我"), 1),
1410
1429
  c(f, {
1411
1430
  size: "small",
1412
1431
  type: o.isOwner ? "warning" : "success",
@@ -1430,8 +1449,8 @@ var Q = (e, t) => {
1430
1449
  }, {
1431
1450
  default: D(() => [c(C(K))]),
1432
1451
  _: 1
1433
- })) : (_(), i("span", Ce, S((e.name || "U").charAt(0)), 1))], 4),
1434
- a("span", we, S(e.name || "未知用户"), 1),
1452
+ })) : (_(), i("span", $, S((e.name || "U").charAt(0)), 1))], 4),
1453
+ a("span", Te, S(e.name || "未知用户"), 1),
1435
1454
  e.isAi ? (_(), n(f, {
1436
1455
  key: 0,
1437
1456
  size: "small",
@@ -1454,7 +1473,7 @@ var Q = (e, t) => {
1454
1473
  ]))), 128))])]),
1455
1474
  _: 1
1456
1475
  })) : r("", !0)
1457
- ]), a("div", Te, [
1476
+ ]), a("div", Ee, [
1458
1477
  o.isCollab && o.unreadMention ? (_(), i("div", {
1459
1478
  key: 0,
1460
1479
  class: "mention-bell",
@@ -1499,7 +1518,7 @@ var Q = (e, t) => {
1499
1518
  ref_key: "messagesRef",
1500
1519
  ref: g
1501
1520
  }, [
1502
- o.messages.length === 0 ? (_(), i("div", Ee, [
1521
+ o.messages.length === 0 ? (_(), i("div", De, [
1503
1522
  c(u, {
1504
1523
  size: 40,
1505
1524
  color: "#c0c4cc"
@@ -1508,7 +1527,7 @@ var Q = (e, t) => {
1508
1527
  _: 1
1509
1528
  }),
1510
1529
  a("p", null, S(o.isCollab ? "协作聊天室" : "你好!我是 AI 助手"), 1),
1511
- a("p", De, S(o.isCollab ? "与团队成员和AI助手实时聊天" : "可以问我任何关于文档编辑的问题"), 1)
1530
+ a("p", Oe, S(o.isCollab ? "与团队成员和AI助手实时聊天" : "可以问我任何关于文档编辑的问题"), 1)
1512
1531
  ])) : r("", !0),
1513
1532
  (_(!0), i(e, null, b(o.messages, (e) => (_(), i("div", {
1514
1533
  key: e._msgId || e.time + e.content,
@@ -1522,18 +1541,18 @@ var Q = (e, t) => {
1522
1541
  }, {
1523
1542
  default: D(() => [c(C(K))]),
1524
1543
  _: 1
1525
- })) : (_(), i("span", Oe, S(R(e)), 1))], 4), a("div", ke, [
1526
- o.isCollab && e.role === "user" ? (_(), i("div", Ae, [a("span", {
1544
+ })) : (_(), i("span", ke, S(R(e)), 1))], 4), a("div", Ae, [
1545
+ o.isCollab && e.role === "user" ? (_(), i("div", je, [a("span", {
1527
1546
  class: "message-sender",
1528
1547
  style: m({ color: e.user_color || "#67C23A" })
1529
- }, S(e.user_name || "用户"), 5), e.mentioned_user ? (_(), i("span", je, "@" + S(e.mentioned_user), 1)) : r("", !0)])) : r("", !0),
1548
+ }, S(e.user_name || "用户"), 5), e.mentioned_user ? (_(), i("span", Me, "@" + S(e.mentioned_user), 1)) : r("", !0)])) : r("", !0),
1530
1549
  a("div", {
1531
1550
  class: "message-text",
1532
1551
  innerHTML: e.content
1533
- }, null, 8, Me),
1534
- a("div", Ne, S(e.time), 1)
1552
+ }, null, 8, Ne),
1553
+ a("div", Pe, S(e.time), 1)
1535
1554
  ])], 2))), 128)),
1536
- o.loading ? (_(), i("div", Pe, [a("div", Fe, [c(u, { size: 16 }, {
1555
+ o.loading ? (_(), i("div", Fe, [a("div", Ie, [c(u, { size: 16 }, {
1537
1556
  default: D(() => [c(C(K))]),
1538
1557
  _: 1
1539
1558
  })]), l[7] ||= a("div", { class: "message-content" }, [a("div", { class: "message-text typing-indicator" }, [
@@ -1542,7 +1561,7 @@ var Q = (e, t) => {
1542
1561
  a("span")
1543
1562
  ])], -1)])) : r("", !0)
1544
1563
  ], 512),
1545
- a("div", Ie, [a("div", {
1564
+ a("div", Le, [a("div", {
1546
1565
  class: "chat-input-wrapper",
1547
1566
  ref_key: "inputWrapperRef",
1548
1567
  ref: v
@@ -1557,7 +1576,7 @@ var Q = (e, t) => {
1557
1576
  },
1558
1577
  placeholder: o.isCollab ? "输入消息... @提及成员" : "输入消息...",
1559
1578
  onKeydown: [
1560
- k(A(q, ["exact"]), ["enter"]),
1579
+ k(A(ee, ["exact"]), ["enter"]),
1561
1580
  k(A(V, ["prevent"]), ["down"]),
1562
1581
  k(A(W, ["prevent"]), ["up"])
1563
1582
  ],
@@ -1568,7 +1587,7 @@ var Q = (e, t) => {
1568
1587
  "placeholder",
1569
1588
  "onKeydown"
1570
1589
  ]),
1571
- w.value ? (_(), i("div", Le, [(_(!0), i(e, null, b(T.value, (e, t) => (_(), i("div", {
1590
+ w.value ? (_(), i("div", Re, [(_(!0), i(e, null, b(T.value, (e, t) => (_(), i("div", {
1572
1591
  key: e.id || e.clientId,
1573
1592
  class: p(["mention-item", { active: t === O.value }]),
1574
1593
  onClick: (t) => G(e),
@@ -1582,16 +1601,16 @@ var Q = (e, t) => {
1582
1601
  }, {
1583
1602
  default: D(() => [c(C(K))]),
1584
1603
  _: 1
1585
- })) : (_(), i("span", ze, S((e.name || "U").charAt(0)), 1))], 4), a("span", null, S(e.name), 1)], 42, Re))), 128))])) : r("", !0),
1604
+ })) : (_(), i("span", Be, S((e.name || "U").charAt(0)), 1))], 4), a("span", null, S(e.name), 1)], 42, ze))), 128))])) : r("", !0),
1586
1605
  c(E, {
1587
1606
  class: "send-btn",
1588
1607
  type: "primary",
1589
1608
  circle: "",
1590
1609
  disabled: !h.value.trim() || o.loading,
1591
- onClick: q
1610
+ onClick: ee
1592
1611
  }, {
1593
1612
  default: D(() => [c(u, null, {
1594
- default: D(() => [c(C(Y))]),
1613
+ default: D(() => [c(C(te))]),
1595
1614
  _: 1
1596
1615
  })]),
1597
1616
  _: 1
@@ -1603,7 +1622,7 @@ var Q = (e, t) => {
1603
1622
  }, [["__scopeId", "data-v-01960100"]]);
1604
1623
  //#endregion
1605
1624
  //#region ../../src/composables/useChat.js
1606
- function Ve() {
1625
+ function He() {
1607
1626
  let e = y([]), t = y(!1), n = y(!1), r = y([]), i = y({
1608
1627
  id: "",
1609
1628
  name: "",
@@ -1751,7 +1770,7 @@ function Ve() {
1751
1770
  }
1752
1771
  //#endregion
1753
1772
  //#region ../../src/composables/useVersionHistory.js
1754
- var He = "/api/document-versions", Ue = 5e3, We = () => {
1773
+ var Ue = "/api/document-versions", We = 5e3, Ge = () => {
1755
1774
  let e = y([]), t = y(!1);
1756
1775
  return {
1757
1776
  versions: e,
@@ -1759,13 +1778,13 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
1759
1778
  saveVersion: async ({ documentId: e, docType: t, content: n, userId: r, userName: i }) => {
1760
1779
  if (!e || !t || !n) return null;
1761
1780
  try {
1762
- let { data: a } = await F.post(He, {
1781
+ let { data: a } = await F.post(Ue, {
1763
1782
  document_id: e,
1764
1783
  doc_type: t,
1765
1784
  content: typeof n == "string" ? n : JSON.stringify(n),
1766
1785
  user_id: r || null,
1767
1786
  user_name: i || null
1768
- }, { timeout: Ue });
1787
+ }, { timeout: We });
1769
1788
  return a;
1770
1789
  } catch (e) {
1771
1790
  return console.warn("[useVersionHistory] Failed to save version:", e), null;
@@ -1775,9 +1794,9 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
1775
1794
  if (!n) return [];
1776
1795
  t.value = !0;
1777
1796
  try {
1778
- let { data: t } = await F.get(He, {
1797
+ let { data: t } = await F.get(Ue, {
1779
1798
  params: { document_id: n },
1780
- timeout: Ue
1799
+ timeout: We
1781
1800
  });
1782
1801
  return e.value = t, t;
1783
1802
  } catch (t) {
@@ -1788,26 +1807,26 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
1788
1807
  },
1789
1808
  getVersionContent: async (e) => {
1790
1809
  try {
1791
- let { data: t } = await F.get(`${He}/${e}`, { timeout: Ue });
1810
+ let { data: t } = await F.get(`${Ue}/${e}`, { timeout: We });
1792
1811
  return t;
1793
1812
  } catch (e) {
1794
1813
  return console.warn("[useVersionHistory] Failed to get version content:", e), null;
1795
1814
  }
1796
1815
  }
1797
1816
  };
1798
- }, Ge = { class: "version-history-panel" }, Ke = {
1817
+ }, Ke = { class: "version-history-panel" }, qe = {
1799
1818
  key: 0,
1800
1819
  class: "loading-state"
1801
- }, qe = {
1820
+ }, Je = {
1802
1821
  key: 1,
1803
1822
  class: "empty-state"
1804
- }, Je = {
1823
+ }, Ye = {
1805
1824
  key: 2,
1806
1825
  class: "version-list"
1807
- }, Ye = {
1826
+ }, Xe = {
1808
1827
  key: 0,
1809
1828
  class: "current-version"
1810
- }, Xe = { class: "current-version-header" }, Ze = { class: "version-number" }, Qe = ["onClick"], $e = { class: "version-number" }, et = { class: "version-user" }, tt = { class: "panel-footer" }, nt = /*#__PURE__*/ Q({
1829
+ }, Ze = { class: "current-version-header" }, Qe = { class: "version-number" }, $e = ["onClick"], et = { class: "version-number" }, tt = { class: "version-user" }, nt = { class: "panel-footer" }, rt = /*#__PURE__*/ Q({
1811
1830
  __name: "VersionHistoryPanel",
1812
1831
  props: {
1813
1832
  modelValue: {
@@ -1821,7 +1840,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
1821
1840
  },
1822
1841
  emits: ["update:modelValue", "apply"],
1823
1842
  setup(t, { expose: o, emit: l }) {
1824
- let u = t, d = l, { versions: f, loading: m, loadVersions: h, getVersionContent: g } = We(), v = y(!1), w = y(null), T = y(!1), O = y(null);
1843
+ let u = t, d = l, { versions: f, loading: m, loadVersions: h, getVersionContent: g } = Ge(), v = y(!1), w = y(null), T = y(!1), O = y(null);
1825
1844
  E(() => u.modelValue, (e) => {
1826
1845
  v.value = e, e && u.documentId && (w.value = null, h(u.documentId).then((e) => {
1827
1846
  e && e.length > 0 && (O.value = e[0]);
@@ -1858,7 +1877,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
1858
1877
  size: "420px",
1859
1878
  "before-close": j
1860
1879
  }, {
1861
- footer: D(() => [a("div", tt, [c(g, {
1880
+ footer: D(() => [a("div", nt, [c(g, {
1862
1881
  type: "primary",
1863
1882
  disabled: !w.value,
1864
1883
  loading: T.value,
@@ -1867,22 +1886,22 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
1867
1886
  default: D(() => [...o[4] ||= [s(" 切换到此版本 ", -1)]]),
1868
1887
  _: 1
1869
1888
  }, 8, ["disabled", "loading"])])]),
1870
- default: D(() => [a("div", Ge, [C(m) ? (_(), i("div", Ke, [c(l, { class: "is-loading" }, {
1889
+ default: D(() => [a("div", Ke, [C(m) ? (_(), i("div", qe, [c(l, { class: "is-loading" }, {
1871
1890
  default: D(() => [c(C(G))]),
1872
1891
  _: 1
1873
- }), o[1] ||= a("span", null, "加载中...", -1)])) : C(f).length === 0 ? (_(), i("div", qe, [c(l, {
1892
+ }), o[1] ||= a("span", null, "加载中...", -1)])) : C(f).length === 0 ? (_(), i("div", Je, [c(l, {
1874
1893
  size: 48,
1875
1894
  color: "#c0c4cc"
1876
1895
  }, {
1877
1896
  default: D(() => [c(C(V))]),
1878
1897
  _: 1
1879
- }), o[2] ||= a("p", null, "暂无历史版本", -1)])) : (_(), i("div", Je, [O.value ? (_(), i("div", Ye, [a("div", Xe, [c(u, {
1898
+ }), o[2] ||= a("p", null, "暂无历史版本", -1)])) : (_(), i("div", Ye, [O.value ? (_(), i("div", Xe, [a("div", Ze, [c(u, {
1880
1899
  type: "success",
1881
1900
  size: "small"
1882
1901
  }, {
1883
1902
  default: D(() => [...o[3] ||= [s("当前版本", -1)]]),
1884
1903
  _: 1
1885
- }), a("span", Ze, "v" + S(O.value.version_number), 1)])])) : r("", !0), c(h, null, {
1904
+ }), a("span", Qe, "v" + S(O.value.version_number), 1)])])) : r("", !0), c(h, null, {
1886
1905
  default: D(() => [(_(!0), i(e, null, b(C(f), (e) => (_(), n(d, {
1887
1906
  key: e.id,
1888
1907
  timestamp: M(e.created_at),
@@ -1893,7 +1912,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
1893
1912
  default: D(() => [a("div", {
1894
1913
  class: p(["version-item", { active: w.value?.id === e.id }]),
1895
1914
  onClick: (t) => k(e)
1896
- }, [a("span", $e, "版本号:v" + S(e.version_number), 1), a("span", et, "提交人:" + S(e.user_name || "未知用户"), 1)], 10, Qe)]),
1915
+ }, [a("span", et, "版本号:v" + S(e.version_number), 1), a("span", tt, "提交人:" + S(e.user_name || "未知用户"), 1)], 10, $e)]),
1897
1916
  _: 2
1898
1917
  }, 1032, [
1899
1918
  "timestamp",
@@ -1906,77 +1925,77 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
1906
1925
  }, 8, ["modelValue"]);
1907
1926
  };
1908
1927
  }
1909
- }, [["__scopeId", "data-v-87924b7c"]]), rt = { class: "node-palette" }, it = { class: "palette-header" }, at = { class: "palette-search" }, ot = { class: "palette-list" }, st = ["onDragstart"], ct = {
1928
+ }, [["__scopeId", "data-v-87924b7c"]]), it = { class: "node-palette" }, at = { class: "palette-header" }, ot = { class: "palette-search" }, st = { class: "palette-list" }, ct = ["onDragstart"], lt = {
1910
1929
  key: 0,
1911
1930
  width: "24",
1912
1931
  height: "24",
1913
1932
  viewBox: "0 0 24 24"
1914
- }, lt = {
1933
+ }, ut = {
1915
1934
  key: 1,
1916
1935
  width: "24",
1917
1936
  height: "24",
1918
1937
  viewBox: "0 0 24 24"
1919
- }, ut = ["fill"], dt = {
1938
+ }, dt = ["fill"], ft = {
1920
1939
  key: 2,
1921
1940
  width: "24",
1922
1941
  height: "24",
1923
1942
  viewBox: "0 0 24 24"
1924
- }, ft = ["fill"], pt = {
1943
+ }, pt = ["fill"], mt = {
1925
1944
  key: 3,
1926
1945
  width: "24",
1927
1946
  height: "24",
1928
1947
  viewBox: "0 0 24 24"
1929
- }, mt = ["fill"], ht = ["stroke"], gt = {
1948
+ }, ht = ["fill"], gt = ["stroke"], _t = {
1930
1949
  key: 4,
1931
1950
  width: "24",
1932
1951
  height: "24",
1933
1952
  viewBox: "0 0 24 24"
1934
- }, _t = ["fill"], vt = ["fill"], yt = {
1953
+ }, vt = ["fill"], yt = ["fill"], bt = {
1935
1954
  key: 5,
1936
1955
  width: "24",
1937
1956
  height: "24",
1938
1957
  viewBox: "0 0 24 24"
1939
- }, bt = ["fill"], xt = {
1958
+ }, xt = ["fill"], St = {
1940
1959
  key: 6,
1941
1960
  width: "24",
1942
1961
  height: "24",
1943
1962
  viewBox: "0 0 24 24"
1944
- }, St = ["fill"], Ct = {
1963
+ }, Ct = ["fill"], wt = {
1945
1964
  key: 7,
1946
1965
  width: "24",
1947
1966
  height: "24",
1948
1967
  viewBox: "0 0 24 24"
1949
- }, wt = ["fill"], Tt = {
1968
+ }, Tt = ["fill"], Et = {
1950
1969
  key: 8,
1951
1970
  width: "24",
1952
1971
  height: "24",
1953
1972
  viewBox: "0 0 24 24"
1954
- }, Et = ["fill"], Dt = {
1973
+ }, Dt = ["fill"], Ot = {
1955
1974
  key: 9,
1956
1975
  width: "24",
1957
1976
  height: "24",
1958
1977
  viewBox: "0 0 24 24"
1959
- }, Ot = ["fill"], kt = {
1978
+ }, kt = ["fill"], At = {
1960
1979
  key: 10,
1961
1980
  width: "24",
1962
1981
  height: "24",
1963
1982
  viewBox: "0 0 24 24"
1964
- }, At = ["fill"], jt = ["fill"], Mt = {
1983
+ }, jt = ["fill"], Mt = ["fill"], Nt = {
1965
1984
  key: 11,
1966
1985
  width: "24",
1967
1986
  height: "24",
1968
1987
  viewBox: "0 0 24 24"
1969
- }, Nt = ["fill"], Pt = ["fill"], Ft = {
1988
+ }, Pt = ["fill"], Ft = ["fill"], It = {
1970
1989
  key: 12,
1971
1990
  width: "24",
1972
1991
  height: "24",
1973
1992
  viewBox: "0 0 24 24"
1974
- }, It = ["fill"], Lt = {
1993
+ }, Lt = ["fill"], Rt = {
1975
1994
  key: 13,
1976
1995
  width: "24",
1977
1996
  height: "24",
1978
1997
  viewBox: "0 0 24 24"
1979
- }, Rt = ["fill"], zt = { class: "palette-label" }, Bt = /*#__PURE__*/ Q({
1998
+ }, zt = ["fill"], Bt = { class: "palette-label" }, Vt = /*#__PURE__*/ Q({
1980
1999
  __name: "NodePalette",
1981
2000
  props: {
1982
2001
  NODE_TYPES: {
@@ -1990,68 +2009,73 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
1990
2009
  typeDisabled: {
1991
2010
  type: Boolean,
1992
2011
  default: !1
2012
+ },
2013
+ showTypeSelector: {
2014
+ type: Boolean,
2015
+ default: !0
1993
2016
  }
1994
2017
  },
1995
2018
  emits: ["set-type"],
1996
- setup(r, { emit: o }) {
1997
- let l = r, u = y(""), d = t(() => {
1998
- if (!u.value) return l.NODE_TYPES;
1999
- let e = u.value.toLowerCase(), t = {};
2000
- for (let [n, r] of Object.entries(l.NODE_TYPES)) (r.label.toLowerCase().includes(e) || r.desc && r.desc.toLowerCase().includes(e)) && (t[n] = r);
2019
+ setup(o, { emit: l }) {
2020
+ let u = o, d = y(""), f = t(() => {
2021
+ if (!d.value) return u.NODE_TYPES;
2022
+ let e = d.value.toLowerCase(), t = {};
2023
+ for (let [n, r] of Object.entries(u.NODE_TYPES)) (r.label.toLowerCase().includes(e) || r.desc && r.desc.toLowerCase().includes(e)) && (t[n] = r);
2001
2024
  return t;
2002
- }), f = (e, t) => {
2025
+ }), p = (e, t) => {
2003
2026
  e.dataTransfer.setData("node-type", t), e.dataTransfer.effectAllowed = "copy";
2004
2027
  };
2005
- return (t, o) => {
2006
- let l = x("el-icon"), p = x("el-button"), h = x("el-dropdown-item"), g = x("el-dropdown-menu"), v = x("el-dropdown"), y = x("el-input"), w = x("el-tooltip");
2007
- return _(), i("div", rt, [
2008
- a("div", it, [o[6] ||= a("h4", null, "组件库", -1), c(v, {
2028
+ return (t, l) => {
2029
+ let u = x("el-icon"), h = x("el-button"), g = x("el-dropdown-item"), v = x("el-dropdown-menu"), y = x("el-dropdown"), w = x("el-input"), T = x("el-tooltip");
2030
+ return _(), i("div", it, [
2031
+ a("div", at, [l[6] ||= a("h4", null, "组件库", -1), o.showTypeSelector ? (_(), n(y, {
2032
+ key: 0,
2009
2033
  trigger: "click",
2010
- onCommand: o[0] ||= (e) => t.$emit("set-type", e),
2034
+ onCommand: l[0] ||= (e) => t.$emit("set-type", e),
2011
2035
  size: "small"
2012
2036
  }, {
2013
- dropdown: D(() => [c(g, null, {
2037
+ dropdown: D(() => [c(v, null, {
2014
2038
  default: D(() => [
2015
- c(h, { command: "flow" }, {
2016
- default: D(() => [...o[2] ||= [s("业务流程图", -1)]]),
2039
+ c(g, { command: "flow" }, {
2040
+ default: D(() => [...l[2] ||= [s("业务流程图", -1)]]),
2017
2041
  _: 1
2018
2042
  }),
2019
- c(h, { command: "approval" }, {
2020
- default: D(() => [...o[3] ||= [s("审批流程图", -1)]]),
2043
+ c(g, { command: "approval" }, {
2044
+ default: D(() => [...l[3] ||= [s("审批流程图", -1)]]),
2021
2045
  _: 1
2022
2046
  }),
2023
- c(h, { command: "execution" }, {
2024
- default: D(() => [...o[4] ||= [s("执行流程图", -1)]]),
2047
+ c(g, { command: "execution" }, {
2048
+ default: D(() => [...l[4] ||= [s("执行流程图", -1)]]),
2025
2049
  _: 1
2026
2050
  }),
2027
- c(h, { command: "dataflow" }, {
2028
- default: D(() => [...o[5] ||= [s("数据流程图", -1)]]),
2051
+ c(g, { command: "dataflow" }, {
2052
+ default: D(() => [...l[5] ||= [s("数据流程图", -1)]]),
2029
2053
  _: 1
2030
2054
  })
2031
2055
  ]),
2032
2056
  _: 1
2033
2057
  })]),
2034
- default: D(() => [c(p, {
2058
+ default: D(() => [c(h, {
2035
2059
  size: "small",
2036
- disabled: r.typeDisabled
2060
+ disabled: o.typeDisabled
2037
2061
  }, {
2038
- default: D(() => [s(S(r.diagramTypeLabel) + " ", 1), c(l, null, {
2062
+ default: D(() => [s(S(o.diagramTypeLabel) + " ", 1), c(u, null, {
2039
2063
  default: D(() => [c(C(R))]),
2040
2064
  _: 1
2041
2065
  })]),
2042
2066
  _: 1
2043
2067
  }, 8, ["disabled"])]),
2044
2068
  _: 1
2045
- })]),
2046
- a("div", at, [c(y, {
2069
+ })) : r("", !0)]),
2070
+ a("div", ot, [c(w, {
2047
2071
  size: "small",
2048
- modelValue: u.value,
2049
- "onUpdate:modelValue": o[1] ||= (e) => u.value = e,
2072
+ modelValue: d.value,
2073
+ "onUpdate:modelValue": l[1] ||= (e) => d.value = e,
2050
2074
  placeholder: "搜索...",
2051
2075
  clearable: "",
2052
2076
  "prefix-icon": "Search"
2053
2077
  }, null, 8, ["modelValue"])]),
2054
- a("div", ot, [(_(!0), i(e, null, b(d.value, (e, t) => (_(), n(w, {
2078
+ a("div", st, [(_(!0), i(e, null, b(f.value, (e, t) => (_(), n(T, {
2055
2079
  key: t,
2056
2080
  content: e.desc || e.label,
2057
2081
  placement: "right",
@@ -2061,11 +2085,11 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
2061
2085
  default: D(() => [a("div", {
2062
2086
  class: "palette-item",
2063
2087
  draggable: "true",
2064
- onDragstart: (e) => f(e, t)
2088
+ onDragstart: (e) => p(e, t)
2065
2089
  }, [a("div", {
2066
2090
  class: "palette-icon",
2067
2091
  style: m({ background: e.color })
2068
- }, [t === "custom" ? (_(), i("svg", ct, [...o[7] ||= [
2092
+ }, [t === "custom" ? (_(), i("svg", lt, [...l[7] ||= [
2069
2093
  a("rect", {
2070
2094
  x: "3",
2071
2095
  y: "3",
@@ -2093,7 +2117,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
2093
2117
  stroke: "#909399",
2094
2118
  "stroke-width": "1.5"
2095
2119
  }, null, -1)
2096
- ]])) : e.shape === "ellipse" ? (_(), i("svg", lt, [a("ellipse", {
2120
+ ]])) : e.shape === "ellipse" ? (_(), i("svg", ut, [a("ellipse", {
2097
2121
  cx: "12",
2098
2122
  cy: "12",
2099
2123
  rx: "10",
@@ -2101,22 +2125,22 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
2101
2125
  fill: e.color,
2102
2126
  stroke: "#fff",
2103
2127
  "stroke-width": "1"
2104
- }, null, 8, ut)])) : e.shape === "diamond" ? (_(), i("svg", dt, [a("polygon", {
2128
+ }, null, 8, dt)])) : e.shape === "diamond" ? (_(), i("svg", ft, [a("polygon", {
2105
2129
  points: "12,2 22,12 12,22 2,12",
2106
2130
  fill: e.color,
2107
2131
  stroke: "#fff",
2108
2132
  "stroke-width": "1"
2109
- }, null, 8, ft)])) : e.shape === "person" ? (_(), i("svg", pt, [a("circle", {
2133
+ }, null, 8, pt)])) : e.shape === "person" ? (_(), i("svg", mt, [a("circle", {
2110
2134
  cx: "12",
2111
2135
  cy: "8",
2112
2136
  r: "4",
2113
2137
  fill: e.color
2114
- }, null, 8, mt), a("path", {
2138
+ }, null, 8, ht), a("path", {
2115
2139
  d: "M4 22 Q12 14 20 22",
2116
2140
  fill: "none",
2117
2141
  stroke: e.color,
2118
2142
  "stroke-width": "2"
2119
- }, null, 8, ht)])) : e.shape === "cylinder" ? (_(), i("svg", gt, [
2143
+ }, null, 8, gt)])) : e.shape === "cylinder" ? (_(), i("svg", _t, [
2120
2144
  a("ellipse", {
2121
2145
  cx: "12",
2122
2146
  cy: "7",
@@ -2125,21 +2149,21 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
2125
2149
  fill: e.color,
2126
2150
  stroke: "#fff",
2127
2151
  "stroke-width": "0.5"
2128
- }, null, 8, _t),
2152
+ }, null, 8, vt),
2129
2153
  a("rect", {
2130
2154
  x: "3",
2131
2155
  y: "7",
2132
2156
  width: "18",
2133
2157
  height: "10",
2134
2158
  fill: e.color
2135
- }, null, 8, vt),
2136
- o[8] ||= a("path", {
2159
+ }, null, 8, yt),
2160
+ l[8] ||= a("path", {
2137
2161
  d: "M3 7 Q3 17 12 17 Q21 17 21 7",
2138
2162
  fill: "none",
2139
2163
  stroke: "#fff",
2140
2164
  "stroke-width": "0.5"
2141
2165
  }, null, -1),
2142
- o[9] ||= a("ellipse", {
2166
+ l[9] ||= a("ellipse", {
2143
2167
  cx: "12",
2144
2168
  cy: "7",
2145
2169
  rx: "9",
@@ -2148,12 +2172,12 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
2148
2172
  stroke: "#fff",
2149
2173
  "stroke-width": "1"
2150
2174
  }, null, -1)
2151
- ])) : e.shape === "hexagon" ? (_(), i("svg", yt, [a("polygon", {
2175
+ ])) : e.shape === "hexagon" ? (_(), i("svg", bt, [a("polygon", {
2152
2176
  points: "7,2 17,2 22,12 17,22 7,22 2,12",
2153
2177
  fill: e.color,
2154
2178
  stroke: "#fff",
2155
2179
  "stroke-width": "1"
2156
- }, null, 8, bt)])) : e.shape === "timer" ? (_(), i("svg", xt, [
2180
+ }, null, 8, xt)])) : e.shape === "timer" ? (_(), i("svg", St, [
2157
2181
  a("circle", {
2158
2182
  cx: "12",
2159
2183
  cy: "12",
@@ -2161,8 +2185,8 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
2161
2185
  fill: e.color,
2162
2186
  stroke: "#fff",
2163
2187
  "stroke-width": "1"
2164
- }, null, 8, St),
2165
- o[10] ||= a("line", {
2188
+ }, null, 8, Ct),
2189
+ l[10] ||= a("line", {
2166
2190
  x1: "12",
2167
2191
  y1: "12",
2168
2192
  x2: "12",
@@ -2171,7 +2195,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
2171
2195
  "stroke-width": "1.5",
2172
2196
  "stroke-linecap": "round"
2173
2197
  }, null, -1),
2174
- o[11] ||= a("line", {
2198
+ l[11] ||= a("line", {
2175
2199
  x1: "12",
2176
2200
  y1: "12",
2177
2201
  x2: "16",
@@ -2180,7 +2204,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
2180
2204
  "stroke-width": "1",
2181
2205
  "stroke-linecap": "round"
2182
2206
  }, null, -1)
2183
- ])) : e.shape === "subprocess" ? (_(), i("svg", Ct, [a("rect", {
2207
+ ])) : e.shape === "subprocess" ? (_(), i("svg", wt, [a("rect", {
2184
2208
  x: "2",
2185
2209
  y: "4",
2186
2210
  width: "20",
@@ -2189,44 +2213,44 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
2189
2213
  fill: e.color,
2190
2214
  stroke: "#fff",
2191
2215
  "stroke-width": "1"
2192
- }, null, 8, wt), o[12] ||= a("rect", {
2216
+ }, null, 8, Tt), l[12] ||= a("rect", {
2193
2217
  x: "4",
2194
2218
  y: "16",
2195
2219
  width: "16",
2196
2220
  height: "2",
2197
2221
  rx: "1",
2198
2222
  fill: "rgba(255,255,255,0.4)"
2199
- }, null, -1)])) : e.shape === "document" ? (_(), i("svg", Tt, [a("path", {
2223
+ }, null, -1)])) : e.shape === "document" ? (_(), i("svg", Et, [a("path", {
2200
2224
  d: "M4 2 H20 V16 Q15 13 12 16 Q9 19 4 16 Z",
2201
2225
  fill: e.color,
2202
2226
  stroke: "#fff",
2203
2227
  "stroke-width": "1"
2204
- }, null, 8, Et)])) : e.shape === "parallelogram" ? (_(), i("svg", Dt, [a("polygon", {
2228
+ }, null, 8, Dt)])) : e.shape === "parallelogram" ? (_(), i("svg", Ot, [a("polygon", {
2205
2229
  points: "5,4 22,4 19,20 2,20",
2206
2230
  fill: e.color,
2207
2231
  stroke: "#fff",
2208
2232
  "stroke-width": "1"
2209
- }, null, 8, Ot)])) : e.shape === "folder" ? (_(), i("svg", kt, [a("path", {
2233
+ }, null, 8, kt)])) : e.shape === "folder" ? (_(), i("svg", At, [a("path", {
2210
2234
  d: "M2 8 H22 V21 H2 Z",
2211
2235
  fill: e.color,
2212
2236
  stroke: "#fff",
2213
2237
  "stroke-width": "0.5"
2214
- }, null, 8, At), a("path", {
2238
+ }, null, 8, jt), a("path", {
2215
2239
  d: "M2 8 V5 H9 L11 8",
2216
2240
  fill: e.color,
2217
2241
  stroke: "#fff",
2218
2242
  "stroke-width": "1"
2219
- }, null, 8, jt)])) : e.shape === "note" ? (_(), i("svg", Mt, [a("path", {
2243
+ }, null, 8, Mt)])) : e.shape === "note" ? (_(), i("svg", Nt, [a("path", {
2220
2244
  d: "M2 2 H22 V18 L18 22 H2 Z",
2221
2245
  fill: e.color,
2222
2246
  stroke: "#fff",
2223
2247
  "stroke-width": "0.5"
2224
- }, null, 8, Nt), a("path", {
2248
+ }, null, 8, Pt), a("path", {
2225
2249
  d: "M18 18 V22 L22 18",
2226
2250
  fill: e.color,
2227
2251
  stroke: "#fff",
2228
2252
  "stroke-width": "0.5"
2229
- }, null, 8, Pt)])) : e.shape === "rounded闪电" ? (_(), i("svg", Ft, [a("rect", {
2253
+ }, null, 8, Ft)])) : e.shape === "rounded闪电" ? (_(), i("svg", It, [a("rect", {
2230
2254
  x: "2",
2231
2255
  y: "6",
2232
2256
  width: "20",
@@ -2235,11 +2259,11 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
2235
2259
  fill: e.color,
2236
2260
  stroke: "#fff",
2237
2261
  "stroke-width": "1"
2238
- }, null, 8, It), o[13] ||= a("path", {
2262
+ }, null, 8, Lt), l[13] ||= a("path", {
2239
2263
  d: "M14 8 L10 12 H13 L11 16 L15 12 H12 Z",
2240
2264
  fill: "#fff",
2241
2265
  opacity: "0.9"
2242
- }, null, -1)])) : (_(), i("svg", Lt, [a("rect", {
2266
+ }, null, -1)])) : (_(), i("svg", Rt, [a("rect", {
2243
2267
  x: "2",
2244
2268
  y: "4",
2245
2269
  width: "20",
@@ -2248,16 +2272,19 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
2248
2272
  fill: e.color,
2249
2273
  stroke: "#fff",
2250
2274
  "stroke-width": "1"
2251
- }, null, 8, Rt)]))], 4), a("span", zt, S(e.label), 1)], 40, st)]),
2275
+ }, null, 8, zt)]))], 4), a("span", Bt, S(e.label), 1)], 40, ct)]),
2252
2276
  _: 2
2253
2277
  }, 1032, ["content"]))), 128))])
2254
2278
  ]);
2255
2279
  };
2256
2280
  }
2257
- }, [["__scopeId", "data-v-a24fcbed"]]), Vt = { class: "process-toolbar" }, Ht = { class: "toolbar-group" }, Ut = {
2281
+ }, [["__scopeId", "data-v-ccb25fe4"]]), Ht = { class: "process-toolbar" }, Ut = {
2258
2282
  key: 0,
2259
2283
  class: "toolbar-group"
2260
- }, Wt = { class: "toolbar-group" }, Gt = { class: "toolbar-group" }, Kt = { class: "toolbar-group" }, qt = { class: "toolbar-group" }, Jt = { class: "toolbar-group" }, Yt = { class: "toolbar-group" }, Xt = /*#__PURE__*/ Q({
2284
+ }, Wt = {
2285
+ key: 1,
2286
+ class: "toolbar-group"
2287
+ }, Gt = { class: "toolbar-group" }, Kt = { class: "toolbar-group" }, qt = { class: "toolbar-group" }, Jt = { class: "toolbar-group" }, Yt = { class: "toolbar-group" }, Xt = { class: "toolbar-group" }, Zt = /*#__PURE__*/ Q({
2261
2288
  __name: "ProcessToolbar",
2262
2289
  props: {
2263
2290
  animationPlaying: {
@@ -2287,6 +2314,10 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
2287
2314
  showHistory: {
2288
2315
  type: Boolean,
2289
2316
  default: !1
2317
+ },
2318
+ showTemplateSelector: {
2319
+ type: Boolean,
2320
+ default: !0
2290
2321
  }
2291
2322
  },
2292
2323
  emits: [
@@ -2317,8 +2348,8 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
2317
2348
  };
2318
2349
  return (t, o) => {
2319
2350
  let h = x("ArrowDown"), g = x("el-icon"), v = x("el-button"), y = x("el-dropdown-item"), b = x("el-dropdown-menu"), w = x("el-dropdown"), T = x("RefreshLeft"), E = x("RefreshRight"), O = x("Grid"), k = x("el-option"), A = x("el-select"), j = x("Delete"), M = x("Check"), N = x("Clock"), P = x("el-input"), F = x("el-dialog");
2320
- return _(), i("div", Vt, [
2321
- a("div", Ht, [c(w, {
2351
+ return _(), i("div", Ht, [
2352
+ e.showTemplateSelector ? (_(), i("div", Ut, [c(w, {
2322
2353
  trigger: "click",
2323
2354
  onCommand: o[0] ||= (e) => t.$emit("set-template", e),
2324
2355
  size: "small"
@@ -2363,15 +2394,15 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
2363
2394
  _: 1
2364
2395
  }, 8, ["disabled"])]),
2365
2396
  _: 1
2366
- })]),
2367
- e.isJoinedCollab ? r("", !0) : (_(), i("div", Ut, [c(v, {
2397
+ })])) : r("", !0),
2398
+ e.isJoinedCollab ? r("", !0) : (_(), i("div", Wt, [c(v, {
2368
2399
  size: "small",
2369
2400
  type: e.isCollaborating ? "success" : "default",
2370
2401
  onClick: o[1] ||= (n) => e.isCollaborating ? t.$emit("stop-collab") : t.$emit("start-collab"),
2371
2402
  title: "协作"
2372
2403
  }, {
2373
2404
  default: D(() => [c(g, null, {
2374
- default: D(() => [c(C(ee))]),
2405
+ default: D(() => [c(C(Y))]),
2375
2406
  _: 1
2376
2407
  }), a("span", null, S(e.isCollaborating ? "协作中" : "协作"), 1)]),
2377
2408
  _: 1
@@ -2388,7 +2419,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
2388
2419
  })]),
2389
2420
  _: 1
2390
2421
  })) : r("", !0)])),
2391
- a("div", Wt, [c(w, {
2422
+ a("div", Gt, [c(w, {
2392
2423
  trigger: "click",
2393
2424
  onCommand: p
2394
2425
  }, {
@@ -2411,7 +2442,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
2411
2442
  })]),
2412
2443
  _: 1
2413
2444
  })]),
2414
- a("div", Gt, [c(v, {
2445
+ a("div", Kt, [c(v, {
2415
2446
  size: "small",
2416
2447
  circle: "",
2417
2448
  onClick: o[3] ||= (e) => t.$emit("undo"),
@@ -2436,7 +2467,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
2436
2467
  })]),
2437
2468
  _: 1
2438
2469
  }, 8, ["disabled"])]),
2439
- a("div", Kt, [
2470
+ a("div", qt, [
2440
2471
  c(v, {
2441
2472
  size: "small",
2442
2473
  onClick: o[5] ||= (e) => t.$emit("auto-layout"),
@@ -2480,7 +2511,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
2480
2511
  _: 1
2481
2512
  }, 8, ["modelValue"])
2482
2513
  ]),
2483
- a("div", qt, [c(w, {
2514
+ a("div", Jt, [c(w, {
2484
2515
  trigger: "click",
2485
2516
  onCommand: m
2486
2517
  }, {
@@ -2525,7 +2556,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
2525
2556
  default: D(() => [...o[33] ||= [s(" 导入 ", -1)]]),
2526
2557
  _: 1
2527
2558
  }, 8, ["disabled"])]),
2528
- a("div", Jt, [c(v, {
2559
+ a("div", Yt, [c(v, {
2529
2560
  size: "small",
2530
2561
  onClick: o[10] ||= (e) => t.$emit("clear"),
2531
2562
  disabled: e.disabled,
@@ -2552,7 +2583,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
2552
2583
  _: 1
2553
2584
  })]),
2554
2585
  o[38] ||= a("div", { class: "toolbar-spacer" }, null, -1),
2555
- a("div", Yt, [c(v, {
2586
+ a("div", Xt, [c(v, {
2556
2587
  size: "small",
2557
2588
  type: "primary",
2558
2589
  onClick: o[12] ||= (e) => t.$emit("save")
@@ -2610,16 +2641,16 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
2610
2641
  ]);
2611
2642
  };
2612
2643
  }
2613
- }, [["__scopeId", "data-v-34fc94b1"]]), Zt = ["transform"], Qt = { key: 0 }, $t = ["id"], en = ["offset", "stop-color"], tn = [
2644
+ }, [["__scopeId", "data-v-e290baee"]]), Qt = ["transform"], $t = { key: 0 }, en = ["id"], tn = ["offset", "stop-color"], nn = [
2614
2645
  "width",
2615
2646
  "height",
2616
2647
  "rx"
2617
- ], nn = [
2648
+ ], rn = [
2618
2649
  "width",
2619
2650
  "height",
2620
2651
  "rx",
2621
2652
  "stroke"
2622
- ], rn = [
2653
+ ], an = [
2623
2654
  "width",
2624
2655
  "height",
2625
2656
  "rx",
@@ -2627,19 +2658,19 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
2627
2658
  "stroke-width",
2628
2659
  "stroke-dasharray",
2629
2660
  "filter"
2630
- ], an = [
2661
+ ], on = [
2631
2662
  "x1",
2632
2663
  "y1",
2633
2664
  "x2",
2634
2665
  "y2",
2635
2666
  "stroke"
2636
- ], on = [
2667
+ ], sn = [
2637
2668
  "x1",
2638
2669
  "y1",
2639
2670
  "x2",
2640
2671
  "y2",
2641
2672
  "stroke"
2642
- ], sn = [
2673
+ ], cn = [
2643
2674
  "width",
2644
2675
  "height",
2645
2676
  "rx",
@@ -2647,11 +2678,11 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
2647
2678
  "stroke",
2648
2679
  "stroke-width",
2649
2680
  "filter"
2650
- ], cn = [
2681
+ ], ln = [
2651
2682
  "href",
2652
2683
  "width",
2653
2684
  "height"
2654
- ], ln = [
2685
+ ], un = [
2655
2686
  "cx",
2656
2687
  "cy",
2657
2688
  "rx",
@@ -2660,41 +2691,41 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
2660
2691
  "stroke",
2661
2692
  "stroke-width",
2662
2693
  "filter"
2663
- ], un = [
2694
+ ], dn = [
2664
2695
  "points",
2665
2696
  "fill",
2666
2697
  "stroke",
2667
2698
  "stroke-width",
2668
2699
  "filter"
2669
- ], dn = { key: 10 }, fn = [
2700
+ ], fn = { key: 10 }, pn = [
2670
2701
  "cx",
2671
2702
  "fill",
2672
2703
  "stroke",
2673
2704
  "stroke-width",
2674
2705
  "filter"
2675
- ], pn = ["d", "stroke"], mn = [
2706
+ ], mn = ["d", "stroke"], hn = [
2676
2707
  "x1",
2677
2708
  "x2",
2678
2709
  "stroke"
2679
- ], hn = [
2710
+ ], gn = [
2680
2711
  "x1",
2681
2712
  "x2",
2682
2713
  "stroke"
2683
- ], gn = [
2714
+ ], _n = [
2684
2715
  "x1",
2685
2716
  "x2",
2686
2717
  "stroke"
2687
- ], _n = [
2718
+ ], vn = [
2688
2719
  "x1",
2689
2720
  "x2",
2690
2721
  "y2",
2691
2722
  "stroke"
2692
- ], vn = [
2723
+ ], yn = [
2693
2724
  "x1",
2694
2725
  "x2",
2695
2726
  "y2",
2696
2727
  "stroke"
2697
- ], yn = { key: 11 }, bn = [
2728
+ ], bn = { key: 11 }, xn = [
2698
2729
  "width",
2699
2730
  "height",
2700
2731
  "rx",
@@ -2702,47 +2733,47 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
2702
2733
  "stroke",
2703
2734
  "stroke-width",
2704
2735
  "filter"
2705
- ], xn = ["y", "width"], Sn = { key: 12 }, Cn = [
2736
+ ], Sn = ["y", "width"], Cn = { key: 12 }, wn = [
2706
2737
  "d",
2707
2738
  "fill",
2708
2739
  "stroke",
2709
2740
  "stroke-width",
2710
2741
  "filter"
2711
- ], wn = { key: 13 }, Tn = [
2742
+ ], Tn = { key: 13 }, En = [
2712
2743
  "points",
2713
2744
  "fill",
2714
2745
  "stroke",
2715
2746
  "stroke-width",
2716
2747
  "filter"
2717
- ], En = { key: 14 }, Dn = [
2748
+ ], Dn = { key: 14 }, On = [
2718
2749
  "d",
2719
2750
  "fill",
2720
2751
  "stroke",
2721
2752
  "stroke-width",
2722
2753
  "filter"
2723
- ], On = [
2754
+ ], kn = [
2724
2755
  "d",
2725
2756
  "fill",
2726
2757
  "stroke",
2727
2758
  "stroke-width"
2728
- ], kn = { key: 15 }, An = [
2759
+ ], An = { key: 15 }, jn = [
2729
2760
  "d",
2730
2761
  "fill",
2731
2762
  "stroke",
2732
2763
  "stroke-width",
2733
2764
  "filter"
2734
- ], jn = [
2765
+ ], Mn = [
2735
2766
  "d",
2736
2767
  "fill",
2737
2768
  "stroke",
2738
2769
  "stroke-width"
2739
- ], Mn = { key: 16 }, Nn = [
2770
+ ], Nn = { key: 16 }, Pn = [
2740
2771
  "d",
2741
2772
  "fill",
2742
2773
  "stroke",
2743
2774
  "stroke-width",
2744
2775
  "filter"
2745
- ], Pn = [
2776
+ ], Fn = [
2746
2777
  "cx",
2747
2778
  "cy",
2748
2779
  "rx",
@@ -2750,18 +2781,18 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
2750
2781
  "fill",
2751
2782
  "stroke",
2752
2783
  "stroke-width"
2753
- ], Fn = [
2784
+ ], In = [
2754
2785
  "cx",
2755
2786
  "cy",
2756
2787
  "rx",
2757
2788
  "ry"
2758
- ], In = { key: 17 }, Ln = [
2789
+ ], Ln = { key: 17 }, Rn = [
2759
2790
  "points",
2760
2791
  "fill",
2761
2792
  "stroke",
2762
2793
  "stroke-width",
2763
2794
  "filter"
2764
- ], Rn = { key: 18 }, zn = [
2795
+ ], zn = { key: 18 }, Bn = [
2765
2796
  "cx",
2766
2797
  "cy",
2767
2798
  "r",
@@ -2769,21 +2800,21 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
2769
2800
  "stroke",
2770
2801
  "stroke-width",
2771
2802
  "filter"
2772
- ], Bn = [
2803
+ ], Vn = [
2773
2804
  "cx",
2774
2805
  "cy",
2775
2806
  "r"
2776
- ], Vn = [
2807
+ ], Hn = [
2777
2808
  "x1",
2778
2809
  "y1",
2779
2810
  "x2",
2780
2811
  "y2"
2781
- ], Hn = [
2812
+ ], Un = [
2782
2813
  "x1",
2783
2814
  "y1",
2784
2815
  "x2",
2785
2816
  "y2"
2786
- ], Un = ["cx", "cy"], Wn = { key: 19 }, Gn = [
2817
+ ], Wn = ["cx", "cy"], Gn = { key: 19 }, Kn = [
2787
2818
  "width",
2788
2819
  "height",
2789
2820
  "rx",
@@ -2791,7 +2822,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
2791
2822
  "stroke",
2792
2823
  "stroke-width",
2793
2824
  "filter"
2794
- ], Kn = ["d"], qn = [
2825
+ ], qn = ["d"], Jn = [
2795
2826
  "width",
2796
2827
  "height",
2797
2828
  "rx",
@@ -2799,22 +2830,22 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
2799
2830
  "stroke",
2800
2831
  "stroke-width",
2801
2832
  "filter"
2802
- ], Jn = [
2833
+ ], Yn = [
2803
2834
  "width",
2804
2835
  "height",
2805
2836
  "rx",
2806
2837
  "stroke"
2807
- ], Yn = [
2838
+ ], Xn = [
2808
2839
  "width",
2809
2840
  "height",
2810
2841
  "rx",
2811
2842
  "stroke"
2812
- ], Xn = [
2843
+ ], Zn = [
2813
2844
  "width",
2814
2845
  "height",
2815
2846
  "rx",
2816
2847
  "stroke"
2817
- ], Zn = [
2848
+ ], Qn = [
2818
2849
  "x",
2819
2850
  "y",
2820
2851
  "text-anchor",
@@ -2822,14 +2853,14 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
2822
2853
  "fill",
2823
2854
  "font-size",
2824
2855
  "transform"
2825
- ], Qn = {
2856
+ ], $n = {
2826
2857
  key: 0,
2827
2858
  class: "resize-handles"
2828
- }, $n = [
2859
+ }, er = [
2829
2860
  "x",
2830
2861
  "y",
2831
2862
  "onMousedown"
2832
- ], er = ["cx", "cy"], tr = ["cx", "cy"], nr = /*#__PURE__*/ Q({
2863
+ ], tr = ["cx", "cy"], nr = ["cx", "cy"], rr = /*#__PURE__*/ Q({
2833
2864
  __name: "DiagramNode",
2834
2865
  props: {
2835
2866
  node: {
@@ -2874,7 +2905,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
2874
2905
  "hover-remark"
2875
2906
  ],
2876
2907
  setup(n, { expose: o, emit: s }) {
2877
- let c = n, l = s, u = y(null), d = y(!1), f = null, h = !1, g = null, v = null, x = t(() => c.connectMode || c.autoConnectMode), C = t(() => re[c.theme] || re.classic), w = () => ({
2908
+ let c = n, l = s, u = y(null), d = y(!1), f = null, h = !1, g = null, v = null, x = t(() => c.connectMode || c.autoConnectMode), C = t(() => X[c.theme] || X.classic), w = () => ({
2878
2909
  "#67c23a": "success",
2879
2910
  "#909399": "info",
2880
2911
  "#409eff": "primary",
@@ -2963,13 +2994,13 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
2963
2994
  return r = Math.round(d(p, f, c + 1 / 3) * 255), i = Math.round(d(p, f, c) * 255), a = Math.round(d(p, f, c - 1 / 3) * 255), `rgb(${r}, ${i}, ${a})`;
2964
2995
  }
2965
2996
  let j = t(() => T.value.type === "gradient" ? `url(#grad-${c.node.id})` : (T.value.type, T.value.color)), M = t(() => {
2966
- let e = oe(c.theme, c.selected, c.node.strokeColor), t = c.node.strokeWidth === void 0 ? e.width : c.node.strokeWidth, n = e.sketch ? "4,2" : "none";
2997
+ let e = ce(c.theme, c.selected, c.node.strokeColor), t = c.node.strokeWidth === void 0 ? e.width : c.node.strokeWidth, n = e.sketch ? "4,2" : "none";
2967
2998
  return {
2968
2999
  ...e,
2969
3000
  width: t,
2970
3001
  dasharray: n
2971
3002
  };
2972
- }), N = t(() => c.theme === "neon" ? "#ffffff" : c.node.textColor), P = t(() => se(c.theme)), F = t(() => {
3003
+ }), N = t(() => c.theme === "neon" ? "#ffffff" : c.node.textColor), P = t(() => le(c.theme)), F = t(() => {
2973
3004
  let e = c.node.labelPosition || "center", t = c.node.width, n = c.node.height;
2974
3005
  switch (e) {
2975
3006
  case "top": return {
@@ -3129,14 +3160,14 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
3129
3160
  d.value = !1, f &&= (clearTimeout(f), null);
3130
3161
  }, K = () => {
3131
3162
  d.value = !1, G();
3132
- }, q = () => {
3163
+ }, ee = () => {
3133
3164
  (c.connectMode || c.autoConnectMode) && l("end-connect", h ? null : c.node.id);
3134
- }, J = () => {
3165
+ }, q = () => {
3135
3166
  l("select", c.node.id);
3136
- }, Y = () => {
3167
+ }, te = () => {
3137
3168
  g &&= (g(), null);
3138
- }, X = (e, t) => {
3139
- Y();
3169
+ }, J = (e, t) => {
3170
+ te();
3140
3171
  let n = t.clientX, r = t.clientY, i = c.node.width, a = c.node.height, o = (t) => {
3141
3172
  let o = t.clientX - n, s = t.clientY - r, u = Math.max(60, i + o * e.dx), d = Math.max(30, a + s * e.dy);
3142
3173
  l("resize", c.node.id, u, d);
@@ -3148,7 +3179,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
3148
3179
  }, window.addEventListener("mousemove", o), window.addEventListener("mouseup", s);
3149
3180
  };
3150
3181
  return E(() => c.selected, (e) => {
3151
- e || (Y(), U());
3182
+ e || (te(), U());
3152
3183
  }), o({ clearAutoConnect: K }), (t, o) => (_(), i("g", {
3153
3184
  class: p(["diagram-node", {
3154
3185
  selected: n.selected,
@@ -3160,8 +3191,8 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
3160
3191
  cursor: n.connectMode || n.autoConnectMode ? "crosshair" : "move"
3161
3192
  }),
3162
3193
  onMousedown: A(W, ["stop"]),
3163
- onMouseup: A(q, ["stop"]),
3164
- onClick: A(J, ["stop"]),
3194
+ onMouseup: A(ee, ["stop"]),
3195
+ onClick: A(q, ["stop"]),
3165
3196
  onDblclick: o[0] ||= (e) => t.$emit("select", n.node.id),
3166
3197
  onContextmenu: o[1] ||= A((e) => t.$emit("reset-state"), ["prevent"]),
3167
3198
  onMouseenter: o[2] ||= (e) => t.$emit("hover-remark", {
@@ -3179,7 +3210,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
3179
3210
  class: p(["node-shape", `anim-${n.node.animation}`]),
3180
3211
  style: m(z.value)
3181
3212
  }, [
3182
- T.value.type === "gradient" ? (_(), i("defs", Qt, [a("linearGradient", {
3213
+ T.value.type === "gradient" ? (_(), i("defs", $t, [a("linearGradient", {
3183
3214
  id: `grad-${n.node.id}`,
3184
3215
  x1: "0%",
3185
3216
  y1: "0%",
@@ -3189,7 +3220,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
3189
3220
  key: t,
3190
3221
  offset: `${t / (T.value.colors.length - 1) * 100}%`,
3191
3222
  "stop-color": e
3192
- }, null, 8, en))), 128))], 8, $t)])) : r("", !0),
3223
+ }, null, 8, tn))), 128))], 8, en)])) : r("", !0),
3193
3224
  C.value.nodeStyle.glassHighlight ? (_(), i(e, { key: 1 }, [n.node.shape === "rect" ? (_(), i("rect", {
3194
3225
  key: 0,
3195
3226
  width: n.node.width,
@@ -3197,7 +3228,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
3197
3228
  rx: C.value.nodeStyle.borderRadius,
3198
3229
  fill: "rgba(255,255,255,0.15)",
3199
3230
  style: { "pointer-events": "none" }
3200
- }, null, 8, tn)) : r("", !0)], 64)) : r("", !0),
3231
+ }, null, 8, nn)) : r("", !0)], 64)) : r("", !0),
3201
3232
  C.value.nodeStyle.glowEffect && n.selected ? (_(), i(e, { key: 2 }, [n.node.shape === "rect" ? (_(), i("rect", {
3202
3233
  key: 0,
3203
3234
  x: -4,
@@ -3210,7 +3241,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
3210
3241
  "stroke-width": 3,
3211
3242
  filter: "url(#neon-glow-strong)",
3212
3243
  class: "glow-rect"
3213
- }, null, 8, nn)) : r("", !0)], 64)) : r("", !0),
3244
+ }, null, 8, rn)) : r("", !0)], 64)) : r("", !0),
3214
3245
  n.node.type === "custom" && (n.selected || n.node.strokeWidth > 0) ? (_(), i("rect", {
3215
3246
  key: 3,
3216
3247
  width: n.node.width,
@@ -3221,7 +3252,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
3221
3252
  "stroke-width": n.selected ? 3 : n.node.strokeWidth,
3222
3253
  "stroke-dasharray": n.node.strokeWidth > 0 ? "8,4" : "none",
3223
3254
  filter: `url(#${P.value})`
3224
- }, null, 8, rn)) : r("", !0),
3255
+ }, null, 8, an)) : r("", !0),
3225
3256
  n.node.type === "custom" && (n.selected || n.node.strokeWidth > 0) ? (_(), i("line", {
3226
3257
  key: 4,
3227
3258
  x1: n.node.width / 2,
@@ -3230,7 +3261,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
3230
3261
  y2: n.node.height * .7,
3231
3262
  stroke: n.selected ? "#409eff" : "#909399",
3232
3263
  "stroke-width": "2"
3233
- }, null, 8, an)) : r("", !0),
3264
+ }, null, 8, on)) : r("", !0),
3234
3265
  n.node.type === "custom" && (n.selected || n.node.strokeWidth > 0) ? (_(), i("line", {
3235
3266
  key: 5,
3236
3267
  x1: n.node.width * .3,
@@ -3239,7 +3270,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
3239
3270
  y2: n.node.height / 2,
3240
3271
  stroke: n.selected ? "#409eff" : "#909399",
3241
3272
  "stroke-width": "2"
3242
- }, null, 8, on)) : n.node.shape === "rect" ? (_(), i("rect", {
3273
+ }, null, 8, sn)) : n.node.shape === "rect" ? (_(), i("rect", {
3243
3274
  key: 6,
3244
3275
  width: n.node.width,
3245
3276
  height: n.node.height,
@@ -3248,7 +3279,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
3248
3279
  stroke: M.value.color,
3249
3280
  "stroke-width": n.selected ? 3 : M.value.width,
3250
3281
  filter: `url(#${P.value})`
3251
- }, null, 8, sn)) : r("", !0),
3282
+ }, null, 8, cn)) : r("", !0),
3252
3283
  n.node.type === "custom" && n.node.image ? (_(), i("image", {
3253
3284
  key: 7,
3254
3285
  href: n.node.image,
@@ -3256,7 +3287,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
3256
3287
  height: n.node.height,
3257
3288
  preserveAspectRatio: "none",
3258
3289
  style: { "pointer-events": "none" }
3259
- }, null, 8, cn)) : n.node.shape === "ellipse" ? (_(), i("ellipse", {
3290
+ }, null, 8, ln)) : n.node.shape === "ellipse" ? (_(), i("ellipse", {
3260
3291
  key: 8,
3261
3292
  cx: n.node.width / 2,
3262
3293
  cy: n.node.height / 2,
@@ -3266,14 +3297,14 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
3266
3297
  stroke: M.value.color,
3267
3298
  "stroke-width": n.selected ? 3 : M.value.width,
3268
3299
  filter: `url(#${P.value})`
3269
- }, null, 8, ln)) : n.node.shape === "diamond" ? (_(), i("polygon", {
3300
+ }, null, 8, un)) : n.node.shape === "diamond" ? (_(), i("polygon", {
3270
3301
  key: 9,
3271
3302
  points: I.value,
3272
3303
  fill: j.value,
3273
3304
  stroke: M.value.color,
3274
3305
  "stroke-width": n.selected ? 3 : M.value.width,
3275
3306
  filter: `url(#${P.value})`
3276
- }, null, 8, un)) : n.node.shape === "person" ? (_(), i("g", dn, [
3307
+ }, null, 8, dn)) : n.node.shape === "person" ? (_(), i("g", fn, [
3277
3308
  a("ellipse", {
3278
3309
  cx: n.node.width / 2,
3279
3310
  cy: 18,
@@ -3283,14 +3314,14 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
3283
3314
  stroke: M.value.color,
3284
3315
  "stroke-width": n.selected ? 3 : M.value.width,
3285
3316
  filter: `url(#${P.value})`
3286
- }, null, 8, fn),
3317
+ }, null, 8, pn),
3287
3318
  a("path", {
3288
3319
  d: `M ${n.node.width / 2 - 18} 70 Q ${n.node.width / 2} 45 ${n.node.width / 2 + 18} 70`,
3289
3320
  fill: "none",
3290
3321
  stroke: M.value.color,
3291
3322
  "stroke-width": "5",
3292
3323
  "stroke-linecap": "round"
3293
- }, null, 8, pn),
3324
+ }, null, 8, mn),
3294
3325
  a("line", {
3295
3326
  x1: n.node.width / 2,
3296
3327
  y1: 32,
@@ -3299,7 +3330,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
3299
3330
  stroke: M.value.color,
3300
3331
  "stroke-width": "5",
3301
3332
  "stroke-linecap": "round"
3302
- }, null, 8, mn),
3333
+ }, null, 8, hn),
3303
3334
  a("line", {
3304
3335
  x1: n.node.width / 2,
3305
3336
  y1: 38,
@@ -3308,7 +3339,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
3308
3339
  stroke: M.value.color,
3309
3340
  "stroke-width": "4",
3310
3341
  "stroke-linecap": "round"
3311
- }, null, 8, hn),
3342
+ }, null, 8, gn),
3312
3343
  a("line", {
3313
3344
  x1: n.node.width / 2,
3314
3345
  y1: 38,
@@ -3317,7 +3348,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
3317
3348
  stroke: M.value.color,
3318
3349
  "stroke-width": "4",
3319
3350
  "stroke-linecap": "round"
3320
- }, null, 8, gn),
3351
+ }, null, 8, _n),
3321
3352
  a("line", {
3322
3353
  x1: n.node.width / 2,
3323
3354
  y1: 70,
@@ -3326,7 +3357,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
3326
3357
  stroke: M.value.color,
3327
3358
  "stroke-width": "4",
3328
3359
  "stroke-linecap": "round"
3329
- }, null, 8, _n),
3360
+ }, null, 8, vn),
3330
3361
  a("line", {
3331
3362
  x1: n.node.width / 2,
3332
3363
  y1: 70,
@@ -3335,8 +3366,8 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
3335
3366
  stroke: M.value.color,
3336
3367
  "stroke-width": "4",
3337
3368
  "stroke-linecap": "round"
3338
- }, null, 8, vn)
3339
- ])) : n.node.shape === "subprocess" ? (_(), i("g", yn, [a("rect", {
3369
+ }, null, 8, yn)
3370
+ ])) : n.node.shape === "subprocess" ? (_(), i("g", bn, [a("rect", {
3340
3371
  width: n.node.width,
3341
3372
  height: n.node.height,
3342
3373
  rx: C.value.nodeStyle.borderRadius,
@@ -3344,48 +3375,48 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
3344
3375
  stroke: M.value.color,
3345
3376
  "stroke-width": n.selected ? 3 : M.value.width,
3346
3377
  filter: `url(#${P.value})`
3347
- }, null, 8, bn), a("rect", {
3378
+ }, null, 8, xn), a("rect", {
3348
3379
  x: 4,
3349
3380
  y: n.node.height - 14,
3350
3381
  width: n.node.width - 8,
3351
3382
  height: "10",
3352
3383
  rx: "2",
3353
3384
  fill: "rgba(255,255,255,0.3)"
3354
- }, null, 8, xn)])) : n.node.shape === "document" ? (_(), i("g", Sn, [a("path", {
3385
+ }, null, 8, Sn)])) : n.node.shape === "document" ? (_(), i("g", Cn, [a("path", {
3355
3386
  d: `M 0 0 H ${n.node.width} V ${n.node.height * .8} Q ${n.node.width * .75} ${n.node.height * .65} ${n.node.width * .5} ${n.node.height * .8} Q ${n.node.width * .25} ${n.node.height * .95} 0 ${n.node.height * .8} Z`,
3356
3387
  fill: j.value,
3357
3388
  stroke: M.value.color,
3358
3389
  "stroke-width": n.selected ? 3 : M.value.width,
3359
3390
  filter: `url(#${P.value})`
3360
- }, null, 8, Cn)])) : n.node.shape === "parallelogram" ? (_(), i("g", wn, [a("polygon", {
3391
+ }, null, 8, wn)])) : n.node.shape === "parallelogram" ? (_(), i("g", Tn, [a("polygon", {
3361
3392
  points: `${n.node.width * .15} 0, ${n.node.width} 0, ${n.node.width * .85} ${n.node.height}, 0 ${n.node.height}`,
3362
3393
  fill: j.value,
3363
3394
  stroke: M.value.color,
3364
3395
  "stroke-width": n.selected ? 3 : M.value.width,
3365
3396
  filter: `url(#${P.value})`
3366
- }, null, 8, Tn)])) : n.node.shape === "folder" ? (_(), i("g", En, [a("path", {
3397
+ }, null, 8, En)])) : n.node.shape === "folder" ? (_(), i("g", Dn, [a("path", {
3367
3398
  d: `M 0 12 H ${n.node.width} V ${n.node.height} H 0 Z`,
3368
3399
  fill: j.value,
3369
3400
  stroke: M.value.color,
3370
3401
  "stroke-width": n.selected ? 3 : M.value.width,
3371
3402
  filter: `url(#${P.value})`
3372
- }, null, 8, Dn), a("path", {
3403
+ }, null, 8, On), a("path", {
3373
3404
  d: `M 0 12 V 0 H ${n.node.width * .35} L ${n.node.width * .45} 12`,
3374
3405
  fill: j.value,
3375
3406
  stroke: M.value.color,
3376
3407
  "stroke-width": n.selected ? 3 : M.value.width
3377
- }, null, 8, On)])) : n.node.shape === "note" ? (_(), i("g", kn, [a("path", {
3408
+ }, null, 8, kn)])) : n.node.shape === "note" ? (_(), i("g", An, [a("path", {
3378
3409
  d: `M 0 0 H ${n.node.width} V ${n.node.height - 15} L ${n.node.width - 15} ${n.node.height} H 0 Z`,
3379
3410
  fill: j.value,
3380
3411
  stroke: M.value.color,
3381
3412
  "stroke-width": n.selected ? 3 : M.value.width,
3382
3413
  filter: `url(#${P.value})`
3383
- }, null, 8, An), a("path", {
3414
+ }, null, 8, jn), a("path", {
3384
3415
  d: `M ${n.node.width - 15} ${n.node.height - 15} V ${n.node.height} L ${n.node.width} ${n.node.height - 15}`,
3385
3416
  fill: j.value,
3386
3417
  stroke: M.value.color,
3387
3418
  "stroke-width": n.selected ? 3 : M.value.width
3388
- }, null, 8, jn)])) : n.node.shape === "cylinder" ? (_(), i("g", Mn, [
3419
+ }, null, 8, Mn)])) : n.node.shape === "cylinder" ? (_(), i("g", Nn, [
3389
3420
  a("path", {
3390
3421
  d: `M 0 ${n.node.height * .15}
3391
3422
  Q 0 ${n.node.height * .05} ${n.node.width * .1} ${n.node.height * .02}
@@ -3399,7 +3430,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
3399
3430
  stroke: M.value.color,
3400
3431
  "stroke-width": n.selected ? 3 : M.value.width,
3401
3432
  filter: `url(#${P.value})`
3402
- }, null, 8, Nn),
3433
+ }, null, 8, Pn),
3403
3434
  a("ellipse", {
3404
3435
  cx: n.node.width / 2,
3405
3436
  cy: n.node.height * .15,
@@ -3408,7 +3439,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
3408
3439
  fill: j.value,
3409
3440
  stroke: M.value.color,
3410
3441
  "stroke-width": n.selected ? 3 : M.value.width
3411
- }, null, 8, Pn),
3442
+ }, null, 8, Fn),
3412
3443
  a("ellipse", {
3413
3444
  cx: n.node.width / 2,
3414
3445
  cy: n.node.height * .15,
@@ -3416,14 +3447,14 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
3416
3447
  ry: n.node.height * .08,
3417
3448
  fill: "rgba(255,255,255,0.2)",
3418
3449
  stroke: "none"
3419
- }, null, 8, Fn)
3420
- ])) : n.node.shape === "hexagon" ? (_(), i("g", In, [a("polygon", {
3450
+ }, null, 8, In)
3451
+ ])) : n.node.shape === "hexagon" ? (_(), i("g", Ln, [a("polygon", {
3421
3452
  points: L.value,
3422
3453
  fill: j.value,
3423
3454
  stroke: M.value.color,
3424
3455
  "stroke-width": n.selected ? 3 : M.value.width,
3425
3456
  filter: `url(#${P.value})`
3426
- }, null, 8, Ln)])) : n.node.shape === "timer" ? (_(), i("g", Rn, [
3457
+ }, null, 8, Rn)])) : n.node.shape === "timer" ? (_(), i("g", zn, [
3427
3458
  a("circle", {
3428
3459
  cx: n.node.width / 2,
3429
3460
  cy: n.node.height / 2,
@@ -3432,7 +3463,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
3432
3463
  stroke: M.value.color,
3433
3464
  "stroke-width": n.selected ? 3 : M.value.width,
3434
3465
  filter: `url(#${P.value})`
3435
- }, null, 8, zn),
3466
+ }, null, 8, Bn),
3436
3467
  a("circle", {
3437
3468
  cx: n.node.width / 2,
3438
3469
  cy: n.node.height / 2,
@@ -3440,7 +3471,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
3440
3471
  fill: "none",
3441
3472
  stroke: "rgba(255,255,255,0.4)",
3442
3473
  "stroke-width": "1"
3443
- }, null, 8, Bn),
3474
+ }, null, 8, Vn),
3444
3475
  a("line", {
3445
3476
  x1: n.node.width / 2,
3446
3477
  y1: n.node.height / 2,
@@ -3449,7 +3480,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
3449
3480
  stroke: "#fff",
3450
3481
  "stroke-width": "2",
3451
3482
  "stroke-linecap": "round"
3452
- }, null, 8, Vn),
3483
+ }, null, 8, Hn),
3453
3484
  a("line", {
3454
3485
  x1: n.node.width / 2,
3455
3486
  y1: n.node.height / 2,
@@ -3458,14 +3489,14 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
3458
3489
  stroke: "#fff",
3459
3490
  "stroke-width": "1.5",
3460
3491
  "stroke-linecap": "round"
3461
- }, null, 8, Hn),
3492
+ }, null, 8, Un),
3462
3493
  a("circle", {
3463
3494
  cx: n.node.width / 2,
3464
3495
  cy: n.node.height / 2,
3465
3496
  r: "3",
3466
3497
  fill: "#fff"
3467
- }, null, 8, Un)
3468
- ])) : n.node.shape === "rounded闪电" ? (_(), i("g", Wn, [a("rect", {
3498
+ }, null, 8, Wn)
3499
+ ])) : n.node.shape === "rounded闪电" ? (_(), i("g", Gn, [a("rect", {
3469
3500
  width: n.node.width,
3470
3501
  height: n.node.height,
3471
3502
  rx: n.node.height / 3,
@@ -3473,7 +3504,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
3473
3504
  stroke: M.value.color,
3474
3505
  "stroke-width": n.selected ? 3 : M.value.width,
3475
3506
  filter: `url(#${P.value})`
3476
- }, null, 8, Gn), a("path", {
3507
+ }, null, 8, Kn), a("path", {
3477
3508
  d: `M ${n.node.width * .55} ${n.node.height * .15}
3478
3509
  L ${n.node.width * .35} ${n.node.height * .45}
3479
3510
  H ${n.node.width * .52}
@@ -3482,7 +3513,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
3482
3513
  H ${n.node.width * .48} Z`,
3483
3514
  fill: "#fff",
3484
3515
  opacity: "0.9"
3485
- }, null, 8, Kn)])) : (_(), i("rect", {
3516
+ }, null, 8, qn)])) : (_(), i("rect", {
3486
3517
  key: 20,
3487
3518
  width: n.node.width,
3488
3519
  height: n.node.height,
@@ -3491,7 +3522,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
3491
3522
  stroke: M.value.color,
3492
3523
  "stroke-width": n.selected ? 3 : M.value.width,
3493
3524
  filter: `url(#${P.value})`
3494
- }, null, 8, qn)),
3525
+ }, null, 8, Jn)),
3495
3526
  n.node.animation === "breathing" ? (_(), i("rect", {
3496
3527
  key: 21,
3497
3528
  width: n.node.width + 6,
@@ -3504,7 +3535,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
3504
3535
  "stroke-width": "2",
3505
3536
  class: "breathing-ring",
3506
3537
  style: m(V.value)
3507
- }, null, 12, Jn)) : r("", !0),
3538
+ }, null, 12, Yn)) : r("", !0),
3508
3539
  n.node.animation === "glowPulse" ? (_(), i("rect", {
3509
3540
  key: 22,
3510
3541
  width: n.node.width,
@@ -3515,7 +3546,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
3515
3546
  "stroke-width": "2",
3516
3547
  class: "glow-pulse-ring",
3517
3548
  style: m(B.value)
3518
- }, null, 12, Yn)) : r("", !0),
3549
+ }, null, 12, Xn)) : r("", !0),
3519
3550
  n.node.animation === "ripple" ? (_(), i("rect", {
3520
3551
  key: 23,
3521
3552
  x: -10,
@@ -3528,7 +3559,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
3528
3559
  "stroke-width": "2",
3529
3560
  class: "ripple-ring",
3530
3561
  style: m(H.value)
3531
- }, null, 12, Xn)) : r("", !0)
3562
+ }, null, 12, Zn)) : r("", !0)
3532
3563
  ], 6),
3533
3564
  a("text", {
3534
3565
  x: F.value.x,
@@ -3546,8 +3577,8 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
3546
3577
  "pointer-events": "none",
3547
3578
  "user-select": "none"
3548
3579
  }
3549
- }, S(n.node.label), 11, Zn),
3550
- n.selected && !n.node.locked ? (_(), i("g", Qn, [(_(!0), i(e, null, b(R.value, (e) => (_(), i("rect", {
3580
+ }, S(n.node.label), 11, Qn),
3581
+ n.selected && !n.node.locked ? (_(), i("g", $n, [(_(!0), i(e, null, b(R.value, (e) => (_(), i("rect", {
3551
3582
  key: e.cursor,
3552
3583
  x: e.x - 4,
3553
3584
  y: e.y - 4,
@@ -3557,8 +3588,8 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
3557
3588
  stroke: "#fff",
3558
3589
  "stroke-width": "1",
3559
3590
  style: m({ cursor: e.cursor }),
3560
- onMousedown: A((t) => X(e, t), ["stop"])
3561
- }, null, 44, $n))), 128))])) : r("", !0),
3591
+ onMousedown: A((t) => J(e, t), ["stop"])
3592
+ }, null, 44, er))), 128))])) : r("", !0),
3562
3593
  x.value ? (_(), i("circle", {
3563
3594
  key: 1,
3564
3595
  cx: n.node.width / 2,
@@ -3567,7 +3598,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
3567
3598
  fill: "#409eff",
3568
3599
  opacity: "0.6",
3569
3600
  class: "connect-target"
3570
- }, null, 8, er)) : r("", !0),
3601
+ }, null, 8, tr)) : r("", !0),
3571
3602
  d.value ? (_(), i("circle", {
3572
3603
  key: 2,
3573
3604
  cx: n.node.width / 2,
@@ -3579,49 +3610,49 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
3579
3610
  "stroke-dasharray": "113",
3580
3611
  "stroke-dashoffset": "113",
3581
3612
  class: "long-press-ring"
3582
- }, null, 8, tr)) : r("", !0)
3583
- ], 46, Zt));
3613
+ }, null, 8, nr)) : r("", !0)
3614
+ ], 46, Qt));
3584
3615
  }
3585
- }, [["__scopeId", "data-v-e89a49e8"]]), rr = ["d", "stroke-width"], ir = [
3616
+ }, [["__scopeId", "data-v-e89a49e8"]]), ir = ["d", "stroke-width"], ar = [
3586
3617
  "d",
3587
3618
  "stroke",
3588
3619
  "stroke-width",
3589
3620
  "stroke-dasharray"
3590
- ], ar = ["dur"], or = ["fill"], sr = ["dur", "path"], cr = ["fill"], lr = [
3621
+ ], or = ["dur"], sr = ["fill"], cr = ["dur", "path"], lr = ["fill"], ur = [
3591
3622
  "dur",
3592
3623
  "path",
3593
3624
  "begin"
3594
- ], ur = ["fill"], dr = [
3625
+ ], dr = ["fill"], fr = [
3595
3626
  "dur",
3596
3627
  "path",
3597
3628
  "begin"
3598
- ], fr = ["fill"], pr = ["dur", "path"], mr = ["dur"], hr = ["dur"], gr = ["fill"], _r = [
3629
+ ], pr = ["fill"], mr = ["dur", "path"], hr = ["dur"], gr = ["dur"], _r = ["fill"], vr = [
3599
3630
  "dur",
3600
3631
  "path",
3601
3632
  "begin"
3602
- ], vr = ["dur"], yr = ["fill"], br = [
3633
+ ], yr = ["dur"], br = ["fill"], xr = [
3603
3634
  "dur",
3604
3635
  "path",
3605
3636
  "begin"
3606
- ], xr = ["dur"], Sr = ["fill"], Cr = ["dur", "path"], wr = ["dur"], Tr = ["dur"], Er = ["fill"], Dr = [
3637
+ ], Sr = ["dur"], Cr = ["fill"], wr = ["dur", "path"], Tr = ["dur"], Er = ["dur"], Dr = ["fill"], Or = [
3607
3638
  "dur",
3608
3639
  "path",
3609
3640
  "begin"
3610
- ], Or = ["dur"], kr = ["dur"], Ar = ["fill"], jr = ["dur", "path"], Mr = ["dur"], Nr = ["fill"], Pr = [
3641
+ ], kr = ["dur"], Ar = ["dur"], jr = ["fill"], Mr = ["dur", "path"], Nr = ["dur"], Pr = ["fill"], Fr = [
3611
3642
  "dur",
3612
3643
  "path",
3613
3644
  "begin"
3614
- ], Fr = ["dur"], Ir = ["transform"], Lr = ["x", "width"], Rr = {
3645
+ ], Ir = ["dur"], Lr = ["transform"], Rr = ["x", "width"], zr = {
3615
3646
  "text-anchor": "middle",
3616
3647
  "dominant-baseline": "central",
3617
3648
  fill: "#333",
3618
3649
  "font-size": "12",
3619
3650
  class: "edge-label"
3620
- }, zr = [
3651
+ }, Br = [
3621
3652
  "points",
3622
3653
  "fill",
3623
3654
  "transform"
3624
- ], Br = /*#__PURE__*/ Q({
3655
+ ], Vr = /*#__PURE__*/ Q({
3625
3656
  __name: "DiagramEdge",
3626
3657
  props: {
3627
3658
  edge: {
@@ -3743,7 +3774,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
3743
3774
  stroke: "transparent",
3744
3775
  "stroke-width": Math.max(e.edge.lineWidth + 8, 12),
3745
3776
  class: "edge-hit-area"
3746
- }, null, 8, rr),
3777
+ }, null, 8, ir),
3747
3778
  a("path", {
3748
3779
  d: c.value,
3749
3780
  fill: "none",
@@ -3763,7 +3794,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
3763
3794
  to: "-24",
3764
3795
  dur: (e.edge.animationDuration || 2) + "s",
3765
3796
  repeatCount: "indefinite"
3766
- }, null, 8, ar)) : r("", !0)], 14, ir),
3797
+ }, null, 8, or)) : r("", !0)], 14, ar),
3767
3798
  e.animationPlaying && e.edge.animation === "flow" ? (_(), i("circle", {
3768
3799
  key: 0,
3769
3800
  r: "4",
@@ -3774,7 +3805,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
3774
3805
  dur: (e.edge.animationDuration || 2) + "s",
3775
3806
  repeatCount: "indefinite",
3776
3807
  path: c.value
3777
- }, null, 8, sr)], 12, or)) : r("", !0),
3808
+ }, null, 8, cr)], 12, sr)) : r("", !0),
3778
3809
  e.animationPlaying && e.edge.animation === "flow" ? (_(), i("circle", {
3779
3810
  key: 1,
3780
3811
  r: "3",
@@ -3787,7 +3818,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
3787
3818
  repeatCount: "indefinite",
3788
3819
  path: c.value,
3789
3820
  begin: (e.edge.animationDuration || 2) / 3 + "s"
3790
- }, null, 8, lr)], 12, cr)) : r("", !0),
3821
+ }, null, 8, ur)], 12, lr)) : r("", !0),
3791
3822
  e.animationPlaying && e.edge.animation === "flow" ? (_(), i("circle", {
3792
3823
  key: 2,
3793
3824
  r: "3",
@@ -3800,7 +3831,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
3800
3831
  repeatCount: "indefinite",
3801
3832
  path: c.value,
3802
3833
  begin: (e.edge.animationDuration || 2) * 2 / 3 + "s"
3803
- }, null, 8, dr)], 12, ur)) : r("", !0),
3834
+ }, null, 8, fr)], 12, dr)) : r("", !0),
3804
3835
  e.animationPlaying && e.edge.animation === "particleGlow" ? (_(), i("circle", {
3805
3836
  key: 3,
3806
3837
  r: "5",
@@ -3811,20 +3842,20 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
3811
3842
  dur: (e.edge.animationDuration || 2) + "s",
3812
3843
  repeatCount: "indefinite",
3813
3844
  path: c.value
3814
- }, null, 8, pr),
3845
+ }, null, 8, mr),
3815
3846
  a("animate", {
3816
3847
  attributeName: "r",
3817
3848
  values: "3;6;3",
3818
3849
  dur: (e.edge.animationDuration || 2) + "s",
3819
3850
  repeatCount: "indefinite"
3820
- }, null, 8, mr),
3851
+ }, null, 8, hr),
3821
3852
  a("animate", {
3822
3853
  attributeName: "opacity",
3823
3854
  values: "0.5;1;0.5",
3824
3855
  dur: (e.edge.animationDuration || 2) + "s",
3825
3856
  repeatCount: "indefinite"
3826
- }, null, 8, hr)
3827
- ], 8, fr)) : r("", !0),
3857
+ }, null, 8, gr)
3858
+ ], 8, pr)) : r("", !0),
3828
3859
  e.animationPlaying && e.edge.animation === "particleGlow" ? (_(), i("circle", {
3829
3860
  key: 4,
3830
3861
  r: "4",
@@ -3836,12 +3867,12 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
3836
3867
  repeatCount: "indefinite",
3837
3868
  path: c.value,
3838
3869
  begin: (e.edge.animationDuration || 2) / 3 + "s"
3839
- }, null, 8, _r), a("animate", {
3870
+ }, null, 8, vr), a("animate", {
3840
3871
  attributeName: "r",
3841
3872
  values: "2;5;2",
3842
3873
  dur: (e.edge.animationDuration || 2) + "s",
3843
3874
  repeatCount: "indefinite"
3844
- }, null, 8, vr)], 8, gr)) : r("", !0),
3875
+ }, null, 8, yr)], 8, _r)) : r("", !0),
3845
3876
  e.animationPlaying && e.edge.animation === "particleGlow" ? (_(), i("circle", {
3846
3877
  key: 5,
3847
3878
  r: "4",
@@ -3853,12 +3884,12 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
3853
3884
  repeatCount: "indefinite",
3854
3885
  path: c.value,
3855
3886
  begin: (e.edge.animationDuration || 2) * 2 / 3 + "s"
3856
- }, null, 8, br), a("animate", {
3887
+ }, null, 8, xr), a("animate", {
3857
3888
  attributeName: "r",
3858
3889
  values: "2;5;2",
3859
3890
  dur: (e.edge.animationDuration || 2) + "s",
3860
3891
  repeatCount: "indefinite"
3861
- }, null, 8, xr)], 8, yr)) : r("", !0),
3892
+ }, null, 8, Sr)], 8, br)) : r("", !0),
3862
3893
  e.animationPlaying && e.edge.animation === "pulse" ? (_(), i("circle", {
3863
3894
  key: 6,
3864
3895
  r: "6",
@@ -3870,20 +3901,20 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
3870
3901
  dur: (e.edge.animationDuration || 2) + "s",
3871
3902
  repeatCount: "indefinite",
3872
3903
  path: c.value
3873
- }, null, 8, Cr),
3904
+ }, null, 8, wr),
3874
3905
  a("animate", {
3875
3906
  attributeName: "r",
3876
3907
  values: "2;8;2",
3877
3908
  dur: (e.edge.animationDuration || 2) + "s",
3878
3909
  repeatCount: "indefinite"
3879
- }, null, 8, wr),
3910
+ }, null, 8, Tr),
3880
3911
  a("animate", {
3881
3912
  attributeName: "opacity",
3882
3913
  values: "0;0.8;0",
3883
3914
  dur: (e.edge.animationDuration || 2) + "s",
3884
3915
  repeatCount: "indefinite"
3885
- }, null, 8, Tr)
3886
- ], 8, Sr)) : r("", !0),
3916
+ }, null, 8, Er)
3917
+ ], 8, Cr)) : r("", !0),
3887
3918
  e.animationPlaying && e.edge.animation === "pulse" ? (_(), i("circle", {
3888
3919
  key: 7,
3889
3920
  r: "6",
@@ -3896,20 +3927,20 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
3896
3927
  repeatCount: "indefinite",
3897
3928
  path: c.value,
3898
3929
  begin: (e.edge.animationDuration || 2) / 2 + "s"
3899
- }, null, 8, Dr),
3930
+ }, null, 8, Or),
3900
3931
  a("animate", {
3901
3932
  attributeName: "r",
3902
3933
  values: "2;8;2",
3903
3934
  dur: (e.edge.animationDuration || 2) + "s",
3904
3935
  repeatCount: "indefinite"
3905
- }, null, 8, Or),
3936
+ }, null, 8, kr),
3906
3937
  a("animate", {
3907
3938
  attributeName: "opacity",
3908
3939
  values: "0;0.8;0",
3909
3940
  dur: (e.edge.animationDuration || 2) + "s",
3910
3941
  repeatCount: "indefinite"
3911
- }, null, 8, kr)
3912
- ], 8, Er)) : r("", !0),
3942
+ }, null, 8, Ar)
3943
+ ], 8, Dr)) : r("", !0),
3913
3944
  e.animationPlaying && e.edge.animation === "neon" ? (_(), i("circle", {
3914
3945
  key: 8,
3915
3946
  r: "4",
@@ -3919,12 +3950,12 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
3919
3950
  dur: (e.edge.animationDuration || 2) + "s",
3920
3951
  repeatCount: "indefinite",
3921
3952
  path: c.value
3922
- }, null, 8, jr), a("animate", {
3953
+ }, null, 8, Mr), a("animate", {
3923
3954
  attributeName: "r",
3924
3955
  values: "2;5;2",
3925
3956
  dur: (e.edge.animationDuration || 2) + "s",
3926
3957
  repeatCount: "indefinite"
3927
- }, null, 8, Mr)], 8, Ar)) : r("", !0),
3958
+ }, null, 8, Nr)], 8, jr)) : r("", !0),
3928
3959
  e.animationPlaying && e.edge.animation === "neon" ? (_(), i("circle", {
3929
3960
  key: 9,
3930
3961
  r: "4",
@@ -3936,12 +3967,12 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
3936
3967
  repeatCount: "indefinite",
3937
3968
  path: c.value,
3938
3969
  begin: (e.edge.animationDuration || 2) / 2 + "s"
3939
- }, null, 8, Pr), a("animate", {
3970
+ }, null, 8, Fr), a("animate", {
3940
3971
  attributeName: "r",
3941
3972
  values: "2;5;2",
3942
3973
  dur: (e.edge.animationDuration || 2) + "s",
3943
3974
  repeatCount: "indefinite"
3944
- }, null, 8, Fr)], 8, Nr)) : r("", !0),
3975
+ }, null, 8, Ir)], 8, Pr)) : r("", !0),
3945
3976
  e.edge.label ? (_(), i("g", {
3946
3977
  key: 10,
3947
3978
  transform: `translate(${l.value.x}, ${l.value.y})`
@@ -3954,32 +3985,32 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
3954
3985
  fill: "#fff",
3955
3986
  stroke: "#e4e7ed",
3956
3987
  "stroke-width": "1"
3957
- }, null, 8, Lr), a("text", Rr, S(e.edge.label), 1)], 8, Ir)) : r("", !0),
3988
+ }, null, 8, Rr), a("text", zr, S(e.edge.label), 1)], 8, Lr)) : r("", !0),
3958
3989
  e.edge.arrowType === "none" ? r("", !0) : (_(), i("polygon", {
3959
3990
  key: 11,
3960
3991
  points: g.value,
3961
3992
  fill: e.selected ? "#409eff" : e.edge.lineColor,
3962
3993
  transform: `translate(${s.value.x}, ${s.value.y}) rotate(${h.value})`
3963
- }, null, 8, zr))
3994
+ }, null, 8, Br))
3964
3995
  ], 34)) : r("", !0);
3965
3996
  }
3966
- }, [["__scopeId", "data-v-737212ef"]]), Vr = ["transform"], Hr = [
3997
+ }, [["__scopeId", "data-v-737212ef"]]), Hr = ["transform"], Ur = [
3967
3998
  "width",
3968
3999
  "height",
3969
4000
  "fill",
3970
4001
  "stroke",
3971
4002
  "stroke-width"
3972
- ], Ur = [
4003
+ ], Wr = [
3973
4004
  "width",
3974
4005
  "height",
3975
4006
  "fill",
3976
4007
  "opacity"
3977
- ], Wr = [
4008
+ ], Gr = [
3978
4009
  "width",
3979
4010
  "height",
3980
4011
  "fill",
3981
4012
  "opacity"
3982
- ], Gr = [
4013
+ ], Kr = [
3983
4014
  "x",
3984
4015
  "y",
3985
4016
  "fill",
@@ -3988,7 +4019,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
3988
4019
  "font-weight",
3989
4020
  "font-style",
3990
4021
  "transform"
3991
- ], Kr = [
4022
+ ], qr = [
3992
4023
  "x",
3993
4024
  "y",
3994
4025
  "text-anchor",
@@ -3997,63 +4028,63 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
3997
4028
  "font-family",
3998
4029
  "font-weight",
3999
4030
  "font-style"
4000
- ], qr = ["y", "width"], Jr = {
4031
+ ], Jr = ["y", "width"], Yr = {
4001
4032
  xmlns: "http://www.w3.org/1999/xhtml",
4002
4033
  class: "edit-name-container"
4003
- }, Yr = ["x", "height"], Xr = {
4034
+ }, Xr = ["x", "height"], Zr = {
4004
4035
  xmlns: "http://www.w3.org/1999/xhtml",
4005
4036
  class: "edit-name-container vertical"
4006
- }, Zr = [
4037
+ }, Qr = [
4007
4038
  "x1",
4008
4039
  "x2",
4009
4040
  "onClick"
4010
- ], Qr = [
4041
+ ], $r = [
4011
4042
  "x1",
4012
4043
  "x2",
4013
4044
  "stroke"
4014
- ], $r = [
4045
+ ], ei = [
4015
4046
  "y1",
4016
4047
  "x2",
4017
4048
  "y2",
4018
4049
  "onClick",
4019
4050
  "onMousedown"
4020
- ], ei = [
4051
+ ], ti = [
4021
4052
  "x1",
4022
4053
  "x2",
4023
4054
  "y2",
4024
4055
  "onClick",
4025
4056
  "onMousedown"
4026
- ], ti = [
4057
+ ], ni = [
4027
4058
  "y1",
4028
4059
  "x2",
4029
4060
  "y2",
4030
4061
  "stroke"
4031
- ], ni = [
4062
+ ], ri = [
4032
4063
  "x1",
4033
4064
  "x2",
4034
4065
  "y2",
4035
4066
  "stroke"
4036
- ], ri = [
4067
+ ], ii = [
4037
4068
  "y1",
4038
4069
  "x2",
4039
4070
  "y2",
4040
4071
  "onClick"
4041
- ], ii = [
4072
+ ], ai = [
4042
4073
  "y1",
4043
4074
  "x2",
4044
4075
  "y2",
4045
4076
  "stroke"
4046
- ], ai = [
4077
+ ], oi = [
4047
4078
  "x1",
4048
4079
  "x2",
4049
4080
  "y2",
4050
4081
  "onClick"
4051
- ], oi = [
4082
+ ], si = [
4052
4083
  "x1",
4053
4084
  "x2",
4054
4085
  "y2",
4055
4086
  "stroke"
4056
- ], si = [
4087
+ ], ci = [
4057
4088
  "x",
4058
4089
  "y",
4059
4090
  "width",
@@ -4063,7 +4094,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
4063
4094
  "stroke-width",
4064
4095
  "opacity",
4065
4096
  "onClick"
4066
- ], ci = [
4097
+ ], li = [
4067
4098
  "x",
4068
4099
  "y",
4069
4100
  "width",
@@ -4073,17 +4104,17 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
4073
4104
  "stroke-width",
4074
4105
  "opacity",
4075
4106
  "onClick"
4076
- ], li = [
4107
+ ], ui = [
4077
4108
  "x",
4078
4109
  "y",
4079
4110
  "width",
4080
4111
  "fill"
4081
- ], ui = [
4112
+ ], di = [
4082
4113
  "x",
4083
4114
  "y",
4084
4115
  "width",
4085
4116
  "fill"
4086
- ], di = [
4117
+ ], fi = [
4087
4118
  "x",
4088
4119
  "y",
4089
4120
  "text-anchor",
@@ -4094,7 +4125,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
4094
4125
  "font-style",
4095
4126
  "onClick",
4096
4127
  "onDblclick"
4097
- ], fi = [
4128
+ ], pi = [
4098
4129
  "x",
4099
4130
  "y",
4100
4131
  "text-anchor",
@@ -4105,29 +4136,29 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
4105
4136
  "font-style",
4106
4137
  "onClick",
4107
4138
  "onDblclick"
4108
- ], pi = [
4139
+ ], mi = [
4109
4140
  "x",
4110
4141
  "y",
4111
4142
  "width"
4112
- ], mi = {
4143
+ ], hi = {
4113
4144
  xmlns: "http://www.w3.org/1999/xhtml",
4114
4145
  class: "edit-lane-container"
4115
- }, hi = ["onBlur", "onKeydown"], gi = [
4146
+ }, gi = ["onBlur", "onKeydown"], _i = [
4116
4147
  "x",
4117
4148
  "y",
4118
4149
  "width"
4119
- ], _i = {
4150
+ ], vi = {
4120
4151
  xmlns: "http://www.w3.org/1999/xhtml",
4121
4152
  class: "edit-lane-container"
4122
- }, vi = ["onBlur", "onKeydown"], yi = ["x", "y"], bi = ["x", "y"], xi = ["x", "y"], Si = [
4153
+ }, yi = ["onBlur", "onKeydown"], bi = ["x", "y"], xi = ["x", "y"], Si = ["x", "y"], Ci = [
4123
4154
  "y1",
4124
4155
  "x2",
4125
4156
  "y2"
4126
- ], Ci = [
4157
+ ], wi = [
4127
4158
  "x1",
4128
4159
  "x2",
4129
4160
  "y2"
4130
- ], wi = /*#__PURE__*/ Q({
4161
+ ], Ti = /*#__PURE__*/ Q({
4131
4162
  __name: "SwimlaneNode",
4132
4163
  props: {
4133
4164
  swimlane: {
@@ -4212,17 +4243,17 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
4212
4243
  window.removeEventListener("mousemove", a), window.removeEventListener("mouseup", o);
4213
4244
  };
4214
4245
  window.addEventListener("mousemove", a), window.addEventListener("mouseup", o);
4215
- }, K = y(null), q = y(0), J = y(0), Y = y(0), X = (e, t) => {
4216
- e.preventDefault(), K.value = t, s.swimlane.direction === "horizontal" ? (q.value = h(t), Y.value = s.swimlane.lanes[t].height) : (J.value = g(t), Y.value = s.swimlane.lanes[t].width || v(t));
4246
+ }, K = y(null), ee = y(0), q = y(0), te = y(0), J = (e, t) => {
4247
+ e.preventDefault(), K.value = t, s.swimlane.direction === "horizontal" ? (ee.value = h(t), te.value = s.swimlane.lanes[t].height) : (q.value = g(t), te.value = s.swimlane.lanes[t].width || v(t));
4217
4248
  let n = {
4218
4249
  x: e.clientX,
4219
4250
  y: e.clientY
4220
4251
  }, r = (e) => {
4221
4252
  if (s.swimlane.direction === "horizontal") {
4222
- let r = e.clientY - n.y, i = Math.max(40, Y.value + r);
4253
+ let r = e.clientY - n.y, i = Math.max(40, te.value + r);
4223
4254
  c("resize-lane", s.swimlane.id, s.swimlane.lanes[t].id, i);
4224
4255
  } else {
4225
- let r = e.clientX - n.x, i = Math.max(80, Y.value + r);
4256
+ let r = e.clientX - n.x, i = Math.max(80, te.value + r);
4226
4257
  c("resize-lane", s.swimlane.id, s.swimlane.lanes[t].id, null, i);
4227
4258
  }
4228
4259
  }, i = () => {
@@ -4244,7 +4275,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
4244
4275
  rx: "4",
4245
4276
  class: "swimlane-bg",
4246
4277
  onClick: o[0] ||= A((e) => t.$emit("select"), ["stop"])
4247
- }, null, 8, Hr),
4278
+ }, null, 8, Ur),
4248
4279
  n.swimlane.direction === "horizontal" ? (_(), i("rect", {
4249
4280
  key: 0,
4250
4281
  width: l.value,
@@ -4255,7 +4286,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
4255
4286
  class: "swimlane-header",
4256
4287
  onClick: A(j, ["stop"]),
4257
4288
  onDblclick: A(D, ["stop"])
4258
- }, null, 40, Ur)) : (_(), i("rect", {
4289
+ }, null, 40, Wr)) : (_(), i("rect", {
4259
4290
  key: 1,
4260
4291
  width: n.swimlane.width,
4261
4292
  height: u.value,
@@ -4265,7 +4296,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
4265
4296
  class: "swimlane-header",
4266
4297
  onClick: A(j, ["stop"]),
4267
4298
  onDblclick: A(D, ["stop"])
4268
- }, null, 40, Wr)),
4299
+ }, null, 40, Gr)),
4269
4300
  !x.value && n.swimlane.direction === "horizontal" ? (_(), i("text", {
4270
4301
  key: 2,
4271
4302
  x: l.value / 2,
@@ -4280,7 +4311,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
4280
4311
  "pointer-events": "none",
4281
4312
  transform: `rotate(-90, ${l.value / 2}, ${d.value / 2})`,
4282
4313
  dy: "0.35em"
4283
- }, S(n.swimlane.name), 9, Gr)) : !x.value && n.swimlane.direction === "vertical" ? (_(), i("text", {
4314
+ }, S(n.swimlane.name), 9, Kr)) : !x.value && n.swimlane.direction === "vertical" ? (_(), i("text", {
4284
4315
  key: 3,
4285
4316
  x: n.swimlane.textAlign === "left" ? 8 : n.swimlane.textAlign === "right" ? n.swimlane.width - 8 : n.swimlane.width / 2,
4286
4317
  y: u.value / 2,
@@ -4293,14 +4324,14 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
4293
4324
  class: "swimlane-title",
4294
4325
  "pointer-events": "none",
4295
4326
  "dominant-baseline": "central"
4296
- }, S(n.swimlane.name), 9, Kr)) : r("", !0),
4327
+ }, S(n.swimlane.name), 9, qr)) : r("", !0),
4297
4328
  x.value && n.swimlane.direction === "horizontal" ? (_(), i("foreignObject", {
4298
4329
  key: 4,
4299
4330
  x: 0,
4300
4331
  y: d.value / 2 - 14,
4301
4332
  width: l.value,
4302
4333
  height: 28
4303
- }, [a("div", Jr, [O(a("input", {
4334
+ }, [a("div", Yr, [O(a("input", {
4304
4335
  ref_key: "nameInputRef",
4305
4336
  ref: E,
4306
4337
  "onUpdate:modelValue": o[1] ||= (e) => C.value = e,
@@ -4315,14 +4346,14 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
4315
4346
  onBlur: M,
4316
4347
  onKeydown: [k(M, ["enter"]), k(N, ["escape"])],
4317
4348
  onClick: o[2] ||= A(() => {}, ["stop"])
4318
- }, null, 36), [[w, C.value]])])], 8, qr)) : r("", !0),
4349
+ }, null, 36), [[w, C.value]])])], 8, Jr)) : r("", !0),
4319
4350
  x.value && n.swimlane.direction === "vertical" ? (_(), i("foreignObject", {
4320
4351
  key: 5,
4321
4352
  x: n.swimlane.textAlign === "left" ? 0 : n.swimlane.textAlign === "right" ? n.swimlane.width - 120 : n.swimlane.width / 2 - 60,
4322
4353
  y: 0,
4323
4354
  width: 120,
4324
4355
  height: u.value
4325
- }, [a("div", Xr, [O(a("input", {
4356
+ }, [a("div", Zr, [O(a("input", {
4326
4357
  ref_key: "nameInputRef",
4327
4358
  ref: E,
4328
4359
  "onUpdate:modelValue": o[3] ||= (e) => C.value = e,
@@ -4338,7 +4369,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
4338
4369
  onBlur: M,
4339
4370
  onKeydown: [k(M, ["enter"]), k(N, ["escape"])],
4340
4371
  onClick: o[4] ||= A(() => {}, ["stop"])
4341
- }, null, 36), [[w, C.value]])])], 8, Yr)) : r("", !0),
4372
+ }, null, 36), [[w, C.value]])])], 8, Xr)) : r("", !0),
4342
4373
  n.swimlane.lanes && n.swimlane.lanes.length ? (_(!0), i(e, { key: 6 }, b(n.swimlane.lanes, (t, s) => (_(), i("g", { key: t.id }, [
4343
4374
  s === 0 && n.swimlane.direction === "horizontal" ? (_(), i(e, { key: 0 }, [a("line", {
4344
4375
  x1: l.value,
@@ -4350,8 +4381,8 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
4350
4381
  class: "lane-divider-hit",
4351
4382
  style: { cursor: "ns-resize" },
4352
4383
  onClick: A((e) => P(t.id), ["stop"]),
4353
- onMousedown: o[5] ||= A((e) => X(e, 0), ["stop"])
4354
- }, null, 40, Zr), a("line", {
4384
+ onMousedown: o[5] ||= A((e) => J(e, 0), ["stop"])
4385
+ }, null, 40, Qr), a("line", {
4355
4386
  x1: l.value,
4356
4387
  y1: 0,
4357
4388
  x2: n.swimlane.width,
@@ -4361,7 +4392,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
4361
4392
  "stroke-dasharray": "4,2",
4362
4393
  class: "lane-divider",
4363
4394
  "pointer-events": "none"
4364
- }, null, 8, Qr)], 64)) : r("", !0),
4395
+ }, null, 8, $r)], 64)) : r("", !0),
4365
4396
  s > 0 ? (_(), i(e, { key: 1 }, [n.swimlane.direction === "horizontal" ? (_(), i("line", {
4366
4397
  key: 0,
4367
4398
  x1: 0,
@@ -4373,8 +4404,8 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
4373
4404
  class: "lane-divider-hit",
4374
4405
  style: { cursor: "ns-resize" },
4375
4406
  onClick: A((e) => P(n.swimlane.lanes[s - 1].id), ["stop"]),
4376
- onMousedown: A((e) => X(e, s - 1), ["stop"])
4377
- }, null, 40, $r)) : (_(), i("line", {
4407
+ onMousedown: A((e) => J(e, s - 1), ["stop"])
4408
+ }, null, 40, ei)) : (_(), i("line", {
4378
4409
  key: 1,
4379
4410
  x1: g(s),
4380
4411
  y1: 0,
@@ -4385,8 +4416,8 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
4385
4416
  class: "lane-divider-hit",
4386
4417
  style: { cursor: "ew-resize" },
4387
4418
  onClick: A((e) => P(n.swimlane.lanes[s - 1].id), ["stop"]),
4388
- onMousedown: A((e) => X(e, s - 1), ["stop"])
4389
- }, null, 40, ei)), n.swimlane.direction === "horizontal" ? (_(), i("line", {
4419
+ onMousedown: A((e) => J(e, s - 1), ["stop"])
4420
+ }, null, 40, ti)), n.swimlane.direction === "horizontal" ? (_(), i("line", {
4390
4421
  key: 2,
4391
4422
  x1: 0,
4392
4423
  y1: h(s),
@@ -4397,7 +4428,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
4397
4428
  "stroke-dasharray": "4,2",
4398
4429
  class: "lane-divider",
4399
4430
  "pointer-events": "none"
4400
- }, null, 8, ti)) : (_(), i("line", {
4431
+ }, null, 8, ni)) : (_(), i("line", {
4401
4432
  key: 3,
4402
4433
  x1: g(s),
4403
4434
  y1: 0,
@@ -4408,7 +4439,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
4408
4439
  "stroke-dasharray": "4,2",
4409
4440
  class: "lane-divider",
4410
4441
  "pointer-events": "none"
4411
- }, null, 8, ni))], 64)) : r("", !0),
4442
+ }, null, 8, ri))], 64)) : r("", !0),
4412
4443
  s === n.swimlane.lanes.length - 1 && n.swimlane.direction === "horizontal" ? (_(), i(e, { key: 2 }, [a("line", {
4413
4444
  x1: 0,
4414
4445
  y1: d.value,
@@ -4419,8 +4450,8 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
4419
4450
  class: "lane-divider-hit",
4420
4451
  style: { cursor: "ns-resize" },
4421
4452
  onClick: A((e) => P(t.id), ["stop"]),
4422
- onMousedown: o[6] ||= A((e) => X(e, n.swimlane.lanes.length - 1), ["stop"])
4423
- }, null, 40, ri), a("line", {
4453
+ onMousedown: o[6] ||= A((e) => J(e, n.swimlane.lanes.length - 1), ["stop"])
4454
+ }, null, 40, ii), a("line", {
4424
4455
  x1: 0,
4425
4456
  y1: d.value,
4426
4457
  x2: n.swimlane.width,
@@ -4430,7 +4461,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
4430
4461
  "stroke-dasharray": "4,2",
4431
4462
  class: "lane-divider",
4432
4463
  "pointer-events": "none"
4433
- }, null, 8, ii)], 64)) : r("", !0),
4464
+ }, null, 8, ai)], 64)) : r("", !0),
4434
4465
  s === n.swimlane.lanes.length - 1 && n.swimlane.direction === "vertical" ? (_(), i(e, { key: 3 }, [a("line", {
4435
4466
  x1: g(n.swimlane.lanes.length),
4436
4467
  y1: 0,
@@ -4441,8 +4472,8 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
4441
4472
  class: "lane-divider-hit",
4442
4473
  style: { cursor: "ew-resize" },
4443
4474
  onClick: A((e) => P(t.id), ["stop"]),
4444
- onMousedown: o[7] ||= A((e) => X(e, n.swimlane.lanes.length - 1), ["stop"])
4445
- }, null, 40, ai), a("line", {
4475
+ onMousedown: o[7] ||= A((e) => J(e, n.swimlane.lanes.length - 1), ["stop"])
4476
+ }, null, 40, oi), a("line", {
4446
4477
  x1: g(n.swimlane.lanes.length),
4447
4478
  y1: 0,
4448
4479
  x2: g(n.swimlane.lanes.length),
@@ -4452,7 +4483,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
4452
4483
  "stroke-dasharray": "4,2",
4453
4484
  class: "lane-divider",
4454
4485
  "pointer-events": "none"
4455
- }, null, 8, oi)], 64)) : r("", !0),
4486
+ }, null, 8, si)], 64)) : r("", !0),
4456
4487
  n.swimlane.direction === "horizontal" ? (_(), i("rect", {
4457
4488
  key: 4,
4458
4489
  x: l.value + 4,
@@ -4466,7 +4497,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
4466
4497
  opacity: t.opacity ?? .5,
4467
4498
  class: "lane-bg",
4468
4499
  onClick: A((e) => P(t.id), ["stop"])
4469
- }, null, 8, si)) : (_(), i("rect", {
4500
+ }, null, 8, ci)) : (_(), i("rect", {
4470
4501
  key: 5,
4471
4502
  x: g(s) + 4,
4472
4503
  y: u.value + 4,
@@ -4479,7 +4510,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
4479
4510
  opacity: t.opacity ?? .5,
4480
4511
  class: "lane-bg",
4481
4512
  onClick: A((e) => P(t.id), ["stop"])
4482
- }, null, 8, ci)),
4513
+ }, null, 8, li)),
4483
4514
  t.headerColor ? O((_(), i("rect", {
4484
4515
  key: 6,
4485
4516
  x: l.value + 4,
@@ -4489,7 +4520,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
4489
4520
  fill: t.headerColor,
4490
4521
  rx: "2",
4491
4522
  "pointer-events": "none"
4492
- }, null, 8, li)), [[T, n.swimlane.direction === "horizontal"]]) : r("", !0),
4523
+ }, null, 8, ui)), [[T, n.swimlane.direction === "horizontal"]]) : r("", !0),
4493
4524
  t.headerColor ? O((_(), i("rect", {
4494
4525
  key: 7,
4495
4526
  x: g(s) + 4,
@@ -4499,7 +4530,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
4499
4530
  fill: t.headerColor,
4500
4531
  rx: "2",
4501
4532
  "pointer-events": "none"
4502
- }, null, 8, ui)), [[T, n.swimlane.direction === "vertical"]]) : r("", !0),
4533
+ }, null, 8, di)), [[T, n.swimlane.direction === "vertical"]]) : r("", !0),
4503
4534
  n.swimlane.direction === "horizontal" && F.value !== t.id ? (_(), i("text", {
4504
4535
  key: 8,
4505
4536
  x: t.textAlign === "center" ? (l.value + n.swimlane.width) / 2 : t.textAlign === "right" ? n.swimlane.width - 10 : l.value + 10,
@@ -4514,7 +4545,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
4514
4545
  class: "lane-label",
4515
4546
  onClick: A((e) => P(t.id), ["stop"]),
4516
4547
  onDblclick: A((e) => R(t), ["stop"])
4517
- }, S(t.name), 41, di)) : n.swimlane.direction === "vertical" && F.value !== t.id ? (_(), i("text", {
4548
+ }, S(t.name), 41, fi)) : n.swimlane.direction === "vertical" && F.value !== t.id ? (_(), i("text", {
4518
4549
  key: 9,
4519
4550
  x: t.textAlign === "center" ? g(s) + v(s) / 2 : t.textAlign === "right" ? g(s) + v(s) - 10 : g(s) + 10,
4520
4551
  y: u.value + 17,
@@ -4528,14 +4559,14 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
4528
4559
  class: "lane-label",
4529
4560
  onClick: A((e) => P(t.id), ["stop"]),
4530
4561
  onDblclick: A((e) => R(t), ["stop"])
4531
- }, S(t.name), 41, fi)) : r("", !0),
4562
+ }, S(t.name), 41, pi)) : r("", !0),
4532
4563
  F.value === t.id && n.swimlane.direction === "horizontal" ? (_(), i("foreignObject", {
4533
4564
  key: 10,
4534
4565
  x: l.value + 8,
4535
4566
  y: h(s) + 4,
4536
4567
  width: n.swimlane.width - l.value - 16,
4537
4568
  height: 26
4538
- }, [a("div", mi, [O(a("input", {
4569
+ }, [a("div", hi, [O(a("input", {
4539
4570
  ref_for: !0,
4540
4571
  ref_key: "laneNameInputRef",
4541
4572
  ref: L,
@@ -4552,14 +4583,14 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
4552
4583
  onBlur: (e) => z(t),
4553
4584
  onKeydown: [k((e) => z(t), ["enter"]), k(B, ["escape"])],
4554
4585
  onClick: o[9] ||= A(() => {}, ["stop"])
4555
- }, null, 44, hi), [[w, I.value]])])], 8, pi)) : r("", !0),
4586
+ }, null, 44, gi), [[w, I.value]])])], 8, mi)) : r("", !0),
4556
4587
  F.value === t.id && n.swimlane.direction === "vertical" ? (_(), i("foreignObject", {
4557
4588
  key: 11,
4558
4589
  x: g(s) + 8,
4559
4590
  y: u.value + 4,
4560
4591
  width: v(s) - 16,
4561
4592
  height: 26
4562
- }, [a("div", _i, [O(a("input", {
4593
+ }, [a("div", vi, [O(a("input", {
4563
4594
  ref_for: !0,
4564
4595
  ref_key: "laneNameInputRef",
4565
4596
  ref: L,
@@ -4576,7 +4607,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
4576
4607
  onBlur: (e) => z(t),
4577
4608
  onKeydown: [k((e) => z(t), ["enter"]), k(B, ["escape"])],
4578
4609
  onClick: o[11] ||= A(() => {}, ["stop"])
4579
- }, null, 44, vi), [[w, I.value]])])], 8, gi)) : r("", !0)
4610
+ }, null, 44, yi), [[w, I.value]])])], 8, _i)) : r("", !0)
4580
4611
  ]))), 128)) : r("", !0),
4581
4612
  n.selected ? (_(), i(e, { key: 7 }, [
4582
4613
  a("rect", {
@@ -4590,7 +4621,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
4590
4621
  style: { cursor: "ew-resize" },
4591
4622
  onMousedown: o[12] ||= A((e) => W(e, "right"), ["stop", "prevent"]),
4592
4623
  onClick: o[13] ||= A(() => {}, ["stop"])
4593
- }, null, 40, yi),
4624
+ }, null, 40, bi),
4594
4625
  a("rect", {
4595
4626
  x: n.swimlane.width / 2 - 10,
4596
4627
  y: d.value - 4,
@@ -4602,7 +4633,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
4602
4633
  style: { cursor: "ns-resize" },
4603
4634
  onMousedown: o[14] ||= A((e) => W(e, "bottom"), ["stop", "prevent"]),
4604
4635
  onClick: o[15] ||= A(() => {}, ["stop"])
4605
- }, null, 40, bi),
4636
+ }, null, 40, xi),
4606
4637
  a("rect", {
4607
4638
  x: g(n.swimlane.lanes?.length || 0) - 6,
4608
4639
  y: d.value - 6,
@@ -4614,34 +4645,34 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
4614
4645
  style: { cursor: "nwse-resize" },
4615
4646
  onMousedown: o[16] ||= A((e) => W(e, "corner"), ["stop", "prevent"]),
4616
4647
  onClick: o[17] ||= A(() => {}, ["stop"])
4617
- }, null, 40, xi)
4648
+ }, null, 40, Si)
4618
4649
  ], 64)) : r("", !0),
4619
4650
  K.value === null ? r("", !0) : (_(), i(e, { key: 8 }, [n.swimlane.direction === "horizontal" ? (_(), i("line", {
4620
4651
  key: 0,
4621
4652
  x1: 0,
4622
- y1: q.value,
4653
+ y1: ee.value,
4623
4654
  x2: n.swimlane.width,
4624
- y2: q.value,
4655
+ y2: ee.value,
4625
4656
  stroke: "#409eff",
4626
4657
  "stroke-width": "2",
4627
4658
  "stroke-dasharray": "6,3"
4628
- }, null, 8, Si)) : (_(), i("line", {
4659
+ }, null, 8, Ci)) : (_(), i("line", {
4629
4660
  key: 1,
4630
- x1: J.value,
4661
+ x1: q.value,
4631
4662
  y1: 0,
4632
- x2: J.value,
4663
+ x2: q.value,
4633
4664
  y2: d.value,
4634
4665
  stroke: "#409eff",
4635
4666
  "stroke-width": "2",
4636
4667
  "stroke-dasharray": "6,3"
4637
- }, null, 8, Ci))], 64))
4638
- ], 42, Vr));
4668
+ }, null, 8, wi))], 64))
4669
+ ], 42, Hr));
4639
4670
  }
4640
- }, [["__scopeId", "data-v-8e00b7cb"]]), Ti = [
4671
+ }, [["__scopeId", "data-v-8e00b7cb"]]), Ei = [
4641
4672
  "width",
4642
4673
  "height",
4643
4674
  "viewBox"
4644
- ], Ei = ["width", "height"], Di = ["d"], Oi = ["transform"], ki = {
4675
+ ], Di = ["width", "height"], Oi = ["d"], ki = ["transform"], Ai = {
4645
4676
  key: 0,
4646
4677
  x: "-5000",
4647
4678
  y: "-5000",
@@ -4649,12 +4680,12 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
4649
4680
  height: "10000",
4650
4681
  fill: "url(#grid)",
4651
4682
  class: "grid-bg"
4652
- }, Ai = { key: 1 }, ji = [
4683
+ }, ji = { key: 1 }, Mi = [
4653
4684
  "x1",
4654
4685
  "y1",
4655
4686
  "x2",
4656
4687
  "y2"
4657
- ], Mi = { class: "tooltip-content" }, Ni = { class: "zoom-controls" }, Pi = { class: "zoom-label" }, Fi = /*#__PURE__*/ Q({
4688
+ ], Ni = { class: "tooltip-content" }, Pi = { class: "zoom-controls" }, Fi = { class: "zoom-label" }, Ii = /*#__PURE__*/ Q({
4658
4689
  __name: "DiagramCanvas",
4659
4690
  props: {
4660
4691
  nodes: {
@@ -4764,7 +4795,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
4764
4795
  x: e.clientX,
4765
4796
  y: e.clientY
4766
4797
  }, e.preventDefault());
4767
- }, q = (e) => {
4798
+ }, ee = (e) => {
4768
4799
  if (M.value) {
4769
4800
  let t = e.clientX - N.value.x, n = e.clientY - N.value.y;
4770
4801
  (Math.abs(t) > 3 || Math.abs(n) > 3) && (G = !0), E.value += t, D.value += n, N.value = {
@@ -4779,28 +4810,28 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
4779
4810
  y: (e.clientY - t.top - D.value) / T.value
4780
4811
  };
4781
4812
  }
4782
- }, J = () => {
4813
+ }, q = () => {
4783
4814
  M.value = !1, j.value = !1, d.autoConnectMode && f("end-connect", null);
4784
- }, Y = (e) => {
4815
+ }, te = (e) => {
4785
4816
  let t = e.deltaY > 0 ? -.1 : .1;
4786
4817
  T.value = Math.min(Math.max(T.value + t, .2), 3);
4787
- }, X = () => {
4818
+ }, J = () => {
4788
4819
  T.value = Math.min(T.value + .1, 3);
4789
- }, ee = () => {
4820
+ }, Y = () => {
4790
4821
  T.value = Math.max(T.value - .1, .2);
4791
- }, Z = () => {
4822
+ }, ne = () => {
4792
4823
  T.value = 1, E.value = 0, D.value = 0;
4793
- }, te = () => {
4824
+ }, re = () => {
4794
4825
  f("fit-view");
4795
- }, ne = (e, t, n) => {
4826
+ }, ie = (e, t, n) => {
4796
4827
  f("node-drag", e, t, n);
4797
- }, re = (e, t, n) => {
4828
+ }, ae = (e, t, n) => {
4798
4829
  f("node-resize", e, t, n);
4799
- }, ie = (e, t, n, r) => {
4830
+ }, X = (e, t, n, r) => {
4800
4831
  f("update-waypoint", e, t, n, r);
4801
- }, ae = (e) => {
4802
- (e.key === "Delete" || e.key === "Backspace") && d.selectedNodeId && f("select-node", null), e.key === "Escape" && f("reset-state");
4803
4832
  }, oe = (e) => {
4833
+ (e.key === "Delete" || e.key === "Backspace") && d.selectedNodeId && f("select-node", null), e.key === "Escape" && f("reset-state");
4834
+ }, se = (e) => {
4804
4835
  e.preventDefault();
4805
4836
  let t = e.dataTransfer.getData("node-type");
4806
4837
  if (!t) return;
@@ -4808,26 +4839,26 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
4808
4839
  f("drop-node", t, (e.clientX - n.left - E.value) / T.value, (e.clientY - n.top - D.value) / T.value);
4809
4840
  };
4810
4841
  return h(() => {
4811
- v.value?.addEventListener("drop", oe), v.value?.addEventListener("dragover", (e) => e.preventDefault()), window.addEventListener("keydown", u);
4842
+ v.value?.addEventListener("drop", se), v.value?.addEventListener("dragover", (e) => e.preventDefault()), window.addEventListener("keydown", u);
4812
4843
  }), g(() => {
4813
- v.value?.removeEventListener("drop", oe), window.removeEventListener("keydown", u);
4844
+ v.value?.removeEventListener("drop", se), window.removeEventListener("keydown", u);
4814
4845
  }), s({
4815
- fitView: te,
4816
- resetView: Z,
4817
- zoomIn: X,
4818
- zoomOut: ee,
4846
+ fitView: re,
4847
+ resetView: ne,
4848
+ zoomIn: J,
4849
+ zoomOut: Y,
4819
4850
  svgRef: x
4820
4851
  }), (t, s) => (_(), i("div", {
4821
4852
  class: "diagram-canvas",
4822
4853
  ref_key: "containerRef",
4823
4854
  ref: v,
4824
4855
  onMousedown: K,
4825
- onMousemove: q,
4826
- onMouseup: J,
4827
- onWheel: A(Y, ["prevent"]),
4856
+ onMousemove: ee,
4857
+ onMouseup: q,
4858
+ onWheel: A(te, ["prevent"]),
4828
4859
  onClick: U,
4829
4860
  onContextmenu: A(W, ["prevent"]),
4830
- onKeydown: ae,
4861
+ onKeydown: oe,
4831
4862
  tabindex: "0"
4832
4863
  }, [
4833
4864
  (_(), i("svg", {
@@ -4847,8 +4878,8 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
4847
4878
  fill: "none",
4848
4879
  stroke: "#e8e8e8",
4849
4880
  "stroke-width": "1"
4850
- }, null, 8, Di)], 8, Ei), s[11] ||= o("<filter id=\"shadow\" x=\"-20%\" y=\"-20%\" width=\"140%\" height=\"140%\" data-v-878b95c1><feDropShadow dx=\"2\" dy=\"2\" stdDeviation=\"3\" flood-opacity=\"0.15\" data-v-878b95c1></feDropShadow></filter><filter id=\"glow\" data-v-878b95c1><feGaussianBlur stdDeviation=\"3\" result=\"coloredBlur\" data-v-878b95c1></feGaussianBlur><feMerge data-v-878b95c1><feMergeNode in=\"coloredBlur\" data-v-878b95c1></feMergeNode><feMergeNode in=\"SourceGraphic\" data-v-878b95c1></feMergeNode></feMerge></filter><filter id=\"glass-shadow\" x=\"-20%\" y=\"-20%\" width=\"140%\" height=\"140%\" data-v-878b95c1><feDropShadow dx=\"4\" dy=\"4\" stdDeviation=\"8\" flood-opacity=\"0.1\" data-v-878b95c1></feDropShadow><feGaussianBlur in=\"SourceAlpha\" stdDeviation=\"1\" result=\"blur\" data-v-878b95c1></feGaussianBlur><feOffset in=\"blur\" dx=\"0\" dy=\"-2\" result=\"offsetBlur\" data-v-878b95c1></feOffset><feFlood flood-color=\"white\" flood-opacity=\"0.2\" result=\"color\" data-v-878b95c1></feFlood><feComposite in=\"color\" in2=\"offsetBlur\" operator=\"in\" result=\"shadow\" data-v-878b95c1></feComposite><feMerge data-v-878b95c1><feMergeNode in=\"shadow\" data-v-878b95c1></feMergeNode><feMergeNode in=\"SourceGraphic\" data-v-878b95c1></feMergeNode></feMerge></filter><filter id=\"neon-glow\" x=\"-50%\" y=\"-50%\" width=\"200%\" height=\"200%\" data-v-878b95c1><feGaussianBlur stdDeviation=\"4\" result=\"blur\" data-v-878b95c1></feGaussianBlur><feFlood flood-color=\"currentColor\" flood-opacity=\"0.6\" result=\"color\" data-v-878b95c1></feFlood><feComposite in=\"color\" in2=\"blur\" operator=\"in\" result=\"glow\" data-v-878b95c1></feComposite><feMerge data-v-878b95c1><feMergeNode in=\"glow\" data-v-878b95c1></feMergeNode><feMergeNode in=\"glow\" data-v-878b95c1></feMergeNode><feMergeNode in=\"SourceGraphic\" data-v-878b95c1></feMergeNode></feMerge></filter><filter id=\"neon-glow-strong\" x=\"-50%\" y=\"-50%\" width=\"200%\" height=\"200%\" data-v-878b95c1><feGaussianBlur stdDeviation=\"6\" result=\"blur\" data-v-878b95c1></feGaussianBlur><feFlood flood-color=\"currentColor\" flood-opacity=\"0.8\" result=\"color\" data-v-878b95c1></feFlood><feComposite in=\"color\" in2=\"blur\" operator=\"in\" result=\"glow\" data-v-878b95c1></feComposite><feMerge data-v-878b95c1><feMergeNode in=\"glow\" data-v-878b95c1></feMergeNode><feMergeNode in=\"glow\" data-v-878b95c1></feMergeNode><feMergeNode in=\"glow\" data-v-878b95c1></feMergeNode><feMergeNode in=\"SourceGraphic\" data-v-878b95c1></feMergeNode></feMerge></filter><filter id=\"sketch\" x=\"-10%\" y=\"-10%\" width=\"120%\" height=\"120%\" data-v-878b95c1><feTurbulence type=\"turbulence\" baseFrequency=\"0.03\" numOctaves=\"3\" seed=\"1\" result=\"turbulence\" data-v-878b95c1></feTurbulence><feDisplacementMap in=\"SourceGraphic\" in2=\"turbulence\" scale=\"4\" xChannelSelector=\"R\" yChannelSelector=\"G\" data-v-878b95c1></feDisplacementMap></filter>", 6)]), a("g", { transform: `translate(${E.value}, ${D.value}) scale(${T.value})` }, [
4851
- O.value ? (_(), i("rect", ki)) : r("", !0),
4881
+ }, null, 8, Oi)], 8, Di), s[11] ||= o("<filter id=\"shadow\" x=\"-20%\" y=\"-20%\" width=\"140%\" height=\"140%\" data-v-878b95c1><feDropShadow dx=\"2\" dy=\"2\" stdDeviation=\"3\" flood-opacity=\"0.15\" data-v-878b95c1></feDropShadow></filter><filter id=\"glow\" data-v-878b95c1><feGaussianBlur stdDeviation=\"3\" result=\"coloredBlur\" data-v-878b95c1></feGaussianBlur><feMerge data-v-878b95c1><feMergeNode in=\"coloredBlur\" data-v-878b95c1></feMergeNode><feMergeNode in=\"SourceGraphic\" data-v-878b95c1></feMergeNode></feMerge></filter><filter id=\"glass-shadow\" x=\"-20%\" y=\"-20%\" width=\"140%\" height=\"140%\" data-v-878b95c1><feDropShadow dx=\"4\" dy=\"4\" stdDeviation=\"8\" flood-opacity=\"0.1\" data-v-878b95c1></feDropShadow><feGaussianBlur in=\"SourceAlpha\" stdDeviation=\"1\" result=\"blur\" data-v-878b95c1></feGaussianBlur><feOffset in=\"blur\" dx=\"0\" dy=\"-2\" result=\"offsetBlur\" data-v-878b95c1></feOffset><feFlood flood-color=\"white\" flood-opacity=\"0.2\" result=\"color\" data-v-878b95c1></feFlood><feComposite in=\"color\" in2=\"offsetBlur\" operator=\"in\" result=\"shadow\" data-v-878b95c1></feComposite><feMerge data-v-878b95c1><feMergeNode in=\"shadow\" data-v-878b95c1></feMergeNode><feMergeNode in=\"SourceGraphic\" data-v-878b95c1></feMergeNode></feMerge></filter><filter id=\"neon-glow\" x=\"-50%\" y=\"-50%\" width=\"200%\" height=\"200%\" data-v-878b95c1><feGaussianBlur stdDeviation=\"4\" result=\"blur\" data-v-878b95c1></feGaussianBlur><feFlood flood-color=\"currentColor\" flood-opacity=\"0.6\" result=\"color\" data-v-878b95c1></feFlood><feComposite in=\"color\" in2=\"blur\" operator=\"in\" result=\"glow\" data-v-878b95c1></feComposite><feMerge data-v-878b95c1><feMergeNode in=\"glow\" data-v-878b95c1></feMergeNode><feMergeNode in=\"glow\" data-v-878b95c1></feMergeNode><feMergeNode in=\"SourceGraphic\" data-v-878b95c1></feMergeNode></feMerge></filter><filter id=\"neon-glow-strong\" x=\"-50%\" y=\"-50%\" width=\"200%\" height=\"200%\" data-v-878b95c1><feGaussianBlur stdDeviation=\"6\" result=\"blur\" data-v-878b95c1></feGaussianBlur><feFlood flood-color=\"currentColor\" flood-opacity=\"0.8\" result=\"color\" data-v-878b95c1></feFlood><feComposite in=\"color\" in2=\"blur\" operator=\"in\" result=\"glow\" data-v-878b95c1></feComposite><feMerge data-v-878b95c1><feMergeNode in=\"glow\" data-v-878b95c1></feMergeNode><feMergeNode in=\"glow\" data-v-878b95c1></feMergeNode><feMergeNode in=\"glow\" data-v-878b95c1></feMergeNode><feMergeNode in=\"SourceGraphic\" data-v-878b95c1></feMergeNode></feMerge></filter><filter id=\"sketch\" x=\"-10%\" y=\"-10%\" width=\"120%\" height=\"120%\" data-v-878b95c1><feTurbulence type=\"turbulence\" baseFrequency=\"0.03\" numOctaves=\"3\" seed=\"1\" result=\"turbulence\" data-v-878b95c1></feTurbulence><feDisplacementMap in=\"SourceGraphic\" in2=\"turbulence\" scale=\"4\" xChannelSelector=\"R\" yChannelSelector=\"G\" data-v-878b95c1></feDisplacementMap></filter>", 6)]), a("g", { transform: `translate(${E.value}, ${D.value}) scale(${T.value})` }, [
4882
+ O.value ? (_(), i("rect", Ai)) : r("", !0),
4852
4883
  a("rect", {
4853
4884
  x: "-5000",
4854
4885
  y: "-5000",
@@ -4858,7 +4889,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
4858
4889
  class: "canvas-bg",
4859
4890
  onClick: s[0] ||= (e) => f("select-canvas")
4860
4891
  }),
4861
- (_(!0), i(e, null, b(n.swimlanes, (e) => (_(), i("g", { key: e.id }, [c(wi, {
4892
+ (_(!0), i(e, null, b(n.swimlanes, (e) => (_(), i("g", { key: e.id }, [c(Ti, {
4862
4893
  swimlane: e,
4863
4894
  selected: n.selectedSwimlaneId === e.id,
4864
4895
  "selected-lane-id": n.selectedLaneId,
@@ -4876,14 +4907,14 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
4876
4907
  "onSelect",
4877
4908
  "onSelectLane"
4878
4909
  ])]))), 128)),
4879
- (_(!0), i(e, null, b(n.edges, (e) => (_(), i("g", { key: e.id }, [c(Br, {
4910
+ (_(!0), i(e, null, b(n.edges, (e) => (_(), i("g", { key: e.id }, [c(Vr, {
4880
4911
  edge: e,
4881
4912
  source: H(e.sourceId),
4882
4913
  target: H(e.targetId),
4883
4914
  selected: n.selectedEdgeId === e.id,
4884
4915
  "animation-playing": n.animationPlaying,
4885
4916
  onSelect: (n) => t.$emit("select-edge", e.id),
4886
- onUpdateWaypoint: ie,
4917
+ onUpdateWaypoint: X,
4887
4918
  onResetState: s[6] ||= (e) => t.$emit("reset-state"),
4888
4919
  onHoverRemark: V
4889
4920
  }, null, 8, [
@@ -4894,7 +4925,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
4894
4925
  "animation-playing",
4895
4926
  "onSelect"
4896
4927
  ])]))), 128)),
4897
- (_(!0), i(e, null, b(I.value, (e) => (_(), i("g", { key: e.id }, [c(nr, {
4928
+ (_(!0), i(e, null, b(I.value, (e) => (_(), i("g", { key: e.id }, [c(rr, {
4898
4929
  node: e,
4899
4930
  selected: n.selectedNodeId === e.id,
4900
4931
  "connect-mode": n.connectMode,
@@ -4906,8 +4937,8 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
4906
4937
  onStartConnect: (n) => t.$emit("start-connect", e.id),
4907
4938
  onEndConnect: (n) => t.$emit("end-connect", e.id),
4908
4939
  onAutoConnectStart: (n) => t.$emit("auto-connect-start", e.id),
4909
- onDrag: ne,
4910
- onResize: re,
4940
+ onDrag: ie,
4941
+ onResize: ae,
4911
4942
  onDragEnd: s[7] ||= (e) => t.$emit("node-drag-end", e),
4912
4943
  onResizeEnd: s[8] ||= (e) => t.$emit("node-resize-end", e),
4913
4944
  onResetState: s[9] ||= (e) => t.$emit("reset-state"),
@@ -4925,7 +4956,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
4925
4956
  "onEndConnect",
4926
4957
  "onAutoConnectStart"
4927
4958
  ])]))), 128)),
4928
- L.value && P.value ? (_(), i("g", Ai, [a("line", {
4959
+ L.value && P.value ? (_(), i("g", ji, [a("line", {
4929
4960
  x1: L.value.x + L.value.width / 2,
4930
4961
  y1: L.value.y + L.value.height / 2,
4931
4962
  x2: P.value.x,
@@ -4933,8 +4964,8 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
4933
4964
  stroke: "#409eff",
4934
4965
  "stroke-width": "2",
4935
4966
  "stroke-dasharray": "5,5"
4936
- }, null, 8, ji)])) : r("", !0)
4937
- ], 8, Oi)], 8, Ti)),
4967
+ }, null, 8, Mi)])) : r("", !0)
4968
+ ], 8, ki)], 8, Ei)),
4938
4969
  R.value && R.value.remark ? (_(), i("div", {
4939
4970
  key: 0,
4940
4971
  class: "remark-tooltip",
@@ -4942,23 +4973,23 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
4942
4973
  left: z.value + "px",
4943
4974
  top: B.value + "px"
4944
4975
  })
4945
- }, [a("div", Mi, S(R.value.remark), 1)], 4)) : r("", !0),
4946
- a("div", Ni, [
4976
+ }, [a("div", Ni, S(R.value.remark), 1)], 4)) : r("", !0),
4977
+ a("div", Pi, [
4947
4978
  a("button", {
4948
- onClick: X,
4979
+ onClick: J,
4949
4980
  title: "放大"
4950
4981
  }, "+"),
4951
- a("span", Pi, S(Math.round(T.value * 100)) + "%", 1),
4982
+ a("span", Fi, S(Math.round(T.value * 100)) + "%", 1),
4952
4983
  a("button", {
4953
- onClick: ee,
4984
+ onClick: Y,
4954
4985
  title: "缩小"
4955
4986
  }, "-"),
4956
4987
  a("button", {
4957
- onClick: Z,
4988
+ onClick: ne,
4958
4989
  title: "重置视图"
4959
4990
  }, "⌂"),
4960
4991
  a("button", {
4961
- onClick: te,
4992
+ onClick: re,
4962
4993
  title: "适应画布"
4963
4994
  }, "⊞"),
4964
4995
  a("button", {
@@ -4969,10 +5000,10 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
4969
5000
  ])
4970
5001
  ], 544));
4971
5002
  }
4972
- }, [["__scopeId", "data-v-878b95c1"]]), Ii = { class: "param-dialog" }, Li = { class: "json-import" }, Ri = { class: "param-list" }, zi = { class: "col-index" }, Bi = { class: "col-action" }, Vi = {
5003
+ }, [["__scopeId", "data-v-878b95c1"]]), Li = { class: "param-dialog" }, Ri = { class: "json-import" }, zi = { class: "param-list" }, Bi = { class: "col-index" }, Vi = { class: "col-action" }, Hi = {
4973
5004
  key: 0,
4974
5005
  class: "param-empty"
4975
- }, Hi = /*#__PURE__*/ Q({
5006
+ }, Ui = /*#__PURE__*/ Q({
4976
5007
  __name: "NodeParamDialog",
4977
5008
  props: {
4978
5009
  modelValue: {
@@ -5046,8 +5077,8 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
5046
5077
  default: D(() => [...l[6] ||= [s("确定", -1)]]),
5047
5078
  _: 1
5048
5079
  })]),
5049
- default: D(() => [a("div", Ii, [
5050
- a("div", Li, [c(u, {
5080
+ default: D(() => [a("div", Li, [
5081
+ a("div", Ri, [c(u, {
5051
5082
  modelValue: p.value,
5052
5083
  "onUpdate:modelValue": l[0] ||= (e) => p.value = e,
5053
5084
  type: "textarea",
@@ -5063,7 +5094,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
5063
5094
  _: 1
5064
5095
  })]),
5065
5096
  c(T),
5066
- a("div", Ri, [
5097
+ a("div", zi, [
5067
5098
  l[3] ||= a("div", { class: "param-list-header" }, [
5068
5099
  a("span", { class: "col-index" }, "#"),
5069
5100
  a("span", { class: "col-name" }, "参数名"),
@@ -5076,7 +5107,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
5076
5107
  key: t,
5077
5108
  class: "param-list-row"
5078
5109
  }, [
5079
- a("span", zi, S(t + 1), 1),
5110
+ a("span", Bi, S(t + 1), 1),
5080
5111
  c(u, {
5081
5112
  modelValue: e.name,
5082
5113
  "onUpdate:modelValue": (t) => e.name = t,
@@ -5124,7 +5155,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
5124
5155
  ]),
5125
5156
  _: 1
5126
5157
  }, 8, ["modelValue", "onUpdate:modelValue"]),
5127
- a("span", Bi, [c(y, {
5158
+ a("span", Vi, [c(y, {
5128
5159
  size: "small",
5129
5160
  type: "danger",
5130
5161
  circle: "",
@@ -5137,7 +5168,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
5137
5168
  _: 1
5138
5169
  }, 8, ["onClick"])])
5139
5170
  ]))), 128)),
5140
- f.value.length === 0 ? (_(), i("div", Vi, " 暂无参数,点击下方按钮添加 ")) : r("", !0)
5171
+ f.value.length === 0 ? (_(), i("div", Hi, " 暂无参数,点击下方按钮添加 ")) : r("", !0)
5141
5172
  ]),
5142
5173
  c(y, {
5143
5174
  size: "small",
@@ -5145,7 +5176,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
5145
5176
  style: { "margin-top": "8px" }
5146
5177
  }, {
5147
5178
  default: D(() => [c(k, null, {
5148
- default: D(() => [c(C(J))]),
5179
+ default: D(() => [c(C(q))]),
5149
5180
  _: 1
5150
5181
  }), l[4] ||= s(" 添加参数 ", -1)]),
5151
5182
  _: 1
@@ -5155,48 +5186,48 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
5155
5186
  }, 8, ["modelValue", "title"]);
5156
5187
  };
5157
5188
  }
5158
- }, [["__scopeId", "data-v-8ae88a5a"]]), Ui = { class: "properties-panel" }, Wi = { class: "panel-section theme-section" }, Gi = { class: "theme-grid" }, Ki = ["onClick"], qi = { class: "theme-name" }, Ji = {
5189
+ }, [["__scopeId", "data-v-8ae88a5a"]]), Wi = { class: "properties-panel" }, Gi = { class: "panel-section theme-section" }, Ki = { class: "theme-grid" }, qi = ["onClick"], Ji = { class: "theme-name" }, Yi = {
5159
5190
  key: 0,
5160
5191
  class: "panel-section"
5161
- }, Yi = { class: "prop-row" }, Xi = {
5192
+ }, Xi = { class: "prop-row" }, Zi = {
5162
5193
  key: 0,
5163
5194
  class: "prop-row prop-row-col"
5164
- }, Zi = { style: {
5195
+ }, Qi = { style: {
5165
5196
  display: "flex",
5166
5197
  gap: "4px",
5167
5198
  width: "100%",
5168
5199
  "align-items": "center"
5169
- } }, Qi = {
5200
+ } }, $i = {
5170
5201
  key: 0,
5171
5202
  class: "image-preview"
5172
- }, $i = ["src"], ea = { class: "prop-row" }, ta = { class: "prop-row" }, na = { class: "prop-row" }, ra = { class: "prop-row" }, ia = { class: "prop-row" }, aa = { class: "prop-row" }, oa = { class: "prop-row" }, sa = { class: "prop-row" }, ca = { class: "prop-row" }, la = {
5203
+ }, ea = ["src"], ta = { class: "prop-row" }, na = { class: "prop-row" }, ra = { class: "prop-row" }, ia = { class: "prop-row" }, aa = { class: "prop-row" }, oa = { class: "prop-row" }, sa = { class: "prop-row" }, ca = { class: "prop-row" }, la = { class: "prop-row" }, ua = {
5173
5204
  key: 1,
5174
5205
  class: "prop-row prop-row-col"
5175
- }, ua = { class: "prop-row-main" }, da = { class: "prop-row" }, fa = {
5206
+ }, da = { class: "prop-row-main" }, fa = { class: "prop-row" }, pa = {
5176
5207
  key: 2,
5177
5208
  class: "prop-row"
5178
- }, pa = {
5209
+ }, ma = {
5179
5210
  key: 3,
5180
5211
  class: "prop-row"
5181
- }, ma = { class: "prop-row" }, ha = { class: "prop-row prop-row-col" }, ga = { class: "prop-row" }, _a = { class: "prop-row" }, va = { class: "prop-row" }, ya = { class: "prop-actions" }, ba = {
5212
+ }, ha = { class: "prop-row" }, ga = { class: "prop-row prop-row-col" }, _a = { class: "prop-row" }, va = { class: "prop-row" }, ya = { class: "prop-row" }, ba = { class: "prop-actions" }, xa = {
5182
5213
  key: 1,
5183
5214
  class: "panel-section"
5184
- }, xa = { class: "prop-row" }, Sa = { class: "prop-row" }, Ca = { class: "prop-row" }, wa = { class: "prop-row" }, Ta = { class: "prop-row" }, Ea = { class: "prop-row" }, Da = { class: "prop-row" }, Oa = {
5215
+ }, Sa = { class: "prop-row" }, Ca = { class: "prop-row" }, wa = { class: "prop-row" }, Ta = { class: "prop-row" }, Ea = { class: "prop-row" }, Da = { class: "prop-row" }, Oa = { class: "prop-row" }, ka = {
5185
5216
  key: 0,
5186
5217
  class: "prop-row"
5187
- }, ka = {
5218
+ }, Aa = {
5188
5219
  key: 1,
5189
5220
  class: "prop-row"
5190
- }, Aa = { class: "prop-row prop-row-col" }, ja = { class: "prop-actions" }, Ma = {
5221
+ }, ja = { class: "prop-row prop-row-col" }, Ma = { class: "prop-actions" }, Na = {
5191
5222
  key: 2,
5192
5223
  class: "panel-section"
5193
- }, Na = { class: "prop-row" }, Pa = { class: "prop-row" }, Fa = { class: "prop-row" }, Ia = { class: "prop-row" }, La = { class: "prop-row" }, Ra = { class: "prop-row" }, za = { class: "prop-row" }, Ba = { class: "prop-row" }, Va = { class: "prop-row" }, Ha = { class: "prop-row" }, Ua = { class: "prop-row" }, Wa = {
5224
+ }, Pa = { class: "prop-row" }, Fa = { class: "prop-row" }, Ia = { class: "prop-row" }, La = { class: "prop-row" }, Ra = { class: "prop-row" }, za = { class: "prop-row" }, Ba = { class: "prop-row" }, Va = { class: "prop-row" }, Ha = { class: "prop-row" }, Ua = { class: "prop-row" }, Wa = { class: "prop-row" }, Ga = {
5194
5225
  key: 3,
5195
5226
  class: "panel-section"
5196
- }, Ga = { class: "prop-row" }, Ka = { class: "prop-row" }, qa = { class: "prop-row" }, Ja = { class: "prop-row" }, Ya = { class: "prop-row" }, Xa = { class: "prop-row" }, Za = { class: "prop-row" }, Qa = { class: "prop-row" }, $a = { class: "prop-row" }, eo = { class: "prop-row" }, to = { class: "prop-row" }, no = { class: "prop-row" }, ro = { class: "prop-row" }, io = { class: "prop-actions" }, ao = {
5227
+ }, Ka = { class: "prop-row" }, qa = { class: "prop-row" }, Ja = { class: "prop-row" }, Ya = { class: "prop-row" }, Xa = { class: "prop-row" }, Za = { class: "prop-row" }, Qa = { class: "prop-row" }, $a = { class: "prop-row" }, eo = { class: "prop-row" }, to = { class: "prop-row" }, no = { class: "prop-row" }, ro = { class: "prop-row" }, io = { class: "prop-row" }, ao = { class: "prop-actions" }, oo = {
5197
5228
  key: 4,
5198
5229
  class: "panel-section empty"
5199
- }, oo = /*#__PURE__*/ Q({
5230
+ }, so = /*#__PURE__*/ Q({
5200
5231
  __name: "PropertiesPanel",
5201
5232
  props: {
5202
5233
  selectedNode: {
@@ -5287,24 +5318,24 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
5287
5318
  };
5288
5319
  return (t, l) => {
5289
5320
  let u = x("el-tag"), d = x("el-input"), y = x("el-icon"), L = x("el-button"), R = x("el-upload"), z = x("el-input-number"), B = x("el-color-picker"), V = x("el-option"), H = x("el-select"), W = x("el-checkbox"), G = x("el-slider"), K = x("el-dialog");
5290
- return _(), i("div", Ui, [
5291
- a("div", Wi, [l[61] ||= a("h4", null, "画布主题", -1), a("div", Gi, [(_(!0), i(e, null, b(C(re), (e, n) => (_(), i("div", {
5321
+ return _(), i("div", Wi, [
5322
+ a("div", Gi, [l[61] ||= a("h4", null, "画布主题", -1), a("div", Ki, [(_(!0), i(e, null, b(C(X), (e, n) => (_(), i("div", {
5292
5323
  key: n,
5293
5324
  class: p(["theme-item", { active: o.currentTheme === n }]),
5294
5325
  onClick: (e) => t.$emit("change-theme", n)
5295
- }, [a("div", { class: p(["theme-preview", `theme-preview-${n}`]) }, [...l[60] ||= [a("div", { class: "preview-rect" }, null, -1), a("div", { class: "preview-circle" }, null, -1)]], 2), a("span", qi, S(e.name), 1)], 10, Ki))), 128))])]),
5296
- o.selectedNode ? (_(), i("div", Ji, [
5326
+ }, [a("div", { class: p(["theme-preview", `theme-preview-${n}`]) }, [...l[60] ||= [a("div", { class: "preview-rect" }, null, -1), a("div", { class: "preview-circle" }, null, -1)]], 2), a("span", Ji, S(e.name), 1)], 10, qi))), 128))])]),
5327
+ o.selectedNode ? (_(), i("div", Yi, [
5297
5328
  l[86] ||= a("h4", null, "节点属性", -1),
5298
- a("div", Yi, [l[62] ||= a("label", null, "类型", -1), c(u, {
5329
+ a("div", Xi, [l[62] ||= a("label", null, "类型", -1), c(u, {
5299
5330
  size: "small",
5300
5331
  type: "info"
5301
5332
  }, {
5302
5333
  default: D(() => [s(S(O(o.selectedNode.type)), 1)]),
5303
5334
  _: 1
5304
5335
  })]),
5305
- o.selectedNode.type === "custom" ? (_(), i("div", Xi, [
5336
+ o.selectedNode.type === "custom" ? (_(), i("div", Zi, [
5306
5337
  l[63] ||= a("label", null, "组件图片", -1),
5307
- a("div", Zi, [
5338
+ a("div", Qi, [
5308
5339
  c(d, {
5309
5340
  modelValue: o.selectedNode.image,
5310
5341
  "onUpdate:modelValue": l[0] ||= (e) => o.selectedNode.image = e,
@@ -5322,7 +5353,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
5322
5353
  circle: ""
5323
5354
  }, {
5324
5355
  default: D(() => [c(y, null, {
5325
- default: D(() => [c(C(q))]),
5356
+ default: D(() => [c(C(ee))]),
5326
5357
  _: 1
5327
5358
  })]),
5328
5359
  _: 1
@@ -5343,7 +5374,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
5343
5374
  _: 1
5344
5375
  })) : r("", !0)
5345
5376
  ]),
5346
- o.selectedNode.image ? (_(), i("div", Qi, [a("img", {
5377
+ o.selectedNode.image ? (_(), i("div", $i, [a("img", {
5347
5378
  src: o.selectedNode.image,
5348
5379
  style: {
5349
5380
  "max-width": "100%",
@@ -5351,15 +5382,15 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
5351
5382
  border: "1px solid #e4e7ed",
5352
5383
  "border-radius": "4px"
5353
5384
  }
5354
- }, null, 8, $i)])) : r("", !0)
5385
+ }, null, 8, ea)])) : r("", !0)
5355
5386
  ])) : r("", !0),
5356
- a("div", ea, [l[64] ||= a("label", null, "名称", -1), c(d, {
5387
+ a("div", ta, [l[64] ||= a("label", null, "名称", -1), c(d, {
5357
5388
  size: "small",
5358
5389
  modelValue: o.selectedNode.label,
5359
5390
  "onUpdate:modelValue": l[1] ||= (e) => o.selectedNode.label = e,
5360
5391
  onChange: N
5361
5392
  }, null, 8, ["modelValue"])]),
5362
- a("div", ta, [l[65] ||= a("label", null, "宽度", -1), c(z, {
5393
+ a("div", na, [l[65] ||= a("label", null, "宽度", -1), c(z, {
5363
5394
  size: "small",
5364
5395
  modelValue: o.selectedNode.width,
5365
5396
  "onUpdate:modelValue": l[2] ||= (e) => o.selectedNode.width = e,
@@ -5367,7 +5398,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
5367
5398
  max: 500,
5368
5399
  onChange: N
5369
5400
  }, null, 8, ["modelValue"])]),
5370
- a("div", na, [l[66] ||= a("label", null, "高度", -1), c(z, {
5401
+ a("div", ra, [l[66] ||= a("label", null, "高度", -1), c(z, {
5371
5402
  size: "small",
5372
5403
  modelValue: o.selectedNode.height,
5373
5404
  "onUpdate:modelValue": l[3] ||= (e) => o.selectedNode.height = e,
@@ -5375,19 +5406,19 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
5375
5406
  max: 400,
5376
5407
  onChange: N
5377
5408
  }, null, 8, ["modelValue"])]),
5378
- a("div", ra, [l[67] ||= a("label", null, "填充色", -1), c(B, {
5409
+ a("div", ia, [l[67] ||= a("label", null, "填充色", -1), c(B, {
5379
5410
  size: "small",
5380
5411
  modelValue: o.selectedNode.color,
5381
5412
  "onUpdate:modelValue": l[4] ||= (e) => o.selectedNode.color = e,
5382
5413
  onChange: N
5383
5414
  }, null, 8, ["modelValue"])]),
5384
- a("div", ia, [l[68] ||= a("label", null, "边框色", -1), c(B, {
5415
+ a("div", aa, [l[68] ||= a("label", null, "边框色", -1), c(B, {
5385
5416
  size: "small",
5386
5417
  modelValue: o.selectedNode.strokeColor,
5387
5418
  "onUpdate:modelValue": l[5] ||= (e) => o.selectedNode.strokeColor = e,
5388
5419
  onChange: N
5389
5420
  }, null, 8, ["modelValue"])]),
5390
- a("div", aa, [l[69] ||= a("label", null, "边框宽度", -1), c(z, {
5421
+ a("div", oa, [l[69] ||= a("label", null, "边框宽度", -1), c(z, {
5391
5422
  size: "small",
5392
5423
  modelValue: o.selectedNode.strokeWidth,
5393
5424
  "onUpdate:modelValue": l[6] ||= (e) => o.selectedNode.strokeWidth = e,
@@ -5395,13 +5426,13 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
5395
5426
  max: 10,
5396
5427
  onChange: N
5397
5428
  }, null, 8, ["modelValue"])]),
5398
- a("div", oa, [l[70] ||= a("label", null, "文字色", -1), c(B, {
5429
+ a("div", sa, [l[70] ||= a("label", null, "文字色", -1), c(B, {
5399
5430
  size: "small",
5400
5431
  modelValue: o.selectedNode.textColor,
5401
5432
  "onUpdate:modelValue": l[7] ||= (e) => o.selectedNode.textColor = e,
5402
5433
  onChange: N
5403
5434
  }, null, 8, ["modelValue"])]),
5404
- a("div", sa, [l[71] ||= a("label", null, "字号", -1), c(z, {
5435
+ a("div", ca, [l[71] ||= a("label", null, "字号", -1), c(z, {
5405
5436
  size: "small",
5406
5437
  modelValue: o.selectedNode.fontSize,
5407
5438
  "onUpdate:modelValue": l[8] ||= (e) => o.selectedNode.fontSize = e,
@@ -5409,7 +5440,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
5409
5440
  max: 36,
5410
5441
  onChange: N
5411
5442
  }, null, 8, ["modelValue"])]),
5412
- a("div", ca, [l[72] ||= a("label", null, "文字位置", -1), c(H, {
5443
+ a("div", la, [l[72] ||= a("label", null, "文字位置", -1), c(H, {
5413
5444
  size: "small",
5414
5445
  modelValue: o.selectedNode.labelPosition,
5415
5446
  "onUpdate:modelValue": l[9] ||= (e) => o.selectedNode.labelPosition = e,
@@ -5443,7 +5474,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
5443
5474
  ]),
5444
5475
  _: 1
5445
5476
  }, 8, ["modelValue"])]),
5446
- o.selectedNode.labelPosition === "left" || o.selectedNode.labelPosition === "right" ? (_(), i("div", la, [a("div", ua, [l[73] ||= a("label", null, "文字方向", -1), c(z, {
5477
+ o.selectedNode.labelPosition === "left" || o.selectedNode.labelPosition === "right" ? (_(), i("div", ua, [a("div", da, [l[73] ||= a("label", null, "文字方向", -1), c(z, {
5447
5478
  size: "small",
5448
5479
  modelValue: o.selectedNode.textRotation,
5449
5480
  "onUpdate:modelValue": l[10] ||= (e) => o.selectedNode.textRotation = e,
@@ -5452,7 +5483,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
5452
5483
  step: 15,
5453
5484
  onChange: N
5454
5485
  }, null, 8, ["modelValue"])]), l[74] ||= a("span", { class: "prop-hint" }, "-90°=向上 \xA0 0°=向右 \xA0 90°=向下", -1)])) : r("", !0),
5455
- a("div", da, [l[75] ||= a("label", null, "动画", -1), c(H, {
5486
+ a("div", fa, [l[75] ||= a("label", null, "动画", -1), c(H, {
5456
5487
  size: "small",
5457
5488
  modelValue: o.selectedNode.animation,
5458
5489
  "onUpdate:modelValue": l[11] ||= (e) => o.selectedNode.animation = e,
@@ -5465,7 +5496,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
5465
5496
  }, null, 8, ["value", "label"]))), 128))]),
5466
5497
  _: 1
5467
5498
  }, 8, ["modelValue"])]),
5468
- o.selectedNode.animation === "none" ? r("", !0) : (_(), i("div", fa, [l[76] ||= a("label", null, "动画时长(秒)", -1), c(z, {
5499
+ o.selectedNode.animation === "none" ? r("", !0) : (_(), i("div", pa, [l[76] ||= a("label", null, "动画时长(秒)", -1), c(z, {
5469
5500
  size: "small",
5470
5501
  modelValue: o.selectedNode.animationDuration,
5471
5502
  "onUpdate:modelValue": l[12] ||= (e) => o.selectedNode.animationDuration = e,
@@ -5474,7 +5505,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
5474
5505
  step: .5,
5475
5506
  onChange: N
5476
5507
  }, null, 8, ["modelValue"])])),
5477
- o.selectedNode.animation === "none" ? r("", !0) : (_(), i("div", pa, [l[77] ||= a("label", null, "延迟(秒)", -1), c(z, {
5508
+ o.selectedNode.animation === "none" ? r("", !0) : (_(), i("div", ma, [l[77] ||= a("label", null, "延迟(秒)", -1), c(z, {
5478
5509
  size: "small",
5479
5510
  modelValue: o.selectedNode.animationDelay,
5480
5511
  "onUpdate:modelValue": l[13] ||= (e) => o.selectedNode.animationDelay = e,
@@ -5483,7 +5514,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
5483
5514
  step: .5,
5484
5515
  onChange: N
5485
5516
  }, null, 8, ["modelValue"])])),
5486
- a("div", ma, [c(W, {
5517
+ a("div", ha, [c(W, {
5487
5518
  modelValue: o.selectedNode.locked,
5488
5519
  "onUpdate:modelValue": l[14] ||= (e) => o.selectedNode.locked = e,
5489
5520
  onChange: N
@@ -5491,7 +5522,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
5491
5522
  default: D(() => [...l[78] ||= [s("锁定", -1)]]),
5492
5523
  _: 1
5493
5524
  }, 8, ["modelValue"])]),
5494
- a("div", ha, [l[79] ||= a("label", null, "备注说明", -1), c(d, {
5525
+ a("div", ga, [l[79] ||= a("label", null, "备注说明", -1), c(d, {
5495
5526
  modelValue: o.selectedNode.remark,
5496
5527
  "onUpdate:modelValue": l[15] ||= (e) => o.selectedNode.remark = e,
5497
5528
  type: "textarea",
@@ -5499,7 +5530,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
5499
5530
  placeholder: "输入备注说明...",
5500
5531
  onChange: N
5501
5532
  }, null, 8, ["modelValue"])]),
5502
- a("div", ga, [
5533
+ a("div", _a, [
5503
5534
  l[80] ||= a("label", null, "输入参数", -1),
5504
5535
  c(u, {
5505
5536
  size: "small",
@@ -5514,13 +5545,13 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
5514
5545
  onClick: g
5515
5546
  }, {
5516
5547
  default: D(() => [c(y, null, {
5517
- default: D(() => [c(C(X))]),
5548
+ default: D(() => [c(C(J))]),
5518
5549
  _: 1
5519
5550
  })]),
5520
5551
  _: 1
5521
5552
  })
5522
5553
  ]),
5523
- a("div", _a, [
5554
+ a("div", va, [
5524
5555
  l[81] ||= a("label", null, "输出参数", -1),
5525
5556
  c(u, {
5526
5557
  size: "small",
@@ -5535,24 +5566,24 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
5535
5566
  onClick: v
5536
5567
  }, {
5537
5568
  default: D(() => [c(y, null, {
5538
- default: D(() => [c(C(X))]),
5569
+ default: D(() => [c(C(J))]),
5539
5570
  _: 1
5540
5571
  })]),
5541
5572
  _: 1
5542
5573
  })
5543
5574
  ]),
5544
- a("div", va, [l[82] ||= a("label", null, "动作设置", -1), c(L, {
5575
+ a("div", ya, [l[82] ||= a("label", null, "动作设置", -1), c(L, {
5545
5576
  size: "small",
5546
5577
  circle: "",
5547
5578
  onClick: l[16] ||= (e) => h.value = !0
5548
5579
  }, {
5549
5580
  default: D(() => [c(y, null, {
5550
- default: D(() => [c(C(X))]),
5581
+ default: D(() => [c(C(J))]),
5551
5582
  _: 1
5552
5583
  })]),
5553
5584
  _: 1
5554
5585
  })]),
5555
- a("div", ya, [
5586
+ a("div", ba, [
5556
5587
  c(L, {
5557
5588
  size: "small",
5558
5589
  onClick: l[17] ||= (e) => t.$emit("bring-front")
@@ -5576,15 +5607,15 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
5576
5607
  _: 1
5577
5608
  })
5578
5609
  ])
5579
- ])) : o.selectedEdge ? (_(), i("div", ba, [
5610
+ ])) : o.selectedEdge ? (_(), i("div", xa, [
5580
5611
  l[98] ||= a("h4", null, "连线属性", -1),
5581
- a("div", xa, [l[87] ||= a("label", null, "标签", -1), c(d, {
5612
+ a("div", Sa, [l[87] ||= a("label", null, "标签", -1), c(d, {
5582
5613
  size: "small",
5583
5614
  modelValue: o.selectedEdge.label,
5584
5615
  "onUpdate:modelValue": l[20] ||= (e) => o.selectedEdge.label = e,
5585
5616
  onChange: N
5586
5617
  }, null, 8, ["modelValue"])]),
5587
- a("div", Sa, [l[88] ||= a("label", null, "线型", -1), c(H, {
5618
+ a("div", Ca, [l[88] ||= a("label", null, "线型", -1), c(H, {
5588
5619
  size: "small",
5589
5620
  modelValue: o.selectedEdge.lineStyle,
5590
5621
  "onUpdate:modelValue": l[21] ||= (e) => o.selectedEdge.lineStyle = e,
@@ -5597,13 +5628,13 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
5597
5628
  }, null, 8, ["value", "label"]))), 128))]),
5598
5629
  _: 1
5599
5630
  }, 8, ["modelValue"])]),
5600
- a("div", Ca, [l[89] ||= a("label", null, "线色", -1), c(B, {
5631
+ a("div", wa, [l[89] ||= a("label", null, "线色", -1), c(B, {
5601
5632
  size: "small",
5602
5633
  modelValue: o.selectedEdge.lineColor,
5603
5634
  "onUpdate:modelValue": l[22] ||= (e) => o.selectedEdge.lineColor = e,
5604
5635
  onChange: N
5605
5636
  }, null, 8, ["modelValue"])]),
5606
- a("div", wa, [l[90] ||= a("label", null, "线宽", -1), c(z, {
5637
+ a("div", Ta, [l[90] ||= a("label", null, "线宽", -1), c(z, {
5607
5638
  size: "small",
5608
5639
  modelValue: o.selectedEdge.lineWidth,
5609
5640
  "onUpdate:modelValue": l[23] ||= (e) => o.selectedEdge.lineWidth = e,
@@ -5611,7 +5642,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
5611
5642
  max: 8,
5612
5643
  onChange: N
5613
5644
  }, null, 8, ["modelValue"])]),
5614
- a("div", Ta, [l[91] ||= a("label", null, "箭头", -1), c(H, {
5645
+ a("div", Ea, [l[91] ||= a("label", null, "箭头", -1), c(H, {
5615
5646
  size: "small",
5616
5647
  modelValue: o.selectedEdge.arrowType,
5617
5648
  "onUpdate:modelValue": l[24] ||= (e) => o.selectedEdge.arrowType = e,
@@ -5626,7 +5657,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
5626
5657
  })]),
5627
5658
  _: 1
5628
5659
  }, 8, ["modelValue"])]),
5629
- a("div", Ea, [l[92] ||= a("label", null, "曲线", -1), c(H, {
5660
+ a("div", Da, [l[92] ||= a("label", null, "曲线", -1), c(H, {
5630
5661
  size: "small",
5631
5662
  modelValue: o.selectedEdge.curveType,
5632
5663
  "onUpdate:modelValue": l[25] ||= (e) => o.selectedEdge.curveType = e,
@@ -5641,7 +5672,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
5641
5672
  })]),
5642
5673
  _: 1
5643
5674
  }, 8, ["modelValue"])]),
5644
- a("div", Da, [l[93] ||= a("label", null, "动画", -1), c(H, {
5675
+ a("div", Oa, [l[93] ||= a("label", null, "动画", -1), c(H, {
5645
5676
  size: "small",
5646
5677
  modelValue: o.selectedEdge.animation,
5647
5678
  "onUpdate:modelValue": l[26] ||= (e) => o.selectedEdge.animation = e,
@@ -5654,7 +5685,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
5654
5685
  }, null, 8, ["value", "label"])), 64))]),
5655
5686
  _: 1
5656
5687
  }, 8, ["modelValue"])]),
5657
- o.selectedEdge.animation === "none" ? r("", !0) : (_(), i("div", Oa, [l[94] ||= a("label", null, "动画时长(秒)", -1), c(z, {
5688
+ o.selectedEdge.animation === "none" ? r("", !0) : (_(), i("div", ka, [l[94] ||= a("label", null, "动画时长(秒)", -1), c(z, {
5658
5689
  size: "small",
5659
5690
  modelValue: o.selectedEdge.animationDuration,
5660
5691
  "onUpdate:modelValue": l[27] ||= (e) => o.selectedEdge.animationDuration = e,
@@ -5663,13 +5694,13 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
5663
5694
  step: .5,
5664
5695
  onChange: N
5665
5696
  }, null, 8, ["modelValue"])])),
5666
- o.selectedEdge.animation === "none" ? r("", !0) : (_(), i("div", ka, [l[95] ||= a("label", null, "粒子颜色", -1), c(B, {
5697
+ o.selectedEdge.animation === "none" ? r("", !0) : (_(), i("div", Aa, [l[95] ||= a("label", null, "粒子颜色", -1), c(B, {
5667
5698
  size: "small",
5668
5699
  modelValue: o.selectedEdge.particleColor,
5669
5700
  "onUpdate:modelValue": l[28] ||= (e) => o.selectedEdge.particleColor = e,
5670
5701
  onChange: N
5671
5702
  }, null, 8, ["modelValue"])])),
5672
- a("div", Aa, [l[96] ||= a("label", null, "备注说明", -1), c(d, {
5703
+ a("div", ja, [l[96] ||= a("label", null, "备注说明", -1), c(d, {
5673
5704
  modelValue: o.selectedEdge.remark,
5674
5705
  "onUpdate:modelValue": l[29] ||= (e) => o.selectedEdge.remark = e,
5675
5706
  type: "textarea",
@@ -5677,7 +5708,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
5677
5708
  placeholder: "输入备注说明...",
5678
5709
  onChange: N
5679
5710
  }, null, 8, ["modelValue"])]),
5680
- a("div", ja, [c(L, {
5711
+ a("div", Ma, [c(L, {
5681
5712
  size: "small",
5682
5713
  type: "danger",
5683
5714
  onClick: l[30] ||= (e) => t.$emit("delete-edge")
@@ -5685,15 +5716,15 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
5685
5716
  default: D(() => [...l[97] ||= [s("删除连线", -1)]]),
5686
5717
  _: 1
5687
5718
  })])
5688
- ])) : o.selectedLane ? (_(), i("div", Ma, [
5719
+ ])) : o.selectedLane ? (_(), i("div", Na, [
5689
5720
  l[110] ||= a("h4", null, "泳道名称属性", -1),
5690
- a("div", Na, [l[99] ||= a("label", null, "名称", -1), c(d, {
5721
+ a("div", Pa, [l[99] ||= a("label", null, "名称", -1), c(d, {
5691
5722
  size: "small",
5692
5723
  modelValue: o.selectedLane.name,
5693
5724
  "onUpdate:modelValue": l[31] ||= (e) => o.selectedLane.name = e,
5694
5725
  onChange: P
5695
5726
  }, null, 8, ["modelValue"])]),
5696
- a("div", Pa, [l[100] ||= a("label", null, "高度", -1), c(z, {
5727
+ a("div", Fa, [l[100] ||= a("label", null, "高度", -1), c(z, {
5697
5728
  size: "small",
5698
5729
  modelValue: o.selectedLane.height,
5699
5730
  "onUpdate:modelValue": l[32] ||= (e) => o.selectedLane.height = e,
@@ -5701,20 +5732,20 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
5701
5732
  max: 500,
5702
5733
  onChange: P
5703
5734
  }, null, 8, ["modelValue"])]),
5704
- a("div", Fa, [l[101] ||= a("label", null, "背景色", -1), c(B, {
5735
+ a("div", Ia, [l[101] ||= a("label", null, "背景色", -1), c(B, {
5705
5736
  size: "small",
5706
5737
  modelValue: o.selectedLane.color,
5707
5738
  "onUpdate:modelValue": l[33] ||= (e) => o.selectedLane.color = e,
5708
5739
  onChange: P
5709
5740
  }, null, 8, ["modelValue"])]),
5710
- a("div", Ia, [l[102] ||= a("label", null, "名称行背景", -1), c(B, {
5741
+ a("div", La, [l[102] ||= a("label", null, "名称行背景", -1), c(B, {
5711
5742
  size: "small",
5712
5743
  modelValue: o.selectedLane.headerColor,
5713
5744
  "onUpdate:modelValue": l[34] ||= (e) => o.selectedLane.headerColor = e,
5714
5745
  "show-alpha": "",
5715
5746
  onChange: P
5716
5747
  }, null, 8, ["modelValue"])]),
5717
- a("div", La, [l[103] ||= a("label", null, "背景透明度", -1), c(G, {
5748
+ a("div", Ra, [l[103] ||= a("label", null, "背景透明度", -1), c(G, {
5718
5749
  size: "small",
5719
5750
  modelValue: j.value,
5720
5751
  "onUpdate:modelValue": l[35] ||= (e) => j.value = e,
@@ -5727,13 +5758,13 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
5727
5758
  },
5728
5759
  onChange: M
5729
5760
  }, null, 8, ["modelValue"])]),
5730
- a("div", Ra, [l[104] ||= a("label", null, "文字色", -1), c(B, {
5761
+ a("div", za, [l[104] ||= a("label", null, "文字色", -1), c(B, {
5731
5762
  size: "small",
5732
5763
  modelValue: o.selectedLane.textColor,
5733
5764
  "onUpdate:modelValue": l[36] ||= (e) => o.selectedLane.textColor = e,
5734
5765
  onChange: P
5735
5766
  }, null, 8, ["modelValue"])]),
5736
- a("div", za, [l[105] ||= a("label", null, "字号", -1), c(z, {
5767
+ a("div", Ba, [l[105] ||= a("label", null, "字号", -1), c(z, {
5737
5768
  size: "small",
5738
5769
  modelValue: o.selectedLane.fontSize,
5739
5770
  "onUpdate:modelValue": l[37] ||= (e) => o.selectedLane.fontSize = e,
@@ -5741,7 +5772,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
5741
5772
  max: 36,
5742
5773
  onChange: P
5743
5774
  }, null, 8, ["modelValue"])]),
5744
- a("div", Ba, [l[106] ||= a("label", null, "字体", -1), c(H, {
5775
+ a("div", Va, [l[106] ||= a("label", null, "字体", -1), c(H, {
5745
5776
  size: "small",
5746
5777
  modelValue: o.selectedLane.fontFamily,
5747
5778
  "onUpdate:modelValue": l[38] ||= (e) => o.selectedLane.fontFamily = e,
@@ -5783,7 +5814,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
5783
5814
  ]),
5784
5815
  _: 1
5785
5816
  }, 8, ["modelValue"])]),
5786
- a("div", Va, [l[107] ||= a("label", null, "字重", -1), c(H, {
5817
+ a("div", Ha, [l[107] ||= a("label", null, "字重", -1), c(H, {
5787
5818
  size: "small",
5788
5819
  modelValue: o.selectedLane.fontWeight,
5789
5820
  "onUpdate:modelValue": l[39] ||= (e) => o.selectedLane.fontWeight = e,
@@ -5809,7 +5840,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
5809
5840
  ]),
5810
5841
  _: 1
5811
5842
  }, 8, ["modelValue"])]),
5812
- a("div", Ha, [l[108] ||= a("label", null, "字体样式", -1), c(H, {
5843
+ a("div", Ua, [l[108] ||= a("label", null, "字体样式", -1), c(H, {
5813
5844
  size: "small",
5814
5845
  modelValue: o.selectedLane.fontStyle,
5815
5846
  "onUpdate:modelValue": l[40] ||= (e) => o.selectedLane.fontStyle = e,
@@ -5831,7 +5862,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
5831
5862
  ]),
5832
5863
  _: 1
5833
5864
  }, 8, ["modelValue"])]),
5834
- a("div", Ua, [l[109] ||= a("label", null, "文本对齐", -1), c(H, {
5865
+ a("div", Wa, [l[109] ||= a("label", null, "文本对齐", -1), c(H, {
5835
5866
  size: "small",
5836
5867
  modelValue: o.selectedLane.textAlign,
5837
5868
  "onUpdate:modelValue": l[41] ||= (e) => o.selectedLane.textAlign = e,
@@ -5853,19 +5884,19 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
5853
5884
  ]),
5854
5885
  _: 1
5855
5886
  }, 8, ["modelValue"])])
5856
- ])) : o.selectedSwimlane ? (_(), i("div", Wa, [
5887
+ ])) : o.selectedSwimlane ? (_(), i("div", Ga, [
5857
5888
  l[126] ||= a("h4", null, "泳道属性", -1),
5858
- a("div", Ga, [l[111] ||= a("label", null, "名称", -1), c(d, {
5889
+ a("div", Ka, [l[111] ||= a("label", null, "名称", -1), c(d, {
5859
5890
  size: "small",
5860
5891
  modelValue: o.selectedSwimlane.name,
5861
5892
  "onUpdate:modelValue": l[42] ||= (e) => o.selectedSwimlane.name = e,
5862
5893
  onChange: N
5863
5894
  }, null, 8, ["modelValue"])]),
5864
- a("div", Ka, [l[112] ||= a("label", null, "方向", -1), c(u, { size: "small" }, {
5895
+ a("div", qa, [l[112] ||= a("label", null, "方向", -1), c(u, { size: "small" }, {
5865
5896
  default: D(() => [s(S(o.selectedSwimlane.direction === "horizontal" ? "水平" : "垂直"), 1)]),
5866
5897
  _: 1
5867
5898
  })]),
5868
- a("div", qa, [l[113] ||= a("label", null, "宽度", -1), c(z, {
5899
+ a("div", Ja, [l[113] ||= a("label", null, "宽度", -1), c(z, {
5869
5900
  size: "small",
5870
5901
  modelValue: o.selectedSwimlane.width,
5871
5902
  "onUpdate:modelValue": l[43] ||= (e) => o.selectedSwimlane.width = e,
@@ -5873,7 +5904,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
5873
5904
  max: 2e3,
5874
5905
  onChange: N
5875
5906
  }, null, 8, ["modelValue"])]),
5876
- a("div", Ja, [l[114] ||= a("label", null, "高度", -1), c(z, {
5907
+ a("div", Ya, [l[114] ||= a("label", null, "高度", -1), c(z, {
5877
5908
  size: "small",
5878
5909
  modelValue: o.selectedSwimlane.height,
5879
5910
  "onUpdate:modelValue": l[44] ||= (e) => o.selectedSwimlane.height = e,
@@ -5881,19 +5912,19 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
5881
5912
  max: 1e3,
5882
5913
  onChange: N
5883
5914
  }, null, 8, ["modelValue"])]),
5884
- a("div", Ya, [l[115] ||= a("label", null, "背景色", -1), c(B, {
5915
+ a("div", Xa, [l[115] ||= a("label", null, "背景色", -1), c(B, {
5885
5916
  size: "small",
5886
5917
  modelValue: o.selectedSwimlane.color,
5887
5918
  "onUpdate:modelValue": l[45] ||= (e) => o.selectedSwimlane.color = e,
5888
5919
  onChange: N
5889
5920
  }, null, 8, ["modelValue"])]),
5890
- a("div", Xa, [l[116] ||= a("label", null, "标题背景色", -1), c(B, {
5921
+ a("div", Za, [l[116] ||= a("label", null, "标题背景色", -1), c(B, {
5891
5922
  size: "small",
5892
5923
  modelValue: o.selectedSwimlane.headerColor,
5893
5924
  "onUpdate:modelValue": l[46] ||= (e) => o.selectedSwimlane.headerColor = e,
5894
5925
  onChange: N
5895
5926
  }, null, 8, ["modelValue"])]),
5896
- a("div", Za, [l[117] ||= a("label", null, "标题透明度", -1), c(G, {
5927
+ a("div", Qa, [l[117] ||= a("label", null, "标题透明度", -1), c(G, {
5897
5928
  size: "small",
5898
5929
  modelValue: k.value,
5899
5930
  "onUpdate:modelValue": l[47] ||= (e) => k.value = e,
@@ -5906,13 +5937,13 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
5906
5937
  },
5907
5938
  onChange: A
5908
5939
  }, null, 8, ["modelValue"])]),
5909
- a("div", Qa, [l[118] ||= a("label", null, "标题文字色", -1), c(B, {
5940
+ a("div", $a, [l[118] ||= a("label", null, "标题文字色", -1), c(B, {
5910
5941
  size: "small",
5911
5942
  modelValue: o.selectedSwimlane.headerTextColor,
5912
5943
  "onUpdate:modelValue": l[48] ||= (e) => o.selectedSwimlane.headerTextColor = e,
5913
5944
  onChange: N
5914
5945
  }, null, 8, ["modelValue"])]),
5915
- a("div", $a, [l[119] ||= a("label", null, "字号", -1), c(z, {
5946
+ a("div", eo, [l[119] ||= a("label", null, "字号", -1), c(z, {
5916
5947
  size: "small",
5917
5948
  modelValue: o.selectedSwimlane.fontSize,
5918
5949
  "onUpdate:modelValue": l[49] ||= (e) => o.selectedSwimlane.fontSize = e,
@@ -5920,7 +5951,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
5920
5951
  max: 36,
5921
5952
  onChange: N
5922
5953
  }, null, 8, ["modelValue"])]),
5923
- a("div", eo, [l[120] ||= a("label", null, "字体", -1), c(H, {
5954
+ a("div", to, [l[120] ||= a("label", null, "字体", -1), c(H, {
5924
5955
  size: "small",
5925
5956
  modelValue: o.selectedSwimlane.fontFamily,
5926
5957
  "onUpdate:modelValue": l[50] ||= (e) => o.selectedSwimlane.fontFamily = e,
@@ -5962,7 +5993,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
5962
5993
  ]),
5963
5994
  _: 1
5964
5995
  }, 8, ["modelValue"])]),
5965
- a("div", to, [l[121] ||= a("label", null, "字重", -1), c(H, {
5996
+ a("div", no, [l[121] ||= a("label", null, "字重", -1), c(H, {
5966
5997
  size: "small",
5967
5998
  modelValue: o.selectedSwimlane.fontWeight,
5968
5999
  "onUpdate:modelValue": l[51] ||= (e) => o.selectedSwimlane.fontWeight = e,
@@ -5988,7 +6019,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
5988
6019
  ]),
5989
6020
  _: 1
5990
6021
  }, 8, ["modelValue"])]),
5991
- a("div", no, [l[122] ||= a("label", null, "字体样式", -1), c(H, {
6022
+ a("div", ro, [l[122] ||= a("label", null, "字体样式", -1), c(H, {
5992
6023
  size: "small",
5993
6024
  modelValue: o.selectedSwimlane.fontStyle,
5994
6025
  "onUpdate:modelValue": l[52] ||= (e) => o.selectedSwimlane.fontStyle = e,
@@ -6010,7 +6041,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
6010
6041
  ]),
6011
6042
  _: 1
6012
6043
  }, 8, ["modelValue"])]),
6013
- a("div", ro, [l[123] ||= a("label", null, "文本对齐", -1), c(H, {
6044
+ a("div", io, [l[123] ||= a("label", null, "文本对齐", -1), c(H, {
6014
6045
  size: "small",
6015
6046
  modelValue: o.selectedSwimlane.textAlign,
6016
6047
  "onUpdate:modelValue": l[53] ||= (e) => o.selectedSwimlane.textAlign = e,
@@ -6032,7 +6063,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
6032
6063
  ]),
6033
6064
  _: 1
6034
6065
  }, 8, ["modelValue"])]),
6035
- a("div", io, [c(L, {
6066
+ a("div", ao, [c(L, {
6036
6067
  size: "small",
6037
6068
  onClick: l[54] ||= (e) => t.$emit("add-lane")
6038
6069
  }, {
@@ -6046,15 +6077,15 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
6046
6077
  default: D(() => [...l[125] ||= [s("删除", -1)]]),
6047
6078
  _: 1
6048
6079
  })])
6049
- ])) : (_(), i("div", ao, [...l[127] ||= [a("p", null, "选择节点或连线查看属性", -1)]])),
6050
- c(Hi, {
6080
+ ])) : (_(), i("div", oo, [...l[127] ||= [a("p", null, "选择节点或连线查看属性", -1)]])),
6081
+ c(Ui, {
6051
6082
  modelValue: f.value,
6052
6083
  "onUpdate:modelValue": l[56] ||= (e) => f.value = e,
6053
6084
  title: "输入参数设置",
6054
6085
  parameters: o.selectedNode?.inputParams || [],
6055
6086
  onConfirm: w
6056
6087
  }, null, 8, ["modelValue", "parameters"]),
6057
- c(Hi, {
6088
+ c(Ui, {
6058
6089
  modelValue: m.value,
6059
6090
  "onUpdate:modelValue": l[57] ||= (e) => m.value = e,
6060
6091
  title: "输出参数设置",
@@ -6083,61 +6114,99 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
6083
6114
  ]);
6084
6115
  };
6085
6116
  }
6086
- }, [["__scopeId", "data-v-8d0fe2b9"]]), so = { class: "process-diagram-editor" }, co = { class: "editor-header" }, lo = { class: "header-left" }, uo = { class: "header-right" }, fo = {
6117
+ }, [["__scopeId", "data-v-8d0fe2b9"]]), co = { class: "process-diagram-editor" }, lo = { class: "editor-header" }, uo = { class: "header-left" }, fo = { class: "header-right" }, po = {
6087
6118
  key: 0,
6088
6119
  class: "collab-users"
6089
- }, po = ["title"], mo = {
6120
+ }, mo = ["title"], ho = {
6090
6121
  key: 0,
6091
6122
  class: "collab-more"
6092
- }, ho = { class: "editor-body" }, go = { class: "editor-main" }, _o = "diagram", vo = /*#__PURE__*/ Q({
6123
+ }, go = { class: "editor-body" }, _o = { class: "editor-main" }, vo = "diagram", yo = /*#__PURE__*/ Q({
6093
6124
  __name: "DiagramEditor",
6094
- setup(n) {
6095
- let o = N(), s = M(), l = s.name === "ProcessDiagram" || s.name === "NewProcessDiagram", u = l ? "process" : "execution", f = l ? "process-diagram-" : "exec-diagram-", p = y(!1), g = y(!1), { saveVersion: v } = We(), w = Ve(), T = s.query.type, O = ne(t(() => s.params.id || "new-doc")), k = null, A = y(null), j = y(null), F = y(!0), I = y(1), L = y(!1), R = y(!1), B = y([]), V = y(!1), H = y(null), U = y(s.params.id || null), W = y(localStorage.getItem("diagram-user-name") || ""), G = null;
6096
- E(W, (e) => {
6125
+ props: {
6126
+ docId: {
6127
+ type: [Number, String],
6128
+ default: null
6129
+ },
6130
+ apiBase: {
6131
+ type: String,
6132
+ default: "/api"
6133
+ },
6134
+ saveApi: {
6135
+ type: [String, Function],
6136
+ default: null
6137
+ },
6138
+ loadApi: {
6139
+ type: [String, Function],
6140
+ default: null
6141
+ },
6142
+ wsUrl: {
6143
+ type: String,
6144
+ default: ""
6145
+ },
6146
+ user: {
6147
+ type: Object,
6148
+ default: null
6149
+ },
6150
+ uiConfig: {
6151
+ type: Object,
6152
+ default: () => ({})
6153
+ }
6154
+ },
6155
+ setup(o) {
6156
+ let s = o, l = N(), u = M(), f = u.name === "ProcessDiagram" || u.name === "NewProcessDiagram", p = f ? "process" : "execution", g = f ? "process-diagram-" : "exec-diagram-", v = t(() => ({
6157
+ backButton: "show",
6158
+ titleEditable: !0,
6159
+ authorEditable: !0,
6160
+ showTypeSelector: !0,
6161
+ showTemplateSelector: !0,
6162
+ initialDiagramType: null,
6163
+ ...s.uiConfig
6164
+ })), w = t(() => s.docId ?? u.params.id), T = t(() => s.apiBase && s.apiBase !== "/api" ? ne(s.apiBase) : ie), O = y(!1), k = y(!1), { saveVersion: A } = Ge(), j = He(), I = u.query.type, L = ae(t(() => w.value || "new-doc")), R = null, B = y(null), V = y(null), H = y(!0), U = y(1), W = y(!1), G = y(!1), ee = y([]), q = y(!1), te = y(null), J = y(w.value || null), Y = y(s.user?.name || localStorage.getItem("diagram-user-name") || ""), re = null;
6165
+ E(Y, (e) => {
6097
6166
  localStorage.setItem("diagram-user-name", e || "");
6098
6167
  });
6099
- let q = y(null), J = y(!1), Y = y(!1), X = null, ee = () => {
6168
+ let X = y(null), oe = y(!1), se = y(!1), ce = null, le = () => {
6100
6169
  if (!$.value?.trim()) {
6101
6170
  P.warning("请输入流程图名称");
6102
6171
  return;
6103
6172
  }
6104
- if (!W.value?.trim()) {
6173
+ if (!Y.value?.trim()) {
6105
6174
  P.warning("请输入用户名称");
6106
6175
  return;
6107
6176
  }
6108
6177
  try {
6109
- let e = s.params.id || `diagram-${Date.now()}`;
6110
- H.value = e, O.connect(e), O.setLocalUser({ name: W.value.trim() }), L.value = !0;
6111
- let t = O.awareness.value;
6178
+ let e = w.value || `diagram-${Date.now()}`;
6179
+ te.value = e, L.connect(e, s.wsUrl || void 0), L.setLocalUser({ name: Y.value.trim() }), W.value = !0;
6180
+ let t = L.awareness.value;
6112
6181
  t.on("change", () => {
6113
- B.value = Array.from(t.getStates().entries()).filter(([e, t]) => t.user).map(([e, t]) => ({
6182
+ ee.value = Array.from(t.getStates().entries()).filter(([e, t]) => t.user).map(([e, t]) => ({
6114
6183
  clientId: e,
6115
6184
  ...t.user
6116
6185
  }));
6117
- }), w.setCollabContext({
6118
- ydoc: O.doc,
6186
+ }), j.setCollabContext({
6187
+ ydoc: L.doc,
6119
6188
  provider: t?.provider || null,
6120
- onlineUsers: B
6121
- }), w.setCurrentUser({
6189
+ onlineUsers: ee
6190
+ }), j.setCurrentUser({
6122
6191
  id: t.clientID,
6123
- name: W.value.trim(),
6192
+ name: Y.value.trim(),
6124
6193
  color: `#${Math.floor(Math.random() * 16777215).toString(16).padStart(6, "0")}`
6125
- }), O.onRemoteChange("diagram", (e) => {
6126
- e && (V.value = !0, Re(e), V.value = !1);
6127
- }), O.syncToYjs("diagram", Le()), k && k();
6194
+ }), L.onRemoteChange("diagram", (e) => {
6195
+ e && (q.value = !0, Je(e), q.value = !1);
6196
+ }), L.syncToYjs("diagram", qe()), R && R();
6128
6197
  let n = null, r = () => {
6129
- n && clearTimeout(n), L.value && !V.value && O.isConnected.value && O.syncToYjs("diagram", Le());
6198
+ n && clearTimeout(n), W.value && !q.value && L.isConnected.value && L.syncToYjs("diagram", qe());
6130
6199
  };
6131
- X = r, k = E([
6132
- se,
6133
- ce,
6134
- le
6200
+ ce = r, R = E([
6201
+ Z,
6202
+ he,
6203
+ ge
6135
6204
  ], () => {
6136
- Y.value || (n && clearTimeout(n), n = setTimeout(r, 300));
6137
- }, { deep: !0 }), G && G(), G = E(() => O.isConnected.value, (e, t) => {
6138
- e && !t && L.value && O.syncToYjs("diagram", Le());
6205
+ se.value || (n && clearTimeout(n), n = setTimeout(r, 300));
6206
+ }, { deep: !0 }), re && re(), re = E(() => L.isConnected.value, (e, t) => {
6207
+ e && !t && W.value && L.syncToYjs("diagram", qe());
6139
6208
  });
6140
- let i = l ? "process-diagram" : "execution-diagram", a = `${window.location.origin}/${i}/${e}?collab=1`;
6209
+ let i = f ? "process-diagram" : "execution-diagram", a = `${window.location.origin}/${i}/${e}?collab=1`;
6141
6210
  navigator.clipboard.writeText(a).then(() => {
6142
6211
  P.success("协作已开启,分享链接已复制");
6143
6212
  }).catch(() => {
@@ -6146,44 +6215,44 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
6146
6215
  } catch (e) {
6147
6216
  console.error("协作连接失败:", e), P.error("协作连接失败: " + (e.message || e));
6148
6217
  }
6149
- }, Z = () => {
6150
- k &&= (k(), null), G &&= (G(), null), O.closeCollaboration(), L.value = !1, P.info("协作已关闭");
6151
- }, re = async () => {
6152
- if (!L.value) {
6153
- ee();
6218
+ }, ue = () => {
6219
+ R &&= (R(), null), re &&= (re(), null), L.closeCollaboration(), W.value = !1, P.info("协作已关闭");
6220
+ }, de = async () => {
6221
+ if (!W.value) {
6222
+ le();
6154
6223
  return;
6155
6224
  }
6156
- let e = H.value || s.params.id;
6225
+ let e = te.value || u.params.id;
6157
6226
  if (!e) {
6158
6227
  P.warning("请先开启协作");
6159
6228
  return;
6160
6229
  }
6161
- let t = l ? "process-diagram" : "execution-diagram", n = `${window.location.origin}/${t}/${e}?collab=1`;
6230
+ let t = f ? "process-diagram" : "execution-diagram", n = `${window.location.origin}/${t}/${e}?collab=1`;
6162
6231
  try {
6163
6232
  await navigator.clipboard.writeText(n), P.success("分享链接已复制");
6164
6233
  } catch {
6165
6234
  P.info(`分享链接: ${n}`);
6166
6235
  }
6167
- }, { NODE_TYPES: ie, ANIMATION_TYPES: ae, LINE_STYLES: oe, nodes: se, edges: ce, swimlanes: le, selectedNodeId: ue, selectedEdgeId: de, selectedSwimlaneId: fe, selectedNode: pe, selectedEdge: me, connectMode: he, connectSource: ge, diagramType: Q, diagramTitle: $, currentTheme: ve, undoStack: ye, redoStack: be, undo: xe, redo: Se, addNode: Ce, addEdge: we, addSwimlane: Te, addLane: Ee, updateNode: De, updateEdge: Oe, removeNode: ke, removeEdge: Ae, removeSwimlane: je, clearAll: Me, selectNode: Ne, selectEdge: Pe, bringToFront: Fe, sendToBack: Ie, toJSON: Le, fromJSON: Re, autoLayout: ze, loadTemplate: He, PROCESS_TYPE_LABELS: Ue, EXECUTION_TYPE_LABELS: Ge } = _e(u, T), Ke = t(() => ({
6168
- ...Ue,
6169
- ...Ge
6170
- })[Q.value] || "流程图"), qe = t(() => le.find((e) => e.id === fe.value) || null), Je = y(null), Ye = t(() => !qe.value || !Je.value ? null : qe.value.lanes?.find((e) => e.id === Je.value) || null), Xe = () => {
6171
- ue.value = null, de.value = null, fe.value = null, Je.value = null, he.value = !1, ge.value = null;
6172
- }, Ze = () => {
6173
- Xe(), J.value = !1, q.value = null;
6174
- }, Qe = (e, t) => {
6175
- fe.value = e, Je.value = t;
6176
- }, $e = (e, t) => {
6177
- let n = le.find((t) => t.id === e);
6236
+ }, { NODE_TYPES: fe, ANIMATION_TYPES: pe, LINE_STYLES: me, nodes: Z, edges: he, swimlanes: ge, selectedNodeId: _e, selectedEdgeId: Q, selectedSwimlaneId: ye, selectedNode: be, selectedEdge: xe, connectMode: Se, connectSource: Ce, diagramType: we, diagramTitle: $, currentTheme: Te, undoStack: Ee, redoStack: De, undo: Oe, redo: ke, addNode: Ae, addEdge: je, addSwimlane: Me, addLane: Ne, updateNode: Pe, updateEdge: Fe, removeNode: Ie, removeEdge: Le, removeSwimlane: Re, clearAll: ze, selectNode: Be, selectEdge: Ue, bringToFront: We, sendToBack: Ke, toJSON: qe, fromJSON: Je, autoLayout: Ye, loadTemplate: Xe, PROCESS_TYPE_LABELS: Ze, EXECUTION_TYPE_LABELS: Qe } = ve(p, v.value.initialDiagramType || I), $e = t(() => ({
6237
+ ...Ze,
6238
+ ...Qe
6239
+ })[we.value] || "流程图"), et = t(() => ge.find((e) => e.id === ye.value) || null), tt = y(null), nt = t(() => !et.value || !tt.value ? null : et.value.lanes?.find((e) => e.id === tt.value) || null), it = () => {
6240
+ _e.value = null, Q.value = null, ye.value = null, tt.value = null, Se.value = !1, Ce.value = null;
6241
+ }, at = () => {
6242
+ it(), oe.value = !1, X.value = null;
6243
+ }, ot = (e, t) => {
6244
+ ye.value = e, tt.value = t;
6245
+ }, st = (e, t) => {
6246
+ let n = ge.find((t) => t.id === e);
6178
6247
  n && Object.assign(n, t);
6179
- }, et = (e, t, n) => {
6180
- let r = le.find((t) => t.id === e);
6248
+ }, ct = (e, t, n) => {
6249
+ let r = ge.find((t) => t.id === e);
6181
6250
  if (r) {
6182
6251
  let e = r.lanes?.find((e) => e.id === t);
6183
6252
  e && Object.assign(e, n);
6184
6253
  }
6185
- }, tt = (e, t, n) => {
6186
- let r = le.find((t) => t.id === e);
6254
+ }, lt = (e, t, n) => {
6255
+ let r = ge.find((t) => t.id === e);
6187
6256
  if (r) {
6188
6257
  if (r.direction === "horizontal" && r.lanes?.length) {
6189
6258
  let e = r.lanes.reduce((e, t) => e + t.height, 0);
@@ -6205,86 +6274,86 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
6205
6274
  }
6206
6275
  r.width = t, r.height = n;
6207
6276
  }
6208
- }, rt = (e, t, n, r) => {
6209
- let i = le.find((t) => t.id === e);
6277
+ }, ut = (e, t, n, r) => {
6278
+ let i = ge.find((t) => t.id === e);
6210
6279
  if (i) {
6211
6280
  let e = i.lanes?.find((e) => e.id === t);
6212
6281
  e && (n != null && (e.height = n), r != null && (e.width = r, i.direction === "vertical" && i.lanes?.length && (i.width = i.lanes.reduce((e, t) => e + (t.width || 200), 0))));
6213
6282
  }
6214
- }, it = (e, t, n) => {
6215
- let r = le.find((t) => t.id === e);
6283
+ }, dt = (e, t, n) => {
6284
+ let r = ge.find((t) => t.id === e);
6216
6285
  r && (r.x = t, r.y = n);
6217
- }, at = (e) => {
6218
- Q.value = e;
6219
- }, ot = (e) => {
6220
- He(e);
6221
- }, st = (e) => {
6222
- ve.value = e;
6223
- }, ct = (e, t, n) => {
6224
- ue.value = Ce(e, t, n).id;
6225
- }, lt = (e) => {
6226
- J.value = !1, q.value = null, ge.value = e;
6227
- }, ut = (e) => {
6228
- q.value = e, J.value = !0;
6229
- }, dt = (e) => {
6230
- let t = q.value || ge.value;
6231
- t && e && t !== e && we(t, e), ge.value = null, q.value = null, J.value = !1;
6232
- }, ft = (e, t, n) => {
6233
- Y.value = !0;
6234
- let r = se.find((t) => t.id === e);
6286
+ }, ft = (e) => {
6287
+ we.value = e;
6288
+ }, pt = (e) => {
6289
+ Xe(e);
6290
+ }, mt = (e) => {
6291
+ Te.value = e;
6292
+ }, ht = (e, t, n) => {
6293
+ _e.value = Ae(e, t, n).id;
6294
+ }, gt = (e) => {
6295
+ oe.value = !1, X.value = null, Ce.value = e;
6296
+ }, _t = (e) => {
6297
+ X.value = e, oe.value = !0;
6298
+ }, vt = (e) => {
6299
+ let t = X.value || Ce.value;
6300
+ t && e && t !== e && je(t, e), Ce.value = null, X.value = null, oe.value = !1;
6301
+ }, yt = (e, t, n) => {
6302
+ se.value = !0;
6303
+ let r = Z.find((t) => t.id === e);
6235
6304
  r && !r.locked && (r.x += t, r.y += n);
6236
- }, pt = () => {
6237
- Y.value = !1, X && X();
6238
- }, mt = (e, t, n) => {
6239
- Y.value = !0;
6240
- let r = se.find((t) => t.id === e);
6305
+ }, bt = () => {
6306
+ se.value = !1, ce && ce();
6307
+ }, xt = (e, t, n) => {
6308
+ se.value = !0;
6309
+ let r = Z.find((t) => t.id === e);
6241
6310
  r && (r.width = t, r.height = n);
6242
- }, ht = () => {
6243
- Y.value = !1, X && X();
6244
- }, gt = (e) => {
6245
- let t = Te("泳道 " + (le.length + 1), e);
6246
- Ee(t.id, "角色A"), fe.value = t.id;
6247
- }, _t = () => {
6248
- qe.value && Ee(qe.value.id, "新泳道");
6249
- }, vt = () => {
6250
- qe.value && Ye.value && et(qe.value.id, Ye.value.id, {});
6251
- }, yt = () => {
6252
- if (se.length === 0) return;
6253
- let e = Math.min(...se.map((e) => e.x)), t = Math.min(...se.map((e) => e.y)), n = Math.max(...se.map((e) => e.x + e.width)), r = Math.max(...se.map((e) => e.y + e.height)), i = n - e || 1, a = r - t || 1, o = document.querySelector(".diagram-canvas");
6311
+ }, St = () => {
6312
+ se.value = !1, ce && ce();
6313
+ }, Ct = (e) => {
6314
+ let t = Me("泳道 " + (ge.length + 1), e);
6315
+ Ne(t.id, "角色A"), ye.value = t.id;
6316
+ }, wt = () => {
6317
+ et.value && Ne(et.value.id, "新泳道");
6318
+ }, Tt = () => {
6319
+ et.value && nt.value && ct(et.value.id, nt.value.id, {});
6320
+ }, Et = () => {
6321
+ if (Z.length === 0) return;
6322
+ let e = Math.min(...Z.map((e) => e.x)), t = Math.min(...Z.map((e) => e.y)), n = Math.max(...Z.map((e) => e.x + e.width)), r = Math.max(...Z.map((e) => e.y + e.height)), i = n - e || 1, a = r - t || 1, o = document.querySelector(".diagram-canvas");
6254
6323
  if (!o) return;
6255
6324
  let s = o.getBoundingClientRect(), c = (s.width - 120) / i, l = (s.height - 120) / a, u = Math.min(c, l, 2);
6256
- se.forEach((n) => {
6325
+ Z.forEach((n) => {
6257
6326
  n.x = 60 + (n.x - e) * u, n.y = 60 + (n.y - t) * u, n.width *= u, n.height *= u;
6258
- }), A.value && A.value.resetView();
6259
- }, bt = async (e) => {
6260
- let t = Le();
6327
+ }), B.value && B.value.resetView();
6328
+ }, Dt = async (e) => {
6329
+ let t = qe();
6261
6330
  switch (e) {
6262
6331
  case "json":
6263
- xt(t);
6332
+ Ot(t);
6264
6333
  break;
6265
6334
  case "svg":
6266
- St();
6335
+ kt();
6267
6336
  break;
6268
6337
  case "png":
6269
- Ct("png");
6338
+ At("png");
6270
6339
  break;
6271
6340
  case "html":
6272
- wt(t);
6341
+ jt(t);
6273
6342
  break;
6274
6343
  case "pdf":
6275
- Et();
6344
+ Nt();
6276
6345
  break;
6277
6346
  }
6278
- }, xt = (e) => {
6347
+ }, Ot = (e) => {
6279
6348
  let t = new Blob([JSON.stringify(e, null, 2)], { type: "application/json" }), n = URL.createObjectURL(t), r = document.createElement("a");
6280
6349
  r.href = n, r.download = `${$.value || "流程图"}.json`, r.click(), URL.revokeObjectURL(n), P.success("JSON已导出");
6281
- }, St = () => {
6282
- let e = A.value?.svgRef;
6350
+ }, kt = () => {
6351
+ let e = B.value?.svgRef;
6283
6352
  if (!e) return;
6284
6353
  let t = e.cloneNode(!0), n = new XMLSerializer().serializeToString(t), r = new Blob([n], { type: "image/svg+xml" }), i = URL.createObjectURL(r), a = document.createElement("a");
6285
6354
  a.href = i, a.download = `${$.value || "流程图"}.svg`, a.click(), URL.revokeObjectURL(i), P.success("SVG已导出");
6286
- }, Ct = async (e) => {
6287
- let t = A.value?.svgRef;
6355
+ }, At = async (e) => {
6356
+ let t = B.value?.svgRef;
6288
6357
  if (!t) return;
6289
6358
  let n = new XMLSerializer().serializeToString(t), r = document.createElement("canvas"), i = r.getContext("2d"), a = new Image(), o = new Blob([n], { type: "image/svg+xml;charset=utf-8" }), s = URL.createObjectURL(o);
6290
6359
  a.onload = () => {
@@ -6293,7 +6362,7 @@ var He = "/api/document-versions", Ue = 5e3, We = () => {
6293
6362
  n.href = URL.createObjectURL(t), n.download = `${$.value || "流程图"}.${e}`, n.click(), P.success(`${e.toUpperCase()}已导出`);
6294
6363
  }, `image/${e}`);
6295
6364
  }, a.src = s;
6296
- }, wt = (e) => {
6365
+ }, jt = (e) => {
6297
6366
  let t = `<!DOCTYPE html>
6298
6367
  <html lang="zh-CN">
6299
6368
  <head>
@@ -6315,13 +6384,13 @@ svg { max-width: 100%; height: auto; }
6315
6384
  <div class="container">
6316
6385
  <h1>${e.title}</h1>
6317
6386
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4000 3000">
6318
- ${Tt(e)}
6387
+ ${Mt(e)}
6319
6388
  </svg>
6320
6389
  </div>
6321
6390
  </body>
6322
6391
  </html>`, n = new Blob([t], { type: "text/html;charset=utf-8" }), r = URL.createObjectURL(n), i = document.createElement("a");
6323
6392
  i.href = r, i.download = `${e.title || "流程图"}.html`, i.click(), URL.revokeObjectURL(r), P.success("HTML已导出");
6324
- }, Tt = (e) => {
6393
+ }, Mt = (e) => {
6325
6394
  let t = "";
6326
6395
  return (e.nodes || []).forEach((e) => {
6327
6396
  let n = e.color || "#409eff", r = e.strokeColor || "#333";
@@ -6338,8 +6407,8 @@ ${Tt(e)}
6338
6407
  t += `<line x1="${e}" y1="${a}" x2="${o}" y2="${s}" stroke="${n.lineColor}" stroke-width="${n.lineWidth}" marker-end="url(#arrowhead)"/>`;
6339
6408
  }
6340
6409
  }), t;
6341
- }, Et = () => {
6342
- let e = A.value?.svgRef;
6410
+ }, Nt = () => {
6411
+ let e = B.value?.svgRef;
6343
6412
  if (!e) return;
6344
6413
  let t = new XMLSerializer().serializeToString(e), n = window.open("", "_blank");
6345
6414
  n.document.write(`
@@ -6352,21 +6421,21 @@ ${Tt(e)}
6352
6421
  </body>
6353
6422
  </html>
6354
6423
  `), n.document.close();
6355
- }, Dt = () => {
6356
- j.value?.click();
6357
- }, Ot = (e) => {
6424
+ }, Pt = () => {
6425
+ V.value?.click();
6426
+ }, Ft = (e) => {
6358
6427
  let t = e.target.files[0];
6359
6428
  if (!t) return;
6360
6429
  let n = new FileReader();
6361
6430
  n.onload = (e) => {
6362
6431
  try {
6363
- Re(JSON.parse(e.target.result)) ? P.success("导入成功") : P.error("无效的流程图文件");
6432
+ Je(JSON.parse(e.target.result)) ? P.success("导入成功") : P.error("无效的流程图文件");
6364
6433
  } catch {
6365
6434
  P.error("文件解析失败");
6366
6435
  }
6367
6436
  }, n.readAsText(t), e.target.value = "";
6368
- }, kt = async () => {
6369
- if (R.value && O.collaborationClosed.value) {
6437
+ }, It = async () => {
6438
+ if (G.value && L.collaborationClosed.value) {
6370
6439
  P.error("协作已关闭,无法提交保存");
6371
6440
  return;
6372
6441
  }
@@ -6374,45 +6443,57 @@ ${Tt(e)}
6374
6443
  P.warning("请输入流程图名称");
6375
6444
  return;
6376
6445
  }
6377
- if (!W.value?.trim()) {
6446
+ if (!Y.value?.trim()) {
6378
6447
  P.warning("请输入用户名称");
6379
6448
  return;
6380
6449
  }
6381
6450
  try {
6382
- let e = Le(), t = {
6451
+ let e = qe(), t = {
6383
6452
  title: $.value || "流程图",
6384
6453
  content: JSON.stringify(e),
6385
- doc_type: l ? "process-diagram" : "exec-diagram"
6386
- }, n = s.params.id;
6387
- if (n && n !== "new") await te.update(n, t), U.value = n;
6454
+ doc_type: f ? "process-diagram" : "exec-diagram"
6455
+ }, n = w.value, r = typeof s.saveApi == "function" ? s.saveApi : s.saveApi ? (e) => {
6456
+ let t = n ? `${s.saveApi}/${n}` : s.saveApi;
6457
+ return n ? F.put(t, e) : F.post(t, e);
6458
+ } : null;
6459
+ if (r) J.value = (await r(t, n)).data?.id || n;
6460
+ else if (n && n !== "new") await T.value.update(n, t), J.value = n;
6388
6461
  else {
6389
- let e = await te.create(t);
6390
- U.value = e.data.id, o.replace(`/${l ? "process-diagram" : "execution-diagram"}/${e.data.id}`);
6462
+ let e = await T.value.create(t);
6463
+ J.value = e.data.id, s.docId || l.replace(`/${f ? "process-diagram" : "execution-diagram"}/${e.data.id}`);
6391
6464
  }
6392
- P.success("已保存"), v({
6393
- documentId: String(U.value || ""),
6394
- docType: l ? "process-diagram" : "exec-diagram",
6465
+ P.success("已保存"), A({
6466
+ documentId: String(J.value || ""),
6467
+ docType: f ? "process-diagram" : "exec-diagram",
6395
6468
  content: JSON.stringify(e),
6396
- userId: String(w.currentUser.value?.id || ""),
6397
- userName: w.currentUser.value?.name || W.value || "未知"
6469
+ userId: String(j.currentUser.value?.id || ""),
6470
+ userName: j.currentUser.value?.name || Y.value || "未知"
6398
6471
  });
6399
6472
  } catch (e) {
6400
6473
  P.error("保存失败: " + (e.message || e));
6401
6474
  }
6402
- }, At = async () => {
6403
- let e = s.params.id;
6475
+ }, Lt = async () => {
6476
+ let e = w.value;
6404
6477
  if (e && e !== "new") try {
6405
- let t = await te.get(e);
6406
- t.data && t.data.content && (Re(JSON.parse(t.data.content)), $.value = t.data.title || $.value);
6478
+ if (typeof s.loadApi == "function") {
6479
+ let t = await s.loadApi(e);
6480
+ t.data && t.data.content && (Je(JSON.parse(t.data.content)), $.value = t.data.title || $.value);
6481
+ } else if (s.loadApi) {
6482
+ let t = await F.get(`${s.loadApi}/${e}`);
6483
+ t.data && t.data.content && (Je(JSON.parse(t.data.content)), $.value = t.data.title || $.value);
6484
+ } else {
6485
+ let t = await T.value.get(e);
6486
+ t.data && t.data.content && (Je(JSON.parse(t.data.content)), $.value = t.data.title || $.value);
6487
+ }
6407
6488
  } catch {
6408
- let t = localStorage.getItem(f + e);
6489
+ let t = localStorage.getItem(g + e);
6409
6490
  if (t) try {
6410
- Re(JSON.parse(t));
6491
+ Je(JSON.parse(t));
6411
6492
  } catch {}
6412
6493
  }
6413
- }, jt = () => {
6414
- o.push("/");
6415
- }, Mt = [
6494
+ }, Rt = () => {
6495
+ l.push("/");
6496
+ }, zt = [
6416
6497
  "我可以帮您优化流程图布局、检查节点逻辑,或者提供流程设计建议。请问有什么需要帮助的?",
6417
6498
  "这个流程图的节点连接看起来很清晰。建议检查一下是否有遗漏的分支或异常处理路径。",
6418
6499
  "根据当前的流程结构,我建议在关键决策节点后添加明确的条件标注,使流程更易理解。",
@@ -6421,125 +6502,131 @@ ${Tt(e)}
6421
6502
  "建议在流程开始和结束节点使用统一的样式,这样可以让读者更快识别流程的起止点。",
6422
6503
  "这个执行图的逻辑链路比较长,建议在中间添加一些检查点节点,便于流程监控和调试。",
6423
6504
  "我可以帮您生成流程图的文字说明文档,方便团队成员理解流程细节。"
6424
- ], Nt = async (e, t = {}) => {
6425
- let n = s.params.id ? `${_o}-${s.params.id}` : null;
6426
- await w.sendMessage(e, {
6505
+ ], Bt = async (e, t = {}) => {
6506
+ let n = w.value ? `${vo}-${w.value}` : null;
6507
+ await j.sendMessage(e, {
6427
6508
  ...t,
6428
6509
  roomId: n
6429
6510
  });
6430
- let r = t.mentionedUser, i = r && r.toLowerCase().includes("ai"), a = w.collabUsers.value.filter((e) => e.name !== w.currentUser.value.name);
6431
- (!r || i || a.length === 0) && (w.loading.value = !0, setTimeout(() => {
6432
- w.sendAiMessage(Mt[Math.floor(Math.random() * Mt.length)], n), w.loading.value = !1;
6511
+ let r = t.mentionedUser, i = r && r.toLowerCase().includes("ai"), a = j.collabUsers.value.filter((e) => e.name !== j.currentUser.value.name);
6512
+ (!r || i || a.length === 0) && (j.loading.value = !0, setTimeout(() => {
6513
+ j.sendAiMessage(zt[Math.floor(Math.random() * zt.length)], n), j.loading.value = !1;
6433
6514
  }, 800 + Math.random() * 1200));
6434
- }, Pt = () => {
6435
- let e = s.params.id ? `${_o}-${s.params.id}` : null;
6436
- w.clearMessages(e);
6437
- }, Ft = () => {
6438
- if (!s.params.id) {
6515
+ }, Ht = () => {
6516
+ let e = w.value ? `${vo}-${w.value}` : null;
6517
+ j.clearMessages(e);
6518
+ }, Ut = () => {
6519
+ if (!w.value) {
6439
6520
  P.warning("请先保存文档");
6440
6521
  return;
6441
6522
  }
6442
- g.value = !0;
6443
- }, It = (e) => {
6523
+ k.value = !0;
6524
+ }, Wt = (e) => {
6444
6525
  try {
6445
6526
  let t = typeof e == "string" ? JSON.parse(e) : e;
6446
- Re && Re(t);
6527
+ Je && Je(t);
6447
6528
  } catch (e) {
6448
6529
  console.error("Version apply error:", e);
6449
6530
  }
6450
6531
  };
6451
6532
  return h(() => {
6452
- At().then(() => {
6453
- if (s.query.collab === "1") {
6454
- R.value = !0, ee();
6455
- let e = E(() => O.isSynced.value, (t) => {
6456
- t && (e(), O.checkCollaborationClosed() && (O.disconnect(), R.value = !1, L.value = !1, P.warning("该协作已关闭,无法加入")));
6533
+ Lt().then(() => {
6534
+ if (u.query.collab === "1") {
6535
+ G.value = !0, le();
6536
+ let e = E(() => L.isSynced.value, (t) => {
6537
+ t && (e(), L.checkCollaborationClosed() && (L.disconnect(), G.value = !1, W.value = !1, P.warning("该协作已关闭,无法加入")));
6457
6538
  });
6458
- O.isSynced.value && O.checkCollaborationClosed() && (O.disconnect(), R.value = !1, L.value = !1, P.warning("该协作已关闭,无法加入"));
6539
+ L.isSynced.value && L.checkCollaborationClosed() && (L.disconnect(), G.value = !1, W.value = !1, P.warning("该协作已关闭,无法加入"));
6459
6540
  }
6460
6541
  });
6461
- }), (t, n) => {
6462
- let o = x("el-icon"), s = x("el-button"), l = x("el-input");
6463
- return _(), i("div", so, [
6464
- a("div", co, [a("div", lo, [
6465
- c(s, {
6542
+ }), (t, o) => {
6543
+ let s = x("el-icon"), l = x("el-button"), u = x("el-input");
6544
+ return _(), i("div", co, [
6545
+ a("div", lo, [a("div", uo, [
6546
+ v.value.backButton === "hide" ? r("", !0) : (_(), n(l, {
6547
+ key: 0,
6466
6548
  size: "small",
6467
6549
  circle: "",
6468
- onClick: jt
6550
+ disabled: v.value.backButton === "disable",
6551
+ onClick: Rt
6469
6552
  }, {
6470
- default: D(() => [c(o, null, {
6553
+ default: D(() => [c(s, null, {
6471
6554
  default: D(() => [c(C(z))]),
6472
6555
  _: 1
6473
6556
  })]),
6474
6557
  _: 1
6475
- }),
6476
- c(l, {
6558
+ }, 8, ["disabled"])),
6559
+ c(u, {
6477
6560
  modelValue: C($),
6478
- "onUpdate:modelValue": n[0] ||= (e) => d($) ? $.value = e : null,
6561
+ "onUpdate:modelValue": o[0] ||= (e) => d($) ? $.value = e : null,
6479
6562
  size: "small",
6480
6563
  class: "title-input",
6481
6564
  placeholder: "流程图标题 *",
6482
- disabled: R.value
6565
+ disabled: G.value || !v.value.titleEditable
6483
6566
  }, null, 8, ["modelValue", "disabled"]),
6484
- c(l, {
6485
- modelValue: W.value,
6486
- "onUpdate:modelValue": n[1] ||= (e) => W.value = e,
6567
+ c(u, {
6568
+ modelValue: Y.value,
6569
+ "onUpdate:modelValue": o[1] ||= (e) => Y.value = e,
6487
6570
  size: "small",
6488
6571
  class: "user-name-input",
6489
- placeholder: "用户名称 *"
6490
- }, null, 8, ["modelValue"])
6491
- ]), a("div", uo, [!R.value && C(O).peers.value.length > 0 ? (_(), i("div", fo, [(_(!0), i(e, null, b(C(O).peers.value.slice(0, 5), (e) => (_(), i("div", {
6572
+ placeholder: "用户名称 *",
6573
+ disabled: !v.value.authorEditable
6574
+ }, null, 8, ["modelValue", "disabled"])
6575
+ ]), a("div", fo, [!G.value && C(L).peers.value.length > 0 ? (_(), i("div", po, [(_(!0), i(e, null, b(C(L).peers.value.slice(0, 5), (e) => (_(), i("div", {
6492
6576
  key: e.clientId,
6493
6577
  class: "collab-avatar",
6494
6578
  style: m({ background: e.color }),
6495
6579
  title: e.name
6496
- }, S(e.name?.charAt(0)), 13, po))), 128)), C(O).peers.value.length > 5 ? (_(), i("span", mo, "+" + S(C(O).peers.value.length - 5), 1)) : r("", !0)])) : r("", !0), c(s, {
6580
+ }, S(e.name?.charAt(0)), 13, mo))), 128)), C(L).peers.value.length > 5 ? (_(), i("span", ho, "+" + S(C(L).peers.value.length - 5), 1)) : r("", !0)])) : r("", !0), c(l, {
6497
6581
  size: "small",
6498
6582
  circle: "",
6499
- type: p.value ? "primary" : "default",
6500
- onClick: n[2] ||= (e) => p.value = !p.value,
6583
+ type: O.value ? "primary" : "default",
6584
+ onClick: o[2] ||= (e) => O.value = !O.value,
6501
6585
  title: "AI助手"
6502
6586
  }, {
6503
- default: D(() => [c(o, null, {
6587
+ default: D(() => [c(s, null, {
6504
6588
  default: D(() => [c(C(K))]),
6505
6589
  _: 1
6506
6590
  })]),
6507
6591
  _: 1
6508
6592
  }, 8, ["type"])])]),
6509
- a("div", ho, [
6510
- c(Bt, {
6511
- NODE_TYPES: C(ie),
6512
- "diagram-type-label": Ke.value,
6513
- "type-disabled": R.value,
6514
- onSetType: at
6593
+ a("div", go, [
6594
+ c(Vt, {
6595
+ NODE_TYPES: C(fe),
6596
+ "diagram-type-label": $e.value,
6597
+ "type-disabled": G.value,
6598
+ "show-type-selector": v.value.showTypeSelector,
6599
+ onSetType: ft
6515
6600
  }, null, 8, [
6516
6601
  "NODE_TYPES",
6517
6602
  "diagram-type-label",
6518
- "type-disabled"
6603
+ "type-disabled",
6604
+ "show-type-selector"
6519
6605
  ]),
6520
- a("div", go, [c(Xt, {
6521
- "animation-playing": F.value,
6522
- "can-undo": C(ye).length > 0,
6523
- "can-redo": C(be).length > 0,
6524
- disabled: R.value,
6525
- "is-collaborating": L.value,
6526
- "is-joined-collab": R.value,
6527
- onAddSwimlane: gt,
6528
- onUndo: C(xe),
6529
- onRedo: C(Se),
6530
- onAutoLayout: C(ze),
6531
- onToggleAnimation: n[3] ||= (e) => F.value = !F.value,
6532
- onSetAnimationSpeed: n[4] ||= (e) => I.value = e,
6533
- onExport: bt,
6534
- onImportJson: Dt,
6535
- onClear: C(Me),
6536
- onSetTemplate: ot,
6537
- onStartCollab: ee,
6538
- onStopCollab: Z,
6539
- onShareCollab: re,
6540
- onSave: kt,
6541
- "show-history": !!U.value,
6542
- onHistory: Ft
6606
+ a("div", _o, [c(Zt, {
6607
+ "animation-playing": H.value,
6608
+ "can-undo": C(Ee).length > 0,
6609
+ "can-redo": C(De).length > 0,
6610
+ disabled: G.value,
6611
+ "is-collaborating": W.value,
6612
+ "is-joined-collab": G.value,
6613
+ "show-template-selector": v.value.showTemplateSelector,
6614
+ onAddSwimlane: Ct,
6615
+ onUndo: C(Oe),
6616
+ onRedo: C(ke),
6617
+ onAutoLayout: C(Ye),
6618
+ onToggleAnimation: o[3] ||= (e) => H.value = !H.value,
6619
+ onSetAnimationSpeed: o[4] ||= (e) => U.value = e,
6620
+ onExport: Dt,
6621
+ onImportJson: Pt,
6622
+ onClear: C(ze),
6623
+ onSetTemplate: pt,
6624
+ onStartCollab: le,
6625
+ onStopCollab: ue,
6626
+ onShareCollab: de,
6627
+ onSave: It,
6628
+ "show-history": !!J.value,
6629
+ onHistory: Ut
6543
6630
  }, null, 8, [
6544
6631
  "animation-playing",
6545
6632
  "can-undo",
@@ -6547,47 +6634,48 @@ ${Tt(e)}
6547
6634
  "disabled",
6548
6635
  "is-collaborating",
6549
6636
  "is-joined-collab",
6637
+ "show-template-selector",
6550
6638
  "onUndo",
6551
6639
  "onRedo",
6552
6640
  "onAutoLayout",
6553
6641
  "onClear",
6554
6642
  "show-history"
6555
- ]), c(Fi, {
6643
+ ]), c(Ii, {
6556
6644
  ref_key: "canvasRef",
6557
- ref: A,
6558
- nodes: C(se),
6559
- edges: C(ce),
6560
- swimlanes: C(le),
6561
- "selected-node-id": C(ue),
6562
- "selected-edge-id": C(de),
6563
- "selected-swimlane-id": C(fe),
6564
- "selected-lane-id": Je.value,
6565
- "connect-mode": C(he),
6566
- "connect-source": C(ge),
6567
- "animation-playing": F.value,
6568
- theme: C(ve),
6569
- onSelectNode: C(Ne),
6570
- onSelectEdge: C(Pe),
6571
- onSelectSwimlane: n[5] ||= (e) => fe.value = e,
6572
- onSelectLane: Qe,
6573
- onUpdateSwimlane: $e,
6574
- onUpdateLane: et,
6575
- onResizeSwimlane: tt,
6576
- onResizeLane: rt,
6577
- onMoveSwimlane: it,
6578
- onSelectCanvas: Xe,
6579
- "auto-connect-source": q.value,
6580
- "auto-connect-mode": J.value,
6581
- onStartConnect: lt,
6582
- onEndConnect: dt,
6583
- onAutoConnectStart: ut,
6584
- onNodeDrag: ft,
6585
- onNodeResize: mt,
6586
- onNodeDragEnd: pt,
6587
- onNodeResizeEnd: ht,
6588
- onDropNode: ct,
6589
- onResetState: Ze,
6590
- onFitView: yt
6645
+ ref: B,
6646
+ nodes: C(Z),
6647
+ edges: C(he),
6648
+ swimlanes: C(ge),
6649
+ "selected-node-id": C(_e),
6650
+ "selected-edge-id": C(Q),
6651
+ "selected-swimlane-id": C(ye),
6652
+ "selected-lane-id": tt.value,
6653
+ "connect-mode": C(Se),
6654
+ "connect-source": C(Ce),
6655
+ "animation-playing": H.value,
6656
+ theme: C(Te),
6657
+ onSelectNode: C(Be),
6658
+ onSelectEdge: C(Ue),
6659
+ onSelectSwimlane: o[5] ||= (e) => ye.value = e,
6660
+ onSelectLane: ot,
6661
+ onUpdateSwimlane: st,
6662
+ onUpdateLane: ct,
6663
+ onResizeSwimlane: lt,
6664
+ onResizeLane: ut,
6665
+ onMoveSwimlane: dt,
6666
+ onSelectCanvas: it,
6667
+ "auto-connect-source": X.value,
6668
+ "auto-connect-mode": oe.value,
6669
+ onStartConnect: gt,
6670
+ onEndConnect: vt,
6671
+ onAutoConnectStart: _t,
6672
+ onNodeDrag: yt,
6673
+ onNodeResize: xt,
6674
+ onNodeDragEnd: bt,
6675
+ onNodeResizeEnd: St,
6676
+ onDropNode: ht,
6677
+ onResetState: at,
6678
+ onFitView: Et
6591
6679
  }, null, 8, [
6592
6680
  "nodes",
6593
6681
  "edges",
@@ -6605,23 +6693,23 @@ ${Tt(e)}
6605
6693
  "auto-connect-source",
6606
6694
  "auto-connect-mode"
6607
6695
  ])]),
6608
- c(oo, {
6609
- "selected-node": C(pe),
6610
- "selected-edge": C(me),
6611
- "selected-swimlane": qe.value,
6612
- "selected-lane": Ye.value,
6613
- NODE_TYPES: C(ie),
6614
- ANIMATION_TYPES: C(ae),
6615
- LINE_STYLES: C(oe),
6616
- "current-theme": C(ve),
6617
- onDeleteNode: n[6] ||= (e) => C(pe) && C(ke)(C(pe).id),
6618
- onDeleteEdge: n[7] ||= (e) => C(me) && C(Ae)(C(me).id),
6619
- onDeleteSwimlane: n[8] ||= (e) => qe.value && C(je)(qe.value.id),
6620
- onBringFront: n[9] ||= (e) => C(pe) && C(Fe)(C(pe).id),
6621
- onSendBack: n[10] ||= (e) => C(pe) && C(Ie)(C(pe).id),
6622
- onAddLane: _t,
6623
- onUpdateLane: vt,
6624
- onChangeTheme: st
6696
+ c(so, {
6697
+ "selected-node": C(be),
6698
+ "selected-edge": C(xe),
6699
+ "selected-swimlane": et.value,
6700
+ "selected-lane": nt.value,
6701
+ NODE_TYPES: C(fe),
6702
+ ANIMATION_TYPES: C(pe),
6703
+ LINE_STYLES: C(me),
6704
+ "current-theme": C(Te),
6705
+ onDeleteNode: o[6] ||= (e) => C(be) && C(Ie)(C(be).id),
6706
+ onDeleteEdge: o[7] ||= (e) => C(xe) && C(Le)(C(xe).id),
6707
+ onDeleteSwimlane: o[8] ||= (e) => et.value && C(Re)(et.value.id),
6708
+ onBringFront: o[9] ||= (e) => C(be) && C(We)(C(be).id),
6709
+ onSendBack: o[10] ||= (e) => C(be) && C(Ke)(C(be).id),
6710
+ onAddLane: wt,
6711
+ onUpdateLane: Tt,
6712
+ onChangeTheme: mt
6625
6713
  }, null, 8, [
6626
6714
  "selected-node",
6627
6715
  "selected-edge",
@@ -6635,25 +6723,25 @@ ${Tt(e)}
6635
6723
  ]),
6636
6724
  a("input", {
6637
6725
  ref_key: "fileInput",
6638
- ref: j,
6726
+ ref: V,
6639
6727
  type: "file",
6640
6728
  accept: ".json",
6641
6729
  style: { display: "none" },
6642
- onChange: Ot
6730
+ onChange: Ft
6643
6731
  }, null, 544),
6644
- c(Be, {
6645
- visible: p.value,
6646
- messages: C(w).messages.value,
6647
- loading: C(w).loading.value,
6648
- "is-collab": C(w).isCollabMode.value,
6649
- "collab-users": C(w).collabUsers.value,
6650
- "current-user": C(w).currentUser.value,
6651
- "is-owner": !R.value,
6652
- onSend: Nt,
6653
- onClose: n[11] ||= (e) => p.value = !1,
6654
- "unread-mention": C(w).unreadMention.value,
6655
- onClearUnread: n[12] ||= (e) => C(w).clearUnreadMention(),
6656
- onClear: Pt
6732
+ c(Ve, {
6733
+ visible: O.value,
6734
+ messages: C(j).messages.value,
6735
+ loading: C(j).loading.value,
6736
+ "is-collab": C(j).isCollabMode.value,
6737
+ "collab-users": C(j).collabUsers.value,
6738
+ "current-user": C(j).currentUser.value,
6739
+ "is-owner": !G.value,
6740
+ onSend: Bt,
6741
+ onClose: o[11] ||= (e) => O.value = !1,
6742
+ "unread-mention": C(j).unreadMention.value,
6743
+ onClearUnread: o[12] ||= (e) => C(j).clearUnreadMention(),
6744
+ onClear: Ht
6657
6745
  }, null, 8, [
6658
6746
  "visible",
6659
6747
  "messages",
@@ -6664,16 +6752,16 @@ ${Tt(e)}
6664
6752
  "is-owner",
6665
6753
  "unread-mention"
6666
6754
  ]),
6667
- c(nt, {
6668
- modelValue: g.value,
6669
- "onUpdate:modelValue": n[13] ||= (e) => g.value = e,
6670
- "document-id": U.value,
6671
- onApply: It
6755
+ c(rt, {
6756
+ modelValue: k.value,
6757
+ "onUpdate:modelValue": o[13] ||= (e) => k.value = e,
6758
+ "document-id": J.value,
6759
+ onApply: Wt
6672
6760
  }, null, 8, ["modelValue", "document-id"])
6673
6761
  ]);
6674
6762
  };
6675
6763
  }
6676
- }, [["__scopeId", "data-v-8ecfadf7"]]), yo = l({
6764
+ }, [["__scopeId", "data-v-1f3850ad"]]), bo = l({
6677
6765
  name: "YourCompanyDiagram",
6678
6766
  props: {
6679
6767
  docId: {
@@ -6684,6 +6772,14 @@ ${Tt(e)}
6684
6772
  type: String,
6685
6773
  default: "/api"
6686
6774
  },
6775
+ saveApi: {
6776
+ type: [String, Function],
6777
+ default: null
6778
+ },
6779
+ loadApi: {
6780
+ type: [String, Function],
6781
+ default: null
6782
+ },
6687
6783
  wsUrl: {
6688
6784
  type: String,
6689
6785
  default: ""
@@ -6699,14 +6795,18 @@ ${Tt(e)}
6699
6795
  roomId: {
6700
6796
  type: String,
6701
6797
  default: ""
6798
+ },
6799
+ uiConfig: {
6800
+ type: Object,
6801
+ default: () => ({})
6702
6802
  }
6703
6803
  },
6704
6804
  setup(e, { slots: t }) {
6705
6805
  return () => u("div", {
6706
6806
  class: "yourcompany-diagram-wrapper",
6707
6807
  style: "position:relative"
6708
- }, [u(vo, { ...e }), u(j)]);
6808
+ }, [u(yo, { ...e }), u(j)]);
6709
6809
  }
6710
6810
  });
6711
6811
  //#endregion
6712
- export { yo as default };
6812
+ export { bo as default };