@vtj/renderer 0.8.172 → 0.9.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,20 +1,19 @@
1
- import { Base as Ee, BUILT_IN_COMPONENTS as Pe, ProjectModel as I, HistoryModel as re } from "@vtj/core";
2
- import { isUrl as Re, url as R, dedupArray as be, isString as $, isFunction as Y, logger as O, createRequest as Ce, merge as Fe, pathToRegexp as Ae, pathToRegexpMatch as Ie, formDataToJson as Oe, storage as T, cookie as k, toArray as Q, unRSA as X, delay as oe, camelCase as j, upperFirst as xe, pick as De, jsonp as Me, loadScript as Z, Request as He, Storage as Te, mapToObject as q } from "@vtj/utils";
3
- import * as D from "vue";
4
- import { inject as ie, toRef as ke, readonly as Ue, customRef as Be, ref as J, onBeforeUnmount as Ne, getCurrentScope as Le, onScopeDispose as qe, unref as Je, getCurrentInstance as ae, watch as ce, computed as ue, onMounted as Ve, defineComponent as le, h as B, defineAsyncComponent as ee, watchEffect as ze } from "vue";
5
- import { useRoute as fe } from "vue-router";
6
- import { ElNotification as M, ElLoading as Ke } from "element-plus";
7
- import { XStartup as We } from "@vtj/ui";
1
+ import { Base as xe, BUILT_IN_COMPONENTS as Re, ProjectModel as A, HistoryModel as ce } from "@vtj/core";
2
+ import { isUrl as ke, url as x, dedupArray as Ce, isString as j, isFunction as ee, logger as I, createRequest as Fe, merge as Ae, pathToRegexp as Ie, pathToRegexpMatch as Oe, formDataToJson as De, storage as B, cookie as U, toArray as te, unRSA as se, delay as le, camelCase as $, upperFirst as Me, pick as Te, jsonp as He, loadScript as ne, Request as Be, Storage as Ue, mapToObject as z } from "@vtj/utils";
3
+ import * as M from "vue";
4
+ import { inject as ue, toRef as Ne, readonly as Le, customRef as qe, ref as O, unref as Je, getCurrentInstance as de, onBeforeUnmount as Ve, getCurrentScope as ze, onScopeDispose as Ke, watch as pe, onMounted as We, computed as fe, defineComponent as K, h as q, openBlock as Ge, createElementBlock as Ye, createElementVNode as b, toDisplayString as N, defineAsyncComponent as re, watchEffect as Qe } from "vue";
5
+ import { ElLoading as Xe, ElNotification as T } from "element-plus";
6
+ import { useRoute as he } from "vue-router";
8
7
  /**!
9
8
  * Copyright (c) 2024, VTJ.PRO All rights reserved.
10
9
  * @name @vtj/renderer
11
10
  * @author CHC chenhuachun1549@dingtalk.com
12
- * @version 0.8.172
11
+ * @version 0.9.0-alpha.0
13
12
  * @license <a href="https://vtj.pro/license.html">MIT License</a>
14
13
  */
15
- const b = "0.8.172";
14
+ const R = "0.9.0-alpha.0";
16
15
  var _ = /* @__PURE__ */ ((n) => (n.Runtime = "Runtime", n.Design = "Design", n.Raw = "Raw", n.VNode = "VNode", n))(_ || {});
