ss-component-new 1.2.9 → 1.2.11

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.
Files changed (117) hide show
  1. package/dist/{animationData-1jRSDcwE.js → animationData-C_gV7XAN.js} +16 -16
  2. package/dist/animationData-CyP8-u7i.cjs +1 -0
  3. package/dist/array-A59WrroX.js +1207 -0
  4. package/dist/array-BtZq8qON.cjs +11 -0
  5. package/dist/index-2nEz-J89.js +24 -0
  6. package/dist/{index-CQAvn30B.cjs → index-7eyGTvr0.cjs} +1 -1
  7. package/dist/{index-DNm5s2Lm.cjs → index-Adqs5vHH.cjs} +1 -1
  8. package/dist/{index-fMxLuU_H.js → index-B7g38Yte.js} +2 -2
  9. package/dist/{index-Cyk0Tzhx.cjs → index-B9OZcnHm.cjs} +13 -13
  10. package/dist/index-BAOnUk_J.cjs +1 -0
  11. package/dist/{index-B1NmIRwn.js → index-BDaeo6qO.js} +2 -2
  12. package/dist/{index-L3WHrdzB.cjs → index-BJBNtx2b.cjs} +1 -1
  13. package/dist/{index-cA_EynOM.js → index-BMYtLkw8.js} +4 -4
  14. package/dist/{index-Dfhvay-Y.js → index-BQ4Rjf8F.js} +6 -6
  15. package/dist/{index-BQdJqnJf.cjs → index-BUUEqGRN.cjs} +1 -1
  16. package/dist/{index-CgtkRkQ3.js → index-B_ZGJtId.js} +1 -1
  17. package/dist/{index-C2aGGJxk.cjs → index-B_mFQujY.cjs} +1 -1
  18. package/dist/{index-lyUWApVE.js → index-BbI9_JbX.js} +32 -48
  19. package/dist/index-BeYNgEHV.js +144 -0
  20. package/dist/{index-CKHNyMzP.js → index-BwjuTBrR.js} +1 -1
  21. package/dist/{index-Ci_C9h8v.js → index-C-c1pt-2.js} +1 -1
  22. package/dist/{index-DbisH6iI.cjs → index-C40ofXP7.cjs} +1 -1
  23. package/dist/{index-CvrTrN91.js → index-C461j30b.js} +1 -1
  24. package/dist/{index-1vs_3Pz3.cjs → index-C5gPrwPs.cjs} +1 -1
  25. package/dist/{index-Duqrg0DV.cjs → index-C68Hri2v.cjs} +1 -1
  26. package/dist/{index-Djagy2ww.cjs → index-CAewC69j.cjs} +1 -1
  27. package/dist/index-CApZYDIm.cjs +1 -0
  28. package/dist/{index-BWECkG4C.js → index-CKLBlQoK.js} +2122 -2129
  29. package/dist/{index-BaOQV1JK.cjs → index-CKt6cj9f.cjs} +1 -1
  30. package/dist/index-CN29uy_G.js +7293 -0
  31. package/dist/{index-B--6DX0M.js → index-CRiovRyR.js} +2 -2
  32. package/dist/index-CTRmgnKQ.js +2643 -0
  33. package/dist/{index-DWfuOOVD.js → index-CVDv-Zz-.js} +1012 -1009
  34. package/dist/index-CVadHkfS.cjs +1 -0
  35. package/dist/{index-DbzvXPKu.js → index-CYp77kPp.js} +175 -175
  36. package/dist/{index-DGE2awa5.js → index-CjB5ZP_P.js} +2 -2
  37. package/dist/{index-D9wa1LMS.js → index-CkA2IZJB.js} +5 -5
  38. package/dist/{index-fzCcjoGJ.js → index-CoVAbxHN.js} +1 -1
  39. package/dist/index-CwhX2vaq.cjs +1 -0
  40. package/dist/{index-BkrJ0cBf.js → index-D4CVC2Sk.js} +4 -4
  41. package/dist/{index-BzOBvH4x.cjs → index-D55zzS4D.cjs} +1 -1
  42. package/dist/{index-C_MIoNOd.cjs → index-D5ShC3zu.cjs} +1 -1
  43. package/dist/{index-BxftyAcm.cjs → index-D9l1Z4TO.cjs} +1 -1
  44. package/dist/index-DDhAMgrO.js +22 -0
  45. package/dist/{index-CXbvmuYZ.cjs → index-DGBDGLOK.cjs} +1 -1
  46. package/dist/{index-D732VV-0.js → index-DHQH1rlQ.js} +2 -2
  47. package/dist/{index-LjRfbvxs.js → index-DJMHw-xb.js} +11 -11
  48. package/dist/index-DP7rcz4I.cjs +1 -0
  49. package/dist/{index-y1YK6w8c.js → index-DQZ_oAyj.js} +6 -6
  50. package/dist/{index-CVfC3cyK.js → index-DTkAIcvV.js} +13 -13
  51. package/dist/{index-pkxiNiXI.js → index-DfKkN76b.js} +3 -3
  52. package/dist/{index-BFl4mw2K.cjs → index-DkG4A3iE.cjs} +1 -1
  53. package/dist/{index-pleSKUL2.cjs → index-DnU2slQv.cjs} +1 -1
  54. package/dist/{index-sS7-HQlI.cjs → index-DsQ-qtQ9.cjs} +1 -1
  55. package/dist/index-Dwr4RHei.cjs +1 -0
  56. package/dist/{index-BDVOKqI5.js → index-ESNVepXU.js} +6 -6
  57. package/dist/{index-CxbH4zmS.js → index-H_3u1NA_.js} +24 -24
  58. package/dist/{index-wpD5_HUA.cjs → index-QkDZ18PI.cjs} +1 -1
  59. package/dist/index-RVDLy1iy.cjs +1 -0
  60. package/dist/{index-Dcd9HZXq.js → index-ecVCII_e.js} +5 -5
  61. package/dist/{index-BsPQl6nI.cjs → index-i50hp6po.cjs} +1 -1
  62. package/dist/{index-BlZXanJX.js → index-qu3KI1yZ.js} +5 -5
  63. package/dist/{index-BxL4p0ej.cjs → index-t6--MDLB.cjs} +1 -1
  64. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DkSoLqEi.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BRxOMo6y.js} +8749 -8765
  65. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-hGi9c2Ju.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Dwdjsitu.cjs} +108 -108
  66. package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-B5nxyyO7.cjs → index.vue_vue_type_style_index_0_scoped_92477073_lang-DfqsvuRy.cjs} +1 -1
  67. package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-BfcynI3w.js → index.vue_vue_type_style_index_0_scoped_92477073_lang-e_PTrAf6.js} +6 -6
  68. package/dist/index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-7HSISF9c.cjs +56 -0
  69. package/dist/index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-BqmMCEyN.js +37436 -0
  70. package/dist/{index.vue_vue_type_style_index_1_lang-Bmq_QiXo.js → index.vue_vue_type_style_index_1_lang-CsY5rIO4.js} +3 -3
  71. package/dist/{index.vue_vue_type_style_index_1_lang-B_ESWhzz.cjs → index.vue_vue_type_style_index_1_lang-DOjFqzi3.cjs} +1 -1
  72. package/dist/index.vue_vue_type_style_index_1_lang-DQUFi_Vi.cjs +32 -0
  73. package/dist/index.vue_vue_type_style_index_1_lang-Ds1cd7yg.js +7806 -0
  74. package/dist/{isString-CZMLuMzD.js → isString-BNK38WbE.js} +1 -1
  75. package/dist/{main-YbBj49yf.cjs → main-CVaemyhm.cjs} +1 -1
  76. package/dist/{main-CSTH0D6W.js → main-DIbH2rlN.js} +5 -5
  77. package/dist/ss-component.cjs +1 -1
  78. package/dist/ss-component.css +2 -2
  79. package/dist/ss-component.js +11 -11
  80. package/dist/ss-component2.cjs +1 -1
  81. package/dist/ss-component2.js +12 -12
  82. package/dist/{threeLatheView-BmVBnC8n.js → threeLatheView-Bp0kjo_V.js} +2 -2
  83. package/dist/{threeModel-Xb9BSJ_k.js → threeModel-27sl0tTS.js} +3 -3
  84. package/dist/{threeModel-nbfSsMNt.cjs → threeModel-C0Jdw2O3.cjs} +1 -1
  85. package/dist/{threePreview-CYX5wKoL.js → threePreview-DFFjm93P.js} +1 -1
  86. package/dist/threeSceneView-CEpBvJSV.cjs +5 -0
  87. package/dist/threeSceneView-ZDXqO8ZA.js +1413 -0
  88. package/dist/{threeSceneViewForCPMPIP-CT63Js8f.cjs → threeSceneViewForCPMPIP-B0VPmBWd.cjs} +3 -3
  89. package/dist/{threeSceneViewForCPMPIP-skA3ZWC-.js → threeSceneViewForCPMPIP-BPPWM68P.js} +83 -84
  90. package/dist/{threeViewerHost-Enxz60zh.js → threeViewerHost-CKE2a4PV.js} +65 -78
  91. package/dist/threeViewerHost-yHvsk7TK.cjs +1 -0
  92. package/dist/useRayCaster-1DNcSYPR.cjs +1 -0
  93. package/dist/{useRayCaster-CQ61IQT5.js → useRayCaster-BM9XKGKx.js} +3 -3
  94. package/package.json +1 -1
  95. package/dist/animationData-BQdcO65E.cjs +0 -1
  96. package/dist/array-BI6c3lN7.cjs +0 -11
  97. package/dist/array-BivICFct.js +0 -1142
  98. package/dist/index-BBVbSXk-.cjs +0 -1
  99. package/dist/index-BM6YLczV.js +0 -2567
  100. package/dist/index-BSa3xW1H.js +0 -158
  101. package/dist/index-C9gh-jny.js +0 -7211
  102. package/dist/index-CA-edgmV.js +0 -3370
  103. package/dist/index-CIv0zRrQ.cjs +0 -1
  104. package/dist/index-DW7I4GY6.cjs +0 -1
  105. package/dist/index-DdFUblTC.cjs +0 -1
  106. package/dist/index-Dy3FE211.cjs +0 -1
  107. package/dist/index-YMD55UlA.cjs +0 -1
  108. package/dist/index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-86_u8ovk.js +0 -34129
  109. package/dist/index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-dAkBFPF0.cjs +0 -56
  110. package/dist/index.vue_vue_type_style_index_1_lang-Bl5IzVKi.js +0 -8126
  111. package/dist/index.vue_vue_type_style_index_1_lang-Cb3WPLY1.cjs +0 -32
  112. package/dist/isUndefined-ClRzgwTy.cjs +0 -1
  113. package/dist/isUndefined-chfCDxUU.js +0 -84
  114. package/dist/threeSceneView-BLWTfaec.js +0 -1472
  115. package/dist/threeSceneView-JPxH8xcz.cjs +0 -5
  116. package/dist/threeViewerHost-UHWY3q2v.cjs +0 -1
  117. package/dist/useRayCaster-CvOiIyjA.cjs +0 -1
@@ -1,46 +1,34 @@
1
- import { computed as _, defineComponent as $, defineAsyncComponent as S, ref as M, watch as G, createElementBlock as B, openBlock as y, normalizeClass as j, createBlock as b, createCommentVNode as L, unref as P } from "vue";
2
- import { a as R, bY as Y, p as I, s as O } from "./index-DbzvXPKu.js";
3
- import { u as H } from "./index.vue_vue_type_style_index_1_lang-Bl5IzVKi.js";
4
- import "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DkSoLqEi.js";
1
+ import { computed as _, defineComponent as z, defineAsyncComponent as S, ref as A, watch as G, createElementBlock as M, openBlock as E, normalizeClass as j, createBlock as b, createCommentVNode as B, unref as P } from "vue";
2
+ import { a as L, b$ as Y, p as I, s as O } from "./index-CYp77kPp.js";
3
+ import { u as H } from "./index.vue_vue_type_style_index_1_lang-Ds1cd7yg.js";
4
+ import "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BRxOMo6y.js";
5
5
  import { _ as q } from "./_plugin-vue_export-helper-CHgC5LLL.js";
