@vtj/renderer 0.10.14 → 0.11.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 ke, isString as $, isFunction as J, logger as R, storage as N, cookie as U, toArray as se, unRSA as re, delay as le, createRequest as ue, jsonp as pe, merge as Ie, 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";
1
+ import { Base as Ce, BUILT_IN_COMPONENTS as Fe, ProjectModel as H, HistoryModel as ce } from "@vtj/core";
2
+ import { isUrl as Ie, url as b, dedupArray as ke, 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 Me, pathToRegexp as Oe, pathToRegexpMatch as Te, formDataToJson as He, camelCase as E, upperFirst as De, pick as xe, request as q, loadScript as ne, Storage as Be, mapToObject as X } from "@vtj/utils";
3
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";
4
+ import { inject as de, defineComponent as fe, h as z, ref as K, defineAsyncComponent as ie, watchEffect as Ne } 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.14
10
+ * @version 0.11.0
11
11
  * @license <a href="https://vtj.pro/license.html">MIT License</a>
12
12
  */
13
- const A = "0.10.14";
13
+ const A = "0.11.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
+ ], Kt = [
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,11 +53,11 @@ 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
+ }, C = "VtjPage", T = "VtjHomepage", Je = "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
- ), Je = "component,slot".split(",");
58
+ ), qe = "component,slot".split(",");
59
59
  function M(r, e) {
60
- return r.map((t) => Fe(t) || t.startsWith("/") ? t : `${e}${t}`);
60
+ return r.map((t) => Ie(t) || t.startsWith("/") ? t : `${e}${t}`);
61
61
  }
