@vtj/renderer 0.10.15 → 0.11.1-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,16 +1,16 @@
1
- import { Base as Ae, BUILT_IN_COMPONENTS as Ce, ProjectModel as T, HistoryModel as ce } from "@vtj/core";
2
- import { isUrl as Fe, url as b, dedupArray as Ie, isString as $, isFunction as J, logger as P, storage as N, cookie as U, toArray as se, unRSA as re, delay as le, createRequest as ue, jsonp as pe, merge as ke, pathToRegexp as Me, pathToRegexpMatch as Oe, formDataToJson as He, camelCase as E, upperFirst as Te, pick as De, request as q, loadScript as ne, Storage as xe, mapToObject as X } from "@vtj/utils";
3
- import * as x from "vue";
4
- import { inject as de, defineComponent as fe, h as z, ref as K, defineAsyncComponent as ie, watchEffect as Be } from "vue";
1
+ import { Base as ke, BUILT_IN_COMPONENTS as Fe, ProjectModel as D, HistoryModel as ce } from "@vtj/core";
2
+ import { isUrl as Ae, url as E, dedupArray as Me, isString as j, isFunction as q, logger as R, storage as B, cookie as U, toArray as se, unRSA as re, delay as le, createRequest as ue, jsonp as pe, merge as Ie, pathToRegexp as He, pathToRegexpMatch as Te, formDataToJson as De, camelCase as b, upperFirst as xe, pick as Oe, request as J, loadScript as ne, Storage as Ne, mapToObject as Q } from "@vtj/utils";
3
+ import * as O from "vue";
4
+ import { inject as de, defineComponent as fe, h as K, ref as z, defineAsyncComponent as ie, watchEffect as Be } from "vue";
5
5
  import { useRoute as he } from "vue-router";
6
6
  /**!
7
7
  * Copyright (c) 2025, VTJ.PRO All rights reserved.
8
8
  * @name @vtj/renderer
9
9
  * @author CHC chenhuachun1549@dingtalk.com
10
- * @version 0.10.15
10
+ * @version 0.11.1-alpha.0
11
11
  * @license <a href="https://vtj.pro/license.html">MIT License</a>
12
12
  */
13
- const A = "0.10.15";
13
+ const C = "0.11.1-alpha.0";
14
14
  var y = /* @__PURE__ */ ((r) => (r.Runtime = "Runtime", r.Design = "Design", r.Raw = "Raw", r.VNode = "VNode", r))(y || {});
