@vtj/renderer 0.8.164 → 0.8.166

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,19 +1,19 @@
1
- import { Base as we, BUILT_IN_COMPONENTS as Se, ProjectModel as I, HistoryModel as se } from "@vtj/core";
2
- import { isUrl as $e, url as b, dedupArray as je, isString as $, isFunction as G, logger as H, createRequest as Ee, merge as Pe, pathToRegexp as be, pathToRegexpMatch as Ce, formDataToJson as Re, storage as k, cookie as Y, toArray as Q, delay as Fe, camelCase as j, upperFirst as xe, pick as Ie, jsonp as He, loadScript as X, Request as Oe, Storage as Ae, mapToObject as L } from "@vtj/utils";
3
- import * as A from "vue";
4
- import { inject as re, toRef as De, readonly as Me, customRef as ke, ref as q, onBeforeUnmount as Te, getCurrentScope as Be, onScopeDispose as Ue, unref as Ne, getCurrentInstance as oe, watch as ie, computed as ae, onMounted as Le, defineComponent as ce, h as B, defineAsyncComponent as Z, watchEffect as qe } from "vue";
5
- import { useRoute as ue } from "vue-router";
1
+ import { Base as Se, BUILT_IN_COMPONENTS as $e, ProjectModel as I, HistoryModel as ne } from "@vtj/core";
2
+ import { isUrl as je, url as b, dedupArray as Ee, isString as $, isFunction as Y, logger as A, createRequest as Pe, merge as be, pathToRegexp as Re, pathToRegexpMatch as Ce, formDataToJson as Fe, storage as k, cookie as T, toArray as Q, delay as re, camelCase as j, upperFirst as xe, pick as Ie, jsonp as Ae, loadScript as X, Request as He, Storage as Oe, mapToObject as q } from "@vtj/utils";
3
+ import * as O from "vue";
4
+ import { inject as oe, toRef as De, readonly as Me, customRef as ke, ref as J, onBeforeUnmount as Te, getCurrentScope as Be, onScopeDispose as Ue, unref as Ne, getCurrentInstance as ie, watch as ae, computed as ce, onMounted as Le, defineComponent as ue, h as U, defineAsyncComponent as Z, watchEffect as qe } from "vue";
5
+ import { useRoute as le } from "vue-router";
6
6
  import { ElNotification as D, ElLoading as Je } from "element-plus";
7
7
  import { XStartup as Ve } from "@vtj/ui";
8
8
  /**!
9
9
  * Copyright (c) 2024, VTJ.PRO All rights reserved.
10
10
  * @name @vtj/renderer
11
11
  * @author CHC chenhuachun1549@dingtalk.com
12
- * @version 0.8.164
12
+ * @version 0.8.166
13
13
  * @license <a href="https://vtj.pro/license.html">MIT License</a>
14
14
  */
