@vtj/renderer 0.16.19 → 0.16.21

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 Xe, BUILT_IN_COMPONENTS as Ye, ProjectModel as J, HistoryModel as Ce } from "@vtj/core";
2
- import { url as k, isUrl as oe, dedupArray as Ze, isFunction as H, isEqual as et, isString as I, logger as O, storage as te, cookie as se, toArray as we, unRSA as Se, delay as K, createRequest as Pe, jsonp as Ae, merge as tt, pathToRegexp as st, pathToRegexpMatch as nt, formDataToJson as rt, Queue as it, cloneDeep as $e, camelCase as P, upperFirstCamelCase as ot, pick as at, request as ae, loadScript as Ee, debounce as ct, Storage as lt, mapToObject as he } from "@vtj/utils";
3
- import * as G from "vue";
4
- import { inject as Ie, defineComponent as Fe, h as ce, ref as le, watchEffect as ut, defineAsyncComponent as be } from "vue";
5
- import { useRoute as ke } from "vue-router";
1
+ import { Base as Xe, BUILT_IN_COMPONENTS as Ye, ProjectModel as K, HistoryModel as Ce } from "@vtj/core";
2
+ import { url as O, isUrl as ae, dedupArray as Ze, isFunction as z, isString as I, logger as M, storage as se, cookie as ne, toArray as Se, unRSA as $e, delay as G, createRequest as Pe, jsonp as Ae, merge as et, pathToRegexp as tt, pathToRegexpMatch as st, formDataToJson as nt, isEqual as rt, Queue as ot, cloneDeep as Ee, camelCase as P, upperFirstCamelCase as it, pick as at, request as ce, loadScript as be, debounce as ct, Storage as lt, mapToObject as me } from "@vtj/utils";
3
+ import * as W from "vue";
4
+ import { inject as Ie, defineComponent as Fe, h as le, ref as ue, watchEffect as ut, defineAsyncComponent as je } from "vue";
5
+ import { useRoute as Oe } from "vue-router";
6
6
  /**!
7
7
  * Copyright (c) 2026, VTJ.PRO All rights reserved.
8
8
  * @name @vtj/renderer
9
9
  * @author CHC chenhuachun1549@dingtalk.com
10
- * @version 0.16.19
10
+ * @version 0.16.21
11
11
  * @license <a href="https://vtj.pro/license.html">MIT License</a>
12
12
  */