15
15
  const oe = [
16
16
  "$el",
@@ -24,7 +24,7 @@ const oe = [
24
24
  "$props",
25
25
  "$options",
26
26
  "$forceUpdate"
27
- ], Gt = [
27
+ ], zt = [
28
28
  "beforeCreate",
29
29
  "created",
30
30
  "beforeMount",
@@ -38,14 +38,14 @@ const oe = [
38
38
  "renderTriggered",
39
39
  "activated",
40
40
  "deactivated"
41
- ], Ne = [
41
+ ], Ue = [
42
42
  "vIf",
43
43
  "vShow",
44
44
  "vModel",
45
45
  "vFor",
46
46
  "vBind",
47
47
  "vHtml"
48
- ], Ue = {
48
+ ], Le = {
49
49
  String,
50
50
  Number,
51
51
  Boolean,
@@ -53,59 +53,59 @@ const oe = [
53
53
  Object,
54
54
  Function,
55
55
  Date
56
- }, C = "VtjPage", H = "VtjHomepage", Le = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot".split(
56
+ }, k = "VtjPage", T = "VtjHomepage", qe = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot".split(
57
57
  ","
58
58
  ), Je = "component,slot".split(",");
59
- function M(r, e) {
60
- return r.map((t) => Fe(t) || t.startsWith("/") ? t : `${e}${t}`);
59
+ function I(r, e) {
60
+ return r.map((t) => Ae(t) || t.startsWith("/") ? t : `${e}${t}`);
61
61
  }
62
- function Y(r) {
62
+ function X(r) {
63
63
  return /\.css$/.test(r);
64
64
  }
65
65
  function Z(r) {
66
66
  return /\.js$/.test(r);
67
67
  }
68
- function qe(r) {
68
+ function Ke(r) {
69
69
  return /\.json$/.test(r);
70
70
  }
71
71
  function Vt(r) {
72
72
  return r.map(
73
- (e) => `<script src="${b.append(e, { v: A })}"><\/script>`
73
+ (e) => `<script src="${E.append(e, { v: C })}"><\/script>`
74
74
  ).join("");
75
75
  }
76
76
  function Wt(r = []) {
77
77
  return r.map(
78
- (e) => `<link rel="stylesheet" href="${b.append(e, { v: A })}" />`
78
+ (e) => `<link rel="stylesheet" href="${E.append(e, { v: C })}" />`
79
79
  ).join("");
80
80
  }
81
81
  function ze(r, e = !1) {
82
82
  return e && r.endsWith(".prod.js") ? r.replace(".prod.js", ".js") : r;
83
83
  }
84
- function Ke(r, e, t = !1) {
85
- const s = r.filter((m) => !!m.enabled), n = [], i = [], a = [], o = [], c = {}, l = {}, f = [], p = {};
84
+ function Ve(r, e, t = !1) {
85
+ const s = r.filter((m) => !!m.enabled), n = [], i = [], a = [], o = [], c = {}, l = {}, p = [], d = {};
86
86
  return s.forEach(
87
- ({ urls: m, assetsUrl: h, library: d, assetsLibrary: u, localeLibrary: w }) => {
87
+ ({ urls: m, assetsUrl: h, library: f, assetsLibrary: u, localeLibrary: w }) => {
88
88
  m?.forEach((g) => {
89
- Z(g) && n.push(ze(g, t)), Y(g) && i.push(g);
90
- }), d && (o.push(d), c[d] = M(m || [], e), w && (l[d] = w)), h && a.push(h), u && f.push(u), d && u && (p[u] = d);
89
+ Z(g) && n.push(ze(g, t)), X(g) && i.push(g);
90
+ }), f && (o.push(f), c[f] = I(m || [], e), w && (l[f] = w)), h && a.push(h), u && p.push(u), f && u && (d[u] = f);
91
91
  }
92
92
  ), {
93
- scripts: M(n, e),
94
- css: M(i, e),
95
- materials: M(a, e),
93
+ scripts: I(n, e),
94
+ css: I(i, e),
95
+ materials: I(a, e),
96
96
  libraryExports: o,
97
- materialExports: Ie(f),
98
- materialMapLibrary: p,
97
+ materialExports: Me(p),
98
+ materialMapLibrary: d,
99
99
  libraryMap: c,
100
100
  libraryLocaleMap: l
101
101
  };
102
102
  }
103
- function Ge(r, e) {
103
+ function We(r, e) {
104
104
  const { name: t, parent: s, alias: n } = r;
105
105
  return s ? e[s]?.[n || t] : e[n || t];
106
106
  }
107
107
  function me(r) {
108
- return $(r) ? r : JSON.stringify(r);
108
+ return j(r) ? r : JSON.stringify(r);
109
109
  }
110
110
  function ge(r, e, t) {
111
111
  const s = r.CSSStyleSheet;
@@ -122,11 +122,11 @@ function ge(r, e, t) {
122
122
  i ? i.innerHTML = t : (i = n.createElement("style"), i.id = e, i.innerHTML = t, n.head.appendChild(i));
123
123
  }
124
124
  }
125
- async function Ve(r, e) {
125
+ async function Ge(r, e) {
126
126
  const t = await window.fetch(e).then((s) => s.text()).catch(() => "");
127
127
  t && ge(window, r, t);
128
128
  }
129
- function We(r, e = window) {
129
+ function Ye(r, e = window) {
130
130
  const t = e.document, s = e.document.head;
131
131
  for (const n of r)
132
132
  if (!t.getElementById(n)) {
@@ -142,20 +142,20 @@ async function Qe(r, e, t = window) {
142
142
  const l = s.createElement("script");
143
143
  l.src = c, l.onload = () => {
144
144
  i = t[e], i ? a(i.default || i) : o(null);
145
- }, l.onerror = (f) => {
146
- o(f);
145
+ }, l.onerror = (p) => {
146
+ o(p);
147
147
  }, n.appendChild(l);
148
148
  }
149
149
  });
150
150
  }
151
151
  function Xe(r) {
152
- return J(r) || J(r?.install);
152
+ return q(r) || q(r?.install);
153
153
  }
154
- function Ye(r) {
154
+ function Ze(r) {
155
155
  return Je.includes(r);
156
156
  }
157
- function Ze(r) {
158
- return Le.includes(r);
157
+ function et(r) {
158
+ return qe.includes(r);
159
159
  }
160
160
  function F(r = window) {
161
161
  const e = window?.Mock;
@@ -164,12 +164,12 @@ function F(r = window) {
164
164
  if (t && window)
165
165
  return window.Mock = t, t;
166
166
  }
167
- function Qt(r, e, t) {
167
+ function Gt(r, e, t) {
168
168
  Object.assign(e.meta, t.meta);
169
169
  const s = r?._container;
170
170
  t?.type === "page" && s.classList.add("is-page"), t?.pure && s.classList.add("is-pure");
171
171
  }
172
- function I(r, e, t = !1, s = !1) {
172
+ function A(r, e, t = !1, s = !1) {
173
173
  try {
174
174
  const n = ['"use strict";', "var __self = arguments[0];"];
175
175
  n.push("return ");
@@ -179,13 +179,13 @@ function I(r, e, t = !1, s = !1) {
179
179
  const a = `with(${t ? "{}" : "$scope || {}"}) { ${i} }`;
180
180
  return new Function("$scope", a)(e);
181
181
  } catch (n) {
182
- if (P.error("parseExpression.error", n, r, e?.__self ?? e), s)
182
+ if (R.error("parseExpression.error", n, r, e?.__self ?? e), s)
183
183
  throw n;
184
184
  }
185
185
  }
186
- function G(r, e, t = !1, s = !1) {
187
- const n = I(r, e, t, s);
188
- if (typeof n != "function" && (P.error(
186
+ function V(r, e, t = !1, s = !1) {
187
+ const n = A(r, e, t, s);
188
+ if (typeof n != "function" && (R.error(
189
189
  "parseFunction.error",
190
190
  "not a function",
191
191
  r,
@@ -197,16 +197,16 @@ function G(r, e, t = !1, s = !1) {
197
197
  function _(r) {
198
198
  return r && r.type === "JSExpression";
199
199
  }
200
- function k(r) {
200
+ function M(r) {
201
201
  return typeof r == "object" && r && r.type === "JSFunction";
202
202
  }
203
- function et(r) {
204
- return _(r) || k(r);
203
+ function tt(r) {
204
+ return _(r) || M(r);
205
205
  }
206
- function Xt(r) {
207
- return et(r) ? r.value : JSON.stringify(r);
206
+ function Yt(r) {
207
+ return tt(r) ? r.value : JSON.stringify(r);
208
208
  }
209
- const tt = {
209
+ const st = {
210
210
  session: !1,
211
211
  authKey: "Authorization",
212
212
  storageKey: "ACCESS_STORAGE",
@@ -219,13 +219,13 @@ const tt = {
219
219
  noPermissionMessage: "无权限访问该页面",
220
220
  appName: ""
221
221
  }, ve = Symbol("access");
222
- class st {
222
+ class ye {
223
223
  options;
224
224
  data = null;
225
225
  mode = y.Raw;
226
226
  interceptResponse = !0;
227
227
  constructor(e) {
228
- this.options = Object.assign({}, tt, e), this.loadData();
228
+ this.options = Object.assign({}, st, e), this.loadData();
229
229
  }
230
230
  enableIntercept() {
231
231
  this.interceptResponse = !0;
@@ -239,14 +239,14 @@ class st {
239
239
  }
240
240
  login(e) {
241
241
  const { storageKey: t, storagePrefix: s, session: n, authKey: i } = this.options;
242
- this.setData(e), this.data && (N.save(t, e, {
242
+ this.setData(e), this.data && (B.save(t, e, {
243
243
  type: "local",
244
244
  prefix: s
245
245
  }), n && U.set(i, this.data.token));
246
246
  }
247
247
  clear() {
248
248
  const { storageKey: e, storagePrefix: t, session: s, authKey: n } = this.options;
249
- this.data = null, N.remove(e, {
249
+ this.data = null, B.remove(e, {
250
250
  type: "local",
251
251
  prefix: t
252
252
  }), s && U.remove(n);
@@ -291,7 +291,11 @@ class st {
291
291
  const { privateKey: t } = this.options;
292
292
  if (Array.isArray(e) && t) {
293
293
  const s = e.map((n) => re(n, t));
294
- this.data = JSON.parse(s.join(""));
294
+ try {
295
+ this.data = JSON.parse(s.join(""));
296
+ } catch (n) {
297
+ console.warn(n);
298
+ }
295
299
  return;
296
300
  }
297
301
  if (typeof e == "string")
@@ -305,7 +309,7 @@ class st {
305
309
  this.data = e;
306
310
  }
307
311
  loadData() {
308
- const { storageKey: e, storagePrefix: t } = this.options, s = N.get(e, {
312
+ const { storageKey: e, storagePrefix: t } = this.options, s = B.get(e, {
309
313
  type: "local",
310
314
  prefix: t
311
315
  });
@@ -316,7 +320,7 @@ class st {
316
320
  return e && t ? !!U.get(t) : !!this.getToken();
317
321
  }
318
322
  hasRoutePermission(e) {
319
- if (e.name === C) {
323
+ if (e.name === k) {
320
324
  const t = e.params.id;
321
325
  return t && this.can(t);
322
326
  }
@@ -333,7 +337,7 @@ class st {
333
337
  return t();
334
338
  {
335
339
  const { noPermissionMessage: s = "无权限访问", unauthorized: n = !1 } = this.options;
336
- return await this.showTip(s), J(n) ? (n(), t(!1)) : $(n) ? t(n) : t(!1);
340
+ return await this.showTip(s), q(n) ? (n(), t(!1)) : j(n) ? t(n) : t(!1);
337
341
  }
338
342
  }
339
343
  t(!1), this.toLogin();
@@ -371,16 +375,17 @@ class st {
371
375
  function rt() {
372
376
  return de(ve, null);
373
377
  }
374
- function Yt(r = {}) {
378
+ function Qt(r = {}) {
375
379
  const {
376
380
  notify: e,
377
381
  loading: t,
378
382
  settings: s = {},
379
383
  Startup: n,
380
384
  access: i,
381
- remote: a = "https://lcdp.vtj.pro"
385
+ useTitle: a,
386
+ alert: o
382
387
  } = r;
383
- let o = null;
388
+ let c = null;
384
389
  return {
385
390
  request: ue({
386
391
  settings: {
@@ -388,16 +393,16 @@ function Yt(r = {}) {
388
393
  validSuccess: !0,
389
394
  originResponse: !1,
390
395
  loading: !0,
391
- validate: (l) => l.data?.code === 0 || !!l.data?.success,
396
+ validate: (p) => p.data?.code === 0 || !!p.data?.success,
392
397
  failMessage: !0,
393
- showError: (l) => {
394
- e && e(l || "未知错误");
398
+ showError: (p) => {
399
+ e && e(p || "未知错误");
395
400
  },
396
401
  showLoading: () => {
397
- o && o.close(), t && (o = t());
402
+ c && c.close(), t && (c = t());
398
403
  },
399
404
  hideLoading: () => {
400
- o && (o.close(), o = null);
405
+ c && (c.close(), c = null);
401
406
  },
402
407
  ...s
403
408
  }
@@ -405,20 +410,15 @@ function Yt(r = {}) {
405
410
  jsonp: pe,
406
411
  notify: e,
407
412
  loading: t,
413
+ useTitle: a,
408
414
  startupComponent: n,
409
- remote: a,
410
- access: i ? nt(i) : void 0
415
+ access: i ? new ye({ alert: o, ...i }) : void 0
411
416
  };
412
417
  }
413
- function nt(r = {}) {
414
- const e = {
415
- storageKey: "RRO_IDE_ACCESS_STORAGE__",
416
- auth: "https://lcdp.vtj.pro/auth.html",
417
- privateKey: "MIIBOgIBAAJBAKoIzmn1FYQ1YOhOBw9EhABxZ+PySAIaydI+zdhoKflrdgJ4A5E4/5gbQmRpk09hPWG8nvX7h+l/QLU8kXxAIBECAwEAAQJAAlgpxQY6sByLsXqzJcthC8LSGsLf2JEJkHwlnpwFqlEV8UCkoINpuZ2Wzl+aftURu5rIfAzRCQBvHmeOTW9/zQIhAO5ufWDmnSLyfAAsNo5JRNpVuLFCFodR8Xm+ulDlosR/AiEAtpAltyP9wmCABKG/v/hrtTr3mcvFNGCjoGa9bUAok28CIHbrVs9w1ijrBlvTsXYwJw46uP539uKRRT4ymZzlm9QjAiB+1KH/G9f9pEEL9rtaSOG7JF5D0JcOjlze4MGVFs+ZrQIhALKOUFBNr2zEsyJIjw2PlvEucdlG77UniszjXTROHSPd"
418
- };
419
- return new st(Object.assign(e, r));
418
+ function Xt(r = {}) {
419
+ return new ye(r);
420
420
  }
421
- function it(r, e) {
421
+ function nt(r, e) {
422
422
  const { jsonp: t, request: s } = e;
423
423
  if (r.method === "jsonp")
424
424
  return (n = {}) => t(r.url, {
@@ -426,7 +426,7 @@ function it(r, e) {
426
426
  query: n
427
427
  });
428
428
  {
429
- const n = r.headers ? I(r.headers, {}, !0) : void 0, i = {
429
+ const n = r.headers ? A(r.headers, {}, !0) : void 0, i = {
430
430
  url: r.url,
431
431
  method: r.method,
432
432
  settings: {
@@ -434,10 +434,10 @@ function it(r, e) {
434
434
  headers: n
435
435
  }
436
436
  };
437
- return (a, o) => (delete i.data, s.send(ke(i, o || {}, { data: a })));
437
+ return (a, o) => (delete i.data, s.send(Ie(i, o || {}, { data: a })));
438
438
  }
439
439
  }
440
- function ot(r, e) {
440
+ function it(r, e) {
441
441
  const { metaQuery: t } = e;
442
442
  if (!t) return;
443
443
  const { code: s, queryCode: n } = r;
@@ -449,47 +449,47 @@ function ot(r, e) {
449
449
  return t(s, n, i, a);
450
450
  };
451
451
  }
452
- function at(r = [], e = [], t) {
452
+ function ot(r = [], e = [], t) {
453
453
  const s = {};
454
454
  for (const n of r)
455
- s[n.id] = it(n, t);
455
+ s[n.id] = nt(n, t);
456
456
  for (const n of e)
457
- s[n.id] = ot(n, t);
457
+ s[n.id] = it(n, t);
458
458
  return s;
459
459
  }
460
- async function ct(r = [], e = window) {
460
+ async function at(r = [], e = window) {
461
461
  const t = F(e);
462
- t && (ye(e), r.forEach((s) => ut(t, s)));
462
+ t && (_e(e), r.forEach((s) => lt(t, s)));
463
463
  }
464
- function lt(r, e = window) {
465
- const t = k(r.mockTemplate) && r.mockTemplate.value ? G(r.mockTemplate, {}, !0) : void 0, s = F(e);
464
+ function ct(r, e = window) {
465
+ const t = M(r.mockTemplate) && r.mockTemplate.value ? V(r.mockTemplate, {}, !0) : void 0, s = F(e);
466
466
  return async (...n) => {
467
467
  let i = {};
468
468
  if (t)
469
469
  try {
470
470
  i = await t.apply(t, n);
471
471
  } catch (a) {
472
- P.warn("模拟数据模版异常", a);
472
+ R.warn("模拟数据模版异常", a);
473
473
  }
474
474
  return s?.mock(i);
475
475
  };
476
476
  }
477
- function ut(r, e) {
477
+ function lt(r, e) {
478
478
  if (!e.mock) return;
479
479
  const { url: t, mockTemplate: s } = e;
480
480
  if (t && s) {
481
- const n = Me(`${t}(.*)`), i = Oe(t, { decode: decodeURIComponent }), a = I(s, {}, !0);
481
+ const n = He(`${t}(.*)`), i = Te(t, { decode: decodeURIComponent }), a = A(s, {}, !0);
482
482
  r.mock(n, (o) => {
483
- const c = b.parse(o.url) || {}, l = o.body instanceof FormData ? He(o.body) : o.body, f = i(o.url)?.params;
484
- return Object.assign(o, { data: l, params: c, query: f }), r.mock(a(o));
483
+ const c = E.parse(o.url) || {}, l = o.body instanceof FormData ? De(o.body) : o.body, p = i(o.url)?.params;
484
+ return Object.assign(o, { data: l, params: c, query: p }), r.mock(a(o));
485
485
  });
486
486
  }
487
487
  }
488
- function ye(r = window) {
488
+ function _e(r = window) {
489
489
  const e = F(r);
490
490
  e && (e._mocked = {});
491
491
  }
492
- class pt {
492
+ class ut {
493
493
  __id = null;
494
494
  __mode;
495
495
  __instance = null;
@@ -518,7 +518,7 @@ class pt {
518
518
  const { mode: t, dsl: s, attrs: n } = e;
519
519
  this.__mode = t, s && (this.__id = s.id || null, this.__transform = s.transform || {}), n && Object.assign(this, n);
520
520
  }
521
- setup(e, t = x) {
521
+ setup(e, t = O) {
522
522
  const s = t.getCurrentInstance();
523
523
  if (!s) return;
524
524
  this.__refs = {}, this.$refs = {}, this.context = {}, this.__contextRefs = {}, this.__instance = s.proxy;
@@ -548,17 +548,17 @@ class pt {
548
548
  if (e)
549
549
  if (this.__mode === y.Runtime) {
550
550
  const { id: t, type: s } = e, n = t ? this.__transform[t] ?? e.value : e.value;
551
- return G({ type: s, value: n }, this);
551
+ return V({ type: s, value: n }, this);
552
552
  } else
553
- return G(e, this);
553
+ return V(e, this);
554
554
  }
555
555
  __parseExpression(e) {
556
556
  if (e)
557
557
  if (this.__mode === y.Runtime) {
558
558
  const { id: t, type: s } = e, n = t ? this.__transform[t] ?? e.value : e.value;
559
- return I({ type: s, value: n }, this);
559
+ return A({ type: s, value: n }, this);
560
560
  } else
561
- return I(e, this);
561
+ return A(e, this);
562
562
  }
563
563
  __ref(e = null, t) {
564
564
  if (this.__mode !== y.VNode)
@@ -588,9 +588,9 @@ class pt {
588
588
  return s.context.__proto__ = this.context, s.__proto__ = this, s;
589
589
  }
590
590
  }
591
- function V(r) {
591
+ function W(r) {
592
592
  const {
593
- Vue: e = x,
593
+ Vue: e = O,
594
594
  mode: t = y.Runtime,
595
595
  components: s = {},
596
596
  libs: n = {},
@@ -600,54 +600,54 @@ function V(r) {
600
600
  $components: s,
601
601
  $libs: n,
602
602
  $apis: i
603
- }, l = new pt({
603
+ }, l = new ut({
604
604
  mode: t,
605
605
  dsl: o.value,
606
606
  attrs: c
607
- }), f = e.defineComponent({
607
+ }), p = e.defineComponent({
608
608
  name: o.value.name,
609
609
  props: {
610
- ...ft(o.value.props ?? [], l)
610
+ ...dt(o.value.props ?? [], l)
611
611
  },
612
- setup(p) {
613
- l.$props = p, l.props = p, o.value.id && ge(
612
+ setup(d) {
613
+ l.$props = d, l.props = d, o.value.id && ge(
614
614
  r.window || window,
615
615
  o.value.id,
616
616
  o.value.css || ""
617
- ), l.state = ht(e, o.value.state ?? {}, l);
618
- const m = mt(e, o.value.computed ?? {}, l), h = gt(o.value.methods ?? {}, l), d = vt(e, o.value.inject, l), u = yt(
617
+ ), l.state = ft(e, o.value.state ?? {}, l);
618
+ const m = ht(e, o.value.computed ?? {}, l), h = mt(o.value.methods ?? {}, l), f = gt(e, o.value.inject, l), u = vt(
619
619
  o.value.dataSources || {},
620
620
  l
621
621
  ), w = {
622
- ...d,
622
+ ...f,
623
623
  ...m,
624
624
  ...h,
625
625
  ...u
626
626
  };
627
- return l.setup(w, e), _t(e, o.value.watch ?? [], l), {
627
+ return l.setup(w, e), yt(e, o.value.watch ?? [], l), {
628
628
  vtj: l
629
629
  };
630
630
  },
631
- emits: dt(o.value.emits),
631
+ emits: pt(o.value.emits),
632
632
  expose: ["vtj"],
633
633
  render() {
634
634
  if (!o.value.nodes) return null;
635
- const p = o.value.nodes || [];
636
- return p.length === 1 ? D(p[0], l, e, a) : p.map((m) => D(m, l, e, a));
635
+ const d = o.value.nodes || [];
636
+ return d.length === 1 ? x(d[0], l, e, a) : d.map((m) => x(m, l, e, a));
637
637
  },
638
- ...wt(o.value.lifeCycles ?? {}, l)
638
+ ..._t(o.value.lifeCycles ?? {}, l)
639
639
  });
640
640
  return {
641
- renderer: e.markRaw(f),
641
+ renderer: e.markRaw(p),
642
642
  context: l
643
643
  };
644
644
  }
645
- function dt(r = []) {
646
- return r.map((e) => $(e) ? e : e.name);
645
+ function pt(r = []) {
646
+ return r.map((e) => j(e) ? e : e.name);
647
647
  }
648
- function ft(r = [], e) {
649
- const t = (s) => s ? (Array.isArray(s) ? s : [s]).map((i) => Ue[i]) : void 0;
650
- return r.map((s) => $(s) ? {
648
+ function dt(r = [], e) {
649
+ const t = (s) => s ? (Array.isArray(s) ? s : [s]).map((i) => Le[i]) : void 0;
650
+ return r.map((s) => j(s) ? {
651
651
  name: s
652
652
  } : {
653
653
  name: s.name,
@@ -663,30 +663,30 @@ function ft(r = [], e) {
663
663
  {}
664
664
  );
665
665
  }
666
- function ht(r, e, t) {
666
+ function ft(r, e, t) {
667
667
  return r.reactive(
668
668
  Object.keys(e || {}).reduce(
669
669
  (s, n) => {
670
670
  let i = e[n];
671
- return _(i) ? i = t.__parseExpression(i) : k(i) && (i = t.__parseFunction(i)), s[n] = i, s;
671
+ return _(i) ? i = t.__parseExpression(i) : M(i) && (i = t.__parseFunction(i)), s[n] = i, s;
672
672
  },
673
673
  {}
674
674
  )
675
675
  );
676
676
  }
677
- function mt(r, e, t) {
677
+ function ht(r, e, t) {
678
678
  return Object.entries(e ?? {}).reduce(
679
679
  (s, [n, i]) => (s[n] = r.computed(t.__parseFunction(i)), s),
680
680
  {}
681
681
  );
682
682
  }
683
- function gt(r, e) {
683
+ function mt(r, e) {
684
684
  return Object.entries(r ?? {}).reduce(
685
685
  (t, [s, n]) => (t[s] = e.__parseFunction(n), t),
686
686
  {}
687
687
  );
688
688
  }
689
- function vt(r, e = [], t) {
689
+ function gt(r, e = [], t) {
690
690
  return e.reduce(
691
691
  (s, n) => {
692
692
  const { name: i, from: a } = n || {};
@@ -697,14 +697,14 @@ function vt(r, e = [], t) {
697
697
  {}
698
698
  );
699
699
  }
700
- function yt(r, e) {
700
+ function vt(r, e) {
701
701
  return Object.keys(r).reduce(
702
702
  (t, s) => {
703
703
  const n = r[s];
704
704
  if (n.type === "mock")
705
- t[s] = lt(n);
705
+ t[s] = ct(n);
706
706
  else if (n.ref) {
707
- const i = e.$apis[n.ref], a = k(n.transform) ? n.transform.value ? e.__parseFunction(n.transform) : void 0 : n.transform;
707
+ const i = e.$apis[n.ref], a = M(n.transform) ? n.transform.value ? e.__parseFunction(n.transform) : void 0 : n.transform;
708
708
  t[s] = async (...o) => {
709
709
  const c = await i.apply(e, o);
710
710
  return a ? a(c) : c;
@@ -715,7 +715,7 @@ function yt(r, e) {
715
715
  {}
716
716
  );
717
717
  }
718
- function _t(r, e = [], t) {
718
+ function yt(r, e = [], t) {
719
719
  e.forEach((s) => {
720
720
  r.watch(
721
721
  t.__parseExpression(s.source),
@@ -727,59 +727,59 @@ function _t(r, e = [], t) {
727
727
  );
728
728
  });
729
729
  }
730
- function wt(r, e) {
730
+ function _t(r, e) {
731
731
  return Object.entries(r ?? {}).reduce(
732
732
  (t, [s, n]) => (t[s] = e.__parseFunction(n), t),
733
733
  {}
734
734
  );
735
735
  }
736
- let L = [], R = {};
737
- const St = (r) => r;
738
- async function _e(r, e = window) {
736
+ let L = [], P = {};
737
+ const wt = (r) => r;
738
+ async function we(r, e = window) {
739
739
  const { urls: t = [], library: s } = r, n = t.filter((o) => Z(o));
740
740
  if (n.length === 0 || !s) return null;
741
- const i = t.filter((o) => Y(o));
742
- return i.length && We(i, e), await Qe(n, s, e).catch(
741
+ const i = t.filter((o) => X(o));
742
+ return i.length && Ye(i, e), await Qe(n, s, e).catch(
743
743
  (o) => (console.warn("loadScriptUrl error", n, s, o), null)
744
744
  );
745
745
  }
746
- function W(r) {
746
+ function G(r) {
747
747
  const { getDsl: e, getDslByUrl: t, options: s } = r;
748
748
  return s.window && (L.forEach((n) => {
749
749
  delete s.window[n];
750
- }), L = []), (n, i, a = x) => {
750
+ }), L = []), (n, i, a = O) => {
751
751
  if (!i || typeof i == "string") return n;
752
752
  if (i.type === "Schema" && i.id) {
753
- let o = R[i.id];
754
- return o || (o = R[i.id] = a.defineAsyncComponent(async () => {
753
+ let o = P[i.id];
754
+ return o || (o = P[i.id] = a.defineAsyncComponent(async () => {
755
755
  const c = await e(i.id);
756
- return c && (c.name = n), c ? V({
756
+ return c && (c.name = n), c ? W({
757
757
  ...s,
758
758
  Vue: a,
759
759
  dsl: c,
760
760
  mode: y.Runtime,
761
- loader: W(r)
761
+ loader: G(r)
762
762
  }).renderer : null;
763
763
  }), o);
764
764
  }
765
765
  if (i.type === "UrlSchema" && i.url) {
766
- let o = R[i.url];
767
- return o || (o = R[i.url] = a.defineAsyncComponent(async () => {
766
+ let o = P[i.url];
767
+ return o || (o = P[i.url] = a.defineAsyncComponent(async () => {
768
768
  const c = await t(i.url);
769
- return c && (c.name = n), c ? V({
769
+ return c && (c.name = n), c ? W({
770
770
  ...s,
771
771
  Vue: a,
772
772
  dsl: c,
773
773
  mode: y.Runtime,
774
- loader: W(r)
774
+ loader: G(r)
775
775
  }).renderer : null;
776
776
  }), o);
777
777
  }
778
778
  if (i.type === "Plugin") {
779
- let o = i.library ? R[i.library] : null;
780
- return o || (i.library && L.push(i.library), o = R[i.library || Symbol()] = a.defineAsyncComponent(
779
+ let o = i.library ? P[i.library] : null;
780
+ return o || (i.library && L.push(i.library), o = P[i.library || Symbol()] = a.defineAsyncComponent(
781
781
  async () => {
782
- const c = await _e(i, s.window);
782
+ const c = await we(i, s.window);
783
783
  return c || (console.warn("getPlugin result is null", i), null);
784
784
  }
785
785
  ), o);
@@ -788,43 +788,43 @@ function W(r) {
788
788
  };
789
789
  }
790
790
  function Zt() {
791
- R = {};
791
+ P = {};
792
792
  }
793
- function D(r, e, t = x, s = St) {
793
+ function x(r, e, t = O, s = wt) {
794
794
  if (!r || !r.name || r.invisible) return null;
795
- const n = t.getCurrentInstance()?.appContext, { id: i = null, directives: a = [] } = r, { vIf: o, vFor: c, vShow: l, vModels: f, vBind: p, vHtml: m, others: h } = $t(a);
796
- if (o && !Et(o, e))
795
+ const n = t.getCurrentInstance()?.appContext, { id: i = null, directives: a = [] } = r, { vIf: o, vFor: c, vShow: l, vModels: p, vBind: d, vHtml: m, others: h } = $t(a);
796
+ if (o && !jt(o, e))
797
797
  return null;
798
- const d = (u) => {
798
+ const f = (u) => {
799
799
  const w = u.$components, g = (() => {
800
800
  if (r.name === "component")
801
- return Rt(u, r.props?.is);
801
+ return bt(u, r.props?.is);
802
802
  if (r.name === "slot") return r.name;
803
- const j = s(r.name, r.from, t);
804
- return $(j) ? Ye(j) || Ze(j) ? j : w[j] ?? n?.app?.component(j) ?? j : j;
805
- })(), S = bt(i, r.props ?? {}, u), be = Pt(t, r.events ?? {}, u);
803
+ const $ = s(r.name, r.from, t);
804
+ return j($) ? Ze($) || et($) ? $ : w[$] ?? n?.app?.component($) ?? $ : $;
805
+ })(), S = Pt(i, r.props ?? {}, u), Re = Et(t, r.events ?? {}, u);
806
806
  if (r.name === "slot")
807
- return At(t, r, S, u, s);
808
- p && Object.assign(S, u.__parseExpression(p.value)), l && (S.style = Object.assign(
807
+ return Rt(t, r, S, u, s);
808
+ d && Object.assign(S, u.__parseExpression(d.value)), l && (S.style = Object.assign(
809
809
  S.style ?? {},
810
- Ft(l, u)
811
- )), m && Object.assign(S, It(m, u)), f.forEach((j) => {
812
- Object.assign(S, kt(t, j, u));
810
+ kt(l, u)
811
+ )), m && Object.assign(S, Ft(m, u)), p.forEach(($) => {
812
+ Object.assign(S, At(t, $, u));
813
813
  });
814
- const Pe = Mt(
814
+ const Ce = Mt(
815
815
  t,
816
816
  r.children ?? [],
817
817
  u,
818
818
  s,
819
819
  r
820
820
  );
821
- let B = t.createVNode(g, { ...S, ...be }, Pe);
822
- const te = n ? jt(n, h, u) : [];
823
- return te.length && (B = t.withDirectives(B, te)), B;
821
+ let N = t.createVNode(g, { ...S, ...Re }, Ce);
822
+ const te = n ? St(n, h, u) : [];
823
+ return te.length && (N = t.withDirectives(N, te)), N;
824
824
  };
825
- return c ? Tt(c, d, e) : d(e);
825
+ return c ? Tt(c, f, e) : f(e);
826
826
  }
827
- function jt(r, e, t) {
827
+ function St(r, e, t) {
828
828
  const s = r.app;
829
829
  return e.map((n) => {
830
830
  const i = typeof n.name == "string" ? s.directive(n.name) : t.__parseExpression(n.name);
@@ -834,10 +834,10 @@ function jt(r, e, t) {
834
834
  }).filter((n) => !!n);
835
835
  }
836
836
  function $t(r = []) {
837
- const e = r.find((c) => E(c.name) === "vIf"), t = r.find((c) => E(c.name) === "vFor"), s = r.find((c) => E(c.name) === "vShow"), n = r.find((c) => E(c.name) === "vBind"), i = r.find((c) => E(c.name) === "vHtml"), a = r.filter(
838
- (c) => E(c.name) === "vModel"
837
+ const e = r.find((c) => b(c.name) === "vIf"), t = r.find((c) => b(c.name) === "vFor"), s = r.find((c) => b(c.name) === "vShow"), n = r.find((c) => b(c.name) === "vBind"), i = r.find((c) => b(c.name) === "vHtml"), a = r.filter(
838
+ (c) => b(c.name) === "vModel"
839
839
  ), o = r.filter(
840
- (c) => !Ne.includes(E(c.name))
840
+ (c) => !Ue.includes(b(c.name))
841
841
  );
842
842
  return {
843
843
  vIf: e,
@@ -849,26 +849,26 @@ function $t(r = []) {
849
849
  vHtml: i
850
850
  };
851
851
  }
852
- function Et(r, e) {
852
+ function jt(r, e) {
853
853
  return !!e.__parseExpression(r.value);
854
854
  }
855
- function Rt(r, e) {
855
+ function bt(r, e) {
856
856
  return e ? _(e) ? r.__parseExpression(e) : e : "div";
857
857
  }
858
- function bt(r, e, t) {
859
- const s = Q(e, t);
858
+ function Pt(r, e, t) {
859
+ const s = Y(e, t);
860
860
  return s.ref = t.__ref(r, s.ref), s;
861
861
  }
862
- function Q(r, e) {
863
- return _(r) ? e.__parseExpression(r) : k(r) ? e.__parseFunction(r) : Array.isArray(r) ? r.map((t) => Q(t, e)) : typeof r == "object" ? Object.keys(r || {}).reduce(
862
+ function Y(r, e) {
863
+ return _(r) ? e.__parseExpression(r) : M(r) ? e.__parseFunction(r) : Array.isArray(r) ? r.map((t) => Y(t, e)) : typeof r == "object" ? Object.keys(r || {}).reduce(
864
864
  (t, s) => {
865
865
  let n = r[s];
866
- return t[s] = Q(n, e), t;
866
+ return t[s] = Y(n, e), t;
867
867
  },
868
868
  {}
869
869
  ) : r;
870
870
  }
871
- function Pt(r, e, t) {
871
+ function Et(r, e, t) {
872
872
  const s = ["passive", "capture", "once"], n = {
873
873
  capture: "Capture",
874
874
  once: "Once",
@@ -876,22 +876,22 @@ function Pt(r, e, t) {
876
876
  };
877
877
  return Object.keys(e || {}).reduce(
878
878
  (i, a) => {
879
- const o = e[a], c = we(o.modifiers), l = c.find((m) => s.includes(m)), f = "on" + Te(a) + (l && n[l] || ""), p = t.__parseFunction(o.handler);
880
- return p && (i[f] = r.withModifiers(p, c)), i;
879
+ const o = e[a], c = Se(o.modifiers), l = c.find((m) => s.includes(m)), p = "on" + xe(a) + (l && n[l] || ""), d = t.__parseFunction(o.handler);
880
+ return d && (i[p] = r.withModifiers(d, c)), i;
881
881
  },
882
882
  {}
883
883
  );
884
884
  }
885
- function we(r = {}, e = !1) {
885
+ function Se(r = {}, e = !1) {
886
886
  const t = Object.keys(r);
887
887
  return e ? t.map((s) => "." + s) : t;
888
888
  }
889
- function At(r, e, t, s, n) {
889
+ function Rt(r, e, t, s, n) {
890
890
  const { children: i } = e, a = Ct(e, s), o = s.$slots?.[a.name];
891
- return o ? o(t) : i ? $(i) ? r.createTextVNode(i) : _(i) ? r.createTextVNode(
891
+ return o ? o(t) : i ? j(i) ? r.createTextVNode(i) : _(i) ? r.createTextVNode(
892
892
  me(s.__parseExpression(i))
893
893
  ) : Array.isArray(i) ? i.map(
894
- (c) => D(c, s, r, n)
894
+ (c) => x(c, s, r, n)
895
895
  ) : null : null;
896
896
  }
897
897
  function Ct(r, e) {
@@ -901,23 +901,23 @@ function Ct(r, e) {
901
901
  params: []
902
902
  };
903
903
  }
904
- function Ft(r, e) {
904
+ function kt(r, e) {
905
905
  return e.__parseExpression(r.value) ? {} : {
906
906
  display: "none"
907
907
  };
908
908
  }
909
- function It(r, e) {
909
+ function Ft(r, e) {
910
910
  return {
911
911
  innerHTML: e.__parseExpression(r.value) || ""
912
912
  };
913
913
  }
914
- function kt(r, e, t) {
914
+ function At(r, e, t) {
915
915
  const s = {
916
916
  type: "JSFunction",
917
917
  value: e.value?.value ? `(v) => {
918
918
  ${e.value.value} = v;
919
919
  }` : "(v) => {}"
920
- }, n = t.__parseFunction(s), i = we(
920
+ }, n = t.__parseFunction(s), i = Se(
921
921
  _(e.modifiers) ? t.__parseExpression(e.modifiers) : e.modifiers
922
922
  ), a = _(e.arg) ? t.__parseExpression(e.arg) : e.arg || "modelValue";
923
923
  return {
@@ -927,26 +927,26 @@ function kt(r, e, t) {
927
927
  }
928
928
  function Mt(r, e, t, s, n) {
929
929
  if (!e) return null;
930
- if ($(e))
930
+ if (j(e))
931
931
  return { default: () => e };
932
932
  if (_(e))
933
933
  return {
934
934
  default: () => me(t.__parseExpression(e))
935
935
  };
936
936
  if (Array.isArray(e) && e.length > 0) {
937
- const i = Ot(e), a = (o) => !o || !n ? {} : n?.id && Object.keys(o).length ? {
937
+ const i = It(e), a = (o) => !o || !n ? {} : n?.id && Object.keys(o).length ? {
938
938
  [`scope_${n.id}`]: o
939
939
  } : {};
940
- return Object.entries(i).reduce((o, [c, { nodes: l, params: f }]) => (o[c] = (p) => {
941
- const m = f.length ? De(p ?? {}, f) : a(p);
940
+ return Object.entries(i).reduce((o, [c, { nodes: l, params: p }]) => (o[c] = (d) => {
941
+ const m = p.length ? Oe(d ?? {}, p) : a(d);
942
942
  return l.map(
943
- (h) => D(h, t.__clone(m), r, s)
943
+ (h) => x(h, t.__clone(m), r, s)
944
944
  );
945
945
  }, o), {});
946
946
  }
947
947
  return null;
948
948
  }
949
- function Ot(r) {
949
+ function It(r) {
950
950
  const e = {
951
951
  default: {
952
952
  params: [],
@@ -963,7 +963,7 @@ function Ot(r) {
963
963
  return e;
964
964
  }
965
965
  function Ht(r = "default") {
966
- return $(r) ? { name: r, params: [] } : { params: [], ...r };
966
+ return j(r) ? { name: r, params: [] } : { params: [], ...r };
967
967
  }
968
968
  function Tt(r, e, t) {
969
969
  const { value: s, iterator: n } = r, { item: i = "item", index: a = "index" } = n || {};
@@ -973,7 +973,7 @@ function Tt(r, e, t) {
973
973
  const ae = fe({
974
974
  name: "VtjPageContainer",
975
975
  async setup() {
976
- const r = je(), e = he(), t = e.params.id, s = t ? r.getPage(t) : r.getHomepage(), n = s ? await r.getRenderComponent(s.id) : null, i = K(Symbol());
976
+ const r = je(), e = he(), t = e.params.id, s = t ? r.getPage(t) : r.getHomepage(), n = s ? await r.getRenderComponent(s.id) : null, i = z(Symbol());
977
977
  if (s) {
978
978
  Object.assign(e.meta, s.meta || {}, { cache: s.cache });
979
979
  const { useTitle: a } = r?.adapter;
@@ -991,7 +991,7 @@ const ae = fe({
991
991
  },
992
992
  render() {
993
993
  const { component: r, query: e, sid: t } = this;
994
- return r ? z(r, { ...e, key: t }) : z("div", "页面不存在");
994
+ return r ? K(r, { ...e, key: t }) : K("div", "页面不存在");
995
995
  },
996
996
  activated() {
997
997
  this.meta.cache === !1 && (this.sid = Symbol());
@@ -999,11 +999,11 @@ const ae = fe({
999
999
  }), Dt = fe({
1000
1000
  name: "VtjStartupContainer",
1001
1001
  render() {
1002
- return z("div", "page not found!");
1002
+ return K("div", "page not found!");
1003
1003
  }
1004
- }), Se = Symbol("Provider");
1004
+ }), $e = Symbol("Provider");
1005
1005
  var xt = /* @__PURE__ */ ((r) => (r.Production = "production", r.Development = "development", r))(xt || {});
1006
- class Bt extends Ae {
1006
+ class Ot extends ke {
1007
1007
  constructor(e) {
1008
1008
  super(), this.options = e;
1009
1009
  const {
@@ -1015,19 +1015,19 @@ class Bt extends Ae {
1015
1015
  adapter: o = {},
1016
1016
  globals: c = {},
1017
1017
  modules: l = {},
1018
- router: f = null,
1019
- materialPath: p = "./",
1018
+ router: p = null,
1019
+ materialPath: d = "./",
1020
1020
  nodeEnv: m = "development"
1021
1021
  /* Development */
1022
1022
  } = e;
1023
- this.mode = s, this.modules = l, this.service = t, this.router = f, this.materialPath = p, this.nodeEnv = m, n && (this.dependencies = n), i && (this.materials = i), Object.assign(this.globals, c), Object.assign(this.adapter, o);
1024
- const { access: h, request: d } = this.adapter;
1025
- h && h.connect({ mode: s, router: f, request: d }), a && s !== y.Design ? this.load(a) : this.project = a;
1023
+ this.mode = s, this.modules = l, this.service = t, this.router = p, this.materialPath = d, this.nodeEnv = m, n && (this.dependencies = n), i && (this.materials = i), Object.assign(this.globals, c), Object.assign(this.adapter, o);
1024
+ const { access: h, request: f } = this.adapter;
1025
+ h && h.connect({ mode: s, router: p, request: f }), a && s !== y.Design ? this.load(a) : this.project = a;
1026
1026
  }
1027
1027
  mode;
1028
1028
  globals = {};
1029
1029
  modules = {};
1030
- adapter = { request: q, jsonp: pe };
1030
+ adapter = { request: J, jsonp: pe };
1031
1031
  apis = {};
1032
1032
  dependencies = {};
1033
1033
  materials = {};
@@ -1046,7 +1046,7 @@ class Bt extends Ae {
1046
1046
  try {
1047
1047
  s = await e.apply(e, t);
1048
1048
  } catch (i) {
1049
- P.warn("模拟数据模版异常", i);
1049
+ R.warn("模拟数据模版异常", i);
1050
1050
  }
1051
1051
  return F()?.mock(s);
1052
1052
  };
@@ -1056,7 +1056,7 @@ class Bt extends Ae {
1056
1056
  if (this.project = t ? await t() : await this.service.init(e), !this.project)
1057
1057
  throw new Error("project is null");
1058
1058
  const { apis: s = [], meta: n = [] } = this.project, i = window;
1059
- i && (i.CKEDITOR_VERSION = void 0), this.mode === y.Raw ? await this.loadDependencies(i) : await this.loadAssets(i), this.initMock(i), this.apis = at(s, n, this.adapter), ye(i), ct(s, i), e.platform !== "uniapp" && this.initRouter(), this.triggerReady();
1059
+ i && (i.CKEDITOR_VERSION = void 0), this.mode === y.Raw ? await this.loadDependencies(i) : await this.loadAssets(i), this.initMock(i), this.apis = ot(s, n, this.adapter), _e(i), at(s, i), e.platform !== "uniapp" && this.initRouter(), this.triggerReady();
1060
1060
  }
1061
1061
  initMock(e) {
1062
1062
  const t = F(e);
@@ -1073,42 +1073,42 @@ class Bt extends Ae {
1073
1073
  const { dependencies: t = [] } = this.project, { dependencies: s, library: n, components: i, materialPath: a, nodeEnv: o } = this, {
1074
1074
  libraryExports: c,
1075
1075
  libraryMap: l,
1076
- materials: f,
1077
- materialExports: p,
1076
+ materials: p,
1077
+ materialExports: d,
1078
1078
  materialMapLibrary: m
1079
- } = Ke(
1079
+ } = Ve(
1080
1080
  t,
1081
1081
  a,
1082
1082
  o === "development"
1083
1083
  /* Development */
1084
1084
  );
1085
1085
  for (const h of c) {
1086
- const d = s[h], u = e[h];
1086
+ const f = s[h], u = e[h];
1087
1087
  if (u)
1088
1088
  n[h] = u;
1089
- else if (d)
1090
- e[h] = n[h] = await d();
1089
+ else if (f)
1090
+ e[h] = n[h] = await f();
1091
1091
  else {
1092
1092
  const w = l[h] || [];
1093
1093
  for (const g of w)
1094
- Y(g) && await Ve(h, b.append(g, { v: A })), Z(g) && await ne(b.append(g, { v: A }));
1094
+ X(g) && await Ge(h, E.append(g, { v: C })), Z(g) && await ne(E.append(g, { v: C }));
1095
1095
  n[h] = e[h];
1096
1096
  }
1097
1097
  }
1098
1098
  if (o === "development") {
1099
- for (const d of f)
1100
- await ne(b.append(d, { v: A }));
1099
+ for (const f of p)
1100
+ await ne(E.append(f, { v: C }));
1101
1101
  const h = this.materials || {};
1102
- for (const d of p) {
1103
- const u = e[m[d]], w = Ce[d];
1102
+ for (const f of d) {
1103
+ const u = e[m[f]], w = Fe[f];
1104
1104
  if (w)
1105
1105
  u && w.forEach((g) => {
1106
1106
  i[g] = u[g];
1107
1107
  });
1108
1108
  else {
1109
- const g = h[d] ? (await h[d]()).default : e[d];
1109
+ const g = h[f] ? (await h[f]()).default : e[f];
1110
1110
  g && u && (g.components || []).forEach((S) => {
1111
- i[S.name] = Ge(S, u);
1111
+ i[S.name] = We(S, u);
1112
1112
  });
1113
1113
  }
1114
1114
  }
@@ -1121,23 +1121,23 @@ class Bt extends Ae {
1121
1121
  routeAppendTo: a,
1122
1122
  pageRouteName: o = i,
1123
1123
  routeMeta: c
1124
- } = s, l = a ? "" : "/", f = {
1124
+ } = s, l = a ? "" : "/", p = {
1125
1125
  path: `${l}${o}/:id`,
1126
- name: C,
1126
+ name: k,
1127
1127
  component: ae
1128
- }, p = {
1128
+ }, d = {
1129
1129
  path: l,
1130
- name: H,
1130
+ name: T,
1131
1131
  component: t?.homepage ? ae : n.startupComponent || Dt,
1132
1132
  meta: c
1133
1133
  };
1134
- e.hasRoute(C) && e.removeRoute(C), e.hasRoute(H) && e.removeRoute(H), a ? (e.addRoute(a, f), e.addRoute(a, p)) : (e.addRoute(f), e.addRoute(p));
1134
+ e.hasRoute(k) && e.removeRoute(k), e.hasRoute(T) && e.removeRoute(T), a ? (e.addRoute(a, p), e.addRoute(a, d)) : (e.addRoute(p), e.addRoute(d));
1135
1135
  }
1136
1136
  install(e) {
1137
1137
  const t = e.config.globalProperties.installed || {};
1138
1138
  for (const [s, n] of Object.entries(this.library))
1139
1139
  !t[s] && Xe(n) && (e.use(n), t[s] = !0);
1140
- this.options.install && e.use(this.options.install), this.adapter.access && e.use(this.adapter.access), e.provide(Se, this), e.config.globalProperties.$provider = this, e.config.globalProperties.installed = t, this.mode === y.Design && (e.config.errorHandler = (s, n, i) => {
1140
+ this.options.install && e.use(this.options.install), this.adapter.access && e.use(this.adapter.access), e.provide($e, this), e.config.globalProperties.$provider = this, e.config.globalProperties.installed = t, this.mode === y.Design && (e.config.errorHandler = (s, n, i) => {
1141
1141
  const a = n?.$options.name, o = typeof s == "string" ? s : s?.message || s?.msg || "未知错误", c = `[ ${a} ] ${o} ${i}`;
1142
1142
  console.error(
1143
1143
  "[VTJ Error]:",
@@ -1196,12 +1196,12 @@ class Bt extends Ae {
1196
1196
  apis: a,
1197
1197
  window,
1198
1198
  ...t
1199
- }, c = W({
1199
+ }, c = G({
1200
1200
  getDsl: async (l) => await this.getDsl(l) || null,
1201
1201
  getDslByUrl: async (l) => await this.getDslByUrl(l) || null,
1202
1202
  options: o
1203
1203
  });
1204
- return V({
1204
+ return W({
1205
1205
  ...o,
1206
1206
  dsl: e,
1207
1207
  loader: c
@@ -1210,13 +1210,13 @@ class Bt extends Ae {
1210
1210
  async getRenderComponent(e, t) {
1211
1211
  const s = this.getFile(e);
1212
1212
  if (!s)
1213
- return P.warn(`Can not find file: ${e}`), null;
1213
+ return R.warn(`Can not find file: ${e}`), null;
1214
1214
  t && t(s);
1215
1215
  const n = `.vtj/vue/${e}.vue`, i = this.modules[n] || this.modules[`/src/pages/${e}.vue`];
1216
1216
  if (i)
1217
1217
  return (await i())?.default;
1218
1218
  const a = await this.getDsl(s.id);
1219
- return a ? this.createDslRenderer(a).renderer : (P.warn(`Can not find dsl: ${e}`), null);
1219
+ return a ? this.createDslRenderer(a).renderer : (R.warn(`Can not find dsl: ${e}`), null);
1220
1220
  }
1221
1221
  defineUrlSchemaComponent(e, t) {
1222
1222
  return ie(async () => {
@@ -1225,18 +1225,18 @@ class Bt extends Ae {
1225
1225
  });
1226
1226
  }
1227
1227
  definePluginComponent(e) {
1228
- return ie(async () => await _e(e, window));
1228
+ return ie(async () => await we(e, window));
1229
1229
  }
1230
1230
  }
1231
1231
  function es(r) {
1232
- const e = new Bt(r);
1232
+ const e = new Ot(r);
1233
1233
  return {
1234
1234
  provider: e,
1235
1235
  onReady: (s) => e.ready(s)
1236
1236
  };
1237
1237
  }
1238
1238
  function je(r = {}) {
1239
- const e = de(Se, null);
1239
+ const e = de($e, null);
1240
1240
  if (!e)
1241
1241
  throw new Error("Can not find provider");
1242
1242
  if (e.nodeEnv === "development") {
@@ -1252,7 +1252,7 @@ function je(r = {}) {
1252
1252
  }
1253
1253
  return e;
1254
1254
  }
1255
- const $e = {
1255
+ const be = {
1256
1256
  type: "json",
1257
1257
  validSuccess: !0,
1258
1258
  originResponse: !1,
@@ -1267,8 +1267,8 @@ const $e = {
1267
1267
  type: t,
1268
1268
  data: s
1269
1269
  },
1270
- settings: $e
1271
- }), Ut = (r, e = "/__vtj__/api/uploader.json") => async (t, s) => await r.send({
1270
+ settings: be
1271
+ }), Bt = (r, e = "/__vtj__/api/uploader.json") => async (t, s) => await r.send({
1272
1272
  url: e,
1273
1273
  method: "post",
1274
1274
  data: {
@@ -1276,7 +1276,7 @@ const $e = {
1276
1276
  projectId: s
1277
1277
  },
1278
1278
  settings: {
1279
- ...$e,
1279
+ ...be,
1280
1280
  type: "data"
1281
1281
  }
1282
1282
  }).then((n) => n && n[0] ? n[0] : null).catch(() => null);
@@ -1298,8 +1298,8 @@ class ee {
1298
1298
  api;
1299
1299
  pluginCaches = {};
1300
1300
  uploader;
1301
- constructor(e = q) {
1302
- this.api = Nt(e), this.uploader = Ut(e);
1301
+ constructor(e = J) {
1302
+ this.api = Nt(e), this.uploader = Bt(e);
1303
1303
  }
1304
1304
  async getExtension() {
1305
1305
  console.log("BaseService.getExtension");
@@ -1374,10 +1374,10 @@ class ee {
1374
1374
  return await this.api("clearStaticFiles", e).catch(() => "");
1375
1375
  }
1376
1376
  async getPluginMaterial(e) {
1377
- const { urls: t = [] } = e, s = t.filter((i) => qe(i))[0];
1377
+ const { urls: t = [] } = e, s = t.filter((i) => Ke(i))[0];
1378
1378
  if (!s) return null;
1379
1379
  const n = this.pluginCaches[s];
1380
- return n || (this.pluginCaches[s] = q.send({
1380
+ return n || (this.pluginCaches[s] = J.send({
1381
1381
  url: s,
1382
1382
  method: "get",
1383
1383
  settings: {
@@ -1390,22 +1390,22 @@ class ee {
1390
1390
  return console.log("BaseService.genSource", e), "";
1391
1391
  }
1392
1392
  }
1393
- const v = new xe({
1393
+ const v = new Ne({
1394
1394
  type: "local",
1395
1395
  expired: 0,
1396
1396
  prefix: "__VTJ_"
1397
1397
  });
1398
1398
  class ss extends ee {
1399
1399
  init(e) {
1400
- const t = new T(e), s = v.get(`project_${t.id}`), n = Object.assign(t.toDsl(), s || {});
1400
+ const t = new D(e), s = v.get(`project_${t.id}`), n = Object.assign(t.toDsl(), s || {});
1401
1401
  return v.save(`project_${t.id}`, n), Promise.resolve(n);
1402
1402
  }
1403
1403
  saveProject(e) {
1404
- const t = new T(e);
1404
+ const t = new D(e);
1405
1405
  return v.save(`project_${t.id}`, t.toDsl()), Promise.resolve(!0);
1406
1406
  }
1407
1407
  saveMaterials(e, t) {
1408
- return v.save(`materials_${e.id}`, X(t)), Promise.resolve(!0);
1408
+ return v.save(`materials_${e.id}`, Q(t)), Promise.resolve(!0);
1409
1409
  }
1410
1410
  saveFile(e) {
1411
1411
  return v.save(`file_${e.id}`, e), Promise.resolve(!0);
@@ -1445,22 +1445,22 @@ class ss extends ee {
1445
1445
  }), Promise.resolve(!0);
1446
1446
  }
1447
1447
  }
1448
- class Lt extends ee {
1448
+ class Ut extends ee {
1449
1449
  projects = {};
1450
1450
  materials = {};
1451
1451
  files = {};
1452
1452
  histories = {};
1453
1453
  historyItems = {};
1454
1454
  init(e) {
1455
- const t = new T(e), s = this.projects[t.id] || {}, n = Object.assign(t.toDsl(), s);
1455
+ const t = new D(e), s = this.projects[t.id] || {}, n = Object.assign(t.toDsl(), s);
1456
1456
  return this.projects[n.id] = n, Promise.resolve(n);
1457
1457
  }
1458
1458
  saveProject(e) {
1459
- const t = new T(e);
1459
+ const t = new D(e);
1460
1460
  return this.projects[t.id] = t.toDsl(), Promise.resolve(!0);
1461
1461
  }
1462
1462
  saveMaterials(e, t) {
1463
- return e.id && (this.materials[e.id] = X(t)), Promise.resolve(!0);
1463
+ return e.id && (this.materials[e.id] = Q(t)), Promise.resolve(!0);
1464
1464
  }
1465
1465
  saveFile(e) {
1466
1466
  return this.files[e.id] = e, Promise.resolve(!0);
@@ -1502,9 +1502,9 @@ class Lt extends ee {
1502
1502
  }), Promise.resolve(!0);
1503
1503
  }
1504
1504
  }
1505
- let O = null;
1505
+ let H = null;
1506
1506
  function rs() {
1507
- return O || (O = new Lt(), O);
1507
+ return H || (H = new Ut(), H);
1508
1508
  }
1509
1509
  class ns extends ee {
1510
1510
  getFileCaches = {};
@@ -1523,7 +1523,7 @@ class ns extends ee {
1523
1523
  async saveMaterials(e, t) {
1524
1524
  return !!await this.api("saveMaterials", {
1525
1525
  project: e,
1526
- materials: X(t)
1526
+ materials: Q(t)
1527
1527
  }).catch(() => !1);
1528
1528
  }
1529
1529
  async saveFile(e) {
@@ -1563,7 +1563,7 @@ class ns extends ee {
1563
1563
  );
1564
1564
  }
1565
1565
  }
1566
- function Ee(r, e, t = []) {
1566
+ function Pe(r, e, t = []) {
1567
1567
  return t.map((s) => {
1568
1568
  const { id: n, title: i, icon: a, children: o, hidden: c } = s;
1569
1569
  return {
@@ -1572,16 +1572,16 @@ function Ee(r, e, t = []) {
1572
1572
  icon: a,
1573
1573
  hidden: c,
1574
1574
  url: `${r}/${e}/${n}`,
1575
- children: o && o.length ? Ee(r, e, o) : void 0
1575
+ children: o && o.length ? Pe(r, e, o) : void 0
1576
1576
  };
1577
1577
  });
1578
1578
  }
1579
- function Re(r, e) {
1579
+ function Ee(r, e) {
1580
1580
  if (!e) return r;
1581
1581
  let t = [];
1582
1582
  for (const s of r)
1583
1583
  if (s.children && s.children.length) {
1584
- const n = Re(s.children, e);
1584
+ const n = Ee(s.children, e);
1585
1585
  n.length && (s.children = n, t.push(s));
1586
1586
  } else
1587
1587
  e.can(s.id.toString()) && t.push(s);
@@ -1592,97 +1592,97 @@ function is(r) {
1592
1592
  menuPathPrefix: e = "",
1593
1593
  pageRouteName: t = "page",
1594
1594
  disableMenusFilter: s = !1
1595
- } = r || {}, n = je(), i = he(), a = rt(), o = K(!1), c = K(!1), l = n.project;
1595
+ } = r || {}, n = je(), i = he(), a = rt(), o = z(!1), c = z(!1), l = n.project;
1596
1596
  Be(() => {
1597
- const { name: m, params: h, meta: d } = i;
1598
- if (m === C) {
1597
+ const { name: m, params: h, meta: f } = i;
1598
+ if (m === k) {
1599
1599
  const u = n.getPage(h.id);
1600
1600
  o.value = !u?.mask, c.value = !!u?.pure;
1601
- } else if (m === H) {
1601
+ } else if (m === T) {
1602
1602
  const u = n.getHomepage();
1603
1603
  o.value = !u?.mask, c.value = !!u?.pure;
1604
1604
  } else
1605
- o.value = !d.mask, c.value = !!d.pure;
1605
+ o.value = !f.mask, c.value = !!f.pure;
1606
1606
  });
1607
- const f = Ee(
1607
+ const p = Pe(
1608
1608
  e,
1609
1609
  t,
1610
1610
  l?.pages
1611
- ), p = l?.config;
1611
+ ), d = l?.config;
1612
1612
  return {
1613
1613
  disabled: o,
1614
- logo: p?.logo,
1615
- themeSwitchable: p?.themeSwitchable,
1616
- title: p?.title || l?.description || l?.name || "VTJ App",
1617
- menus: s ? f : Re(f, a),
1614
+ logo: d?.logo,
1615
+ themeSwitchable: d?.themeSwitchable,
1616
+ title: d?.title || l?.description || l?.name || "VTJ App",
1617
+ menus: s ? p : Ee(p, a),
1618
1618
  pure: c
1619
1619
  };
1620
1620
  }
1621
1621
  export {
1622
1622
  ve as ACCESS_KEY,
1623
- st as Access,
1623
+ ye as Access,
1624
1624
  Je as BUILD_IN_TAGS,
1625
- Ne as BUILT_IN_DIRECTIVES,
1625
+ Ue as BUILT_IN_DIRECTIVES,
1626
1626
  ee as BaseService,
1627
1627
  oe as CONTEXT_HOST,
1628
- pt as Context,
1628
+ ut as Context,
1629
1629
  y as ContextMode,
1630
- Ue as DATA_TYPES,
1631
- H as HOMEPAGE_ROUTE_NAME,
1632
- Le as HTML_TAGS,
1633
- Xt as JSCodeToString,
1634
- Gt as LIFE_CYCLES_LIST,
1630
+ Le as DATA_TYPES,
1631
+ T as HOMEPAGE_ROUTE_NAME,
1632
+ qe as HTML_TAGS,
1633
+ Yt as JSCodeToString,
1634
+ zt as LIFE_CYCLES_LIST,
1635
1635
  ns as LocalService,
1636
- Lt as MemoryService,
1636
+ Ut as MemoryService,
1637
1637
  xt as NodeEnv,
1638
- C as PAGE_ROUTE_NAME,
1639
- Bt as Provider,
1638
+ k as PAGE_ROUTE_NAME,
1639
+ Ot as Provider,
1640
1640
  ss as StorageService,
1641
- A as VTJ_RENDERER_VERSION,
1641
+ C as VTJ_RENDERER_VERSION,
1642
1642
  ge as adoptedStyleSheets,
1643
1643
  Zt as clearLoaderCache,
1644
- nt as createAccess,
1645
- Yt as createAdapter,
1644
+ Xt as createAccess,
1645
+ Qt as createAdapter,
1646
1646
  Vt as createAssetScripts,
1647
1647
  Wt as createAssetsCss,
1648
- yt as createDataSources,
1649
- W as createLoader,
1648
+ vt as createDataSources,
1649
+ G as createLoader,
1650
1650
  rs as createMemoryService,
1651
- ot as createMetaApi,
1652
- lt as createMock,
1651
+ it as createMetaApi,
1652
+ ct as createMock,
1653
1653
  es as createProvider,
1654
- V as createRenderer,
1655
- it as createSchemaApi,
1656
- at as createSchemaApis,
1654
+ W as createRenderer,
1655
+ nt as createSchemaApi,
1656
+ ot as createSchemaApis,
1657
1657
  ts as createServiceRequest,
1658
- St as defaultLoader,
1659
- M as fillBasePath,
1658
+ wt as defaultLoader,
1659
+ I as fillBasePath,
1660
1660
  F as getMock,
1661
- we as getModifiers,
1662
- _e as getPlugin,
1663
- Ge as getRawComponent,
1664
- Ye as isBuiltInTag,
1665
- Y as isCSSUrl,
1666
- et as isJSCode,
1661
+ Se as getModifiers,
1662
+ we as getPlugin,
1663
+ We as getRawComponent,
1664
+ Ze as isBuiltInTag,
1665
+ X as isCSSUrl,
1666
+ tt as isJSCode,
1667
1667
  _ as isJSExpression,
1668
- k as isJSFunction,
1669
- qe as isJSON,
1668
+ M as isJSFunction,
1669
+ Ke as isJSON,
1670
1670
  Z as isJSUrl,
1671
- Ze as isNativeTag,
1671
+ et as isNativeTag,
1672
1672
  Xe as isVuePlugin,
1673
- Ve as loadCss,
1674
- We as loadCssUrl,
1673
+ Ge as loadCss,
1674
+ Ye as loadCssUrl,
1675
1675
  Qe as loadScriptUrl,
1676
- ut as mockApi,
1677
- ct as mockApis,
1678
- ye as mockCleanup,
1679
- D as nodeRender,
1680
- Ke as parseDeps,
1681
- I as parseExpression,
1682
- G as parseFunction,
1683
- Se as providerKey,
1676
+ lt as mockApi,
1677
+ at as mockApis,
1678
+ _e as mockCleanup,
1679
+ x as nodeRender,
1680
+ Ve as parseDeps,
1681
+ A as parseExpression,
1682
+ V as parseFunction,
1683
+ $e as providerKey,
1684
1684
  ze as removeProdFlag,
1685
- Qt as setupPageSetting,
1685
+ Gt as setupPageSetting,
1686
1686
  me as toString,
1687
1687
  rt as useAccess,
1688
1688
  is as useMask,