@vtj/renderer 0.16.20 → 0.16.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,18 +1,18 @@
1
- import { Base as Qe, BUILT_IN_COMPONENTS as Xe, ProjectModel as J, HistoryModel as Re } from "@vtj/core";
2
- import { url as O, isUrl as ie, dedupArray as Ye, isFunction as K, isString as F, logger as M, storage as te, cookie as se, toArray as we, unRSA as Se, delay as z, createRequest as Ce, jsonp as Pe, merge as Ze, pathToRegexp as et, pathToRegexpMatch as tt, formDataToJson as st, isEqual as nt, Queue as rt, cloneDeep as $e, camelCase as P, upperFirstCamelCase as ot, pick as it, request as ae, loadScript as Ee, debounce as at, Storage as ct, mapToObject as he } from "@vtj/utils";
3
- import * as V from "vue";
4
- import { inject as Ae, defineComponent as Ie, h as ce, ref as le, watchEffect as lt, defineAsyncComponent as be } from "vue";
5
- import { useRoute as Fe } from "vue-router";
1
+ import { Base as Xe, BUILT_IN_COMPONENTS as Ye, ProjectModel as K, HistoryModel as Ce } from "@vtj/core";
2
+ import { url as O, isUrl as ae, dedupArray as Ze, isFunction as z, isString as I, logger as M, storage as se, cookie as ne, toArray as Se, unRSA as $e, delay as G, createRequest as Pe, jsonp as Ae, merge as et, pathToRegexp as tt, pathToRegexpMatch as st, formDataToJson as nt, isEqual as rt, Queue as ot, cloneDeep as Ee, camelCase as P, upperFirstCamelCase as it, pick as at, request as ce, loadScript as be, debounce as ct, Storage as lt, mapToObject as me } from "@vtj/utils";
3
+ import * as W from "vue";
4
+ import { inject as Ie, defineComponent as Fe, h as le, ref as ue, watchEffect as ut, defineAsyncComponent as je } from "vue";
5
+ import { useRoute as Oe } from "vue-router";
6
6
  /**!
7
7
  * Copyright (c) 2026, VTJ.PRO All rights reserved.
8
8
  * @name @vtj/renderer
9
9
  * @author CHC chenhuachun1549@dingtalk.com
10
- * @version 0.16.20
10
+ * @version 0.16.22
11
11
  * @license <a href="https://vtj.pro/license.html">MIT License</a>
12
12
  */
13
- const D = "0.16.20";
13
+ const k = "0.16.22";
14
14
  var y = /* @__PURE__ */ ((n) => (n.Runtime = "Runtime", n.Design = "Design", n.Raw = "Raw", n.VNode = "VNode", n))(y || {});