62
62
  function Y(r) {
63
63
  return /\.css$/.test(r);
@@ -65,28 +65,28 @@ function Y(r) {
65
65
  function Z(r) {
66
66
  return /\.js$/.test(r);
67
67
  }
68
- function qe(r) {
68
+ function ze(r) {
69
69
  return /\.json$/.test(r);
70
70
  }
71
- function Vt(r) {
71
+ function Gt(r) {
72
72
  return r.map(
73
73
  (e) => `<script src="${b.append(e, { v: A })}"><\/script>`
74
74
  ).join("");
75
75
  }
76
- function Wt(r = []) {
76
+ function Vt(r = []) {
77
77
  return r.map(
78
78
  (e) => `<link rel="stylesheet" href="${b.append(e, { v: A })}" />`
79
79
  ).join("");
80
80
  }
81
- function ze(r, e = !1) {
81
+ function Ke(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) {
84
+ function Ge(r, e, t = !1) {
85
85
  const s = r.filter((m) => !!m.enabled), n = [], i = [], a = [], o = [], c = {}, l = {}, f = [], p = {};
86
86
  return s.forEach(
87
87
  ({ urls: m, assetsUrl: h, library: d, assetsLibrary: u, localeLibrary: w }) => {
88
88
  m?.forEach((g) => {
89
- Z(g) && n.push(ze(g, t)), Y(g) && i.push(g);
89
+ Z(g) && n.push(Ke(g, t)), Y(g) && i.push(g);
90
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);
91
91
  }
92
92
  ), {
@@ -100,7 +100,7 @@ function Ke(r, e, t = !1) {
100
100
  libraryLocaleMap: l
101
101
  };
102
102
  }
103
- function Ge(r, e) {
103
+ function Ve(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
  }
@@ -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 We(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 Qe(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)) {
@@ -134,7 +134,7 @@ function We(r, e = window) {
134
134
  a.rel = "stylesheet", a.id = n, a.href = n, s.appendChild(a);
135
135
  }
136
136
  }
137
- async function Qe(r, e, t = window) {
137
+ async function Xe(r, e, t = window) {
138
138
  const s = t.document, n = t.document.head;
139
139
  let i = t[e];
140
140
  return i ? i.default || i : new Promise((a, o) => {
@@ -148,14 +148,14 @@ async function Qe(r, e, t = window) {
148
148
  }
149
149
  });
150
150
  }
151
- function Xe(r) {
152
- return J(r) || J(r?.install);
153
- }
154
151
  function Ye(r) {
155
- return Je.includes(r);
152
+ return J(r) || J(r?.install);
156
153
  }
157
154
  function Ze(r) {
158
- return Le.includes(r);
155
+ return qe.includes(r);
156
+ }
157
+ function et(r) {
158
+ return Je.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 Wt(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 k(r, e, t = !1, s = !1) {
172
+ function I(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 k(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 (R.error("parseExpression.error", n, r, e?.__self ?? e), s)
182
+ if (P.error("parseExpression.error", n, r, e?.__self ?? e), s)
183
183
  throw n;
184
184
  }
185
185
  }
186
186
  function G(r, e, t = !1, s = !1) {
187
- const n = k(r, e, t, s);
188
- if (typeof n != "function" && (R.error(
187
+ const n = I(r, e, t, s);
188
+ if (typeof n != "function" && (P.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 I(r) {
200
+ function k(r) {
201
201
  return typeof r == "object" && r && r.type === "JSFunction";
202
202
  }
203
- function et(r) {
204
- return _(r) || I(r);
203
+ function tt(r) {
204
+ return _(r) || k(r);
205
205
  }
206
- function Xt(r) {
207
- return et(r) ? r.value : JSON.stringify(r);
206
+ function Qt(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,12 +219,19 @@ 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
+ interceptResponse = !0;
226
227
  constructor(e) {
227
- this.options = Object.assign({}, tt, e), this.loadData();
228
+ this.options = Object.assign({}, st, e), this.loadData();
229
+ }
230
+ enableIntercept() {
231
+ this.interceptResponse = !0;
232
+ }
233
+ disableIntercept() {
234
+ this.interceptResponse = !1;
228
235
  }
229
236
  connect(e) {
230
237
  const { mode: t, router: s, request: n } = e;
@@ -284,7 +291,11 @@ class st {
284
291
  const { privateKey: t } = this.options;
285
292
  if (Array.isArray(e) && t) {
286
293
  const s = e.map((n) => re(n, t));
287
- this.data = JSON.parse(s.join(""));
294
+ try {
295
+ this.data = JSON.parse(s.join(""));
296
+ } catch (n) {
297
+ console.warn(n);
298
+ }
288
299
  return;
289
300
  }
290
301
  if (typeof e == "string")
@@ -352,8 +363,9 @@ class st {
352
363
  }
353
364
  setRequest(e) {
354
365
  e.useRequest((t) => (this.data?.token && (t.headers[this.options.authKey] = this.data?.token), t)), e.useResponse(
355
- async (t) => (await this.showUnauthorizedAlert(t), t),
366
+ async (t) => (this.interceptResponse && await this.showUnauthorizedAlert(t), t),
356
367
  async (t) => {
368
+ if (!this.interceptResponse) return Promise.reject(t);
357
369
  const s = t.response || t || {};
358
370
  return await this.showUnauthorizedAlert(s), Promise.reject(t);
359
371
  }
@@ -363,15 +375,8 @@ class st {
363
375
  function rt() {
364
376
  return de(ve, null);
365
377
  }
366
- function Yt(r = {}) {
367
- const {
368
- notify: e,
369
- loading: t,
370
- settings: s = {},
371
- Startup: n,
372
- access: i,
373
- remote: a = "https://lcdp.vtj.pro"
374
- } = r;
378
+ function Xt(r = {}) {
379
+ const { notify: e, loading: t, settings: s = {}, Startup: n, access: i, useTitle: a } = r;
375
380
  let o = null;
376
381
  return {
377
382
  request: ue({
@@ -397,20 +402,20 @@ function Yt(r = {}) {
397
402
  jsonp: pe,
398
403
  notify: e,
399
404
  loading: t,
405
+ useTitle: a,
400
406
  startupComponent: n,
401
- remote: a,
402
- access: i ? nt(i) : void 0
407
+ access: i ? new ye(i) : void 0
403
408
  };
404
409
  }
405
- function nt(r = {}) {
410
+ function Yt(r = {}) {
406
411
  const e = {
407
412
  storageKey: "RRO_IDE_ACCESS_STORAGE__",
408
413
  auth: "https://lcdp.vtj.pro/auth.html",
409
414
  privateKey: "MIIBOgIBAAJBAKoIzmn1FYQ1YOhOBw9EhABxZ+PySAIaydI+zdhoKflrdgJ4A5E4/5gbQmRpk09hPWG8nvX7h+l/QLU8kXxAIBECAwEAAQJAAlgpxQY6sByLsXqzJcthC8LSGsLf2JEJkHwlnpwFqlEV8UCkoINpuZ2Wzl+aftURu5rIfAzRCQBvHmeOTW9/zQIhAO5ufWDmnSLyfAAsNo5JRNpVuLFCFodR8Xm+ulDlosR/AiEAtpAltyP9wmCABKG/v/hrtTr3mcvFNGCjoGa9bUAok28CIHbrVs9w1ijrBlvTsXYwJw46uP539uKRRT4ymZzlm9QjAiB+1KH/G9f9pEEL9rtaSOG7JF5D0JcOjlze4MGVFs+ZrQIhALKOUFBNr2zEsyJIjw2PlvEucdlG77UniszjXTROHSPd"
410
415
  };
411
- return new st(Object.assign(e, r));
416
+ return new ye(Object.assign(e, r));
412
417
  }
413
- function it(r, e) {
418
+ function nt(r, e) {
414
419
  const { jsonp: t, request: s } = e;
415
420
  if (r.method === "jsonp")
416
421
  return (n = {}) => t(r.url, {
@@ -418,7 +423,7 @@ function it(r, e) {
418
423
  query: n
419
424
  });
420
425
  {
421
- const n = r.headers ? k(r.headers, {}, !0) : void 0, i = {
426
+ const n = r.headers ? I(r.headers, {}, !0) : void 0, i = {
422
427
  url: r.url,
423
428
  method: r.method,
424
429
  settings: {
@@ -426,10 +431,10 @@ function it(r, e) {
426
431
  headers: n
427
432
  }
428
433
  };
429
- return (a, o) => (delete i.data, s.send(Ie(i, o || {}, { data: a })));
434
+ return (a, o) => (delete i.data, s.send(Me(i, o || {}, { data: a })));
430
435
  }
431
436
  }
432
- function ot(r, e) {
437
+ function it(r, e) {
433
438
  const { metaQuery: t } = e;
434
439
  if (!t) return;
435
440
  const { code: s, queryCode: n } = r;
@@ -441,47 +446,47 @@ function ot(r, e) {
441
446
  return t(s, n, i, a);
442
447
  };
443
448
  }
444
- function at(r = [], e = [], t) {
449
+ function ot(r = [], e = [], t) {
445
450
  const s = {};
446
451
  for (const n of r)
447
- s[n.id] = it(n, t);
452
+ s[n.id] = nt(n, t);
448
453
  for (const n of e)
449
- s[n.id] = ot(n, t);
454
+ s[n.id] = it(n, t);
450
455
  return s;
451
456
  }
452
- async function ct(r = [], e = window) {
457
+ async function at(r = [], e = window) {
453
458
  const t = F(e);
454
- t && (ye(e), r.forEach((s) => ut(t, s)));
459
+ t && (_e(e), r.forEach((s) => lt(t, s)));
455
460
  }
456
- function lt(r, e = window) {
457
- const t = I(r.mockTemplate) && r.mockTemplate.value ? G(r.mockTemplate, {}, !0) : void 0, s = F(e);
461
+ function ct(r, e = window) {
462
+ const t = k(r.mockTemplate) && r.mockTemplate.value ? G(r.mockTemplate, {}, !0) : void 0, s = F(e);
458
463
  return async (...n) => {
459
464
  let i = {};
460
465
  if (t)
461
466
  try {
462
467
  i = await t.apply(t, n);
463
468
  } catch (a) {
464
- R.warn("模拟数据模版异常", a);
469
+ P.warn("模拟数据模版异常", a);
465
470
  }
466
471
  return s?.mock(i);
467
472
  };
468
473
  }
469
- function ut(r, e) {
474
+ function lt(r, e) {
470
475
  if (!e.mock) return;
471
476
  const { url: t, mockTemplate: s } = e;
472
477
  if (t && s) {
473
- const n = Me(`${t}(.*)`), i = Oe(t, { decode: decodeURIComponent }), a = k(s, {}, !0);
478
+ const n = Oe(`${t}(.*)`), i = Te(t, { decode: decodeURIComponent }), a = I(s, {}, !0);
474
479
  r.mock(n, (o) => {
475
480
  const c = b.parse(o.url) || {}, l = o.body instanceof FormData ? He(o.body) : o.body, f = i(o.url)?.params;
476
481
  return Object.assign(o, { data: l, params: c, query: f }), r.mock(a(o));
477
482
  });
478
483
  }
479
484
  }
480
- function ye(r = window) {
485
+ function _e(r = window) {
481
486
  const e = F(r);
482
487
  e && (e._mocked = {});
483
488
  }
484
- class pt {
489
+ class ut {
485
490
  __id = null;
486
491
  __mode;
487
492
  __instance = null;
@@ -548,9 +553,9 @@ class pt {
548
553
  if (e)
549
554
  if (this.__mode === y.Runtime) {
550
555
  const { id: t, type: s } = e, n = t ? this.__transform[t] ?? e.value : e.value;
551
- return k({ type: s, value: n }, this);
556
+ return I({ type: s, value: n }, this);
552
557
  } else
553
- return k(e, this);
558
+ return I(e, this);
554
559
  }
555
560
  __ref(e = null, t) {
556
561
  if (this.__mode !== y.VNode)
@@ -592,22 +597,22 @@ function V(r) {
592
597
  $components: s,
593
598
  $libs: n,
594
599
  $apis: i
595
- }, l = new pt({
600
+ }, l = new ut({
596
601
  mode: t,
597
602
  dsl: o.value,
598
603
  attrs: c
599
604
  }), f = e.defineComponent({
600
605
  name: o.value.name,
601
606
  props: {
602
- ...ft(o.value.props ?? [], l)
607
+ ...dt(o.value.props ?? [], l)
603
608
  },
604
609
  setup(p) {
605
610
  l.$props = p, l.props = p, o.value.id && ge(
606
611
  r.window || window,
607
612
  o.value.id,
608
613
  o.value.css || ""
609
- ), l.state = ht(e, o.value.state ?? {}, l);
610
- const m = mt(e, o.value.computed ?? {}, l), h = gt(o.value.methods ?? {}, l), d = vt(e, o.value.inject, l), u = yt(
614
+ ), l.state = ft(e, o.value.state ?? {}, l);
615
+ const m = ht(e, o.value.computed ?? {}, l), h = mt(o.value.methods ?? {}, l), d = gt(e, o.value.inject, l), u = vt(
611
616
  o.value.dataSources || {},
612
617
  l
613
618
  ), w = {
@@ -616,29 +621,29 @@ function V(r) {
616
621
  ...h,
617
622
  ...u
618
623
  };
619
- return l.setup(w, e), _t(e, o.value.watch ?? [], l), {
624
+ return l.setup(w, e), yt(e, o.value.watch ?? [], l), {
620
625
  vtj: l
621
626
  };
622
627
  },
623
- emits: dt(o.value.emits),
628
+ emits: pt(o.value.emits),
624
629
  expose: ["vtj"],
625
630
  render() {
626
631
  if (!o.value.nodes) return null;
627
632
  const p = o.value.nodes || [];
628
633
  return p.length === 1 ? D(p[0], l, e, a) : p.map((m) => D(m, l, e, a));
629
634
  },
630
- ...wt(o.value.lifeCycles ?? {}, l)
635
+ ..._t(o.value.lifeCycles ?? {}, l)
631
636
  });
632
637
  return {
633
638
  renderer: e.markRaw(f),
634
639
  context: l
635
640
  };
636
641
  }
637
- function dt(r = []) {
642
+ function pt(r = []) {
638
643
  return r.map((e) => $(e) ? e : e.name);
639
644
  }
640
- function ft(r = [], e) {
641
- const t = (s) => s ? (Array.isArray(s) ? s : [s]).map((i) => Ue[i]) : void 0;
645
+ function dt(r = [], e) {
646
+ const t = (s) => s ? (Array.isArray(s) ? s : [s]).map((i) => Le[i]) : void 0;
642
647
  return r.map((s) => $(s) ? {
643
648
  name: s
644
649
  } : {
@@ -655,30 +660,30 @@ function ft(r = [], e) {
655
660
  {}
656
661
  );
657
662
  }
658
- function ht(r, e, t) {
663
+ function ft(r, e, t) {
659
664
  return r.reactive(
660
665
  Object.keys(e || {}).reduce(
661
666
  (s, n) => {
662
667
  let i = e[n];
663
- return _(i) ? i = t.__parseExpression(i) : I(i) && (i = t.__parseFunction(i)), s[n] = i, s;
668
+ return _(i) ? i = t.__parseExpression(i) : k(i) && (i = t.__parseFunction(i)), s[n] = i, s;
664
669
  },
665
670
  {}
666
671
  )
667
672
  );
668
673
  }
669
- function mt(r, e, t) {
674
+ function ht(r, e, t) {
670
675
  return Object.entries(e ?? {}).reduce(
671
676
  (s, [n, i]) => (s[n] = r.computed(t.__parseFunction(i)), s),
672
677
  {}
673
678
  );
674
679
  }
675
- function gt(r, e) {
680
+ function mt(r, e) {
676
681
  return Object.entries(r ?? {}).reduce(
677
682
  (t, [s, n]) => (t[s] = e.__parseFunction(n), t),
678
683
  {}
679
684
  );
680
685
  }
681
- function vt(r, e = [], t) {
686
+ function gt(r, e = [], t) {
682
687
  return e.reduce(
683
688
  (s, n) => {
684
689
  const { name: i, from: a } = n || {};
@@ -689,14 +694,14 @@ function vt(r, e = [], t) {
689
694
  {}
690
695
  );
691
696
  }
692
- function yt(r, e) {
697
+ function vt(r, e) {
693
698
  return Object.keys(r).reduce(
694
699
  (t, s) => {
695
700
  const n = r[s];
696
701
  if (n.type === "mock")
697
- t[s] = lt(n);
702
+ t[s] = ct(n);
698
703
  else if (n.ref) {
699
- const i = e.$apis[n.ref], a = I(n.transform) ? n.transform.value ? e.__parseFunction(n.transform) : void 0 : n.transform;
704
+ const i = e.$apis[n.ref], a = k(n.transform) ? n.transform.value ? e.__parseFunction(n.transform) : void 0 : n.transform;
700
705
  t[s] = async (...o) => {
701
706
  const c = await i.apply(e, o);
702
707
  return a ? a(c) : c;
@@ -707,7 +712,7 @@ function yt(r, e) {
707
712
  {}
708
713
  );
709
714
  }
710
- function _t(r, e = [], t) {
715
+ function yt(r, e = [], t) {
711
716
  e.forEach((s) => {
712
717
  r.watch(
713
718
  t.__parseExpression(s.source),
@@ -719,19 +724,19 @@ function _t(r, e = [], t) {
719
724
  );
720
725
  });
721
726
  }
722
- function wt(r, e) {
727
+ function _t(r, e) {
723
728
  return Object.entries(r ?? {}).reduce(
724
729
  (t, [s, n]) => (t[s] = e.__parseFunction(n), t),
725
730
  {}
726
731
  );
727
732
  }
728
- let L = [], P = {};
729
- const St = (r) => r;
730
- async function _e(r, e = window) {
733
+ let L = [], R = {};
734
+ const wt = (r) => r;
735
+ async function we(r, e = window) {
731
736
  const { urls: t = [], library: s } = r, n = t.filter((o) => Z(o));
732
737
  if (n.length === 0 || !s) return null;
733
738
  const i = t.filter((o) => Y(o));
734
- return i.length && We(i, e), await Qe(n, s, e).catch(
739
+ return i.length && Qe(i, e), await Xe(n, s, e).catch(
735
740
  (o) => (console.warn("loadScriptUrl error", n, s, o), null)
736
741
  );
737
742
  }
@@ -742,8 +747,8 @@ function W(r) {
742
747
  }), L = []), (n, i, a = x) => {
743
748
  if (!i || typeof i == "string") return n;
744
749
  if (i.type === "Schema" && i.id) {
745
- let o = P[i.id];
746
- return o || (o = P[i.id] = a.defineAsyncComponent(async () => {
750
+ let o = R[i.id];
751
+ return o || (o = R[i.id] = a.defineAsyncComponent(async () => {
747
752
  const c = await e(i.id);
748
753
  return c && (c.name = n), c ? V({
749
754
  ...s,
@@ -755,8 +760,8 @@ function W(r) {
755
760
  }), o);
756
761
  }
757
762
  if (i.type === "UrlSchema" && i.url) {
758
- let o = P[i.url];
759
- return o || (o = P[i.url] = a.defineAsyncComponent(async () => {
763
+ let o = R[i.url];
764
+ return o || (o = R[i.url] = a.defineAsyncComponent(async () => {
760
765
  const c = await t(i.url);
761
766
  return c && (c.name = n), c ? V({
762
767
  ...s,
@@ -768,10 +773,10 @@ function W(r) {
768
773
  }), o);
769
774
  }
770
775
  if (i.type === "Plugin") {
771
- let o = i.library ? P[i.library] : null;
772
- return o || (i.library && L.push(i.library), o = P[i.library || Symbol()] = a.defineAsyncComponent(
776
+ let o = i.library ? R[i.library] : null;
777
+ return o || (i.library && L.push(i.library), o = R[i.library || Symbol()] = a.defineAsyncComponent(
773
778
  async () => {
774
- const c = await _e(i, s.window);
779
+ const c = await we(i, s.window);
775
780
  return c || (console.warn("getPlugin result is null", i), null);
776
781
  }
777
782
  ), o);
@@ -780,43 +785,43 @@ function W(r) {
780
785
  };
781
786
  }
782
787
  function Zt() {
783
- P = {};
788
+ R = {};
784
789
  }
785
- function D(r, e, t = x, s = St) {
790
+ function D(r, e, t = x, s = wt) {
786
791
  if (!r || !r.name || r.invisible) return null;
787
- 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);
788
- if (o && !Et(o, e))
792
+ 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 } = jt(a);
793
+ if (o && !$t(o, e))
789
794
  return null;
790
795
  const d = (u) => {
791
796
  const w = u.$components, g = (() => {
792
797
  if (r.name === "component")
793
- return Pt(u, r.props?.is);
798
+ return Et(u, r.props?.is);
794
799
  if (r.name === "slot") return r.name;
795
800
  const j = s(r.name, r.from, t);
796
- return $(j) ? Ye(j) || Ze(j) ? j : w[j] ?? n?.app?.component(j) ?? j : j;
797
- })(), S = bt(i, r.props ?? {}, u), be = Rt(t, r.events ?? {}, u);
801
+ return $(j) ? Ze(j) || et(j) ? j : w[j] ?? n?.app?.component(j) ?? j : j;
802
+ })(), S = Rt(i, r.props ?? {}, u), Pe = bt(t, r.events ?? {}, u);
798
803
  if (r.name === "slot")
799
- return At(t, r, S, u, s);
804
+ return Pt(t, r, S, u, s);
800
805
  p && Object.assign(S, u.__parseExpression(p.value)), l && (S.style = Object.assign(
801
806
  S.style ?? {},
802
- Ft(l, u)
803
- )), m && Object.assign(S, kt(m, u)), f.forEach((j) => {
807
+ Ct(l, u)
808
+ )), m && Object.assign(S, Ft(m, u)), f.forEach((j) => {
804
809
  Object.assign(S, It(t, j, u));
805
810
  });
806
- const Re = Mt(
811
+ const Ae = kt(
807
812
  t,
808
813
  r.children ?? [],
809
814
  u,
810
815
  s,
811
816
  r
812
817
  );
813
- let B = t.createVNode(g, { ...S, ...be }, Re);
814
- const te = n ? jt(n, h, u) : [];
818
+ let B = t.createVNode(g, { ...S, ...Pe }, Ae);
819
+ const te = n ? St(n, h, u) : [];
815
820
  return te.length && (B = t.withDirectives(B, te)), B;
816
821
  };
817
822
  return c ? Tt(c, d, e) : d(e);
818
823
  }
819
- function jt(r, e, t) {
824
+ function St(r, e, t) {
820
825
  const s = r.app;
821
826
  return e.map((n) => {
822
827
  const i = typeof n.name == "string" ? s.directive(n.name) : t.__parseExpression(n.name);
@@ -825,11 +830,11 @@ function jt(r, e, t) {
825
830
  return n.value && a.push(t.__parseExpression(n.value)), n.arg && a.push(n.arg), n.modifiers && a.push(n.modifiers), a;
826
831
  }).filter((n) => !!n);
827
832
  }
828
- function $t(r = []) {
833
+ function jt(r = []) {
829
834
  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(
830
835
  (c) => E(c.name) === "vModel"
831
836
  ), o = r.filter(
832
- (c) => !Ne.includes(E(c.name))
837
+ (c) => !Ue.includes(E(c.name))
833
838
  );
834
839
  return {
835
840
  vIf: e,
@@ -841,18 +846,18 @@ function $t(r = []) {
841
846
  vHtml: i
842
847
  };
843
848
  }
844
- function Et(r, e) {
849
+ function $t(r, e) {
845
850
  return !!e.__parseExpression(r.value);
846
851
  }
847
- function Pt(r, e) {
852
+ function Et(r, e) {
848
853
  return e ? _(e) ? r.__parseExpression(e) : e : "div";
849
854
  }
850
- function bt(r, e, t) {
855
+ function Rt(r, e, t) {
851
856
  const s = Q(e, t);
852
857
  return s.ref = t.__ref(r, s.ref), s;
853
858
  }
854
859
  function Q(r, e) {
855
- return _(r) ? e.__parseExpression(r) : I(r) ? e.__parseFunction(r) : Array.isArray(r) ? r.map((t) => Q(t, e)) : typeof r == "object" ? Object.keys(r || {}).reduce(
860
+ 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(
856
861
  (t, s) => {
857
862
  let n = r[s];
858
863
  return t[s] = Q(n, e), t;
@@ -860,7 +865,7 @@ function Q(r, e) {
860
865
  {}
861
866
  ) : r;
862
867
  }
863
- function Rt(r, e, t) {
868
+ function bt(r, e, t) {
864
869
  const s = ["passive", "capture", "once"], n = {
865
870
  capture: "Capture",
866
871
  once: "Once",
@@ -868,37 +873,37 @@ function Rt(r, e, t) {
868
873
  };
869
874
  return Object.keys(e || {}).reduce(
870
875
  (i, a) => {
871
- 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);
876
+ const o = e[a], c = Se(o.modifiers), l = c.find((m) => s.includes(m)), f = "on" + De(a) + (l && n[l] || ""), p = t.__parseFunction(o.handler);
872
877
  return p && (i[f] = r.withModifiers(p, c)), i;
873
878
  },
874
879
  {}
875
880
  );
876
881
  }
877
- function we(r = {}, e = !1) {
882
+ function Se(r = {}, e = !1) {
878
883
  const t = Object.keys(r);
879
884
  return e ? t.map((s) => "." + s) : t;
880
885
  }
881
- function At(r, e, t, s, n) {
882
- const { children: i } = e, a = Ct(e, s), o = s.$slots?.[a.name];
886
+ function Pt(r, e, t, s, n) {
887
+ const { children: i } = e, a = At(e, s), o = s.$slots?.[a.name];
883
888
  return o ? o(t) : i ? $(i) ? r.createTextVNode(i) : _(i) ? r.createTextVNode(
884
889
  me(s.__parseExpression(i))
885
890
  ) : Array.isArray(i) ? i.map(
886
891
  (c) => D(c, s, r, n)
887
892
  ) : null : null;
888
893
  }
889
- function Ct(r, e) {
894
+ function At(r, e) {
890
895
  const { props: t } = r, s = t?.name || "default";
891
896
  return {
892
897
  name: _(s) ? e.__parseExpression(s) : s,
893
898
  params: []
894
899
  };
895
900
  }
896
- function Ft(r, e) {
901
+ function Ct(r, e) {
897
902
  return e.__parseExpression(r.value) ? {} : {
898
903
  display: "none"
899
904
  };
900
905
  }
901
- function kt(r, e) {
906
+ function Ft(r, e) {
902
907
  return {
903
908
  innerHTML: e.__parseExpression(r.value) || ""
904
909
  };
@@ -909,7 +914,7 @@ function It(r, e, t) {
909
914
  value: e.value?.value ? `(v) => {
910
915
  ${e.value.value} = v;
911
916
  }` : "(v) => {}"
912
- }, n = t.__parseFunction(s), i = we(
917
+ }, n = t.__parseFunction(s), i = Se(
913
918
  _(e.modifiers) ? t.__parseExpression(e.modifiers) : e.modifiers
914
919
  ), a = _(e.arg) ? t.__parseExpression(e.arg) : e.arg || "modelValue";
915
920
  return {
@@ -917,7 +922,7 @@ function It(r, e, t) {
917
922
  [`onUpdate:${a}`]: i.length && n ? r.withModifiers(n, i) : n
918
923
  };
919
924
  }
920
- function Mt(r, e, t, s, n) {
925
+ function kt(r, e, t, s, n) {
921
926
  if (!e) return null;
922
927
  if ($(e))
923
928
  return { default: () => e };
@@ -926,11 +931,11 @@ function Mt(r, e, t, s, n) {
926
931
  default: () => me(t.__parseExpression(e))
927
932
  };
928
933
  if (Array.isArray(e) && e.length > 0) {
929
- const i = Ot(e), a = (o) => !o || !n ? {} : n?.id && Object.keys(o).length ? {
934
+ const i = Mt(e), a = (o) => !o || !n ? {} : n?.id && Object.keys(o).length ? {
930
935
  [`scope_${n.id}`]: o
931
936
  } : {};
932
937
  return Object.entries(i).reduce((o, [c, { nodes: l, params: f }]) => (o[c] = (p) => {
933
- const m = f.length ? De(p ?? {}, f) : a(p);
938
+ const m = f.length ? xe(p ?? {}, f) : a(p);
934
939
  return l.map(
935
940
  (h) => D(h, t.__clone(m), r, s)
936
941
  );
@@ -938,7 +943,7 @@ function Mt(r, e, t, s, n) {
938
943
  }
939
944
  return null;
940
945
  }
941
- function Ot(r) {
946
+ function Mt(r) {
942
947
  const e = {
943
948
  default: {
944
949
  params: [],
@@ -946,7 +951,7 @@ function Ot(r) {
946
951
  }
947
952
  };
948
953
  for (const t of r) {
949
- const s = Ht(t.slot), n = s.name;
954
+ const s = Ot(t.slot), n = s.name;
950
955
  e[n] ? (e[n].nodes.push(t), e[n].params = e[n].params.concat(s.params)) : e[n] = {
951
956
  nodes: [t],
952
957
  params: s.params
@@ -954,7 +959,7 @@ function Ot(r) {
954
959
  }
955
960
  return e;
956
961
  }
957
- function Ht(r = "default") {
962
+ function Ot(r = "default") {
958
963
  return $(r) ? { name: r, params: [] } : { params: [], ...r };
959
964
  }
960
965
  function Tt(r, e, t) {
@@ -965,7 +970,7 @@ function Tt(r, e, t) {
965
970
  const ae = fe({
966
971
  name: "VtjPageContainer",
967
972
  async setup() {
968
- 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());
973
+ const r = $e(), e = he(), t = e.params.id, s = t ? r.getPage(t) : r.getHomepage(), n = s ? await r.getRenderComponent(s.id) : null, i = K(Symbol());
969
974
  if (s) {
970
975
  Object.assign(e.meta, s.meta || {}, { cache: s.cache });
971
976
  const { useTitle: a } = r?.adapter;
@@ -988,14 +993,14 @@ const ae = fe({
988
993
  activated() {
989
994
  this.meta.cache === !1 && (this.sid = Symbol());
990
995
  }
991
- }), Dt = fe({
996
+ }), Ht = fe({
992
997
  name: "VtjStartupContainer",
993
998
  render() {
994
999
  return z("div", "page not found!");
995
1000
  }
996
- }), Se = Symbol("Provider");
997
- var xt = /* @__PURE__ */ ((r) => (r.Production = "production", r.Development = "development", r))(xt || {});
998
- class Bt extends Ae {
1001
+ }), je = Symbol("Provider");
1002
+ var Dt = /* @__PURE__ */ ((r) => (r.Production = "production", r.Development = "development", r))(Dt || {});
1003
+ class xt extends Ce {
999
1004
  constructor(e) {
1000
1005
  super(), this.options = e;
1001
1006
  const {
@@ -1038,7 +1043,7 @@ class Bt extends Ae {
1038
1043
  try {
1039
1044
  s = await e.apply(e, t);
1040
1045
  } catch (i) {
1041
- R.warn("模拟数据模版异常", i);
1046
+ P.warn("模拟数据模版异常", i);
1042
1047
  }
1043
1048
  return F()?.mock(s);
1044
1049
  };
@@ -1048,7 +1053,7 @@ class Bt extends Ae {
1048
1053
  if (this.project = t ? await t() : await this.service.init(e), !this.project)
1049
1054
  throw new Error("project is null");
1050
1055
  const { apis: s = [], meta: n = [] } = this.project, i = window;
1051
- 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();
1056
+ 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();
1052
1057
  }
1053
1058
  initMock(e) {
1054
1059
  const t = F(e);
@@ -1068,7 +1073,7 @@ class Bt extends Ae {
1068
1073
  materials: f,
1069
1074
  materialExports: p,
1070
1075
  materialMapLibrary: m
1071
- } = Ke(
1076
+ } = Ge(
1072
1077
  t,
1073
1078
  a,
1074
1079
  o === "development"
@@ -1083,7 +1088,7 @@ class Bt extends Ae {
1083
1088
  else {
1084
1089
  const w = l[h] || [];
1085
1090
  for (const g of w)
1086
- Y(g) && await Ve(h, b.append(g, { v: A })), Z(g) && await ne(b.append(g, { v: A }));
1091
+ Y(g) && await We(h, b.append(g, { v: A })), Z(g) && await ne(b.append(g, { v: A }));
1087
1092
  n[h] = e[h];
1088
1093
  }
1089
1094
  }
@@ -1092,7 +1097,7 @@ class Bt extends Ae {
1092
1097
  await ne(b.append(d, { v: A }));
1093
1098
  const h = this.materials || {};
1094
1099
  for (const d of p) {
1095
- const u = e[m[d]], w = Ce[d];
1100
+ const u = e[m[d]], w = Fe[d];
1096
1101
  if (w)
1097
1102
  u && w.forEach((g) => {
1098
1103
  i[g] = u[g];
@@ -1100,7 +1105,7 @@ class Bt extends Ae {
1100
1105
  else {
1101
1106
  const g = h[d] ? (await h[d]()).default : e[d];
1102
1107
  g && u && (g.components || []).forEach((S) => {
1103
- i[S.name] = Ge(S, u);
1108
+ i[S.name] = Ve(S, u);
1104
1109
  });
1105
1110
  }
1106
1111
  }
@@ -1119,17 +1124,17 @@ class Bt extends Ae {
1119
1124
  component: ae
1120
1125
  }, p = {
1121
1126
  path: l,
1122
- name: H,
1123
- component: t?.homepage ? ae : n.startupComponent || Dt,
1127
+ name: T,
1128
+ component: t?.homepage ? ae : n.startupComponent || Ht,
1124
1129
  meta: c
1125
1130
  };
1126
- 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));
1131
+ e.hasRoute(C) && e.removeRoute(C), e.hasRoute(T) && e.removeRoute(T), a ? (e.addRoute(a, f), e.addRoute(a, p)) : (e.addRoute(f), e.addRoute(p));
1127
1132
  }
1128
1133
  install(e) {
1129
1134
  const t = e.config.globalProperties.installed || {};
1130
1135
  for (const [s, n] of Object.entries(this.library))
1131
- !t[s] && Xe(n) && (e.use(n), t[s] = !0);
1132
- 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) => {
1136
+ !t[s] && Ye(n) && (e.use(n), t[s] = !0);
1137
+ this.options.install && e.use(this.options.install), this.adapter.access && e.use(this.adapter.access), e.provide(je, this), e.config.globalProperties.$provider = this, e.config.globalProperties.installed = t, this.mode === y.Design && (e.config.errorHandler = (s, n, i) => {
1133
1138
  const a = n?.$options.name, o = typeof s == "string" ? s : s?.message || s?.msg || "未知错误", c = `[ ${a} ] ${o} ${i}`;
1134
1139
  console.error(
1135
1140
  "[VTJ Error]:",
@@ -1202,13 +1207,13 @@ class Bt extends Ae {
1202
1207
  async getRenderComponent(e, t) {
1203
1208
  const s = this.getFile(e);
1204
1209
  if (!s)
1205
- return R.warn(`Can not find file: ${e}`), null;
1210
+ return P.warn(`Can not find file: ${e}`), null;
1206
1211
  t && t(s);
1207
1212
  const n = `.vtj/vue/${e}.vue`, i = this.modules[n] || this.modules[`/src/pages/${e}.vue`];
1208
1213
  if (i)
1209
1214
  return (await i())?.default;
1210
1215
  const a = await this.getDsl(s.id);
1211
- return a ? this.createDslRenderer(a).renderer : (R.warn(`Can not find dsl: ${e}`), null);
1216
+ return a ? this.createDslRenderer(a).renderer : (P.warn(`Can not find dsl: ${e}`), null);
1212
1217
  }
1213
1218
  defineUrlSchemaComponent(e, t) {
1214
1219
  return ie(async () => {
@@ -1217,18 +1222,18 @@ class Bt extends Ae {
1217
1222
  });
1218
1223
  }
1219
1224
  definePluginComponent(e) {
1220
- return ie(async () => await _e(e, window));
1225
+ return ie(async () => await we(e, window));
1221
1226
  }
1222
1227
  }
1223
1228
  function es(r) {
1224
- const e = new Bt(r);
1229
+ const e = new xt(r);
1225
1230
  return {
1226
1231
  provider: e,
1227
1232
  onReady: (s) => e.ready(s)
1228
1233
  };
1229
1234
  }
1230
- function je(r = {}) {
1231
- const e = de(Se, null);
1235
+ function $e(r = {}) {
1236
+ const e = de(je, null);
1232
1237
  if (!e)
1233
1238
  throw new Error("Can not find provider");
1234
1239
  if (e.nodeEnv === "development") {
@@ -1244,13 +1249,13 @@ function je(r = {}) {
1244
1249
  }
1245
1250
  return e;
1246
1251
  }
1247
- const $e = {
1252
+ const Ee = {
1248
1253
  type: "json",
1249
1254
  validSuccess: !0,
1250
1255
  originResponse: !1,
1251
1256
  failMessage: !0,
1252
1257
  validate: (r) => r.data?.code === 0
1253
- }, Nt = (r, e = "/__vtj__/api/:type.json") => (t, s, n) => r.send({
1258
+ }, Bt = (r, e = "/__vtj__/api/:type.json") => (t, s, n) => r.send({
1254
1259
  url: e,
1255
1260
  method: "post",
1256
1261
  params: { type: t },
@@ -1259,8 +1264,8 @@ const $e = {
1259
1264
  type: t,
1260
1265
  data: s
1261
1266
  },
1262
- settings: $e
1263
- }), Ut = (r, e = "/__vtj__/api/uploader.json") => async (t, s) => await r.send({
1267
+ settings: Ee
1268
+ }), Nt = (r, e = "/__vtj__/api/uploader.json") => async (t, s) => await r.send({
1264
1269
  url: e,
1265
1270
  method: "post",
1266
1271
  data: {
@@ -1268,7 +1273,7 @@ const $e = {
1268
1273
  projectId: s
1269
1274
  },
1270
1275
  settings: {
1271
- ...$e,
1276
+ ...Ee,
1272
1277
  type: "data"
1273
1278
  }
1274
1279
  }).then((n) => n && n[0] ? n[0] : null).catch(() => null);
@@ -1291,7 +1296,7 @@ class ee {
1291
1296
  pluginCaches = {};
1292
1297
  uploader;
1293
1298
  constructor(e = q) {
1294
- this.api = Nt(e), this.uploader = Ut(e);
1299
+ this.api = Bt(e), this.uploader = Nt(e);
1295
1300
  }
1296
1301
  async getExtension() {
1297
1302
  console.log("BaseService.getExtension");
@@ -1366,7 +1371,7 @@ class ee {
1366
1371
  return await this.api("clearStaticFiles", e).catch(() => "");
1367
1372
  }
1368
1373
  async getPluginMaterial(e) {
1369
- const { urls: t = [] } = e, s = t.filter((i) => qe(i))[0];
1374
+ const { urls: t = [] } = e, s = t.filter((i) => ze(i))[0];
1370
1375
  if (!s) return null;
1371
1376
  const n = this.pluginCaches[s];
1372
1377
  return n || (this.pluginCaches[s] = q.send({
@@ -1382,18 +1387,18 @@ class ee {
1382
1387
  return console.log("BaseService.genSource", e), "";
1383
1388
  }
1384
1389
  }
1385
- const v = new xe({
1390
+ const v = new Be({
1386
1391
  type: "local",
1387
1392
  expired: 0,
1388
1393
  prefix: "__VTJ_"
1389
1394
  });
1390
1395
  class ss extends ee {
1391
1396
  init(e) {
1392
- const t = new T(e), s = v.get(`project_${t.id}`), n = Object.assign(t.toDsl(), s || {});
1397
+ const t = new H(e), s = v.get(`project_${t.id}`), n = Object.assign(t.toDsl(), s || {});
1393
1398
  return v.save(`project_${t.id}`, n), Promise.resolve(n);
1394
1399
  }
1395
1400
  saveProject(e) {
1396
- const t = new T(e);
1401
+ const t = new H(e);
1397
1402
  return v.save(`project_${t.id}`, t.toDsl()), Promise.resolve(!0);
1398
1403
  }
1399
1404
  saveMaterials(e, t) {
@@ -1437,18 +1442,18 @@ class ss extends ee {
1437
1442
  }), Promise.resolve(!0);
1438
1443
  }
1439
1444
  }
1440
- class Lt extends ee {
1445
+ class Ut extends ee {
1441
1446
  projects = {};
1442
1447
  materials = {};
1443
1448
  files = {};
1444
1449
  histories = {};
1445
1450
  historyItems = {};
1446
1451
  init(e) {
1447
- const t = new T(e), s = this.projects[t.id] || {}, n = Object.assign(t.toDsl(), s);
1452
+ const t = new H(e), s = this.projects[t.id] || {}, n = Object.assign(t.toDsl(), s);
1448
1453
  return this.projects[n.id] = n, Promise.resolve(n);
1449
1454
  }
1450
1455
  saveProject(e) {
1451
- const t = new T(e);
1456
+ const t = new H(e);
1452
1457
  return this.projects[t.id] = t.toDsl(), Promise.resolve(!0);
1453
1458
  }
1454
1459
  saveMaterials(e, t) {
@@ -1496,7 +1501,7 @@ class Lt extends ee {
1496
1501
  }
1497
1502
  let O = null;
1498
1503
  function rs() {
1499
- return O || (O = new Lt(), O);
1504
+ return O || (O = new Ut(), O);
1500
1505
  }
1501
1506
  class ns extends ee {
1502
1507
  getFileCaches = {};
@@ -1555,7 +1560,7 @@ class ns extends ee {
1555
1560
  );
1556
1561
  }
1557
1562
  }
1558
- function Ee(r, e, t = []) {
1563
+ function Re(r, e, t = []) {
1559
1564
  return t.map((s) => {
1560
1565
  const { id: n, title: i, icon: a, children: o, hidden: c } = s;
1561
1566
  return {
@@ -1564,16 +1569,16 @@ function Ee(r, e, t = []) {
1564
1569
  icon: a,
1565
1570
  hidden: c,
1566
1571
  url: `${r}/${e}/${n}`,
1567
- children: o && o.length ? Ee(r, e, o) : void 0
1572
+ children: o && o.length ? Re(r, e, o) : void 0
1568
1573
  };
1569
1574
  });
1570
1575
  }
1571
- function Pe(r, e) {
1576
+ function be(r, e) {
1572
1577
  if (!e) return r;
1573
1578
  let t = [];
1574
1579
  for (const s of r)
1575
1580
  if (s.children && s.children.length) {
1576
- const n = Pe(s.children, e);
1581
+ const n = be(s.children, e);
1577
1582
  n.length && (s.children = n, t.push(s));
1578
1583
  } else
1579
1584
  e.can(s.id.toString()) && t.push(s);
@@ -1584,19 +1589,19 @@ function is(r) {
1584
1589
  menuPathPrefix: e = "",
1585
1590
  pageRouteName: t = "page",
1586
1591
  disableMenusFilter: s = !1
1587
- } = r || {}, n = je(), i = he(), a = rt(), o = K(!1), c = K(!1), l = n.project;
1588
- Be(() => {
1592
+ } = r || {}, n = $e(), i = he(), a = rt(), o = K(!1), c = K(!1), l = n.project;
1593
+ Ne(() => {
1589
1594
  const { name: m, params: h, meta: d } = i;
1590
1595
  if (m === C) {
1591
1596
  const u = n.getPage(h.id);
1592
1597
  o.value = !u?.mask, c.value = !!u?.pure;
1593
- } else if (m === H) {
1598
+ } else if (m === T) {
1594
1599
  const u = n.getHomepage();
1595
1600
  o.value = !u?.mask, c.value = !!u?.pure;
1596
1601
  } else
1597
1602
  o.value = !d.mask, c.value = !!d.pure;
1598
1603
  });
1599
- const f = Ee(
1604
+ const f = Re(
1600
1605
  e,
1601
1606
  t,
1602
1607
  l?.pages
@@ -1606,77 +1611,77 @@ function is(r) {
1606
1611
  logo: p?.logo,
1607
1612
  themeSwitchable: p?.themeSwitchable,
1608
1613
  title: p?.title || l?.description || l?.name || "VTJ App",
1609
- menus: s ? f : Pe(f, a),
1614
+ menus: s ? f : be(f, a),
1610
1615
  pure: c
1611
1616
  };
1612
1617
  }
1613
1618
  export {
1614
1619
  ve as ACCESS_KEY,
1615
- st as Access,
1616
- Je as BUILD_IN_TAGS,
1617
- Ne as BUILT_IN_DIRECTIVES,
1620
+ ye as Access,
1621
+ qe as BUILD_IN_TAGS,
1622
+ Ue as BUILT_IN_DIRECTIVES,
1618
1623
  ee as BaseService,
1619
1624
  oe as CONTEXT_HOST,
1620
- pt as Context,
1625
+ ut as Context,
1621
1626
  y as ContextMode,
1622
- Ue as DATA_TYPES,
1623
- H as HOMEPAGE_ROUTE_NAME,
1624
- Le as HTML_TAGS,
1625
- Xt as JSCodeToString,
1626
- Gt as LIFE_CYCLES_LIST,
1627
+ Le as DATA_TYPES,
1628
+ T as HOMEPAGE_ROUTE_NAME,
1629
+ Je as HTML_TAGS,
1630
+ Qt as JSCodeToString,
1631
+ Kt as LIFE_CYCLES_LIST,
1627
1632
  ns as LocalService,
1628
- Lt as MemoryService,
1629
- xt as NodeEnv,
1633
+ Ut as MemoryService,
1634
+ Dt as NodeEnv,
1630
1635
  C as PAGE_ROUTE_NAME,
1631
- Bt as Provider,
1636
+ xt as Provider,
1632
1637
  ss as StorageService,
1633
1638
  A as VTJ_RENDERER_VERSION,
1634
1639
  ge as adoptedStyleSheets,
1635
1640
  Zt as clearLoaderCache,
1636
- nt as createAccess,
1637
- Yt as createAdapter,
1638
- Vt as createAssetScripts,
1639
- Wt as createAssetsCss,
1640
- yt as createDataSources,
1641
+ Yt as createAccess,
1642
+ Xt as createAdapter,
1643
+ Gt as createAssetScripts,
1644
+ Vt as createAssetsCss,
1645
+ vt as createDataSources,
1641
1646
  W as createLoader,
1642
1647
  rs as createMemoryService,
1643
- ot as createMetaApi,
1644
- lt as createMock,
1648
+ it as createMetaApi,
1649
+ ct as createMock,
1645
1650
  es as createProvider,
1646
1651
  V as createRenderer,
1647
- it as createSchemaApi,
1648
- at as createSchemaApis,
1652
+ nt as createSchemaApi,
1653
+ ot as createSchemaApis,
1649
1654
  ts as createServiceRequest,
1650
- St as defaultLoader,
1655
+ wt as defaultLoader,
1651
1656
  M as fillBasePath,
1652
1657
  F as getMock,
1653
- we as getModifiers,
1654
- _e as getPlugin,
1655
- Ge as getRawComponent,
1656
- Ye as isBuiltInTag,
1658
+ Se as getModifiers,
1659
+ we as getPlugin,
1660
+ Ve as getRawComponent,
1661
+ Ze as isBuiltInTag,
1657
1662
  Y as isCSSUrl,
1658
- et as isJSCode,
1663
+ tt as isJSCode,
1659
1664
  _ as isJSExpression,
1660
- I as isJSFunction,
1661
- qe as isJSON,
1665
+ k as isJSFunction,
1666
+ ze as isJSON,
1662
1667
  Z as isJSUrl,
1663
- Ze as isNativeTag,
1664
- Xe as isVuePlugin,
1665
- Ve as loadCss,
1666
- We as loadCssUrl,
1667
- Qe as loadScriptUrl,
1668
- ut as mockApi,
1669
- ct as mockApis,
1670
- ye as mockCleanup,
1668
+ et as isNativeTag,
1669
+ Ye as isVuePlugin,
1670
+ We as loadCss,
1671
+ Qe as loadCssUrl,
1672
+ Xe as loadScriptUrl,
1673
+ lt as mockApi,
1674
+ at as mockApis,
1675
+ _e as mockCleanup,
1671
1676
  D as nodeRender,
1672
- Ke as parseDeps,
1673
- k as parseExpression,
1677
+ Ge as parseDeps,
1678
+ I as parseExpression,
1674
1679
  G as parseFunction,
1675
- Se as providerKey,
1676
- ze as removeProdFlag,
1677
- Qt as setupPageSetting,
1680
+ je as providerKey,
1681
+ Ke as removeProdFlag,
1682
+ Wt as setupPageSetting,
1678
1683
  me as toString,
1679
1684
  rt as useAccess,
1680
1685
  is as useMask,
1681
- je as useProvider
1686
+ $e as useProvider
1682
1687
  };