@vtj/renderer 0.13.21 → 0.13.23

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,5 +1,5 @@
1
- import { Base as ze, BUILT_IN_COMPONENTS as Ge, ProjectModel as q, HistoryModel as Ee } from "@vtj/core";
2
- import { isUrl as se, url as k, dedupArray as Ve, isString as C, isFunction as L, logger as F, storage as X, cookie as Y, toArray as ye, unRSA as _e, delay as J, createRequest as Re, jsonp as be, merge as Qe, pathToRegexp as We, pathToRegexpMatch as Xe, formDataToJson as Ye, Queue as Ze, cloneDeep as we, camelCase as P, isObject as et, upperFirst as tt, pick as st, request as ne, loadScript as Se, Storage as nt, mapToObject as ue } from "@vtj/utils";
1
+ import { Base as ze, BUILT_IN_COMPONENTS as Ge, ProjectModel as U, HistoryModel as be } from "@vtj/core";
2
+ import { isUrl as se, url as F, dedupArray as Ve, isString as A, isFunction as q, logger as M, storage as X, cookie as Y, toArray as ve, unRSA as _e, delay as J, createRequest as Ee, jsonp as Re, merge as Qe, pathToRegexp as We, pathToRegexpMatch as Xe, formDataToJson as Ye, Queue as Ze, cloneDeep as we, camelCase as C, isObject as et, upperFirst as tt, pick as st, request as ne, loadScript as Se, Storage as nt, mapToObject as ue } from "@vtj/utils";
3
3
  import * as z from "vue";
4
4
  import { inject as Pe, defineComponent as Ce, h as re, ref as oe, watchEffect as rt, defineAsyncComponent as $e } from "vue";
5
5
  import { useRoute as Ae } from "vue-router";
@@ -7,11 +7,11 @@ import { useRoute as Ae } from "vue-router";
7
7
  * Copyright (c) 2025, VTJ.PRO All rights reserved.
8
8
  * @name @vtj/renderer
9
9
  * @author CHC chenhuachun1549@dingtalk.com
10
- * @version 0.13.21
10
+ * @version 0.13.23
11
11
  * @license <a href="https://vtj.pro/license.html">MIT License</a>
12
12
  */