13
- const x = "0.16.19";
14
- var _ = /* @__PURE__ */ ((n) => (n.Runtime = "Runtime", n.Design = "Design", n.Raw = "Raw", n.VNode = "VNode", n))(_ || {});
15
- const je = [
13
+ const k = "0.16.21";
14
+ var y = /* @__PURE__ */ ((n) => (n.Runtime = "Runtime", n.Design = "Design", n.Raw = "Raw", n.VNode = "VNode", n))(y || {});
15
+ const Re = [
16
16
  "$el",
17
17
  "$emit",
18
18
  "$nextTick",
@@ -24,7 +24,7 @@ const je = [
24
24
  "$props",
25
25
  "$options",
26
26
  "$forceUpdate"
27
- ], As = [
27
+ ], Ps = [
28
28
  "beforeCreate",
29
29
  "created",
30
30
  "beforeMount",
@@ -55,9 +55,9 @@ const je = [
55
55
  Object,
56
56
  Function,
57
57
  Date
58
- }, D = "VtjPage", q = "VtjHomepage", Oe = "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,svg".split(
58
+ }, H = "VtjPage", J = "VtjHomepage", Me = "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,svg".split(
59
59
  ","
60
- ), dt = "component,slot".split(","), Is = [
60
+ ), dt = "component,slot".split(","), As = [
61
61
  "h",
62
62
  "t",
63
63
  "t",
@@ -77,7 +77,7 @@ const je = [
77
77
  "p",
78
78
  "r",
79
79
  "o"
80
- ].join(""), Fs = {
80
+ ].join(""), Is = {
81
81
  auth: [
82
82
  "h",
83
83
  "t",
@@ -137,43 +137,43 @@ const je = [
137
137
  ].join(""),
138
138
  privateKey: "MIIBOgIBAAJBAKoIzmn1FYQ1YOhOBw9EhABxZ+PySAIaydI+zdhoKflrdgJ4A5E4/5gbQmRpk09hPWG8nvX7h+l/QLU8kXxAIBECAwEAAQJAAlgpxQY6sByLsXqzJcthC8LSGsLf2JEJkHwlnpwFqlEV8UCkoINpuZ2Wzl+aftURu5rIfAzRCQBvHmeOTW9/zQIhAO5ufWDmnSLyfAAsNo5JRNpVuLFCFodR8Xm+ulDlosR/AiEAtpAltyP9wmCABKG/v/hrtTr3mcvFNGCjoGa9bUAok28CIHbrVs9w1ijrBlvTsXYwJw46uP539uKRRT4ymZzlm9QjAiB+1KH/G9f9pEEL9rtaSOG7JF5D0JcOjlze4MGVFs+ZrQIhALKOUFBNr2zEsyJIjw2PlvEucdlG77UniszjXTROHSPd"
139
139
  };
140
- function L(n, e) {
141
- return n.map((t) => oe(t) || t.startsWith("/") ? t : `${e}${t}`);
140
+ function q(n, e) {
141
+ return n.map((t) => ae(t) || t.startsWith("/") ? t : `${e}${t}`);
142
142
  }
143
- function V(n) {
143
+ function Q(n) {
144
144
  return /\.css$/.test(n);
145
145
  }
146
- function W(n) {
146
+ function X(n) {
147
147
  return /\.js$/.test(n);
148
148
  }
149
149
  function ht(n) {
150
150
  return /\.json$/.test(n);
151
151
  }
152
- function ks(n) {
152
+ function Fs(n) {
153
153
  return n.map(
154
- (e) => `<script src="${k.append(e, { v: x })}"><\/script>`
154
+ (e) => `<script src="${O.append(e, { v: k })}"><\/script>`
155
155
  ).join("");
156
156
  }
157
157
  function Os(n = []) {
158
158
  return n.map(
159
- (e) => `<link rel="stylesheet" href="${k.append(e, { v: x })}" />`
159
+ (e) => `<link rel="stylesheet" href="${O.append(e, { v: k })}" />`
160
160
  ).join("");
161
161
  }
162
162
  function mt(n, e = !1) {
163
163
  return e && n.endsWith(".prod.js") ? n.replace(".prod.js", ".js") : n;
164
164
  }
165
165
  function gt(n, e, t = !1) {
166
- const s = n.filter((p) => !!p.enabled), r = [], i = [], o = [], a = [], u = {}, c = {}, l = [], f = {};
166
+ const s = n.filter((p) => !!p.enabled), r = [], o = [], i = [], a = [], u = {}, c = {}, l = [], f = {};
167
167
  return s.forEach(
168
168
  ({ urls: p, assetsUrl: d, library: m, assetsLibrary: h, localeLibrary: g }) => {
169
- p?.forEach((y) => {
170
- W(y) && r.push(mt(y, t)), V(y) && i.push(y);
171
- }), m && (a.push(m), u[m] = L(p || [], e), g && (c[m] = g)), d && o.push(d), h && l.push(h), m && h && (f[h] = m);
169
+ p?.forEach((v) => {
170
+ X(v) && r.push(mt(v, t)), Q(v) && o.push(v);
171
+ }), m && (a.push(m), u[m] = q(p || [], e), g && (c[m] = g)), d && i.push(d), h && l.push(h), m && h && (f[h] = m);
172
172
  }
173
173
  ), {
174
- scripts: L(r, e),
175
- css: L(i, e),
176
- materials: L(o, e),
174
+ scripts: q(r, e),
175
+ css: q(o, e),
176
+ materials: q(i, e),
177
177
  libraryExports: a,
178
178
  materialExports: Ze(l),
179
179
  materialMapLibrary: f,
@@ -181,18 +181,18 @@ function gt(n, e, t = !1) {
181
181
  libraryLocaleMap: c
182
182
  };
183
183
  }
184
- function yt(n, e) {
184
+ function _t(n, e) {
185
185
  const { name: t, parent: s, alias: r } = n;
186
186
  return s ? e[s]?.[r || t] : e[r || t];
187
187
  }
188
188
  function vt(n = []) {
189
- const e = n.filter((s) => V(s)), t = n.filter((s) => W(s));
189
+ const e = n.filter((s) => Q(s)), t = n.filter((s) => X(s));
190
190
  return {
191
191
  css: e,
192
192
  js: t
193
193
  };
194
194
  }
195
- function _t(n, e) {
195
+ function yt(n, e) {
196
196
  const t = (c) => {
197
197
  const l = [];
198
198
  let f = 0;
@@ -202,33 +202,33 @@ function _t(n, e) {
202
202
  continue;
203
203
  }
204
204
  if (c.substring(f, f + 2) === "/*") {
205
- const y = c.indexOf("*/", f + 2);
206
- if (y !== -1) {
207
- f = y + 2;
205
+ const v = c.indexOf("*/", f + 2);
206
+ if (v !== -1) {
207
+ f = v + 2;
208
208
  continue;
209
209
  }
210
210
  }
211
211
  if (c[f] === "@") {
212
- const y = f;
212
+ const v = f;
213
213
  for (; f < c.length && c[f] !== "{" && c[f] !== ";"; )
214
214
  f++;
215
- const w = c.substring(y, f).trim(), v = w.includes("@keyframes");
215
+ const w = c.substring(v, f).trim(), b = w.includes("@keyframes");
216
216
  if (c[f] === ";")
217
217
  l.push({
218
218
  type: "simple-at-rule",
219
- content: c.substring(y, f + 1)
219
+ content: c.substring(v, f + 1)
220
220
  }), f++;
221
221
  else if (c[f] === "{") {
222
- const S = f + 1;
223
- let A = 1;
224
- for (f++; f < c.length && A > 0; )
225
- c[f] === "{" ? A++ : c[f] === "}" && A--, f++;
226
- const X = c.substring(y, f), C = c.substring(S, f - 1);
222
+ const _ = f + 1;
223
+ let C = 1;
224
+ for (f++; f < c.length && C > 0; )
225
+ c[f] === "{" ? C++ : c[f] === "}" && C--, f++;
226
+ const Y = c.substring(v, f), Z = c.substring(_, f - 1);
227
227
  l.push({
228
- type: v ? "keyframes" : "at-rule",
228
+ type: b ? "keyframes" : "at-rule",
229
229
  rule: w,
230
- content: X,
231
- inner: C
230
+ content: Y,
231
+ inner: Z
232
232
  });
233
233
  }
234
234
  continue;
@@ -260,7 +260,7 @@ function _t(n, e) {
260
260
  }, r = (c) => c.replace(/::v-deep\(/g, ":deep(").replace(/::v-deep\s+/g, ":deep(").replace(/\/deep\//g, " ").replace(/>>>/g, " ").replace(/(.*?):deep\(([^)]+)\)/g, (l, f, p) => {
261
261
  const d = f.trim(), m = p.trim();
262
262
  return d ? `${d}[${e}] ${m}` : m;
263
- }), i = (c) => {
263
+ }), o = (c) => {
264
264
  const l = c.trim();
265
265
  if (!l || l.includes(`[${e}]`) || /^(:root|:host|html|body)(\s|$|:|\.|\#|\[)/.test(l) || s(l))
266
266
  return l;
@@ -270,7 +270,7 @@ function _t(n, e) {
270
270
  return m ? `${m}[${e}]${d}` : l;
271
271
  }
272
272
  return `${l}[${e}]`;
273
- }, o = (c) => r(c).split(",").map((f) => i(f)).filter((f) => f.trim()).join(", "), a = (c) => c.map((l) => {
273
+ }, i = (c) => r(c).split(",").map((f) => o(f)).filter((f) => f.trim()).join(", "), a = (c) => c.map((l) => {
274
274
  switch (l.type) {
275
275
  case "simple-at-rule":
276
276
  return l.content;
@@ -286,7 +286,7 @@ function _t(n, e) {
286
286
  case "rule":
287
287
  if (!l.selector || !l.content)
288
288
  return "";
289
- const f = o(l.selector);
289
+ const f = i(l.selector);
290
290
  return f.trim() ? `${f} { ${l.content} }` : "";
291
291
  default:
292
292
  return "";
@@ -314,26 +314,26 @@ function St(n, e, t) {
314
314
  return e * s / r;
315
315
  }
316
316
  function $t(n, e) {
317
- let t = !1, s = !1, r = !1, i = "";
318
- for (let o = 0; o < e.length; o++) {
319
- const a = e[o];
320
- if (a === "'" && !s && !r ? t = !t : a === '"' && !t && !r ? s = !s : e.substr(o, 4).toLowerCase() === "url(" && !t && !s ? r = !0 : a === ")" && r && (r = !1), !t && !s && !r) {
321
- const u = e.substr(o).match(/^(-?\d+(?:\.\d+)?)\s*rpx/);
317
+ let t = !1, s = !1, r = !1, o = "";
318
+ for (let i = 0; i < e.length; i++) {
319
+ const a = e[i];
320
+ if (a === "'" && !s && !r ? t = !t : a === '"' && !t && !r ? s = !s : e.substr(i, 4).toLowerCase() === "url(" && !t && !s ? r = !0 : a === ")" && r && (r = !1), !t && !s && !r) {
321
+ const u = e.substr(i).match(/^(-?\d+(?:\.\d+)?)\s*rpx/);
322
322
  if (u) {
323
323
  const c = u[1], l = parseFloat(c), p = `${St(n, l).toFixed(6).replace(/\.?0+$/, "")}px`;
324
- i += p, o += u[0].length - 1;
324
+ o += p, i += u[0].length - 1;
325
325
  continue;
326
326
  }
327
327
  }
328
- i += a;
328
+ o += a;
329
329
  }
330
- return i;
330
+ return o;
331
331
  }
332
- function Me(n) {
332
+ function Te(n) {
333
333
  return I(n) ? n : JSON.stringify(n);
334
334
  }
335
- function me(n, e, t, s = !1) {
336
- const r = n.CSSStyleSheet, i = s ? `data-v-${e}` : e, o = n.__uniConfig ? $t(n, t) : t, a = s ? _t(o, i) : o, u = !!n.__uniConfig;
335
+ function ge(n, e, t, s = !1) {
336
+ const r = n.CSSStyleSheet, o = s ? `data-v-${e}` : e, i = n.__uniConfig ? $t(n, t) : t, a = s ? yt(i, o) : i, u = !!n.__uniConfig;
337
337
  if (r.prototype.replaceSync && !u) {
338
338
  const c = new r();
339
339
  c.id = e, c.replaceSync(a);
@@ -365,24 +365,24 @@ function Ms(n) {
365
365
  }
366
366
  async function Et(n, e) {
367
367
  const t = await window.fetch(e).then((s) => s.text()).catch(() => "");
368
- t && me(window, n, t);
368
+ t && ge(window, n, t);
369
369
  }
370
- function Te(n, e = window) {
370
+ function xe(n, e = window) {
371
371
  const t = e.document, s = e.document.head;
372
372
  for (const r of n)
373
373
  if (!t.getElementById(r)) {
374
- const o = t.createElement("link");
375
- o.rel = "stylesheet", o.id = r, o.href = r, s.appendChild(o);
374
+ const i = t.createElement("link");
375
+ i.rel = "stylesheet", i.id = r, i.href = r, s.appendChild(i);
376
376
  }
377
377
  }
378
- async function xe(n, e, t = window) {
378
+ async function De(n, e, t = window) {
379
379
  const s = t.document, r = t.document.head;
380
- let i = t[e];
381
- return i ? i.default || i : new Promise((o, a) => {
380
+ let o = t[e];
381
+ return o ? o.default || o : new Promise((i, a) => {
382
382
  for (const u of n) {
383
383
  const c = s.createElement("script");
384
384
  c.src = u, c.onload = () => {
385
- i = t[e], i ? o(i.default || i) : a(null);
385
+ o = t[e], o ? i(o.default || o) : a(null);
386
386
  }, c.onerror = (l) => {
387
387
  a(l);
388
388
  }, r.appendChild(c);
@@ -390,13 +390,13 @@ async function xe(n, e, t = window) {
390
390
  });
391
391
  }
392
392
  function bt(n) {
393
- return H(n) && Object.getOwnPropertyNames(n.prototype || {}).length === 0 || H(n?.install);
393
+ return z(n) && Object.getOwnPropertyNames(n.prototype || {}).length === 0 || z(n?.install);
394
394
  }
395
395
  function jt(n) {
396
396
  return dt.includes(n);
397
397
  }
398
398
  function Rt(n) {
399
- return Oe.includes(n);
399
+ return Me.includes(n);
400
400
  }
401
401
  function N(n = window) {
402
402
  const e = window?.Mock;
@@ -410,55 +410,46 @@ function Ts(n, e, t) {
410
410
  const s = n?._container;
411
411
  t?.type === "page" && s.classList.add("is-page"), t?.pure && s.classList.add("is-pure");
412
412
  }
413
- function Ct(n = {}, e = {}) {
414
- const t = Object.entries(n), s = Object.entries(e);
415
- if (t.length !== s.length)
416
- return !1;
417
- for (const [r, i] of t)
418
- if (!H(i) && !et(i, e[r]))
419
- return !1;
420
- return !0;
421
- }
422
413
  function B(n, e, t = !1, s = !1, r = !1) {
423
414
  try {
424
- const i = ['"use strict";', "var __self = arguments[0];"];
425
- i.push("return ");
426
- let o = (n.value || "").trim();
427
- r || (o = o.replace(/this(\W|$)/g, (u, c) => `__self${c}`)), o = i.join(`
428
- `) + o;
415
+ const o = ['"use strict";', "var __self = arguments[0];"];
416
+ o.push("return ");
417
+ let i = (n.value || "").trim();
418
+ r || (i = i.replace(/this(\W|$)/g, (u, c) => `__self${c}`)), i = o.join(`
419
+ `) + i;
429
420
  const a = r ? `
430
- ${o}
431
- ` : `with(${t ? "{}" : "$scope || {}"}) { ${o} }`;
421
+ ${i}
422
+ ` : `with(${t ? "{}" : "$scope || {}"}) { ${i} }`;
432
423
  return new Function("$scope", a)(e);
433
- } catch (i) {
434
- if (O.error("parseExpression.error", i, n, e?.__self ?? e), s)
435
- throw i;
424
+ } catch (o) {
425
+ if (M.error("parseExpression.error", o, n, e?.__self ?? e), s)
426
+ throw o;
436
427
  }
437
428
  }
438
429
  function R(n, e, t = !1, s = !1, r = !1) {
439
- const i = B(n, e, t, s, r);
440
- if (typeof i != "function" && (O.error(
430
+ const o = B(n, e, t, s, r);
431
+ if (typeof o != "function" && (M.error(
441
432
  "parseFunction.error",
442
433
  "not a function",
443
434
  n,
444
435
  e?.__self ?? e
445
436
  ), s))
446
437
  throw new Error(`"${n.value}" not a function`);
447
- return i;
438
+ return o;
448
439
  }
449
- function b(n) {
440
+ function E(n) {
450
441
  return n && n.type === "JSExpression";
451
442
  }
452
- function E(n) {
443
+ function $(n) {
453
444
  return typeof n == "object" && n && n.type === "JSFunction";
454
445
  }
455
- function Pt(n) {
456
- return b(n) || E(n);
446
+ function Ct(n) {
447
+ return E(n) || $(n);
457
448
  }
458
449
  function xs(n) {
459
- return Pt(n) ? n.value : JSON.stringify(n);
450
+ return Ct(n) ? n.value : JSON.stringify(n);
460
451
  }
461
- const At = {
452
+ const Pt = {
462
453
  session: !1,
463
454
  authKey: "Authorization",
464
455
  storageKey: "ACCESS_STORAGE",
@@ -471,15 +462,15 @@ const At = {
471
462
  noPermissionMessage: "无权限访问该页面",
472
463
  appName: "",
473
464
  statusKey: "code"
474
- }, De = Symbol("access");
475
- class ge {
465
+ }, ke = Symbol("access");
466
+ class _e {
476
467
  options;
477
468
  data = null;
478
- mode = _.Raw;
469
+ mode = y.Raw;
479
470
  interceptResponse = !0;
480
471
  isTipShowing = !1;
481
472
  constructor(e) {
482
- this.options = Object.assign({}, At, e), this.loadData();
473
+ this.options = Object.assign({}, Pt, e), this.loadData();
483
474
  }
484
475
  enableIntercept() {
485
476
  this.interceptResponse = !0;
@@ -489,21 +480,21 @@ class ge {
489
480
  }
490
481
  connect(e) {
491
482
  const { mode: t, router: s, request: r } = e;
492
- this.mode = t, s && this.mode !== _.Design && this.setGuard(s), r && this.setRequest(r);
483
+ this.mode = t, s && this.mode !== y.Design && this.setGuard(s), r && this.setRequest(r);
493
484
  }
494
485
  login(e) {
495
- const { storageKey: t, storagePrefix: s, session: r, authKey: i } = this.options;
496
- this.setData(e), this.data && (te.save(t, e, {
486
+ const { storageKey: t, storagePrefix: s, session: r, authKey: o } = this.options;
487
+ this.setData(e), this.data && (se.save(t, e, {
497
488
  type: "local",
498
489
  prefix: s
499
- }), r && se.set(i, this.data.token));
490
+ }), r && ne.set(o, this.data.token));
500
491
  }
501
492
  clear() {
502
493
  const { storageKey: e, storagePrefix: t, session: s, authKey: r } = this.options;
503
- this.data = null, te.remove(e, {
494
+ this.data = null, se.remove(e, {
504
495
  type: "local",
505
496
  prefix: t
506
- }), s && se.remove(r);
497
+ }), s && ne.remove(r);
507
498
  }
508
499
  logout() {
509
500
  this.clear(), this.toLogin();
@@ -516,14 +507,14 @@ class ge {
516
507
  }
517
508
  can(e) {
518
509
  const { appName: t } = this.options, { permissions: s = {} } = this.data || {};
519
- return typeof e == "function" ? e(s) : we(e).every((i) => s[i] || s[t + "." + i]);
510
+ return typeof e == "function" ? e(s) : Se(e).every((o) => s[o] || s[t + "." + o]);
520
511
  }
521
512
  some(e) {
522
513
  const { appName: t } = this.options, { permissions: s = {} } = this.data || {};
523
- return we(e).some((i) => s[i] || s[t + "." + i]);
514
+ return Se(e).some((o) => s[o] || s[t + "." + o]);
524
515
  }
525
516
  install(e) {
526
- e.config.globalProperties.$access = this, e.provide(De, this);
517
+ e.config.globalProperties.$access = this, e.provide(ke, this);
527
518
  }
528
519
  isAuthPath(e) {
529
520
  const { auth: t, isAuth: s } = this.options;
@@ -544,7 +535,7 @@ class ge {
544
535
  setData(e) {
545
536
  const { privateKey: t } = this.options;
546
537
  if (Array.isArray(e) && t) {
547
- const s = e.map((r) => Se(r, t));
538
+ const s = e.map((r) => $e(r, t));
548
539
  try {
549
540
  this.data = JSON.parse(s.join(""));
550
541
  } catch (r) {
@@ -554,7 +545,7 @@ class ge {
554
545
  }
555
546
  if (typeof e == "string")
556
547
  try {
557
- const s = t ? Se(e, t) : e;
548
+ const s = t ? $e(e, t) : e;
558
549
  s ? this.data = JSON.parse(s) : console.warn("RSA解密失败或登录信息缺失");
559
550
  } catch (s) {
560
551
  console.warn(s);
@@ -563,7 +554,7 @@ class ge {
563
554
  this.data = e;
564
555
  }
565
556
  loadData() {
566
- const { storageKey: e, storagePrefix: t } = this.options, s = te.get(e, {
557
+ const { storageKey: e, storagePrefix: t } = this.options, s = se.get(e, {
567
558
  type: "local",
568
559
  prefix: t
569
560
  });
@@ -571,10 +562,10 @@ class ge {
571
562
  }
572
563
  isLogined() {
573
564
  const { session: e, authKey: t } = this.options;
574
- return e && t ? !!se.get(t) : !!this.getToken();
565
+ return e && t ? !!ne.get(t) : !!this.getToken();
575
566
  }
576
567
  hasRoutePermission(e) {
577
- if (e.name === D) {
568
+ if (e.name === H) {
578
569
  const t = e.params.id;
579
570
  return t && this.can(t);
580
571
  }
@@ -591,10 +582,10 @@ class ge {
591
582
  return t();
592
583
  {
593
584
  const { noPermissionMessage: s = "无权限访问", unauthorized: r = !1 } = this.options;
594
- return await this.showTip(s), H(r) ? (r(), t(!1)) : I(r) ? t(r) : t(!1);
585
+ return await this.showTip(s), z(r) ? (r(), t(!1)) : I(r) ? t(r) : t(!1);
595
586
  }
596
587
  }
597
- t(!1), await K(0), this.toLogin();
588
+ t(!1), await G(0), this.toLogin();
598
589
  }
599
590
  isWhiteList(e) {
600
591
  const { whiteList: t } = this.options;
@@ -610,7 +601,7 @@ class ge {
610
601
  }
611
602
  async showTip(e) {
612
603
  const { alert: t } = this.options;
613
- return this.isTipShowing ? !1 : t ? (this.isTipShowing = !0, await K(150), await t(e, {
604
+ return this.isTipShowing ? !1 : t ? (this.isTipShowing = !0, await G(150), await t(e, {
614
605
  title: "提示",
615
606
  type: "warning"
616
607
  })?.catch(() => !0)?.finally(() => {
@@ -628,8 +619,8 @@ class ge {
628
619
  );
629
620
  }
630
621
  }
631
- function It() {
632
- return Ie(De, null);
622
+ function At() {
623
+ return Ie(ke, null);
633
624
  }
634
625
  function Ds(n = {}) {
635
626
  const {
@@ -637,8 +628,8 @@ function Ds(n = {}) {
637
628
  loading: t,
638
629
  settings: s = {},
639
630
  Startup: r,
640
- access: i,
641
- useTitle: o,
631
+ access: o,
632
+ useTitle: i,
642
633
  alert: a
643
634
  } = n;
644
635
  let u = null;
@@ -666,16 +657,16 @@ function Ds(n = {}) {
666
657
  jsonp: Ae,
667
658
  notify: e,
668
659
  loading: t,
669
- useTitle: o,
660
+ useTitle: i,
670
661
  alert: a,
671
662
  startupComponent: r,
672
- access: i ? new ge({ alert: a, ...i }) : void 0
663
+ access: o ? new _e({ alert: a, ...o }) : void 0
673
664
  };
674
665
  }
675
- function Hs(n = {}) {
676
- return new ge(n);
666
+ function ks(n = {}) {
667
+ return new _e(n);
677
668
  }
678
- function Ft(n, e) {
669
+ function It(n, e) {
679
670
  const { jsonp: t, request: s } = e;
680
671
  if (n.method === "jsonp")
681
672
  return (r = {}) => t(n.url, {
@@ -683,7 +674,7 @@ function Ft(n, e) {
683
674
  query: r
684
675
  });
685
676
  {
686
- const r = n.headers ? B(n.headers, {}, !0) : void 0, i = {
677
+ const r = n.headers ? B(n.headers, {}, !0) : void 0, o = {
687
678
  url: n.url,
688
679
  method: n.method,
689
680
  settings: {
@@ -691,29 +682,29 @@ function Ft(n, e) {
691
682
  headers: r
692
683
  }
693
684
  };
694
- return (o, a) => (delete i.data, s.send(tt(i, a || {}, { data: o })));
685
+ return (i, a) => (delete o.data, s.send(et(o, a || {}, { data: i })));
695
686
  }
696
687
  }
697
- function kt(n, e) {
688
+ function Ft(n, e) {
698
689
  const { metaQuery: t } = e;
699
690
  if (!t) return;
700
691
  const { code: s, queryCode: r } = n;
701
- return (i, o) => {
692
+ return (o, i) => {
702
693
  if (!t) {
703
694
  console.warn("adapter.metaQuery is not defined!");
704
695
  return;
705
696
  }
706
- return t(s, r, i, o);
697
+ return t(s, r, o, i);
707
698
  };
708
699
  }
709
700
  function Ot(n = [], e = [], t) {
710
701
  const s = {};
711
702
  for (const r of n) {
712
- const i = Ft(r, t);
713
- s[r.id] = i, s[r.name] = i;
703
+ const o = It(r, t);
704
+ s[r.id] = o, s[r.name] = o;
714
705
  }
715
706
  for (const r of e)
716
- s[r.id] = kt(r, t);
707
+ s[r.id] = Ft(r, t);
717
708
  return s;
718
709
  }
719
710
  async function Mt(n = [], e = window) {
@@ -721,16 +712,16 @@ async function Mt(n = [], e = window) {
721
712
  t && (He(e), n.forEach((s) => xt(t, s)));
722
713
  }
723
714
  function Tt(n, e = window) {
724
- const t = E(n.mockTemplate) && n.mockTemplate.value ? R(n.mockTemplate, {}, !0) : void 0, s = N(e);
715
+ const t = $(n.mockTemplate) && n.mockTemplate.value ? R(n.mockTemplate, {}, !0) : void 0, s = N(e);
725
716
  return async (...r) => {
726
- let i = {};
717
+ let o = {};
727
718
  if (t)
728
719
  try {
729
- i = await t.apply(t, r);
730
- } catch (o) {
731
- O.warn("模拟数据模版异常", o);
720
+ o = await t.apply(t, r);
721
+ } catch (i) {
722
+ M.warn("模拟数据模版异常", i);
732
723
  }
733
- return s?.mock(i);
724
+ return s?.mock(o);
734
725
  };
735
726
  }
736
727
  function xt(n, e) {
@@ -738,14 +729,14 @@ function xt(n, e) {
738
729
  const { url: t, mockTemplate: s } = e;
739
730
  if (t && s)
740
731
  try {
741
- const r = oe(t) ? new URL(t).pathname : t, i = st(`(.*)${r}(.*)`), o = nt(r, { decode: decodeURIComponent }), a = B(s, {}, !0);
742
- n.mock(i, (u) => {
743
- const c = k.parse(u.url) || {}, l = u.body instanceof FormData ? rt(u.body) : u.body, f = oe(u.url) ? new URL(u.url).pathname : u.url.split("?")[0], p = o(f)?.params;
732
+ const r = ae(t) ? new URL(t).pathname : t, o = tt(`(.*)${r}(.*)`), i = st(r, { decode: decodeURIComponent }), a = B(s, {}, !0);
733
+ n.mock(o, (u) => {
734
+ const c = O.parse(u.url) || {}, l = u.body instanceof FormData ? nt(u.body) : u.body, f = ae(u.url) ? new URL(u.url).pathname : u.url.split("?")[0], p = i(f)?.params;
744
735
  Object.assign(u, { data: l, params: p, query: c });
745
736
  try {
746
737
  return n.mock(a(u));
747
738
  } catch (d) {
748
- return console.warn("[mockApi]", i, u, d), null;
739
+ return console.warn("[mockApi]", o, u, d), null;
749
740
  }
750
741
  });
751
742
  } catch (r) {
@@ -787,7 +778,7 @@ class Dt {
787
778
  const { mode: t, dsl: s, attrs: r } = e;
788
779
  this.__mode = t, s && (this.__id = s.id || null, this.__transform = s.transform || {}), r && Object.assign(this, r);
789
780
  }
790
- setup(e, t = G) {
781
+ setup(e, t = W) {
791
782
  const s = t.getCurrentInstance();
792
783
  if (!s) return;
793
784
  this.__refs = {}, this.__refCaches = {}, this.$refs = {}, this.context = {}, this.__contextRefs = {}, this.__instance = s.proxy;
@@ -801,12 +792,12 @@ class Dt {
801
792
  });
802
793
  }
803
794
  __proxy() {
804
- this.__instance && je.forEach((e) => {
795
+ this.__instance && Re.forEach((e) => {
805
796
  this[e] = this.__instance?.[e];
806
797
  });
807
798
  }
808
799
  __cleanup() {
809
- je.forEach((e) => {
800
+ Re.forEach((e) => {
810
801
  this[e] = null;
811
802
  }), this.__reset();
812
803
  }
@@ -815,7 +806,7 @@ class Dt {
815
806
  }
816
807
  __parseFunction(e) {
817
808
  if (e)
818
- if (this.__mode === _.Runtime) {
809
+ if (this.__mode === y.Runtime) {
819
810
  const { id: t, type: s } = e, r = t ? this.__transform[t] ?? e.value : e.value;
820
811
  return R({ type: s, value: r }, this);
821
812
  } else
@@ -823,32 +814,32 @@ class Dt {
823
814
  }
824
815
  __parseExpression(e) {
825
816
  if (e)
826
- if (this.__mode === _.Runtime) {
817
+ if (this.__mode === y.Runtime) {
827
818
  const { id: t, type: s } = e, r = t ? this.__transform[t] ?? e.value : e.value;
828
819
  return B({ type: s, value: r }, this);
829
820
  } else
830
821
  return B(e, this);
831
822
  }
832
823
  __ref(e = null, t) {
833
- if (this.__mode === _.VNode)
824
+ if (this.__mode === y.VNode)
834
825
  return;
835
826
  e && e !== this.__id && (this.__contextRefs[e] = this);
836
827
  let s = e ? this.__refCaches[e] : null;
837
828
  return s || (s = async (r) => {
838
- await K(0);
839
- let i = r?.$vtjEl || r?.$el || r?._?.vnode?.el || r;
840
- if (!i) {
829
+ await G(0);
830
+ let o = r?.$vtjEl || r?.$el || r?._?.vnode?.el || r;
831
+ if (!o) {
841
832
  typeof t == "string" && (delete this.$refs[t], e && delete this.__refs[e]);
842
833
  return;
843
834
  }
844
- return i.nodeType === 3 && i.nextSibling && (i = i.nextSibling), i.__vtj__ = e, _.Design === this.__mode && (i.__context__ = this, i.draggable = !0), e && (this.__refs[e] = this.__getRefEl(this.__refs, e, r)), typeof t == "function" ? t(r) : t && (this.$refs[t] = this.__getRefEl(this.$refs, t, r)), r;
835
+ return o.nodeType === 3 && o.nextSibling && (o = o.nextSibling), o.__vtj__ = e, y.Design === this.__mode && (o.__context__ = this, o.draggable = !0), e && (this.__refs[e] = this.__getRefEl(this.__refs, e, r)), typeof t == "function" ? t(r) : t && (this.$refs[t] = this.__getRefEl(this.$refs, t, r)), r;
845
836
  }, e && (this.__refCaches[e] = s), s);
846
837
  }
847
838
  __getRefEl(e, t, s) {
848
839
  const r = e[t];
849
840
  if (r && s !== r) {
850
- const i = new Set([].concat(r, s));
851
- return Array.from(i);
841
+ const o = new Set([].concat(r, s));
842
+ return Array.from(o);
852
843
  } else
853
844
  return s;
854
845
  }
@@ -860,18 +851,18 @@ class Dt {
860
851
  return s.context.__proto__ = this.context, s.__proto__ = this, s;
861
852
  }
862
853
  }
863
- function ue(n) {
854
+ function fe(n) {
864
855
  const {
865
- Vue: e = G,
866
- mode: t = _.Runtime,
856
+ Vue: e = W,
857
+ mode: t = y.Runtime,
867
858
  components: s = {},
868
859
  libs: r = {},
869
- apis: i = {},
870
- loader: o
860
+ apis: o = {},
861
+ loader: i
871
862
  } = n, a = e.computed(() => n.dsl), u = {
872
863
  $components: s,
873
864
  $libs: r,
874
- $apis: i
865
+ $apis: o
875
866
  }, c = new Dt({
876
867
  mode: t,
877
868
  dsl: a.value,
@@ -880,19 +871,19 @@ function ue(n) {
880
871
  name: a.value.name,
881
872
  __scopeId: a.value.id ? `data-v-${a.value.id}` : void 0,
882
873
  props: {
883
- ...Nt(a.value.props ?? [], c)
874
+ ...Ht(a.value.props ?? [], c)
884
875
  },
885
876
  async setup(f) {
886
- c.$props = f, c.props = f, a.value.id && me(
877
+ c.$props = f, c.props = f, a.value.id && ge(
887
878
  n.window || window,
888
879
  a.value.id,
889
880
  a.value.css || "",
890
881
  !0
891
- ), c.state = Bt(e, a.value.state ?? {}, c);
892
- const p = Lt(e, a.value.computed ?? {}, c), d = Ut(a.value.methods ?? {}, c), m = qt(e, a.value.inject, c);
893
- for (const [y, w] of Object.entries(m || {}))
894
- m[y] = e.inject(y, w);
895
- const h = Jt(
882
+ ), c.state = Nt(e, a.value.state ?? {}, c);
883
+ const p = Bt(e, a.value.computed ?? {}, c), d = Lt(a.value.methods ?? {}, c), m = qt(e, a.value.inject, c);
884
+ for (const [v, w] of Object.entries(m || {}))
885
+ m[v] = e.inject(v, w);
886
+ const h = Ut(
896
887
  a.value.dataSources || {},
897
888
  c
898
889
  ), g = {
@@ -901,46 +892,46 @@ function ue(n) {
901
892
  ...d,
902
893
  ...h
903
894
  };
904
- return c.setup(g, e), Kt(e, a.value.watch ?? [], c), {
895
+ return c.setup(g, e), Jt(e, a.value.watch ?? [], c), {
905
896
  vtj: c,
906
897
  state: c.state,
907
898
  ...p,
908
899
  ...d
909
900
  };
910
901
  },
911
- emits: Ht(a.value.emits),
902
+ emits: kt(a.value.emits),
912
903
  expose: ["vtj", ...a.value.expose || []],
913
904
  render() {
914
905
  if (!a.value.nodes) return null;
915
906
  const f = a.value.nodes || [];
916
907
  if (f.length === 1)
917
- return M(f[0], c, e, o, f);
908
+ return T(f[0], c, e, i, f);
918
909
  {
919
910
  const p = f.map(
920
- (d) => M(d, c, e, o, f)
911
+ (d) => T(d, c, e, i, f)
921
912
  );
922
913
  return e.createVNode("div", {}, p);
923
914
  }
924
915
  },
925
- ...zt(a.value.lifeCycles ?? {}, c)
916
+ ...Kt(a.value.lifeCycles ?? {}, c)
926
917
  });
927
918
  return {
928
919
  renderer: e.markRaw(l),
929
920
  context: c
930
921
  };
931
922
  }
932
- function Ht(n = []) {
923
+ function kt(n = []) {
933
924
  return n.map((e) => I(e) ? e : e.name);
934
925
  }
935
- function Nt(n = [], e) {
936
- const t = (s) => s ? (Array.isArray(s) ? s : [s]).map((i) => pt[i]) : void 0;
926
+ function Ht(n = [], e) {
927
+ const t = (s) => s ? (Array.isArray(s) ? s : [s]).map((o) => pt[o]) : void 0;
937
928
  return n.map((s) => I(s) ? {
938
929
  name: s
939
930
  } : {
940
931
  name: s.name,
941
932
  type: s.type,
942
933
  required: s.required,
943
- default: b(s.default) ? e.__parseExpression(s.default) : s.default
934
+ default: E(s.default) ? e.__parseExpression(s.default) : s.default
944
935
  }).reduce(
945
936
  (s, r) => (s[r.name] = {
946
937
  type: t(r.type),
@@ -950,24 +941,24 @@ function Nt(n = [], e) {
950
941
  {}
951
942
  );
952
943
  }
953
- function Bt(n, e, t) {
944
+ function Nt(n, e, t) {
954
945
  return n.reactive(
955
946
  Object.keys(e || {}).reduce(
956
947
  (s, r) => {
957
- let i = e[r];
958
- return b(i) ? i = t.__parseExpression(i) : E(i) && (i = t.__parseFunction(i)), s[r] = i, s;
948
+ let o = e[r];
949
+ return E(o) ? o = t.__parseExpression(o) : $(o) && (o = t.__parseFunction(o)), s[r] = o, s;
959
950
  },
960
951
  {}
961
952
  )
962
953
  );
963
954
  }
964
- function Lt(n, e, t) {
955
+ function Bt(n, e, t) {
965
956
  return Object.entries(e ?? {}).reduce(
966
- (s, [r, i]) => (s[r] = n.computed(t.__parseFunction(i)), s),
957
+ (s, [r, o]) => (s[r] = n.computed(t.__parseFunction(o)), s),
967
958
  {}
968
959
  );
969
960
  }
970
- function Ut(n, e) {
961
+ function Lt(n, e) {
971
962
  return Object.entries(n ?? {}).reduce(
972
963
  (t, [s, r]) => (t[s] = e.__parseFunction(r), t),
973
964
  {}
@@ -976,25 +967,25 @@ function Ut(n, e) {
976
967
  function qt(n, e = [], t) {
977
968
  return e.reduce(
978
969
  (s, r) => {
979
- const { name: i, from: o } = r || {};
970
+ const { name: o, from: i } = r || {};
980
971
  r.default;
981
- const a = b(o) ? t.__parseExpression(o) || i : o ?? i, u = b(r.default) ? t.__parseExpression(r.default) : r.default ?? null;
982
- return s[i] = n.inject(a, u), s;
972
+ const a = E(i) ? t.__parseExpression(i) || o : i ?? o, u = E(r.default) ? t.__parseExpression(r.default) : r.default ?? null;
973
+ return s[o] = n.inject(a, u), s;
983
974
  },
984
975
  {}
985
976
  );
986
977
  }
987
- function Jt(n, e) {
978
+ function Ut(n, e) {
988
979
  return Object.keys(n).reduce(
989
980
  (t, s) => {
990
981
  const r = n[s];
991
982
  if (r.type === "mock")
992
983
  t[s] = Tt(r);
993
984
  else if (r.ref) {
994
- const i = e.$apis[r.ref], o = E(r.transform) ? r.transform.value ? e.__parseFunction(r.transform) : void 0 : r.transform;
985
+ const o = e.$apis[r.ref], i = $(r.transform) ? r.transform.value ? e.__parseFunction(r.transform) : void 0 : r.transform;
995
986
  t[s] = async (...a) => {
996
- const u = await i.apply(e, a);
997
- return o ? o(u) : u;
987
+ const u = await o.apply(e, a);
988
+ return i ? i(u) : u;
998
989
  };
999
990
  }
1000
991
  return t;
@@ -1002,7 +993,7 @@ function Jt(n, e) {
1002
993
  {}
1003
994
  );
1004
995
  }
1005
- function Kt(n, e = [], t) {
996
+ function Jt(n, e = [], t) {
1006
997
  e.forEach((s) => {
1007
998
  n.watch(
1008
999
  t.__parseExpression(s.source),
@@ -1014,144 +1005,182 @@ function Kt(n, e = [], t) {
1014
1005
  );
1015
1006
  });
1016
1007
  }
1017
- function zt(n, e) {
1008
+ function Kt(n, e) {
1018
1009
  return Object.entries(n ?? {}).reduce(
1019
1010
  (t, [s, r]) => {
1020
- const i = e.__parseFunction(r);
1011
+ const o = e.__parseFunction(r);
1021
1012
  return t[s] = async () => {
1022
- H(i) && (await K(0), await i());
1013
+ z(o) && (await G(0), await o());
1023
1014
  }, t;
1024
1015
  },
1025
1016
  {}
1026
1017
  );
1027
1018
  }
1028
- const Ne = new it();
1029
- let ne = [], F = {}, T = {}, Q = {};
1019
+ class zt {
1020
+ __props = {};
1021
+ __events = {};
1022
+ __nodes = {};
1023
+ constructor() {
1024
+ }
1025
+ setProps(e, t) {
1026
+ this.__props[e] = t;
1027
+ }
1028
+ getProps(e) {
1029
+ return this.__props[e];
1030
+ }
1031
+ loadProps(e, t) {
1032
+ const s = e ? this.getProps(e) : null;
1033
+ return s || (e && this.setProps(e, t), t);
1034
+ }
1035
+ setEvents(e, t) {
1036
+ }
1037
+ getEvents(e) {
1038
+ return this.__events[e];
1039
+ }
1040
+ loadEvents(e, t) {
1041
+ const s = e ? this.getEvents(e) : null;
1042
+ return s || (e && this.setEvents(e, t), t);
1043
+ }
1044
+ setNode(e, t) {
1045
+ this.__nodes[e] = t;
1046
+ }
1047
+ getNode(e) {
1048
+ return this.__nodes[e];
1049
+ }
1050
+ loadNode(e, t) {
1051
+ const s = e ? this.getNode(e) : null;
1052
+ return s || (e && this.setNode(e, t), t);
1053
+ }
1054
+ isEqual(e, t) {
1055
+ return rt(e, t);
1056
+ }
1057
+ clear() {
1058
+ this.__props = {}, this.__events = {}, this.__nodes = {};
1059
+ }
1060
+ }
1061
+ const x = new zt(), Ne = new ot();
1062
+ let re = [], F = {}, D = {};
1030
1063
  const Gt = (n, e) => e;
1031
1064
  async function Be(n, e = window) {
1032
- const { urls: t = [], library: s } = n, r = t.filter((a) => W(a));
1065
+ const { urls: t = [], library: s } = n, r = t.filter((a) => X(a));
1033
1066
  if (r.length === 0 || !s) return null;
1034
- const i = t.filter((a) => V(a));
1035
- return i.length && Te(i, e), await xe(r, s, e).catch(
1067
+ const o = t.filter((a) => Q(a));
1068
+ return o.length && xe(o, e), await De(r, s, e).catch(
1036
1069
  (a) => (console.warn("loadScriptUrl error", r, s, a), null)
1037
1070
  );
1038
1071
  }
1039
- function fe(n) {
1072
+ function pe(n) {
1040
1073
  const { getDsl: e, getDslByUrl: t, options: s } = n;
1041
- return s.window && (ne.forEach((r) => {
1074
+ return s.window && (re.forEach((r) => {
1042
1075
  delete s.window[r];
1043
- }), ne = []), (r, i, o, a = G) => {
1044
- if (!o || typeof o == "string") return i;
1076
+ }), re = []), (r, o, i, a = W) => {
1077
+ if (!i || typeof i == "string") return o;
1045
1078
  let u = "";
1046
- if (o.type === "Schema" && o.id)
1047
- return u = o.id + "_" + r, T[u] || (T[u] = a.defineAsyncComponent(async () => {
1048
- const c = F[o.id] || await Ne.add(
1049
- o.id,
1050
- () => e(o.id)
1079
+ if (i.type === "Schema" && i.id)
1080
+ return u = i.id + "_" + r, D[u] || (D[u] = a.defineAsyncComponent(async () => {
1081
+ const c = F[i.id] || await Ne.add(
1082
+ i.id,
1083
+ () => e(i.id)
1051
1084
  );
1052
- return c && (c.name = i, F[o.id] = c), c ? ue({
1085
+ return c && (c.name = o, F[i.id] = c), c ? fe({
1053
1086
  Vue: a,
1054
- mode: _.Runtime,
1087
+ mode: y.Runtime,
1055
1088
  ...s,
1056
- dsl: $e(c),
1057
- loader: fe(n)
1089
+ dsl: Ee(c),
1090
+ loader: pe(n)
1058
1091
  }).renderer : null;
1059
1092
  }));
1060
- if (o.type === "UrlSchema" && o.url)
1061
- return u = o.url + "_" + r, T[u] || (T[u] = a.defineAsyncComponent(async () => {
1062
- const c = F[o.url] || await t(o.url);
1063
- return c && (c.name = i, F[o.url] = c), c ? ue({
1093
+ if (i.type === "UrlSchema" && i.url)
1094
+ return u = i.url + "_" + r, D[u] || (D[u] = a.defineAsyncComponent(async () => {
1095
+ const c = F[i.url] || await t(i.url);
1096
+ return c && (c.name = o, F[i.url] = c), c ? fe({
1064
1097
  ...s,
1065
1098
  Vue: a,
1066
- dsl: $e(c),
1067
- mode: _.Runtime,
1068
- loader: fe(n)
1099
+ dsl: Ee(c),
1100
+ mode: y.Runtime,
1101
+ loader: pe(n)
1069
1102
  }).renderer : null;
1070
1103
  }));
1071
- if (o.type === "Plugin") {
1072
- let c = o.library ? F[o.library] : null;
1073
- return c || (o.library && ne.push(o.library), c = F[o.library || Symbol()] = a.defineAsyncComponent(
1104
+ if (i.type === "Plugin") {
1105
+ let c = i.library ? F[i.library] : null;
1106
+ return c || (i.library && re.push(i.library), c = F[i.library || Symbol()] = a.defineAsyncComponent(
1074
1107
  async () => {
1075
- const l = await Be(o, s.window);
1076
- return l || (console.warn("getPlugin result is null", o), null);
1108
+ const l = await Be(i, s.window);
1109
+ return l || (console.warn("getPlugin result is null", i), null);
1077
1110
  }
1078
1111
  ), c);
1079
1112
  }
1080
- return i;
1113
+ return o;
1081
1114
  };
1082
1115
  }
1083
- function Ns() {
1084
- F = {}, T = {}, Q = {}, Ne.clearAllCache();
1085
- }
1086
- function Vt(n, e) {
1087
- Q[n] = e;
1088
- }
1089
- function Re(n) {
1090
- return Q[n];
1116
+ function Hs() {
1117
+ F = {}, D = {}, Ne.clearAllCache(), x.clear();
1091
1118
  }
1092
- function Bs() {
1093
- Q = {};
1094
- }
1095
- function M(n, e, t = G, s = Gt, r = [], i = !1) {
1119
+ function T(n, e, t = W, s = Gt, r = [], o = !1, i = 0) {
1096
1120
  if (!n || !n.name || n.invisible) return null;
1097
- const o = t.getCurrentInstance()?.appContext, { id: a = null, directives: u = [] } = n, { vIf: c, vElseIf: l, vElse: f, vFor: p, vShow: d, vModels: m, vBind: h, vHtml: g, others: y } = Le(u);
1098
- if (!i && (l || f))
1121
+ const a = t.getCurrentInstance()?.appContext, { id: u = null, directives: c = [] } = n, { vIf: l, vElseIf: f, vElse: p, vFor: d, vShow: m, vModels: h, vBind: g, vHtml: v, others: w } = Le(c);
1122
+ if (!o && (f || p))
1099
1123
  return null;
1100
- if (c && !Qt(c, e))
1101
- return ts(n, e, t, s, r);
1102
- const w = (v, S = 0) => {
1103
- const A = v.$components, X = (() => {
1124
+ if (l && !Wt(l, e))
1125
+ return es(n, e, t, s, r);
1126
+ const b = (_, C = 0) => {
1127
+ const Y = _.$components, Z = (() => {
1104
1128
  if (n.name === "component")
1105
- return Xt(v, n.props?.is);
1129
+ return Qt(_, n.props?.is);
1106
1130
  if (n.name === "slot") return n.name;
1107
- const j = s(`${n.id}_${S}`, n.name, n.from, t);
1108
- return I(j) ? jt(j) || Rt(j) ? j : A[j] ?? o?.app?.component(j) ?? j : j;
1109
- })(), C = Yt(a, n.props ?? {}, v), Ge = es(t, n.events ?? {}, v);
1131
+ const j = s(`${n.id}_${C}`, n.name, n.from, t);
1132
+ return I(j) ? jt(j) || Rt(j) ? j : Y[j] ?? a?.app?.component(j) ?? j : j;
1133
+ })(), A = Xt(u, n.props ?? {}, _), Ge = Zt(
1134
+ t,
1135
+ n.id,
1136
+ n.events ?? {},
1137
+ _
1138
+ );
1110
1139
  if (n.name === "slot")
1111
- return ss(t, n, C, v, s);
1112
- h && Object.assign(C, v.__parseExpression(h.value)), d && (C.style = Object.assign(
1113
- C.style ?? {},
1114
- rs(d, v)
1115
- )), g && Object.assign(C, is(g, v)), m.forEach((j) => {
1116
- Oe.includes(n.name) ? Object.assign(C, os(j, v)) : Object.assign(C, as(t, j, v));
1140
+ return ts(t, n, A, _, s);
1141
+ g && Object.assign(A, _.__parseExpression(g.value)), m && (A.style = Object.assign(
1142
+ A.style ?? {},
1143
+ ns(m, _)
1144
+ )), v && Object.assign(A, rs(v, _)), h.forEach((j) => {
1145
+ Me.includes(n.name) ? Object.assign(A, os(j, _)) : Object.assign(A, is(t, j, _));
1117
1146
  });
1118
- const Ve = cs(
1147
+ const Ve = as(
1119
1148
  t,
1120
1149
  n.children ?? [],
1121
- v,
1150
+ _,
1122
1151
  s,
1123
1152
  n
1124
- ), ve = v?.__id ? `data-v-${v.__id}` : void 0, We = ve ? { [ve]: "" } : {}, Qe = v.__mode === _.Design ? { "data-vtj": a } : {}, Y = `${a}_${S}`, Z = {
1125
- key: `${a}_${S}`,
1153
+ ), ye = _?.__id ? `data-v-${_.__id}` : void 0, We = ye ? { [ye]: "" } : {}, Qe = _.__mode === y.Design ? { "data-vtj": u } : {}, L = `${u}_${C}`, ee = {
1154
+ key: L,
1126
1155
  ...We,
1127
1156
  ...Qe,
1128
- ...C,
1157
+ ...A,
1129
1158
  ...Ge
1130
1159
  };
1131
- Ct(Z, Re(Y)) || Vt(Y, Z);
1132
- let ee = t.createVNode(
1133
- X,
1134
- Re(Y) || Z || {},
1160
+ x.isEqual(ee, x.getNode(L)) || x.setNode(L, ee);
1161
+ let te = t.createVNode(
1162
+ Z,
1163
+ x.getNode(L) || ee || {},
1135
1164
  Ve
1136
1165
  );
1137
- const _e = o ? Wt(o, y, v) : [];
1138
- return _e.length && (ee = t.withDirectives(ee, _e)), ee;
1166
+ const we = a ? Vt(a, w, _) : [];
1167
+ return we.length && (te = t.withDirectives(te, we)), te;
1139
1168
  };
1140
- return p ? fs(p, w, e) : w(e);
1169
+ return d ? us(d, b, e) : b(e, i);
1141
1170
  }
1142
- function Wt(n, e, t) {
1171
+ function Vt(n, e, t) {
1143
1172
  const s = n.app;
1144
1173
  return e.map((r) => {
1145
- const i = typeof r.name == "string" ? s.directive(r.name) : t.__parseExpression(r.name);
1146
- if (!i) return null;
1147
- const o = [i];
1148
- return r.value && o.push(t.__parseExpression(r.value)), r.arg && o.push(r.arg), r.modifiers && o.push(r.modifiers), o;
1174
+ const o = typeof r.name == "string" ? s.directive(r.name) : t.__parseExpression(r.name);
1175
+ if (!o) return null;
1176
+ const i = [o];
1177
+ return r.value && i.push(t.__parseExpression(r.value)), r.arg && i.push(r.arg), r.modifiers && i.push(r.modifiers), i;
1149
1178
  }).filter((r) => !!r);
1150
1179
  }
1151
1180
  function Le(n = []) {
1152
1181
  const e = n.find((l) => P(l.name) === "vIf"), t = n.find(
1153
1182
  (l) => P(l.name) === "vElseIf"
1154
- ), s = n.find((l) => P(l.name) === "vElse"), r = n.find((l) => P(l.name) === "vFor"), i = n.find((l) => P(l.name) === "vShow"), o = n.find((l) => P(l.name) === "vBind"), a = n.find((l) => P(l.name) === "vHtml"), u = n.filter(
1183
+ ), s = n.find((l) => P(l.name) === "vElse"), r = n.find((l) => P(l.name) === "vFor"), o = n.find((l) => P(l.name) === "vShow"), i = n.find((l) => P(l.name) === "vBind"), a = n.find((l) => P(l.name) === "vHtml"), u = n.filter(
1155
1184
  (l) => P(l.name) === "vModel"
1156
1185
  ), c = n.filter(
1157
1186
  (l) => !ft.includes(P(l.name))
@@ -1161,93 +1190,93 @@ function Le(n = []) {
1161
1190
  vElseIf: t,
1162
1191
  vElse: s,
1163
1192
  vFor: r,
1164
- vShow: i,
1193
+ vShow: o,
1165
1194
  vModels: u,
1166
- vBind: o,
1195
+ vBind: i,
1167
1196
  others: c,
1168
1197
  vHtml: a
1169
1198
  };
1170
1199
  }
1171
- function Qt(n, e) {
1200
+ function Wt(n, e) {
1172
1201
  return !!e.__parseExpression(n.value);
1173
1202
  }
1174
- function Xt(n, e) {
1175
- return e ? b(e) ? n.__parseExpression(e) : e : "div";
1203
+ function Qt(n, e) {
1204
+ return e ? E(e) ? n.__parseExpression(e) : e : "div";
1176
1205
  }
1177
- function Yt(n, e, t) {
1178
- const s = pe(e, t);
1206
+ function Xt(n, e, t) {
1207
+ const s = de(e, t);
1179
1208
  return s.ref = t.__ref(n, s.ref), s;
1180
1209
  }
1181
- function pe(n, e) {
1182
- return b(n) ? e.__parseExpression(n) : E(n) ? e.__parseFunction(n) : Array.isArray(n) ? n.map((t) => pe(t, e)) : typeof n == "object" ? Object.keys(n || {}).reduce(
1210
+ function de(n, e) {
1211
+ return E(n) ? e.__parseExpression(n) : $(n) ? e.__parseFunction(n) : Array.isArray(n) ? n.map((t) => de(t, e)) : typeof n == "object" ? Object.keys(n || {}).reduce(
1183
1212
  (t, s) => {
1184
1213
  let r = n[s];
1185
- return t[s] = pe(r, e), t;
1214
+ return t[s] = de(r, e), t;
1186
1215
  },
1187
1216
  {}
1188
1217
  ) : n;
1189
1218
  }
1190
- function Zt(n, e) {
1219
+ function Yt(n, e) {
1191
1220
  return (t) => {
1192
1221
  t?.key?.toLowerCase() === e.toLowerCase() && n(t);
1193
1222
  };
1194
1223
  }
1195
- function es(n, e, t) {
1196
- const s = ["passive", "capture", "once"], r = {
1224
+ function Zt(n, e, t, s) {
1225
+ const r = ["passive", "capture", "once"], o = {
1197
1226
  capture: "Capture",
1198
1227
  once: "Once",
1199
1228
  passive: "OnceCapture"
1200
1229
  };
1201
- return Object.keys(e || {}).reduce(
1202
- (i, o) => {
1203
- const a = e[o], u = Ue(a.modifiers), c = u.find((p) => s.includes(p)), l = "on" + ot(o) + (c && r[c] || ""), f = t.__parseFunction(a.handler);
1204
- return f && (i[l] = n.withModifiers(
1205
- u.includes("enter") ? Zt(f, "enter") : f,
1206
- u
1207
- )), i;
1230
+ return Object.keys(t || {}).reduce(
1231
+ (a, u) => {
1232
+ const c = t[u], l = qe(c.modifiers), f = l.find((m) => r.includes(m)), p = "on" + it(u) + (f && o[f] || ""), d = s.__parseFunction(c.handler);
1233
+ return d && (a[p] = n.withModifiers(
1234
+ l.includes("enter") ? Yt(d, "enter") : d,
1235
+ l
1236
+ )), a;
1208
1237
  },
1209
1238
  {}
1210
1239
  );
1211
1240
  }
1212
- function ts(n, e, t, s, r = []) {
1213
- let i = r.findIndex((o) => o.id === n.id);
1214
- for (let o = ++i; o < r.length; o++) {
1215
- const { directives: a = [] } = r[o], { vElseIf: u, vElse: c } = Le(a);
1241
+ function es(n, e, t, s, r = []) {
1242
+ let o = r.findIndex((i) => i.id === n.id);
1243
+ for (let i = ++o; i < r.length; i++) {
1244
+ const { directives: a = [] } = r[i], { vElseIf: u, vElse: c } = Le(a);
1216
1245
  if (u) {
1217
1246
  if (e.__parseExpression(u.value))
1218
- return M(r[o], e, t, s, r, !0);
1247
+ return T(r[i], e, t, s, r, !0);
1219
1248
  continue;
1220
1249
  }
1221
1250
  if (c)
1222
- return M(r[o], e, t, s, r, !0);
1251
+ return T(r[i], e, t, s, r, !0);
1223
1252
  }
1224
1253
  return null;
1225
1254
  }
1226
- function Ue(n = {}, e = !1) {
1255
+ function qe(n = {}, e = !1) {
1227
1256
  const t = Object.keys(n);
1228
1257
  return e ? t.map((s) => "." + s) : t;
1229
1258
  }
1230
- function ss(n, e, t, s, r) {
1231
- const { children: i } = e, o = ns(e, s), a = s.$slots?.[o.name];
1232
- return a ? a(t) : i ? I(i) ? n.createTextVNode(i) : b(i) ? n.createTextVNode(
1233
- Me(s.__parseExpression(i))
1234
- ) : Array.isArray(i) ? i.map(
1235
- (u) => M(u, s, n, r, i)
1259
+ function ts(n, e, t, s, r) {
1260
+ const { children: o } = e, i = ss(e, s), a = s.$slots?.[i.name];
1261
+ return a ? a(t) : o ? I(o) ? n.createTextVNode(o) : E(o) ? n.createTextVNode(
1262
+ Te(s.__parseExpression(o))
1263
+ ) : Array.isArray(o) ? o.map(
1264
+ (u, c) => T(u, s, n, r, o, !1, c)
1236
1265
  ) : null : null;
1237
1266
  }
1238
- function ns(n, e) {
1267
+ function ss(n, e) {
1239
1268
  const { props: t } = n, s = t?.name || "default";
1240
1269
  return {
1241
- name: b(s) ? e.__parseExpression(s) : s,
1270
+ name: E(s) ? e.__parseExpression(s) : s,
1242
1271
  params: []
1243
1272
  };
1244
1273
  }
1245
- function rs(n, e) {
1274
+ function ns(n, e) {
1246
1275
  return e.__parseExpression(n.value) ? {} : {
1247
1276
  display: "none"
1248
1277
  };
1249
1278
  }
1250
- function is(n, e) {
1279
+ function rs(n, e) {
1251
1280
  return {
1252
1281
  innerHTML: e.__parseExpression(n.value) || ""
1253
1282
  };
@@ -1260,43 +1289,51 @@ function os(n, e) {
1260
1289
  }` : "(v) => {}"
1261
1290
  };
1262
1291
  return {
1263
- [b(n.arg) ? e.__parseExpression(n.arg) : n.arg || "value"]: e.__parseExpression(n.value),
1292
+ [E(n.arg) ? e.__parseExpression(n.arg) : n.arg || "value"]: e.__parseExpression(n.value),
1264
1293
  onInput: e.__parseFunction(t)
1265
1294
  };
1266
1295
  }
1267
- function as(n, e, t) {
1296
+ function is(n, e, t) {
1268
1297
  const s = {
1269
1298
  type: "JSFunction",
1270
1299
  value: e.value?.value ? `(v) => {
1271
1300
  ${e.value.value} = v;
1272
1301
  }` : "(v) => {}"
1273
- }, r = t.__parseFunction(s), i = Ue(
1274
- b(e.modifiers) ? t.__parseExpression(e.modifiers) : e.modifiers
1275
- ), o = b(e.arg) ? t.__parseExpression(e.arg) : e.arg || "modelValue";
1302
+ }, r = t.__parseFunction(s), o = qe(
1303
+ E(e.modifiers) ? t.__parseExpression(e.modifiers) : e.modifiers
1304
+ ), i = E(e.arg) ? t.__parseExpression(e.arg) : e.arg || "modelValue";
1276
1305
  return {
1277
- [o]: t.__parseExpression(e.value),
1278
- [`onUpdate:${o}`]: i.length && r ? n.withModifiers(r, i) : r
1306
+ [i]: t.__parseExpression(e.value),
1307
+ [`onUpdate:${i}`]: o.length && r ? n.withModifiers(r, o) : r
1279
1308
  };
1280
1309
  }
1281
- function cs(n, e, t, s, r) {
1310
+ function as(n, e, t, s, r) {
1282
1311
  if (!e) return null;
1283
1312
  if (I(e))
1284
1313
  return { default: () => e };
1285
- if (b(e))
1314
+ if (E(e))
1286
1315
  return {
1287
- default: () => Me(t.__parseExpression(e))
1316
+ default: () => Te(t.__parseExpression(e))
1288
1317
  };
1289
1318
  if (Array.isArray(e) && e.length > 0) {
1290
- const i = ls(e), o = (a, u) => !a || !r ? {} : r?.id && Object.keys(a).length ? u ? {
1319
+ const o = cs(e), i = (a, u) => !a || !r ? {} : r?.id && Object.keys(a).length ? u ? {
1291
1320
  [u]: a
1292
1321
  } : {
1293
1322
  [`scope_${r.id}`]: a
1294
1323
  } : u ? { [u]: /* @__PURE__ */ Object.create(null) } : {};
1295
- return Object.entries(i).reduce(
1324
+ return Object.entries(o).reduce(
1296
1325
  (a, [u, { nodes: c, params: l, scope: f }]) => (a[u] = (p) => {
1297
- const d = l.length ? at(p ?? {}, l) : o(p, f);
1326
+ const d = l.length ? at(p ?? {}, l) : i(p, f);
1298
1327
  return c.map(
1299
- (m) => M(m, t.__clone(d), n, s, c)
1328
+ (m, h) => T(
1329
+ m,
1330
+ t.__clone(d),
1331
+ n,
1332
+ s,
1333
+ c,
1334
+ !1,
1335
+ h
1336
+ )
1300
1337
  );
1301
1338
  }, a),
1302
1339
  {}
@@ -1304,10 +1341,10 @@ function cs(n, e, t, s, r) {
1304
1341
  }
1305
1342
  return null;
1306
1343
  }
1307
- function ls(n) {
1344
+ function cs(n) {
1308
1345
  const e = {};
1309
1346
  for (const t of n) {
1310
- const s = us(t.slot), r = s.name;
1347
+ const s = ls(t.slot), r = s.name;
1311
1348
  e[r] ? (e[r].nodes.push(t), e[r].params = e[r].params.concat(s.params), e[r].scope = s.scope || "") : e[r] = {
1312
1349
  nodes: [t],
1313
1350
  params: s.params,
@@ -1316,24 +1353,24 @@ function ls(n) {
1316
1353
  }
1317
1354
  return e;
1318
1355
  }
1319
- function us(n = "default") {
1356
+ function ls(n = "default") {
1320
1357
  return I(n) ? { name: n, params: [], scope: "" } : { params: [], scope: "", ...n };
1321
1358
  }
1322
- function fs(n, e, t) {
1323
- const { value: s, iterator: r } = n, { item: i = "item", index: o = "index" } = r || {};
1359
+ function us(n, e, t) {
1360
+ const { value: s, iterator: r } = n, { item: o = "item", index: i = "index" } = r || {};
1324
1361
  let a = t.__parseExpression(s) || [];
1325
- return Number.isInteger(a) && (a = new Array(a).fill(!0).map((u, c) => c + 1)), Array.isArray(a) ? a.map((u, c) => e(t.__clone({ [i]: u, [o]: c }), c)) : (console.warn("[vForRender]:", `${s?.value} is not a Arrary`), []);
1362
+ return Number.isInteger(a) && (a = new Array(a).fill(!0).map((u, c) => c + 1)), Array.isArray(a) ? a.map((u, c) => e(t.__clone({ [o]: u, [i]: c }), c)) : (console.warn("[vForRender]:", `${s?.value} is not a Arrary`), []);
1326
1363
  }
1327
- const re = Fe({
1364
+ const oe = Fe({
1328
1365
  name: "VtjPageContainer",
1329
1366
  async setup() {
1330
- const n = Ke(), e = ke(), t = e.meta.__vtj__ || e.params.id, s = t ? n.getPage(t) : n.getHomepage(), r = s ? await n.getRenderComponent(s.id) : null, i = le(Symbol());
1367
+ const n = Ke(), e = Oe(), t = e.meta.__vtj__ || e.params.id, s = t ? n.getPage(t) : n.getHomepage(), r = s ? await n.getRenderComponent(s.id) : null, o = ue(Symbol());
1331
1368
  if (s) {
1332
1369
  Object.assign(e.meta, s.meta || {}, { cache: s.cache });
1333
- const { useTitle: o } = n?.adapter;
1334
- if (o) {
1370
+ const { useTitle: i } = n?.adapter;
1371
+ if (i) {
1335
1372
  const a = e.meta.title || s.title || "VTJ.PRO";
1336
- o(a);
1373
+ i(a);
1337
1374
  }
1338
1375
  }
1339
1376
  return {
@@ -1342,13 +1379,13 @@ const re = Fe({
1342
1379
  file: s,
1343
1380
  query: e.query,
1344
1381
  meta: e.meta,
1345
- sid: i,
1382
+ sid: o,
1346
1383
  route: e
1347
1384
  };
1348
1385
  },
1349
1386
  render() {
1350
1387
  const { component: n, query: e, sid: t } = this;
1351
- return n ? ce(n, { ...e, key: t }) : ce(
1388
+ return n ? le(n, { ...e, key: t }) : le(
1352
1389
  "div",
1353
1390
  { style: { padding: "10px" } },
1354
1391
  "找不到组件,组件不存在或未发布!"
@@ -1357,70 +1394,70 @@ const re = Fe({
1357
1394
  activated() {
1358
1395
  this.meta.cache === !1 && (this.sid = Symbol());
1359
1396
  }
1360
- }), ps = Fe({
1397
+ }), fs = Fe({
1361
1398
  name: "VtjStartupContainer",
1362
1399
  render() {
1363
- return ce("div", "page not found!");
1400
+ return le("div", "page not found!");
1364
1401
  }
1365
1402
  });
1366
- function z(n, e, t = []) {
1403
+ function V(n, e, t = []) {
1367
1404
  const s = [];
1368
1405
  for (const r of t) {
1369
- const { id: i, title: o, icon: a, children: u, hidden: c, layout: l } = r;
1406
+ const { id: o, title: i, icon: a, children: u, hidden: c, layout: l } = r;
1370
1407
  if (l) {
1371
- const f = z(n, e, u || []);
1408
+ const f = V(n, e, u || []);
1372
1409
  s.push(...f);
1373
1410
  } else {
1374
1411
  const f = {
1375
- id: i,
1376
- title: o,
1412
+ id: o,
1413
+ title: i,
1377
1414
  icon: a,
1378
1415
  hidden: c,
1379
- url: `${n}/${e}/${i}`,
1380
- children: u && u.length ? z(n, e, u) : void 0
1416
+ url: `${n}/${e}/${o}`,
1417
+ children: u && u.length ? V(n, e, u) : void 0
1381
1418
  };
1382
1419
  s.push(f);
1383
1420
  }
1384
1421
  }
1385
1422
  return s;
1386
1423
  }
1387
- function qe(n, e) {
1424
+ function Ue(n, e) {
1388
1425
  if (!e) return n;
1389
1426
  let t = [];
1390
1427
  for (const s of n)
1391
1428
  if (s.children && s.children.length) {
1392
- const r = qe(s.children, e);
1429
+ const r = Ue(s.children, e);
1393
1430
  r.length && (s.children = r, t.push(s));
1394
1431
  } else
1395
1432
  e.can(s.id.toString()) && t.push(s);
1396
1433
  return t;
1397
1434
  }
1398
- function Ls(n) {
1435
+ function Ns(n) {
1399
1436
  const {
1400
1437
  menuPathPrefix: e = "",
1401
1438
  pageRouteName: t = "page",
1402
1439
  disableMenusFilter: s = !1
1403
- } = n || {}, r = Ke(), i = ke(), o = It(), a = le(!1), u = le(!1), c = r.project, l = (d, m) => {
1440
+ } = n || {}, r = Ke(), o = Oe(), i = At(), a = ue(!1), u = ue(!1), c = r.project, l = (d, m) => {
1404
1441
  a.value = !d?.mask, u.value = m?.pure ?? !!d?.pure;
1405
1442
  };
1406
1443
  ut(() => {
1407
- const { name: d, params: m, meta: h } = i;
1408
- if (d === D) {
1444
+ const { name: d, params: m, meta: h } = o;
1445
+ if (d === H) {
1409
1446
  const g = r.getPage(m.id);
1410
1447
  l(g, h);
1411
- } else if (d === q) {
1448
+ } else if (d === J) {
1412
1449
  const g = r.getHomepage();
1413
1450
  l(g, h);
1414
1451
  } else {
1415
1452
  const g = h.__vtj__;
1416
1453
  if (g) {
1417
- const y = r.getPage(g);
1418
- l(y, h);
1454
+ const v = r.getPage(g);
1455
+ l(v, h);
1419
1456
  } else
1420
1457
  a.value = !h.mask, u.value = !!h.pure;
1421
1458
  }
1422
1459
  });
1423
- const f = z(
1460
+ const f = V(
1424
1461
  e,
1425
1462
  t,
1426
1463
  c?.pages
@@ -1430,15 +1467,15 @@ function Ls(n) {
1430
1467
  logo: p?.logo,
1431
1468
  themeSwitchable: p?.themeSwitchable,
1432
1469
  title: p?.title || c?.description || c?.name || "VTJ App",
1433
- menus: s ? f : qe(f, o),
1470
+ menus: s ? f : Ue(f, i),
1434
1471
  pure: u
1435
1472
  };
1436
1473
  }
1437
1474
  function ie(n, e) {
1438
- const { id: t, title: s, meta: r } = n, { name: i = "page", prefix: o = "", component: a, routeMeta: u } = e;
1475
+ const { id: t, title: s, meta: r } = n, { name: o = "page", prefix: i = "", component: a, routeMeta: u } = e;
1439
1476
  return {
1440
1477
  name: t,
1441
- path: `${o}${i}/${t}`,
1478
+ path: `${i}${o}/${t}`,
1442
1479
  component: a,
1443
1480
  meta: {
1444
1481
  title: s,
@@ -1448,51 +1485,51 @@ function ie(n, e) {
1448
1485
  }
1449
1486
  };
1450
1487
  }
1451
- function de(n) {
1488
+ function he(n) {
1452
1489
  const {
1453
1490
  name: e = "page",
1454
1491
  prefix: t = "",
1455
1492
  pages: s = [],
1456
1493
  component: r,
1457
- loader: i,
1458
- routeMeta: o,
1494
+ loader: o,
1495
+ routeMeta: i,
1459
1496
  homepage: a
1460
1497
  } = n, u = [];
1461
1498
  for (const c of s) {
1462
1499
  const { id: l, title: f, dir: p, layout: d, children: m, meta: h } = c;
1463
1500
  if (p) {
1464
- const g = de({
1501
+ const g = he({
1465
1502
  name: e,
1466
1503
  prefix: t,
1467
1504
  component: r,
1468
- routeMeta: o,
1505
+ routeMeta: i,
1469
1506
  homepage: a,
1470
- loader: i,
1507
+ loader: o,
1471
1508
  pages: m || []
1472
1509
  });
1473
1510
  u.push(...g);
1474
1511
  } else if (d) {
1475
- const g = de({
1512
+ const g = he({
1476
1513
  name: e,
1477
1514
  prefix: t,
1478
1515
  component: r,
1479
- routeMeta: o,
1516
+ routeMeta: i,
1480
1517
  homepage: a,
1481
- loader: i,
1518
+ loader: o,
1482
1519
  pages: m || []
1483
- }), y = {
1520
+ }), v = {
1484
1521
  name: `layout_${l}`,
1485
1522
  path: t,
1486
- component: () => i(l),
1523
+ component: () => o(l),
1487
1524
  meta: {
1488
1525
  title: f,
1489
- ...o,
1526
+ ...i,
1490
1527
  ...h,
1491
1528
  __vtj__: l
1492
1529
  },
1493
1530
  children: g
1494
1531
  };
1495
- u.push(y), u.push(ie(c, n));
1532
+ u.push(v), u.push(ie(c, n));
1496
1533
  } else if (u.push(ie(c, n)), a === l) {
1497
1534
  const g = ie(c, n);
1498
1535
  g.path = "", g.name = `home_${l}`, u.push(g);
@@ -1500,63 +1537,63 @@ function de(n) {
1500
1537
  }
1501
1538
  return u;
1502
1539
  }
1503
- function ds(n = {}, e) {
1504
- const { css: t, store: s, enhance: r } = n, { window: i, app: o, library: a = {}, adapter: u, mode: c } = e, { Pinia: l } = a;
1505
- o.config.globalProperties.$libs = a, me(i, "global-css", t || ""), l && s && hs(s, o, l), gs(o, u, n), !u.access && n.access && ms(n.access, o, c, u), ys(o, n), r && vs(r, o, a);
1540
+ function ps(n = {}, e) {
1541
+ const { css: t, store: s, enhance: r } = n, { window: o, app: i, library: a = {}, adapter: u, mode: c } = e, { Pinia: l } = a;
1542
+ i.config.globalProperties.$libs = a, ge(o, "global-css", t || ""), l && s && ds(s, i, l), ms(i, u, n), !u.access && n.access && hs(n.access, i, c, u), gs(i, n), r && _s(r, i, a);
1506
1543
  }
1507
- function hs(n, e, t) {
1544
+ function ds(n, e, t) {
1508
1545
  const s = t.createPinia();
1509
- if (e.use(s), E(n) && n.value) {
1510
- const r = R(n, {}, !1, !1, !0), i = t.defineStore("$store", r(e) || {});
1511
- e.config.globalProperties.$store = i();
1546
+ if (e.use(s), $(n) && n.value) {
1547
+ const r = R(n, {}, !1, !1, !0), o = t.defineStore("$store", r(e) || {});
1548
+ e.config.globalProperties.$store = o();
1512
1549
  }
1513
1550
  }
1514
- function ms(n, e, t, s) {
1515
- if (E(n) && n.value) {
1516
- const r = R(n, {}, !1, !1, !0), { alert: i, request: o } = s, a = new ge({
1517
- alert: i,
1551
+ function hs(n, e, t, s) {
1552
+ if ($(n) && n.value) {
1553
+ const r = R(n, {}, !1, !1, !0), { alert: o, request: i } = s, a = new _e({
1554
+ alert: o,
1518
1555
  storagePrefix: "__VTJ_APP_",
1519
1556
  ...r(e)
1520
1557
  }), u = e.config.globalProperties.$router;
1521
- a.connect({ mode: t, router: u, request: o }), e.use(a);
1558
+ a.connect({ mode: t, router: u, request: i }), e.use(a);
1522
1559
  }
1523
1560
  }
1524
- function gs(n, e, t) {
1561
+ function ms(n, e, t) {
1525
1562
  if (!e.request) return;
1526
- const { axios: s, request: r, response: i } = t;
1527
- if (s && E(s) && s.value) {
1528
- const o = R(s, {}, !1, !1, !0);
1529
- e.request.setConfig(o(n));
1563
+ const { axios: s, request: r, response: o } = t;
1564
+ if (s && $(s) && s.value) {
1565
+ const i = R(s, {}, !1, !1, !0);
1566
+ e.request.setConfig(i(n));
1530
1567
  }
1531
- if (r && E(r) && r.value) {
1532
- const o = R(r, {}, !1, !1, !0), a = e.request;
1533
- a.__unReq && a.__unReq(), a.__unReq = e.request.useRequest((u) => o(u, n));
1568
+ if (r && $(r) && r.value) {
1569
+ const i = R(r, {}, !1, !1, !0), a = e.request;
1570
+ a.__unReq && a.__unReq(), a.__unReq = e.request.useRequest((u) => i(u, n));
1534
1571
  }
1535
- if (i && E(i) && i.value) {
1536
- const o = R(i, {}, !1, !1, !0), a = e.request;
1537
- a.__unRes && a.__unRes(), a.__unRes = e.request.useResponse((u) => o(u, n));
1572
+ if (o && $(o) && o.value) {
1573
+ const i = R(o, {}, !1, !1, !0), a = e.request;
1574
+ a.__unRes && a.__unRes(), a.__unRes = e.request.useResponse((u) => i(u, n));
1538
1575
  }
1539
1576
  }
1540
- function ys(n, e) {
1577
+ function gs(n, e) {
1541
1578
  const { beforeEach: t, afterEach: s } = e, r = n.config.globalProperties.$router;
1542
- if (t && E(t) && t.value) {
1543
- const i = R(t, {}, !1, !1, !0);
1544
- r && r.beforeEach((o, a, u) => i(o, a, u, n));
1579
+ if (t && $(t) && t.value) {
1580
+ const o = R(t, {}, !1, !1, !0);
1581
+ r && r.beforeEach((i, a, u) => o(i, a, u, n));
1545
1582
  }
1546
- if (s && E(s) && s.value) {
1547
- const i = R(s, {}, !1, !1, !0);
1548
- r && r.afterEach((o, a, u) => i(o, a, u, n));
1583
+ if (s && $(s) && s.value) {
1584
+ const o = R(s, {}, !1, !1, !0);
1585
+ r && r.afterEach((i, a, u) => o(i, a, u, n));
1549
1586
  }
1550
1587
  }
1551
- function vs(n, e, t = {}) {
1552
- E(n) && n.value && R(n, {}, !1, !1, !0)(e, t);
1588
+ function _s(n, e, t = {}) {
1589
+ $(n) && n.value && R(n, {}, !1, !1, !0)(e, t);
1553
1590
  }
1554
- function _s(n, e, t) {
1591
+ function vs(n, e, t) {
1555
1592
  if (!n || !e || !t) return;
1556
1593
  const { VueI18n: s } = e;
1557
1594
  if (s) {
1558
- const { locale: r, fallbackLocale: i, messages: o = [] } = t, a = {};
1559
- for (let c of o) {
1595
+ const { locale: r, fallbackLocale: o, messages: i = [] } = t, a = {};
1596
+ for (let c of i) {
1560
1597
  const l = Object.keys(c).filter((f) => f !== "key");
1561
1598
  for (const f of l)
1562
1599
  a[f] || (a[f] = {}), a[f][c.key] = c[f];
@@ -1564,15 +1601,15 @@ function _s(n, e, t) {
1564
1601
  const u = s.createI18n({
1565
1602
  legacy: !1,
1566
1603
  locale: r,
1567
- fallbackLocale: i,
1604
+ fallbackLocale: o,
1568
1605
  messages: a
1569
1606
  });
1570
1607
  n.use(u);
1571
1608
  }
1572
1609
  }
1573
1610
  const Je = Symbol("Provider");
1574
- var ws = /* @__PURE__ */ ((n) => (n.Production = "production", n.Development = "development", n))(ws || {});
1575
- class Ss extends Xe {
1611
+ var ys = /* @__PURE__ */ ((n) => (n.Production = "production", n.Development = "development", n))(ys || {});
1612
+ class ws extends Xe {
1576
1613
  /**
1577
1614
  * 创建Provider实例
1578
1615
  * @param options 配置选项
@@ -1581,10 +1618,10 @@ class Ss extends Xe {
1581
1618
  super(), this.options = e;
1582
1619
  const {
1583
1620
  service: t,
1584
- mode: s = _.Raw,
1621
+ mode: s = y.Raw,
1585
1622
  dependencies: r,
1586
- materials: i,
1587
- project: o = {},
1623
+ materials: o,
1624
+ project: i = {},
1588
1625
  adapter: a = {},
1589
1626
  globals: u = {},
1590
1627
  modules: c = {},
@@ -1593,9 +1630,9 @@ class Ss extends Xe {
1593
1630
  nodeEnv: p = "development"
1594
1631
  /* Development */
1595
1632
  } = e;
1596
- this.mode = s, this.modules = c, this.service = t, this.router = l, this.materialPath = f, this.nodeEnv = p, r && (this.dependencies = r), i && (this.materials = i), Object.assign(this.globals, u), Object.assign(this.adapter, a);
1633
+ this.mode = s, this.modules = c, this.service = t, this.router = l, this.materialPath = f, this.nodeEnv = p, r && (this.dependencies = r), o && (this.materials = o), Object.assign(this.globals, u), Object.assign(this.adapter, a);
1597
1634
  const { access: d, request: m } = this.adapter;
1598
- d && d.connect({ mode: s, router: l, request: m }), o && s !== _.Design ? this.load(o) : this.project = o;
1635
+ d && d.connect({ mode: s, router: l, request: m }), i && s !== y.Design ? this.load(i) : this.project = i;
1599
1636
  }
1600
1637
  mode;
1601
1638
  // 当前运行模式(设计/源码/预览等)
@@ -1603,7 +1640,7 @@ class Ss extends Xe {
1603
1640
  // 全局变量
1604
1641
  modules = {};
1605
1642
  // 异步模块加载器
1606
- adapter = { request: ae, jsonp: Ae };
1643
+ adapter = { request: ce, jsonp: Ae };
1607
1644
  // 适配器接口
1608
1645
  apis = {};
1609
1646
  // API集合
@@ -1640,8 +1677,8 @@ class Ss extends Xe {
1640
1677
  if (e)
1641
1678
  try {
1642
1679
  s = await e.apply(e, t);
1643
- } catch (i) {
1644
- O.warn("模拟数据模版异常", i);
1680
+ } catch (o) {
1681
+ M.warn("模拟数据模版异常", o);
1645
1682
  }
1646
1683
  return N()?.mock(s);
1647
1684
  };
@@ -1659,8 +1696,8 @@ class Ss extends Xe {
1659
1696
  const { vtjDir: t = ".vtj" } = this.options, s = this.modules[`${t}/projects/${e.id}.json`] || this.modules[`/src/${t}/projects/${e.id}.json`];
1660
1697
  if (this.project = s ? await s() : await this.service.init(e), !this.project)
1661
1698
  throw new Error("project is null");
1662
- const { apis: r = [], meta: i = [], env: o = [] } = this.project, a = window;
1663
- a && (a.CKEDITOR_VERSION = void 0), this.initEnv(o), this.mode === _.Raw ? await this.loadDependencies(a) : await this.loadAssets(a), this.initMock(a), this.apis = Ot(r, i, this.adapter), He(a), Mt(r, a), e.platform !== "uniapp" && this.initRouter(), this.triggerReady();
1699
+ const { apis: r = [], meta: o = [], env: i = [] } = this.project, a = window;
1700
+ a && (a.CKEDITOR_VERSION = void 0), this.initEnv(i), this.mode === y.Raw ? await this.loadDependencies(a) : await this.loadAssets(a), this.initMock(a), this.apis = Ot(r, o, this.adapter), He(a), Mt(r, a), e.platform !== "uniapp" && this.initRouter(), this.triggerReady();
1664
1701
  }
1665
1702
  initMock(e) {
1666
1703
  const t = N(e);
@@ -1677,8 +1714,8 @@ class Ss extends Xe {
1677
1714
  const { dependencies: t = [] } = this.project, {
1678
1715
  dependencies: s,
1679
1716
  library: r,
1680
- components: i,
1681
- materialPath: o,
1717
+ components: o,
1718
+ materialPath: i,
1682
1719
  nodeEnv: a,
1683
1720
  libraryLocales: u
1684
1721
  } = this, {
@@ -1690,43 +1727,43 @@ class Ss extends Xe {
1690
1727
  libraryLocaleMap: m
1691
1728
  } = gt(
1692
1729
  t,
1693
- o,
1730
+ i,
1694
1731
  a === "development"
1695
1732
  /* Development */
1696
1733
  );
1697
1734
  Object.assign(this.libraryLocaleMap, m);
1698
1735
  for (const h of c) {
1699
- const g = s[h], y = e[h];
1700
- if (y)
1701
- r[h] = y;
1736
+ const g = s[h], v = e[h];
1737
+ if (v)
1738
+ r[h] = v;
1702
1739
  else if (g)
1703
1740
  e[h] = r[h] = await g();
1704
1741
  else {
1705
- const v = l[h] || [];
1706
- for (const S of v)
1707
- V(S) && await Et(S, k.append(S, { v: x })), W(S) && await Ee(k.append(S, { v: x }));
1742
+ const b = l[h] || [];
1743
+ for (const _ of b)
1744
+ Q(_) && await Et(_, O.append(_, { v: k })), X(_) && await be(O.append(_, { v: k }));
1708
1745
  r[h] = e[h];
1709
1746
  }
1710
1747
  const w = m[h];
1711
1748
  if (w) {
1712
- const v = s[w];
1713
- u[w] = v ? await v() : e[w];
1749
+ const b = s[w];
1750
+ u[w] = b ? await b() : e[w];
1714
1751
  }
1715
1752
  }
1716
1753
  if (a === "development") {
1717
1754
  for (const g of f)
1718
- await Ee(k.append(g, { v: x }));
1755
+ await be(O.append(g, { v: k }));
1719
1756
  const h = this.materials || {};
1720
1757
  for (const g of p) {
1721
- const y = e[d[g]], w = y?.default || y, v = Ye[g];
1722
- if (v)
1723
- w && v.forEach((S) => {
1724
- i[S] = w[S];
1758
+ const v = e[d[g]], w = v?.default || v, b = Ye[g];
1759
+ if (b)
1760
+ w && b.forEach((_) => {
1761
+ o[_] = w[_];
1725
1762
  });
1726
1763
  else {
1727
- const S = h[g] ? (await h[g]()).default : e[g];
1728
- S && w && (S.components || []).forEach((A) => {
1729
- i[A.name] = yt(A, w);
1764
+ const _ = h[g] ? (await h[g]()).default : e[g];
1765
+ _ && w && (_.components || []).forEach((C) => {
1766
+ o[C.name] = _t(C, w);
1730
1767
  });
1731
1768
  }
1732
1769
  }
@@ -1735,38 +1772,38 @@ class Ss extends Xe {
1735
1772
  initRouter() {
1736
1773
  const { router: e, project: t, options: s, adapter: r } = this;
1737
1774
  if (!e) return;
1738
- const i = t?.platform === "uniapp" ? "pages" : "page", {
1739
- routeAppendTo: o,
1740
- pageRouteName: a = i,
1775
+ const o = t?.platform === "uniapp" ? "pages" : "page", {
1776
+ routeAppendTo: i,
1777
+ pageRouteName: a = o,
1741
1778
  routeMeta: u
1742
- } = s, c = o ? "" : "/", l = {
1779
+ } = s, c = i ? "" : "/", l = {
1743
1780
  path: `${c}${a}/:id`,
1744
- name: D,
1745
- component: re
1781
+ name: H,
1782
+ component: oe
1746
1783
  }, f = this.getHomepage(), p = {
1747
1784
  path: c,
1748
- name: q,
1749
- component: f ? re : r.startupComponent || ps,
1785
+ name: J,
1786
+ component: f ? oe : r.startupComponent || fs,
1750
1787
  meta: u
1751
1788
  };
1752
- if (e.hasRoute(D) && e.removeRoute(D), e.hasRoute(q) && e.removeRoute(q), s.enableStaticRoute) {
1789
+ if (e.hasRoute(H) && e.removeRoute(H), e.hasRoute(J) && e.removeRoute(J), s.enableStaticRoute) {
1753
1790
  const d = t?.pages || [];
1754
- de({
1791
+ he({
1755
1792
  name: a,
1756
1793
  prefix: c,
1757
1794
  pages: d,
1758
- component: re,
1795
+ component: oe,
1759
1796
  loader: this.getRenderComponent.bind(this),
1760
1797
  homepage: f?.id
1761
1798
  }).forEach((h) => {
1762
- o ? e.addRoute(o, h) : e.addRoute(h);
1763
- }), f || (o ? e.addRoute(o, p) : e.addRoute(p));
1799
+ i ? e.addRoute(i, h) : e.addRoute(h);
1800
+ }), f || (i ? e.addRoute(i, p) : e.addRoute(p));
1764
1801
  } else
1765
- o ? (e.addRoute(o, l), e.addRoute(o, p)) : (e.addRoute(l), e.addRoute(p));
1802
+ i ? (e.addRoute(i, l), e.addRoute(i, p)) : (e.addRoute(l), e.addRoute(p));
1766
1803
  }
1767
1804
  setErrorHandler(e) {
1768
1805
  e.config.errorHandler = ct((t, s, r) => {
1769
- const i = s?.$options.name, o = typeof t == "string" ? t : t?.message || t?.msg || "未知错误", a = `[ ${i} ] ${o} ${r}`;
1806
+ const o = s?.$options.name, i = typeof t == "string" ? t : t?.message || t?.msg || "未知错误", a = `[ ${o} ] ${i} ${r}`;
1770
1807
  ["getComputedStyle", "ResizeObserver"].some((c) => a.includes(c)) || (console.error(
1771
1808
  "[VTJ Error]:",
1772
1809
  {
@@ -1789,31 +1826,31 @@ class Ss extends Xe {
1789
1826
  * @param app Vue 应用实例
1790
1827
  */
1791
1828
  install(e) {
1792
- const { libraryLocaleMap: t, libraryLocales: s } = this, { libraryOptions: r = {} } = this.options, i = e.config.globalProperties.installed || {};
1793
- for (const [o, a] of Object.entries(this.library))
1794
- if (!i[o] && bt(a)) {
1795
- const c = { locale: s[t[o]] }, l = r[o] || {}, f = { ...c, ...l };
1796
- e.use(a, f), i[o] = !0;
1829
+ const { libraryLocaleMap: t, libraryLocales: s } = this, { libraryOptions: r = {} } = this.options, o = e.config.globalProperties.installed || {};
1830
+ for (const [i, a] of Object.entries(this.library))
1831
+ if (!o[i] && bt(a)) {
1832
+ const c = { locale: s[t[i]] }, l = r[i] || {}, f = { ...c, ...l };
1833
+ e.use(a, f), o[i] = !0;
1797
1834
  }
1798
- e.provide(Je, this), e.config.globalProperties.$provider = this, e.config.globalProperties.$request = this.adapter?.request, this.options.install && e.use(this.options.install), this.adapter.access && e.use(this.adapter.access), this.project?.platform !== "uniapp" && this.mode !== _.Design && this.initGlobals(this.project?.globals || {}, {
1835
+ e.provide(Je, this), e.config.globalProperties.$provider = this, e.config.globalProperties.$request = this.adapter?.request, this.options.install && e.use(this.options.install), this.adapter.access && e.use(this.adapter.access), this.project?.platform !== "uniapp" && this.mode !== y.Design && this.initGlobals(this.project?.globals || {}, {
1799
1836
  app: e,
1800
1837
  window,
1801
1838
  adapter: this.adapter,
1802
1839
  library: this.library,
1803
1840
  mode: this.mode
1804
- }), this.mode !== _.Design && this.project?.i18n && this.initI18n(e, this.library, this.project.i18n), this.options.enhance && e.use(this.options.enhance, this), this.mode === _.Design && this.setErrorHandler(e), e.config.globalProperties.installed = i;
1841
+ }), this.mode !== y.Design && this.project?.i18n && this.initI18n(e, this.library, this.project.i18n), this.options.enhance && e.use(this.options.enhance, this), this.mode === y.Design && this.setErrorHandler(e), e.config.globalProperties.installed = o;
1805
1842
  }
1806
1843
  getFile(e) {
1807
1844
  const { blocks: t = [] } = this.project || {};
1808
1845
  return this.getPage(e) || t.find((s) => s.id === e) || null;
1809
1846
  }
1810
1847
  getPage(e) {
1811
- const { pages: t = [] } = this.project || {}, s = (r, i = []) => {
1812
- for (const o of i) {
1813
- if (o.id === r)
1814
- return o;
1815
- if (o.children && o.children.length) {
1816
- const a = s(r, o.children);
1848
+ const { pages: t = [] } = this.project || {}, s = (r, o = []) => {
1849
+ for (const i of o) {
1850
+ if (i.id === r)
1851
+ return i;
1852
+ if (i.children && i.children.length) {
1853
+ const a = s(r, i.children);
1817
1854
  if (a)
1818
1855
  return a;
1819
1856
  }
@@ -1829,16 +1866,16 @@ class Ss extends Xe {
1829
1866
  if (r.type === "page" && !r.dir && !r.layout)
1830
1867
  return r;
1831
1868
  if (r.children && r.children.length) {
1832
- const i = t(r.children);
1833
- if (i)
1834
- return i;
1869
+ const o = t(r.children);
1870
+ if (o)
1871
+ return o;
1835
1872
  }
1836
1873
  }
1837
1874
  };
1838
1875
  return t(e) || null;
1839
1876
  }
1840
1877
  getMenus(e = "page", t = "") {
1841
- return z(t, e, this.project?.pages || []);
1878
+ return V(t, e, this.project?.pages || []);
1842
1879
  }
1843
1880
  getHomepage() {
1844
1881
  const { homepage: e } = this.project || {};
@@ -1869,20 +1906,20 @@ class Ss extends Xe {
1869
1906
  * @returns 渲染器实例
1870
1907
  */
1871
1908
  createDslRenderer(e, t = {}) {
1872
- const { library: s, components: r, mode: i, apis: o } = this, a = {
1873
- mode: i,
1909
+ const { library: s, components: r, mode: o, apis: i } = this, a = {
1910
+ mode: o,
1874
1911
  Vue: s.Vue,
1875
1912
  components: r,
1876
1913
  libs: s,
1877
- apis: o,
1914
+ apis: i,
1878
1915
  window,
1879
1916
  ...t
1880
- }, u = fe({
1917
+ }, u = pe({
1881
1918
  getDsl: async (c) => await this.getDsl(c) || null,
1882
1919
  getDslByUrl: async (c) => await this.getDslByUrl(c) || null,
1883
1920
  options: a
1884
1921
  });
1885
- return ue({
1922
+ return fe({
1886
1923
  ...a,
1887
1924
  dsl: e,
1888
1925
  loader: u
@@ -1901,13 +1938,13 @@ class Ss extends Xe {
1901
1938
  async getRenderComponent(e, t) {
1902
1939
  const s = this.getFile(e);
1903
1940
  if (!s)
1904
- return O.warn(`Can not find file: ${e}`), null;
1905
- if (t && t(s), this.mode === _.Raw) {
1906
- const { vtjRawDir: i = ".vtj/vue" } = this.options, o = `${i}/${e}.vue`, a = this.modules[o] || this.modules[`/src/pages/${e}.vue`];
1941
+ return M.warn(`Can not find file: ${e}`), null;
1942
+ if (t && t(s), this.mode === y.Raw) {
1943
+ const { vtjRawDir: o = ".vtj/vue" } = this.options, i = `${o}/${e}.vue`, a = this.modules[i] || this.modules[`/src/pages/${e}.vue`];
1907
1944
  return a ? (await a())?.default : this.nodeEnv === "development" && this.adapter.startupComponent || null;
1908
1945
  }
1909
1946
  const r = await this.getDsl(s.id);
1910
- return r ? this.createDslRenderer(r).renderer : (O.warn(`Can not find dsl: ${e}`), null);
1947
+ return r ? this.createDslRenderer(r).renderer : (M.warn(`Can not find dsl: ${e}`), null);
1911
1948
  }
1912
1949
  /**
1913
1950
  * 定义基于URL的异步组件
@@ -1919,7 +1956,7 @@ class Ss extends Xe {
1919
1956
  * @returns Vue异步组件
1920
1957
  */
1921
1958
  defineUrlSchemaComponent(e, t) {
1922
- return be(async () => {
1959
+ return je(async () => {
1923
1960
  const s = await this.getDslByUrl(e);
1924
1961
  return s ? (s.name = t || s.name, this.createDslRenderer(s).renderer) : null;
1925
1962
  });
@@ -1932,7 +1969,7 @@ class Ss extends Xe {
1932
1969
  * @returns Vue异步组件
1933
1970
  */
1934
1971
  definePluginComponent(e) {
1935
- return be(async () => await Be(e, window));
1972
+ return je(async () => await Be(e, window));
1936
1973
  }
1937
1974
  /**
1938
1975
  * 设置应用全局
@@ -1947,10 +1984,10 @@ class Ss extends Xe {
1947
1984
  },
1948
1985
  t
1949
1986
  );
1950
- ds(e, s);
1987
+ ps(e, s);
1951
1988
  }
1952
1989
  initI18n(e, t, s) {
1953
- _s(e, t, s);
1990
+ vs(e, t, s);
1954
1991
  }
1955
1992
  initEnv(e = []) {
1956
1993
  this.env = e.reduce(
@@ -1959,8 +1996,8 @@ class Ss extends Xe {
1959
1996
  );
1960
1997
  }
1961
1998
  }
1962
- function Us(n) {
1963
- const e = new Ss(n);
1999
+ function Bs(n) {
2000
+ const e = new ws(n);
1964
2001
  return {
1965
2002
  provider: e,
1966
2003
  onReady: (s) => e.ready(s)
@@ -1983,10 +2020,10 @@ function Ke(n = {}) {
1983
2020
  }
1984
2021
  return e;
1985
2022
  }
1986
- async function qs(n, e = "") {
1987
- const { name: t, urls: s = [] } = n || {}, r = s.map((a) => e + a), { css: i, js: o } = vt(r);
1988
- if (i.length && Te(i), o.length)
1989
- return await xe(o, t).catch(
2023
+ async function Ls(n, e = "") {
2024
+ const { name: t, urls: s = [] } = n || {}, r = s.map((a) => e + a), { css: o, js: i } = vt(r);
2025
+ if (o.length && xe(o), i.length)
2026
+ return await De(i, t).catch(
1990
2027
  () => {
1991
2028
  }
1992
2029
  );
@@ -1997,7 +2034,7 @@ const ze = {
1997
2034
  originResponse: !1,
1998
2035
  failMessage: !0,
1999
2036
  validate: (n) => n.data?.code === 0
2000
- }, $s = (n, e = "/__vtj__/api/:type.json") => (t, s, r) => n.send({
2037
+ }, Ss = (n, e = "/__vtj__/api/:type.json") => (t, s, r) => n.send({
2001
2038
  url: e,
2002
2039
  method: "post",
2003
2040
  params: { type: t },
@@ -2007,7 +2044,7 @@ const ze = {
2007
2044
  data: s
2008
2045
  },
2009
2046
  settings: ze
2010
- }), Es = (n, e = "/__vtj__/api/uploader.json") => async (t, s) => await n.send({
2047
+ }), $s = (n, e = "/__vtj__/api/uploader.json") => async (t, s) => await n.send({
2011
2048
  url: e,
2012
2049
  method: "post",
2013
2050
  data: {
@@ -2019,7 +2056,7 @@ const ze = {
2019
2056
  type: "data"
2020
2057
  }
2021
2058
  }).then((r) => r && r[0] ? r[0] : null).catch(() => null);
2022
- function Js(n) {
2059
+ function qs(n) {
2023
2060
  return Pe({
2024
2061
  settings: {
2025
2062
  type: "json",
@@ -2033,9 +2070,9 @@ function Js(n) {
2033
2070
  }
2034
2071
  });
2035
2072
  }
2036
- class ye {
2037
- constructor(e = ae) {
2038
- this.req = e, this.api = $s(e), this.uploader = Es(e);
2073
+ class ve {
2074
+ constructor(e = ce) {
2075
+ this.req = e, this.api = Ss(e), this.uploader = $s(e);
2039
2076
  }
2040
2077
  api;
2041
2078
  pluginCaches = {};
@@ -2119,93 +2156,93 @@ class ye {
2119
2156
  return await this.api("clearStaticFiles", e).catch(() => "");
2120
2157
  }
2121
2158
  async getPluginMaterial(e) {
2122
- const { urls: t = [] } = e, s = t.filter((i) => ht(i))[0];
2159
+ const { urls: t = [] } = e, s = t.filter((o) => ht(o))[0];
2123
2160
  if (!s) return null;
2124
2161
  const r = this.pluginCaches[s];
2125
- return r || (this.pluginCaches[s] = ae.send({
2162
+ return r || (this.pluginCaches[s] = ce.send({
2126
2163
  url: s,
2127
2164
  method: "get",
2128
2165
  settings: {
2129
2166
  validSuccess: !1,
2130
2167
  originResponse: !0
2131
2168
  }
2132
- }).then((i) => i.data).catch(() => null));
2169
+ }).then((o) => o.data).catch(() => null));
2133
2170
  }
2134
2171
  async genSource(e) {
2135
2172
  return console.log("BaseService.genSource", e), "";
2136
2173
  }
2137
2174
  }
2138
- const $ = new lt({
2175
+ const S = new lt({
2139
2176
  type: "local",
2140
2177
  expired: 0,
2141
2178
  prefix: "__VTJ_"
2142
2179
  });
2143
- class Ks extends ye {
2180
+ class Us extends ve {
2144
2181
  init(e) {
2145
- const t = new J(e), s = $.get(`project_${t.id}`), r = Object.assign(t.toDsl(), s || {});
2146
- return $.save(`project_${t.id}`, r), Promise.resolve(r);
2182
+ const t = new K(e), s = S.get(`project_${t.id}`), r = Object.assign(t.toDsl(), s || {});
2183
+ return S.save(`project_${t.id}`, r), Promise.resolve(r);
2147
2184
  }
2148
2185
  saveProject(e) {
2149
- const t = new J(e);
2150
- return $.save(`project_${t.id}`, t.toDsl()), Promise.resolve(!0);
2186
+ const t = new K(e);
2187
+ return S.save(`project_${t.id}`, t.toDsl()), Promise.resolve(!0);
2151
2188
  }
2152
2189
  saveMaterials(e, t) {
2153
- return $.save(`materials_${e.id}`, he(t)), Promise.resolve(!0);
2190
+ return S.save(`materials_${e.id}`, me(t)), Promise.resolve(!0);
2154
2191
  }
2155
2192
  saveFile(e) {
2156
- return $.save(`file_${e.id}`, e), Promise.resolve(!0);
2193
+ return S.save(`file_${e.id}`, e), Promise.resolve(!0);
2157
2194
  }
2158
2195
  getFile(e) {
2159
- const t = $.get(`file_${e}`);
2196
+ const t = S.get(`file_${e}`);
2160
2197
  return t ? Promise.resolve(t) : Promise.reject(null);
2161
2198
  }
2162
2199
  removeFile(e) {
2163
- return $.remove(`file_${e}`), Promise.resolve(!0);
2200
+ return S.remove(`file_${e}`), Promise.resolve(!0);
2164
2201
  }
2165
2202
  saveHistory(e) {
2166
- return $.save(`history_${e.id}`, e), Promise.resolve(!0);
2203
+ return S.save(`history_${e.id}`, e), Promise.resolve(!0);
2167
2204
  }
2168
2205
  removeHistory(e) {
2169
- const t = $.get(`history_${e}`);
2206
+ const t = S.get(`history_${e}`);
2170
2207
  if (t) {
2171
- const r = (t.items || []).map((i) => i.id);
2172
- this.removeHistoryItem(e, r), $.remove(`history_${e}`);
2208
+ const r = (t.items || []).map((o) => o.id);
2209
+ this.removeHistoryItem(e, r), S.remove(`history_${e}`);
2173
2210
  }
2174
2211
  return Promise.resolve(!0);
2175
2212
  }
2176
2213
  getHistory(e) {
2177
- const t = $.get(`history_${e}`), s = new Ce(t || { id: e });
2214
+ const t = S.get(`history_${e}`), s = new Ce(t || { id: e });
2178
2215
  return Promise.resolve(s.toDsl());
2179
2216
  }
2180
2217
  getHistoryItem(e, t) {
2181
- const s = $.get(`history_${e}_${t}`);
2218
+ const s = S.get(`history_${e}_${t}`);
2182
2219
  return Promise.resolve(s);
2183
2220
  }
2184
2221
  saveHistoryItem(e, t) {
2185
- return $.save(`history_${e}_${t.id}`, t), Promise.resolve(!0);
2222
+ return S.save(`history_${e}_${t.id}`, t), Promise.resolve(!0);
2186
2223
  }
2187
2224
  removeHistoryItem(e, t) {
2188
2225
  return t.forEach((s) => {
2189
- $.remove(`history_${e}_${s}`);
2226
+ S.remove(`history_${e}_${s}`);
2190
2227
  }), Promise.resolve(!0);
2191
2228
  }
2192
2229
  }
2193
- class bs extends ye {
2230
+ class Es extends ve {
2194
2231
  projects = {};
2195
2232
  materials = {};
2196
2233
  files = {};
2197
2234
  histories = {};
2198
2235
  historyItems = {};
2199
2236
  init(e) {
2200
- const t = new J(e), s = this.projects[t.id] || {}, r = Object.assign(t.toDsl(), s);
2237
+ const t = new K(e), s = this.projects[t.id] || {}, r = Object.assign(t.toDsl(), s);
2201
2238
  return this.projects[r.id] = r, Promise.resolve(r);
2202
2239
  }
2203
2240
  saveProject(e) {
2204
- const t = new J(e);
2241
+ const t = new K(e);
2205
2242
  return this.projects[t.id] = t.toDsl(), Promise.resolve(!0);
2206
2243
  }
2207
2244
  saveMaterials(e, t) {
2208
- return e.id && (this.materials[e.id] = he(t)), Promise.resolve(!0);
2245
+ return e.id && (this.materials[e.id] = me(t)), Promise.resolve(!0);
2209
2246
  }
2210
2247
  saveFile(e) {
2211
2248
  return this.files[e.id] = e, Promise.resolve(!0);
@@ -2223,7 +2260,7 @@ class bs extends ye {
2223
2260
  removeHistory(e) {
2224
2261
  const t = this.histories[e];
2225
2262
  if (t) {
2226
- const r = (t.items || []).map((i) => i.id);
2263
+ const r = (t.items || []).map((o) => o.id);
2227
2264
  this.removeHistoryItem(e, r), delete this.historyItems[e];
2228
2265
  }
2229
2266
  return Promise.resolve(!0);
@@ -2248,10 +2285,10 @@ class bs extends ye {
2248
2285
  }
2249
2286
  }
2250
2287
  let U = null;
2251
- function zs() {
2252
- return U || (U = new bs(), U);
2288
+ function Js() {
2289
+ return U || (U = new Es(), U);
2253
2290
  }
2254
- class Gs extends ye {
2291
+ class Ks extends ve {
2255
2292
  getFileCaches = {};
2256
2293
  async getExtension() {
2257
2294
  return await this.api("getExtension", {}).catch(() => {
@@ -2268,7 +2305,7 @@ class Gs extends ye {
2268
2305
  async saveMaterials(e, t) {
2269
2306
  return !!await this.api("saveMaterials", {
2270
2307
  project: e,
2271
- materials: he(t)
2308
+ materials: me(t)
2272
2309
  }).catch(() => !1);
2273
2310
  }
2274
2311
  async saveFile(e) {
@@ -2309,75 +2346,73 @@ class Gs extends ye {
2309
2346
  }
2310
2347
  }
2311
2348
  export {
2312
- Fs as ACCESS,
2313
- De as ACCESS_KEY,
2314
- ge as Access,
2349
+ Is as ACCESS,
2350
+ ke as ACCESS_KEY,
2351
+ _e as Access,
2315
2352
  dt as BUILD_IN_TAGS,
2316
2353
  ft as BUILT_IN_DIRECTIVES,
2317
- ye as BaseService,
2318
- je as CONTEXT_HOST,
2354
+ ve as BaseService,
2355
+ Re as CONTEXT_HOST,
2319
2356
  Dt as Context,
2320
- _ as ContextMode,
2357
+ y as ContextMode,
2321
2358
  pt as DATA_TYPES,
2322
- q as HOMEPAGE_ROUTE_NAME,
2323
- Oe as HTML_TAGS,
2359
+ J as HOMEPAGE_ROUTE_NAME,
2360
+ Me as HTML_TAGS,
2324
2361
  xs as JSCodeToString,
2325
- As as LIFE_CYCLES_LIST,
2326
- Gs as LocalService,
2327
- bs as MemoryService,
2328
- ws as NodeEnv,
2329
- D as PAGE_ROUTE_NAME,
2330
- Ss as Provider,
2331
- Is as REMOTE,
2332
- Ks as StorageService,
2333
- x as VTJ_RENDERER_VERSION,
2362
+ Ps as LIFE_CYCLES_LIST,
2363
+ Ks as LocalService,
2364
+ Es as MemoryService,
2365
+ ys as NodeEnv,
2366
+ H as PAGE_ROUTE_NAME,
2367
+ ws as Provider,
2368
+ As as REMOTE,
2369
+ Us as StorageService,
2370
+ k as VTJ_RENDERER_VERSION,
2334
2371
  Ms as adoptStylesToInline,
2335
- me as adoptedStyleSheets,
2336
- Ns as clearLoaderCache,
2337
- Bs as clearNodeCache,
2338
- _t as compileScopedCSS,
2372
+ ge as adoptedStyleSheets,
2373
+ Hs as clearLoaderCache,
2374
+ yt as compileScopedCSS,
2339
2375
  $t as convertCssRpx,
2340
- Hs as createAccess,
2376
+ ks as createAccess,
2341
2377
  Ds as createAdapter,
2342
- ks as createAssetScripts,
2378
+ Fs as createAssetScripts,
2343
2379
  Os as createAssetsCss,
2344
- Jt as createDataSources,
2345
- fe as createLoader,
2346
- zs as createMemoryService,
2347
- z as createMenus,
2348
- kt as createMetaApi,
2380
+ Ut as createDataSources,
2381
+ pe as createLoader,
2382
+ Js as createMemoryService,
2383
+ V as createMenus,
2384
+ Ft as createMetaApi,
2349
2385
  Tt as createMock,
2350
- Us as createProvider,
2351
- ue as createRenderer,
2352
- Ft as createSchemaApi,
2386
+ Bs as createProvider,
2387
+ fe as createRenderer,
2388
+ It as createSchemaApi,
2353
2389
  Ot as createSchemaApis,
2354
- Js as createServiceRequest,
2390
+ qs as createServiceRequest,
2355
2391
  Gt as defaultLoader,
2356
- L as fillBasePath,
2392
+ q as fillBasePath,
2357
2393
  N as getMock,
2358
- Ue as getModifiers,
2359
- Re as getNodeCache,
2394
+ qe as getModifiers,
2360
2395
  Be as getPlugin,
2361
- yt as getRawComponent,
2396
+ _t as getRawComponent,
2362
2397
  jt as isBuiltInTag,
2363
- V as isCSSUrl,
2364
- Ct as isEqualValue,
2365
- Pt as isJSCode,
2366
- b as isJSExpression,
2367
- E as isJSFunction,
2398
+ Q as isCSSUrl,
2399
+ Ct as isJSCode,
2400
+ E as isJSExpression,
2401
+ $ as isJSFunction,
2368
2402
  ht as isJSON,
2369
- W as isJSUrl,
2403
+ X as isJSUrl,
2370
2404
  Rt as isNativeTag,
2371
2405
  bt as isVuePlugin,
2372
2406
  Et as loadCss,
2373
- Te as loadCssUrl,
2374
- qs as loadEnhance,
2375
- xe as loadScriptUrl,
2376
- qe as menusFilter,
2407
+ xe as loadCssUrl,
2408
+ Ls as loadEnhance,
2409
+ De as loadScriptUrl,
2410
+ Ue as menusFilter,
2377
2411
  xt as mockApi,
2378
2412
  Mt as mockApis,
2379
2413
  He as mockCleanup,
2380
- M as nodeRender,
2414
+ x as nodeCache,
2415
+ T as nodeRender,
2381
2416
  gt as parseDeps,
2382
2417
  B as parseExpression,
2383
2418
  R as parseFunction,
@@ -2385,10 +2420,9 @@ export {
2385
2420
  Je as providerKey,
2386
2421
  mt as removeProdFlag,
2387
2422
  St as rpxToPx,
2388
- Vt as setNodeCache,
2389
2423
  Ts as setupPageSetting,
2390
- Me as toString,
2391
- It as useAccess,
2392
- Ls as useMask,
2424
+ Te as toString,
2425
+ At as useAccess,
2426
+ Ns as useMask,
2393
2427
  Ke as useProvider
2394
2428
  };