17
- const te = [
16
+ const oe = [
18
17
  "$el",
19
18
  "$emit",
20
19
  "$nextTick",
@@ -26,7 +25,7 @@ const te = [
26
25
  "$props",
27
26
  "$options",
28
27
  "$forceUpdate"
29
- ], ls = [
28
+ ], _s = [
30
29
  "beforeCreate",
31
30
  "created",
32
31
  "beforeMount",
@@ -40,7 +39,7 @@ const te = [
40
39
  "renderTriggered",
41
40
  "activated",
42
41
  "deactivated"
43
- ], Ge = ["vIf", "vShow", "vModel", "vFor", "vBind"], Ye = {
42
+ ], Ze = ["vIf", "vShow", "vModel", "vFor", "vBind"], et = {
44
43
  String,
45
44
  Number,
46
45
  Boolean,
@@ -48,65 +47,65 @@ const te = [
48
47
  Object,
49
48
  Function,
50
49
  Date
51
- }, de = "VtjPage", Qe = "VtjHomepage";
52
- function F(n, e) {
53
- return n.map((t) => Re(t) || t.startsWith("/") ? t : `${e}${t}`);
50
+ }, W = "VtjPage", me = "VtjHomepage";
51
+ function C(n, e) {
52
+ return n.map((t) => ke(t) || t.startsWith("/") ? t : `${e}${t}`);
54
53
  }
55
- function V(n) {
54
+ function G(n) {
56
55
  return /\.css$/.test(n);
57
56
  }
58
- function z(n) {
57
+ function Y(n) {
59
58
  return /\.js$/.test(n);
60
59
  }
61
- function Xe(n) {
60
+ function tt(n) {
62
61
  return /\.json$/.test(n);
63
62
  }
64
- function fs(n) {
63
+ function ws(n) {
65
64
  return n.map(
66
- (e) => `<script src="${R.append(e, { v: b })}"><\/script>`
65
+ (e) => `<script src="${x.append(e, { v: R })}"><\/script>`
67
66
  ).join("");
68
67
  }
69
- function ds(n = []) {
68
+ function Ss(n = []) {
70
69
  return n.map(
71
- (e) => `<link rel="stylesheet" href="${R.append(e, { v: b })}" />`
70
+ (e) => `<link rel="stylesheet" href="${x.append(e, { v: R })}" />`
72
71
  ).join("");
73
72
  }
74
- function Ze(n, e = !1) {
73
+ function st(n, e = !1) {
75
74
  return e && n.endsWith(".prod.js") ? n.replace(".prod.js", ".js") : n;
76
75
  }
77
- function et(n, e, t = !1) {
78
- const s = n.filter((f) => !!f.enabled), r = [], o = [], a = [], i = [], u = {}, c = {}, p = [], l = {};
76
+ function nt(n, e, t = !1) {
77
+ const s = n.filter((u) => !!u.enabled), r = [], o = [], a = [], i = [], c = {}, l = {}, f = [], d = {};
79
78
  return s.forEach(
80
- ({ urls: f, assetsUrl: m, library: d, assetsLibrary: h, localeLibrary: w }) => {
81
- f?.forEach((v) => {
82
- z(v) && r.push(Ze(v, t)), V(v) && o.push(v);
83
- }), d && (i.push(d), u[d] = F(f || [], e), w && (c[d] = w)), m && a.push(m), h && p.push(h), d && h && (l[h] = d);
79
+ ({ urls: u, assetsUrl: m, library: p, assetsLibrary: h, localeLibrary: w }) => {
80
+ u?.forEach((g) => {
81
+ Y(g) && r.push(st(g, t)), G(g) && o.push(g);
82
+ }), p && (i.push(p), c[p] = C(u || [], e), w && (l[p] = w)), m && a.push(m), h && f.push(h), p && h && (d[h] = p);
84
83
  }
85
84
  ), {
86
- scripts: F(r, e),
87
- css: F(o, e),
88
- materials: F(a, e),
85
+ scripts: C(r, e),
86
+ css: C(o, e),
87
+ materials: C(a, e),
89
88
  libraryExports: i,
90
- materialExports: be(p),
91
- materialMapLibrary: l,
92
- libraryMap: u,
93
- libraryLocaleMap: c
89
+ materialExports: Ce(f),
90
+ materialMapLibrary: d,
91
+ libraryMap: c,
92
+ libraryLocaleMap: l
94
93
  };
95
94
  }
96
- function tt(n, e) {
95
+ function rt(n, e) {
97
96
  const { name: t, parent: s, alias: r } = n;
98
97
  return s ? e[s]?.[r || t] : e[r || t];
99
98
  }
100
- function pe(n) {
101
- return $(n) ? n : JSON.stringify(n);
99
+ function ge(n) {
100
+ return j(n) ? n : JSON.stringify(n);
102
101
  }
103
- function he(n, e, t) {
102
+ function ve(n, e, t) {
104
103
  const s = n.CSSStyleSheet;
105
104
  if (s.prototype.replaceSync) {
106
105
  const r = new s();
107
106
  r.id = e, r.replaceSync(t);
108
107
  const o = n.document, a = o.adoptedStyleSheets, i = Array.from(a).filter(
109
- (u) => u.id !== e
108
+ (c) => c.id !== e
110
109
  );
111
110
  o.adoptedStyleSheets = [...i, r];
112
111
  } else {
@@ -115,11 +114,11 @@ function he(n, e, t) {
115
114
  o ? o.innerHTML = t : (o = r.createElement("style"), o.id = e, o.innerHTML = t, r.head.appendChild(o));
116
115
  }
117
116
  }
118
- async function st(n, e) {
117
+ async function ot(n, e) {
119
118
  const t = await window.fetch(e).then((s) => s.text()).catch(() => "");
120
- t && he(window, n, t);
119
+ t && ve(window, n, t);
121
120
  }
122
- function nt(n, e = window) {
121
+ function it(n, e = window) {
123
122
  const t = e.document, s = e.document.head;
124
123
  for (const r of n)
125
124
  if (!t.getElementById(r)) {
@@ -127,40 +126,40 @@ function nt(n, e = window) {
127
126
  a.rel = "stylesheet", a.id = r, a.href = r, s.appendChild(a);
128
127
  }
129
128
  }
130
- async function rt(n, e, t = window) {
129
+ async function at(n, e, t = window) {
131
130
  const s = t.document, r = t.document.head;
132
131
  let o = t[e];
133
132
  return o ? o.default || o : new Promise((a, i) => {
134
- for (const u of n) {
135
- const c = s.createElement("script");
136
- c.src = u, c.onload = () => {
133
+ for (const c of n) {
134
+ const l = s.createElement("script");
135
+ l.src = c, l.onload = () => {
137
136
  o = t[e], o ? a(o.default || o) : i(null);
138
- }, c.onerror = (p) => {
139
- i(p);
140
- }, r.appendChild(c);
137
+ }, l.onerror = (f) => {
138
+ i(f);
139
+ }, r.appendChild(l);
141
140
  }
142
141
  });
143
142
  }
144
- function ot(n) {
145
- return Y(n) || Y(n?.install);
143
+ function ct(n) {
144
+ return ee(n) || ee(n?.install);
146
145
  }
147
- function C(n, e, t = !1, s = !1) {
146
+ function k(n, e, t = !1, s = !1) {
148
147
  try {
149
148
  const r = ['"use strict";', "var __self = arguments[0];"];
150
149
  r.push("return ");
151
150
  let o = (n.value || "").trim();
152
- o = o.replace(/this(\W|$)/g, (i, u) => `__self${u}`), o = r.join(`
151
+ o = o.replace(/this(\W|$)/g, (i, c) => `__self${c}`), o = r.join(`
153
152
  `) + o;
154
153
  const a = `with(${t ? "{}" : "$scope || {}"}) { ${o} }`;
155
154
  return new Function("$scope", a)(e);
156
155
  } catch (r) {
157
- if (O.error("parseExpression.error", r, n, e?.__self ?? e), s)
156
+ if (I.error("parseExpression.error", r, n, e?.__self ?? e), s)
158
157
  throw r;
159
158
  }
160
159
  }
161
- function se(n, e, t = !1, s = !1) {
162
- const r = C(n, e, t, s);
163
- if (typeof r != "function" && (O.error(
160
+ function ie(n, e, t = !1, s = !1) {
161
+ const r = k(n, e, t, s);
162
+ if (typeof r != "function" && (I.error(
164
163
  "parseFunction.error",
165
164
  "not a function",
166
165
  n,
@@ -175,14 +174,14 @@ function S(n) {
175
174
  function H(n) {
176
175
  return typeof n == "object" && n && n.type === "JSFunction";
177
176
  }
178
- function it(n) {
177
+ function lt(n) {
179
178
  return S(n) || H(n);
180
179
  }
181
- function ps(n) {
182
- return it(n) ? n.value : JSON.stringify(n);
180
+ function js(n) {
181
+ return lt(n) ? n.value : JSON.stringify(n);
183
182
  }
184
183
  let E = null;
185
- const at = Ce({
184
+ const ut = Fe({
186
185
  settings: {
187
186
  type: "form",
188
187
  validSuccess: !0,
@@ -191,12 +190,12 @@ const at = Ce({
191
190
  validate: (n) => n.data?.code === 0 || !!n.data?.success,
192
191
  failMessage: !0,
193
192
  showError: (n) => {
194
- M.error({
193
+ T.error({
195
194
  message: n || "未知错误"
196
195
  });
197
196
  },
198
197
  showLoading: () => {
199
- E && E.close(), E = Ke.service({
198
+ E && E.close(), E = Xe.service({
200
199
  lock: !0,
201
200
  text: "Loading",
202
201
  background: "rgba(0, 0, 0, 0.05)"
@@ -208,7 +207,7 @@ const at = Ce({
208
207
  }
209
208
  });
210
209
  let P;
211
- function ct(n, e) {
210
+ function dt(n, e) {
212
211
  const { jsonp: t, request: s } = e;
213
212
  if (n.method === "jsonp")
214
213
  return (r = {}) => t(n.url, {
@@ -216,7 +215,7 @@ function ct(n, e) {
216
215
  query: r
217
216
  });
218
217
  {
219
- const r = n.headers ? C(n.headers, {}, !0) : void 0, o = {
218
+ const r = n.headers ? k(n.headers, {}, !0) : void 0, o = {
220
219
  url: n.url,
221
220
  method: n.method,
222
221
  settings: {
@@ -224,10 +223,10 @@ function ct(n, e) {
224
223
  headers: r
225
224
  }
226
225
  };
227
- return (a, i) => (delete o.data, s.send(Fe(o, i || {}, { data: a })));
226
+ return (a, i) => (delete o.data, s.send(Ae(o, i || {}, { data: a })));
228
227
  }
229
228
  }
230
- function ut(n, e) {
229
+ function pt(n, e) {
231
230
  const { metaQuery: t } = e;
232
231
  if (!t) return;
233
232
  const { code: s, queryCode: r } = n;
@@ -239,34 +238,34 @@ function ut(n, e) {
239
238
  return t(s, r, o, a);
240
239
  };
241
240
  }
242
- function lt(n = [], e = [], t) {
241
+ function ft(n = [], e = [], t) {
243
242
  const s = {};
244
243
  for (const r of n)
245
- s[r.id] = ct(r, t);
244
+ s[r.id] = dt(r, t);
246
245
  for (const r of e)
247
- s[r.id] = ut(r, t);
246
+ s[r.id] = pt(r, t);
248
247
  return s;
249
248
  }
250
- async function ft(n = []) {
249
+ async function ht(n = []) {
251
250
  P = await import("mockjs").then((e) => e.default || e), P && (P.setup({
252
251
  timeout: "50-500"
253
- }), me(), n.forEach((e) => dt(P, e)));
252
+ }), ye(), n.forEach((e) => mt(P, e)));
254
253
  }
255
- function dt(n, e) {
254
+ function mt(n, e) {
256
255
  if (!e.mock) return;
257
256
  const { url: t, mockTemplate: s } = e;
258
257
  if (t && s) {
259
- const r = Ae(`${t}(.*)`), o = Ie(t, { decode: decodeURIComponent }), a = C(s, {}, !0);
258
+ const r = Ie(`${t}(.*)`), o = Oe(t, { decode: decodeURIComponent }), a = k(s, {}, !0);
260
259
  n.mock(r, (i) => {
261
- const u = R.parse(i.url) || {}, c = i.body instanceof FormData ? Oe(i.body) : i.body, p = o(i.url)?.params;
262
- return Object.assign(i, { data: c, params: u, query: p }), n.mock(a(i));
260
+ const c = x.parse(i.url) || {}, l = i.body instanceof FormData ? De(i.body) : i.body, f = o(i.url)?.params;
261
+ return Object.assign(i, { data: l, params: c, query: f }), n.mock(a(i));
263
262
  });
264
263
  }
265
264
  }
266
- function me() {
265
+ function ye() {
267
266
  P && (P._mocked = {});
268
267
  }
269
- const pt = {
268
+ const gt = {
270
269
  session: !1,
271
270
  authKey: "Authorization",
272
271
  storageKey: "ACCESS_STORAGE",
@@ -277,13 +276,13 @@ const pt = {
277
276
  unauthorizedCode: 401,
278
277
  unauthorizedMessage: "登录已经失效,请重新登录!",
279
278
  noPermissionMessage: "无权限访问该页面"
280
- }, ve = Symbol("access");
281
- class hs {
279
+ }, _e = Symbol("access");
280
+ class $s {
282
281
  options;
283
282
  data = null;
284
283
  mode = _.Raw;
285
284
  constructor(e) {
286
- this.options = Object.assign({}, pt, e), this.loadData();
285
+ this.options = Object.assign({}, gt, e), this.loadData();
287
286
  }
288
287
  connect(e) {
289
288
  const { mode: t, router: s, request: r } = e;
@@ -291,17 +290,17 @@ class hs {
291
290
  }
292
291
  login(e) {
293
292
  const { storageKey: t, storagePrefix: s, session: r, authKey: o } = this.options;
294
- this.setData(e), this.data && (T.save(t, e, {
293
+ this.setData(e), this.data && (B.save(t, e, {
295
294
  type: "local",
296
295
  prefix: s
297
- }), r && k.set(o, this.data.token));
296
+ }), r && U.set(o, this.data.token));
298
297
  }
299
298
  clear() {
300
299
  const { storageKey: e, storagePrefix: t, session: s, authKey: r } = this.options;
301
- this.data = null, T.remove(e, {
300
+ this.data = null, B.remove(e, {
302
301
  type: "local",
303
302
  prefix: t
304
- }), s && k.remove(r);
303
+ }), s && U.remove(r);
305
304
  }
306
305
  logout() {
307
306
  this.clear(), this.toLogin();
@@ -309,16 +308,19 @@ class hs {
309
308
  getData() {
310
309
  return this.data;
311
310
  }
311
+ getToken() {
312
+ return this.data?.token;
313
+ }
312
314
  can(e) {
313
315
  const { permissions: t = {} } = this.data || {};
314
- return typeof e == "function" ? e(t) : Q(e).every((r) => t[r]);
316
+ return typeof e == "function" ? e(t) : te(e).every((r) => t[r]);
315
317
  }
316
318
  some(e) {
317
319
  const { permissions: t = {} } = this.data || {};
318
- return Q(e).some((r) => t[r]);
320
+ return te(e).some((r) => t[r]);
319
321
  }
320
322
  install(e) {
321
- e.config.globalProperties.$access || (e.config.globalProperties.$access = this), e.provide(ve, this);
323
+ e.config.globalProperties.$access || (e.config.globalProperties.$access = this), e.provide(_e, this);
322
324
  }
323
325
  isAuthPath(e) {
324
326
  const { auth: t, isAuth: s } = this.options;
@@ -339,13 +341,13 @@ class hs {
339
341
  setData(e) {
340
342
  const { privateKey: t } = this.options;
341
343
  if (Array.isArray(e) && t) {
342
- const s = e.map((r) => X(r, t));
344
+ const s = e.map((r) => se(r, t));
343
345
  this.data = JSON.parse(s.join(""));
344
346
  return;
345
347
  }
346
348
  if (typeof e == "string")
347
349
  try {
348
- const s = t ? X(e, t) : e;
350
+ const s = t ? se(e, t) : e;
349
351
  s ? this.data = JSON.parse(s) : console.warn("RSA解密失败或登录信息缺失");
350
352
  } catch (s) {
351
353
  console.warn(s);
@@ -354,7 +356,7 @@ class hs {
354
356
  this.data = e;
355
357
  }
356
358
  loadData() {
357
- const { storageKey: e, storagePrefix: t } = this.options, s = T.get(e, {
359
+ const { storageKey: e, storagePrefix: t } = this.options, s = B.get(e, {
358
360
  type: "local",
359
361
  prefix: t
360
362
  });
@@ -362,10 +364,10 @@ class hs {
362
364
  }
363
365
  isLogined() {
364
366
  const { session: e, authKey: t } = this.options;
365
- return e && t ? !!k.get(t) : !!this.data;
367
+ return e && t ? !!U.get(t) : !!this.data;
366
368
  }
367
369
  hasRoutePermission(e) {
368
- if (e.name === de) {
370
+ if (e.name === W) {
369
371
  const t = e.params.id;
370
372
  return t && this.can(t);
371
373
  }
@@ -401,7 +403,7 @@ class hs {
401
403
  }
402
404
  async showTip(e) {
403
405
  const { alert: t } = this.options;
404
- t && (await oe(150), await t(e, {
406
+ t && (await le(150), await t(e, {
405
407
  title: "提示",
406
408
  type: "warning"
407
409
  }).catch((s) => s));
@@ -416,10 +418,10 @@ class hs {
416
418
  );
417
419
  }
418
420
  }
419
- function ht() {
420
- return ie(ve, null);
421
+ function vt() {
422
+ return ue(_e, null);
421
423
  }
422
- class mt {
424
+ class yt {
423
425
  __id = null;
424
426
  __mode;
425
427
  __instance = null;
@@ -448,7 +450,7 @@ class mt {
448
450
  const { mode: t, dsl: s, attrs: r } = e;
449
451
  this.__mode = t, s && (this.__id = s.id || null, this.__transform = s.transform || {}), r && Object.assign(this, r);
450
452
  }
451
- setup(e, t = D) {
453
+ setup(e, t = M) {
452
454
  const s = t.getCurrentInstance();
453
455
  if (!s) return;
454
456
  this.__refs = {}, this.$refs = {}, this.context = {}, this.__contextRefs = {}, this.__instance = s.proxy;
@@ -462,12 +464,12 @@ class mt {
462
464
  });
463
465
  }
464
466
  __proxy() {
465
- this.__instance && te.forEach((e) => {
467
+ this.__instance && oe.forEach((e) => {
466
468
  this[e] = this.__instance?.[e];
467
469
  });
468
470
  }
469
471
  __cleanup() {
470
- te.forEach((e) => {
472
+ oe.forEach((e) => {
471
473
  this[e] = null;
472
474
  });
473
475
  }
@@ -475,22 +477,22 @@ class mt {
475
477
  if (e)
476
478
  if (this.__mode === _.Runtime) {
477
479
  const { id: t, type: s } = e, r = t ? this.__transform[t] ?? e.value : e.value;
478
- return se({ type: s, value: r }, this);
480
+ return ie({ type: s, value: r }, this);
479
481
  } else
480
- return se(e, this);
482
+ return ie(e, this);
481
483
  }
482
484
  __parseExpression(e) {
483
485
  if (e)
484
486
  if (this.__mode === _.Runtime) {
485
487
  const { id: t, type: s } = e, r = t ? this.__transform[t] ?? e.value : e.value;
486
- return C({ type: s, value: r }, this);
488
+ return k({ type: s, value: r }, this);
487
489
  } else
488
- return C(e, this);
490
+ return k(e, this);
489
491
  }
490
492
  __ref(e = null, t) {
491
493
  if (this.__mode !== _.VNode)
492
494
  return e && e !== this.__id && (this.__contextRefs[e] = this), async (s) => {
493
- await oe(0);
495
+ await le(0);
494
496
  let r = s?.$vtjEl || s?.$el || s?._?.vnode?.el || s;
495
497
  if (!r) {
496
498
  typeof t == "string" && (delete this.$refs[t], e && delete this.__refs[e]);
@@ -517,66 +519,66 @@ class mt {
517
519
  return s.context.__proto__ = this.context, s.__proto__ = this, s;
518
520
  }
519
521
  }
520
- function N(n) {
522
+ function J(n) {
521
523
  const {
522
- Vue: e = D,
524
+ Vue: e = M,
523
525
  mode: t = _.Runtime,
524
526
  components: s = {},
525
527
  libs: r = {},
526
528
  apis: o = {},
527
529
  loader: a
528
- } = n, i = e.computed(() => n.dsl), u = {
530
+ } = n, i = e.computed(() => n.dsl), c = {
529
531
  $components: s,
530
532
  $libs: r,
531
533
  $apis: o
532
- }, c = new mt({
534
+ }, l = new yt({
533
535
  mode: t,
534
536
  dsl: i.value,
535
- attrs: u
536
- }), p = e.defineComponent({
537
+ attrs: c
538
+ }), f = e.defineComponent({
537
539
  name: i.value.name,
538
540
  props: {
539
- ...gt(i.value.props ?? [], c)
541
+ ...wt(i.value.props ?? [], l)
540
542
  },
541
- setup(l) {
542
- c.$props = l, c.props = l, i.value.id && he(
543
+ setup(d) {
544
+ l.$props = d, l.props = d, i.value.id && ve(
543
545
  n.window || window,
544
546
  i.value.id,
545
547
  i.value.css || ""
546
- ), c.state = yt(e, i.value.state ?? {}, c);
547
- const f = _t(e, i.value.computed ?? {}, c), m = wt(i.value.methods ?? {}, c), d = St(e, i.value.inject, c), h = $t(
548
+ ), l.state = St(e, i.value.state ?? {}, l);
549
+ const u = jt(e, i.value.computed ?? {}, l), m = $t(i.value.methods ?? {}, l), p = bt(e, i.value.inject, l), h = Et(
548
550
  i.value.dataSources || {},
549
- c
551
+ l
550
552
  ), w = {
551
- ...d,
552
- ...f,
553
+ ...p,
554
+ ...u,
553
555
  ...m,
554
556
  ...h
555
557
  };
556
- return c.setup(w, e), jt(e, i.value.watch ?? [], c), {
557
- vtj: c
558
+ return l.setup(w, e), Pt(e, i.value.watch ?? [], l), {
559
+ vtj: l
558
560
  };
559
561
  },
560
- emits: vt(i.value.emits),
562
+ emits: _t(i.value.emits),
561
563
  expose: ["vtj"],
562
564
  render() {
563
565
  if (!i.value.nodes) return null;
564
- const l = i.value.nodes || [];
565
- return l.length === 1 ? x(l[0], c, e, a) : l.map((f) => x(f, c, e, a));
566
+ const d = i.value.nodes || [];
567
+ return d.length === 1 ? D(d[0], l, e, a) : d.map((u) => D(u, l, e, a));
566
568
  },
567
- ...Et(i.value.lifeCycles ?? {}, c)
569
+ ...xt(i.value.lifeCycles ?? {}, l)
568
570
  });
569
571
  return {
570
- renderer: e.markRaw(p),
571
- context: c
572
+ renderer: e.markRaw(f),
573
+ context: l
572
574
  };
573
575
  }
574
- function vt(n = []) {
575
- return n.map((e) => $(e) ? e : e.name);
576
+ function _t(n = []) {
577
+ return n.map((e) => j(e) ? e : e.name);
576
578
  }
577
- function gt(n = [], e) {
578
- const t = (s) => s ? (Array.isArray(s) ? s : [s]).map((o) => Ye[o]) : void 0;
579
- return n.map((s) => $(s) ? {
579
+ function wt(n = [], e) {
580
+ const t = (s) => s ? (Array.isArray(s) ? s : [s]).map((o) => et[o]) : void 0;
581
+ return n.map((s) => j(s) ? {
580
582
  name: s
581
583
  } : {
582
584
  name: s.name,
@@ -592,7 +594,7 @@ function gt(n = [], e) {
592
594
  {}
593
595
  );
594
596
  }
595
- function yt(n, e, t) {
597
+ function St(n, e, t) {
596
598
  return n.reactive(
597
599
  Object.keys(e || {}).reduce(
598
600
  (s, r) => {
@@ -603,42 +605,42 @@ function yt(n, e, t) {
603
605
  )
604
606
  );
605
607
  }
606
- function _t(n, e, t) {
608
+ function jt(n, e, t) {
607
609
  return Object.entries(e ?? {}).reduce(
608
610
  (s, [r, o]) => (s[r] = n.computed(t.__parseFunction(o)), s),
609
611
  {}
610
612
  );
611
613
  }
612
- function wt(n, e) {
614
+ function $t(n, e) {
613
615
  return Object.entries(n ?? {}).reduce(
614
616
  (t, [s, r]) => (t[s] = e.__parseFunction(r), t),
615
617
  {}
616
618
  );
617
619
  }
618
- function St(n, e = [], t) {
620
+ function bt(n, e = [], t) {
619
621
  return e.reduce(
620
622
  (s, r) => {
621
623
  const { name: o, from: a } = r || {};
622
624
  r.default;
623
- const i = S(a) ? t.__parseExpression(a) || o : a ?? o, u = S(r.default) ? t.__parseExpression(r.default) : r.default ?? null;
624
- return s[o] = n.inject(i, u), s;
625
+ const i = S(a) ? t.__parseExpression(a) || o : a ?? o, c = S(r.default) ? t.__parseExpression(r.default) : r.default ?? null;
626
+ return s[o] = n.inject(i, c), s;
625
627
  },
626
628
  {}
627
629
  );
628
630
  }
629
- function $t(n, e) {
631
+ function Et(n, e) {
630
632
  return Object.keys(n).reduce(
631
633
  (t, s) => {
632
634
  const r = n[s], o = e.$apis[r.ref], a = H(r.transform) ? r.transform.value ? e.__parseFunction(r.transform) : void 0 : r.transform;
633
635
  return t[s] = async (...i) => {
634
- const u = await o.apply(e, i);
635
- return a ? a(u) : u;
636
+ const c = await o.apply(e, i);
637
+ return a ? a(c) : c;
636
638
  }, t;
637
639
  },
638
640
  {}
639
641
  );
640
642
  }
641
- function jt(n, e = [], t) {
643
+ function Pt(n, e = [], t) {
642
644
  e.forEach((s) => {
643
645
  n.watch(
644
646
  t.__parseExpression(s.source),
@@ -650,84 +652,84 @@ function jt(n, e = [], t) {
650
652
  );
651
653
  });
652
654
  }
653
- function Et(n, e) {
655
+ function xt(n, e) {
654
656
  return Object.entries(n ?? {}).reduce(
655
657
  (t, [s, r]) => (t[s] = e.__parseFunction(r), t),
656
658
  {}
657
659
  );
658
660
  }
659
- let U = [];
660
- const Pt = (n) => n;
661
- async function ge(n, e = window) {
662
- const { urls: t = [], library: s } = n, r = t.filter((i) => z(i));
661
+ let L = [];
662
+ const Rt = (n) => n;
663
+ async function we(n, e = window) {
664
+ const { urls: t = [], library: s } = n, r = t.filter((i) => Y(i));
663
665
  if (r.length === 0 || !s) return null;
664
- const o = t.filter((i) => V(i));
665
- return o.length && nt(o, e), await rt(r, s, e).catch(
666
+ const o = t.filter((i) => G(i));
667
+ return o.length && it(o, e), await at(r, s, e).catch(
666
668
  (i) => (console.warn("loadScriptUrl error", r, s, i), null)
667
669
  );
668
670
  }
669
- function L(n) {
671
+ function V(n) {
670
672
  const { getDsl: e, getDslByUrl: t, options: s } = n;
671
- return s.window && (U.forEach((r) => {
673
+ return s.window && (L.forEach((r) => {
672
674
  delete s.window[r];
673
- }), U = []), (r, o, a = D) => !o || typeof o == "string" ? r : o.type === "Schema" && o.id ? a.defineAsyncComponent(async () => {
675
+ }), L = []), (r, o, a = M) => !o || typeof o == "string" ? r : o.type === "Schema" && o.id ? a.defineAsyncComponent(async () => {
674
676
  const i = await e(o.id);
675
- return i && (i.name = r), i ? N({
677
+ return i && (i.name = r), i ? J({
676
678
  ...s,
677
679
  Vue: a,
678
680
  dsl: i,
679
681
  mode: _.Runtime,
680
- loader: L(n)
682
+ loader: V(n)
681
683
  }).renderer : null;
682
684
  }) : o.type === "UrlSchema" && o.url ? a.defineAsyncComponent(async () => {
683
685
  const i = await t(o.url);
684
- return i && (i.name = r), i ? N({
686
+ return i && (i.name = r), i ? J({
685
687
  ...s,
686
688
  Vue: a,
687
689
  dsl: i,
688
690
  mode: _.Runtime,
689
- loader: L(n)
691
+ loader: V(n)
690
692
  }).renderer : null;
691
- }) : o.type === "Plugin" ? (o.library && U.push(o.library), a.defineAsyncComponent(async () => {
692
- const i = await ge(o, s.window);
693
+ }) : o.type === "Plugin" ? (o.library && L.push(o.library), a.defineAsyncComponent(async () => {
694
+ const i = await we(o, s.window);
693
695
  return i || (console.warn("getPlugin result is null", o), null);
694
696
  })) : r;
695
697
  }
696
- function x(n, e, t = D, s = Pt) {
698
+ function D(n, e, t = M, s = Rt) {
697
699
  if (!n || !n.name || n.invisible) return null;
698
- const { id: r = null, directives: o = [] } = n, { vIf: a, vFor: i, vShow: u, vModels: c, vBind: p } = Rt(o);
699
- if (a && !bt(a, e))
700
+ const { id: r = null, directives: o = [] } = n, { vIf: a, vFor: i, vShow: c, vModels: l, vBind: f } = kt(o);
701
+ if (a && !Ct(a, e))
700
702
  return null;
701
- const l = (f) => {
702
- const m = f.$components, d = (() => {
703
+ const d = (u) => {
704
+ const m = u.$components, p = (() => {
703
705
  if (n.name === "component")
704
- return Ct(f, n.props?.is);
706
+ return Ft(u, n.props?.is);
705
707
  if (n.name === "slot") return n.name;
706
- const g = s(n.name, n.from, t);
707
- return $(g) ? m[g] ?? g : g;
708
- })(), h = Ft(r, n.props ?? {}, f), w = At(t, n.events ?? {}, f);
708
+ const v = s(n.name, n.from, t);
709
+ return j(v) ? m[v] ?? v : v;
710
+ })(), h = At(r, n.props ?? {}, u), w = It(t, n.events ?? {}, u);
709
711
  if (n.name === "slot")
710
- return It(t, n, h, f, s);
711
- p && Object.assign(h, f.__parseExpression(p.value)), u && (h.style = Object.assign(
712
+ return Ot(t, n, h, u, s);
713
+ f && Object.assign(h, u.__parseExpression(f.value)), c && (h.style = Object.assign(
712
714
  h.style ?? {},
713
- xt(u, f)
714
- )), c.forEach((g) => {
715
- Object.assign(h, Dt(t, g, f));
715
+ Mt(c, u)
716
+ )), l.forEach((v) => {
717
+ Object.assign(h, Tt(t, v, u));
716
718
  });
717
- const v = Mt(
719
+ const g = Ht(
718
720
  t,
719
721
  n.children ?? [],
720
- f,
722
+ u,
721
723
  s,
722
724
  n
723
725
  );
724
- return t.createVNode(d, { ...h, ...w }, v);
726
+ return t.createVNode(p, { ...h, ...w }, g);
725
727
  };
726
- return i ? kt(i, l, e) : l(e);
728
+ return i ? Nt(i, d, e) : d(e);
727
729
  }
728
- function Rt(n = []) {
729
- const e = n.find((i) => j(i.name) === "vIf"), t = n.find((i) => j(i.name) === "vFor"), s = n.find((i) => j(i.name) === "vShow"), r = n.find((i) => j(i.name) === "vBind"), o = n.filter((i) => j(i.name) === "vModel"), a = n.filter(
730
- (i) => !Ge.includes(j(i.name))
730
+ function kt(n = []) {
731
+ const e = n.find((i) => $(i.name) === "vIf"), t = n.find((i) => $(i.name) === "vFor"), s = n.find((i) => $(i.name) === "vShow"), r = n.find((i) => $(i.name) === "vBind"), o = n.filter((i) => $(i.name) === "vModel"), a = n.filter(
732
+ (i) => !Ze.includes($(i.name))
731
733
  );
732
734
  return {
733
735
  vIf: e,
@@ -738,13 +740,13 @@ function Rt(n = []) {
738
740
  others: a
739
741
  };
740
742
  }
741
- function bt(n, e) {
743
+ function Ct(n, e) {
742
744
  return !!e.__parseExpression(n.value);
743
745
  }
744
- function Ct(n, e) {
746
+ function Ft(n, e) {
745
747
  return e ? S(e) ? n.__parseExpression(e) : e : "div";
746
748
  }
747
- function Ft(n, e, t) {
749
+ function At(n, e, t) {
748
750
  const s = Object.keys(e || {}).reduce(
749
751
  (r, o) => {
750
752
  let a = e[o];
@@ -754,7 +756,7 @@ function Ft(n, e, t) {
754
756
  );
755
757
  return s.ref = t.__ref(n, s.ref), s;
756
758
  }
757
- function At(n, e, t) {
759
+ function It(n, e, t) {
758
760
  const s = ["passive", "capture", "once"], r = {
759
761
  capture: "Capture",
760
762
  once: "Once",
@@ -762,70 +764,70 @@ function At(n, e, t) {
762
764
  };
763
765
  return Object.keys(e || {}).reduce(
764
766
  (o, a) => {
765
- const i = e[a], u = ye(i.modifiers), c = u.find((f) => s.includes(f)), p = "on" + xe(a) + (c && r[c] || ""), l = t.__parseFunction(i.handler);
766
- return l && (o[p] = n.withModifiers(l, u)), o;
767
+ const i = e[a], c = Se(i.modifiers), l = c.find((u) => s.includes(u)), f = "on" + Me(a) + (l && r[l] || ""), d = t.__parseFunction(i.handler);
768
+ return d && (o[f] = n.withModifiers(d, c)), o;
767
769
  },
768
770
  {}
769
771
  );
770
772
  }
771
- function ye(n = {}, e = !1) {
773
+ function Se(n = {}, e = !1) {
772
774
  const t = Object.keys(n);
773
775
  return e ? t.map((s) => "." + s) : t;
774
776
  }
775
- function It(n, e, t, s, r) {
776
- const { children: o } = e, a = Ot(e, s), i = s.$slots?.[a.name];
777
- return i ? i(t) : o ? $(o) ? n.createTextVNode(o) : S(o) ? n.createTextVNode(
778
- pe(s.__parseExpression(o))
777
+ function Ot(n, e, t, s, r) {
778
+ const { children: o } = e, a = Dt(e, s), i = s.$slots?.[a.name];
779
+ return i ? i(t) : o ? j(o) ? n.createTextVNode(o) : S(o) ? n.createTextVNode(
780
+ ge(s.__parseExpression(o))
779
781
  ) : Array.isArray(o) ? o.map(
780
- (u) => x(u, s, n, r)
782
+ (c) => D(c, s, n, r)
781
783
  ) : null : null;
782
784
  }
783
- function Ot(n, e) {
785
+ function Dt(n, e) {
784
786
  const { props: t } = n, s = t?.name || "default";
785
787
  return {
786
788
  name: S(s) ? e.__parseExpression(s) : s,
787
789
  params: []
788
790
  };
789
791
  }
790
- function xt(n, e) {
792
+ function Mt(n, e) {
791
793
  return e.__parseExpression(n.value) ? {} : {
792
794
  display: "none"
793
795
  };
794
796
  }
795
- function Dt(n, e, t) {
797
+ function Tt(n, e, t) {
796
798
  const s = {
797
799
  type: "JSFunction",
798
800
  value: e.value?.value ? `(v) => {
799
801
  ${e.value.value} = v;
800
802
  }` : "(v) => {}"
801
- }, r = t.__parseFunction(s), o = ye(e.modifiers), a = S(e.arg) ? t.__parseExpression(e.arg) : e.arg || "modelValue";
803
+ }, r = t.__parseFunction(s), o = Se(e.modifiers), a = S(e.arg) ? t.__parseExpression(e.arg) : e.arg || "modelValue";
802
804
  return {
803
805
  [a]: t.__parseExpression(e.value),
804
806
  [`onUpdate:${a}`]: o.length && r ? n.withModifiers(r, o) : r
805
807
  };
806
808
  }
807
- function Mt(n, e, t, s, r) {
809
+ function Ht(n, e, t, s, r) {
808
810
  if (!e) return null;
809
- if ($(e))
811
+ if (j(e))
810
812
  return { default: () => e };
811
813
  if (S(e))
812
814
  return {
813
- default: () => pe(t.__parseExpression(e))
815
+ default: () => ge(t.__parseExpression(e))
814
816
  };
815
817
  if (Array.isArray(e) && e.length > 0) {
816
- const o = Ht(e), a = (i) => !i || !r ? {} : r?.id && Object.keys(i).length ? {
818
+ const o = Bt(e), a = (i) => !i || !r ? {} : r?.id && Object.keys(i).length ? {
817
819
  [`scope_${r.id}`]: i
818
820
  } : {};
819
- return Object.entries(o).reduce((i, [u, { nodes: c, params: p }]) => (i[u] = (l) => {
820
- const f = p.length ? De(l ?? {}, p) : a(l);
821
- return c.map(
822
- (m) => x(m, t.__clone(f), n, s)
821
+ return Object.entries(o).reduce((i, [c, { nodes: l, params: f }]) => (i[c] = (d) => {
822
+ const u = f.length ? Te(d ?? {}, f) : a(d);
823
+ return l.map(
824
+ (m) => D(m, t.__clone(u), n, s)
823
825
  );
824
826
  }, i), {});
825
827
  }
826
828
  return null;
827
829
  }
828
- function Ht(n) {
830
+ function Bt(n) {
829
831
  const e = {
830
832
  default: {
831
833
  params: [],
@@ -833,7 +835,7 @@ function Ht(n) {
833
835
  }
834
836
  };
835
837
  for (const t of n) {
836
- const s = Tt(t.slot), r = s.name;
838
+ const s = Ut(t.slot), r = s.name;
837
839
  e[r] ? (e[r].nodes.push(t), e[r].params = e[r].params.concat(s.params)) : e[r] = {
838
840
  nodes: [t],
839
841
  params: s.params
@@ -841,128 +843,243 @@ function Ht(n) {
841
843
  }
842
844
  return e;
843
845
  }
844
- function Tt(n = "default") {
845
- return $(n) ? { name: n, params: [] } : { params: [], ...n };
846
+ function Ut(n = "default") {
847
+ return j(n) ? { name: n, params: [] } : { params: [], ...n };
846
848
  }
847
- function kt(n, e, t) {
849
+ function Nt(n, e, t) {
848
850
  const { value: s, iterator: r } = n, { item: o = "item", index: a = "index" } = r || {};
849
851
  let i = t.__parseExpression(s) || [];
850
- return Number.isInteger(i) && (i = new Array(i).fill(!0).map((u, c) => c + 1)), Array.isArray(i) ? i.map((u, c) => e(t.__clone({ [o]: u, [a]: c }))) : (console.warn("[vForRender]:", `${s?.value} is not a Arrary`), []);
852
+ return Number.isInteger(i) && (i = new Array(i).fill(!0).map((c, l) => l + 1)), Array.isArray(i) ? i.map((c, l) => e(t.__clone({ [o]: c, [a]: l }))) : (console.warn("[vForRender]:", `${s?.value} is not a Arrary`), []);
851
853
  }
852
- function Ut(n) {
853
- return Le() ? (qe(n), !0) : !1;
854
+ function Lt(n) {
855
+ return ze() ? (Ke(n), !0) : !1;
854
856
  }
855
- function K(n) {
857
+ function Q(n) {
856
858
  return typeof n == "function" ? n() : Je(n);
857
859
  }
858
- const _e = typeof window < "u" && typeof document < "u";
860
+ const je = typeof window < "u" && typeof document < "u";
859
861
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
860
- const Bt = (n) => n != null, Nt = () => {
862
+ const qt = (n) => n != null, Jt = () => {
861
863
  };
862
- function Lt(n) {
863
- return ae();
864
+ function Vt(n) {
865
+ return de();
864
866
  }
865
- function qt(...n) {
867
+ function zt(...n) {
866
868
  if (n.length !== 1)
867
- return ke(...n);
869
+ return Ne(...n);
868
870
  const e = n[0];
869
- return typeof e == "function" ? Ue(Be(() => ({ get: e, set: Nt }))) : J(e);
871
+ return typeof e == "function" ? Le(qe(() => ({ get: e, set: Jt }))) : O(e);
870
872
  }
871
- function Jt(n, e) {
872
- Lt() && Ne(n, e);
873
+ function Kt(n, e) {
874
+ Vt() && Ve(n, e);
873
875
  }
874
- const Vt = _e ? window : void 0, zt = _e ? window.document : void 0;
875
- function Kt(n) {
876
+ const Wt = je ? window : void 0, Gt = je ? window.document : void 0;
877
+ function Yt(n) {
876
878
  var e;
877
- const t = K(n);
879
+ const t = Q(n);
878
880
  return (e = t?.$el) != null ? e : t;
879
881
  }
880
- function Wt() {
881
- const n = J(!1), e = ae();
882
- return e && Ve(() => {
882
+ function Qt() {
883
+ const n = O(!1), e = de();
884
+ return e && We(() => {
883
885
  n.value = !0;
884
886
  }, e), n;
885
887
  }
886
- function Gt(n) {
887
- const e = Wt();
888
- return ue(() => (e.value, !!n()));
888
+ function Xt(n) {
889
+ const e = Qt();
890
+ return fe(() => (e.value, !!n()));
889
891
  }
890
- function Yt(n, e, t = {}) {
891
- const { window: s = Vt, ...r } = t;
892
+ function Zt(n, e, t = {}) {
893
+ const { window: s = Wt, ...r } = t;
892
894
  let o;
893
- const a = Gt(() => s && "MutationObserver" in s), i = () => {
895
+ const a = Xt(() => s && "MutationObserver" in s), i = () => {
894
896
  o && (o.disconnect(), o = void 0);
895
- }, u = ue(() => {
896
- const f = K(n), m = (Array.isArray(f) ? f : [f]).map(Kt).filter(Bt);
897
+ }, c = fe(() => {
898
+ const u = Q(n), m = (Array.isArray(u) ? u : [u]).map(Yt).filter(qt);
897
899
  return new Set(m);
898
- }), c = ce(
899
- () => u.value,
900
- (f) => {
901
- i(), a.value && f.size && (o = new MutationObserver(e), f.forEach((m) => o.observe(m, r)));
900
+ }), l = pe(
901
+ () => c.value,
902
+ (u) => {
903
+ i(), a.value && u.size && (o = new MutationObserver(e), u.forEach((m) => o.observe(m, r)));
902
904
  },
903
905
  { immediate: !0, flush: "post" }
904
- ), p = () => o?.takeRecords(), l = () => {
905
- c(), i();
906
+ ), f = () => o?.takeRecords(), d = () => {
907
+ l(), i();
906
908
  };
907
- return Ut(l), {
909
+ return Lt(d), {
908
910
  isSupported: a,
909
- stop: l,
910
- takeRecords: p
911
+ stop: d,
912
+ takeRecords: f
911
913
  };
912
914
  }
913
- function Qt(n = null, e = {}) {
915
+ function es(n = null, e = {}) {
914
916
  var t, s, r;
915
917
  const {
916
- document: o = zt,
917
- restoreOnUnmount: a = (l) => l
918
- } = e, i = (t = o?.title) != null ? t : "", u = qt((s = n ?? o?.title) != null ? s : null), c = n && typeof n == "function";
919
- function p(l) {
918
+ document: o = Gt,
919
+ restoreOnUnmount: a = (d) => d
920
+ } = e, i = (t = o?.title) != null ? t : "", c = zt((s = n ?? o?.title) != null ? s : null), l = n && typeof n == "function";
921
+ function f(d) {
920
922
  if (!("titleTemplate" in e))
921
- return l;
922
- const f = e.titleTemplate || "%s";
923
- return typeof f == "function" ? f(l) : K(f).replace(/%s/g, l);
924
- }
925
- return ce(
926
- u,
927
- (l, f) => {
928
- l !== f && o && (o.title = p(typeof l == "string" ? l : ""));
923
+ return d;
924
+ const u = e.titleTemplate || "%s";
925
+ return typeof u == "function" ? u(d) : Q(u).replace(/%s/g, d);
926
+ }
927
+ return pe(
928
+ c,
929
+ (d, u) => {
930
+ d !== u && o && (o.title = f(typeof d == "string" ? d : ""));
929
931
  },
930
932
  { immediate: !0 }
931
- ), e.observe && !e.titleTemplate && o && !c && Yt(
933
+ ), e.observe && !e.titleTemplate && o && !l && Zt(
932
934
  (r = o.head) == null ? void 0 : r.querySelector("title"),
933
935
  () => {
934
- o && o.title !== u.value && (u.value = p(o.title));
936
+ o && o.title !== c.value && (c.value = f(o.title));
935
937
  },
936
938
  { childList: !0 }
937
- ), Jt(() => {
939
+ ), Kt(() => {
938
940
  if (a) {
939
- const l = a(i, u.value || "");
940
- l != null && o && (o.title = l);
941
+ const d = a(i, c.value || "");
942
+ d != null && o && (o.title = d);
941
943
  }
942
- }), u;
944
+ }), c;
943
945
  }
944
- const ne = le({
946
+ const ae = K({
945
947
  name: "VtjPageContainer",
946
948
  async setup() {
947
- const n = Se(), e = fe(), t = e.params.id, s = t ? n.getPage(t) : n.getHomepage(), r = s ? await n.getRenderComponent(s.id) : null;
948
- return s && Qt(s.title || "VTJ"), {
949
+ const n = be(), e = he(), t = e.params.id, s = t ? n.getPage(t) : n.getHomepage(), r = s ? await n.getRenderComponent(s.id) : null;
950
+ return s && (Object.assign(e.meta, s.meta || {}), es(s.title || "VTJ")), {
949
951
  provider: n,
950
952
  component: r,
951
953
  file: s,
952
- query: e.query
954
+ query: e.query,
955
+ meta: s?.meta
953
956
  };
954
957
  },
955
958
  render() {
956
- return this.component ? B(this.component, this.query) : B("div", "页面不存在");
957
- }
958
- }), Xt = le({
959
+ const { component: n, query: e } = this;
960
+ return n ? q(n, e) : q("div", "页面不存在");
961
+ }
962
+ }), ts = {
963
+ "data-l-h6o7ki7": "",
964
+ class: "vtj-startup__wrapper"
965
+ }, ss = {
966
+ "data-l-h6o7ki7": "",
967
+ class: "vtj-startup"
968
+ }, ns = {
969
+ "data-l-h6o7ki7": "",
970
+ class: "vtj-startup__name"
971
+ }, rs = { "data-l-h6o7ki7": "" }, os = {
972
+ "data-l-h6o7ki7": "",
973
+ class: "vtj-startup__tagline"
974
+ }, is = {
975
+ "data-l-h6o7ki7": "",
976
+ class: "vtj-startup__actions"
977
+ }, as = /* @__PURE__ */ K({
978
+ __name: "Startup",
979
+ props: {
980
+ name: { default: "VTJ.PRO" },
981
+ tagline: { default: "基于 Vue3 + TypeScript 快速打造高生产力的低代码研发平台" },
982
+ actionText: { default: "开始设计" }
983
+ },
984
+ setup(n) {
985
+ ((r, o) => {
986
+ let a = document.getElementById("h6o7ki7");
987
+ a || (a = document.createElement("style"), a.id = "h6o7ki7", document.head.appendChild(a), a.innerHTML = o);
988
+ })("h6o7ki7", `
989
+ .vtj-startup[data-l-h6o7ki7]{
990
+ padding: 20px;
991
+ border-radius: 4px;
992
+ box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
993
+ box-sizing: border-box;
994
+ grid-row: 1;
995
+ width: 100%;
996
+ max-width: 800px;
997
+ }
998
+ .vtj-startup__wrapper[data-l-h6o7ki7]{
999
+ height: 100%;
1000
+ display: flex;
1001
+ justify-content: center;
1002
+ align-items: center;
1003
+ width: 100%;
1004
+ }
1005
+ .vtj-startup__name[data-l-h6o7ki7]{
1006
+ margin: 0;
1007
+ padding: 0;
1008
+ max-width: 576px;
1009
+ line-height: 56px;
1010
+ font-size: 48px;
1011
+ font-weight: 700;
1012
+ white-space: pre-wrap;
1013
+ }
1014
+ .vtj-startup__name span[data-l-h6o7ki7]{
1015
+ background: -webkit-linear-gradient(120deg, #bd34fe 30%, #41d1ff);
1016
+ -webkit-background-clip: text;
1017
+ background-clip: text;
1018
+ -webkit-text-fill-color: transparent;
1019
+ }
1020
+ .vtj-startup__tagline[data-l-h6o7ki7]{
1021
+ padding-top: 20px;
1022
+ line-height: 32px;
1023
+ font-size: 20px;
1024
+ font-weight: 500;
1025
+ white-space: pre-wrap;
1026
+ color: rgba(60, 60, 67, 0.78);
1027
+ }
1028
+ .vtj-startup__actions[data-l-h6o7ki7]{
1029
+ display: flex;
1030
+ flex-wrap: wrap;
1031
+ justify-content: flex-end;
1032
+ border-top: 1px solid rgba(60, 60, 67, 0.08);
1033
+ padding: 20px 0 0 0;
1034
+ margin-top: 20px;
1035
+ }
1036
+ .vtj-startup__actions button[data-l-h6o7ki7]{
1037
+ height: 40px;
1038
+ padding: 0 20px;
1039
+ border-radius: 20px;
1040
+ background-color: #409eff;
1041
+ border: 1px solid transparent;
1042
+ color: #fff;
1043
+ font-weight: 600;
1044
+ cursor: pointer;
1045
+ }@media (max-width: 768px){
1046
+
1047
+ .vtj-startup__actions button[data-l-h6o7ki7]{
1048
+ width: 100%;
1049
+ }
1050
+ }
1051
+ .vtj-startup__actions button[data-l-h6o7ki7]:hover{
1052
+ opacity: 0.7;
1053
+ }`);
1054
+ const t = n, s = () => {
1055
+ if (typeof window < "u") {
1056
+ let o = (window.__VTJ_LINK__ || {}).href || window.location.pathname + "__vtj__/#/";
1057
+ window.location.href = o;
1058
+ }
1059
+ };
1060
+ return (r, o) => (Ge(), Ye("div", ts, [
1061
+ b("div", ss, [
1062
+ b("h1", ns, [
1063
+ b("span", rs, N(t.name), 1)
1064
+ ]),
1065
+ b("div", os, N(t.tagline), 1),
1066
+ b("div", is, [
1067
+ b("button", {
1068
+ "data-l-h6o7ki7": "",
1069
+ onClick: s
1070
+ }, N(t.actionText), 1)
1071
+ ])
1072
+ ])
1073
+ ]));
1074
+ }
1075
+ }), cs = K({
959
1076
  name: "VtjStartupContainer",
960
1077
  render() {
961
- return B(We);
1078
+ return q(as);
962
1079
  }
963
- }), we = Symbol("Provider");
964
- var Zt = /* @__PURE__ */ ((n) => (n.Production = "production", n.Development = "development", n))(Zt || {});
965
- class es extends Ee {
1080
+ }), $e = Symbol("Provider");
1081
+ var ls = /* @__PURE__ */ ((n) => (n.Production = "production", n.Development = "development", n))(ls || {});
1082
+ class us extends xe {
966
1083
  constructor(e) {
967
1084
  super(), this.options = e;
968
1085
  const {
@@ -972,21 +1089,21 @@ class es extends Ee {
972
1089
  materials: o,
973
1090
  project: a = {},
974
1091
  adapter: i = {},
975
- globals: u = {},
976
- modules: c = {},
977
- router: p = null,
978
- materialPath: l = "./",
979
- nodeEnv: f = "development"
1092
+ globals: c = {},
1093
+ modules: l = {},
1094
+ router: f = null,
1095
+ materialPath: d = "./",
1096
+ nodeEnv: u = "development"
980
1097
  /* Development */
981
1098
  } = e;
982
- this.mode = s, this.modules = c, this.service = t, this.router = p, this.materialPath = l, this.nodeEnv = f, r && (this.dependencies = r), o && (this.materials = o), Object.assign(this.globals, u), Object.assign(this.adapter, i);
983
- const { access: m, request: d } = this.adapter;
984
- m && m.connect({ mode: s, router: p, request: d }), s !== _.Design && this.load(a);
1099
+ this.mode = s, this.modules = l, this.service = t, this.router = f, this.materialPath = d, this.nodeEnv = u, r && (this.dependencies = r), o && (this.materials = o), Object.assign(this.globals, c), Object.assign(this.adapter, i);
1100
+ const { access: m, request: p } = this.adapter;
1101
+ m && m.connect({ mode: s, router: f, request: p }), s !== _.Design && this.load(a);
985
1102
  }
986
1103
  mode;
987
1104
  globals = {};
988
1105
  modules = {};
989
- adapter = { request: at, jsonp: Me };
1106
+ adapter = { request: ut, jsonp: He };
990
1107
  apis = {};
991
1108
  dependencies = {};
992
1109
  materials = {};
@@ -1003,7 +1120,7 @@ class es extends Ee {
1003
1120
  if (this.project = t ? await t() : await this.service.init(e), !this.project)
1004
1121
  throw new Error("project is null");
1005
1122
  const { apis: s = [], meta: r = [] } = this.project, o = window;
1006
- o.CKEDITOR_VERSION = void 0, this.nodeEnv !== "production" ? await this.loadAssets(o) : await this.loadDependencies(o), this.apis = lt(s, r, this.adapter), me(), this.project.config?.mock && ft(s), this.initRouter(), this.triggerReady();
1123
+ o.CKEDITOR_VERSION = void 0, this.nodeEnv !== "production" ? await this.loadAssets(o) : await this.loadDependencies(o), this.apis = ft(s, r, this.adapter), ye(), this.project.config?.mock && ht(s), this.initRouter(), this.triggerReady();
1007
1124
  }
1008
1125
  async loadDependencies(e) {
1009
1126
  const t = Object.entries(this.dependencies);
@@ -1012,65 +1129,68 @@ class es extends Ee {
1012
1129
  }
1013
1130
  async loadAssets(e) {
1014
1131
  const { dependencies: t = [] } = this.project, { dependencies: s, library: r, components: o, materialPath: a, nodeEnv: i } = this, {
1015
- libraryExports: u,
1016
- libraryMap: c,
1017
- materials: p,
1018
- materialExports: l,
1019
- materialMapLibrary: f
1020
- } = et(
1132
+ libraryExports: c,
1133
+ libraryMap: l,
1134
+ materials: f,
1135
+ materialExports: d,
1136
+ materialMapLibrary: u
1137
+ } = nt(
1021
1138
  t,
1022
1139
  a,
1023
1140
  i === "development"
1024
1141
  /* Development */
1025
1142
  );
1026
- for (const d of u) {
1027
- const h = s[d], w = e[d];
1143
+ for (const p of c) {
1144
+ const h = s[p], w = e[p];
1028
1145
  if (w)
1029
- r[d] = w;
1146
+ r[p] = w;
1030
1147
  else if (h)
1031
- e[d] = r[d] = await h();
1148
+ e[p] = r[p] = await h();
1032
1149
  else {
1033
- const v = c[d] || [];
1034
- for (const g of v)
1035
- V(g) && await st(d, R.append(g, { v: b })), z(g) && await Z(R.append(g, { v: b }));
1036
- r[d] = e[d];
1150
+ const g = l[p] || [];
1151
+ for (const v of g)
1152
+ G(v) && await ot(p, x.append(v, { v: R })), Y(v) && await ne(x.append(v, { v: R }));
1153
+ r[p] = e[p];
1037
1154
  }
1038
1155
  }
1039
- for (const d of p)
1040
- await Z(R.append(d, { v: b }));
1156
+ for (const p of f)
1157
+ await ne(x.append(p, { v: R }));
1041
1158
  const m = this.materials || {};
1042
- for (const d of l) {
1043
- const h = e[f[d]], w = Pe[d];
1159
+ for (const p of d) {
1160
+ const h = e[u[p]], w = Re[p];
1044
1161
  if (w)
1045
- h && w.forEach((v) => {
1046
- o[v] = h[v];
1162
+ h && w.forEach((g) => {
1163
+ o[g] = h[g];
1047
1164
  });
1048
1165
  else {
1049
- const v = m[d] ? (await m[d]()).default : e[d];
1050
- v && h && (v.components || []).forEach((g) => {
1051
- o[g.name] = tt(g, h);
1166
+ const g = m[p] ? (await m[p]()).default : e[p];
1167
+ g && h && (g.components || []).forEach((v) => {
1168
+ o[v.name] = rt(v, h);
1052
1169
  });
1053
1170
  }
1054
1171
  }
1055
1172
  }
1056
1173
  initRouter() {
1057
- const { router: e, project: t } = this;
1058
- e && (e.addRoute({
1059
- path: "/page/:id",
1060
- name: de,
1061
- component: ne
1062
- }), e.addRoute({
1174
+ const { router: e, project: t, options: s } = this;
1175
+ if (!e) return;
1176
+ const { routeParentName: r, pageRouteName: o = "page", routeMeta: a } = s, i = {
1177
+ path: `/${o}/:id`,
1178
+ name: W,
1179
+ component: ae
1180
+ }, c = {
1063
1181
  path: "/",
1064
- name: Qe,
1065
- component: t?.homepage ? ne : Xt
1066
- }));
1182
+ name: me,
1183
+ component: t?.homepage ? ae : cs,
1184
+ meta: a
1185
+ };
1186
+ r ? (e.addRoute(r, i), e.addRoute(r, c)) : (e.addRoute(i), e.addRoute(c));
1067
1187
  }
1068
1188
  install(e) {
1069
1189
  const t = e.config.globalProperties.installed || {};
1070
1190
  for (const [s, r] of Object.entries(this.library))
1071
- !t[s] && ot(r) && (e.use(r), t[s] = !0);
1072
- this.options.install && e.use(this.options.install), this.adapter.access && e.use(this.adapter.access), e.provide(we, this), e.config.globalProperties.installed = t, this.nodeEnv === "development" && (e.config.errorHandler = (s, r, o) => {
1073
- const a = r?.$options.name, i = typeof s == "string" ? s : s?.message || s?.msg || "未知错误", u = `[ ${a} ] ${i} ${o}`;
1191
+ !t[s] && ct(r) && (e.use(r), t[s] = !0);
1192
+ this.options.install && e.use(this.options.install), this.adapter.access && e.use(this.adapter.access), e.provide($e, this), e.config.globalProperties.installed = t, this.mode === _.Design && (e.config.errorHandler = (s, r, o) => {
1193
+ const a = r?.$options.name, i = typeof s == "string" ? s : s?.message || s?.msg || "未知错误", c = `[ ${a} ] ${i} ${o}`;
1074
1194
  console.error(
1075
1195
  "[VTJ Error]:",
1076
1196
  {
@@ -1079,9 +1199,9 @@ class es extends Ee {
1079
1199
  info: o
1080
1200
  },
1081
1201
  s?.stack
1082
- ), M.error({
1202
+ ), T.error({
1083
1203
  title: "未处理的异常:请在控制台查看详情",
1084
- message: u
1204
+ message: c
1085
1205
  });
1086
1206
  });
1087
1207
  }
@@ -1131,53 +1251,54 @@ class es extends Ee {
1131
1251
  apis: a,
1132
1252
  window,
1133
1253
  ...t
1134
- }, u = L({
1135
- getDsl: async (c) => await this.getDsl(c) || null,
1136
- getDslByUrl: async (c) => await this.getDslByUrl(c) || null,
1254
+ }, c = V({
1255
+ getDsl: async (l) => await this.getDsl(l) || null,
1256
+ getDslByUrl: async (l) => await this.getDslByUrl(l) || null,
1137
1257
  options: i
1138
1258
  });
1139
- return N({
1259
+ return J({
1140
1260
  ...i,
1141
1261
  dsl: e,
1142
- loader: u
1262
+ loader: c
1143
1263
  });
1144
1264
  }
1145
- async getRenderComponent(e) {
1146
- const t = this.getFile(e);
1147
- if (!t)
1148
- return O.warn(`Can not find file: ${e}`), null;
1149
- const s = `.vtj/vue/${e}.vue`, r = this.modules[s];
1150
- if (r)
1151
- return (await r())?.default;
1152
- const o = await this.getDsl(t.id);
1153
- return o ? this.createDslRenderer(o).renderer : (O.warn(`Can not find dsl: ${e}`), null);
1265
+ async getRenderComponent(e, t) {
1266
+ const s = this.getFile(e);
1267
+ if (!s)
1268
+ return I.warn(`Can not find file: ${e}`), null;
1269
+ t && t(s);
1270
+ const r = `.vtj/vue/${e}.vue`, o = this.modules[r];
1271
+ if (o)
1272
+ return (await o())?.default;
1273
+ const a = await this.getDsl(s.id);
1274
+ return a ? this.createDslRenderer(a).renderer : (I.warn(`Can not find dsl: ${e}`), null);
1154
1275
  }
1155
1276
  defineUrlSchemaComponent(e, t) {
1156
- return ee(async () => {
1277
+ return re(async () => {
1157
1278
  const s = await this.getDslByUrl(e);
1158
1279
  return s ? (s.name = t || s.name, this.createDslRenderer(s).renderer) : null;
1159
1280
  });
1160
1281
  }
1161
1282
  definePluginComponent(e) {
1162
- return ee(async () => await ge(e, window));
1283
+ return re(async () => await we(e, window));
1163
1284
  }
1164
1285
  }
1165
- function ms(n) {
1166
- const e = new es(n);
1286
+ function bs(n) {
1287
+ const e = new us(n);
1167
1288
  return {
1168
1289
  provider: e,
1169
1290
  onReady: (s) => e.ready(s)
1170
1291
  };
1171
1292
  }
1172
- function Se(n = {}) {
1173
- const e = ie(we);
1293
+ function be(n = {}) {
1294
+ const e = ue($e);
1174
1295
  if (!e)
1175
1296
  throw new Error("Can not find provider");
1176
1297
  if (e.nodeEnv === "development") {
1177
1298
  const { id: t, version: s } = n;
1178
1299
  t && s && (async () => {
1179
1300
  const r = await e.getDsl(t);
1180
- r?.__VERSION__ !== s && M.warning({
1301
+ r?.__VERSION__ !== s && T.warning({
1181
1302
  title: r?.name,
1182
1303
  message: "当前组件源码版本与运行时版本不一致,请重新发布组件"
1183
1304
  });
@@ -1185,7 +1306,7 @@ function Se(n = {}) {
1185
1306
  }
1186
1307
  return e;
1187
1308
  }
1188
- const W = new He({
1309
+ const X = new Be({
1189
1310
  settings: {
1190
1311
  type: "json",
1191
1312
  validSuccess: !0,
@@ -1193,12 +1314,12 @@ const W = new He({
1193
1314
  failMessage: !0,
1194
1315
  validate: (n) => n.data?.code === 0,
1195
1316
  showError: (n) => {
1196
- M.error({
1317
+ T.error({
1197
1318
  message: n || "未知错误"
1198
1319
  });
1199
1320
  }
1200
1321
  }
1201
- }), ts = (n = "/__vtj__/api/:type.json") => (e, t) => W.send({
1322
+ }), ds = (n = "/__vtj__/api/:type.json") => (e, t) => X.send({
1202
1323
  url: n,
1203
1324
  method: "post",
1204
1325
  params: { type: e },
@@ -1206,7 +1327,7 @@ const W = new He({
1206
1327
  type: e,
1207
1328
  data: t
1208
1329
  }
1209
- }), ss = (n = "/__vtj__/api/uploader.json") => async (e, t) => await W.send({
1330
+ }), ps = (n = "/__vtj__/api/uploader.json") => async (e, t) => await X.send({
1210
1331
  url: n,
1211
1332
  method: "post",
1212
1333
  data: {
@@ -1217,12 +1338,12 @@ const W = new He({
1217
1338
  type: "data"
1218
1339
  }
1219
1340
  }).then((s) => s && s[0] ? s[0] : null).catch(() => null);
1220
- class G {
1341
+ class Z {
1221
1342
  api;
1222
1343
  pluginCaches = {};
1223
1344
  uploader;
1224
1345
  constructor() {
1225
- this.api = ts(), this.uploader = ss();
1346
+ this.api = ds(), this.uploader = ps();
1226
1347
  }
1227
1348
  async getExtension() {
1228
1349
  console.log("BaseService.getExtension");
@@ -1295,10 +1416,10 @@ class G {
1295
1416
  return await this.api("clearStaticFiles", e).catch(() => "");
1296
1417
  }
1297
1418
  async getPluginMaterial(e) {
1298
- const { urls: t = [] } = e, s = t.filter((o) => Xe(o))[0];
1419
+ const { urls: t = [] } = e, s = t.filter((o) => tt(o))[0];
1299
1420
  if (!s) return null;
1300
1421
  const r = this.pluginCaches[s];
1301
- return r || (this.pluginCaches[s] = W.send({
1422
+ return r || (this.pluginCaches[s] = X.send({
1302
1423
  url: s,
1303
1424
  method: "get",
1304
1425
  settings: {
@@ -1308,22 +1429,22 @@ class G {
1308
1429
  }).then((o) => o.data).catch(() => null));
1309
1430
  }
1310
1431
  }
1311
- const y = new Te({
1432
+ const y = new Ue({
1312
1433
  type: "local",
1313
1434
  expired: 0,
1314
1435
  prefix: "__VTJ_"
1315
1436
  });
1316
- class vs extends G {
1437
+ class Es extends Z {
1317
1438
  init(e) {
1318
- const t = new I(e), s = y.get(`project_${t.id}`), r = Object.assign(t.toDsl(), s || {});
1439
+ const t = new A(e), s = y.get(`project_${t.id}`), r = Object.assign(t.toDsl(), s || {});
1319
1440
  return y.save(`project_${t.id}`, r), Promise.resolve(r);
1320
1441
  }
1321
1442
  saveProject(e) {
1322
- const t = new I(e);
1443
+ const t = new A(e);
1323
1444
  return y.save(`project_${t.id}`, t.toDsl()), Promise.resolve(!0);
1324
1445
  }
1325
1446
  saveMaterials(e, t) {
1326
- return y.save(`materials_${e.id}`, q(t)), Promise.resolve(!0);
1447
+ return y.save(`materials_${e.id}`, z(t)), Promise.resolve(!0);
1327
1448
  }
1328
1449
  saveFile(e) {
1329
1450
  return y.save(`file_${e.id}`, e), Promise.resolve(!0);
@@ -1347,7 +1468,7 @@ class vs extends G {
1347
1468
  return Promise.resolve(!0);
1348
1469
  }
1349
1470
  getHistory(e) {
1350
- const t = y.get(`history_${e}`), s = new re(t || { id: e });
1471
+ const t = y.get(`history_${e}`), s = new ce(t || { id: e });
1351
1472
  return Promise.resolve(s.toDsl());
1352
1473
  }
1353
1474
  getHistoryItem(e, t) {
@@ -1363,22 +1484,22 @@ class vs extends G {
1363
1484
  }), Promise.resolve(!0);
1364
1485
  }
1365
1486
  }
1366
- class ns extends G {
1487
+ class fs extends Z {
1367
1488
  projects = {};
1368
1489
  materials = {};
1369
1490
  files = {};
1370
1491
  histories = {};
1371
1492
  historyItems = {};
1372
1493
  init(e) {
1373
- const t = new I(e), s = this.projects[t.id] || {}, r = Object.assign(t.toDsl(), s);
1494
+ const t = new A(e), s = this.projects[t.id] || {}, r = Object.assign(t.toDsl(), s);
1374
1495
  return this.projects[r.id] = r, Promise.resolve(r);
1375
1496
  }
1376
1497
  saveProject(e) {
1377
- const t = new I(e);
1498
+ const t = new A(e);
1378
1499
  return this.projects[t.id] = t.toDsl(), Promise.resolve(!0);
1379
1500
  }
1380
1501
  saveMaterials(e, t) {
1381
- return e.id && (this.materials[e.id] = q(t)), Promise.resolve(!0);
1502
+ return e.id && (this.materials[e.id] = z(t)), Promise.resolve(!0);
1382
1503
  }
1383
1504
  saveFile(e) {
1384
1505
  return this.files[e.id] = e, Promise.resolve(!0);
@@ -1402,7 +1523,7 @@ class ns extends G {
1402
1523
  return Promise.resolve(!0);
1403
1524
  }
1404
1525
  getHistory(e) {
1405
- const t = this.histories[e], s = new re(t || { id: e });
1526
+ const t = this.histories[e], s = new ce(t || { id: e });
1406
1527
  return Promise.resolve(s);
1407
1528
  }
1408
1529
  getHistoryItem(e, t) {
@@ -1420,11 +1541,11 @@ class ns extends G {
1420
1541
  }), Promise.resolve(!0);
1421
1542
  }
1422
1543
  }
1423
- let A = null;
1424
- function gs() {
1425
- return A || (A = new ns(), A);
1544
+ let F = null;
1545
+ function Ps() {
1546
+ return F || (F = new fs(), F);
1426
1547
  }
1427
- class ys extends G {
1548
+ class xs extends Z {
1428
1549
  getFileCaches = {};
1429
1550
  async getExtension() {
1430
1551
  return await this.api("getExtension", {}).catch(() => {
@@ -1439,7 +1560,7 @@ class ys extends G {
1439
1560
  async saveMaterials(e, t) {
1440
1561
  return !!await this.api("saveMaterials", {
1441
1562
  project: e,
1442
- materials: q(t)
1563
+ materials: z(t)
1443
1564
  }).catch(() => !1);
1444
1565
  }
1445
1566
  async saveFile(e) {
@@ -1479,7 +1600,7 @@ class ys extends G {
1479
1600
  );
1480
1601
  }
1481
1602
  }
1482
- function $e(n = []) {
1603
+ function Ee(n = []) {
1483
1604
  return n.map((e) => {
1484
1605
  const { id: t, title: s, icon: r, children: o, hidden: a } = e;
1485
1606
  return {
@@ -1488,99 +1609,101 @@ function $e(n = []) {
1488
1609
  icon: r,
1489
1610
  hidden: a,
1490
1611
  url: `/page/${t}`,
1491
- children: o && o.length ? $e(o) : void 0
1612
+ children: o && o.length ? Ee(o) : void 0
1492
1613
  };
1493
1614
  });
1494
1615
  }
1495
- function je(n, e) {
1616
+ function Pe(n, e) {
1496
1617
  if (!e) return n;
1497
1618
  let t = [];
1498
1619
  for (const s of n)
1499
1620
  if (s.children && s.children.length) {
1500
- const r = je(s.children, e);
1621
+ const r = Pe(s.children, e);
1501
1622
  r.length && (s.children = r, t.push(s));
1502
1623
  } else
1503
1624
  e[s.id] && t.push(s);
1504
1625
  return t;
1505
1626
  }
1506
- function _s() {
1507
- const n = Se(), e = fe(), t = ht(), s = J(!1), r = t?.getData(), o = n.project;
1508
- ze(() => {
1509
- const { name: u, params: c, meta: p } = e;
1510
- if (u === "VtjPage") {
1511
- const l = n.getPage(c.id);
1512
- s.value = !l?.mask;
1513
- } else if (u === "VtjHomepage") {
1514
- const l = n.getHomepage();
1515
- s.value = !l?.mask;
1627
+ function Rs() {
1628
+ const n = be(), e = he(), t = vt(), s = O(!1), r = O(!1), o = t?.getData(), a = n.project;
1629
+ Qe(() => {
1630
+ const { name: l, params: f, meta: d } = e;
1631
+ if (l === W) {
1632
+ const u = n.getPage(f.id);
1633
+ s.value = !u?.mask, r.value = !!u?.pure;
1634
+ } else if (l === me) {
1635
+ const u = n.getHomepage();
1636
+ s.value = !u?.mask, r.value = !!u?.pure;
1516
1637
  } else
1517
- s.value = !p.mask;
1638
+ s.value = !d.mask, r.value = !!d.pure;
1518
1639
  });
1519
- const a = $e(o?.pages), i = o?.config;
1640
+ const i = Ee(a?.pages), c = a?.config;
1520
1641
  return {
1521
1642
  disabled: s,
1522
- logo: i?.logo,
1523
- themeSwitchable: i?.themeSwitchable,
1524
- title: i?.title || o?.description || o?.name || "VTJ App",
1525
- menus: je(a, r?.permissions)
1643
+ logo: c?.logo,
1644
+ themeSwitchable: c?.themeSwitchable,
1645
+ title: c?.title || a?.description || a?.name || "VTJ App",
1646
+ menus: Pe(i, o?.permissions),
1647
+ pure: r
1526
1648
  };
1527
1649
  }
1528
1650
  export {
1529
- ve as ACCESS_KEY,
1530
- hs as Access,
1531
- Ge as BUILT_IN_DIRECTIVES,
1532
- G as BaseService,
1533
- te as CONTEXT_HOST,
1534
- mt as Context,
1651
+ _e as ACCESS_KEY,
1652
+ $s as Access,
1653
+ Ze as BUILT_IN_DIRECTIVES,
1654
+ Z as BaseService,
1655
+ oe as CONTEXT_HOST,
1656
+ yt as Context,
1535
1657
  _ as ContextMode,
1536
- Ye as DATA_TYPES,
1537
- Qe as HOMEPAGE_ROUTE_NAME,
1538
- ps as JSCodeToString,
1539
- ls as LIFE_CYCLES_LIST,
1540
- ys as LocalService,
1541
- ns as MemoryService,
1542
- Zt as NodeEnv,
1543
- de as PAGE_ROUTE_NAME,
1544
- es as Provider,
1545
- vs as StorageService,
1546
- b as VTJ_RENDERER_VERSION,
1547
- he as adoptedStyleSheets,
1548
- fs as createAssetScripts,
1549
- ds as createAssetsCss,
1550
- $t as createDataSources,
1551
- L as createLoader,
1552
- gs as createMemoryService,
1553
- ut as createMetaApi,
1554
- ms as createProvider,
1555
- N as createRenderer,
1556
- ct as createSchemaApi,
1557
- lt as createSchemaApis,
1558
- Pt as defaultLoader,
1559
- F as fillBasePath,
1560
- ye as getModifiers,
1561
- ge as getPlugin,
1562
- tt as getRawComponent,
1563
- V as isCSSUrl,
1564
- it as isJSCode,
1658
+ et as DATA_TYPES,
1659
+ me as HOMEPAGE_ROUTE_NAME,
1660
+ js as JSCodeToString,
1661
+ _s as LIFE_CYCLES_LIST,
1662
+ xs as LocalService,
1663
+ fs as MemoryService,
1664
+ ls as NodeEnv,
1665
+ W as PAGE_ROUTE_NAME,
1666
+ us as Provider,
1667
+ as as Startup,
1668
+ Es as StorageService,
1669
+ R as VTJ_RENDERER_VERSION,
1670
+ ve as adoptedStyleSheets,
1671
+ ws as createAssetScripts,
1672
+ Ss as createAssetsCss,
1673
+ Et as createDataSources,
1674
+ V as createLoader,
1675
+ Ps as createMemoryService,
1676
+ pt as createMetaApi,
1677
+ bs as createProvider,
1678
+ J as createRenderer,
1679
+ dt as createSchemaApi,
1680
+ ft as createSchemaApis,
1681
+ Rt as defaultLoader,
1682
+ C as fillBasePath,
1683
+ Se as getModifiers,
1684
+ we as getPlugin,
1685
+ rt as getRawComponent,
1686
+ G as isCSSUrl,
1687
+ lt as isJSCode,
1565
1688
  S as isJSExpression,
1566
1689
  H as isJSFunction,
1567
- Xe as isJSON,
1568
- z as isJSUrl,
1569
- ot as isVuePlugin,
1570
- st as loadCss,
1571
- nt as loadCssUrl,
1572
- rt as loadScriptUrl,
1573
- dt as mockApi,
1574
- ft as mockApis,
1575
- me as mockCleanup,
1576
- x as nodeRender,
1577
- et as parseDeps,
1578
- C as parseExpression,
1579
- se as parseFunction,
1580
- we as providerKey,
1581
- Ze as removeProdFlag,
1582
- pe as toString,
1583
- ht as useAccess,
1584
- _s as useMask,
1585
- Se as useProvider
1690
+ tt as isJSON,
1691
+ Y as isJSUrl,
1692
+ ct as isVuePlugin,
1693
+ ot as loadCss,
1694
+ it as loadCssUrl,
1695
+ at as loadScriptUrl,
1696
+ mt as mockApi,
1697
+ ht as mockApis,
1698
+ ye as mockCleanup,
1699
+ D as nodeRender,
1700
+ nt as parseDeps,
1701
+ k as parseExpression,
1702
+ ie as parseFunction,
1703
+ $e as providerKey,
1704
+ st as removeProdFlag,
1705
+ ge as toString,
1706
+ vt as useAccess,
1707
+ Rs as useMask,
1708
+ be as useProvider
1586
1709
  };