ss-component-new 1.1.85 → 1.1.87

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 (39) hide show
  1. package/dist/{array-D2zrIzej.js → array-C8gxudwq.js} +2 -2
  2. package/dist/{array-D8U2pGTC.cjs → array-q8pUBU30.cjs} +1 -1
  3. package/dist/{cloneDeep-8zu2YtRV.cjs → cloneDeep-B3VC5L8Z.cjs} +1 -1
  4. package/dist/{cloneDeep-DuEirD61.js → cloneDeep-BpK0E_ef.js} +1 -1
  5. package/dist/{index-CdiwcgWn.cjs → index-B-jDNH2e.cjs} +1 -1
  6. package/dist/index-B7LUAJqu.cjs +1 -0
  7. package/dist/{index-Bk6z8NoT.cjs → index-BLoamlbm.cjs} +1 -1
  8. package/dist/{index-CPAniSJJ.cjs → index-BW-bmuq0.cjs} +1 -1
  9. package/dist/{index-DADq4uib.cjs → index-C6UYDisz.cjs} +1 -1
  10. package/dist/{index-DzijCTQM.js → index-CQuV8YFa.js} +2 -2
  11. package/dist/{index-DORpNeEv.js → index-CQvBB7B8.js} +1 -1
  12. package/dist/{index-CefBKPRE.cjs → index-CdxjVh-X.cjs} +1 -1
  13. package/dist/{index-By9M6a6K.cjs → index-DZAs9vSe.cjs} +1 -1
  14. package/dist/{index-D0BrZauT.js → index-Dakgk1fr.js} +2 -2
  15. package/dist/index-Dc21Fkf9.js +345 -0
  16. package/dist/{index-3JVabNmb.js → index-DtoLslf_.js} +1 -1
  17. package/dist/{index-Dk3AafH9.js → index-gsysGhDn.js} +1 -1
  18. package/dist/{index-BviuenkT.js → index-iaj5xJUJ.js} +3 -3
  19. package/dist/index-nChhWjuh.js +43 -0
  20. package/dist/index-wRmYoZQa.cjs +1 -0
  21. package/dist/index.vue_vue_type_style_index_0_scoped_0d13cfeb_lang-Ce-Paygw.js +618 -0
  22. package/dist/index.vue_vue_type_style_index_0_scoped_0d13cfeb_lang-CwZAxgWm.cjs +7 -0
  23. package/dist/{index.vue_vue_type_style_index_0_scoped_dc84a8f7_lang-sXEqRck_.js → index.vue_vue_type_style_index_0_scoped_dc84a8f7_lang-B67eMpk2.js} +2 -2
  24. package/dist/{index.vue_vue_type_style_index_0_scoped_dc84a8f7_lang-CoTrTiyZ.cjs → index.vue_vue_type_style_index_0_scoped_dc84a8f7_lang-CL3yi2CW.cjs} +1 -1
  25. package/dist/{main-BJ49BQ83.js → main-BIsSHE8k.js} +3 -3
  26. package/dist/{main-BrFLjXjC.cjs → main-C_3s_51_.cjs} +1 -1
  27. package/dist/{ss-component.cjs.js → ss-component.cjs} +1 -1
  28. package/dist/{ss-component-new.css → ss-component.css} +1 -1
  29. package/dist/{ss-component.es.js → ss-component.js} +6 -6
  30. package/dist/ss-component2.cjs +1 -0
  31. package/dist/{router.es.js → ss-component2.js} +1 -1
  32. package/package.json +1 -1
  33. package/dist/index-BK00mV7O.js +0 -37
  34. package/dist/index-DK-C6XIG.js +0 -351
  35. package/dist/index-P-XWFKEv.cjs +0 -1
  36. package/dist/index-bTbhSpJ8.cjs +0 -1
  37. package/dist/index.vue_vue_type_style_index_0_scoped_876d48c6_lang-BufoMCSS.cjs +0 -4
  38. package/dist/index.vue_vue_type_style_index_0_scoped_876d48c6_lang-CSfAQ28_.js +0 -254
  39. package/dist/router.cjs.js +0 -1