15
- const je = [
15
+ const Re = [
16
16
  "$el",
17
17
  "$emit",
18
18
  "$nextTick",
@@ -24,7 +24,7 @@ const je = [
24
24
  "$props",
25
25
  "$options",
26
26
  "$forceUpdate"
27
- ], Cs = [
27
+ ], Ps = [
28
28
  "beforeCreate",
29
29
  "created",
30
30
  "beforeMount",
@@ -38,7 +38,7 @@ const je = [
38
38
  "renderTriggered",
39
39
  "activated",
40
40
  "deactivated"
41
- ], ut = [
41
+ ], ft = [
42
42
  "vIf",
43
43
  "vElseIf",
44
44
  "vElse",
@@ -47,7 +47,7 @@ const je = [
47
47
  "vFor",
48
48
  "vBind",
49
49
  "vHtml"
50
- ], ft = {
50
+ ], pt = {
51
51
  String,
52
52
  Number,
53
53
  Boolean,
@@ -55,9 +55,9 @@ const je = [
55
55
  Object,
56
56
  Function,
57
57
  Date
58
- }, H = "VtjPage", q = "VtjHomepage", ke = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot,svg".split(
58
+ }, H = "VtjPage", J = "VtjHomepage", Me = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot,svg".split(
59
59
  ","
60
- ), pt = "component,slot".split(","), Ps = [
60
+ ), dt = "component,slot".split(","), As = [
61
61
  "h",
62
62
  "t",
63
63
  "t",
@@ -77,7 +77,7 @@ const je = [
77
77
  "p",
78
78
  "r",
79
79
  "o"
80
- ].join(""), As = {
80
+ ].join(""), Is = {
81
81
  auth: [
82
82
  "h",
83
83
  "t",
@@ -137,62 +137,62 @@ const je = [
137
137
  ].join(""),
138
138
  privateKey: "MIIBOgIBAAJBAKoIzmn1FYQ1YOhOBw9EhABxZ+PySAIaydI+zdhoKflrdgJ4A5E4/5gbQmRpk09hPWG8nvX7h+l/QLU8kXxAIBECAwEAAQJAAlgpxQY6sByLsXqzJcthC8LSGsLf2JEJkHwlnpwFqlEV8UCkoINpuZ2Wzl+aftURu5rIfAzRCQBvHmeOTW9/zQIhAO5ufWDmnSLyfAAsNo5JRNpVuLFCFodR8Xm+ulDlosR/AiEAtpAltyP9wmCABKG/v/hrtTr3mcvFNGCjoGa9bUAok28CIHbrVs9w1ijrBlvTsXYwJw46uP539uKRRT4ymZzlm9QjAiB+1KH/G9f9pEEL9rtaSOG7JF5D0JcOjlze4MGVFs+ZrQIhALKOUFBNr2zEsyJIjw2PlvEucdlG77UniszjXTROHSPd"
139
139
  };
140
- function L(n, e) {
141
- return n.map((t) => ie(t) || t.startsWith("/") ? t : `${e}${t}`);
140
+ function q(n, e) {
141
+ return n.map((t) => ae(t) || t.startsWith("/") ? t : `${e}${t}`);
142
142
  }
143
- function W(n) {
143
+ function Q(n) {
144
144
  return /\.css$/.test(n);
145
145
  }
146
- function Q(n) {
146
+ function X(n) {
147
147
  return /\.js$/.test(n);
148
148
  }
149
- function dt(n) {
149
+ function ht(n) {
150
150
  return /\.json$/.test(n);
151
151
  }
152
- function Is(n) {
152
+ function Fs(n) {
153
153
  return n.map(
154
- (e) => `<script src="${O.append(e, { v: D })}"><\/script>`
154
+ (e) => `<script src="${O.append(e, { v: k })}"><\/script>`
155
155
  ).join("");
156
156
  }
157
- function Fs(n = []) {
157
+ function Os(n = []) {
158
158
  return n.map(
159
- (e) => `<link rel="stylesheet" href="${O.append(e, { v: D })}" />`
159
+ (e) => `<link rel="stylesheet" href="${O.append(e, { v: k })}" />`
160
160
  ).join("");
161
161
  }
162
- function ht(n, e = !1) {
162
+ function mt(n, e = !1) {
163
163
  return e && n.endsWith(".prod.js") ? n.replace(".prod.js", ".js") : n;
164
164
  }
165
- function mt(n, e, t = !1) {
165
+ function gt(n, e, t = !1) {
166
166
  const s = n.filter((p) => !!p.enabled), r = [], o = [], i = [], a = [], u = {}, c = {}, l = [], f = {};
167
167
  return s.forEach(
168
168
  ({ urls: p, assetsUrl: d, library: m, assetsLibrary: h, localeLibrary: g }) => {
169
- p?.forEach((_) => {
170
- Q(_) && r.push(ht(_, t)), W(_) && o.push(_);
171
- }), m && (a.push(m), u[m] = L(p || [], e), g && (c[m] = g)), d && i.push(d), h && l.push(h), m && h && (f[h] = m);
169
+ p?.forEach((v) => {
170
+ X(v) && r.push(mt(v, t)), Q(v) && o.push(v);
171
+ }), m && (a.push(m), u[m] = q(p || [], e), g && (c[m] = g)), d && i.push(d), h && l.push(h), m && h && (f[h] = m);
172
172
  }
173
173
  ), {
174
- scripts: L(r, e),
175
- css: L(o, e),
176
- materials: L(i, e),
174
+ scripts: q(r, e),
175
+ css: q(o, e),
176
+ materials: q(i, e),
177
177
  libraryExports: a,
178
- materialExports: Ye(l),
178
+ materialExports: Ze(l),
179
179
  materialMapLibrary: f,
180
180
  libraryMap: u,
181
181
  libraryLocaleMap: c
182
182
  };
183
183
  }
184
- function gt(n, e) {
184
+ function _t(n, e) {
185
185
  const { name: t, parent: s, alias: r } = n;
186
186
  return s ? e[s]?.[r || t] : e[r || t];
187
187
  }
188
- function _t(n = []) {
189
- const e = n.filter((s) => W(s)), t = n.filter((s) => Q(s));
188
+ function vt(n = []) {
189
+ const e = n.filter((s) => Q(s)), t = n.filter((s) => X(s));
190
190
  return {
191
191
  css: e,
192
192
  js: t
193
193
  };
194
194
  }
195
- function vt(n, e) {
195
+ function yt(n, e) {
196
196
  const t = (c) => {
197
197
  const l = [];
198
198
  let f = 0;
@@ -202,33 +202,33 @@ function vt(n, e) {
202
202
  continue;
203
203
  }
204
204
  if (c.substring(f, f + 2) === "/*") {
205
- const _ = c.indexOf("*/", f + 2);
206
- if (_ !== -1) {
207
- f = _ + 2;
205
+ const v = c.indexOf("*/", f + 2);
206
+ if (v !== -1) {
207
+ f = v + 2;
208
208
  continue;
209
209
  }
210
210
  }
211
211
  if (c[f] === "@") {
212
- const _ = f;
212
+ const v = f;
213
213
  for (; f < c.length && c[f] !== "{" && c[f] !== ";"; )
214
214
  f++;
215
- const w = c.substring(_, f).trim(), v = w.includes("@keyframes");
215
+ const w = c.substring(v, f).trim(), b = w.includes("@keyframes");
216
216
  if (c[f] === ";")
217
217
  l.push({
218
218
  type: "simple-at-rule",
219
- content: c.substring(_, f + 1)
219
+ content: c.substring(v, f + 1)
220
220
  }), f++;
221
221
  else if (c[f] === "{") {
222
- const S = f + 1;
223
- let I = 1;
224
- for (f++; f < c.length && I > 0; )
225
- c[f] === "{" ? I++ : c[f] === "}" && I--, f++;
226
- const X = c.substring(_, f), C = c.substring(S, f - 1);
222
+ const _ = f + 1;
223
+ let C = 1;
224
+ for (f++; f < c.length && C > 0; )
225
+ c[f] === "{" ? C++ : c[f] === "}" && C--, f++;
226
+ const Y = c.substring(v, f), Z = c.substring(_, f - 1);
227
227
  l.push({
228
- type: v ? "keyframes" : "at-rule",
228
+ type: b ? "keyframes" : "at-rule",
229
229
  rule: w,
230
- content: X,
231
- inner: C
230
+ content: Y,
231
+ inner: Z
232
232
  });
233
233
  }
234
234
  continue;
@@ -306,21 +306,21 @@ function vt(n, e) {
306
306
  });
307
307
  }
308
308
  }
309
- const yt = 750;
310
- function wt(n, e, t) {
309
+ const wt = 750;
310
+ function St(n, e, t) {
311
311
  let s;
312
312
  typeof n < "u" ? s = n.innerWidth || n.document.documentElement.clientWidth : (console.warn("无法获取屏幕宽度,使用默认值375"), s = 375);
313
- const r = t || yt;
313
+ const r = t || wt;
314
314
  return e * s / r;
315
315
  }
316
- function St(n, e) {
316
+ function $t(n, e) {
317
317
  let t = !1, s = !1, r = !1, o = "";
318
318
  for (let i = 0; i < e.length; i++) {
319
319
  const a = e[i];
320
320
  if (a === "'" && !s && !r ? t = !t : a === '"' && !t && !r ? s = !s : e.substr(i, 4).toLowerCase() === "url(" && !t && !s ? r = !0 : a === ")" && r && (r = !1), !t && !s && !r) {
321
321
  const u = e.substr(i).match(/^(-?\d+(?:\.\d+)?)\s*rpx/);
322
322
  if (u) {
323
- const c = u[1], l = parseFloat(c), p = `${wt(n, l).toFixed(6).replace(/\.?0+$/, "")}px`;
323
+ const c = u[1], l = parseFloat(c), p = `${St(n, l).toFixed(6).replace(/\.?0+$/, "")}px`;
324
324
  o += p, i += u[0].length - 1;
325
325
  continue;
326
326
  }
@@ -329,11 +329,11 @@ function St(n, e) {
329
329
  }
330
330
  return o;
331
331
  }
332
- function Oe(n) {
333
- return F(n) ? n : JSON.stringify(n);
332
+ function Te(n) {
333
+ return I(n) ? n : JSON.stringify(n);
334
334
  }
335
- function me(n, e, t, s = !1) {
336
- const r = n.CSSStyleSheet, o = s ? `data-v-${e}` : e, i = n.__uniConfig ? St(n, t) : t, a = s ? vt(i, o) : i, u = !!n.__uniConfig;
335
+ function ge(n, e, t, s = !1) {
336
+ const r = n.CSSStyleSheet, o = s ? `data-v-${e}` : e, i = n.__uniConfig ? $t(n, t) : t, a = s ? yt(i, o) : i, u = !!n.__uniConfig;
337
337
  if (r.prototype.replaceSync && !u) {
338
338
  const c = new r();
339
339
  c.id = e, c.replaceSync(a);
@@ -347,7 +347,7 @@ function me(n, e, t, s = !1) {
347
347
  l ? l.innerHTML = a : (l = c.createElement("style"), l.id = e, l.innerHTML = a, c.head.appendChild(l));
348
348
  }
349
349
  }
350
- function ks(n) {
350
+ function Ms(n) {
351
351
  const e = n.adoptedStyleSheets || [];
352
352
  let t = "";
353
353
  if (e.forEach((s) => {
@@ -363,11 +363,11 @@ function ks(n) {
363
363
  s.textContent = t, n.head.appendChild(s);
364
364
  }
365
365
  }
366
- async function $t(n, e) {
366
+ async function Et(n, e) {
367
367
  const t = await window.fetch(e).then((s) => s.text()).catch(() => "");
368
- t && me(window, n, t);
368
+ t && ge(window, n, t);
369
369
  }
370
- function Me(n, e = window) {
370
+ function xe(n, e = window) {
371
371
  const t = e.document, s = e.document.head;
372
372
  for (const r of n)
373
373
  if (!t.getElementById(r)) {
@@ -375,7 +375,7 @@ function Me(n, e = window) {
375
375
  i.rel = "stylesheet", i.id = r, i.href = r, s.appendChild(i);
376
376
  }
377
377
  }
378
- async function Te(n, e, t = window) {
378
+ async function De(n, e, t = window) {
379
379
  const s = t.document, r = t.document.head;
380
380
  let o = t[e];
381
381
  return o ? o.default || o : new Promise((i, a) => {
@@ -389,14 +389,14 @@ async function Te(n, e, t = window) {
389
389
  }
390
390
  });
391
391
  }
392
- function Et(n) {
393
- return K(n) && Object.getOwnPropertyNames(n.prototype || {}).length === 0 || K(n?.install);
394
- }
395
392
  function bt(n) {
396
- return pt.includes(n);
393
+ return z(n) && Object.getOwnPropertyNames(n.prototype || {}).length === 0 || z(n?.install);
397
394
  }
398
395
  function jt(n) {
399
- return ke.includes(n);
396
+ return dt.includes(n);
397
+ }
398
+ function Rt(n) {
399
+ return Me.includes(n);
400
400
  }
401
401
  function N(n = window) {
402
402
  const e = window?.Mock;
@@ -405,7 +405,7 @@ function N(n = window) {
405
405
  if (t && window)
406
406
  return window.Mock = t, t;
407
407
  }
408
- function Os(n, e, t) {
408
+ function Ts(n, e, t) {
409
409
  Object.assign(e.meta, t.meta);
410
410
  const s = n?._container;
411
411
  t?.type === "page" && s.classList.add("is-page"), t?.pure && s.classList.add("is-pure");
@@ -437,19 +437,19 @@ function R(n, e, t = !1, s = !1, r = !1) {
437
437
  throw new Error(`"${n.value}" not a function`);
438
438
  return o;
439
439
  }
440
- function b(n) {
440
+ function E(n) {
441
441
  return n && n.type === "JSExpression";
442
442
  }
443
- function E(n) {
443
+ function $(n) {
444
444
  return typeof n == "object" && n && n.type === "JSFunction";
445
445
  }
446
- function Rt(n) {
447
- return b(n) || E(n);
446
+ function Ct(n) {
447
+ return E(n) || $(n);
448
448
  }
449
- function Ms(n) {
450
- return Rt(n) ? n.value : JSON.stringify(n);
449
+ function xs(n) {
450
+ return Ct(n) ? n.value : JSON.stringify(n);
451
451
  }
452
- const Ct = {
452
+ const Pt = {
453
453
  session: !1,
454
454
  authKey: "Authorization",
455
455
  storageKey: "ACCESS_STORAGE",
@@ -462,15 +462,15 @@ const Ct = {
462
462
  noPermissionMessage: "无权限访问该页面",
463
463
  appName: "",
464
464
  statusKey: "code"
465
- }, xe = Symbol("access");
466
- class ge {
465
+ }, ke = Symbol("access");
466
+ class _e {
467
467
  options;
468
468
  data = null;
469
469
  mode = y.Raw;
470
470
  interceptResponse = !0;
471
471
  isTipShowing = !1;
472
472
  constructor(e) {
473
- this.options = Object.assign({}, Ct, e), this.loadData();
473
+ this.options = Object.assign({}, Pt, e), this.loadData();
474
474
  }
475
475
  enableIntercept() {
476
476
  this.interceptResponse = !0;
@@ -484,17 +484,17 @@ class ge {
484
484
  }
485
485
  login(e) {
486
486
  const { storageKey: t, storagePrefix: s, session: r, authKey: o } = this.options;
487
- this.setData(e), this.data && (te.save(t, e, {
487
+ this.setData(e), this.data && (se.save(t, e, {
488
488
  type: "local",
489
489
  prefix: s
490
- }), r && se.set(o, this.data.token));
490
+ }), r && ne.set(o, this.data.token));
491
491
  }
492
492
  clear() {
493
493
  const { storageKey: e, storagePrefix: t, session: s, authKey: r } = this.options;
494
- this.data = null, te.remove(e, {
494
+ this.data = null, se.remove(e, {
495
495
  type: "local",
496
496
  prefix: t
497
- }), s && se.remove(r);
497
+ }), s && ne.remove(r);
498
498
  }
499
499
  logout() {
500
500
  this.clear(), this.toLogin();
@@ -507,14 +507,14 @@ class ge {
507
507
  }
508
508
  can(e) {
509
509
  const { appName: t } = this.options, { permissions: s = {} } = this.data || {};
510
- return typeof e == "function" ? e(s) : we(e).every((o) => s[o] || s[t + "." + o]);
510
+ return typeof e == "function" ? e(s) : Se(e).every((o) => s[o] || s[t + "." + o]);
511
511
  }
512
512
  some(e) {
513
513
  const { appName: t } = this.options, { permissions: s = {} } = this.data || {};
514
- return we(e).some((o) => s[o] || s[t + "." + o]);
514
+ return Se(e).some((o) => s[o] || s[t + "." + o]);
515
515
  }
516
516
  install(e) {
517
- e.config.globalProperties.$access = this, e.provide(xe, this);
517
+ e.config.globalProperties.$access = this, e.provide(ke, this);
518
518
  }
519
519
  isAuthPath(e) {
520
520
  const { auth: t, isAuth: s } = this.options;
@@ -535,7 +535,7 @@ class ge {
535
535
  setData(e) {
536
536
  const { privateKey: t } = this.options;
537
537
  if (Array.isArray(e) && t) {
538
- const s = e.map((r) => Se(r, t));
538
+ const s = e.map((r) => $e(r, t));
539
539
  try {
540
540
  this.data = JSON.parse(s.join(""));
541
541
  } catch (r) {
@@ -545,7 +545,7 @@ class ge {
545
545
  }
546
546
  if (typeof e == "string")
547
547
  try {
548
- const s = t ? Se(e, t) : e;
548
+ const s = t ? $e(e, t) : e;
549
549
  s ? this.data = JSON.parse(s) : console.warn("RSA解密失败或登录信息缺失");
550
550
  } catch (s) {
551
551
  console.warn(s);
@@ -554,7 +554,7 @@ class ge {
554
554
  this.data = e;
555
555
  }
556
556
  loadData() {
557
- const { storageKey: e, storagePrefix: t } = this.options, s = te.get(e, {
557
+ const { storageKey: e, storagePrefix: t } = this.options, s = se.get(e, {
558
558
  type: "local",
559
559
  prefix: t
560
560
  });
@@ -562,7 +562,7 @@ class ge {
562
562
  }
563
563
  isLogined() {
564
564
  const { session: e, authKey: t } = this.options;
565
- return e && t ? !!se.get(t) : !!this.getToken();
565
+ return e && t ? !!ne.get(t) : !!this.getToken();
566
566
  }
567
567
  hasRoutePermission(e) {
568
568
  if (e.name === H) {
@@ -582,10 +582,10 @@ class ge {
582
582
  return t();
583
583
  {
584
584
  const { noPermissionMessage: s = "无权限访问", unauthorized: r = !1 } = this.options;
585
- return await this.showTip(s), K(r) ? (r(), t(!1)) : F(r) ? t(r) : t(!1);
585
+ return await this.showTip(s), z(r) ? (r(), t(!1)) : I(r) ? t(r) : t(!1);
586
586
  }
587
587
  }
588
- t(!1), await z(0), this.toLogin();
588
+ t(!1), await G(0), this.toLogin();
589
589
  }
590
590
  isWhiteList(e) {
591
591
  const { whiteList: t } = this.options;
@@ -601,7 +601,7 @@ class ge {
601
601
  }
602
602
  async showTip(e) {
603
603
  const { alert: t } = this.options;
604
- return this.isTipShowing ? !1 : t ? (this.isTipShowing = !0, await z(150), await t(e, {
604
+ return this.isTipShowing ? !1 : t ? (this.isTipShowing = !0, await G(150), await t(e, {
605
605
  title: "提示",
606
606
  type: "warning"
607
607
  })?.catch(() => !0)?.finally(() => {
@@ -619,10 +619,10 @@ class ge {
619
619
  );
620
620
  }
621
621
  }
622
- function Pt() {
623
- return Ae(xe, null);
622
+ function At() {
623
+ return Ie(ke, null);
624
624
  }
625
- function Ts(n = {}) {
625
+ function Ds(n = {}) {
626
626
  const {
627
627
  notify: e,
628
628
  loading: t,
@@ -634,7 +634,7 @@ function Ts(n = {}) {
634
634
  } = n;
635
635
  let u = null;
636
636
  return {
637
- request: Ce({
637
+ request: Pe({
638
638
  settings: {
639
639
  type: "form",
640
640
  validSuccess: !0,
@@ -654,19 +654,19 @@ function Ts(n = {}) {
654
654
  ...s
655
655
  }
656
656
  }),
657
- jsonp: Pe,
657
+ jsonp: Ae,
658
658
  notify: e,
659
659
  loading: t,
660
660
  useTitle: i,
661
661
  alert: a,
662
662
  startupComponent: r,
663
- access: o ? new ge({ alert: a, ...o }) : void 0
663
+ access: o ? new _e({ alert: a, ...o }) : void 0
664
664
  };
665
665
  }
666
- function xs(n = {}) {
667
- return new ge(n);
666
+ function ks(n = {}) {
667
+ return new _e(n);
668
668
  }
669
- function At(n, e) {
669
+ function It(n, e) {
670
670
  const { jsonp: t, request: s } = e;
671
671
  if (n.method === "jsonp")
672
672
  return (r = {}) => t(n.url, {
@@ -682,10 +682,10 @@ function At(n, e) {
682
682
  headers: r
683
683
  }
684
684
  };
685
- return (i, a) => (delete o.data, s.send(Ze(o, a || {}, { data: i })));
685
+ return (i, a) => (delete o.data, s.send(et(o, a || {}, { data: i })));
686
686
  }
687
687
  }
688
- function It(n, e) {
688
+ function Ft(n, e) {
689
689
  const { metaQuery: t } = e;
690
690
  if (!t) return;
691
691
  const { code: s, queryCode: r } = n;
@@ -697,22 +697,22 @@ function It(n, e) {
697
697
  return t(s, r, o, i);
698
698
  };
699
699
  }
700
- function Ft(n = [], e = [], t) {
700
+ function Ot(n = [], e = [], t) {
701
701
  const s = {};
702
702
  for (const r of n) {
703
- const o = At(r, t);
703
+ const o = It(r, t);
704
704
  s[r.id] = o, s[r.name] = o;
705
705
  }
706
706
  for (const r of e)
707
- s[r.id] = It(r, t);
707
+ s[r.id] = Ft(r, t);
708
708
  return s;
709
709
  }
710
- async function kt(n = [], e = window) {
710
+ async function Mt(n = [], e = window) {
711
711
  const t = N(e);
712
- t && (De(e), n.forEach((s) => Mt(t, s)));
712
+ t && (He(e), n.forEach((s) => xt(t, s)));
713
713
  }
714
- function Ot(n, e = window) {
715
- const t = E(n.mockTemplate) && n.mockTemplate.value ? R(n.mockTemplate, {}, !0) : void 0, s = N(e);
714
+ function Tt(n, e = window) {
715
+ const t = $(n.mockTemplate) && n.mockTemplate.value ? R(n.mockTemplate, {}, !0) : void 0, s = N(e);
716
716
  return async (...r) => {
717
717
  let o = {};
718
718
  if (t)
@@ -724,14 +724,14 @@ function Ot(n, e = window) {
724
724
  return s?.mock(o);
725
725
  };
726
726
  }
727
- function Mt(n, e) {
727
+ function xt(n, e) {
728
728
  if (!e.mock) return;
729
729
  const { url: t, mockTemplate: s } = e;
730
730
  if (t && s)
731
731
  try {
732
- const r = ie(t) ? new URL(t).pathname : t, o = et(`(.*)${r}(.*)`), i = tt(r, { decode: decodeURIComponent }), a = B(s, {}, !0);
732
+ const r = ae(t) ? new URL(t).pathname : t, o = tt(`(.*)${r}(.*)`), i = st(r, { decode: decodeURIComponent }), a = B(s, {}, !0);
733
733
  n.mock(o, (u) => {
734
- const c = O.parse(u.url) || {}, l = u.body instanceof FormData ? st(u.body) : u.body, f = ie(u.url) ? new URL(u.url).pathname : u.url.split("?")[0], p = i(f)?.params;
734
+ const c = O.parse(u.url) || {}, l = u.body instanceof FormData ? nt(u.body) : u.body, f = ae(u.url) ? new URL(u.url).pathname : u.url.split("?")[0], p = i(f)?.params;
735
735
  Object.assign(u, { data: l, params: p, query: c });
736
736
  try {
737
737
  return n.mock(a(u));
@@ -743,11 +743,11 @@ function Mt(n, e) {
743
743
  console.warn("mockApi", r);
744
744
  }
745
745
  }
746
- function De(n = window) {
746
+ function He(n = window) {
747
747
  const e = N(n);
748
748
  e && (e._mocked = {});
749
749
  }
750
- class Tt {
750
+ class Dt {
751
751
  __id = null;
752
752
  __mode;
753
753
  __instance = null;
@@ -778,7 +778,7 @@ class Tt {
778
778
  const { mode: t, dsl: s, attrs: r } = e;
779
779
  this.__mode = t, s && (this.__id = s.id || null, this.__transform = s.transform || {}), r && Object.assign(this, r);
780
780
  }
781
- setup(e, t = V) {
781
+ setup(e, t = W) {
782
782
  const s = t.getCurrentInstance();
783
783
  if (!s) return;
784
784
  this.__refs = {}, this.__refCaches = {}, this.$refs = {}, this.context = {}, this.__contextRefs = {}, this.__instance = s.proxy;
@@ -792,12 +792,12 @@ class Tt {
792
792
  });
793
793
  }
794
794
  __proxy() {
795
- this.__instance && je.forEach((e) => {
795
+ this.__instance && Re.forEach((e) => {
796
796
  this[e] = this.__instance?.[e];
797
797
  });
798
798
  }
799
799
  __cleanup() {
800
- je.forEach((e) => {
800
+ Re.forEach((e) => {
801
801
  this[e] = null;
802
802
  }), this.__reset();
803
803
  }
@@ -826,7 +826,7 @@ class Tt {
826
826
  e && e !== this.__id && (this.__contextRefs[e] = this);
827
827
  let s = e ? this.__refCaches[e] : null;
828
828
  return s || (s = async (r) => {
829
- await z(0);
829
+ await G(0);
830
830
  let o = r?.$vtjEl || r?.$el || r?._?.vnode?.el || r;
831
831
  if (!o) {
832
832
  typeof t == "string" && (delete this.$refs[t], e && delete this.__refs[e]);
@@ -851,9 +851,9 @@ class Tt {
851
851
  return s.context.__proto__ = this.context, s.__proto__ = this, s;
852
852
  }
853
853
  }
854
- function ue(n) {
854
+ function fe(n) {
855
855
  const {
856
- Vue: e = V,
856
+ Vue: e = W,
857
857
  mode: t = y.Runtime,
858
858
  components: s = {},
859
859
  libs: r = {},
@@ -863,7 +863,7 @@ function ue(n) {
863
863
  $components: s,
864
864
  $libs: r,
865
865
  $apis: o
866
- }, c = new Tt({
866
+ }, c = new Dt({
867
867
  mode: t,
868
868
  dsl: a.value,
869
869
  attrs: u
@@ -871,18 +871,18 @@ function ue(n) {
871
871
  name: a.value.name,
872
872
  __scopeId: a.value.id ? `data-v-${a.value.id}` : void 0,
873
873
  props: {
874
- ...Dt(a.value.props ?? [], c)
874
+ ...Ht(a.value.props ?? [], c)
875
875
  },
876
876
  async setup(f) {
877
- c.$props = f, c.props = f, a.value.id && me(
877
+ c.$props = f, c.props = f, a.value.id && ge(
878
878
  n.window || window,
879
879
  a.value.id,
880
880
  a.value.css || "",
881
881
  !0
882
- ), c.state = Ht(e, a.value.state ?? {}, c);
883
- const p = Nt(e, a.value.computed ?? {}, c), d = Bt(a.value.methods ?? {}, c), m = Lt(e, a.value.inject, c);
884
- for (const [_, w] of Object.entries(m || {}))
885
- m[_] = e.inject(_, w);
882
+ ), c.state = Nt(e, a.value.state ?? {}, c);
883
+ const p = Bt(e, a.value.computed ?? {}, c), d = Lt(a.value.methods ?? {}, c), m = qt(e, a.value.inject, c);
884
+ for (const [v, w] of Object.entries(m || {}))
885
+ m[v] = e.inject(v, w);
886
886
  const h = Ut(
887
887
  a.value.dataSources || {},
888
888
  c
@@ -892,14 +892,14 @@ function ue(n) {
892
892
  ...d,
893
893
  ...h
894
894
  };
895
- return c.setup(g, e), qt(e, a.value.watch ?? [], c), {
895
+ return c.setup(g, e), Jt(e, a.value.watch ?? [], c), {
896
896
  vtj: c,
897
897
  state: c.state,
898
898
  ...p,
899
899
  ...d
900
900
  };
901
901
  },
902
- emits: xt(a.value.emits),
902
+ emits: kt(a.value.emits),
903
903
  expose: ["vtj", ...a.value.expose || []],
904
904
  render() {
905
905
  if (!a.value.nodes) return null;
@@ -913,25 +913,25 @@ function ue(n) {
913
913
  return e.createVNode("div", {}, p);
914
914
  }
915
915
  },
916
- ...Jt(a.value.lifeCycles ?? {}, c)
916
+ ...Kt(a.value.lifeCycles ?? {}, c)
917
917
  });
918
918
  return {
919
919
  renderer: e.markRaw(l),
920
920
  context: c
921
921
  };
922
922
  }
923
- function xt(n = []) {
924
- return n.map((e) => F(e) ? e : e.name);
923
+ function kt(n = []) {
924
+ return n.map((e) => I(e) ? e : e.name);
925
925
  }
926
- function Dt(n = [], e) {
927
- const t = (s) => s ? (Array.isArray(s) ? s : [s]).map((o) => ft[o]) : void 0;
928
- return n.map((s) => F(s) ? {
926
+ function Ht(n = [], e) {
927
+ const t = (s) => s ? (Array.isArray(s) ? s : [s]).map((o) => pt[o]) : void 0;
928
+ return n.map((s) => I(s) ? {
929
929
  name: s
930
930
  } : {
931
931
  name: s.name,
932
932
  type: s.type,
933
933
  required: s.required,
934
- default: b(s.default) ? e.__parseExpression(s.default) : s.default
934
+ default: E(s.default) ? e.__parseExpression(s.default) : s.default
935
935
  }).reduce(
936
936
  (s, r) => (s[r.name] = {
937
937
  type: t(r.type),
@@ -941,35 +941,35 @@ function Dt(n = [], e) {
941
941
  {}
942
942
  );
943
943
  }
944
- function Ht(n, e, t) {
944
+ function Nt(n, e, t) {
945
945
  return n.reactive(
946
946
  Object.keys(e || {}).reduce(
947
947
  (s, r) => {
948
948
  let o = e[r];
949
- return b(o) ? o = t.__parseExpression(o) : E(o) && (o = t.__parseFunction(o)), s[r] = o, s;
949
+ return E(o) ? o = t.__parseExpression(o) : $(o) && (o = t.__parseFunction(o)), s[r] = o, s;
950
950
  },
951
951
  {}
952
952
  )
953
953
  );
954
954
  }
955
- function Nt(n, e, t) {
955
+ function Bt(n, e, t) {
956
956
  return Object.entries(e ?? {}).reduce(
957
957
  (s, [r, o]) => (s[r] = n.computed(t.__parseFunction(o)), s),
958
958
  {}
959
959
  );
960
960
  }
961
- function Bt(n, e) {
961
+ function Lt(n, e) {
962
962
  return Object.entries(n ?? {}).reduce(
963
963
  (t, [s, r]) => (t[s] = e.__parseFunction(r), t),
964
964
  {}
965
965
  );
966
966
  }
967
- function Lt(n, e = [], t) {
967
+ function qt(n, e = [], t) {
968
968
  return e.reduce(
969
969
  (s, r) => {
970
970
  const { name: o, from: i } = r || {};
971
971
  r.default;
972
- const a = b(i) ? t.__parseExpression(i) || o : i ?? o, u = b(r.default) ? t.__parseExpression(r.default) : r.default ?? null;
972
+ const a = E(i) ? t.__parseExpression(i) || o : i ?? o, u = E(r.default) ? t.__parseExpression(r.default) : r.default ?? null;
973
973
  return s[o] = n.inject(a, u), s;
974
974
  },
975
975
  {}
@@ -980,9 +980,9 @@ function Ut(n, e) {
980
980
  (t, s) => {
981
981
  const r = n[s];
982
982
  if (r.type === "mock")
983
- t[s] = Ot(r);
983
+ t[s] = Tt(r);
984
984
  else if (r.ref) {
985
- const o = e.$apis[r.ref], i = E(r.transform) ? r.transform.value ? e.__parseFunction(r.transform) : void 0 : r.transform;
985
+ const o = e.$apis[r.ref], i = $(r.transform) ? r.transform.value ? e.__parseFunction(r.transform) : void 0 : r.transform;
986
986
  t[s] = async (...a) => {
987
987
  const u = await o.apply(e, a);
988
988
  return i ? i(u) : u;
@@ -993,7 +993,7 @@ function Ut(n, e) {
993
993
  {}
994
994
  );
995
995
  }
996
- function qt(n, e = [], t) {
996
+ function Jt(n, e = [], t) {
997
997
  e.forEach((s) => {
998
998
  n.watch(
999
999
  t.__parseExpression(s.source),
@@ -1005,18 +1005,18 @@ function qt(n, e = [], t) {
1005
1005
  );
1006
1006
  });
1007
1007
  }
1008
- function Jt(n, e) {
1008
+ function Kt(n, e) {
1009
1009
  return Object.entries(n ?? {}).reduce(
1010
1010
  (t, [s, r]) => {
1011
1011
  const o = e.__parseFunction(r);
1012
1012
  return t[s] = async () => {
1013
- K(o) && (await z(0), await o());
1013
+ z(o) && (await G(0), await o());
1014
1014
  }, t;
1015
1015
  },
1016
1016
  {}
1017
1017
  );
1018
1018
  }
1019
- class Kt {
1019
+ class zt {
1020
1020
  __props = {};
1021
1021
  __events = {};
1022
1022
  __nodes = {};
@@ -1028,72 +1028,84 @@ class Kt {
1028
1028
  getProps(e) {
1029
1029
  return this.__props[e];
1030
1030
  }
1031
+ loadProps(e, t) {
1032
+ const s = e ? this.getProps(e) : null;
1033
+ return s || (e && this.setProps(e, t), t);
1034
+ }
1031
1035
  setEvents(e, t) {
1032
1036
  }
1033
1037
  getEvents(e) {
1034
1038
  return this.__events[e];
1035
1039
  }
1040
+ loadEvents(e, t) {
1041
+ const s = e ? this.getEvents(e) : null;
1042
+ return s || (e && this.setEvents(e, t), t);
1043
+ }
1036
1044
  setNode(e, t) {
1037
1045
  this.__nodes[e] = t;
1038
1046
  }
1039
1047
  getNode(e) {
1040
1048
  return this.__nodes[e];
1041
1049
  }
1050
+ loadNode(e, t) {
1051
+ const s = e ? this.getNode(e) : null;
1052
+ return s || (e && this.setNode(e, t), t);
1053
+ }
1042
1054
  isEqual(e, t) {
1043
- return nt(e, t);
1055
+ return rt(e, t);
1044
1056
  }
1045
1057
  clear() {
1046
1058
  this.__props = {}, this.__events = {}, this.__nodes = {};
1047
1059
  }
1048
1060
  }
1049
- const A = new Kt(), He = new rt();
1050
- let ne = [], k = {}, x = {};
1051
- const zt = (n, e) => e;
1052
- async function Ne(n, e = window) {
1053
- const { urls: t = [], library: s } = n, r = t.filter((a) => Q(a));
1061
+ const x = new zt(), Ne = new ot();
1062
+ let re = [], F = {}, D = {};
1063
+ const Gt = (n, e) => e;
1064
+ async function Be(n, e = window) {
1065
+ const { urls: t = [], library: s } = n, r = t.filter((a) => X(a));
1054
1066
  if (r.length === 0 || !s) return null;
1055
- const o = t.filter((a) => W(a));
1056
- return o.length && Me(o, e), await Te(r, s, e).catch(
1067
+ const o = t.filter((a) => Q(a));
1068
+ return o.length && xe(o, e), await De(r, s, e).catch(
1057
1069
  (a) => (console.warn("loadScriptUrl error", r, s, a), null)
1058
1070
  );
1059
1071
  }
1060
- function fe(n) {
1072
+ function pe(n) {
1061
1073
  const { getDsl: e, getDslByUrl: t, options: s } = n;
1062
- return s.window && (ne.forEach((r) => {
1074
+ return s.window && (re.forEach((r) => {
1063
1075
  delete s.window[r];
1064
- }), ne = []), (r, o, i, a = V) => {
1076
+ }), re = []), (r, o, i, a = W) => {
1065
1077
  if (!i || typeof i == "string") return o;
1066
1078
  let u = "";
1067
1079
  if (i.type === "Schema" && i.id)
1068
- return u = i.id + "_" + r, x[u] || (x[u] = a.defineAsyncComponent(async () => {
1069
- const c = k[i.id] || await He.add(
1080
+ return u = i.id + "_" + r, D[u] || (D[u] = a.defineAsyncComponent(async () => {
1081
+ const c = F[i.id] || await Ne.add(
1070
1082
  i.id,
1071
1083
  () => e(i.id)
1072
1084
  );
1073
- return c && (c.name = o, k[i.id] = c), c ? ue({
1085
+ return c && (c.name = o, F[i.id] = c), c ? fe({
1074
1086
  Vue: a,
1075
1087
  mode: y.Runtime,
1076
1088
  ...s,
1077
- dsl: $e(c),
1078
- loader: fe(n)
1089
+ dsl: Ee(c),
1090
+ loader: pe(n)
1079
1091
  }).renderer : null;
1080
1092
  }));
1081
1093
  if (i.type === "UrlSchema" && i.url)
1082
- return u = i.url + "_" + r, x[u] || (x[u] = a.defineAsyncComponent(async () => {
1083
- const c = k[i.url] || await t(i.url);
1084
- return c && (c.name = o, k[i.url] = c), c ? ue({
1094
+ return u = i.url + "_" + r, D[u] || (D[u] = a.defineAsyncComponent(async () => {
1095
+ const c = F[i.url] || await t(i.url);
1096
+ return c && (c.name = o, F[i.url] = c), c ? fe({
1085
1097
  ...s,
1086
1098
  Vue: a,
1087
- dsl: $e(c),
1099
+ dsl: Ee(c),
1088
1100
  mode: y.Runtime,
1089
- loader: fe(n)
1101
+ loader: pe(n)
1090
1102
  }).renderer : null;
1091
1103
  }));
1092
1104
  if (i.type === "Plugin") {
1093
- let c = i.library ? k[i.library] : null;
1094
- return c || (i.library && ne.push(i.library), c = k[i.library || Symbol()] = a.defineAsyncComponent(
1105
+ let c = i.library ? F[i.library] : null;
1106
+ return c || (i.library && re.push(i.library), c = F[i.library || Symbol()] = a.defineAsyncComponent(
1095
1107
  async () => {
1096
- const l = await Ne(i, s.window);
1108
+ const l = await Be(i, s.window);
1097
1109
  return l || (console.warn("getPlugin result is null", i), null);
1098
1110
  }
1099
1111
  ), c);
@@ -1101,62 +1113,62 @@ function fe(n) {
1101
1113
  return o;
1102
1114
  };
1103
1115
  }
1104
- function Ds() {
1105
- k = {}, x = {}, He.clearAllCache(), A.clear();
1116
+ function Hs() {
1117
+ F = {}, D = {}, Ne.clearAllCache(), x.clear();
1106
1118
  }
1107
- function T(n, e, t = V, s = zt, r = [], o = !1) {
1119
+ function T(n, e, t = W, s = Gt, r = [], o = !1, i = 0) {
1108
1120
  if (!n || !n.name || n.invisible) return null;
1109
- const i = t.getCurrentInstance()?.appContext, { id: a = null, directives: u = [] } = n, { vIf: c, vElseIf: l, vElse: f, vFor: p, vShow: d, vModels: m, vBind: h, vHtml: g, others: _ } = Be(u);
1110
- if (!o && (l || f))
1121
+ const a = t.getCurrentInstance()?.appContext, { id: u = null, directives: c = [] } = n, { vIf: l, vElseIf: f, vElse: p, vFor: d, vShow: m, vModels: h, vBind: g, vHtml: v, others: w } = Le(c);
1122
+ if (!o && (f || p))
1111
1123
  return null;
1112
- if (c && !Vt(c, e))
1113
- return Zt(n, e, t, s, r);
1114
- const w = (v, S = 0) => {
1115
- const I = v.$components, X = (() => {
1124
+ if (l && !Wt(l, e))
1125
+ return es(n, e, t, s, r);
1126
+ const b = (_, C = 0) => {
1127
+ const Y = _.$components, Z = (() => {
1116
1128
  if (n.name === "component")
1117
- return Wt(v, n.props?.is);
1129
+ return Qt(_, n.props?.is);
1118
1130
  if (n.name === "slot") return n.name;
1119
- const j = s(`${n.id}_${S}`, n.name, n.from, t);
1120
- return F(j) ? bt(j) || jt(j) ? j : I[j] ?? i?.app?.component(j) ?? j : j;
1121
- })(), C = Qt(a, n.props ?? {}, v), ze = Yt(
1131
+ const j = s(`${n.id}_${C}`, n.name, n.from, t);
1132
+ return I(j) ? jt(j) || Rt(j) ? j : Y[j] ?? a?.app?.component(j) ?? j : j;
1133
+ })(), A = Xt(u, n.props ?? {}, _), Ge = Zt(
1122
1134
  t,
1123
1135
  n.id,
1124
1136
  n.events ?? {},
1125
- v
1137
+ _
1126
1138
  );
1127
1139
  if (n.name === "slot")
1128
- return es(t, n, C, v, s);
1129
- h && Object.assign(C, v.__parseExpression(h.value)), d && (C.style = Object.assign(
1130
- C.style ?? {},
1131
- ss(d, v)
1132
- )), g && Object.assign(C, ns(g, v)), m.forEach((j) => {
1133
- ke.includes(n.name) ? Object.assign(C, rs(j, v)) : Object.assign(C, os(t, j, v));
1140
+ return ts(t, n, A, _, s);
1141
+ g && Object.assign(A, _.__parseExpression(g.value)), m && (A.style = Object.assign(
1142
+ A.style ?? {},
1143
+ ns(m, _)
1144
+ )), v && Object.assign(A, rs(v, _)), h.forEach((j) => {
1145
+ Me.includes(n.name) ? Object.assign(A, os(j, _)) : Object.assign(A, is(t, j, _));
1134
1146
  });
1135
- const Ge = is(
1147
+ const Ve = as(
1136
1148
  t,
1137
1149
  n.children ?? [],
1138
- v,
1150
+ _,
1139
1151
  s,
1140
1152
  n
1141
- ), ve = v?.__id ? `data-v-${v.__id}` : void 0, Ve = ve ? { [ve]: "" } : {}, We = v.__mode === y.Design ? { "data-vtj": a } : {}, Y = `${a}_${S}`, Z = {
1142
- key: `${a}_${S}`,
1143
- ...Ve,
1153
+ ), ye = _?.__id ? `data-v-${_.__id}` : void 0, We = ye ? { [ye]: "" } : {}, Qe = _.__mode === y.Design ? { "data-vtj": u } : {}, L = `${u}_${C}`, ee = {
1154
+ key: L,
1144
1155
  ...We,
1145
- ...C,
1146
- ...ze
1156
+ ...Qe,
1157
+ ...A,
1158
+ ...Ge
1147
1159
  };
1148
- A.isEqual(Z, A.getNode(Y)) || A.setNode(Y, Z);
1149
- let ee = t.createVNode(
1150
- X,
1151
- A.getNode(Y) || Z || {},
1152
- Ge
1160
+ x.isEqual(ee, x.getNode(L)) || x.setNode(L, ee);
1161
+ let te = t.createVNode(
1162
+ Z,
1163
+ x.getNode(L) || ee || {},
1164
+ Ve
1153
1165
  );
1154
- const ye = i ? Gt(i, _, v) : [];
1155
- return ye.length && (ee = t.withDirectives(ee, ye)), ee;
1166
+ const we = a ? Vt(a, w, _) : [];
1167
+ return we.length && (te = t.withDirectives(te, we)), te;
1156
1168
  };
1157
- return p ? ls(p, w, e) : w(e);
1169
+ return d ? us(d, b, e) : b(e, i);
1158
1170
  }
1159
- function Gt(n, e, t) {
1171
+ function Vt(n, e, t) {
1160
1172
  const s = n.app;
1161
1173
  return e.map((r) => {
1162
1174
  const o = typeof r.name == "string" ? s.directive(r.name) : t.__parseExpression(r.name);
@@ -1165,13 +1177,13 @@ function Gt(n, e, t) {
1165
1177
  return r.value && i.push(t.__parseExpression(r.value)), r.arg && i.push(r.arg), r.modifiers && i.push(r.modifiers), i;
1166
1178
  }).filter((r) => !!r);
1167
1179
  }
1168
- function Be(n = []) {
1180
+ function Le(n = []) {
1169
1181
  const e = n.find((l) => P(l.name) === "vIf"), t = n.find(
1170
1182
  (l) => P(l.name) === "vElseIf"
1171
1183
  ), s = n.find((l) => P(l.name) === "vElse"), r = n.find((l) => P(l.name) === "vFor"), o = n.find((l) => P(l.name) === "vShow"), i = n.find((l) => P(l.name) === "vBind"), a = n.find((l) => P(l.name) === "vHtml"), u = n.filter(
1172
1184
  (l) => P(l.name) === "vModel"
1173
1185
  ), c = n.filter(
1174
- (l) => !ut.includes(P(l.name))
1186
+ (l) => !ft.includes(P(l.name))
1175
1187
  );
1176
1188
  return {
1177
1189
  vIf: e,
@@ -1185,57 +1197,51 @@ function Be(n = []) {
1185
1197
  vHtml: a
1186
1198
  };
1187
1199
  }
1188
- function Vt(n, e) {
1200
+ function Wt(n, e) {
1189
1201
  return !!e.__parseExpression(n.value);
1190
1202
  }
1191
- function Wt(n, e) {
1192
- return e ? b(e) ? n.__parseExpression(e) : e : "div";
1203
+ function Qt(n, e) {
1204
+ return e ? E(e) ? n.__parseExpression(e) : e : "div";
1193
1205
  }
1194
- function Qt(n, e, t) {
1195
- const s = n ? A.getProps(n) : null;
1196
- if (s)
1197
- return s;
1198
- const r = pe(e, t);
1199
- return r.ref = t.__ref(n, r.ref), n && A.setProps(n, r), r;
1206
+ function Xt(n, e, t) {
1207
+ const s = de(e, t);
1208
+ return s.ref = t.__ref(n, s.ref), s;
1200
1209
  }
1201
- function pe(n, e) {
1202
- return b(n) ? e.__parseExpression(n) : E(n) ? e.__parseFunction(n) : Array.isArray(n) ? n.map((t) => pe(t, e)) : typeof n == "object" ? Object.keys(n || {}).reduce(
1210
+ function de(n, e) {
1211
+ return E(n) ? e.__parseExpression(n) : $(n) ? e.__parseFunction(n) : Array.isArray(n) ? n.map((t) => de(t, e)) : typeof n == "object" ? Object.keys(n || {}).reduce(
1203
1212
  (t, s) => {
1204
1213
  let r = n[s];
1205
- return t[s] = pe(r, e), t;
1214
+ return t[s] = de(r, e), t;
1206
1215
  },
1207
1216
  {}
1208
1217
  ) : n;
1209
1218
  }
1210
- function Xt(n, e) {
1219
+ function Yt(n, e) {
1211
1220
  return (t) => {
1212
1221
  t?.key?.toLowerCase() === e.toLowerCase() && n(t);
1213
1222
  };
1214
1223
  }
1215
- function Yt(n, e, t, s) {
1216
- const r = e ? A.getEvents(e) : null;
1217
- if (r)
1218
- return r;
1219
- const o = ["passive", "capture", "once"], i = {
1224
+ function Zt(n, e, t, s) {
1225
+ const r = ["passive", "capture", "once"], o = {
1220
1226
  capture: "Capture",
1221
1227
  once: "Once",
1222
1228
  passive: "OnceCapture"
1223
- }, a = Object.keys(t || {}).reduce(
1224
- (u, c) => {
1225
- const l = t[c], f = Le(l.modifiers), p = f.find((h) => o.includes(h)), d = "on" + ot(c) + (p && i[p] || ""), m = s.__parseFunction(l.handler);
1226
- return m && (u[d] = n.withModifiers(
1227
- f.includes("enter") ? Xt(m, "enter") : m,
1228
- f
1229
- )), u;
1229
+ };
1230
+ return Object.keys(t || {}).reduce(
1231
+ (a, u) => {
1232
+ const c = t[u], l = qe(c.modifiers), f = l.find((m) => r.includes(m)), p = "on" + it(u) + (f && o[f] || ""), d = s.__parseFunction(c.handler);
1233
+ return d && (a[p] = n.withModifiers(
1234
+ l.includes("enter") ? Yt(d, "enter") : d,
1235
+ l
1236
+ )), a;
1230
1237
  },
1231
1238
  {}
1232
1239
  );
1233
- return e && A.setEvents(e, a), a;
1234
1240
  }
1235
- function Zt(n, e, t, s, r = []) {
1241
+ function es(n, e, t, s, r = []) {
1236
1242
  let o = r.findIndex((i) => i.id === n.id);
1237
1243
  for (let i = ++o; i < r.length; i++) {
1238
- const { directives: a = [] } = r[i], { vElseIf: u, vElse: c } = Be(a);
1244
+ const { directives: a = [] } = r[i], { vElseIf: u, vElse: c } = Le(a);
1239
1245
  if (u) {
1240
1246
  if (e.__parseExpression(u.value))
1241
1247
  return T(r[i], e, t, s, r, !0);
@@ -1246,36 +1252,36 @@ function Zt(n, e, t, s, r = []) {
1246
1252
  }
1247
1253
  return null;
1248
1254
  }
1249
- function Le(n = {}, e = !1) {
1255
+ function qe(n = {}, e = !1) {
1250
1256
  const t = Object.keys(n);
1251
1257
  return e ? t.map((s) => "." + s) : t;
1252
1258
  }
1253
- function es(n, e, t, s, r) {
1254
- const { children: o } = e, i = ts(e, s), a = s.$slots?.[i.name];
1255
- return a ? a(t) : o ? F(o) ? n.createTextVNode(o) : b(o) ? n.createTextVNode(
1256
- Oe(s.__parseExpression(o))
1259
+ function ts(n, e, t, s, r) {
1260
+ const { children: o } = e, i = ss(e, s), a = s.$slots?.[i.name];
1261
+ return a ? a(t) : o ? I(o) ? n.createTextVNode(o) : E(o) ? n.createTextVNode(
1262
+ Te(s.__parseExpression(o))
1257
1263
  ) : Array.isArray(o) ? o.map(
1258
- (u) => T(u, s, n, r, o)
1264
+ (u, c) => T(u, s, n, r, o, !1, c)
1259
1265
  ) : null : null;
1260
1266
  }
1261
- function ts(n, e) {
1267
+ function ss(n, e) {
1262
1268
  const { props: t } = n, s = t?.name || "default";
1263
1269
  return {
1264
- name: b(s) ? e.__parseExpression(s) : s,
1270
+ name: E(s) ? e.__parseExpression(s) : s,
1265
1271
  params: []
1266
1272
  };
1267
1273
  }
1268
- function ss(n, e) {
1274
+ function ns(n, e) {
1269
1275
  return e.__parseExpression(n.value) ? {} : {
1270
1276
  display: "none"
1271
1277
  };
1272
1278
  }
1273
- function ns(n, e) {
1279
+ function rs(n, e) {
1274
1280
  return {
1275
1281
  innerHTML: e.__parseExpression(n.value) || ""
1276
1282
  };
1277
1283
  }
1278
- function rs(n, e) {
1284
+ function os(n, e) {
1279
1285
  const t = {
1280
1286
  type: "JSFunction",
1281
1287
  value: n.value?.value ? `(v) => {
@@ -1283,43 +1289,51 @@ function rs(n, e) {
1283
1289
  }` : "(v) => {}"
1284
1290
  };
1285
1291
  return {
1286
- [b(n.arg) ? e.__parseExpression(n.arg) : n.arg || "value"]: e.__parseExpression(n.value),
1292
+ [E(n.arg) ? e.__parseExpression(n.arg) : n.arg || "value"]: e.__parseExpression(n.value),
1287
1293
  onInput: e.__parseFunction(t)
1288
1294
  };
1289
1295
  }
1290
- function os(n, e, t) {
1296
+ function is(n, e, t) {
1291
1297
  const s = {
1292
1298
  type: "JSFunction",
1293
1299
  value: e.value?.value ? `(v) => {
1294
1300
  ${e.value.value} = v;
1295
1301
  }` : "(v) => {}"
1296
- }, r = t.__parseFunction(s), o = Le(
1297
- b(e.modifiers) ? t.__parseExpression(e.modifiers) : e.modifiers
1298
- ), i = b(e.arg) ? t.__parseExpression(e.arg) : e.arg || "modelValue";
1302
+ }, r = t.__parseFunction(s), o = qe(
1303
+ E(e.modifiers) ? t.__parseExpression(e.modifiers) : e.modifiers
1304
+ ), i = E(e.arg) ? t.__parseExpression(e.arg) : e.arg || "modelValue";
1299
1305
  return {
1300
1306
  [i]: t.__parseExpression(e.value),
1301
1307
  [`onUpdate:${i}`]: o.length && r ? n.withModifiers(r, o) : r
1302
1308
  };
1303
1309
  }
1304
- function is(n, e, t, s, r) {
1310
+ function as(n, e, t, s, r) {
1305
1311
  if (!e) return null;
1306
- if (F(e))
1312
+ if (I(e))
1307
1313
  return { default: () => e };
1308
- if (b(e))
1314
+ if (E(e))
1309
1315
  return {
1310
- default: () => Oe(t.__parseExpression(e))
1316
+ default: () => Te(t.__parseExpression(e))
1311
1317
  };
1312
1318
  if (Array.isArray(e) && e.length > 0) {
1313
- const o = as(e), i = (a, u) => !a || !r ? {} : r?.id && Object.keys(a).length ? u ? {
1319
+ const o = cs(e), i = (a, u) => !a || !r ? {} : r?.id && Object.keys(a).length ? u ? {
1314
1320
  [u]: a
1315
1321
  } : {
1316
1322
  [`scope_${r.id}`]: a
1317
1323
  } : u ? { [u]: /* @__PURE__ */ Object.create(null) } : {};
1318
1324
  return Object.entries(o).reduce(
1319
1325
  (a, [u, { nodes: c, params: l, scope: f }]) => (a[u] = (p) => {
1320
- const d = l.length ? it(p ?? {}, l) : i(p, f);
1326
+ const d = l.length ? at(p ?? {}, l) : i(p, f);
1321
1327
  return c.map(
1322
- (m) => T(m, t.__clone(d), n, s, c)
1328
+ (m, h) => T(
1329
+ m,
1330
+ t.__clone(d),
1331
+ n,
1332
+ s,
1333
+ c,
1334
+ !1,
1335
+ h
1336
+ )
1323
1337
  );
1324
1338
  }, a),
1325
1339
  {}
@@ -1327,10 +1341,10 @@ function is(n, e, t, s, r) {
1327
1341
  }
1328
1342
  return null;
1329
1343
  }
1330
- function as(n) {
1344
+ function cs(n) {
1331
1345
  const e = {};
1332
1346
  for (const t of n) {
1333
- const s = cs(t.slot), r = s.name;
1347
+ const s = ls(t.slot), r = s.name;
1334
1348
  e[r] ? (e[r].nodes.push(t), e[r].params = e[r].params.concat(s.params), e[r].scope = s.scope || "") : e[r] = {
1335
1349
  nodes: [t],
1336
1350
  params: s.params,
@@ -1339,18 +1353,18 @@ function as(n) {
1339
1353
  }
1340
1354
  return e;
1341
1355
  }
1342
- function cs(n = "default") {
1343
- return F(n) ? { name: n, params: [], scope: "" } : { params: [], scope: "", ...n };
1356
+ function ls(n = "default") {
1357
+ return I(n) ? { name: n, params: [], scope: "" } : { params: [], scope: "", ...n };
1344
1358
  }
1345
- function ls(n, e, t) {
1359
+ function us(n, e, t) {
1346
1360
  const { value: s, iterator: r } = n, { item: o = "item", index: i = "index" } = r || {};
1347
1361
  let a = t.__parseExpression(s) || [];
1348
1362
  return Number.isInteger(a) && (a = new Array(a).fill(!0).map((u, c) => c + 1)), Array.isArray(a) ? a.map((u, c) => e(t.__clone({ [o]: u, [i]: c }), c)) : (console.warn("[vForRender]:", `${s?.value} is not a Arrary`), []);
1349
1363
  }
1350
- const re = Ie({
1364
+ const oe = Fe({
1351
1365
  name: "VtjPageContainer",
1352
1366
  async setup() {
1353
- const n = Je(), e = Fe(), t = e.meta.__vtj__ || e.params.id, s = t ? n.getPage(t) : n.getHomepage(), r = s ? await n.getRenderComponent(s.id) : null, o = le(Symbol());
1367
+ const n = Ke(), e = Oe(), t = e.meta.__vtj__ || e.params.id, s = t ? n.getPage(t) : n.getHomepage(), r = s ? await n.getRenderComponent(s.id) : null, o = ue(Symbol());
1354
1368
  if (s) {
1355
1369
  Object.assign(e.meta, s.meta || {}, { cache: s.cache });
1356
1370
  const { useTitle: i } = n?.adapter;
@@ -1371,7 +1385,7 @@ const re = Ie({
1371
1385
  },
1372
1386
  render() {
1373
1387
  const { component: n, query: e, sid: t } = this;
1374
- return n ? ce(n, { ...e, key: t }) : ce(
1388
+ return n ? le(n, { ...e, key: t }) : le(
1375
1389
  "div",
1376
1390
  { style: { padding: "10px" } },
1377
1391
  "找不到组件,组件不存在或未发布!"
@@ -1380,18 +1394,18 @@ const re = Ie({
1380
1394
  activated() {
1381
1395
  this.meta.cache === !1 && (this.sid = Symbol());
1382
1396
  }
1383
- }), us = Ie({
1397
+ }), fs = Fe({
1384
1398
  name: "VtjStartupContainer",
1385
1399
  render() {
1386
- return ce("div", "page not found!");
1400
+ return le("div", "page not found!");
1387
1401
  }
1388
1402
  });
1389
- function G(n, e, t = []) {
1403
+ function V(n, e, t = []) {
1390
1404
  const s = [];
1391
1405
  for (const r of t) {
1392
1406
  const { id: o, title: i, icon: a, children: u, hidden: c, layout: l } = r;
1393
1407
  if (l) {
1394
- const f = G(n, e, u || []);
1408
+ const f = V(n, e, u || []);
1395
1409
  s.push(...f);
1396
1410
  } else {
1397
1411
  const f = {
@@ -1400,7 +1414,7 @@ function G(n, e, t = []) {
1400
1414
  icon: a,
1401
1415
  hidden: c,
1402
1416
  url: `${n}/${e}/${o}`,
1403
- children: u && u.length ? G(n, e, u) : void 0
1417
+ children: u && u.length ? V(n, e, u) : void 0
1404
1418
  };
1405
1419
  s.push(f);
1406
1420
  }
@@ -1418,32 +1432,32 @@ function Ue(n, e) {
1418
1432
  e.can(s.id.toString()) && t.push(s);
1419
1433
  return t;
1420
1434
  }
1421
- function Hs(n) {
1435
+ function Ns(n) {
1422
1436
  const {
1423
1437
  menuPathPrefix: e = "",
1424
1438
  pageRouteName: t = "page",
1425
1439
  disableMenusFilter: s = !1
1426
- } = n || {}, r = Je(), o = Fe(), i = Pt(), a = le(!1), u = le(!1), c = r.project, l = (d, m) => {
1440
+ } = n || {}, r = Ke(), o = Oe(), i = At(), a = ue(!1), u = ue(!1), c = r.project, l = (d, m) => {
1427
1441
  a.value = !d?.mask, u.value = m?.pure ?? !!d?.pure;
1428
1442
  };
1429
- lt(() => {
1443
+ ut(() => {
1430
1444
  const { name: d, params: m, meta: h } = o;
1431
1445
  if (d === H) {
1432
1446
  const g = r.getPage(m.id);
1433
1447
  l(g, h);
1434
- } else if (d === q) {
1448
+ } else if (d === J) {
1435
1449
  const g = r.getHomepage();
1436
1450
  l(g, h);
1437
1451
  } else {
1438
1452
  const g = h.__vtj__;
1439
1453
  if (g) {
1440
- const _ = r.getPage(g);
1441
- l(_, h);
1454
+ const v = r.getPage(g);
1455
+ l(v, h);
1442
1456
  } else
1443
1457
  a.value = !h.mask, u.value = !!h.pure;
1444
1458
  }
1445
1459
  });
1446
- const f = G(
1460
+ const f = V(
1447
1461
  e,
1448
1462
  t,
1449
1463
  c?.pages
@@ -1457,7 +1471,7 @@ function Hs(n) {
1457
1471
  pure: u
1458
1472
  };
1459
1473
  }
1460
- function oe(n, e) {
1474
+ function ie(n, e) {
1461
1475
  const { id: t, title: s, meta: r } = n, { name: o = "page", prefix: i = "", component: a, routeMeta: u } = e;
1462
1476
  return {
1463
1477
  name: t,
@@ -1471,7 +1485,7 @@ function oe(n, e) {
1471
1485
  }
1472
1486
  };
1473
1487
  }
1474
- function de(n) {
1488
+ function he(n) {
1475
1489
  const {
1476
1490
  name: e = "page",
1477
1491
  prefix: t = "",
@@ -1484,7 +1498,7 @@ function de(n) {
1484
1498
  for (const c of s) {
1485
1499
  const { id: l, title: f, dir: p, layout: d, children: m, meta: h } = c;
1486
1500
  if (p) {
1487
- const g = de({
1501
+ const g = he({
1488
1502
  name: e,
1489
1503
  prefix: t,
1490
1504
  component: r,
@@ -1495,7 +1509,7 @@ function de(n) {
1495
1509
  });
1496
1510
  u.push(...g);
1497
1511
  } else if (d) {
1498
- const g = de({
1512
+ const g = he({
1499
1513
  name: e,
1500
1514
  prefix: t,
1501
1515
  component: r,
@@ -1503,7 +1517,7 @@ function de(n) {
1503
1517
  homepage: a,
1504
1518
  loader: o,
1505
1519
  pages: m || []
1506
- }), _ = {
1520
+ }), v = {
1507
1521
  name: `layout_${l}`,
1508
1522
  path: t,
1509
1523
  component: () => o(l),
@@ -1515,28 +1529,28 @@ function de(n) {
1515
1529
  },
1516
1530
  children: g
1517
1531
  };
1518
- u.push(_), u.push(oe(c, n));
1519
- } else if (u.push(oe(c, n)), a === l) {
1520
- const g = oe(c, n);
1532
+ u.push(v), u.push(ie(c, n));
1533
+ } else if (u.push(ie(c, n)), a === l) {
1534
+ const g = ie(c, n);
1521
1535
  g.path = "", g.name = `home_${l}`, u.push(g);
1522
1536
  }
1523
1537
  }
1524
1538
  return u;
1525
1539
  }
1526
- function fs(n = {}, e) {
1540
+ function ps(n = {}, e) {
1527
1541
  const { css: t, store: s, enhance: r } = n, { window: o, app: i, library: a = {}, adapter: u, mode: c } = e, { Pinia: l } = a;
1528
- i.config.globalProperties.$libs = a, me(o, "global-css", t || ""), l && s && ps(s, i, l), hs(i, u, n), !u.access && n.access && ds(n.access, i, c, u), ms(i, n), r && gs(r, i, a);
1542
+ i.config.globalProperties.$libs = a, ge(o, "global-css", t || ""), l && s && ds(s, i, l), ms(i, u, n), !u.access && n.access && hs(n.access, i, c, u), gs(i, n), r && _s(r, i, a);
1529
1543
  }
1530
- function ps(n, e, t) {
1544
+ function ds(n, e, t) {
1531
1545
  const s = t.createPinia();
1532
- if (e.use(s), E(n) && n.value) {
1546
+ if (e.use(s), $(n) && n.value) {
1533
1547
  const r = R(n, {}, !1, !1, !0), o = t.defineStore("$store", r(e) || {});
1534
1548
  e.config.globalProperties.$store = o();
1535
1549
  }
1536
1550
  }
1537
- function ds(n, e, t, s) {
1538
- if (E(n) && n.value) {
1539
- const r = R(n, {}, !1, !1, !0), { alert: o, request: i } = s, a = new ge({
1551
+ function hs(n, e, t, s) {
1552
+ if ($(n) && n.value) {
1553
+ const r = R(n, {}, !1, !1, !0), { alert: o, request: i } = s, a = new _e({
1540
1554
  alert: o,
1541
1555
  storagePrefix: "__VTJ_APP_",
1542
1556
  ...r(e)
@@ -1544,37 +1558,37 @@ function ds(n, e, t, s) {
1544
1558
  a.connect({ mode: t, router: u, request: i }), e.use(a);
1545
1559
  }
1546
1560
  }
1547
- function hs(n, e, t) {
1561
+ function ms(n, e, t) {
1548
1562
  if (!e.request) return;
1549
1563
  const { axios: s, request: r, response: o } = t;
1550
- if (s && E(s) && s.value) {
1564
+ if (s && $(s) && s.value) {
1551
1565
  const i = R(s, {}, !1, !1, !0);
1552
1566
  e.request.setConfig(i(n));
1553
1567
  }
1554
- if (r && E(r) && r.value) {
1568
+ if (r && $(r) && r.value) {
1555
1569
  const i = R(r, {}, !1, !1, !0), a = e.request;
1556
1570
  a.__unReq && a.__unReq(), a.__unReq = e.request.useRequest((u) => i(u, n));
1557
1571
  }
1558
- if (o && E(o) && o.value) {
1572
+ if (o && $(o) && o.value) {
1559
1573
  const i = R(o, {}, !1, !1, !0), a = e.request;
1560
1574
  a.__unRes && a.__unRes(), a.__unRes = e.request.useResponse((u) => i(u, n));
1561
1575
  }
1562
1576
  }
1563
- function ms(n, e) {
1577
+ function gs(n, e) {
1564
1578
  const { beforeEach: t, afterEach: s } = e, r = n.config.globalProperties.$router;
1565
- if (t && E(t) && t.value) {
1579
+ if (t && $(t) && t.value) {
1566
1580
  const o = R(t, {}, !1, !1, !0);
1567
1581
  r && r.beforeEach((i, a, u) => o(i, a, u, n));
1568
1582
  }
1569
- if (s && E(s) && s.value) {
1583
+ if (s && $(s) && s.value) {
1570
1584
  const o = R(s, {}, !1, !1, !0);
1571
1585
  r && r.afterEach((i, a, u) => o(i, a, u, n));
1572
1586
  }
1573
1587
  }
1574
- function gs(n, e, t = {}) {
1575
- E(n) && n.value && R(n, {}, !1, !1, !0)(e, t);
1588
+ function _s(n, e, t = {}) {
1589
+ $(n) && n.value && R(n, {}, !1, !1, !0)(e, t);
1576
1590
  }
1577
- function _s(n, e, t) {
1591
+ function vs(n, e, t) {
1578
1592
  if (!n || !e || !t) return;
1579
1593
  const { VueI18n: s } = e;
1580
1594
  if (s) {
@@ -1593,9 +1607,9 @@ function _s(n, e, t) {
1593
1607
  n.use(u);
1594
1608
  }
1595
1609
  }
1596
- const qe = Symbol("Provider");
1597
- var vs = /* @__PURE__ */ ((n) => (n.Production = "production", n.Development = "development", n))(vs || {});
1598
- class ys extends Qe {
1610
+ const Je = Symbol("Provider");
1611
+ var ys = /* @__PURE__ */ ((n) => (n.Production = "production", n.Development = "development", n))(ys || {});
1612
+ class ws extends Xe {
1599
1613
  /**
1600
1614
  * 创建Provider实例
1601
1615
  * @param options 配置选项
@@ -1626,7 +1640,7 @@ class ys extends Qe {
1626
1640
  // 全局变量
1627
1641
  modules = {};
1628
1642
  // 异步模块加载器
1629
- adapter = { request: ae, jsonp: Pe };
1643
+ adapter = { request: ce, jsonp: Ae };
1630
1644
  // 适配器接口
1631
1645
  apis = {};
1632
1646
  // API集合
@@ -1683,7 +1697,7 @@ class ys extends Qe {
1683
1697
  if (this.project = s ? await s() : await this.service.init(e), !this.project)
1684
1698
  throw new Error("project is null");
1685
1699
  const { apis: r = [], meta: o = [], env: i = [] } = this.project, a = window;
1686
- a && (a.CKEDITOR_VERSION = void 0), this.initEnv(i), this.mode === y.Raw ? await this.loadDependencies(a) : await this.loadAssets(a), this.initMock(a), this.apis = Ft(r, o, this.adapter), De(a), kt(r, a), e.platform !== "uniapp" && this.initRouter(), this.triggerReady();
1700
+ a && (a.CKEDITOR_VERSION = void 0), this.initEnv(i), this.mode === y.Raw ? await this.loadDependencies(a) : await this.loadAssets(a), this.initMock(a), this.apis = Ot(r, o, this.adapter), He(a), Mt(r, a), e.platform !== "uniapp" && this.initRouter(), this.triggerReady();
1687
1701
  }
1688
1702
  initMock(e) {
1689
1703
  const t = N(e);
@@ -1711,7 +1725,7 @@ class ys extends Qe {
1711
1725
  materialExports: p,
1712
1726
  materialMapLibrary: d,
1713
1727
  libraryLocaleMap: m
1714
- } = mt(
1728
+ } = gt(
1715
1729
  t,
1716
1730
  i,
1717
1731
  a === "development"
@@ -1719,37 +1733,37 @@ class ys extends Qe {
1719
1733
  );
1720
1734
  Object.assign(this.libraryLocaleMap, m);
1721
1735
  for (const h of c) {
1722
- const g = s[h], _ = e[h];
1723
- if (_)
1724
- r[h] = _;
1736
+ const g = s[h], v = e[h];
1737
+ if (v)
1738
+ r[h] = v;
1725
1739
  else if (g)
1726
1740
  e[h] = r[h] = await g();
1727
1741
  else {
1728
- const v = l[h] || [];
1729
- for (const S of v)
1730
- W(S) && await $t(S, O.append(S, { v: D })), Q(S) && await Ee(O.append(S, { v: D }));
1742
+ const b = l[h] || [];
1743
+ for (const _ of b)
1744
+ Q(_) && await Et(_, O.append(_, { v: k })), X(_) && await be(O.append(_, { v: k }));
1731
1745
  r[h] = e[h];
1732
1746
  }
1733
1747
  const w = m[h];
1734
1748
  if (w) {
1735
- const v = s[w];
1736
- u[w] = v ? await v() : e[w];
1749
+ const b = s[w];
1750
+ u[w] = b ? await b() : e[w];
1737
1751
  }
1738
1752
  }
1739
1753
  if (a === "development") {
1740
1754
  for (const g of f)
1741
- await Ee(O.append(g, { v: D }));
1755
+ await be(O.append(g, { v: k }));
1742
1756
  const h = this.materials || {};
1743
1757
  for (const g of p) {
1744
- const _ = e[d[g]], w = _?.default || _, v = Xe[g];
1745
- if (v)
1746
- w && v.forEach((S) => {
1747
- o[S] = w[S];
1758
+ const v = e[d[g]], w = v?.default || v, b = Ye[g];
1759
+ if (b)
1760
+ w && b.forEach((_) => {
1761
+ o[_] = w[_];
1748
1762
  });
1749
1763
  else {
1750
- const S = h[g] ? (await h[g]()).default : e[g];
1751
- S && w && (S.components || []).forEach((I) => {
1752
- o[I.name] = gt(I, w);
1764
+ const _ = h[g] ? (await h[g]()).default : e[g];
1765
+ _ && w && (_.components || []).forEach((C) => {
1766
+ o[C.name] = _t(C, w);
1753
1767
  });
1754
1768
  }
1755
1769
  }
@@ -1765,20 +1779,20 @@ class ys extends Qe {
1765
1779
  } = s, c = i ? "" : "/", l = {
1766
1780
  path: `${c}${a}/:id`,
1767
1781
  name: H,
1768
- component: re
1782
+ component: oe
1769
1783
  }, f = this.getHomepage(), p = {
1770
1784
  path: c,
1771
- name: q,
1772
- component: f ? re : r.startupComponent || us,
1785
+ name: J,
1786
+ component: f ? oe : r.startupComponent || fs,
1773
1787
  meta: u
1774
1788
  };
1775
- if (e.hasRoute(H) && e.removeRoute(H), e.hasRoute(q) && e.removeRoute(q), s.enableStaticRoute) {
1789
+ if (e.hasRoute(H) && e.removeRoute(H), e.hasRoute(J) && e.removeRoute(J), s.enableStaticRoute) {
1776
1790
  const d = t?.pages || [];
1777
- de({
1791
+ he({
1778
1792
  name: a,
1779
1793
  prefix: c,
1780
1794
  pages: d,
1781
- component: re,
1795
+ component: oe,
1782
1796
  loader: this.getRenderComponent.bind(this),
1783
1797
  homepage: f?.id
1784
1798
  }).forEach((h) => {
@@ -1788,7 +1802,7 @@ class ys extends Qe {
1788
1802
  i ? (e.addRoute(i, l), e.addRoute(i, p)) : (e.addRoute(l), e.addRoute(p));
1789
1803
  }
1790
1804
  setErrorHandler(e) {
1791
- e.config.errorHandler = at((t, s, r) => {
1805
+ e.config.errorHandler = ct((t, s, r) => {
1792
1806
  const o = s?.$options.name, i = typeof t == "string" ? t : t?.message || t?.msg || "未知错误", a = `[ ${o} ] ${i} ${r}`;
1793
1807
  ["getComputedStyle", "ResizeObserver"].some((c) => a.includes(c)) || (console.error(
1794
1808
  "[VTJ Error]:",
@@ -1814,11 +1828,11 @@ class ys extends Qe {
1814
1828
  install(e) {
1815
1829
  const { libraryLocaleMap: t, libraryLocales: s } = this, { libraryOptions: r = {} } = this.options, o = e.config.globalProperties.installed || {};
1816
1830
  for (const [i, a] of Object.entries(this.library))
1817
- if (!o[i] && Et(a)) {
1831
+ if (!o[i] && bt(a)) {
1818
1832
  const c = { locale: s[t[i]] }, l = r[i] || {}, f = { ...c, ...l };
1819
1833
  e.use(a, f), o[i] = !0;
1820
1834
  }
1821
- e.provide(qe, this), e.config.globalProperties.$provider = this, e.config.globalProperties.$request = this.adapter?.request, this.options.install && e.use(this.options.install), this.adapter.access && e.use(this.adapter.access), this.project?.platform !== "uniapp" && this.mode !== y.Design && this.initGlobals(this.project?.globals || {}, {
1835
+ e.provide(Je, this), e.config.globalProperties.$provider = this, e.config.globalProperties.$request = this.adapter?.request, this.options.install && e.use(this.options.install), this.adapter.access && e.use(this.adapter.access), this.project?.platform !== "uniapp" && this.mode !== y.Design && this.initGlobals(this.project?.globals || {}, {
1822
1836
  app: e,
1823
1837
  window,
1824
1838
  adapter: this.adapter,
@@ -1861,7 +1875,7 @@ class ys extends Qe {
1861
1875
  return t(e) || null;
1862
1876
  }
1863
1877
  getMenus(e = "page", t = "") {
1864
- return G(t, e, this.project?.pages || []);
1878
+ return V(t, e, this.project?.pages || []);
1865
1879
  }
1866
1880
  getHomepage() {
1867
1881
  const { homepage: e } = this.project || {};
@@ -1900,12 +1914,12 @@ class ys extends Qe {
1900
1914
  apis: i,
1901
1915
  window,
1902
1916
  ...t
1903
- }, u = fe({
1917
+ }, u = pe({
1904
1918
  getDsl: async (c) => await this.getDsl(c) || null,
1905
1919
  getDslByUrl: async (c) => await this.getDslByUrl(c) || null,
1906
1920
  options: a
1907
1921
  });
1908
- return ue({
1922
+ return fe({
1909
1923
  ...a,
1910
1924
  dsl: e,
1911
1925
  loader: u
@@ -1942,7 +1956,7 @@ class ys extends Qe {
1942
1956
  * @returns Vue异步组件
1943
1957
  */
1944
1958
  defineUrlSchemaComponent(e, t) {
1945
- return be(async () => {
1959
+ return je(async () => {
1946
1960
  const s = await this.getDslByUrl(e);
1947
1961
  return s ? (s.name = t || s.name, this.createDslRenderer(s).renderer) : null;
1948
1962
  });
@@ -1955,7 +1969,7 @@ class ys extends Qe {
1955
1969
  * @returns Vue异步组件
1956
1970
  */
1957
1971
  definePluginComponent(e) {
1958
- return be(async () => await Ne(e, window));
1972
+ return je(async () => await Be(e, window));
1959
1973
  }
1960
1974
  /**
1961
1975
  * 设置应用全局
@@ -1970,10 +1984,10 @@ class ys extends Qe {
1970
1984
  },
1971
1985
  t
1972
1986
  );
1973
- fs(e, s);
1987
+ ps(e, s);
1974
1988
  }
1975
1989
  initI18n(e, t, s) {
1976
- _s(e, t, s);
1990
+ vs(e, t, s);
1977
1991
  }
1978
1992
  initEnv(e = []) {
1979
1993
  this.env = e.reduce(
@@ -1982,15 +1996,15 @@ class ys extends Qe {
1982
1996
  );
1983
1997
  }
1984
1998
  }
1985
- function Ns(n) {
1986
- const e = new ys(n);
1999
+ function Bs(n) {
2000
+ const e = new ws(n);
1987
2001
  return {
1988
2002
  provider: e,
1989
2003
  onReady: (s) => e.ready(s)
1990
2004
  };
1991
2005
  }
1992
- function Je(n = {}) {
1993
- const e = Ae(qe, null);
2006
+ function Ke(n = {}) {
2007
+ const e = Ie(Je, null);
1994
2008
  if (!e)
1995
2009
  throw new Error("Can not find provider");
1996
2010
  if (e.nodeEnv === "development") {
@@ -2006,21 +2020,21 @@ function Je(n = {}) {
2006
2020
  }
2007
2021
  return e;
2008
2022
  }
2009
- async function Bs(n, e = "") {
2010
- const { name: t, urls: s = [] } = n || {}, r = s.map((a) => e + a), { css: o, js: i } = _t(r);
2011
- if (o.length && Me(o), i.length)
2012
- return await Te(i, t).catch(
2023
+ async function Ls(n, e = "") {
2024
+ const { name: t, urls: s = [] } = n || {}, r = s.map((a) => e + a), { css: o, js: i } = vt(r);
2025
+ if (o.length && xe(o), i.length)
2026
+ return await De(i, t).catch(
2013
2027
  () => {
2014
2028
  }
2015
2029
  );
2016
2030
  }
2017
- const Ke = {
2031
+ const ze = {
2018
2032
  type: "json",
2019
2033
  validSuccess: !0,
2020
2034
  originResponse: !1,
2021
2035
  failMessage: !0,
2022
2036
  validate: (n) => n.data?.code === 0
2023
- }, ws = (n, e = "/__vtj__/api/:type.json") => (t, s, r) => n.send({
2037
+ }, Ss = (n, e = "/__vtj__/api/:type.json") => (t, s, r) => n.send({
2024
2038
  url: e,
2025
2039
  method: "post",
2026
2040
  params: { type: t },
@@ -2029,8 +2043,8 @@ const Ke = {
2029
2043
  type: t,
2030
2044
  data: s
2031
2045
  },
2032
- settings: Ke
2033
- }), Ss = (n, e = "/__vtj__/api/uploader.json") => async (t, s) => await n.send({
2046
+ settings: ze
2047
+ }), $s = (n, e = "/__vtj__/api/uploader.json") => async (t, s) => await n.send({
2034
2048
  url: e,
2035
2049
  method: "post",
2036
2050
  data: {
@@ -2038,12 +2052,12 @@ const Ke = {
2038
2052
  projectId: s
2039
2053
  },
2040
2054
  settings: {
2041
- ...Ke,
2055
+ ...ze,
2042
2056
  type: "data"
2043
2057
  }
2044
2058
  }).then((r) => r && r[0] ? r[0] : null).catch(() => null);
2045
- function Ls(n) {
2046
- return Ce({
2059
+ function qs(n) {
2060
+ return Pe({
2047
2061
  settings: {
2048
2062
  type: "json",
2049
2063
  validSuccess: !0,
@@ -2056,9 +2070,9 @@ function Ls(n) {
2056
2070
  }
2057
2071
  });
2058
2072
  }
2059
- class _e {
2060
- constructor(e = ae) {
2061
- this.req = e, this.api = ws(e), this.uploader = Ss(e);
2073
+ class ve {
2074
+ constructor(e = ce) {
2075
+ this.req = e, this.api = Ss(e), this.uploader = $s(e);
2062
2076
  }
2063
2077
  api;
2064
2078
  pluginCaches = {};
@@ -2142,10 +2156,10 @@ class _e {
2142
2156
  return await this.api("clearStaticFiles", e).catch(() => "");
2143
2157
  }
2144
2158
  async getPluginMaterial(e) {
2145
- const { urls: t = [] } = e, s = t.filter((o) => dt(o))[0];
2159
+ const { urls: t = [] } = e, s = t.filter((o) => ht(o))[0];
2146
2160
  if (!s) return null;
2147
2161
  const r = this.pluginCaches[s];
2148
- return r || (this.pluginCaches[s] = ae.send({
2162
+ return r || (this.pluginCaches[s] = ce.send({
2149
2163
  url: s,
2150
2164
  method: "get",
2151
2165
  settings: {
@@ -2158,77 +2172,77 @@ class _e {
2158
2172
  return console.log("BaseService.genSource", e), "";
2159
2173
  }
2160
2174
  }
2161
- const $ = new ct({
2175
+ const S = new lt({
2162
2176
  type: "local",
2163
2177
  expired: 0,
2164
2178
  prefix: "__VTJ_"
2165
2179
  });
2166
- class Us extends _e {
2180
+ class Us extends ve {
2167
2181
  init(e) {
2168
- const t = new J(e), s = $.get(`project_${t.id}`), r = Object.assign(t.toDsl(), s || {});
2169
- return $.save(`project_${t.id}`, r), Promise.resolve(r);
2182
+ const t = new K(e), s = S.get(`project_${t.id}`), r = Object.assign(t.toDsl(), s || {});
2183
+ return S.save(`project_${t.id}`, r), Promise.resolve(r);
2170
2184
  }
2171
2185
  saveProject(e) {
2172
- const t = new J(e);
2173
- return $.save(`project_${t.id}`, t.toDsl()), Promise.resolve(!0);
2186
+ const t = new K(e);
2187
+ return S.save(`project_${t.id}`, t.toDsl()), Promise.resolve(!0);
2174
2188
  }
2175
2189
  saveMaterials(e, t) {
2176
- return $.save(`materials_${e.id}`, he(t)), Promise.resolve(!0);
2190
+ return S.save(`materials_${e.id}`, me(t)), Promise.resolve(!0);
2177
2191
  }
2178
2192
  saveFile(e) {
2179
- return $.save(`file_${e.id}`, e), Promise.resolve(!0);
2193
+ return S.save(`file_${e.id}`, e), Promise.resolve(!0);
2180
2194
  }
2181
2195
  getFile(e) {
2182
- const t = $.get(`file_${e}`);
2196
+ const t = S.get(`file_${e}`);
2183
2197
  return t ? Promise.resolve(t) : Promise.reject(null);
2184
2198
  }
2185
2199
  removeFile(e) {
2186
- return $.remove(`file_${e}`), Promise.resolve(!0);
2200
+ return S.remove(`file_${e}`), Promise.resolve(!0);
2187
2201
  }
2188
2202
  saveHistory(e) {
2189
- return $.save(`history_${e.id}`, e), Promise.resolve(!0);
2203
+ return S.save(`history_${e.id}`, e), Promise.resolve(!0);
2190
2204
  }
2191
2205
  removeHistory(e) {
2192
- const t = $.get(`history_${e}`);
2206
+ const t = S.get(`history_${e}`);
2193
2207
  if (t) {
2194
2208
  const r = (t.items || []).map((o) => o.id);
2195
- this.removeHistoryItem(e, r), $.remove(`history_${e}`);
2209
+ this.removeHistoryItem(e, r), S.remove(`history_${e}`);
2196
2210
  }
2197
2211
  return Promise.resolve(!0);
2198
2212
  }
2199
2213
  getHistory(e) {
2200
- const t = $.get(`history_${e}`), s = new Re(t || { id: e });
2214
+ const t = S.get(`history_${e}`), s = new Ce(t || { id: e });
2201
2215
  return Promise.resolve(s.toDsl());
2202
2216
  }
2203
2217
  getHistoryItem(e, t) {
2204
- const s = $.get(`history_${e}_${t}`);
2218
+ const s = S.get(`history_${e}_${t}`);
2205
2219
  return Promise.resolve(s);
2206
2220
  }
2207
2221
  saveHistoryItem(e, t) {
2208
- return $.save(`history_${e}_${t.id}`, t), Promise.resolve(!0);
2222
+ return S.save(`history_${e}_${t.id}`, t), Promise.resolve(!0);
2209
2223
  }
2210
2224
  removeHistoryItem(e, t) {
2211
2225
  return t.forEach((s) => {
2212
- $.remove(`history_${e}_${s}`);
2226
+ S.remove(`history_${e}_${s}`);
2213
2227
  }), Promise.resolve(!0);
2214
2228
  }
2215
2229
  }
2216
- class $s extends _e {
2230
+ class Es extends ve {
2217
2231
  projects = {};
2218
2232
  materials = {};
2219
2233
  files = {};
2220
2234
  histories = {};
2221
2235
  historyItems = {};
2222
2236
  init(e) {
2223
- const t = new J(e), s = this.projects[t.id] || {}, r = Object.assign(t.toDsl(), s);
2237
+ const t = new K(e), s = this.projects[t.id] || {}, r = Object.assign(t.toDsl(), s);
2224
2238
  return this.projects[r.id] = r, Promise.resolve(r);
2225
2239
  }
2226
2240
  saveProject(e) {
2227
- const t = new J(e);
2241
+ const t = new K(e);
2228
2242
  return this.projects[t.id] = t.toDsl(), Promise.resolve(!0);
2229
2243
  }
2230
2244
  saveMaterials(e, t) {
2231
- return e.id && (this.materials[e.id] = he(t)), Promise.resolve(!0);
2245
+ return e.id && (this.materials[e.id] = me(t)), Promise.resolve(!0);
2232
2246
  }
2233
2247
  saveFile(e) {
2234
2248
  return this.files[e.id] = e, Promise.resolve(!0);
@@ -2252,7 +2266,7 @@ class $s extends _e {
2252
2266
  return Promise.resolve(!0);
2253
2267
  }
2254
2268
  getHistory(e) {
2255
- const t = this.histories[e], s = new Re(t || { id: e });
2269
+ const t = this.histories[e], s = new Ce(t || { id: e });
2256
2270
  return Promise.resolve(s);
2257
2271
  }
2258
2272
  getHistoryItem(e, t) {
@@ -2271,10 +2285,10 @@ class $s extends _e {
2271
2285
  }
2272
2286
  }
2273
2287
  let U = null;
2274
- function qs() {
2275
- return U || (U = new $s(), U);
2288
+ function Js() {
2289
+ return U || (U = new Es(), U);
2276
2290
  }
2277
- class Js extends _e {
2291
+ class Ks extends ve {
2278
2292
  getFileCaches = {};
2279
2293
  async getExtension() {
2280
2294
  return await this.api("getExtension", {}).catch(() => {
@@ -2291,7 +2305,7 @@ class Js extends _e {
2291
2305
  async saveMaterials(e, t) {
2292
2306
  return !!await this.api("saveMaterials", {
2293
2307
  project: e,
2294
- materials: he(t)
2308
+ materials: me(t)
2295
2309
  }).catch(() => !1);
2296
2310
  }
2297
2311
  async saveFile(e) {
@@ -2332,83 +2346,83 @@ class Js extends _e {
2332
2346
  }
2333
2347
  }
2334
2348
  export {
2335
- As as ACCESS,
2336
- xe as ACCESS_KEY,
2337
- ge as Access,
2338
- pt as BUILD_IN_TAGS,
2339
- ut as BUILT_IN_DIRECTIVES,
2340
- _e as BaseService,
2341
- je as CONTEXT_HOST,
2342
- Tt as Context,
2349
+ Is as ACCESS,
2350
+ ke as ACCESS_KEY,
2351
+ _e as Access,
2352
+ dt as BUILD_IN_TAGS,
2353
+ ft as BUILT_IN_DIRECTIVES,
2354
+ ve as BaseService,
2355
+ Re as CONTEXT_HOST,
2356
+ Dt as Context,
2343
2357
  y as ContextMode,
2344
- ft as DATA_TYPES,
2345
- q as HOMEPAGE_ROUTE_NAME,
2346
- ke as HTML_TAGS,
2347
- Ms as JSCodeToString,
2348
- Cs as LIFE_CYCLES_LIST,
2349
- Js as LocalService,
2350
- $s as MemoryService,
2351
- vs as NodeEnv,
2358
+ pt as DATA_TYPES,
2359
+ J as HOMEPAGE_ROUTE_NAME,
2360
+ Me as HTML_TAGS,
2361
+ xs as JSCodeToString,
2362
+ Ps as LIFE_CYCLES_LIST,
2363
+ Ks as LocalService,
2364
+ Es as MemoryService,
2365
+ ys as NodeEnv,
2352
2366
  H as PAGE_ROUTE_NAME,
2353
- ys as Provider,
2354
- Ps as REMOTE,
2367
+ ws as Provider,
2368
+ As as REMOTE,
2355
2369
  Us as StorageService,
2356
- D as VTJ_RENDERER_VERSION,
2357
- ks as adoptStylesToInline,
2358
- me as adoptedStyleSheets,
2359
- Ds as clearLoaderCache,
2360
- vt as compileScopedCSS,
2361
- St as convertCssRpx,
2362
- xs as createAccess,
2363
- Ts as createAdapter,
2364
- Is as createAssetScripts,
2365
- Fs as createAssetsCss,
2370
+ k as VTJ_RENDERER_VERSION,
2371
+ Ms as adoptStylesToInline,
2372
+ ge as adoptedStyleSheets,
2373
+ Hs as clearLoaderCache,
2374
+ yt as compileScopedCSS,
2375
+ $t as convertCssRpx,
2376
+ ks as createAccess,
2377
+ Ds as createAdapter,
2378
+ Fs as createAssetScripts,
2379
+ Os as createAssetsCss,
2366
2380
  Ut as createDataSources,
2367
- fe as createLoader,
2368
- qs as createMemoryService,
2369
- G as createMenus,
2370
- It as createMetaApi,
2371
- Ot as createMock,
2372
- Ns as createProvider,
2373
- ue as createRenderer,
2374
- At as createSchemaApi,
2375
- Ft as createSchemaApis,
2376
- Ls as createServiceRequest,
2377
- zt as defaultLoader,
2378
- L as fillBasePath,
2381
+ pe as createLoader,
2382
+ Js as createMemoryService,
2383
+ V as createMenus,
2384
+ Ft as createMetaApi,
2385
+ Tt as createMock,
2386
+ Bs as createProvider,
2387
+ fe as createRenderer,
2388
+ It as createSchemaApi,
2389
+ Ot as createSchemaApis,
2390
+ qs as createServiceRequest,
2391
+ Gt as defaultLoader,
2392
+ q as fillBasePath,
2379
2393
  N as getMock,
2380
- Le as getModifiers,
2381
- Ne as getPlugin,
2382
- gt as getRawComponent,
2383
- bt as isBuiltInTag,
2384
- W as isCSSUrl,
2385
- Rt as isJSCode,
2386
- b as isJSExpression,
2387
- E as isJSFunction,
2388
- dt as isJSON,
2389
- Q as isJSUrl,
2390
- jt as isNativeTag,
2391
- Et as isVuePlugin,
2392
- $t as loadCss,
2393
- Me as loadCssUrl,
2394
- Bs as loadEnhance,
2395
- Te as loadScriptUrl,
2394
+ qe as getModifiers,
2395
+ Be as getPlugin,
2396
+ _t as getRawComponent,
2397
+ jt as isBuiltInTag,
2398
+ Q as isCSSUrl,
2399
+ Ct as isJSCode,
2400
+ E as isJSExpression,
2401
+ $ as isJSFunction,
2402
+ ht as isJSON,
2403
+ X as isJSUrl,
2404
+ Rt as isNativeTag,
2405
+ bt as isVuePlugin,
2406
+ Et as loadCss,
2407
+ xe as loadCssUrl,
2408
+ Ls as loadEnhance,
2409
+ De as loadScriptUrl,
2396
2410
  Ue as menusFilter,
2397
- Mt as mockApi,
2398
- kt as mockApis,
2399
- De as mockCleanup,
2400
- A as nodeCache,
2411
+ xt as mockApi,
2412
+ Mt as mockApis,
2413
+ He as mockCleanup,
2414
+ x as nodeCache,
2401
2415
  T as nodeRender,
2402
- mt as parseDeps,
2416
+ gt as parseDeps,
2403
2417
  B as parseExpression,
2404
2418
  R as parseFunction,
2405
- _t as parseUrls,
2406
- qe as providerKey,
2407
- ht as removeProdFlag,
2408
- wt as rpxToPx,
2409
- Os as setupPageSetting,
2410
- Oe as toString,
2411
- Pt as useAccess,
2412
- Hs as useMask,
2413
- Je as useProvider
2419
+ vt as parseUrls,
2420
+ Je as providerKey,
2421
+ mt as removeProdFlag,
2422
+ St as rpxToPx,
2423
+ Ts as setupPageSetting,
2424
+ Te as toString,
2425
+ At as useAccess,
2426
+ Ns as useMask,
2427
+ Ke as useProvider
2414
2428
  };