@vtj/renderer 0.12.35 → 0.12.37

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,18 +1,18 @@
1
- import { Base as Oe, BUILT_IN_COMPONENTS as xe, ProjectModel as N, HistoryModel as pe } from "@vtj/core";
2
- import { isUrl as Ne, url as C, dedupArray as Ue, isString as R, isFunction as V, logger as A, storage as J, cookie as K, toArray as re, unRSA as ie, delay as de, createRequest as fe, jsonp as he, merge as Be, pathToRegexp as Le, pathToRegexpMatch as qe, formDataToJson as Je, cloneDeep as oe, camelCase as j, upperFirst as Ke, pick as ze, request as W, loadScript as ae, Storage as Ve, mapToObject as te } from "@vtj/utils";
3
- import * as U from "vue";
4
- import { inject as me, defineComponent as ge, h as G, ref as Y, defineAsyncComponent as ce, watchEffect as We } from "vue";
5
- import { useRoute as ve } from "vue-router";
1
+ import { Base as Be, BUILT_IN_COMPONENTS as Ue, ProjectModel as B, HistoryModel as ge } from "@vtj/core";
2
+ import { isUrl as Le, url as C, dedupArray as qe, isString as P, isFunction as U, logger as k, storage as W, cookie as G, toArray as le, unRSA as ue, delay as ne, createRequest as ve, jsonp as ye, merge as Je, pathToRegexp as Ke, pathToRegexpMatch as ze, formDataToJson as Ve, cloneDeep as pe, camelCase as b, upperFirst as We, pick as Ge, request as Q, loadScript as fe, Storage as Ye, mapToObject as ie } from "@vtj/utils";
3
+ import * as L from "vue";
4
+ import { inject as _e, defineComponent as we, h as X, ref as Z, defineAsyncComponent as de, watchEffect as Qe } from "vue";
5
+ import { useRoute as Se } 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.12.35
10
+ * @version 0.12.37
11
11
  * @license <a href="https://vtj.pro/license.html">MIT License</a>
12
12
  */