@@ -0,0 +1,618 @@
1
+ import { v as G, c as L } from "./array-C8gxudwq.js";
2
+ import { ref as v } from "vue";
3
+ import { c } from "./cloneDeep-BpK0E_ef.js";
4
+ const H = v(0), re = (t) => {
5
+ let r;
6
+ t.includes(`\r
7
+ `) ? r = t.split(`\r
8
+ `).filter((s) => s.trim() !== "") : r = t.split(`
9
+ `).filter((s) => s.trim() !== "");
10
+ const n = [];
11
+ let e = "";
12
+ for (const s of r)
13
+ s.includes("{") || e.includes("{") || s.includes("[") || e.includes("[") || s.includes("【") || e.includes("【") || s.includes("(") || e.includes("(") || s.includes("(") || e.includes("(") || s.includes("/*") || e.includes("/*") ? (e += s.trim(), c(e).split("{").length - 1 === c(e).split("}").length - 1 && c(e).split("【").length - 1 === c(e).split("】").length - 1 && c(e).split("[").length - 1 === c(e).split("]").length - 1 && c(e).split("(").length - 1 === c(e).split(")").length - 1 && c(e).split("(").length - 1 === c(e).split(")").length - 1 && c(e).split("/*").length - 1 === c(e).split("*/").length - 1 && (n.push(e), e = "")) : n.push(s.trim());
14
+ return n;
15
+ }, ce = (t) => {
16
+ const [r, n] = t.split(/=(.+)/), e = r.replace(/['"]/g, "").trim(), s = n.replace(/^['"]|['"]$/g, "");
17
+ return { key: e, value: s };
18
+ }, Y = (t) => {
19
+ try {
20
+ return JSON.parse(t), !0;
21
+ } catch {
22
+ return !1;
23
+ }
24
+ }, ne = (t) => t.includes("$") && t.trim().endsWith("(") ? t + ")" : t, pe = (t) => {
25
+ let r = t;
26
+ const n = [];
27
+ let e = "";
28
+ for (const s of r)
29
+ s.includes("{") || e.includes("{") || s.includes("[") || e.includes("[") || s.includes("【") || e.includes("【") || s.includes("(") || e.includes("(") || s.includes("(") || e.includes("(") || s.includes("/*") || e.includes("/*") ? (e += s.trim(), c(e).split("{").length - 1 === c(e).split("}").length - 1 && c(e).split("【").length - 1 === c(e).split("】").length - 1 && c(e).split("[").length - 1 === c(e).split("]").length - 1 && c(e).split("(").length - 1 === c(e).split(")").length - 1 && c(e).split("(").length - 1 === c(e).split(")").length - 1 && c(e).split("/*").length - 1 === c(e).split("*/").length - 1 && (n.push(e), e = "")) : n.push(s.trim());
30
+ return n == null ? void 0 : n.filter((s) => s.includes("{"));
31
+ }, ae = (t) => {
32
+ var n;
33
+ let r = [];
34
+ return (n = pe(t.slice(1, -1))) == null || n.forEach((e) => {
35
+ var o, u, y, f;
36
+ let s = ((u = (o = e.slice(1, -1)) == null ? void 0 : o.split(",")) == null ? void 0 : u.length) ?? 1;
37
+ (f = (y = e.slice(1, -1)) == null ? void 0 : y.split(",")) == null || f.forEach((a) => {
38
+ var i, P, p, $, m, d, D, O, E, J, b, A, k;
39
+ let l = a == null ? void 0 : a.split(":"), C = l != null && l[0] ? (l == null ? void 0 : l[1].split("$").length) - 1 === 1 ? ((i = l == null ? void 0 : l[0]) == null ? void 0 : i.replace(/^"(.*)"$/, "$1")) + ((P = l == null ? void 0 : l[1]) == null ? void 0 : P.replace(/^"(.*)"$/, "$1")) : Array.isArray(($ = (p = l == null ? void 0 : l[1]) == null ? void 0 : p.replace(/^"(.*)"$/, "$1")) == null ? void 0 : $.split("(")) && ((D = (d = (m = l == null ? void 0 : l[1]) == null ? void 0 : m.replace(/^"(.*)"$/, "$1")) == null ? void 0 : d.split("(")) == null ? void 0 : D.length) > 1 ? ((O = l == null ? void 0 : l[0]) == null ? void 0 : O.replace(/^"(.*)"$/, "$1")) + ((b = (J = (E = l == null ? void 0 : l[1]) == null ? void 0 : E.replace(/^"(.*)"$/, "$1")) == null ? void 0 : J.split("(")) == null ? void 0 : b[0]) + "()" : (A = l == null ? void 0 : l[0]) == null ? void 0 : A.replace(/^"(.*)"$/, "$1") : "", h = (l == null ? void 0 : l[1].split("$").length) - 1 === 0 ? (k = l == null ? void 0 : l[1]) == null ? void 0 : k.replace(/^"(.*)"$/, "$1") : "";
40
+ H.value++, r.push({
41
+ id: H.value,
42
+ key: C,
43
+ value: h,
44
+ // 如果值为空,则key设为空字符串,否则保留原值
45
+ width: s,
46
+ extraContent: l == null ? void 0 : l[1]
47
+ });
48
+ });
49
+ }), r;
50
+ }, ee = (t) => {
51
+ var r, n;
52
+ try {
53
+ const e = t.replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",").replace(/:/g, ":").replace(/:\s*(?=,|}|$)/g, ': ""');
54
+ if (c(e).split("{").length - 1 > 1) {
55
+ let s = c(e).replace(/^\{(.*)\}$/, "[$1]");
56
+ if (Y(s) && !s.includes("$") || (s = s.replace(/"([^"]+)"\$([\w\u4e00-\u9fa5]+\([^)]*\))/g, '"$1$$$2"')), Y(s)) {
57
+ const o = JSON.parse(s);
58
+ let u = [];
59
+ return o == null || o.forEach((y) => {
60
+ var f;
61
+ (f = Object.entries(c(y))) == null || f.forEach((a) => {
62
+ H.value++, u.push({
63
+ id: H.value,
64
+ key: (a == null ? void 0 : a[0]) ?? "",
65
+ value: (a == null ? void 0 : a[1]) === "" ? "" : a == null ? void 0 : a[1],
66
+ // 如果值为空,则key设为空字符串,否则保留原值
67
+ width: Object.keys(c(y)).length
68
+ });
69
+ });
70
+ }), u;
71
+ } else
72
+ return e.trim().startsWith("{{") ? ae(e.trim()) : _(s);
73
+ } else if (Y(e)) {
74
+ const s = JSON.parse(e);
75
+ return Object.entries(s).map(([o, u]) => (H.value++, {
76
+ id: H.value,
77
+ key: o,
78
+ value: u === "" ? "" : u,
79
+ // 如果值为空,则key设为空字符串,否则保留原值
80
+ width: 1
81
+ }));
82
+ } else
83
+ return ((r = _(e)) == null ? void 0 : r.length) === 0 ? e : (n = _(e)) == null ? void 0 : n.map((s) => ({
84
+ label: s.label,
85
+ method: ne(s.method)
86
+ }));
87
+ } catch (e) {
88
+ return console.error("转换失败:", e), [];
89
+ }
90
+ }, _ = (t) => {
91
+ t = t.trim().replace(/^\{|\}$/g, "").trim();
92
+ const r = [];
93
+ let n = 0;
94
+ for (; n < t.length; ) {
95
+ const e = t.slice(n).match(/^\s*"([^"]+)"\s*:\s*/);
96
+ if (!e) break;
97
+ const s = e[1];
98
+ n += e[0].length;
99
+ let o = "", u = 0, y = !1, f = "";
100
+ for (let a = n; a < t.length; a++) {
101
+ const l = t[a];
102
+ if ((l === '"' || l === "'") && !y ? (y = !0, f = l) : l === f && y && (y = !1, f = ""), !y && ((l === "{" || l === "(" || l === "[") && u++, (l === "}" || l === ")" || l === "]") && u--, l === "," && u === 0 || a === t.length - 1)) {
103
+ o = t.slice(n, a + 1).trim(), n = a + 1;
104
+ break;
105
+ }
106
+ }
107
+ r.push({
108
+ label: s,
109
+ method: o
110
+ });
111
+ }
112
+ return r;
113
+ }, ie = (t, r) => {
114
+ var n;
115
+ try {
116
+ if ((n = G) != null && n.find((e) => (e == null ? void 0 : e.key) === r))
117
+ return t.replace(/['"]/g, "").trim();
118
+ if (c(t).split("[").length - 1 > 1) {
119
+ const e = c(t).replace(/[’]|[‘]|[']/g, '"').replaceAll(/,/g, ",").replaceAll("(", "[").replaceAll(")", "]").replaceAll("],]", "]]");
120
+ return JSON.parse(e);
121
+ } else {
122
+ const e = c(t).replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",");
123
+ if (Y(e)) {
124
+ const s = JSON.parse(e);
125
+ return Array.isArray(s) ? s.map((o) => ({ label: o })) : s;
126
+ } else
127
+ return ee(c(t));
128
+ }
129
+ } catch (e) {
130
+ return console.error("解析失败:", e), t;
131
+ }
132
+ }, oe = (t) => ({ [t == null ? void 0 : t.key]: ie(t == null ? void 0 : t.value, t == null ? void 0 : t.key) }), ue = (t) => {
133
+ try {
134
+ if (c(t).split("[").length - 1 > 1) {
135
+ const r = c(t).replace(/[’]|[‘]|[']/g, '"').replaceAll(/,/g, ",").replaceAll("(", "[").replaceAll(")", "]").replaceAll("],]", "]]");
136
+ return JSON.parse(r);
137
+ } else
138
+ return JSON.parse(c(t).replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",")).map((n) => ({ label: n }));
139
+ } catch (r) {
140
+ return console.error("解析失败:", r), t;
141
+ }
142
+ }, he = (t) => {
143
+ const r = t.match(/\(([^)]+)\)/);
144
+ return r ? r[1] : "";
145
+ }, fe = (t) => {
146
+ const r = t.match(/^([^(]+)\s*\(/);
147
+ return r ? r[1].trim() : t;
148
+ }, S = (t) => t.replace(/'/g, "").replace(/"/g, "").replace(/{|}/g, "").split(":").map((r) => r.trim()).filter((r) => r).join("/"), ye = (t) => {
149
+ var u, y;
150
+ let r = [], n = [];
151
+ const e = (u = c(t)) == null ? void 0 : u.map((f) => f == null ? void 0 : f.key), s = [...new Set((y = c(e)) == null ? void 0 : y.map((f) => he(f)))];
152
+ s == null || s.forEach((f) => {
153
+ let a = t == null ? void 0 : t.filter((h) => h.key.includes(f));
154
+ a == null || a.forEach((h) => {
155
+ h != null && h.key.includes("Menus") && (r.push({
156
+ key: "GroupName",
157
+ value: S(h == null ? void 0 : h.value)
158
+ }), n.push(S(h == null ? void 0 : h.value)));
159
+ });
160
+ let l = t == null ? void 0 : t.filter((h) => h.key.includes(f) && !(h != null && h.key.includes("Menus")));
161
+ l = l == null ? void 0 : l.map((h) => (h.key = fe(h.key), h));
162
+ const C = {
163
+ key: "GroupContents",
164
+ value: l
165
+ };
166
+ r.push(C);
167
+ });
168
+ const o = {
169
+ key: "Menus",
170
+ value: n
171
+ };
172
+ return r.unshift(o), r;
173
+ }, te = (t) => {
174
+ var r, n;
175
+ if (Array.isArray(Object.keys(t)) && ((r = Object.keys(t)) == null ? void 0 : r.length) > 0) {
176
+ let e = [];
177
+ return (n = Object.entries(t)) == null || n.forEach(([s, o]) => {
178
+ var y, f;
179
+ let u = [];
180
+ if (u.push(s), ((y = Object.keys(o)) == null ? void 0 : y.length) > 0) {
181
+ let a = [];
182
+ a.push((f = te(o)) == null ? void 0 : f[0]), u.push(a == null ? void 0 : a[0]);
183
+ }
184
+ e.push(u);
185
+ }), e;
186
+ }
187
+ }, me = (t, r) => {
188
+ var e;
189
+ let n = r;
190
+ return Array.isArray(Object.keys(t)) && ((e = Object.entries(t)) == null || e.forEach(([s, o]) => {
191
+ let u = [s];
192
+ if (typeof o == "object" && o !== null) {
193
+ let y = te(o);
194
+ y == null || y.forEach((f) => {
195
+ u.push(f);
196
+ });
197
+ }
198
+ n.push(u);
199
+ })), n;
200
+ }, de = (t) => {
201
+ const r = {};
202
+ return t.forEach((e) => {
203
+ const s = e.split("/");
204
+ let o = r;
205
+ s.forEach((u) => {
206
+ o[u] || (o[u] = {}), o = o[u];
207
+ });
208
+ }), me(r, []);
209
+ }, ke = (t) => de(t), Le = (t) => {
210
+ var r, n, e, s, o, u, y, f, a;
211
+ try {
212
+ const l = re((n = (r = c(t)) == null ? void 0 : r.replace("(", "(")) == null ? void 0 : n.replace(")", ")")), C = (s = (e = c(l)) == null ? void 0 : e.filter((p) => !p.includes("/*"))) == null ? void 0 : s.map((p) => ce(p)), h = ye(C), i = [];
213
+ if ((h == null ? void 0 : h.length) === 1 && ((u = (o = h == null ? void 0 : h.find((p) => (p == null ? void 0 : p.key) === "Menus")) == null ? void 0 : o.value) == null ? void 0 : u.length) === 0)
214
+ return !1;
215
+ (y = c(h)) == null || y.forEach((p) => {
216
+ var $, m, d, D, O, E, J, b, A;
217
+ ($ = G) != null && $.find((k) => {
218
+ var N, M;
219
+ return ((N = k == null ? void 0 : k.key) == null ? void 0 : N.toUpperCase()) === ((M = p == null ? void 0 : p.key) == null ? void 0 : M.toUpperCase());
220
+ }) ? i.push({
221
+ comp: ((d = (m = G) == null ? void 0 : m.find((k) => {
222
+ var N, M;
223
+ return ((N = k == null ? void 0 : k.key) == null ? void 0 : N.toUpperCase()) === ((M = p == null ? void 0 : p.key) == null ? void 0 : M.toUpperCase());
224
+ })) == null ? void 0 : d.value) ?? "",
225
+ name: (D = p == null ? void 0 : p.value) == null ? void 0 : D.replace(/[’]|[‘]|[']/g, ""),
226
+ compData: []
227
+ }) : (O = L) != null && O.find((k) => {
228
+ var N, M;
229
+ return ((N = k == null ? void 0 : k.key) == null ? void 0 : N.toUpperCase()) === ((M = p == null ? void 0 : p.key) == null ? void 0 : M.toUpperCase());
230
+ }) && ((i == null ? void 0 : i.length) === 0 && (E = p.key) != null && E.includes("Menus") && i.push({
231
+ comp: "Menu",
232
+ name: "",
233
+ compData: []
234
+ }), (J = i == null ? void 0 : i[(i == null ? void 0 : i.length) - 1]) != null && J.compData && i[(i == null ? void 0 : i.length) - 1].compData.push({
235
+ key: (A = (b = L) == null ? void 0 : b.find((k) => {
236
+ var N, M;
237
+ return ((N = k == null ? void 0 : k.key) == null ? void 0 : N.toUpperCase()) === ((M = p == null ? void 0 : p.key) == null ? void 0 : M.toUpperCase());
238
+ })) == null ? void 0 : A.value,
239
+ contents: p == null ? void 0 : p.value
240
+ }));
241
+ });
242
+ let P = (f = c(i)) == null ? void 0 : f.map((p) => {
243
+ var $;
244
+ return p != null && p.compData && (p.compData = ($ = p == null ? void 0 : p.compData) == null ? void 0 : $.map((m) => {
245
+ var d, D, O, E, J, b, A, k, N, M, I;
246
+ if ((m == null ? void 0 : m.key) === "formFlex")
247
+ m.contents = ((D = (d = m.contents) == null ? void 0 : d.replace(/[’]|[‘]|[']/g, "")) == null ? void 0 : D.toUpperCase()) !== "Vertical".toUpperCase();
248
+ else if ((m == null ? void 0 : m.key) === "groupContents")
249
+ m.contents = (O = c(m.contents)) == null ? void 0 : O.map((F) => oe(c(F)));
250
+ else if (Array.isArray(m == null ? void 0 : m.contents))
251
+ m.contents = ke(m.contents);
252
+ else if (((J = (E = m == null ? void 0 : m.contents) == null ? void 0 : E.trim()) != null && J.startsWith("[") || (A = (b = m.contents) == null ? void 0 : b.trim()) != null && A.startsWith("【")) && ((N = (k = m.contents) == null ? void 0 : k.trim()) != null && N.endsWith("]") || (I = (M = m.contents) == null ? void 0 : M.trim()) != null && I.endsWith("】")))
253
+ m.contents = ue(c(m.contents));
254
+ else {
255
+ if (!m.contents) return;
256
+ m.contents = ee(c(m.contents));
257
+ }
258
+ return m;
259
+ })), p;
260
+ });
261
+ return P = (a = c(P)) == null ? void 0 : a.map((p) => {
262
+ var $;
263
+ return (p == null ? void 0 : p.comp) === "Group" && (p.compData = ($ = p.compData) == null ? void 0 : $.map((m) => {
264
+ var D;
265
+ let d = [];
266
+ return (D = m.contents) == null || D.forEach((O) => {
267
+ var E, J, b, A, k, N, M, I, F, q, z, B, Q, R, X, U, T;
268
+ if ((E = G) != null && E.find((g) => {
269
+ var j, x, W;
270
+ return ((j = g == null ? void 0 : g.key) == null ? void 0 : j.toUpperCase()) === ((W = (x = Object.keys(O)) == null ? void 0 : x[0]) == null ? void 0 : W.toUpperCase());
271
+ }))
272
+ d.push({
273
+ comp: (b = (J = G) == null ? void 0 : J.find((g) => {
274
+ var j, x, W;
275
+ return ((j = g == null ? void 0 : g.key) == null ? void 0 : j.toUpperCase()) === ((W = (x = Object.keys(O)) == null ? void 0 : x[0]) == null ? void 0 : W.toUpperCase());
276
+ })) == null ? void 0 : b.value,
277
+ name: (k = (A = Object.values(O)) == null ? void 0 : A[0]) == null ? void 0 : k.replace(/[’]|[‘]|[']/g, ""),
278
+ compData: []
279
+ });
280
+ else if ((N = L) != null && N.find((g) => {
281
+ var j, x, W;
282
+ return ((j = g == null ? void 0 : g.key) == null ? void 0 : j.toUpperCase()) === ((W = (x = Object.keys(O)) == null ? void 0 : x[0]) == null ? void 0 : W.toUpperCase());
283
+ })) {
284
+ if ((d == null ? void 0 : d.length) === 0) return;
285
+ (M = d == null ? void 0 : d[(d == null ? void 0 : d.length) - 1]) != null && M.compData && d[(d == null ? void 0 : d.length) - 1].compData.push({
286
+ key: (F = (I = L) == null ? void 0 : I.find((g) => {
287
+ var j, x, W;
288
+ return ((j = g == null ? void 0 : g.key) == null ? void 0 : j.toUpperCase()) === ((W = (x = Object.keys(O)) == null ? void 0 : x[0]) == null ? void 0 : W.toUpperCase());
289
+ })) == null ? void 0 : F.value,
290
+ contents: (q = Object.values(O)) == null ? void 0 : q[0]
291
+ });
292
+ } else if ((B = (z = Object.keys(O)) == null ? void 0 : z[0]) != null && B.includes("$")) {
293
+ const g = (R = (Q = Object.keys(c(O))) == null ? void 0 : Q[0]) == null ? void 0 : R.split("$");
294
+ d[(d == null ? void 0 : d.length) - 1].compData.push({
295
+ key: (U = (X = L) == null ? void 0 : X.find((j) => {
296
+ var x, W;
297
+ return ((x = j == null ? void 0 : j.key) == null ? void 0 : x.toUpperCase()) === ((W = g == null ? void 0 : g[0]) == null ? void 0 : W.toUpperCase());
298
+ })) == null ? void 0 : U.value,
299
+ contents: (T = Object.values(O)) == null ? void 0 : T[0],
300
+ selectLabel: g == null ? void 0 : g[1]
301
+ });
302
+ }
303
+ return O;
304
+ }), m.contents = d, m;
305
+ })), p;
306
+ }), P;
307
+ } catch {
308
+ return !1;
309
+ }
310
+ }, K = v(0), $e = (t) => {
311
+ let r;
312
+ t.includes(`\r
313
+ `) ? r = t.split(`\r
314
+ `).filter((s) => s.trim() !== "") : r = t.split(`
315
+ `).filter((s) => s.trim() !== "");
316
+ const n = [];
317
+ let e = "";
318
+ for (const s of r)
319
+ s.includes("{") || e.includes("{") || s.includes("[") || e.includes("[") || s.includes("【") || e.includes("【") || s.includes("(") || e.includes("(") || s.includes("(") || e.includes("(") || s.includes("/*") || e.includes("/*") ? (e += s.trim(), c(e).split("{").length - 1 === c(e).split("}").length - 1 && c(e).split("【").length - 1 === c(e).split("】").length - 1 && c(e).split("[").length - 1 === c(e).split("]").length - 1 && c(e).split("(").length - 1 === c(e).split(")").length - 1 && c(e).split("(").length - 1 === c(e).split(")").length - 1 && c(e).split("/*").length - 1 === c(e).split("*/").length - 1 && (n.push(e), e = "")) : n.push(s.trim());
320
+ return n;
321
+ }, ge = (t) => {
322
+ const [r, n] = t.split(/=(.+)/), e = r.replace(/['"]/g, "").trim(), s = n.replace(/^['"]|['"]$/g, "");
323
+ return { key: e, value: s };
324
+ }, Z = (t) => {
325
+ try {
326
+ return JSON.parse(t), !0;
327
+ } catch {
328
+ return !1;
329
+ }
330
+ }, be = (t) => t.includes("$") && t.trim().endsWith("(") ? t + ")" : t, Ae = (t) => {
331
+ let r = t;
332
+ const n = [];
333
+ let e = "";
334
+ for (const s of r)
335
+ s.includes("{") || e.includes("{") || s.includes("[") || e.includes("[") || s.includes("【") || e.includes("【") || s.includes("(") || e.includes("(") || s.includes("(") || e.includes("(") || s.includes("/*") || e.includes("/*") ? (e += s.trim(), c(e).split("{").length - 1 === c(e).split("}").length - 1 && c(e).split("【").length - 1 === c(e).split("】").length - 1 && c(e).split("[").length - 1 === c(e).split("]").length - 1 && c(e).split("(").length - 1 === c(e).split(")").length - 1 && c(e).split("(").length - 1 === c(e).split(")").length - 1 && c(e).split("/*").length - 1 === c(e).split("*/").length - 1 && (n.push(e), e = "")) : n.push(s.trim());
336
+ return n == null ? void 0 : n.filter((s) => s.includes("{"));
337
+ }, Oe = (t) => {
338
+ var n;
339
+ let r = [];
340
+ return (n = Ae(t.slice(1, -1))) == null || n.forEach((e) => {
341
+ var o, u, y, f;
342
+ let s = ((u = (o = e.slice(1, -1)) == null ? void 0 : o.split(",")) == null ? void 0 : u.length) ?? 1;
343
+ (f = (y = e.slice(1, -1)) == null ? void 0 : y.split(",")) == null || f.forEach((a) => {
344
+ var i, P, p, $, m, d, D, O, E, J, b, A, k;
345
+ let l = a == null ? void 0 : a.split(":"), C = l != null && l[0] ? (l == null ? void 0 : l[1].split("$").length) - 1 === 1 ? ((i = l == null ? void 0 : l[0]) == null ? void 0 : i.replace(/^"(.*)"$/, "$1")) + ((P = l == null ? void 0 : l[1]) == null ? void 0 : P.replace(/^"(.*)"$/, "$1")) : Array.isArray(($ = (p = l == null ? void 0 : l[1]) == null ? void 0 : p.replace(/^"(.*)"$/, "$1")) == null ? void 0 : $.split("(")) && ((D = (d = (m = l == null ? void 0 : l[1]) == null ? void 0 : m.replace(/^"(.*)"$/, "$1")) == null ? void 0 : d.split("(")) == null ? void 0 : D.length) > 1 ? ((O = l == null ? void 0 : l[0]) == null ? void 0 : O.replace(/^"(.*)"$/, "$1")) + ((b = (J = (E = l == null ? void 0 : l[1]) == null ? void 0 : E.replace(/^"(.*)"$/, "$1")) == null ? void 0 : J.split("(")) == null ? void 0 : b[0]) + "()" : (A = l == null ? void 0 : l[0]) == null ? void 0 : A.replace(/^"(.*)"$/, "$1") : "", h = (l == null ? void 0 : l[1].split("$").length) - 1 === 0 ? (k = l == null ? void 0 : l[1]) == null ? void 0 : k.replace(/^"(.*)"$/, "$1") : "";
346
+ K.value++, r.push({
347
+ id: K.value,
348
+ key: C,
349
+ value: h,
350
+ // 如果值为空,则key设为空字符串,否则保留原值
351
+ width: s,
352
+ extraContent: l == null ? void 0 : l[1]
353
+ });
354
+ });
355
+ }), r;
356
+ }, se = (t) => {
357
+ var r, n;
358
+ try {
359
+ const e = t.replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",").replace(/:/g, ":").replace(/:\s*(?=,|}|$)/g, ': ""');
360
+ if (c(e).split("{").length - 1 > 1) {
361
+ let s = c(e).replace(/^\{(.*)\}$/, "[$1]");
362
+ if (Z(s) && !s.includes("$") || (s = s.replace(/"([^"]+)"\$([\w\u4e00-\u9fa5]+\([^)]*\))/g, '"$1$$$2"')), Z(s)) {
363
+ const o = JSON.parse(s);
364
+ let u = [];
365
+ return o == null || o.forEach((y) => {
366
+ var f;
367
+ (f = Object.entries(c(y))) == null || f.forEach((a) => {
368
+ K.value++, u.push({
369
+ id: K.value,
370
+ key: (a == null ? void 0 : a[0]) ?? "",
371
+ value: (a == null ? void 0 : a[1]) === "" ? "" : a == null ? void 0 : a[1],
372
+ // 如果值为空,则key设为空字符串,否则保留原值
373
+ width: Object.keys(c(y)).length
374
+ });
375
+ });
376
+ }), u;
377
+ } else
378
+ return e.trim().startsWith("{{") ? Oe(e.trim()) : w(s);
379
+ } else if (Z(e)) {
380
+ const s = JSON.parse(e);
381
+ return Object.entries(s).map(([o, u]) => (K.value++, {
382
+ id: K.value,
383
+ key: o,
384
+ value: u === "" ? "" : u,
385
+ // 如果值为空,则key设为空字符串,否则保留原值
386
+ width: 1
387
+ }));
388
+ } else
389
+ return ((r = w(e)) == null ? void 0 : r.length) === 0 ? e : (n = w(e)) == null ? void 0 : n.map((s) => ({
390
+ label: s.label,
391
+ method: be(s.method)
392
+ }));
393
+ } catch (e) {
394
+ return console.error("转换失败:", e), [];
395
+ }
396
+ }, w = (t) => {
397
+ t = t.trim().replace(/^\{|\}$/g, "").trim();
398
+ const r = [];
399
+ let n = 0;
400
+ for (; n < t.length; ) {
401
+ const e = t.slice(n).match(/^\s*"([^"]+)"\s*:\s*/);
402
+ if (!e) break;
403
+ const s = e[1];
404
+ n += e[0].length;
405
+ let o = "", u = 0, y = !1, f = "";
406
+ for (let a = n; a < t.length; a++) {
407
+ const l = t[a];
408
+ if ((l === '"' || l === "'") && !y ? (y = !0, f = l) : l === f && y && (y = !1, f = ""), !y && ((l === "{" || l === "(" || l === "[") && u++, (l === "}" || l === ")" || l === "]") && u--, l === "," && u === 0 || a === t.length - 1)) {
409
+ o = t.slice(n, a + 1).trim(), n = a + 1;
410
+ break;
411
+ }
412
+ }
413
+ r.push({
414
+ label: s,
415
+ method: o
416
+ });
417
+ }
418
+ return r;
419
+ }, je = (t, r) => {
420
+ var n;
421
+ try {
422
+ if ((n = G) != null && n.find((e) => (e == null ? void 0 : e.key) === r))
423
+ return t.replace(/['"]/g, "").trim();
424
+ if (c(t).split("[").length - 1 > 1) {
425
+ const e = c(t).replace(/[’]|[‘]|[']/g, '"').replaceAll(/,/g, ",").replaceAll("(", "[").replaceAll(")", "]").replaceAll("],]", "]]");
426
+ return JSON.parse(e);
427
+ } else {
428
+ const e = c(t).replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",");
429
+ if (Z(e)) {
430
+ const s = JSON.parse(e);
431
+ return Array.isArray(s) ? s.map((o) => ({ label: o })) : s;
432
+ } else
433
+ return se(c(t));
434
+ }
435
+ } catch (e) {
436
+ return console.error("解析失败:", e), t;
437
+ }
438
+ }, Ce = (t) => ({ [t == null ? void 0 : t.key]: je(t == null ? void 0 : t.value, t == null ? void 0 : t.key) }), Ue = (t) => {
439
+ try {
440
+ if (c(t).split("[").length - 1 > 1) {
441
+ const r = c(t).replace(/[’]|[‘]|[']/g, '"').replaceAll(/,/g, ",").replaceAll("(", "[").replaceAll(")", "]").replaceAll("],]", "]]");
442
+ return JSON.parse(r);
443
+ } else
444
+ return JSON.parse(c(t).replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",")).map((n) => ({ label: n }));
445
+ } catch (r) {
446
+ return console.error("解析失败:", r), t;
447
+ }
448
+ }, De = (t) => {
449
+ const r = t.match(/\(([^)]+)\)/);
450
+ return r ? r[1] : "";
451
+ }, Ee = (t) => {
452
+ const r = t.match(/^([^(]+)\s*\(/);
453
+ return r ? r[1].trim() : t;
454
+ }, V = (t) => t.replace(/'/g, "").replace(/"/g, "").replace(/{|}/g, "").split(":").map((r) => r.trim()).filter((r) => r).join("/"), Je = (t) => {
455
+ var u, y;
456
+ let r = [], n = [];
457
+ const e = (u = c(t)) == null ? void 0 : u.map((f) => f == null ? void 0 : f.key), s = [...new Set((y = c(e)) == null ? void 0 : y.map((f) => De(f)))];
458
+ s == null || s.forEach((f) => {
459
+ let a = t == null ? void 0 : t.filter((h) => h.key.includes(f));
460
+ a == null || a.forEach((h) => {
461
+ h != null && h.key.includes("Menus") && (r.push({
462
+ key: "GroupName",
463
+ value: V(h == null ? void 0 : h.value)
464
+ }), n.push(V(h == null ? void 0 : h.value)));
465
+ });
466
+ let l = t == null ? void 0 : t.filter((h) => h.key.includes(f) && !(h != null && h.key.includes("Menus")));
467
+ l = l == null ? void 0 : l.map((h) => (h.key = Ee(h.key), h));
468
+ const C = {
469
+ key: "GroupContents",
470
+ value: l
471
+ };
472
+ r.push(C);
473
+ });
474
+ const o = {
475
+ key: "Menus",
476
+ value: n
477
+ };
478
+ return r.unshift(o), r;
479
+ }, le = (t) => {
480
+ var r, n;
481
+ if (Array.isArray(Object.keys(t)) && ((r = Object.keys(t)) == null ? void 0 : r.length) > 0) {
482
+ let e = [];
483
+ return (n = Object.entries(t)) == null || n.forEach(([s, o]) => {
484
+ var y, f;
485
+ let u = [];
486
+ if (u.push(s), ((y = Object.keys(o)) == null ? void 0 : y.length) > 0) {
487
+ let a = [];
488
+ a.push((f = le(o)) == null ? void 0 : f[0]), u.push(a == null ? void 0 : a[0]);
489
+ }
490
+ e.push(u);
491
+ }), e;
492
+ }
493
+ }, Ne = (t, r) => {
494
+ var e;
495
+ let n = r;
496
+ return Array.isArray(Object.keys(t)) && ((e = Object.entries(t)) == null || e.forEach(([s, o]) => {
497
+ let u = [s];
498
+ if (typeof o == "object" && o !== null) {
499
+ let y = le(o);
500
+ y == null || y.forEach((f) => {
501
+ u.push(f);
502
+ });
503
+ }
504
+ n.push(u);
505
+ })), n;
506
+ }, Me = (t) => {
507
+ const r = {};
508
+ return t.forEach((e) => {
509
+ const s = e.split("/");
510
+ let o = r;
511
+ s.forEach((u) => {
512
+ o[u] || (o[u] = {}), o = o[u];
513
+ });
514
+ }), Ne(r, []);
515
+ }, Pe = (t) => Me(t), Ge = (t) => {
516
+ var r, n, e, s, o, u, y;
517
+ try {
518
+ const f = $e((n = (r = c(t)) == null ? void 0 : r.replace("(", "(")) == null ? void 0 : n.replace(")", ")")), a = (s = (e = c(f)) == null ? void 0 : e.filter((i) => !i.includes("/*"))) == null ? void 0 : s.map((i) => ge(i)), l = Je(a), C = [];
519
+ (o = c(l)) == null || o.forEach((i) => {
520
+ var P, p, $, m, d, D, O, E, J;
521
+ (P = G) != null && P.find((b) => {
522
+ var A, k;
523
+ return ((A = b == null ? void 0 : b.key) == null ? void 0 : A.toUpperCase()) === ((k = i == null ? void 0 : i.key) == null ? void 0 : k.toUpperCase());
524
+ }) ? C.push({
525
+ comp: (($ = (p = G) == null ? void 0 : p.find((b) => {
526
+ var A, k;
527
+ return ((A = b == null ? void 0 : b.key) == null ? void 0 : A.toUpperCase()) === ((k = i == null ? void 0 : i.key) == null ? void 0 : k.toUpperCase());
528
+ })) == null ? void 0 : $.value) ?? "",
529
+ name: (m = i == null ? void 0 : i.value) == null ? void 0 : m.replace(/[’]|[‘]|[']/g, ""),
530
+ compData: []
531
+ }) : (d = L) != null && d.find((b) => {
532
+ var A, k;
533
+ return ((A = b == null ? void 0 : b.key) == null ? void 0 : A.toUpperCase()) === ((k = i == null ? void 0 : i.key) == null ? void 0 : k.toUpperCase());
534
+ }) && ((C == null ? void 0 : C.length) === 0 && (D = i.key) != null && D.includes("Menus") && C.push({
535
+ comp: "Menu",
536
+ name: "",
537
+ compData: []
538
+ }), (O = C == null ? void 0 : C[(C == null ? void 0 : C.length) - 1]) != null && O.compData && C[(C == null ? void 0 : C.length) - 1].compData.push({
539
+ key: (J = (E = L) == null ? void 0 : E.find((b) => {
540
+ var A, k;
541
+ return ((A = b == null ? void 0 : b.key) == null ? void 0 : A.toUpperCase()) === ((k = i == null ? void 0 : i.key) == null ? void 0 : k.toUpperCase());
542
+ })) == null ? void 0 : J.value,
543
+ contents: i == null ? void 0 : i.value
544
+ }));
545
+ });
546
+ let h = (u = c(C)) == null ? void 0 : u.map((i) => {
547
+ var P;
548
+ return i != null && i.compData && (i.compData = (P = i == null ? void 0 : i.compData) == null ? void 0 : P.map((p) => {
549
+ var $, m, d, D, O, E, J, b, A, k, N;
550
+ if ((p == null ? void 0 : p.key) === "formFlex")
551
+ p.contents = ((m = ($ = p.contents) == null ? void 0 : $.replace(/[’]|[‘]|[']/g, "")) == null ? void 0 : m.toUpperCase()) !== "Vertical".toUpperCase();
552
+ else if ((p == null ? void 0 : p.key) === "groupContents")
553
+ p.contents = (d = c(p.contents)) == null ? void 0 : d.map((M) => Ce(c(M)));
554
+ else if (Array.isArray(p == null ? void 0 : p.contents))
555
+ p.contents = Pe(p.contents);
556
+ else if (((O = (D = p == null ? void 0 : p.contents) == null ? void 0 : D.trim()) != null && O.startsWith("[") || (J = (E = p.contents) == null ? void 0 : E.trim()) != null && J.startsWith("【")) && ((A = (b = p.contents) == null ? void 0 : b.trim()) != null && A.endsWith("]") || (N = (k = p.contents) == null ? void 0 : k.trim()) != null && N.endsWith("】")))
557
+ p.contents = Ue(c(p.contents));
558
+ else {
559
+ if (!p.contents) return;
560
+ p.contents = se(c(p.contents));
561
+ }
562
+ return p;
563
+ })), i;
564
+ });
565
+ return h = (y = c(h)) == null ? void 0 : y.map((i) => {
566
+ var P;
567
+ return (i == null ? void 0 : i.comp) === "Group" && (i.compData = (P = i.compData) == null ? void 0 : P.map((p) => {
568
+ var m;
569
+ let $ = [];
570
+ return (m = p.contents) == null || m.forEach((d) => {
571
+ var D, O, E, J, b, A, k, N, M, I, F, q, z, B, Q, R, X;
572
+ if ((D = G) != null && D.find((U) => {
573
+ var T, g, j;
574
+ return ((T = U == null ? void 0 : U.key) == null ? void 0 : T.toUpperCase()) === ((j = (g = Object.keys(d)) == null ? void 0 : g[0]) == null ? void 0 : j.toUpperCase());
575
+ }))
576
+ $.push({
577
+ comp: (E = (O = G) == null ? void 0 : O.find((U) => {
578
+ var T, g, j;
579
+ return ((T = U == null ? void 0 : U.key) == null ? void 0 : T.toUpperCase()) === ((j = (g = Object.keys(d)) == null ? void 0 : g[0]) == null ? void 0 : j.toUpperCase());
580
+ })) == null ? void 0 : E.value,
581
+ name: (b = (J = Object.values(d)) == null ? void 0 : J[0]) == null ? void 0 : b.replace(/[’]|[‘]|[']/g, ""),
582
+ compData: []
583
+ });
584
+ else if ((A = L) != null && A.find((U) => {
585
+ var T, g, j;
586
+ return ((T = U == null ? void 0 : U.key) == null ? void 0 : T.toUpperCase()) === ((j = (g = Object.keys(d)) == null ? void 0 : g[0]) == null ? void 0 : j.toUpperCase());
587
+ })) {
588
+ if (($ == null ? void 0 : $.length) === 0) return;
589
+ (k = $ == null ? void 0 : $[($ == null ? void 0 : $.length) - 1]) != null && k.compData && $[($ == null ? void 0 : $.length) - 1].compData.push({
590
+ key: (M = (N = L) == null ? void 0 : N.find((U) => {
591
+ var T, g, j;
592
+ return ((T = U == null ? void 0 : U.key) == null ? void 0 : T.toUpperCase()) === ((j = (g = Object.keys(d)) == null ? void 0 : g[0]) == null ? void 0 : j.toUpperCase());
593
+ })) == null ? void 0 : M.value,
594
+ contents: (I = Object.values(d)) == null ? void 0 : I[0]
595
+ });
596
+ } else if ((q = (F = Object.keys(d)) == null ? void 0 : F[0]) != null && q.includes("$")) {
597
+ const U = (B = (z = Object.keys(c(d))) == null ? void 0 : z[0]) == null ? void 0 : B.split("$");
598
+ $[($ == null ? void 0 : $.length) - 1].compData.push({
599
+ key: (R = (Q = L) == null ? void 0 : Q.find((T) => {
600
+ var g, j;
601
+ return ((g = T == null ? void 0 : T.key) == null ? void 0 : g.toUpperCase()) === ((j = U == null ? void 0 : U[0]) == null ? void 0 : j.toUpperCase());
602
+ })) == null ? void 0 : R.value,
603
+ contents: (X = Object.values(d)) == null ? void 0 : X[0],
604
+ selectLabel: U == null ? void 0 : U[1]
605
+ });
606
+ }
607
+ return d;
608
+ }), p.contents = $, p;
609
+ })), i;
610
+ }), h;
611
+ } catch {
612
+ return !1;
613
+ }
614
+ };
615
+ export {
616
+ Ge as a,
617
+ Le as e
618
+ };