@vtj/parser 0.12.56 → 0.12.58

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -14,11 +14,11 @@ import * as T from "@babel/types";
14
14
  * Copyright (c) 2025, VTJ.PRO All rights reserved.
15
15
  * @name @vtj/parser
16
16
  * @author CHC chenhuachun1549@dingtalk.com
17
- * @version 0.12.56
17
+ * @version 0.12.58
18
18
  * @license <a href="https://vtj.pro/license.html">MIT License</a>
19
19
  */
20
- const x0 = "0.12.56";
21
- function D(e) {
20
+ const x0 = "0.12.58";
21
+ function _(e) {
22
22
  const { descriptor: u } = Wu(e), t = u.template?.content || "", a = (u.scriptSetup || u.script)?.content || "", i = u.styles.map((c) => c.content);
23
23
  return {
24
24
  template: t,
@@ -64,7 +64,7 @@ function Nu(e, u) {
64
64
  })?.code || "";
65
65
  }
66
66
  function g0(e) {
67
- const u = D(e), t = cu(u.script), a = {};
67
+ const u = _(e), t = cu(u.script), a = {};
68
68
  return u.styles && (a.css = u.styles[0] || ""), su(t, {
69
69
  CallExpression(i) {
70
70
  const c = i.node.callee?.name;
@@ -80,8 +80,8 @@ function g0(e) {
80
80
  }
81
81
  function J(e, u, t) {
82
82
  const a = new RegExp(`${u}`, "g"), i = /(\@|\_|\-|\$|\.|\,|\w|\{\s)$/, c = /^[\w\_\-\@\$]/, s = new RegExp(`^this.${u}$`, "g");
83
- return e.replace(a, (d, r, b) => {
84
- const f = b.substring(0, r), I = b.substring(r + u.length);
83
+ return e.replace(a, (d, n, b) => {
84
+ const f = b.substring(0, n), I = b.substring(n + u.length);
85
85
  return i.test(f) || c.test(I.trim()) ? d : t;
86
86
  }).replace(s, t);
87
87
  }
@@ -91,20 +91,20 @@ function gu(e, u, t) {
91
91
  computed: i = [],
92
92
  libs: c = {},
93
93
  members: s = [],
94
- platform: n
94
+ platform: r
95
95
  } = t || {}, d = Array.from(a[u || ""] || /* @__PURE__ */ new Set());
96
96
  if (d)
97
- for (const r of d)
98
- e = J(e, r, `this.context.${r}`);
99
- for (const r of i)
100
- e = J(e, r, `this.${r}.value`);
101
- for (const [r, b] of Object.entries(c))
102
- e = J(e, r, `this.$libs.${b}.${r}`);
103
- for (const r of s)
104
- e = J(e, r, `this.${r}`);
105
- if (n === "uniapp") {
106
- const r = /\buni\./g;
107
- e = e.replace(r, "this.$libs.UniH5.uni.");
97
+ for (const n of d)
98
+ e = J(e, n, `this.context.${n}`);
99
+ for (const n of i)
100
+ e = J(e, n, `this.${n}.value`);
101
+ for (const [n, b] of Object.entries(c))
102
+ e = J(e, n, `this.$libs.${b}.${n}`);
103
+ for (const n of s)
104
+ e = J(e, n, `this.${n}`);
105
+ if (r === "uniapp") {
106
+ const n = /\buni\./g;
107
+ e = e.replace(n, "this.$libs.UniH5.uni.");
108
108
  }
109
109
  return e = e.replace(/_ctx\./g, "this."), e;
110
110
  }
@@ -439,13 +439,13 @@ function ye(e, u, t, a) {
439
439
  const d = a - c;
440
440
  return d < 0 || d >= i ? -1 : e[t + d] - 1;
441
441
  }
442
- let s = t, n = s + i - 1;
443
- for (; s <= n; ) {
444
- const d = s + n >>> 1, r = e[d];
445
- if (r < a)
442
+ let s = t, r = s + i - 1;
443
+ for (; s <= r; ) {
444
+ const d = s + r >>> 1, n = e[d];
445
+ if (n < a)
446
446
  s = d + 1;
447
- else if (r > a)
448
- n = d - 1;
447
+ else if (n > a)
448
+ r = d - 1;
449
449
  else
450
450
  return e[d + i];
451
451
  }
@@ -914,8 +914,8 @@ const $ = /* @__PURE__ */ new Set([
914
914
  ]), ve = /\s|\//;
915
915
  class Ae {
916
916
  constructor(u, t = {}) {
917
- var a, i, c, s, n, d;
918
- this.options = t, this.startIndex = 0, this.endIndex = 0, this.openTagStart = 0, this.tagname = "", this.attribname = "", this.attribvalue = "", this.attribs = null, this.stack = [], this.buffers = [], this.bufferOffset = 0, this.writeIndex = 0, this.ended = !1, this.cbs = u ?? {}, this.htmlMode = !this.options.xmlMode, this.lowerCaseTagNames = (a = t.lowerCaseTags) !== null && a !== void 0 ? a : this.htmlMode, this.lowerCaseAttributeNames = (i = t.lowerCaseAttributeNames) !== null && i !== void 0 ? i : this.htmlMode, this.recognizeSelfClosing = (c = t.recognizeSelfClosing) !== null && c !== void 0 ? c : !this.htmlMode, this.tokenizer = new ((s = t.Tokenizer) !== null && s !== void 0 ? s : Ie)(this.options, this), this.foreignContext = [!this.htmlMode], (d = (n = this.cbs).onparserinit) === null || d === void 0 || d.call(n, this);
917
+ var a, i, c, s, r, d;
918
+ this.options = t, this.startIndex = 0, this.endIndex = 0, this.openTagStart = 0, this.tagname = "", this.attribname = "", this.attribvalue = "", this.attribs = null, this.stack = [], this.buffers = [], this.bufferOffset = 0, this.writeIndex = 0, this.ended = !1, this.cbs = u ?? {}, this.htmlMode = !this.options.xmlMode, this.lowerCaseTagNames = (a = t.lowerCaseTags) !== null && a !== void 0 ? a : this.htmlMode, this.lowerCaseAttributeNames = (i = t.lowerCaseAttributeNames) !== null && i !== void 0 ? i : this.htmlMode, this.recognizeSelfClosing = (c = t.recognizeSelfClosing) !== null && c !== void 0 ? c : !this.htmlMode, this.tokenizer = new ((s = t.Tokenizer) !== null && s !== void 0 ? s : Ie)(this.options, this), this.foreignContext = [!this.htmlMode], (d = (r = this.cbs).onparserinit) === null || d === void 0 || d.call(r, this);
919
919
  }
920
920
  // Tokenizer event handlers
921
921
  /** @internal */
@@ -948,8 +948,8 @@ class Ae {
948
948
  const s = this.htmlMode && we.get(u);
949
949
  if (s)
950
950
  for (; this.stack.length > 0 && s.has(this.stack[0]); ) {
951
- const n = this.stack.shift();
952
- (a = (t = this.cbs).onclosetag) === null || a === void 0 || a.call(t, n, !0);
951
+ const r = this.stack.shift();
952
+ (a = (t = this.cbs).onclosetag) === null || a === void 0 || a.call(t, r, !0);
953
953
  }
954
954
  this.isVoidElement(u) || (this.stack.unshift(u), this.htmlMode && (Eu.has(u) ? this.foreignContext.unshift(!0) : vu.has(u) && this.foreignContext.unshift(!1))), (c = (i = this.cbs).onopentagname) === null || c === void 0 || c.call(i, u), this.cbs.onopentag && (this.attribs = {});
955
955
  }
@@ -963,11 +963,11 @@ class Ae {
963
963
  }
964
964
  /** @internal */
965
965
  onclosetag(u, t) {
966
- var a, i, c, s, n, d, r, b;
966
+ var a, i, c, s, r, d, n, b;
967
967
  this.endIndex = t;
968
968
  let f = this.getSlice(u, t);
969
969
  if (this.lowerCaseTagNames && (f = f.toLowerCase()), this.htmlMode && (Eu.has(f) || vu.has(f)) && this.foreignContext.shift(), this.isVoidElement(f))
970
- this.htmlMode && f === "br" && ((s = (c = this.cbs).onopentagname) === null || s === void 0 || s.call(c, "br"), (d = (n = this.cbs).onopentag) === null || d === void 0 || d.call(n, "br", {}, !0), (b = (r = this.cbs).onclosetag) === null || b === void 0 || b.call(r, "br", !1));
970
+ this.htmlMode && f === "br" && ((s = (c = this.cbs).onopentagname) === null || s === void 0 || s.call(c, "br"), (d = (r = this.cbs).onopentag) === null || d === void 0 || d.call(r, "br", {}, !0), (b = (n = this.cbs).onclosetag) === null || b === void 0 || b.call(n, "br", !1));
971
971
  else {
972
972
  const I = this.stack.indexOf(f);
973
973
  if (I !== -1)
@@ -1034,15 +1034,15 @@ class Ae {
1034
1034
  }
1035
1035
  /** @internal */
1036
1036
  oncomment(u, t, a) {
1037
- var i, c, s, n;
1038
- this.endIndex = t, (c = (i = this.cbs).oncomment) === null || c === void 0 || c.call(i, this.getSlice(u, t - a)), (n = (s = this.cbs).oncommentend) === null || n === void 0 || n.call(s), this.startIndex = t + 1;
1037
+ var i, c, s, r;
1038
+ this.endIndex = t, (c = (i = this.cbs).oncomment) === null || c === void 0 || c.call(i, this.getSlice(u, t - a)), (r = (s = this.cbs).oncommentend) === null || r === void 0 || r.call(s), this.startIndex = t + 1;
1039
1039
  }
1040
1040
  /** @internal */
1041
1041
  oncdata(u, t, a) {
1042
- var i, c, s, n, d, r, b, f, I, x;
1042
+ var i, c, s, r, d, n, b, f, I, x;
1043
1043
  this.endIndex = t;
1044
1044
  const N = this.getSlice(u, t - a);
1045
- !this.htmlMode || this.options.recognizeCDATA ? ((c = (i = this.cbs).oncdatastart) === null || c === void 0 || c.call(i), (n = (s = this.cbs).ontext) === null || n === void 0 || n.call(s, N), (r = (d = this.cbs).oncdataend) === null || r === void 0 || r.call(d)) : ((f = (b = this.cbs).oncomment) === null || f === void 0 || f.call(b, `[CDATA[${N}]]`), (x = (I = this.cbs).oncommentend) === null || x === void 0 || x.call(I)), this.startIndex = t + 1;
1045
+ !this.htmlMode || this.options.recognizeCDATA ? ((c = (i = this.cbs).oncdatastart) === null || c === void 0 || c.call(i), (r = (s = this.cbs).ontext) === null || r === void 0 || r.call(s, N), (n = (d = this.cbs).oncdataend) === null || n === void 0 || n.call(d)) : ((f = (b = this.cbs).oncomment) === null || f === void 0 || f.call(b, `[CDATA[${N}]]`), (x = (I = this.cbs).oncommentend) === null || x === void 0 || x.call(I)), this.startIndex = t + 1;
1046
1046
  }
1047
1047
  /** @internal */
1048
1048
  onend() {
@@ -1145,13 +1145,13 @@ function Au(e, u = "web") {
1145
1145
  let i = "";
1146
1146
  const c = new Ae(
1147
1147
  {
1148
- onopentag: (s, n, d) => {
1149
- const r = a[a.length - 1];
1150
- i.trim() && (Array.isArray(r.children) ? r.children.push({
1148
+ onopentag: (s, r, d) => {
1149
+ const n = a[a.length - 1];
1150
+ i.trim() && (Array.isArray(n.children) ? n.children.push({
1151
1151
  name: "span",
1152
1152
  children: i.trim()
1153
- }) : r.children = i.trim(), i = "");
1154
- const b = Object.entries(n || {}).reduce(
1153
+ }) : n.children = i.trim(), i = "");
1154
+ const b = Object.entries(r || {}).reduce(
1155
1155
  (I, x) => {
1156
1156
  let [N = "", V = ""] = x;
1157
1157
  return N && (I[N] = V), I;
@@ -1163,17 +1163,17 @@ function Au(e, u = "web") {
1163
1163
  name: ku(s, u),
1164
1164
  props: b
1165
1165
  };
1166
- Array.isArray(r.children) ? r.children.push(f) : r.children ? r.children = [
1166
+ Array.isArray(n.children) ? n.children.push(f) : n.children ? n.children = [
1167
1167
  {
1168
1168
  name: "span",
1169
- children: r.children
1169
+ children: n.children
1170
1170
  },
1171
1171
  f
1172
- ] : r.children = [f], d || a.push(f);
1172
+ ] : n.children = [f], d || a.push(f);
1173
1173
  },
1174
1174
  ontext: (s) => {
1175
- const n = s.trim();
1176
- n && n !== '"' && (i += n);
1175
+ const r = s.trim();
1176
+ r && r !== '"' && (i += r);
1177
1177
  },
1178
1178
  onclosetag: () => {
1179
1179
  const s = a.pop();
@@ -1197,16 +1197,16 @@ function Te(e, u) {
1197
1197
  ExportDefaultDeclaration(c) {
1198
1198
  const s = c.node.declaration;
1199
1199
  if (s.type !== "CallExpression") return;
1200
- const n = s.arguments[0];
1201
- if (n?.type !== "ObjectExpression") return;
1202
- const d = n.properties.filter(
1200
+ const r = s.arguments[0];
1201
+ if (r?.type !== "ObjectExpression") return;
1202
+ const d = r.properties.filter(
1203
1203
  (f) => f.type === "ObjectProperty"
1204
- ), r = n.properties.filter(
1204
+ ), n = r.properties.filter(
1205
1205
  (f) => f.type == "ObjectMethod"
1206
1206
  ), b = d.find(
1207
1207
  (f) => f.key.name === "computed"
1208
1208
  );
1209
- b && (a.computed = qu(b.value), a.watchers = Le(b.value));
1209
+ b && (a.computed = qu(b.value), a.watchers = De(b.value));
1210
1210
  for (const f of d)
1211
1211
  switch (f.key.name) {
1212
1212
  case "name":
@@ -1219,7 +1219,7 @@ function Te(e, u) {
1219
1219
  );
1220
1220
  break;
1221
1221
  case "watch":
1222
- a.watch = De(
1222
+ a.watch = Le(
1223
1223
  f.value,
1224
1224
  a.watchers
1225
1225
  );
@@ -1231,19 +1231,19 @@ function Te(e, u) {
1231
1231
  a.inject = Me(f.value);
1232
1232
  break;
1233
1233
  }
1234
- for (const f of r)
1234
+ for (const f of n)
1235
1235
  switch (f.key.name) {
1236
1236
  case "setup":
1237
1237
  a.state = Ve(f.body);
1238
1238
  break;
1239
1239
  }
1240
- a.lifeCycles = _e(r);
1240
+ a.lifeCycles = _e(n);
1241
1241
  },
1242
1242
  CallExpression(c) {
1243
1243
  const s = Fe(c.node);
1244
1244
  if (s.length)
1245
- for (let n of s)
1246
- a.emits?.find((r) => r.name === n.name) || a.emits?.push(n);
1245
+ for (let r of s)
1246
+ a.emits?.find((n) => n.name === r.name) || a.emits?.push(r);
1247
1247
  }
1248
1248
  }), a;
1249
1249
  }
@@ -1252,17 +1252,17 @@ function Ne(e) {
1252
1252
  let c;
1253
1253
  const s = e.replace(/\n/g, " ");
1254
1254
  for (; (c = u.exec(s)) !== null; ) {
1255
- const n = c[2] === "@element-plus/icons-vue" ? "@vtj/icons" : c[2];
1255
+ const r = c[2] === "@element-plus/icons-vue" ? "@vtj/icons" : c[2];
1256
1256
  i.push({
1257
- from: n,
1257
+ from: r,
1258
1258
  imports: c[1].split(",").map((d) => d.trim())
1259
1259
  });
1260
1260
  }
1261
1261
  for (; (c = t.exec(s)) !== null; ) {
1262
- const n = c[1], d = c[2];
1263
- n && !a.test(n) && i.push({
1262
+ const r = c[1], d = c[2];
1263
+ r && !a.test(r) && i.push({
1264
1264
  from: d,
1265
- imports: n
1265
+ imports: r
1266
1266
  });
1267
1267
  }
1268
1268
  return i;
@@ -1293,14 +1293,14 @@ function O(e) {
1293
1293
  const { key: u, async: t, params: a, body: i } = e, c = a?.map((s) => s.type === "ObjectPattern" ? `{${s.properties.map((d) => d.key?.name || d.name).join(",")}}` : s.name).join(", ");
1294
1294
  if (u.type === "Identifier") {
1295
1295
  const s = u.name;
1296
- let n = "{}";
1297
- i && (n = M(i) || "{}");
1296
+ let r = "{}";
1297
+ i && (r = M(i) || "{}");
1298
1298
  const d = e.value;
1299
1299
  if (d && d.type === "CallExpression") {
1300
1300
  let x = M(d) || "";
1301
- x = x.replace("function () {", "() => {"), n = `{ return (${x})}`;
1301
+ x = x.replace("function () {", "() => {"), r = `{ return (${x})}`;
1302
1302
  }
1303
- const b = `${t ? "async " : ""}(${c}) => ${n}`, f = s.startsWith("watcher_");
1303
+ const b = `${t ? "async " : ""}(${c}) => ${r}`, f = s.startsWith("watcher_");
1304
1304
  return {
1305
1305
  id: f ? s.replace("watcher_", "") : "",
1306
1306
  name: s,
@@ -1322,7 +1322,7 @@ function qe(e, u) {
1322
1322
  if (!e) return {};
1323
1323
  const t = {}, a = /apis\[\'([\w]*)\'\]/, i = /\.then\(([\w\W]*)\)/;
1324
1324
  for (const c of e.properties) {
1325
- const s = O(c), n = c.body.body?.[0], d = (n?.leadingComments[0].value || "").trim(), r = oe(d);
1325
+ const s = O(c), r = c.body.body?.[0], d = (r?.leadingComments?.[0].value || "").trim(), n = oe(d);
1326
1326
  if (s && s.exp.value.includes("this.provider.apis")) {
1327
1327
  const f = (s.exp.value.match(a) || [])[1];
1328
1328
  if (!f) continue;
@@ -1332,7 +1332,7 @@ function qe(e, u) {
1332
1332
  t[s.name] = {
1333
1333
  ref: f,
1334
1334
  name: I.name,
1335
- test: r?.test || {
1335
+ test: n?.test || {
1336
1336
  type: "JSFunction",
1337
1337
  value: `() => this.runApi({
1338
1338
  /* 在这里可输入接口参数 */
@@ -1350,25 +1350,25 @@ function qe(e, u) {
1350
1350
  };
1351
1351
  }
1352
1352
  if (s && s.exp.value.includes("this.provider.createMock")) {
1353
- const b = n?.declarations?.[0]?.init?.arguments?.[0], f = s.exp.value.match(i)?.[1];
1353
+ const b = r?.declarations?.[0]?.init?.arguments?.[0], f = s.exp.value.match(i)?.[1];
1354
1354
  t[s.name] = {
1355
1355
  ref: "",
1356
1356
  name: s.name,
1357
- test: r?.test || {
1357
+ test: n?.test || {
1358
1358
  type: "JSFunction",
1359
1359
  value: `() => this.runApi({
1360
1360
  /* 在这里可输入接口参数 */
1361
1361
  })`
1362
1362
  },
1363
1363
  type: "mock",
1364
- label: r?.label || "",
1365
- transform: r?.transform || {
1364
+ label: n?.label || "",
1365
+ transform: n?.transform || {
1366
1366
  type: "JSFunction",
1367
1367
  value: f || `(res) => {
1368
1368
  return res;
1369
1369
  }`
1370
1370
  },
1371
- mockTemplate: r?.mockTemplate || {
1371
+ mockTemplate: n?.mockTemplate || {
1372
1372
  type: "JSFunction",
1373
1373
  value: b ? M(b) : ""
1374
1374
  }
@@ -1403,7 +1403,7 @@ function Re(e) {
1403
1403
  }
1404
1404
  return u;
1405
1405
  }
1406
- function Le(e) {
1406
+ function De(e) {
1407
1407
  if (!e) return {};
1408
1408
  const u = {};
1409
1409
  for (const t of e.properties) {
@@ -1427,18 +1427,18 @@ function Tu(e, u) {
1427
1427
  if (t)
1428
1428
  return O(t)?.exp;
1429
1429
  }
1430
- function De(e, u = {}) {
1430
+ function Le(e, u = {}) {
1431
1431
  const t = [];
1432
1432
  for (const a of e.properties) {
1433
1433
  const { key: i, value: c } = a, s = i.value || i.name || "";
1434
1434
  if (u[s]) {
1435
- const n = c.properties;
1435
+ const r = c.properties;
1436
1436
  t.push({
1437
1437
  id: s.replace("watcher_", ""),
1438
1438
  source: u[s],
1439
- deep: W(n, "deep"),
1440
- immediate: W(n, "immediate"),
1441
- handler: Tu(n, "handler")
1439
+ deep: W(r, "deep"),
1440
+ immediate: W(r, "immediate"),
1441
+ handler: Tu(r, "handler")
1442
1442
  });
1443
1443
  } else if (a.type === "ObjectMethod" && t.push({
1444
1444
  id: eu(),
@@ -1450,16 +1450,16 @@ function De(e, u = {}) {
1450
1450
  immediate: !1,
1451
1451
  handler: O(a)?.exp
1452
1452
  }), a.type === "ObjectProperty") {
1453
- const n = c.properties;
1453
+ const r = c.properties;
1454
1454
  t.push({
1455
1455
  id: eu(),
1456
1456
  source: {
1457
1457
  type: "JSFunction",
1458
1458
  value: `() => { return this.${s}; }`
1459
1459
  },
1460
- deep: W(n, "deep"),
1461
- immediate: W(n, "immediate"),
1462
- handler: Tu(n, "handler")
1460
+ deep: W(r, "deep"),
1461
+ immediate: W(r, "immediate"),
1462
+ handler: Tu(r, "handler")
1463
1463
  });
1464
1464
  }
1465
1465
  }
@@ -1519,10 +1519,10 @@ function Fe(e) {
1519
1519
  function Me(e) {
1520
1520
  let u = [];
1521
1521
  return e.type === "ObjectExpression" && (u = e.properties.map((t) => {
1522
- const { key: a, value: i } = t, c = i.properties, s = a.name, n = ju(c, "from"), d = Ru(c);
1522
+ const { key: a, value: i } = t, c = i.properties, s = a.name, r = ju(c, "from"), d = Ru(c);
1523
1523
  return {
1524
1524
  name: s,
1525
- from: n || s,
1525
+ from: r || s,
1526
1526
  default: d
1527
1527
  };
1528
1528
  })), u;
@@ -1530,16 +1530,16 @@ function Me(e) {
1530
1530
  function Oe(e, u) {
1531
1531
  return (e.apis || []).find((t) => t.id === u);
1532
1532
  }
1533
- let au = [], X = {}, Lu = {}, Du = {}, Q = "web", _u = [];
1533
+ let au = [], X = {}, Du = {}, Lu = {}, Q = "web", _u = [];
1534
1534
  function Pe(e, u, t = "", a) {
1535
- return au = [], X = {}, Lu = a?.handlers || {}, Du = a?.styles || {}, Q = a?.platform || "web", _u = a?.imports || [], {
1535
+ return au = [], X = {}, Du = a?.handlers || {}, Lu = a?.styles || {}, Q = a?.platform || "web", _u = a?.imports || [], {
1536
1536
  nodes: (Ju({
1537
1537
  id: e,
1538
1538
  filename: u,
1539
1539
  source: t,
1540
1540
  isProd: !0,
1541
1541
  slotted: !0
1542
- }).ast?.children || []).map((n) => U(n)).filter((n) => !!n),
1542
+ }).ast?.children || []).map((r) => U(r)).filter((r) => !!r),
1543
1543
  slots: au,
1544
1544
  context: X
1545
1545
  };
@@ -1561,8 +1561,8 @@ function Ue(e) {
1561
1561
  for (const t of e) {
1562
1562
  if (t.type === h.ATTRIBUTE)
1563
1563
  if (t.name === "class") {
1564
- const a = t.value?.content || "", i = /[\w]+_[\w]{5,}/, c = a.match(i)?.[0] || "", s = a.split(" ").filter((d) => d !== c), n = Du[`.${c}`];
1565
- n && (u.style = n), s.length && (u.class = s.join(" "));
1564
+ const a = t.value?.content || "", i = /[\w]+_[\w]{5,}/, c = a.match(i)?.[0] || "", s = a.split(" ").filter((d) => d !== c), r = Lu[`.${c}`];
1565
+ r && (u.style = r), s.length && (u.class = s.join(" "));
1566
1566
  } else if (t.name === "style") {
1567
1567
  const a = t.value?.content || "";
1568
1568
  a && (u.style = Vu(a));
@@ -1593,11 +1593,11 @@ function He(e, u = {}) {
1593
1593
  );
1594
1594
  let c = a.exp?.loc.source || "";
1595
1595
  /\)$/.test(c) && (c = `($event) => { ${c} } `);
1596
- const n = new RegExp(`${a.arg.content}_[\\w]{5,}`), d = c.match(n)?.[0] || "", r = u[d];
1597
- if (d && r)
1596
+ const r = new RegExp(`${a.arg.content}_[\\w]{5,}`), d = c.match(r)?.[0] || "", n = u[d];
1597
+ if (d && n)
1598
1598
  t[a.arg.content] = {
1599
1599
  name: a.arg.content,
1600
- handler: r,
1600
+ handler: n,
1601
1601
  modifiers: i
1602
1602
  };
1603
1603
  else {
@@ -1649,10 +1649,10 @@ function du(e, u) {
1649
1649
  name: "vBind",
1650
1650
  value: k(s.exp?.loc.source || "")
1651
1651
  });
1652
- const n = a.find((d) => d.name === "html");
1653
- n && t.push({
1652
+ const r = a.find((d) => d.name === "html");
1653
+ r && t.push({
1654
1654
  name: "vHtml",
1655
- value: k(n.exp?.loc.source || "")
1655
+ value: k(r.exp?.loc.source || "")
1656
1656
  });
1657
1657
  }
1658
1658
  return t;
@@ -1661,13 +1661,13 @@ function Bu(e) {
1661
1661
  let u = "";
1662
1662
  const { name: t, props: a, events: i = {} } = e, c = a?.class || "";
1663
1663
  if (typeof c == "string") {
1664
- const s = new RegExp(`${t}_([\\w]+)`), n = c.match(s);
1665
- n && n[1] && (u = n[1]);
1666
- }
1667
- for (const { name: s, handler: n } of Object.values(i)) {
1668
- const d = new RegExp(`${s}_([\\w]+)`), r = n.value.match(d);
1664
+ const s = new RegExp(`${t}_([\\w]+)`), r = c.match(s);
1669
1665
  r && r[1] && (u = r[1]);
1670
1666
  }
1667
+ for (const { name: s, handler: r } of Object.values(i)) {
1668
+ const d = new RegExp(`${s}_([\\w]+)`), n = r.value.match(d);
1669
+ n && n[1] && (u = n[1]);
1670
+ }
1671
1671
  return u || eu();
1672
1672
  }
1673
1673
  function Ge(e) {
@@ -1689,13 +1689,13 @@ function iu(e, u) {
1689
1689
  const t = new Set(u?.id ? X[u.id] : []), a = (e.directives || []).find((s) => s.name === "vFor");
1690
1690
  let i = new Set(Array.from(t));
1691
1691
  if (a) {
1692
- const { item: s = "item", index: n = "index" } = a.iterator || {};
1693
- i = /* @__PURE__ */ new Set([s, n, ...Array.from(i)]);
1692
+ const { item: s = "item", index: r = "index" } = a.iterator || {};
1693
+ i = /* @__PURE__ */ new Set([s, r, ...Array.from(i)]);
1694
1694
  }
1695
1695
  const c = e.slot;
1696
1696
  if (c) {
1697
- const s = typeof c == "string" ? [] : c.params || [], n = s.length ? s : [`scope_${u?.id}`];
1698
- i = /* @__PURE__ */ new Set([...n, ...Array.from(i)]);
1697
+ const s = typeof c == "string" ? [] : c.params || [], r = s.length ? s : [`scope_${u?.id}`];
1698
+ i = /* @__PURE__ */ new Set([...r, ...Array.from(i)]);
1699
1699
  }
1700
1700
  X[e.id] = i;
1701
1701
  }
@@ -1704,7 +1704,7 @@ function uu(e, u, t, a) {
1704
1704
  name: ku(e.tag, Q),
1705
1705
  from: Ge(e.tag),
1706
1706
  props: Ue(e.props),
1707
- events: He(e.props, Lu),
1707
+ events: He(e.props, Du),
1708
1708
  directives: du(t || e, a)
1709
1709
  };
1710
1710
  i.id = Bu(i), iu(i, u);
@@ -1811,14 +1811,14 @@ function Xe(e) {
1811
1811
  const u = [], t = {}, a = [];
1812
1812
  try {
1813
1813
  const i = ue.compileString(e, { charset: !1 })?.css || "", c = Yu.parse(i), s = /^.[\w]+_[\w]{5,}/;
1814
- for (const n of c.nodes)
1815
- if (n.type === "rule") {
1814
+ for (const r of c.nodes)
1815
+ if (r.type === "rule") {
1816
1816
  const d = {};
1817
- s.test(n.selector) ? (n.nodes.forEach((r) => {
1818
- r.type === "decl" && (d[r.prop] = r.value);
1819
- }), t[n.selector] = d) : a.push(n.toString());
1817
+ s.test(r.selector) ? (r.nodes.forEach((n) => {
1818
+ n.type === "decl" && (d[n.prop] = n.value);
1819
+ }), t[r.selector] = d) : a.push(r.toString());
1820
1820
  } else
1821
- a.push(n.toString());
1821
+ a.push(r.toString());
1822
1822
  } catch (i) {
1823
1823
  u.push(`css解析出错了,错误信息:[ ${i.message} ]
1824
1824
  `);
@@ -1834,7 +1834,7 @@ const Cu = "arrow-double-left, arrow-double-right, contact, notes, records, cash
1834
1834
  ", "
1835
1835
  ), Qe = "AddLocation, Aim, AlarmClock, Apple, ArrowDownBold, ArrowDown, ArrowLeftBold, ArrowLeft, ArrowRightBold, ArrowRight, ArrowUpBold, ArrowUp, Avatar, Back, Baseball, Basketball, BellFilled, Bell, Bicycle, BottomLeft, BottomRight, Bottom, Bowl, Box, Briefcase, BrushFilled, Brush, Burger, Calendar, CameraFilled, Camera, CaretBottom, CaretLeft, CaretRight, CaretTop, Cellphone, ChatDotRound, ChatDotSquare, ChatLineRound, ChatLineSquare, ChatRound, ChatSquare, Check, Checked, Cherry, Chicken, ChromeFilled, CircleCheckFilled, CircleCheck, CircleCloseFilled, CircleClose, CirclePlusFilled, CirclePlus, Clock, CloseBold, Close, Cloudy, CoffeeCup, Coffee, Coin, ColdDrink, CollectionTag, Collection, Comment, Compass, Connection, Coordinate, CopyDocument, Cpu, CreditCard, Crop, DArrowLeft, DArrowRight, DCaret, DataAnalysis, DataBoard, DataLine, DeleteFilled, DeleteLocation, Delete, Dessert, Discount, DishDot, Dish, DocumentAdd, DocumentChecked, DocumentCopy, DocumentDelete, DocumentRemove, Document, Download, Drizzling, EditPen, Edit, ElemeFilled, Eleme, ElementPlus, Expand, Failed, Female, Files, Film, Filter, Finished, FirstAidKit, Flag, Fold, FolderAdd, FolderChecked, FolderDelete, FolderOpened, FolderRemove, Folder, Food, Football, ForkSpoon, Fries, FullScreen, GobletFull, GobletSquareFull, GobletSquare, Goblet, GoldMedal, GoodsFilled, Goods, Grape, Grid, Guide, Handbag, Headset, HelpFilled, Help, Hide, Histogram, HomeFilled, HotWater, House, IceCreamRound, IceCreamSquare, IceCream, IceDrink, IceTea, InfoFilled, Iphone, Key, KnifeFork, Lightning, Link, List, Loading, LocationFilled, LocationInformation, Location, Lock, Lollipop, MagicStick, Magnet, Male, Management, MapLocation, Medal, Memo, Menu, MessageBox, Message, Mic, Microphone, MilkTea, Minus, Money, Monitor, MoonNight, Moon, MoreFilled, More, MostlyCloudy, Mouse, Mug, MuteNotification, Mute, NoSmoking, Notebook, Notification, Odometer, OfficeBuilding, Open, Operation, Opportunity, Orange, Paperclip, PartlyCloudy, Pear, PhoneFilled, Phone, PictureFilled, PictureRounded, Picture, PieChart, Place, Platform, Plus, Pointer, Position, Postcard, Pouring, Present, PriceTag, Printer, Promotion, QuartzWatch, QuestionFilled, Rank, ReadingLamp, Reading, RefreshLeft, RefreshRight, Refresh, Refrigerator, RemoveFilled, Remove, Right, ScaleToOriginal, School, Scissor, Search, Select, Sell, SemiSelect, Service, SetUp, Setting, Share, Ship, Shop, ShoppingBag, ShoppingCartFull, ShoppingCart, ShoppingTrolley, Smoking, Soccer, SoldOut, SortDown, SortUp, Sort, Stamp, StarFilled, Star, Stopwatch, SuccessFilled, Sugar, SuitcaseLine, Suitcase, Sunny, Sunrise, Sunset, SwitchButton, SwitchFilled, Switch, TakeawayBox, Ticket, Tickets, Timer, ToiletPaper, Tools, TopLeft, TopRight, Top, TrendCharts, TrophyBase, Trophy, TurnOff, Umbrella, Unlock, UploadFilled, Upload, UserFilled, User, Van, VideoCameraFilled, VideoCamera, VideoPause, VideoPlay, View, WalletFilled, Wallet, WarnTriangleFilled, WarningFilled, Warning, Watch, Watermelon, WindPower, ZoomIn, ZoomOut, VtjIconChatRecord, VtjIconNewChat, VtjIconAi, VtjIconUniapp, VtjIconWindowMax, VtjIconWindowMin, VtjIconWindowClose, VtjIconWindowNormal, VtjIconWindowDown, VtjIconWindowUp, VtjIconNpSave, VtjIconNpFile, VtjIconNpEdit, VtjIconNpShare, VtjIconNpSearch, VtjIconNpExport, VtjIconNpImport, VtjIconNpList, VtjIconNpPrint, VtjIconNpCancel, VtjIconNpConfirm, VtjIconNpReset, VtjIconNpReturnAll, VtjIconNpReturn, VtjIconNpRemove, VtjIconNpRemoveRow, VtjIconNpDelete, VtjIconNpExit, VtjIconNpRefresh, VtjIconNpAdd, VtjIconNpSelect, VtjIconNpAddRow, VtjIconNpExtend, VtjIconNpClose, VtjIconNpSubmit, VtjIconDeps, VtjIconBack, VtjIconHome, VtjIconApi, VtjIconExport, VtjIconImport, VtjIconGreater, VtjIconSmaller, VtjIconCheck, VtjIconSwitch, VtjIconCopy, VtjIconLock, VtjIconUnlock, VtjIconLayers, VtjIconConsole, VtjIconTeam, VtjIconPublish, VtjIconPreview, VtjIconSave, VtjIconPc, VtjIconPhone, VtjIconPad, VtjIconRedo, VtjIconRefresh, VtjIconUndo, VtjIconCategory, VtjIconProject, VtjIconNotice, VtjIconFav, VtjIconBug, VtjIconFile, VtjIconFolder, VtjIconUpload, VtjIconDownload, VtjIconUser, VtjIconSetting, VtjIconArrowRight, VtjIconArrowLeft, VtjIconArrowDown, VtjIconArrowUp, VtjIconShare, VtjIconData, VtjIconTemplate, VtjIconExitFullscreen, VtjIconFullscreen, VtjIconEdit, VtjIconRemove, VtjIconJs, VtjIconDatabase, VtjIconInfo, VtjIconPlus, VtjIconMinus, VtjIconHelp, VtjIconVars, VtjIconOutline, VtjIconVisible, VtjIconInvisible, VtjIconDocument, VtjIconHistory, VtjIconFixed, VtjIconUnfixed, VtjIconSearch, VtjIconMore, VtjIconClose, VtjIconComponents, VtjIconBlock".split(
1836
1836
  ", "
1837
- ), Ze = "user", _ = "User";
1837
+ ), Ze = "user", D = "User";
1838
1838
  class Ke {
1839
1839
  validate(u) {
1840
1840
  const t = {
@@ -1847,14 +1847,14 @@ class Ke {
1847
1847
  }
1848
1848
  isCompleteSFC(u) {
1849
1849
  try {
1850
- const t = D(u);
1850
+ const t = _(u);
1851
1851
  return !!(t.template && t.script && t.styles);
1852
1852
  } catch {
1853
1853
  return !1;
1854
1854
  }
1855
1855
  }
1856
1856
  checkSetup(u) {
1857
- const t = D(u);
1857
+ const t = _(u);
1858
1858
  let a = 0;
1859
1859
  return Nu(t.script, {
1860
1860
  ObjectMethod(i) {
@@ -1865,10 +1865,10 @@ class Ke {
1865
1865
  }), a === 3;
1866
1866
  }
1867
1867
  findVantIcons(u) {
1868
- const t = D(u), a = /<(?:VanIcon|van-icon)\b[^>]*>/g, i = t.template.match(a) || [], c = [];
1868
+ const t = _(u), a = /<(?:VanIcon|van-icon)\b[^>]*>/g, i = t.template.match(a) || [], c = [];
1869
1869
  return i.forEach((s) => {
1870
- const n = s.match(/\bname="([^"]+)"/);
1871
- n && c.push(n[1]);
1870
+ const r = s.match(/\bname="([^"]+)"/);
1871
+ r && c.push(r[1]);
1872
1872
  }), [...new Set(c)];
1873
1873
  }
1874
1874
  checkVantIcons(u) {
@@ -1878,7 +1878,7 @@ class Ke {
1878
1878
  return a;
1879
1879
  }
1880
1880
  findVtjIcons(u) {
1881
- const t = D(u), a = /import\s*{([^}]+)}\s*from\s*['"]\@vtj\/icons['"]/, i = t.script.match(a);
1881
+ const t = _(u), a = /import\s*{([^}]+)}\s*from\s*['"]\@vtj\/icons['"]/, i = t.script.match(a);
1882
1882
  return !i || !i[1] ? [] : i[1].split(",").map((c) => c.trim()).filter(Boolean);
1883
1883
  }
1884
1884
  checkVtjIcons(u) {
@@ -1902,7 +1902,7 @@ class Ke {
1902
1902
  function Ye(e) {
1903
1903
  const u = [];
1904
1904
  let t = e;
1905
- const a = D(e);
1905
+ const a = _(e);
1906
1906
  if (!a.template || !a.script)
1907
1907
  return {
1908
1908
  fixed: !1,
@@ -1912,15 +1912,15 @@ function Ye(e) {
1912
1912
  };
1913
1913
  const i = u0(a.script), c = a.template;
1914
1914
  let s = c;
1915
- const n = [], d = /\{\{([^}]+)\}\}/g;
1916
- let r;
1917
- for (; (r = d.exec(c)) !== null; ) {
1918
- const m = r[0], y = r[1], g = C(y, i);
1915
+ const r = [], d = /\{\{([^}]+)\}\}/g;
1916
+ let n;
1917
+ for (; (n = d.exec(c)) !== null; ) {
1918
+ const m = n[0], y = n[1], g = C(y, i);
1919
1919
  if (g !== y) {
1920
- const p = B(c, r.index);
1921
- n.push({
1922
- start: r.index,
1923
- end: r.index + m.length,
1920
+ const p = B(c, n.index);
1921
+ r.push({
1922
+ start: n.index,
1923
+ end: n.index + m.length,
1924
1924
  original: m,
1925
1925
  replacement: `{{${g}}}`,
1926
1926
  line: p.line,
@@ -1935,13 +1935,13 @@ function Ye(e) {
1935
1935
  }
1936
1936
  }
1937
1937
  const b = /:(\w+)="([^"]+)"/g;
1938
- for (; (r = b.exec(c)) !== null; ) {
1939
- const m = r[0], y = r[1], g = r[2], p = C(g, i);
1938
+ for (; (n = b.exec(c)) !== null; ) {
1939
+ const m = n[0], y = n[1], g = n[2], p = C(g, i);
1940
1940
  if (p !== g) {
1941
- const w = B(c, r.index);
1942
- n.push({
1943
- start: r.index,
1944
- end: r.index + m.length,
1941
+ const w = B(c, n.index);
1942
+ r.push({
1943
+ start: n.index,
1944
+ end: n.index + m.length,
1945
1945
  original: m,
1946
1946
  replacement: `:${y}="${p}"`,
1947
1947
  line: w.line,
@@ -1956,13 +1956,13 @@ function Ye(e) {
1956
1956
  }
1957
1957
  }
1958
1958
  const f = /v-(if|else-if|show)="([^"]+)"/g;
1959
- for (; (r = f.exec(c)) !== null; ) {
1960
- const m = r[0], y = r[1], g = r[2], p = C(g, i);
1959
+ for (; (n = f.exec(c)) !== null; ) {
1960
+ const m = n[0], y = n[1], g = n[2], p = C(g, i);
1961
1961
  if (p !== g) {
1962
- const w = B(c, r.index);
1963
- n.push({
1964
- start: r.index,
1965
- end: r.index + m.length,
1962
+ const w = B(c, n.index);
1963
+ r.push({
1964
+ start: n.index,
1965
+ end: n.index + m.length,
1966
1966
  original: m,
1967
1967
  replacement: `v-${y}="${p}"`,
1968
1968
  line: w.line,
@@ -1977,18 +1977,18 @@ function Ye(e) {
1977
1977
  }
1978
1978
  }
1979
1979
  const I = /v-for="([^"]+)"/g;
1980
- for (; (r = I.exec(c)) !== null; ) {
1981
- const m = r[0], g = r[1].match(/^(.+)\s+in\s+(.+)$/);
1980
+ for (; (n = I.exec(c)) !== null; ) {
1981
+ const m = n[0], g = n[1].match(/^(.+)\s+in\s+(.+)$/);
1982
1982
  if (g) {
1983
1983
  const [, p, w] = g, q = C(
1984
1984
  w,
1985
1985
  i
1986
1986
  );
1987
1987
  if (q !== w) {
1988
- const P = B(c, r.index), K = `v-for="${p} in ${q}"`;
1989
- n.push({
1990
- start: r.index,
1991
- end: r.index + m.length,
1988
+ const P = B(c, n.index), K = `v-for="${p} in ${q}"`;
1989
+ r.push({
1990
+ start: n.index,
1991
+ end: n.index + m.length,
1992
1992
  original: m,
1993
1993
  replacement: K,
1994
1994
  line: P.line,
@@ -2004,13 +2004,13 @@ function Ye(e) {
2004
2004
  }
2005
2005
  }
2006
2006
  const x = /v-model="([^"]+)"/g;
2007
- for (; (r = x.exec(c)) !== null; ) {
2008
- const m = r[0], y = r[1], g = C(y, i);
2007
+ for (; (n = x.exec(c)) !== null; ) {
2008
+ const m = n[0], y = n[1], g = C(y, i);
2009
2009
  if (g !== y) {
2010
- const p = B(c, r.index);
2011
- n.push({
2012
- start: r.index,
2013
- end: r.index + m.length,
2010
+ const p = B(c, n.index);
2011
+ r.push({
2012
+ start: n.index,
2013
+ end: n.index + m.length,
2014
2014
  original: m,
2015
2015
  replacement: `v-model="${g}"`,
2016
2016
  line: p.line,
@@ -2025,13 +2025,13 @@ function Ye(e) {
2025
2025
  }
2026
2026
  }
2027
2027
  const N = /v-bind="([^"]+)"/g;
2028
- for (; (r = N.exec(c)) !== null; ) {
2029
- const m = r[0], y = r[1], g = C(y, i);
2028
+ for (; (n = N.exec(c)) !== null; ) {
2029
+ const m = n[0], y = n[1], g = C(y, i);
2030
2030
  if (g !== y) {
2031
- const p = B(c, r.index);
2032
- n.push({
2033
- start: r.index,
2034
- end: r.index + m.length,
2031
+ const p = B(c, n.index);
2032
+ r.push({
2033
+ start: n.index,
2034
+ end: n.index + m.length,
2035
2035
  original: m,
2036
2036
  replacement: `v-bind="${g}"`,
2037
2037
  line: p.line,
@@ -2046,13 +2046,13 @@ function Ye(e) {
2046
2046
  }
2047
2047
  }
2048
2048
  const V = /v-(text|html)="([^"]+)"/g;
2049
- for (; (r = V.exec(c)) !== null; ) {
2050
- const m = r[0], y = r[1], g = r[2], p = C(g, i);
2049
+ for (; (n = V.exec(c)) !== null; ) {
2050
+ const m = n[0], y = n[1], g = n[2], p = C(g, i);
2051
2051
  if (p !== g) {
2052
- const w = B(c, r.index);
2053
- n.push({
2054
- start: r.index,
2055
- end: r.index + m.length,
2052
+ const w = B(c, n.index);
2053
+ r.push({
2054
+ start: n.index,
2055
+ end: n.index + m.length,
2056
2056
  original: m,
2057
2057
  replacement: `v-${y}="${p}"`,
2058
2058
  line: w.line,
@@ -2067,13 +2067,13 @@ function Ye(e) {
2067
2067
  }
2068
2068
  }
2069
2069
  const Z = /(@|v-on:)(\w+)="([^"]+)"/g;
2070
- for (; (r = Z.exec(c)) !== null; ) {
2071
- const m = r[0], y = r[1], g = r[2], p = r[3], w = e0(p, i);
2070
+ for (; (n = Z.exec(c)) !== null; ) {
2071
+ const m = n[0], y = n[1], g = n[2], p = n[3], w = e0(p, i);
2072
2072
  if (w !== p) {
2073
- const q = B(c, r.index);
2074
- n.push({
2075
- start: r.index,
2076
- end: r.index + m.length,
2073
+ const q = B(c, n.index);
2074
+ r.push({
2075
+ start: n.index,
2076
+ end: n.index + m.length,
2077
2077
  original: m,
2078
2078
  replacement: `${y}${g}="${w}"`,
2079
2079
  line: q.line,
@@ -2087,16 +2087,16 @@ function Ye(e) {
2087
2087
  });
2088
2088
  }
2089
2089
  }
2090
- if (n.sort((m, y) => y.start - m.start), n.forEach((m) => {
2090
+ if (r.sort((m, y) => y.start - m.start), r.forEach((m) => {
2091
2091
  s = s.substring(0, m.start) + m.replacement + s.substring(m.end);
2092
- }), n.length > 0) {
2092
+ }), r.length > 0) {
2093
2093
  const m = e.indexOf("<template>"), y = e.indexOf("</template>") + 11;
2094
2094
  t = e.substring(0, m) + `<template>
2095
2095
  ` + s + `
2096
2096
  </template>` + e.substring(y);
2097
2097
  }
2098
2098
  return {
2099
- fixed: n.length > 0,
2099
+ fixed: r.length > 0,
2100
2100
  originalCode: e,
2101
2101
  fixedCode: t,
2102
2102
  changes: u
@@ -2138,7 +2138,7 @@ function e0(e, u) {
2138
2138
  `(\\+\\+|--)?(?<![\\w.])${a}(?![\\w])`,
2139
2139
  "g"
2140
2140
  );
2141
- t.includes(`state.${a}`) || (t = t.replace(i, `state.${a}$1`), t = t.replace(c, (s, n) => n ? `${n}state.${a}` : s.includes(a) && !s.includes("state.") ? `state.${a}` : s));
2141
+ t.includes(`state.${a}`) || (t = t.replace(i, `state.${a}$1`), t = t.replace(c, (s, r) => r ? `${r}state.${a}` : s.includes(a) && !s.includes("state.") ? `state.${a}` : s));
2142
2142
  }), C(t, u);
2143
2143
  }
2144
2144
  function B(e, u) {
@@ -2155,28 +2155,29 @@ class t0 {
2155
2155
  return t.illegalVantIcons.length && (a = this.fixVantIcons(a)), t.illegalVtjIcons.length && (a = this.fixVtjIcons(a, t.illegalVtjIcons)), Ye(a).fixedCode;
2156
2156
  }
2157
2157
  fixVantIcons(u) {
2158
- const t = D(u), a = t.template.replace(
2158
+ const t = _(u), a = t.template.replace(
2159
2159
  /<(?:VanIcon|van-icon)\s+[^>]*name="([^"]+)"[^>]*>/g,
2160
2160
  (i, c) => Cu.includes(c) ? i : i.replace(c, Ze)
2161
2161
  );
2162
2162
  return this.reconstructSFC(t, a, t.script);
2163
2163
  }
2164
2164
  fixVtjIcons(u, t = []) {
2165
- const a = D(u);
2165
+ const a = _(u);
2166
2166
  a.script = Nu(a.script, {
2167
2167
  ImportDeclaration(i) {
2168
2168
  if (i.node.source.value === "@vtj/icons") {
2169
2169
  const c = i.node.specifiers, s = [];
2170
- for (const n of c) {
2171
- const d = n.imported?.name;
2172
- t.includes(d) || s.push(
2173
- T.importSpecifier(n.local, n.imported)
2170
+ let r = !1;
2171
+ for (const d of c) {
2172
+ const n = d.imported?.name;
2173
+ n === D && (r = !0), t.includes(n) || s.push(
2174
+ T.importSpecifier(d.local, d.imported)
2174
2175
  );
2175
2176
  }
2176
- s.push(
2177
+ r || s.push(
2177
2178
  T.importSpecifier(
2178
- T.identifier(_),
2179
- T.identifier(_)
2179
+ T.identifier(D),
2180
+ T.identifier(D)
2180
2181
  )
2181
2182
  ), i.node.specifiers = s;
2182
2183
  }
@@ -2186,13 +2187,13 @@ class t0 {
2186
2187
  const c = i.node.body.body;
2187
2188
  for (const s of c)
2188
2189
  if (T.isReturnStatement(s) && T.isObjectExpression(s.argument)) {
2189
- const n = s.argument.properties || [];
2190
- s.argument.properties = n.filter(
2190
+ const r = s.argument.properties || [];
2191
+ s.argument.properties = r.filter(
2191
2192
  (d) => !t.includes(d.key.name)
2192
2193
  ), s.argument.properties.push(
2193
2194
  T.objectProperty(
2194
- T.identifier(_),
2195
- T.identifier(_),
2195
+ T.identifier(D),
2196
+ T.identifier(D),
2196
2197
  !1,
2197
2198
  !0
2198
2199
  )
@@ -2201,19 +2202,19 @@ class t0 {
2201
2202
  }
2202
2203
  },
2203
2204
  ObjectProperty(i) {
2204
- if (T.isIdentifier(i.node.value) && t.includes(i.node.value.name) && (i.node.value = T.identifier(_)), T.isArrayExpression(i.node.value)) {
2205
+ if (T.isIdentifier(i.node.value) && t.includes(i.node.value.name) && (i.node.value = T.identifier(D)), T.isArrayExpression(i.node.value)) {
2205
2206
  const c = i.node.value.elements;
2206
- i.node.value.elements = c.map((s) => T.isIdentifier(s) && t.includes(s.name) ? T.identifier(_) : s);
2207
+ i.node.value.elements = c.map((s) => T.isIdentifier(s) && t.includes(s.name) ? T.identifier(D) : s);
2207
2208
  }
2208
2209
  },
2209
2210
  AssignmentExpression(i) {
2210
- T.isIdentifier(i.node.right) && t.includes(i.node.right.name) && (i.node.right = T.identifier(_));
2211
+ T.isIdentifier(i.node.right) && t.includes(i.node.right.name) && (i.node.right = T.identifier(D));
2211
2212
  }
2212
2213
  });
2213
2214
  for (const i of t)
2214
2215
  a.template = a.template.replace(
2215
2216
  new RegExp(`:icon="${i}"`, "g"),
2216
- `:icon="${_}"`
2217
+ `:icon="${D}"`
2217
2218
  );
2218
2219
  return this.reconstructSFC(a, a.template, a.script);
2219
2220
  }
@@ -2237,11 +2238,11 @@ ${a}
2237
2238
  }
2238
2239
  }
2239
2240
  async function y0(e) {
2240
- const { id: u, name: t, source: a, project: i } = e, { dependencies: c = [], platform: s = "web" } = i || {}, n = new Ke(), d = new t0(), r = n.validate(a);
2241
+ const { id: u, name: t, source: a, project: i } = e, { dependencies: c = [], platform: s = "web" } = i || {}, r = new Ke(), d = new t0(), n = r.validate(a);
2241
2242
  let b = [];
2242
- if (!r.valid)
2243
- return b = r.errors, Promise.reject(b);
2244
- const f = d.fixBasedOnValidation(a, r), I = D(f), {
2243
+ if (!n.valid)
2244
+ return b = n.errors, Promise.reject(b);
2245
+ const f = d.fixBasedOnValidation(a, n), I = _(f), {
2245
2246
  styles: x,
2246
2247
  css: N,
2247
2248
  errors: V
@@ -2339,9 +2340,9 @@ async function a0(e, u, t) {
2339
2340
  }, {
2340
2341
  state: c,
2341
2342
  watch: s,
2342
- computed: n,
2343
+ computed: r,
2343
2344
  props: d,
2344
- dataSources: r,
2345
+ dataSources: n,
2345
2346
  methods: b,
2346
2347
  lifeCycles: f,
2347
2348
  inject: I
@@ -2349,9 +2350,9 @@ async function a0(e, u, t) {
2349
2350
  if (await i({
2350
2351
  state: c,
2351
2352
  watch: s,
2352
- computed: n,
2353
+ computed: r,
2353
2354
  props: d,
2354
- dataSources: r,
2355
+ dataSources: n,
2355
2356
  methods: b,
2356
2357
  lifeCycles: f,
2357
2358
  inject: I
@@ -2385,8 +2386,8 @@ function c0(e = [], u = []) {
2385
2386
  for (const { from: i, imports: c } of e)
2386
2387
  if (Array.isArray(c))
2387
2388
  c.forEach((s) => {
2388
- const n = a[i];
2389
- n && (t[s] = n);
2389
+ const r = a[i];
2390
+ r && (t[s] = r);
2390
2391
  });
2391
2392
  else {
2392
2393
  const s = a[i];