13
- const F = "0.12.35";
14
- var _ = /* @__PURE__ */ ((n) => (n.Runtime = "Runtime", n.Design = "Design", n.Raw = "Raw", n.VNode = "VNode", n))(_ || {});
15
- const le = [
13
+ const I = "0.12.37";
14
+ var w = /* @__PURE__ */ ((r) => (r.Runtime = "Runtime", r.Design = "Design", r.Raw = "Raw", r.VNode = "VNode", r))(w || {});
15
+ const he = [
16
16
  "$el",
17
17
  "$emit",
18
18
  "$nextTick",
@@ -24,7 +24,7 @@ const le = [
24
24
  "$props",
25
25
  "$options",
26
26
  "$forceUpdate"
27
- ], es = [
27
+ ], rs = [
28
28
  "beforeCreate",
29
29
  "created",
30
30
  "beforeMount",
@@ -38,7 +38,7 @@ const le = [
38
38
  "renderTriggered",
39
39
  "activated",
40
40
  "deactivated"
41
- ], Ge = [
41
+ ], Xe = [
42
42
  "vIf",
43
43
  "vElseIf",
44
44
  "vElse",
@@ -47,7 +47,7 @@ const le = [
47
47
  "vFor",
48
48
  "vBind",
49
49
  "vHtml"
50
- ], Ye = {
50
+ ], Ze = {
51
51
  String,
52
52
  Number,
53
53
  Boolean,
@@ -55,199 +55,281 @@ const le = [
55
55
  Object,
56
56
  Function,
57
57
  Date
58
- }, M = "VtjPage", x = "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(
58
+ }, M = "VtjPage", N = "VtjHomepage", et = "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(
59
59
  ","
60
- ), Xe = "component,slot".split(",");
61
- function D(n, e) {
62
- return n.map((t) => Ne(t) || t.startsWith("/") ? t : `${e}${t}`);
60
+ ), tt = "component,slot".split(",");
61
+ function O(r, e) {
62
+ return r.map((t) => Le(t) || t.startsWith("/") ? t : `${e}${t}`);
63
63
  }
64
- function B(n) {
65
- return /\.css$/.test(n);
64
+ function q(r) {
65
+ return /\.css$/.test(r);
66
66
  }
67
- function L(n) {
68
- return /\.js$/.test(n);
67
+ function J(r) {
68
+ return /\.js$/.test(r);
69
69
  }
70
- function Ze(n) {
71
- return /\.json$/.test(n);
70
+ function st(r) {
71
+ return /\.json$/.test(r);
72
72
  }
73
- function ts(n) {
74
- return n.map(
75
- (e) => `<script src="${C.append(e, { v: F })}"><\/script>`
73
+ function ns(r) {
74
+ return r.map(
75
+ (e) => `<script src="${C.append(e, { v: I })}"><\/script>`
76
76
  ).join("");
77
77
  }
78
- function ss(n = []) {
79
- return n.map(
80
- (e) => `<link rel="stylesheet" href="${C.append(e, { v: F })}" />`
78
+ function is(r = []) {
79
+ return r.map(
80
+ (e) => `<link rel="stylesheet" href="${C.append(e, { v: I })}" />`
81
81
  ).join("");
82
82
  }
83
- function et(n, e = !1) {
84
- return e && n.endsWith(".prod.js") ? n.replace(".prod.js", ".js") : n;
83
+ function rt(r, e = !1) {
84
+ return e && r.endsWith(".prod.js") ? r.replace(".prod.js", ".js") : r;
85
85
  }
86
- function tt(n, e, t = !1) {
87
- const s = n.filter((h) => !!h.enabled), r = [], i = [], a = [], o = [], c = {}, l = {}, u = [], p = {};
86
+ function nt(r, e, t = !1) {
87
+ const s = r.filter((h) => !!h.enabled), n = [], i = [], a = [], o = [], p = {}, c = {}, u = [], l = {};
88
88
  return s.forEach(
89
- ({ urls: h, assetsUrl: f, library: d, assetsLibrary: m, localeLibrary: v }) => {
89
+ ({ urls: h, assetsUrl: f, library: d, assetsLibrary: m, localeLibrary: y }) => {
90
90
  h?.forEach((g) => {
91
- L(g) && r.push(et(g, t)), B(g) && i.push(g);
92
- }), d && (o.push(d), c[d] = D(h || [], e), v && (l[d] = v)), f && a.push(f), m && u.push(m), d && m && (p[m] = d);
91
+ J(g) && n.push(rt(g, t)), q(g) && i.push(g);
92
+ }), d && (o.push(d), p[d] = O(h || [], e), y && (c[d] = y)), f && a.push(f), m && u.push(m), d && m && (l[m] = d);
93
93
  }
94
94
  ), {
95
- scripts: D(r, e),
96
- css: D(i, e),
97
- materials: D(a, e),
95
+ scripts: O(n, e),
96
+ css: O(i, e),
97
+ materials: O(a, e),
98
98
  libraryExports: o,
99
- materialExports: Ue(u),
100
- materialMapLibrary: p,
101
- libraryMap: c,
102
- libraryLocaleMap: l
99
+ materialExports: qe(u),
100
+ materialMapLibrary: l,
101
+ libraryMap: p,
102
+ libraryLocaleMap: c
103
103
  };
104
104
  }
105
- function st(n, e) {
106
- const { name: t, parent: s, alias: r } = n;
107
- return s ? e[s]?.[r || t] : e[r || t];
105
+ function it(r, e) {
106
+ const { name: t, parent: s, alias: n } = r;
107
+ return s ? e[s]?.[n || t] : e[n || t];
108
108
  }
109
- function nt(n = []) {
110
- const e = n.filter((s) => B(s)), t = n.filter((s) => L(s));
109
+ function ot(r = []) {
110
+ const e = r.filter((s) => q(s)), t = r.filter((s) => J(s));
111
111
  return {
112
112
  css: e,
113
113
  js: t
114
114
  };
115
115
  }
116
- function rt(n, e) {
117
- const t = /(@(keyframes|media)\s*([^{]*)){([\s\S]*?}\s*})/g, s = [];
118
- let o = n.replace(
119
- t,
120
- (c, l, u, p, h) => (s.push({ type: u, name: p.trim(), conditions: p, content: h }), "/* AT_RULE_PLACEHOLDER */")
121
- ).replace(/::v-deep\(/g, ":deep(").replace(/(\s*)>>>(\s*)/g, "$1:deep($2)").replace(
122
- /([\w-.:\s[\]>+~]+?):deep\(([^)]+)\)/g,
123
- (c, l, u) => `${l.replace(/(\s*)$/, `[${e}]$1`)} ${u}`
124
- ).replace(/([^{}]+)(?=\s*{)/g, (c) => c.split(",").map((l) => {
125
- const u = l.trim();
126
- return u.includes(`[${e}]`) ? u : u.replace(
127
- /(.*?)((?::[^:\s(]+(?:\([^)]*\))?)*)(\s*)$/,
128
- (p, h, f, d) => `${h}[${e}]${f}${d}`
129
- );
130
- }).join(", "));
131
- return s.forEach(({ type: c, conditions: l, content: u }) => {
132
- let p = u;
133
- c === "media" && (p = p.replace(
134
- /([^{}]+)(?=\s*{)/g,
135
- (h) => h.split(",").map((f) => {
136
- const d = f.trim();
137
- return d.includes(`[${e}]`) ? d : d.replace(
138
- /(.*?)((?::[^:\s(]+(?:\([^)]*\))?)*)(\s*)$/,
139
- (m, v, g, E) => `${v}[${e}]${g}${E}`
140
- );
141
- }).join(", ")
142
- )), o = o.replace(
143
- "/* AT_RULE_PLACEHOLDER */",
144
- `@${c} ${l}{${p}}`
145
- );
146
- }), o.replace(/}}/g, "}");
116
+ function at(r, e) {
117
+ const t = (c) => {
118
+ const u = [];
119
+ let l = 0;
120
+ for (; l < c.length; ) {
121
+ if (/\s/.test(c[l])) {
122
+ l++;
123
+ continue;
124
+ }
125
+ if (c.substring(l, l + 2) === "/*") {
126
+ const g = c.indexOf("*/", l + 2);
127
+ if (g !== -1) {
128
+ l = g + 2;
129
+ continue;
130
+ }
131
+ }
132
+ if (c[l] === "@") {
133
+ const g = l;
134
+ for (; l < c.length && c[l] !== "{" && c[l] !== ";"; )
135
+ l++;
136
+ const $ = c.substring(g, l).trim(), v = $.includes("@keyframes");
137
+ if (c[l] === ";")
138
+ u.push({
139
+ type: "simple-at-rule",
140
+ content: c.substring(g, l + 1)
141
+ }), l++;
142
+ else if (c[l] === "{") {
143
+ const K = l + 1;
144
+ let A = 1;
145
+ for (l++; l < c.length && A > 0; )
146
+ c[l] === "{" ? A++ : c[l] === "}" && A--, l++;
147
+ const z = c.substring(g, l), E = c.substring(K, l - 1);
148
+ u.push({
149
+ type: v ? "keyframes" : "at-rule",
150
+ rule: $,
151
+ content: z,
152
+ inner: E
153
+ });
154
+ }
155
+ continue;
156
+ }
157
+ const h = l;
158
+ for (; l < c.length && c[l] !== "{"; )
159
+ l++;
160
+ if (l >= c.length) break;
161
+ const f = c.substring(h, l).trim();
162
+ if (!f) {
163
+ l++;
164
+ continue;
165
+ }
166
+ const d = l + 1;
167
+ let m = 1;
168
+ for (l++; l < c.length && m > 0; )
169
+ c[l] === "{" ? m++ : c[l] === "}" && m--, l++;
170
+ const y = c.substring(d, l - 1);
171
+ u.push({
172
+ type: "rule",
173
+ selector: f,
174
+ content: y.trim()
175
+ });
176
+ }
177
+ return u;
178
+ }, s = (c) => {
179
+ const u = c.trim();
180
+ return /^(from|to|\d+(\.\d+)?%)$/.test(u);
181
+ }, n = (c) => c.replace(/::v-deep\(/g, ":deep(").replace(/::v-deep\s+/g, ":deep(").replace(/\/deep\//g, " ").replace(/>>>/g, " ").replace(/(.*?):deep\(([^)]+)\)/g, (u, l, h) => {
182
+ const f = l.trim(), d = h.trim();
183
+ return f ? `${f}[${e}] ${d}` : d;
184
+ }), i = (c) => {
185
+ const u = c.trim();
186
+ if (!u || u.includes(`[${e}]`) || /^(:root|:host|html|body)(\s|$|:|\.|\#|\[)/.test(u) || s(u))
187
+ return u;
188
+ const l = u.match(/^(.+?)((?:::?[\w-]+(?:\([^)]*\))?)*)\s*$/);
189
+ if (l) {
190
+ const [, h, f = ""] = l, d = h.trim();
191
+ return d ? `${d}[${e}]${f}` : u;
192
+ }
193
+ return `${u}[${e}]`;
194
+ }, a = (c) => n(c).split(",").map((l) => i(l)).filter((l) => l.trim()).join(", "), o = (c) => c.map((u) => {
195
+ switch (u.type) {
196
+ case "simple-at-rule":
197
+ return u.content;
198
+ case "keyframes":
199
+ return u.content;
200
+ case "at-rule":
201
+ try {
202
+ const h = t(u.inner), f = o(h);
203
+ return `${u.rule} { ${f} }`;
204
+ } catch {
205
+ return u.content;
206
+ }
207
+ case "rule":
208
+ if (!u.selector || !u.content)
209
+ return "";
210
+ const l = a(u.selector);
211
+ return l.trim() ? `${l} { ${u.content} }` : "";
212
+ default:
213
+ return "";
214
+ }
215
+ }).filter((u) => u.trim()).join(" "), p = (c) => c.replace(/\s*{\s*/g, " { ").replace(/\s*}\s*/g, " } ").replace(/\s*;\s*/g, "; ").replace(/\s*,\s*/g, ", ").replace(/\s+/g, " ").replace(/^\s+|\s+$/g, "").replace(/\s*}\s*}/g, " } }").trim();
216
+ try {
217
+ const c = r.replace(/\/\*(?!\s*!)[\s\S]*?\*\//g, "").replace(/^\s+|\s+$/gm, "").replace(/\n\s*\n/g, `
218
+ `), u = t(c), l = o(u);
219
+ return p(l);
220
+ } catch (c) {
221
+ return console.error("CSS scoping failed:", c), console.error("Input CSS:", r), r.replace(/\/\*[\s\S]*?\*\//g, "").replace(
222
+ /(@keyframes\s+[^{]+\s*{[^{}]*(?:{[^}]*}[^{}]*)*})/g,
223
+ (u) => u
224
+ ).replace(/([^{}@]+)(?=\s*{)/g, (u) => {
225
+ const l = u.trim();
226
+ return !l || l.startsWith("@") || l.includes(`[${e}]`) || s(l) ? u : `${l}[${e}]`;
227
+ });
228
+ }
147
229
  }
148
- function ye(n) {
149
- return R(n) ? n : JSON.stringify(n);
230
+ function $e(r) {
231
+ return P(r) ? r : JSON.stringify(r);
150
232
  }
151
- function _e(n, e, t, s = !1) {
152
- const r = n.CSSStyleSheet, i = s ? `data-v-${e}` : e, a = s ? rt(t, i) : t;
153
- if (r.prototype.replaceSync) {
154
- const o = new r();
233
+ function je(r, e, t, s = !1) {
234
+ const n = r.CSSStyleSheet, i = s ? `data-v-${e}` : e, a = s ? at(t, i) : t;
235
+ if (n.prototype.replaceSync) {
236
+ const o = new n();
155
237
  o.id = e, o.replaceSync(a);
156
- const c = n.document, l = c.adoptedStyleSheets, u = Array.from(l).filter(
157
- (p) => p.id !== e
238
+ const p = r.document, c = p.adoptedStyleSheets, u = Array.from(c).filter(
239
+ (l) => l.id !== e
158
240
  );
159
- c.adoptedStyleSheets = [...u, o];
241
+ p.adoptedStyleSheets = [...u, o];
160
242
  } else {
161
- const o = n.document;
162
- let c = o.getElementById(e);
163
- c ? c.innerHTML = a : (c = o.createElement("style"), c.id = e, c.innerHTML = a, o.head.appendChild(c));
243
+ const o = r.document;
244
+ let p = o.getElementById(e);
245
+ p ? p.innerHTML = a : (p = o.createElement("style"), p.id = e, p.innerHTML = a, o.head.appendChild(p));
164
246
  }
165
247
  }
166
- async function it(n, e) {
248
+ async function ct(r, e) {
167
249
  const t = await window.fetch(e).then((s) => s.text()).catch(() => "");
168
- t && _e(window, n, t);
250
+ t && je(window, r, t);
169
251
  }
170
- function we(n, e = window) {
252
+ function Ee(r, e = window) {
171
253
  const t = e.document, s = e.document.head;
172
- for (const r of n)
173
- if (!t.getElementById(r)) {
254
+ for (const n of r)
255
+ if (!t.getElementById(n)) {
174
256
  const a = t.createElement("link");
175
- a.rel = "stylesheet", a.id = r, a.href = r, s.appendChild(a);
257
+ a.rel = "stylesheet", a.id = n, a.href = n, s.appendChild(a);
176
258
  }
177
259
  }
178
- async function Se(n, e, t = window) {
179
- const s = t.document, r = t.document.head;
260
+ async function be(r, e, t = window) {
261
+ const s = t.document, n = t.document.head;
180
262
  let i = t[e];
181
263
  return i ? i.default || i : new Promise((a, o) => {
182
- for (const c of n) {
183
- const l = s.createElement("script");
184
- l.src = c, l.onload = () => {
264
+ for (const p of r) {
265
+ const c = s.createElement("script");
266
+ c.src = p, c.onload = () => {
185
267
  i = t[e], i ? a(i.default || i) : o(null);
186
- }, l.onerror = (u) => {
268
+ }, c.onerror = (u) => {
187
269
  o(u);
188
- }, r.appendChild(l);
270
+ }, n.appendChild(c);
189
271
  }
190
272
  });
191
273
  }
192
- function ot(n) {
193
- return V(n) || V(n?.install);
274
+ function lt(r) {
275
+ return U(r) || U(r?.install);
194
276
  }
195
- function at(n) {
196
- return Xe.includes(n);
277
+ function ut(r) {
278
+ return tt.includes(r);
197
279
  }
198
- function ct(n) {
199
- return Qe.includes(n);
280
+ function pt(r) {
281
+ return et.includes(r);
200
282
  }
201
- function I(n = window) {
283
+ function D(r = window) {
202
284
  const e = window?.Mock;
203
285
  if (e) return e;
204
- const t = n?.Mock;
286
+ const t = r?.Mock;
205
287
  if (t && window)
206
288
  return window.Mock = t, t;
207
289
  }
208
- function ns(n, e, t) {
290
+ function os(r, e, t) {
209
291
  Object.assign(e.meta, t.meta);
210
- const s = n?._container;
292
+ const s = r?._container;
211
293
  t?.type === "page" && s.classList.add("is-page"), t?.pure && s.classList.add("is-pure");
212
294
  }
213
- function H(n, e, t = !1, s = !1) {
295
+ function T(r, e, t = !1, s = !1) {
214
296
  try {
215
- const r = ['"use strict";', "var __self = arguments[0];"];
216
- r.push("return ");
217
- let i = (n.value || "").trim();
218
- i = i.replace(/this(\W|$)/g, (o, c) => `__self${c}`), i = r.join(`
297
+ const n = ['"use strict";', "var __self = arguments[0];"];
298
+ n.push("return ");
299
+ let i = (r.value || "").trim();
300
+ i = i.replace(/this(\W|$)/g, (o, p) => `__self${p}`), i = n.join(`
219
301
  `) + i;
220
302
  const a = `with(${t ? "{}" : "$scope || {}"}) { ${i} }`;
221
303
  return new Function("$scope", a)(e);
222
- } catch (r) {
223
- if (A.error("parseExpression.error", r, n, e?.__self ?? e), s)
224
- throw r;
304
+ } catch (n) {
305
+ if (k.error("parseExpression.error", n, r, e?.__self ?? e), s)
306
+ throw n;
225
307
  }
226
308
  }
227
- function Q(n, e, t = !1, s = !1) {
228
- const r = H(n, e, t, s);
229
- if (typeof r != "function" && (A.error(
309
+ function ee(r, e, t = !1, s = !1) {
310
+ const n = T(r, e, t, s);
311
+ if (typeof n != "function" && (k.error(
230
312
  "parseFunction.error",
231
313
  "not a function",
232
- n,
314
+ r,
233
315
  e?.__self ?? e
234
316
  ), s))
235
- throw new Error(`"${n.value}" not a function`);
236
- return r;
317
+ throw new Error(`"${r.value}" not a function`);
318
+ return n;
237
319
  }
238
- function w(n) {
239
- return n && n.type === "JSExpression";
320
+ function S(r) {
321
+ return r && r.type === "JSExpression";
240
322
  }
241
- function T(n) {
242
- return typeof n == "object" && n && n.type === "JSFunction";
323
+ function H(r) {
324
+ return typeof r == "object" && r && r.type === "JSFunction";
243
325
  }
244
- function lt(n) {
245
- return w(n) || T(n);
326
+ function ft(r) {
327
+ return S(r) || H(r);
246
328
  }
247
- function rs(n) {
248
- return lt(n) ? n.value : JSON.stringify(n);
329
+ function as(r) {
330
+ return ft(r) ? r.value : JSON.stringify(r);
249
331
  }
250
- const ut = {
332
+ const dt = {
251
333
  session: !1,
252
334
  authKey: "Authorization",
253
335
  storageKey: "ACCESS_STORAGE",
@@ -260,14 +342,14 @@ const ut = {
260
342
  noPermissionMessage: "无权限访问该页面",
261
343
  appName: "",
262
344
  statusKey: "code"
263
- }, $e = Symbol("access");
264
- class Ee {
345
+ }, Pe = Symbol("access");
346
+ class Re {
265
347
  options;
266
348
  data = null;
267
- mode = _.Raw;
349
+ mode = w.Raw;
268
350
  interceptResponse = !0;
269
351
  constructor(e) {
270
- this.options = Object.assign({}, ut, e), this.loadData();
352
+ this.options = Object.assign({}, dt, e), this.loadData();
271
353
  }
272
354
  enableIntercept() {
273
355
  this.interceptResponse = !0;
@@ -276,22 +358,22 @@ class Ee {
276
358
  this.interceptResponse = !1;
277
359
  }
278
360
  connect(e) {
279
- const { mode: t, router: s, request: r } = e;
280
- this.mode = t, s && this.mode === _.Raw && this.setGuard(s), r && this.setRequest(r);
361
+ const { mode: t, router: s, request: n } = e;
362
+ this.mode = t, s && this.mode === w.Raw && this.setGuard(s), n && this.setRequest(n);
281
363
  }
282
364
  login(e) {
283
- const { storageKey: t, storagePrefix: s, session: r, authKey: i } = this.options;
284
- this.setData(e), this.data && (J.save(t, e, {
365
+ const { storageKey: t, storagePrefix: s, session: n, authKey: i } = this.options;
366
+ this.setData(e), this.data && (W.save(t, e, {
285
367
  type: "local",
286
368
  prefix: s
287
- }), r && K.set(i, this.data.token));
369
+ }), n && G.set(i, this.data.token));
288
370
  }
289
371
  clear() {
290
- const { storageKey: e, storagePrefix: t, session: s, authKey: r } = this.options;
291
- this.data = null, J.remove(e, {
372
+ const { storageKey: e, storagePrefix: t, session: s, authKey: n } = this.options;
373
+ this.data = null, W.remove(e, {
292
374
  type: "local",
293
375
  prefix: t
294
- }), s && K.remove(r);
376
+ }), s && G.remove(n);
295
377
  }
296
378
  logout() {
297
379
  this.clear(), this.toLogin();
@@ -304,22 +386,22 @@ class Ee {
304
386
  }
305
387
  can(e) {
306
388
  const { appName: t } = this.options, { permissions: s = {} } = this.data || {};
307
- return typeof e == "function" ? e(s) : re(e).every((i) => s[i] || s[t + "." + i]);
389
+ return typeof e == "function" ? e(s) : le(e).every((i) => s[i] || s[t + "." + i]);
308
390
  }
309
391
  some(e) {
310
392
  const { appName: t } = this.options, { permissions: s = {} } = this.data || {};
311
- return re(e).some((i) => s[i] || s[t + "." + i]);
393
+ return le(e).some((i) => s[i] || s[t + "." + i]);
312
394
  }
313
395
  install(e) {
314
- e.config.globalProperties.$access = this, e.provide($e, this);
396
+ e.config.globalProperties.$access = this, e.provide(Pe, this);
315
397
  }
316
398
  isAuthPath(e) {
317
399
  const { auth: t, isAuth: s } = this.options;
318
400
  if (s)
319
401
  return s(e);
320
402
  if (e.path && typeof t == "string") {
321
- const r = t.split("#")[1] || t;
322
- return e.path === r;
403
+ const n = t.split("#")[1] || t;
404
+ return e.path === n;
323
405
  }
324
406
  return !1;
325
407
  }
@@ -332,17 +414,17 @@ class Ee {
332
414
  setData(e) {
333
415
  const { privateKey: t } = this.options;
334
416
  if (Array.isArray(e) && t) {
335
- const s = e.map((r) => ie(r, t));
417
+ const s = e.map((n) => ue(n, t));
336
418
  try {
337
419
  this.data = JSON.parse(s.join(""));
338
- } catch (r) {
339
- console.warn(r);
420
+ } catch (n) {
421
+ console.warn(n);
340
422
  }
341
423
  return;
342
424
  }
343
425
  if (typeof e == "string")
344
426
  try {
345
- const s = t ? ie(e, t) : e;
427
+ const s = t ? ue(e, t) : e;
346
428
  s ? this.data = JSON.parse(s) : console.warn("RSA解密失败或登录信息缺失");
347
429
  } catch (s) {
348
430
  console.warn(s);
@@ -351,7 +433,7 @@ class Ee {
351
433
  this.data = e;
352
434
  }
353
435
  loadData() {
354
- const { storageKey: e, storagePrefix: t } = this.options, s = J.get(e, {
436
+ const { storageKey: e, storagePrefix: t } = this.options, s = W.get(e, {
355
437
  type: "local",
356
438
  prefix: t
357
439
  });
@@ -359,7 +441,7 @@ class Ee {
359
441
  }
360
442
  isLogined() {
361
443
  const { session: e, authKey: t } = this.options;
362
- return e && t ? !!K.get(t) : !!this.getToken();
444
+ return e && t ? !!G.get(t) : !!this.getToken();
363
445
  }
364
446
  hasRoutePermission(e) {
365
447
  if (e.name === M) {
@@ -369,7 +451,7 @@ class Ee {
369
451
  return !0;
370
452
  }
371
453
  setGuard(e) {
372
- e.beforeEach((t, s, r) => this.guard(t, r));
454
+ e.beforeEach((t, s, n) => this.guard(t, n));
373
455
  }
374
456
  async guard(e, t) {
375
457
  if (this.isWhiteList(e) || this.isAuthPath(e))
@@ -378,8 +460,8 @@ class Ee {
378
460
  if (this.hasRoutePermission(e))
379
461
  return t();
380
462
  {
381
- const { noPermissionMessage: s = "无权限访问", unauthorized: r = !1 } = this.options;
382
- return await this.showTip(s), V(r) ? (r(), t(!1)) : R(r) ? t(r) : t(!1);
463
+ const { noPermissionMessage: s = "无权限访问", unauthorized: n = !1 } = this.options;
464
+ return await this.showTip(s), U(n) ? (n(), t(!1)) : P(n) ? t(n) : t(!1);
383
465
  }
384
466
  }
385
467
  t(!1), this.toLogin();
@@ -398,7 +480,7 @@ class Ee {
398
480
  }
399
481
  async showTip(e) {
400
482
  const { alert: t } = this.options;
401
- return t ? (await de(150), await t(e, {
483
+ return t ? (await ne(150), await t(e, {
402
484
  title: "提示",
403
485
  type: "warning"
404
486
  }).catch(() => !1)) : !1;
@@ -414,22 +496,22 @@ class Ee {
414
496
  );
415
497
  }
416
498
  }
417
- function pt() {
418
- return me($e, null);
499
+ function ht() {
500
+ return _e(Pe, null);
419
501
  }
420
- function is(n = {}) {
502
+ function cs(r = {}) {
421
503
  const {
422
504
  notify: e,
423
505
  loading: t,
424
506
  settings: s = {},
425
- Startup: r,
507
+ Startup: n,
426
508
  access: i,
427
509
  useTitle: a,
428
510
  alert: o
429
- } = n;
430
- let c = null;
511
+ } = r;
512
+ let p = null;
431
513
  return {
432
- request: fe({
514
+ request: ve({
433
515
  settings: {
434
516
  type: "form",
435
517
  validSuccess: !0,
@@ -441,97 +523,97 @@ function is(n = {}) {
441
523
  e && e(u || "未知错误");
442
524
  },
443
525
  showLoading: () => {
444
- c && c.close(), t && (c = t());
526
+ p && p.close(), t && (p = t());
445
527
  },
446
528
  hideLoading: () => {
447
- c && (c.close(), c = null);
529
+ p && (p.close(), p = null);
448
530
  },
449
531
  ...s
450
532
  }
451
533
  }),
452
- jsonp: he,
534
+ jsonp: ye,
453
535
  notify: e,
454
536
  loading: t,
455
537
  useTitle: a,
456
- startupComponent: r,
457
- access: i ? new Ee({ alert: o, ...i }) : void 0
538
+ startupComponent: n,
539
+ access: i ? new Re({ alert: o, ...i }) : void 0
458
540
  };
459
541
  }
460
- function os(n = {}) {
461
- return new Ee(n);
542
+ function ls(r = {}) {
543
+ return new Re(r);
462
544
  }
463
- function dt(n, e) {
545
+ function mt(r, e) {
464
546
  const { jsonp: t, request: s } = e;
465
- if (n.method === "jsonp")
466
- return (r = {}) => t(n.url, {
467
- ...n.jsonpOptions,
468
- query: r
547
+ if (r.method === "jsonp")
548
+ return (n = {}) => t(r.url, {
549
+ ...r.jsonpOptions,
550
+ query: n
469
551
  });
470
552
  {
471
- const r = n.headers ? H(n.headers, {}, !0) : void 0, i = {
472
- url: n.url,
473
- method: n.method,
553
+ const n = r.headers ? T(r.headers, {}, !0) : void 0, i = {
554
+ url: r.url,
555
+ method: r.method,
474
556
  settings: {
475
- ...n.settings,
476
- headers: r
557
+ ...r.settings,
558
+ headers: n
477
559
  }
478
560
  };
479
- return (a, o) => (delete i.data, s.send(Be(i, o || {}, { data: a })));
561
+ return (a, o) => (delete i.data, s.send(Je(i, o || {}, { data: a })));
480
562
  }
481
563
  }
482
- function ft(n, e) {
564
+ function gt(r, e) {
483
565
  const { metaQuery: t } = e;
484
566
  if (!t) return;
485
- const { code: s, queryCode: r } = n;
567
+ const { code: s, queryCode: n } = r;
486
568
  return (i, a) => {
487
569
  if (!t) {
488
570
  console.warn("adapter.metaQuery is not defined!");
489
571
  return;
490
572
  }
491
- return t(s, r, i, a);
573
+ return t(s, n, i, a);
492
574
  };
493
575
  }
494
- function ht(n = [], e = [], t) {
576
+ function vt(r = [], e = [], t) {
495
577
  const s = {};
496
- for (const r of n)
497
- s[r.id] = dt(r, t);
498
- for (const r of e)
499
- s[r.id] = ft(r, t);
578
+ for (const n of r)
579
+ s[n.id] = mt(n, t);
580
+ for (const n of e)
581
+ s[n.id] = gt(n, t);
500
582
  return s;
501
583
  }
502
- async function mt(n = [], e = window) {
503
- const t = I(e);
504
- t && (je(e), n.forEach((s) => vt(t, s)));
584
+ async function yt(r = [], e = window) {
585
+ const t = D(e);
586
+ t && (Ce(e), r.forEach((s) => wt(t, s)));
505
587
  }
506
- function gt(n, e = window) {
507
- const t = T(n.mockTemplate) && n.mockTemplate.value ? Q(n.mockTemplate, {}, !0) : void 0, s = I(e);
508
- return async (...r) => {
588
+ function _t(r, e = window) {
589
+ const t = H(r.mockTemplate) && r.mockTemplate.value ? ee(r.mockTemplate, {}, !0) : void 0, s = D(e);
590
+ return async (...n) => {
509
591
  let i = {};
510
592
  if (t)
511
593
  try {
512
- i = await t.apply(t, r);
594
+ i = await t.apply(t, n);
513
595
  } catch (a) {
514
- A.warn("模拟数据模版异常", a);
596
+ k.warn("模拟数据模版异常", a);
515
597
  }
516
598
  return s?.mock(i);
517
599
  };
518
600
  }
519
- function vt(n, e) {
601
+ function wt(r, e) {
520
602
  if (!e.mock) return;
521
603
  const { url: t, mockTemplate: s } = e;
522
604
  if (t && s) {
523
- const r = Le(`${t}(.*)`), i = qe(t, { decode: decodeURIComponent }), a = H(s, {}, !0);
524
- n.mock(r, (o) => {
525
- const c = C.parse(o.url) || {}, l = o.body instanceof FormData ? Je(o.body) : o.body, u = i(o.url)?.params;
526
- return Object.assign(o, { data: l, params: c, query: u }), n.mock(a(o));
605
+ const n = Ke(`${t}(.*)`), i = ze(t, { decode: decodeURIComponent }), a = T(s, {}, !0);
606
+ r.mock(n, (o) => {
607
+ const p = C.parse(o.url) || {}, c = o.body instanceof FormData ? Ve(o.body) : o.body, u = i(o.url)?.params;
608
+ return Object.assign(o, { data: c, params: p, query: u }), r.mock(a(o));
527
609
  });
528
610
  }
529
611
  }
530
- function je(n = window) {
531
- const e = I(n);
612
+ function Ce(r = window) {
613
+ const e = D(r);
532
614
  e && (e._mocked = {});
533
615
  }
534
- class yt {
616
+ class St {
535
617
  __id = null;
536
618
  __mode;
537
619
  __instance = null;
@@ -557,15 +639,15 @@ class yt {
557
639
  $apis = {};
558
640
  __transform = {};
559
641
  constructor(e) {
560
- const { mode: t, dsl: s, attrs: r } = e;
561
- this.__mode = t, s && (this.__id = s.id || null, this.__transform = s.transform || {}), r && Object.assign(this, r);
642
+ const { mode: t, dsl: s, attrs: n } = e;
643
+ this.__mode = t, s && (this.__id = s.id || null, this.__transform = s.transform || {}), n && Object.assign(this, n);
562
644
  }
563
- setup(e, t = U) {
645
+ setup(e, t = L) {
564
646
  const s = t.getCurrentInstance();
565
647
  if (!s) return;
566
648
  this.__refs = {}, this.$refs = {}, this.context = {}, this.__contextRefs = {}, this.__instance = s.proxy;
567
- const r = s.appContext.config.globalProperties;
568
- Object.assign(this, r), Object.assign(this, e || {}), this.__proxy(), t.onMounted(() => {
649
+ const n = s.appContext.config.globalProperties;
650
+ Object.assign(this, n), Object.assign(this, e || {}), this.__proxy(), t.onMounted(() => {
569
651
  this.__proxy();
570
652
  }), t.onUnmounted(() => {
571
653
  this.__cleanup();
@@ -574,12 +656,12 @@ class yt {
574
656
  });
575
657
  }
576
658
  __proxy() {
577
- this.__instance && le.forEach((e) => {
659
+ this.__instance && he.forEach((e) => {
578
660
  this[e] = this.__instance?.[e];
579
661
  });
580
662
  }
581
663
  __cleanup() {
582
- le.forEach((e) => {
664
+ he.forEach((e) => {
583
665
  this[e] = null;
584
666
  }), this.__reset();
585
667
  }
@@ -588,36 +670,36 @@ class yt {
588
670
  }
589
671
  __parseFunction(e) {
590
672
  if (e)
591
- if (this.__mode === _.Runtime) {
592
- const { id: t, type: s } = e, r = t ? this.__transform[t] ?? e.value : e.value;
593
- return Q({ type: s, value: r }, this);
673
+ if (this.__mode === w.Runtime) {
674
+ const { id: t, type: s } = e, n = t ? this.__transform[t] ?? e.value : e.value;
675
+ return ee({ type: s, value: n }, this);
594
676
  } else
595
- return Q(e, this);
677
+ return ee(e, this);
596
678
  }
597
679
  __parseExpression(e) {
598
680
  if (e)
599
- if (this.__mode === _.Runtime) {
600
- const { id: t, type: s } = e, r = t ? this.__transform[t] ?? e.value : e.value;
601
- return H({ type: s, value: r }, this);
681
+ if (this.__mode === w.Runtime) {
682
+ const { id: t, type: s } = e, n = t ? this.__transform[t] ?? e.value : e.value;
683
+ return T({ type: s, value: n }, this);
602
684
  } else
603
- return H(e, this);
685
+ return T(e, this);
604
686
  }
605
687
  __ref(e = null, t) {
606
- if (this.__mode !== _.VNode)
688
+ if (this.__mode !== w.VNode)
607
689
  return e && e !== this.__id && (this.__contextRefs[e] = this), async (s) => {
608
- await de(0);
609
- let r = s?.$vtjEl || s?.$el || s?._?.vnode?.el || s;
610
- if (!r) {
690
+ await ne(0);
691
+ let n = s?.$vtjEl || s?.$el || s?._?.vnode?.el || s;
692
+ if (!n) {
611
693
  typeof t == "string" && (delete this.$refs[t], e && delete this.__refs[e]);
612
694
  return;
613
695
  }
614
- return r.nodeType === 3 && r.nextSibling && (r = r.nextSibling), r.__vtj__ = e, _.Design === this.__mode && (r.__context__ = this, r.draggable = !0), e && (this.__refs[e] = this.__getRefEl(this.__refs, e, s)), typeof t == "function" ? t(s) : t && (this.$refs[t] = this.__getRefEl(this.$refs, t, s)), s;
696
+ return n.nodeType === 3 && n.nextSibling && (n = n.nextSibling), n.__vtj__ = e, w.Design === this.__mode && (n.__context__ = this, n.draggable = !0), e && (this.__refs[e] = this.__getRefEl(this.__refs, e, s)), typeof t == "function" ? t(s) : t && (this.$refs[t] = this.__getRefEl(this.$refs, t, s)), s;
615
697
  };
616
698
  }
617
699
  __getRefEl(e, t, s) {
618
- const r = e[t];
619
- if (r && s !== r) {
620
- const i = new Set([].concat(r, s));
700
+ const n = e[t];
701
+ if (n && s !== n) {
702
+ const i = new Set([].concat(n, s));
621
703
  return Array.from(i);
622
704
  } else
623
705
  return s;
@@ -630,133 +712,133 @@ class yt {
630
712
  return s.context.__proto__ = this.context, s.__proto__ = this, s;
631
713
  }
632
714
  }
633
- function X(n) {
715
+ function te(r) {
634
716
  const {
635
- Vue: e = U,
636
- mode: t = _.Runtime,
717
+ Vue: e = L,
718
+ mode: t = w.Runtime,
637
719
  components: s = {},
638
- libs: r = {},
720
+ libs: n = {},
639
721
  apis: i = {},
640
722
  loader: a
641
- } = n, o = e.computed(() => n.dsl), c = {
723
+ } = r, o = e.computed(() => r.dsl), p = {
642
724
  $components: s,
643
- $libs: r,
725
+ $libs: n,
644
726
  $apis: i
645
- }, l = new yt({
727
+ }, c = new St({
646
728
  mode: t,
647
729
  dsl: o.value,
648
- attrs: c
730
+ attrs: p
649
731
  }), u = e.defineComponent({
650
732
  name: o.value.name,
651
733
  __scopeId: o.value.id ? `data-v-${o.value.id}` : void 0,
652
734
  props: {
653
- ...wt(o.value.props ?? [], l)
735
+ ...jt(o.value.props ?? [], c)
654
736
  },
655
- setup(p) {
656
- l.$props = p, l.props = p, o.value.id && _e(
657
- n.window || window,
737
+ setup(l) {
738
+ c.$props = l, c.props = l, o.value.id && je(
739
+ r.window || window,
658
740
  o.value.id,
659
741
  o.value.css || "",
660
742
  !0
661
- ), l.state = St(e, o.value.state ?? {}, l);
662
- const h = $t(e, o.value.computed ?? {}, l), f = Et(o.value.methods ?? {}, l), d = jt(e, o.value.inject, l);
663
- for (const [g, E] of Object.entries(d || {}))
664
- d[g] = e.inject(g, E);
665
- const m = Rt(
743
+ ), c.state = Et(e, o.value.state ?? {}, c);
744
+ const h = bt(e, o.value.computed ?? {}, c), f = Pt(o.value.methods ?? {}, c), d = Rt(e, o.value.inject, c);
745
+ for (const [g, $] of Object.entries(d || {}))
746
+ d[g] = e.inject(g, $);
747
+ const m = Ct(
666
748
  o.value.dataSources || {},
667
- l
668
- ), v = {
749
+ c
750
+ ), y = {
669
751
  ...d,
670
752
  ...h,
671
753
  ...f,
672
754
  ...m
673
755
  };
674
- return l.setup(v, e), Pt(e, o.value.watch ?? [], l), {
675
- vtj: l
756
+ return c.setup(y, e), kt(e, o.value.watch ?? [], c), {
757
+ vtj: c
676
758
  };
677
759
  },
678
- emits: _t(o.value.emits),
760
+ emits: $t(o.value.emits),
679
761
  expose: ["vtj"],
680
762
  render() {
681
763
  if (!o.value.nodes) return null;
682
- const p = o.value.nodes || [];
683
- return p.length === 1 ? k(p[0], l, e, a, p) : p.map(
684
- (h) => k(h, l, e, a, p)
764
+ const l = o.value.nodes || [];
765
+ return l.length === 1 ? F(l[0], c, e, a, l) : l.map(
766
+ (h) => F(h, c, e, a, l)
685
767
  );
686
768
  },
687
- ...bt(o.value.lifeCycles ?? {}, l)
769
+ ...Ft(o.value.lifeCycles ?? {}, c)
688
770
  });
689
771
  return {
690
772
  renderer: e.markRaw(u),
691
- context: l
773
+ context: c
692
774
  };
693
775
  }
694
- function _t(n = []) {
695
- return n.map((e) => R(e) ? e : e.name);
776
+ function $t(r = []) {
777
+ return r.map((e) => P(e) ? e : e.name);
696
778
  }
697
- function wt(n = [], e) {
698
- const t = (s) => s ? (Array.isArray(s) ? s : [s]).map((i) => Ye[i]) : void 0;
699
- return n.map((s) => R(s) ? {
779
+ function jt(r = [], e) {
780
+ const t = (s) => s ? (Array.isArray(s) ? s : [s]).map((i) => Ze[i]) : void 0;
781
+ return r.map((s) => P(s) ? {
700
782
  name: s
701
783
  } : {
702
784
  name: s.name,
703
785
  type: s.type,
704
786
  required: s.required,
705
- default: w(s.default) ? e.__parseExpression(s.default) : s.default
787
+ default: S(s.default) ? e.__parseExpression(s.default) : s.default
706
788
  }).reduce(
707
- (s, r) => (s[r.name] = {
708
- type: t(r.type),
709
- required: r.required,
710
- default: r.default
789
+ (s, n) => (s[n.name] = {
790
+ type: t(n.type),
791
+ required: n.required,
792
+ default: n.default
711
793
  }, s),
712
794
  {}
713
795
  );
714
796
  }
715
- function St(n, e, t) {
716
- return n.reactive(
797
+ function Et(r, e, t) {
798
+ return r.reactive(
717
799
  Object.keys(e || {}).reduce(
718
- (s, r) => {
719
- let i = e[r];
720
- return w(i) ? i = t.__parseExpression(i) : T(i) && (i = t.__parseFunction(i)), s[r] = i, s;
800
+ (s, n) => {
801
+ let i = e[n];
802
+ return S(i) ? i = t.__parseExpression(i) : H(i) && (i = t.__parseFunction(i)), s[n] = i, s;
721
803
  },
722
804
  {}
723
805
  )
724
806
  );
725
807
  }
726
- function $t(n, e, t) {
808
+ function bt(r, e, t) {
727
809
  return Object.entries(e ?? {}).reduce(
728
- (s, [r, i]) => (s[r] = n.computed(t.__parseFunction(i)), s),
810
+ (s, [n, i]) => (s[n] = r.computed(t.__parseFunction(i)), s),
729
811
  {}
730
812
  );
731
813
  }
732
- function Et(n, e) {
733
- return Object.entries(n ?? {}).reduce(
734
- (t, [s, r]) => (t[s] = e.__parseFunction(r), t),
814
+ function Pt(r, e) {
815
+ return Object.entries(r ?? {}).reduce(
816
+ (t, [s, n]) => (t[s] = e.__parseFunction(n), t),
735
817
  {}
736
818
  );
737
819
  }
738
- function jt(n, e = [], t) {
820
+ function Rt(r, e = [], t) {
739
821
  return e.reduce(
740
- (s, r) => {
741
- const { name: i, from: a } = r || {};
742
- r.default;
743
- const o = w(a) ? t.__parseExpression(a) || i : a ?? i, c = w(r.default) ? t.__parseExpression(r.default) : r.default ?? null;
744
- return s[i] = n.inject(o, c), s;
822
+ (s, n) => {
823
+ const { name: i, from: a } = n || {};
824
+ n.default;
825
+ const o = S(a) ? t.__parseExpression(a) || i : a ?? i, p = S(n.default) ? t.__parseExpression(n.default) : n.default ?? null;
826
+ return s[i] = r.inject(o, p), s;
745
827
  },
746
828
  {}
747
829
  );
748
830
  }
749
- function Rt(n, e) {
750
- return Object.keys(n).reduce(
831
+ function Ct(r, e) {
832
+ return Object.keys(r).reduce(
751
833
  (t, s) => {
752
- const r = n[s];
753
- if (r.type === "mock")
754
- t[s] = gt(r);
755
- else if (r.ref) {
756
- const i = e.$apis[r.ref], a = T(r.transform) ? r.transform.value ? e.__parseFunction(r.transform) : void 0 : r.transform;
834
+ const n = r[s];
835
+ if (n.type === "mock")
836
+ t[s] = _t(n);
837
+ else if (n.ref) {
838
+ const i = e.$apis[n.ref], a = H(n.transform) ? n.transform.value ? e.__parseFunction(n.transform) : void 0 : n.transform;
757
839
  t[s] = async (...o) => {
758
- const c = await i.apply(e, o);
759
- return a ? a(c) : c;
840
+ const p = await i.apply(e, o);
841
+ return a ? a(p) : p;
760
842
  };
761
843
  }
762
844
  return t;
@@ -764,9 +846,9 @@ function Rt(n, e) {
764
846
  {}
765
847
  );
766
848
  }
767
- function Pt(n, e = [], t) {
849
+ function kt(r, e = [], t) {
768
850
  e.forEach((s) => {
769
- n.watch(
851
+ r.watch(
770
852
  t.__parseExpression(s.source),
771
853
  t.__parseFunction(s.handler),
772
854
  {
@@ -776,272 +858,281 @@ function Pt(n, e = [], t) {
776
858
  );
777
859
  });
778
860
  }
779
- function bt(n, e) {
780
- return Object.entries(n ?? {}).reduce(
781
- (t, [s, r]) => (t[s] = e.__parseFunction(r), t),
861
+ function Ft(r, e) {
862
+ return Object.entries(r ?? {}).reduce(
863
+ (t, [s, n]) => {
864
+ const i = e.__parseFunction(n);
865
+ return t[s] = async () => {
866
+ await ne(0), U(i) && i();
867
+ }, t;
868
+ },
782
869
  {}
783
870
  );
784
871
  }
785
- let z = [], b = {};
786
- const Ct = (n) => n;
787
- async function Re(n, e = window) {
788
- const { urls: t = [], library: s } = n, r = t.filter((o) => L(o));
789
- if (r.length === 0 || !s) return null;
790
- const i = t.filter((o) => B(o));
791
- return i.length && we(i, e), await Se(r, s, e).catch(
792
- (o) => (console.warn("loadScriptUrl error", r, s, o), null)
872
+ let Y = [], R = {};
873
+ const At = (r) => r;
874
+ async function ke(r, e = window) {
875
+ const { urls: t = [], library: s } = r, n = t.filter((o) => J(o));
876
+ if (n.length === 0 || !s) return null;
877
+ const i = t.filter((o) => q(o));
878
+ return i.length && Ee(i, e), await be(n, s, e).catch(
879
+ (o) => (console.warn("loadScriptUrl error", n, s, o), null)
793
880
  );
794
881
  }
795
- function Z(n) {
796
- const { getDsl: e, getDslByUrl: t, options: s } = n;
797
- return s.window && (z.forEach((r) => {
798
- delete s.window[r];
799
- }), z = []), (r, i, a = U) => {
800
- if (!i || typeof i == "string") return r;
882
+ function se(r) {
883
+ const { getDsl: e, getDslByUrl: t, options: s } = r;
884
+ return s.window && (Y.forEach((n) => {
885
+ delete s.window[n];
886
+ }), Y = []), (n, i, a = L) => {
887
+ if (!i || typeof i == "string") return n;
801
888
  if (i.type === "Schema" && i.id)
802
889
  return a.defineAsyncComponent(async () => {
803
- const o = b[i.id] || await e(i.id);
804
- return o && (o.name = r, b[i.id] = o), o ? X({
890
+ const o = R[i.id] || await e(i.id);
891
+ return o && (o.name = n, R[i.id] = o), o ? te({
805
892
  ...s,
806
893
  Vue: a,
807
- dsl: oe(o),
808
- mode: _.Runtime,
809
- loader: Z(n)
894
+ dsl: pe(o),
895
+ mode: w.Runtime,
896
+ loader: se(r)
810
897
  }).renderer : null;
811
898
  });
812
899
  if (i.type === "UrlSchema" && i.url)
813
900
  return a.defineAsyncComponent(async () => {
814
- const o = b[i.url] || await t(i.url);
815
- return o && (o.name = r, b[i.url] = o), o ? X({
901
+ const o = R[i.url] || await t(i.url);
902
+ return o && (o.name = n, R[i.url] = o), o ? te({
816
903
  ...s,
817
904
  Vue: a,
818
- dsl: oe(o),
819
- mode: _.Runtime,
820
- loader: Z(n)
905
+ dsl: pe(o),
906
+ mode: w.Runtime,
907
+ loader: se(r)
821
908
  }).renderer : null;
822
909
  });
823
910
  if (i.type === "Plugin") {
824
- let o = i.library ? b[i.library] : null;
825
- return o || (i.library && z.push(i.library), o = b[i.library || Symbol()] = a.defineAsyncComponent(
911
+ let o = i.library ? R[i.library] : null;
912
+ return o || (i.library && Y.push(i.library), o = R[i.library || Symbol()] = a.defineAsyncComponent(
826
913
  async () => {
827
- const c = await Re(i, s.window);
828
- return c || (console.warn("getPlugin result is null", i), null);
914
+ const p = await ke(i, s.window);
915
+ return p || (console.warn("getPlugin result is null", i), null);
829
916
  }
830
917
  ), o);
831
918
  }
832
- return r;
919
+ return n;
833
920
  };
834
921
  }
835
- function as() {
836
- b = {};
922
+ function us() {
923
+ R = {};
837
924
  }
838
- function k(n, e, t = U, s = Ct, r = [], i = !1) {
839
- if (!n || !n.name || n.invisible) return null;
840
- const a = t.getCurrentInstance()?.appContext, { id: o = null, directives: c = [] } = n, { vIf: l, vElseIf: u, vElse: p, vFor: h, vShow: f, vModels: d, vBind: m, vHtml: v, others: g } = Pe(c);
841
- if (!i && (u || p))
925
+ function F(r, e, t = L, s = At, n = [], i = !1) {
926
+ if (!r || !r.name || r.invisible) return null;
927
+ const a = t.getCurrentInstance()?.appContext, { id: o = null, directives: p = [] } = r, { vIf: c, vElseIf: u, vElse: l, vFor: h, vShow: f, vModels: d, vBind: m, vHtml: y, others: g } = Fe(p);
928
+ if (!i && (u || l))
842
929
  return null;
843
- if (l && !kt(l, e))
844
- return Ht(n, e, t, s, r);
845
- const E = (S) => {
846
- const Ie = S.$components, He = (() => {
847
- if (n.name === "component")
848
- return Ft(S, n.props?.is);
849
- if (n.name === "slot") return n.name;
850
- const $ = s(n.name, n.from, t);
851
- return R($) ? at($) || ct($) ? $ : Ie[$] ?? a?.app?.component($) ?? $ : $;
852
- })(), P = Mt(o, n.props ?? {}, S), Te = It(t, n.events ?? {}, S);
853
- if (n.name === "slot")
854
- return Tt(t, n, P, S, s);
855
- m && Object.assign(P, S.__parseExpression(m.value)), f && (P.style = Object.assign(
856
- P.style ?? {},
857
- Ot(f, S)
858
- )), v && Object.assign(P, xt(v, S)), d.forEach(($) => {
859
- Object.assign(P, Nt(t, $, S));
930
+ if (c && !Mt(c, e))
931
+ return Ot(r, e, t, s, n);
932
+ const $ = (v, K = 0) => {
933
+ const A = v.$components, z = (() => {
934
+ if (r.name === "component")
935
+ return Dt(v, r.props?.is);
936
+ if (r.name === "slot") return r.name;
937
+ const j = s(r.name, r.from, t);
938
+ return P(j) ? ut(j) || pt(j) ? j : A[j] ?? a?.app?.component(j) ?? j : j;
939
+ })(), E = Tt(o, r.props ?? {}, v), Oe = Ht(t, r.events ?? {}, v);
940
+ if (r.name === "slot")
941
+ return xt(t, r, E, v, s);
942
+ m && Object.assign(E, v.__parseExpression(m.value)), f && (E.style = Object.assign(
943
+ E.style ?? {},
944
+ Bt(f, v)
945
+ )), y && Object.assign(E, Ut(y, v)), d.forEach((j) => {
946
+ Object.assign(E, Lt(t, j, v));
860
947
  });
861
- const De = Ut(
948
+ const xe = qt(
862
949
  t,
863
- n.children ?? [],
864
- S,
950
+ r.children ?? [],
951
+ v,
865
952
  s,
866
- n
953
+ r
954
+ ), ae = v?.__id ? `data-v-${v.__id}` : void 0, Ne = ae ? { [ae]: "" } : {};
955
+ let V = t.createVNode(
956
+ z,
957
+ { key: `${o}_${K}`, ...Ne, ...E, ...Oe },
958
+ xe
867
959
  );
868
- let q = t.createVNode(He, { ...P, ...Te }, De);
869
- const ne = a ? At(a, g, S) : [];
870
- return ne.length && (q = t.withDirectives(q, ne)), q;
960
+ const ce = a ? It(a, g, v) : [];
961
+ return ce.length && (V = t.withDirectives(V, ce)), V;
871
962
  };
872
- return h ? qt(h, E, e) : E(e);
963
+ return h ? zt(h, $, e) : $(e);
873
964
  }
874
- function At(n, e, t) {
875
- const s = n.app;
876
- return e.map((r) => {
877
- const i = typeof r.name == "string" ? s.directive(r.name) : t.__parseExpression(r.name);
965
+ function It(r, e, t) {
966
+ const s = r.app;
967
+ return e.map((n) => {
968
+ const i = typeof n.name == "string" ? s.directive(n.name) : t.__parseExpression(n.name);
878
969
  if (!i) return null;
879
970
  const a = [i];
880
- return r.value && a.push(t.__parseExpression(r.value)), r.arg && a.push(r.arg), r.modifiers && a.push(r.modifiers), a;
881
- }).filter((r) => !!r);
882
- }
883
- function Pe(n = []) {
884
- const e = n.find((u) => j(u.name) === "vIf"), t = n.find(
885
- (u) => j(u.name) === "vElseIf"
886
- ), s = n.find((u) => j(u.name) === "vElse"), r = n.find((u) => j(u.name) === "vFor"), i = n.find((u) => j(u.name) === "vShow"), a = n.find((u) => j(u.name) === "vBind"), o = n.find((u) => j(u.name) === "vHtml"), c = n.filter(
887
- (u) => j(u.name) === "vModel"
888
- ), l = n.filter(
889
- (u) => !Ge.includes(j(u.name))
971
+ return n.value && a.push(t.__parseExpression(n.value)), n.arg && a.push(n.arg), n.modifiers && a.push(n.modifiers), a;
972
+ }).filter((n) => !!n);
973
+ }
974
+ function Fe(r = []) {
975
+ const e = r.find((u) => b(u.name) === "vIf"), t = r.find(
976
+ (u) => b(u.name) === "vElseIf"
977
+ ), s = r.find((u) => b(u.name) === "vElse"), n = r.find((u) => b(u.name) === "vFor"), i = r.find((u) => b(u.name) === "vShow"), a = r.find((u) => b(u.name) === "vBind"), o = r.find((u) => b(u.name) === "vHtml"), p = r.filter(
978
+ (u) => b(u.name) === "vModel"
979
+ ), c = r.filter(
980
+ (u) => !Xe.includes(b(u.name))
890
981
  );
891
982
  return {
892
983
  vIf: e,
893
984
  vElseIf: t,
894
985
  vElse: s,
895
- vFor: r,
986
+ vFor: n,
896
987
  vShow: i,
897
- vModels: c,
988
+ vModels: p,
898
989
  vBind: a,
899
- others: l,
990
+ others: c,
900
991
  vHtml: o
901
992
  };
902
993
  }
903
- function kt(n, e) {
904
- return !!e.__parseExpression(n.value);
994
+ function Mt(r, e) {
995
+ return !!e.__parseExpression(r.value);
905
996
  }
906
- function Ft(n, e) {
907
- return e ? w(e) ? n.__parseExpression(e) : e : "div";
997
+ function Dt(r, e) {
998
+ return e ? S(e) ? r.__parseExpression(e) : e : "div";
908
999
  }
909
- function Mt(n, e, t) {
910
- const s = ee(e, t);
911
- return s.ref = t.__ref(n, s.ref), s;
1000
+ function Tt(r, e, t) {
1001
+ const s = re(e, t);
1002
+ return s.ref = t.__ref(r, s.ref), s;
912
1003
  }
913
- function ee(n, e) {
914
- return w(n) ? e.__parseExpression(n) : T(n) ? e.__parseFunction(n) : Array.isArray(n) ? n.map((t) => ee(t, e)) : typeof n == "object" ? Object.keys(n || {}).reduce(
1004
+ function re(r, e) {
1005
+ return S(r) ? e.__parseExpression(r) : H(r) ? e.__parseFunction(r) : Array.isArray(r) ? r.map((t) => re(t, e)) : typeof r == "object" ? Object.keys(r || {}).reduce(
915
1006
  (t, s) => {
916
- let r = n[s];
917
- return t[s] = ee(r, e), t;
1007
+ let n = r[s];
1008
+ return t[s] = re(n, e), t;
918
1009
  },
919
1010
  {}
920
- ) : n;
1011
+ ) : r;
921
1012
  }
922
- function It(n, e, t) {
923
- const s = ["passive", "capture", "once"], r = {
1013
+ function Ht(r, e, t) {
1014
+ const s = ["passive", "capture", "once"], n = {
924
1015
  capture: "Capture",
925
1016
  once: "Once",
926
1017
  passive: "OnceCapture"
927
1018
  };
928
1019
  return Object.keys(e || {}).reduce(
929
1020
  (i, a) => {
930
- const o = e[a], c = be(o.modifiers), l = c.find((h) => s.includes(h)), u = "on" + Ke(a) + (l && r[l] || ""), p = t.__parseFunction(o.handler);
931
- return p && (i[u] = n.withModifiers(p, c)), i;
1021
+ const o = e[a], p = Ae(o.modifiers), c = p.find((h) => s.includes(h)), u = "on" + We(a) + (c && n[c] || ""), l = t.__parseFunction(o.handler);
1022
+ return l && (i[u] = r.withModifiers(l, p)), i;
932
1023
  },
933
1024
  {}
934
1025
  );
935
1026
  }
936
- function Ht(n, e, t, s, r = []) {
937
- let i = r.findIndex((a) => a.id === n.id);
938
- for (let a = ++i; a < r.length; a++) {
939
- const { directives: o = [] } = r[a], { vElseIf: c, vElse: l } = Pe(o);
940
- if (c) {
941
- if (e.__parseExpression(c.value))
942
- return k(r[a], e, t, s, r, !0);
1027
+ function Ot(r, e, t, s, n = []) {
1028
+ let i = n.findIndex((a) => a.id === r.id);
1029
+ for (let a = ++i; a < n.length; a++) {
1030
+ const { directives: o = [] } = n[a], { vElseIf: p, vElse: c } = Fe(o);
1031
+ if (p) {
1032
+ if (e.__parseExpression(p.value))
1033
+ return F(n[a], e, t, s, n, !0);
943
1034
  continue;
944
1035
  }
945
- if (l)
946
- return k(r[a], e, t, s, r, !0);
1036
+ if (c)
1037
+ return F(n[a], e, t, s, n, !0);
947
1038
  }
948
1039
  return null;
949
1040
  }
950
- function be(n = {}, e = !1) {
951
- const t = Object.keys(n);
1041
+ function Ae(r = {}, e = !1) {
1042
+ const t = Object.keys(r);
952
1043
  return e ? t.map((s) => "." + s) : t;
953
1044
  }
954
- function Tt(n, e, t, s, r) {
955
- const { children: i } = e, a = Dt(e, s), o = s.$slots?.[a.name];
956
- return o ? o(t) : i ? R(i) ? n.createTextVNode(i) : w(i) ? n.createTextVNode(
957
- ye(s.__parseExpression(i))
1045
+ function xt(r, e, t, s, n) {
1046
+ const { children: i } = e, a = Nt(e, s), o = s.$slots?.[a.name];
1047
+ return o ? o(t) : i ? P(i) ? r.createTextVNode(i) : S(i) ? r.createTextVNode(
1048
+ $e(s.__parseExpression(i))
958
1049
  ) : Array.isArray(i) ? i.map(
959
- (c) => k(c, s, n, r, i)
1050
+ (p) => F(p, s, r, n, i)
960
1051
  ) : null : null;
961
1052
  }
962
- function Dt(n, e) {
963
- const { props: t } = n, s = t?.name || "default";
1053
+ function Nt(r, e) {
1054
+ const { props: t } = r, s = t?.name || "default";
964
1055
  return {
965
- name: w(s) ? e.__parseExpression(s) : s,
1056
+ name: S(s) ? e.__parseExpression(s) : s,
966
1057
  params: []
967
1058
  };
968
1059
  }
969
- function Ot(n, e) {
970
- return e.__parseExpression(n.value) ? {} : {
1060
+ function Bt(r, e) {
1061
+ return e.__parseExpression(r.value) ? {} : {
971
1062
  display: "none"
972
1063
  };
973
1064
  }
974
- function xt(n, e) {
1065
+ function Ut(r, e) {
975
1066
  return {
976
- innerHTML: e.__parseExpression(n.value) || ""
1067
+ innerHTML: e.__parseExpression(r.value) || ""
977
1068
  };
978
1069
  }
979
- function Nt(n, e, t) {
1070
+ function Lt(r, e, t) {
980
1071
  const s = {
981
1072
  type: "JSFunction",
982
1073
  value: e.value?.value ? `(v) => {
983
1074
  ${e.value.value} = v;
984
1075
  }` : "(v) => {}"
985
- }, r = t.__parseFunction(s), i = be(
986
- w(e.modifiers) ? t.__parseExpression(e.modifiers) : e.modifiers
987
- ), a = w(e.arg) ? t.__parseExpression(e.arg) : e.arg || "modelValue";
1076
+ }, n = t.__parseFunction(s), i = Ae(
1077
+ S(e.modifiers) ? t.__parseExpression(e.modifiers) : e.modifiers
1078
+ ), a = S(e.arg) ? t.__parseExpression(e.arg) : e.arg || "modelValue";
988
1079
  return {
989
1080
  [a]: t.__parseExpression(e.value),
990
- [`onUpdate:${a}`]: i.length && r ? n.withModifiers(r, i) : r
1081
+ [`onUpdate:${a}`]: i.length && n ? r.withModifiers(n, i) : n
991
1082
  };
992
1083
  }
993
- function Ut(n, e, t, s, r) {
1084
+ function qt(r, e, t, s, n) {
994
1085
  if (!e) return null;
995
- if (R(e))
1086
+ if (P(e))
996
1087
  return { default: () => e };
997
- if (w(e))
1088
+ if (S(e))
998
1089
  return {
999
- default: () => ye(t.__parseExpression(e))
1090
+ default: () => $e(t.__parseExpression(e))
1000
1091
  };
1001
1092
  if (Array.isArray(e) && e.length > 0) {
1002
- const i = Bt(e), a = (o) => !o || !r ? {} : r?.id && Object.keys(o).length ? {
1003
- [`scope_${r.id}`]: o
1093
+ const i = Jt(e), a = (o) => !o || !n ? {} : n?.id && Object.keys(o).length ? {
1094
+ [`scope_${n.id}`]: o
1004
1095
  } : {};
1005
- return Object.entries(i).reduce((o, [c, { nodes: l, params: u }]) => (o[c] = (p) => {
1006
- const h = u.length ? ze(p ?? {}, u) : a(p);
1007
- return l.map(
1008
- (f) => k(f, t.__clone(h), n, s, l)
1096
+ return Object.entries(i).reduce((o, [p, { nodes: c, params: u }]) => (o[p] = (l) => {
1097
+ const h = u.length ? Ge(l ?? {}, u) : a(l);
1098
+ return c.map(
1099
+ (f) => F(f, t.__clone(h), r, s, c)
1009
1100
  );
1010
1101
  }, o), {});
1011
1102
  }
1012
1103
  return null;
1013
1104
  }
1014
- function Bt(n) {
1105
+ function Jt(r) {
1015
1106
  const e = {};
1016
- for (const t of n) {
1017
- const s = Lt(t.slot), r = s.name;
1018
- e[r] ? (e[r].nodes.push(t), e[r].params = e[r].params.concat(s.params)) : e[r] = {
1107
+ for (const t of r) {
1108
+ const s = Kt(t.slot), n = s.name;
1109
+ e[n] ? (e[n].nodes.push(t), e[n].params = e[n].params.concat(s.params)) : e[n] = {
1019
1110
  nodes: [t],
1020
1111
  params: s.params
1021
1112
  };
1022
1113
  }
1023
1114
  return e;
1024
1115
  }
1025
- function Lt(n = "default") {
1026
- return R(n) ? { name: n, params: [] } : { params: [], ...n };
1116
+ function Kt(r = "default") {
1117
+ return P(r) ? { name: r, params: [] } : { params: [], ...r };
1027
1118
  }
1028
- function qt(n, e, t) {
1029
- const { value: s, iterator: r } = n, { item: i = "item", index: a = "index" } = r || {};
1119
+ function zt(r, e, t) {
1120
+ const { value: s, iterator: n } = r, { item: i = "item", index: a = "index" } = n || {};
1030
1121
  let o = t.__parseExpression(s) || [];
1031
- return Number.isInteger(o) && (o = new Array(o).fill(!0).map((c, l) => l + 1)), Array.isArray(o) ? o.map((c, l) => e(t.__clone({ [i]: c, [a]: l }))) : (console.warn("[vForRender]:", `${s?.value} is not a Arrary`), []);
1122
+ return Number.isInteger(o) && (o = new Array(o).fill(!0).map((p, c) => c + 1)), Array.isArray(o) ? o.map((p, c) => e(t.__clone({ [i]: p, [a]: c }), c)) : (console.warn("[vForRender]:", `${s?.value} is not a Arrary`), []);
1032
1123
  }
1033
- const ue = ge({
1124
+ const me = we({
1034
1125
  name: "VtjPageContainer",
1035
1126
  async setup() {
1036
- const n = Ae(), e = ve(), t = e.params.id, s = t ? n.getPage(t) : n.getHomepage(), r = s ? await n.getRenderComponent(s.id) : null, i = Y(Symbol());
1127
+ const r = Me(), e = Se(), t = e.params.id, s = t ? r.getPage(t) : r.getHomepage(), n = s ? await r.getRenderComponent(s.id) : null, i = Z(Symbol());
1037
1128
  if (s) {
1038
1129
  Object.assign(e.meta, s.meta || {}, { cache: s.cache });
1039
- const { useTitle: a } = n?.adapter;
1130
+ const { useTitle: a } = r?.adapter;
1040
1131
  a && a(s.title || "VTJ");
1041
1132
  }
1042
1133
  return {
1043
- provider: n,
1044
- component: r,
1134
+ provider: r,
1135
+ component: n,
1045
1136
  file: s,
1046
1137
  query: e.query,
1047
1138
  meta: e.meta,
@@ -1050,20 +1141,20 @@ const ue = ge({
1050
1141
  };
1051
1142
  },
1052
1143
  render() {
1053
- const { component: n, query: e, sid: t } = this;
1054
- return n ? G(n, { ...e, key: t }) : G("div", "页面不存在");
1144
+ const { component: r, query: e, sid: t } = this;
1145
+ return r ? X(r, { ...e, key: t }) : X("div", "页面不存在");
1055
1146
  },
1056
1147
  activated() {
1057
1148
  this.meta.cache === !1 && (this.sid = Symbol());
1058
1149
  }
1059
- }), Jt = ge({
1150
+ }), Vt = we({
1060
1151
  name: "VtjStartupContainer",
1061
1152
  render() {
1062
- return G("div", "page not found!");
1153
+ return X("div", "page not found!");
1063
1154
  }
1064
- }), Ce = Symbol("Provider");
1065
- var Kt = /* @__PURE__ */ ((n) => (n.Production = "production", n.Development = "development", n))(Kt || {});
1066
- class zt extends Oe {
1155
+ }), Ie = Symbol("Provider");
1156
+ var Wt = /* @__PURE__ */ ((r) => (r.Production = "production", r.Development = "development", r))(Wt || {});
1157
+ class Gt extends Be {
1067
1158
  // DSL缓存
1068
1159
  /**
1069
1160
  * 创建Provider实例
@@ -1073,21 +1164,21 @@ class zt extends Oe {
1073
1164
  super(), this.options = e;
1074
1165
  const {
1075
1166
  service: t,
1076
- mode: s = _.Raw,
1077
- dependencies: r,
1167
+ mode: s = w.Raw,
1168
+ dependencies: n,
1078
1169
  materials: i,
1079
1170
  project: a = {},
1080
1171
  adapter: o = {},
1081
- globals: c = {},
1082
- modules: l = {},
1172
+ globals: p = {},
1173
+ modules: c = {},
1083
1174
  router: u = null,
1084
- materialPath: p = "./",
1175
+ materialPath: l = "./",
1085
1176
  nodeEnv: h = "development"
1086
1177
  /* Development */
1087
1178
  } = e;
1088
- this.mode = s, this.modules = l, this.service = t, this.router = u, this.materialPath = p, this.nodeEnv = h, r && (this.dependencies = r), i && (this.materials = i), Object.assign(this.globals, c), Object.assign(this.adapter, o);
1179
+ this.mode = s, this.modules = c, this.service = t, this.router = u, this.materialPath = l, this.nodeEnv = h, n && (this.dependencies = n), i && (this.materials = i), Object.assign(this.globals, p), Object.assign(this.adapter, o);
1089
1180
  const { access: f, request: d } = this.adapter;
1090
- f && f.connect({ mode: s, router: u, request: d }), a && s !== _.Design ? this.load(a) : this.project = a;
1181
+ f && f.connect({ mode: s, router: u, request: d }), a && s !== w.Design ? this.load(a) : this.project = a;
1091
1182
  }
1092
1183
  mode;
1093
1184
  // 当前运行模式(设计/源码/预览等)
@@ -1095,7 +1186,7 @@ class zt extends Oe {
1095
1186
  // 全局变量
1096
1187
  modules = {};
1097
1188
  // 异步模块加载器
1098
- adapter = { request: W, jsonp: he };
1189
+ adapter = { request: Q, jsonp: ye };
1099
1190
  // 适配器接口
1100
1191
  apis = {};
1101
1192
  // API集合
@@ -1125,9 +1216,9 @@ class zt extends Oe {
1125
1216
  try {
1126
1217
  s = await e.apply(e, t);
1127
1218
  } catch (i) {
1128
- A.warn("模拟数据模版异常", i);
1219
+ k.warn("模拟数据模版异常", i);
1129
1220
  }
1130
- return I()?.mock(s);
1221
+ return D()?.mock(s);
1131
1222
  };
1132
1223
  }
1133
1224
  /**
@@ -1143,83 +1234,83 @@ class zt extends Oe {
1143
1234
  const t = this.modules[`.vtj/projects/${e.id}.json`] || this.modules[`/src/.vtj/projects/${e.id}.json`];
1144
1235
  if (this.project = t ? await t() : await this.service.init(e), !this.project)
1145
1236
  throw new Error("project is null");
1146
- const { apis: s = [], meta: r = [] } = this.project, i = window;
1147
- i && (i.CKEDITOR_VERSION = void 0), this.mode === _.Raw ? await this.loadDependencies(i) : await this.loadAssets(i), this.initMock(i), this.apis = ht(s, r, this.adapter), je(i), mt(s, i), e.platform !== "uniapp" && this.initRouter(), this.triggerReady();
1237
+ const { apis: s = [], meta: n = [] } = this.project, i = window;
1238
+ i && (i.CKEDITOR_VERSION = void 0), this.mode === w.Raw ? await this.loadDependencies(i) : await this.loadAssets(i), this.initMock(i), this.apis = vt(s, n, this.adapter), Ce(i), yt(s, i), e.platform !== "uniapp" && this.initRouter(), this.triggerReady();
1148
1239
  }
1149
1240
  initMock(e) {
1150
- const t = I(e);
1241
+ const t = D(e);
1151
1242
  t && t.setup({
1152
1243
  timeout: "50-500"
1153
1244
  });
1154
1245
  }
1155
1246
  async loadDependencies(e) {
1156
1247
  const t = Object.entries(this.dependencies);
1157
- for (const [s, r] of t)
1158
- e[s] || (e[s] = this.library[s] = await r());
1248
+ for (const [s, n] of t)
1249
+ e[s] || (e[s] = this.library[s] = await n());
1159
1250
  }
1160
1251
  async loadAssets(e) {
1161
- const { dependencies: t = [] } = this.project, { dependencies: s, library: r, components: i, materialPath: a, nodeEnv: o } = this, {
1162
- libraryExports: c,
1163
- libraryMap: l,
1252
+ const { dependencies: t = [] } = this.project, { dependencies: s, library: n, components: i, materialPath: a, nodeEnv: o } = this, {
1253
+ libraryExports: p,
1254
+ libraryMap: c,
1164
1255
  materials: u,
1165
- materialExports: p,
1256
+ materialExports: l,
1166
1257
  materialMapLibrary: h
1167
- } = tt(
1258
+ } = nt(
1168
1259
  t,
1169
1260
  a,
1170
1261
  o === "development"
1171
1262
  /* Development */
1172
1263
  );
1173
- for (const f of c) {
1264
+ for (const f of p) {
1174
1265
  const d = s[f], m = e[f];
1175
1266
  if (m)
1176
- r[f] = m;
1267
+ n[f] = m;
1177
1268
  else if (d)
1178
- e[f] = r[f] = await d();
1269
+ e[f] = n[f] = await d();
1179
1270
  else {
1180
- const v = l[f] || [];
1181
- for (const g of v)
1182
- B(g) && await it(f, C.append(g, { v: F })), L(g) && await ae(C.append(g, { v: F }));
1183
- r[f] = e[f];
1271
+ const y = c[f] || [];
1272
+ for (const g of y)
1273
+ q(g) && await ct(f, C.append(g, { v: I })), J(g) && await fe(C.append(g, { v: I }));
1274
+ n[f] = e[f];
1184
1275
  }
1185
1276
  }
1186
1277
  if (o === "development") {
1187
1278
  for (const d of u)
1188
- await ae(C.append(d, { v: F }));
1279
+ await fe(C.append(d, { v: I }));
1189
1280
  const f = this.materials || {};
1190
- for (const d of p) {
1191
- const m = e[h[d]], v = xe[d];
1192
- if (v)
1193
- m && v.forEach((g) => {
1281
+ for (const d of l) {
1282
+ const m = e[h[d]], y = Ue[d];
1283
+ if (y)
1284
+ m && y.forEach((g) => {
1194
1285
  i[g] = m[g];
1195
1286
  });
1196
1287
  else {
1197
1288
  const g = f[d] ? (await f[d]()).default : e[d];
1198
- g && m && (g.components || []).forEach((E) => {
1199
- i[E.name] = st(E, m);
1289
+ g && m && (g.components || []).forEach(($) => {
1290
+ i[$.name] = it($, m);
1200
1291
  });
1201
1292
  }
1202
1293
  }
1203
1294
  }
1204
1295
  }
1205
1296
  initRouter() {
1206
- const { router: e, project: t, options: s, adapter: r } = this;
1297
+ const { router: e, project: t, options: s, adapter: n } = this;
1207
1298
  if (!e) return;
1208
1299
  const i = t?.platform === "uniapp" ? "pages" : "page", {
1209
1300
  routeAppendTo: a,
1210
1301
  pageRouteName: o = i,
1211
- routeMeta: c
1212
- } = s, l = a ? "" : "/", u = {
1213
- path: `${l}${o}/:id`,
1302
+ routeMeta: p
1303
+ } = s, c = a ? "" : "/", u = {
1304
+ path: `${c}${o}/:id`,
1214
1305
  name: M,
1215
- component: ue
1216
- }, p = {
1217
- path: l,
1218
- name: x,
1219
- component: t?.homepage ? ue : r.startupComponent || Jt,
1220
- meta: c
1306
+ component: me
1307
+ }, l = {
1308
+ path: c,
1309
+ name: N,
1310
+ component: t?.homepage ? me : n.startupComponent || Vt,
1311
+ meta: p
1221
1312
  };
1222
- e.hasRoute(M) && e.removeRoute(M), e.hasRoute(x) && e.removeRoute(x), a ? (e.addRoute(a, u), e.addRoute(a, p)) : (e.addRoute(u), e.addRoute(p));
1313
+ e.hasRoute(M) && e.removeRoute(M), e.hasRoute(N) && e.removeRoute(N), a ? (e.addRoute(a, u), e.addRoute(a, l)) : (e.addRoute(u), e.addRoute(l));
1223
1314
  }
1224
1315
  /**
1225
1316
  * Vue 插件安装方法
@@ -1233,19 +1324,19 @@ class zt extends Oe {
1233
1324
  */
1234
1325
  install(e) {
1235
1326
  const t = e.config.globalProperties.installed || {};
1236
- for (const [s, r] of Object.entries(this.library))
1237
- !t[s] && ot(r) && (e.use(r), t[s] = !0);
1238
- this.options.install && e.use(this.options.install), this.adapter.access && e.use(this.adapter.access), e.provide(Ce, this), e.config.globalProperties.$provider = this, e.config.globalProperties.installed = t, this.mode === _.Design && (e.config.errorHandler = (s, r, i) => {
1239
- const a = r?.$options.name, o = typeof s == "string" ? s : s?.message || s?.msg || "未知错误", c = `[ ${a} ] ${o} ${i}`;
1327
+ for (const [s, n] of Object.entries(this.library))
1328
+ !t[s] && lt(n) && (e.use(n), t[s] = !0);
1329
+ this.options.install && e.use(this.options.install), this.adapter.access && e.use(this.adapter.access), e.provide(Ie, this), e.config.globalProperties.$provider = this, e.config.globalProperties.installed = t, this.mode === w.Design && (e.config.errorHandler = (s, n, i) => {
1330
+ const a = n?.$options.name, o = typeof s == "string" ? s : s?.message || s?.msg || "未知错误", p = `[ ${a} ] ${o} ${i}`;
1240
1331
  console.error(
1241
1332
  "[VTJ Error]:",
1242
1333
  {
1243
1334
  err: s,
1244
- instance: r,
1335
+ instance: n,
1245
1336
  info: i
1246
1337
  },
1247
1338
  s?.stack
1248
- ), this.adapter.notify && this.adapter.notify(c, "组件渲染错误", "error");
1339
+ ), this.adapter.notify && this.adapter.notify(p, "组件渲染错误", "error");
1249
1340
  }), this.options.enhance && e.use(this.options.enhance, this);
1250
1341
  }
1251
1342
  getFile(e) {
@@ -1253,12 +1344,12 @@ class zt extends Oe {
1253
1344
  return this.getPage(e) || t.find((s) => s.id === e) || null;
1254
1345
  }
1255
1346
  getPage(e) {
1256
- const { pages: t = [] } = this.project || {}, s = (r, i = []) => {
1347
+ const { pages: t = [] } = this.project || {}, s = (n, i = []) => {
1257
1348
  for (const a of i) {
1258
- if (a.id === r)
1349
+ if (a.id === n)
1259
1350
  return a;
1260
1351
  if (a.children && a.children.length) {
1261
- const o = s(r, a.children);
1352
+ const o = s(n, a.children);
1262
1353
  if (o)
1263
1354
  return o;
1264
1355
  }
@@ -1295,23 +1386,23 @@ class zt extends Oe {
1295
1386
  * @returns 渲染器实例
1296
1387
  */
1297
1388
  createDslRenderer(e, t = {}) {
1298
- const { library: s, components: r, mode: i, apis: a } = this, o = {
1389
+ const { library: s, components: n, mode: i, apis: a } = this, o = {
1299
1390
  mode: i,
1300
1391
  Vue: s.Vue,
1301
- components: r,
1392
+ components: n,
1302
1393
  libs: s,
1303
1394
  apis: a,
1304
1395
  window,
1305
1396
  ...t
1306
- }, c = Z({
1307
- getDsl: async (l) => await this.getDsl(l) || null,
1308
- getDslByUrl: async (l) => await this.getDslByUrl(l) || null,
1397
+ }, p = se({
1398
+ getDsl: async (c) => await this.getDsl(c) || null,
1399
+ getDslByUrl: async (c) => await this.getDslByUrl(c) || null,
1309
1400
  options: o
1310
1401
  });
1311
- return X({
1402
+ return te({
1312
1403
  ...o,
1313
1404
  dsl: e,
1314
- loader: c
1405
+ loader: p
1315
1406
  });
1316
1407
  }
1317
1408
  /**
@@ -1327,13 +1418,13 @@ class zt extends Oe {
1327
1418
  async getRenderComponent(e, t) {
1328
1419
  const s = this.getFile(e);
1329
1420
  if (!s)
1330
- return A.warn(`Can not find file: ${e}`), null;
1421
+ return k.warn(`Can not find file: ${e}`), null;
1331
1422
  t && t(s);
1332
- const r = `.vtj/vue/${e}.vue`, i = this.modules[r] || this.modules[`/src/pages/${e}.vue`];
1423
+ const n = `.vtj/vue/${e}.vue`, i = this.modules[n] || this.modules[`/src/pages/${e}.vue`];
1333
1424
  if (i)
1334
1425
  return (await i())?.default;
1335
1426
  const a = await this.getDsl(s.id);
1336
- return a ? this.createDslRenderer(a).renderer : (A.warn(`Can not find dsl: ${e}`), null);
1427
+ return a ? this.createDslRenderer(a).renderer : (k.warn(`Can not find dsl: ${e}`), null);
1337
1428
  }
1338
1429
  /**
1339
1430
  * 定义基于URL的异步组件
@@ -1345,7 +1436,7 @@ class zt extends Oe {
1345
1436
  * @returns Vue异步组件
1346
1437
  */
1347
1438
  defineUrlSchemaComponent(e, t) {
1348
- return ce(async () => {
1439
+ return de(async () => {
1349
1440
  const s = await this.getDslByUrl(e);
1350
1441
  return s ? (s.name = t || s.name, this.createDslRenderer(s).renderer) : null;
1351
1442
  });
@@ -1358,26 +1449,26 @@ class zt extends Oe {
1358
1449
  * @returns Vue异步组件
1359
1450
  */
1360
1451
  definePluginComponent(e) {
1361
- return ce(async () => await Re(e, window));
1452
+ return de(async () => await ke(e, window));
1362
1453
  }
1363
1454
  }
1364
- function cs(n) {
1365
- const e = new zt(n);
1455
+ function ps(r) {
1456
+ const e = new Gt(r);
1366
1457
  return {
1367
1458
  provider: e,
1368
1459
  onReady: (s) => e.ready(s)
1369
1460
  };
1370
1461
  }
1371
- function Ae(n = {}) {
1372
- const e = me(Ce, null);
1462
+ function Me(r = {}) {
1463
+ const e = _e(Ie, null);
1373
1464
  if (!e)
1374
1465
  throw new Error("Can not find provider");
1375
1466
  if (e.nodeEnv === "development") {
1376
- const { id: t, version: s } = n;
1467
+ const { id: t, version: s } = r;
1377
1468
  t && s && (async () => {
1378
- const r = await e.getDsl(t);
1379
- r?.__VERSION__ !== s && e.adapter.notify && e.adapter.notify(
1380
- `[ ${r?.name} ] 组件源码版本与运行时版本不一致,请重新发布组件`,
1469
+ const n = await e.getDsl(t);
1470
+ n?.__VERSION__ !== s && e.adapter.notify && e.adapter.notify(
1471
+ `[ ${n?.name} ] 组件源码版本与运行时版本不一致,请重新发布组件`,
1381
1472
  "版本不一致",
1382
1473
  "warning"
1383
1474
  );
@@ -1385,31 +1476,31 @@ function Ae(n = {}) {
1385
1476
  }
1386
1477
  return e;
1387
1478
  }
1388
- async function ls(n, e = "") {
1389
- const { name: t, urls: s = [] } = n || {}, r = s.map((o) => e + o), { css: i, js: a } = nt(r);
1390
- if (i.length && we(i), a.length)
1391
- return await Se(a, t).catch(
1479
+ async function fs(r, e = "") {
1480
+ const { name: t, urls: s = [] } = r || {}, n = s.map((o) => e + o), { css: i, js: a } = ot(n);
1481
+ if (i.length && Ee(i), a.length)
1482
+ return await be(a, t).catch(
1392
1483
  () => {
1393
1484
  }
1394
1485
  );
1395
1486
  }
1396
- const ke = {
1487
+ const De = {
1397
1488
  type: "json",
1398
1489
  validSuccess: !0,
1399
1490
  originResponse: !1,
1400
1491
  failMessage: !0,
1401
- validate: (n) => n.data?.code === 0
1402
- }, Vt = (n, e = "/__vtj__/api/:type.json") => (t, s, r) => n.send({
1492
+ validate: (r) => r.data?.code === 0
1493
+ }, Yt = (r, e = "/__vtj__/api/:type.json") => (t, s, n) => r.send({
1403
1494
  url: e,
1404
1495
  method: "post",
1405
1496
  params: { type: t },
1406
- query: r,
1497
+ query: n,
1407
1498
  data: {
1408
1499
  type: t,
1409
1500
  data: s
1410
1501
  },
1411
- settings: ke
1412
- }), Wt = (n, e = "/__vtj__/api/uploader.json") => async (t, s) => await n.send({
1502
+ settings: De
1503
+ }), Qt = (r, e = "/__vtj__/api/uploader.json") => async (t, s) => await r.send({
1413
1504
  url: e,
1414
1505
  method: "post",
1415
1506
  data: {
@@ -1417,12 +1508,12 @@ const ke = {
1417
1508
  projectId: s
1418
1509
  },
1419
1510
  settings: {
1420
- ...ke,
1511
+ ...De,
1421
1512
  type: "data"
1422
1513
  }
1423
- }).then((r) => r && r[0] ? r[0] : null).catch(() => null);
1424
- function us(n) {
1425
- return fe({
1514
+ }).then((n) => n && n[0] ? n[0] : null).catch(() => null);
1515
+ function ds(r) {
1516
+ return ve({
1426
1517
  settings: {
1427
1518
  type: "json",
1428
1519
  validSuccess: !0,
@@ -1430,14 +1521,14 @@ function us(n) {
1430
1521
  failMessage: !0,
1431
1522
  validate: (e) => e.data?.code === 0,
1432
1523
  showError: (e) => {
1433
- n && n(e || "未知错误");
1524
+ r && r(e || "未知错误");
1434
1525
  }
1435
1526
  }
1436
1527
  });
1437
1528
  }
1438
- class se {
1439
- constructor(e = W) {
1440
- this.req = e, this.api = Vt(e), this.uploader = Wt(e);
1529
+ class oe {
1530
+ constructor(e = Q) {
1531
+ this.req = e, this.api = Yt(e), this.uploader = Qt(e);
1441
1532
  }
1442
1533
  api;
1443
1534
  pluginCaches = {};
@@ -1521,10 +1612,10 @@ class se {
1521
1612
  return await this.api("clearStaticFiles", e).catch(() => "");
1522
1613
  }
1523
1614
  async getPluginMaterial(e) {
1524
- const { urls: t = [] } = e, s = t.filter((i) => Ze(i))[0];
1615
+ const { urls: t = [] } = e, s = t.filter((i) => st(i))[0];
1525
1616
  if (!s) return null;
1526
- const r = this.pluginCaches[s];
1527
- return r || (this.pluginCaches[s] = W.send({
1617
+ const n = this.pluginCaches[s];
1618
+ return n || (this.pluginCaches[s] = Q.send({
1528
1619
  url: s,
1529
1620
  method: "get",
1530
1621
  settings: {
@@ -1537,77 +1628,77 @@ class se {
1537
1628
  return console.log("BaseService.genSource", e), "";
1538
1629
  }
1539
1630
  }
1540
- const y = new Ve({
1631
+ const _ = new Ye({
1541
1632
  type: "local",
1542
1633
  expired: 0,
1543
1634
  prefix: "__VTJ_"
1544
1635
  });
1545
- class ps extends se {
1636
+ class hs extends oe {
1546
1637
  init(e) {
1547
- const t = new N(e), s = y.get(`project_${t.id}`), r = Object.assign(t.toDsl(), s || {});
1548
- return y.save(`project_${t.id}`, r), Promise.resolve(r);
1638
+ const t = new B(e), s = _.get(`project_${t.id}`), n = Object.assign(t.toDsl(), s || {});
1639
+ return _.save(`project_${t.id}`, n), Promise.resolve(n);
1549
1640
  }
1550
1641
  saveProject(e) {
1551
- const t = new N(e);
1552
- return y.save(`project_${t.id}`, t.toDsl()), Promise.resolve(!0);
1642
+ const t = new B(e);
1643
+ return _.save(`project_${t.id}`, t.toDsl()), Promise.resolve(!0);
1553
1644
  }
1554
1645
  saveMaterials(e, t) {
1555
- return y.save(`materials_${e.id}`, te(t)), Promise.resolve(!0);
1646
+ return _.save(`materials_${e.id}`, ie(t)), Promise.resolve(!0);
1556
1647
  }
1557
1648
  saveFile(e) {
1558
- return y.save(`file_${e.id}`, e), Promise.resolve(!0);
1649
+ return _.save(`file_${e.id}`, e), Promise.resolve(!0);
1559
1650
  }
1560
1651
  getFile(e) {
1561
- const t = y.get(`file_${e}`);
1652
+ const t = _.get(`file_${e}`);
1562
1653
  return t ? Promise.resolve(t) : Promise.reject(null);
1563
1654
  }
1564
1655
  removeFile(e) {
1565
- return y.remove(`file_${e}`), Promise.resolve(!0);
1656
+ return _.remove(`file_${e}`), Promise.resolve(!0);
1566
1657
  }
1567
1658
  saveHistory(e) {
1568
- return y.save(`history_${e.id}`, e), Promise.resolve(!0);
1659
+ return _.save(`history_${e.id}`, e), Promise.resolve(!0);
1569
1660
  }
1570
1661
  removeHistory(e) {
1571
- const t = y.get(`history_${e}`);
1662
+ const t = _.get(`history_${e}`);
1572
1663
  if (t) {
1573
- const r = (t.items || []).map((i) => i.id);
1574
- this.removeHistoryItem(e, r), y.remove(`history_${e}`);
1664
+ const n = (t.items || []).map((i) => i.id);
1665
+ this.removeHistoryItem(e, n), _.remove(`history_${e}`);
1575
1666
  }
1576
1667
  return Promise.resolve(!0);
1577
1668
  }
1578
1669
  getHistory(e) {
1579
- const t = y.get(`history_${e}`), s = new pe(t || { id: e });
1670
+ const t = _.get(`history_${e}`), s = new ge(t || { id: e });
1580
1671
  return Promise.resolve(s.toDsl());
1581
1672
  }
1582
1673
  getHistoryItem(e, t) {
1583
- const s = y.get(`history_${e}_${t}`);
1674
+ const s = _.get(`history_${e}_${t}`);
1584
1675
  return Promise.resolve(s);
1585
1676
  }
1586
1677
  saveHistoryItem(e, t) {
1587
- return y.save(`history_${e}_${t.id}`, t), Promise.resolve(!0);
1678
+ return _.save(`history_${e}_${t.id}`, t), Promise.resolve(!0);
1588
1679
  }
1589
1680
  removeHistoryItem(e, t) {
1590
1681
  return t.forEach((s) => {
1591
- y.remove(`history_${e}_${s}`);
1682
+ _.remove(`history_${e}_${s}`);
1592
1683
  }), Promise.resolve(!0);
1593
1684
  }
1594
1685
  }
1595
- class Gt extends se {
1686
+ class Xt extends oe {
1596
1687
  projects = {};
1597
1688
  materials = {};
1598
1689
  files = {};
1599
1690
  histories = {};
1600
1691
  historyItems = {};
1601
1692
  init(e) {
1602
- const t = new N(e), s = this.projects[t.id] || {}, r = Object.assign(t.toDsl(), s);
1603
- return this.projects[r.id] = r, Promise.resolve(r);
1693
+ const t = new B(e), s = this.projects[t.id] || {}, n = Object.assign(t.toDsl(), s);
1694
+ return this.projects[n.id] = n, Promise.resolve(n);
1604
1695
  }
1605
1696
  saveProject(e) {
1606
- const t = new N(e);
1697
+ const t = new B(e);
1607
1698
  return this.projects[t.id] = t.toDsl(), Promise.resolve(!0);
1608
1699
  }
1609
1700
  saveMaterials(e, t) {
1610
- return e.id && (this.materials[e.id] = te(t)), Promise.resolve(!0);
1701
+ return e.id && (this.materials[e.id] = ie(t)), Promise.resolve(!0);
1611
1702
  }
1612
1703
  saveFile(e) {
1613
1704
  return this.files[e.id] = e, Promise.resolve(!0);
@@ -1625,18 +1716,18 @@ class Gt extends se {
1625
1716
  removeHistory(e) {
1626
1717
  const t = this.histories[e];
1627
1718
  if (t) {
1628
- const r = (t.items || []).map((i) => i.id);
1629
- this.removeHistoryItem(e, r), delete this.historyItems[e];
1719
+ const n = (t.items || []).map((i) => i.id);
1720
+ this.removeHistoryItem(e, n), delete this.historyItems[e];
1630
1721
  }
1631
1722
  return Promise.resolve(!0);
1632
1723
  }
1633
1724
  getHistory(e) {
1634
- const t = this.histories[e], s = new pe(t || { id: e });
1725
+ const t = this.histories[e], s = new ge(t || { id: e });
1635
1726
  return Promise.resolve(s);
1636
1727
  }
1637
1728
  getHistoryItem(e, t) {
1638
- const s = `${e}_${t}`, r = this.historyItems[s] || {};
1639
- return Promise.resolve(r);
1729
+ const s = `${e}_${t}`, n = this.historyItems[s] || {};
1730
+ return Promise.resolve(n);
1640
1731
  }
1641
1732
  saveHistoryItem(e, t) {
1642
1733
  const s = `${e}_${t.id}`;
@@ -1644,16 +1735,16 @@ class Gt extends se {
1644
1735
  }
1645
1736
  removeHistoryItem(e, t) {
1646
1737
  return t.forEach((s) => {
1647
- const r = `${e}_${s}`;
1648
- delete this.historyItems[r];
1738
+ const n = `${e}_${s}`;
1739
+ delete this.historyItems[n];
1649
1740
  }), Promise.resolve(!0);
1650
1741
  }
1651
1742
  }
1652
- let O = null;
1653
- function ds() {
1654
- return O || (O = new Gt(), O);
1743
+ let x = null;
1744
+ function ms() {
1745
+ return x || (x = new Xt(), x);
1655
1746
  }
1656
- class fs extends se {
1747
+ class gs extends oe {
1657
1748
  getFileCaches = {};
1658
1749
  async getExtension() {
1659
1750
  return await this.api("getExtension", {}).catch(() => {
@@ -1670,7 +1761,7 @@ class fs extends se {
1670
1761
  async saveMaterials(e, t) {
1671
1762
  return !!await this.api("saveMaterials", {
1672
1763
  project: e,
1673
- materials: te(t)
1764
+ materials: ie(t)
1674
1765
  }).catch(() => !1);
1675
1766
  }
1676
1767
  async saveFile(e) {
@@ -1710,130 +1801,131 @@ class fs extends se {
1710
1801
  );
1711
1802
  }
1712
1803
  }
1713
- function Fe(n, e, t = []) {
1804
+ function Te(r, e, t = []) {
1714
1805
  return t.map((s) => {
1715
- const { id: r, title: i, icon: a, children: o, hidden: c } = s;
1806
+ const { id: n, title: i, icon: a, children: o, hidden: p } = s;
1716
1807
  return {
1717
- id: r,
1808
+ id: n,
1718
1809
  title: i,
1719
1810
  icon: a,
1720
- hidden: c,
1721
- url: `${n}/${e}/${r}`,
1722
- children: o && o.length ? Fe(n, e, o) : void 0
1811
+ hidden: p,
1812
+ url: `${r}/${e}/${n}`,
1813
+ children: o && o.length ? Te(r, e, o) : void 0
1723
1814
  };
1724
1815
  });
1725
1816
  }
1726
- function Me(n, e) {
1727
- if (!e) return n;
1817
+ function He(r, e) {
1818
+ if (!e) return r;
1728
1819
  let t = [];
1729
- for (const s of n)
1820
+ for (const s of r)
1730
1821
  if (s.children && s.children.length) {
1731
- const r = Me(s.children, e);
1732
- r.length && (s.children = r, t.push(s));
1822
+ const n = He(s.children, e);
1823
+ n.length && (s.children = n, t.push(s));
1733
1824
  } else
1734
1825
  e.can(s.id.toString()) && t.push(s);
1735
1826
  return t;
1736
1827
  }
1737
- function hs(n) {
1828
+ function vs(r) {
1738
1829
  const {
1739
1830
  menuPathPrefix: e = "",
1740
1831
  pageRouteName: t = "page",
1741
1832
  disableMenusFilter: s = !1
1742
- } = n || {}, r = Ae(), i = ve(), a = pt(), o = Y(!1), c = Y(!1), l = r.project;
1743
- We(() => {
1833
+ } = r || {}, n = Me(), i = Se(), a = ht(), o = Z(!1), p = Z(!1), c = n.project;
1834
+ Qe(() => {
1744
1835
  const { name: h, params: f, meta: d } = i;
1745
1836
  if (h === M) {
1746
- const m = r.getPage(f.id);
1747
- o.value = !m?.mask, c.value = !!m?.pure;
1748
- } else if (h === x) {
1749
- const m = r.getHomepage();
1750
- o.value = !m?.mask, c.value = !!m?.pure;
1837
+ const m = n.getPage(f.id);
1838
+ o.value = !m?.mask, p.value = !!m?.pure;
1839
+ } else if (h === N) {
1840
+ const m = n.getHomepage();
1841
+ o.value = !m?.mask, p.value = !!m?.pure;
1751
1842
  } else
1752
- o.value = !d.mask, c.value = !!d.pure;
1843
+ o.value = !d.mask, p.value = !!d.pure;
1753
1844
  });
1754
- const u = Fe(
1845
+ const u = Te(
1755
1846
  e,
1756
1847
  t,
1757
- l?.pages
1758
- ), p = l?.config;
1848
+ c?.pages
1849
+ ), l = c?.config;
1759
1850
  return {
1760
1851
  disabled: o,
1761
- logo: p?.logo,
1762
- themeSwitchable: p?.themeSwitchable,
1763
- title: p?.title || l?.description || l?.name || "VTJ App",
1764
- menus: s ? u : Me(u, a),
1765
- pure: c
1852
+ logo: l?.logo,
1853
+ themeSwitchable: l?.themeSwitchable,
1854
+ title: l?.title || c?.description || c?.name || "VTJ App",
1855
+ menus: s ? u : He(u, a),
1856
+ pure: p
1766
1857
  };
1767
1858
  }
1768
1859
  export {
1769
- $e as ACCESS_KEY,
1770
- Ee as Access,
1771
- Xe as BUILD_IN_TAGS,
1772
- Ge as BUILT_IN_DIRECTIVES,
1773
- se as BaseService,
1774
- le as CONTEXT_HOST,
1775
- yt as Context,
1776
- _ as ContextMode,
1777
- Ye as DATA_TYPES,
1778
- x as HOMEPAGE_ROUTE_NAME,
1779
- Qe as HTML_TAGS,
1780
- rs as JSCodeToString,
1781
- es as LIFE_CYCLES_LIST,
1782
- fs as LocalService,
1783
- Gt as MemoryService,
1784
- Kt as NodeEnv,
1860
+ Pe as ACCESS_KEY,
1861
+ Re as Access,
1862
+ tt as BUILD_IN_TAGS,
1863
+ Xe as BUILT_IN_DIRECTIVES,
1864
+ oe as BaseService,
1865
+ he as CONTEXT_HOST,
1866
+ St as Context,
1867
+ w as ContextMode,
1868
+ Ze as DATA_TYPES,
1869
+ N as HOMEPAGE_ROUTE_NAME,
1870
+ et as HTML_TAGS,
1871
+ as as JSCodeToString,
1872
+ rs as LIFE_CYCLES_LIST,
1873
+ gs as LocalService,
1874
+ Xt as MemoryService,
1875
+ Wt as NodeEnv,
1785
1876
  M as PAGE_ROUTE_NAME,
1786
- zt as Provider,
1787
- ps as StorageService,
1788
- F as VTJ_RENDERER_VERSION,
1789
- _e as adoptedStyleSheets,
1790
- as as clearLoaderCache,
1791
- os as createAccess,
1792
- is as createAdapter,
1793
- ts as createAssetScripts,
1794
- ss as createAssetsCss,
1795
- Rt as createDataSources,
1796
- Z as createLoader,
1797
- ds as createMemoryService,
1798
- ft as createMetaApi,
1799
- gt as createMock,
1800
- cs as createProvider,
1801
- X as createRenderer,
1802
- dt as createSchemaApi,
1803
- ht as createSchemaApis,
1804
- us as createServiceRequest,
1805
- Ct as defaultLoader,
1806
- D as fillBasePath,
1807
- I as getMock,
1808
- be as getModifiers,
1809
- Re as getPlugin,
1810
- st as getRawComponent,
1811
- at as isBuiltInTag,
1812
- B as isCSSUrl,
1813
- lt as isJSCode,
1814
- w as isJSExpression,
1815
- T as isJSFunction,
1816
- Ze as isJSON,
1817
- L as isJSUrl,
1818
- ct as isNativeTag,
1819
- ot as isVuePlugin,
1820
- it as loadCss,
1821
- we as loadCssUrl,
1822
- ls as loadEnhance,
1823
- Se as loadScriptUrl,
1824
- vt as mockApi,
1825
- mt as mockApis,
1826
- je as mockCleanup,
1827
- k as nodeRender,
1828
- tt as parseDeps,
1829
- H as parseExpression,
1830
- Q as parseFunction,
1831
- nt as parseUrls,
1832
- Ce as providerKey,
1833
- et as removeProdFlag,
1834
- ns as setupPageSetting,
1835
- ye as toString,
1836
- pt as useAccess,
1837
- hs as useMask,
1838
- Ae as useProvider
1877
+ Gt as Provider,
1878
+ hs as StorageService,
1879
+ I as VTJ_RENDERER_VERSION,
1880
+ je as adoptedStyleSheets,
1881
+ us as clearLoaderCache,
1882
+ at as compileScopedCSS,
1883
+ ls as createAccess,
1884
+ cs as createAdapter,
1885
+ ns as createAssetScripts,
1886
+ is as createAssetsCss,
1887
+ Ct as createDataSources,
1888
+ se as createLoader,
1889
+ ms as createMemoryService,
1890
+ gt as createMetaApi,
1891
+ _t as createMock,
1892
+ ps as createProvider,
1893
+ te as createRenderer,
1894
+ mt as createSchemaApi,
1895
+ vt as createSchemaApis,
1896
+ ds as createServiceRequest,
1897
+ At as defaultLoader,
1898
+ O as fillBasePath,
1899
+ D as getMock,
1900
+ Ae as getModifiers,
1901
+ ke as getPlugin,
1902
+ it as getRawComponent,
1903
+ ut as isBuiltInTag,
1904
+ q as isCSSUrl,
1905
+ ft as isJSCode,
1906
+ S as isJSExpression,
1907
+ H as isJSFunction,
1908
+ st as isJSON,
1909
+ J as isJSUrl,
1910
+ pt as isNativeTag,
1911
+ lt as isVuePlugin,
1912
+ ct as loadCss,
1913
+ Ee as loadCssUrl,
1914
+ fs as loadEnhance,
1915
+ be as loadScriptUrl,
1916
+ wt as mockApi,
1917
+ yt as mockApis,
1918
+ Ce as mockCleanup,
1919
+ F as nodeRender,
1920
+ nt as parseDeps,
1921
+ T as parseExpression,
1922
+ ee as parseFunction,
1923
+ ot as parseUrls,
1924
+ Ie as providerKey,
1925
+ rt as removeProdFlag,
1926
+ os as setupPageSetting,
1927
+ $e as toString,
1928
+ ht as useAccess,
1929
+ vs as useMask,
1930
+ Me as useProvider
1839
1931
  };