13
- const M = "0.13.21";
14
- var y = /* @__PURE__ */ ((n) => (n.Runtime = "Runtime", n.Design = "Design", n.Raw = "Raw", n.VNode = "VNode", n))(y || {});
13
+ const D = "0.13.23";
14
+ var _ = /* @__PURE__ */ ((n) => (n.Runtime = "Runtime", n.Design = "Design", n.Raw = "Raw", n.VNode = "VNode", n))(_ || {});
15
15
  const je = [
16
16
  "$el",
17
17
  "$emit",
@@ -24,7 +24,7 @@ const je = [
24
24
  "$props",
25
25
  "$options",
26
26
  "$forceUpdate"
27
- ], vs = [
27
+ ], ys = [
28
28
  "beforeCreate",
29
29
  "created",
30
30
  "beforeMount",
@@ -55,9 +55,9 @@ const je = [
55
55
  Object,
56
56
  Function,
57
57
  Date
58
- }, D = "VtjPage", U = "VtjHomepage", at = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot,svg".split(
58
+ }, T = "VtjPage", N = "VtjHomepage", at = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot,svg".split(
59
59
  ","
60
- ), ct = "component,slot".split(","), ys = [
60
+ ), ct = "component,slot".split(","), vs = [
61
61
  "h",
62
62
  "t",
63
63
  "t",
@@ -153,32 +153,32 @@ function lt(n) {
153
153
  }
154
154
  function ws(n) {
155
155
  return n.map(
156
- (e) => `<script src="${k.append(e, { v: M })}"><\/script>`
156
+ (e) => `<script src="${F.append(e, { v: D })}"><\/script>`
157
157
  ).join("");
158
158
  }
159
159
  function Ss(n = []) {
160
160
  return n.map(
161
- (e) => `<link rel="stylesheet" href="${k.append(e, { v: M })}" />`
161
+ (e) => `<link rel="stylesheet" href="${F.append(e, { v: D })}" />`
162
162
  ).join("");
163
163
  }
164
164
  function ut(n, e = !1) {
165
165
  return e && n.endsWith(".prod.js") ? n.replace(".prod.js", ".js") : n;
166
166
  }
167
167
  function ft(n, e, t = !1) {
168
- const s = n.filter((h) => !!h.enabled), r = [], o = [], a = [], i = [], l = {}, c = {}, f = [], u = {};
168
+ const s = n.filter((p) => !!p.enabled), r = [], o = [], a = [], i = [], l = {}, c = {}, u = [], f = {};
169
169
  return s.forEach(
170
- ({ urls: h, assetsUrl: p, library: d, assetsLibrary: g, localeLibrary: v }) => {
171
- h?.forEach((m) => {
172
- V(m) && r.push(ut(m, t)), G(m) && o.push(m);
173
- }), d && (i.push(d), l[d] = B(h || [], e), v && (c[d] = v)), p && a.push(p), g && f.push(g), d && g && (u[g] = d);
170
+ ({ urls: p, assetsUrl: h, library: d, assetsLibrary: m, localeLibrary: g }) => {
171
+ p?.forEach((y) => {
172
+ V(y) && r.push(ut(y, t)), G(y) && o.push(y);
173
+ }), d && (i.push(d), l[d] = B(p || [], e), g && (c[d] = g)), h && a.push(h), m && u.push(m), d && m && (f[m] = d);
174
174
  }
175
175
  ), {
176
176
  scripts: B(r, e),
177
177
  css: B(o, e),
178
178
  materials: B(a, e),
179
179
  libraryExports: i,
180
- materialExports: Ve(f),
181
- materialMapLibrary: u,
180
+ materialExports: Ve(u),
181
+ materialMapLibrary: f,
182
182
  libraryMap: l,
183
183
  libraryLocaleMap: c
184
184
  };
@@ -196,130 +196,130 @@ function dt(n = []) {
196
196
  }
197
197
  function ht(n, e) {
198
198
  const t = (c) => {
199
- const f = [];
200
- let u = 0;
201
- for (; u < c.length; ) {
202
- if (/\s/.test(c[u])) {
203
- u++;
199
+ const u = [];
200
+ let f = 0;
201
+ for (; f < c.length; ) {
202
+ if (/\s/.test(c[f])) {
203
+ f++;
204
204
  continue;
205
205
  }
206
- if (c.substring(u, u + 2) === "/*") {
207
- const m = c.indexOf("*/", u + 2);
208
- if (m !== -1) {
209
- u = m + 2;
206
+ if (c.substring(f, f + 2) === "/*") {
207
+ const y = c.indexOf("*/", f + 2);
208
+ if (y !== -1) {
209
+ f = y + 2;
210
210
  continue;
211
211
  }
212
212
  }
213
- if (c[u] === "@") {
214
- const m = u;
215
- for (; u < c.length && c[u] !== "{" && c[u] !== ";"; )
216
- u++;
217
- const R = c.substring(m, u).trim(), _ = R.includes("@keyframes");
218
- if (c[u] === ";")
219
- f.push({
213
+ if (c[f] === "@") {
214
+ const y = f;
215
+ for (; f < c.length && c[f] !== "{" && c[f] !== ";"; )
216
+ f++;
217
+ const w = c.substring(y, f).trim(), v = w.includes("@keyframes");
218
+ if (c[f] === ";")
219
+ u.push({
220
220
  type: "simple-at-rule",
221
- content: c.substring(m, u + 1)
222
- }), u++;
223
- else if (c[u] === "{") {
224
- const x = u + 1;
225
- let A = 1;
226
- for (u++; u < c.length && A > 0; )
227
- c[u] === "{" ? A++ : c[u] === "}" && A--, u++;
228
- const Q = c.substring(m, u), b = c.substring(x, u - 1);
229
- f.push({
230
- type: _ ? "keyframes" : "at-rule",
231
- rule: R,
221
+ content: c.substring(y, f + 1)
222
+ }), f++;
223
+ else if (c[f] === "{") {
224
+ const $ = f + 1;
225
+ let I = 1;
226
+ for (f++; f < c.length && I > 0; )
227
+ c[f] === "{" ? I++ : c[f] === "}" && I--, f++;
228
+ const Q = c.substring(y, f), P = c.substring($, f - 1);
229
+ u.push({
230
+ type: v ? "keyframes" : "at-rule",
231
+ rule: w,
232
232
  content: Q,
233
- inner: b
233
+ inner: P
234
234
  });
235
235
  }
236
236
  continue;
237
237
  }
238
- const h = u;
239
- for (; u < c.length && c[u] !== "{"; )
240
- u++;
241
- if (u >= c.length) break;
242
- const p = c.substring(h, u).trim();
243
- if (!p) {
244
- u++;
238
+ const p = f;
239
+ for (; f < c.length && c[f] !== "{"; )
240
+ f++;
241
+ if (f >= c.length) break;
242
+ const h = c.substring(p, f).trim();
243
+ if (!h) {
244
+ f++;
245
245
  continue;
246
246
  }
247
- const d = u + 1;
248
- let g = 1;
249
- for (u++; u < c.length && g > 0; )
250
- c[u] === "{" ? g++ : c[u] === "}" && g--, u++;
251
- const v = c.substring(d, u - 1);
252
- f.push({
247
+ const d = f + 1;
248
+ let m = 1;
249
+ for (f++; f < c.length && m > 0; )
250
+ c[f] === "{" ? m++ : c[f] === "}" && m--, f++;
251
+ const g = c.substring(d, f - 1);
252
+ u.push({
253
253
  type: "rule",
254
- selector: p,
255
- content: v.trim()
254
+ selector: h,
255
+ content: g.trim()
256
256
  });
257
257
  }
258
- return f;
258
+ return u;
259
259
  }, s = (c) => {
260
- const f = c.trim();
261
- return /^(from|to|\d+(\.\d+)?%)$/.test(f);
262
- }, r = (c) => c.replace(/::v-deep\(/g, ":deep(").replace(/::v-deep\s+/g, ":deep(").replace(/\/deep\//g, " ").replace(/>>>/g, " ").replace(/(.*?):deep\(([^)]+)\)/g, (f, u, h) => {
263
- const p = u.trim(), d = h.trim();
264
- return p ? `${p}[${e}] ${d}` : d;
260
+ const u = c.trim();
261
+ return /^(from|to|\d+(\.\d+)?%)$/.test(u);
262
+ }, r = (c) => c.replace(/::v-deep\(/g, ":deep(").replace(/::v-deep\s+/g, ":deep(").replace(/\/deep\//g, " ").replace(/>>>/g, " ").replace(/(.*?):deep\(([^)]+)\)/g, (u, f, p) => {
263
+ const h = f.trim(), d = p.trim();
264
+ return h ? `${h}[${e}] ${d}` : d;
265
265
  }), o = (c) => {
266
- const f = c.trim();
267
- if (!f || f.includes(`[${e}]`) || /^(:root|:host|html|body)(\s|$|:|\.|\#|\[)/.test(f) || s(f))
268
- return f;
269
- const u = f.match(/^(.+?)((?:::?[\w-]+(?:\([^)]*\))?)*)\s*$/);
270
- if (u) {
271
- const [, h, p = ""] = u, d = h.trim();
272
- return d ? `${d}[${e}]${p}` : f;
266
+ const u = c.trim();
267
+ if (!u || u.includes(`[${e}]`) || /^(:root|:host|html|body)(\s|$|:|\.|\#|\[)/.test(u) || s(u))
268
+ return u;
269
+ const f = u.match(/^(.+?)((?:::?[\w-]+(?:\([^)]*\))?)*)\s*$/);
270
+ if (f) {
271
+ const [, p, h = ""] = f, d = p.trim();
272
+ return d ? `${d}[${e}]${h}` : u;
273
273
  }
274
- return `${f}[${e}]`;
275
- }, a = (c) => r(c).split(",").map((u) => o(u)).filter((u) => u.trim()).join(", "), i = (c) => c.map((f) => {
276
- switch (f.type) {
274
+ return `${u}[${e}]`;
275
+ }, a = (c) => r(c).split(",").map((f) => o(f)).filter((f) => f.trim()).join(", "), i = (c) => c.map((u) => {
276
+ switch (u.type) {
277
277
  case "simple-at-rule":
278
- return f.content;
278
+ return u.content;
279
279
  case "keyframes":
280
- return f.content;
280
+ return u.content;
281
281
  case "at-rule":
282
282
  try {
283
- const h = t(f.inner), p = i(h);
284
- return `${f.rule} { ${p} }`;
283
+ const p = t(u.inner), h = i(p);
284
+ return `${u.rule} { ${h} }`;
285
285
  } catch {
286
- return f.content;
286
+ return u.content;
287
287
  }
288
288
  case "rule":
289
- if (!f.selector || !f.content)
289
+ if (!u.selector || !u.content)
290
290
  return "";
291
- const u = a(f.selector);
292
- return u.trim() ? `${u} { ${f.content} }` : "";
291
+ const f = a(u.selector);
292
+ return f.trim() ? `${f} { ${u.content} }` : "";
293
293
  default:
294
294
  return "";
295
295
  }
296
- }).filter((f) => f.trim()).join(" "), l = (c) => c.replace(/\s*{\s*/g, " { ").replace(/\s*}\s*/g, " } ").replace(/\s*;\s*/g, "; ").replace(/\s*,\s*/g, ", ").replace(/\s+/g, " ").replace(/^\s+|\s+$/g, "").replace(/\s*}\s*}/g, " } }").trim();
296
+ }).filter((u) => u.trim()).join(" "), l = (c) => c.replace(/\s*{\s*/g, " { ").replace(/\s*}\s*/g, " } ").replace(/\s*;\s*/g, "; ").replace(/\s*,\s*/g, ", ").replace(/\s+/g, " ").replace(/^\s+|\s+$/g, "").replace(/\s*}\s*}/g, " } }").trim();
297
297
  try {
298
298
  const c = n.replace(/\/\*(?!\s*!)[\s\S]*?\*\//g, "").replace(/^\s+|\s+$/gm, "").replace(/\n\s*\n/g, `
299
- `), f = t(c), u = i(f);
300
- return l(u);
299
+ `), u = t(c), f = i(u);
300
+ return l(f);
301
301
  } catch (c) {
302
302
  return console.error("CSS scoping failed:", c), console.error("Input CSS:", n), n.replace(/\/\*[\s\S]*?\*\//g, "").replace(
303
303
  /(@keyframes\s+[^{]+\s*{[^{}]*(?:{[^}]*}[^{}]*)*})/g,
304
- (f) => f
305
- ).replace(/([^{}@]+)(?=\s*{)/g, (f) => {
306
- const u = f.trim();
307
- return !u || u.startsWith("@") || u.includes(`[${e}]`) || s(u) ? f : `${u}[${e}]`;
304
+ (u) => u
305
+ ).replace(/([^{}@]+)(?=\s*{)/g, (u) => {
306
+ const f = u.trim();
307
+ return !f || f.startsWith("@") || f.includes(`[${e}]`) || s(f) ? u : `${f}[${e}]`;
308
308
  });
309
309
  }
310
310
  }
311
311
  function Ie(n) {
312
- return C(n) ? n : JSON.stringify(n);
312
+ return A(n) ? n : JSON.stringify(n);
313
313
  }
314
314
  function fe(n, e, t, s = !1) {
315
315
  const r = n.CSSStyleSheet, o = s ? `data-v-${e}` : e, a = s ? ht(t, o) : t;
316
316
  if (r.prototype.replaceSync) {
317
317
  const i = new r();
318
318
  i.id = e, i.replaceSync(a);
319
- const l = n.document, c = l.adoptedStyleSheets, f = Array.from(c).filter(
320
- (u) => u.id !== e
319
+ const l = n.document, c = l.adoptedStyleSheets, u = Array.from(c).filter(
320
+ (f) => f.id !== e
321
321
  );
322
- l.adoptedStyleSheets = [...f, i];
322
+ l.adoptedStyleSheets = [...u, i];
323
323
  } else {
324
324
  const i = n.document;
325
325
  let l = i.getElementById(e);
@@ -362,22 +362,22 @@ async function Fe(n, e, t = window) {
362
362
  const c = s.createElement("script");
363
363
  c.src = l, c.onload = () => {
364
364
  o = t[e], o ? a(o.default || o) : i(null);
365
- }, c.onerror = (f) => {
366
- i(f);
365
+ }, c.onerror = (u) => {
366
+ i(u);
367
367
  }, r.appendChild(c);
368
368
  }
369
369
  });
370
370
  }
371
371
  function gt(n) {
372
- return L(n) && Object.getOwnPropertyNames(n.prototype || {}).length === 0 || L(n?.install);
372
+ return q(n) && Object.getOwnPropertyNames(n.prototype || {}).length === 0 || q(n?.install);
373
373
  }
374
- function vt(n) {
374
+ function yt(n) {
375
375
  return ct.includes(n);
376
376
  }
377
- function yt(n) {
377
+ function vt(n) {
378
378
  return at.includes(n);
379
379
  }
380
- function T(n = window) {
380
+ function H(n = window) {
381
381
  const e = window?.Mock;
382
382
  if (e) return e;
383
383
  const t = n?.Mock;
@@ -389,7 +389,7 @@ function js(n, e, t) {
389
389
  const s = n?._container;
390
390
  t?.type === "page" && s.classList.add("is-page"), t?.pure && s.classList.add("is-pure");
391
391
  }
392
- function H(n, e, t = !1, s = !1, r = !1) {
392
+ function x(n, e, t = !1, s = !1, r = !1) {
393
393
  try {
394
394
  const o = ['"use strict";', "var __self = arguments[0];"];
395
395
  o.push("return ");
@@ -401,13 +401,13 @@ ${a}
401
401
  ` : `with(${t ? "{}" : "$scope || {}"}) { ${a} }`;
402
402
  return new Function("$scope", i)(e);
403
403
  } catch (o) {
404
- if (F.error("parseExpression.error", o, n, e?.__self ?? e), s)
404
+ if (M.error("parseExpression.error", o, n, e?.__self ?? e), s)
405
405
  throw o;
406
406
  }
407
407
  }
408
- function E(n, e, t = !1, s = !1, r = !1) {
409
- const o = H(n, e, t, s, r);
410
- if (typeof o != "function" && (F.error(
408
+ function R(n, e, t = !1, s = !1, r = !1) {
409
+ const o = x(n, e, t, s, r);
410
+ if (typeof o != "function" && (M.error(
411
411
  "parseFunction.error",
412
412
  "not a function",
413
413
  n,
@@ -416,16 +416,16 @@ function E(n, e, t = !1, s = !1, r = !1) {
416
416
  throw new Error(`"${n.value}" not a function`);
417
417
  return o;
418
418
  }
419
- function j(n) {
419
+ function E(n) {
420
420
  return n && n.type === "JSExpression";
421
421
  }
422
- function S(n) {
422
+ function j(n) {
423
423
  return typeof n == "object" && n && n.type === "JSFunction";
424
424
  }
425
425
  function _t(n) {
426
- return j(n) || S(n);
426
+ return E(n) || j(n);
427
427
  }
428
- function Es(n) {
428
+ function bs(n) {
429
429
  return _t(n) ? n.value : JSON.stringify(n);
430
430
  }
431
431
  const wt = {
@@ -441,11 +441,11 @@ const wt = {
441
441
  noPermissionMessage: "无权限访问该页面",
442
442
  appName: "",
443
443
  statusKey: "code"
444
- }, Oe = Symbol("access");
444
+ }, Me = Symbol("access");
445
445
  class pe {
446
446
  options;
447
447
  data = null;
448
- mode = y.Raw;
448
+ mode = _.Raw;
449
449
  interceptResponse = !0;
450
450
  constructor(e) {
451
451
  this.options = Object.assign({}, wt, e), this.loadData();
@@ -458,7 +458,7 @@ class pe {
458
458
  }
459
459
  connect(e) {
460
460
  const { mode: t, router: s, request: r } = e;
461
- this.mode = t, s && this.mode !== y.Design && this.setGuard(s), r && this.setRequest(r);
461
+ this.mode = t, s && this.mode !== _.Design && this.setGuard(s), r && this.setRequest(r);
462
462
  }
463
463
  login(e) {
464
464
  const { storageKey: t, storagePrefix: s, session: r, authKey: o } = this.options;
@@ -485,14 +485,14 @@ class pe {
485
485
  }
486
486
  can(e) {
487
487
  const { appName: t } = this.options, { permissions: s = {} } = this.data || {};
488
- return typeof e == "function" ? e(s) : ye(e).every((o) => s[o] || s[t + "." + o]);
488
+ return typeof e == "function" ? e(s) : ve(e).every((o) => s[o] || s[t + "." + o]);
489
489
  }
490
490
  some(e) {
491
491
  const { appName: t } = this.options, { permissions: s = {} } = this.data || {};
492
- return ye(e).some((o) => s[o] || s[t + "." + o]);
492
+ return ve(e).some((o) => s[o] || s[t + "." + o]);
493
493
  }
494
494
  install(e) {
495
- e.config.globalProperties.$access = this, e.provide(Oe, this);
495
+ e.config.globalProperties.$access = this, e.provide(Me, this);
496
496
  }
497
497
  isAuthPath(e) {
498
498
  const { auth: t, isAuth: s } = this.options;
@@ -543,7 +543,7 @@ class pe {
543
543
  return e && t ? !!Y.get(t) : !!this.getToken();
544
544
  }
545
545
  hasRoutePermission(e) {
546
- if (e.name === D) {
546
+ if (e.name === T) {
547
547
  const t = e.params.id;
548
548
  return t && this.can(t);
549
549
  }
@@ -560,7 +560,7 @@ class pe {
560
560
  return t();
561
561
  {
562
562
  const { noPermissionMessage: s = "无权限访问", unauthorized: r = !1 } = this.options;
563
- return await this.showTip(s), L(r) ? (r(), t(!1)) : C(r) ? t(r) : t(!1);
563
+ return await this.showTip(s), q(r) ? (r(), t(!1)) : A(r) ? t(r) : t(!1);
564
564
  }
565
565
  }
566
566
  t(!1), await J(0), this.toLogin();
@@ -596,9 +596,9 @@ class pe {
596
596
  }
597
597
  }
598
598
  function St() {
599
- return Pe(Oe, null);
599
+ return Pe(Me, null);
600
600
  }
601
- function Rs(n = {}) {
601
+ function Es(n = {}) {
602
602
  const {
603
603
  notify: e,
604
604
  loading: t,
@@ -610,16 +610,16 @@ function Rs(n = {}) {
610
610
  } = n;
611
611
  let l = null;
612
612
  return {
613
- request: Re({
613
+ request: Ee({
614
614
  settings: {
615
615
  type: "form",
616
616
  validSuccess: !0,
617
617
  originResponse: !1,
618
618
  loading: !0,
619
- validate: (f) => f.data?.code === 0 || !!f.data?.success,
619
+ validate: (u) => u.data?.code === 0 || !!u.data?.success,
620
620
  failMessage: !0,
621
- showError: (f) => {
622
- e && e(f || "未知错误");
621
+ showError: (u) => {
622
+ e && e(u || "未知错误");
623
623
  },
624
624
  showLoading: () => {
625
625
  l && l.close(), t && (l = t());
@@ -630,7 +630,7 @@ function Rs(n = {}) {
630
630
  ...s
631
631
  }
632
632
  }),
633
- jsonp: be,
633
+ jsonp: Re,
634
634
  notify: e,
635
635
  loading: t,
636
636
  useTitle: a,
@@ -639,7 +639,7 @@ function Rs(n = {}) {
639
639
  access: o ? new pe({ alert: i, ...o }) : void 0
640
640
  };
641
641
  }
642
- function bs(n = {}) {
642
+ function Rs(n = {}) {
643
643
  return new pe(n);
644
644
  }
645
645
  function $t(n, e) {
@@ -650,7 +650,7 @@ function $t(n, e) {
650
650
  query: r
651
651
  });
652
652
  {
653
- const r = n.headers ? H(n.headers, {}, !0) : void 0, o = {
653
+ const r = n.headers ? x(n.headers, {}, !0) : void 0, o = {
654
654
  url: n.url,
655
655
  method: n.method,
656
656
  settings: {
@@ -673,7 +673,7 @@ function jt(n, e) {
673
673
  return t(s, r, o, a);
674
674
  };
675
675
  }
676
- function Et(n = [], e = [], t) {
676
+ function bt(n = [], e = [], t) {
677
677
  const s = {};
678
678
  for (const r of n)
679
679
  s[r.id] = $t(r, t);
@@ -681,19 +681,19 @@ function Et(n = [], e = [], t) {
681
681
  s[r.id] = jt(r, t);
682
682
  return s;
683
683
  }
684
- async function Rt(n = [], e = window) {
685
- const t = T(e);
686
- t && (Me(e), n.forEach((s) => Pt(t, s)));
684
+ async function Et(n = [], e = window) {
685
+ const t = H(e);
686
+ t && (Oe(e), n.forEach((s) => Pt(t, s)));
687
687
  }
688
- function bt(n, e = window) {
689
- const t = S(n.mockTemplate) && n.mockTemplate.value ? E(n.mockTemplate, {}, !0) : void 0, s = T(e);
688
+ function Rt(n, e = window) {
689
+ const t = j(n.mockTemplate) && n.mockTemplate.value ? R(n.mockTemplate, {}, !0) : void 0, s = H(e);
690
690
  return async (...r) => {
691
691
  let o = {};
692
692
  if (t)
693
693
  try {
694
694
  o = await t.apply(t, r);
695
695
  } catch (a) {
696
- F.warn("模拟数据模版异常", a);
696
+ M.warn("模拟数据模版异常", a);
697
697
  }
698
698
  return s?.mock(o);
699
699
  };
@@ -703,22 +703,22 @@ function Pt(n, e) {
703
703
  const { url: t, mockTemplate: s } = e;
704
704
  if (t && s)
705
705
  try {
706
- const r = se(t) ? new URL(t).pathname : t, o = We(`(.*)${r}(.*)`), a = Xe(r, { decode: decodeURIComponent }), i = H(s, {}, !0);
706
+ const r = se(t) ? new URL(t).pathname : t, o = We(`(.*)${r}(.*)`), a = Xe(r, { decode: decodeURIComponent }), i = x(s, {}, !0);
707
707
  n.mock(o, (l) => {
708
- const c = k.parse(l.url) || {}, f = l.body instanceof FormData ? Ye(l.body) : l.body, u = se(l.url) ? new URL(l.url).pathname : l.url.split("?")[0], h = a(u)?.params;
709
- Object.assign(l, { data: f, params: h, query: c });
708
+ const c = F.parse(l.url) || {}, u = l.body instanceof FormData ? Ye(l.body) : l.body, f = se(l.url) ? new URL(l.url).pathname : l.url.split("?")[0], p = a(f)?.params;
709
+ Object.assign(l, { data: u, params: p, query: c });
710
710
  try {
711
711
  return n.mock(i(l));
712
- } catch (p) {
713
- return console.warn("[mockApi]", o, l, p), null;
712
+ } catch (h) {
713
+ return console.warn("[mockApi]", o, l, h), null;
714
714
  }
715
715
  });
716
716
  } catch (r) {
717
717
  console.warn("mockApi", r);
718
718
  }
719
719
  }
720
- function Me(n = window) {
721
- const e = T(n);
720
+ function Oe(n = window) {
721
+ const e = H(n);
722
722
  e && (e._mocked = {});
723
723
  }
724
724
  class Ct {
@@ -778,22 +778,22 @@ class Ct {
778
778
  }
779
779
  __parseFunction(e) {
780
780
  if (e)
781
- if (this.__mode === y.Runtime) {
781
+ if (this.__mode === _.Runtime) {
782
782
  const { id: t, type: s } = e, r = t ? this.__transform[t] ?? e.value : e.value;
783
- return E({ type: s, value: r }, this);
783
+ return R({ type: s, value: r }, this);
784
784
  } else
785
- return E(e, this);
785
+ return R(e, this);
786
786
  }
787
787
  __parseExpression(e) {
788
788
  if (e)
789
- if (this.__mode === y.Runtime) {
789
+ if (this.__mode === _.Runtime) {
790
790
  const { id: t, type: s } = e, r = t ? this.__transform[t] ?? e.value : e.value;
791
- return H({ type: s, value: r }, this);
791
+ return x({ type: s, value: r }, this);
792
792
  } else
793
- return H(e, this);
793
+ return x(e, this);
794
794
  }
795
795
  __ref(e = null, t) {
796
- if (this.__mode !== y.VNode)
796
+ if (this.__mode !== _.VNode)
797
797
  return e && e !== this.__id && (this.__contextRefs[e] = this), async (s) => {
798
798
  await J(0);
799
799
  let r = s?.$vtjEl || s?.$el || s?._?.vnode?.el || s;
@@ -801,7 +801,7 @@ class Ct {
801
801
  typeof t == "string" && (delete this.$refs[t], e && delete this.__refs[e]);
802
802
  return;
803
803
  }
804
- return r.nodeType === 3 && r.nextSibling && (r = r.nextSibling), r.__vtj__ = e, y.Design === this.__mode && (r.__context__ = this, r.draggable = !0), e && (this.__refs[e] = this.__getRefEl(this.__refs, e, s)), typeof t == "function" ? t(s) : t && (this.$refs[t] = this.__getRefEl(this.$refs, t, s)), s;
804
+ return r.nodeType === 3 && r.nextSibling && (r = r.nextSibling), r.__vtj__ = e, _.Design === this.__mode && (r.__context__ = this, r.draggable = !0), e && (this.__refs[e] = this.__getRefEl(this.__refs, e, s)), typeof t == "function" ? t(s) : t && (this.$refs[t] = this.__getRefEl(this.$refs, t, s)), s;
805
805
  };
806
806
  }
807
807
  __getRefEl(e, t, s) {
@@ -823,7 +823,7 @@ class Ct {
823
823
  function ie(n) {
824
824
  const {
825
825
  Vue: e = z,
826
- mode: t = y.Runtime,
826
+ mode: t = _.Runtime,
827
827
  components: s = {},
828
828
  libs: r = {},
829
829
  apis: o = {},
@@ -836,32 +836,32 @@ function ie(n) {
836
836
  mode: t,
837
837
  dsl: i.value,
838
838
  attrs: l
839
- }), f = e.defineComponent({
839
+ }), u = e.defineComponent({
840
840
  name: i.value.name,
841
841
  __scopeId: i.value.id ? `data-v-${i.value.id}` : void 0,
842
842
  props: {
843
843
  ...It(i.value.props ?? [], c)
844
844
  },
845
- setup(u) {
846
- c.$props = u, c.props = u, i.value.id && fe(
845
+ setup(f) {
846
+ c.$props = f, c.props = f, i.value.id && fe(
847
847
  n.window || window,
848
848
  i.value.id,
849
849
  i.value.css || "",
850
850
  !0
851
851
  ), c.state = kt(e, i.value.state ?? {}, c);
852
- const h = Ft(e, i.value.computed ?? {}, c), p = Ot(i.value.methods ?? {}, c), d = Mt(e, i.value.inject, c);
853
- for (const [m, R] of Object.entries(d || {}))
854
- d[m] = e.inject(m, R);
855
- const g = Dt(
852
+ const p = Ft(e, i.value.computed ?? {}, c), h = Mt(i.value.methods ?? {}, c), d = Ot(e, i.value.inject, c);
853
+ for (const [y, w] of Object.entries(d || {}))
854
+ d[y] = e.inject(y, w);
855
+ const m = Dt(
856
856
  i.value.dataSources || {},
857
857
  c
858
- ), v = {
858
+ ), g = {
859
859
  ...d,
860
- ...h,
861
860
  ...p,
862
- ...g
861
+ ...h,
862
+ ...m
863
863
  };
864
- return c.setup(v, e), Tt(e, i.value.watch ?? [], c), {
864
+ return c.setup(g, e), Tt(e, i.value.watch ?? [], c), {
865
865
  vtj: c
866
866
  };
867
867
  },
@@ -869,30 +869,30 @@ function ie(n) {
869
869
  expose: ["vtj"],
870
870
  render() {
871
871
  if (!i.value.nodes) return null;
872
- const u = i.value.nodes || [];
873
- return u.length === 1 ? O(u[0], c, e, a, u) : u.map(
874
- (h) => O(h, c, e, a, u)
872
+ const f = i.value.nodes || [];
873
+ return f.length === 1 ? O(f[0], c, e, a, f) : f.map(
874
+ (p) => O(p, c, e, a, f)
875
875
  );
876
876
  },
877
877
  ...Ht(i.value.lifeCycles ?? {}, c)
878
878
  });
879
879
  return {
880
- renderer: e.markRaw(f),
880
+ renderer: e.markRaw(u),
881
881
  context: c
882
882
  };
883
883
  }
884
884
  function At(n = []) {
885
- return n.map((e) => C(e) ? e : e.name);
885
+ return n.map((e) => A(e) ? e : e.name);
886
886
  }
887
887
  function It(n = [], e) {
888
888
  const t = (s) => s ? (Array.isArray(s) ? s : [s]).map((o) => it[o]) : void 0;
889
- return n.map((s) => C(s) ? {
889
+ return n.map((s) => A(s) ? {
890
890
  name: s
891
891
  } : {
892
892
  name: s.name,
893
893
  type: s.type,
894
894
  required: s.required,
895
- default: j(s.default) ? e.__parseExpression(s.default) : s.default
895
+ default: E(s.default) ? e.__parseExpression(s.default) : s.default
896
896
  }).reduce(
897
897
  (s, r) => (s[r.name] = {
898
898
  type: t(r.type),
@@ -907,7 +907,7 @@ function kt(n, e, t) {
907
907
  Object.keys(e || {}).reduce(
908
908
  (s, r) => {
909
909
  let o = e[r];
910
- return j(o) ? o = t.__parseExpression(o) : S(o) && (o = t.__parseFunction(o)), s[r] = o, s;
910
+ return E(o) ? o = t.__parseExpression(o) : j(o) && (o = t.__parseFunction(o)), s[r] = o, s;
911
911
  },
912
912
  {}
913
913
  )
@@ -919,18 +919,18 @@ function Ft(n, e, t) {
919
919
  {}
920
920
  );
921
921
  }
922
- function Ot(n, e) {
922
+ function Mt(n, e) {
923
923
  return Object.entries(n ?? {}).reduce(
924
924
  (t, [s, r]) => (t[s] = e.__parseFunction(r), t),
925
925
  {}
926
926
  );
927
927
  }
928
- function Mt(n, e = [], t) {
928
+ function Ot(n, e = [], t) {
929
929
  return e.reduce(
930
930
  (s, r) => {
931
931
  const { name: o, from: a } = r || {};
932
932
  r.default;
933
- const i = j(a) ? t.__parseExpression(a) || o : a ?? o, l = j(r.default) ? t.__parseExpression(r.default) : r.default ?? null;
933
+ const i = E(a) ? t.__parseExpression(a) || o : a ?? o, l = E(r.default) ? t.__parseExpression(r.default) : r.default ?? null;
934
934
  return s[o] = n.inject(i, l), s;
935
935
  },
936
936
  {}
@@ -941,9 +941,9 @@ function Dt(n, e) {
941
941
  (t, s) => {
942
942
  const r = n[s];
943
943
  if (r.type === "mock")
944
- t[s] = bt(r);
944
+ t[s] = Rt(r);
945
945
  else if (r.ref) {
946
- const o = e.$apis[r.ref], a = S(r.transform) ? r.transform.value ? e.__parseFunction(r.transform) : void 0 : r.transform;
946
+ const o = e.$apis[r.ref], a = j(r.transform) ? r.transform.value ? e.__parseFunction(r.transform) : void 0 : r.transform;
947
947
  t[s] = async (...i) => {
948
948
  const l = await o.apply(e, i);
949
949
  return a ? a(l) : l;
@@ -971,14 +971,14 @@ function Ht(n, e) {
971
971
  (t, [s, r]) => {
972
972
  const o = e.__parseFunction(r);
973
973
  return t[s] = async () => {
974
- await J(0), L(o) && o();
974
+ await J(0), q(o) && o();
975
975
  }, t;
976
976
  },
977
977
  {}
978
978
  );
979
979
  }
980
980
  const De = new Ze();
981
- let Z = [], I = {};
981
+ let Z = [], k = {};
982
982
  const xt = (n) => n;
983
983
  async function Te(n, e = window) {
984
984
  const { urls: t = [], library: s } = n, r = t.filter((i) => V(i));
@@ -996,32 +996,32 @@ function ae(n) {
996
996
  if (!o || typeof o == "string") return r;
997
997
  if (o.type === "Schema" && o.id)
998
998
  return a.defineAsyncComponent(async () => {
999
- const i = I[o.id] || await De.add(
999
+ const i = k[o.id] || await De.add(
1000
1000
  o.id,
1001
1001
  () => e(o.id)
1002
1002
  );
1003
- return i && (i.name = r, I[o.id] = i), i ? ie({
1003
+ return i && (i.name = r, k[o.id] = i), i ? ie({
1004
1004
  ...s,
1005
1005
  Vue: a,
1006
1006
  dsl: we(i),
1007
- mode: y.Runtime,
1007
+ mode: _.Runtime,
1008
1008
  loader: ae(n)
1009
1009
  }).renderer : null;
1010
1010
  });
1011
1011
  if (o.type === "UrlSchema" && o.url)
1012
1012
  return a.defineAsyncComponent(async () => {
1013
- const i = I[o.url] || await t(o.url);
1014
- return i && (i.name = r, I[o.url] = i), i ? ie({
1013
+ const i = k[o.url] || await t(o.url);
1014
+ return i && (i.name = r, k[o.url] = i), i ? ie({
1015
1015
  ...s,
1016
1016
  Vue: a,
1017
1017
  dsl: we(i),
1018
- mode: y.Runtime,
1018
+ mode: _.Runtime,
1019
1019
  loader: ae(n)
1020
1020
  }).renderer : null;
1021
1021
  });
1022
1022
  if (o.type === "Plugin") {
1023
- let i = o.library ? I[o.library] : null;
1024
- return i || (o.library && Z.push(o.library), i = I[o.library || Symbol()] = a.defineAsyncComponent(
1023
+ let i = o.library ? k[o.library] : null;
1024
+ return i || (o.library && Z.push(o.library), i = k[o.library || Symbol()] = a.defineAsyncComponent(
1025
1025
  async () => {
1026
1026
  const l = await Te(o, s.window);
1027
1027
  return l || (console.warn("getPlugin result is null", o), null);
@@ -1032,53 +1032,53 @@ function ae(n) {
1032
1032
  };
1033
1033
  }
1034
1034
  function Ps() {
1035
- I = {}, De.clearAllCache();
1035
+ k = {}, De.clearAllCache();
1036
1036
  }
1037
1037
  function O(n, e, t = z, s = xt, r = [], o = !1) {
1038
1038
  if (!n || !n.name || n.invisible) return null;
1039
- const a = t.getCurrentInstance()?.appContext, { id: i = null, directives: l = [] } = n, { vIf: c, vElseIf: f, vElse: u, vFor: h, vShow: p, vModels: d, vBind: g, vHtml: v, others: m } = He(l);
1040
- if (!o && (f || u))
1039
+ const a = t.getCurrentInstance()?.appContext, { id: i = null, directives: l = [] } = n, { vIf: c, vElseIf: u, vElse: f, vFor: p, vShow: h, vModels: d, vBind: m, vHtml: g, others: y } = He(l);
1040
+ if (!o && (u || f))
1041
1041
  return null;
1042
- if (c && !Nt(c, e))
1042
+ if (c && !Lt(c, e))
1043
1043
  return Jt(n, e, t, s, r);
1044
- const R = (_, x = 0) => {
1045
- const A = _.$components, Q = (() => {
1044
+ const w = (v, $ = 0) => {
1045
+ const I = v.$components, Q = (() => {
1046
1046
  if (n.name === "component")
1047
- return Ut(_, n.props?.is);
1047
+ return Nt(v, n.props?.is);
1048
1048
  if (n.name === "slot") return n.name;
1049
- const $ = s(n.name, n.from, t);
1050
- if (C($))
1051
- return vt($) || yt($) ? $ : A[$] ?? a?.app?.component($) ?? $;
1052
- if (et($) && n.id) {
1053
- const ge = `Loader${n.id}_${x}`, ve = A[ge];
1054
- return ve || (A[ge] = $);
1049
+ const b = s(n.name, n.from, t);
1050
+ if (A(b))
1051
+ return yt(b) || vt(b) ? b : I[b] ?? a?.app?.component(b) ?? b;
1052
+ if (et(b) && n.id) {
1053
+ const ge = `Loader${n.id}_${$}`, ye = I[ge];
1054
+ return ye || (I[ge] = b);
1055
1055
  }
1056
- return $;
1057
- })(), b = qt(i, n.props ?? {}, _), Le = Lt(t, n.events ?? {}, _);
1056
+ return b;
1057
+ })(), P = Ut(i, n.props ?? {}, v), qe = qt(t, n.events ?? {}, v);
1058
1058
  if (n.name === "slot")
1059
- return Kt(t, n, b, _, s);
1060
- g && Object.assign(b, _.__parseExpression(g.value)), p && (b.style = Object.assign(
1061
- b.style ?? {},
1062
- Gt(p, _)
1063
- )), v && Object.assign(b, Vt(v, _)), d.forEach(($) => {
1064
- Object.assign(b, Qt(t, $, _));
1059
+ return Kt(t, n, P, v, s);
1060
+ m && Object.assign(P, v.__parseExpression(m.value)), h && (P.style = Object.assign(
1061
+ P.style ?? {},
1062
+ Gt(h, v)
1063
+ )), g && Object.assign(P, Vt(g, v)), d.forEach((b) => {
1064
+ Object.assign(P, Qt(t, b, v));
1065
1065
  });
1066
1066
  const Je = Wt(
1067
1067
  t,
1068
1068
  n.children ?? [],
1069
- _,
1069
+ v,
1070
1070
  s,
1071
1071
  n
1072
- ), he = _?.__id ? `data-v-${_.__id}` : void 0, Ke = he ? { [he]: "" } : {};
1072
+ ), he = v?.__id ? `data-v-${v.__id}` : void 0, Ke = he ? { [he]: "" } : {};
1073
1073
  let W = t.createVNode(
1074
1074
  Q,
1075
- { key: `${i}_${x}`, ...Ke, ...b, ...Le },
1075
+ { key: `${i}_${$}`, ...Ke, ...P, ...qe },
1076
1076
  Je
1077
1077
  );
1078
- const me = a ? Bt(a, m, _) : [];
1078
+ const me = a ? Bt(a, y, v) : [];
1079
1079
  return me.length && (W = t.withDirectives(W, me)), W;
1080
1080
  };
1081
- return h ? Zt(h, R, e) : R(e);
1081
+ return p ? Zt(p, w, e) : w(e);
1082
1082
  }
1083
1083
  function Bt(n, e, t) {
1084
1084
  const s = n.app;
@@ -1090,12 +1090,12 @@ function Bt(n, e, t) {
1090
1090
  }).filter((r) => !!r);
1091
1091
  }
1092
1092
  function He(n = []) {
1093
- const e = n.find((f) => P(f.name) === "vIf"), t = n.find(
1094
- (f) => P(f.name) === "vElseIf"
1095
- ), s = n.find((f) => P(f.name) === "vElse"), r = n.find((f) => P(f.name) === "vFor"), o = n.find((f) => P(f.name) === "vShow"), a = n.find((f) => P(f.name) === "vBind"), i = n.find((f) => P(f.name) === "vHtml"), l = n.filter(
1096
- (f) => P(f.name) === "vModel"
1093
+ const e = n.find((u) => C(u.name) === "vIf"), t = n.find(
1094
+ (u) => C(u.name) === "vElseIf"
1095
+ ), s = n.find((u) => C(u.name) === "vElse"), r = n.find((u) => C(u.name) === "vFor"), o = n.find((u) => C(u.name) === "vShow"), a = n.find((u) => C(u.name) === "vBind"), i = n.find((u) => C(u.name) === "vHtml"), l = n.filter(
1096
+ (u) => C(u.name) === "vModel"
1097
1097
  ), c = n.filter(
1098
- (f) => !ot.includes(P(f.name))
1098
+ (u) => !ot.includes(C(u.name))
1099
1099
  );
1100
1100
  return {
1101
1101
  vIf: e,
@@ -1109,18 +1109,18 @@ function He(n = []) {
1109
1109
  vHtml: i
1110
1110
  };
1111
1111
  }
1112
- function Nt(n, e) {
1112
+ function Lt(n, e) {
1113
1113
  return !!e.__parseExpression(n.value);
1114
1114
  }
1115
- function Ut(n, e) {
1116
- return e ? j(e) ? n.__parseExpression(e) : e : "div";
1115
+ function Nt(n, e) {
1116
+ return e ? E(e) ? n.__parseExpression(e) : e : "div";
1117
1117
  }
1118
- function qt(n, e, t) {
1118
+ function Ut(n, e, t) {
1119
1119
  const s = ce(e, t);
1120
1120
  return s.ref = t.__ref(n, s.ref), s;
1121
1121
  }
1122
1122
  function ce(n, e) {
1123
- return j(n) ? e.__parseExpression(n) : S(n) ? e.__parseFunction(n) : Array.isArray(n) ? n.map((t) => ce(t, e)) : typeof n == "object" ? Object.keys(n || {}).reduce(
1123
+ return E(n) ? e.__parseExpression(n) : j(n) ? e.__parseFunction(n) : Array.isArray(n) ? n.map((t) => ce(t, e)) : typeof n == "object" ? Object.keys(n || {}).reduce(
1124
1124
  (t, s) => {
1125
1125
  let r = n[s];
1126
1126
  return t[s] = ce(r, e), t;
@@ -1128,7 +1128,7 @@ function ce(n, e) {
1128
1128
  {}
1129
1129
  ) : n;
1130
1130
  }
1131
- function Lt(n, e, t) {
1131
+ function qt(n, e, t) {
1132
1132
  const s = ["passive", "capture", "once"], r = {
1133
1133
  capture: "Capture",
1134
1134
  once: "Once",
@@ -1136,8 +1136,8 @@ function Lt(n, e, t) {
1136
1136
  };
1137
1137
  return Object.keys(e || {}).reduce(
1138
1138
  (o, a) => {
1139
- const i = e[a], l = xe(i.modifiers), c = l.find((h) => s.includes(h)), f = "on" + tt(a) + (c && r[c] || ""), u = t.__parseFunction(i.handler);
1140
- return u && (o[f] = n.withModifiers(u, l)), o;
1139
+ const i = e[a], l = xe(i.modifiers), c = l.find((p) => s.includes(p)), u = "on" + tt(a) + (c && r[c] || ""), f = t.__parseFunction(i.handler);
1140
+ return f && (o[u] = n.withModifiers(f, l)), o;
1141
1141
  },
1142
1142
  {}
1143
1143
  );
@@ -1162,7 +1162,7 @@ function xe(n = {}, e = !1) {
1162
1162
  }
1163
1163
  function Kt(n, e, t, s, r) {
1164
1164
  const { children: o } = e, a = zt(e, s), i = s.$slots?.[a.name];
1165
- return i ? i(t) : o ? C(o) ? n.createTextVNode(o) : j(o) ? n.createTextVNode(
1165
+ return i ? i(t) : o ? A(o) ? n.createTextVNode(o) : E(o) ? n.createTextVNode(
1166
1166
  Ie(s.__parseExpression(o))
1167
1167
  ) : Array.isArray(o) ? o.map(
1168
1168
  (l) => O(l, s, n, r, o)
@@ -1171,7 +1171,7 @@ function Kt(n, e, t, s, r) {
1171
1171
  function zt(n, e) {
1172
1172
  const { props: t } = n, s = t?.name || "default";
1173
1173
  return {
1174
- name: j(s) ? e.__parseExpression(s) : s,
1174
+ name: E(s) ? e.__parseExpression(s) : s,
1175
1175
  params: []
1176
1176
  };
1177
1177
  }
@@ -1192,8 +1192,8 @@ function Qt(n, e, t) {
1192
1192
  ${e.value.value} = v;
1193
1193
  }` : "(v) => {}"
1194
1194
  }, r = t.__parseFunction(s), o = xe(
1195
- j(e.modifiers) ? t.__parseExpression(e.modifiers) : e.modifiers
1196
- ), a = j(e.arg) ? t.__parseExpression(e.arg) : e.arg || "modelValue";
1195
+ E(e.modifiers) ? t.__parseExpression(e.modifiers) : e.modifiers
1196
+ ), a = E(e.arg) ? t.__parseExpression(e.arg) : e.arg || "modelValue";
1197
1197
  return {
1198
1198
  [a]: t.__parseExpression(e.value),
1199
1199
  [`onUpdate:${a}`]: o.length && r ? n.withModifiers(r, o) : r
@@ -1201,9 +1201,9 @@ function Qt(n, e, t) {
1201
1201
  }
1202
1202
  function Wt(n, e, t, s, r) {
1203
1203
  if (!e) return null;
1204
- if (C(e))
1204
+ if (A(e))
1205
1205
  return { default: () => e };
1206
- if (j(e))
1206
+ if (E(e))
1207
1207
  return {
1208
1208
  default: () => Ie(t.__parseExpression(e))
1209
1209
  };
@@ -1214,10 +1214,10 @@ function Wt(n, e, t, s, r) {
1214
1214
  [`scope_${r.id}`]: i
1215
1215
  } : l ? { [l]: /* @__PURE__ */ Object.create(null) } : {};
1216
1216
  return Object.entries(o).reduce(
1217
- (i, [l, { nodes: c, params: f, scope: u }]) => (i[l] = (h) => {
1218
- const p = f.length ? st(h ?? {}, f) : a(h, u);
1217
+ (i, [l, { nodes: c, params: u, scope: f }]) => (i[l] = (p) => {
1218
+ const h = u.length ? st(p ?? {}, u) : a(p, f);
1219
1219
  return c.map(
1220
- (d) => O(d, t.__clone(p), n, s, c)
1220
+ (d) => O(d, t.__clone(h), n, s, c)
1221
1221
  );
1222
1222
  }, i),
1223
1223
  {}
@@ -1238,7 +1238,7 @@ function Xt(n) {
1238
1238
  return e;
1239
1239
  }
1240
1240
  function Yt(n = "default") {
1241
- return C(n) ? { name: n, params: [], scope: "" } : { params: [], scope: "", ...n };
1241
+ return A(n) ? { name: n, params: [], scope: "" } : { params: [], scope: "", ...n };
1242
1242
  }
1243
1243
  function Zt(n, e, t) {
1244
1244
  const { value: s, iterator: r } = n, { item: o = "item", index: a = "index" } = r || {};
@@ -1248,7 +1248,7 @@ function Zt(n, e, t) {
1248
1248
  const ee = Ce({
1249
1249
  name: "VtjPageContainer",
1250
1250
  async setup() {
1251
- const n = Ue(), e = Ae(), t = e.meta.__vtj__ || e.params.id, s = t ? n.getPage(t) : n.getHomepage(), r = s ? await n.getRenderComponent(s.id) : null, o = oe(Symbol());
1251
+ const n = Ne(), e = Ae(), t = e.meta.__vtj__ || e.params.id, s = t ? n.getPage(t) : n.getHomepage(), r = s ? await n.getRenderComponent(s.id) : null, o = oe(Symbol());
1252
1252
  if (s) {
1253
1253
  Object.assign(e.meta, s.meta || {}, { cache: s.cache });
1254
1254
  const { useTitle: a } = n?.adapter;
@@ -1280,12 +1280,12 @@ const ee = Ce({
1280
1280
  function K(n, e, t = []) {
1281
1281
  const s = [];
1282
1282
  for (const r of t) {
1283
- const { id: o, title: a, icon: i, children: l, hidden: c, layout: f } = r;
1284
- if (f) {
1285
- const u = K(n, e, l || []);
1286
- s.push(...u);
1283
+ const { id: o, title: a, icon: i, children: l, hidden: c, layout: u } = r;
1284
+ if (u) {
1285
+ const f = K(n, e, l || []);
1286
+ s.push(...f);
1287
1287
  } else {
1288
- const u = {
1288
+ const f = {
1289
1289
  id: o,
1290
1290
  title: a,
1291
1291
  icon: i,
@@ -1293,7 +1293,7 @@ function K(n, e, t = []) {
1293
1293
  url: `${n}/${e}/${o}`,
1294
1294
  children: l && l.length ? K(n, e, l) : void 0
1295
1295
  };
1296
- s.push(u);
1296
+ s.push(f);
1297
1297
  }
1298
1298
  }
1299
1299
  return s;
@@ -1314,37 +1314,37 @@ function Cs(n) {
1314
1314
  menuPathPrefix: e = "",
1315
1315
  pageRouteName: t = "page",
1316
1316
  disableMenusFilter: s = !1
1317
- } = n || {}, r = Ue(), o = Ae(), a = St(), i = oe(!1), l = oe(!1), c = r.project, f = (p, d) => {
1318
- i.value = !p?.mask, l.value = d?.pure ?? !!p?.pure;
1317
+ } = n || {}, r = Ne(), o = Ae(), a = St(), i = oe(!1), l = oe(!1), c = r.project, u = (h, d) => {
1318
+ i.value = !h?.mask, l.value = d?.pure ?? !!h?.pure;
1319
1319
  };
1320
1320
  rt(() => {
1321
- const { name: p, params: d, meta: g } = o;
1322
- if (p === D) {
1323
- const v = r.getPage(d.id);
1324
- f(v, g);
1325
- } else if (p === U) {
1326
- const v = r.getHomepage();
1327
- f(v, g);
1321
+ const { name: h, params: d, meta: m } = o;
1322
+ if (h === T) {
1323
+ const g = r.getPage(d.id);
1324
+ u(g, m);
1325
+ } else if (h === N) {
1326
+ const g = r.getHomepage();
1327
+ u(g, m);
1328
1328
  } else {
1329
- const v = g.__vtj__;
1330
- if (v) {
1331
- const m = r.getPage(v);
1332
- f(m, g);
1329
+ const g = m.__vtj__;
1330
+ if (g) {
1331
+ const y = r.getPage(g);
1332
+ u(y, m);
1333
1333
  } else
1334
- i.value = !g.mask, l.value = !!g.pure;
1334
+ i.value = !m.mask, l.value = !!m.pure;
1335
1335
  }
1336
1336
  });
1337
- const u = K(
1337
+ const f = K(
1338
1338
  e,
1339
1339
  t,
1340
1340
  c?.pages
1341
- ), h = c?.config;
1341
+ ), p = c?.config;
1342
1342
  return {
1343
1343
  disabled: i,
1344
- logo: h?.logo,
1345
- themeSwitchable: h?.themeSwitchable,
1346
- title: h?.title || c?.description || c?.name || "VTJ App",
1347
- menus: s ? u : Be(u, a),
1344
+ logo: p?.logo,
1345
+ themeSwitchable: p?.themeSwitchable,
1346
+ title: p?.title || c?.description || c?.name || "VTJ App",
1347
+ menus: s ? f : Be(f, a),
1348
1348
  pure: l
1349
1349
  };
1350
1350
  }
@@ -1373,9 +1373,9 @@ function le(n) {
1373
1373
  homepage: i
1374
1374
  } = n, l = [];
1375
1375
  for (const c of s) {
1376
- const { id: f, title: u, dir: h, layout: p, children: d, meta: g } = c;
1377
- if (h) {
1378
- const v = le({
1376
+ const { id: u, title: f, dir: p, layout: h, children: d, meta: m } = c;
1377
+ if (p) {
1378
+ const g = le({
1379
1379
  name: e,
1380
1380
  prefix: t,
1381
1381
  component: r,
@@ -1384,9 +1384,9 @@ function le(n) {
1384
1384
  loader: o,
1385
1385
  pages: d || []
1386
1386
  });
1387
- l.push(...v);
1388
- } else if (p) {
1389
- const v = le({
1387
+ l.push(...g);
1388
+ } else if (h) {
1389
+ const g = le({
1390
1390
  name: e,
1391
1391
  prefix: t,
1392
1392
  component: r,
@@ -1394,40 +1394,40 @@ function le(n) {
1394
1394
  homepage: i,
1395
1395
  loader: o,
1396
1396
  pages: d || []
1397
- }), m = {
1398
- name: `layout_${f}`,
1397
+ }), y = {
1398
+ name: `layout_${u}`,
1399
1399
  path: t,
1400
- component: () => o(f),
1400
+ component: () => o(u),
1401
1401
  meta: {
1402
- title: u,
1402
+ title: f,
1403
1403
  ...a,
1404
- ...g,
1405
- __vtj__: f
1404
+ ...m,
1405
+ __vtj__: u
1406
1406
  },
1407
- children: v
1407
+ children: g
1408
1408
  };
1409
- l.push(m), l.push(te(c, n));
1410
- } else if (l.push(te(c, n)), i === f) {
1411
- const v = te(c, n);
1412
- v.path = "", v.name = `home_${f}`, l.push(v);
1409
+ l.push(y), l.push(te(c, n));
1410
+ } else if (l.push(te(c, n)), i === u) {
1411
+ const g = te(c, n);
1412
+ g.path = "", g.name = `home_${u}`, l.push(g);
1413
1413
  }
1414
1414
  }
1415
1415
  return l;
1416
1416
  }
1417
1417
  function ts(n = {}, e) {
1418
- const { css: t, store: s, enhance: r } = n, { window: o, app: a, library: i = {}, adapter: l, mode: c } = e, { Pinia: f } = i;
1419
- a.config.globalProperties.$libs = i, fe(o, "global-css", t || ""), f && s && ss(s, a, f), rs(a, l, n), !l.access && n.access && ns(n.access, a, c, l), os(a, n), r && is(r, a, i);
1418
+ const { css: t, store: s, enhance: r } = n, { window: o, app: a, library: i = {}, adapter: l, mode: c } = e, { Pinia: u } = i;
1419
+ a.config.globalProperties.$libs = i, fe(o, "global-css", t || ""), u && s && ss(s, a, u), rs(a, l, n), !l.access && n.access && ns(n.access, a, c, l), os(a, n), r && is(r, a, i);
1420
1420
  }
1421
1421
  function ss(n, e, t) {
1422
1422
  const s = t.createPinia();
1423
- if (e.use(s), S(n) && n.value) {
1424
- const r = E(n, {}, !1, !1, !0), o = t.defineStore("$store", r(e) || {});
1423
+ if (e.use(s), j(n) && n.value) {
1424
+ const r = R(n, {}, !1, !1, !0), o = t.defineStore("$store", r(e) || {});
1425
1425
  e.config.globalProperties.$store = o();
1426
1426
  }
1427
1427
  }
1428
1428
  function ns(n, e, t, s) {
1429
- if (S(n) && n.value) {
1430
- const r = E(n, {}, !1, !1, !0), { alert: o, request: a } = s, i = new pe({
1429
+ if (j(n) && n.value) {
1430
+ const r = R(n, {}, !1, !1, !0), { alert: o, request: a } = s, i = new pe({
1431
1431
  alert: o,
1432
1432
  storagePrefix: "__VTJ_APP_",
1433
1433
  ...r(e)
@@ -1438,32 +1438,32 @@ function ns(n, e, t, s) {
1438
1438
  function rs(n, e, t) {
1439
1439
  if (!e.request) return;
1440
1440
  const { axios: s, request: r, response: o } = t;
1441
- if (s && S(s) && s.value) {
1442
- const a = E(s, {}, !1, !1, !0);
1441
+ if (s && j(s) && s.value) {
1442
+ const a = R(s, {}, !1, !1, !0);
1443
1443
  e.request.setConfig(a(n));
1444
1444
  }
1445
- if (r && S(r) && r.value) {
1446
- const a = E(r, {}, !1, !1, !0), i = e.request;
1445
+ if (r && j(r) && r.value) {
1446
+ const a = R(r, {}, !1, !1, !0), i = e.request;
1447
1447
  i.__unReq && i.__unReq(), i.__unReq = e.request.useRequest((l) => a(l, n));
1448
1448
  }
1449
- if (o && S(o) && o.value) {
1450
- const a = E(o, {}, !1, !1, !0), i = e.request;
1449
+ if (o && j(o) && o.value) {
1450
+ const a = R(o, {}, !1, !1, !0), i = e.request;
1451
1451
  i.__unRes && i.__unRes(), i.__unRes = e.request.useResponse((l) => a(l, n));
1452
1452
  }
1453
1453
  }
1454
1454
  function os(n, e) {
1455
1455
  const { beforeEach: t, afterEach: s } = e, r = n.config.globalProperties.$router;
1456
- if (t && S(t) && t.value) {
1457
- const o = E(t, {}, !1, !1, !0);
1456
+ if (t && j(t) && t.value) {
1457
+ const o = R(t, {}, !1, !1, !0);
1458
1458
  r && r.beforeEach((a, i, l) => o(a, i, l, n));
1459
1459
  }
1460
- if (s && S(s) && s.value) {
1461
- const o = E(s, {}, !1, !1, !0);
1460
+ if (s && j(s) && s.value) {
1461
+ const o = R(s, {}, !1, !1, !0);
1462
1462
  r && r.afterEach((a, i, l) => o(a, i, l, n));
1463
1463
  }
1464
1464
  }
1465
1465
  function is(n, e, t = {}) {
1466
- S(n) && n.value && E(n, {}, !1, !1, !0)(e, t);
1466
+ j(n) && n.value && R(n, {}, !1, !1, !0)(e, t);
1467
1467
  }
1468
1468
  function as(n, e, t) {
1469
1469
  if (!n || !e || !t) return;
@@ -1471,9 +1471,9 @@ function as(n, e, t) {
1471
1471
  if (s) {
1472
1472
  const { locale: r, fallbackLocale: o, messages: a = [] } = t, i = {};
1473
1473
  for (let c of a) {
1474
- const f = Object.keys(c).filter((u) => u !== "key");
1475
- for (const u of f)
1476
- i[u] || (i[u] = {}), i[u][c.key] = c[u];
1474
+ const u = Object.keys(c).filter((f) => f !== "key");
1475
+ for (const f of u)
1476
+ i[f] || (i[f] = {}), i[f][c.key] = c[f];
1477
1477
  }
1478
1478
  const l = s.createI18n({
1479
1479
  legacy: !1,
@@ -1484,7 +1484,7 @@ function as(n, e, t) {
1484
1484
  n.use(l);
1485
1485
  }
1486
1486
  }
1487
- const Ne = Symbol("Provider");
1487
+ const Le = Symbol("Provider");
1488
1488
  var cs = /* @__PURE__ */ ((n) => (n.Production = "production", n.Development = "development", n))(cs || {});
1489
1489
  class ls extends ze {
1490
1490
  // DSL缓存
@@ -1496,21 +1496,21 @@ class ls extends ze {
1496
1496
  super(), this.options = e;
1497
1497
  const {
1498
1498
  service: t,
1499
- mode: s = y.Raw,
1499
+ mode: s = _.Raw,
1500
1500
  dependencies: r,
1501
1501
  materials: o,
1502
1502
  project: a = {},
1503
1503
  adapter: i = {},
1504
1504
  globals: l = {},
1505
1505
  modules: c = {},
1506
- router: f = null,
1507
- materialPath: u = "./",
1508
- nodeEnv: h = "development"
1506
+ router: u = null,
1507
+ materialPath: f = "./",
1508
+ nodeEnv: p = "development"
1509
1509
  /* Development */
1510
1510
  } = e;
1511
- this.mode = s, this.modules = c, this.service = t, this.router = f, this.materialPath = u, this.nodeEnv = h, r && (this.dependencies = r), o && (this.materials = o), Object.assign(this.globals, l), Object.assign(this.adapter, i);
1512
- const { access: p, request: d } = this.adapter;
1513
- p && p.connect({ mode: s, router: f, request: d }), a && s !== y.Design ? this.load(a) : this.project = a;
1511
+ this.mode = s, this.modules = c, this.service = t, this.router = u, this.materialPath = f, this.nodeEnv = p, r && (this.dependencies = r), o && (this.materials = o), Object.assign(this.globals, l), Object.assign(this.adapter, i);
1512
+ const { access: h, request: d } = this.adapter;
1513
+ h && h.connect({ mode: s, router: u, request: d }), a && s !== _.Design ? this.load(a) : this.project = a;
1514
1514
  }
1515
1515
  mode;
1516
1516
  // 当前运行模式(设计/源码/预览等)
@@ -1518,7 +1518,7 @@ class ls extends ze {
1518
1518
  // 全局变量
1519
1519
  modules = {};
1520
1520
  // 异步模块加载器
1521
- adapter = { request: ne, jsonp: be };
1521
+ adapter = { request: ne, jsonp: Re };
1522
1522
  // 适配器接口
1523
1523
  apis = {};
1524
1524
  // API集合
@@ -1528,6 +1528,10 @@ class ls extends ze {
1528
1528
  // 物料资源
1529
1529
  library = {};
1530
1530
  // 第三方库
1531
+ libraryLocales = {};
1532
+ // 第三方库语言包
1533
+ libraryLocaleMap = {};
1534
+ // 库名称->语言包映射
1531
1535
  service;
1532
1536
  // 核心服务
1533
1537
  project = null;
@@ -1548,9 +1552,9 @@ class ls extends ze {
1548
1552
  try {
1549
1553
  s = await e.apply(e, t);
1550
1554
  } catch (o) {
1551
- F.warn("模拟数据模版异常", o);
1555
+ M.warn("模拟数据模版异常", o);
1552
1556
  }
1553
- return T()?.mock(s);
1557
+ return H()?.mock(s);
1554
1558
  };
1555
1559
  }
1556
1560
  /**
@@ -1567,10 +1571,10 @@ class ls extends ze {
1567
1571
  if (this.project = s ? await s() : await this.service.init(e), !this.project)
1568
1572
  throw new Error("project is null");
1569
1573
  const { apis: r = [], meta: o = [] } = this.project, a = window;
1570
- a && (a.CKEDITOR_VERSION = void 0), this.mode === y.Raw ? await this.loadDependencies(a) : await this.loadAssets(a), this.initMock(a), this.apis = Et(r, o, this.adapter), Me(a), Rt(r, a), e.platform !== "uniapp" && this.initRouter(), this.triggerReady();
1574
+ a && (a.CKEDITOR_VERSION = void 0), this.mode === _.Raw ? await this.loadDependencies(a) : await this.loadAssets(a), this.initMock(a), this.apis = bt(r, o, this.adapter), Oe(a), Et(r, a), e.platform !== "uniapp" && this.initRouter(), this.triggerReady();
1571
1575
  }
1572
1576
  initMock(e) {
1573
- const t = T(e);
1577
+ const t = H(e);
1574
1578
  t && t.setup({
1575
1579
  timeout: "50-500"
1576
1580
  });
@@ -1581,45 +1585,56 @@ class ls extends ze {
1581
1585
  e[s] || (e[s] = this.library[s] = await r());
1582
1586
  }
1583
1587
  async loadAssets(e) {
1584
- const { dependencies: t = [] } = this.project, { dependencies: s, library: r, components: o, materialPath: a, nodeEnv: i } = this, {
1585
- libraryExports: l,
1586
- libraryMap: c,
1588
+ const { dependencies: t = [] } = this.project, {
1589
+ dependencies: s,
1590
+ library: r,
1591
+ components: o,
1592
+ materialPath: a,
1593
+ nodeEnv: i,
1594
+ libraryLocales: l
1595
+ } = this, {
1596
+ libraryExports: c,
1597
+ libraryMap: u,
1587
1598
  materials: f,
1588
- materialExports: u,
1589
- materialMapLibrary: h
1599
+ materialExports: p,
1600
+ materialMapLibrary: h,
1601
+ libraryLocaleMap: d
1590
1602
  } = ft(
1591
1603
  t,
1592
1604
  a,
1593
1605
  i === "development"
1594
1606
  /* Development */
1595
1607
  );
1596
- for (const p of l) {
1597
- const d = s[p], g = e[p];
1598
- if (g)
1599
- r[p] = g;
1600
- else if (d)
1601
- e[p] = r[p] = await d();
1608
+ Object.assign(this.libraryLocaleMap, d);
1609
+ for (const m of c) {
1610
+ const g = s[m], y = e[m];
1611
+ if (y)
1612
+ r[m] = y;
1613
+ else if (g)
1614
+ e[m] = r[m] = await g();
1602
1615
  else {
1603
- const v = c[p] || [];
1604
- for (const m of v)
1605
- G(m) && await mt(m, k.append(m, { v: M })), V(m) && await Se(k.append(m, { v: M }));
1606
- r[p] = e[p];
1616
+ const v = u[m] || [];
1617
+ for (const $ of v)
1618
+ G($) && await mt($, F.append($, { v: D })), V($) && await Se(F.append($, { v: D }));
1619
+ r[m] = e[m];
1607
1620
  }
1621
+ const w = d[m];
1622
+ w && (l[w] = e[w]);
1608
1623
  }
1609
1624
  if (i === "development") {
1610
- for (const d of f)
1611
- await Se(k.append(d, { v: M }));
1612
- const p = this.materials || {};
1613
- for (const d of u) {
1614
- const g = e[h[d]], v = Ge[d];
1615
- if (v)
1616
- g && v.forEach((m) => {
1617
- o[m] = g[m];
1625
+ for (const g of f)
1626
+ await Se(F.append(g, { v: D }));
1627
+ const m = this.materials || {};
1628
+ for (const g of p) {
1629
+ const y = e[h[g]], w = Ge[g];
1630
+ if (w)
1631
+ y && w.forEach((v) => {
1632
+ o[v] = y[v];
1618
1633
  });
1619
1634
  else {
1620
- const m = p[d] ? (await p[d]()).default : e[d];
1621
- m && g && (m.components || []).forEach((R) => {
1622
- o[R.name] = pt(R, g);
1635
+ const v = m[g] ? (await m[g]()).default : e[g];
1636
+ v && y && (v.components || []).forEach(($) => {
1637
+ o[$.name] = pt($, y);
1623
1638
  });
1624
1639
  }
1625
1640
  }
@@ -1632,30 +1647,30 @@ class ls extends ze {
1632
1647
  routeAppendTo: a,
1633
1648
  pageRouteName: i = o,
1634
1649
  routeMeta: l
1635
- } = s, c = a ? "" : "/", f = {
1650
+ } = s, c = a ? "" : "/", u = {
1636
1651
  path: `${c}${i}/:id`,
1637
- name: D,
1652
+ name: T,
1638
1653
  component: ee
1639
- }, u = {
1654
+ }, f = {
1640
1655
  path: c,
1641
- name: U,
1656
+ name: N,
1642
1657
  component: t?.homepage ? ee : r.startupComponent || es,
1643
1658
  meta: l
1644
1659
  };
1645
- if (e.hasRoute(D) && e.removeRoute(D), e.hasRoute(U) && e.removeRoute(U), s.enableStaticRoute) {
1646
- const h = t?.pages || [];
1660
+ if (e.hasRoute(T) && e.removeRoute(T), e.hasRoute(N) && e.removeRoute(N), s.enableStaticRoute) {
1661
+ const p = t?.pages || [];
1647
1662
  le({
1648
1663
  name: i,
1649
1664
  prefix: c,
1650
- pages: h,
1665
+ pages: p,
1651
1666
  component: ee,
1652
1667
  loader: this.getRenderComponent.bind(this),
1653
1668
  homepage: t?.homepage
1654
1669
  }).forEach((d) => {
1655
1670
  a ? e.addRoute(a, d) : e.addRoute(d);
1656
- }), t?.homepage || (a ? e.addRoute(a, u) : e.addRoute(u));
1671
+ }), t?.homepage || (a ? e.addRoute(a, f) : e.addRoute(f));
1657
1672
  } else
1658
- a ? (e.addRoute(a, f), e.addRoute(a, u)) : (e.addRoute(f), e.addRoute(u));
1673
+ a ? (e.addRoute(a, u), e.addRoute(a, f)) : (e.addRoute(u), e.addRoute(f));
1659
1674
  }
1660
1675
  /**
1661
1676
  * Vue 插件安装方法
@@ -1668,27 +1683,30 @@ class ls extends ze {
1668
1683
  * @param app Vue 应用实例
1669
1684
  */
1670
1685
  install(e) {
1671
- const t = e.config.globalProperties.installed || {};
1672
- for (const [s, r] of Object.entries(this.library))
1673
- !t[s] && gt(r) && (e.use(r), t[s] = !0);
1674
- this.options.install && e.use(this.options.install), this.adapter.access && e.use(this.adapter.access), this.project?.platform !== "uniapp" && this.mode !== y.Design && this.initGlobals(this.project?.globals || {}, {
1686
+ const { libraryLocaleMap: t, libraryLocales: s } = this, r = e.config.globalProperties.installed || {};
1687
+ for (const [o, a] of Object.entries(this.library))
1688
+ if (!r[o] && gt(a)) {
1689
+ const i = s[t[o]];
1690
+ e.use(a, { locale: i }), r[o] = !0;
1691
+ }
1692
+ this.options.install && e.use(this.options.install), this.adapter.access && e.use(this.adapter.access), this.project?.platform !== "uniapp" && this.mode !== _.Design && this.initGlobals(this.project?.globals || {}, {
1675
1693
  app: e,
1676
1694
  window,
1677
1695
  adapter: this.adapter,
1678
1696
  library: this.library,
1679
1697
  mode: this.mode
1680
- }), this.mode !== y.Design && this.project?.i18n && this.initI18n(e, this.library, this.project.i18n), e.provide(Ne, this), e.config.globalProperties.$provider = this, this.options.enhance && e.use(this.options.enhance, this), this.mode === y.Design && (e.config.errorHandler = (s, r, o) => {
1681
- const a = r?.$options.name, i = typeof s == "string" ? s : s?.message || s?.msg || "未知错误", l = `[ ${a} ] ${i} ${o}`;
1698
+ }), this.mode !== _.Design && this.project?.i18n && this.initI18n(e, this.library, this.project.i18n), e.provide(Le, this), e.config.globalProperties.$provider = this, this.options.enhance && e.use(this.options.enhance, this), this.mode === _.Design && (e.config.errorHandler = (o, a, i) => {
1699
+ const l = a?.$options.name, c = typeof o == "string" ? o : o?.message || o?.msg || "未知错误", u = `[ ${l} ] ${c} ${i}`;
1682
1700
  console.error(
1683
1701
  "[VTJ Error]:",
1684
1702
  {
1685
- err: s,
1686
- instance: r,
1687
- info: o
1703
+ err: o,
1704
+ instance: a,
1705
+ info: i
1688
1706
  },
1689
- s?.stack
1690
- ), this.adapter.notify && this.adapter.notify(l, "组件渲染错误", "error");
1691
- }), e.config.globalProperties.installed = t;
1707
+ o?.stack
1708
+ ), this.adapter.notify && this.adapter.notify(u, "组件渲染错误", "error");
1709
+ }), e.config.globalProperties.installed = r;
1692
1710
  }
1693
1711
  getFile(e) {
1694
1712
  const { blocks: t = [] } = this.project || {};
@@ -1772,13 +1790,13 @@ class ls extends ze {
1772
1790
  async getRenderComponent(e, t) {
1773
1791
  const s = this.getFile(e);
1774
1792
  if (!s)
1775
- return F.warn(`Can not find file: ${e}`), null;
1776
- if (t && t(s), this.mode === y.Raw) {
1793
+ return M.warn(`Can not find file: ${e}`), null;
1794
+ if (t && t(s), this.mode === _.Raw) {
1777
1795
  const { vtjRawDir: o = ".vtj/vue" } = this.options, a = `${o}/${e}.vue`, i = this.modules[a] || this.modules[`/src/pages/${e}.vue`];
1778
1796
  return i ? (await i())?.default : this.nodeEnv === "development" && this.adapter.startupComponent || null;
1779
1797
  }
1780
1798
  const r = await this.getDsl(s.id);
1781
- return r ? this.createDslRenderer(r).renderer : (F.warn(`Can not find dsl: ${e}`), null);
1799
+ return r ? this.createDslRenderer(r).renderer : (M.warn(`Can not find dsl: ${e}`), null);
1782
1800
  }
1783
1801
  /**
1784
1802
  * 定义基于URL的异步组件
@@ -1831,8 +1849,8 @@ function As(n) {
1831
1849
  onReady: (s) => e.ready(s)
1832
1850
  };
1833
1851
  }
1834
- function Ue(n = {}) {
1835
- const e = Pe(Ne, null);
1852
+ function Ne(n = {}) {
1853
+ const e = Pe(Le, null);
1836
1854
  if (!e)
1837
1855
  throw new Error("Can not find provider");
1838
1856
  if (e.nodeEnv === "development") {
@@ -1856,7 +1874,7 @@ async function Is(n, e = "") {
1856
1874
  }
1857
1875
  );
1858
1876
  }
1859
- const qe = {
1877
+ const Ue = {
1860
1878
  type: "json",
1861
1879
  validSuccess: !0,
1862
1880
  originResponse: !1,
@@ -1871,7 +1889,7 @@ const qe = {
1871
1889
  type: t,
1872
1890
  data: s
1873
1891
  },
1874
- settings: qe
1892
+ settings: Ue
1875
1893
  }), fs = (n, e = "/__vtj__/api/uploader.json") => async (t, s) => await n.send({
1876
1894
  url: e,
1877
1895
  method: "post",
@@ -1880,12 +1898,12 @@ const qe = {
1880
1898
  projectId: s
1881
1899
  },
1882
1900
  settings: {
1883
- ...qe,
1901
+ ...Ue,
1884
1902
  type: "data"
1885
1903
  }
1886
1904
  }).then((r) => r && r[0] ? r[0] : null).catch(() => null);
1887
1905
  function ks(n) {
1888
- return Re({
1906
+ return Ee({
1889
1907
  settings: {
1890
1908
  type: "json",
1891
1909
  validSuccess: !0,
@@ -2000,58 +2018,58 @@ class de {
2000
2018
  return console.log("BaseService.genSource", e), "";
2001
2019
  }
2002
2020
  }
2003
- const w = new nt({
2021
+ const S = new nt({
2004
2022
  type: "local",
2005
2023
  expired: 0,
2006
2024
  prefix: "__VTJ_"
2007
2025
  });
2008
2026
  class Fs extends de {
2009
2027
  init(e) {
2010
- const t = new q(e), s = w.get(`project_${t.id}`), r = Object.assign(t.toDsl(), s || {});
2011
- return w.save(`project_${t.id}`, r), Promise.resolve(r);
2028
+ const t = new U(e), s = S.get(`project_${t.id}`), r = Object.assign(t.toDsl(), s || {});
2029
+ return S.save(`project_${t.id}`, r), Promise.resolve(r);
2012
2030
  }
2013
2031
  saveProject(e) {
2014
- const t = new q(e);
2015
- return w.save(`project_${t.id}`, t.toDsl()), Promise.resolve(!0);
2032
+ const t = new U(e);
2033
+ return S.save(`project_${t.id}`, t.toDsl()), Promise.resolve(!0);
2016
2034
  }
2017
2035
  saveMaterials(e, t) {
2018
- return w.save(`materials_${e.id}`, ue(t)), Promise.resolve(!0);
2036
+ return S.save(`materials_${e.id}`, ue(t)), Promise.resolve(!0);
2019
2037
  }
2020
2038
  saveFile(e) {
2021
- return w.save(`file_${e.id}`, e), Promise.resolve(!0);
2039
+ return S.save(`file_${e.id}`, e), Promise.resolve(!0);
2022
2040
  }
2023
2041
  getFile(e) {
2024
- const t = w.get(`file_${e}`);
2042
+ const t = S.get(`file_${e}`);
2025
2043
  return t ? Promise.resolve(t) : Promise.reject(null);
2026
2044
  }
2027
2045
  removeFile(e) {
2028
- return w.remove(`file_${e}`), Promise.resolve(!0);
2046
+ return S.remove(`file_${e}`), Promise.resolve(!0);
2029
2047
  }
2030
2048
  saveHistory(e) {
2031
- return w.save(`history_${e.id}`, e), Promise.resolve(!0);
2049
+ return S.save(`history_${e.id}`, e), Promise.resolve(!0);
2032
2050
  }
2033
2051
  removeHistory(e) {
2034
- const t = w.get(`history_${e}`);
2052
+ const t = S.get(`history_${e}`);
2035
2053
  if (t) {
2036
2054
  const r = (t.items || []).map((o) => o.id);
2037
- this.removeHistoryItem(e, r), w.remove(`history_${e}`);
2055
+ this.removeHistoryItem(e, r), S.remove(`history_${e}`);
2038
2056
  }
2039
2057
  return Promise.resolve(!0);
2040
2058
  }
2041
2059
  getHistory(e) {
2042
- const t = w.get(`history_${e}`), s = new Ee(t || { id: e });
2060
+ const t = S.get(`history_${e}`), s = new be(t || { id: e });
2043
2061
  return Promise.resolve(s.toDsl());
2044
2062
  }
2045
2063
  getHistoryItem(e, t) {
2046
- const s = w.get(`history_${e}_${t}`);
2064
+ const s = S.get(`history_${e}_${t}`);
2047
2065
  return Promise.resolve(s);
2048
2066
  }
2049
2067
  saveHistoryItem(e, t) {
2050
- return w.save(`history_${e}_${t.id}`, t), Promise.resolve(!0);
2068
+ return S.save(`history_${e}_${t.id}`, t), Promise.resolve(!0);
2051
2069
  }
2052
2070
  removeHistoryItem(e, t) {
2053
2071
  return t.forEach((s) => {
2054
- w.remove(`history_${e}_${s}`);
2072
+ S.remove(`history_${e}_${s}`);
2055
2073
  }), Promise.resolve(!0);
2056
2074
  }
2057
2075
  }
@@ -2062,11 +2080,11 @@ class ps extends de {
2062
2080
  histories = {};
2063
2081
  historyItems = {};
2064
2082
  init(e) {
2065
- const t = new q(e), s = this.projects[t.id] || {}, r = Object.assign(t.toDsl(), s);
2083
+ const t = new U(e), s = this.projects[t.id] || {}, r = Object.assign(t.toDsl(), s);
2066
2084
  return this.projects[r.id] = r, Promise.resolve(r);
2067
2085
  }
2068
2086
  saveProject(e) {
2069
- const t = new q(e);
2087
+ const t = new U(e);
2070
2088
  return this.projects[t.id] = t.toDsl(), Promise.resolve(!0);
2071
2089
  }
2072
2090
  saveMaterials(e, t) {
@@ -2094,7 +2112,7 @@ class ps extends de {
2094
2112
  return Promise.resolve(!0);
2095
2113
  }
2096
2114
  getHistory(e) {
2097
- const t = this.histories[e], s = new Ee(t || { id: e });
2115
+ const t = this.histories[e], s = new be(t || { id: e });
2098
2116
  return Promise.resolve(s);
2099
2117
  }
2100
2118
  getHistoryItem(e, t) {
@@ -2112,11 +2130,11 @@ class ps extends de {
2112
2130
  }), Promise.resolve(!0);
2113
2131
  }
2114
2132
  }
2115
- let N = null;
2116
- function Os() {
2117
- return N || (N = new ps(), N);
2133
+ let L = null;
2134
+ function Ms() {
2135
+ return L || (L = new ps(), L);
2118
2136
  }
2119
- class Ms extends de {
2137
+ class Os extends de {
2120
2138
  getFileCaches = {};
2121
2139
  async getExtension() {
2122
2140
  return await this.api("getExtension", {}).catch(() => {
@@ -2175,60 +2193,60 @@ class Ms extends de {
2175
2193
  }
2176
2194
  export {
2177
2195
  _s as ACCESS,
2178
- Oe as ACCESS_KEY,
2196
+ Me as ACCESS_KEY,
2179
2197
  pe as Access,
2180
2198
  ct as BUILD_IN_TAGS,
2181
2199
  ot as BUILT_IN_DIRECTIVES,
2182
2200
  de as BaseService,
2183
2201
  je as CONTEXT_HOST,
2184
2202
  Ct as Context,
2185
- y as ContextMode,
2203
+ _ as ContextMode,
2186
2204
  it as DATA_TYPES,
2187
- U as HOMEPAGE_ROUTE_NAME,
2205
+ N as HOMEPAGE_ROUTE_NAME,
2188
2206
  at as HTML_TAGS,
2189
- Es as JSCodeToString,
2190
- vs as LIFE_CYCLES_LIST,
2191
- Ms as LocalService,
2207
+ bs as JSCodeToString,
2208
+ ys as LIFE_CYCLES_LIST,
2209
+ Os as LocalService,
2192
2210
  ps as MemoryService,
2193
2211
  cs as NodeEnv,
2194
- D as PAGE_ROUTE_NAME,
2212
+ T as PAGE_ROUTE_NAME,
2195
2213
  ls as Provider,
2196
- ys as REMOTE,
2214
+ vs as REMOTE,
2197
2215
  Fs as StorageService,
2198
- M as VTJ_RENDERER_VERSION,
2216
+ D as VTJ_RENDERER_VERSION,
2199
2217
  $s as adoptStylesToInline,
2200
2218
  fe as adoptedStyleSheets,
2201
2219
  Ps as clearLoaderCache,
2202
2220
  ht as compileScopedCSS,
2203
- bs as createAccess,
2204
- Rs as createAdapter,
2221
+ Rs as createAccess,
2222
+ Es as createAdapter,
2205
2223
  ws as createAssetScripts,
2206
2224
  Ss as createAssetsCss,
2207
2225
  Dt as createDataSources,
2208
2226
  ae as createLoader,
2209
- Os as createMemoryService,
2227
+ Ms as createMemoryService,
2210
2228
  K as createMenus,
2211
2229
  jt as createMetaApi,
2212
- bt as createMock,
2230
+ Rt as createMock,
2213
2231
  As as createProvider,
2214
2232
  ie as createRenderer,
2215
2233
  $t as createSchemaApi,
2216
- Et as createSchemaApis,
2234
+ bt as createSchemaApis,
2217
2235
  ks as createServiceRequest,
2218
2236
  xt as defaultLoader,
2219
2237
  B as fillBasePath,
2220
- T as getMock,
2238
+ H as getMock,
2221
2239
  xe as getModifiers,
2222
2240
  Te as getPlugin,
2223
2241
  pt as getRawComponent,
2224
- vt as isBuiltInTag,
2242
+ yt as isBuiltInTag,
2225
2243
  G as isCSSUrl,
2226
2244
  _t as isJSCode,
2227
- j as isJSExpression,
2228
- S as isJSFunction,
2245
+ E as isJSExpression,
2246
+ j as isJSFunction,
2229
2247
  lt as isJSON,
2230
2248
  V as isJSUrl,
2231
- yt as isNativeTag,
2249
+ vt as isNativeTag,
2232
2250
  gt as isVuePlugin,
2233
2251
  mt as loadCss,
2234
2252
  ke as loadCssUrl,
@@ -2236,18 +2254,18 @@ export {
2236
2254
  Fe as loadScriptUrl,
2237
2255
  Be as menusFilter,
2238
2256
  Pt as mockApi,
2239
- Rt as mockApis,
2240
- Me as mockCleanup,
2257
+ Et as mockApis,
2258
+ Oe as mockCleanup,
2241
2259
  O as nodeRender,
2242
2260
  ft as parseDeps,
2243
- H as parseExpression,
2244
- E as parseFunction,
2261
+ x as parseExpression,
2262
+ R as parseFunction,
2245
2263
  dt as parseUrls,
2246
- Ne as providerKey,
2264
+ Le as providerKey,
2247
2265
  ut as removeProdFlag,
2248
2266
  js as setupPageSetting,
2249
2267
  Ie as toString,
2250
2268
  St as useAccess,
2251
2269
  Cs as useMask,
2252
- Ue as useProvider
2270
+ Ne as useProvider
2253
2271
  };