@vtj/pro 0.13.32 → 0.13.33
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/@vtj/materials/assets/antdv/index.umd.js +2 -2
- package/dist/@vtj/materials/assets/charts/index.umd.js +2 -2
- package/dist/@vtj/materials/assets/element/index.umd.js +2 -2
- package/dist/@vtj/materials/assets/icons/index.umd.js +2 -2
- package/dist/@vtj/materials/assets/ui/index.umd.js +2 -2
- package/dist/@vtj/materials/assets/uni-h5/index.umd.js +2 -2
- package/dist/@vtj/materials/assets/uni-ui/index.umd.js +2 -2
- package/dist/@vtj/materials/assets/vant/index.umd.js +2 -2
- package/dist/@vtj/materials/deps/@vtj/charts/index.umd.js +2 -2
- package/dist/@vtj/materials/deps/@vtj/icons/index.umd.js +2 -2
- package/dist/@vtj/materials/deps/@vtj/ui/index.umd.js +2 -2
- package/dist/@vtj/materials/deps/@vtj/utils/index.umd.js +2 -2
- package/dist/assets/{Editor-i5P81huw-GtmlswXs.js → Editor-CAfYjzC4-B6h0yUhJ.js} +130 -124
- package/dist/assets/{Editor-i5P81huw-DahX-ZbK.css → Editor-CAfYjzC4-CIjQSqmy.css} +1 -1
- package/dist/assets/{auth-999F_SFg.js → auth-e0Ziwu14.js} +1 -1
- package/dist/assets/{index-7xn2veqr.js → index-CUoc_DED.js} +2 -2
- package/dist/assets/index-DQ6hpoP7.js +1 -0
- package/dist/assets/{mockjs-DKzs-0ke.js → mockjs-D1CwEUpV.js} +1 -1
- package/dist/assets/page-BpXBFM49.js +2 -0
- package/dist/assets/preview-B1rKFfnr.js +2 -0
- package/dist/assets/utils-CSKCwugF.js +1 -0
- package/dist/index.html +3 -3
- package/dist/uni/assets/{index-DTgkXTuo.js → index-BScYRv15.js} +6 -6
- package/dist/uni/index.html +1 -1
- package/package.json +12 -12
- package/src/.vtj/files/1bxaubr9.json +109 -0
- package/src/.vtj/materials/@vtj/pro.json +8246 -0
- package/src/.vtj/projects/@vtj/pro.json +226 -0
- package/dist/assets/index-80LItnFt.js +0 -1
- package/dist/assets/page-CkW4uv_S.js +0 -2
- package/dist/assets/preview-DKrOP-2R.js +0 -2
- package/dist/assets/utils-CuK8tqtw.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
var x=Object.defineProperty;var f=Object.getOwnPropertySymbols;var A=Object.prototype.hasOwnProperty,v=Object.prototype.propertyIsEnumerable;var h=(s,t,e)=>t in s?x(s,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[t]=e,l=(s,t)=>{for(var e in t||(t={}))A.call(t,e)&&h(s,e,t[e]);if(f)for(var e of f(t))v.call(t,e)&&h(s,e,t[e]);return s};var p=(s,t,e)=>new Promise((c,o)=>{var n=r=>{try{i(e.next(r))}catch(a){o(a)}},m=r=>{try{i(e.throw(r))}catch(a){o(a)}},i=r=>r.done?c(r.value):Promise.resolve(r.value).then(n,m);i((e=e.apply(s,t)).next())});import"./element-plus-wCU_mIQS.js";import"./vxe-BUp_tBCm.js";import{R as B,aA as R,a6 as y,aB as b,aC as E,O as I}from"./Editor-
|
|
1
|
+
var x=Object.defineProperty;var f=Object.getOwnPropertySymbols;var A=Object.prototype.hasOwnProperty,v=Object.prototype.propertyIsEnumerable;var h=(s,t,e)=>t in s?x(s,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[t]=e,l=(s,t)=>{for(var e in t||(t={}))A.call(t,e)&&h(s,e,t[e]);if(f)for(var e of f(t))v.call(t,e)&&h(s,e,t[e]);return s};var p=(s,t,e)=>new Promise((c,o)=>{var n=r=>{try{i(e.next(r))}catch(a){o(a)}},m=r=>{try{i(e.throw(r))}catch(a){o(a)}},i=r=>r.done?c(r.value):Promise.resolve(r.value).then(n,m);i((e=e.apply(s,t)).next())});import"./element-plus-wCU_mIQS.js";import"./vxe-BUp_tBCm.js";import{R as B,aA as R,a6 as y,aB as b,aC as E,O as I}from"./Editor-CAfYjzC4-B6h0yUhJ.js";import{useRoute as O}from"./vue-router-CRt375PS.js";import{d as C,az as k,c as U,o as w,J as $,O as g,u as _}from"./vue-BW8u1lDT.js";import{_ as q}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./@vueuse-Cj30_OSx.js";import"./dayjs-C1e0w4cr.js";import"./@element-plus-icons-vue-D-fUosFJ.js";import"./lodash-es-DyZ5XK_i.js";import"./shared-CcA2kMdO.js";import"./monaco-editor-xcHgnT1C.js";import"./html2canvas-DNSjNh3_.js";import"./mockjs-D1CwEUpV.js";import"./marked-BQZxLJfc.js";const J={class:"loading"},S=C({__name:"Auth",props:{remote:{},access:{},baseUrl:{default:"/"}},setup(s){return p(this,null,function*(){let t,e;const c=s,o=B(l(l({alert:y},R),c.access)),n=O(),m=a=>p(null,null,function*(){const d=`${c.remote||b}/api/open/user/${a}`,u=yield E(d).catch(()=>null);return!u||!u.success?(yield y("登录失败"),null):u.data}),i=n.query.token,r=i?([t,e]=k(()=>m(i)),t=yield t,e(),t):null;if(r)try{o.login(r);const a=n.query.redirect;location.href=decodeURIComponent(a||c.baseUrl)}catch(a){location.reload()}return(a,d)=>(w(),U("div",J,"正在登录中..."))})}}),z=q(S,[["__scopeId","data-v-2674e98b"]]),Z=C({__name:"auth",setup(s){return p(this,null,function*(){let t,e;const c=new I,o=([t,e]=k(()=>c.getExtension().catch(()=>null)),t=yield t,e(),t),n=o==null?void 0:o.remote,m=o==null?void 0:o.__ACCESS__;return(i,r)=>_(n)?(w(),$(_(z),{key:0,remote:_(n),access:_(m)},null,8,["remote","access"])):g("",!0)})}});export{Z as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-
|
|
2
|
-
import{d as _,J as p,u as s,al as d,o as m,K as u,aB as f,T as h,av as v}from"./vue-BW8u1lDT.js";import{z as g,c as y}from"./element-plus-wCU_mIQS.js";import{_ as r}from"./monaco-editor-xcHgnT1C.js";import{createRouter as E,createWebHashHistory as O}from"./vue-router-CRt375PS.js";import"./@vueuse-Cj30_OSx.js";import"./dayjs-C1e0w4cr.js";import"./@element-plus-icons-vue-D-fUosFJ.js";import"./lodash-es-DyZ5XK_i.js";import"./shared-CcA2kMdO.js";(function(){const o=document.createElement("link").relList;if(o&&o.supports&&o.supports("modulepreload"))return;for(const e of document.querySelectorAll('link[rel="modulepreload"]'))i(e);new MutationObserver(e=>{for(const t of e)if(t.type==="childList")for(const a of t.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&i(a)}).observe(document,{childList:!0,subtree:!0});function n(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin==="use-credentials"?t.credentials="include":e.crossOrigin==="anonymous"?t.credentials="omit":t.credentials="same-origin",t}function i(e){if(e.ep)return;e.ep=!0;const t=n(e);fetch(e.href,t)}})();const P=_({__name:"app",setup(l){return(o,n)=>{const i=d("router-view");return m(),p(s(y),{locale:s(g)},{default:u(()=>[(m(),p(f,null,{default:u(()=>[h(i)]),_:1}))]),_:1},8,["locale"])}}}),L=[{path:"/",name:"home",component:()=>r(()=>import("./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-DQ6hpoP7.js","./vue-router-CRt375PS.js","./vue-BW8u1lDT.js","./@vueuse-Cj30_OSx.js","./Editor-CAfYjzC4-B6h0yUhJ.js","./monaco-editor-xcHgnT1C.js","./monaco-editor-Cpw7ccEV.css","./element-plus-wCU_mIQS.js","./dayjs-C1e0w4cr.js","./@element-plus-icons-vue-D-fUosFJ.js","./lodash-es-DyZ5XK_i.js","./shared-CcA2kMdO.js","./element-plus-6YRlyoMW.css","./vxe-BUp_tBCm.js","./vxe-BAb1d5vW.css","./html2canvas-DNSjNh3_.js","./mockjs-D1CwEUpV.js","./marked-BQZxLJfc.js","./Editor-CAfYjzC4-CIjQSqmy.css","./utils-CSKCwugF.js","./_plugin-vue_export-helper-DlAUqK2U.js","./index-Ce7h16Vb.css","./preview-B1rKFfnr.js","./page-BpXBFM49.js","./uni-page-CWoUvEyl.js","./uni-page-Diqmj53r.css","./auth-e0Ziwu14.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{d as _,J as p,u as s,al as d,o as m,K as u,aB as f,T as h,av as v}from"./vue-BW8u1lDT.js";import{z as g,c as y}from"./element-plus-wCU_mIQS.js";import{_ as r}from"./monaco-editor-xcHgnT1C.js";import{createRouter as E,createWebHashHistory as O}from"./vue-router-CRt375PS.js";import"./@vueuse-Cj30_OSx.js";import"./dayjs-C1e0w4cr.js";import"./@element-plus-icons-vue-D-fUosFJ.js";import"./lodash-es-DyZ5XK_i.js";import"./shared-CcA2kMdO.js";(function(){const o=document.createElement("link").relList;if(o&&o.supports&&o.supports("modulepreload"))return;for(const e of document.querySelectorAll('link[rel="modulepreload"]'))i(e);new MutationObserver(e=>{for(const t of e)if(t.type==="childList")for(const a of t.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&i(a)}).observe(document,{childList:!0,subtree:!0});function n(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin==="use-credentials"?t.credentials="include":e.crossOrigin==="anonymous"?t.credentials="omit":t.credentials="same-origin",t}function i(e){if(e.ep)return;e.ep=!0;const t=n(e);fetch(e.href,t)}})();const P=_({__name:"app",setup(l){return(o,n)=>{const i=d("router-view");return m(),p(s(y),{locale:s(g)},{default:u(()=>[(m(),p(f,null,{default:u(()=>[h(i)]),_:1}))]),_:1},8,["locale"])}}}),L=[{path:"/",name:"home",component:()=>r(()=>import("./index-DQ6hpoP7.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21]),import.meta.url)},{path:"/preview/:id",name:"preview",component:()=>r(()=>import("./preview-B1rKFfnr.js"),__vite__mapDeps([22,5,6,1,2,7,3,8,9,10,11,12,13,14,4,15,16,17,18,19]),import.meta.url)},{path:"/page/:id",name:"page",component:()=>r(()=>import("./page-BpXBFM49.js"),__vite__mapDeps([23,5,6,1,2,7,3,8,9,10,11,12,13,14,4,15,16,17,18,19]),import.meta.url),meta:{pure:!0}},{path:"/pages/:id",name:"pages",component:()=>r(()=>import("./uni-page-CWoUvEyl.js"),__vite__mapDeps([24,1,2,20,25]),import.meta.url),meta:{pure:!0}},{path:"/auth",name:"auth",component:()=>r(()=>import("./auth-e0Ziwu14.js"),__vite__mapDeps([26,7,2,3,8,9,10,11,12,13,14,4,5,6,1,15,16,17,18,20]),import.meta.url)}],A=E({history:O(),routes:L}),c=v(P);c.use(A);c.mount("#app");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var O=Object.defineProperty;var E=Object.getOwnPropertySymbols;var V=Object.prototype.hasOwnProperty,W=Object.prototype.propertyIsEnumerable;var P=(o,e,t)=>e in o?O(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t,g=(o,e)=>{for(var t in e||(e={}))V.call(e,t)&&P(o,t,e[t]);if(E)for(var t of E(e))W.call(e,t)&&P(o,t,e[t]);return o};var f=(o,e,t)=>new Promise((_,r)=>{var l=n=>{try{i(t.next(n))}catch(c){r(c)}},s=n=>{try{i(t.throw(n))}catch(c){r(c)}},i=n=>n.done?_(n.value):Promise.resolve(n.value).then(l,s);i((t=t.apply(o,e)).next())});import{useRoute as X}from"./vue-router-CRt375PS.js";import{x as j}from"./@vueuse-Cj30_OSx.js";import{O as z,k as I,E as J,R as D,X as C,U as G,a as k}from"./Editor-CAfYjzC4-B6h0yUhJ.js";import"./element-plus-wCU_mIQS.js";import"./vxe-BUp_tBCm.js";import{E as K,a as v,n as S,l as L}from"./utils-CSKCwugF.js";import{d as M,b as Q,az as A,e as Y,c as Z,o as ee}from"./vue-BW8u1lDT.js";import{_ as te}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./monaco-editor-xcHgnT1C.js";import"./@element-plus-icons-vue-D-fUosFJ.js";import"./html2canvas-DNSjNh3_.js";import"./mockjs-D1CwEUpV.js";import"./dayjs-C1e0w4cr.js";import"./marked-BQZxLJfc.js";import"./lodash-es-DyZ5XK_i.js";import"./shared-CcA2kMdO.js";const ae=M({__name:"index",setup(o){return f(this,null,function*(){let e,t;const _=X(),r=Q(),l=new z(I(S)),s=([e,t]=A(()=>l.getExtension().catch(()=>null)),e=yield e,t(),e||{}),i=J({loading:L,notify:S,useTitle:j,alert:v,access:s==null?void 0:s.access}),n=D(g({alert:v},s==null?void 0:s.__ACCESS__)),c=s?([e,t]=A(()=>new K(s).load()),e=yield e,t(),e):{},{__BASE_PATH__:h="/",history:B="hash",base:w="/",pageRouteName:y="page",remote:R,auth:b,checkVersion:T=!0,enhance:F,platform:U="web"}=s||{},q=()=>B==="hash",H=a=>a==="/"?"":(a.startsWith("/")&&(a=a.substring(1)),a.endsWith("/")||(a=a+"/"),a);C.set("Switcher",{props:{onClick:a=>{const u=a.platform==="uniapp",p=location.pathname;let m=p===`${h}__vtj__/`?h:p;const d=a.currentFile;if(d&&d.type==="page"&&a.homepage!==d.id){const N=s.pageBasePath?`/${y}`:"",x=`${H(w)}${u?`pages${N}`:y}/${d.id}`;m=q()?`${m}#/${x}`:`${m}${x}`}window.open(m,"VTJProject")}}}),C.set("Previewer",{props:{path:(a,u)=>{const p=location.pathname;return u.platform==="uniapp"?`${p}uni/#/pages/${a.id}`:`${p}#/preview/${a.id}`}}});const $=new G(g({container:r,service:l,materialPath:h,pageBasePath:w==="/"?"":w,adapter:i,access:n,remote:R,auth:b,checkVersion:T,enhance:F,project:{platform:U}},c));return $.ready(()=>f(null,null,function*(){yield k(300),$.openFile(_.query.id)})),Y(()=>_.query.id,a=>f(null,null,function*(){yield k(300),$.openFile(a)})),(a,u)=>(ee(),Z("div",{class:"designer",ref_key:"container",ref:r},null,512))})}}),ye=te(ae,[["__scopeId","data-v-b20f3eda"]]);export{ye as default};
|
|
@@ -6,4 +6,4 @@ import{g as getDefaultExportFromCjs}from"./dayjs-C1e0w4cr.js";var mock$1={export
|
|
|
6
6
|
`?(g.seenCR||g.line++,g.column=1,g.seenCR=!1):$==="\r"||$==="\u2028"||$==="\u2029"?(g.line++,g.column=1,g.seenCR=!0):(g.column++,g.seenCR=!1)}return K!==e&&(K>e&&(K=0,s0={line:1,column:1,seenCR:!1}),t(s0,K,e),K=e),s0}function R(e){r0>r||(r>r0&&(r0=r,a0=[]),a0.push(e))}function u0(e){var t=0;for(e.sort();t<e.length;)e[t-1]===e[t]?e.splice(t,1):t++}function I(){var e,t,g,k,S;return e=r,t=W(),t!==null?(g=r,E.charCodeAt(r)===124?(k=L2,r++):(k=null,w===0&&R(F2)),k!==null?(S=I(),S!==null?(k=[k,S],g=k):(r=g,g=M)):(r=g,g=M),g===null&&(g=G),g!==null?(H=e,t=I2(t,g),t===null&&(r=e),e=t):(r=e,e=M)):(r=e,e=M),e}function W(){var e,t,g,k,S;if(e=r,t=z(),t===null&&(t=G),t!==null)if(g=r,w++,k=B(),w--,k===null?g=G:(r=g,g=M),g!==null){for(k=[],S=Y(),S===null&&(S=X());S!==null;)k.push(S),S=Y(),S===null&&(S=X());k!==null?(S=J(),S===null&&(S=G),S!==null?(H=e,t=q2(t,k,S),t===null&&(r=e),e=t):(r=e,e=M)):(r=e,e=M)}else r=e,e=M;else r=e,e=M;return e}function X(){var e;return e=x2(),e===null&&(e=w2(),e===null&&(e=A2())),e}function z(){var e,t;return e=r,E.charCodeAt(r)===94?(t=P0,r++):(t=null,w===0&&R(D0)),t!==null&&(H=e,t=N2()),t===null&&(r=e),e=t,e}function J(){var e,t;return e=r,E.charCodeAt(r)===36?(t=U2,r++):(t=null,w===0&&R(j2)),t!==null&&(H=e,t=B2()),t===null&&(r=e),e=t,e}function Y(){var e,t,g;return e=r,t=X(),t!==null?(g=B(),g!==null?(H=e,t=z2(t,g),t===null&&(r=e),e=t):(r=e,e=M)):(r=e,e=M),e}function B(){var e,t,g;return w++,e=r,t=q(),t!==null?(g=m2(),g===null&&(g=G),g!==null?(H=e,t=X2(t,g),t===null&&(r=e),e=t):(r=e,e=M)):(r=e,e=M),w--,e===null&&(t=null,w===0&&R(G2)),e}function q(){var e;return e=f2(),e===null&&(e=h2(),e===null&&(e=p2(),e===null&&(e=d2(),e===null&&(e=v2(),e===null&&(e=g2()))))),e}function f2(){var e,t,g,k,S,j;return e=r,E.charCodeAt(r)===123?(t=i0,r++):(t=null,w===0&&R(o0)),t!==null?(g=V(),g!==null?(E.charCodeAt(r)===44?(k=K2,r++):(k=null,w===0&&R($2)),k!==null?(S=V(),S!==null?(E.charCodeAt(r)===125?(j=O0,r++):(j=null,w===0&&R(L0)),j!==null?(H=e,t=W2(g,S),t===null&&(r=e),e=t):(r=e,e=M)):(r=e,e=M)):(r=e,e=M)):(r=e,e=M)):(r=e,e=M),e}function h2(){var e,t,g,k;return e=r,E.charCodeAt(r)===123?(t=i0,r++):(t=null,w===0&&R(o0)),t!==null?(g=V(),g!==null?(E.substr(r,2)===F0?(k=F0,r+=2):(k=null,w===0&&R(J2)),k!==null?(H=e,t=Y2(g),t===null&&(r=e),e=t):(r=e,e=M)):(r=e,e=M)):(r=e,e=M),e}function p2(){var e,t,g,k;return e=r,E.charCodeAt(r)===123?(t=i0,r++):(t=null,w===0&&R(o0)),t!==null?(g=V(),g!==null?(E.charCodeAt(r)===125?(k=O0,r++):(k=null,w===0&&R(L0)),k!==null?(H=e,t=V2(g),t===null&&(r=e),e=t):(r=e,e=M)):(r=e,e=M)):(r=e,e=M),e}function d2(){var e,t;return e=r,E.charCodeAt(r)===43?(t=_2,r++):(t=null,w===0&&R(Q2)),t!==null&&(H=e,t=Z2()),t===null&&(r=e),e=t,e}function v2(){var e,t;return e=r,E.charCodeAt(r)===42?(t=e1,r++):(t=null,w===0&&R(t1)),t!==null&&(H=e,t=n1()),t===null&&(r=e),e=t,e}function g2(){var e,t;return e=r,E.charCodeAt(r)===63?(t=I0,r++):(t=null,w===0&&R(q0)),t!==null&&(H=e,t=r1()),t===null&&(r=e),e=t,e}function m2(){var e;return E.charCodeAt(r)===63?(e=I0,r++):(e=null,w===0&&R(q0)),e}function V(){var e,t,g;if(e=r,t=[],N0.test(E.charAt(r))?(g=E.charAt(r),r++):(g=null,w===0&&R(U0)),g!==null)for(;g!==null;)t.push(g),N0.test(E.charAt(r))?(g=E.charAt(r),r++):(g=null,w===0&&R(U0));else t=M;return t!==null&&(H=e,t=a1(t)),t===null&&(r=e),e=t,e}function x2(){var e,t,g,k;return e=r,E.charCodeAt(r)===40?(t=u1,r++):(t=null,w===0&&R(l1)),t!==null?(g=C2(),g===null&&(g=E2(),g===null&&(g=b2(),g===null&&(g=y2()))),g!==null?(E.charCodeAt(r)===41?(k=i1,r++):(k=null,w===0&&R(o1)),k!==null?(H=e,t=c1(g),t===null&&(r=e),e=t):(r=e,e=M)):(r=e,e=M)):(r=e,e=M),e}function y2(){var e,t;return e=r,t=I(),t!==null&&(H=e,t=s1(t)),t===null&&(r=e),e=t,e}function b2(){var e,t,g;return e=r,E.substr(r,2)===j0?(t=j0,r+=2):(t=null,w===0&&R(f1)),t!==null?(g=I(),g!==null?(H=e,t=h1(g),t===null&&(r=e),e=t):(r=e,e=M)):(r=e,e=M),e}function C2(){var e,t,g;return e=r,E.substr(r,2)===B0?(t=B0,r+=2):(t=null,w===0&&R(p1)),t!==null?(g=I(),g!==null?(H=e,t=d1(g),t===null&&(r=e),e=t):(r=e,e=M)):(r=e,e=M),e}function E2(){var e,t,g;return e=r,E.substr(r,2)===z0?(t=z0,r+=2):(t=null,w===0&&R(v1)),t!==null?(g=I(),g!==null?(H=e,t=g1(g),t===null&&(r=e),e=t):(r=e,e=M)):(r=e,e=M),e}function w2(){var e,t,g,k,S;if(w++,e=r,E.charCodeAt(r)===91?(t=x1,r++):(t=null,w===0&&R(y1)),t!==null)if(E.charCodeAt(r)===94?(g=P0,r++):(g=null,w===0&&R(D0)),g===null&&(g=G),g!==null){for(k=[],S=f0(),S===null&&(S=_());S!==null;)k.push(S),S=f0(),S===null&&(S=_());k!==null?(E.charCodeAt(r)===93?(S=b1,r++):(S=null,w===0&&R(C1)),S!==null?(H=e,t=E1(g,k),t===null&&(r=e),e=t):(r=e,e=M)):(r=e,e=M)}else r=e,e=M;else r=e,e=M;return w--,e===null&&(t=null,w===0&&R(m1)),e}function f0(){var e,t,g,k;return w++,e=r,t=_(),t!==null?(E.charCodeAt(r)===45?(g=R1,r++):(g=null,w===0&&R(k1)),g!==null?(k=_(),k!==null?(H=e,t=A1(t,k),t===null&&(r=e),e=t):(r=e,e=M)):(r=e,e=M)):(r=e,e=M),w--,e===null&&(t=null,w===0&&R(w1)),e}function _(){var e;return w++,e=k2(),e===null&&(e=R2()),w--,e===null&&w===0&&R(M1),e}function R2(){var e,t;return e=r,H1.test(E.charAt(r))?(t=E.charAt(r),r++):(t=null,w===0&&R(T1)),t!==null&&(H=e,t=c0(t)),t===null&&(r=e),e=t,e}function k2(){var e;return e=S2(),e===null&&(e=w0(),e===null&&(e=h0(),e===null&&(e=p0(),e===null&&(e=d0(),e===null&&(e=v0(),e===null&&(e=g0(),e===null&&(e=m0(),e===null&&(e=x0(),e===null&&(e=y0(),e===null&&(e=b0(),e===null&&(e=C0(),e===null&&(e=E0(),e===null&&(e=R0(),e===null&&(e=k0(),e===null&&(e=A0(),e===null&&(e=M0(),e===null&&(e=H0()))))))))))))))))),e}function A2(){var e;return e=M2(),e===null&&(e=T2(),e===null&&(e=H2())),e}function M2(){var e,t;return e=r,E.charCodeAt(r)===46?(t=S1,r++):(t=null,w===0&&R(P1)),t!==null&&(H=e,t=D1()),t===null&&(r=e),e=t,e}function H2(){var e,t;return w++,e=r,L1.test(E.charAt(r))?(t=E.charAt(r),r++):(t=null,w===0&&R(F1)),t!==null&&(H=e,t=c0(t)),t===null&&(r=e),e=t,w--,e===null&&(t=null,w===0&&R(O1)),e}function T2(){var e;return e=P2(),e===null&&(e=D2(),e===null&&(e=w0(),e===null&&(e=h0(),e===null&&(e=p0(),e===null&&(e=d0(),e===null&&(e=v0(),e===null&&(e=g0(),e===null&&(e=m0(),e===null&&(e=x0(),e===null&&(e=y0(),e===null&&(e=b0(),e===null&&(e=C0(),e===null&&(e=E0(),e===null&&(e=O2(),e===null&&(e=R0(),e===null&&(e=k0(),e===null&&(e=A0(),e===null&&(e=M0(),e===null&&(e=H0()))))))))))))))))))),e}function S2(){var e,t;return e=r,E.substr(r,2)===Z?(t=Z,r+=2):(t=null,w===0&&R(G0)),t!==null&&(H=e,t=I1()),t===null&&(r=e),e=t,e}function P2(){var e,t;return e=r,E.substr(r,2)===Z?(t=Z,r+=2):(t=null,w===0&&R(G0)),t!==null&&(H=e,t=q1()),t===null&&(r=e),e=t,e}function D2(){var e,t;return e=r,E.substr(r,2)===X0?(t=X0,r+=2):(t=null,w===0&&R(N1)),t!==null&&(H=e,t=U1()),t===null&&(r=e),e=t,e}function h0(){var e,t;return e=r,E.substr(r,2)===K0?(t=K0,r+=2):(t=null,w===0&&R(j1)),t!==null&&(H=e,t=B1()),t===null&&(r=e),e=t,e}function p0(){var e,t;return e=r,E.substr(r,2)===$0?(t=$0,r+=2):(t=null,w===0&&R(z1)),t!==null&&(H=e,t=G1()),t===null&&(r=e),e=t,e}function d0(){var e,t;return e=r,E.substr(r,2)===W0?(t=W0,r+=2):(t=null,w===0&&R(X1)),t!==null&&(H=e,t=K1()),t===null&&(r=e),e=t,e}function v0(){var e,t;return e=r,E.substr(r,2)===J0?(t=J0,r+=2):(t=null,w===0&&R($1)),t!==null&&(H=e,t=W1()),t===null&&(r=e),e=t,e}function g0(){var e,t;return e=r,E.substr(r,2)===Y0?(t=Y0,r+=2):(t=null,w===0&&R(J1)),t!==null&&(H=e,t=Y1()),t===null&&(r=e),e=t,e}function m0(){var e,t;return e=r,E.substr(r,2)===V0?(t=V0,r+=2):(t=null,w===0&&R(V1)),t!==null&&(H=e,t=_1()),t===null&&(r=e),e=t,e}function x0(){var e,t;return e=r,E.substr(r,2)===_0?(t=_0,r+=2):(t=null,w===0&&R(Q1)),t!==null&&(H=e,t=Z1()),t===null&&(r=e),e=t,e}function y0(){var e,t;return e=r,E.substr(r,2)===Q0?(t=Q0,r+=2):(t=null,w===0&&R(e3)),t!==null&&(H=e,t=t3()),t===null&&(r=e),e=t,e}function b0(){var e,t;return e=r,E.substr(r,2)===Z0?(t=Z0,r+=2):(t=null,w===0&&R(n3)),t!==null&&(H=e,t=r3()),t===null&&(r=e),e=t,e}function C0(){var e,t;return e=r,E.substr(r,2)===e2?(t=e2,r+=2):(t=null,w===0&&R(a3)),t!==null&&(H=e,t=u3()),t===null&&(r=e),e=t,e}function E0(){var e,t;return e=r,E.substr(r,2)===t2?(t=t2,r+=2):(t=null,w===0&&R(l3)),t!==null&&(H=e,t=i3()),t===null&&(r=e),e=t,e}function w0(){var e,t,g;return e=r,E.substr(r,2)===n2?(t=n2,r+=2):(t=null,w===0&&R(o3)),t!==null?(E.length>r?(g=E.charAt(r),r++):(g=null,w===0&&R(r2)),g!==null?(H=e,t=c3(g),t===null&&(r=e),e=t):(r=e,e=M)):(r=e,e=M),e}function O2(){var e,t,g;return e=r,E.charCodeAt(r)===92?(t=a2,r++):(t=null,w===0&&R(u2)),t!==null?(s3.test(E.charAt(r))?(g=E.charAt(r),r++):(g=null,w===0&&R(f3)),g!==null?(H=e,t=h3(g),t===null&&(r=e),e=t):(r=e,e=M)):(r=e,e=M),e}function R0(){var e,t,g,k;if(e=r,E.substr(r,2)===e0?(t=e0,r+=2):(t=null,w===0&&R(l2)),t!==null){if(g=[],i2.test(E.charAt(r))?(k=E.charAt(r),r++):(k=null,w===0&&R(o2)),k!==null)for(;k!==null;)g.push(k),i2.test(E.charAt(r))?(k=E.charAt(r),r++):(k=null,w===0&&R(o2));else g=M;g!==null?(H=e,t=p3(g),t===null&&(r=e),e=t):(r=e,e=M)}else r=e,e=M;return e}function k0(){var e,t,g,k;if(e=r,E.substr(r,2)===c2?(t=c2,r+=2):(t=null,w===0&&R(d3)),t!==null){if(g=[],t0.test(E.charAt(r))?(k=E.charAt(r),r++):(k=null,w===0&&R(n0)),k!==null)for(;k!==null;)g.push(k),t0.test(E.charAt(r))?(k=E.charAt(r),r++):(k=null,w===0&&R(n0));else g=M;g!==null?(H=e,t=v3(g),t===null&&(r=e),e=t):(r=e,e=M)}else r=e,e=M;return e}function A0(){var e,t,g,k;if(e=r,E.substr(r,2)===s2?(t=s2,r+=2):(t=null,w===0&&R(g3)),t!==null){if(g=[],t0.test(E.charAt(r))?(k=E.charAt(r),r++):(k=null,w===0&&R(n0)),k!==null)for(;k!==null;)g.push(k),t0.test(E.charAt(r))?(k=E.charAt(r),r++):(k=null,w===0&&R(n0));else g=M;g!==null?(H=e,t=m3(g),t===null&&(r=e),e=t):(r=e,e=M)}else r=e,e=M;return e}function M0(){var e,t;return e=r,E.substr(r,2)===e0?(t=e0,r+=2):(t=null,w===0&&R(l2)),t!==null&&(H=e,t=x3()),t===null&&(r=e),e=t,e}function H0(){var e,t,g;return e=r,E.charCodeAt(r)===92?(t=a2,r++):(t=null,w===0&&R(u2)),t!==null?(E.length>r?(g=E.charAt(r),r++):(g=null,w===0&&R(r2)),g!==null?(H=e,t=c0(g),t===null&&(r=e),e=t):(r=e,e=M)):(r=e,e=M),e}var l0,Q=arguments.length>1?arguments[1]:{},T0={regexp:I},S0=I,M=null,G="",L2="|",F2='"|"',I2=function(e,t){return t?new u(e,t[1]):e},q2=function(e,t,g){return new a([e].concat(t).concat([g]))},P0="^",D0='"^"',N2=function(){return new n("start")},U2="$",j2='"$"',B2=function(){return new n("end")},z2=function(e,t){return new p(e,t)},G2="Quantifier",X2=function(e,t){return t&&(e.greedy=!1),e},i0="{",o0='"{"',K2=",",$2='","',O0="}",L0='"}"',W2=function(e,t){return new f(e,t)},F0=",}",J2='",}"',Y2=function(e){return new f(e,1/0)},V2=function(e){return new f(e,e)},_2="+",Q2='"+"',Z2=function(){return new f(1,1/0)},e1="*",t1='"*"',n1=function(){return new f(0,1/0)},I0="?",q0='"?"',r1=function(){return new f(0,1)},N0=/^[0-9]/,U0="[0-9]",a1=function(e){return+e.join("")},u1="(",l1='"("',i1=")",o1='")"',c1=function(e){return e},s1=function(e){return new c(e)},j0="?:",f1='"?:"',h1=function(e){return new s("non-capture-group",e)},B0="?=",p1='"?="',d1=function(e){return new s("positive-lookahead",e)},z0="?!",v1='"?!"',g1=function(e){return new s("negative-lookahead",e)},m1="CharacterSet",x1="[",y1='"["',b1="]",C1='"]"',E1=function(e,t){return new o(!!e,t)},w1="CharacterRange",R1="-",k1='"-"',A1=function(e,t){return new v(e,t)},M1="Character",H1=/^[^\\\]]/,T1="[^\\\\\\]]",c0=function(e){return new y(e)},S1=".",P1='"."',D1=function(){return new n("any-character")},O1="Literal",L1=/^[^|\\\/.[()?+*$\^]/,F1="[^|\\\\\\/.[()?+*$\\^]",Z="\\b",G0='"\\\\b"',I1=function(){return new n("backspace")},q1=function(){return new n("word-boundary")},X0="\\B",N1='"\\\\B"',U1=function(){return new n("non-word-boundary")},K0="\\d",j1='"\\\\d"',B1=function(){return new n("digit")},$0="\\D",z1='"\\\\D"',G1=function(){return new n("non-digit")},W0="\\f",X1='"\\\\f"',K1=function(){return new n("form-feed")},J0="\\n",$1='"\\\\n"',W1=function(){return new n("line-feed")},Y0="\\r",J1='"\\\\r"',Y1=function(){return new n("carriage-return")},V0="\\s",V1='"\\\\s"',_1=function(){return new n("white-space")},_0="\\S",Q1='"\\\\S"',Z1=function(){return new n("non-white-space")},Q0="\\t",e3='"\\\\t"',t3=function(){return new n("tab")},Z0="\\v",n3='"\\\\v"',r3=function(){return new n("vertical-tab")},e2="\\w",a3='"\\\\w"',u3=function(){return new n("word")},t2="\\W",l3='"\\\\W"',i3=function(){return new n("non-word")},n2="\\c",o3='"\\\\c"',r2="any character",c3=function(e){return new b(e)},a2="\\",u2='"\\\\"',s3=/^[1-9]/,f3="[1-9]",h3=function(e){return new d(e)},e0="\\0",l2='"\\\\0"',i2=/^[0-7]/,o2="[0-7]",p3=function(e){return new h(e.join(""))},c2="\\x",d3='"\\\\x"',t0=/^[0-9a-fA-F]/,n0="[0-9a-fA-F]",v3=function(e){return new C(e.join(""))},s2="\\u",g3='"\\\\u"',m3=function(e){return new m(e.join(""))},x3=function(){return new n("null-character")},r=0,H=0,K=0,s0={line:1,column:1,seenCR:!1},r0=0,a0=[],w=0;if("startRule"in Q){if(!(Q.startRule in T0))throw new Error(`Can't start parsing from rule "`+Q.startRule+'".');S0=T0[Q.startRule]}if(n.offset=F,n.text=O,l0=S0(),l0!==null&&r===E.length)return l0;throw u0(a0),H=Math.max(r,r0),new D(a0,H<E.length?E.charAt(H):null,H,U(H).line,U(H).column)}return T(D,Error),{SyntaxError:D,parse:N}})(),P=1,L={};l.exports=A}),(function(l,x,n){var u=n(3),a=n(5),s={extend:u.extend},c=C(97,122),p=C(65,90),f=C(48,57),o=C(32,47)+C(58,64)+C(91,96)+C(123,126),v=C(32,126),y=` \f
|
|
7
7
|
\r \v \u2028\u2029`,m={"\\w":c+p+f+"_","\\W":o.replace("_",""),"\\s":y,"\\S":(function(){for(var h=v,d=0;d<y.length;d++)h=h.replace(y[d],"");return h})(),"\\d":f,"\\D":c+p+o};function C(h,d){for(var b="",A=h;A<=d;A++)b+=String.fromCharCode(A);return b}s.gen=function(h,d,b){return b=b||{guid:1},s[h.type]?s[h.type](h,d,b):s.token(h,d,b)},s.extend({token:function(h,d,b){switch(h.type){case"start":case"end":return"";case"any-character":return a.character();case"backspace":return"";case"word-boundary":return"";case"non-word-boundary":break;case"digit":return a.pick(f.split(""));case"non-digit":return a.pick((c+p+o).split(""));case"form-feed":break;case"line-feed":return h.body||h.text;case"carriage-return":break;case"white-space":return a.pick(y.split(""));case"non-white-space":return a.pick((c+p+f).split(""));case"tab":break;case"vertical-tab":break;case"word":return a.pick((c+p+f).split(""));case"non-word":return a.pick(o.replace("_","").split(""))}return h.body||h.text},alternate:function(h,d,b){return this.gen(a.boolean()?h.left:h.right,d,b)},match:function(h,d,b){d="";for(var A=0;A<h.body.length;A++)d+=this.gen(h.body[A],d,b);return d},"capture-group":function(h,d,b){return d=this.gen(h.body,d,b),b[b.guid++]=d,d},"non-capture-group":function(h,d,b){return this.gen(h.body,d,b)},"positive-lookahead":function(h,d,b){return this.gen(h.body,d,b)},"negative-lookahead":function(h,d,b){return""},quantified:function(h,d,b){d="";for(var A=this.quantifier(h.quantifier),P=0;P<A;P++)d+=this.gen(h.body,d,b);return d},quantifier:function(h,d,b){var A=Math.max(h.min,0),P=isFinite(h.max)?h.max:A+a.integer(3,7);return a.integer(A,P)},charset:function(h,d,b){if(h.invert)return this["invert-charset"](h,d,b);var A=a.pick(h.body);return this.gen(A,d,b)},"invert-charset":function(h,d,b){for(var A=v,P=0,L;P<h.body.length;P++)switch(L=h.body[P],L.type){case"literal":A=A.replace(L.body,"");break;case"range":for(var T=this.gen(L.start,d,b).charCodeAt(),D=this.gen(L.end,d,b).charCodeAt(),N=T;N<=D;N++)A=A.replace(String.fromCharCode(N),"");default:var E=m[L.text];if(E)for(var O=0;O<=E.length;O++)A=A.replace(E[O],"")}return a.pick(A.split(""))},range:function(h,d,b){var A=this.gen(h.start,d,b).charCodeAt(),P=this.gen(h.end,d,b).charCodeAt();return String.fromCharCode(a.integer(A,P))},literal:function(h,d,b){return h.escaped?h.body:h.text},unicode:function(h,d,b){return String.fromCharCode(parseInt(h.code,16))},hex:function(h,d,b){return String.fromCharCode(parseInt(h.code,16))},octal:function(h,d,b){return String.fromCharCode(parseInt(h.code,8))},"back-reference":function(h,d,b){return b[h.code]||""},CONTROL_CHARACTER_MAP:(function(){for(var h="@ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \\ ] ^ _".split(" "),d=`\0 \x07 \b
|
|
8
8
|
\v \f \r \x1B `.split(" "),b={},A=0;A<h.length;A++)b[h[A]]=d[A];return b})(),"control-character":function(h,d,b){return this.CONTROL_CHARACTER_MAP[h.code]}}),l.exports=s}),(function(l,x,n){l.exports=n(24)}),(function(l,x,n){var u=n(2),a=n(3),s=n(4);function c(p,f,o){o=o||[];var v={name:typeof f=="string"?f.replace(u.RE_KEY,"$1"):f,template:p,type:a.type(p),rule:s.parse(f)};switch(v.path=o.slice(0),v.path.push(f===void 0?"ROOT":v.name),v.type){case"array":v.items=[],a.each(p,function(y,m){v.items.push(c(y,m,v.path))});break;case"object":v.properties=[],a.each(p,function(y,m){v.properties.push(c(y,m,v.path))});break}return v}l.exports=c}),(function(l,x,n){l.exports=n(26)}),(function(l,x,n){var u=n(2),a=n(3),s=n(23);function c(o,v){for(var y=s(o),m=p.diff(y,v),C=0;C<m.length;C++);return m}var p={diff:function(v,y,m){var C=[];return this.name(v,y,m,C)&&this.type(v,y,m,C)&&(this.value(v,y,m,C),this.properties(v,y,m,C),this.items(v,y,m,C)),C},name:function(o,v,y,m){var C=m.length;return f.equal("name",o.path,y+"",o.name+"",m),m.length===C},type:function(o,v,y,m){var C=m.length;switch(o.type){case"string":if(o.template.match(u.RE_PLACEHOLDER))return!0;break;case"array":if(o.rule.parameters&&(o.rule.min!==void 0&&o.rule.max===void 0&&o.rule.count===1||o.rule.parameters[2]))return!0;break;case"function":return!0}return f.equal("type",o.path,a.type(v),o.type,m),m.length===C},value:function(o,v,y,m){var C=m.length,h=o.rule,d=o.type;if(d==="object"||d==="array"||d==="function")return!0;if(!h.parameters){switch(d){case"regexp":return f.match("value",o.path,v,o.template,m),m.length===C;case"string":if(o.template.match(u.RE_PLACEHOLDER))return m.length===C;break}return f.equal("value",o.path,v,o.template,m),m.length===C}var b;switch(d){case"number":var A=(v+"").split(".");A[0]=+A[0],h.min!==void 0&&h.max!==void 0&&(f.greaterThanOrEqualTo("value",o.path,A[0],Math.min(h.min,h.max),m),f.lessThanOrEqualTo("value",o.path,A[0],Math.max(h.min,h.max),m)),h.min!==void 0&&h.max===void 0&&f.equal("value",o.path,A[0],h.min,m,"[value] "+y),h.decimal&&(h.dmin!==void 0&&h.dmax!==void 0&&(f.greaterThanOrEqualTo("value",o.path,A[1].length,h.dmin,m),f.lessThanOrEqualTo("value",o.path,A[1].length,h.dmax,m)),h.dmin!==void 0&&h.dmax===void 0&&f.equal("value",o.path,A[1].length,h.dmin,m));break;case"boolean":break;case"string":b=v.match(new RegExp(o.template,"g")),b=b?b.length:0,h.min!==void 0&&h.max!==void 0&&(f.greaterThanOrEqualTo("repeat count",o.path,b,h.min,m),f.lessThanOrEqualTo("repeat count",o.path,b,h.max,m)),h.min!==void 0&&h.max===void 0&&f.equal("repeat count",o.path,b,h.min,m);break;case"regexp":b=v.match(new RegExp(o.template.source.replace(/^\^|\$$/g,""),"g")),b=b?b.length:0,h.min!==void 0&&h.max!==void 0&&(f.greaterThanOrEqualTo("repeat count",o.path,b,h.min,m),f.lessThanOrEqualTo("repeat count",o.path,b,h.max,m)),h.min!==void 0&&h.max===void 0&&f.equal("repeat count",o.path,b,h.min,m);break}return m.length===C},properties:function(o,v,y,m){var C=m.length,h=o.rule,d=a.keys(v);if(o.properties){if(o.rule.parameters?(h.min!==void 0&&h.max!==void 0&&(f.greaterThanOrEqualTo("properties length",o.path,d.length,Math.min(h.min,h.max),m),f.lessThanOrEqualTo("properties length",o.path,d.length,Math.max(h.min,h.max),m)),h.min!==void 0&&h.max===void 0&&h.count!==1&&f.equal("properties length",o.path,d.length,h.min,m)):f.equal("properties length",o.path,d.length,o.properties.length,m),m.length!==C)return!1;for(var b=0;b<d.length;b++)m.push.apply(m,this.diff((function(){var A;return a.each(o.properties,function(P){P.name===d[b]&&(A=P)}),A||o.properties[b]})(),v[d[b]],d[b]));return m.length===C}},items:function(o,v,y,m){var C=m.length;if(o.items){var h=o.rule;if(!o.rule.parameters)f.equal("items length",o.path,v.length,o.items.length,m);else{if(h.min!==void 0&&h.max!==void 0&&(f.greaterThanOrEqualTo("items",o.path,v.length,Math.min(h.min,h.max)*o.items.length,m,"[{utype}] array is too short: {path} must have at least {expected} elements but instance has {actual} elements"),f.lessThanOrEqualTo("items",o.path,v.length,Math.max(h.min,h.max)*o.items.length,m,"[{utype}] array is too long: {path} must have at most {expected} elements but instance has {actual} elements")),h.min!==void 0&&h.max===void 0){if(h.count===1)return m.length===C;f.equal("items length",o.path,v.length,h.min*o.items.length,m)}if(h.parameters[2])return m.length===C}if(m.length!==C)return!1;for(var d=0;d<v.length;d++)m.push.apply(m,this.diff(o.items[d%o.items.length],v[d],d%o.items.length));return m.length===C}}},f={message:function(o){return(o.message||"[{utype}] Expect {path}'{ltype} {action} {expected}, but is {actual}").replace("{utype}",o.type.toUpperCase()).replace("{ltype}",o.type.toLowerCase()).replace("{path}",a.isArray(o.path)&&o.path.join(".")||o.path).replace("{action}",o.action).replace("{expected}",o.expected).replace("{actual}",o.actual)},equal:function(o,v,y,m,C,h){if(y===m)return!0;switch(o){case"type":if(m==="regexp"&&y==="string")return!0;break}var d={path:v,type:o,actual:y,expected:m,action:"is equal to",message:h};return d.message=f.message(d),C.push(d),!1},match:function(o,v,y,m,C,h){if(m.test(y))return!0;var d={path:v,type:o,actual:y,expected:m,action:"matches",message:h};return d.message=f.message(d),C.push(d),!1},notEqual:function(o,v,y,m,C,h){if(y!==m)return!0;var d={path:v,type:o,actual:y,expected:m,action:"is not equal to",message:h};return d.message=f.message(d),C.push(d),!1},greaterThan:function(o,v,y,m,C,h){if(y>m)return!0;var d={path:v,type:o,actual:y,expected:m,action:"is greater than",message:h};return d.message=f.message(d),C.push(d),!1},lessThan:function(o,v,y,m,C,h){if(y<m)return!0;var d={path:v,type:o,actual:y,expected:m,action:"is less to",message:h};return d.message=f.message(d),C.push(d),!1},greaterThanOrEqualTo:function(o,v,y,m,C,h){if(y>=m)return!0;var d={path:v,type:o,actual:y,expected:m,action:"is greater than or equal to",message:h};return d.message=f.message(d),C.push(d),!1},lessThanOrEqualTo:function(o,v,y,m,C,h){if(y<=m)return!0;var d={path:v,type:o,actual:y,expected:m,action:"is less than or equal to",message:h};return d.message=f.message(d),C.push(d),!1}};c.Diff=p,c.Assert=f,l.exports=c}),(function(l,x,n){l.exports=n(28)}),(function(l,x,n){var u=n(3);window._XMLHttpRequest=window.XMLHttpRequest,window._ActiveXObject=window.ActiveXObject;try{new window.Event("custom")}catch(C){window.Event=function(h,d,b,A){var P=document.createEvent("CustomEvent");return P.initCustomEvent(h,d,b,A),P}}var a={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},s="readystatechange loadstart progress abort error load timeout loadend".split(" "),c="timeout withCredentials".split(" "),p="readyState responseURL status statusText responseType response responseText responseXML".split(" "),f={200:"OK"};function o(){this.custom={events:{},requestHeaders:{},responseHeaders:{}}}o._settings={timeout:"10-100"},o.setup=function(C){return u.extend(o._settings,C),o._settings},u.extend(o,a),u.extend(o.prototype,a),o.prototype.mock=!0,o.prototype.match=!1,u.extend(o.prototype,{open:function(C,h,d,b,A){var P=this;u.extend(this.custom,{method:C,url:h,async:typeof d=="boolean"?d:!0,username:b,password:A,options:{url:h,type:C}}),this.custom.timeout=(function(O){if(typeof O=="number")return O;if(typeof O=="string"&&!~O.indexOf("-"))return parseInt(O,10);if(typeof O=="string"&&~O.indexOf("-")){var F=O.split("-"),U=parseInt(F[0],10),R=parseInt(F[1],10);return Math.round(Math.random()*(R-U))+U}})(o._settings.timeout);var L=y(this.custom.options);function T(O){for(var F=0;F<p.length;F++)try{P[p[F]]=D[p[F]]}catch(U){}P.dispatchEvent(new Event(O.type))}if(!L){var D=v();this.custom.xhr=D;for(var N=0;N<s.length;N++)D.addEventListener(s[N],T);b?D.open(C,h,d,b,A):D.open(C,h,d);for(var E=0;E<c.length;E++)try{D[c[E]]=P[c[E]]}catch(O){}return}this.match=!0,this.custom.template=L,this.readyState=o.OPENED,this.dispatchEvent(new Event("readystatechange"))},setRequestHeader:function(C,h){if(!this.match){this.custom.xhr.setRequestHeader(C,h);return}var d=this.custom.requestHeaders;d[C]?d[C]+=","+h:d[C]=h},timeout:0,withCredentials:!1,upload:{},send:function(h){var d=this;if(this.custom.options.body=h,!this.match){this.custom.xhr.send(h);return}this.setRequestHeader("X-Requested-With","MockXMLHttpRequest"),this.dispatchEvent(new Event("loadstart")),this.custom.async?setTimeout(b,this.custom.timeout):b();function b(){d.readyState=o.HEADERS_RECEIVED,d.dispatchEvent(new Event("readystatechange")),d.readyState=o.LOADING,d.dispatchEvent(new Event("readystatechange")),d.status=200,d.statusText=f[200],d.response=d.responseText=JSON.stringify(m(d.custom.template,d.custom.options),null,4),d.readyState=o.DONE,d.dispatchEvent(new Event("readystatechange")),d.dispatchEvent(new Event("load")),d.dispatchEvent(new Event("loadend"))}},abort:function(){if(!this.match){this.custom.xhr.abort();return}this.readyState=o.UNSENT,this.dispatchEvent(new Event("abort",!1,!1,this)),this.dispatchEvent(new Event("error",!1,!1,this))}}),u.extend(o.prototype,{responseURL:"",status:o.UNSENT,statusText:"",getResponseHeader:function(C){return this.match?this.custom.responseHeaders[C.toLowerCase()]:this.custom.xhr.getResponseHeader(C)},getAllResponseHeaders:function(){if(!this.match)return this.custom.xhr.getAllResponseHeaders();var C=this.custom.responseHeaders,h="";for(var d in C)C.hasOwnProperty(d)&&(h+=d+": "+C[d]+`\r
|
|
9
|
-
`);return h},overrideMimeType:function(){},responseType:"",response:null,responseText:"",responseXML:null}),u.extend(o.prototype,{addEventListener:function(h,d){var b=this.custom.events;b[h]||(b[h]=[]),b[h].push(d)},removeEventListener:function(h,d){for(var b=this.custom.events[h]||[],A=0;A<b.length;A++)b[A]===d&&b.splice(A--,1)},dispatchEvent:function(h){for(var d=this.custom.events[h.type]||[],b=0;b<d.length;b++)d[b].call(this,h);var A="on"+h.type;this[A]&&this[A](h)}});function v(){var C=(function(){var b=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,A=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,P=location.href,L=A.exec(P.toLowerCase())||[];return b.test(L[1])})();return window.ActiveXObject?!C&&h()||d():h();function h(){try{return new window._XMLHttpRequest}catch(b){}}function d(){try{return new window._ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}}function y(C){for(var h in o.Mock._mocked){var d=o.Mock._mocked[h];if((!d.rurl||b(d.rurl,C.url))&&(!d.rtype||b(d.rtype,C.type.toLowerCase())))return d}function b(A,P){if(u.type(A)==="string")return A===P;if(u.type(A)==="regexp")return A.test(P)}}function m(C,h){return u.isFunction(C.template)?C.template(h):o.Mock.mock(C.template)}l.exports=o})])})})(mock$1)),mock$1.exports}var mockExports=requireMock();const
|
|
9
|
+
`);return h},overrideMimeType:function(){},responseType:"",response:null,responseText:"",responseXML:null}),u.extend(o.prototype,{addEventListener:function(h,d){var b=this.custom.events;b[h]||(b[h]=[]),b[h].push(d)},removeEventListener:function(h,d){for(var b=this.custom.events[h]||[],A=0;A<b.length;A++)b[A]===d&&b.splice(A--,1)},dispatchEvent:function(h){for(var d=this.custom.events[h.type]||[],b=0;b<d.length;b++)d[b].call(this,h);var A="on"+h.type;this[A]&&this[A](h)}});function v(){var C=(function(){var b=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,A=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,P=location.href,L=A.exec(P.toLowerCase())||[];return b.test(L[1])})();return window.ActiveXObject?!C&&h()||d():h();function h(){try{return new window._XMLHttpRequest}catch(b){}}function d(){try{return new window._ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}}function y(C){for(var h in o.Mock._mocked){var d=o.Mock._mocked[h];if((!d.rurl||b(d.rurl,C.url))&&(!d.rtype||b(d.rtype,C.type.toLowerCase())))return d}function b(A,P){if(u.type(A)==="string")return A===P;if(u.type(A)==="regexp")return A.test(P)}}function m(C,h){return u.isFunction(C.template)?C.template(h):o.Mock.mock(C.template)}l.exports=o})])})})(mock$1)),mock$1.exports}var mockExports=requireMock();const pc=getDefaultExportFromCjs(mockExports);export{pc as p};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./vue-router-CRt375PS.js","./vue-BW8u1lDT.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
var P=Object.defineProperty;var y=Object.getOwnPropertySymbols;var R=Object.prototype.hasOwnProperty,g=Object.prototype.propertyIsEnumerable;var w=(o,t,e)=>t in o?P(o,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[t]=e,E=(o,t)=>{for(var e in t||(t={}))R.call(t,e)&&w(o,e,t[e]);if(y)for(var e of y(t))g.call(t,e)&&w(o,e,t[e]);return o};var c=(o,t,e)=>new Promise((_,s)=>{var u=r=>{try{p(e.next(r))}catch(i){s(i)}},d=r=>{try{p(e.throw(r))}catch(i){s(i)}},p=r=>r.done?_(r.value):Promise.resolve(r.value).then(u,d);p((e=e.apply(o,t)).next())});import{_ as x}from"./monaco-editor-xcHgnT1C.js";import{useRoute as h}from"./vue-router-CRt375PS.js";import"./element-plus-wCU_mIQS.js";import"./vxe-BUp_tBCm.js";import{O as k,k as O,E as V,A as T,w as b,Y as B,b as D}from"./Editor-CAfYjzC4-B6h0yUhJ.js";import{a as I,n as A,l as L,E as S}from"./utils-CSKCwugF.js";import{x as Y}from"./@vueuse-Cj30_OSx.js";import{d as z,az as C,b as H,e as J,J as N,O as j,P as q,o as F,k as G}from"./vue-BW8u1lDT.js";import"./dayjs-C1e0w4cr.js";import"./@element-plus-icons-vue-D-fUosFJ.js";import"./lodash-es-DyZ5XK_i.js";import"./shared-CcA2kMdO.js";import"./html2canvas-DNSjNh3_.js";import"./mockjs-D1CwEUpV.js";import"./marked-BQZxLJfc.js";const it=z({__name:"page",setup(o){return c(this,null,function*(){let t,e;const _=new k(O(A)),s=([t,e]=C(()=>_.getExtension().catch(()=>null)),t=yield t,e(),t),u=V({loading:L,notify:A,useTitle:Y,alert:I,access:s==null?void 0:s.access}),d=s?([t,e]=C(()=>new S(s).load()),t=yield t,e(),t):{},{__BASE_PATH__:p="/"}=s||{},{provider:r,onReady:i}=T({mode:b.Runtime,service:_,materialPath:p,adapter:E(E({},u),d.adapter),dependencies:{Vue:()=>x(()=>import("./vue-BW8u1lDT.js").then(a=>a.aA),[],import.meta.url),VueRouter:()=>x(()=>import("./vue-router-CRt375PS.js"),__vite__mapDeps([0,1]),import.meta.url)}}),l=h(),f=H(),n=G(),v=a=>c(null,null,function*(){f.value=yield r.getRenderComponent(l.params.id.toString(),m=>{D(a,l,m)})});return i(()=>c(null,null,function*(){const a=n==null?void 0:n.appContext.app;a&&(a.use(B),a.use(r),v(a))})),J(()=>l.params.id,a=>c(null,null,function*(){if(a){const m=n==null?void 0:n.appContext.app;if(!m)return;v(m)}})),(a,m)=>f.value?(F(),N(q(f.value),{key:0})):j("",!0)})}});export{it as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./vue-router-CRt375PS.js","./vue-BW8u1lDT.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
var C=Object.defineProperty;var E=Object.getOwnPropertySymbols;var R=Object.prototype.hasOwnProperty,k=Object.prototype.propertyIsEnumerable;var w=(o,e,t)=>e in o?C(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t,d=(o,e)=>{for(var t in e||(e={}))R.call(e,t)&&w(o,t,e[t]);if(E)for(var t of E(e))k.call(e,t)&&w(o,t,e[t]);return o};var f=(o,e,t)=>new Promise((c,s)=>{var _=a=>{try{i(t.next(a))}catch(p){s(p)}},n=a=>{try{i(t.throw(a))}catch(p){s(p)}},i=a=>a.done?c(a.value):Promise.resolve(a.value).then(_,n);i((t=t.apply(o,e)).next())});import{_ as A}from"./monaco-editor-xcHgnT1C.js";import{useRoute as P}from"./vue-router-CRt375PS.js";import"./element-plus-wCU_mIQS.js";import"./vxe-BUp_tBCm.js";import{O as I,k as O,E as V,A as g,w as T,I as b,Y as B,b as D}from"./Editor-CAfYjzC4-B6h0yUhJ.js";import{a as L,n as h,l as S,E as Y}from"./utils-CSKCwugF.js";import{x as z}from"./@vueuse-Cj30_OSx.js";import{d as H,az as x,b as J,J as N,O as j,P as q,o as F,k as G}from"./vue-BW8u1lDT.js";import"./dayjs-C1e0w4cr.js";import"./@element-plus-icons-vue-D-fUosFJ.js";import"./lodash-es-DyZ5XK_i.js";import"./shared-CcA2kMdO.js";import"./html2canvas-DNSjNh3_.js";import"./mockjs-D1CwEUpV.js";import"./marked-BQZxLJfc.js";const pe=H({__name:"preview",setup(o){return f(this,null,function*(){let e,t;const c=new I(O(h)),s=([e,t]=x(()=>c.getExtension().catch(()=>null)),e=yield e,t(),e||{}),_=V({loading:S,notify:h,useTitle:z,alert:L,access:s==null?void 0:s.access}),n=s?([e,t]=x(()=>new Y(s).load()),e=yield e,t(),e):{},{__BASE_PATH__:i="/"}=s||{},{provider:a,onReady:p}=g({mode:T.Runtime,service:c,materialPath:i,adapter:d(d({},_),n.adapter),dependencies:{Vue:()=>A(()=>import("./vue-BW8u1lDT.js").then(m=>m.aA),[],import.meta.url),VueRouter:()=>A(()=>import("./vue-router-CRt375PS.js"),__vite__mapDeps([0,1]),import.meta.url)}}),v=P(),u=J(),l=G();return p(()=>f(null,null,function*(){const m=yield b(s.enhance),r=l==null?void 0:l.appContext.app;r&&(n.install&&n.install(r),m&&r.use(m,a),r.use(B),r.use(a),u.value=yield a.getRenderComponent(v.params.id.toString(),y=>{D(r,v,y)}))})),(m,r)=>u.value?(F(),N(q(u.value),{key:0})):j("",!0)})}});export{pe as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var m=Object.defineProperty;var g=Object.getOwnPropertySymbols;var u=Object.prototype.hasOwnProperty,O=Object.prototype.propertyIsEnumerable;var S=(t,a,s)=>a in t?m(t,a,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[a]=s,l=(t,a)=>{for(var s in a||(a={}))u.call(a,s)&&S(t,s,a[s]);if(g)for(var s of g(a))O.call(a,s)&&S(t,s,a[s]);return t};var E=(t,a,s)=>S(t,typeof a!="symbol"?a+"":a,s);var T=(t,a,s)=>new Promise((o,n)=>{var e=r=>{try{i(s.next(r))}catch(_){n(_)}},c=r=>{try{i(s.throw(r))}catch(_){n(_)}},i=r=>r.done?o(r.value):Promise.resolve(r.value).then(e,c);i((s=s.apply(t,a)).next())});import{aA as d}from"./vue-BW8u1lDT.js";import{c as V,d as f,z as A,o as h,e as I,j as P,M as b,f as R,g as M,U as y,v as B,W as C,J as L,K as N,h as D,B as k,$ as K,P as x,L as H,C as W,F as w,i as U,l as X,x as Y,H as G,m as j,n as F,p as $,q as v,r as z,N as J,s as Z,S as q,t as Q,u as aa,V as sa,y as ea,D as ta,G as ra,Q as na,T as ia,Z as oa,_ as _a,a0 as Ea,a1 as la,a2 as ca,a3 as Sa,a4 as ga,a5 as Ta,a6 as pa,a7 as ma,a8 as ua,a9 as Oa,aa as da,ab as Va,ac as fa,ad as Aa,ae as ha,af as Ia,ag as Pa,ah as ba,ai as Ra,aj as Ma,ak as ya,al as Ba,am as Ca,an as La,ao as Na,ap as Da,aq as ka,ar as Ka,X as xa,as as Ha,at as Wa,au as wa,av as Ua,aw as Xa,ax as Ya,ay as Ga,az as ja}from"./Editor-CAfYjzC4-B6h0yUhJ.js";import{E as Fa,a as $a,b as va}from"./element-plus-wCU_mIQS.js";const za=Object.freeze(Object.defineProperty({__proto__:null,API_METHOD_TYPES:V,ActionMenu:f,Assets:A,Binder:h,Box:I,DEVTOOLS_DEP:P,Designer:b,EVENT_MODIFIERS:R,Editor:M,Engine:y,EventBinder:B,GET_TOKENS_LINK:C,HOT_KEYS_DEP:L,Icon:N,Item:D,KEYBOARD_EVENT_LIST:k,MAX_TOKENS:K,MOBILE_SIZE:x,MOUSE_EVENT_LIST:H,NAME_REGEX:W,NPM_REGISTRY_URL:w,OpenApi:U,PAD_SIZE:X,Panel:Y,REPORT_API:G,RegionType:j,RegionWrapper:F,Renderer:$,SAVE_BLOCK_FILE_FINISH:v,SESSION_ID_KEY:z,STATE_KEY:J,SetterView:Z,SetterWrapper:q,Simulator:Q,Skeleton:aa,SkeletonWrapper:sa,SlotsPicker:ea,State:ta,Tabs:ra,VERSION_REGEX:na,VTJ_DESIGNER_VERSION:ia,VUE_DEVTOOLS_FRAME_STATE_KEY:oa,VUE_DEVTOOLS_OVERLAY_PATH:_a,VUE_DEVTOOLS_PATH:Ea,VariableBinder:la,Viewer:ca,Viewport:Sa,WidgetGroup:ga,WidgetWrapper:Ta,alert:pa,builtInDeps:ma,builtInMaterials:ua,builtInSetters:Oa,builtInWidgets:da,confirm:Va,createSlotsPicker:fa,defaultSetter:Aa,depsManager:ha,engineKey:Ia,expressionValidate:Pa,getClassProperties:ba,loading:Ra,message:Ma,normalizedStyle:ya,notify:Ba,proxyContext:Ca,readJsonFile:La,regions:Na,setterManager:Da,setters:ka,useEngine:Ka,widgetManager:xa,widgets:Ha},Symbol.toStringTag,{value:"Module"}));class as{constructor(a){E(this,"urls",[]);E(this,"library","");E(this,"params",[]);E(this,"__BASE_PATH__","/");this.config=a;const s=l(l(l({},wa),za),Wa),o={Vue:d,__VTJ_PRO__:s};for(const[_,p]of Object.entries(o))window[_]=p;const{extension:n,__BASE_PATH__:e="/"}=a||{},{urls:c=[],library:i,params:r=[]}=n||{};i&&(this.urls=c,this.library=i,this.params=r,this.__BASE_PATH__=e)}load(){return T(this,null,function*(){let a={};if(this.library){const s=this.__BASE_PATH__,o=this.urls.filter(e=>Ua(e)).map(e=>`${s}${e}`),n=this.urls.filter(e=>Xa(e)).map(e=>`${s}${e}`);if(Ya(o),n.length){const e=yield Ga(n,this.library).catch(()=>null);e&&typeof e=="function"?a=e.call(e,this.config,...this.params):a=e||{}}}return Object.assign({},this.getEngineOptions(),a)})}getEngineOptions(){const a=["materialPath","pageBasePath","pageRouteName","remote","checkVersion","noMask"];return ja(this.config,a)}}function ss(){return va.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"})}function es(t,a="",s="warning"){$a({title:a,message:t,type:s})}function ts(t,a){return Fa.alert(t,a)}export{as as E,ts as a,ss as l,es as n};
|
package/dist/index.html
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
<meta http-equiv="Expires" content="0" />
|
|
12
12
|
<title>低代码设计器 - VTJ.PRO</title>
|
|
13
13
|
<script>
|
|
14
|
-
var __BUILD_TIME__ = '
|
|
14
|
+
var __BUILD_TIME__ = '1761630641936';
|
|
15
15
|
(function () {
|
|
16
16
|
const regex = /<!--{{(\d*)}}-->/;
|
|
17
17
|
window.fetch('?t=' + Date.now()).then(async (res) => {
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
});
|
|
28
28
|
})();
|
|
29
29
|
</script>
|
|
30
|
-
<!--{{
|
|
30
|
+
<!--{{1761630641936}}-->
|
|
31
31
|
|
|
32
|
-
<script type="module" crossorigin src="./assets/index-
|
|
32
|
+
<script type="module" crossorigin src="./assets/index-CUoc_DED.js"></script>
|
|
33
33
|
<link rel="modulepreload" crossorigin href="./assets/vue-BW8u1lDT.js">
|
|
34
34
|
<link rel="modulepreload" crossorigin href="./assets/@vueuse-Cj30_OSx.js">
|
|
35
35
|
<link rel="modulepreload" crossorigin href="./assets/dayjs-C1e0w4cr.js">
|
|
@@ -46,7 +46,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
46
46
|
* Copyright (c) 2025, VTJ.PRO All rights reserved.
|
|
47
47
|
* @name @vtj/core
|
|
48
48
|
* @author CHC chenhuachun1549@dingtalk.com
|
|
49
|
-
* @version 0.13.
|
|
49
|
+
* @version 0.13.33
|
|
50
50
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
|
51
51
|
*/const cg="VueMaterial",lg="VueRouterMaterial",fg={[cg]:["Transition","TransitionGroup","KeepAlive","Teleport","Suspense"],[lg]:["RouterView","RouterLink"]};let hg=class{constructor(){z(this,"listeners",[]);z(this,"isReady",!1)}triggerReady(){this.isReady=!0;for(const t of this.listeners)t();this.listeners=[]}ready(t){this.isReady?t():this.listeners.push(t)}resetReady(){this.isReady=!1}};var pg=Object.defineProperty,dg=(e,t,r)=>t in e?pg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ft=(e,t,r)=>dg(e,typeof t!="symbol"?t+"":t,r);(function(){if(typeof window>"u"||typeof EventTarget>"u")return;const e=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(t,r,n){typeof n!="boolean"&&(n=n||{},n.passive=!1),e.call(this,t,r,n)}})();function $o(e,t){return function(){return e.apply(t,arguments)}}const{toString:gg}=Object.prototype,{getPrototypeOf:_n}=Object,{iterator:sr,toStringTag:Oo}=Symbol,or=(e=>t=>{const r=gg.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),vt=e=>(e=e.toLowerCase(),t=>or(t)===e),ar=e=>t=>typeof t===e,{isArray:ce}=Array,Ee=ar("undefined");function Ae(e){return e!==null&&!Ee(e)&&e.constructor!==null&&!Ee(e.constructor)&&at(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const jo=vt("ArrayBuffer");function mg(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&jo(e.buffer),t}const yg=ar("string"),at=ar("function"),Do=ar("number"),Re=e=>e!==null&&typeof e=="object",vg=e=>e===!0||e===!1,Ve=e=>{if(or(e)!=="object")return!1;const t=_n(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Oo in e)&&!(sr in e)},bg=e=>{if(!Re(e)||Ae(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},wg=vt("Date"),_g=vt("File"),Eg=vt("Blob"),Sg=vt("FileList"),xg=e=>Re(e)&&at(e.pipe),Tg=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||at(e.append)&&((t=or(e))==="formdata"||t==="object"&&at(e.toString)&&e.toString()==="[object FormData]"))},Ag=vt("URLSearchParams"),[Rg,$g,Og,jg]=["ReadableStream","Request","Response","Headers"].map(vt),Dg=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function $e(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,i;if(typeof e!="object"&&(e=[e]),ce(e))for(n=0,i=e.length;n<i;n++)t.call(null,e[n],n,e);else{if(Ae(e))return;const s=r?Object.getOwnPropertyNames(e):Object.keys(e),o=s.length;let u;for(n=0;n<o;n++)u=s[n],t.call(null,e[u],u,e)}}function Bo(e,t){if(Ae(e))return null;t=t.toLowerCase();const r=Object.keys(e);let n=r.length,i;for(;n-- >0;)if(i=r[n],t===i.toLowerCase())return i;return null}const Vt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Co=e=>!Ee(e)&&e!==Vt;function Jr(){const{caseless:e}=Co(this)&&this||{},t={},r=(n,i)=>{const s=e&&Bo(t,i)||i;Ve(t[s])&&Ve(n)?t[s]=Jr(t[s],n):Ve(n)?t[s]=Jr({},n):ce(n)?t[s]=n.slice():t[s]=n};for(let n=0,i=arguments.length;n<i;n++)arguments[n]&&$e(arguments[n],r);return t}const Bg=(e,t,r,{allOwnKeys:n}={})=>($e(t,(i,s)=>{r&&at(i)?e[s]=$o(i,r):e[s]=i},{allOwnKeys:n}),e),Cg=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Ng=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},Pg=(e,t,r,n)=>{let i,s,o;const u={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),s=i.length;s-- >0;)o=i[s],(!n||n(o,e,t))&&!u[o]&&(t[o]=e[o],u[o]=!0);e=r!==!1&&_n(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},Ig=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},kg=e=>{if(!e)return null;if(ce(e))return e;let t=e.length;if(!Do(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},Fg=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&_n(Uint8Array)),Mg=(e,t)=>{const r=(e&&e[sr]).call(e);let n;for(;(n=r.next())&&!n.done;){const i=n.value;t.call(e,i[0],i[1])}},Ug=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},Lg=vt("HTMLFormElement"),Vg=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,r,n){return r.toUpperCase()+n}),ki=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),Hg=vt("RegExp"),No=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};$e(r,(i,s)=>{let o;(o=t(i,s,e))!==!1&&(n[s]=o||i)}),Object.defineProperties(e,n)},qg=e=>{No(e,(t,r)=>{if(at(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(at(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},zg=(e,t)=>{const r={},n=i=>{i.forEach(s=>{r[s]=!0})};return ce(e)?n(e):n(String(e).split(t)),r},Kg=()=>{},Wg=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Jg(e){return!!(e&&at(e.append)&&e[Oo]==="FormData"&&e[sr])}const Yg=e=>{const t=new Array(10),r=(n,i)=>{if(Re(n)){if(t.indexOf(n)>=0)return;if(Ae(n))return n;if(!("toJSON"in n)){t[i]=n;const s=ce(n)?[]:{};return $e(n,(o,u)=>{const l=r(o,i+1);!Ee(l)&&(s[u]=l)}),t[i]=void 0,s}}return n};return r(e,0)},Gg=vt("AsyncFunction"),Zg=e=>e&&(Re(e)||at(e))&&at(e.then)&&at(e.catch),Po=((e,t)=>e?setImmediate:t?((r,n)=>(Vt.addEventListener("message",({source:i,data:s})=>{i===Vt&&s===r&&n.length&&n.shift()()},!1),i=>{n.push(i),Vt.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",at(Vt.postMessage)),Xg=typeof queueMicrotask<"u"?queueMicrotask.bind(Vt):typeof process<"u"&&process.nextTick||Po,Qg=e=>e!=null&&at(e[sr]),A={isArray:ce,isArrayBuffer:jo,isBuffer:Ae,isFormData:Tg,isArrayBufferView:mg,isString:yg,isNumber:Do,isBoolean:vg,isObject:Re,isPlainObject:Ve,isEmptyObject:bg,isReadableStream:Rg,isRequest:$g,isResponse:Og,isHeaders:jg,isUndefined:Ee,isDate:wg,isFile:_g,isBlob:Eg,isRegExp:Hg,isFunction:at,isStream:xg,isURLSearchParams:Ag,isTypedArray:Fg,isFileList:Sg,forEach:$e,merge:Jr,extend:Bg,trim:Dg,stripBOM:Cg,inherits:Ng,toFlatObject:Pg,kindOf:or,kindOfTest:vt,endsWith:Ig,toArray:kg,forEachEntry:Mg,matchAll:Ug,isHTMLForm:Lg,hasOwnProperty:ki,hasOwnProp:ki,reduceDescriptors:No,freezeMethods:qg,toObjectSet:zg,toCamelCase:Vg,noop:Kg,toFiniteNumber:Wg,findKey:Bo,global:Vt,isContextDefined:Co,isSpecCompliantForm:Jg,toJSONObject:Yg,isAsyncFn:Gg,isThenable:Zg,setImmediate:Po,asap:Xg,isIterable:Qg};function W(e,t,r,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i,this.status=i.status?i.status:null)}A.inherits(W,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:A.toJSONObject(this.config),code:this.code,status:this.status}}});const Io=W.prototype,ko={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{ko[e]={value:e}});Object.defineProperties(W,ko);Object.defineProperty(Io,"isAxiosError",{value:!0});W.from=(e,t,r,n,i,s)=>{const o=Object.create(Io);return A.toFlatObject(e,o,function(u){return u!==Error.prototype},u=>u!=="isAxiosError"),W.call(o,e.message,t,r,n,i),o.cause=e,o.name=e.name,s&&Object.assign(o,s),o};const tm=null;function Yr(e){return A.isPlainObject(e)||A.isArray(e)}function Fo(e){return A.endsWith(e,"[]")?e.slice(0,-2):e}function Fi(e,t,r){return e?e.concat(t).map(function(n,i){return n=Fo(n),!r&&i?"["+n+"]":n}).join(r?".":""):t}function em(e){return A.isArray(e)&&!e.some(Yr)}const rm=A.toFlatObject(A,{},null,function(e){return/^is[A-Z]/.test(e)});function ur(e,t,r){if(!A.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=A.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(h,d){return!A.isUndefined(d[h])});const n=r.metaTokens,i=r.visitor||a,s=r.dots,o=r.indexes,u=(r.Blob||typeof Blob<"u"&&Blob)&&A.isSpecCompliantForm(t);if(!A.isFunction(i))throw new TypeError("visitor must be a function");function l(h){if(h===null)return"";if(A.isDate(h))return h.toISOString();if(A.isBoolean(h))return h.toString();if(!u&&A.isBlob(h))throw new W("Blob is not supported. Use a Buffer instead.");return A.isArrayBuffer(h)||A.isTypedArray(h)?u&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function a(h,d,g){let b=h;if(h&&!g&&typeof h=="object"){if(A.endsWith(d,"{}"))d=n?d:d.slice(0,-2),h=JSON.stringify(h);else if(A.isArray(h)&&em(h)||(A.isFileList(h)||A.endsWith(d,"[]"))&&(b=A.toArray(h)))return d=Fo(d),b.forEach(function(_,y){!(A.isUndefined(_)||_===null)&&t.append(o===!0?Fi([d],y,s):o===null?d:d+"[]",l(_))}),!1}return Yr(h)?!0:(t.append(Fi(g,d,s),l(h)),!1)}const c=[],f=Object.assign(rm,{defaultVisitor:a,convertValue:l,isVisitable:Yr});function p(h,d){if(!A.isUndefined(h)){if(c.indexOf(h)!==-1)throw Error("Circular reference detected in "+d.join("."));c.push(h),A.forEach(h,function(g,b){(!(A.isUndefined(g)||g===null)&&i.call(t,g,A.isString(b)?b.trim():b,d,f))===!0&&p(g,d?d.concat(b):[b])}),c.pop()}}if(!A.isObject(e))throw new TypeError("data must be an object");return p(e),t}function Mi(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function En(e,t){this._pairs=[],e&&ur(e,this,t)}const Mo=En.prototype;Mo.append=function(e,t){this._pairs.push([e,t])};Mo.toString=function(e){const t=e?function(r){return e.call(this,r,Mi)}:Mi;return this._pairs.map(function(r){return t(r[0])+"="+t(r[1])},"").join("&")};function nm(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Uo(e,t,r){if(!t)return e;const n=r&&r.encode||nm;A.isFunction(r)&&(r={serialize:r});const i=r&&r.serialize;let s;if(i?s=i(t,r):s=A.isURLSearchParams(t)?t.toString():new En(t,r).toString(n),s){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class Ui{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){A.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Lo={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},im=typeof URLSearchParams<"u"?URLSearchParams:En,sm=typeof FormData<"u"?FormData:null,om=typeof Blob<"u"?Blob:null,am={isBrowser:!0,classes:{URLSearchParams:im,FormData:sm,Blob:om},protocols:["http","https","file","blob","url","data"]},Sn=typeof window<"u"&&typeof document<"u",Gr=typeof navigator=="object"&&navigator||void 0,um=Sn&&(!Gr||["ReactNative","NativeScript","NS"].indexOf(Gr.product)<0),cm=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",lm=Sn&&window.location.href||"http://localhost",fm=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Sn,hasStandardBrowserEnv:um,hasStandardBrowserWebWorkerEnv:cm,navigator:Gr,origin:lm},Symbol.toStringTag,{value:"Module"})),nt=V(V({},fm),am);function hm(e,t){return ur(e,new nt.classes.URLSearchParams,V({visitor:function(r,n,i,s){return nt.isNode&&A.isBuffer(r)?(this.append(n,r.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function pm(e){return A.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function dm(e){const t={},r=Object.keys(e);let n;const i=r.length;let s;for(n=0;n<i;n++)s=r[n],t[s]=e[s];return t}function Vo(e){function t(r,n,i,s){let o=r[s++];if(o==="__proto__")return!0;const u=Number.isFinite(+o),l=s>=r.length;return o=!o&&A.isArray(i)?i.length:o,l?(A.hasOwnProp(i,o)?i[o]=[i[o],n]:i[o]=n,!u):((!i[o]||!A.isObject(i[o]))&&(i[o]=[]),t(r,n,i[o],s)&&A.isArray(i[o])&&(i[o]=dm(i[o])),!u)}if(A.isFormData(e)&&A.isFunction(e.entries)){const r={};return A.forEachEntry(e,(n,i)=>{t(pm(n),i,r,0)}),r}return null}function gm(e,t,r){if(A.isString(e))try{return(t||JSON.parse)(e),A.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const Oe={transitional:Lo,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,i=A.isObject(e);if(i&&A.isHTMLForm(e)&&(e=new FormData(e)),A.isFormData(e))return n?JSON.stringify(Vo(e)):e;if(A.isArrayBuffer(e)||A.isBuffer(e)||A.isStream(e)||A.isFile(e)||A.isBlob(e)||A.isReadableStream(e))return e;if(A.isArrayBufferView(e))return e.buffer;if(A.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let s;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return hm(e,this.formSerializer).toString();if((s=A.isFileList(e))||r.indexOf("multipart/form-data")>-1){const o=this.env&&this.env.FormData;return ur(s?{"files[]":e}:e,o&&new o,this.formSerializer)}}return i||n?(t.setContentType("application/json",!1),gm(e)):e}],transformResponse:[function(e){const t=this.transitional||Oe.transitional,r=t&&t.forcedJSONParsing,n=this.responseType==="json";if(A.isResponse(e)||A.isReadableStream(e))return e;if(e&&A.isString(e)&&(r&&!this.responseType||n)){const i=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(s){if(i)throw s.name==="SyntaxError"?W.from(s,W.ERR_BAD_RESPONSE,this,null,this.response):s}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:nt.classes.FormData,Blob:nt.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};A.forEach(["delete","get","head","post","put","patch"],e=>{Oe.headers[e]={}});const mm=A.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),ym=e=>{const t={};let r,n,i;return e&&e.split(`
|
|
52
52
|
`).forEach(function(s){i=s.indexOf(":"),r=s.substring(0,i).trim().toLowerCase(),n=s.substring(i+1).trim(),!(!r||t[r]&&mm[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},Li=Symbol("internals");function ge(e){return e&&String(e).trim().toLowerCase()}function He(e){return e===!1||e==null?e:A.isArray(e)?e.map(He):String(e)}function vm(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}const bm=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Tr(e,t,r,n,i){if(A.isFunction(n))return n.call(this,t,r);if(i&&(t=r),!!A.isString(t)){if(A.isString(n))return t.indexOf(n)!==-1;if(A.isRegExp(n))return n.test(t)}}function wm(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function _m(e,t){const r=A.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(i,s,o){return this[n].call(this,t,i,s,o)},configurable:!0})})}let ut=class{constructor(t){t&&this.set(t)}set(t,r,n){const i=this;function s(u,l,a){const c=ge(l);if(!c)throw new Error("header name must be a non-empty string");const f=A.findKey(i,c);(!f||i[f]===void 0||a===!0||a===void 0&&i[f]!==!1)&&(i[f||l]=He(u))}const o=(u,l)=>A.forEach(u,(a,c)=>s(a,c,l));if(A.isPlainObject(t)||t instanceof this.constructor)o(t,r);else if(A.isString(t)&&(t=t.trim())&&!bm(t))o(ym(t),r);else if(A.isObject(t)&&A.isIterable(t)){let u={},l,a;for(const c of t){if(!A.isArray(c))throw TypeError("Object iterator must return a key-value pair");u[a=c[0]]=(l=u[a])?A.isArray(l)?[...l,c[1]]:[l,c[1]]:c[1]}o(u,r)}else t!=null&&s(r,t,n);return this}get(t,r){if(t=ge(t),t){const n=A.findKey(this,t);if(n){const i=this[n];if(!r)return i;if(r===!0)return vm(i);if(A.isFunction(r))return r.call(this,i,n);if(A.isRegExp(r))return r.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=ge(t),t){const n=A.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||Tr(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let i=!1;function s(o){if(o=ge(o),o){const u=A.findKey(n,o);u&&(!r||Tr(n,n[u],u,r))&&(delete n[u],i=!0)}}return A.isArray(t)?t.forEach(s):s(t),i}clear(t){const r=Object.keys(this);let n=r.length,i=!1;for(;n--;){const s=r[n];(!t||Tr(this,this[s],s,t,!0))&&(delete this[s],i=!0)}return i}normalize(t){const r=this,n={};return A.forEach(this,(i,s)=>{const o=A.findKey(n,s);if(o){r[o]=He(i),delete r[s];return}const u=t?wm(s):String(s).trim();u!==s&&delete r[s],r[u]=He(i),n[u]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return A.forEach(this,(n,i)=>{n!=null&&n!==!1&&(r[i]=t&&A.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
|
|
@@ -57,18 +57,18 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
57
57
|
* Copyright (c) 2025, VTJ.PRO All rights reserved.
|
|
58
58
|
* @name @vtj/renderer
|
|
59
59
|
* @author CHC chenhuachun1549@dingtalk.com
|
|
60
|
-
* @version 0.13.
|
|
60
|
+
* @version 0.13.33
|
|
61
61
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
|
62
|
-
*/const Dr="0.13.
|
|
62
|
+
*/const Dr="0.13.33";var tt=(e=>(e.Runtime="Runtime",e.Design="Design",e.Raw="Raw",e.VNode="VNode",e))(tt||{});const es=["$el","$emit","$nextTick","$parent","$root","$attrs","$slots","$watch","$props","$options","$forceUpdate"],m0=["vIf","vElseIf","vElse","vShow","vModel","vFor","vBind","vHtml"],y0={String,Number,Boolean,Array,Object,Function,Date},We="VtjPage",Br="VtjHomepage",v0="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(","),b0="component,slot".split(",");function Me(e,t){return e.map(r=>Ge(r)||r.startsWith("/")?r:`${t}${r}`)}function fr(e){return/\.css$/.test(e)}function hr(e){return/\.js$/.test(e)}function w0(e){return/\.json$/.test(e)}function _0(e,t=!1){return t&&e.endsWith(".prod.js")?e.replace(".prod.js",".js"):e}function E0(e,t,r=!1){const n=e.filter(p=>!!p.enabled),i=[],s=[],o=[],u=[],l={},a={},c=[],f={};return n.forEach(({urls:p,assetsUrl:h,library:d,assetsLibrary:g,localeLibrary:b})=>{p==null||p.forEach(_=>{hr(_)&&i.push(_0(_,r)),fr(_)&&s.push(_)}),d&&(u.push(d),l[d]=Me(p||[],t),b&&(a[d]=b)),h&&o.push(h),g&&c.push(g),d&&g&&(f[g]=d)}),{scripts:Me(i,t),css:Me(s,t),materials:Me(o,t),libraryExports:u,materialExports:Yd(c),materialMapLibrary:f,libraryMap:l,libraryLocaleMap:a}}function S0(e,t){var s;const{name:r,parent:n,alias:i}=e;return n?(s=t[n])==null?void 0:s[i||r]:t[i||r]}function x0(e=[]){const t=e.filter(n=>fr(n)),r=e.filter(n=>hr(n));return{css:t,js:r}}function T0(e,t){const r=a=>{const c=[];let f=0;for(;f<a.length;){if(/\s/.test(a[f])){f++;continue}if(a.substring(f,f+2)==="/*"){const _=a.indexOf("*/",f+2);if(_!==-1){f=_+2;continue}}if(a[f]==="@"){const _=f;for(;f<a.length&&a[f]!=="{"&&a[f]!==";";)f++;const y=a.substring(_,f).trim(),v=y.includes("@keyframes");if(a[f]===";")c.push({type:"simple-at-rule",content:a.substring(_,f+1)}),f++;else if(a[f]==="{"){const w=f+1;let E=1;for(f++;f<a.length&&E>0;)a[f]==="{"?E++:a[f]==="}"&&E--,f++;const m=a.substring(_,f),x=a.substring(w,f-1);c.push({type:v?"keyframes":"at-rule",rule:y,content:m,inner:x})}continue}const p=f;for(;f<a.length&&a[f]!=="{";)f++;if(f>=a.length)break;const h=a.substring(p,f).trim();if(!h){f++;continue}const d=f+1;let g=1;for(f++;f<a.length&&g>0;)a[f]==="{"?g++:a[f]==="}"&&g--,f++;const b=a.substring(d,f-1);c.push({type:"rule",selector:h,content:b.trim()})}return c},n=a=>{const c=a.trim();return/^(from|to|\d+(\.\d+)?%)$/.test(c)},i=a=>a.replace(/::v-deep\(/g,":deep(").replace(/::v-deep\s+/g,":deep(").replace(/\/deep\//g," ").replace(/>>>/g," ").replace(/(.*?):deep\(([^)]+)\)/g,(c,f,p)=>{const h=f.trim(),d=p.trim();return h?`${h}[${t}] ${d}`:d}),s=a=>{const c=a.trim();if(!c||c.includes(`[${t}]`)||/^(:root|:host|html|body)(\s|$|:|\.|\#|\[)/.test(c)||n(c))return c;const f=c.match(/^(.+?)((?:::?[\w-]+(?:\([^)]*\))?)*)\s*$/);if(f){const[,p,h=""]=f,d=p.trim();return d?`${d}[${t}]${h}`:c}return`${c}[${t}]`},o=a=>i(a).split(",").map(c=>s(c)).filter(c=>c.trim()).join(", "),u=a=>a.map(c=>{switch(c.type){case"simple-at-rule":return c.content;case"keyframes":return c.content;case"at-rule":try{const p=r(c.inner),h=u(p);return`${c.rule} { ${h} }`}catch(p){return c.content}case"rule":if(!c.selector||!c.content)return"";const f=o(c.selector);return f.trim()?`${f} { ${c.content} }`:"";default:return""}}).filter(c=>c.trim()).join(" "),l=a=>a.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();try{const a=e.replace(/\/\*(?!\s*!)[\s\S]*?\*\//g,"").replace(/^\s+|\s+$/gm,"").replace(/\n\s*\n/g,`
|
|
63
63
|
`),c=r(a),f=u(c);return l(f)}catch(a){return console.error("CSS scoping failed:",a),console.error("Input CSS:",e),e.replace(/\/\*[\s\S]*?\*\//g,"").replace(/(@keyframes\s+[^{]+\s*{[^{}]*(?:{[^}]*}[^{}]*)*})/g,c=>c).replace(/([^{}@]+)(?=\s*{)/g,c=>{const f=c.trim();return!f||f.startsWith("@")||f.includes(`[${t}]`)||n(f)?c:`${f}[${t}]`})}}function ia(e){return Ct(e)?e:JSON.stringify(e)}function pr(e,t,r,n=!1){const i=e.CSSStyleSheet,s=n?`data-v-${t}`:t,o=n?T0(r,s):r;if(i.prototype.replaceSync){const u=new i;u.id=t,u.replaceSync(o);const l=e.document,a=l.adoptedStyleSheets,c=Array.from(a).filter(f=>f.id!==t);l.adoptedStyleSheets=[...c,u]}else{const u=e.document;let l=u.getElementById(t);l?l.innerHTML=o:(l=u.createElement("style"),l.id=t,l.innerHTML=o,u.head.appendChild(l))}}function A0(e,t){return k(this,null,function*(){const r=yield window.fetch(t).then(n=>n.text()).catch(()=>"");r&&pr(window,e,r)})}function sa(e,t=window){const r=t.document,n=t.document.head;for(const i of e)if(!r.getElementById(i)){const s=r.createElement("link");s.rel="stylesheet",s.id=i,s.href=i,n.appendChild(s)}}function oa(n,i){return k(this,arguments,function*(e,t,r=window){const s=r.document,o=r.document.head;let u=r[t];return u?u.default||u:new Promise((l,a)=>{for(const c of e){const f=s.createElement("script");f.src=c,f.onload=()=>{u=r[t],u?l(u.default||u):a(null)},f.onerror=p=>{a(p)},o.appendChild(f)}})})}function R0(e){return zt(e)&&Object.getOwnPropertyNames(e.prototype||{}).length===0||zt(e==null?void 0:e.install)}function $0(e){return b0.includes(e)}function O0(e){return v0.includes(e)}function Se(e=window){const t=window==null?void 0:window.Mock;if(t)return t;const r=e==null?void 0:e.Mock;if(r&&window)return window.Mock=r,r}function xe(e,t,r=!1,n=!1,i=!1){var s;try{const o=['"use strict";',"var __self = arguments[0];"];o.push("return ");let u=(e.value||"").trim();i||(u=u.replace(/this(\W|$)/g,(a,c)=>`__self${c}`)),u=o.join(`
|
|
64
64
|
`)+u;const l=i?`
|
|
65
65
|
${u}
|
|
66
|
-
`:`with(${r?"{}":"$scope || {}"}) { ${u} }`;return new Function("$scope",l)(t)}catch(o){if(ie.error("parseExpression.error",o,e,(s=t==null?void 0:t.__self)!=null?s:t),n)throw o}}function pt(e,t,r=!1,n=!1,i=!1){var o;const s=xe(e,t,r,n,i);if(typeof s!="function"&&(ie.error("parseFunction.error","not a function",e,(o=t==null?void 0:t.__self)!=null?o:t),n))throw new Error(`"${e.value}" not a function`);return s}function mt(e){return e&&e.type==="JSExpression"}function dt(e){return typeof e=="object"&&e&&e.type==="JSFunction"}const j0={session:!1,authKey:"Authorization",storageKey:"ACCESS_STORAGE",storagePrefix:"__VTJ_",unauthorized:void 0,auth:"/#/login",redirectParam:"r",unauthorizedCode:401,unauthorizedMessage:"登录已经失效,请重新登录!",noPermissionMessage:"无权限访问该页面",appName:"",statusKey:"code"},D0=Symbol("access");class aa{constructor(t){z(this,"options");z(this,"data",null);z(this,"mode",tt.Raw);z(this,"interceptResponse",!0);this.options=Object.assign({},j0,t),this.loadData()}enableIntercept(){this.interceptResponse=!0}disableIntercept(){this.interceptResponse=!1}connect(t){const{mode:r,router:n,request:i}=t;this.mode=r,n&&this.mode!==tt.Design&&this.setGuard(n),i&&this.setRequest(i)}login(t){const{storageKey:r,storagePrefix:n,session:i,authKey:s}=this.options;this.setData(t),this.data&&($r.save(r,t,{type:"local",prefix:n}),i&&jr.set(s,this.data.token))}clear(){const{storageKey:t,storagePrefix:r,session:n,authKey:i}=this.options;this.data=null,$r.remove(t,{type:"local",prefix:r}),n&&jr.remove(i)}logout(){this.clear(),this.toLogin()}getData(){return this.data?this.data:(this.loadData(),this.data)}getToken(){var t;return this.data||this.loadData(),(t=this.data)==null?void 0:t.token}can(t){const{appName:r}=this.options,{permissions:n={}}=this.data||{};return typeof t=="function"?t(n):Ii(t).every(i=>n[i]||n[r+"."+i])}some(t){const{appName:r}=this.options,{permissions:n={}}=this.data||{};return Ii(t).some(i=>n[i]||n[r+"."+i])}install(t){t.config.globalProperties.$access=this,t.provide(D0,this)}isAuthPath(t){const{auth:r,isAuth:n}=this.options;if(n)return n(t);if(t.path&&typeof r=="string"){const i=r.split("#")[1]||r;return t.path===i}return!1}toLogin(){const{auth:t,redirectParam:r}=this.options;if(!t)return;const n=r?`?${r}=${encodeURIComponent(location.href)}`:"";typeof t=="function"?t(n):location.href=r?`${t}${n}`:t}setData(t){const{privateKey:r}=this.options;if(Array.isArray(t)&&r){const n=t.map(i=>Pi(i,r));try{this.data=JSON.parse(n.join(""))}catch(i){console.warn(i)}return}if(typeof t=="string")try{const n=r?Pi(t,r):t;n?this.data=JSON.parse(n):console.warn("RSA解密失败或登录信息缺失")}catch(n){console.warn(n)}else this.data=t}loadData(){const{storageKey:t,storagePrefix:r}=this.options,n=$r.get(t,{type:"local",prefix:r});this.setData(n||null)}isLogined(){const{session:t,authKey:r}=this.options;return t&&r?!!jr.get(r):!!this.getToken()}hasRoutePermission(t){if(t.name===We){const r=t.params.id;return r&&this.can(r)}return t.meta.__vtj__?this.can(t.meta.__vtj__):!0}setGuard(t){t.beforeEach((r,n,i)=>this.guard(r,i))}guard(t,r){return k(this,null,function*(){if(this.isWhiteList(t)||this.isAuthPath(t))return r();if(this.isLogined()){if(this.hasRoutePermission(t))return r();{const{noPermissionMessage:n="无权限访问",unauthorized:i=!1}=this.options;return yield this.showTip(n),zt(i)?(i(),r(!1)):Ct(i)?r(i):r(!1)}}r(!1),yield Ze(0),this.toLogin()})}isWhiteList(t){const{whiteList:r}=this.options;return r?Array.isArray(r)?r.some(n=>t.fullPath.startsWith(n)):r(t):!1}isUnauthorized(t){var i;const{unauthorizedCode:r=401,statusKey:n="code"}=this.options;return t.status===r||((i=t.data)==null?void 0:i[n])===r}showUnauthorizedAlert(t){return k(this,null,function*(){const{unauthorizedMessage:r="登录已失效"}=this.options;this.isUnauthorized(t)&&(yield this.showTip(r),this.toLogin())})}showTip(t){return k(this,null,function*(){var n;const{alert:r}=this.options;return r?(yield Ze(150),yield(n=r(t,{title:"提示",type:"warning"}))==null?void 0:n.catch(()=>!1)):(window.alert(t),!1)})}setRequest(t){t.useRequest(r=>{var n,i;return(n=this.data)!=null&&n.token&&(r.headers[this.options.authKey]=(i=this.data)==null?void 0:i.token),r}),t.useResponse(r=>k(this,null,function*(){return this.interceptResponse&&(yield this.showUnauthorizedAlert(r)),r}),r=>k(this,null,function*(){if(!this.interceptResponse)return Promise.reject(r);const n=r.response||r||{};return yield this.showUnauthorizedAlert(n),Promise.reject(r)}))}}function B0(e={}){const{notify:t,loading:r,settings:n={},Startup:i,access:s,useTitle:o,alert:u}=e;let l=null;return{request:xn({settings:V({type:"form",validSuccess:!0,originResponse:!1,loading:!0,validate:a=>{var c,f;return((c=a.data)==null?void 0:c.code)===0||!!((f=a.data)!=null&&f.success)},failMessage:!0,showError:a=>{t&&t(a||"未知错误")},showLoading:()=>{l&&l.close(),r&&(l=r())},hideLoading:()=>{l&&(l.close(),l=null)}},n)}),jsonp:na,notify:t,loading:r,useTitle:o,alert:u,startupComponent:i,access:s?new aa(V({alert:u},s)):void 0}}function C0(e,t){const{jsonp:r,request:n}=t;if(e.method==="jsonp")return(i={})=>r(e.url,et(V({},e.jsonpOptions),{query:i}));{const i=e.headers?xe(e.headers,{},!0):void 0,s={url:e.url,method:e.method,settings:et(V({},e.settings),{headers:i})};return(o,u)=>(delete s.data,n.send(me(s,u||{},{data:o})))}}function N0(e,t){const{metaQuery:r}=t;if(!r)return;const{code:n,queryCode:i}=e;return(s,o)=>{if(!r){console.warn("adapter.metaQuery is not defined!");return}return r(n,i,s,o)}}function P0(e=[],t=[],r){const n={};for(const i of e)n[i.id]=C0(i,r);for(const i of t)n[i.id]=N0(i,r);return n}function I0(){return k(this,arguments,function*(e=[],t=window){const r=Se(t);r&&(ua(t),e.forEach(n=>F0(r,n)))})}function k0(e,t=window){const r=dt(e.mockTemplate)&&e.mockTemplate.value?pt(e.mockTemplate,{},!0):void 0,n=Se(t);return(...i)=>k(null,null,function*(){let s={};if(r)try{s=yield r.apply(r,i)}catch(o){ie.warn("模拟数据模版异常",o)}return n==null?void 0:n.mock(s)})}function F0(e,t){if(!t.mock)return;const{url:r,mockTemplate:n}=t;if(r&&n)try{const i=Ge(r)?new URL(r).pathname:r,s=wn(`(.*)${i}(.*)`),o=tg(i,{decode:decodeURIComponent}),u=xe(n,{},!0);e.mock(s,l=>{var h;const a=Ke.parse(l.url)||{},c=l.body instanceof FormData?Gm(l.body):l.body,f=Ge(l.url)?new URL(l.url).pathname:l.url.split("?")[0],p=(h=o(f))==null?void 0:h.params;Object.assign(l,{data:c,params:p,query:a});try{return e.mock(u(l))}catch(d){return console.warn("[mockApi]",s,l,d),null}})}catch(i){console.warn("mockApi",i)}}function ua(e=window){const t=Se(e);t&&(t._mocked={})}class M0{constructor(t){z(this,"__id",null);z(this,"__mode");z(this,"__instance",null);z(this,"__contextRefs",{});z(this,"__refs",{});z(this,"context",{});z(this,"state",{});z(this,"props",{});z(this,"$props",{});z(this,"$refs",{});z(this,"$el",null);z(this,"$emit",null);z(this,"$nextTick",null);z(this,"$parent",null);z(this,"$root",null);z(this,"$attrs",null);z(this,"$slots",null);z(this,"$watch",null);z(this,"$options",null);z(this,"$forceUpdate",null);z(this,"$components",{});z(this,"$libs",{});z(this,"$apis",{});z(this,"__transform",{});const{mode:r,dsl:n,attrs:i}=t;this.__mode=r,n&&(this.__id=n.id||null,this.__transform=n.transform||{}),i&&Object.assign(this,i)}setup(t,r=tr){const n=r.getCurrentInstance();if(!n)return;this.__refs={},this.$refs={},this.context={},this.__contextRefs={},this.__instance=n.proxy;const i=n.appContext.config.globalProperties;Object.assign(this,i),Object.assign(this,t||{}),this.__proxy(),r.onMounted(()=>{this.__proxy()}),r.onUnmounted(()=>{this.__cleanup()}),r.onBeforeUpdate(()=>{this.__reset()})}__proxy(){this.__instance&&es.forEach(t=>{var r;this[t]=(r=this.__instance)==null?void 0:r[t]})}__cleanup(){es.forEach(t=>{this[t]=null}),this.__reset()}__reset(){this.__refs={},this.$refs={},this.__contextRefs={},this.context={}}__parseFunction(t){var r;if(t)if(this.__mode===tt.Runtime){const{id:n,type:i}=t,s=n&&(r=this.__transform[n])!=null?r:t.value;return pt({type:i,value:s},this)}else return pt(t,this)}__parseExpression(t){var r;if(t)if(this.__mode===tt.Runtime){const{id:n,type:i}=t,s=n&&(r=this.__transform[n])!=null?r:t.value;return xe({type:i,value:s},this)}else return xe(t,this)}__ref(t=null,r){if(this.__mode!==tt.VNode)return t&&t!==this.__id&&(this.__contextRefs[t]=this),n=>k(this,null,function*(){var s,o;yield Ze(0);let i=(n==null?void 0:n.$vtjEl)||(n==null?void 0:n.$el)||((o=(s=n==null?void 0:n._)==null?void 0:s.vnode)==null?void 0:o.el)||n;if(!i){typeof r=="string"&&(delete this.$refs[r],t&&delete this.__refs[t]);return}return i.nodeType===3&&i.nextSibling&&(i=i.nextSibling),i.__vtj__=t,tt.Design===this.__mode&&(i.__context__=this,i.draggable=!0),t&&(this.__refs[t]=this.__getRefEl(this.__refs,t,n)),typeof r=="function"?r(n):r&&(this.$refs[r]=this.__getRefEl(this.$refs,r,n)),n})}__getRefEl(t,r,n){const i=t[r];if(i&&n!==i){const s=new Set([].concat(i,n));return Array.from(s)}else return n}__clone(t={}){const r=V(V({},this.context),t),n=et(V({},r),{context:r});return n.context.__proto__=this.context,n.__proto__=this,n}}function sn(e){var f,p;const{Vue:t=tr,mode:r=tt.Runtime,components:n={},libs:i={},apis:s={},loader:o}=e,u=t.computed(()=>e.dsl),l={$components:n,$libs:i,$apis:s},a=new M0({mode:r,dsl:u.value,attrs:l}),c=t.defineComponent(V({name:u.value.name,__scopeId:u.value.id?`data-v-${u.value.id}`:void 0,props:V({},L0((f=u.value.props)!=null?f:[],a)),setup(h){var v,w,E,m;a.$props=h,a.props=h,u.value.id&&pr(e.window||window,u.value.id,u.value.css||"",!0),a.state=V0(t,(v=u.value.state)!=null?v:{},a);const d=H0(t,(w=u.value.computed)!=null?w:{},a),g=q0((E=u.value.methods)!=null?E:{},a),b=z0(t,u.value.inject,a);for(const[x,R]of Object.entries(b||{}))b[x]=t.inject(x,R);const _=K0(u.value.dataSources||{},a),y=V(V(V(V({},b),d),g),_);return a.setup(y,t),W0(t,(m=u.value.watch)!=null?m:[],a),V(V({vtj:a,state:a.state},d),g)},emits:U0(u.value.emits),expose:["vtj",...u.value.expose||[]],render(){if(!u.value.nodes)return null;const h=u.value.nodes||[];return h.length===1?oe(h[0],a,t,o,h):h.map(d=>oe(d,a,t,o,h))}},J0((p=u.value.lifeCycles)!=null?p:{},a)));return{renderer:t.markRaw(c),context:a}}function U0(e=[]){return e.map(t=>Ct(t)?t:t.name)}function L0(e=[],t){const r=n=>n?(Array.isArray(n)?n:[n]).map(i=>y0[i]):void 0;return e.map(n=>Ct(n)?{name:n}:{name:n.name,type:n.type,required:n.required,default:mt(n.default)?t.__parseExpression(n.default):n.default}).reduce((n,i)=>(n[i.name]={type:r(i.type),required:i.required,default:i.default},n),{})}function V0(e,t,r){return e.reactive(Object.keys(t||{}).reduce((n,i)=>{let s=t[i];return mt(s)?s=r.__parseExpression(s):dt(s)&&(s=r.__parseFunction(s)),n[i]=s,n},{}))}function H0(e,t,r){return Object.entries(t!=null?t:{}).reduce((n,[i,s])=>(n[i]=e.computed(r.__parseFunction(s)),n),{})}function q0(e,t){return Object.entries(e!=null?e:{}).reduce((r,[n,i])=>(r[n]=t.__parseFunction(i),r),{})}function z0(e,t=[],r){return t.reduce((n,i)=>{var a;const{name:s,from:o}=i||{};i.default;const u=mt(o)?r.__parseExpression(o)||s:o!=null?o:s,l=mt(i.default)?r.__parseExpression(i.default):(a=i.default)!=null?a:null;return n[s]=e.inject(u,l),n},{})}function K0(e,t){return Object.keys(e).reduce((r,n)=>{const i=e[n];if(i.type==="mock")r[n]=k0(i);else if(i.ref){const s=t.$apis[i.ref],o=dt(i.transform)?i.transform.value?t.__parseFunction(i.transform):void 0:i.transform;r[n]=(...u)=>k(null,null,function*(){const l=yield s.apply(t,u);return o?o(l):l})}return r},{})}function W0(e,t=[],r){t.forEach(n=>{e.watch(r.__parseExpression(n.source),r.__parseFunction(n.handler),{deep:n.deep,immediate:n.immediate})})}function J0(e,t){return Object.entries(e!=null?e:{}).reduce((r,[n,i])=>{const s=t.__parseFunction(i);return r[n]=()=>k(null,null,function*(){yield Ze(0),zt(s)&&s()}),r},{})}const Y0=new ug;let Cr=[],Qt={};const G0=e=>e;function ca(r){return k(this,arguments,function*(e,t=window){const{urls:n=[],library:i}=e,s=n.filter(u=>hr(u));if(s.length===0||!i)return null;const o=n.filter(u=>fr(u));return o.length&&sa(o,t),yield oa(s,i,t).catch(u=>(console.warn("loadScriptUrl error",s,i,u),null))})}function on(e){const{getDsl:t,getDslByUrl:r,options:n}=e;return n.window&&(Cr.forEach(i=>{delete n.window[i]}),Cr=[]),(i,s,o=tr)=>{if(!s||typeof s=="string")return i;if(s.type==="Schema"&&s.id)return o.defineAsyncComponent(()=>k(null,null,function*(){const u=Qt[s.id]||(yield Y0.add(s.id,()=>t(s.id)));return u&&(u.name=i,Qt[s.id]=u),u?sn(et(V({},n),{Vue:o,dsl:ui(u),mode:tt.Runtime,loader:on(e)})).renderer:null}));if(s.type==="UrlSchema"&&s.url)return o.defineAsyncComponent(()=>k(null,null,function*(){const u=Qt[s.url]||(yield r(s.url));return u&&(u.name=i,Qt[s.url]=u),u?sn(et(V({},n),{Vue:o,dsl:ui(u),mode:tt.Runtime,loader:on(e)})).renderer:null}));if(s.type==="Plugin"){let u=s.library?Qt[s.library]:null;return u||(s.library&&Cr.push(s.library),u=Qt[s.library||Symbol()]=o.defineAsyncComponent(()=>k(null,null,function*(){return(yield ca(s,n.window))||(console.warn("getPlugin result is null",s),null)})),u)}return i}}function oe(e,t,r=tr,n=G0,i=[],s=!1){var v;if(!e||!e.name||e.invisible)return null;const o=(v=r.getCurrentInstance())==null?void 0:v.appContext,{id:u=null,directives:l=[]}=e,{vIf:a,vElseIf:c,vElse:f,vFor:p,vShow:h,vModels:d,vBind:g,vHtml:b,others:_}=la(l);if(!s&&(c||f))return null;if(a&&!X0(a,t))return r1(e,t,r,n,i);const y=(w,E=0)=>{var j,N,L,M;const m=w.$components,x=(()=>{var q,$,D,C;if(e.name==="component")return Q0(w,(q=e.props)==null?void 0:q.is);if(e.name==="slot")return e.name;const H=n(e.name,e.from,r);if(Ct(H))return $0(H)||O0(H)?H:(C=(D=m[H])!=null?D:($=o==null?void 0:o.app)==null?void 0:$.component(H))!=null?C:H;if(lt(H)&&e.id){const P=`Loader${e.id}_${E}`;return m[P]||(m[P]=H)}return H})(),R=t1(u,(j=e.props)!=null?j:{},w),U=e1(r,(N=e.events)!=null?N:{},w);if(e.name==="slot")return n1(r,e,R,w,n);g&&Object.assign(R,w.__parseExpression(g.value)),h&&(R.style=Object.assign((L=R.style)!=null?L:{},s1(h,w))),b&&Object.assign(R,o1(b,w)),d.forEach(H=>{Object.assign(R,a1(r,H,w))});const S=u1(r,(M=e.children)!=null?M:[],w,n,e),T=w!=null&&w.__id?`data-v-${w.__id}`:void 0,F=T?{[T]:""}:{};let B=r.createVNode(x,V(V(V({key:`${u}_${E}`},F),R),U),S);const I=o?Z0(o,_,w):[];return I.length&&(B=r.withDirectives(B,I)),B};return p?f1(p,y,t):y(t)}function Z0(e,t,r){const n=e.app;return t.map(i=>{const s=typeof i.name=="string"?n.directive(i.name):r.__parseExpression(i.name);if(!s)return null;const o=[s];return i.value&&o.push(r.__parseExpression(i.value)),i.arg&&o.push(i.arg),i.modifiers&&o.push(i.modifiers),o}).filter(i=>!!i)}function la(e=[]){const t=e.find(c=>xt(c.name)==="vIf"),r=e.find(c=>xt(c.name)==="vElseIf"),n=e.find(c=>xt(c.name)==="vElse"),i=e.find(c=>xt(c.name)==="vFor"),s=e.find(c=>xt(c.name)==="vShow"),o=e.find(c=>xt(c.name)==="vBind"),u=e.find(c=>xt(c.name)==="vHtml"),l=e.filter(c=>xt(c.name)==="vModel"),a=e.filter(c=>!m0.includes(xt(c.name)));return{vIf:t,vElseIf:r,vElse:n,vFor:i,vShow:s,vModels:l,vBind:o,others:a,vHtml:u}}function X0(e,t){return!!t.__parseExpression(e.value)}function Q0(e,t){return t?mt(t)?e.__parseExpression(t):t:"div"}function t1(e,t,r){const n=an(t,r);return n.ref=r.__ref(e,n.ref),n}function an(e,t){return mt(e)?t.__parseExpression(e):dt(e)?t.__parseFunction(e):Array.isArray(e)?e.map(r=>an(r,t)):typeof e=="object"?Object.keys(e||{}).reduce((r,n)=>{let i=e[n];return r[n]=an(i,t),r},{}):e}function e1(e,t,r){const n=["passive","capture","once"],i={capture:"Capture",once:"Once",passive:"OnceCapture"};return Object.keys(t||{}).reduce((s,o)=>{const u=t[o],l=fa(u.modifiers),a=l.find(p=>n.includes(p)),c="on"+Is(o)+(a&&i[a]||""),f=r.__parseFunction(u.handler);return f&&(s[c]=e.withModifiers(f,l)),s},{})}function r1(e,t,r,n,i=[]){let s=i.findIndex(o=>o.id===e.id);for(let o=++s;o<i.length;o++){const{directives:u=[]}=i[o],{vElseIf:l,vElse:a}=la(u);if(l){if(t.__parseExpression(l.value))return oe(i[o],t,r,n,i,!0);continue}if(a)return oe(i[o],t,r,n,i,!0)}return null}function fa(e={},t=!1){const r=Object.keys(e);return t?r.map(n=>"."+n):r}function n1(e,t,r,n,i){var l;const{children:s}=t,o=i1(t,n),u=(l=n.$slots)==null?void 0:l[o.name];return u?u(r):s?Ct(s)?e.createTextVNode(s):mt(s)?e.createTextVNode(ia(n.__parseExpression(s))):Array.isArray(s)?s.map(a=>oe(a,n,e,i,s)):null:null}function i1(e,t){const{props:r}=e,n=(r==null?void 0:r.name)||"default";return{name:mt(n)?t.__parseExpression(n):n,params:[]}}function s1(e,t){return t.__parseExpression(e.value)?{}:{display:"none"}}function o1(e,t){return{innerHTML:t.__parseExpression(e.value)||""}}function a1(e,t,r){var u;const n={type:"JSFunction",value:(u=t.value)!=null&&u.value?`(v) => {
|
|
66
|
+
`:`with(${r?"{}":"$scope || {}"}) { ${u} }`;return new Function("$scope",l)(t)}catch(o){if(ie.error("parseExpression.error",o,e,(s=t==null?void 0:t.__self)!=null?s:t),n)throw o}}function pt(e,t,r=!1,n=!1,i=!1){var o;const s=xe(e,t,r,n,i);if(typeof s!="function"&&(ie.error("parseFunction.error","not a function",e,(o=t==null?void 0:t.__self)!=null?o:t),n))throw new Error(`"${e.value}" not a function`);return s}function mt(e){return e&&e.type==="JSExpression"}function dt(e){return typeof e=="object"&&e&&e.type==="JSFunction"}const j0={session:!1,authKey:"Authorization",storageKey:"ACCESS_STORAGE",storagePrefix:"__VTJ_",unauthorized:void 0,auth:"/#/login",redirectParam:"r",unauthorizedCode:401,unauthorizedMessage:"登录已经失效,请重新登录!",noPermissionMessage:"无权限访问该页面",appName:"",statusKey:"code"},D0=Symbol("access");class aa{constructor(t){z(this,"options");z(this,"data",null);z(this,"mode",tt.Raw);z(this,"interceptResponse",!0);this.options=Object.assign({},j0,t),this.loadData()}enableIntercept(){this.interceptResponse=!0}disableIntercept(){this.interceptResponse=!1}connect(t){const{mode:r,router:n,request:i}=t;this.mode=r,n&&this.mode!==tt.Design&&this.setGuard(n),i&&this.setRequest(i)}login(t){const{storageKey:r,storagePrefix:n,session:i,authKey:s}=this.options;this.setData(t),this.data&&($r.save(r,t,{type:"local",prefix:n}),i&&jr.set(s,this.data.token))}clear(){const{storageKey:t,storagePrefix:r,session:n,authKey:i}=this.options;this.data=null,$r.remove(t,{type:"local",prefix:r}),n&&jr.remove(i)}logout(){this.clear(),this.toLogin()}getData(){return this.data?this.data:(this.loadData(),this.data)}getToken(){var t;return this.data||this.loadData(),(t=this.data)==null?void 0:t.token}can(t){const{appName:r}=this.options,{permissions:n={}}=this.data||{};return typeof t=="function"?t(n):Ii(t).every(i=>n[i]||n[r+"."+i])}some(t){const{appName:r}=this.options,{permissions:n={}}=this.data||{};return Ii(t).some(i=>n[i]||n[r+"."+i])}install(t){t.config.globalProperties.$access=this,t.provide(D0,this)}isAuthPath(t){const{auth:r,isAuth:n}=this.options;if(n)return n(t);if(t.path&&typeof r=="string"){const i=r.split("#")[1]||r;return t.path===i}return!1}toLogin(){const{auth:t,redirectParam:r}=this.options;if(!t)return;const n=r?`?${r}=${encodeURIComponent(location.href)}`:"";typeof t=="function"?t(n):location.href=r?`${t}${n}`:t}setData(t){const{privateKey:r}=this.options;if(Array.isArray(t)&&r){const n=t.map(i=>Pi(i,r));try{this.data=JSON.parse(n.join(""))}catch(i){console.warn(i)}return}if(typeof t=="string")try{const n=r?Pi(t,r):t;n?this.data=JSON.parse(n):console.warn("RSA解密失败或登录信息缺失")}catch(n){console.warn(n)}else this.data=t}loadData(){const{storageKey:t,storagePrefix:r}=this.options,n=$r.get(t,{type:"local",prefix:r});this.setData(n||null)}isLogined(){const{session:t,authKey:r}=this.options;return t&&r?!!jr.get(r):!!this.getToken()}hasRoutePermission(t){if(t.name===We){const r=t.params.id;return r&&this.can(r)}return t.meta.__vtj__?this.can(t.meta.__vtj__):!0}setGuard(t){t.beforeEach((r,n,i)=>this.guard(r,i))}guard(t,r){return k(this,null,function*(){if(this.isWhiteList(t)||this.isAuthPath(t))return r();if(this.isLogined()){if(this.hasRoutePermission(t))return r();{const{noPermissionMessage:n="无权限访问",unauthorized:i=!1}=this.options;return yield this.showTip(n),zt(i)?(i(),r(!1)):Ct(i)?r(i):r(!1)}}r(!1),yield Ze(0),this.toLogin()})}isWhiteList(t){const{whiteList:r}=this.options;return r?Array.isArray(r)?r.some(n=>t.fullPath.startsWith(n)):r(t):!1}isUnauthorized(t){var i;const{unauthorizedCode:r=401,statusKey:n="code"}=this.options;return t.status===r||((i=t.data)==null?void 0:i[n])===r}showUnauthorizedAlert(t){return k(this,null,function*(){const{unauthorizedMessage:r="登录已失效"}=this.options;this.isUnauthorized(t)&&(yield this.showTip(r),this.toLogin())})}showTip(t){return k(this,null,function*(){var n;const{alert:r}=this.options;return r?(yield Ze(150),yield(n=r(t,{title:"提示",type:"warning"}))==null?void 0:n.catch(()=>!1)):(window.alert(t),!1)})}setRequest(t){t.useRequest(r=>{var n,i;return(n=this.data)!=null&&n.token&&(r.headers[this.options.authKey]=(i=this.data)==null?void 0:i.token),r}),t.useResponse(r=>k(this,null,function*(){return this.interceptResponse&&(yield this.showUnauthorizedAlert(r)),r}),r=>k(this,null,function*(){if(!this.interceptResponse)return Promise.reject(r);const n=r.response||r||{};return yield this.showUnauthorizedAlert(n),Promise.reject(r)}))}}function B0(e={}){const{notify:t,loading:r,settings:n={},Startup:i,access:s,useTitle:o,alert:u}=e;let l=null;return{request:xn({settings:V({type:"form",validSuccess:!0,originResponse:!1,loading:!0,validate:a=>{var c,f;return((c=a.data)==null?void 0:c.code)===0||!!((f=a.data)!=null&&f.success)},failMessage:!0,showError:a=>{t&&t(a||"未知错误")},showLoading:()=>{l&&l.close(),r&&(l=r())},hideLoading:()=>{l&&(l.close(),l=null)}},n)}),jsonp:na,notify:t,loading:r,useTitle:o,alert:u,startupComponent:i,access:s?new aa(V({alert:u},s)):void 0}}function C0(e,t){const{jsonp:r,request:n}=t;if(e.method==="jsonp")return(i={})=>r(e.url,et(V({},e.jsonpOptions),{query:i}));{const i=e.headers?xe(e.headers,{},!0):void 0,s={url:e.url,method:e.method,settings:et(V({},e.settings),{headers:i})};return(o,u)=>(delete s.data,n.send(me(s,u||{},{data:o})))}}function N0(e,t){const{metaQuery:r}=t;if(!r)return;const{code:n,queryCode:i}=e;return(s,o)=>{if(!r){console.warn("adapter.metaQuery is not defined!");return}return r(n,i,s,o)}}function P0(e=[],t=[],r){const n={};for(const i of e){const s=C0(i,r);n[i.id]=s,n[i.name]=s}for(const i of t)n[i.id]=N0(i,r);return n}function I0(){return k(this,arguments,function*(e=[],t=window){const r=Se(t);r&&(ua(t),e.forEach(n=>F0(r,n)))})}function k0(e,t=window){const r=dt(e.mockTemplate)&&e.mockTemplate.value?pt(e.mockTemplate,{},!0):void 0,n=Se(t);return(...i)=>k(null,null,function*(){let s={};if(r)try{s=yield r.apply(r,i)}catch(o){ie.warn("模拟数据模版异常",o)}return n==null?void 0:n.mock(s)})}function F0(e,t){if(!t.mock)return;const{url:r,mockTemplate:n}=t;if(r&&n)try{const i=Ge(r)?new URL(r).pathname:r,s=wn(`(.*)${i}(.*)`),o=tg(i,{decode:decodeURIComponent}),u=xe(n,{},!0);e.mock(s,l=>{var h;const a=Ke.parse(l.url)||{},c=l.body instanceof FormData?Gm(l.body):l.body,f=Ge(l.url)?new URL(l.url).pathname:l.url.split("?")[0],p=(h=o(f))==null?void 0:h.params;Object.assign(l,{data:c,params:p,query:a});try{return e.mock(u(l))}catch(d){return console.warn("[mockApi]",s,l,d),null}})}catch(i){console.warn("mockApi",i)}}function ua(e=window){const t=Se(e);t&&(t._mocked={})}class M0{constructor(t){z(this,"__id",null);z(this,"__mode");z(this,"__instance",null);z(this,"__contextRefs",{});z(this,"__refs",{});z(this,"context",{});z(this,"state",{});z(this,"props",{});z(this,"$props",{});z(this,"$refs",{});z(this,"$el",null);z(this,"$emit",null);z(this,"$nextTick",null);z(this,"$parent",null);z(this,"$root",null);z(this,"$attrs",null);z(this,"$slots",null);z(this,"$watch",null);z(this,"$options",null);z(this,"$forceUpdate",null);z(this,"$components",{});z(this,"$libs",{});z(this,"$apis",{});z(this,"__transform",{});const{mode:r,dsl:n,attrs:i}=t;this.__mode=r,n&&(this.__id=n.id||null,this.__transform=n.transform||{}),i&&Object.assign(this,i)}setup(t,r=tr){const n=r.getCurrentInstance();if(!n)return;this.__refs={},this.$refs={},this.context={},this.__contextRefs={},this.__instance=n.proxy;const i=n.appContext.config.globalProperties;Object.assign(this,i),Object.assign(this,t||{}),this.__proxy(),r.onMounted(()=>{this.__proxy()}),r.onUnmounted(()=>{this.__cleanup()}),r.onBeforeUpdate(()=>{this.__reset()})}__proxy(){this.__instance&&es.forEach(t=>{var r;this[t]=(r=this.__instance)==null?void 0:r[t]})}__cleanup(){es.forEach(t=>{this[t]=null}),this.__reset()}__reset(){this.__refs={},this.$refs={},this.__contextRefs={},this.context={}}__parseFunction(t){var r;if(t)if(this.__mode===tt.Runtime){const{id:n,type:i}=t,s=n&&(r=this.__transform[n])!=null?r:t.value;return pt({type:i,value:s},this)}else return pt(t,this)}__parseExpression(t){var r;if(t)if(this.__mode===tt.Runtime){const{id:n,type:i}=t,s=n&&(r=this.__transform[n])!=null?r:t.value;return xe({type:i,value:s},this)}else return xe(t,this)}__ref(t=null,r){if(this.__mode!==tt.VNode)return t&&t!==this.__id&&(this.__contextRefs[t]=this),n=>k(this,null,function*(){var s,o;yield Ze(0);let i=(n==null?void 0:n.$vtjEl)||(n==null?void 0:n.$el)||((o=(s=n==null?void 0:n._)==null?void 0:s.vnode)==null?void 0:o.el)||n;if(!i){typeof r=="string"&&(delete this.$refs[r],t&&delete this.__refs[t]);return}return i.nodeType===3&&i.nextSibling&&(i=i.nextSibling),i.__vtj__=t,tt.Design===this.__mode&&(i.__context__=this,i.draggable=!0),t&&(this.__refs[t]=this.__getRefEl(this.__refs,t,n)),typeof r=="function"?r(n):r&&(this.$refs[r]=this.__getRefEl(this.$refs,r,n)),n})}__getRefEl(t,r,n){const i=t[r];if(i&&n!==i){const s=new Set([].concat(i,n));return Array.from(s)}else return n}__clone(t={}){const r=V(V({},this.context),t),n=et(V({},r),{context:r});return n.context.__proto__=this.context,n.__proto__=this,n}}function sn(e){var f,p;const{Vue:t=tr,mode:r=tt.Runtime,components:n={},libs:i={},apis:s={},loader:o}=e,u=t.computed(()=>e.dsl),l={$components:n,$libs:i,$apis:s},a=new M0({mode:r,dsl:u.value,attrs:l}),c=t.defineComponent(V({name:u.value.name,__scopeId:u.value.id?`data-v-${u.value.id}`:void 0,props:V({},L0((f=u.value.props)!=null?f:[],a)),setup(h){var v,w,E,m;a.$props=h,a.props=h,u.value.id&&pr(e.window||window,u.value.id,u.value.css||"",!0),a.state=V0(t,(v=u.value.state)!=null?v:{},a);const d=H0(t,(w=u.value.computed)!=null?w:{},a),g=q0((E=u.value.methods)!=null?E:{},a),b=z0(t,u.value.inject,a);for(const[x,R]of Object.entries(b||{}))b[x]=t.inject(x,R);const _=K0(u.value.dataSources||{},a),y=V(V(V(V({},b),d),g),_);return a.setup(y,t),W0(t,(m=u.value.watch)!=null?m:[],a),V(V({vtj:a,state:a.state},d),g)},emits:U0(u.value.emits),expose:["vtj",...u.value.expose||[]],render(){if(!u.value.nodes)return null;const h=u.value.nodes||[];return h.length===1?oe(h[0],a,t,o,h):h.map(d=>oe(d,a,t,o,h))}},J0((p=u.value.lifeCycles)!=null?p:{},a)));return{renderer:t.markRaw(c),context:a}}function U0(e=[]){return e.map(t=>Ct(t)?t:t.name)}function L0(e=[],t){const r=n=>n?(Array.isArray(n)?n:[n]).map(i=>y0[i]):void 0;return e.map(n=>Ct(n)?{name:n}:{name:n.name,type:n.type,required:n.required,default:mt(n.default)?t.__parseExpression(n.default):n.default}).reduce((n,i)=>(n[i.name]={type:r(i.type),required:i.required,default:i.default},n),{})}function V0(e,t,r){return e.reactive(Object.keys(t||{}).reduce((n,i)=>{let s=t[i];return mt(s)?s=r.__parseExpression(s):dt(s)&&(s=r.__parseFunction(s)),n[i]=s,n},{}))}function H0(e,t,r){return Object.entries(t!=null?t:{}).reduce((n,[i,s])=>(n[i]=e.computed(r.__parseFunction(s)),n),{})}function q0(e,t){return Object.entries(e!=null?e:{}).reduce((r,[n,i])=>(r[n]=t.__parseFunction(i),r),{})}function z0(e,t=[],r){return t.reduce((n,i)=>{var a;const{name:s,from:o}=i||{};i.default;const u=mt(o)?r.__parseExpression(o)||s:o!=null?o:s,l=mt(i.default)?r.__parseExpression(i.default):(a=i.default)!=null?a:null;return n[s]=e.inject(u,l),n},{})}function K0(e,t){return Object.keys(e).reduce((r,n)=>{const i=e[n];if(i.type==="mock")r[n]=k0(i);else if(i.ref){const s=t.$apis[i.ref],o=dt(i.transform)?i.transform.value?t.__parseFunction(i.transform):void 0:i.transform;r[n]=(...u)=>k(null,null,function*(){const l=yield s.apply(t,u);return o?o(l):l})}return r},{})}function W0(e,t=[],r){t.forEach(n=>{e.watch(r.__parseExpression(n.source),r.__parseFunction(n.handler),{deep:n.deep,immediate:n.immediate})})}function J0(e,t){return Object.entries(e!=null?e:{}).reduce((r,[n,i])=>{const s=t.__parseFunction(i);return r[n]=()=>k(null,null,function*(){yield Ze(0),zt(s)&&s()}),r},{})}const Y0=new ug;let Cr=[],Qt={};const G0=e=>e;function ca(r){return k(this,arguments,function*(e,t=window){const{urls:n=[],library:i}=e,s=n.filter(u=>hr(u));if(s.length===0||!i)return null;const o=n.filter(u=>fr(u));return o.length&&sa(o,t),yield oa(s,i,t).catch(u=>(console.warn("loadScriptUrl error",s,i,u),null))})}function on(e){const{getDsl:t,getDslByUrl:r,options:n}=e;return n.window&&(Cr.forEach(i=>{delete n.window[i]}),Cr=[]),(i,s,o=tr)=>{if(!s||typeof s=="string")return i;if(s.type==="Schema"&&s.id)return o.defineAsyncComponent(()=>k(null,null,function*(){const u=Qt[s.id]||(yield Y0.add(s.id,()=>t(s.id)));return u&&(u.name=i,Qt[s.id]=u),u?sn(et(V({},n),{Vue:o,dsl:ui(u),mode:tt.Runtime,loader:on(e)})).renderer:null}));if(s.type==="UrlSchema"&&s.url)return o.defineAsyncComponent(()=>k(null,null,function*(){const u=Qt[s.url]||(yield r(s.url));return u&&(u.name=i,Qt[s.url]=u),u?sn(et(V({},n),{Vue:o,dsl:ui(u),mode:tt.Runtime,loader:on(e)})).renderer:null}));if(s.type==="Plugin"){let u=s.library?Qt[s.library]:null;return u||(s.library&&Cr.push(s.library),u=Qt[s.library||Symbol()]=o.defineAsyncComponent(()=>k(null,null,function*(){return(yield ca(s,n.window))||(console.warn("getPlugin result is null",s),null)})),u)}return i}}function oe(e,t,r=tr,n=G0,i=[],s=!1){var v;if(!e||!e.name||e.invisible)return null;const o=(v=r.getCurrentInstance())==null?void 0:v.appContext,{id:u=null,directives:l=[]}=e,{vIf:a,vElseIf:c,vElse:f,vFor:p,vShow:h,vModels:d,vBind:g,vHtml:b,others:_}=la(l);if(!s&&(c||f))return null;if(a&&!X0(a,t))return r1(e,t,r,n,i);const y=(w,E=0)=>{var j,N,L,M;const m=w.$components,x=(()=>{var q,$,D,C;if(e.name==="component")return Q0(w,(q=e.props)==null?void 0:q.is);if(e.name==="slot")return e.name;const H=n(e.name,e.from,r);if(Ct(H))return $0(H)||O0(H)?H:(C=(D=m[H])!=null?D:($=o==null?void 0:o.app)==null?void 0:$.component(H))!=null?C:H;if(lt(H)&&e.id){const P=`Loader${e.id}_${E}`;return m[P]||(m[P]=H)}return H})(),R=t1(u,(j=e.props)!=null?j:{},w),U=e1(r,(N=e.events)!=null?N:{},w);if(e.name==="slot")return n1(r,e,R,w,n);g&&Object.assign(R,w.__parseExpression(g.value)),h&&(R.style=Object.assign((L=R.style)!=null?L:{},s1(h,w))),b&&Object.assign(R,o1(b,w)),d.forEach(H=>{Object.assign(R,a1(r,H,w))});const S=u1(r,(M=e.children)!=null?M:[],w,n,e),T=w!=null&&w.__id?`data-v-${w.__id}`:void 0,F=T?{[T]:""}:{};let B=r.createVNode(x,V(V(V({key:`${u}_${E}`},F),R),U),S);const I=o?Z0(o,_,w):[];return I.length&&(B=r.withDirectives(B,I)),B};return p?f1(p,y,t):y(t)}function Z0(e,t,r){const n=e.app;return t.map(i=>{const s=typeof i.name=="string"?n.directive(i.name):r.__parseExpression(i.name);if(!s)return null;const o=[s];return i.value&&o.push(r.__parseExpression(i.value)),i.arg&&o.push(i.arg),i.modifiers&&o.push(i.modifiers),o}).filter(i=>!!i)}function la(e=[]){const t=e.find(c=>xt(c.name)==="vIf"),r=e.find(c=>xt(c.name)==="vElseIf"),n=e.find(c=>xt(c.name)==="vElse"),i=e.find(c=>xt(c.name)==="vFor"),s=e.find(c=>xt(c.name)==="vShow"),o=e.find(c=>xt(c.name)==="vBind"),u=e.find(c=>xt(c.name)==="vHtml"),l=e.filter(c=>xt(c.name)==="vModel"),a=e.filter(c=>!m0.includes(xt(c.name)));return{vIf:t,vElseIf:r,vElse:n,vFor:i,vShow:s,vModels:l,vBind:o,others:a,vHtml:u}}function X0(e,t){return!!t.__parseExpression(e.value)}function Q0(e,t){return t?mt(t)?e.__parseExpression(t):t:"div"}function t1(e,t,r){const n=an(t,r);return n.ref=r.__ref(e,n.ref),n}function an(e,t){return mt(e)?t.__parseExpression(e):dt(e)?t.__parseFunction(e):Array.isArray(e)?e.map(r=>an(r,t)):typeof e=="object"?Object.keys(e||{}).reduce((r,n)=>{let i=e[n];return r[n]=an(i,t),r},{}):e}function e1(e,t,r){const n=["passive","capture","once"],i={capture:"Capture",once:"Once",passive:"OnceCapture"};return Object.keys(t||{}).reduce((s,o)=>{const u=t[o],l=fa(u.modifiers),a=l.find(p=>n.includes(p)),c="on"+Is(o)+(a&&i[a]||""),f=r.__parseFunction(u.handler);return f&&(s[c]=e.withModifiers(f,l)),s},{})}function r1(e,t,r,n,i=[]){let s=i.findIndex(o=>o.id===e.id);for(let o=++s;o<i.length;o++){const{directives:u=[]}=i[o],{vElseIf:l,vElse:a}=la(u);if(l){if(t.__parseExpression(l.value))return oe(i[o],t,r,n,i,!0);continue}if(a)return oe(i[o],t,r,n,i,!0)}return null}function fa(e={},t=!1){const r=Object.keys(e);return t?r.map(n=>"."+n):r}function n1(e,t,r,n,i){var l;const{children:s}=t,o=i1(t,n),u=(l=n.$slots)==null?void 0:l[o.name];return u?u(r):s?Ct(s)?e.createTextVNode(s):mt(s)?e.createTextVNode(ia(n.__parseExpression(s))):Array.isArray(s)?s.map(a=>oe(a,n,e,i,s)):null:null}function i1(e,t){const{props:r}=e,n=(r==null?void 0:r.name)||"default";return{name:mt(n)?t.__parseExpression(n):n,params:[]}}function s1(e,t){return t.__parseExpression(e.value)?{}:{display:"none"}}function o1(e,t){return{innerHTML:t.__parseExpression(e.value)||""}}function a1(e,t,r){var u;const n={type:"JSFunction",value:(u=t.value)!=null&&u.value?`(v) => {
|
|
67
67
|
${t.value.value} = v;
|
|
68
|
-
}`:"(v) => {}"},i=r.__parseFunction(n),s=fa(mt(t.modifiers)?r.__parseExpression(t.modifiers):t.modifiers),o=mt(t.arg)?r.__parseExpression(t.arg):t.arg||"modelValue";return{[o]:r.__parseExpression(t.value),[`onUpdate:${o}`]:s.length&&i?e.withModifiers(i,s):i}}function u1(e,t,r,n,i){if(!t)return null;if(Ct(t))return{default:()=>t};if(mt(t))return{default:()=>ia(r.__parseExpression(t))};if(Array.isArray(t)&&t.length>0){const s=c1(t),o=(u,l)=>!u||!i?{}:i!=null&&i.id&&Object.keys(u).length?l?{[l]:u}:{[`scope_${i.id}`]:u}:l?{[l]:Object.create(null)}:{};return Object.entries(s).reduce((u,[l,{nodes:a,params:c,scope:f}])=>(u[l]=p=>{const h=c.length?Gd(p!=null?p:{},c):o(p,f);return a.map(d=>oe(d,r.__clone(h),e,n,a))},u),{})}return null}function c1(e){const t={};for(const r of e){const n=l1(r.slot),i=n.name;t[i]?(t[i].nodes.push(r),t[i].params=t[i].params.concat(n.params),t[i].scope=n.scope||""):t[i]={nodes:[r],params:n.params,scope:n.scope||""}}return t}function l1(e="default"){return Ct(e)?{name:e,params:[],scope:""}:V({params:[],scope:""},e)}function f1(e,t,r){const{value:n,iterator:i}=e,{item:s="item",index:o="index"}=i||{};let u=r.__parseExpression(n)||[];return Number.isInteger(u)&&(u=new Array(u).fill(!0).map((l,a)=>a+1)),Array.isArray(u)?u.map((l,a)=>t(r.__clone({[s]:l,[o]:a}),a)):(console.warn("[vForRender]:",`${n==null?void 0:n.value} is not a Arrary`),[])}const Nr=is({name:"VtjPageContainer",setup(){return k(this,null,function*(){const e=E1(),t=Ta(),r=t.meta.__vtj__||t.params.id,n=r?e.getPage(r):e.getHomepage(),i=n?yield e.getRenderComponent(n.id):null,s=Sa(Symbol());if(n){Object.assign(t.meta,n.meta||{},{cache:n.cache});const{useTitle:o}=e==null?void 0:e.adapter;o&&o(n.title||"VTJ")}return{provider:e,component:i,file:n,query:t.query,meta:t.meta,sid:s,route:t}})},render(){const{component:e,query:t,sid:r}=this;return e?Ir(e,et(V({},t),{key:r})):Ir("div","页面不存在")},activated(){this.meta.cache===!1&&(this.sid=Symbol())}}),h1=is({name:"VtjStartupContainer",render(){return Ir("div","page not found!")}});function un(e,t,r=[]){const n=[];for(const i of r){const{id:s,title:o,icon:u,children:l,hidden:a,layout:c}=i;if(c){const f=un(e,t,l||[]);n.push(...f)}else{const f={id:s,title:o,icon:u,hidden:a,url:`${e}/${t}/${s}`,children:l&&l.length?un(e,t,l):void 0};n.push(f)}}return n}function Pr(e,t){const{id:r,title:n,meta:i}=e,{name:s="page",prefix:o="",component:u,routeMeta:l}=t;return{name:r,path:`${o}${s}/${r}`,component:u,meta:et(V(V({title:n},l),i),{__vtj__:r})}}function cn(e){const{name:t="page",prefix:r="",pages:n=[],component:i,loader:s,routeMeta:o,homepage:u}=e,l=[];for(const a of n){const{id:c,title:f,dir:p,layout:h,children:d,meta:g}=a;if(p){const b=cn({name:t,prefix:r,component:i,routeMeta:o,homepage:u,loader:s,pages:d||[]});l.push(...b)}else if(h){const b=cn({name:t,prefix:r,component:i,routeMeta:o,homepage:u,loader:s,pages:d||[]}),_={name:`layout_${c}`,path:r,component:()=>s(c),meta:et(V(V({title:f},o),g),{__vtj__:c}),children:b};l.push(_),l.push(Pr(a,e))}else if(l.push(Pr(a,e)),u===c){const b=Pr(a,e);b.path="",b.name=`home_${c}`,l.push(b)}}return l}function p1(e={},t){const{css:r,store:n,enhance:i}=e,{window:s,app:o,library:u={},adapter:l,mode:a}=t,{Pinia:c}=u;o.config.globalProperties.$libs=u,pr(s,"global-css",r||""),c&&n&&d1(n,o,c),m1(o,l,e),!l.access&&e.access&&g1(e.access,o,a,l),y1(o,e),i&&v1(i,o,u)}function d1(e,t,r){const n=r.createPinia();if(t.use(n),dt(e)&&e.value){const i=pt(e,{},!1,!1,!0),s=r.defineStore("$store",i(t)||{});t.config.globalProperties.$store=s()}}function g1(e,t,r,n){if(dt(e)&&e.value){const i=pt(e,{},!1,!1,!0),{alert:s,request:o}=n,u=new aa(V({alert:s,storagePrefix:"__VTJ_APP_"},i(t))),l=t.config.globalProperties.$router;u.connect({mode:r,router:l,request:o}),t.use(u)}}function m1(e,t,r){if(!t.request)return;const{axios:n,request:i,response:s}=r;if(n&&dt(n)&&n.value){const o=pt(n,{},!1,!1,!0);t.request.setConfig(o(e))}if(i&&dt(i)&&i.value){const o=pt(i,{},!1,!1,!0),u=t.request;u.__unReq&&u.__unReq(),u.__unReq=t.request.useRequest(l=>o(l,e))}if(s&&dt(s)&&s.value){const o=pt(s,{},!1,!1,!0),u=t.request;u.__unRes&&u.__unRes(),u.__unRes=t.request.useResponse(l=>o(l,e))}}function y1(e,t){const{beforeEach:r,afterEach:n}=t,i=e.config.globalProperties.$router;if(r&&dt(r)&&r.value){const s=pt(r,{},!1,!1,!0);i&&i.beforeEach((o,u,l)=>s(o,u,l,e))}if(n&&dt(n)&&n.value){const s=pt(n,{},!1,!1,!0);i&&i.afterEach((o,u,l)=>s(o,u,l,e))}}function v1(e,t,r={}){dt(e)&&e.value&&pt(e,{},!1,!1,!0)(t,r)}function b1(e,t,r){if(!e||!t||!r)return;const{VueI18n:n}=t;if(n){const{locale:i,fallbackLocale:s,messages:o=[]}=r,u={};for(let a of o){const c=Object.keys(a).filter(f=>f!=="key");for(const f of c)u[f]||(u[f]={}),u[f][a.key]=a[f]}const l=n.createI18n({legacy:!1,locale:i,fallbackLocale:s,messages:u});e.use(l)}}const ha=Symbol("Provider");class w1 extends hg{constructor(r){super();z(this,"mode");z(this,"globals",{});z(this,"modules",{});z(this,"adapter",{request:tn,jsonp:na});z(this,"apis",{});z(this,"dependencies",{});z(this,"materials",{});z(this,"library",{});z(this,"libraryLocales",{});z(this,"libraryLocaleMap",{});z(this,"service");z(this,"project",null);z(this,"components",{});z(this,"nodeEnv","development");z(this,"router",null);z(this,"materialPath","./");z(this,"urlDslCaches",{});this.options=r;const{service:n,mode:i=tt.Raw,dependencies:s,materials:o,project:u={},adapter:l={},globals:a={},modules:c={},router:f=null,materialPath:p="./",nodeEnv:h="development"}=r;this.mode=i,this.modules=c,this.service=n,this.router=f,this.materialPath=p,this.nodeEnv=h,s&&(this.dependencies=s),o&&(this.materials=o),Object.assign(this.globals,a),Object.assign(this.adapter,l);const{access:d,request:g}=this.adapter;d&&d.connect({mode:i,router:f,request:g}),u&&i!==tt.Design?this.load(u):this.project=u}createMock(r){return(...n)=>k(null,null,function*(){var s;let i={};if(r)try{i=yield r.apply(r,n)}catch(o){ie.warn("模拟数据模版异常",o)}return(s=Se())==null?void 0:s.mock(i)})}load(r){return k(this,null,function*(){const{vtjDir:n=".vtj"}=this.options,i=this.modules[`${n}/projects/${r.id}.json`]||this.modules[`/src/${n}/projects/${r.id}.json`];if(this.project=i?yield i():yield this.service.init(r),!this.project)throw new Error("project is null");const{apis:s=[],meta:o=[]}=this.project,u=window;u&&(u.CKEDITOR_VERSION=void 0),this.mode===tt.Raw?yield this.loadDependencies(u):yield this.loadAssets(u),this.initMock(u),this.apis=P0(s,o,this.adapter),ua(u),I0(s,u),r.platform!=="uniapp"&&this.initRouter(),this.triggerReady()})}initMock(r){const n=Se(r);n&&n.setup({timeout:"50-500"})}loadDependencies(r){return k(this,null,function*(){const n=Object.entries(this.dependencies);for(const[i,s]of n)r[i]||(r[i]=this.library[i]=yield s())})}loadAssets(r){return k(this,null,function*(){const{dependencies:n=[]}=this.project,{dependencies:i,library:s,components:o,materialPath:u,nodeEnv:l,libraryLocales:a}=this,{libraryExports:c,libraryMap:f,materials:p,materialExports:h,materialMapLibrary:d,libraryLocaleMap:g}=E0(n,u,l==="development");Object.assign(this.libraryLocaleMap,g);for(const b of c){const _=i[b],y=r[b];if(y)s[b]=y;else if(_)r[b]=s[b]=yield _();else{const w=f[b]||[];for(const E of w)fr(E)&&(yield A0(E,Ke.append(E,{v:Dr}))),hr(E)&&(yield Qi(Ke.append(E,{v:Dr})));s[b]=r[b]}const v=g[b];if(v){const w=i[v];a[v]=w?yield w():r[v]}}if(l==="development"){for(const _ of p)yield Qi(Ke.append(_,{v:Dr}));const b=this.materials||{};for(const _ of h){const y=r[d[_]],v=(y==null?void 0:y.default)||y,w=fg[_];if(w)v&&w.forEach(E=>{o[E]=v[E]});else{const E=b[_]?(yield b[_]()).default:r[_];E&&v&&(E.components||[]).forEach(m=>{o[m.name]=S0(m,v)})}}}})}initRouter(){const{router:r,project:n,options:i,adapter:s}=this;if(!r)return;const o=(n==null?void 0:n.platform)==="uniapp"?"pages":"page",{routeAppendTo:u,pageRouteName:l=o,routeMeta:a}=i,c=u?"":"/",f={path:`${c}${l}/:id`,name:We,component:Nr},p={path:c,name:Br,component:n!=null&&n.homepage?Nr:s.startupComponent||h1,meta:a};if(r.hasRoute(We)&&r.removeRoute(We),r.hasRoute(Br)&&r.removeRoute(Br),i.enableStaticRoute){const h=(n==null?void 0:n.pages)||[];cn({name:l,prefix:c,pages:h,component:Nr,loader:this.getRenderComponent.bind(this),homepage:n==null?void 0:n.homepage}).forEach(d=>{u?r.addRoute(u,d):r.addRoute(d)}),n!=null&&n.homepage||(u?r.addRoute(u,p):r.addRoute(p))}else u?(r.addRoute(u,f),r.addRoute(u,p)):(r.addRoute(f),r.addRoute(p))}install(r){var o,u,l;const{libraryLocaleMap:n,libraryLocales:i}=this,s=r.config.globalProperties.installed||{};for(const[a,c]of Object.entries(this.library))if(!s[a]&&R0(c)){const f=i[n[a]];r.use(c,{locale:f}),s[a]=!0}r.provide(ha,this),r.config.globalProperties.$provider=this,this.options.install&&r.use(this.options.install),this.adapter.access&&r.use(this.adapter.access),((o=this.project)==null?void 0:o.platform)!=="uniapp"&&this.mode!==tt.Design&&this.initGlobals(((u=this.project)==null?void 0:u.globals)||{},{app:r,window,adapter:this.adapter,library:this.library,mode:this.mode}),this.mode!==tt.Design&&((l=this.project)!=null&&l.i18n)&&this.initI18n(r,this.library,this.project.i18n),this.options.enhance&&r.use(this.options.enhance,this),this.mode===tt.Design&&(r.config.errorHandler=(a,c,f)=>{const p=c==null?void 0:c.$options.name,h=typeof a=="string"?a:(a==null?void 0:a.message)||(a==null?void 0:a.msg)||"未知错误",d=`[ ${p} ] ${h} ${f}`;console.error("[VTJ Error]:",{err:a,instance:c,info:f},a==null?void 0:a.stack),this.adapter.notify&&this.adapter.notify(d,"组件渲染错误","error")}),r.config.globalProperties.installed=s}getFile(r){const{blocks:n=[]}=this.project||{};return this.getPage(r)||n.find(i=>i.id===r)||null}getPage(r){const{pages:n=[]}=this.project||{},i=(s,o=[])=>{for(const u of o){if(u.id===s)return u;if(u.children&&u.children.length){const l=i(s,u.children);if(l)return l}}};return i(r,n)||null}getMenus(r="page",n=""){var i;return un(n,r,((i=this.project)==null?void 0:i.pages)||[])}getHomepage(){const{homepage:r}=this.project||{};return r?this.getPage(r):null}getDsl(r){return k(this,null,function*(){const{vtjDir:n=".vtj"}=this.options,i=this.modules[`${n}/files/${r}.json`]||this.modules[`/src/${n}/files/${r}.json`];return i?yield i():this.service.getFile(r,this.project||void 0).catch(()=>null)})}getDslByUrl(r){return k(this,null,function*(){return this.urlDslCaches[r]||(this.adapter.request?this.urlDslCaches[r]=this.adapter.request.send({url:r,method:"get",settings:{validSuccess:!1,originResponse:!0}}).then(i=>i.data).catch(()=>null):null)})}createDslRenderer(r,n={}){const{library:i,components:s,mode:o,apis:u}=this,l=V({mode:o,Vue:i.Vue,components:s,libs:i,apis:u,window},n),a=on({getDsl:c=>k(this,null,function*(){return(yield this.getDsl(c))||null}),getDslByUrl:c=>k(this,null,function*(){return(yield this.getDslByUrl(c))||null}),options:l});return sn(et(V({},l),{dsl:r,loader:a}))}getRenderComponent(r,n){return k(this,null,function*(){var o;const i=this.getFile(r);if(!i)return ie.warn(`Can not find file: ${r}`),null;if(n&&n(i),this.mode===tt.Raw){const{vtjRawDir:u=".vtj/vue"}=this.options,l=`${u}/${r}.vue`,a=this.modules[l]||this.modules[`/src/pages/${r}.vue`];return a?(o=yield a())==null?void 0:o.default:this.nodeEnv==="development"&&this.adapter.startupComponent||null}const s=yield this.getDsl(i.id);return s?this.createDslRenderer(s).renderer:(ie.warn(`Can not find dsl: ${r}`),null)})}defineUrlSchemaComponent(r,n){return $n(()=>k(this,null,function*(){const i=yield this.getDslByUrl(r);return i?(i.name=n||i.name,this.createDslRenderer(i).renderer):null}))}definePluginComponent(r){return $n(()=>k(null,null,function*(){return yield ca(r,window)}))}initGlobals(r,n){const i=Object.assign({adapter:this.adapter,window},n);p1(r,i)}initI18n(r,n,i){b1(r,n,i)}}function _1(e){const t=new w1(e);return{provider:t,onReady:r=>t.ready(r)}}function E1(e={}){const t=xa(ha,null);if(!t)throw new Error("Can not find provider");if(t.nodeEnv==="development"){const{id:r,version:n}=e;r&&n&&k(null,null,function*(){const i=yield t.getDsl(r);(i==null?void 0:i.__VERSION__)!==n&&t.adapter.notify&&t.adapter.notify(`[ ${i==null?void 0:i.name} ] 组件源码版本与运行时版本不一致,请重新发布组件`,"版本不一致","warning")})}return t}function S1(e,t=""){return k(this,null,function*(){const{name:r,urls:n=[]}=e||{},i=n.map(u=>t+u),{css:s,js:o}=x0(i);if(s.length&&sa(s),o.length)return yield oa(o,r).catch(()=>{})})}const pa={type:"json",validSuccess:!0,originResponse:!1,failMessage:!0,validate:e=>{var t;return((t=e.data)==null?void 0:t.code)===0}},x1=(e,t="/__vtj__/api/:type.json")=>(r,n,i)=>e.send({url:t,method:"post",params:{type:r},query:i,data:{type:r,data:n},settings:pa}),T1=(e,t="/__vtj__/api/uploader.json")=>(r,n)=>k(null,null,function*(){return yield e.send({url:t,method:"post",data:{files:r,projectId:n},settings:et(V({},pa),{type:"data"})}).then(i=>i&&i[0]?i[0]:null).catch(()=>null)});function A1(e){return xn({settings:{type:"json",validSuccess:!0,originResponse:!1,failMessage:!0,validate:t=>{var r;return((r=t.data)==null?void 0:r.code)===0},showError:t=>{e&&e(t||"未知错误")}}})}class R1{constructor(t=tn){z(this,"api");z(this,"pluginCaches",{});z(this,"uploader");this.req=t,this.api=x1(t),this.uploader=T1(t)}getExtension(){return k(this,null,function*(){console.log("BaseService.getExtension")})}init(t){return k(this,null,function*(){return console.log("BaseService.init",t),{}})}saveProject(t,r){return k(this,null,function*(){return!!(yield this.api("saveProject",t,{type:r}).catch(()=>!1))})}saveMaterials(t,r){return k(this,null,function*(){return console.log("BaseService.saveMaterials",t,r),!1})}saveFile(t){return k(this,null,function*(){return console.log("BaseService.saveFile",t),!1})}getFile(t){return k(this,null,function*(){return console.log("BaseService.getFile",t),{}})}removeFile(t){return k(this,null,function*(){return console.log("BaseService.removeFile",t),!1})}saveHistory(t){return k(this,null,function*(){return console.log("BaseService.saveHistory",t),!1})}removeHistory(t){return k(this,null,function*(){return console.log("BaseService.removeHistory",t),!1})}getHistory(t){return k(this,null,function*(){return console.log("BaseService.getHistory",t),{}})}getHistoryItem(t,r){return k(this,null,function*(){return console.log("BaseService.getHistoryItem",t,r),{}})}saveHistoryItem(t,r){return k(this,null,function*(){return console.log("BaseService.saveHistoryItem",t,r),!1})}removeHistoryItem(t,r){return k(this,null,function*(){return console.log("BaseService.removeHistoryItem",t,r),!1})}publish(t){return k(this,null,function*(){return!!(yield this.api("publish",t).catch(()=>!1))})}publishFile(t,r){return k(this,null,function*(){return!!(yield this.api("publishFile",{project:t,file:r}).catch(()=>!1))})}genVueContent(t,r){return k(this,null,function*(){return yield this.api("genVueContent",{project:t,dsl:r}).catch(()=>"")})}parseVue(t,r){return k(this,null,function*(){return yield this.api("parseVue",V({project:t},r))})}createRawPage(t){return k(this,null,function*(){return yield this.api("createRawPage",t).catch(()=>"")})}removeRawPage(t){return k(this,null,function*(){return yield this.api("removeRawPage",t).catch(()=>"")})}uploadStaticFile(t,r){return k(this,null,function*(){return yield this.uploader(t,r).catch(()=>null)})}getStaticFiles(t){return k(this,null,function*(){return yield this.api("getStaticFiles",t).catch(()=>[])})}removeStaticFile(t,r){return k(this,null,function*(){return yield this.api("removeStaticFile",{name:t,projectId:r}).catch(()=>"")})}clearStaticFiles(t){return k(this,null,function*(){return yield this.api("clearStaticFiles",t).catch(()=>"")})}getPluginMaterial(t){return k(this,null,function*(){const{urls:r=[]}=t,n=r.filter(s=>w0(s))[0];return n?this.pluginCaches[n]||(this.pluginCaches[n]=tn.send({url:n,method:"get",settings:{validSuccess:!1,originResponse:!0}}).then(s=>s.data).catch(()=>null)):null})}genSource(t){return k(this,null,function*(){return console.log("BaseService.genSource",t),""})}}new Qo({type:"local",expired:0,prefix:"__VTJ_"});class $1 extends R1{constructor(){super(...arguments);z(this,"getFileCaches",{})}getExtension(){return k(this,null,function*(){return yield this.api("getExtension",{}).catch(()=>{})})}init(r){return k(this,null,function*(){return(yield this.api("init",r).catch(()=>null))||{}})}saveProject(r,n){return k(this,null,function*(){return!!(yield this.api("saveProject",r,{type:n}).catch(()=>!1))})}saveMaterials(r,n){return k(this,null,function*(){return!!(yield this.api("saveMaterials",{project:r,materials:Jd(n)}).catch(()=>!1))})}saveFile(r){return k(this,null,function*(){return!!(yield this.api("saveFile",r).catch(()=>!1))})}getFile(r){return k(this,null,function*(){return this.getFileCaches[r]||(this.getFileCaches[r]=this.api("getFile",r).catch(()=>null)).finally(()=>{delete this.getFileCaches[r]})})}removeFile(r){return k(this,null,function*(){return!!(yield this.api("removeFile",r).catch(()=>!1))})}saveHistory(r){return k(this,null,function*(){return!!(yield this.api("saveHistory",r).catch(()=>!1))})}removeHistory(r){return k(this,null,function*(){return!!(yield this.api("removeHistory",r).catch(()=>!1))})}getHistory(r){return k(this,null,function*(){return(yield this.api("getHistory",r).catch(()=>null))||{}})}getHistoryItem(r,n){return k(this,null,function*(){return(yield this.api("getHistoryItem",{fId:r,id:n}).catch(()=>null))||{}})}saveHistoryItem(r,n){return k(this,null,function*(){return!!(yield this.api("saveHistoryItem",{fId:r,item:n}).catch(()=>!1))})}removeHistoryItem(r,n){return k(this,null,function*(){return!!(yield this.api("removeHistoryItem",{fId:r,ids:n}).catch(()=>!1))})}}/**!
|
|
68
|
+
}`:"(v) => {}"},i=r.__parseFunction(n),s=fa(mt(t.modifiers)?r.__parseExpression(t.modifiers):t.modifiers),o=mt(t.arg)?r.__parseExpression(t.arg):t.arg||"modelValue";return{[o]:r.__parseExpression(t.value),[`onUpdate:${o}`]:s.length&&i?e.withModifiers(i,s):i}}function u1(e,t,r,n,i){if(!t)return null;if(Ct(t))return{default:()=>t};if(mt(t))return{default:()=>ia(r.__parseExpression(t))};if(Array.isArray(t)&&t.length>0){const s=c1(t),o=(u,l)=>!u||!i?{}:i!=null&&i.id&&Object.keys(u).length?l?{[l]:u}:{[`scope_${i.id}`]:u}:l?{[l]:Object.create(null)}:{};return Object.entries(s).reduce((u,[l,{nodes:a,params:c,scope:f}])=>(u[l]=p=>{const h=c.length?Gd(p!=null?p:{},c):o(p,f);return a.map(d=>oe(d,r.__clone(h),e,n,a))},u),{})}return null}function c1(e){const t={};for(const r of e){const n=l1(r.slot),i=n.name;t[i]?(t[i].nodes.push(r),t[i].params=t[i].params.concat(n.params),t[i].scope=n.scope||""):t[i]={nodes:[r],params:n.params,scope:n.scope||""}}return t}function l1(e="default"){return Ct(e)?{name:e,params:[],scope:""}:V({params:[],scope:""},e)}function f1(e,t,r){const{value:n,iterator:i}=e,{item:s="item",index:o="index"}=i||{};let u=r.__parseExpression(n)||[];return Number.isInteger(u)&&(u=new Array(u).fill(!0).map((l,a)=>a+1)),Array.isArray(u)?u.map((l,a)=>t(r.__clone({[s]:l,[o]:a}),a)):(console.warn("[vForRender]:",`${n==null?void 0:n.value} is not a Arrary`),[])}const Nr=is({name:"VtjPageContainer",setup(){return k(this,null,function*(){const e=E1(),t=Ta(),r=t.meta.__vtj__||t.params.id,n=r?e.getPage(r):e.getHomepage(),i=n?yield e.getRenderComponent(n.id):null,s=Sa(Symbol());if(n){Object.assign(t.meta,n.meta||{},{cache:n.cache});const{useTitle:o}=e==null?void 0:e.adapter;o&&o(n.title||"VTJ")}return{provider:e,component:i,file:n,query:t.query,meta:t.meta,sid:s,route:t}})},render(){const{component:e,query:t,sid:r}=this;return e?Ir(e,et(V({},t),{key:r})):Ir("div","页面不存在")},activated(){this.meta.cache===!1&&(this.sid=Symbol())}}),h1=is({name:"VtjStartupContainer",render(){return Ir("div","page not found!")}});function un(e,t,r=[]){const n=[];for(const i of r){const{id:s,title:o,icon:u,children:l,hidden:a,layout:c}=i;if(c){const f=un(e,t,l||[]);n.push(...f)}else{const f={id:s,title:o,icon:u,hidden:a,url:`${e}/${t}/${s}`,children:l&&l.length?un(e,t,l):void 0};n.push(f)}}return n}function Pr(e,t){const{id:r,title:n,meta:i}=e,{name:s="page",prefix:o="",component:u,routeMeta:l}=t;return{name:r,path:`${o}${s}/${r}`,component:u,meta:et(V(V({title:n},l),i),{__vtj__:r})}}function cn(e){const{name:t="page",prefix:r="",pages:n=[],component:i,loader:s,routeMeta:o,homepage:u}=e,l=[];for(const a of n){const{id:c,title:f,dir:p,layout:h,children:d,meta:g}=a;if(p){const b=cn({name:t,prefix:r,component:i,routeMeta:o,homepage:u,loader:s,pages:d||[]});l.push(...b)}else if(h){const b=cn({name:t,prefix:r,component:i,routeMeta:o,homepage:u,loader:s,pages:d||[]}),_={name:`layout_${c}`,path:r,component:()=>s(c),meta:et(V(V({title:f},o),g),{__vtj__:c}),children:b};l.push(_),l.push(Pr(a,e))}else if(l.push(Pr(a,e)),u===c){const b=Pr(a,e);b.path="",b.name=`home_${c}`,l.push(b)}}return l}function p1(e={},t){const{css:r,store:n,enhance:i}=e,{window:s,app:o,library:u={},adapter:l,mode:a}=t,{Pinia:c}=u;o.config.globalProperties.$libs=u,pr(s,"global-css",r||""),c&&n&&d1(n,o,c),m1(o,l,e),!l.access&&e.access&&g1(e.access,o,a,l),y1(o,e),i&&v1(i,o,u)}function d1(e,t,r){const n=r.createPinia();if(t.use(n),dt(e)&&e.value){const i=pt(e,{},!1,!1,!0),s=r.defineStore("$store",i(t)||{});t.config.globalProperties.$store=s()}}function g1(e,t,r,n){if(dt(e)&&e.value){const i=pt(e,{},!1,!1,!0),{alert:s,request:o}=n,u=new aa(V({alert:s,storagePrefix:"__VTJ_APP_"},i(t))),l=t.config.globalProperties.$router;u.connect({mode:r,router:l,request:o}),t.use(u)}}function m1(e,t,r){if(!t.request)return;const{axios:n,request:i,response:s}=r;if(n&&dt(n)&&n.value){const o=pt(n,{},!1,!1,!0);t.request.setConfig(o(e))}if(i&&dt(i)&&i.value){const o=pt(i,{},!1,!1,!0),u=t.request;u.__unReq&&u.__unReq(),u.__unReq=t.request.useRequest(l=>o(l,e))}if(s&&dt(s)&&s.value){const o=pt(s,{},!1,!1,!0),u=t.request;u.__unRes&&u.__unRes(),u.__unRes=t.request.useResponse(l=>o(l,e))}}function y1(e,t){const{beforeEach:r,afterEach:n}=t,i=e.config.globalProperties.$router;if(r&&dt(r)&&r.value){const s=pt(r,{},!1,!1,!0);i&&i.beforeEach((o,u,l)=>s(o,u,l,e))}if(n&&dt(n)&&n.value){const s=pt(n,{},!1,!1,!0);i&&i.afterEach((o,u,l)=>s(o,u,l,e))}}function v1(e,t,r={}){dt(e)&&e.value&&pt(e,{},!1,!1,!0)(t,r)}function b1(e,t,r){if(!e||!t||!r)return;const{VueI18n:n}=t;if(n){const{locale:i,fallbackLocale:s,messages:o=[]}=r,u={};for(let a of o){const c=Object.keys(a).filter(f=>f!=="key");for(const f of c)u[f]||(u[f]={}),u[f][a.key]=a[f]}const l=n.createI18n({legacy:!1,locale:i,fallbackLocale:s,messages:u});e.use(l)}}const ha=Symbol("Provider");class w1 extends hg{constructor(r){super();z(this,"mode");z(this,"globals",{});z(this,"modules",{});z(this,"adapter",{request:tn,jsonp:na});z(this,"apis",{});z(this,"dependencies",{});z(this,"materials",{});z(this,"library",{});z(this,"libraryLocales",{});z(this,"libraryLocaleMap",{});z(this,"service");z(this,"project",null);z(this,"components",{});z(this,"nodeEnv","development");z(this,"router",null);z(this,"materialPath","./");z(this,"urlDslCaches",{});this.options=r;const{service:n,mode:i=tt.Raw,dependencies:s,materials:o,project:u={},adapter:l={},globals:a={},modules:c={},router:f=null,materialPath:p="./",nodeEnv:h="development"}=r;this.mode=i,this.modules=c,this.service=n,this.router=f,this.materialPath=p,this.nodeEnv=h,s&&(this.dependencies=s),o&&(this.materials=o),Object.assign(this.globals,a),Object.assign(this.adapter,l);const{access:d,request:g}=this.adapter;d&&d.connect({mode:i,router:f,request:g}),u&&i!==tt.Design?this.load(u):this.project=u}createMock(r){return(...n)=>k(null,null,function*(){var s;let i={};if(r)try{i=yield r.apply(r,n)}catch(o){ie.warn("模拟数据模版异常",o)}return(s=Se())==null?void 0:s.mock(i)})}load(r){return k(this,null,function*(){const{vtjDir:n=".vtj"}=this.options,i=this.modules[`${n}/projects/${r.id}.json`]||this.modules[`/src/${n}/projects/${r.id}.json`];if(this.project=i?yield i():yield this.service.init(r),!this.project)throw new Error("project is null");const{apis:s=[],meta:o=[]}=this.project,u=window;u&&(u.CKEDITOR_VERSION=void 0),this.mode===tt.Raw?yield this.loadDependencies(u):yield this.loadAssets(u),this.initMock(u),this.apis=P0(s,o,this.adapter),ua(u),I0(s,u),r.platform!=="uniapp"&&this.initRouter(),this.triggerReady()})}initMock(r){const n=Se(r);n&&n.setup({timeout:"50-500"})}loadDependencies(){return k(this,arguments,function*(r={}){const n=Object.entries(this.dependencies);for(const[i,s]of n)r[i]||(r[i]=this.library[i]=yield s())})}loadAssets(){return k(this,arguments,function*(r={}){const{dependencies:n=[]}=this.project,{dependencies:i,library:s,components:o,materialPath:u,nodeEnv:l,libraryLocales:a}=this,{libraryExports:c,libraryMap:f,materials:p,materialExports:h,materialMapLibrary:d,libraryLocaleMap:g}=E0(n,u,l==="development");Object.assign(this.libraryLocaleMap,g);for(const b of c){const _=i[b],y=r[b];if(y)s[b]=y;else if(_)r[b]=s[b]=yield _();else{const w=f[b]||[];for(const E of w)fr(E)&&(yield A0(E,Ke.append(E,{v:Dr}))),hr(E)&&(yield Qi(Ke.append(E,{v:Dr})));s[b]=r[b]}const v=g[b];if(v){const w=i[v];a[v]=w?yield w():r[v]}}if(l==="development"){for(const _ of p)yield Qi(Ke.append(_,{v:Dr}));const b=this.materials||{};for(const _ of h){const y=r[d[_]],v=(y==null?void 0:y.default)||y,w=fg[_];if(w)v&&w.forEach(E=>{o[E]=v[E]});else{const E=b[_]?(yield b[_]()).default:r[_];E&&v&&(E.components||[]).forEach(m=>{o[m.name]=S0(m,v)})}}}})}initRouter(){const{router:r,project:n,options:i,adapter:s}=this;if(!r)return;const o=(n==null?void 0:n.platform)==="uniapp"?"pages":"page",{routeAppendTo:u,pageRouteName:l=o,routeMeta:a}=i,c=u?"":"/",f={path:`${c}${l}/:id`,name:We,component:Nr},p={path:c,name:Br,component:n!=null&&n.homepage?Nr:s.startupComponent||h1,meta:a};if(r.hasRoute(We)&&r.removeRoute(We),r.hasRoute(Br)&&r.removeRoute(Br),i.enableStaticRoute){const h=(n==null?void 0:n.pages)||[];cn({name:l,prefix:c,pages:h,component:Nr,loader:this.getRenderComponent.bind(this),homepage:n==null?void 0:n.homepage}).forEach(d=>{u?r.addRoute(u,d):r.addRoute(d)}),n!=null&&n.homepage||(u?r.addRoute(u,p):r.addRoute(p))}else u?(r.addRoute(u,f),r.addRoute(u,p)):(r.addRoute(f),r.addRoute(p))}install(r){var o,u,l,a;const{libraryLocaleMap:n,libraryLocales:i}=this,s=r.config.globalProperties.installed||{};for(const[c,f]of Object.entries(this.library))if(!s[c]&&R0(f)){const p=i[n[c]];r.use(f,{locale:p}),s[c]=!0}r.provide(ha,this),r.config.globalProperties.$provider=this,r.config.globalProperties.$request=(o=this.adapter)==null?void 0:o.request,this.options.install&&r.use(this.options.install),this.adapter.access&&r.use(this.adapter.access),((u=this.project)==null?void 0:u.platform)!=="uniapp"&&this.mode!==tt.Design&&this.initGlobals(((l=this.project)==null?void 0:l.globals)||{},{app:r,window,adapter:this.adapter,library:this.library,mode:this.mode}),this.mode!==tt.Design&&((a=this.project)!=null&&a.i18n)&&this.initI18n(r,this.library,this.project.i18n),this.options.enhance&&r.use(this.options.enhance,this),this.mode===tt.Design&&(r.config.errorHandler=(c,f,p)=>{const h=f==null?void 0:f.$options.name,d=typeof c=="string"?c:(c==null?void 0:c.message)||(c==null?void 0:c.msg)||"未知错误",g=`[ ${h} ] ${d} ${p}`;console.error("[VTJ Error]:",{err:c,instance:f,info:p},c==null?void 0:c.stack),this.adapter.notify&&this.adapter.notify(g,"组件渲染错误","error")}),r.config.globalProperties.installed=s}getFile(r){const{blocks:n=[]}=this.project||{};return this.getPage(r)||n.find(i=>i.id===r)||null}getPage(r){const{pages:n=[]}=this.project||{},i=(s,o=[])=>{for(const u of o){if(u.id===s)return u;if(u.children&&u.children.length){const l=i(s,u.children);if(l)return l}}};return i(r,n)||null}getMenus(r="page",n=""){var i;return un(n,r,((i=this.project)==null?void 0:i.pages)||[])}getHomepage(){const{homepage:r}=this.project||{};return r?this.getPage(r):null}getDsl(r){return k(this,null,function*(){const{vtjDir:n=".vtj"}=this.options,i=this.modules[`${n}/files/${r}.json`]||this.modules[`/src/${n}/files/${r}.json`];return i?yield i():this.service.getFile(r,this.project||void 0).catch(()=>null)})}getDslByUrl(r){return k(this,null,function*(){return this.urlDslCaches[r]||(this.adapter.request?this.urlDslCaches[r]=this.adapter.request.send({url:r,method:"get",settings:{validSuccess:!1,originResponse:!0}}).then(i=>i.data).catch(()=>null):null)})}createDslRenderer(r,n={}){const{library:i,components:s,mode:o,apis:u}=this,l=V({mode:o,Vue:i.Vue,components:s,libs:i,apis:u,window},n),a=on({getDsl:c=>k(this,null,function*(){return(yield this.getDsl(c))||null}),getDslByUrl:c=>k(this,null,function*(){return(yield this.getDslByUrl(c))||null}),options:l});return sn(et(V({},l),{dsl:r,loader:a}))}getRenderComponent(r,n){return k(this,null,function*(){var o;const i=this.getFile(r);if(!i)return ie.warn(`Can not find file: ${r}`),null;if(n&&n(i),this.mode===tt.Raw){const{vtjRawDir:u=".vtj/vue"}=this.options,l=`${u}/${r}.vue`,a=this.modules[l]||this.modules[`/src/pages/${r}.vue`];return a?(o=yield a())==null?void 0:o.default:this.nodeEnv==="development"&&this.adapter.startupComponent||null}const s=yield this.getDsl(i.id);return s?this.createDslRenderer(s).renderer:(ie.warn(`Can not find dsl: ${r}`),null)})}defineUrlSchemaComponent(r,n){return $n(()=>k(this,null,function*(){const i=yield this.getDslByUrl(r);return i?(i.name=n||i.name,this.createDslRenderer(i).renderer):null}))}definePluginComponent(r){return $n(()=>k(null,null,function*(){return yield ca(r,window)}))}initGlobals(r,n){const i=Object.assign({adapter:this.adapter,window},n);p1(r,i)}initI18n(r,n,i){b1(r,n,i)}}function _1(e){const t=new w1(e);return{provider:t,onReady:r=>t.ready(r)}}function E1(e={}){const t=xa(ha,null);if(!t)throw new Error("Can not find provider");if(t.nodeEnv==="development"){const{id:r,version:n}=e;r&&n&&k(null,null,function*(){const i=yield t.getDsl(r);(i==null?void 0:i.__VERSION__)!==n&&t.adapter.notify&&t.adapter.notify(`[ ${i==null?void 0:i.name} ] 组件源码版本与运行时版本不一致,请重新发布组件`,"版本不一致","warning")})}return t}function S1(e,t=""){return k(this,null,function*(){const{name:r,urls:n=[]}=e||{},i=n.map(u=>t+u),{css:s,js:o}=x0(i);if(s.length&&sa(s),o.length)return yield oa(o,r).catch(()=>{})})}const pa={type:"json",validSuccess:!0,originResponse:!1,failMessage:!0,validate:e=>{var t;return((t=e.data)==null?void 0:t.code)===0}},x1=(e,t="/__vtj__/api/:type.json")=>(r,n,i)=>e.send({url:t,method:"post",params:{type:r},query:i,data:{type:r,data:n},settings:pa}),T1=(e,t="/__vtj__/api/uploader.json")=>(r,n)=>k(null,null,function*(){return yield e.send({url:t,method:"post",data:{files:r,projectId:n},settings:et(V({},pa),{type:"data"})}).then(i=>i&&i[0]?i[0]:null).catch(()=>null)});function A1(e){return xn({settings:{type:"json",validSuccess:!0,originResponse:!1,failMessage:!0,validate:t=>{var r;return((r=t.data)==null?void 0:r.code)===0},showError:t=>{e&&e(t||"未知错误")}}})}class R1{constructor(t=tn){z(this,"api");z(this,"pluginCaches",{});z(this,"uploader");this.req=t,this.api=x1(t),this.uploader=T1(t)}getExtension(){return k(this,null,function*(){console.log("BaseService.getExtension")})}init(t){return k(this,null,function*(){return console.log("BaseService.init",t),{}})}saveProject(t,r){return k(this,null,function*(){return!!(yield this.api("saveProject",t,{type:r}).catch(()=>!1))})}saveMaterials(t,r){return k(this,null,function*(){return console.log("BaseService.saveMaterials",t,r),!1})}saveFile(t){return k(this,null,function*(){return console.log("BaseService.saveFile",t),!1})}getFile(t){return k(this,null,function*(){return console.log("BaseService.getFile",t),{}})}removeFile(t){return k(this,null,function*(){return console.log("BaseService.removeFile",t),!1})}saveHistory(t){return k(this,null,function*(){return console.log("BaseService.saveHistory",t),!1})}removeHistory(t){return k(this,null,function*(){return console.log("BaseService.removeHistory",t),!1})}getHistory(t){return k(this,null,function*(){return console.log("BaseService.getHistory",t),{}})}getHistoryItem(t,r){return k(this,null,function*(){return console.log("BaseService.getHistoryItem",t,r),{}})}saveHistoryItem(t,r){return k(this,null,function*(){return console.log("BaseService.saveHistoryItem",t,r),!1})}removeHistoryItem(t,r){return k(this,null,function*(){return console.log("BaseService.removeHistoryItem",t,r),!1})}publish(t){return k(this,null,function*(){return!!(yield this.api("publish",t).catch(()=>!1))})}publishFile(t,r){return k(this,null,function*(){return!!(yield this.api("publishFile",{project:t,file:r}).catch(()=>!1))})}genVueContent(t,r){return k(this,null,function*(){return yield this.api("genVueContent",{project:t,dsl:r}).catch(()=>"")})}parseVue(t,r){return k(this,null,function*(){return yield this.api("parseVue",V({project:t},r))})}createRawPage(t){return k(this,null,function*(){return yield this.api("createRawPage",t).catch(()=>"")})}removeRawPage(t){return k(this,null,function*(){return yield this.api("removeRawPage",t).catch(()=>"")})}uploadStaticFile(t,r){return k(this,null,function*(){return yield this.uploader(t,r).catch(()=>null)})}getStaticFiles(t){return k(this,null,function*(){return yield this.api("getStaticFiles",t).catch(()=>[])})}removeStaticFile(t,r){return k(this,null,function*(){return yield this.api("removeStaticFile",{name:t,projectId:r}).catch(()=>"")})}clearStaticFiles(t){return k(this,null,function*(){return yield this.api("clearStaticFiles",t).catch(()=>"")})}getPluginMaterial(t){return k(this,null,function*(){const{urls:r=[]}=t,n=r.filter(s=>w0(s))[0];return n?this.pluginCaches[n]||(this.pluginCaches[n]=tn.send({url:n,method:"get",settings:{validSuccess:!1,originResponse:!0}}).then(s=>s.data).catch(()=>null)):null})}genSource(t){return k(this,null,function*(){return console.log("BaseService.genSource",t),""})}}new Qo({type:"local",expired:0,prefix:"__VTJ_"});class $1 extends R1{constructor(){super(...arguments);z(this,"getFileCaches",{})}getExtension(){return k(this,null,function*(){return yield this.api("getExtension",{}).catch(()=>{})})}init(r){return k(this,null,function*(){return(yield this.api("init",r).catch(()=>null))||{}})}saveProject(r,n){return k(this,null,function*(){return!!(yield this.api("saveProject",r,{type:n}).catch(()=>!1))})}saveMaterials(r,n){return k(this,null,function*(){return!!(yield this.api("saveMaterials",{project:r,materials:Jd(n)}).catch(()=>!1))})}saveFile(r){return k(this,null,function*(){return!!(yield this.api("saveFile",r).catch(()=>!1))})}getFile(r){return k(this,null,function*(){return this.getFileCaches[r]||(this.getFileCaches[r]=this.api("getFile",r).catch(()=>null)).finally(()=>{delete this.getFileCaches[r]})})}removeFile(r){return k(this,null,function*(){return!!(yield this.api("removeFile",r).catch(()=>!1))})}saveHistory(r){return k(this,null,function*(){return!!(yield this.api("saveHistory",r).catch(()=>!1))})}removeHistory(r){return k(this,null,function*(){return!!(yield this.api("removeHistory",r).catch(()=>!1))})}getHistory(r){return k(this,null,function*(){return(yield this.api("getHistory",r).catch(()=>null))||{}})}getHistoryItem(r,n){return k(this,null,function*(){return(yield this.api("getHistoryItem",{fId:r,id:n}).catch(()=>null))||{}})}saveHistoryItem(r,n){return k(this,null,function*(){return!!(yield this.api("saveHistoryItem",{fId:r,item:n}).catch(()=>!1))})}removeHistoryItem(r,n){return k(this,null,function*(){return!!(yield this.api("removeHistoryItem",{fId:r,ids:n}).catch(()=>!1))})}}/**!
|
|
69
69
|
* Copyright (c) 2025, VTJ.PRO All rights reserved.
|
|
70
70
|
* @name @vtj/uni
|
|
71
71
|
* @author CHC chenhuachun1549@dingtalk.com
|
|
72
|
-
* @version 0.13.
|
|
72
|
+
* @version 0.13.33
|
|
73
73
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
|
74
74
|
*/const O1=["onLaunch","onShow","onHide","onError","onPageNotFound","onUnhandledRejection","onThemeChange","onPageNotFound","onUniNViewMessage","onExit"],rs="/pages",j1="VTJ",D1="__UNI__1FC118B",B1="VTJ移动跨端项目",C1="1.0.0",N1="100",P1=!1,I1={},k1={enable:!1},F1="3",M1={name:j1,appid:D1,description:B1,versionName:C1,versionCode:N1,transformPx:P1,"app-plus":{usingComponents:!0,nvueStyleCompiler:"uni-app",compilerVersion:3,splashscreen:{alwaysShowBeforeRender:!0,waiting:!0,autoclose:!0,delay:0},modules:{},distribute:{android:{permissions:['<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE"/>','<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS"/>','<uses-permission android:name="android.permission.VIBRATE"/>','<uses-permission android:name="android.permission.READ_LOGS"/>','<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>','<uses-feature android:name="android.hardware.camera.autofocus"/>','<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>','<uses-permission android:name="android.permission.CAMERA"/>','<uses-permission android:name="android.permission.GET_ACCOUNTS"/>','<uses-permission android:name="android.permission.READ_PHONE_STATE"/>','<uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/>','<uses-permission android:name="android.permission.WAKE_LOCK"/>','<uses-permission android:name="android.permission.FLASHLIGHT"/>','<uses-feature android:name="android.hardware.camera"/>','<uses-permission android:name="android.permission.WRITE_SETTINGS"/>']},ios:{},sdkConfigs:{},icons:{android:{hdpi:"src/static/logo.png",xhdpi:"src/static/logo.png",xxhdpi:"src/static/logo.png",xxxhdpi:"src/static/logo.png"}}}},quickapp:I1,"mp-weixin":{appid:"",setting:{urlCheck:!1},usingComponents:!0},"mp-alipay":{usingComponents:!0},"mp-baidu":{usingComponents:!0},"mp-toutiao":{usingComponents:!0},uniStatistics:k1,vueVersion:F1},U1=[],L1={navigationBarTextStyle:"black",navigationBarTitleText:"uni-app",navigationBarBackgroundColor:"#F8F8F8",backgroundColor:"#F8F8F8"},V1={autoscan:!0,custom:{"^uni-(.*)":"@dcloudio/uni-ui/lib/uni-$1/uni-$1.vue"}},H1={pages:U1,globalStyle:L1,easycom:V1};function q1(e){let{manifestJson:t={},pagesJson:r={},routes:n=[]}=e;const i=n.map(s=>{const{path:o,style:u,needLogin:l}=s;return{path:o,style:u,needLogin:l}});return et(V({},e),{manifestJson:Object.assign({},M1,t),pagesJson:Object.assign({},H1,r,{pages:i})})}const ln={navigationBarBackgroundColor:"backgroundColor",navigationBarTextStyle:"titleColor",navigationBarTitleText:"titleText",navigationStyle:"style",titleImage:"titleImage",titlePenetrate:"titlePenetrate",transparentTitle:"transparentTitle"};function da(e){const t={},r={black:"#000000",white:"#ffffff"};for(const n in e)ln[n]&&(t[ln[n]]=n==="navigationBarTextStyle"?r[e[n]]||r.black:e[n]);return t}function z1(e){const t={};for(const r in e)ln[r]||(t[r]=e[r]);return t}function K1(e){var t,r;return((r=(t=e.h5)==null?void 0:t.router)==null?void 0:r.mode)||"hash"}function W1(e){var t,r,n;return{topWindow:!!((t=e.topWindow)!=null&&t.path),leftWindow:!!((r=e.leftWindow)!=null&&r.path),rightWindow:!!((n=e.rightWindow)!=null&&n.path)}}function J1(e){const{pagesJson:t={}}=e,{globalStyle:r,pages:n=[]}=t;return!!(r!=null&&r.enablePullDownRefresh||n.find(i=>{var s;return!!((s=i.style)!=null&&s.enablePullDownRefresh)}))}function Y1(e){const{pagesJson:t={}}=e,{globalStyle:r,pages:n=[]}=t;let i=!1;return(r==null?void 0:r.navigationStyle)==="custom"?(i=!0,n.find(s=>{var o;return((o=s.style)==null?void 0:o.navigationStyle)==="default"})&&(i=!1)):n.every(s=>{var o;return((o=s.style)==null?void 0:o.navigationStyle)==="custom"})&&(i=!0),i}function G1(e){var u;const t=Y1(e),r={navigationBar:!1,navigationBarButtons:!1,navigationBarSearchInput:!1,navigationBarTransparent:!1},{pagesJson:n={}}=e,{globalStyle:i,pages:s=[]}=n;if(t)return r;r.navigationBar=!0;const o=(u=i==null?void 0:i.h5)==null?void 0:u.titleNView;return s.find(l=>{var a,c,f;return!!((f=(c=(a=l.style)==null?void 0:a.h5)==null?void 0:c.titleNView)!=null&&f.buttons.length)})&&(r.navigationBarButtons=!0),(o!=null&&o.searchInput||s.find(l=>{var a,c,f;return!!((f=(c=(a=l.style)==null?void 0:a.h5)==null?void 0:c.titleNView)!=null&&f.searchInput)}))&&(r.navigationBarSearchInput=!0),((o==null?void 0:o.type)==="transparent"||s.find(l=>{var a,c,f;return((f=(c=(a=l.style)==null?void 0:a.h5)==null?void 0:c.titleNView)==null?void 0:f.type)==="transparent"}))&&(r.navigationBarTransparent=!0),r}function Z1(e,t=window){var p,h,d,g;const{pagesJson:r={},manifestJson:n={}}=e,{topWindow:i,leftWindow:s,rightWindow:o}=W1(r),{navigationBar:u,navigationBarButtons:l,navigationBarSearchInput:a,navigationBarTransparent:c}=G1(e),f={__VUE_OPTIONS_API__:!0,__VUE_PROD_DEVTOOLS__:!1,__VUE_PROD_HYDRATION_MISMATCH_DETAILS__:!1,__UNI_FEATURE_WX__:!1,__UNI_FEATURE_WXS__:!1,__UNI_FEATURE_RPX__:!1,__UNI_FEATURE_PROMISE__:!1,__UNI_FEATURE_LONGPRESS__:!1,__UNI_FEATURE_I18N_EN__:!1,__UNI_FEATURE_I18N_ES__:!1,__UNI_FEATURE_I18N_FR__:!1,__UNI_FEATURE_I18N_ZH_HANS__:!0,__UNI_FEATURE_I18N_ZH_HANT__:!1,__UNI_FEATURE_UNI_CLOUD__:!1,__UNI_FEATURE_I18N_LOCALE__:!1,__UNI_FEATURE_NVUE__:!1,__UNI_FEATURE_ROUTER_MODE__:K1(n),__UNI_FEATURE_PAGES__:!!((p=r.pages)!=null&&p.length),__UNI_FEATURE_TABBAR__:!!((d=(h=r.tabBar)==null?void 0:h.list)!=null&&d.length),__UNI_FEATURE_TABBAR_MIDBUTTON__:!!((g=r.tabBar)!=null&&g.midButton),__UNI_FEATURE_TOPWINDOW__:i,__UNI_FEATURE_LEFTWINDOW__:s,__UNI_FEATURE_RIGHTWINDOW__:o,__UNI_FEATURE_RESPONSIVE__:!1,__UNI_FEATURE_NAVIGATIONBAR__:u,__UNI_FEATURE_PULL_DOWN_REFRESH__:J1(e),__UNI_FEATURE_NAVIGATIONBAR_BUTTONS__:l,__UNI_FEATURE_NAVIGATIONBAR_SEARCHINPUT__:a,__UNI_FEATURE_NAVIGATIONBAR_TRANSPARENT__:c};Object.entries(f).forEach(([b,_])=>{t[b]=_})}const X1="4.76";function Q1(e,t=window){var f,p;const{pagesJson:r={},manifestJson:n={}}=e,{easycom:i={}}=r,{appid:s="",name:o="",versionCode:u="",versionName:l=""}=n,a=r.globalStyle,c=((f=n.h5)==null?void 0:f.router)||{};t.__uniConfig={easycom:i,globalStyle:et(V({},z1(a)),{navigationBar:da(a),isNVue:!1}),compilerVersion:X1,appId:s,appName:o,appVersion:l,appVersionCode:String(u),async:V({loading:"AsyncLoading",error:"AsyncError",delay:200,timeout:6e4,suspensible:!0},((p=n.h5)==null?void 0:p.async)||{}),debug:!1,networkTimeout:V({request:6e4,connectSocket:6e4,uploadFile:6e4,downloadFile:6e4},n.networkTimeout||{}),sdkConfigs:{},nvue:{"flex-direction":"column"},locale:"",fallbackLocale:"",locales:{},router:V({mode:"hash",base:"/",assets:"assets",routerBase:c.base||"/"},c),darkmode:!1,themeConfig:{},tabBar:r.tabBar?V({position:"bottom",color:"#7A7E83",selectedColor:"#3cc51f",borderStyle:"black",blurEffect:"none",fontSize:"10px",iconWidth:"24px",spacing:"3px",height:"50px",backgroundColor:"#ffffff",selectedIndex:0,shown:!0},r.tabBar):void 0}}function ty(e,t=window){const{UniServiceJSBridge:r,UniViewJSBridge:n,getApp:i,uni:s,getCurrentPages:o,upx2px:u,setupPage:l}=e;t.UniServiceJSBridge=r,t.UniViewJSBridge=n,t.getApp=i,t.uni=s,t.wx=s,t.getCurrentPages=o,t.upx2px=u,t.__setupPage=a=>l(a)}function ey(e,t,r){const{openBlock:n,createBlock:i,withCtx:s,createVNode:o}=e,{PageComponent:u,setupPage:l,getApp:a}=t;return{mpType:"page",setup(){return k(this,null,function*(){var g,b;const f=((b=(g=a())==null?void 0:g.$route)==null?void 0:b.query)||{},{loader:p,component:h}=r,d=p?yield p(r):h||{};return()=>(n(),i(u,null,{page:s(()=>[o(l(d),Object.assign({},f,{ref:"page"}),null,512)]),_:1}))})}}}function ry(e,t,r){var h;const{path:n,style:i={},meta:s={},home:o,id:u}=t,l=((h=e.tabBar)==null?void 0:h.list)||[],a=l.findIndex(d=>{var g;return d.pagePath===n||((g=d.pagePath)==null?void 0:g.endsWith(u))}),c=l[a],f=!!c,p=r===0;return V({isTabBar:f,tabBarIndex:a,isQuit:o!=null?o:p,isEntry:o!=null?o:p,navigationBar:V({type:"default"},da(i)),isNVue:!1,route:c?c.pagePath:n},s)}function ny(e,t,r,n,i=window){const s=r.map((o,u)=>{const l=ry(n,o,u),a=ey(e,t,o),{path:c}=o;return{path:c,alias:c,meta:l,component:{render(){return e.h(e.Suspense,[e.h(a)])}}}});i.__uniRoutes=s,i.__uniLayout={}}function iy(e,t,r=window){pr(r,String(e),t)}function sy(e,t){t&&["View","ScrollView","Swiper","MovableArea","MovableView","CoverView","CoverImage","Icon","Text","RichText","Progress","Button","CheckboxGroup","Checkbox","Editor","Form","Input","Label","Picker","PickerView","RadioGroup","Radio","Slider","Switch","Textarea","Navigator","Image","Video","Map","Canvas","WebView","PickerViewColumn","ResizeSensor","SwiperItem"].forEach(r=>{const n=t[r];e.component(r,n)})}function oy(e){const t=q1(e),{Vue:r,App:n,UniH5:i,routes:s=[],pagesJson:o={},manifestJson:u={},window:l,css:a=""}=t;if(!i)return r.createApp(n);const{plugin:c,setupApp:f}=i;Z1(t,l),Q1(t,l),ty(i,l),ny(r,i,s,o,l),iy(u.appid||Date.now(),a,l);const p=r.createApp(f(n));return p.use(sy,i),p.use(c),p}function ay(e,t){const r={};return Object.entries(e).forEach(([n,i])=>{O1.includes(n)&&i&&(r[n]=t(i))}),r}function ns(e,t){return()=>k(null,null,function*(){const r=yield e.getDsl(t);if(r){const{renderer:n}=e.createDslRenderer(r);return n}return null})}function uy(n){return k(this,arguments,function*(e,t=!1,r=rs){var u,l,a;const i=((u=e.project)==null?void 0:u.pages)||[],s=[];for(const c of i){const f=((l=e.project)==null?void 0:l.homepage)===c.id;s.push({id:c.id,path:`${r}/${c.id}`,loader:ns(e,c.id),style:V({navigationBarTitleText:c.title},c.style),needLogin:c.needLogin,home:f})}const o=s.find(c=>!!c.home)||s[0];if(o){const c=r===rs?"/":r;s.unshift(et(V({},o),{path:c}))}if(t){const c=((a=e.project)==null?void 0:a.blocks)||[];for(const f of c)s.push({id:f.id,path:`${r}/${f.id}`,loader:ns(e,f.id),style:{navigationStyle:"custom"}})}return s})}function cy(){var e;return(e=window.uni)!=null&&e.showLoading&&window.uni.showLoading({title:"加载中...",mask:!0}),{close:()=>{var t;(t=window.uni)!=null&&t.hideLoading&&window.uni.hideLoading()}}}function ga(e,t="",r="warning"){return k(this,null,function*(){var n;return(n=window.uni)!=null&&n.showModal?window.uni.showModal({title:t,content:e,showCancel:!1}):Promise.reject(new Error("window.uni.showModal is undefined"))})}function ly(e=tt.Runtime){let t={};e===tt.Runtime?t=Object.assign({}):t=Object.assign({});let r={};for(const[n,i]of Object.entries(t))r[n]=()=>Promise.resolve(i);return r}const fy=B0({loading:cy,notify:ga}),ma=new $1(A1(ga)),hy=ly(),{provider:py,onReady:dy}=_1({nodeEnv:"production",mode:tt.Runtime,modules:hy,materialPath:"../",adapter:fy,service:ma,dependencies:{Vue:()=>jn(()=>import("./@dcloudio-uni-h5-vue-BtM9Eyib.js").then(e=>e.z),__vite__mapDeps([0,1,2]),import.meta.url),VueRouter:()=>jn(()=>import("./vue-router-CbZ0Q__O.js"),__vite__mapDeps([3,0,1,2]),import.meta.url)}}),gy=e=>k(null,null,function*(){const t=(yield ma.getExtension().catch(()=>null))||{},r=top||window,n=yield S1(t.enhance,r.location.pathname),{Vue:i,UniH5:s}=window,o=e.project;if(!o)return;const u=o.uniConfig||{},l=ay(u,d=>pt(d,window,!1,!0)),{manifestJson:a,pagesJson:c,css:f}=u,p=yield uy(e,!0),h=oy({Vue:i,App:l,UniH5:s,routes:p,css:f,manifestJson:a,pagesJson:c});h.use(e),n&&h.use(n,e),h.mount(document.body)});dy(()=>gy(py));
|
package/dist/uni/index.html
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
<title></title>
|
|
24
24
|
<!--preload-links-->
|
|
25
25
|
<!--app-context-->
|
|
26
|
-
<script type="module" crossorigin src="./assets/index-
|
|
26
|
+
<script type="module" crossorigin src="./assets/index-BScYRv15.js"></script>
|
|
27
27
|
<link rel="modulepreload" crossorigin href="./assets/vue-BK7aLblh.js">
|
|
28
28
|
<link rel="modulepreload" crossorigin href="./assets/@dcloudio-uni-shared-Cc-Ey1iB.js">
|
|
29
29
|
<link rel="modulepreload" crossorigin href="./assets/@dcloudio-uni-h5-vue-BtM9Eyib.js">
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vtj/pro",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.13.
|
|
4
|
+
"version": "0.13.33",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"低代码引擎",
|
|
7
7
|
"LowCode Engine",
|
|
@@ -21,22 +21,22 @@
|
|
|
21
21
|
"license": "MIT",
|
|
22
22
|
"type": "module",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@vtj/core": "~0.13.
|
|
25
|
-
"@vtj/
|
|
26
|
-
"@vtj/
|
|
27
|
-
"@vtj/
|
|
28
|
-
"@vtj/uni": "~0.13.
|
|
29
|
-
"@vtj/renderer": "~0.13.
|
|
24
|
+
"@vtj/core": "~0.13.33",
|
|
25
|
+
"@vtj/designer": "~0.13.33",
|
|
26
|
+
"@vtj/local": "~0.13.33",
|
|
27
|
+
"@vtj/materials": "~0.13.33",
|
|
28
|
+
"@vtj/uni": "~0.13.33",
|
|
29
|
+
"@vtj/renderer": "~0.13.33"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"vite-plugin-vue-devtools": "~8.0.2",
|
|
33
33
|
"vue": "~3.5.5",
|
|
34
34
|
"vue-router": "~4.5.0",
|
|
35
|
-
"@vtj/
|
|
36
|
-
"@vtj/
|
|
37
|
-
"@vtj/
|
|
38
|
-
"@vtj/
|
|
39
|
-
"@vtj/
|
|
35
|
+
"@vtj/charts": "~0.13.33",
|
|
36
|
+
"@vtj/cli": "~0.12.14",
|
|
37
|
+
"@vtj/icons": "~0.13.33",
|
|
38
|
+
"@vtj/ui": "~0.13.33",
|
|
39
|
+
"@vtj/utils": "~0.13.33"
|
|
40
40
|
},
|
|
41
41
|
"exports": {
|
|
42
42
|
"./vite": {
|