6
- function se(c) {
7
- const f = sessionStorage.getItem("loginToken") ?? "123456";
8
- return R({
6
+ function se(u) {
7
+ const d = sessionStorage.getItem("loginToken") ?? "123456";
8
+ return L({
9
9
  url: "/api/sysFile/uploadFile",
10
10
  method: "post",
11
- data: c,
11
+ data: u,
12
12
  headers: {
13
- Authorization: f,
13
+ Authorization: d,
14
14
  "Content-Type": "multipart/form-data"
15
15
  }
16
16
  });
17
17
  }
18
- function J(c) {
19
- const f = sessionStorage.getItem("loginToken") ?? "123456";
20
- return R({
18
+ function J(u) {
19
+ const d = sessionStorage.getItem("loginToken") ?? "123456";
20
+ return L({
21
21
  url: "/api/sysFile/downloadFile",
22
22
  method: "post",
23
- data: c,
23
+ data: u,
24
24
  headers: {
25
- Authorization: f,
25
+ Authorization: d,
26
26
  Accept: "application/octet-stream"
27
27
  // 明确要求返回二进制流
28
28
  },
29
29
  responseType: "blob"
30
30
  });
31
31
  }
32
- function ie(c) {
33
- const f = sessionStorage.getItem("loginToken") ?? "123456";
34
- return R({
35
- url: "/api/sysFile/uploadFiles",
36
- method: "post",
37
- data: c,
38
- headers: {
39
- Authorization: f,
40
- "Content-Type": "multipart/form-data"
41
- }
42
- });
43
- }
44
32
  const K = Y("threeState", {
45
33
  state: () => ({
46
34
  data: {
@@ -52,8 +40,8 @@ const K = Y("threeState", {
52
40
  }
53
41
  }),
54
42
  actions: {
55
- setData(c) {
56
- this.data = c;
43
+ setData(u) {
44
+ this.data = u;
57
45
  },
58
46
  getData() {
59
47
  return this.data;
@@ -61,47 +49,47 @@ const K = Y("threeState", {
61
49
  }
62
50
  });
63
51
  function Q() {
64
- const c = H(I), { platform: f } = O(c), h = K(I), g = _(() => {
52
+ const u = H(I), { platform: d } = O(u), h = K(I), D = _(() => {
65
53
  var e;
66
54
  return (e = h == null ? void 0 : h.data) == null ? void 0 : e.extension;
67
- }), p = ["uv", "cpt", "cyd"], T = ["urdf"], o = ["obj", "stl"], n = [...p, ...T, ...o], D = (e) => {
68
- if (!E())
55
+ }), f = ["uv", "cpt", "cyd"], T = ["urdf"], o = ["obj", "stl"], n = [...f, ...T, ...o], U = (e) => {
56
+ if (!y())
69
57
  throw new Error("不是三维系统");
70
58
  h.setData(e);
71
- }, m = () => h.getData(), E = () => f.value === "three", l = (e) => {
59
+ }, p = () => h.getData(), y = () => d.value === "three", c = (e) => {
72
60
  const s = e == null ? void 0 : e.toLowerCase(), i = s == null ? void 0 : s.lastIndexOf(".");
73
- let d = s;
74
- return i >= 0 && (d = d == null ? void 0 : d.slice(i + 1)), d;
75
- }, F = (e) => {
61
+ let m = s;
62
+ return i >= 0 && (m = m == null ? void 0 : m.slice(i + 1)), m;
63
+ }, w = (e) => {
76
64
  if (!e)
77
65
  return !1;
78
- const s = l(e);
66
+ const s = c(e);
79
67
  return n == null ? void 0 : n.includes(s);
80
68
  };
81
69
  return {
82
- getData: m,
83
- setData: D,
84
- isThreeSystem: E,
70
+ getData: p,
71
+ setData: U,
72
+ isThreeSystem: y,
85
73
  isUrdf: (e) => {
86
74
  if (!e)
87
75
  return !1;
88
- const s = l(e);
76
+ const s = c(e);
89
77
  return T == null ? void 0 : T.includes(s);
90
78
  },
91
79
  isGeneralFile: (e) => {
92
80
  if (!e)
93
81
  return !1;
94
- const s = l(e);
82
+ const s = c(e);
95
83
  return o == null ? void 0 : o.includes(s);
96
84
  },
97
85
  isTrackPathFile: (e) => {
98
86
  if (!e)
99
87
  return !1;
100
- const s = l(e);
101
- return p == null ? void 0 : p.includes(s);
88
+ const s = c(e);
89
+ return f == null ? void 0 : f.includes(s);
102
90
  },
103
- isThreeFile: F,
104
- isUseBackdrop: (e) => E() && F(e),
91
+ isThreeFile: w,
92
+ isUseBackdrop: (e) => y() && w(e),
105
93
  initTrackFileType: (e) => {
106
94
  if (!e)
107
95
  return {
@@ -109,21 +97,21 @@ function Q() {
109
97
  isCyd: !1,
110
98
  isUv: !1
111
99
  };
112
- const s = l(e), i = p == null ? void 0 : p.find((k) => k === s);
100
+ const s = c(e), i = f == null ? void 0 : f.find((k) => k === s);
113
101
  return {
114
102
  isCpt: i === "cpt",
115
103
  isCyd: i === "cyd",
116
104
  isUv: i === "uv"
117
105
  };
118
106
  },
119
- getFileExtension: l,
120
- extraExtension: g
107
+ getFileExtension: c,
108
+ extraExtension: D
121
109
  };
122
110
  }
123
111
  const X = {
124
112
  key: 4,
125
113
  class: "loading"
126
- }, Z = /* @__PURE__ */ $({
114
+ }, Z = /* @__PURE__ */ z({
127
115
  __name: "threeViewerHost",
128
116
  props: {
129
117
  fileUrls: { default: () => [] },
@@ -136,8 +124,8 @@ const X = {
136
124
  componentType: {}
137
125
  },
138
126
  emits: ["getThreeData"],
139
- setup(c, { emit: f }) {
140
- const h = S(() => import("./threeSceneView-BLWTfaec.js")), g = S(() => import("./threePreview-CYX5wKoL.js")), p = S(() => import("./threeLatheView-BmVBnC8n.js")), T = S(() => import("./threeSceneViewForCPMPIP-skA3ZWC-.js")), o = {
127
+ setup(u, { emit: d }) {
128
+ const h = S(() => import("./threeSceneView-ZDXqO8ZA.js")), D = S(() => import("./threePreview-DFFjm93P.js")), f = S(() => import("./threeLatheView-Bp0kjo_V.js")), T = S(() => import("./threeSceneViewForCPMPIP-BPPWM68P.js")), o = {
141
129
  ROBOT_SCENE: "robot",
142
130
  // 机器人场景
143
131
  LATHE_SCENE: "latheScene",
@@ -146,7 +134,7 @@ const X = {
146
134
  // 重大专项场景
147
135
  PREVIEW: "preview"
148
136
  // 预览模式
149
- }, n = c, D = H(I), { platName: m } = O(D), { isGeneralFile: E, isUrdf: l, isTrackPathFile: F, extraExtension: A } = Q(), w = _(() => (n == null ? void 0 : n.extension) || A.value), U = _(() => {
137
+ }, n = u, U = H(I), { platName: p } = O(U), { isGeneralFile: y, isUrdf: c, isTrackPathFile: w, extraExtension: R } = Q(), F = _(() => (n == null ? void 0 : n.extension) || R.value), g = _(() => {
150
138
  var t, r;
151
139
  return (r = (t = n == null ? void 0 : n.threeData) == null ? void 0 : t.data) == null ? void 0 : r.trackFileType;
152
140
  }), v = _(() => {
@@ -163,24 +151,24 @@ const X = {
163
151
  return o.PREVIEW;
164
152
  }
165
153
  const t = (r = n == null ? void 0 : n.fileUrls) == null ? void 0 : r[0];
166
- return E(t) ? o.PREVIEW : (m == null ? void 0 : m.value) === "CPMPIP" && (l(t) || l(w.value)) ? o.CPMPIP_SCENE : (m == null ? void 0 : m.value) === "SFRTubeBend" && (l(t) || l(w.value)) ? o.ROBOT_SCENE : F(w.value) && U.value ? o.LATHE_SCENE : o.PREVIEW;
167
- }), N = f, e = M([]), s = M(!1);
154
+ return y(t) ? o.PREVIEW : (p == null ? void 0 : p.value) === "CPMPIP" && (c(t) || c(F.value)) ? o.CPMPIP_SCENE : (p == null ? void 0 : p.value) === "SFRTubeBend" && (c(t) || c(F.value)) ? o.ROBOT_SCENE : w(F.value) && g.value ? o.LATHE_SCENE : o.PREVIEW;
155
+ }), N = d, e = A([]), s = A(!1);
168
156
  function i(t) {
169
157
  try {
170
- const r = new URL(t).pathname, u = r.substring(r.lastIndexOf("/") + 1);
171
- return decodeURIComponent(u);
158
+ const r = new URL(t).pathname, l = r.substring(r.lastIndexOf("/") + 1);
159
+ return decodeURIComponent(l);
172
160
  } catch (r) {
173
161
  return console.error("无法解析URL以提取文件名:", t, r), "未知文件名";
174
162
  }
175
163
  }
176
- async function d(t) {
177
- let r, u;
164
+ async function m(t) {
165
+ let r, l;
178
166
  if (/^https?:\/\//.test(t))
179
167
  try {
180
168
  const a = await fetch(t);
181
169
  if (!a.ok)
182
170
  throw new Error(`下载文件失败: ${a.statusText} (URL: ${t})`);
183
- r = await a.blob(), u = i(t);
171
+ r = await a.blob(), l = i(t);
184
172
  } catch (a) {
185
173
  throw console.error("使用 fetch 下载文件时出错:", a), a;
186
174
  }
@@ -190,11 +178,11 @@ const X = {
190
178
  if (a.status !== 200)
191
179
  throw new Error(`下载失败: ${a.status}`);
192
180
  const C = a.headers["content-disposition"];
193
- u = k(C) || "无文件名", r = a.data;
181
+ l = k(C) || "无文件名", r = a.data;
194
182
  } catch (a) {
195
183
  throw console.error("通过 API 下载文件时出错:", a), a;
196
184
  }
197
- return new File([r], u, { type: r.type });
185
+ return new File([r], l, { type: r.type });
198
186
  }
199
187
  function k(t) {
200
188
  if (!t) return;
@@ -218,9 +206,9 @@ const X = {
218
206
  return a;
219
207
  }
220
208
  }
221
- const u = t.match(/filename\s*=\s*("?)([^";]+)\1/i);
222
- if (u)
223
- return u[2].trim();
209
+ const l = t.match(/filename\s*=\s*("?)([^";]+)\1/i);
210
+ if (l)
211
+ return l[2].trim();
224
212
  }
225
213
  async function x(t) {
226
214
  if (!t || !t.length) {
@@ -229,7 +217,7 @@ const X = {
229
217
  }
230
218
  s.value = !0;
231
219
  try {
232
- const r = await Promise.all(t.map((u) => d(u)));
220
+ const r = await Promise.all(t.map((l) => m(l)));
233
221
  e.value = r;
234
222
  } catch (r) {
235
223
  console.error("文件下载时发生错误:", r), e.value = [];
@@ -237,7 +225,7 @@ const X = {
237
225
  s.value = !1;
238
226
  }
239
227
  }
240
- const z = () => {
228
+ const $ = () => {
241
229
  N("getThreeData");
242
230
  };
243
231
  return G(
@@ -246,33 +234,33 @@ const X = {
246
234
  await x(t ?? []);
247
235
  },
248
236
  { immediate: !0, deep: !0 }
249
- ), (t, r) => (y(), B("div", {
237
+ ), (t, r) => (E(), M("div", {
250
238
  class: j([n.host === "electron" ? "mv-electron" : "mv-inline", "three-platform"])
251
239
  }, [
252
- v.value === o.ROBOT_SCENE ? (y(), b(P(h), {
240
+ v.value === o.ROBOT_SCENE ? (E(), b(P(h), {
253
241
  key: 0,
254
242
  "file-blobs": e.value,
255
243
  "animation-data": t.animationData,
256
- onGetThreeData: z,
244
+ onGetThreeData: $,
257
245
  threeData: n.threeData
258
- }, null, 8, ["file-blobs", "animation-data", "threeData"])) : v.value === o.LATHE_SCENE ? (y(), b(P(p), {
246
+ }, null, 8, ["file-blobs", "animation-data", "threeData"])) : v.value === o.LATHE_SCENE ? (E(), b(P(f), {
259
247
  key: 1,
260
248
  fileUrls: t.fileUrls,
261
249
  threeData: n.threeData,
262
- trackFileType: U.value
263
- }, null, 8, ["fileUrls", "threeData", "trackFileType"])) : v.value === o.CPMPIP_SCENE ? (y(), b(P(T), {
250
+ trackFileType: g.value
251
+ }, null, 8, ["fileUrls", "threeData", "trackFileType"])) : v.value === o.CPMPIP_SCENE ? (E(), b(P(T), {
264
252
  key: 2,
265
253
  "file-blobs": e.value,
266
254
  threeData: n.threeData
267
- }, null, 8, ["file-blobs", "threeData"])) : v.value === o.PREVIEW ? (y(), b(P(g), {
255
+ }, null, 8, ["file-blobs", "threeData"])) : v.value === o.PREVIEW ? (E(), b(P(D), {
268
256
  key: 3,
269
257
  "file-blobs": e.value,
270
258
  "animation-data": t.animationData
271
- }, null, 8, ["file-blobs", "animation-data"])) : L("", !0),
272
- s.value ? (y(), B("div", X, " 文件下载中,请稍候... ")) : L("", !0)
259
+ }, null, 8, ["file-blobs", "animation-data"])) : B("", !0),
260
+ s.value ? (E(), M("div", X, " 文件下载中,请稍候... ")) : B("", !0)
273
261
  ], 2));
274
262
  }
275
- }), ee = /* @__PURE__ */ q(Z, [["__scopeId", "data-v-5e37b1fe"]]), ce = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
263
+ }), ee = /* @__PURE__ */ q(Z, [["__scopeId", "data-v-5e37b1fe"]]), ie = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
276
264
  __proto__: null,
277
265
  default: ee
278
266
  }, Symbol.toStringTag, { value: "Module" }));
@@ -280,8 +268,7 @@ export {
280
268
  ee as T,
281
269
  Q as a,
282
270
  se as b,
283
- ie as c,
284
271
  J as d,
285
- ce as t,
272
+ ie as t,
286
273
  K as u
287
274
  };
@@ -0,0 +1 @@
1
+ "use strict";const t=require("vue"),m=require("./index-1z9RrjZc.cjs"),B=require("./index.vue_vue_type_style_index_1_lang-DQUFi_Vi.cjs");require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Dwdjsitu.cjs");const L=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");function O(f){const T=sessionStorage.getItem("loginToken")??"123456";return m.service({url:"/api/sysFile/uploadFile",method:"post",data:f,headers:{Authorization:T,"Content-Type":"multipart/form-data"}})}function R(f){const T=sessionStorage.getItem("loginToken")??"123456";return m.service({url:"/api/sysFile/downloadFile",method:"post",data:f,headers:{Authorization:T,Accept:"application/octet-stream"},responseType:"blob"})}const I=m.defineStore("threeState",{state:()=>({data:{extension:"",url:[],data:{},isThreeScene:!0}}),actions:{setData(f){this.data=f},getData(){return this.data}}});function A(){const f=B.useMenuState(m.pinia),{platform:T}=m.storeToRefs(f),y=I(m.pinia),F=t.computed(()=>{var e;return(e=y==null?void 0:y.data)==null?void 0:e.extension}),p=["uv","cpt","cyd"],v=["urdf"],s=["obj","stl"],o=[...p,...v,...s],P=e=>{if(!E())throw new Error("不是三维系统");y.setData(e)},d=()=>y.getData(),E=()=>T.value==="three",l=e=>{const i=e==null?void 0:e.toLowerCase(),c=i==null?void 0:i.lastIndexOf(".");let h=i;return c>=0&&(h=h==null?void 0:h.slice(c+1)),h},w=e=>{if(!e)return!1;const i=l(e);return o==null?void 0:o.includes(i)};return{getData:d,setData:P,isThreeSystem:E,isUrdf:e=>{if(!e)return!1;const i=l(e);return v==null?void 0:v.includes(i)},isGeneralFile:e=>{if(!e)return!1;const i=l(e);return s==null?void 0:s.includes(i)},isTrackPathFile:e=>{if(!e)return!1;const i=l(e);return p==null?void 0:p.includes(i)},isThreeFile:w,isUseBackdrop:e=>E()&&w(e),initTrackFileType:e=>{if(!e)return{isCpt:!1,isCyd:!1,isUv:!1};const i=l(e),c=p==null?void 0:p.find(b=>b===i);return{isCpt:c==="cpt",isCyd:c==="cyd",isUv:c==="uv"}},getFileExtension:l,extraExtension:F}}const q={key:4,class:"loading"},x=t.defineComponent({__name:"threeViewerHost",props:{fileUrls:{default:()=>[]},host:{default:"inline"},extension:{},animationData:{default:()=>({})},width:{default:"100%"},height:{default:"100%"},threeData:{},componentType:{}},emits:["getThreeData"],setup(f,{emit:T}){const y=t.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./threeSceneView-CEpBvJSV.cjs"))),F=t.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./threePreview-C_mY_TBC.cjs"))),p=t.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./threeLatheView-CZdorls1.cjs"))),v=t.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./threeSceneViewForCPMPIP-B0VPmBWd.cjs"))),s={ROBOT_SCENE:"robot",LATHE_SCENE:"latheScene",CPMPIP_SCENE:"cpmpip",PREVIEW:"preview"},o=f,P=B.useMenuState(m.pinia),{platName:d}=m.storeToRefs(P),{isGeneralFile:E,isUrdf:l,isTrackPathFile:w,extraExtension:D}=A(),S=t.computed(()=>(o==null?void 0:o.extension)||D.value),k=t.computed(()=>{var r,n;return(n=(r=o==null?void 0:o.threeData)==null?void 0:r.data)==null?void 0:n.trackFileType}),C=t.computed(()=>{var n;if(o.componentType)switch(o.componentType){case"robot":return s.ROBOT_SCENE;case"latheScene":return s.LATHE_SCENE;case"cpmpip":return s.CPMPIP_SCENE;case"preview":return s.PREVIEW}const r=(n=o==null?void 0:o.fileUrls)==null?void 0:n[0];return E(r)?s.PREVIEW:(d==null?void 0:d.value)==="CPMPIP"&&(l(r)||l(S.value))?s.CPMPIP_SCENE:(d==null?void 0:d.value)==="SFRTubeBend"&&(l(r)||l(S.value))?s.ROBOT_SCENE:w(S.value)&&k.value?s.LATHE_SCENE:s.PREVIEW}),g=T,e=t.ref([]),i=t.ref(!1);function c(r){try{const n=new URL(r).pathname,u=n.substring(n.lastIndexOf("/")+1);return decodeURIComponent(u)}catch(n){return console.error("无法解析URL以提取文件名:",r,n),"未知文件名"}}async function h(r){let n,u;if(/^https?:\/\//.test(r))try{const a=await fetch(r);if(!a.ok)throw new Error(`下载文件失败: ${a.statusText} (URL: ${r})`);n=await a.blob(),u=c(r)}catch(a){throw console.error("使用 fetch 下载文件时出错:",a),a}else try{const a=await R({url:r});if(a.status!==200)throw new Error(`下载失败: ${a.status}`);const _=a.headers["content-disposition"];u=b(_)||"无文件名",n=a.data}catch(a){throw console.error("通过 API 下载文件时出错:",a),a}return new File([n],u,{type:n.type})}function b(r){if(!r)return;const n=r.match(/filename\*\s*=\s*([^;]+)/i);if(n){let a=n[1].trim();a=a.replace(/^"(.*)"$/,"$1");const _=a.split("''");if(_.length===2){const H=_[0].toUpperCase(),U=_[1];try{if(H==="UTF-8")return decodeURIComponent(U)}catch{}return U}try{return decodeURIComponent(a)}catch{return a}}const u=r.match(/filename\s*=\s*("?)([^";]+)\1/i);if(u)return u[2].trim()}async function N(r){if(!r||!r.length){e.value=[];return}i.value=!0;try{const n=await Promise.all(r.map(u=>h(u)));e.value=n}catch(n){console.error("文件下载时发生错误:",n),e.value=[]}finally{i.value=!1}}const M=()=>{g("getThreeData")};return t.watch(()=>o.fileUrls,async r=>{await N(r??[])},{immediate:!0,deep:!0}),(r,n)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass([o.host==="electron"?"mv-electron":"mv-inline","three-platform"])},[C.value===s.ROBOT_SCENE?(t.openBlock(),t.createBlock(t.unref(y),{key:0,"file-blobs":e.value,"animation-data":r.animationData,onGetThreeData:M,threeData:o.threeData},null,8,["file-blobs","animation-data","threeData"])):C.value===s.LATHE_SCENE?(t.openBlock(),t.createBlock(t.unref(p),{key:1,fileUrls:r.fileUrls,threeData:o.threeData,trackFileType:k.value},null,8,["fileUrls","threeData","trackFileType"])):C.value===s.CPMPIP_SCENE?(t.openBlock(),t.createBlock(t.unref(v),{key:2,"file-blobs":e.value,threeData:o.threeData},null,8,["file-blobs","threeData"])):C.value===s.PREVIEW?(t.openBlock(),t.createBlock(t.unref(F),{key:3,"file-blobs":e.value,"animation-data":r.animationData},null,8,["file-blobs","animation-data"])):t.createCommentVNode("",!0),i.value?(t.openBlock(),t.createElementBlock("div",q," 文件下载中,请稍候... ")):t.createCommentVNode("",!0)],2))}}),V=L._export_sfc(x,[["__scopeId","data-v-5e37b1fe"]]),W=Object.freeze(Object.defineProperty({__proto__:null,default:V},Symbol.toStringTag,{value:"Module"}));exports.ThreeViewerHost=V;exports.downloadAvatarApi=R;exports.threeViewerHost=W;exports.uploadFile=O;exports.useThreeState=I;exports.useThreeSystem=A;
@@ -0,0 +1 @@
1
+ "use strict";var te=Object.defineProperty;var oe=(r,i,o)=>i in r?te(r,i,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[i]=o;var D=(r,i,o)=>oe(r,typeof i!="symbol"?i+"":i,o);const se=require("./index.vue_vue_type_style_index_1_lang-DOjFqzi3.cjs"),C=require("./STLLoader-RU7KqloS.cjs"),R=require("./three-viewport-gizmo-BV37JzRa.cjs"),e=require("vue"),ie=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),le={SINGLE:"单机",DOUBLE:"双机"},ne={ROBOT:1,PIPECOMPARSION:2},re="http://222.92.178.198:60000/chfs/shared/Insofrobot/urdf";function x(r){if(r==null||!isFinite(r))return"";const i=r/(1024*1024);if(i>=1)return`${i.toFixed(1)} MB`;const o=r/1024;return o>=1?`${o.toFixed(1)} KB`:`${r} B`}function ee(r){try{const i=r.split("?")[0].split("#")[0];return i.substring(i.lastIndexOf("/")+1)||i}catch{return r}}function ae(r){const{manager:i,baseFolderUrl:o,onFileProgress:l}=r,m=new se.URDFLoader(i);return m.packages=n=>`${o.endsWith("/")?o:o+"/"}${n}/`,m.loadMeshCb=(n,N,h)=>{const g=(()=>{const _=n.split("?")[0].split("#")[0],u=_.lastIndexOf(".");return u>=0?_.slice(u+1).toLowerCase():void 0})();switch(g){case"obj":{const _=(()=>{try{return new URL(".",n).toString()}catch{const c=n.lastIndexOf("/");return c>=0?n.slice(0,c+1):n}})(),u=(()=>{var v;return(((v=n.split("/").pop())==null?void 0:v.split("?")[0].split("#")[0])??"").replace(/\.[^/.?#]+$/,"")})(),f=`${_}${u}.mtl`,E=c=>{const v=new C.OBJLoader(N);c&&v.setMaterials(c),v.load(n,b=>h(b),b=>l==null?void 0:l(n,b==null?void 0:b.loaded,b==null?void 0:b.total),b=>{console.error(`[URDF 资源加载失败,已跳过] 无法加载 OBJ 模型: ${n}`,b),h(new R.Group)})},w=new C.MTLLoader(N);w.setResourcePath(_),w.load(f,c=>{try{c.preload()}catch{}E(c)},c=>l==null?void 0:l(f,c==null?void 0:c.loaded,c==null?void 0:c.total),c=>{console.warn(`[URDF 资源警告] 未找到或加载材质失败: ${f}。将尝试无材质加载。`),E(void 0)});break}case"stl":{new C.STLLoader(N).load(n,u=>{const f=new R.MeshPhongMaterial({color:12303291,shininess:30}),E=new R.Mesh(u,f);E.castShadow=!0,E.receiveShadow=!0,h(E)},u=>l==null?void 0:l(n,u==null?void 0:u.loaded,u==null?void 0:u.total),u=>{console.error(`[URDF 资源加载失败,已跳过] 无法加载 STL 模型: ${n}`,u),h(new R.Group)});break}default:console.error(`[URDF 资源加载失败,已跳过] 不支持的网格格式: .${g} (路径: ${n})`),h(new R.Group)}},m}function ce(r,i,o,l){return{loadSceneFromFile:n=>new Promise((N,h)=>{o.value=!0,l.value="正在初始化 URDF 加载器...";let g=0,_=0,u=null;const f=new R.LoadingManager;f.onStart=(w,c,v)=>{g=v||0,_=c||0,l.value=g>0?`开始下载资源: 0 / ${g}`:"开始下载资源...",o.value=!0},f.onProgress=(w,c,v)=>{_=c,g=v;const b=`正在加载 ${c} / ${v} 个文件: ${ee(w)}`;l.value=b,c===v&&(l.value="资源加载完成,正在处理模型...",setTimeout(()=>{if(u){u.updateMatrixWorld(!0);const p=new R.Box3().setFromObject(u);p.isEmpty()&&console.warn("模型加载完成,但所有可视化网格均加载失败,模型将不可见。"),u.userData.boundingBox=p,u.traverse(d=>{d.isMesh&&(d.castShadow=!0,d.receiveShadow=!0)}),N(u)}else h(new Error("URDF 文件本身加载失败。"));l.value="模型加载完成",setTimeout(()=>{l.value==="模型加载完成"&&(o.value=!1,l.value="")},500)},100))},f.onError=w=>{console.warn(`LoadingManager 报告一个资源加载失败: ${w}。加载流程将继续。`)};const E=(w,c,v)=>{const b=ee(w);let p;v&&v>0?p=`${b}(${x(c)} / ${x(v)})`:c&&c>0?p=`${b}(已下载 ${x(c)})`:p=`${b}`,l.value=`正在下载第 ${_+1} / ${g} 个文件: ${p}`};try{const w=URL.createObjectURL(n);ae({manager:f,baseFolderUrl:re,onFileProgress:E}).load(w,v=>{u=v},void 0,v=>{console.error(`加载 URDF 文件 (${n.name}) 时发生致命错误:`,v),l.value="URDF 文件解析失败",o.value=!1,h(new Error(`加载 URDF 文件失败: ${n.name}`,{cause:v}))})}catch(w){console.error("初始化 URDF 加载时发生致命错误:",w),l.value="模型加载失败",o.value=!1,h(w)}})}}class ue{constructor(i){D(this,"robot");D(this,"movableJoints");this.robot=i,this.movableJoints=this.getMovableJoints()}getMovableJoints(){return Object.values(this.robot.joints).filter(i=>i.jointType!=="fixed")}getMovableJointNames(){return this.movableJoints.map(i=>i.name)}setJointAngle(i,o){const l=this.robot.joints[i];if(!l||l.jointType==="fixed")return console.warn(`关节 ${i} 不存在或不可动`),!1;if(l.limit){const m=Math.max(l.limit.lower,Math.min(l.limit.upper,o));m!==o&&console.warn(`关节 ${i} 角度被限制在 [${l.limit.lower}, ${l.limit.upper}]`),l.setJointValue(m)}else l.setJointValue(o);return!0}setJointAngles(i){Object.entries(i).forEach(([o,l])=>{typeof l=="number"&&!isNaN(l)&&this.setJointAngle(o,l)})}getCurrentJointStates(){const i={};return this.movableJoints.forEach(o=>{i[o.name]=o.angle||0}),i}resetToZero(){this.movableJoints.forEach(i=>{i.setJointValue(0)})}getJointLimits(i){const o=this.robot.joints[i];return!o||!o.limit?null:{lower:o.limit.lower,upper:o.limit.upper}}async animateToState(i,o=1e3,l){const m=this.getCurrentJointStates(),n=Date.now();return new Promise(N=>{const h=()=>{const g=Date.now()-n,_=Math.min(g/o,1),u=this.easeInOutCubic(_),f={};Object.keys(i).forEach(E=>{const w=m[E]||0,c=i[E];f[E]=w+(c-w)*u}),this.setJointAngles(f),l&&l(_),_<1?requestAnimationFrame(h):N()};h()})}easeInOutCubic(i){return i<.5?4*i*i*i:1-Math.pow(-2*i+2,3)/2}async playSequence(i,o=1e3,l){for(let m=0;m<i.length;m++)await this.animateToState(i[m],o,n=>{l&&l(m,n)})}}const de=(r,i="YZX")=>{const o=new R.Vector3,l=new R.Quaternion,m=new R.Vector3,n=new R.Euler;r.getWorldPosition(o),r.getWorldQuaternion(l),r.getWorldScale(m),n.setFromQuaternion(l,i);const N={x:r.rotation.x*180/Math.PI,y:r.rotation.y*180/Math.PI,z:r.rotation.z*180/Math.PI},h={x:n.x*180/Math.PI,y:n.y*180/Math.PI,z:n.z*180/Math.PI};return{position:r.position,rotation:N,scale:r.scale,worldPosition:o,worldRotation:h,worldScale:m}},me=(r,i,o)=>{const l=parseFloat(o);isNaN(l)||(r.position[i]=l,r.updateMatrixWorld(!0))},pe=(r,i,o)=>{const l=parseFloat(o);isNaN(l)||(r.rotation[i]=l*Math.PI/180,r.updateMatrixWorld(!0))},ve={class:"panel-content"},fe={class:"obj"},we={key:0,class:"obj-base"},be=["title"],he=["title"],Ve={key:1},_e={class:"obj-position"},Ee={class:"coord-item"},Ne={class:"coord-item"},ge={class:"coord-item"},ye={class:"obj-rotation"},Re={class:"coord-item"},Se={class:"coord-item"},Me={class:"coord-item"},De={class:"world"},Ce={class:"coord-line"},xe={class:"coord-text"},Fe={class:"world-position-item"},$e={class:"world-position-item"},Le={class:"world-position-item"},Oe={class:"coord-line"},Ue={class:"coord-text"},je={class:"world-rotation-item"},Je={class:"world-rotation-item"},ke={class:"world-rotation-item"},Ie=e.defineComponent({__name:"workpieceTreePanel",props:{model:{},maxExpandCount:{default:10},expandStrategy:{default:"breadth"}},emits:["nodeClick","visibleChange","updatePosition","updateRotation"],setup(r,{emit:i}){const o=r,l=i,m=e.ref([]),n=e.ref({}),N=(t,s=0)=>{const V=[];return Array.isArray(t)&&(t==null?void 0:t.length)>0&&t.forEach(a=>{if(!(a!=null&&a.isMesh)){const y={name:a==null?void 0:a.name,label:(a==null?void 0:a.name)||(a==null?void 0:a.type),show:!0,level:s+1,isPenultimate:!1,type:a==null?void 0:a.type,id:a==null?void 0:a.id,limit:(a==null?void 0:a.limit)??"",children:N(a==null?void 0:a.children,s+1),path:a==null?void 0:a.name};V.push(y)}}),V},h=t=>t?[{name:t==null?void 0:t.name,label:(t==null?void 0:t.name)||(t==null?void 0:t.type),show:!0,level:1,isPenultimate:!1,type:t==null?void 0:t.type,id:t==null?void 0:t.id,limit:(t==null?void 0:t.limit)??"",children:N(t==null?void 0:t.children,1),path:t==null?void 0:t.name}]:[],g=(t,s)=>{const V=[],a=[...t];for(;a.length>0&&V.length<s;){const y=a.shift();y.children&&y.children.length>0&&(V.push(y.id),a.push(...y.children))}return V},_=(t,s)=>{const V=[];return t.forEach(a=>{if(a.children&&a.children.length>0){V.push(a.id);const y=a.children.filter(M=>M.children&&M.children.length>0).slice(0,s).map(M=>M.id);V.push(...y)}}),V.slice(0,s+1)};e.computed(()=>!m.value||m.value.length===0?[]:o.expandStrategy==="firstLevel"?_(m.value,o.maxExpandCount):g(m.value,o.maxExpandCount));const u=t=>t?parseFloat(t.toFixed(3)):0,f=t=>t?parseFloat(t.toFixed(1)):0,E=(t,s)=>{l("updatePosition",{obj:o.model,axis:s,value:(t==null?void 0:t.toString())||"0"})},w=(t,s)=>{l("updateRotation",{obj:o.model,axis:s,value:(t==null?void 0:t.toString())||"0"})},c=t=>{l("visibleChange",t)},v=e.computed(()=>o!=null&&o.model?h(o.model):[]),b=e.computed(()=>{var t,s;return((t=o==null?void 0:o.model)==null?void 0:t.name)||((s=o==null?void 0:o.model)==null?void 0:s.type)}),p=e.computed(()=>{var t;return(t=o==null?void 0:o.model)==null?void 0:t.type}),d=e.computed(()=>{var t;return(t=o==null?void 0:o.model)==null?void 0:t.visible});return e.watch(()=>o.model,()=>{o.model&&(n.value=de(o.model))},{deep:!0,immediate:!0}),e.watch(v,t=>{m.value=JSON.parse(JSON.stringify(t))},{immediate:!0}),(t,s)=>{var M,F,$,L,O,U,j,J,k,I,T,P,z,B,A,W,q,G,Q,X,Y,Z,K,H;const V=e.resolveComponent("el-divider"),a=e.resolveComponent("el-switch"),y=e.resolveComponent("el-input-number");return e.openBlock(),e.createElementBlock("div",ve,[e.createVNode(V,null,{default:e.withCtx(()=>s[6]||(s[6]=[e.createTextVNode("对象")])),_:1,__:[6]}),e.createElementVNode("div",fe,[o.model?(e.openBlock(),e.createElementBlock("div",we,[e.createElementVNode("div",{class:"obj-name",title:b.value},e.toDisplayString(b.value),9,be),e.createElementVNode("div",{class:"obj-type",title:p.value},"["+e.toDisplayString(p.value)+"]",9,he)])):(e.openBlock(),e.createElementBlock("div",Ve,"空")),e.createVNode(a,{"model-value":d.value,onChange:c},null,8,["model-value"])]),e.createVNode(V,null,{default:e.withCtx(()=>s[7]||(s[7]=[e.createTextVNode("相对位置")])),_:1,__:[7]}),e.createElementVNode("div",_e,[e.createElementVNode("div",Ee,[s[8]||(s[8]=e.createElementVNode("span",{class:"axis-label"},"X",-1)),e.createVNode(y,{"model-value":u((F=(M=n.value)==null?void 0:M.position)==null?void 0:F.x),onChange:s[0]||(s[0]=S=>E(S,"x")),size:"small",class:"coord-input-compact",precision:3,step:.1,controls:!0,"controls-position":"right"},null,8,["model-value"])]),e.createElementVNode("div",Ne,[s[9]||(s[9]=e.createElementVNode("span",{class:"axis-label"},"Y",-1)),e.createVNode(y,{"model-value":u((L=($=n.value)==null?void 0:$.position)==null?void 0:L.y),onChange:s[1]||(s[1]=S=>E(S,"y")),size:"small",class:"coord-input-compact",precision:3,step:.1,controls:!0,"controls-position":"right"},null,8,["model-value"])]),e.createElementVNode("div",ge,[s[10]||(s[10]=e.createElementVNode("span",{class:"axis-label"},"Z",-1)),e.createVNode(y,{"model-value":u((U=(O=n.value)==null?void 0:O.position)==null?void 0:U.z),onChange:s[2]||(s[2]=S=>E(S,"z")),size:"small",class:"coord-input-compact",precision:3,step:.1,controls:!0,"controls-position":"right"},null,8,["model-value"])])]),e.createVNode(V,null,{default:e.withCtx(()=>s[11]||(s[11]=[e.createTextVNode("相对旋转")])),_:1,__:[11]}),e.createElementVNode("div",ye,[e.createElementVNode("div",Re,[s[12]||(s[12]=e.createElementVNode("span",{class:"axis-label"},"X°",-1)),e.createVNode(y,{"model-value":f((J=(j=n.value)==null?void 0:j.rotation)==null?void 0:J.x),onChange:s[3]||(s[3]=S=>w(S,"x")),size:"small",class:"coord-input-compact",precision:3,step:.1,controls:!0,"controls-position":"right"},null,8,["model-value"])]),e.createElementVNode("div",Se,[s[13]||(s[13]=e.createElementVNode("span",{class:"axis-label"},"Y°",-1)),e.createVNode(y,{"model-value":f((I=(k=n.value)==null?void 0:k.rotation)==null?void 0:I.y),onChange:s[4]||(s[4]=S=>w(S,"y")),size:"small",class:"coord-input-compact",precision:3,step:.1,controls:!0,"controls-position":"right"},null,8,["model-value"])]),e.createElementVNode("div",Me,[s[14]||(s[14]=e.createElementVNode("span",{class:"axis-label"},"Z°",-1)),e.createVNode(y,{"model-value":f((P=(T=n.value)==null?void 0:T.rotation)==null?void 0:P.z),onChange:s[5]||(s[5]=S=>w(S,"z")),size:"small",class:"coord-input-compact",precision:3,step:.1,controls:!0,"controls-position":"right"},null,8,["model-value"])])]),e.createVNode(V,null,{default:e.withCtx(()=>s[15]||(s[15]=[e.createTextVNode("世界信息")])),_:1,__:[15]}),e.createElementVNode("div",De,[e.createElementVNode("div",Ce,[s[16]||(s[16]=e.createElementVNode("span",{class:"coord-label"},"世界位置:",-1)),e.createElementVNode("span",xe,[e.createElementVNode("div",Fe,e.toDisplayString(u((B=(z=n.value)==null?void 0:z.worldPosition)==null?void 0:B.x))+", ",1),e.createElementVNode("div",$e,e.toDisplayString(u((W=(A=n.value)==null?void 0:A.worldPosition)==null?void 0:W.y))+", ",1),e.createElementVNode("div",Le,e.toDisplayString(u((G=(q=n.value)==null?void 0:q.worldPosition)==null?void 0:G.z)),1)])]),e.createElementVNode("div",Oe,[s[17]||(s[17]=e.createElementVNode("span",{class:"coord-label"},"世界旋转:",-1)),e.createElementVNode("span",Ue,[e.createElementVNode("div",je,e.toDisplayString(f((X=(Q=n.value)==null?void 0:Q.worldRotation)==null?void 0:X.x))+"°, ",1),e.createElementVNode("div",Je,e.toDisplayString(f((Z=(Y=n.value)==null?void 0:Y.worldRotation)==null?void 0:Z.y))+"°, ",1),e.createElementVNode("div",ke,e.toDisplayString(f((H=(K=n.value)==null?void 0:K.worldRotation)==null?void 0:H.z))+"° ",1)])])])])}}}),Te=ie._export_sfc(Ie,[["__scopeId","data-v-00d48931"]]);function Pe(r,i,o,l=["URDFVisual"]){let m=null;const n=e.ref(null),N=new R.Raycaster,h=new R.Vector2,g=new Map;function _(){o.value.forEach(p=>{p.traverse(d=>{l!=null&&l.includes(d.type)&&g.set(d.id,{obj:d,axis:d.axis||new R.Vector3(1,0,0),limits:d.limits})})})}function u(p){n.value&&n.value.obj.traverse(d=>{var t;d.material&&((t=d.material.emissive)==null||t.set(0))}),n.value=p,p.obj.traverse(d=>{var t;d.material&&((t=d.material.emissive)==null||t.set(65280))})}function f(p){const d=r.value.getBoundingClientRect();h.x=(p.clientX-d.left)/d.width*2-1,h.y=-((p.clientY-d.top)/d.height)*2+1,N.setFromCamera(h,m);const t=N.intersectObjects(o.value,!0);if(t.length===0)return;let s=t[0].object,V=null;for(;s;){if(g.has(s.id)){V=g.get(s.id);break}s=s.parent}V&&u(V)}function E(){r.value&&r.value.removeEventListener("click",f,!1)}function w(){const{scene:p,camera:d}=i();m=d,_(),r.value&&r.value.addEventListener("click",f,!1)}function c(p){n.value&&(n.value.obj.visible=p)}function v(p){var s;const{axis:d,value:t}=p;me((s=n.value)==null?void 0:s.obj,d,t)}function b(p){var s;const{axis:d,value:t}=p;pe((s=n.value)==null?void 0:s.obj,d,t)}return{initRaycaster:w,dispose:E,selectedObject3D:n,setSelectedObjVisible:c,updatePosition:v,updateRotation:b}}exports.URDFRobotController=ue;exports.WorkpieceTreePanel=Te;exports.robotMode=le;exports.sceneType=ne;exports.useRaycaster=Pe;exports.useUrdfLoader=ce;
@@ -1,14 +1,14 @@
1
1
  var de = Object.defineProperty;
2
2
  var me = (n, s, t) => s in n ? de(n, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[s] = t;
3
3
  var x = (n, s, t) => me(n, typeof s != "symbol" ? s + "" : s, t);
4
- import { U as pe } from "./index.vue_vue_type_style_index_1_lang-Bmq_QiXo.js";
4
+ import { U as pe } from "./index.vue_vue_type_style_index_1_lang-CsY5rIO4.js";
5
5
  import { S as ve, M as fe, O as be } from "./STLLoader-CiUjaQtA.js";
6
6
  import { ay as we, n as E, h as he, e as _e, B as ge, V as z, Q as Me, E as ye, az as Re, J as Se } from "./three-viewport-gizmo-CkQ98n-T.js";
7
7
  import { defineComponent as $e, ref as V, computed as D, watch as ue, resolveComponent as J, createElementBlock as j, openBlock as I, createVNode as F, createElementVNode as c, withCtx as L, createTextVNode as U, toDisplayString as C } from "vue";
8
8
  import { _ as Fe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
9
9
  const ct = {
10
- SINGLE: "单机器人弯管",
11
- DOUBLE: "双机器人弯管"
10
+ SINGLE: "单机",
11
+ DOUBLE: "双机"
12
12
  }, dt = {
13
13
  ROBOT: 1,
14
14
  PIPECOMPARSION: 2
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ss-component-new",
3
3
  "private": false,
4
- "version": "1.2.9",
4
+ "version": "1.2.11",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist",
@@ -1 +0,0 @@
1
- "use strict";const y=require("./index.vue_vue_type_style_index_1_lang-Cb3WPLY1.cjs"),I=require("./index.vue_vue_type_style_index_1_lang-B_ESWhzz.cjs"),U=require("./threeViewerHost-UHWY3q2v.cjs"),T=require("./index-1z9RrjZc.cjs");function P(r){try{const c=new URL(r).pathname,i=c.substring(c.lastIndexOf("/")+1);return decodeURIComponent(i)}catch(c){return console.error("无法解析URL以提取文件名:",r,c),"未知文件名"}}function S(r){if(!r)return;const c=r.match(/filename\*\s*=\s*([^;]+)/i);if(c){let n=c[1].trim();n=n.replace(/^"(.*)"$/,"$1");const h=n.split("''");if(h.length===2){const m=h[0].toUpperCase(),f=h[1];try{if(m==="UTF-8")return decodeURIComponent(f)}catch{}return f}try{return decodeURIComponent(n)}catch{return n}}const i=r.match(/filename\s*=\s*("?)([^";]+)\1/i);if(i)return i[2].trim()}async function K(r){let c,i;if(/^https?:\/\//.test(r))try{const n=await fetch(r,{method:"GET",cache:"no-store"});if(!n.ok)throw new Error(`下载文件失败: ${n.statusText} (URL: ${r})`);c=await n.blob(),i=P(r)}catch(n){throw console.error("使用 fetch 下载文件时出错:",n),n}else try{const n=await U.downloadAvatarApi({url:r});if(n.status!==200)throw new Error(`下载失败: ${n.status}`);const h=n.headers["content-disposition"];i=S(h)||"无文件名",c=n.data}catch(n){throw console.error("通过 API 下载文件时出错:",n),n}return new File([c],i,{type:c.type})}function N(r){return new Promise((c,i)=>{const n=new FileReader;n.onload=h=>{var m;try{const f=(m=h.target)==null?void 0:m.result,u=I.readSync(f,{type:"array"}),F=u.Sheets[u.SheetNames[0]],E=I.utils.sheet_to_json(F);c(E)}catch(f){i(f)}},n.readAsArrayBuffer(r)})}const V=async()=>{const r="弯管仿真加工分析";let c={};const i=sessionStorage.getItem("systemKey"),n=await y.getItemData(`${r}/管件解析`,i,"");let h=["管长","外径"],m={};n==null||n.forEach(e=>{var s;(e==null?void 0:e.comp)==="Form"&&((s=e==null?void 0:e.compData)==null||s.forEach(o=>{var l;(o==null?void 0:o.key)==="formContent"&&((l=o==null?void 0:o.contents)==null||l.forEach(a=>{h.includes(a==null?void 0:a.key)&&(m[a.key]=a.value)}))}))});const f=m.管长,u=m.外径;console.log("管长",f,"外径",u,m);const F=f,E=u/2,d=await y.getItemData(`${r}/加工位姿生成`,i,"");let $=["夹持长度"],g={};d==null||d.forEach(e=>{var s;(e==null?void 0:e.comp)==="Form"&&((s=e==null?void 0:e.compData)==null||s.forEach(o=>{var l;(o==null?void 0:o.key)==="formContent"&&((l=o==null?void 0:o.contents)==null||l.forEach(a=>{$.includes(a==null?void 0:a.key)&&(g[a.key]=a.value)}))}))});const k=g.夹持长度;console.log("夹持长度",k,g);const x=Number(k),w={},b=await y.getItemData(`${r}/仿真动画生成`,i,"");b==null||b.forEach(e=>{var s,o,l,a,_,R;if((e==null?void 0:e.comp)==="Table"){let L=[],D=(l=(o=(s=e==null?void 0:e.compData)==null?void 0:s.find(t=>(t==null?void 0:t.key)==="header"))==null?void 0:o.contents)==null?void 0:l.map(t=>t==null?void 0:t.label),C=(R=(_=(a=e==null?void 0:e.compData)==null?void 0:a.find(t=>(t==null?void 0:t.key)==="tableContents"))==null?void 0:_.contents)==null?void 0:R.map(t=>(t=t==null?void 0:t.filter(p=>!(p!=null&&p.id)),t));C==null||C.forEach(t=>{L.push(y.getValueToObjectValue(t,D==null?void 0:D.filter(p=>p!=="操作")))}),w[e.name]=L,w[e.name+"Content"]=e}});const A=T.cloneDeep(w);return c={initialPipeLength:F,pipeRadius:E,clampLength:x,animationData:A},c},q=async()=>{const r="双弯管仿真加工分析";let c={};const i=sessionStorage.getItem("systemKey"),n=await y.getItemData(`${r}/管件解析`,i,"");let h=["管长","外径"],m={};n==null||n.forEach(e=>{var s;(e==null?void 0:e.comp)==="Form"&&((s=e==null?void 0:e.compData)==null||s.forEach(o=>{var l;(o==null?void 0:o.key)==="formContent"&&((l=o==null?void 0:o.contents)==null||l.forEach(a=>{h.includes(a==null?void 0:a.key)&&(m[a.key]=a.value)}))}))});const f=m.管长,u=m.外径;console.log("管长",f,"外径",u,m);const F=f,E=u/2,d=await y.getItemData(`${r}/加工工艺生成`,i,"");let $=["夹持位置"],g={};d==null||d.forEach(e=>{var s;(e==null?void 0:e.comp)==="Form"&&((s=e==null?void 0:e.compData)==null||s.forEach(o=>{var l;(o==null?void 0:o.key)==="formContent"&&((l=o==null?void 0:o.contents)==null||l.forEach(a=>{$.includes(a==null?void 0:a.key)&&(g[a.key]=a.value)}))}))});const k=g.夹持位置;console.log("夹持长度",k,g);const x=Number(k),w={},b=await y.getItemData(`${r}/仿真动画生成`,i,"");b==null||b.forEach(e=>{var s,o,l,a,_,R;if((e==null?void 0:e.comp)==="Table"){let L=[],D=(l=(o=(s=e==null?void 0:e.compData)==null?void 0:s.find(t=>(t==null?void 0:t.key)==="header"))==null?void 0:o.contents)==null?void 0:l.map(t=>t==null?void 0:t.label),C=(R=(_=(a=e==null?void 0:e.compData)==null?void 0:a.find(t=>(t==null?void 0:t.key)==="tableContents"))==null?void 0:_.contents)==null?void 0:R.map(t=>(t=t==null?void 0:t.filter(p=>!(p!=null&&p.id)),t));C==null||C.forEach(t=>{L.push(y.getValueToObjectValue(t,D==null?void 0:D.filter(p=>p!=="操作")))}),w[e.name]=L,w[e.name+"Content"]=e}});const A=T.cloneDeep(w);return c={initialPipeLength:F,pipeRadius:E,clampLength:x,animationData:A},c},B=async r=>await K(r),j=async r=>await N(r),X=async r=>{const c=await B(r);return await j(c)};exports.fetchDoubleRobotAnimationData=q;exports.fetchSingleRobotAnimationData=V;exports.initXYZBCList=X;
@@ -1,11 +0,0 @@
1
- "use strict";const w=require("vue"),j=require("./index.vue_vue_type_style_index_1_lang-Cb3WPLY1.cjs"),l=require("./index-1z9RrjZc.cjs"),Ve=typeof window<"u";var fe;Ve&&((fe=window==null?void 0:window.navigator)!=null&&fe.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function Je(e){return e==null}function Se(){}const Ie=Object.freeze({aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"});Object.freeze(new Set(Object.keys(Ie)));function Xe(){const e=new Map;return{on(t,n){const r=e.get(t);r!=null&&r.add(n)||e.set(t,new Set([n]))},off(t,n){const r=e.get(t);r&&r.delete(n)},clear(t){const n=e.get(t);n&&n.clear()},clearAll(){e.clear()},emit(t,...n){const r=e.get(t);r&&r.forEach(o=>{o(...n)})}}}function Ze(e,t=16){if(typeof e!="function")return Se;const n=(...i)=>{e(...i)};if(t<=0)return Ae(n);let r=0,o;return function(...i){const a=Date.now(),s=a-r;clearTimeout(o),s>=t?(r=a,n(...i)):o=setTimeout(()=>{r=Date.now(),n(...i)},Math.max(0,t-s))}}function Ge(e,t=100){if(typeof e!="function")return Se;const n=(...o)=>{e(...o)};if(t<=0)return Ae(n);let r;return function(...o){clearTimeout(r),r=setTimeout(()=>{n(...o)},t)}}function Ae(e){if(typeof e!="function")return e;let t=!1,n,r;return function(...o){return n=o,t||(t=!0,r=Promise.resolve().then(()=>(t=!1,r=void 0,e(...n)))),r}}const P=new Set,_e=new WeakMap;function He(){P.forEach(e=>{e(..._e.get(e))}),P.clear()}function Ye(e,...t){if(typeof e!="function")return e;_e.set(e,t),!P.has(e)&&(P.add(e),P.size===1&&Promise.resolve().then(He))}const q=typeof window<"u";var ue;q&&(ue=window==null?void 0:window.navigator)!=null&&ue.userAgent&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function de(e){return e!=null}function pe(){}const Ke=Object.freeze({aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"});Object.freeze(new Set(Object.keys(Ke)));const Qe=q&&("ontouchstart"in window||tt()>0),et=Qe?"pointerdown":"click";function tt(){return typeof navigator<"u"&&(navigator.maxTouchPoints||navigator.msMaxTouchPoints)||0}function rt(e,t,n=window.Event){const{type:r,bubbles:o=!1,cancelable:i=!1,...a}=t;if(!de(r)||r==="")return!1;let s;return de(n)?s=new n(r,{bubbles:o,cancelable:i}):(s=document.createEvent("HTMLEvents"),s.initEvent(r,o,i)),Object.assign(s,a),e.dispatchEvent(s)}const nt="clickoutside",ot=new Set;q&&document.addEventListener(et,e=>{const t=e.target,n=e.composedPath&&e.composedPath();ot.forEach(r=>{r!==t&&(n?!n.includes(r):!r.contains(t))&&(!r.__transferElement||r.__transferElement!==t&&!r.__transferElement.contains(t))&&rt(r,{type:nt})})},!0);const it=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]];let G;if(q){for(const e of it)if(e[1]in document){G=e;break}}w.computed(()=>!1);const at=new Set,lt=new WeakMap;if(q&&G){const e=G[2],t=G[4];document.addEventListener(t,()=>{if(at.forEach(n=>{n.value=!1}),document[e]){const n=lt.get(document[e]);n&&(n.value=!0)}},!1)}const je=new Map;je.set("x",0);je.set("y",0);var R=[],st=function(){return R.some(function(e){return e.activeTargets.length>0})},ct=function(){return R.some(function(e){return e.skippedTargets.length>0})},he="ResizeObserver loop completed with undelivered notifications.",ft=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:he}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=he),window.dispatchEvent(e)},L;(function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(L||(L={}));var M=function(e){return Object.freeze(e)},ut=function(){function e(t,n){this.inlineSize=t,this.blockSize=n,M(this)}return e}(),Be=function(){function e(t,n,r,o){return this.x=t,this.y=n,this.width=r,this.height=o,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,M(this)}return e.prototype.toJSON=function(){var t=this,n=t.x,r=t.y,o=t.top,i=t.right,a=t.bottom,s=t.left,g=t.width,f=t.height;return{x:n,y:r,top:o,right:i,bottom:a,left:s,width:g,height:f}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),oe=function(e){return e instanceof SVGElement&&"getBBox"in e},Ce=function(e){if(oe(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var o=e,i=o.offsetWidth,a=o.offsetHeight;return!(i||a||e.getClientRects().length)},ge=function(e){var t;if(e instanceof Element)return!0;var n=(t=e==null?void 0:e.ownerDocument)===null||t===void 0?void 0:t.defaultView;return!!(n&&e instanceof n.Element)},dt=function(e){switch(e.tagName){case"INPUT":if(e.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},U=typeof window<"u"?window:{},J=new WeakMap,be=/auto|scroll/,pt=/^tb|vertical/,ht=/msie|trident/i.test(U.navigator&&U.navigator.userAgent),_=function(e){return parseFloat(e||"0")},$=function(e,t,n){return e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=!1),new ut((n?t:e)||0,(n?e:t)||0)},me=M({devicePixelContentBoxSize:$(),borderBoxSize:$(),contentBoxSize:$(),contentRect:new Be(0,0,0,0)}),Re=function(e,t){if(t===void 0&&(t=!1),J.has(e)&&!t)return J.get(e);if(Ce(e))return J.set(e,me),me;var n=getComputedStyle(e),r=oe(e)&&e.ownerSVGElement&&e.getBBox(),o=!ht&&n.boxSizing==="border-box",i=pt.test(n.writingMode||""),a=!r&&be.test(n.overflowY||""),s=!r&&be.test(n.overflowX||""),g=r?0:_(n.paddingTop),f=r?0:_(n.paddingRight),B=r?0:_(n.paddingBottom),c=r?0:_(n.paddingLeft),k=r?0:_(n.borderTopWidth),u=r?0:_(n.borderRightWidth),d=r?0:_(n.borderBottomWidth),S=r?0:_(n.borderLeftWidth),b=c+f,O=g+B,E=S+u,D=k+d,T=s?e.offsetHeight-D-e.clientHeight:0,p=a?e.offsetWidth-E-e.clientWidth:0,m=o?b+E:0,v=o?O+D:0,A=r?r.width:_(n.width)-m-p,C=r?r.height:_(n.height)-v-T,W=A+b+p+E,V=C+O+T+D,F=M({devicePixelContentBoxSize:$(Math.round(A*devicePixelRatio),Math.round(C*devicePixelRatio),i),borderBoxSize:$(W,V,i),contentBoxSize:$(A,C,i),contentRect:new Be(c,g,A,C)});return J.set(e,F),F},Me=function(e,t,n){var r=Re(e,n),o=r.borderBoxSize,i=r.contentBoxSize,a=r.devicePixelContentBoxSize;switch(t){case L.DEVICE_PIXEL_CONTENT_BOX:return a;case L.BORDER_BOX:return o;default:return i}},gt=function(){function e(t){var n=Re(t);this.target=t,this.contentRect=n.contentRect,this.borderBoxSize=M([n.borderBoxSize]),this.contentBoxSize=M([n.contentBoxSize]),this.devicePixelContentBoxSize=M([n.devicePixelContentBoxSize])}return e}(),qe=function(e){if(Ce(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},bt=function(){var e=1/0,t=[];R.forEach(function(i){if(i.activeTargets.length!==0){var a=[];i.activeTargets.forEach(function(s){var g=new gt(s.target),f=qe(s.target);a.push(g),s.lastReportedSize=Me(s.target,s.observedBox),f<e&&(e=f)}),t.push(function(){i.callback.call(i.observer,a,i.observer)}),i.activeTargets.splice(0,i.activeTargets.length)}});for(var n=0,r=t;n<r.length;n++){var o=r[n];o()}return e},ve=function(e){R.forEach(function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach(function(n){n.isActive()&&(qe(n.target)>e?t.activeTargets.push(n):t.skippedTargets.push(n))})})},mt=function(){var e=0;for(ve(e);st();)e=bt(),ve(e);return ct()&&ft(),e>0},Q,$e=[],vt=function(){return $e.splice(0).forEach(function(e){return e()})},yt=function(e){if(!Q){var t=0,n=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return vt()}).observe(n,r),Q=function(){n.textContent="".concat(t?t--:t++)}}$e.push(e),Q()},wt=function(e){yt(function(){requestAnimationFrame(e)})},H=0,kt=function(){return!!H},zt=250,xt={attributes:!0,characterData:!0,childList:!0,subtree:!0},ye=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],we=function(e){return e===void 0&&(e=0),Date.now()+e},ee=!1,Et=function(){function e(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return e.prototype.run=function(t){var n=this;if(t===void 0&&(t=zt),!ee){ee=!0;var r=we(t);wt(function(){var o=!1;try{o=mt()}finally{if(ee=!1,t=r-we(),!kt())return;o?n.run(1e3):t>0?n.run(t):n.start()}})}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var t=this,n=function(){return t.observer&&t.observer.observe(document.body,xt)};document.body?n():U.addEventListener("DOMContentLoaded",n)},e.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),ye.forEach(function(n){return U.addEventListener(n,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),ye.forEach(function(n){return U.removeEventListener(n,t.listener,!0)}),this.stopped=!0)},e}(),ne=new Et,ke=function(e){!H&&e>0&&ne.start(),H+=e,!H&&ne.stop()},Dt=function(e){return!oe(e)&&!dt(e)&&getComputedStyle(e).display==="inline"},Ot=function(){function e(t,n){this.target=t,this.observedBox=n||L.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var t=Me(this.target,this.observedBox,!0);return Dt(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e}(),Tt=function(){function e(t,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=n}return e}(),I=new WeakMap,ze=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},X=function(){function e(){}return e.connect=function(t,n){var r=new Tt(t,n);I.set(t,r)},e.observe=function(t,n,r){var o=I.get(t),i=o.observationTargets.length===0;ze(o.observationTargets,n)<0&&(i&&R.push(o),o.observationTargets.push(new Ot(n,r&&r.box)),ke(1),ne.schedule())},e.unobserve=function(t,n){var r=I.get(t),o=ze(r.observationTargets,n),i=r.observationTargets.length===1;o>=0&&(i&&R.splice(R.indexOf(r),1),r.observationTargets.splice(o,1),ke(-1))},e.disconnect=function(t){var n=this,r=I.get(t);r.observationTargets.slice().forEach(function(o){return n.unobserve(t,o.target)}),r.activeTargets.splice(0,r.activeTargets.length)},e}(),St=function(){function e(t){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof t!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");X.connect(this,t)}return e.prototype.observe=function(t,n){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!ge(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");X.observe(this,t,n)},e.prototype.unobserve=function(t){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!ge(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");X.unobserve(this,t)},e.prototype.disconnect=function(){X.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}();const K=new WeakMap;function At(e){var t;for(let n=0,r=e.length;n<r;++n){const o=e[n],i=K.get(o.target);if(typeof i=="function"){const{inlineSize:a,blockSize:s}=((t=o.borderBoxSize)==null?void 0:t[0])??{},{offsetWidth:g,offsetHeight:f}=o.target;i(Object.assign(o,{offsetWidth:g,offsetHeight:f,width:a??g,height:s??f}))}}}const Fe=new(q&&window.ResizeObserver||St)(At);function xe(e,t){K.set(e,t),Fe.observe(e)}function Ee(e){K.has(e)&&(Fe.unobserve(e),K.delete(e))}function _t(e={}){let t=pe;const n=w.watch(()=>w.unref(e.target),o=>{t(),!(!o||typeof e.onResize!="function")&&(xe(o,e.onResize),t=()=>{Ee(o),t=pe})},{immediate:!0}),r=()=>{n(),t()};return w.getCurrentScope()&&w.onScopeDispose(r),{observeResize:xe,unobserveResize:Ee,unobserve:r}}const jt=w.ref(!1);w.computed(()=>jt.value);const De="__theme_style__",te="__theme_observer__",Oe=w.reactive(new Map),Te=new Map;w.watch(Oe,()=>{if(!q)return;Te.clear();const e=document.head.querySelector(`#${De}`);e&&document.head.removeChild(e);const t=document.createElement("style");let n=`.${te} { width: 1px }`,r=1;for(const[o,[i,a]]of Oe.entries())n+=` html.${i} .${te}, .${a} .${te} { width: ${++r}px }`,Te.set(r,o);t.textContent=n,t.id=De,document.head.appendChild(t)});(function(){try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('.vgl-layout{--vgl-placeholder-bg: red;--vgl-placeholder-opacity: 20%;--vgl-placeholder-z-index: 2;--vgl-item-resizing-z-index: 3;--vgl-item-resizing-opacity: 60%;--vgl-item-dragging-z-index: 3;--vgl-item-dragging-opacity: 100%;--vgl-resizer-size: 10px;--vgl-resizer-border-color: #444;--vgl-resizer-border-width: 2px;position:relative;box-sizing:border-box;transition:height .2s ease}.vgl-item{position:absolute;box-sizing:border-box;transition:.2s ease;transition-property:left,top,right}.vgl-item--placeholder{z-index:var(--vgl-placeholder-z-index, 2);-webkit-user-select:none;-moz-user-select:none;user-select:none;background-color:var(--vgl-placeholder-bg, red);opacity:var(--vgl-placeholder-opacity, 20%);transition-duration:.1s}.vgl-item--no-touch{touch-action:none}.vgl-item--transform{right:auto;left:0;transition-property:transform}.vgl-item--transform.vgl-item--rtl{right:0;left:auto}.vgl-item--resizing{z-index:var(--vgl-item-resizing-z-index, 3);-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--vgl-item-resizing-opacity, 60%)}.vgl-item--dragging{z-index:var(--vgl-item-dragging-z-index, 3);-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--vgl-item-dragging-opacity, 100%);transition:none}.vgl-item__resizer{position:absolute;right:0;bottom:0;box-sizing:border-box;width:var(--vgl-resizer-size);height:var(--vgl-resizer-size);cursor:se-resize}.vgl-item__resizer:before{position:absolute;top:0;right:3px;bottom:3px;left:0;content:"";border:0 solid var(--vgl-resizer-border-color);border-right-width:var(--vgl-resizer-border-width);border-bottom-width:var(--vgl-resizer-border-width)}.vgl-item__resizer--rtl{right:auto;left:0;cursor:sw-resize}.vgl-item__resizer--rtl:before{top:0;right:0;bottom:3px;left:3px;border-right-width:0;border-bottom-width:var(--vgl-resizer-border-width);border-left-width:var(--vgl-resizer-border-width)}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();w.ref(0);const Ne=e=>{var t,n;if(Array.isArray(Object.keys(e))&&((t=Object.keys(e))==null?void 0:t.length)>0){let r=[];return(n=Object.entries(e))==null||n.forEach(([o,i])=>{var s,g;let a=[];if(a.push(o),((s=Object.keys(i))==null?void 0:s.length)>0){let f=[];(g=Ne(i))==null||g.forEach(B=>{f.push(B)}),f==null||f.forEach(B=>{a.push(B)})}r.push(a)}),r}},Bt=(e,t)=>{var r;let n=t;return Array.isArray(Object.keys(e))&&((r=Object.entries(e))==null||r.forEach(([o,i])=>{let a=[o];if(typeof i=="object"&&i!==null){let s=Ne(i);s==null||s.forEach(g=>{a.push(g)})}n.push(a)})),n},Ct=e=>{const t={};return e.forEach(r=>{const o=r.split("/");let i=t;o.forEach(a=>{i[a]||(i[a]={}),i=i[a]})}),Bt(t,[])},Rt=e=>Ct(e);w.ref(0);w.ref(1);const Pe=e=>{let t;e.replaceAll(" ",`\r
2
- `).replaceAll(`
3
- `,`\r
4
- `).includes(`\r
5
- `)?t=e.replaceAll(`
6
- `,`\r
7
- `).replaceAll(" ",`\r
8
- `).split(`\r
9
- `).filter(o=>o.trim()!==""):t=e.replaceAll(" ",`\r
10
- `).split(`
11
- `).filter(o=>o.trim()!=="");const n=[];let r="";for(const o of t)o.includes("{")||r.includes("{")||o.includes("[")||r.includes("[")||o.includes("【")||r.includes("【")||o.includes("(")||r.includes("(")||o.includes("(")||r.includes("(")||o.includes("/*")||r.includes("/*")?(r+=o.trim(),l.cloneDeep(r).split("{").length-1===l.cloneDeep(r).split("}").length-1&&l.cloneDeep(r).split("【").length-1===l.cloneDeep(r).split("】").length-1&&l.cloneDeep(r).split("[").length-1===l.cloneDeep(r).split("]").length-1&&l.cloneDeep(r).split("(").length-1===l.cloneDeep(r).split(")").length-1&&l.cloneDeep(r).split("(").length-1===l.cloneDeep(r).split(")").length-1&&l.cloneDeep(r).split("/*").length-1===l.cloneDeep(r).split("*/").length-1&&r[r.length-1]!==","?(n.push(r.replace(/\/\*[\s\S]*?\*\//g,"")),r=""):r!=null&&r.includes("*/")&&(r=r.replace(/\/\*[\s\S]*?\*\//g,""))):n.push(o.trim().replace(/\/\*[\s\S]*?\*\//g,""));return n},Mt=e=>{const[t,n]=e.split(/=(.+)/),r=t.replace(/['"]/g,"").trim(),o=n.replace(/^['"]|['"]$/g,"");return{key:r,value:o}},Ue=e=>{let t;e!=null&&e.includes(":")?t=e.split(":").filter(o=>o.trim()!==""):t=e==null?void 0:e.split(":").filter(o=>o.trim()!=="");const n=[];let r="";for(const o of t)o.includes("{")||r.includes("{")||o.includes("[")||r.includes("[")||o.includes("【")||r.includes("【")||o.includes("(")||r.includes("(")||o.includes("(")||r.includes("(")||o.includes("/*")||r.includes("/*")?(r=r!==""?r+":"+o.trim():o.trim(),l.cloneDeep(r).split("{").length-1===l.cloneDeep(r).split("}").length-1&&l.cloneDeep(r).split("【").length-1===l.cloneDeep(r).split("】").length-1&&l.cloneDeep(r).split("[").length-1===l.cloneDeep(r).split("]").length-1&&l.cloneDeep(r).split("(").length-1===l.cloneDeep(r).split(")").length-1&&l.cloneDeep(r).split("(").length-1===l.cloneDeep(r).split(")").length-1&&l.cloneDeep(r).split("/*").length-1===l.cloneDeep(r).split("*/").length-1&&(n.push(r.replace(/\/\*[\s\S]*?\*\//g,"")),r="")):n.push(o.trim().replace(/\/\*[\s\S]*?\*\//g,""));return n},qt=e=>{var n,r,o,i,a,s,g,f;const t=(r=(n=e.split("("))==null?void 0:n[1])==null?void 0:r.trim();return((o=Ue(t.slice(0,t.length-1)))==null?void 0:o.length)>0?t.slice(0,t.length-1):(f=(g=(s=(a=(i=e.split("("))==null?void 0:i[1])==null?void 0:a.trim())==null?void 0:s.split(")"))==null?void 0:g[0])==null?void 0:f.trim()},Z=w.ref(0),re=w.ref(0),$t=e=>{const t=e.trim().replace(/^'|'$/g,""),n=/((?:\$?[a-zA-Z_][a-zA-Z0-9_]*\$?\([^)]*\))|[a-zA-Z_][a-zA-Z0-9_]*)\s*=\s*(.*?)(?=\s*(?:(?:\$?[a-zA-Z_][a-zA-Z0-9_]*\$?\([^)]*\))|[a-zA-Z_][a-zA-Z0-9_]*)\s*=|$)/g,r={};let o;for(;(o=n.exec(t))!==null;){const i=o[1];let a=o[2].trim();(a.match(/\[/g)||[]).length!==(a.match(/\]/g)||[]).length&&(a=a==null?void 0:a.replace(/]$/,"")),r[i]?(r[i+re.value]&&re.value++,r[i+re.value]=i+"="+a):r[i]=i+"="+a}return r},Le=e=>{const[t,n]=e.split("=").map(i=>i.trim()),r=t.replace(/['"]/g,""),o=n.replace(/^['"]|['"]$/g,"");return{key:r,value:o}},Ft=e=>{var a;let t=[];const[n,r]=e.split(/=(.+)/),o=n.replace(/['"]/g,"").trim(),i=r.replace(/^['"]|['"]$/g,"");return(a=Object.values($t(i)))==null||a.forEach(s=>{t.push(Le(s))}),{key:o,value:t}},Y=e=>{try{return JSON.parse(e),!0}catch{return!1}},We=e=>{try{const t=e.replace(/[’]|[‘]|[']/g,'"').replace(/,/g,",").replace(/:/g,":").replace(/:\s*(?=,|}|$)/g,': ""');if(l.cloneDeep(t).split("{").length-1>1){let n=l.cloneDeep(t).replace(/^\{(.*)\}$/,"[$1]");if(Y(n)&&!n.includes("$")||(n=n.replace(/"([^"]+)"\$([\w\u4e00-\u9fa5]+\([^)]*\))/g,'"$1$$$2"')),Y(n)){const r=JSON.parse(n);let o=[];return r==null||r.forEach(i=>{var a;(a=Object.entries(l.cloneDeep(i)))==null||a.forEach(s=>{Z.value++,o.push({id:Z.value,key:(s==null?void 0:s[0])??"",value:(s==null?void 0:s[1])===""?"":s==null?void 0:s[1],width:Object.keys(l.cloneDeep(i)).length})})}),o}else return console.error("转换类型不正确:"),[]}else if(Y(t)){const n=JSON.parse(t);return Object.entries(n).map(([r,o])=>(Z.value++,{id:Z.value,key:r,value:o===""?"":o,width:1}))}else return t}catch(t){return console.error("转换失败:",t),[]}},Nt=(e,t)=>{var n;try{if((n=j.viewMainDict)!=null&&n.find(r=>(r==null?void 0:r.key)===t))return JSON.parse(e.replace(/[’]|[‘]|[']/g,'"'));if(l.cloneDeep(e).split("[").length-1>1){const r=l.cloneDeep(e).replace(/[’]|[‘]|[']/g,'"').replaceAll(/,/g,",").replaceAll("(","[").replaceAll(")","]").replaceAll("],]","]]");return JSON.parse(r)}else{const r=l.cloneDeep(e).replace(/[’]|[‘]|[']/g,'"').replace(/,/g,",");if(Y(r)){const o=JSON.parse(r);return Array.isArray(o)?o.map(i=>({label:i})):o}else return We(l.cloneDeep(e))}}catch(r){return console.error("解析失败:",r),e}},Pt=e=>({[e==null?void 0:e.key]:Nt(e==null?void 0:e.value,e==null?void 0:e.key)}),Ut=e=>{try{if(l.cloneDeep(e).split("[").length-1>1){const t=l.cloneDeep(e).replace(/[’]|[‘]|[']/g,'"').replaceAll(/,/g,",").replaceAll("(","[").replaceAll(")","]").replaceAll("],]","]]");return JSON.parse(t)}else return JSON.parse(l.cloneDeep(e).replace(/[’]|[‘]|[']/g,'"').replace(/,/g,",")).map(n=>({label:n}))}catch(t){return console.error("解析失败:",t),e}},Lt=e=>{var t,n,r,o,i,a;try{const s=Pe((n=(t=l.cloneDeep(e))==null?void 0:t.replace("(","("))==null?void 0:n.replace(")",")")),g=(r=l.cloneDeep(s))==null?void 0:r.map(c=>{var u,d;let k=(d=(u=l.cloneDeep(c))==null?void 0:u.split("="))==null?void 0:d[0];return k!=null&&k.includes("GroupContents")?Ft(c):Le(c)}),f=[];(o=l.cloneDeep(g))==null||o.forEach(c=>{var k,u,d,S,b,O,E,D,T;(k=j.viewMainDict)!=null&&k.find(p=>{var m,v;return((m=p==null?void 0:p.key)==null?void 0:m.toUpperCase())===((v=c==null?void 0:c.key)==null?void 0:v.toUpperCase())})?f.push({comp:((d=(u=j.viewMainDict)==null?void 0:u.find(p=>{var m,v;return((m=p==null?void 0:p.key)==null?void 0:m.toUpperCase())===((v=c==null?void 0:c.key)==null?void 0:v.toUpperCase())}))==null?void 0:d.value)??"",name:(S=c==null?void 0:c.value)==null?void 0:S.replace(/[’]|[‘]|[']/g,""),compData:[]}):(b=j.viewChildDict)!=null&&b.find(p=>{var m,v;return((m=p==null?void 0:p.key)==null?void 0:m.toUpperCase())===((v=c==null?void 0:c.key)==null?void 0:v.toUpperCase())})&&((f==null?void 0:f.length)===0&&(O=c.key)!=null&&O.includes("Menus")&&f.push({comp:"Menu",name:"",compData:[]}),(E=f==null?void 0:f[(f==null?void 0:f.length)-1])!=null&&E.compData&&f[(f==null?void 0:f.length)-1].compData.push({key:(T=(D=j.viewChildDict)==null?void 0:D.find(p=>{var m,v;return((m=p==null?void 0:p.key)==null?void 0:m.toUpperCase())===((v=c==null?void 0:c.key)==null?void 0:v.toUpperCase())}))==null?void 0:T.value,contents:c==null?void 0:c.value}))});let B=(i=l.cloneDeep(f))==null?void 0:i.map(c=>{var k;return c!=null&&c.compData&&(c.compData=(k=c==null?void 0:c.compData)==null?void 0:k.map(u=>{var d,S,b,O,E,D,T,p,m,v,A;if((u==null?void 0:u.key)==="formFlex")u.contents=((S=(d=u.contents)==null?void 0:d.replace(/[’]|[‘]|[']/g,""))==null?void 0:S.toUpperCase())!=="Vertical".toUpperCase();else if((u==null?void 0:u.key)==="groupContents")u.contents=(b=l.cloneDeep(u.contents))==null?void 0:b.map(C=>Pt(l.cloneDeep(C)));else if(((E=(O=u.contents)==null?void 0:O.trim())!=null&&E.startsWith("[")||(T=(D=u.contents)==null?void 0:D.trim())!=null&&T.startsWith("【"))&&((m=(p=u.contents)==null?void 0:p.trim())!=null&&m.endsWith("]")||(A=(v=u.contents)==null?void 0:v.trim())!=null&&A.endsWith("】")))u.contents=Ut(l.cloneDeep(u.contents));else{if(!u.contents)return;u.contents=We(l.cloneDeep(u.contents))}return u})),c});return B=(a=l.cloneDeep(B))==null?void 0:a.map(c=>{var k;return(c==null?void 0:c.comp)==="Group"&&(c.compData=(k=c.compData)==null?void 0:k.map(u=>{var S;let d=[];return(S=u.contents)==null||S.forEach(b=>{var O,E,D,T,p,m,v,A,C,W,V,F,ie,ae,le,se,ce;if((O=j.viewMainDict)!=null&&O.find(h=>{var y,z,x;return((y=h==null?void 0:h.key)==null?void 0:y.toUpperCase())===((x=(z=Object.keys(b))==null?void 0:z[0])==null?void 0:x.toUpperCase())}))d.push({comp:(D=(E=j.viewMainDict)==null?void 0:E.find(h=>{var y,z,x;return((y=h==null?void 0:h.key)==null?void 0:y.toUpperCase())===((x=(z=Object.keys(b))==null?void 0:z[0])==null?void 0:x.toUpperCase())}))==null?void 0:D.value,name:(p=(T=Object.values(b))==null?void 0:T[0])==null?void 0:p.replace(/[’]|[‘]|[']/g,""),compData:[]});else if((m=j.viewChildDict)!=null&&m.find(h=>{var y,z,x;return((y=h==null?void 0:h.key)==null?void 0:y.toUpperCase())===((x=(z=Object.keys(b))==null?void 0:z[0])==null?void 0:x.toUpperCase())})){if((d==null?void 0:d.length)===0)return;(v=d==null?void 0:d[(d==null?void 0:d.length)-1])!=null&&v.compData&&d[(d==null?void 0:d.length)-1].compData.push({key:(C=(A=j.viewChildDict)==null?void 0:A.find(h=>{var y,z,x;return((y=h==null?void 0:h.key)==null?void 0:y.toUpperCase())===((x=(z=Object.keys(b))==null?void 0:z[0])==null?void 0:x.toUpperCase())}))==null?void 0:C.value,contents:(W=Object.values(b))==null?void 0:W[0]})}else if((F=(V=Object.keys(b))==null?void 0:V[0])!=null&&F.includes("$")){const h=(ae=(ie=Object.keys(l.cloneDeep(b)))==null?void 0:ie[0])==null?void 0:ae.split("$");d[(d==null?void 0:d.length)-1].compData.push({key:(se=(le=j.viewChildDict)==null?void 0:le.find(y=>{var z,x;return((z=y==null?void 0:y.key)==null?void 0:z.toUpperCase())===((x=h==null?void 0:h[0])==null?void 0:x.toUpperCase())}))==null?void 0:se.value,contents:(ce=Object.values(b))==null?void 0:ce[0],selectLabel:h==null?void 0:h[1]})}return b}),u.contents=d,u})),c}),B}catch{return!1}},Wt=e=>Lt(e),N=w.ref(0),Vt=e=>e.reduce((n,r)=>{var i,a;const o=Object.values(n);return(((i=Object.keys(n))==null?void 0:i.length)===0||o[o.length-1].length>=(r==null?void 0:r.width))&&(n[N.value]=[],N.value++),n[N.value-1].push(r),((a=Object.keys(n))==null?void 0:a.length)===(r==null?void 0:r.width)&&(n[N.value]=[],N.value++),n},{});exports.Zr=Xe;exports.arrayToNumberArray=Vt;exports.contentTrans=Ue;exports.contentTransArray=Pe;exports.eo=Ze;exports.expandStringToJson=Wt;exports.getContentValue=qt;exports.ie=Je;exports.menuArray=Rt;exports.no=Ge;exports.oo=Ye;exports.parseGroupValue=Mt;exports.wo=_t;