ss-component-new 1.1.151 → 1.1.152

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 (69) hide show
  1. package/dist/{crypto-BRyGpjGR.js → JSEncrypt-B36c1iN5.js} +227 -248
  2. package/dist/{crypto-CRbcEKIz.cjs → JSEncrypt-IYbV4kRj.cjs} +11 -11
  3. package/dist/array-B5nxRJHp.cjs +7 -0
  4. package/dist/array-C-lwCO1i.js +2202 -0
  5. package/dist/{cloneDeep-Cm2ut66T.js → cloneDeep-CgCzY78k.js} +48 -54
  6. package/dist/cloneDeep-CxrTGRsH.cjs +1 -0
  7. package/dist/{index-DcuEMWMM.js → index-8K6mkF_E.js} +5 -5
  8. package/dist/{index-BH36LQch.js → index-9KKNbfsI.js} +1 -1
  9. package/dist/{index-DyhHmlGD.js → index-AGAoe6VG.js} +1 -1
  10. package/dist/{index-CcxZZo6K.cjs → index-B3mhZiQc.cjs} +1 -1
  11. package/dist/{index-DqOy9nnX.js → index-BE7Nv7hp.js} +4 -4
  12. package/dist/{index-CsK9LWak.cjs → index-BTrQjr1x.cjs} +1 -1
  13. package/dist/{index-BQK2DuaH.js → index-BZRHBGvW.js} +57 -57
  14. package/dist/{index-dm-zOhNm.cjs → index-BZRbicur.cjs} +1 -1
  15. package/dist/{index-BUkyNn3m.cjs → index-BbsmiTkh.cjs} +1 -1
  16. package/dist/{index-BgY5srT7.cjs → index-BliW6t9E.cjs} +1 -1
  17. package/dist/{index-DoHr_nug.js → index-C9MD_Vo2.js} +4 -4
  18. package/dist/{index-BHjs6gMr.js → index-CH33xxMO.js} +2 -2
  19. package/dist/{index-wsyih2HQ.cjs → index-CJclws9U.cjs} +1 -1
  20. package/dist/{index-BZaGIyxe.cjs → index-CJdkK-Tq.cjs} +1 -1
  21. package/dist/index-CUmMX7CV.cjs +1 -0
  22. package/dist/{index-GvkFEReE.js → index-CZWm6qbu.js} +4 -4
  23. package/dist/{index-Bel0p329.js → index-ClNLhrtG.js} +39 -39
  24. package/dist/{index-Ckrm7F4u.js → index-Cqkb2uUU.js} +1 -1
  25. package/dist/{index-D-6CVrZh.js → index-D2EJHSnu.js} +1 -1
  26. package/dist/{index-Cxz9ADeg.cjs → index-D8EolGmN.cjs} +3 -3
  27. package/dist/{index-ODNyDte9.js → index-D91Wj22J.js} +5 -5
  28. package/dist/{index-C8mv9PET.js → index-DAGxCefs.js} +6 -6
  29. package/dist/{index-YajCTD4A.cjs → index-DFHrtGuu.cjs} +1 -1
  30. package/dist/{index-Ch7zPabE.cjs → index-DKGLFy-2.cjs} +1 -1
  31. package/dist/{index-CtTbyHOu.js → index-DODmz1Q7.js} +8 -9
  32. package/dist/{index-DjlDuRvf.cjs → index-DSzPe1Z2.cjs} +1 -1
  33. package/dist/index-DUWRIeGS.cjs +1 -0
  34. package/dist/{index-Nb7mXZOf.js → index-DVTwGhbs.js} +3 -3
  35. package/dist/{index-D9hjyDNL.cjs → index-D_RdY--B.cjs} +1 -1
  36. package/dist/{index-BaSc02sA.cjs → index-DrHrIV8U.cjs} +1 -1
  37. package/dist/{index-D_JFO4Ed.js → index-DwqHfSsz.js} +60 -60
  38. package/dist/{index-DORM2j0-.js → index-Dx-wXRtL.js} +262 -249
  39. package/dist/{index-CMue5Zek.cjs → index-DxlKtIWw.cjs} +1 -1
  40. package/dist/{index-C_Ek6N_z.js → index-F6nuN5lZ.js} +4 -4
  41. package/dist/{index-Cy23PxmQ.cjs → index-MpEh0WVC.cjs} +1 -1
  42. package/dist/{index-BlNU-ya_.js → index-d4tpMS9t.js} +5 -5
  43. package/dist/{index-C1sMNKRi.cjs → index-xMHtCwmX.cjs} +1 -1
  44. package/dist/{index-DXQEaxeL.cjs → index-y1F5FFwJ.cjs} +1 -1
  45. package/dist/{index.vue_vue_type_script_setup_true_lang-ClNwGHXE.cjs → index.vue_vue_type_script_setup_true_lang-COi-xyWc.cjs} +1 -1
  46. package/dist/{index.vue_vue_type_script_setup_true_lang-CuQ3xcyC.js → index.vue_vue_type_script_setup_true_lang-SUEsaZWz.js} +2 -2
  47. package/dist/index.vue_vue_type_style_index_0_scoped_baf99455_lang-2MY1GUPK.cjs +1 -0
  48. package/dist/index.vue_vue_type_style_index_0_scoped_baf99455_lang-CQWVBok8.js +9 -0
  49. package/dist/{index.vue_vue_type_style_index_0_scoped_bbb8ace9_lang-ClRL5aRq.cjs → index.vue_vue_type_style_index_0_scoped_bbb8ace9_lang-BhPhB5YO.cjs} +1 -1
  50. package/dist/{index.vue_vue_type_style_index_0_scoped_bbb8ace9_lang-BAlbShP-.js → index.vue_vue_type_style_index_0_scoped_bbb8ace9_lang-Drc1rCns.js} +3 -3
  51. package/dist/{login-DnBDEGHt.js → login-C63RqIyU.js} +2 -2
  52. package/dist/{login-aDjal4KC.cjs → login-DtKN5c4A.cjs} +1 -1
  53. package/dist/{main-Do8E5J_V.js → main-Cz1fAcOm.js} +4 -4
  54. package/dist/{main-ChEDt98s.cjs → main-Sh9ep4jh.cjs} +1 -1
  55. package/dist/{request-RC5ET7Nr.js → request-BLCreYdS.js} +1 -1
  56. package/dist/{request-BId7xEpo.cjs → request-DyC7pN3w.cjs} +1 -1
  57. package/dist/ss-component.cjs +1 -1
  58. package/dist/ss-component.css +1 -1
  59. package/dist/ss-component.js +6 -6
  60. package/dist/ss-component2.cjs +1 -1
  61. package/dist/ss-component2.js +1 -1
  62. package/package.json +1 -1
  63. package/dist/array-C09NLiVl.cjs +0 -7
  64. package/dist/array-CqhTXR28.js +0 -2348
  65. package/dist/cloneDeep-B6Av9vYT.cjs +0 -1
  66. package/dist/index-1TcDjOsz.cjs +0 -1
  67. package/dist/index-LX4uBOi3.cjs +0 -1
  68. package/dist/index.vue_vue_type_style_index_0_scoped_baf99455_lang-FY_pjpOg.js +0 -478
  69. package/dist/index.vue_vue_type_style_index_0_scoped_baf99455_lang-W4auoQ9V.cjs +0 -1