15
- const C = "0.8.164";
16
- var w = /* @__PURE__ */ ((s) => (s.Runtime = "Runtime", s.Design = "Design", s.Raw = "Raw", s.VNode = "VNode", s))(w || {});
15
+ const R = "0.8.166";
16
+ var _ = /* @__PURE__ */ ((n) => (n.Runtime = "Runtime", n.Design = "Design", n.Raw = "Raw", n.VNode = "VNode", n))(_ || {});
17
17
  const ee = [
18
18
  "$el",
19
19
  "$emit",
@@ -26,7 +26,7 @@ const ee = [
26
26
  "$props",
27
27
  "$options",
28
28
  "$forceUpdate"
29
- ], on = [
29
+ ], os = [
30
30
  "beforeCreate",
31
31
  "created",
32
32
  "beforeMount",
@@ -40,7 +40,7 @@ const ee = [
40
40
  "renderTriggered",
41
41
  "activated",
42
42
  "deactivated"
43
- ], ze = ["vIf", "vShow", "vModel", "vFor", "vBind"], We = {
43
+ ], ze = ["vIf", "vShow", "vModel", "vFor", "vBind"], Ke = {
44
44
  String,
45
45
  Number,
46
46
  Boolean,
@@ -49,90 +49,90 @@ const ee = [
49
49
  Function,
50
50
  Date
51
51
  };
52
- function F(s, e) {
53
- return s.map((t) => $e(t) || t.startsWith("/") ? t : `${e}${t}`);
52
+ function F(n, e) {
53
+ return n.map((t) => je(t) || t.startsWith("/") ? t : `${e}${t}`);
54
54
  }
55
- function J(s) {
56
- return /\.css$/.test(s);
55
+ function V(n) {
56
+ return /\.css$/.test(n);
57
57
  }
58
- function V(s) {
59
- return /\.js$/.test(s);
58
+ function z(n) {
59
+ return /\.js$/.test(n);
60
60
  }
61
- function Ke(s) {
62
- return /\.json$/.test(s);
61
+ function We(n) {
62
+ return /\.json$/.test(n);
63
63
  }
64
- function an(s) {
65
- return s.map(
66
- (e) => `<script src="${b.append(e, { v: C })}"><\/script>`
64
+ function is(n) {
65
+ return n.map(
66
+ (e) => `<script src="${b.append(e, { v: R })}"><\/script>`
67
67
  ).join("");
68
68
  }
69
- function cn(s = []) {
70
- return s.map(
71
- (e) => `<link rel="stylesheet" href="${b.append(e, { v: C })}" />`
69
+ function as(n = []) {
70
+ return n.map(
71
+ (e) => `<link rel="stylesheet" href="${b.append(e, { v: R })}" />`
72
72
  ).join("");
73
73
  }
74
- function Ge(s, e = !1) {
75
- return e && s.endsWith(".prod.js") ? s.replace(".prod.js", ".js") : s;
74
+ function Ge(n, e = !1) {
75
+ return e && n.endsWith(".prod.js") ? n.replace(".prod.js", ".js") : n;
76
76
  }
77
- function Ye(s, e, t = !1) {
78
- const n = s.filter((l) => !!l.enabled), r = [], o = [], a = [], i = [], u = {}, c = {}, p = [], f = {};
79
- return n.forEach(
80
- ({ urls: l, assetsUrl: m, library: d, assetsLibrary: h, localeLibrary: _ }) => {
77
+ function Ye(n, e, t = !1) {
78
+ const s = n.filter((l) => !!l.enabled), r = [], o = [], a = [], i = [], u = {}, c = {}, p = [], f = {};
79
+ return s.forEach(
80
+ ({ urls: l, assetsUrl: m, library: d, assetsLibrary: h, localeLibrary: w }) => {
81
81
  l?.forEach((v) => {
82
- V(v) && r.push(Ge(v, t)), J(v) && o.push(v);
83
- }), d && (i.push(d), u[d] = F(l || [], e), _ && (c[d] = _)), m && a.push(m), h && p.push(h), d && h && (f[h] = d);
82
+ z(v) && r.push(Ge(v, t)), V(v) && o.push(v);
83
+ }), d && (i.push(d), u[d] = F(l || [], e), w && (c[d] = w)), m && a.push(m), h && p.push(h), d && h && (f[h] = d);
84
84
  }
85
85
  ), {
86
86
  scripts: F(r, e),
87
87
  css: F(o, e),
88
88
  materials: F(a, e),
89
89
  libraryExports: i,
90
- materialExports: je(p),
90
+ materialExports: Ee(p),
91
91
  materialMapLibrary: f,
92
92
  libraryMap: u,
93
93
  libraryLocaleMap: c
94
94
  };
95
95
  }
96
- function Qe(s, e) {
97
- const { name: t, parent: n, alias: r } = s;
98
- return n ? e[n]?.[r || t] : e[r || t];
96
+ function Qe(n, e) {
97
+ const { name: t, parent: s, alias: r } = n;
98
+ return s ? e[s]?.[r || t] : e[r || t];
99
99
  }
100
- function le(s) {
101
- return $(s) ? s : JSON.stringify(s);
100
+ function fe(n) {
101
+ return $(n) ? n : JSON.stringify(n);
102
102
  }
103
- function fe(s, e, t) {
104
- const n = s.CSSStyleSheet;
105
- if (n.prototype.replaceSync) {
106
- const r = new n();
103
+ function de(n, e, t) {
104
+ const s = n.CSSStyleSheet;
105
+ if (s.prototype.replaceSync) {
106
+ const r = new s();
107
107
  r.id = e, r.replaceSync(t);
108
- const o = s.document, a = o.adoptedStyleSheets, i = Array.from(a).filter(
108
+ const o = n.document, a = o.adoptedStyleSheets, i = Array.from(a).filter(
109
109
  (u) => u.id !== e
110
110
  );
111
111
  o.adoptedStyleSheets = [...i, r];
112
112
  } else {
113
- const r = s.document;
113
+ const r = n.document;
114
114
  let o = r.getElementById(e);
115
115
  o ? o.innerHTML = t : (o = r.createElement("style"), o.id = e, o.innerHTML = t, r.head.appendChild(o));
116
116
  }
117
117
  }
118
- async function Xe(s, e) {
119
- const t = await window.fetch(e).then((n) => n.text()).catch(() => "");
120
- t && fe(window, s, t);
118
+ async function Xe(n, e) {
119
+ const t = await window.fetch(e).then((s) => s.text()).catch(() => "");
120
+ t && de(window, n, t);
121
121
  }
122
- function Ze(s, e = window) {
123
- const t = e.document, n = e.document.head;
124
- for (const r of s)
122
+ function Ze(n, e = window) {
123
+ const t = e.document, s = e.document.head;
124
+ for (const r of n)
125
125
  if (!t.getElementById(r)) {
126
126
  const a = t.createElement("link");
127
- a.rel = "stylesheet", a.id = r, a.href = r, n.appendChild(a);
127
+ a.rel = "stylesheet", a.id = r, a.href = r, s.appendChild(a);
128
128
  }
129
129
  }
130
- async function et(s, e, t = window) {
131
- const n = t.document, r = t.document.head;
130
+ async function et(n, e, t = window) {
131
+ const s = t.document, r = t.document.head;
132
132
  let o = t[e];
133
133
  return o ? o.default || o : new Promise((a, i) => {
134
- for (const u of s) {
135
- const c = n.createElement("script");
134
+ for (const u of n) {
135
+ const c = s.createElement("script");
136
136
  c.src = u, c.onload = () => {
137
137
  o = t[e], o ? a(o.default || o) : i(null);
138
138
  }, c.onerror = (p) => {
@@ -141,58 +141,58 @@ async function et(s, e, t = window) {
141
141
  }
142
142
  });
143
143
  }
144
- function tt(s) {
145
- return G(s) || G(s?.install);
144
+ function tt(n) {
145
+ return Y(n) || Y(n?.install);
146
146
  }
147
- function R(s, e, t = !1, n = !1) {
147
+ function C(n, e, t = !1, s = !1) {
148
148
  try {
149
149
  const r = ['"use strict";', "var __self = arguments[0];"];
150
150
  r.push("return ");
151
- let o = (s.value || "").trim();
151
+ let o = (n.value || "").trim();
152
152
  o = o.replace(/this(\W|$)/g, (i, u) => `__self${u}`), o = r.join(`
153
153
  `) + o;
154
154
  const a = `with(${t ? "{}" : "$scope || {}"}) { ${o} }`;
155
155
  return new Function("$scope", a)(e);
156
156
  } catch (r) {
157
- if (H.error("parseExpression.error", r, s, e?.__self ?? e), n)
157
+ if (A.error("parseExpression.error", r, n, e?.__self ?? e), s)
158
158
  throw r;
159
159
  }
160
160
  }
161
- function te(s, e, t = !1, n = !1) {
162
- const r = R(s, e, t, n);
163
- if (typeof r != "function" && (H.error(
161
+ function te(n, e, t = !1, s = !1) {
162
+ const r = C(n, e, t, s);
163
+ if (typeof r != "function" && (A.error(
164
164
  "parseFunction.error",
165
165
  "not a function",
166
- s,
166
+ n,
167
167
  e?.__self ?? e
168
- ), n))
169
- throw new Error(`"${s.value}" not a function`);
168
+ ), s))
169
+ throw new Error(`"${n.value}" not a function`);
170
170
  return r;
171
171
  }
172
- function S(s) {
173
- return s && s.type === "JSExpression";
172
+ function S(n) {
173
+ return n && n.type === "JSExpression";
174
174
  }
175
- function M(s) {
176
- return typeof s == "object" && s && s.type === "JSFunction";
175
+ function M(n) {
176
+ return typeof n == "object" && n && n.type === "JSFunction";
177
177
  }
178
- function nt(s) {
179
- return S(s) || M(s);
178
+ function st(n) {
179
+ return S(n) || M(n);
180
180
  }
181
- function un(s) {
182
- return nt(s) ? s.value : JSON.stringify(s);
181
+ function cs(n) {
182
+ return st(n) ? n.value : JSON.stringify(n);
183
183
  }
184
184
  let E = null;
185
- const st = Ee({
185
+ const nt = Pe({
186
186
  settings: {
187
187
  type: "form",
188
188
  validSuccess: !0,
189
189
  originResponse: !1,
190
190
  loading: !0,
191
- validate: (s) => s.data?.code === 0 || !!s.data?.success,
191
+ validate: (n) => n.data?.code === 0 || !!n.data?.success,
192
192
  failMessage: !0,
193
- showError: (s) => {
193
+ showError: (n) => {
194
194
  D.error({
195
- message: s || "未知错误"
195
+ message: n || "未知错误"
196
196
  });
197
197
  },
198
198
  showLoading: () => {
@@ -208,62 +208,62 @@ const st = Ee({
208
208
  }
209
209
  });
210
210
  let P;
211
- function rt(s, e) {
212
- const { jsonp: t, request: n } = e;
213
- if (s.method === "jsonp")
214
- return (r = {}) => t(s.url, {
215
- ...s.jsonpOptions,
211
+ function rt(n, e) {
212
+ const { jsonp: t, request: s } = e;
213
+ if (n.method === "jsonp")
214
+ return (r = {}) => t(n.url, {
215
+ ...n.jsonpOptions,
216
216
  query: r
217
217
  });
218
218
  {
219
- const r = s.headers ? R(s.headers, {}, !0) : void 0, o = {
220
- url: s.url,
221
- method: s.method,
219
+ const r = n.headers ? C(n.headers, {}, !0) : void 0, o = {
220
+ url: n.url,
221
+ method: n.method,
222
222
  settings: {
223
- ...s.settings,
223
+ ...n.settings,
224
224
  headers: r
225
225
  }
226
226
  };
227
- return (a, i) => (delete o.data, n.send(Pe(o, i || {}, { data: a })));
227
+ return (a, i) => (delete o.data, s.send(be(o, i || {}, { data: a })));
228
228
  }
229
229
  }
230
- function ot(s, e) {
230
+ function ot(n, e) {
231
231
  const { metaQuery: t } = e;
232
232
  if (!t) return;
233
- const { code: n, queryCode: r } = s;
233
+ const { code: s, queryCode: r } = n;
234
234
  return (o, a) => {
235
235
  if (!t) {
236
236
  console.warn("adapter.metaQuery is not defined!");
237
237
  return;
238
238
  }
239
- return t(n, r, o, a);
239
+ return t(s, r, o, a);
240
240
  };
241
241
  }
242
- function it(s = [], e = [], t) {
243
- const n = {};
244
- for (const r of s)
245
- n[r.id] = rt(r, t);
242
+ function it(n = [], e = [], t) {
243
+ const s = {};
244
+ for (const r of n)
245
+ s[r.id] = rt(r, t);
246
246
  for (const r of e)
247
- n[r.id] = ot(r, t);
248
- return n;
247
+ s[r.id] = ot(r, t);
248
+ return s;
249
249
  }
250
- async function at(s = []) {
250
+ async function at(n = []) {
251
251
  P = await import("mockjs").then((e) => e.default || e), P && (P.setup({
252
252
  timeout: "50-500"
253
- }), de(), s.forEach((e) => ct(P, e)));
253
+ }), pe(), n.forEach((e) => ct(P, e)));
254
254
  }
255
- function ct(s, e) {
255
+ function ct(n, e) {
256
256
  if (!e.mock) return;
257
- const { url: t, mockTemplate: n } = e;
258
- if (t && n) {
259
- const r = be(`${t}(.*)`), o = Ce(t, { decode: decodeURIComponent }), a = R(n, {}, !0);
260
- s.mock(r, (i) => {
261
- const u = b.parse(i.url) || {}, c = i.body instanceof FormData ? Re(i.body) : i.body, p = o(i.url)?.params;
262
- return Object.assign(i, { data: c, params: u, query: p }), s.mock(a(i));
257
+ const { url: t, mockTemplate: s } = e;
258
+ if (t && s) {
259
+ const r = Re(`${t}(.*)`), o = Ce(t, { decode: decodeURIComponent }), a = C(s, {}, !0);
260
+ n.mock(r, (i) => {
261
+ const u = b.parse(i.url) || {}, c = i.body instanceof FormData ? Fe(i.body) : i.body, p = o(i.url)?.params;
262
+ return Object.assign(i, { data: c, params: u, query: p }), n.mock(a(i));
263
263
  });
264
264
  }
265
265
  }
266
- function de() {
266
+ function pe() {
267
267
  P && (P._mocked = {});
268
268
  }
269
269
  const ut = {
@@ -276,30 +276,34 @@ const ut = {
276
276
  redirectParam: "r",
277
277
  unauthorizedCode: 401,
278
278
  unauthorizedMessage: "登录已经失效,请重新登录!"
279
- }, pe = Symbol("access");
280
- class ln {
279
+ }, he = Symbol("access");
280
+ class us {
281
281
  options;
282
282
  data = null;
283
+ mode = _.Raw;
283
284
  constructor(e) {
284
285
  this.options = Object.assign({}, ut, e), this.loadData();
285
286
  }
286
287
  connect(e) {
287
- const { mode: t, router: n, request: r } = e;
288
- n && t === w.Raw && this.setGuard(n), r && this.setRequest(r);
288
+ const { mode: t, router: s, request: r } = e;
289
+ this.mode = t, s && t === _.Raw && this.setGuard(s), r && this.setRequest(r);
289
290
  }
290
291
  login(e) {
291
- const { storageKey: t, storagePrefix: n, session: r, authKey: o } = this.options;
292
+ const { storageKey: t, storagePrefix: s, session: r, authKey: o } = this.options;
292
293
  this.data = e, k.save(t, e, {
293
294
  type: "local",
294
- prefix: n
295
- }), r && Y.set(o, e.token);
295
+ prefix: s
296
+ }), r && T.set(o, e.token);
296
297
  }
297
- logout() {
298
- const { storageKey: e, storagePrefix: t } = this.options;
298
+ clear() {
299
+ const { storageKey: e, storagePrefix: t, session: s, authKey: r } = this.options;
299
300
  this.data = null, k.remove(e, {
300
301
  type: "local",
301
302
  prefix: t
302
- }), this.toLogin();
303
+ }), s && T.remove(r);
304
+ }
305
+ logout() {
306
+ this.clear(), this.toLogin();
303
307
  }
304
308
  getData() {
305
309
  return this.data;
@@ -313,15 +317,23 @@ class ln {
313
317
  return Q(e).some((r) => t[r]);
314
318
  }
315
319
  install(e) {
316
- e.config.globalProperties.$access = this, e.provide(pe, this);
320
+ e.config.globalProperties.$access = this, e.provide(he, this);
317
321
  }
318
322
  isAuthPath(e) {
319
- const { auth: t, isAuth: n } = this.options;
320
- return n ? n(e) : e.path && typeof t == "string" ? t.includes(e.path) : !1;
323
+ const { auth: t, isAuth: s } = this.options;
324
+ if (s)
325
+ return s(e);
326
+ if (e.path && typeof t == "string") {
327
+ const r = t.split("#")[1] || t;
328
+ return e.path === r;
329
+ }
330
+ return !1;
321
331
  }
322
332
  toLogin() {
323
333
  const { auth: e, redirectParam: t } = this.options;
324
- e && (typeof e == "function" ? e() : location.href = t ? `${e}?${t}=${encodeURIComponent(location.href)}` : e);
334
+ if (!e || this.mode !== _.Raw) return;
335
+ const s = t ? `?${t}=${encodeURIComponent(location.href)}` : "";
336
+ typeof e == "function" ? e(s) : location.href = t ? `${e}${s}` : e;
325
337
  }
326
338
  loadData() {
327
339
  const { storageKey: e, storagePrefix: t } = this.options;
@@ -332,10 +344,10 @@ class ln {
332
344
  }
333
345
  isLogined() {
334
346
  const { session: e, authKey: t } = this.options;
335
- return e && t ? !!Y.get(t) : !!this.data;
347
+ return e && t ? !!T.get(t) : !!this.data;
336
348
  }
337
349
  setGuard(e) {
338
- e.beforeEach((t, n, r) => this.guard(t, r));
350
+ e.beforeEach((t, s, r) => this.guard(t, r));
339
351
  }
340
352
  guard(e, t) {
341
353
  if (this.isWhiteList(e) || this.isLogined() || this.isAuthPath(e))
@@ -344,26 +356,32 @@ class ln {
344
356
  }
345
357
  isWhiteList(e) {
346
358
  const { whiteList: t } = this.options;
347
- return t ? Array.isArray(t) ? t.some((n) => e.fullPath.startsWith(n)) : t(e) : !1;
359
+ return t ? Array.isArray(t) ? t.some((s) => e.fullPath.startsWith(s)) : t(e) : !1;
348
360
  }
349
361
  isUnauthorized(e) {
350
362
  const { unauthorizedCode: t = 401 } = this.options;
351
363
  return e.status === t || e.data.code === t;
352
364
  }
365
+ async showUnauthorizedAlert(e) {
366
+ const { alert: t, unauthorizedMessage: s = "登录已失效" } = this.options;
367
+ this.isUnauthorized(e) && t && (await re(150), await t(s, {
368
+ title: "提示",
369
+ type: "warning"
370
+ }).catch((r) => r), this.toLogin());
371
+ }
353
372
  setRequest(e) {
354
- const { alert: t, unauthorizedMessage: n = "登录已失效" } = this.options;
355
- e.useRequest((r) => (r.headers.Authorization = this.data?.token, r)), e.useResponse(
356
- (r) => (this.isUnauthorized(r) && t && t(n), r),
357
- (r) => {
358
- const o = r.response || r || {};
359
- return this.isUnauthorized(o) && t && t(n), r;
373
+ e.useRequest((t) => (t.headers[this.options.authKey] = this.data?.token, t)), e.useResponse(
374
+ async (t) => (await this.showUnauthorizedAlert(t), t),
375
+ async (t) => {
376
+ const s = t.response || t || {};
377
+ return await this.showUnauthorizedAlert(s), Promise.reject(t);
360
378
  }
361
379
  );
362
380
  }
363
381
  }
364
- function fn() {
365
- const s = re(pe, null);
366
- return s || console.warn("access is null"), s;
382
+ function ls() {
383
+ const n = oe(he, null);
384
+ return n || console.warn("access is null"), n;
367
385
  }
368
386
  class lt {
369
387
  __id = null;
@@ -391,14 +409,14 @@ class lt {
391
409
  $apis = {};
392
410
  __transform = {};
393
411
  constructor(e) {
394
- const { mode: t, dsl: n, attrs: r } = e;
395
- this.__mode = t, n && (this.__id = n.id || null, this.__transform = n.transform || {}), r && Object.assign(this, r);
396
- }
397
- setup(e, t = A) {
398
- const n = t.getCurrentInstance();
399
- if (!n) return;
400
- this.__refs = {}, this.$refs = {}, this.context = {}, this.__contextRefs = {}, this.__instance = n.proxy;
401
- const r = n.appContext.config.globalProperties;
412
+ const { mode: t, dsl: s, attrs: r } = e;
413
+ this.__mode = t, s && (this.__id = s.id || null, this.__transform = s.transform || {}), r && Object.assign(this, r);
414
+ }
415
+ setup(e, t = O) {
416
+ const s = t.getCurrentInstance();
417
+ if (!s) return;
418
+ this.__refs = {}, this.$refs = {}, this.context = {}, this.__contextRefs = {}, this.__instance = s.proxy;
419
+ const r = s.appContext.config.globalProperties;
402
420
  Object.assign(this, r), Object.assign(this, e || {}), this.__proxy(), t.onMounted(() => {
403
421
  this.__proxy();
404
422
  }), t.onUnmounted(() => {
@@ -419,60 +437,60 @@ class lt {
419
437
  }
420
438
  __parseFunction(e) {
421
439
  if (e)
422
- if (this.__mode === w.Runtime) {
423
- const { id: t, type: n } = e, r = t ? this.__transform[t] ?? e.value : e.value;
424
- return te({ type: n, value: r }, this);
440
+ if (this.__mode === _.Runtime) {
441
+ const { id: t, type: s } = e, r = t ? this.__transform[t] ?? e.value : e.value;
442
+ return te({ type: s, value: r }, this);
425
443
  } else
426
444
  return te(e, this);
427
445
  }
428
446
  __parseExpression(e) {
429
447
  if (e)
430
- if (this.__mode === w.Runtime) {
431
- const { id: t, type: n } = e, r = t ? this.__transform[t] ?? e.value : e.value;
432
- return R({ type: n, value: r }, this);
448
+ if (this.__mode === _.Runtime) {
449
+ const { id: t, type: s } = e, r = t ? this.__transform[t] ?? e.value : e.value;
450
+ return C({ type: s, value: r }, this);
433
451
  } else
434
- return R(e, this);
452
+ return C(e, this);
435
453
  }
436
454
  __ref(e = null, t) {
437
- if (this.__mode !== w.VNode)
438
- return e && e !== this.__id && (this.__contextRefs[e] = this), async (n) => {
439
- await Fe(0);
440
- let r = n?.$vtjEl || n?.$el || n?._?.vnode?.el || n;
455
+ if (this.__mode !== _.VNode)
456
+ return e && e !== this.__id && (this.__contextRefs[e] = this), async (s) => {
457
+ await re(0);
458
+ let r = s?.$vtjEl || s?.$el || s?._?.vnode?.el || s;
441
459
  if (!r) {
442
460
  typeof t == "string" && (delete this.$refs[t], e && delete this.__refs[e]);
443
461
  return;
444
462
  }
445
- if (r.nodeType === 3 && r.nextSibling && (r = r.nextSibling), r.__vtj__ = e, w.Design === this.__mode && (r.__context__ = this, r.draggable = !0), e && (this.__refs[e] = n), typeof t == "function")
446
- t(n);
463
+ if (r.nodeType === 3 && r.nextSibling && (r = r.nextSibling), r.__vtj__ = e, _.Design === this.__mode && (r.__context__ = this, r.draggable = !0), e && (this.__refs[e] = s), typeof t == "function")
464
+ t(s);
447
465
  else if (t) {
448
466
  const o = this.$refs[t];
449
- if (o && n !== o) {
450
- const a = new Set([].concat(o, n));
467
+ if (o && s !== o) {
468
+ const a = new Set([].concat(o, s));
451
469
  this.$refs[t] = Array.from(a);
452
470
  } else
453
- this.$refs[t] = n;
471
+ this.$refs[t] = s;
454
472
  }
455
- return n;
473
+ return s;
456
474
  };
457
475
  }
458
476
  __clone(e = {}) {
459
- const t = { ...this.context, ...e }, n = {
477
+ const t = { ...this.context, ...e }, s = {
460
478
  ...t,
461
479
  context: t
462
480
  };
463
- return n.context.__proto__ = this.context, n.__proto__ = this, n;
481
+ return s.context.__proto__ = this.context, s.__proto__ = this, s;
464
482
  }
465
483
  }
466
- function U(s) {
484
+ function N(n) {
467
485
  const {
468
- Vue: e = A,
469
- mode: t = w.Runtime,
470
- components: n = {},
486
+ Vue: e = O,
487
+ mode: t = _.Runtime,
488
+ components: s = {},
471
489
  libs: r = {},
472
490
  apis: o = {},
473
491
  loader: a
474
- } = s, i = e.computed(() => s.dsl), u = {
475
- $components: n,
492
+ } = n, i = e.computed(() => n.dsl), u = {
493
+ $components: s,
476
494
  $libs: r,
477
495
  $apis: o
478
496
  }, c = new lt({
@@ -485,21 +503,21 @@ function U(s) {
485
503
  ...dt(i.value.props ?? [], c)
486
504
  },
487
505
  setup(f) {
488
- c.$props = f, c.props = f, i.value.id && fe(
489
- s.window || window,
506
+ c.$props = f, c.props = f, i.value.id && de(
507
+ n.window || window,
490
508
  i.value.id,
491
509
  i.value.css || ""
492
510
  ), c.state = pt(e, i.value.state ?? {}, c);
493
511
  const l = ht(e, i.value.computed ?? {}, c), m = mt(i.value.methods ?? {}, c), d = vt(e, i.value.inject, c), h = gt(
494
512
  i.value.dataSources || {},
495
513
  c
496
- ), _ = {
514
+ ), w = {
497
515
  ...d,
498
516
  ...l,
499
517
  ...m,
500
518
  ...h
501
519
  };
502
- return c.setup(_, e), yt(e, i.value.watch ?? [], c), {
520
+ return c.setup(w, e), yt(e, i.value.watch ?? [], c), {
503
521
  vtj: c
504
522
  };
505
523
  },
@@ -508,7 +526,7 @@ function U(s) {
508
526
  render() {
509
527
  if (!i.value.nodes) return null;
510
528
  const f = i.value.nodes || [];
511
- return f.length === 1 ? O(f[0], c, e, a) : f.map((l) => O(l, c, e, a));
529
+ return f.length === 1 ? H(f[0], c, e, a) : f.map((l) => H(l, c, e, a));
512
530
  },
513
531
  ..._t(i.value.lifeCycles ?? {}, c)
514
532
  });
@@ -517,66 +535,66 @@ function U(s) {
517
535
  context: c
518
536
  };
519
537
  }
520
- function ft(s = []) {
521
- return s.map((e) => $(e) ? e : e.name);
538
+ function ft(n = []) {
539
+ return n.map((e) => $(e) ? e : e.name);
522
540
  }
523
- function dt(s = [], e) {
524
- const t = (n) => n ? (Array.isArray(n) ? n : [n]).map((o) => We[o]) : void 0;
525
- return s.map((n) => $(n) ? {
526
- name: n
541
+ function dt(n = [], e) {
542
+ const t = (s) => s ? (Array.isArray(s) ? s : [s]).map((o) => Ke[o]) : void 0;
543
+ return n.map((s) => $(s) ? {
544
+ name: s
527
545
  } : {
528
- name: n.name,
529
- type: n.type,
530
- required: n.required,
531
- default: S(n.default) ? e.__parseExpression(n.default) : n.default
546
+ name: s.name,
547
+ type: s.type,
548
+ required: s.required,
549
+ default: S(s.default) ? e.__parseExpression(s.default) : s.default
532
550
  }).reduce(
533
- (n, r) => (n[r.name] = {
551
+ (s, r) => (s[r.name] = {
534
552
  type: t(r.type),
535
553
  required: r.required,
536
554
  default: r.default
537
- }, n),
555
+ }, s),
538
556
  {}
539
557
  );
540
558
  }
541
- function pt(s, e, t) {
542
- return s.reactive(
559
+ function pt(n, e, t) {
560
+ return n.reactive(
543
561
  Object.keys(e || {}).reduce(
544
- (n, r) => {
562
+ (s, r) => {
545
563
  let o = e[r];
546
- return S(o) ? o = t.__parseExpression(o) : M(o) && (o = t.__parseFunction(o)), n[r] = o, n;
564
+ return S(o) ? o = t.__parseExpression(o) : M(o) && (o = t.__parseFunction(o)), s[r] = o, s;
547
565
  },
548
566
  {}
549
567
  )
550
568
  );
551
569
  }
552
- function ht(s, e, t) {
570
+ function ht(n, e, t) {
553
571
  return Object.entries(e ?? {}).reduce(
554
- (n, [r, o]) => (n[r] = s.computed(t.__parseFunction(o)), n),
572
+ (s, [r, o]) => (s[r] = n.computed(t.__parseFunction(o)), s),
555
573
  {}
556
574
  );
557
575
  }
558
- function mt(s, e) {
559
- return Object.entries(s ?? {}).reduce(
560
- (t, [n, r]) => (t[n] = e.__parseFunction(r), t),
576
+ function mt(n, e) {
577
+ return Object.entries(n ?? {}).reduce(
578
+ (t, [s, r]) => (t[s] = e.__parseFunction(r), t),
561
579
  {}
562
580
  );
563
581
  }
564
- function vt(s, e = [], t) {
582
+ function vt(n, e = [], t) {
565
583
  return e.reduce(
566
- (n, r) => {
584
+ (s, r) => {
567
585
  const { name: o, from: a } = r || {};
568
586
  r.default;
569
587
  const i = S(a) ? t.__parseExpression(a) || o : a ?? o, u = S(r.default) ? t.__parseExpression(r.default) : r.default ?? null;
570
- return n[o] = s.inject(i, u), n;
588
+ return s[o] = n.inject(i, u), s;
571
589
  },
572
590
  {}
573
591
  );
574
592
  }
575
- function gt(s, e) {
576
- return Object.keys(s).reduce(
577
- (t, n) => {
578
- const r = s[n], o = e.$apis[r.ref], a = M(r.transform) ? r.transform.value ? e.__parseFunction(r.transform) : void 0 : r.transform;
579
- return t[n] = async (...i) => {
593
+ function gt(n, e) {
594
+ return Object.keys(n).reduce(
595
+ (t, s) => {
596
+ const r = n[s], o = e.$apis[r.ref], a = M(r.transform) ? r.transform.value ? e.__parseFunction(r.transform) : void 0 : r.transform;
597
+ return t[s] = async (...i) => {
580
598
  const u = await o.apply(e, i);
581
599
  return a ? a(u) : u;
582
600
  }, t;
@@ -584,179 +602,179 @@ function gt(s, e) {
584
602
  {}
585
603
  );
586
604
  }
587
- function yt(s, e = [], t) {
588
- e.forEach((n) => {
589
- s.watch(
590
- t.__parseExpression(n.source),
591
- t.__parseFunction(n.handler),
605
+ function yt(n, e = [], t) {
606
+ e.forEach((s) => {
607
+ n.watch(
608
+ t.__parseExpression(s.source),
609
+ t.__parseFunction(s.handler),
592
610
  {
593
- deep: n.deep,
594
- immediate: n.immediate
611
+ deep: s.deep,
612
+ immediate: s.immediate
595
613
  }
596
614
  );
597
615
  });
598
616
  }
599
- function _t(s, e) {
600
- return Object.entries(s ?? {}).reduce(
601
- (t, [n, r]) => (t[n] = e.__parseFunction(r), t),
617
+ function _t(n, e) {
618
+ return Object.entries(n ?? {}).reduce(
619
+ (t, [s, r]) => (t[s] = e.__parseFunction(r), t),
602
620
  {}
603
621
  );
604
622
  }
605
- let T = [];
606
- const wt = (s) => s;
607
- async function he(s, e = window) {
608
- const { urls: t = [], library: n } = s, r = t.filter((i) => V(i));
609
- if (r.length === 0 || !n) return null;
610
- const o = t.filter((i) => J(i));
611
- return o.length && Ze(o, e), await et(r, n, e).catch(
612
- (i) => (console.warn("loadScriptUrl error", r, n, i), null)
623
+ let B = [];
624
+ const wt = (n) => n;
625
+ async function me(n, e = window) {
626
+ const { urls: t = [], library: s } = n, r = t.filter((i) => z(i));
627
+ if (r.length === 0 || !s) return null;
628
+ const o = t.filter((i) => V(i));
629
+ return o.length && Ze(o, e), await et(r, s, e).catch(
630
+ (i) => (console.warn("loadScriptUrl error", r, s, i), null)
613
631
  );
614
632
  }
615
- function N(s) {
616
- const { getDsl: e, getDslByUrl: t, options: n } = s;
617
- return n.window && (T.forEach((r) => {
618
- delete n.window[r];
619
- }), T = []), (r, o, a = A) => !o || typeof o == "string" ? r : o.type === "Schema" && o.id ? a.defineAsyncComponent(async () => {
633
+ function L(n) {
634
+ const { getDsl: e, getDslByUrl: t, options: s } = n;
635
+ return s.window && (B.forEach((r) => {
636
+ delete s.window[r];
637
+ }), B = []), (r, o, a = O) => !o || typeof o == "string" ? r : o.type === "Schema" && o.id ? a.defineAsyncComponent(async () => {
620
638
  const i = await e(o.id);
621
- return i && (i.name = r), i ? U({
622
- ...n,
639
+ return i && (i.name = r), i ? N({
640
+ ...s,
623
641
  Vue: a,
624
642
  dsl: i,
625
- mode: w.Runtime,
626
- loader: N(s)
643
+ mode: _.Runtime,
644
+ loader: L(n)
627
645
  }).renderer : null;
628
646
  }) : o.type === "UrlSchema" && o.url ? a.defineAsyncComponent(async () => {
629
647
  const i = await t(o.url);
630
- return i && (i.name = r), i ? U({
631
- ...n,
648
+ return i && (i.name = r), i ? N({
649
+ ...s,
632
650
  Vue: a,
633
651
  dsl: i,
634
- mode: w.Runtime,
635
- loader: N(s)
652
+ mode: _.Runtime,
653
+ loader: L(n)
636
654
  }).renderer : null;
637
- }) : o.type === "Plugin" ? (o.library && T.push(o.library), a.defineAsyncComponent(async () => {
638
- const i = await he(o, n.window);
655
+ }) : o.type === "Plugin" ? (o.library && B.push(o.library), a.defineAsyncComponent(async () => {
656
+ const i = await me(o, s.window);
639
657
  return i || (console.warn("getPlugin result is null", o), null);
640
658
  })) : r;
641
659
  }
642
- function O(s, e, t = A, n = wt) {
643
- if (!s || !s.name || s.invisible) return null;
644
- const { id: r = null, directives: o = [] } = s, { vIf: a, vFor: i, vShow: u, vModels: c, vBind: p } = St(o);
660
+ function H(n, e, t = O, s = wt) {
661
+ if (!n || !n.name || n.invisible) return null;
662
+ const { id: r = null, directives: o = [] } = n, { vIf: a, vFor: i, vShow: u, vModels: c, vBind: p } = St(o);
645
663
  if (a && !$t(a, e))
646
664
  return null;
647
665
  const f = (l) => {
648
666
  const m = l.$components, d = (() => {
649
- if (s.name === "component")
650
- return jt(l, s.props?.is);
651
- if (s.name === "slot") return s.name;
652
- const g = n(s.name, s.from, t);
667
+ if (n.name === "component")
668
+ return jt(l, n.props?.is);
669
+ if (n.name === "slot") return n.name;
670
+ const g = s(n.name, n.from, t);
653
671
  return $(g) ? m[g] ?? g : g;
654
- })(), h = Et(r, s.props ?? {}, l), _ = Pt(t, s.events ?? {}, l);
655
- if (s.name === "slot")
656
- return bt(t, s, h, l, n);
672
+ })(), h = Et(r, n.props ?? {}, l), w = Pt(t, n.events ?? {}, l);
673
+ if (n.name === "slot")
674
+ return bt(t, n, h, l, s);
657
675
  p && Object.assign(h, l.__parseExpression(p.value)), u && (h.style = Object.assign(
658
676
  h.style ?? {},
659
- Rt(u, l)
677
+ Ct(u, l)
660
678
  )), c.forEach((g) => {
661
679
  Object.assign(h, Ft(t, g, l));
662
680
  });
663
681
  const v = xt(
664
682
  t,
665
- s.children ?? [],
683
+ n.children ?? [],
666
684
  l,
667
- n,
668
- s
685
+ s,
686
+ n
669
687
  );
670
- return t.createVNode(d, { ...h, ..._ }, v);
688
+ return t.createVNode(d, { ...h, ...w }, v);
671
689
  };
672
- return i ? Ot(i, f, e) : f(e);
690
+ return i ? Ht(i, f, e) : f(e);
673
691
  }
674
- function St(s = []) {
675
- const e = s.find((i) => j(i.name) === "vIf"), t = s.find((i) => j(i.name) === "vFor"), n = s.find((i) => j(i.name) === "vShow"), r = s.find((i) => j(i.name) === "vBind"), o = s.filter((i) => j(i.name) === "vModel"), a = s.filter(
692
+ function St(n = []) {
693
+ 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(
676
694
  (i) => !ze.includes(j(i.name))
677
695
  );
678
696
  return {
679
697
  vIf: e,
680
698
  vFor: t,
681
- vShow: n,
699
+ vShow: s,
682
700
  vModels: o,
683
701
  vBind: r,
684
702
  others: a
685
703
  };
686
704
  }
687
- function $t(s, e) {
688
- return !!e.__parseExpression(s.value);
705
+ function $t(n, e) {
706
+ return !!e.__parseExpression(n.value);
689
707
  }
690
- function jt(s, e) {
691
- return e ? S(e) ? s.__parseExpression(e) : e : "div";
708
+ function jt(n, e) {
709
+ return e ? S(e) ? n.__parseExpression(e) : e : "div";
692
710
  }
693
- function Et(s, e, t) {
694
- const n = Object.keys(e || {}).reduce(
711
+ function Et(n, e, t) {
712
+ const s = Object.keys(e || {}).reduce(
695
713
  (r, o) => {
696
714
  let a = e[o];
697
715
  return S(a) ? a = t.__parseExpression(a) : M(a) && (a = t.__parseFunction(a)), r[o] = a, r;
698
716
  },
699
717
  {}
700
718
  );
701
- return n.ref = t.__ref(s, n.ref), n;
719
+ return s.ref = t.__ref(n, s.ref), s;
702
720
  }
703
- function Pt(s, e, t) {
704
- const n = ["passive", "capture", "once"], r = {
721
+ function Pt(n, e, t) {
722
+ const s = ["passive", "capture", "once"], r = {
705
723
  capture: "Capture",
706
724
  once: "Once",
707
725
  passive: "OnceCapture"
708
726
  };
709
727
  return Object.keys(e || {}).reduce(
710
728
  (o, a) => {
711
- const i = e[a], u = me(i.modifiers), c = u.find((l) => n.includes(l)), p = "on" + xe(a) + (c && r[c] || ""), f = t.__parseFunction(i.handler);
712
- return f && (o[p] = s.withModifiers(f, u)), o;
729
+ const i = e[a], u = ve(i.modifiers), c = u.find((l) => s.includes(l)), p = "on" + xe(a) + (c && r[c] || ""), f = t.__parseFunction(i.handler);
730
+ return f && (o[p] = n.withModifiers(f, u)), o;
713
731
  },
714
732
  {}
715
733
  );
716
734
  }
717
- function me(s = {}, e = !1) {
718
- const t = Object.keys(s);
719
- return e ? t.map((n) => "." + n) : t;
735
+ function ve(n = {}, e = !1) {
736
+ const t = Object.keys(n);
737
+ return e ? t.map((s) => "." + s) : t;
720
738
  }
721
- function bt(s, e, t, n, r) {
722
- const { children: o } = e, a = Ct(e, n), i = n.$slots?.[a.name];
723
- return i ? i(t) : o ? $(o) ? s.createTextVNode(o) : S(o) ? s.createTextVNode(
724
- le(n.__parseExpression(o))
739
+ function bt(n, e, t, s, r) {
740
+ const { children: o } = e, a = Rt(e, s), i = s.$slots?.[a.name];
741
+ return i ? i(t) : o ? $(o) ? n.createTextVNode(o) : S(o) ? n.createTextVNode(
742
+ fe(s.__parseExpression(o))
725
743
  ) : Array.isArray(o) ? o.map(
726
- (u) => O(u, n, s, r)
744
+ (u) => H(u, s, n, r)
727
745
  ) : null : null;
728
746
  }
729
- function Ct(s, e) {
730
- const { props: t } = s, n = t?.name || "default";
747
+ function Rt(n, e) {
748
+ const { props: t } = n, s = t?.name || "default";
731
749
  return {
732
- name: S(n) ? e.__parseExpression(n) : n,
750
+ name: S(s) ? e.__parseExpression(s) : s,
733
751
  params: []
734
752
  };
735
753
  }
736
- function Rt(s, e) {
737
- return e.__parseExpression(s.value) ? {} : {
754
+ function Ct(n, e) {
755
+ return e.__parseExpression(n.value) ? {} : {
738
756
  display: "none"
739
757
  };
740
758
  }
741
- function Ft(s, e, t) {
742
- const n = {
759
+ function Ft(n, e, t) {
760
+ const s = {
743
761
  type: "JSFunction",
744
762
  value: e.value?.value ? `(v) => {
745
763
  ${e.value.value} = v;
746
764
  }` : "(v) => {}"
747
- }, r = t.__parseFunction(n), o = me(e.modifiers), a = S(e.arg) ? t.__parseExpression(e.arg) : e.arg || "modelValue";
765
+ }, r = t.__parseFunction(s), o = ve(e.modifiers), a = S(e.arg) ? t.__parseExpression(e.arg) : e.arg || "modelValue";
748
766
  return {
749
767
  [a]: t.__parseExpression(e.value),
750
- [`onUpdate:${a}`]: o.length && r ? s.withModifiers(r, o) : r
768
+ [`onUpdate:${a}`]: o.length && r ? n.withModifiers(r, o) : r
751
769
  };
752
770
  }
753
- function xt(s, e, t, n, r) {
771
+ function xt(n, e, t, s, r) {
754
772
  if (!e) return null;
755
773
  if ($(e))
756
774
  return { default: () => e };
757
775
  if (S(e))
758
776
  return {
759
- default: () => le(t.__parseExpression(e))
777
+ default: () => fe(t.__parseExpression(e))
760
778
  };
761
779
  if (Array.isArray(e) && e.length > 0) {
762
780
  const o = It(e), a = (i) => !i || !r ? {} : r?.id && Object.keys(i).length ? {
@@ -765,83 +783,83 @@ function xt(s, e, t, n, r) {
765
783
  return Object.entries(o).reduce((i, [u, { nodes: c, params: p }]) => (i[u] = (f) => {
766
784
  const l = p.length ? Ie(f ?? {}, p) : a(f);
767
785
  return c.map(
768
- (m) => O(m, t.__clone(l), s, n)
786
+ (m) => H(m, t.__clone(l), n, s)
769
787
  );
770
788
  }, i), {});
771
789
  }
772
790
  return null;
773
791
  }
774
- function It(s) {
792
+ function It(n) {
775
793
  const e = {
776
794
  default: {
777
795
  params: [],
778
796
  nodes: []
779
797
  }
780
798
  };
781
- for (const t of s) {
782
- const n = Ht(t.slot), r = n.name;
783
- e[r] ? (e[r].nodes.push(t), e[r].params = e[r].params.concat(n.params)) : e[r] = {
799
+ for (const t of n) {
800
+ const s = At(t.slot), r = s.name;
801
+ e[r] ? (e[r].nodes.push(t), e[r].params = e[r].params.concat(s.params)) : e[r] = {
784
802
  nodes: [t],
785
- params: n.params
803
+ params: s.params
786
804
  };
787
805
  }
788
806
  return e;
789
807
  }
790
- function Ht(s = "default") {
791
- return $(s) ? { name: s, params: [] } : { params: [], ...s };
808
+ function At(n = "default") {
809
+ return $(n) ? { name: n, params: [] } : { params: [], ...n };
792
810
  }
793
- function Ot(s, e, t) {
794
- const { value: n, iterator: r } = s, { item: o = "item", index: a = "index" } = r || {};
795
- let i = t.__parseExpression(n) || [];
796
- 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]:", `${n?.value} is not a Arrary`), []);
811
+ function Ht(n, e, t) {
812
+ const { value: s, iterator: r } = n, { item: o = "item", index: a = "index" } = r || {};
813
+ let i = t.__parseExpression(s) || [];
814
+ 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`), []);
797
815
  }
798
- function At(s) {
799
- return Be() ? (Ue(s), !0) : !1;
816
+ function Ot(n) {
817
+ return Be() ? (Ue(n), !0) : !1;
800
818
  }
801
- function z(s) {
802
- return typeof s == "function" ? s() : Ne(s);
819
+ function K(n) {
820
+ return typeof n == "function" ? n() : Ne(n);
803
821
  }
804
- const ve = typeof window < "u" && typeof document < "u";
822
+ const ge = typeof window < "u" && typeof document < "u";
805
823
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
806
- const Dt = (s) => s != null, Mt = () => {
824
+ const Dt = (n) => n != null, Mt = () => {
807
825
  };
808
- function kt(s) {
809
- return oe();
826
+ function kt(n) {
827
+ return ie();
810
828
  }
811
- function Tt(...s) {
812
- if (s.length !== 1)
813
- return De(...s);
814
- const e = s[0];
815
- return typeof e == "function" ? Me(ke(() => ({ get: e, set: Mt }))) : q(e);
829
+ function Tt(...n) {
830
+ if (n.length !== 1)
831
+ return De(...n);
832
+ const e = n[0];
833
+ return typeof e == "function" ? Me(ke(() => ({ get: e, set: Mt }))) : J(e);
816
834
  }
817
- function Bt(s, e) {
818
- kt() && Te(s, e);
835
+ function Bt(n, e) {
836
+ kt() && Te(n, e);
819
837
  }
820
- const Ut = ve ? window : void 0, Nt = ve ? window.document : void 0;
821
- function Lt(s) {
838
+ const Ut = ge ? window : void 0, Nt = ge ? window.document : void 0;
839
+ function Lt(n) {
822
840
  var e;
823
- const t = z(s);
841
+ const t = K(n);
824
842
  return (e = t?.$el) != null ? e : t;
825
843
  }
826
844
  function qt() {
827
- const s = q(!1), e = oe();
845
+ const n = J(!1), e = ie();
828
846
  return e && Le(() => {
829
- s.value = !0;
830
- }, e), s;
847
+ n.value = !0;
848
+ }, e), n;
831
849
  }
832
- function Jt(s) {
850
+ function Jt(n) {
833
851
  const e = qt();
834
- return ae(() => (e.value, !!s()));
852
+ return ce(() => (e.value, !!n()));
835
853
  }
836
- function Vt(s, e, t = {}) {
837
- const { window: n = Ut, ...r } = t;
854
+ function Vt(n, e, t = {}) {
855
+ const { window: s = Ut, ...r } = t;
838
856
  let o;
839
- const a = Jt(() => n && "MutationObserver" in n), i = () => {
857
+ const a = Jt(() => s && "MutationObserver" in s), i = () => {
840
858
  o && (o.disconnect(), o = void 0);
841
- }, u = ae(() => {
842
- const l = z(s), m = (Array.isArray(l) ? l : [l]).map(Lt).filter(Dt);
859
+ }, u = ce(() => {
860
+ const l = K(n), m = (Array.isArray(l) ? l : [l]).map(Lt).filter(Dt);
843
861
  return new Set(m);
844
- }), c = ie(
862
+ }), c = ae(
845
863
  () => u.value,
846
864
  (l) => {
847
865
  i(), a.value && l.size && (o = new MutationObserver(e), l.forEach((m) => o.observe(m, r)));
@@ -850,25 +868,25 @@ function Vt(s, e, t = {}) {
850
868
  ), p = () => o?.takeRecords(), f = () => {
851
869
  c(), i();
852
870
  };
853
- return At(f), {
871
+ return Ot(f), {
854
872
  isSupported: a,
855
873
  stop: f,
856
874
  takeRecords: p
857
875
  };
858
876
  }
859
- function zt(s = null, e = {}) {
860
- var t, n, r;
877
+ function zt(n = null, e = {}) {
878
+ var t, s, r;
861
879
  const {
862
880
  document: o = Nt,
863
881
  restoreOnUnmount: a = (f) => f
864
- } = e, i = (t = o?.title) != null ? t : "", u = Tt((n = s ?? o?.title) != null ? n : null), c = s && typeof s == "function";
882
+ } = e, i = (t = o?.title) != null ? t : "", u = Tt((s = n ?? o?.title) != null ? s : null), c = n && typeof n == "function";
865
883
  function p(f) {
866
884
  if (!("titleTemplate" in e))
867
885
  return f;
868
886
  const l = e.titleTemplate || "%s";
869
- return typeof l == "function" ? l(f) : z(l).replace(/%s/g, f);
887
+ return typeof l == "function" ? l(f) : K(l).replace(/%s/g, f);
870
888
  }
871
- return ie(
889
+ return ae(
872
890
  u,
873
891
  (f, l) => {
874
892
  f !== l && o && (o.title = p(typeof f == "string" ? f : ""));
@@ -887,33 +905,33 @@ function zt(s = null, e = {}) {
887
905
  }
888
906
  }), u;
889
907
  }
890
- const ne = ce({
908
+ const se = ue({
891
909
  name: "VtjPageContainer",
892
910
  async setup() {
893
- const s = ye(), e = ue(), t = e.params.id, n = t ? s.getPage(t) : s.getHomepage(), r = n ? await s.getRenderComponent(n.id) : null;
894
- return n && zt(n.title || "VTJ"), {
895
- provider: s,
911
+ const n = _e(), e = le(), t = e.params.id, s = t ? n.getPage(t) : n.getHomepage(), r = s ? await n.getRenderComponent(s.id) : null;
912
+ return s && zt(s.title || "VTJ"), {
913
+ provider: n,
896
914
  component: r,
897
- file: n,
915
+ file: s,
898
916
  query: e.query
899
917
  };
900
918
  },
901
919
  render() {
902
- return this.component ? B(this.component, this.query) : B("div", "页面不存在");
920
+ return this.component ? U(this.component, this.query) : U("div", "页面不存在");
903
921
  }
904
- }), Wt = ce({
922
+ }), Kt = ue({
905
923
  name: "VtjStartupContainer",
906
924
  render() {
907
- return B(Ve);
925
+ return U(Ve);
908
926
  }
909
- }), ge = Symbol("Provider");
910
- var Kt = /* @__PURE__ */ ((s) => (s.Production = "production", s.Development = "development", s))(Kt || {});
911
- class Gt extends we {
927
+ }), ye = Symbol("Provider");
928
+ var Wt = /* @__PURE__ */ ((n) => (n.Production = "production", n.Development = "development", n))(Wt || {});
929
+ class Gt extends Se {
912
930
  constructor(e) {
913
931
  super(), this.options = e;
914
932
  const {
915
933
  service: t,
916
- mode: n = w.Raw,
934
+ mode: s = _.Raw,
917
935
  dependencies: r,
918
936
  materials: o,
919
937
  project: a = {},
@@ -925,14 +943,14 @@ class Gt extends we {
925
943
  nodeEnv: l = "development"
926
944
  /* Development */
927
945
  } = e;
928
- this.mode = n, this.modules = c, this.service = t, this.router = p, this.materialPath = f, this.nodeEnv = l, r && (this.dependencies = r), o && (this.materials = o), Object.assign(this.globals, u), Object.assign(this.adapter, i);
946
+ this.mode = s, this.modules = c, this.service = t, this.router = p, this.materialPath = f, this.nodeEnv = l, r && (this.dependencies = r), o && (this.materials = o), Object.assign(this.globals, u), Object.assign(this.adapter, i);
929
947
  const { access: m, request: d } = this.adapter;
930
- m && m.connect({ mode: n, router: p, request: d }), n !== w.Design && this.load(a);
948
+ m && m.connect({ mode: s, router: p, request: d }), s !== _.Design && this.load(a);
931
949
  }
932
950
  mode;
933
951
  globals = {};
934
952
  modules = {};
935
- adapter = { request: st, jsonp: He };
953
+ adapter = { request: nt, jsonp: Ae };
936
954
  apis = {};
937
955
  dependencies = {};
938
956
  materials = {};
@@ -948,16 +966,16 @@ class Gt extends we {
948
966
  const t = this.modules[`.vtj/projects/${e.id}.json`];
949
967
  if (this.project = t ? await t() : await this.service.init(e), !this.project)
950
968
  throw new Error("project is null");
951
- const { apis: n = [], meta: r = [] } = this.project, o = window;
952
- o.CKEDITOR_VERSION = void 0, this.nodeEnv !== "production" ? await this.loadAssets(o) : await this.loadDependencies(o), this.apis = it(n, r, this.adapter), de(), this.project.config?.mock && at(n), this.initRouter(), this.triggerReady();
969
+ const { apis: s = [], meta: r = [] } = this.project, o = window;
970
+ o.CKEDITOR_VERSION = void 0, this.nodeEnv !== "production" ? await this.loadAssets(o) : await this.loadDependencies(o), this.apis = it(s, r, this.adapter), pe(), this.project.config?.mock && at(s), this.initRouter(), this.triggerReady();
953
971
  }
954
972
  async loadDependencies(e) {
955
973
  const t = Object.entries(this.dependencies);
956
- for (const [n, r] of t)
957
- e[n] || (e[n] = await r());
974
+ for (const [s, r] of t)
975
+ e[s] || (e[s] = await r());
958
976
  }
959
977
  async loadAssets(e) {
960
- const { dependencies: t = [] } = this.project, { dependencies: n, library: r, components: o, materialPath: a, nodeEnv: i } = this, {
978
+ const { dependencies: t = [] } = this.project, { dependencies: s, library: r, components: o, materialPath: a, nodeEnv: i } = this, {
961
979
  libraryExports: u,
962
980
  libraryMap: c,
963
981
  materials: p,
@@ -970,25 +988,25 @@ class Gt extends we {
970
988
  /* Development */
971
989
  );
972
990
  for (const d of u) {
973
- const h = n[d], _ = e[d];
974
- if (_)
975
- r[d] = _;
991
+ const h = s[d], w = e[d];
992
+ if (w)
993
+ r[d] = w;
976
994
  else if (h)
977
995
  e[d] = r[d] = await h();
978
996
  else {
979
997
  const v = c[d] || [];
980
998
  for (const g of v)
981
- J(g) && await Xe(d, b.append(g, { v: C })), V(g) && await X(b.append(g, { v: C }));
999
+ V(g) && await Xe(d, b.append(g, { v: R })), z(g) && await X(b.append(g, { v: R }));
982
1000
  r[d] = e[d];
983
1001
  }
984
1002
  }
985
1003
  for (const d of p)
986
- await X(b.append(d, { v: C }));
1004
+ await X(b.append(d, { v: R }));
987
1005
  const m = this.materials || {};
988
1006
  for (const d of f) {
989
- const h = e[l[d]], _ = Se[d];
990
- if (_)
991
- h && _.forEach((v) => {
1007
+ const h = e[l[d]], w = $e[d];
1008
+ if (w)
1009
+ h && w.forEach((v) => {
992
1010
  o[v] = h[v];
993
1011
  });
994
1012
  else {
@@ -1004,27 +1022,27 @@ class Gt extends we {
1004
1022
  e && (e.addRoute({
1005
1023
  path: "/page/:id",
1006
1024
  name: "VtjPage",
1007
- component: ne
1025
+ component: se
1008
1026
  }), e.addRoute({
1009
1027
  path: "/",
1010
1028
  name: "VtjHomepage",
1011
- component: t?.homepage ? ne : Wt
1029
+ component: t?.homepage ? se : Kt
1012
1030
  }));
1013
1031
  }
1014
1032
  install(e) {
1015
1033
  const t = e.config.globalProperties.installed || {};
1016
- for (const [n, r] of Object.entries(this.library))
1017
- !t[n] && tt(r) && (e.use(r), t[n] = !0);
1018
- this.options.install && e.use(this.options.install), this.adapter.access && e.use(this.adapter.access), e.provide(ge, this), e.config.globalProperties.installed = t, this.nodeEnv === "development" && (e.config.errorHandler = (n, r, o) => {
1019
- const a = r?.$options.name, i = typeof n == "string" ? n : n?.message || n?.msg || "未知错误", u = `[ ${a} ] ${i} ${o}`;
1034
+ for (const [s, r] of Object.entries(this.library))
1035
+ !t[s] && tt(r) && (e.use(r), t[s] = !0);
1036
+ this.options.install && e.use(this.options.install), this.adapter.access && e.use(this.adapter.access), e.provide(ye, this), e.config.globalProperties.installed = t, this.nodeEnv === "development" && (e.config.errorHandler = (s, r, o) => {
1037
+ const a = r?.$options.name, i = typeof s == "string" ? s : s?.message || s?.msg || "未知错误", u = `[ ${a} ] ${i} ${o}`;
1020
1038
  console.error(
1021
1039
  "[VTJ Error]:",
1022
1040
  {
1023
- err: n,
1041
+ err: s,
1024
1042
  instance: r,
1025
1043
  info: o
1026
1044
  },
1027
- n?.stack
1045
+ s?.stack
1028
1046
  ), D.error({
1029
1047
  title: "运行时错误:请在控制台查看详情",
1030
1048
  message: u
@@ -1033,21 +1051,21 @@ class Gt extends we {
1033
1051
  }
1034
1052
  getFile(e) {
1035
1053
  const { blocks: t = [] } = this.project || {};
1036
- return this.getPage(e) || t.find((n) => n.id === e) || null;
1054
+ return this.getPage(e) || t.find((s) => s.id === e) || null;
1037
1055
  }
1038
1056
  getPage(e) {
1039
- const { pages: t = [] } = this.project || {}, n = (r, o = []) => {
1057
+ const { pages: t = [] } = this.project || {}, s = (r, o = []) => {
1040
1058
  for (const a of o) {
1041
1059
  if (a.id === r)
1042
1060
  return a;
1043
1061
  if (a.children && a.children.length) {
1044
- const i = n(r, a.children);
1062
+ const i = s(r, a.children);
1045
1063
  if (i)
1046
1064
  return i;
1047
1065
  }
1048
1066
  }
1049
1067
  };
1050
- return n(e, t) || null;
1068
+ return s(e, t) || null;
1051
1069
  }
1052
1070
  getHomepage() {
1053
1071
  const { homepage: e } = this.project || {};
@@ -1066,23 +1084,23 @@ class Gt extends we {
1066
1084
  validSuccess: !1,
1067
1085
  originResponse: !0
1068
1086
  }
1069
- }).then((n) => n.data).catch(() => null));
1087
+ }).then((s) => s.data).catch(() => null));
1070
1088
  }
1071
1089
  createDslRenderer(e, t = {}) {
1072
- const { library: n, components: r, mode: o, apis: a } = this, i = {
1090
+ const { library: s, components: r, mode: o, apis: a } = this, i = {
1073
1091
  mode: o,
1074
- Vue: n.Vue,
1092
+ Vue: s.Vue,
1075
1093
  components: r,
1076
- libs: n,
1094
+ libs: s,
1077
1095
  apis: a,
1078
1096
  window,
1079
1097
  ...t
1080
- }, u = N({
1098
+ }, u = L({
1081
1099
  getDsl: async (c) => await this.getDsl(c) || null,
1082
1100
  getDslByUrl: async (c) => await this.getDslByUrl(c) || null,
1083
1101
  options: i
1084
1102
  });
1085
- return U({
1103
+ return N({
1086
1104
  ...i,
1087
1105
  dsl: e,
1088
1106
  loader: u
@@ -1091,39 +1109,39 @@ class Gt extends we {
1091
1109
  async getRenderComponent(e) {
1092
1110
  const t = this.getFile(e);
1093
1111
  if (!t)
1094
- return H.warn(`Can not find file: ${e}`), null;
1095
- const n = `.vtj/vue/${e}.vue`, r = this.modules[n];
1112
+ return A.warn(`Can not find file: ${e}`), null;
1113
+ const s = `.vtj/vue/${e}.vue`, r = this.modules[s];
1096
1114
  if (r)
1097
1115
  return (await r())?.default;
1098
1116
  const o = await this.getDsl(t.id);
1099
- return o ? this.createDslRenderer(o).renderer : (H.warn(`Can not find dsl: ${e}`), null);
1117
+ return o ? this.createDslRenderer(o).renderer : (A.warn(`Can not find dsl: ${e}`), null);
1100
1118
  }
1101
1119
  defineUrlSchemaComponent(e, t) {
1102
1120
  return Z(async () => {
1103
- const n = await this.getDslByUrl(e);
1104
- return n ? (n.name = t || n.name, this.createDslRenderer(n).renderer) : null;
1121
+ const s = await this.getDslByUrl(e);
1122
+ return s ? (s.name = t || s.name, this.createDslRenderer(s).renderer) : null;
1105
1123
  });
1106
1124
  }
1107
1125
  definePluginComponent(e) {
1108
- return Z(async () => await he(e, window));
1126
+ return Z(async () => await me(e, window));
1109
1127
  }
1110
1128
  }
1111
- function dn(s) {
1112
- const e = new Gt(s);
1129
+ function fs(n) {
1130
+ const e = new Gt(n);
1113
1131
  return {
1114
1132
  provider: e,
1115
- onReady: (n) => e.ready(n)
1133
+ onReady: (s) => e.ready(s)
1116
1134
  };
1117
1135
  }
1118
- function ye(s = {}) {
1119
- const e = re(ge);
1136
+ function _e(n = {}) {
1137
+ const e = oe(ye);
1120
1138
  if (!e)
1121
1139
  throw new Error("Can not find provider");
1122
1140
  if (e.nodeEnv === "development") {
1123
- const { id: t, version: n } = s;
1124
- t && n && (async () => {
1141
+ const { id: t, version: s } = n;
1142
+ t && s && (async () => {
1125
1143
  const r = await e.getDsl(t);
1126
- r?.__VERSION__ !== n && D.warning({
1144
+ r?.__VERSION__ !== s && D.warning({
1127
1145
  title: r?.name,
1128
1146
  message: "当前组件源码版本与运行时版本不一致,请重新发布组件"
1129
1147
  });
@@ -1131,29 +1149,29 @@ function ye(s = {}) {
1131
1149
  }
1132
1150
  return e;
1133
1151
  }
1134
- const W = new Oe({
1152
+ const W = new He({
1135
1153
  settings: {
1136
1154
  type: "json",
1137
1155
  validSuccess: !0,
1138
1156
  originResponse: !1,
1139
1157
  failMessage: !0,
1140
- validate: (s) => s.data?.code === 0,
1141
- showError: (s) => {
1158
+ validate: (n) => n.data?.code === 0,
1159
+ showError: (n) => {
1142
1160
  D.error({
1143
- message: s || "未知错误"
1161
+ message: n || "未知错误"
1144
1162
  });
1145
1163
  }
1146
1164
  }
1147
- }), Yt = (s = "/__vtj__/api/:type.json") => (e, t) => W.send({
1148
- url: s,
1165
+ }), Yt = (n = "/__vtj__/api/:type.json") => (e, t) => W.send({
1166
+ url: n,
1149
1167
  method: "post",
1150
1168
  params: { type: e },
1151
1169
  data: {
1152
1170
  type: e,
1153
1171
  data: t
1154
1172
  }
1155
- }), Qt = (s = "/__vtj__/api/uploader.json") => async (e, t) => await W.send({
1156
- url: s,
1173
+ }), Qt = (n = "/__vtj__/api/uploader.json") => async (e, t) => await W.send({
1174
+ url: n,
1157
1175
  method: "post",
1158
1176
  data: {
1159
1177
  files: e,
@@ -1162,8 +1180,8 @@ const W = new Oe({
1162
1180
  settings: {
1163
1181
  type: "data"
1164
1182
  }
1165
- }).then((n) => n && n[0] ? n[0] : null).catch(() => null);
1166
- class K {
1183
+ }).then((s) => s && s[0] ? s[0] : null).catch(() => null);
1184
+ class G {
1167
1185
  api;
1168
1186
  pluginCaches = {};
1169
1187
  uploader;
@@ -1241,11 +1259,11 @@ class K {
1241
1259
  return await this.api("clearStaticFiles", e).catch(() => "");
1242
1260
  }
1243
1261
  async getPluginMaterial(e) {
1244
- const { urls: t = [] } = e, n = t.filter((o) => Ke(o))[0];
1245
- if (!n) return null;
1246
- const r = this.pluginCaches[n];
1247
- return r || (this.pluginCaches[n] = W.send({
1248
- url: n,
1262
+ const { urls: t = [] } = e, s = t.filter((o) => We(o))[0];
1263
+ if (!s) return null;
1264
+ const r = this.pluginCaches[s];
1265
+ return r || (this.pluginCaches[s] = W.send({
1266
+ url: s,
1249
1267
  method: "get",
1250
1268
  settings: {
1251
1269
  validSuccess: !1,
@@ -1254,14 +1272,14 @@ class K {
1254
1272
  }).then((o) => o.data).catch(() => null));
1255
1273
  }
1256
1274
  }
1257
- const y = new Ae({
1275
+ const y = new Oe({
1258
1276
  type: "local",
1259
1277
  expired: 0,
1260
1278
  prefix: "__VTJ_"
1261
1279
  });
1262
- class pn extends K {
1280
+ class ds extends G {
1263
1281
  init(e) {
1264
- const t = new I(e), n = y.get(`project_${t.id}`), r = Object.assign(t.toDsl(), n || {});
1282
+ const t = new I(e), s = y.get(`project_${t.id}`), r = Object.assign(t.toDsl(), s || {});
1265
1283
  return y.save(`project_${t.id}`, r), Promise.resolve(r);
1266
1284
  }
1267
1285
  saveProject(e) {
@@ -1269,7 +1287,7 @@ class pn extends K {
1269
1287
  return y.save(`project_${t.id}`, t.toDsl()), Promise.resolve(!0);
1270
1288
  }
1271
1289
  saveMaterials(e, t) {
1272
- return y.save(`materials_${e.id}`, L(t)), Promise.resolve(!0);
1290
+ return y.save(`materials_${e.id}`, q(t)), Promise.resolve(!0);
1273
1291
  }
1274
1292
  saveFile(e) {
1275
1293
  return y.save(`file_${e.id}`, e), Promise.resolve(!0);
@@ -1293,30 +1311,30 @@ class pn extends K {
1293
1311
  return Promise.resolve(!0);
1294
1312
  }
1295
1313
  getHistory(e) {
1296
- const t = y.get(`history_${e}`), n = new se(t || { id: e });
1297
- return Promise.resolve(n.toDsl());
1314
+ const t = y.get(`history_${e}`), s = new ne(t || { id: e });
1315
+ return Promise.resolve(s.toDsl());
1298
1316
  }
1299
1317
  getHistoryItem(e, t) {
1300
- const n = y.get(`history_${e}_${t}`);
1301
- return Promise.resolve(n);
1318
+ const s = y.get(`history_${e}_${t}`);
1319
+ return Promise.resolve(s);
1302
1320
  }
1303
1321
  saveHistoryItem(e, t) {
1304
1322
  return y.save(`history_${e}_${t.id}`, t), Promise.resolve(!0);
1305
1323
  }
1306
1324
  removeHistoryItem(e, t) {
1307
- return t.forEach((n) => {
1308
- y.remove(`history_${e}_${n}`);
1325
+ return t.forEach((s) => {
1326
+ y.remove(`history_${e}_${s}`);
1309
1327
  }), Promise.resolve(!0);
1310
1328
  }
1311
1329
  }
1312
- class Xt extends K {
1330
+ class Xt extends G {
1313
1331
  projects = {};
1314
1332
  materials = {};
1315
1333
  files = {};
1316
1334
  histories = {};
1317
1335
  historyItems = {};
1318
1336
  init(e) {
1319
- const t = new I(e), n = this.projects[t.id] || {}, r = Object.assign(t.toDsl(), n);
1337
+ const t = new I(e), s = this.projects[t.id] || {}, r = Object.assign(t.toDsl(), s);
1320
1338
  return this.projects[r.id] = r, Promise.resolve(r);
1321
1339
  }
1322
1340
  saveProject(e) {
@@ -1324,7 +1342,7 @@ class Xt extends K {
1324
1342
  return this.projects[t.id] = t.toDsl(), Promise.resolve(!0);
1325
1343
  }
1326
1344
  saveMaterials(e, t) {
1327
- return e.id && (this.materials[e.id] = L(t)), Promise.resolve(!0);
1345
+ return e.id && (this.materials[e.id] = q(t)), Promise.resolve(!0);
1328
1346
  }
1329
1347
  saveFile(e) {
1330
1348
  return this.files[e.id] = e, Promise.resolve(!0);
@@ -1348,29 +1366,29 @@ class Xt extends K {
1348
1366
  return Promise.resolve(!0);
1349
1367
  }
1350
1368
  getHistory(e) {
1351
- const t = this.histories[e], n = new se(t || { id: e });
1352
- return Promise.resolve(n);
1369
+ const t = this.histories[e], s = new ne(t || { id: e });
1370
+ return Promise.resolve(s);
1353
1371
  }
1354
1372
  getHistoryItem(e, t) {
1355
- const n = `${e}_${t}`, r = this.historyItems[n] || {};
1373
+ const s = `${e}_${t}`, r = this.historyItems[s] || {};
1356
1374
  return Promise.resolve(r);
1357
1375
  }
1358
1376
  saveHistoryItem(e, t) {
1359
- const n = `${e}_${t.id}`;
1360
- return this.historyItems[n] = t, Promise.resolve(!0);
1377
+ const s = `${e}_${t.id}`;
1378
+ return this.historyItems[s] = t, Promise.resolve(!0);
1361
1379
  }
1362
1380
  removeHistoryItem(e, t) {
1363
- return t.forEach((n) => {
1364
- const r = `${e}_${n}`;
1381
+ return t.forEach((s) => {
1382
+ const r = `${e}_${s}`;
1365
1383
  delete this.historyItems[r];
1366
1384
  }), Promise.resolve(!0);
1367
1385
  }
1368
1386
  }
1369
1387
  let x = null;
1370
- function hn() {
1388
+ function ps() {
1371
1389
  return x || (x = new Xt(), x);
1372
1390
  }
1373
- class mn extends K {
1391
+ class hs extends G {
1374
1392
  getFileCaches = {};
1375
1393
  async getExtension() {
1376
1394
  return await this.api("getExtension", {}).catch(() => {
@@ -1385,7 +1403,7 @@ class mn extends K {
1385
1403
  async saveMaterials(e, t) {
1386
1404
  return !!await this.api("saveMaterials", {
1387
1405
  project: e,
1388
- materials: L(t)
1406
+ materials: q(t)
1389
1407
  }).catch(() => !1);
1390
1408
  }
1391
1409
  async saveFile(e) {
@@ -1425,95 +1443,95 @@ class mn extends K {
1425
1443
  );
1426
1444
  }
1427
1445
  }
1428
- function _e(s = []) {
1429
- return s.map((e) => {
1430
- const { id: t, title: n, icon: r, children: o, hidden: a } = e;
1446
+ function we(n = []) {
1447
+ return n.map((e) => {
1448
+ const { id: t, title: s, icon: r, children: o, hidden: a } = e;
1431
1449
  return {
1432
1450
  id: t,
1433
- title: n,
1451
+ title: s,
1434
1452
  icon: r,
1435
1453
  hidden: a,
1436
1454
  url: `/page/${t}`,
1437
- children: o && o.length ? _e(o) : void 0
1455
+ children: o && o.length ? we(o) : void 0
1438
1456
  };
1439
1457
  });
1440
1458
  }
1441
- function vn() {
1442
- const s = ye(), e = ue(), t = q(!1), n = s.project;
1459
+ function ms() {
1460
+ const n = _e(), e = le(), t = J(!1), s = n.project;
1443
1461
  qe(() => {
1444
1462
  const { name: a, params: i, meta: u } = e;
1445
1463
  if (a === "VtjPage") {
1446
- const c = s.getPage(i.id);
1464
+ const c = n.getPage(i.id);
1447
1465
  t.value = !c?.mask;
1448
1466
  } else if (a === "VtjHomepage") {
1449
- const c = s.getHomepage();
1467
+ const c = n.getHomepage();
1450
1468
  t.value = !c?.mask;
1451
1469
  } else
1452
1470
  t.value = !u.mask;
1453
1471
  });
1454
- const r = _e(n?.pages), o = n?.config;
1472
+ const r = we(s?.pages), o = s?.config;
1455
1473
  return {
1456
1474
  disabled: t,
1457
1475
  logo: o?.logo,
1458
1476
  themeSwitchable: o?.themeSwitchable,
1459
- title: o?.title || n?.description || n?.name || "VTJ App",
1477
+ title: o?.title || s?.description || s?.name || "VTJ App",
1460
1478
  menus: r
1461
1479
  };
1462
1480
  }
1463
1481
  export {
1464
- pe as ACCESS_KEY,
1465
- ln as Access,
1482
+ he as ACCESS_KEY,
1483
+ us as Access,
1466
1484
  ze as BUILT_IN_DIRECTIVES,
1467
- K as BaseService,
1485
+ G as BaseService,
1468
1486
  ee as CONTEXT_HOST,
1469
1487
  lt as Context,
1470
- w as ContextMode,
1471
- We as DATA_TYPES,
1472
- un as JSCodeToString,
1473
- on as LIFE_CYCLES_LIST,
1474
- mn as LocalService,
1488
+ _ as ContextMode,
1489
+ Ke as DATA_TYPES,
1490
+ cs as JSCodeToString,
1491
+ os as LIFE_CYCLES_LIST,
1492
+ hs as LocalService,
1475
1493
  Xt as MemoryService,
1476
- Kt as NodeEnv,
1494
+ Wt as NodeEnv,
1477
1495
  Gt as Provider,
1478
- pn as StorageService,
1479
- C as VTJ_RENDERER_VERSION,
1480
- fe as adoptedStyleSheets,
1481
- an as createAssetScripts,
1482
- cn as createAssetsCss,
1496
+ ds as StorageService,
1497
+ R as VTJ_RENDERER_VERSION,
1498
+ de as adoptedStyleSheets,
1499
+ is as createAssetScripts,
1500
+ as as createAssetsCss,
1483
1501
  gt as createDataSources,
1484
- N as createLoader,
1485
- hn as createMemoryService,
1502
+ L as createLoader,
1503
+ ps as createMemoryService,
1486
1504
  ot as createMetaApi,
1487
- dn as createProvider,
1488
- U as createRenderer,
1505
+ fs as createProvider,
1506
+ N as createRenderer,
1489
1507
  rt as createSchemaApi,
1490
1508
  it as createSchemaApis,
1491
1509
  wt as defaultLoader,
1492
1510
  F as fillBasePath,
1493
- me as getModifiers,
1494
- he as getPlugin,
1511
+ ve as getModifiers,
1512
+ me as getPlugin,
1495
1513
  Qe as getRawComponent,
1496
- J as isCSSUrl,
1497
- nt as isJSCode,
1514
+ V as isCSSUrl,
1515
+ st as isJSCode,
1498
1516
  S as isJSExpression,
1499
1517
  M as isJSFunction,
1500
- Ke as isJSON,
1501
- V as isJSUrl,
1518
+ We as isJSON,
1519
+ z as isJSUrl,
1502
1520
  tt as isVuePlugin,
1503
1521
  Xe as loadCss,
1504
1522
  Ze as loadCssUrl,
1505
1523
  et as loadScriptUrl,
1506
1524
  ct as mockApi,
1507
1525
  at as mockApis,
1508
- de as mockCleanup,
1509
- O as nodeRender,
1526
+ pe as mockCleanup,
1527
+ H as nodeRender,
1510
1528
  Ye as parseDeps,
1511
- R as parseExpression,
1529
+ C as parseExpression,
1512
1530
  te as parseFunction,
1513
- ge as providerKey,
1531
+ ye as providerKey,
1514
1532
  Ge as removeProdFlag,
1515
- le as toString,
1516
- fn as useAccess,
1517
- vn as useMask,
1518
- ye as useProvider
1533
+ fe as toString,
1534
+ ls as useAccess,
1535
+ ms as useMask,
1536
+ _e as useProvider
1519
1537
  };