@@ -0,0 +1,2202 @@
1
+ import { u as Ye, g as el, s as ll } from "./index-ClNLhrtG.js";
2
+ import { ref as w, watch as te, createElementBlock as X, openBlock as V, createVNode as Y, resolveComponent as Pe, createElementVNode as M, toDisplayString as q, withCtx as ne, createTextVNode as oe, Fragment as de, renderList as $e, createBlock as De, resolveDynamicComponent as ve, createCommentVNode as tl } from "vue";
3
+ import { p as xe, g as Ne } from "./index-9KKNbfsI.js";
4
+ import { s as Oe, f as nl, a as ce, b as al } from "./index-C9MD_Vo2.js";
5
+ import { _ as ue } from "./_plugin-vue_export-helper-CHgC5LLL.js";
6
+ import { c as u } from "./cloneDeep-CgCzY78k.js";
7
+ import { _ as sl } from "./index.vue_vue_type_script_setup_true_lang-DQ2k4Z7D.js";
8
+ import { a as rl } from "./request-BLCreYdS.js";
9
+ import { _ as ol } from "./index.vue_vue_type_script_setup_true_lang-SUEsaZWz.js";
10
+ import { s as Re, u as cl } from "./menu-XcYMZJLY.js";
11
+ import { u as ul } from "./modelComp-CP-waker.js";
12
+ const ie = [
13
+ {
14
+ key: "单选",
15
+ value: "Select"
16
+ },
17
+ {
18
+ key: "日期",
19
+ value: "Date"
20
+ },
21
+ {
22
+ key: "长文本",
23
+ value: "TextArea"
24
+ },
25
+ {
26
+ key: "上传",
27
+ value: "Upload"
28
+ }
29
+ ], pl = { class: "form-content" }, il = {
30
+ __name: "index",
31
+ props: {
32
+ itemData: {
33
+ type: Array,
34
+ default: () => []
35
+ },
36
+ childItemData: {
37
+ type: Array,
38
+ default: () => []
39
+ },
40
+ index: Number
41
+ },
42
+ emits: ["change", "contentChange"],
43
+ setup(t, { emit: a }) {
44
+ const l = t, e = a, n = w([]), s = w(!1), o = w([]), h = Ye(xe), k = w(), b = (A) => {
45
+ var f, i, p, m;
46
+ const O = (i = (f = u(l.itemData)) == null ? void 0 : f.find((c) => (c == null ? void 0 : c.key) === "formContent")) == null ? void 0 : i.contents, _ = u(A.content);
47
+ let $ = {};
48
+ _ && ((p = Object.values(_)) == null ? void 0 : p.length) > 0 && ((m = Object.values(_)) == null || m.forEach((c, r) => {
49
+ $[O[r].key] = c;
50
+ }));
51
+ const B = {
52
+ content: $,
53
+ index: l == null ? void 0 : l.index,
54
+ buttonName: A == null ? void 0 : A.buttonName
55
+ };
56
+ e("change", B);
57
+ }, g = (A) => {
58
+ var $, B;
59
+ if (!A) return;
60
+ if ((($ = Object.values(u(A))) == null ? void 0 : $.length) > 0) {
61
+ const f = (B = Object.values(u(A))) == null ? void 0 : B.map((p) => p);
62
+ let i = "";
63
+ f == null || f.forEach((p) => {
64
+ p !== "" && p !== void 0 && (i = i === "" ? p : i + "/" + p);
65
+ }), h.setSelectArray(f), h.setSelectString(i);
66
+ }
67
+ const O = u(l.itemData), _ = O == null ? void 0 : O.map((f) => {
68
+ var i;
69
+ return (f == null ? void 0 : f.key) === "formContent" && ((i = f.contents) == null || i.map((p, m) => {
70
+ var c, r, d, C, T, D, x, J, v, N, S, j, E, y, F, P, L, I, H;
71
+ return p.type = p != null && p.type ? p.type : (C = (d = (r = (c = p == null ? void 0 : p.key) == null ? void 0 : c.split("$")) == null ? void 0 : r[1]) == null ? void 0 : d.split("(")) != null && C[0] ? (T = ie == null ? void 0 : ie.find((z) => {
72
+ var Q, Z, U, K;
73
+ return (z == null ? void 0 : z.key) === ((K = (U = (Z = (Q = p == null ? void 0 : p.key) == null ? void 0 : Q.split("$")) == null ? void 0 : Z[1]) == null ? void 0 : U.split("(")) == null ? void 0 : K[0]);
74
+ })) == null ? void 0 : T.value : "Input", p.options = p != null && p.options ? p.options : ((J = (x = (D = p == null ? void 0 : p.key) == null ? void 0 : D.split("$")) == null ? void 0 : x[1]) == null ? void 0 : J.length) > 0 ? (j = (S = nl((N = (v = p == null ? void 0 : p.key) == null ? void 0 : v.split("$")) == null ? void 0 : N[1])) == null ? void 0 : S.split(",")) == null ? void 0 : j.map((z) => ({
75
+ label: z,
76
+ value: z
77
+ })) : [], (E = p == null ? void 0 : p.key) != null && E.includes("$") && (p.key = (F = (y = p == null ? void 0 : p.key) == null ? void 0 : y.split("$")) == null ? void 0 : F[0]), p.value = p != null && p.value ? p.value : Array.isArray((P = Object.values(A)) == null ? void 0 : P[m]) ? (I = (L = Object.values(A)) == null ? void 0 : L[m]) == null ? void 0 : I[0] : (H = Object.values(A)) == null ? void 0 : H[m], p;
78
+ })), f;
79
+ });
80
+ e("contentChange", {
81
+ contents: _,
82
+ index: l.index
83
+ });
84
+ };
85
+ return te(
86
+ () => l.itemData,
87
+ () => {
88
+ var B, f, i, p, m, c, r, d, C, T;
89
+ const A = (B = u(l.itemData)) == null ? void 0 : B.find((D) => (D == null ? void 0 : D.key) === "formContent"), O = (f = u(l.itemData)) == null ? void 0 : f.find((D) => (D == null ? void 0 : D.key) === "formButton"), _ = (i = u(l.itemData)) == null ? void 0 : i.find((D) => (D == null ? void 0 : D.key) === "formFlex"), $ = (p = u(l.itemData)) == null ? void 0 : p.find((D) => (D == null ? void 0 : D.key) === "formWrap");
90
+ if (($ == null ? void 0 : $.contents) === "纵向" ? s.value = !1 : s.value = !0, k.value = typeof (_ == null ? void 0 : _.contents) != "boolean" ? !(!(_ != null && _.contents) === "" || ((m = _ == null ? void 0 : _.contents) == null ? void 0 : m.toUpperCase()) === "VERTICAL") : _ == null ? void 0 : _.contents, ((c = A == null ? void 0 : A.contents) == null ? void 0 : c.length) > 0 && Array.isArray(A == null ? void 0 : A.contents)) {
91
+ const D = [];
92
+ (r = A == null ? void 0 : A.contents) == null || r.forEach((v, N) => {
93
+ var S, j, E, y, F, P, L, I, H, z;
94
+ if ((v == null ? void 0 : v.label) !== "") {
95
+ let Q = (v == null ? void 0 : v.key) ?? "", Z = (v == null ? void 0 : v.type) ?? "", U = (v == null ? void 0 : v.options) ?? [];
96
+ if ((S = v == null ? void 0 : v.key) != null && S.includes("$") && (Q = (j = u(v == null ? void 0 : v.key).split("$")) == null ? void 0 : j[0], ((y = (E = u(v == null ? void 0 : v.key).split("$")) == null ? void 0 : E[1]) == null ? void 0 : y.length) > 0)) {
97
+ const [K, R] = (P = (F = u(v == null ? void 0 : v.key).split("$")) == null ? void 0 : F[1]) == null ? void 0 : P.split(/[()]/);
98
+ Z = ((L = ie.find((ee) => (ee == null ? void 0 : ee.key) === K)) == null ? void 0 : L.value) ?? "", ((I = R == null ? void 0 : R.split(",")) == null ? void 0 : I.length) > 0 && (U = (H = R == null ? void 0 : R.split(",")) == null ? void 0 : H.map((ee) => ({
99
+ label: ee,
100
+ value: ee
101
+ })));
102
+ }
103
+ D.push({
104
+ label: Q ?? "",
105
+ name: "t" + N,
106
+ type: Z === "" ? "Input" : Z,
107
+ value: v != null && v.value ? v.value : (U == null ? void 0 : U.length) > 0 ? (z = U == null ? void 0 : U[0]) == null ? void 0 : z.value : (v == null ? void 0 : v.value) ?? "",
108
+ id: (v == null ? void 0 : v.id) ?? N,
109
+ contents: U ?? [],
110
+ width: (v == null ? void 0 : v.width) ?? 1
111
+ });
112
+ }
113
+ });
114
+ const x = (d = u(D)) == null ? void 0 : d.map((v) => v.value);
115
+ let J = "";
116
+ x == null || x.forEach((v) => {
117
+ v !== "" && v !== void 0 && (J = J === "" ? v : J + "/" + v);
118
+ }), h.setSelectArray(x), h.setSelectString(J), n.value = D;
119
+ } else
120
+ n.value = [];
121
+ if (((C = O == null ? void 0 : O.contents) == null ? void 0 : C.length) > 0) {
122
+ const D = [];
123
+ (T = O == null ? void 0 : O.contents) == null || T.forEach((x, J) => {
124
+ (x == null ? void 0 : x.label) !== "" && D.push({
125
+ label: (x == null ? void 0 : x.label) ?? "",
126
+ id: (x == null ? void 0 : x.id) ?? J,
127
+ type: (x == null ? void 0 : x.type) ?? "",
128
+ background: x == null ? void 0 : x.background
129
+ });
130
+ }), o.value = D;
131
+ } else
132
+ o.value = [];
133
+ },
134
+ { deep: !0, immediate: !0 }
135
+ ), (A, O) => (V(), X("div", pl, [
136
+ Y(Oe, {
137
+ rowContents: n.value,
138
+ buttonValue: o.value,
139
+ isRowFlex: k.value,
140
+ isEnableWrap: !1,
141
+ onOnButtonClick: b,
142
+ onChange: g,
143
+ isButtonRow: s.value
144
+ }, null, 8, ["rowContents", "buttonValue", "isRowFlex", "isButtonRow"])
145
+ ]));
146
+ }
147
+ }, fl = /* @__PURE__ */ ue(il, [["__scopeId", "data-v-1b0ef247"]]), hl = { class: "table-operate-content" }, dl = { class: "table-operate-item" }, yl = { class: "operate-title" }, ml = { class: "operate-content" }, bl = { class: "operate-title" }, kl = { class: "operate-content" }, gl = { class: "operate-title" }, Cl = { class: "operate-content" }, $l = { class: "operate-content" }, Al = {
148
+ __name: "operate",
149
+ props: {
150
+ itemContents: {
151
+ type: Array,
152
+ default: () => []
153
+ },
154
+ originalItemContents: {
155
+ type: Array,
156
+ default: () => []
157
+ }
158
+ },
159
+ emits: ["change"],
160
+ setup(t, { emit: a }) {
161
+ const l = t, e = a, n = w([]), s = w([]), o = w([]), h = w([{
162
+ label: "按钮名称",
163
+ prop: "label",
164
+ type: "edit"
165
+ }, {
166
+ label: "按钮类型",
167
+ prop: "type",
168
+ type: "edit"
169
+ }, {
170
+ label: "按钮背景颜色",
171
+ prop: "background",
172
+ type: "edit",
173
+ columnType: "Color"
174
+ }, {
175
+ label: "操作",
176
+ prop: "operate",
177
+ type: "operate",
178
+ sortable: !1
179
+ }]), k = w([{
180
+ label: "标签名称",
181
+ prop: "label",
182
+ type: "edit"
183
+ }, {
184
+ label: "标签类型",
185
+ prop: "type",
186
+ type: "edit"
187
+ }, {
188
+ label: "按钮文字颜色",
189
+ prop: "textColor",
190
+ type: "edit",
191
+ columnType: "Color"
192
+ }, {
193
+ label: "操作",
194
+ prop: "operate",
195
+ type: "operate",
196
+ sortable: !1
197
+ }]), b = w([]), g = w(0), A = w([{
198
+ name: "isPagination",
199
+ label: "是否显示分页",
200
+ type: "Switch",
201
+ value: !0
202
+ }]), O = [{
203
+ label: "标签名",
204
+ prop: "label",
205
+ type: "edit"
206
+ }, {
207
+ label: "属性名",
208
+ prop: "prop",
209
+ type: "edit"
210
+ }, {
211
+ label: "宽度",
212
+ prop: "width",
213
+ type: "edit",
214
+ columnType: "Number"
215
+ }, {
216
+ label: "是否固定列",
217
+ prop: "fixed",
218
+ type: "edit",
219
+ columnType: "Radio",
220
+ contents: [{
221
+ label: "left",
222
+ value: "左"
223
+ }, {
224
+ label: "right",
225
+ value: "右"
226
+ }]
227
+ }, {
228
+ label: "是否支持排序",
229
+ prop: "sortable",
230
+ type: "edit",
231
+ columnType: "Switch"
232
+ }, {
233
+ label: "文本所在位置",
234
+ prop: "align",
235
+ type: "edit",
236
+ columnType: "Radio",
237
+ contents: [{
238
+ label: "left",
239
+ value: "左"
240
+ }, {
241
+ label: "center",
242
+ value: "中"
243
+ }, {
244
+ label: "right",
245
+ value: "右"
246
+ }]
247
+ }, {
248
+ label: "溢出悬浮文字",
249
+ prop: "showOverflowTooltip",
250
+ type: "edit",
251
+ columnType: "Switch"
252
+ }, {
253
+ label: "是否不可拖动",
254
+ prop: "isNotDrag",
255
+ type: "edit",
256
+ columnType: "Switch"
257
+ }, {
258
+ label: "是否可编辑列名",
259
+ //暂不支持
260
+ prop: "isEditCol",
261
+ type: "edit",
262
+ columnType: "Switch"
263
+ }, {
264
+ label: "是否出现在附属界面",
265
+ //暂不支持
266
+ prop: "isOperate",
267
+ type: "edit",
268
+ columnType: "Switch"
269
+ }, {
270
+ label: "操作",
271
+ prop: "operate",
272
+ type: "operate",
273
+ sortable: !1
274
+ }], _ = (c) => {
275
+ let r = u(n.value);
276
+ const d = r == null ? void 0 : r.find((C) => C.key === "page");
277
+ (d == null ? void 0 : d.contents) !== void 0 ? r = r == null ? void 0 : r.map((C) => ((C == null ? void 0 : C.key) === "page" && (C.contents = c == null ? void 0 : c.isPagination), C)) : r.push({
278
+ key: "page",
279
+ contents: c == null ? void 0 : c.isPagination
280
+ }), n.value = r;
281
+ };
282
+ te(
283
+ () => l.originalItemContents,
284
+ () => {
285
+ var c, r, d, C, T, D, x, J, v, N, S, j, E;
286
+ !l.originalItemContents || l.originalItemContents.length === 0 || (n.value = u(l.originalItemContents), s.value = (r = (c = n.value) == null ? void 0 : c.find((y) => (y == null ? void 0 : y.key) === "header")) == null ? void 0 : r.contents, o.value = (C = (d = n.value) == null ? void 0 : d.find((y) => (y == null ? void 0 : y.key) === "rowButton")) == null ? void 0 : C.contents, h.value = (D = (T = n.value) == null ? void 0 : T.find((y) => (y == null ? void 0 : y.key) === "extraButton")) == null ? void 0 : D.contents, A.value = (J = (x = n.value) == null ? void 0 : x.find((y) => (y == null ? void 0 : y.key) === "page")) != null && J.contents ? [{
287
+ name: "isPagination",
288
+ label: "是否显示分页",
289
+ type: "Switch",
290
+ value: (N = (v = n.value) == null ? void 0 : v.find((y) => (y == null ? void 0 : y.key) === "page")) == null ? void 0 : N.contents
291
+ }] : [{
292
+ name: "isPagination",
293
+ label: "是否显示分页",
294
+ type: "Switch",
295
+ value: !0
296
+ }], s.value = (S = s.value) == null ? void 0 : S.map((y, F) => y = {
297
+ label: (y == null ? void 0 : y.label) ?? "",
298
+ prop: (y == null ? void 0 : y.label) === "操作" ? "operate" : y == null ? void 0 : y.prop,
299
+ width: y != null && y.width ? parseInt(y.width) : "",
300
+ fixed: (y == null ? void 0 : y.fixed) ?? void 0,
301
+ sortable: (y == null ? void 0 : y.sortable) ?? !1,
302
+ align: (y == null ? void 0 : y.align) ?? "center",
303
+ showOverflowTooltip: (y == null ? void 0 : y.showOverflowTooltip) ?? !0,
304
+ isNotDrag: (y == null ? void 0 : y.isNotDrag) ?? !1,
305
+ isEditCol: (y == null ? void 0 : y.isEditCol) ?? !1,
306
+ isOperate: (y == null ? void 0 : y.isOperate) ?? !1,
307
+ id: (y == null ? void 0 : y.id) ?? F
308
+ }), o.value = (j = o.value) == null ? void 0 : j.map((y, F) => y = {
309
+ label: (y == null ? void 0 : y.label) ?? "",
310
+ type: (y == null ? void 0 : y.type) ?? "",
311
+ textColor: (y == null ? void 0 : y.textColor) ?? "#000000",
312
+ id: (y == null ? void 0 : y.id) ?? F
313
+ }), h.value = (E = h.value) == null ? void 0 : E.map((y, F) => y = {
314
+ label: (y == null ? void 0 : y.label) ?? "",
315
+ type: (y == null ? void 0 : y.type) ?? "",
316
+ background: (y == null ? void 0 : y.textColor) ?? "#FFFFFF",
317
+ id: (y == null ? void 0 : y.id) ?? F
318
+ }));
319
+ },
320
+ { deep: !0, immediate: !0 }
321
+ ), te(
322
+ () => A.value,
323
+ () => {
324
+ var d;
325
+ let c = u(n.value);
326
+ const r = c == null ? void 0 : c.find((C) => C.key === "page");
327
+ r != null && r.contents ? c = c == null ? void 0 : c.map((C) => {
328
+ var T;
329
+ return (C == null ? void 0 : C.key) === "page" && (C.contents = (T = A.value) == null ? void 0 : T[0].value), C;
330
+ }) : c.push({
331
+ key: "page",
332
+ contents: (d = A.value) == null ? void 0 : d[0].value
333
+ }), n.value = c;
334
+ },
335
+ { immediate: !0, deep: !0 }
336
+ );
337
+ const $ = () => {
338
+ const c = u(s.value);
339
+ let r = u(n.value);
340
+ c.push({
341
+ label: "",
342
+ prop: "",
343
+ width: "",
344
+ fixed: void 0,
345
+ sortable: !1,
346
+ align: "center",
347
+ showOverflowTooltip: !0,
348
+ isNotDrag: !1,
349
+ isEditCol: !1,
350
+ isOperate: !1,
351
+ id: g.value
352
+ }), s.value = c, g.value++;
353
+ const d = r == null ? void 0 : r.find((C) => (C == null ? void 0 : C.key) === "header");
354
+ d != null && d.contents ? (d.contents = c, r = r == null ? void 0 : r.map((C) => ((C == null ? void 0 : C.key) === "header" && (C.contents = c), C))) : r.push({
355
+ key: "header",
356
+ contents: c
357
+ }), n.value = r;
358
+ }, B = () => {
359
+ const c = u(o.value);
360
+ let r = u(n.value);
361
+ c.push({
362
+ label: "",
363
+ type: "",
364
+ textColor: "#000000",
365
+ id: g.value
366
+ }), o.value = c, g.value++;
367
+ const d = r == null ? void 0 : r.find((C) => (C == null ? void 0 : C.key) === "rowButton");
368
+ d != null && d.contents ? (d.contents = c, r = r == null ? void 0 : r.map((C) => ((C == null ? void 0 : C.key) === "rowButton" && (C.contents = c), C))) : r.push({
369
+ key: "rowButton",
370
+ contents: c
371
+ }), n.value = r;
372
+ }, f = () => {
373
+ const c = u(b.value);
374
+ let r = u(n.value);
375
+ c.push({
376
+ label: "",
377
+ type: "",
378
+ background: "#FFFFFF",
379
+ id: g.value
380
+ }), b.value = c, g.value++;
381
+ const d = r == null ? void 0 : r.find((C) => (C == null ? void 0 : C.key) === "extraButton");
382
+ d != null && d.contents ? (d.contents = c, r = r == null ? void 0 : r.map((C) => ((C == null ? void 0 : C.key) === "extraButton" && (C.contents = c), C))) : r.push({
383
+ key: "extraButton",
384
+ contents: c
385
+ }), n.value = r;
386
+ }, i = (c) => {
387
+ const r = u(o.value);
388
+ let d = u(n.value);
389
+ o.value = r.filter((T) => T.id !== c.id);
390
+ const C = d == null ? void 0 : d.find((T) => T.key === "rowButton");
391
+ C != null && C.contents && (d = d == null ? void 0 : d.map((T) => ((T == null ? void 0 : T.key) === "rowButton" && (T.contents = r.filter((D) => D.id !== c.id)), T))), n.value = d;
392
+ }, p = (c) => {
393
+ const r = u(b.value);
394
+ let d = u(n.value);
395
+ b.value = r.filter((T) => T.id !== c.id);
396
+ const C = d == null ? void 0 : d.find((T) => T.key === "extraButton");
397
+ C != null && C.contents && (d = d == null ? void 0 : d.map((T) => ((T == null ? void 0 : T.key) === "extraButton" && (T.contents = r.filter((D) => D.id !== c.id)), T))), n.value = d;
398
+ }, m = (c) => {
399
+ const r = u(s.value);
400
+ let d = u(n.value);
401
+ s.value = r.filter((T) => T.id !== c.id);
402
+ const C = d == null ? void 0 : d.find((T) => T.key === "header");
403
+ C != null && C.contents && (d = d == null ? void 0 : d.map((T) => ((T == null ? void 0 : T.key) === "header" && (T.contents = r.filter((D) => D.id !== c.id)), T))), n.value = d;
404
+ };
405
+ return te(
406
+ () => [n.value, s.value],
407
+ () => {
408
+ let c = u(n.value);
409
+ const r = c == null ? void 0 : c.find((d) => (d == null ? void 0 : d.key) === "header");
410
+ r != null && r.contents ? (r.contents = s.value, c = c == null ? void 0 : c.map((d) => ((d == null ? void 0 : d.key) === "header" && (d.contents = s.value), d))) : c.push({
411
+ key: "header",
412
+ contents: s.value
413
+ }), e("change", c);
414
+ },
415
+ { deep: !0, immediate: !0 }
416
+ ), (c, r) => {
417
+ const d = Pe("el-button");
418
+ return V(), X("div", hl, [
419
+ M("div", dl, [
420
+ M("div", yl, [
421
+ r[1] || (r[1] = M("div", null, q("表头"), -1)),
422
+ Y(d, {
423
+ class: "blue-operate-button",
424
+ icon: "ele-Plus",
425
+ onClick: $
426
+ }, {
427
+ default: ne(() => r[0] || (r[0] = [
428
+ oe(q("新建"))
429
+ ])),
430
+ _: 1,
431
+ __: [0]
432
+ })
433
+ ]),
434
+ M("div", ml, [
435
+ Y(ce, {
436
+ columns: O,
437
+ isShowPagination: !1,
438
+ isShowEdit: !1,
439
+ isMoveColumn: !1,
440
+ tableData: s.value,
441
+ onDeleteRow: m
442
+ }, null, 8, ["tableData"])
443
+ ]),
444
+ M("div", bl, [
445
+ r[3] || (r[3] = M("div", null, q("行内按钮"), -1)),
446
+ Y(d, {
447
+ class: "blue-operate-button",
448
+ icon: "ele-Plus",
449
+ onClick: B
450
+ }, {
451
+ default: ne(() => r[2] || (r[2] = [
452
+ oe(q("新建"))
453
+ ])),
454
+ _: 1,
455
+ __: [2]
456
+ })
457
+ ]),
458
+ M("div", kl, [
459
+ Y(ce, {
460
+ columns: k.value,
461
+ isShowPagination: !1,
462
+ isShowEdit: !1,
463
+ isMoveColumn: !1,
464
+ tableData: o.value,
465
+ onDeleteRow: i
466
+ }, null, 8, ["columns", "tableData"])
467
+ ]),
468
+ M("div", gl, [
469
+ r[5] || (r[5] = M("div", null, q("表格外部按钮"), -1)),
470
+ Y(d, {
471
+ class: "blue-operate-button",
472
+ icon: "ele-Plus",
473
+ onClick: f
474
+ }, {
475
+ default: ne(() => r[4] || (r[4] = [
476
+ oe(q("新建"))
477
+ ])),
478
+ _: 1,
479
+ __: [4]
480
+ })
481
+ ]),
482
+ M("div", Cl, [
483
+ Y(ce, {
484
+ columns: h.value,
485
+ isShowPagination: !1,
486
+ isShowEdit: !1,
487
+ isMoveColumn: !1,
488
+ tableData: b.value,
489
+ onDeleteRow: p
490
+ }, null, 8, ["columns", "tableData"])
491
+ ]),
492
+ r[6] || (r[6] = M("div", { class: "operate-title" }, [
493
+ M("div", null, q("分页"))
494
+ ], -1)),
495
+ M("div", $l, [
496
+ Y(Oe, {
497
+ rowContents: A.value,
498
+ onChange: _
499
+ }, null, 8, ["rowContents"])
500
+ ])
501
+ ])
502
+ ]);
503
+ };
504
+ }
505
+ }, xl = /* @__PURE__ */ ue(Al, [["__scopeId", "data-v-877911eb"]]), Ol = { class: "form-operate-content" }, _l = { class: "form-operate-item" }, Tl = { class: "operate-title" }, Dl = { class: "operate-content" }, vl = { class: "operate-title" }, Nl = { class: "operate-content" }, El = { class: "operate-content" }, jl = {
506
+ __name: "operate",
507
+ props: {
508
+ itemContents: {
509
+ type: Array,
510
+ default: () => []
511
+ },
512
+ originalItemContents: {
513
+ type: Array,
514
+ default: () => []
515
+ }
516
+ },
517
+ emits: ["change"],
518
+ setup(t, { emit: a }) {
519
+ const l = t, e = a, n = w([{
520
+ name: "isRowFlex",
521
+ label: "是否横向布局",
522
+ type: "Switch",
523
+ value: !0
524
+ }]), s = w([{
525
+ label: "字段名称",
526
+ prop: "label",
527
+ type: "edit"
528
+ }, {
529
+ label: "字段类型",
530
+ prop: "type",
531
+ type: "edit"
532
+ }, {
533
+ label: "字段值",
534
+ prop: "key",
535
+ type: "edit"
536
+ }, {
537
+ label: "字段选项值",
538
+ prop: "options",
539
+ type: "edit"
540
+ }, {
541
+ label: "操作",
542
+ prop: "operate",
543
+ type: "operate",
544
+ sortable: !1
545
+ }]), o = w([{
546
+ label: "字段名称",
547
+ prop: "label",
548
+ type: "edit"
549
+ }, {
550
+ label: "字段类型",
551
+ prop: "type",
552
+ type: "edit"
553
+ }, {
554
+ label: "按钮背景颜色",
555
+ prop: "background",
556
+ type: "edit",
557
+ columnType: "Color"
558
+ }, {
559
+ label: "操作",
560
+ prop: "operate",
561
+ type: "operate",
562
+ sortable: !1
563
+ }]), h = w([]), k = w([]), b = w([]), g = w(0);
564
+ te(
565
+ () => l.originalItemContents,
566
+ () => {
567
+ var f, i, p, m, c, r, d, C, T, D;
568
+ !l.originalItemContents || l.originalItemContents.length === 0 || (k.value = u(l.originalItemContents), b.value = (i = (f = k.value) == null ? void 0 : f.find((x) => (x == null ? void 0 : x.key) === "formContent")) == null ? void 0 : i.contents, h.value = (m = (p = k.value) == null ? void 0 : p.find((x) => (x == null ? void 0 : x.key) === "formButton")) == null ? void 0 : m.contents, b.value = (c = b.value) == null ? void 0 : c.map((x, J) => x = {
569
+ label: (x == null ? void 0 : x.label) ?? "",
570
+ type: (x == null ? void 0 : x.type) ?? "",
571
+ key: (x == null ? void 0 : x.key) ?? "",
572
+ options: (x == null ? void 0 : x.options) ?? "",
573
+ id: (x == null ? void 0 : x.id) ?? J
574
+ }), h.value = (r = h.value) == null ? void 0 : r.map((x, J) => x = {
575
+ label: (x == null ? void 0 : x.label) ?? "",
576
+ type: (x == null ? void 0 : x.type) ?? "",
577
+ background: (x == null ? void 0 : x.background) ?? "#000000",
578
+ id: (x == null ? void 0 : x.id) ?? J
579
+ }), n.value = (C = (d = k.value) == null ? void 0 : d.find((x) => (x == null ? void 0 : x.key) === "formFlex")) != null && C.contents ? [{
580
+ name: "isRowFlex",
581
+ label: "是否横向布局",
582
+ type: "Switch",
583
+ value: (D = (T = k.value) == null ? void 0 : T.find((x) => (x == null ? void 0 : x.key) === "formFlex")) == null ? void 0 : D.contents
584
+ }] : [{
585
+ name: "isRowFlex",
586
+ label: "是否横向布局",
587
+ type: "Switch",
588
+ value: !0
589
+ }]);
590
+ },
591
+ { deep: !0, immediate: !0 }
592
+ );
593
+ const A = () => {
594
+ const f = u(h.value);
595
+ let i = u(k.value);
596
+ f.push({
597
+ label: "",
598
+ type: "",
599
+ background: "#000000",
600
+ id: g.value
601
+ }), h.value = f, g.value++;
602
+ const p = i == null ? void 0 : i.find((m) => (m == null ? void 0 : m.key) === "formButton");
603
+ p != null && p.contents ? (p.contents = f, i = i == null ? void 0 : i.map((m) => ((m == null ? void 0 : m.key) === "formButton" && (m.contents = f), m))) : i.push({
604
+ key: "formButton",
605
+ contents: f
606
+ }), k.value = i;
607
+ }, O = () => {
608
+ const f = u(b.value);
609
+ let i = u(k.value);
610
+ f.push({
611
+ label: "",
612
+ type: "",
613
+ key: "",
614
+ options: "",
615
+ id: g.value
616
+ }), b.value = f, g.value++;
617
+ const p = i == null ? void 0 : i.find((m) => (m == null ? void 0 : m.key) === "formContent");
618
+ p != null && p.contents ? (p.contents = f, i = i == null ? void 0 : i.map((m) => ((m == null ? void 0 : m.key) === "formContent" && (m.contents = f), m))) : i.push({
619
+ key: "formContent",
620
+ contents: f
621
+ }), k.value = i;
622
+ }, _ = (f) => {
623
+ const i = u(h.value);
624
+ let p = u(k.value);
625
+ h.value = i.filter((c) => c.id !== f.id);
626
+ const m = p == null ? void 0 : p.find((c) => c.key === "formButton");
627
+ m != null && m.contents && (p = p == null ? void 0 : p.map((c) => ((c == null ? void 0 : c.key) === "formButton" && (c.contents = i.filter((r) => r.id !== f.id)), c))), k.value = p;
628
+ }, $ = (f) => {
629
+ const i = u(b.value);
630
+ let p = u(k.value);
631
+ b.value = i.filter((c) => c.id !== f.id);
632
+ const m = p == null ? void 0 : p.find((c) => c.key === "formContent");
633
+ m != null && m.contents && (p = p == null ? void 0 : p.map((c) => ((c == null ? void 0 : c.key) === "formContent" && (c.contents = i.filter((r) => r.id !== f.id)), c))), k.value = p;
634
+ }, B = (f) => {
635
+ let i = u(k.value);
636
+ const p = i == null ? void 0 : i.find((m) => m.key === "formFlex");
637
+ (p == null ? void 0 : p.contents) !== void 0 ? i = i == null ? void 0 : i.map((m) => ((m == null ? void 0 : m.key) === "formFlex" && (m.contents = f == null ? void 0 : f.isRowFlex), m)) : i.push({
638
+ key: "formFlex",
639
+ contents: f == null ? void 0 : f.isRowFlex
640
+ }), k.value = i;
641
+ };
642
+ return te(
643
+ () => [k.value, b.value],
644
+ () => {
645
+ let f = u(k.value);
646
+ const i = f == null ? void 0 : f.find((p) => (p == null ? void 0 : p.key) === "formContent");
647
+ i != null && i.contents ? (i.contents = b.value, f = f == null ? void 0 : f.map((p) => ((p == null ? void 0 : p.key) === "formContent" && (p.contents = b.value), p))) : f.push({
648
+ key: "formContent",
649
+ contents: b.value
650
+ }), e("change", f);
651
+ },
652
+ { deep: !0, immediate: !0 }
653
+ ), (f, i) => {
654
+ const p = Pe("el-button");
655
+ return V(), X("div", Ol, [
656
+ M("div", _l, [
657
+ M("div", Tl, [
658
+ i[1] || (i[1] = M("div", null, q("表单信息"), -1)),
659
+ Y(p, {
660
+ class: "blue-operate-button",
661
+ icon: "ele-Plus",
662
+ onClick: O
663
+ }, {
664
+ default: ne(() => i[0] || (i[0] = [
665
+ oe(q("新建"))
666
+ ])),
667
+ _: 1,
668
+ __: [0]
669
+ })
670
+ ]),
671
+ M("div", Dl, [
672
+ Y(ce, {
673
+ columns: s.value,
674
+ isShowPagination: !1,
675
+ isShowEdit: !1,
676
+ isMoveColumn: !1,
677
+ tableData: b.value,
678
+ onDeleteRow: $
679
+ }, null, 8, ["columns", "tableData"])
680
+ ]),
681
+ M("div", vl, [
682
+ i[3] || (i[3] = M("div", null, q("表单按钮"), -1)),
683
+ Y(p, {
684
+ class: "blue-operate-button",
685
+ icon: "ele-Plus",
686
+ onClick: A
687
+ }, {
688
+ default: ne(() => i[2] || (i[2] = [
689
+ oe(q("新建"))
690
+ ])),
691
+ _: 1,
692
+ __: [2]
693
+ })
694
+ ]),
695
+ M("div", Nl, [
696
+ Y(ce, {
697
+ columns: o.value,
698
+ isShowPagination: !1,
699
+ isShowEdit: !1,
700
+ isMoveColumn: !1,
701
+ tableData: h.value,
702
+ onDeleteRow: _
703
+ }, null, 8, ["columns", "tableData"])
704
+ ]),
705
+ i[4] || (i[4] = M("div", { class: "operate-title" }, [
706
+ M("div", null, q("表单布局"))
707
+ ], -1)),
708
+ M("div", El, [
709
+ Y(Oe, {
710
+ rowContents: n.value,
711
+ onChange: B
712
+ }, null, 8, ["rowContents"])
713
+ ])
714
+ ])
715
+ ]);
716
+ };
717
+ }
718
+ }, Sl = /* @__PURE__ */ ue(jl, [["__scopeId", "data-v-a36b8468"]]), Bl = { class: "extra-content" }, Fl = { key: 0 }, Ul = { key: 1 }, Jl = {
719
+ __name: "index",
720
+ props: {
721
+ itemData: {
722
+ type: Array,
723
+ default: () => []
724
+ },
725
+ childItemData: {
726
+ type: Array,
727
+ default: () => []
728
+ },
729
+ index: Number,
730
+ changedContent: {
731
+ type: Object,
732
+ default: () => {
733
+ }
734
+ }
735
+ },
736
+ emits: ["change"],
737
+ setup(t, { emit: a }) {
738
+ const l = t, e = w(0), n = w(), s = w(), o = a, h = w(!1), k = w({}), b = w({}), g = w();
739
+ te(
740
+ () => [l.itemData],
741
+ () => {
742
+ var c;
743
+ const m = u(l.itemData);
744
+ n.value = (c = u(m)) == null ? void 0 : c.map((r) => {
745
+ var d;
746
+ if (r.key === "extra") {
747
+ let C = [];
748
+ (d = r.value) == null || d.forEach((T) => {
749
+ var D;
750
+ C.push((D = Object.values(T)) == null ? void 0 : D[0]);
751
+ }), r.value = C;
752
+ }
753
+ return r;
754
+ });
755
+ },
756
+ { deep: !0, immediate: !0 }
757
+ );
758
+ const A = (m, c, r, d) => {
759
+ var T;
760
+ let C = {};
761
+ ((T = m == null ? void 0 : m[0]) == null ? void 0 : T.contents) === "详情" && (h.value = !0, C[c] = m, s.value = m == null ? void 0 : m.filter((D) => (D == null ? void 0 : D.key) !== "tableContentName"), k.value = C, b.value = r, g.value = d.id);
762
+ }, O = (m) => {
763
+ var D, x, J, v;
764
+ const c = (x = (D = Object.values(u(k.value))) == null ? void 0 : D[0]) == null ? void 0 : x.filter((N) => (N == null ? void 0 : N.key) === "tableContentName"), r = (v = (J = Object.values(u(k.value))) == null ? void 0 : J[0]) == null ? void 0 : v.filter((N) => (N == null ? void 0 : N.key) !== "tableContentName"), d = r == null ? void 0 : r.map((N, S) => {
765
+ var j;
766
+ return S === m.index && (N == null ? void 0 : N.comp) === "Table" && (N.compData = (j = N.compData) == null ? void 0 : j.map((E) => {
767
+ var y, F;
768
+ return (E == null ? void 0 : E.key) === "tableContents" && (E.contents = (F = (y = m.content) == null ? void 0 : y.map((P) => {
769
+ let L = {};
770
+ for (let I in P)
771
+ I !== "id" && (L[I] = P[I]);
772
+ return L;
773
+ })) == null ? void 0 : F.map((P) => Object.values(P))), E;
774
+ })), N;
775
+ });
776
+ d.unshift(c == null ? void 0 : c[0]);
777
+ let C = u(k.value), T = {};
778
+ for (let N in C)
779
+ T[N] = d;
780
+ k.value = T;
781
+ }, _ = () => {
782
+ h.value = !1, k.value = {}, b.value = {}, g.value = void 0, e.value++;
783
+ }, $ = (m) => {
784
+ var D, x, J, v;
785
+ const c = (x = (D = Object.values(u(k.value))) == null ? void 0 : D[0]) == null ? void 0 : x.filter((N) => (N == null ? void 0 : N.key) === "tableContentName"), r = (v = (J = Object.values(u(k.value))) == null ? void 0 : J[0]) == null ? void 0 : v.filter((N) => (N == null ? void 0 : N.key) !== "tableContentName"), d = r == null ? void 0 : r.map((N, S) => (S === m.index && (N.compData = m.contents), N));
786
+ d.unshift(c == null ? void 0 : c[0]);
787
+ let C = u(k.value), T = {};
788
+ for (let N in C)
789
+ T[N] = d;
790
+ k.value = T;
791
+ }, B = () => {
792
+ var c, r;
793
+ let m = {};
794
+ for (let d in b.value)
795
+ d === ((c = Object.keys(k.value)) == null ? void 0 : c[0]) ? m[d] = (r = Object.values(k.value)) == null ? void 0 : r[0] : m[d] = b.value[d];
796
+ o("change", {
797
+ buttonName: "编辑",
798
+ index: g.value,
799
+ singleContent: m
800
+ }, "methodData"), h.value = !1, k.value = {}, b.value = {}, g.value = void 0;
801
+ }, f = () => {
802
+ h.value = !1, k.value = {}, b.value = {}, g.value = void 0;
803
+ }, i = (m) => {
804
+ o("change", m, "methodData");
805
+ }, p = (m) => Ml(m);
806
+ return (m, c) => (V(), X(de, null, [
807
+ M("div", Bl, [
808
+ (V(!0), X(de, null, $e(n.value, (r, d) => (V(), X("div", { key: e.value }, [
809
+ (r == null ? void 0 : r.key) === "extra" ? (V(), X("div", Fl)) : (V(), X("div", Ul, [
810
+ (V(), De(ve(p(r.comp)), {
811
+ itemData: r == null ? void 0 : r.compData,
812
+ childItemData: r == null ? void 0 : r.itemChildData,
813
+ key: d,
814
+ index: (r == null ? void 0 : r.id) ?? d,
815
+ onContentClick: A,
816
+ onChange: i
817
+ }, null, 40, ["itemData", "childItemData", "index"]))
818
+ ]))
819
+ ]))), 128))
820
+ ]),
821
+ Y(al, {
822
+ visible: h.value,
823
+ onBeforeDestroy: f
824
+ }, {
825
+ default: ne(() => [
826
+ (V(!0), X(de, null, $e(s.value, (r, d) => (V(), X("div", {
827
+ key: d,
828
+ class: "extra-dialog"
829
+ }, [
830
+ (V(), De(ve(p(r.comp)), {
831
+ itemData: r == null ? void 0 : r.compData,
832
+ onChange: O,
833
+ childItemData: r == null ? void 0 : r.itemChildData,
834
+ key: d,
835
+ onContentChange: $,
836
+ index: (r == null ? void 0 : r.id) ?? d,
837
+ class: "extra-component"
838
+ }, null, 40, ["itemData", "childItemData", "index"]))
839
+ ]))), 128))
840
+ ]),
841
+ footer: ne(() => [
842
+ M("div", { class: "dialog-footer" }, [
843
+ M("div", {
844
+ class: "cancel-button footer-button",
845
+ onClick: _
846
+ }, q("取消")),
847
+ M("div", {
848
+ class: "confirm-button footer-button",
849
+ onClick: B
850
+ }, q("确认"))
851
+ ])
852
+ ]),
853
+ _: 1
854
+ }, 8, ["visible"])
855
+ ], 64));
856
+ }
857
+ }, Pl = /* @__PURE__ */ ue(Jl, [["__scopeId", "data-v-e3e0f29d"]]), Rl = { class: "method-content" }, wl = ["onClick"], Ll = {
858
+ __name: "index",
859
+ props: {
860
+ itemData: {
861
+ type: Array,
862
+ default: () => []
863
+ },
864
+ childItemData: {
865
+ type: Array,
866
+ default: () => []
867
+ },
868
+ index: Number,
869
+ changedContent: {
870
+ type: Object,
871
+ default: () => {
872
+ }
873
+ }
874
+ },
875
+ setup(t) {
876
+ const a = w([]), l = t, e = (s, o) => {
877
+ var k;
878
+ const h = (k = o == null ? void 0 : o[0]) == null ? void 0 : k.children;
879
+ return s == null ? void 0 : s.map((b) => {
880
+ var g;
881
+ return b = (g = b == null ? void 0 : b.map((A, O) => {
882
+ var _;
883
+ return {
884
+ key: (_ = h[O]) == null ? void 0 : _.label,
885
+ value: A
886
+ };
887
+ })) == null ? void 0 : g.filter((A) => A.key), b;
888
+ });
889
+ }, n = async (s) => {
890
+ var B, f, i, p, m, c;
891
+ let o = {};
892
+ if ((B = u(s.content)) == null || B.forEach((r, d) => {
893
+ var C, T, D, x, J, v, N, S, j, E, y, F, P, L, I, H, z;
894
+ if ((r == null ? void 0 : r.comp) === "Table") {
895
+ let Q = (x = (D = (T = (C = r == null ? void 0 : r.compData) == null ? void 0 : C.find((R) => (R == null ? void 0 : R.key) === "header")) == null ? void 0 : T.contents) == null ? void 0 : D[0]) == null ? void 0 : x.some((R) => R == null ? void 0 : R.children), Z = (N = (v = (J = r == null ? void 0 : r.compData) == null ? void 0 : J.find((R) => (R == null ? void 0 : R.key) === "tableContents")) == null ? void 0 : v.contents) == null ? void 0 : N.map((R) => R.slice(1)), U = (F = (y = (E = (j = (S = r == null ? void 0 : r.compData) == null ? void 0 : S.find((R) => (R == null ? void 0 : R.key) === "header")) == null ? void 0 : j.contents) == null ? void 0 : E[0]) == null ? void 0 : y[0]) == null ? void 0 : F.label, K = (I = (L = (P = r == null ? void 0 : r.compData) == null ? void 0 : P.find((R) => (R == null ? void 0 : R.key) === "header")) == null ? void 0 : L.contents) == null ? void 0 : I[0];
896
+ if (Q)
897
+ o[U] = e(Z, K);
898
+ else {
899
+ const R = [];
900
+ K = K.slice(1, K.length - 1), K == null || K.forEach((ee, pe) => {
901
+ Z == null || Z.forEach((se) => {
902
+ R.push({
903
+ key: ee.label + se[0],
904
+ value: se[pe + 1]
905
+ });
906
+ });
907
+ }), o["form" + d] = R;
908
+ }
909
+ } else {
910
+ const Q = (z = (H = r.compData) == null ? void 0 : H.find((U) => (U == null ? void 0 : U.key) === "formContent")) == null ? void 0 : z.contents;
911
+ o.form = {};
912
+ const Z = [];
913
+ Q == null || Q.forEach((U) => {
914
+ U.key !== "" && (U = {
915
+ key: U == null ? void 0 : U.key,
916
+ value: U == null ? void 0 : U.value
917
+ }, Z.push(U));
918
+ }), o.form = Z;
919
+ }
920
+ }), s.api) {
921
+ const r = await rl.post(s.api, {
922
+ data: o,
923
+ templateFileName: (f = s == null ? void 0 : s.extraContent) == null ? void 0 : f[0]
924
+ }, {
925
+ responseType: "blob",
926
+ // 必须设置
927
+ headers: {
928
+ "Content-Type": "application/json"
929
+ }
930
+ });
931
+ var h = new Blob([r.data], {
932
+ type: "application/octet-stream;charset=UTF-8"
933
+ }), k = r.headers["content-disposition"], b = new RegExp("filename=([^;]+\\.[^\\.;]+);*"), g = b.exec(k), A = ((m = (p = (i = s == null ? void 0 : s.extraContent) == null ? void 0 : i[0]) == null ? void 0 : p.split(".")) == null ? void 0 : m[0]) + "." + ((c = g[1].split(".")) == null ? void 0 : c[1]), O = document.createElement("a"), _ = window.URL.createObjectURL(h), $ = /^["](.*)["]$/g;
934
+ O.style.display = "none", O.href = _, O.download = decodeURI(A.replace($, "$1")), document.body.appendChild(O), O.click(), document.body.removeChild(O), window.URL.revokeObjectURL(_);
935
+ }
936
+ };
937
+ return te(
938
+ () => l.itemData,
939
+ async () => {
940
+ const s = u(l.itemData), o = s == null ? void 0 : s.map(async (k) => {
941
+ var $, B, f, i, p, m;
942
+ const g = ($ = (await Ne({
943
+ key: {
944
+ systemKey: sessionStorage.getItem("systemKey"),
945
+ parentTable: "",
946
+ type: "method",
947
+ methodName: k.method
948
+ }
949
+ })).data.result) == null ? void 0 : $[0], A = await Ne({
950
+ key: {
951
+ systemKey: sessionStorage.getItem("systemKey"),
952
+ type: "methodData",
953
+ tableId: g.id
954
+ }
955
+ }), O = await el((B = k == null ? void 0 : k.value) == null ? void 0 : B[0], sessionStorage.getItem("systemKey"), ""), _ = (f = A.data.result) == null ? void 0 : f[0];
956
+ return {
957
+ buttonName: (i = g == null ? void 0 : g.key) == null ? void 0 : i.methodKey,
958
+ api: (m = (p = _ == null ? void 0 : _.value) == null ? void 0 : p.tableData) == null ? void 0 : m[0],
959
+ content: O == null ? void 0 : O.filter((c) => c.comp !== "methodButton"),
960
+ extraContent: u(k.value).slice(1)
961
+ };
962
+ }), h = await Promise.all(o);
963
+ a.value = h;
964
+ },
965
+ { immediate: !0, deep: !0 }
966
+ ), (s, o) => (V(), X("div", Rl, [
967
+ (V(!0), X(de, null, $e(a.value, (h) => (V(), X("div", null, [
968
+ h.api !== "" ? (V(), X("div", {
969
+ key: 0,
970
+ onClick: (k) => n(h),
971
+ class: "method-buttons"
972
+ }, q(h.buttonName), 9, wl)) : tl("", !0)
973
+ ]))), 256))
974
+ ]));
975
+ }
976
+ }, Gl = /* @__PURE__ */ ue(Ll, [["__scopeId", "data-v-2c8ddfa4"]]), zt = w([
977
+ {
978
+ name: "表格",
979
+ type: "table",
980
+ comp: "Table",
981
+ icon: "Grid"
982
+ },
983
+ {
984
+ name: "表单",
985
+ type: "form",
986
+ comp: "Form",
987
+ icon: "Film"
988
+ },
989
+ {
990
+ name: "折叠",
991
+ type: "fold",
992
+ comp: "Fold",
993
+ icon: "Fold"
994
+ },
995
+ {
996
+ name: "头像",
997
+ type: "avatar",
998
+ comp: "Avatar",
999
+ icon: "Avatar"
1000
+ }
1001
+ ]), Wl = {
1002
+ TABLE: ll,
1003
+ FORM: fl,
1004
+ TableOperate: xl,
1005
+ FormOperate: Sl,
1006
+ FOLD: sl,
1007
+ CALCULATOR: Pl,
1008
+ METHODBUTTON: Gl,
1009
+ AVATARUPLOAD: ol
1010
+ // 添加其他组件...
1011
+ };
1012
+ function Ml(t) {
1013
+ return Wl[t == null ? void 0 : t.toUpperCase()] || null;
1014
+ }
1015
+ const W = [
1016
+ {
1017
+ key: "FormName",
1018
+ value: "Form"
1019
+ },
1020
+ {
1021
+ key: "TableName",
1022
+ value: "Table"
1023
+ },
1024
+ {
1025
+ key: "MenuName",
1026
+ value: "Menu"
1027
+ },
1028
+ {
1029
+ key: "GroupName",
1030
+ value: "Group"
1031
+ },
1032
+ {
1033
+ key: "SystemKey",
1034
+ value: "System"
1035
+ }
1036
+ ], G = [
1037
+ {
1038
+ key: "FormDirect",
1039
+ value: "formFlex"
1040
+ },
1041
+ {
1042
+ key: "Form",
1043
+ value: "formContent"
1044
+ },
1045
+ {
1046
+ key: "FormButton",
1047
+ value: "formButton"
1048
+ },
1049
+ {
1050
+ key: "FormFlex",
1051
+ value: "formWrap"
1052
+ },
1053
+ {
1054
+ key: "TableColumns",
1055
+ value: "header"
1056
+ },
1057
+ {
1058
+ key: "TableButton",
1059
+ value: "extraButton"
1060
+ },
1061
+ {
1062
+ key: "TableLineButton",
1063
+ value: "rowButton"
1064
+ },
1065
+ {
1066
+ key: "Table",
1067
+ value: "tableContents"
1068
+ },
1069
+ {
1070
+ key: "TableIndex",
1071
+ value: "tableIndex"
1072
+ },
1073
+ {
1074
+ key: "Menus",
1075
+ value: "menuContents"
1076
+ },
1077
+ {
1078
+ key: "GroupContents",
1079
+ value: "groupContents"
1080
+ }
1081
+ ], ae = w(0), Il = (t) => {
1082
+ const [a, l] = t.split(/=(.+)/), e = a.replace(/['"]/g, "").trim(), n = l.replace(/^['"]|['"]$/g, "");
1083
+ return { key: e, value: n };
1084
+ }, ye = (t) => {
1085
+ try {
1086
+ return JSON.parse(t), !0;
1087
+ } catch {
1088
+ return !1;
1089
+ }
1090
+ }, zl = (t) => t.includes("$") && t.trim().endsWith("(") ? t + ")" : t, Hl = (t) => {
1091
+ let a = t;
1092
+ const l = [];
1093
+ let e = "";
1094
+ for (const n of a)
1095
+ n.includes("{") || e.includes("{") || n.includes("[") || e.includes("[") || n.includes("【") || e.includes("【") || n.includes("(") || e.includes("(") || n.includes("(") || e.includes("(") || n.includes("/*") || e.includes("/*") ? (e += n.trim(), u(e).split("{").length - 1 === u(e).split("}").length - 1 && u(e).split("【").length - 1 === u(e).split("】").length - 1 && u(e).split("[").length - 1 === u(e).split("]").length - 1 && u(e).split("(").length - 1 === u(e).split(")").length - 1 && u(e).split("(").length - 1 === u(e).split(")").length - 1 && u(e).split("/*").length - 1 === u(e).split("*/").length - 1 && (l.push(e), e = "")) : l.push(n.trim());
1096
+ return l == null ? void 0 : l.filter((n) => n.includes("{"));
1097
+ }, Zl = (t) => {
1098
+ var l;
1099
+ let a = [];
1100
+ return (l = Hl(t.slice(1, -1))) == null || l.forEach((e) => {
1101
+ var s, o, h, k;
1102
+ let n = ((o = (s = e.slice(1, -1)) == null ? void 0 : s.split(",")) == null ? void 0 : o.length) ?? 1;
1103
+ (k = (h = e.slice(1, -1)) == null ? void 0 : h.split(",")) == null || k.forEach((b) => {
1104
+ var _, $, B, f, i, p, m, c, r, d, C, T, D;
1105
+ let g = b == null ? void 0 : b.split(":"), A = g != null && g[0] ? (g == null ? void 0 : g[1].split("$").length) - 1 === 1 ? ((_ = g == null ? void 0 : g[0]) == null ? void 0 : _.replace(/^"(.*)"$/, "$1")) + (($ = g == null ? void 0 : g[1]) == null ? void 0 : $.replace(/^"(.*)"$/, "$1")) : Array.isArray((f = (B = g == null ? void 0 : g[1]) == null ? void 0 : B.replace(/^"(.*)"$/, "$1")) == null ? void 0 : f.split("(")) && ((m = (p = (i = g == null ? void 0 : g[1]) == null ? void 0 : i.replace(/^"(.*)"$/, "$1")) == null ? void 0 : p.split("(")) == null ? void 0 : m.length) > 1 ? ((c = g == null ? void 0 : g[0]) == null ? void 0 : c.replace(/^"(.*)"$/, "$1")) + ((C = (d = (r = g == null ? void 0 : g[1]) == null ? void 0 : r.replace(/^"(.*)"$/, "$1")) == null ? void 0 : d.split("(")) == null ? void 0 : C[0]) + "()" : (T = g == null ? void 0 : g[0]) == null ? void 0 : T.replace(/^"(.*)"$/, "$1") : "", O = (g == null ? void 0 : g[1].split("$").length) - 1 === 0 ? (D = g == null ? void 0 : g[1]) == null ? void 0 : D.replace(/^"(.*)"$/, "$1") : "";
1106
+ ae.value++, a.push({
1107
+ id: ae.value,
1108
+ key: A,
1109
+ value: O,
1110
+ // 如果值为空,则key设为空字符串,否则保留原值
1111
+ width: n,
1112
+ extraContent: g == null ? void 0 : g[1]
1113
+ });
1114
+ });
1115
+ }), a;
1116
+ }, we = (t) => {
1117
+ var a, l;
1118
+ try {
1119
+ const e = t.replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",").replace(/:/g, ":").replace(/:\s*(?=,|}|$)/g, ': ""');
1120
+ if (u(e).split("{").length - 1 > 1) {
1121
+ let n = u(e).replace(/^\{(.*)\}$/, "[$1]");
1122
+ if (ye(n) && !n.includes("$") || (n = n.replace(/"([^"]+)"\$([\w\u4e00-\u9fa5]+\([^)]*\))/g, '"$1$$$2"')), ye(n)) {
1123
+ const s = JSON.parse(n);
1124
+ let o = [];
1125
+ return s == null || s.forEach((h) => {
1126
+ var k;
1127
+ (k = Object.entries(u(h))) == null || k.forEach((b) => {
1128
+ ae.value++, o.push({
1129
+ id: ae.value,
1130
+ key: (b == null ? void 0 : b[0]) ?? "",
1131
+ value: (b == null ? void 0 : b[1]) === "" ? "" : b == null ? void 0 : b[1],
1132
+ // 如果值为空,则key设为空字符串,否则保留原值
1133
+ width: Object.keys(u(h)).length
1134
+ });
1135
+ });
1136
+ }), o;
1137
+ } else
1138
+ return e.trim().startsWith("{{") ? Zl(e.trim()) : ke(n);
1139
+ } else if (ye(e)) {
1140
+ const n = JSON.parse(e);
1141
+ return Object.entries(n).map(([s, o]) => (ae.value++, {
1142
+ id: ae.value,
1143
+ key: s,
1144
+ value: o === "" ? "" : o,
1145
+ // 如果值为空,则key设为空字符串,否则保留原值
1146
+ width: 1
1147
+ }));
1148
+ } else
1149
+ return ((a = ke(e)) == null ? void 0 : a.length) === 0 ? e : (l = ke(e)) == null ? void 0 : l.map((n) => ({
1150
+ label: n.label,
1151
+ method: zl(n.method)
1152
+ }));
1153
+ } catch (e) {
1154
+ return console.error("转换失败:", e), [];
1155
+ }
1156
+ }, ke = (t) => {
1157
+ t = t.trim().replace(/^\{|\}$/g, "").trim();
1158
+ const a = [];
1159
+ let l = 0;
1160
+ for (; l < t.length; ) {
1161
+ const e = t.slice(l).match(/^\s*"([^"]+)"\s*:\s*/);
1162
+ if (!e) break;
1163
+ const n = e[1];
1164
+ l += e[0].length;
1165
+ let s = "", o = 0, h = !1, k = "";
1166
+ for (let b = l; b < t.length; b++) {
1167
+ const g = t[b];
1168
+ if ((g === '"' || g === "'") && !h ? (h = !0, k = g) : g === k && h && (h = !1, k = ""), !h && ((g === "{" || g === "(" || g === "[") && o++, (g === "}" || g === ")" || g === "]") && o--, g === "," && o === 0 || b === t.length - 1)) {
1169
+ s = t.slice(l, b + 1).trim(), l = b + 1;
1170
+ break;
1171
+ }
1172
+ }
1173
+ a.push({
1174
+ label: n,
1175
+ method: s
1176
+ });
1177
+ }
1178
+ return a;
1179
+ }, Kl = (t, a) => {
1180
+ try {
1181
+ if (W != null && W.find((l) => (l == null ? void 0 : l.key) === a))
1182
+ return t.replace(/['"]/g, "").trim();
1183
+ if (u(t).split("[").length - 1 > 1) {
1184
+ const l = u(t).replace(/[’]|[‘]|[']/g, '"').replaceAll(/,/g, ",").replaceAll("(", "[").replaceAll(")", "]").replaceAll("],]", "]]");
1185
+ return JSON.parse(l);
1186
+ } else {
1187
+ const l = u(t).replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",");
1188
+ if (ye(l)) {
1189
+ const e = JSON.parse(l);
1190
+ return Array.isArray(e) ? e.map((n) => ({ label: n })) : e;
1191
+ } else
1192
+ return we(u(t));
1193
+ }
1194
+ } catch (l) {
1195
+ return console.error("解析失败:", l), t;
1196
+ }
1197
+ }, Vl = (t) => ({ [t == null ? void 0 : t.key]: Kl(t == null ? void 0 : t.value, t == null ? void 0 : t.key) }), ql = (t) => {
1198
+ try {
1199
+ if (u(t).split("[").length - 1 > 1) {
1200
+ const a = u(t).replace(/[’]|[‘]|[']/g, '"').replaceAll(/,/g, ",").replaceAll("(", "[").replaceAll(")", "]").replaceAll("],]", "]]");
1201
+ return JSON.parse(a);
1202
+ } else
1203
+ return JSON.parse(u(t).replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",")).map((l) => ({ label: l }));
1204
+ } catch (a) {
1205
+ return console.error("解析失败:", a), t;
1206
+ }
1207
+ }, Ql = (t) => {
1208
+ const a = t.match(/\(([^)]+)\)/);
1209
+ return a ? a[1] : "";
1210
+ }, Xl = (t) => {
1211
+ const a = t.match(/^([^(]+)\s*\(/);
1212
+ return a ? a[1].trim() : t;
1213
+ }, Ee = (t) => t.replace(/'/g, "").replace(/"/g, "").replace(/{|}/g, "").split(":").map((a) => a.trim()).filter((a) => a).join("/"), Yl = (t) => {
1214
+ var o, h;
1215
+ let a = [], l = [];
1216
+ const e = (o = u(t)) == null ? void 0 : o.map((k) => k == null ? void 0 : k.key), n = [...new Set((h = u(e)) == null ? void 0 : h.map((k) => Ql(k)))];
1217
+ n == null || n.forEach((k) => {
1218
+ let b = t == null ? void 0 : t.filter((O) => O.key.includes(k));
1219
+ b == null || b.forEach((O) => {
1220
+ O != null && O.key.includes("Menus") && (a.push({
1221
+ key: "GroupName",
1222
+ value: Ee(O == null ? void 0 : O.value)
1223
+ }), l.push(Ee(O == null ? void 0 : O.value)));
1224
+ });
1225
+ let g = t == null ? void 0 : t.filter((O) => O.key.includes(k) && !(O != null && O.key.includes("Menus")));
1226
+ g = g == null ? void 0 : g.map((O) => (O.key = Xl(O.key), O));
1227
+ const A = {
1228
+ key: "GroupContents",
1229
+ value: g
1230
+ };
1231
+ a.push(A);
1232
+ });
1233
+ const s = {
1234
+ key: "Menus",
1235
+ value: l
1236
+ };
1237
+ return a.unshift(s), a;
1238
+ }, Le = (t) => {
1239
+ var a, l;
1240
+ if (Array.isArray(Object.keys(t)) && ((a = Object.keys(t)) == null ? void 0 : a.length) > 0) {
1241
+ let e = [];
1242
+ return (l = Object.entries(t)) == null || l.forEach(([n, s]) => {
1243
+ var h, k;
1244
+ let o = [];
1245
+ if (o.push(n), ((h = Object.keys(s)) == null ? void 0 : h.length) > 0) {
1246
+ let b = [];
1247
+ (k = Le(s)) == null || k.forEach((g) => {
1248
+ b.push(g);
1249
+ }), b == null || b.forEach((g) => {
1250
+ o.push(g);
1251
+ });
1252
+ }
1253
+ e.push(o);
1254
+ }), e;
1255
+ }
1256
+ }, et = (t, a) => {
1257
+ var e;
1258
+ let l = a;
1259
+ return Array.isArray(Object.keys(t)) && ((e = Object.entries(t)) == null || e.forEach(([n, s]) => {
1260
+ let o = [n];
1261
+ if (typeof s == "object" && s !== null) {
1262
+ let h = Le(s);
1263
+ h == null || h.forEach((k) => {
1264
+ o.push(k);
1265
+ });
1266
+ }
1267
+ l.push(o);
1268
+ })), l;
1269
+ }, lt = (t) => {
1270
+ const a = {};
1271
+ return t.forEach((e) => {
1272
+ const n = e.split("/");
1273
+ let s = a;
1274
+ n.forEach((o) => {
1275
+ s[o] || (s[o] = {}), s = s[o];
1276
+ });
1277
+ }), et(a, []);
1278
+ }, Ge = (t) => lt(t), Ht = (t) => {
1279
+ var a, l, e, n, s, o, h, k;
1280
+ try {
1281
+ const b = Te((l = (a = u(t)) == null ? void 0 : a.replace("(", "(")) == null ? void 0 : l.replace(")", ")")), g = (n = (e = u(b)) == null ? void 0 : e.filter(($) => !$.includes("/*"))) == null ? void 0 : n.map(($) => Il($)), A = Yl(g), O = [];
1282
+ if (((s = A == null ? void 0 : A.find(($) => ($ == null ? void 0 : $.key) === "Menus")) == null ? void 0 : s.value.length) === 0)
1283
+ return !1;
1284
+ (o = u(A)) == null || o.forEach(($) => {
1285
+ var B, f, i, p, m;
1286
+ W != null && W.find((c) => {
1287
+ var r, d;
1288
+ return ((r = c == null ? void 0 : c.key) == null ? void 0 : r.toUpperCase()) === ((d = $ == null ? void 0 : $.key) == null ? void 0 : d.toUpperCase());
1289
+ }) ? O.push({
1290
+ comp: ((B = W == null ? void 0 : W.find((c) => {
1291
+ var r, d;
1292
+ return ((r = c == null ? void 0 : c.key) == null ? void 0 : r.toUpperCase()) === ((d = $ == null ? void 0 : $.key) == null ? void 0 : d.toUpperCase());
1293
+ })) == null ? void 0 : B.value) ?? "",
1294
+ name: (f = $ == null ? void 0 : $.value) == null ? void 0 : f.replace(/[’]|[‘]|[']/g, ""),
1295
+ compData: []
1296
+ }) : G != null && G.find((c) => {
1297
+ var r, d;
1298
+ return ((r = c == null ? void 0 : c.key) == null ? void 0 : r.toUpperCase()) === ((d = $ == null ? void 0 : $.key) == null ? void 0 : d.toUpperCase());
1299
+ }) && ((O == null ? void 0 : O.length) === 0 && (i = $.key) != null && i.includes("Menus") && O.push({
1300
+ comp: "Menu",
1301
+ name: "",
1302
+ compData: []
1303
+ }), (p = O == null ? void 0 : O[(O == null ? void 0 : O.length) - 1]) != null && p.compData && O[(O == null ? void 0 : O.length) - 1].compData.push({
1304
+ key: (m = G == null ? void 0 : G.find((c) => {
1305
+ var r, d;
1306
+ return ((r = c == null ? void 0 : c.key) == null ? void 0 : r.toUpperCase()) === ((d = $ == null ? void 0 : $.key) == null ? void 0 : d.toUpperCase());
1307
+ })) == null ? void 0 : m.value,
1308
+ contents: $ == null ? void 0 : $.value
1309
+ }));
1310
+ });
1311
+ let _ = (h = u(O)) == null ? void 0 : h.map(($) => {
1312
+ var B;
1313
+ return $ != null && $.compData && ($.compData = (B = $ == null ? void 0 : $.compData) == null ? void 0 : B.map((f) => {
1314
+ var i, p, m, c, r, d, C, T, D, x, J;
1315
+ if ((f == null ? void 0 : f.key) === "formFlex")
1316
+ f.contents = ((p = (i = f.contents) == null ? void 0 : i.replace(/[’]|[‘]|[']/g, "")) == null ? void 0 : p.toUpperCase()) !== "Vertical".toUpperCase();
1317
+ else if ((f == null ? void 0 : f.key) === "groupContents")
1318
+ f.contents = (m = u(f.contents)) == null ? void 0 : m.map((v) => Vl(u(v)));
1319
+ else if (Array.isArray(f == null ? void 0 : f.contents))
1320
+ f.contents = Ge(f.contents);
1321
+ else if (((r = (c = f == null ? void 0 : f.contents) == null ? void 0 : c.trim()) != null && r.startsWith("[") || (C = (d = f.contents) == null ? void 0 : d.trim()) != null && C.startsWith("【")) && ((D = (T = f.contents) == null ? void 0 : T.trim()) != null && D.endsWith("]") || (J = (x = f.contents) == null ? void 0 : x.trim()) != null && J.endsWith("】")))
1322
+ f.contents = ql(u(f.contents));
1323
+ else {
1324
+ if (!f.contents) return;
1325
+ f.contents = we(u(f.contents));
1326
+ }
1327
+ return f;
1328
+ })), $;
1329
+ });
1330
+ return _ = (k = u(_)) == null ? void 0 : k.map(($) => {
1331
+ var B;
1332
+ return ($ == null ? void 0 : $.comp) === "Group" && ($.compData = (B = $.compData) == null ? void 0 : B.map((f) => {
1333
+ var p;
1334
+ let i = [];
1335
+ return (p = f.contents) == null || p.forEach((m) => {
1336
+ var c, r, d, C, T, D, x, J, v, N, S, j;
1337
+ if (W != null && W.find((E) => {
1338
+ var y, F, P;
1339
+ return ((y = E == null ? void 0 : E.key) == null ? void 0 : y.toUpperCase()) === ((P = (F = Object.keys(m)) == null ? void 0 : F[0]) == null ? void 0 : P.toUpperCase());
1340
+ }))
1341
+ i.push({
1342
+ comp: (c = W == null ? void 0 : W.find((E) => {
1343
+ var y, F, P;
1344
+ return ((y = E == null ? void 0 : E.key) == null ? void 0 : y.toUpperCase()) === ((P = (F = Object.keys(m)) == null ? void 0 : F[0]) == null ? void 0 : P.toUpperCase());
1345
+ })) == null ? void 0 : c.value,
1346
+ name: (d = (r = Object.values(m)) == null ? void 0 : r[0]) == null ? void 0 : d.replace(/[’]|[‘]|[']/g, ""),
1347
+ compData: []
1348
+ });
1349
+ else if (G != null && G.find((E) => {
1350
+ var y, F, P;
1351
+ return ((y = E == null ? void 0 : E.key) == null ? void 0 : y.toUpperCase()) === ((P = (F = Object.keys(m)) == null ? void 0 : F[0]) == null ? void 0 : P.toUpperCase());
1352
+ })) {
1353
+ if ((i == null ? void 0 : i.length) === 0) return;
1354
+ (C = i == null ? void 0 : i[(i == null ? void 0 : i.length) - 1]) != null && C.compData && i[(i == null ? void 0 : i.length) - 1].compData.push({
1355
+ key: (T = G == null ? void 0 : G.find((E) => {
1356
+ var y, F, P;
1357
+ return ((y = E == null ? void 0 : E.key) == null ? void 0 : y.toUpperCase()) === ((P = (F = Object.keys(m)) == null ? void 0 : F[0]) == null ? void 0 : P.toUpperCase());
1358
+ })) == null ? void 0 : T.value,
1359
+ contents: (D = Object.values(m)) == null ? void 0 : D[0]
1360
+ });
1361
+ } else if ((J = (x = Object.keys(m)) == null ? void 0 : x[0]) != null && J.includes("$")) {
1362
+ const E = (N = (v = Object.keys(u(m))) == null ? void 0 : v[0]) == null ? void 0 : N.split("$");
1363
+ i[(i == null ? void 0 : i.length) - 1].compData.push({
1364
+ key: (S = G == null ? void 0 : G.find((y) => {
1365
+ var F, P;
1366
+ return ((F = y == null ? void 0 : y.key) == null ? void 0 : F.toUpperCase()) === ((P = E == null ? void 0 : E[0]) == null ? void 0 : P.toUpperCase());
1367
+ })) == null ? void 0 : S.value,
1368
+ contents: (j = Object.values(m)) == null ? void 0 : j[0],
1369
+ selectLabel: E == null ? void 0 : E[1]
1370
+ });
1371
+ }
1372
+ return m;
1373
+ }), f.contents = i, f;
1374
+ })), $;
1375
+ }), _;
1376
+ } catch {
1377
+ return !1;
1378
+ }
1379
+ }, le = (t) => {
1380
+ try {
1381
+ return JSON.parse(t), !0;
1382
+ } catch {
1383
+ return !1;
1384
+ }
1385
+ }, je = w(0), We = (t) => {
1386
+ const a = [];
1387
+ let l = null;
1388
+ for (let e = 0; e < t.length; e++) {
1389
+ const n = t[e];
1390
+ if (Array.isArray(n))
1391
+ l && (l.children = We(n));
1392
+ else {
1393
+ const s = { label: n };
1394
+ a.push(s), l = s;
1395
+ }
1396
+ }
1397
+ return a;
1398
+ }, Me = (t) => {
1399
+ let a = 0;
1400
+ for (const l of t)
1401
+ a++, l.children && (a += Me(l.children));
1402
+ return a;
1403
+ }, Ie = (t, a, l = []) => {
1404
+ let e = 0;
1405
+ for (const n of a) {
1406
+ if (e >= t.length) break;
1407
+ const s = [...t[e]];
1408
+ if (l.push(s), e++, n.children && n.children.length > 0) {
1409
+ const o = [];
1410
+ Ie(
1411
+ t.slice(e),
1412
+ n.children,
1413
+ o
1414
+ ), o.length > 0 && (s.push(o), e += Me(n.children));
1415
+ }
1416
+ }
1417
+ return l;
1418
+ }, tt = (t, a) => {
1419
+ let l = [];
1420
+ return t == null || t.forEach((n) => {
1421
+ n.some((s) => Array.isArray(s)) ? l.push(...n) : l.push(n);
1422
+ }), Ie(l, a);
1423
+ }, Ae = (t) => {
1424
+ const a = { label: t[0].trim() };
1425
+ if (t.length > 1) {
1426
+ const l = t.slice(1);
1427
+ l.length === 1 && Array.isArray(l[0]) ? a.children = l[0].map(
1428
+ (e) => Array.isArray(e) ? Ae(e) : { label: e.trim() }
1429
+ ) : a.children = l.map(
1430
+ (e) => Array.isArray(e) ? Ae(e) : { label: e.trim() }
1431
+ );
1432
+ }
1433
+ return a;
1434
+ }, Se = (t) => {
1435
+ let a = t.replace(/:([^{}\[\],\s]+)([,\]}])/g, ':"$1"$2');
1436
+ return a = a.replace(/:}(?=,|]|}|$)/g, ':""}'), a = a.replace(/:,(?=\s*")/g, ':"",'), a = a.replace(
1437
+ /(https?|HTTPS?):"\/\/([^"]+)"/gi,
1438
+ (l, e, n) => `"${e}://${n}"`
1439
+ ), a = a.replace(
1440
+ /(\[|\s|,)((?:https?|HTTPS?):\/\/[^\s,\]]+)(\]|,|$)/gi,
1441
+ '$1"$2"$3'
1442
+ ), a;
1443
+ }, nt = (t) => {
1444
+ var l;
1445
+ return t.some((e) => !Array.isArray(e)) ? t : (l = u(t)) == null ? void 0 : l.map((e) => {
1446
+ let n = [];
1447
+ return e.some((s) => Array.isArray(s)) ? e == null || e.forEach((s) => {
1448
+ Array.isArray(s) && n.push(Ae(s));
1449
+ }) : e.some((s) => s.includes("[")) ? n.push(e) : n = e.map((s) => ({ label: s.trim() })), n;
1450
+ });
1451
+ }, ze = (t, a, l) => {
1452
+ let e = t, n = l, s = a;
1453
+ return s.children && (Array.isArray(n[n.length - 1]) ? n[n.length - 1].push(e[0]) : n.push(e[0]), e.shift(), s = s.children), Array.isArray(s) && s.forEach((o) => {
1454
+ if (o.children) {
1455
+ const h = ze(e, o, n);
1456
+ n = h[0], e = h[1];
1457
+ }
1458
+ }), [n, e];
1459
+ }, at = (t, a) => {
1460
+ let l = t, e = [];
1461
+ return a.length > 0 ? a == null || a.forEach((n) => {
1462
+ let s = l == null ? void 0 : l[0];
1463
+ l.shift();
1464
+ const o = ze(u(l), n, s);
1465
+ s = o[0], l = o[1], e.push(s);
1466
+ }) : e = l, e;
1467
+ }, _e = (t, a) => {
1468
+ const l = nt(u(t));
1469
+ return at(l, a);
1470
+ }, st = (t) => {
1471
+ const a = [];
1472
+ let l = 0;
1473
+ const e = t.length;
1474
+ for (; l < e; ) {
1475
+ const n = t[l];
1476
+ n.key === "tableColumns" && l + 1 < e && t[l + 1].key === "tableContents" ? (a.push({
1477
+ comp: "Table",
1478
+ compData: [n, t[l + 1]],
1479
+ name: ""
1480
+ }), l += 2) : (a.push(n), l += 1);
1481
+ }
1482
+ return a;
1483
+ }, He = (t) => _e([t], []), rt = (t) => {
1484
+ const a = [];
1485
+ return t == null || t.forEach((l) => l == null ? void 0 : l.forEach((n) => {
1486
+ var s, o;
1487
+ je.value++, a.push({
1488
+ id: je.value,
1489
+ key: (s = Object.keys(n)) == null ? void 0 : s[0],
1490
+ value: (o = Object.values(n)) == null ? void 0 : o[0],
1491
+ // 如果值为空,则key设为空字符串,否则保留原值
1492
+ width: l.length
1493
+ });
1494
+ })), a;
1495
+ }, Be = (t) => {
1496
+ let a = st(t);
1497
+ return a = a == null ? void 0 : a.map((l) => {
1498
+ var e, n, s;
1499
+ if (l.comp === "Table")
1500
+ (e = l.compData) != null && e.find((o) => (o == null ? void 0 : o.key) === "header") || (l.compData = (n = l.compData) == null ? void 0 : n.map((o) => (o.key === "tableColumns" ? o = {
1501
+ key: "header",
1502
+ contents: _e(o.value, [])
1503
+ } : o = {
1504
+ key: o.key,
1505
+ contents: o.value
1506
+ }, o)), l.compData.push({
1507
+ key: "extraButton",
1508
+ contents: [{ label: "新增" }]
1509
+ }), l.compData.push({
1510
+ key: "rowButton",
1511
+ contents: [{ label: "查看" }, { label: "编辑" }, { label: "删除" }]
1512
+ }));
1513
+ else if (l.key === "form") {
1514
+ const o = (s = l == null ? void 0 : l.value) == null ? void 0 : s.map((h) => (Array.isArray(h) || (h = [h]), h));
1515
+ l = {
1516
+ comp: "Form",
1517
+ compData: [
1518
+ {
1519
+ key: "formFlex",
1520
+ contents: ""
1521
+ },
1522
+ {
1523
+ key: "formContent",
1524
+ contents: rt(o)
1525
+ }
1526
+ ],
1527
+ name: ""
1528
+ };
1529
+ }
1530
+ return l;
1531
+ }), a;
1532
+ }, ot = (t, a) => {
1533
+ var h, k, b, g, A, O;
1534
+ const l = [], e = We((k = (h = t == null ? void 0 : t.find((_) => _.key === "tableIndex")) == null ? void 0 : h.value) == null ? void 0 : k[0]);
1535
+ l.push({
1536
+ key: "tableIndexColumn",
1537
+ contents: a
1538
+ }), l.push({
1539
+ key: "tableIndex",
1540
+ contents: e
1541
+ });
1542
+ let n = [];
1543
+ const s = (b = t == null ? void 0 : t.find((_) => _.key === "tableColumns")) == null ? void 0 : b.value;
1544
+ s.length === 1 && !(s != null && s[0].some((_) => Array.isArray(_))) ? n = (g = s == null ? void 0 : s[0]) == null ? void 0 : g.map((_) => ({ label: _ })) : n = _e((A = t == null ? void 0 : t.find((_) => _.key === "tableColumns")) == null ? void 0 : A.value, e), l.push({
1545
+ key: "header",
1546
+ contents: n
1547
+ });
1548
+ const o = tt((O = t == null ? void 0 : t.find((_) => _.key === "tableContents")) == null ? void 0 : O.value, e);
1549
+ return l.push({
1550
+ key: "tableContents",
1551
+ contents: o
1552
+ }), l.push({
1553
+ key: "extraButton",
1554
+ contents: [{ label: "新增" }]
1555
+ }), l.push({
1556
+ key: "rowButton",
1557
+ contents: [{ label: "查看" }, { label: "编辑" }, { label: "删除" }]
1558
+ }), l;
1559
+ }, Ze = (t) => t.replace(/"([^"]+)"\s*==\s*(\[[^\]]+\])/g, (a, l, e) => {
1560
+ const n = Ze(e);
1561
+ return `"${l}",${n}`;
1562
+ }), fe = (t) => {
1563
+ const a = t.replace(/"([^"]+)"\s*==\s*(\[[^\]]+\])/g, '"$1",$2');
1564
+ return Ze(a).replace(/^"(.*)"$/, "$1");
1565
+ }, ct = (t) => {
1566
+ const a = /* @__PURE__ */ new Set();
1567
+ return t.filter((l) => {
1568
+ const e = JSON.stringify(l);
1569
+ return a.has(e) ? !1 : a.add(e);
1570
+ });
1571
+ }, Fe = (t) => {
1572
+ var l;
1573
+ let a = [];
1574
+ return (l = u(t)) == null || l.forEach((e) => {
1575
+ var n;
1576
+ (n = e.contents) == null || n.forEach((s) => {
1577
+ a.push(s);
1578
+ });
1579
+ }), a = ct(a), a.push({
1580
+ label: "操作"
1581
+ }), [a];
1582
+ }, ut = (t, a) => t.reduce((l, e, n) => {
1583
+ const s = Math.floor(n / a);
1584
+ return l[s] || (l[s] = []), l[s].push(e), l;
1585
+ }, []), Ke = (t) => t.reduce((a, l) => l.children && l.children.length > 0 ? a + Ke(l.children) : a + 1, 0), pt = (t, a) => {
1586
+ var e;
1587
+ let l = [];
1588
+ return (e = ut(t, Ke(a == null ? void 0 : a[0]) - 1)) == null || e.forEach((n) => {
1589
+ let s = [];
1590
+ n.forEach((o) => {
1591
+ var h;
1592
+ Array.isArray(o.contents) ? (h = o.contents) == null || h.forEach((k) => {
1593
+ s.push(k);
1594
+ }) : s.push(o.contents);
1595
+ }), l.push(s);
1596
+ }), [l];
1597
+ }, it = ["方法体", "输入", "输出"], Ue = w(1), Te = (t) => {
1598
+ let a;
1599
+ t.replaceAll(" ", `\r
1600
+ `).includes(`\r
1601
+ `) ? a = t.replaceAll(" ", `\r
1602
+ `).split(`\r
1603
+ `).filter((n) => n.trim() !== "") : a = t.replaceAll(" ", `\r
1604
+ `).split(`
1605
+ `).filter((n) => n.trim() !== "");
1606
+ const l = [];
1607
+ let e = "";
1608
+ for (const n of a)
1609
+ n.includes("{") || e.includes("{") || n.includes("[") || e.includes("[") || n.includes("【") || e.includes("【") || n.includes("(") || e.includes("(") || n.includes("(") || e.includes("(") || n.includes("/*") || e.includes("/*") ? (e += n.trim(), u(e).split("{").length - 1 === u(e).split("}").length - 1 && u(e).split("【").length - 1 === u(e).split("】").length - 1 && u(e).split("[").length - 1 === u(e).split("]").length - 1 && u(e).split("(").length - 1 === u(e).split(")").length - 1 && u(e).split("(").length - 1 === u(e).split(")").length - 1 && u(e).split("/*").length - 1 === u(e).split("*/").length - 1 && e[e.length - 1] !== "," && (l.push(e.replace(/\/\*[\s\S]*?\*\//g, "")), e = "")) : l.push(n.trim().replace(/\/\*[\s\S]*?\*\//g, ""));
1610
+ return l;
1611
+ }, ft = (t) => {
1612
+ const [a, l] = t.split(/=(.+)/), e = a.replace(/['"]/g, "").trim(), n = l.replace(/^['"]|['"]$/g, "");
1613
+ return { key: e, value: n };
1614
+ }, be = (t) => {
1615
+ let a;
1616
+ t.includes(":") ? a = t.split(":").filter((n) => n.trim() !== "") : a = t.split(":").filter((n) => n.trim() !== "");
1617
+ const l = [];
1618
+ let e = "";
1619
+ for (const n of a)
1620
+ n.includes("{") || e.includes("{") || n.includes("[") || e.includes("[") || n.includes("【") || e.includes("【") || n.includes("(") || e.includes("(") || n.includes("(") || e.includes("(") || n.includes("/*") || e.includes("/*") ? (e = e !== "" ? e + ":" + n.trim() : n.trim(), u(e).split("{").length - 1 === u(e).split("}").length - 1 && u(e).split("【").length - 1 === u(e).split("】").length - 1 && u(e).split("[").length - 1 === u(e).split("]").length - 1 && u(e).split("(").length - 1 === u(e).split(")").length - 1 && u(e).split("(").length - 1 === u(e).split(")").length - 1 && u(e).split("/*").length - 1 === u(e).split("*/").length - 1 && (l.push(e.replace(/\/\*[\s\S]*?\*\//g, "")), e = "")) : l.push(n.trim().replace(/\/\*[\s\S]*?\*\//g, ""));
1621
+ return l;
1622
+ }, ht = (t) => /^[\x00-\x7F]*$/.test(t), dt = (t) => {
1623
+ var n;
1624
+ const a = t.map((s) => {
1625
+ var h, k;
1626
+ let o = (k = (h = s.key.split("(")) == null ? void 0 : h[1]) == null ? void 0 : k.trim();
1627
+ return o.slice(0, o.length - 1);
1628
+ }), l = a == null ? void 0 : a.map((s) => {
1629
+ var h;
1630
+ return (h = be(s)) == null ? void 0 : h.map((k) => {
1631
+ var b;
1632
+ if (k.includes("{")) {
1633
+ let g = (b = k.split(":")) == null ? void 0 : b[0];
1634
+ k = g.slice(1, g.length);
1635
+ }
1636
+ return k;
1637
+ });
1638
+ }).filter((s) => s.length !== 0), e = (n = l == null ? void 0 : l.filter((s) => s.length !== 0)) == null ? void 0 : n.map((s) => {
1639
+ let o = "";
1640
+ return s.forEach((h) => {
1641
+ h.includes("{") || (o = o === "" ? o + u(h) : o + "/" + u(h));
1642
+ }), o;
1643
+ });
1644
+ return Ge([...new Set(e)]);
1645
+ }, Ve = (t) => {
1646
+ var l, e, n, s, o, h, k, b;
1647
+ const a = (e = (l = t.split("(")) == null ? void 0 : l[1]) == null ? void 0 : e.trim();
1648
+ return ((n = be(a.slice(0, a.length - 1))) == null ? void 0 : n.length) > 0 ? a.slice(0, a.length - 1) : (b = (k = (h = (o = (s = t.split("(")) == null ? void 0 : s[1]) == null ? void 0 : o.trim()) == null ? void 0 : h.split(")")) == null ? void 0 : k[0]) == null ? void 0 : b.trim();
1649
+ }, yt = (t) => {
1650
+ var n;
1651
+ if (!t) return;
1652
+ const a = Ve(t), l = (n = be(a)) == null ? void 0 : n.map((s) => {
1653
+ var o;
1654
+ if (s.includes("{")) {
1655
+ let h = (o = s.split(":")) == null ? void 0 : o[0];
1656
+ s = h.slice(1, h.length);
1657
+ }
1658
+ return s;
1659
+ });
1660
+ let e = "";
1661
+ return l.forEach((s) => {
1662
+ s.includes("{") || (e = e === "" ? e + u(s) : e + "/" + u(s));
1663
+ }), e;
1664
+ }, mt = (t) => {
1665
+ const a = t.match(/\[(.*)\]/s);
1666
+ if (a) {
1667
+ const l = `[${a[1]}]`;
1668
+ try {
1669
+ const e = l.replace(/([^\[\],\s]+)/g, '"$1"');
1670
+ return JSON.parse(e);
1671
+ } catch (e) {
1672
+ console.error("解析失败:", e);
1673
+ }
1674
+ }
1675
+ }, bt = (t) => {
1676
+ var s;
1677
+ if (!t) return;
1678
+ const a = Ve(t);
1679
+ let l = [], e = [], n = [];
1680
+ return (s = be(a)) == null || s.forEach((o) => {
1681
+ var h;
1682
+ o.includes("[") ? l.push(mt(o)) : o.includes("{") && (ht((h = o.slice(1, o.length - 1).split(":")) == null ? void 0 : h[0]) ? n.push(JSON.parse(o.replace(/([{,]\s*)([^:{\[\],\s]+)(\s*:\s*)/g, '$1"$2"$3').replace(/(:\s*)([^{}\[\]",\s]+)(\s*[,}])/g, '$1"$2"$3'))) : le(o.replace(/([{,]\s*)([^:{\[\],\s]+)(\s*:\s*)/g, '$1"$2"$3').replace(/(:\s*)([^{}\[\]",\s]+)(\s*[,}])/g, '$1"$2"$3')) || o.includes("$") || e.push(o.replace(/([{,]\s*)([^:{\[\],\s]+)(\s*:\s*)/g, '$1"$2"$3').replace(/(:\s*)([^{}\[\]",\s]+)(\s*[,}])/g, '$1"$2"$3')));
1683
+ }), [l, e, n];
1684
+ }, kt = (t) => {
1685
+ const a = [];
1686
+ let l = "";
1687
+ for (const e of t)
1688
+ e.includes("[") || l.includes("[") || e.includes("/*") || l.includes("/*") ? (l += e.trim(), u(l).split("{").length - 1 === u(l).split("}").length - 1 && u(l).split("【").length - 1 === u(l).split("】").length - 1 && u(l).split("[").length - 1 === u(l).split("]").length - 1 && u(l).split("(").length - 1 === u(l).split(")").length - 1 && u(l).split("(").length - 1 === u(l).split(")").length - 1 && u(l).split("/*").length - 1 === u(l).split("*/").length - 1 && (a.push(l.replace(/\/\*[\s\S]*?\*\//g, "")), l = "")) : a.push(e.trim().replace(/\/\*[\s\S]*?\*\//g, ""));
1689
+ return a;
1690
+ }, Je = (t) => {
1691
+ var o, h;
1692
+ const a = [], l = /(?:{'([^']+)'[^}]+}: {'([^']+)'[^}]+}|'([^']+)': {'([^']+)'[^}]+})/, e = t.match(l);
1693
+ if (e) {
1694
+ const k = e[1] || e[3], b = e[2] || e[4];
1695
+ if (k && b) {
1696
+ const g = `${k}/${b}`;
1697
+ a.push(g);
1698
+ }
1699
+ }
1700
+ const n = /(https?:\/\/[^\s)]+|Http:\/\/[^\s)]+|\/[^\s)]+)/i, s = t.match(n);
1701
+ return s ? a.push(s[0].replace(/\)+$/, "")) : (t == null ? void 0 : t.split(",").length) === 2 && a.push((h = (o = t == null ? void 0 : t.split(",")) == null ? void 0 : o[1]) == null ? void 0 : h.trim()), a;
1702
+ }, ge = (t) => {
1703
+ let a = t.replace(/\[\s*,\s*,/g, '[{"": ""}, {"": ""},');
1704
+ return a = a.replace(/\[\s*,/g, '[{"": ""},'), a = a.replace(/,\s*,/g, ', {"": ""},'), a = a.replace(/,\s*\]/g, ', {"": ""}]'), a = a.replace(/:(\s*)([^"{}\[\],\s]+)(\s*)([,\]}])/g, (l, e, n, s, o) => n.includes("'") ? `:${e}${n}${s}${o}` : `:${e}"${n}"${s}${o}`), a = a.replace(/:\s*([,\]}])/g, ': ""$1'), a;
1705
+ }, gt = (t) => !/\[[^\]]*\{[^\]]*\]/.test(t), Ct = (t) => {
1706
+ const a = u(t).match(/(\w+)\(['"]([^'"]+)['"]:\s*\{['"]([^'"]+)['"]\}\)/), l = a ? `${a[2]}/${a[3]}` : null, e = t.match(/\[\{([^}]+)\}\]/), n = e == null ? void 0 : e[1].replaceAll(":", "").replaceAll("'", '"').trim();
1707
+ let s = null;
1708
+ if (n)
1709
+ try {
1710
+ s = JSON.parse(n);
1711
+ } catch (o) {
1712
+ console.error("解析数组失败:", o);
1713
+ }
1714
+ return [l, s];
1715
+ }, $t = (t) => {
1716
+ var h, k, b, g, A, O, _, $, B, f, i;
1717
+ let a = [], l = [], e = {}, n = [], s = t.trim(), o = [];
1718
+ if (s.trim().includes("输入") && s.trim().includes("输出")) {
1719
+ let p = [], m = t.trim();
1720
+ m = u(m).slice(1, u(m).length - 1);
1721
+ const c = /(\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})*\})/g;
1722
+ ($ = m.match(c)) == null || $.forEach((r, d) => {
1723
+ var D;
1724
+ const C = r;
1725
+ let T = [];
1726
+ (D = C.slice(1, C.length - 1).replace(":", "$:").split("$:")) == null || D.forEach((x) => {
1727
+ var J, v, N;
1728
+ if (it.find((S) => x.includes(S)))
1729
+ if (!x.includes("=="))
1730
+ T.push({ key: "tableIndexColumn", contents: x.replaceAll("'", "") });
1731
+ else {
1732
+ let S = [];
1733
+ const j = x.replaceAll("'", "").split("==");
1734
+ S.push(j == null ? void 0 : j[0]), j != null && j[1].includes("[") ? S.push(j == null ? void 0 : j[1].trim().slice(1, (j == null ? void 0 : j[1].length) - 1).split(",")) : S.push([j == null ? void 0 : j[1]]), T.push({ key: "header", contents: [(v = (J = He([S])) == null ? void 0 : J[0]) == null ? void 0 : v[0]] });
1735
+ }
1736
+ else {
1737
+ let S = x.trim().replaceAll(",", ",").replaceAll("'", '"');
1738
+ if (d % 3 === 0)
1739
+ S.slice(1, S.length - 1).includes("[") ? p.push({
1740
+ key: "tableIndex",
1741
+ contents: [{ label: S }]
1742
+ }) : p.push({
1743
+ key: "tableIndex",
1744
+ contents: [{ label: S.slice(1, S.length - 1) }]
1745
+ });
1746
+ else if ((S == null ? void 0 : S[0]) === "{") {
1747
+ let j = [];
1748
+ const E = S.slice(1, S.length - 1).split(":");
1749
+ if (E.every((y) => le(y.trim()))) {
1750
+ j.push({ key: "tableContentName", contents: "详情" });
1751
+ let y = [];
1752
+ E.forEach((F, P) => {
1753
+ if (P === 0) {
1754
+ const L = JSON.parse(F).map((I) => ({ label: I }));
1755
+ L.push({
1756
+ label: "操作"
1757
+ }), y.push({
1758
+ key: "header",
1759
+ contents: L
1760
+ });
1761
+ } else
1762
+ y.push({
1763
+ key: "tableContents",
1764
+ contents: JSON.parse(F)
1765
+ });
1766
+ }), y.push({
1767
+ key: "extraButton",
1768
+ contents: [{ label: "新增" }]
1769
+ }), y.push({
1770
+ key: "rowButton",
1771
+ contents: [{ label: "查看" }, { label: "编辑" }, { label: "删除" }]
1772
+ }), j.push({
1773
+ comp: "Table",
1774
+ compData: y,
1775
+ name: ""
1776
+ }), p.push({
1777
+ key: "tableContents",
1778
+ contents: [j]
1779
+ });
1780
+ }
1781
+ } else {
1782
+ let j = S;
1783
+ j.slice(1, j.length - 1).includes("[") || j.slice(1, j.length - 1).includes("{") ? le(Se(j.replace(/\s+/g, ""))) && ((N = JSON.parse(Se(j.replace(/\s+/g, "")))) == null || N.map((E) => {
1784
+ if (Array.isArray(E == null ? void 0 : E[0])) {
1785
+ const y = [];
1786
+ y.push({ key: "tableContentName", contents: "详情" });
1787
+ let F = [];
1788
+ E.forEach((P) => {
1789
+ P.forEach((L) => {
1790
+ var I, H;
1791
+ Ue.value++, F.push({
1792
+ id: Ue.value,
1793
+ key: (I = Object.keys(L)) == null ? void 0 : I[0],
1794
+ value: (H = Object.values(L)) == null ? void 0 : H[0],
1795
+ width: P.length
1796
+ });
1797
+ });
1798
+ }), y.push({
1799
+ comp: "Form",
1800
+ compData: [{
1801
+ key: "formFlex",
1802
+ contents: ""
1803
+ }, {
1804
+ key: "formContent",
1805
+ contents: F
1806
+ }],
1807
+ name: ""
1808
+ }), p.push({
1809
+ key: "tableContents",
1810
+ contents: [y]
1811
+ });
1812
+ } else
1813
+ p.push({
1814
+ key: "tableContents",
1815
+ contents: E == null ? void 0 : E[0]
1816
+ });
1817
+ })) : p.push({
1818
+ key: "tableContents",
1819
+ contents: j.trim().slice(1, j.length - 1)
1820
+ });
1821
+ }
1822
+ }
1823
+ }), p.push(T == null ? void 0 : T[0]);
1824
+ }), o.push({
1825
+ key: "tableIndex",
1826
+ contents: (B = p == null ? void 0 : p.filter((r) => (r == null ? void 0 : r.key) === "tableIndex")) == null ? void 0 : B.map((r) => {
1827
+ var d;
1828
+ return (d = r.contents) == null ? void 0 : d[0];
1829
+ })
1830
+ }), o.push({
1831
+ key: "extraButton",
1832
+ contents: [{ label: "新增" }]
1833
+ }), o.push({
1834
+ key: "rowButton",
1835
+ contents: [{ label: "查看" }, { label: "编辑" }, { label: "删除" }]
1836
+ }), o.push({
1837
+ key: "tableIndexColumn",
1838
+ contents: (i = (f = p == null ? void 0 : p.filter((r) => (r == null ? void 0 : r.key) === "tableIndexColumn")) == null ? void 0 : f[0]) == null ? void 0 : i.contents
1839
+ }), o.push({
1840
+ key: "header",
1841
+ contents: Fe(p == null ? void 0 : p.filter((r) => (r == null ? void 0 : r.key) === "header"))
1842
+ }), o.push({
1843
+ key: "tableContents",
1844
+ contents: pt(p == null ? void 0 : p.filter((r) => (r == null ? void 0 : r.key) === "tableContents"), Fe(p == null ? void 0 : p.filter((r) => (r == null ? void 0 : r.key) === "header")))
1845
+ });
1846
+ } else {
1847
+ const p = (h = s.trim().split(",$")) == null ? void 0 : h[0];
1848
+ p[0] === "[" ? s = p.slice(1, p.length - 1) : s.includes(",$") && (s = (k = s.trim().split(",$")) == null ? void 0 : k[0]);
1849
+ let m;
1850
+ if (s.includes("$")) {
1851
+ s = u(s), e.method = (g = (b = u(s).trim()) == null ? void 0 : b.slice(1, s.length).split("(")) == null ? void 0 : g[0];
1852
+ let c;
1853
+ Je(s.slice(1, s.length - 2)).length > 1 ? c = Je(s.slice(1, s.length - 2)) : c = Ct(s), e.value = c;
1854
+ } else
1855
+ le("[" + ge(s).replaceAll("'", '"') + "]") && !gt(ge(s).replaceAll("'", '"')) ? (s = JSON.parse("[" + ge(s).replaceAll("'", '"') + "]"), n = s) : m = (O = (A = u(s).split("}")) == null ? void 0 : A.filter((c) => c !== "")) == null ? void 0 : O.map((c) => {
1856
+ let r = c;
1857
+ return r[0] === "," ? r = r.slice(2, r.length) : r = r.slice(1, r.length), r;
1858
+ });
1859
+ (_ = u(m)) == null || _.forEach((c) => {
1860
+ var r, d, C, T, D, x, J, v, N, S, j, E, y, F, P;
1861
+ if (c.includes("==")) {
1862
+ const L = (E = c == null ? void 0 : c.split(":")) == null ? void 0 : E[0].replace(/^"|"$/g, "'").replace(/'([^']+)'/g, '"$1"').replaceAll("'", '"'), I = (y = c == null ? void 0 : c.split(":")) == null ? void 0 : y[1].replace(/^"|"$/g, "'").replace(/'([^']+)'/g, '"$1"');
1863
+ if (le(I.trim()) ? l.push(JSON.parse(I.trim())) : l.push(JSON.parse(I.replaceAll("'", '"').trim())), L[0] !== "[") {
1864
+ let H = [];
1865
+ le("[" + fe(L) + "]") ? H.push(JSON.parse("[" + fe(L) + "]")) : le("[" + fe(L).replaceAll("==", ",") + "]") && H.push(JSON.parse("[" + fe(L).replaceAll("==", ",") + "]"));
1866
+ const z = u(H);
1867
+ z.push(["操作"]), a.push(z);
1868
+ } else {
1869
+ const H = (F = L.slice(1, L.length - 1).replaceAll(",", ",|")) == null ? void 0 : F.split("|"), z = (P = kt(H)) == null ? void 0 : P.map((U) => ((U == null ? void 0 : U[U.length - 1]) === "," && (U = U.slice(0, U.length - 1)), U));
1870
+ let Q = [];
1871
+ z == null || z.forEach((U) => {
1872
+ var R, ee, pe, se;
1873
+ let K = [];
1874
+ K.push((R = U.split("==")) == null ? void 0 : R[0].trim().replace(/^"|"$/g, "")), ((ee = U.split("==")) == null ? void 0 : ee[1].trim()[0]) === "[" ? K.push(JSON.parse((pe = U.split("==")) == null ? void 0 : pe[1].trim())) : K.push([JSON.parse((se = U.split("==")) == null ? void 0 : se[1].trim())]), Q.push(K);
1875
+ });
1876
+ const Z = u(Q);
1877
+ Z.push(["操作"]), a.push(Z);
1878
+ }
1879
+ } else {
1880
+ if (le((r = c == null ? void 0 : c.split(":")) == null ? void 0 : r[0].replace(/^"|"$/g, "'").replace(/'([^']+)'/g, '"$1"').replaceAll("'", '"'))) {
1881
+ let L = JSON.parse((d = c == null ? void 0 : c.split(":")) == null ? void 0 : d[0].replace(/^"|"$/g, "'").replace(/'([^']+)'/g, '"$1"').replaceAll("'", '"'));
1882
+ Array.isArray(L) || (L = [L]), L.push("操作"), a.push(L);
1883
+ }
1884
+ le((D = (T = (C = c == null ? void 0 : c.split(":")) == null ? void 0 : C[1]) == null ? void 0 : T.replace(/^"|"$/g, "'")) == null ? void 0 : D.replace(/'([^']+)'/g, '"$1"')) ? l.push(JSON.parse((x = c == null ? void 0 : c.split(":")) == null ? void 0 : x[1].replace(/^"|"$/g, "'").replace(/'([^']+)'/g, '"$1"'))) : le((S = (N = (v = (J = c == null ? void 0 : c.split(":")) == null ? void 0 : J[1]) == null ? void 0 : v.replace(/^"|"$/g, "'")) == null ? void 0 : N.replaceAll("'", '"')) == null ? void 0 : S.replace(/'([^']+)'/g, '"$1"')) && l.push(JSON.parse((j = c == null ? void 0 : c.split(":")) == null ? void 0 : j[1].replace(/^"|"$/g, "'").replaceAll("'", '"').replace(/'([^']+)'/g, '"$1"')));
1885
+ }
1886
+ });
1887
+ }
1888
+ return [a, l, o, e, n];
1889
+ }, At = (t) => {
1890
+ const a = [], l = yt(t == null ? void 0 : t.key), e = bt(t == null ? void 0 : t.key), n = $t(t == null ? void 0 : t.value), s = e == null ? void 0 : e[0], o = [...e == null ? void 0 : e[1], ...n == null ? void 0 : n[4]], h = e == null ? void 0 : e[2], k = n == null ? void 0 : n[0], b = n == null ? void 0 : n[1], g = n == null ? void 0 : n[2], A = n == null ? void 0 : n[3];
1891
+ return l && a.push({
1892
+ key: "contentPath",
1893
+ value: l
1894
+ }), (s == null ? void 0 : s.length) > 0 && a.push({
1895
+ key: "tableIndex",
1896
+ value: s
1897
+ }), A && a.push({
1898
+ key: "extraButton",
1899
+ value: A
1900
+ }), (o == null ? void 0 : o.length) > 0 && a.push({
1901
+ key: "form",
1902
+ value: o
1903
+ }), (h == null ? void 0 : h.length) > 0 && a.push({
1904
+ key: "extra",
1905
+ value: h
1906
+ }), (g == null ? void 0 : g.length) > 0 && a.push({
1907
+ comp: "Table",
1908
+ compData: g,
1909
+ name: ""
1910
+ }), (k == null ? void 0 : k.length) > 0 && a.push({
1911
+ key: "tableColumns",
1912
+ value: k
1913
+ }), (b == null ? void 0 : b.length) > 0 && a.push({
1914
+ key: "tableContents",
1915
+ value: b
1916
+ }), a;
1917
+ }, xt = (t, a) => {
1918
+ const l = a.split("/");
1919
+ let e = [];
1920
+ return t == null || t.forEach((n) => {
1921
+ var h, k, b, g, A, O, _, $, B;
1922
+ const s = [], o = (k = (h = n.find((f) => f.key === "tableIndex")) == null ? void 0 : h.value) == null ? void 0 : k[0];
1923
+ if (o && !o.some((f) => Array.isArray(f))) {
1924
+ const f = (g = (b = n.find((i) => i.key === "tableColumns")) == null ? void 0 : b.value) == null ? void 0 : g[0];
1925
+ s.push({
1926
+ key: "tableIndexColumn",
1927
+ contents: l[l.length - 1]
1928
+ }), s.push({
1929
+ key: "tableIndex",
1930
+ contents: o == null ? void 0 : o.map((i) => ({ label: i }))
1931
+ }), s.push({
1932
+ key: "extraButton",
1933
+ contents: [{ label: "新增" }]
1934
+ }), s.push({
1935
+ key: "rowButton",
1936
+ contents: [{ label: "查看" }, { label: "编辑" }, { label: "删除" }]
1937
+ }), Array.isArray(f) && f.some((i) => Array.isArray(i)) ? s.push({
1938
+ key: "header",
1939
+ contents: He(f)
1940
+ }) : s.push({
1941
+ key: "header",
1942
+ contents: Array.isArray(f) ? f == null ? void 0 : f.map((i) => ({ label: i })) : [f].map((i) => ({ label: i }))
1943
+ }), s.push({
1944
+ key: "tableContents",
1945
+ contents: Array.isArray(f) ? (O = (A = n.find((i) => i.key === "tableContents")) == null ? void 0 : A.value) == null ? void 0 : O[0] : (B = ($ = (_ = n.find((i) => i.key === "tableContents")) == null ? void 0 : _.value) == null ? void 0 : $[0]) == null ? void 0 : B.map((i) => [i])
1946
+ }), e.push({
1947
+ comp: "Table",
1948
+ name: "",
1949
+ compData: s
1950
+ });
1951
+ } else o ? e.push({
1952
+ comp: "Table",
1953
+ name: "",
1954
+ compData: ot(n, l[l.length - 1])
1955
+ }) : n.some((f) => f.key === "extra") ? e.push({
1956
+ comp: "calculator",
1957
+ name: "",
1958
+ compData: Be(n)
1959
+ }) : e.push(Be(n));
1960
+ }), e;
1961
+ }, Ot = (t, a) => {
1962
+ var n, s;
1963
+ const l = t.map((o) => o.filter((h) => h.key !== "contentPath"));
1964
+ return {
1965
+ comp: "Group",
1966
+ compData: [{
1967
+ contents: xt(l, a),
1968
+ key: "groupContents"
1969
+ }],
1970
+ name: (s = (n = t[0]) == null ? void 0 : n.find((o) => o.key === "contentPath")) == null ? void 0 : s.value
1971
+ };
1972
+ }, _t = (t) => {
1973
+ var n;
1974
+ const a = [], l = u(t).map((s) => {
1975
+ var o;
1976
+ if (s != null && s.find((h) => (h == null ? void 0 : h.key) === "contentPath"))
1977
+ return (o = s == null ? void 0 : s.find((h) => (h == null ? void 0 : h.key) === "contentPath")) == null ? void 0 : o.value;
1978
+ }).filter((s) => s !== ""), e = [...new Set(l)];
1979
+ return (n = e == null ? void 0 : e.filter((s) => s)) == null || n.forEach((s) => {
1980
+ var o;
1981
+ a.push(Ot((o = u(t)) == null ? void 0 : o.filter((h) => h.find((k) => k.key === "contentPath" && k.value === s)), s));
1982
+ }), a;
1983
+ }, Tt = (t) => {
1984
+ let a = [];
1985
+ a.push({
1986
+ comp: "Menu",
1987
+ compData: [{
1988
+ contents: dt(u(t)),
1989
+ key: "menuContents"
1990
+ }],
1991
+ name: ""
1992
+ });
1993
+ const l = t.map((e) => At(e)).filter((e) => e.length !== 0);
1994
+ return a = [...a, ..._t(l)], a;
1995
+ }, Zt = (t) => {
1996
+ var n, s, o, h, k;
1997
+ const a = (o = Te((s = (n = u(t)) == null ? void 0 : n.replace("(", "(")) == null ? void 0 : s.replace(")", ")"))) == null ? void 0 : o.filter((b) => b !== ""), l = (k = (h = u(a)) == null ? void 0 : h.filter((b) => !b.includes("/*"))) == null ? void 0 : k.map((b) => ft(b));
1998
+ return Tt(l);
1999
+ }, he = w(0), Ce = w(0), Dt = (t) => {
2000
+ const a = t.trim().replace(/^'|'$/g, ""), l = /((?:\$?[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, e = {};
2001
+ let n;
2002
+ for (; (n = l.exec(a)) !== null; ) {
2003
+ const s = n[1];
2004
+ let o = n[2].trim();
2005
+ (o.match(/\[/g) || []).length !== (o.match(/\]/g) || []).length && (o = o == null ? void 0 : o.replace(/]$/, "")), e[s] ? (e[s + Ce.value] && Ce.value++, e[s + Ce.value] = s + "=" + o) : e[s] = s + "=" + o;
2006
+ }
2007
+ return e;
2008
+ }, qe = (t) => {
2009
+ const [a, l] = t.split("=").map((s) => s.trim()), e = a.replace(/['"]/g, ""), n = l.replace(/^['"]|['"]$/g, "");
2010
+ return { key: e, value: n };
2011
+ }, vt = (t) => {
2012
+ var o;
2013
+ let a = [];
2014
+ const [l, e] = t.split(/=(.+)/), n = l.replace(/['"]/g, "").trim(), s = e.replace(/^['"]|['"]$/g, "");
2015
+ return (o = Object.values(Dt(s))) == null || o.forEach((h) => {
2016
+ a.push(qe(h));
2017
+ }), { key: n, value: a };
2018
+ }, me = (t) => {
2019
+ try {
2020
+ return JSON.parse(t), !0;
2021
+ } catch {
2022
+ return !1;
2023
+ }
2024
+ }, Qe = (t) => {
2025
+ try {
2026
+ const a = t.replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",").replace(/:/g, ":").replace(/:\s*(?=,|}|$)/g, ': ""');
2027
+ if (u(a).split("{").length - 1 > 1) {
2028
+ let l = u(a).replace(/^\{(.*)\}$/, "[$1]");
2029
+ if (me(l) && !l.includes("$") || (l = l.replace(/"([^"]+)"\$([\w\u4e00-\u9fa5]+\([^)]*\))/g, '"$1$$$2"')), me(l)) {
2030
+ const e = JSON.parse(l);
2031
+ let n = [];
2032
+ return e == null || e.forEach((s) => {
2033
+ var o;
2034
+ (o = Object.entries(u(s))) == null || o.forEach((h) => {
2035
+ he.value++, n.push({
2036
+ id: he.value,
2037
+ key: (h == null ? void 0 : h[0]) ?? "",
2038
+ value: (h == null ? void 0 : h[1]) === "" ? "" : h == null ? void 0 : h[1],
2039
+ // 如果值为空,则key设为空字符串,否则保留原值
2040
+ width: Object.keys(u(s)).length
2041
+ });
2042
+ });
2043
+ }), n;
2044
+ } else
2045
+ return console.error("转换类型不正确:"), [];
2046
+ } else if (me(a)) {
2047
+ const l = JSON.parse(a);
2048
+ return Object.entries(l).map(([e, n]) => (he.value++, {
2049
+ id: he.value,
2050
+ key: e,
2051
+ value: n === "" ? "" : n,
2052
+ // 如果值为空,则key设为空字符串,否则保留原值
2053
+ width: 1
2054
+ }));
2055
+ } else
2056
+ return a;
2057
+ } catch (a) {
2058
+ return console.error("转换失败:", a), [];
2059
+ }
2060
+ }, Nt = (t, a) => {
2061
+ try {
2062
+ if (W != null && W.find((l) => (l == null ? void 0 : l.key) === a))
2063
+ return JSON.parse(t.replace(/[’]|[‘]|[']/g, '"'));
2064
+ if (u(t).split("[").length - 1 > 1) {
2065
+ const l = u(t).replace(/[’]|[‘]|[']/g, '"').replaceAll(/,/g, ",").replaceAll("(", "[").replaceAll(")", "]").replaceAll("],]", "]]");
2066
+ return JSON.parse(l);
2067
+ } else {
2068
+ const l = u(t).replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",");
2069
+ if (me(l)) {
2070
+ const e = JSON.parse(l);
2071
+ return Array.isArray(e) ? e.map((n) => ({ label: n })) : e;
2072
+ } else
2073
+ return Qe(u(t));
2074
+ }
2075
+ } catch (l) {
2076
+ return console.error("解析失败:", l), t;
2077
+ }
2078
+ }, Et = (t) => ({ [t == null ? void 0 : t.key]: Nt(t == null ? void 0 : t.value, t == null ? void 0 : t.key) }), jt = (t) => {
2079
+ try {
2080
+ if (u(t).split("[").length - 1 > 1) {
2081
+ const a = u(t).replace(/[’]|[‘]|[']/g, '"').replaceAll(/,/g, ",").replaceAll("(", "[").replaceAll(")", "]").replaceAll("],]", "]]");
2082
+ return JSON.parse(a);
2083
+ } else
2084
+ return JSON.parse(u(t).replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",")).map((l) => ({ label: l }));
2085
+ } catch (a) {
2086
+ return console.error("解析失败:", a), t;
2087
+ }
2088
+ }, Xe = (t) => {
2089
+ var a, l, e, n, s, o;
2090
+ try {
2091
+ const h = Te((l = (a = u(t)) == null ? void 0 : a.replace("(", "(")) == null ? void 0 : l.replace(")", ")")), k = (e = u(h)) == null ? void 0 : e.map((A) => {
2092
+ var _, $;
2093
+ let O = ($ = (_ = u(A)) == null ? void 0 : _.split("=")) == null ? void 0 : $[0];
2094
+ return O != null && O.includes("GroupContents") ? vt(A) : qe(A);
2095
+ }), b = [];
2096
+ (n = u(k)) == null || n.forEach((A) => {
2097
+ var O, _, $, B, f;
2098
+ W != null && W.find((i) => {
2099
+ var p, m;
2100
+ return ((p = i == null ? void 0 : i.key) == null ? void 0 : p.toUpperCase()) === ((m = A == null ? void 0 : A.key) == null ? void 0 : m.toUpperCase());
2101
+ }) ? b.push({
2102
+ comp: ((O = W == null ? void 0 : W.find((i) => {
2103
+ var p, m;
2104
+ return ((p = i == null ? void 0 : i.key) == null ? void 0 : p.toUpperCase()) === ((m = A == null ? void 0 : A.key) == null ? void 0 : m.toUpperCase());
2105
+ })) == null ? void 0 : O.value) ?? "",
2106
+ name: (_ = A == null ? void 0 : A.value) == null ? void 0 : _.replace(/[’]|[‘]|[']/g, ""),
2107
+ compData: []
2108
+ }) : G != null && G.find((i) => {
2109
+ var p, m;
2110
+ return ((p = i == null ? void 0 : i.key) == null ? void 0 : p.toUpperCase()) === ((m = A == null ? void 0 : A.key) == null ? void 0 : m.toUpperCase());
2111
+ }) && ((b == null ? void 0 : b.length) === 0 && ($ = A.key) != null && $.includes("Menus") && b.push({
2112
+ comp: "Menu",
2113
+ name: "",
2114
+ compData: []
2115
+ }), (B = b == null ? void 0 : b[(b == null ? void 0 : b.length) - 1]) != null && B.compData && b[(b == null ? void 0 : b.length) - 1].compData.push({
2116
+ key: (f = G == null ? void 0 : G.find((i) => {
2117
+ var p, m;
2118
+ return ((p = i == null ? void 0 : i.key) == null ? void 0 : p.toUpperCase()) === ((m = A == null ? void 0 : A.key) == null ? void 0 : m.toUpperCase());
2119
+ })) == null ? void 0 : f.value,
2120
+ contents: A == null ? void 0 : A.value
2121
+ }));
2122
+ }), console.log("newContents", b);
2123
+ let g = (s = u(b)) == null ? void 0 : s.map((A) => {
2124
+ var O;
2125
+ return A != null && A.compData && (A.compData = (O = A == null ? void 0 : A.compData) == null ? void 0 : O.map((_) => {
2126
+ var $, B, f, i, p, m, c, r, d, C, T;
2127
+ if ((_ == null ? void 0 : _.key) === "formFlex")
2128
+ _.contents = ((B = ($ = _.contents) == null ? void 0 : $.replace(/[’]|[‘]|[']/g, "")) == null ? void 0 : B.toUpperCase()) !== "Vertical".toUpperCase();
2129
+ else if ((_ == null ? void 0 : _.key) === "groupContents")
2130
+ _.contents = (f = u(_.contents)) == null ? void 0 : f.map((D) => Et(u(D)));
2131
+ else if (((p = (i = _.contents) == null ? void 0 : i.trim()) != null && p.startsWith("[") || (c = (m = _.contents) == null ? void 0 : m.trim()) != null && c.startsWith("【")) && ((d = (r = _.contents) == null ? void 0 : r.trim()) != null && d.endsWith("]") || (T = (C = _.contents) == null ? void 0 : C.trim()) != null && T.endsWith("】")))
2132
+ _.contents = jt(u(_.contents));
2133
+ else {
2134
+ if (!_.contents) return;
2135
+ _.contents = Qe(u(_.contents));
2136
+ }
2137
+ return _;
2138
+ })), A;
2139
+ });
2140
+ return g = (o = u(g)) == null ? void 0 : o.map((A) => {
2141
+ var O;
2142
+ return (A == null ? void 0 : A.comp) === "Group" && (A.compData = (O = A.compData) == null ? void 0 : O.map((_) => {
2143
+ var B;
2144
+ let $ = [];
2145
+ return (B = _.contents) == null || B.forEach((f) => {
2146
+ var i, p, m, c, r, d, C, T, D, x, J, v;
2147
+ if (W != null && W.find((N) => {
2148
+ var S, j, E;
2149
+ return ((S = N == null ? void 0 : N.key) == null ? void 0 : S.toUpperCase()) === ((E = (j = Object.keys(f)) == null ? void 0 : j[0]) == null ? void 0 : E.toUpperCase());
2150
+ }))
2151
+ $.push({
2152
+ comp: (i = W == null ? void 0 : W.find((N) => {
2153
+ var S, j, E;
2154
+ return ((S = N == null ? void 0 : N.key) == null ? void 0 : S.toUpperCase()) === ((E = (j = Object.keys(f)) == null ? void 0 : j[0]) == null ? void 0 : E.toUpperCase());
2155
+ })) == null ? void 0 : i.value,
2156
+ name: (m = (p = Object.values(f)) == null ? void 0 : p[0]) == null ? void 0 : m.replace(/[’]|[‘]|[']/g, ""),
2157
+ compData: []
2158
+ });
2159
+ else if (G != null && G.find((N) => {
2160
+ var S, j, E;
2161
+ return ((S = N == null ? void 0 : N.key) == null ? void 0 : S.toUpperCase()) === ((E = (j = Object.keys(f)) == null ? void 0 : j[0]) == null ? void 0 : E.toUpperCase());
2162
+ })) {
2163
+ if (($ == null ? void 0 : $.length) === 0) return;
2164
+ (c = $ == null ? void 0 : $[($ == null ? void 0 : $.length) - 1]) != null && c.compData && $[($ == null ? void 0 : $.length) - 1].compData.push({
2165
+ key: (r = G == null ? void 0 : G.find((N) => {
2166
+ var S, j, E;
2167
+ return ((S = N == null ? void 0 : N.key) == null ? void 0 : S.toUpperCase()) === ((E = (j = Object.keys(f)) == null ? void 0 : j[0]) == null ? void 0 : E.toUpperCase());
2168
+ })) == null ? void 0 : r.value,
2169
+ contents: (d = Object.values(f)) == null ? void 0 : d[0]
2170
+ });
2171
+ } else if ((T = (C = Object.keys(f)) == null ? void 0 : C[0]) != null && T.includes("$")) {
2172
+ const N = (x = (D = Object.keys(u(f))) == null ? void 0 : D[0]) == null ? void 0 : x.split("$");
2173
+ $[($ == null ? void 0 : $.length) - 1].compData.push({
2174
+ key: (J = G == null ? void 0 : G.find((S) => {
2175
+ var j, E;
2176
+ return ((j = S == null ? void 0 : S.key) == null ? void 0 : j.toUpperCase()) === ((E = N == null ? void 0 : N[0]) == null ? void 0 : E.toUpperCase());
2177
+ })) == null ? void 0 : J.value,
2178
+ contents: (v = Object.values(f)) == null ? void 0 : v[0],
2179
+ selectLabel: N == null ? void 0 : N[1]
2180
+ });
2181
+ }
2182
+ return f;
2183
+ }), _.contents = $, _;
2184
+ })), A;
2185
+ }), g;
2186
+ } catch {
2187
+ return !1;
2188
+ }
2189
+ }, Kt = (t) => Xe(t), Vt = (t) => !!Xe(t), St = ul(xe), { itemData: qt } = Re(St), Bt = cl(xe), { systemKey: Qt, activeMenuPath: Xt } = Re(Bt), re = w(0), Yt = (t) => t.reduce((l, e) => {
2190
+ var s, o;
2191
+ const n = Object.values(l);
2192
+ return (((s = Object.keys(l)) == null ? void 0 : s.length) === 0 || n[n.length - 1].length >= (e == null ? void 0 : e.width)) && (l[re.value] = [], re.value++), l[re.value - 1].push(e), ((o = Object.keys(l)) == null ? void 0 : o.length) === (e == null ? void 0 : e.width) && (l[re.value] = [], re.value++), l;
2193
+ }, {});
2194
+ export {
2195
+ Yt as a,
2196
+ Ht as b,
2197
+ Zt as c,
2198
+ Kt as e,
2199
+ Ml as g,
2200
+ Vt as i,
2201
+ zt as s
2202
+ };