@vtj/pro 0.10.9 → 0.10.10

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.
Files changed (27) hide show
  1. package/dist/@vtj/materials/assets/antdv/index.umd.js +2 -2
  2. package/dist/@vtj/materials/assets/charts/index.umd.js +2 -2
  3. package/dist/@vtj/materials/assets/element/index.umd.js +2 -2
  4. package/dist/@vtj/materials/assets/ui/index.umd.js +2 -2
  5. package/dist/@vtj/materials/assets/uni-h5/index.umd.js +2 -2
  6. package/dist/@vtj/materials/assets/uni-ui/index.umd.js +2 -2
  7. package/dist/@vtj/materials/assets/vant/index.umd.js +2 -2
  8. package/dist/@vtj/materials/deps/@vtj/charts/index.umd.js +2 -2
  9. package/dist/@vtj/materials/deps/@vtj/icons/index.umd.js +2 -2
  10. package/dist/@vtj/materials/deps/@vtj/ui/index.umd.js +2 -2
  11. package/dist/@vtj/materials/deps/@vtj/utils/index.umd.js +3 -3
  12. package/dist/@vtj/materials/deps/@vueuse/shared/index.iife.min.js +1 -1
  13. package/dist/@vtj/materials/deps/xe-utils/xe-utils.umd.min.js +2 -2
  14. package/dist/assets/{auth-BdTZicaH.js → auth-C_sSG0Ju.js} +1 -1
  15. package/dist/assets/{extension-DdnSz_qB.css → extension-BjjqxGHx.css} +1 -1
  16. package/dist/assets/extension-CGygQNgp.js +169 -0
  17. package/dist/assets/{index-ChFaPzB9.js → index-2Jp4B2N8.js} +1 -1
  18. package/dist/assets/{index-DsCqhanp.js → index-B9KVCtyS.js} +9 -9
  19. package/dist/assets/{page-CmpRl7SB.js → page-V0hkKlxc.js} +1 -1
  20. package/dist/assets/{preview-5sWUbX5I.js → preview-DY0TSY6p.js} +1 -1
  21. package/dist/assets/vxe-DEIHqUXR.js +4 -0
  22. package/dist/index.html +3 -3
  23. package/dist/uni/assets/{index-DIVDSD5H.js → index-CuIpYXdW.js} +3 -3
  24. package/dist/uni/index.html +1 -1
  25. package/package.json +11 -11
  26. package/dist/assets/extension-DeER1NbG.js +0 -169
  27. package/dist/assets/vxe-prHpAmaX.js +0 -4
@@ -1 +1 @@
1
- var F=Object.defineProperty,M=Object.defineProperties;var T=Object.getOwnPropertyDescriptors;var y=Object.getOwnPropertySymbols;var q=Object.prototype.hasOwnProperty,H=Object.prototype.propertyIsEnumerable;var E=(o,e,t)=>e in o?F(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t,w=(o,e)=>{for(var t in e||(e={}))q.call(e,t)&&E(o,t,e[t]);if(y)for(var t of y(e))H.call(e,t)&&E(o,t,e[t]);return o},v=(o,e)=>M(o,T(e));var A=(o,e,t)=>new Promise((u,i)=>{var m=n=>{try{r(t.next(n))}catch(a){i(a)}},l=n=>{try{r(t.throw(n))}catch(a){i(a)}},r=n=>n.done?u(n.value):Promise.resolve(n.value).then(m,l);r((t=t.apply(o,e)).next())});import{useRoute as K}from"./vue-router-Dv428VRb.js";import{A as W,O as j,I as G,M as J,a as N}from"./index-DsCqhanp.js";import{a as U}from"./element-plus-oE4l1K8x.js";import"./vxe-prHpAmaX.js";import{u as P,I as V,E as Y}from"./extension-DeER1NbG.js";import{n as C,l as z}from"./utils-Du5uEC3_.js";import{d as D,e as L,aC as B,f as Q,c as X,o as Z}from"./vue-DpQa2Qs4.js";import{_ as ee}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./monaco-editor-B8dwQNlP.js";import"./lodash-es-BL-d_OSa.js";import"./@vueuse-dS-W09Vv.js";import"./@element-plus-icons-vue-CRZvKNrz.js";import"./shared-CFJLz5mK.js";import"./dayjs-DO-COJPZ.js";import"./html2canvas-CIV5arX1.js";import"./mockjs-BEvXV3hb.js";const te=D({__name:"index",setup(o){return A(this,null,function*(){let e,t;const u=W({loading:z,notify:C}),i=K(),m=L(),l=new j(G(C)),r=([e,t]=B(()=>l.getExtension().catch(()=>null)),e=yield e,t(),e),{options:n,adapters:a}=r?([e,t]=B(()=>new Y(r).load()),e=yield e,t(),e):{},{__BASE_PATH__:d="/",history:I="hash",base:g="/",pageRouteName:O="page"}=r||{},$=a==null?void 0:a.access,S=a==null?void 0:a.remote,b=$?new J(w({alert:U.alert,storageKey:N},$)):void 0,R=()=>I==="hash",k=s=>s==="/"?"":(s.startsWith("/")&&(s=s.substring(1)),s.endsWith("/")||(s=s+"/"),s);P.set("Switcher",{props:{onClick:s=>{const _=s.platform==="uniapp",c=location.pathname;let p=c===`${d}__vtj__/`?d:c;const f=s.currentFile;if(f&&f.type==="page"&&s.homepage!==f.id){const x=`${k(g)}${_?"pages":O}/${f.id}`;p=R()?`${p}#/${x}`:`${p}${x}`}window.open(p,"VTJProject")}}}),P.set("Previewer",{props:{path:(s,_)=>{const c=location.pathname;return _.platform==="uniapp"?`${c}uni/#/pages/${s.id}`:`${c}#/preview/${s.id}`}}});const h=new V(v(w({container:m,service:l,materialPath:d,pageBasePath:g==="/"?"":g},n),{adapter:Object.assign(u,{access:b,remote:S},(n==null?void 0:n.adapter)||{})}));return h.ready(()=>{h.openFile(i.query.id)}),Q(()=>i.query.id,s=>{h.openFile(s)}),(s,_)=>(Z(),X("div",{class:"designer",ref_key:"container",ref:m},null,512))})}}),$e=ee(te,[["__scopeId","data-v-fbbd9127"]]);export{$e as default};
1
+ var I=Object.defineProperty,M=Object.defineProperties;var T=Object.getOwnPropertyDescriptors;var y=Object.getOwnPropertySymbols;var q=Object.prototype.hasOwnProperty,H=Object.prototype.propertyIsEnumerable;var E=(o,e,t)=>e in o?I(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t,$=(o,e)=>{for(var t in e||(e={}))q.call(e,t)&&E(o,t,e[t]);if(y)for(var t of y(e))H.call(e,t)&&E(o,t,e[t]);return o},v=(o,e)=>M(o,T(e));var A=(o,e,t)=>new Promise((u,i)=>{var m=n=>{try{r(t.next(n))}catch(a){i(a)}},l=n=>{try{r(t.throw(n))}catch(a){i(a)}},r=n=>n.done?u(n.value):Promise.resolve(n.value).then(m,l);r((t=t.apply(o,e)).next())});import{useRoute as K}from"./vue-router-Dv428VRb.js";import{A as W,O as j,I as G,M as J,a as N}from"./index-B9KVCtyS.js";import{a as U}from"./element-plus-oE4l1K8x.js";import"./vxe-DEIHqUXR.js";import{u as P,$ as V,E as Y}from"./extension-CGygQNgp.js";import{n as C,l as z}from"./utils-Du5uEC3_.js";import{d as D,e as L,aC as B,f as Q,c as X,o as Z}from"./vue-DpQa2Qs4.js";import{_ as ee}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./monaco-editor-B8dwQNlP.js";import"./lodash-es-BL-d_OSa.js";import"./@vueuse-dS-W09Vv.js";import"./@element-plus-icons-vue-CRZvKNrz.js";import"./shared-CFJLz5mK.js";import"./dayjs-DO-COJPZ.js";import"./html2canvas-CIV5arX1.js";import"./mockjs-BEvXV3hb.js";const te=D({__name:"index",setup(o){return A(this,null,function*(){let e,t;const u=W({loading:z,notify:C}),i=K(),m=L(),l=new j(G(C)),r=([e,t]=B(()=>l.getExtension().catch(()=>null)),e=yield e,t(),e),{options:n,adapters:a}=r?([e,t]=B(()=>new Y(r).load()),e=yield e,t(),e):{},{__BASE_PATH__:d="/",history:O="hash",base:g="/",pageRouteName:S="page"}=r||{},w=a==null?void 0:a.access,b=a==null?void 0:a.remote,R=w?new J($({alert:U.alert,storageKey:N},w)):void 0,k=()=>O==="hash",F=s=>s==="/"?"":(s.startsWith("/")&&(s=s.substring(1)),s.endsWith("/")||(s=s+"/"),s);P.set("Switcher",{props:{onClick:s=>{const _=s.platform==="uniapp",c=location.pathname;let p=c===`${d}__vtj__/`?d:c;const f=s.currentFile;if(f&&f.type==="page"&&s.homepage!==f.id){const x=`${F(g)}${_?"pages":S}/${f.id}`;p=k()?`${p}#/${x}`:`${p}${x}`}window.open(p,"VTJProject")}}}),P.set("Previewer",{props:{path:(s,_)=>{const c=location.pathname;return _.platform==="uniapp"?`${c}uni/#/pages/${s.id}`:`${c}#/preview/${s.id}`}}});const h=new V(v($({container:m,service:l,materialPath:d,pageBasePath:g==="/"?"":g},n),{adapter:Object.assign(u,{access:R,remote:b},(n==null?void 0:n.adapter)||{})}));return h.ready(()=>{h.openFile(i.query.id)}),Q(()=>i.query.id,s=>{h.openFile(s)}),(s,_)=>(Z(),X("div",{class:"designer",ref_key:"container",ref:m},null,512))})}}),we=ee(te,[["__scopeId","data-v-fbbd9127"]]);export{we as default};
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-ChFaPzB9.js","./vue-router-Dv428VRb.js","./vue-DpQa2Qs4.js","./element-plus-oE4l1K8x.js","./lodash-es-BL-d_OSa.js","./@vueuse-dS-W09Vv.js","./@element-plus-icons-vue-CRZvKNrz.js","./shared-CFJLz5mK.js","./dayjs-DO-COJPZ.js","./element-plus-BGoW7lnC.css","./vxe-prHpAmaX.js","./vxe-BAb1d5vW.css","./extension-DeER1NbG.js","./monaco-editor-B8dwQNlP.js","./monaco-editor-Cpw7ccEV.css","./html2canvas-CIV5arX1.js","./mockjs-BEvXV3hb.js","./extension-DdnSz_qB.css","./utils-Du5uEC3_.js","./_plugin-vue_export-helper-DlAUqK2U.js","./index-qxxdDj8s.css","./preview-5sWUbX5I.js","./page-CmpRl7SB.js","./uni-page-ByIXJ059.js","./uni-page-Diqmj53r.css","./auth-BdTZicaH.js","./auth-rAe8S_7e.css"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-2Jp4B2N8.js","./vue-router-Dv428VRb.js","./vue-DpQa2Qs4.js","./element-plus-oE4l1K8x.js","./lodash-es-BL-d_OSa.js","./@vueuse-dS-W09Vv.js","./@element-plus-icons-vue-CRZvKNrz.js","./shared-CFJLz5mK.js","./dayjs-DO-COJPZ.js","./element-plus-BGoW7lnC.css","./vxe-DEIHqUXR.js","./vxe-BAb1d5vW.css","./extension-CGygQNgp.js","./monaco-editor-B8dwQNlP.js","./monaco-editor-Cpw7ccEV.css","./html2canvas-CIV5arX1.js","./mockjs-BEvXV3hb.js","./extension-BjjqxGHx.css","./utils-Du5uEC3_.js","./_plugin-vue_export-helper-DlAUqK2U.js","./index-qxxdDj8s.css","./preview-DY0TSY6p.js","./page-V0hkKlxc.js","./uni-page-ByIXJ059.js","./uni-page-Diqmj53r.css","./auth-C_sSG0Ju.js","./auth-rAe8S_7e.css"])))=>i.map(i=>d[i]);
2
2
  var El=Object.defineProperty,Sl=Object.defineProperties;var xl=Object.getOwnPropertyDescriptors;var gr=Object.getOwnPropertySymbols;var Es=Object.prototype.hasOwnProperty,Ss=Object.prototype.propertyIsEnumerable;var me=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),Tl=e=>{throw TypeError(e)};var xn=(e,t,r)=>t in e?El(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,z=(e,t)=>{for(var r in t||(t={}))Es.call(t,r)&&xn(e,r,t[r]);if(gr)for(var r of gr(t))Ss.call(t,r)&&xn(e,r,t[r]);return e},st=(e,t)=>Sl(e,xl(t));var Tn=(e,t)=>{var r={};for(var n in e)Es.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&gr)for(var n of gr(e))t.indexOf(n)<0&&Ss.call(e,n)&&(r[n]=e[n]);return r};var A=(e,t,r)=>xn(e,typeof t!="symbol"?t+"":t,r);var L=(e,t,r)=>new Promise((n,i)=>{var s=u=>{try{a(r.next(u))}catch(c){i(c)}},o=u=>{try{a(r.throw(u))}catch(c){i(c)}},a=u=>u.done?n(u.value):Promise.resolve(u.value).then(s,o);a((r=r.apply(e,t)).next())}),Gt=function(e,t){this[0]=e,this[1]=t},$n=(e,t,r)=>{var n=(o,a,u,c)=>{try{var l=r[o](a),f=(a=l.value)instanceof Gt,h=l.done;Promise.resolve(f?a[0]:a).then(p=>f?n(o==="return"?o:"next",a[1]?{done:p.done,value:p.value}:p,u,c):u({value:p,done:h})).catch(p=>n("throw",p,u,c))}catch(p){c(p)}},i=o=>s[o]=a=>new Promise((u,c)=>n(o,a,u,c)),s={};return r=r.apply(e,t),s[me("asyncIterator")]=()=>s,i("next"),i("throw"),i("return"),s},On=e=>{var t=e[me("asyncIterator")],r=!1,n,i={};return t==null?(t=e[me("iterator")](),n=s=>i[s]=o=>t[s](o)):(t=t.call(e),n=s=>i[s]=o=>{if(r){if(r=!1,s==="throw")throw o;return o}return r=!0,{done:!1,value:new Gt(new Promise(a=>{var u=t[s](o);u instanceof Object||Tl("Object expected"),a(u)}),1)}}),i[me("iterator")]=()=>i,n("next"),"throw"in t?n("throw"):i.throw=s=>{throw s},"return"in t&&n("return"),i},xs=(e,t,r)=>(t=e[me("asyncIterator")])?t.call(e):(e=e[me("iterator")](),t={},r=(n,i)=>(i=e[n])&&(t[n]=s=>new Promise((o,a,u)=>(s=i.call(e,s),u=s.done,Promise.resolve(s.value).then(c=>o({value:c,done:u}),a)))),r("next"),r("return"),t);import{d as tn,ay as en,az as An,aA as Ts,c as $l,o as Wn,a as Zt,R as jn,v as Xo,e as Ur,w as Ol,ah as Yn,f as ta,p as Al,r as jl,j as Rl,k as ea,m as Di,g as Dl,b as Cl,s as Pl,i as kl,h as Nl,K as $s,u as Os,ai as Bl,L as As,aB as Ml,T as Il,av as Fl}from"./vue-DpQa2Qs4.js";import{useRoute as ra,createRouter as Ll,createWebHashHistory as Vl}from"./vue-router-Dv428VRb.js";import{z as Ul,E as Hl}from"./element-plus-oE4l1K8x.js";import{_ as Ve}from"./monaco-editor-B8dwQNlP.js";import"./lodash-es-BL-d_OSa.js";import"./@vueuse-dS-W09Vv.js";import"./@element-plus-icons-vue-CRZvKNrz.js";import"./shared-CFJLz5mK.js";import"./dayjs-DO-COJPZ.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function n(i){if(i.ep)return;i.ep=!0;const s=r(i);fetch(i.href,s)}})();var zl={ENV_TYPE:"live",NODE_ENV:"production"},ql=typeof global=="object"&&global&&global.Object===Object&&global;const na=ql;var Kl=typeof self=="object"&&self&&self.Object===Object&&self,Jl=na||Kl||Function("return this")();const At=Jl;var Wl=At.Symbol;const Ct=Wl;var ia=Object.prototype,Yl=ia.hasOwnProperty,Gl=ia.toString,Ue=Ct?Ct.toStringTag:void 0;function Zl(e){var t=Yl.call(e,Ue),r=e[Ue];try{e[Ue]=void 0;var n=!0}catch(s){}var i=Gl.call(e);return n&&(t?e[Ue]=r:delete e[Ue]),i}var Ql=Object.prototype,Xl=Ql.toString;function tf(e){return Xl.call(e)}var ef="[object Null]",rf="[object Undefined]",js=Ct?Ct.toStringTag:void 0;function Et(e){return e==null?e===void 0?rf:ef:js&&js in Object(e)?Zl(e):tf(e)}function at(e){return e!=null&&typeof e=="object"}var nf="[object Symbol]";function cr(e){return typeof e=="symbol"||at(e)&&Et(e)==nf}function sa(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var sf=Array.isArray;const pt=sf;var Rs=Ct?Ct.prototype:void 0,Ds=Rs?Rs.toString:void 0;function oa(e){if(typeof e=="string")return e;if(pt(e))return sa(e,oa)+"";if(cr(e))return Ds?Ds.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var of=/\s/;function af(e){for(var t=e.length;t--&&of.test(e.charAt(t)););return t}var cf=/^\s+/;function uf(e){return e&&e.slice(0,af(e)+1).replace(cf,"")}function ct(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Cs=NaN,lf=/^[-+]0x[0-9a-f]+$/i,ff=/^0b[01]+$/i,hf=/^0o[0-7]+$/i,pf=parseInt;function Ps(e){if(typeof e=="number")return e;if(cr(e))return Cs;if(ct(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=ct(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=uf(e);var r=ff.test(e);return r||hf.test(e)?pf(e.slice(2),r?2:8):lf.test(e)?Cs:+e}function Ci(e){return e}var df="[object AsyncFunction]",mf="[object Function]",gf="[object GeneratorFunction]",vf="[object Proxy]";function ce(e){if(!ct(e))return!1;var t=Et(e);return t==mf||t==gf||t==df||t==vf}var yf=At["__core-js_shared__"];const Rn=yf;var ks=function(){var e=/[^.]+$/.exec(Rn&&Rn.keys&&Rn.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function bf(e){return!!ks&&ks in e}var _f=Function.prototype,wf=_f.toString;function fe(e){if(e!=null){try{return wf.call(e)}catch(t){}try{return e+""}catch(t){}}return""}var Ef=/[\\^$.*+?()[\]{}|]/g,Sf=/^\[object .+?Constructor\]$/,xf=Function.prototype,Tf=Object.prototype,$f=xf.toString,Of=Tf.hasOwnProperty,Af=RegExp("^"+$f.call(Of).replace(Ef,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function jf(e){if(!ct(e)||bf(e))return!1;var t=ce(e)?Af:Sf;return t.test(fe(e))}function Rf(e,t){return e==null?void 0:e[t]}function he(e,t){var r=Rf(e,t);return jf(r)?r:void 0}var Df=he(At,"WeakMap");const Gn=Df;var Ns=Object.create,Cf=function(){function e(){}return function(t){if(!ct(t))return{};if(Ns)return Ns(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();const Pf=Cf;function aa(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function kf(){}function Nf(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}var Bf=800,Mf=16,If=Date.now;function Ff(e){var t=0,r=0;return function(){var n=If(),i=Mf-(n-r);if(r=n,i>0){if(++t>=Bf)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Lf(e){return function(){return e}}var Vf=function(){try{var e=he(Object,"defineProperty");return e({},"",{}),e}catch(t){}}();const Hr=Vf;var Uf=Hr?function(e,t){return Hr(e,"toString",{configurable:!0,enumerable:!1,value:Lf(t),writable:!0})}:Ci;const Hf=Uf;var zf=Ff(Hf);const qf=zf;function Kf(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}var Jf=9007199254740991,Wf=/^(?:0|[1-9]\d*)$/;function rn(e,t){var r=typeof e;return t=t!=null?t:Jf,!!t&&(r=="number"||r!="symbol"&&Wf.test(e))&&e>-1&&e%1==0&&e<t}function nn(e,t,r){t=="__proto__"&&Hr?Hr(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function ke(e,t){return e===t||e!==e&&t!==t}var Yf=Object.prototype,Gf=Yf.hasOwnProperty;function Pi(e,t,r){var n=e[t];(!(Gf.call(e,t)&&ke(n,r))||r===void 0&&!(t in e))&&nn(e,t,r)}function ca(e,t,r,n){var i=!r;r||(r={});for(var s=-1,o=t.length;++s<o;){var a=t[s],u=n?n(r[a],e[a],a,r,e):void 0;u===void 0&&(u=e[a]),i?nn(r,a,u):Pi(r,a,u)}return r}var Bs=Math.max;function Zf(e,t,r){return t=Bs(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,s=Bs(n.length-t,0),o=Array(s);++i<s;)o[i]=n[t+i];i=-1;for(var a=Array(t+1);++i<t;)a[i]=n[i];return a[t]=r(o),aa(e,this,a)}}function ua(e,t){return qf(Zf(e,t,Ci),e+"")}var Qf=9007199254740991;function ki(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Qf}function ur(e){return e!=null&&ki(e.length)&&!ce(e)}function la(e,t,r){if(!ct(r))return!1;var n=typeof t;return(n=="number"?ur(r)&&rn(t,r.length):n=="string"&&t in r)?ke(r[t],e):!1}function fa(e){return ua(function(t,r){var n=-1,i=r.length,s=i>1?r[i-1]:void 0,o=i>2?r[2]:void 0;for(s=e.length>3&&typeof s=="function"?(i--,s):void 0,o&&la(r[0],r[1],o)&&(s=i<3?void 0:s,i=1),t=Object(t);++n<i;){var a=r[n];a&&e(t,a,n,s)}return t})}var Xf=Object.prototype;function Ni(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Xf;return e===r}function th(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var eh="[object Arguments]";function Ms(e){return at(e)&&Et(e)==eh}var ha=Object.prototype,rh=ha.hasOwnProperty,nh=ha.propertyIsEnumerable,ih=Ms(function(){return arguments}())?Ms:function(e){return at(e)&&rh.call(e,"callee")&&!nh.call(e,"callee")};const zr=ih;function sh(){return!1}var pa=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Is=pa&&typeof module=="object"&&module&&!module.nodeType&&module,oh=Is&&Is.exports===pa,Fs=oh?At.Buffer:void 0,ah=Fs?Fs.isBuffer:void 0,ch=ah||sh;const Ae=ch;var uh="[object Arguments]",lh="[object Array]",fh="[object Boolean]",hh="[object Date]",ph="[object Error]",dh="[object Function]",mh="[object Map]",gh="[object Number]",vh="[object Object]",yh="[object RegExp]",bh="[object Set]",_h="[object String]",wh="[object WeakMap]",Eh="[object ArrayBuffer]",Sh="[object DataView]",xh="[object Float32Array]",Th="[object Float64Array]",$h="[object Int8Array]",Oh="[object Int16Array]",Ah="[object Int32Array]",jh="[object Uint8Array]",Rh="[object Uint8ClampedArray]",Dh="[object Uint16Array]",Ch="[object Uint32Array]",X={};X[xh]=X[Th]=X[$h]=X[Oh]=X[Ah]=X[jh]=X[Rh]=X[Dh]=X[Ch]=!0,X[uh]=X[lh]=X[Eh]=X[fh]=X[Sh]=X[hh]=X[ph]=X[dh]=X[mh]=X[gh]=X[vh]=X[yh]=X[bh]=X[_h]=X[wh]=!1;function Ph(e){return at(e)&&ki(e.length)&&!!X[Et(e)]}function lr(e){return function(t){return e(t)}}var da=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ge=da&&typeof module=="object"&&module&&!module.nodeType&&module,kh=Ge&&Ge.exports===da,Dn=kh&&na.process,Nh=function(){try{var e=Ge&&Ge.require&&Ge.require("util").types;return e||Dn&&Dn.binding&&Dn.binding("util")}catch(t){}}();const Pt=Nh;var Ls=Pt&&Pt.isTypedArray,Bh=Ls?lr(Ls):Ph;const Bi=Bh;var Mh=Object.prototype,Ih=Mh.hasOwnProperty;function ma(e,t){var r=pt(e),n=!r&&zr(e),i=!r&&!n&&Ae(e),s=!r&&!n&&!i&&Bi(e),o=r||n||i||s,a=o?th(e.length,String):[],u=a.length;for(var c in e)(t||Ih.call(e,c))&&!(o&&(c=="length"||i&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||rn(c,u)))&&a.push(c);return a}function ga(e,t){return function(r){return e(t(r))}}var Fh=ga(Object.keys,Object);const Lh=Fh;var Vh=Object.prototype,Uh=Vh.hasOwnProperty;function Hh(e){if(!Ni(e))return Lh(e);var t=[];for(var r in Object(e))Uh.call(e,r)&&r!="constructor"&&t.push(r);return t}function sn(e){return ur(e)?ma(e):Hh(e)}function zh(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var qh=Object.prototype,Kh=qh.hasOwnProperty;function Jh(e){if(!ct(e))return zh(e);var t=Ni(e),r=[];for(var n in e)n=="constructor"&&(t||!Kh.call(e,n))||r.push(n);return r}function Mi(e){return ur(e)?ma(e,!0):Jh(e)}var Wh=fa(function(e,t,r,n){ca(t,Mi(t),e,n)});const Vs=Wh;var Yh=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Gh=/^\w*$/;function Ii(e,t){if(pt(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||cr(e)?!0:Gh.test(e)||!Yh.test(e)||t!=null&&e in Object(t)}var Zh=he(Object,"create");const tr=Zh;function Qh(){this.__data__=tr?tr(null):{},this.size=0}function Xh(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var tp="__lodash_hash_undefined__",ep=Object.prototype,rp=ep.hasOwnProperty;function np(e){var t=this.__data__;if(tr){var r=t[e];return r===tp?void 0:r}return rp.call(t,e)?t[e]:void 0}var ip=Object.prototype,sp=ip.hasOwnProperty;function op(e){var t=this.__data__;return tr?t[e]!==void 0:sp.call(t,e)}var ap="__lodash_hash_undefined__";function cp(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=tr&&t===void 0?ap:t,this}function ee(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ee.prototype.clear=Qh,ee.prototype.delete=Xh,ee.prototype.get=np,ee.prototype.has=op,ee.prototype.set=cp;function up(){this.__data__=[],this.size=0}function on(e,t){for(var r=e.length;r--;)if(ke(e[r][0],t))return r;return-1}var lp=Array.prototype,fp=lp.splice;function hp(e){var t=this.__data__,r=on(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():fp.call(t,r,1),--this.size,!0}function pp(e){var t=this.__data__,r=on(t,e);return r<0?void 0:t[r][1]}function dp(e){return on(this.__data__,e)>-1}function mp(e,t){var r=this.__data__,n=on(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function Mt(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Mt.prototype.clear=up,Mt.prototype.delete=hp,Mt.prototype.get=pp,Mt.prototype.has=dp,Mt.prototype.set=mp;var gp=he(At,"Map");const er=gp;function vp(){this.size=0,this.__data__={hash:new ee,map:new(er||Mt),string:new ee}}function yp(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function an(e,t){var r=e.__data__;return yp(t)?r[typeof t=="string"?"string":"hash"]:r.map}function bp(e){var t=an(this,e).delete(e);return this.size-=t?1:0,t}function _p(e){return an(this,e).get(e)}function wp(e){return an(this,e).has(e)}function Ep(e,t){var r=an(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function It(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}It.prototype.clear=vp,It.prototype.delete=bp,It.prototype.get=_p,It.prototype.has=wp,It.prototype.set=Ep;var Sp="Expected a function";function Fi(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Sp);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],s=r.cache;if(s.has(i))return s.get(i);var o=e.apply(this,n);return r.cache=s.set(i,o)||s,o};return r.cache=new(Fi.Cache||It),r}Fi.Cache=It;var xp=500;function Tp(e){var t=Fi(e,function(n){return r.size===xp&&r.clear(),n}),r=t.cache;return t}var $p=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Op=/\\(\\)?/g,Ap=Tp(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace($p,function(r,n,i,s){t.push(i?s.replace(Op,"$1"):n||r)}),t});const jp=Ap;function pe(e){return e==null?"":oa(e)}function Li(e,t){return pt(e)?e:Ii(e,t)?[e]:jp(pe(e))}function fr(e){if(typeof e=="string"||cr(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function va(e,t){t=Li(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[fr(t[r++])];return r&&r==n?e:void 0}function ya(e,t,r){var n=e==null?void 0:va(e,t);return n===void 0?r:n}function Rp(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}var Dp=ga(Object.getPrototypeOf,Object);const ba=Dp;var Cp="[object Object]",Pp=Function.prototype,kp=Object.prototype,_a=Pp.toString,Np=kp.hasOwnProperty,Bp=_a.call(Object);function Vi(e){if(!at(e)||Et(e)!=Cp)return!1;var t=ba(e);if(t===null)return!0;var r=Np.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&_a.call(r)==Bp}var Mp="[object DOMException]",Ip="[object Error]";function wa(e){if(!at(e))return!1;var t=Et(e);return t==Ip||t==Mp||typeof e.message=="string"&&typeof e.name=="string"&&!Vi(e)}var Fp=ua(function(e,t){try{return aa(e,void 0,t)}catch(r){return wa(r)?r:new Error(r)}});const Lp=Fp;function Vp(e,t,r){var n=-1,i=e.length;t<0&&(t=-t>i?0:i+t),r=r>i?i:r,r<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var s=Array(i);++n<i;)s[n]=e[n+t];return s}function Up(e,t,r){var n=e.length;return r=r===void 0?n:r,Vp(e,t,r)}var Hp="\\ud800-\\udfff",zp="\\u0300-\\u036f",qp="\\ufe20-\\ufe2f",Kp="\\u20d0-\\u20ff",Jp=zp+qp+Kp,Wp="\\ufe0e\\ufe0f",Yp="\\u200d",Gp=RegExp("["+Yp+Hp+Jp+Wp+"]");function Ea(e){return Gp.test(e)}function Zp(e){return e.split("")}var Sa="\\ud800-\\udfff",Qp="\\u0300-\\u036f",Xp="\\ufe20-\\ufe2f",td="\\u20d0-\\u20ff",ed=Qp+Xp+td,rd="\\ufe0e\\ufe0f",nd="["+Sa+"]",Zn="["+ed+"]",Qn="\\ud83c[\\udffb-\\udfff]",id="(?:"+Zn+"|"+Qn+")",xa="[^"+Sa+"]",Ta="(?:\\ud83c[\\udde6-\\uddff]){2}",$a="[\\ud800-\\udbff][\\udc00-\\udfff]",sd="\\u200d",Oa=id+"?",Aa="["+rd+"]?",od="(?:"+sd+"(?:"+[xa,Ta,$a].join("|")+")"+Aa+Oa+")*",ad=Aa+Oa+od,cd="(?:"+[xa+Zn+"?",Zn,Ta,$a,nd].join("|")+")",ud=RegExp(Qn+"(?="+Qn+")|"+cd+ad,"g");function ld(e){return e.match(ud)||[]}function fd(e){return Ea(e)?ld(e):Zp(e)}function ja(e){return function(t){t=pe(t);var r=Ea(t)?fd(t):void 0,n=r?r[0]:t.charAt(0),i=r?Up(r,1).join(""):t.slice(1);return n[e]()+i}}var hd=ja("toUpperCase");const cn=hd;function pd(e){return cn(pe(e).toLowerCase())}function dd(e,t,r,n){var i=-1,s=e==null?0:e.length;for(n;++i<s;)r=t(r,e[i],i,e);return r}function Ra(e){return function(t){return e==null?void 0:e[t]}}var md={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},gd=Ra(md);const vd=gd;var yd=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,bd="\\u0300-\\u036f",_d="\\ufe20-\\ufe2f",wd="\\u20d0-\\u20ff",Ed=bd+_d+wd,Sd="["+Ed+"]",xd=RegExp(Sd,"g");function Td(e){return e=pe(e),e&&e.replace(yd,vd).replace(xd,"")}var $d=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function Od(e){return e.match($d)||[]}var Ad=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function jd(e){return Ad.test(e)}var Da="\\ud800-\\udfff",Rd="\\u0300-\\u036f",Dd="\\ufe20-\\ufe2f",Cd="\\u20d0-\\u20ff",Pd=Rd+Dd+Cd,Ca="\\u2700-\\u27bf",Pa="a-z\\xdf-\\xf6\\xf8-\\xff",kd="\\xac\\xb1\\xd7\\xf7",Nd="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Bd="\\u2000-\\u206f",Md=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ka="A-Z\\xc0-\\xd6\\xd8-\\xde",Id="\\ufe0e\\ufe0f",Na=kd+Nd+Bd+Md,Ba="['’]",Us="["+Na+"]",Fd="["+Pd+"]",Ma="\\d+",Ld="["+Ca+"]",Ia="["+Pa+"]",Fa="[^"+Da+Na+Ma+Ca+Pa+ka+"]",Vd="\\ud83c[\\udffb-\\udfff]",Ud="(?:"+Fd+"|"+Vd+")",Hd="[^"+Da+"]",La="(?:\\ud83c[\\udde6-\\uddff]){2}",Va="[\\ud800-\\udbff][\\udc00-\\udfff]",be="["+ka+"]",zd="\\u200d",Hs="(?:"+Ia+"|"+Fa+")",qd="(?:"+be+"|"+Fa+")",zs="(?:"+Ba+"(?:d|ll|m|re|s|t|ve))?",qs="(?:"+Ba+"(?:D|LL|M|RE|S|T|VE))?",Ua=Ud+"?",Ha="["+Id+"]?",Kd="(?:"+zd+"(?:"+[Hd,La,Va].join("|")+")"+Ha+Ua+")*",Jd="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Wd="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Yd=Ha+Ua+Kd,Gd="(?:"+[Ld,La,Va].join("|")+")"+Yd,Zd=RegExp([be+"?"+Ia+"+"+zs+"(?="+[Us,be,"$"].join("|")+")",qd+"+"+qs+"(?="+[Us,be+Hs,"$"].join("|")+")",be+"?"+Hs+"+"+zs,be+"+"+qs,Wd,Jd,Ma,Gd].join("|"),"g");function Qd(e){return e.match(Zd)||[]}function Xd(e,t,r){return e=pe(e),t=t,t===void 0?jd(e)?Qd(e):Od(e):e.match(t)||[]}var tm="['’]",em=RegExp(tm,"g");function Ui(e){return function(t){return dd(Xd(Td(t).replace(em,"")),e,"")}}var rm=Ui(function(e,t,r){return t=t.toLowerCase(),e+(r?pd(t):t)});const Nt=rm;function nm(){this.__data__=new Mt,this.size=0}function im(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function sm(e){return this.__data__.get(e)}function om(e){return this.__data__.has(e)}var am=200;function cm(e,t){var r=this.__data__;if(r instanceof Mt){var n=r.__data__;if(!er||n.length<am-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new It(n)}return r.set(e,t),this.size=r.size,this}function Ot(e){var t=this.__data__=new Mt(e);this.size=t.size}Ot.prototype.clear=nm,Ot.prototype.delete=im,Ot.prototype.get=sm,Ot.prototype.has=om,Ot.prototype.set=cm;var za=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ks=za&&typeof module=="object"&&module&&!module.nodeType&&module,um=Ks&&Ks.exports===za,Js=um?At.Buffer:void 0,Ws=Js?Js.allocUnsafe:void 0;function qa(e,t){if(t)return e.slice();var r=e.length,n=Ws?Ws(r):new e.constructor(r);return e.copy(n),n}function lm(e,t){for(var r=-1,n=e==null?0:e.length,i=0,s=[];++r<n;){var o=e[r];t(o,r,e)&&(s[i++]=o)}return s}function fm(){return[]}var hm=Object.prototype,pm=hm.propertyIsEnumerable,Ys=Object.getOwnPropertySymbols,dm=Ys?function(e){return e==null?[]:(e=Object(e),lm(Ys(e),function(t){return pm.call(e,t)}))}:fm;const mm=dm;function gm(e,t,r){var n=t(e);return pt(e)?n:Rp(n,r(e))}function Xn(e){return gm(e,sn,mm)}var vm=he(At,"DataView");const ti=vm;var ym=he(At,"Promise");const ei=ym;var bm=he(At,"Set");const ri=bm;var Gs="[object Map]",_m="[object Object]",Zs="[object Promise]",Qs="[object Set]",Xs="[object WeakMap]",to="[object DataView]",wm=fe(ti),Em=fe(er),Sm=fe(ei),xm=fe(ri),Tm=fe(Gn),Xt=Et;(ti&&Xt(new ti(new ArrayBuffer(1)))!=to||er&&Xt(new er)!=Gs||ei&&Xt(ei.resolve())!=Zs||ri&&Xt(new ri)!=Qs||Gn&&Xt(new Gn)!=Xs)&&(Xt=function(e){var t=Et(e),r=t==_m?e.constructor:void 0,n=r?fe(r):"";if(n)switch(n){case wm:return to;case Em:return Gs;case Sm:return Zs;case xm:return Qs;case Tm:return Xs}return t});const rr=Xt;var $m=Object.prototype,Om=$m.hasOwnProperty;function Am(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&Om.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var jm=At.Uint8Array;const qr=jm;function Hi(e){var t=new e.constructor(e.byteLength);return new qr(t).set(new qr(e)),t}function Rm(e,t){var r=Hi(e.buffer);return new e.constructor(r,e.byteOffset,e.byteLength)}var Dm=/\w*$/;function Cm(e){var t=new e.constructor(e.source,Dm.exec(e));return t.lastIndex=e.lastIndex,t}var eo=Ct?Ct.prototype:void 0,ro=eo?eo.valueOf:void 0;function Pm(e){return ro?Object(ro.call(e)):{}}function Ka(e,t){var r=t?Hi(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var km="[object Boolean]",Nm="[object Date]",Bm="[object Map]",Mm="[object Number]",Im="[object RegExp]",Fm="[object Set]",Lm="[object String]",Vm="[object Symbol]",Um="[object ArrayBuffer]",Hm="[object DataView]",zm="[object Float32Array]",qm="[object Float64Array]",Km="[object Int8Array]",Jm="[object Int16Array]",Wm="[object Int32Array]",Ym="[object Uint8Array]",Gm="[object Uint8ClampedArray]",Zm="[object Uint16Array]",Qm="[object Uint32Array]";function Xm(e,t,r){var n=e.constructor;switch(t){case Um:return Hi(e);case km:case Nm:return new n(+e);case Hm:return Rm(e);case zm:case qm:case Km:case Jm:case Wm:case Ym:case Gm:case Zm:case Qm:return Ka(e,r);case Bm:return new n;case Mm:case Lm:return new n(e);case Im:return Cm(e);case Fm:return new n;case Vm:return Pm(e)}}function Ja(e){return typeof e.constructor=="function"&&!Ni(e)?Pf(ba(e)):{}}var tg="[object Map]";function eg(e){return at(e)&&rr(e)==tg}var no=Pt&&Pt.isMap,rg=no?lr(no):eg;const ng=rg;var ig="[object Set]";function sg(e){return at(e)&&rr(e)==ig}var io=Pt&&Pt.isSet,og=io?lr(io):sg;const ag=og;var cg=1,Wa="[object Arguments]",ug="[object Array]",lg="[object Boolean]",fg="[object Date]",hg="[object Error]",Ya="[object Function]",pg="[object GeneratorFunction]",dg="[object Map]",mg="[object Number]",Ga="[object Object]",gg="[object RegExp]",vg="[object Set]",yg="[object String]",bg="[object Symbol]",_g="[object WeakMap]",wg="[object ArrayBuffer]",Eg="[object DataView]",Sg="[object Float32Array]",xg="[object Float64Array]",Tg="[object Int8Array]",$g="[object Int16Array]",Og="[object Int32Array]",Ag="[object Uint8Array]",jg="[object Uint8ClampedArray]",Rg="[object Uint16Array]",Dg="[object Uint32Array]",Q={};Q[Wa]=Q[ug]=Q[wg]=Q[Eg]=Q[lg]=Q[fg]=Q[Sg]=Q[xg]=Q[Tg]=Q[$g]=Q[Og]=Q[dg]=Q[mg]=Q[Ga]=Q[gg]=Q[vg]=Q[yg]=Q[bg]=Q[Ag]=Q[jg]=Q[Rg]=Q[Dg]=!0,Q[hg]=Q[Ya]=Q[_g]=!1;function Ar(e,t,r,n,i,s){var o,a=t&cg;if(o!==void 0)return o;if(!ct(e))return e;var u=pt(e);if(u)o=Am(e);else{var c=rr(e),l=c==Ya||c==pg;if(Ae(e))return qa(e,a);if(c==Ga||c==Wa||l&&!i)o=l?{}:Ja(e);else{if(!Q[c])return i?e:{};o=Xm(e,c,a)}}s||(s=new Ot);var f=s.get(e);if(f)return f;s.set(e,o),ag(e)?e.forEach(function(d){o.add(Ar(d,t,r,d,e,s))}):ng(e)&&e.forEach(function(d,m){o.set(m,Ar(d,t,r,m,e,s))});var h=Xn,p=u?void 0:h(e);return Kf(p||e,function(d,m){p&&(m=d,d=e[m]),Pi(o,m,Ar(d,t,r,m,e,s))}),o}var Cg=1,Pg=4;function nr(e){return Ar(e,Cg|Pg)}var kg="__lodash_hash_undefined__";function Ng(e){return this.__data__.set(e,kg),this}function Bg(e){return this.__data__.has(e)}function jr(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new It;++t<r;)this.add(e[t])}jr.prototype.add=jr.prototype.push=Ng,jr.prototype.has=Bg;function Mg(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function Ig(e,t){return e.has(t)}var Fg=1,Lg=2;function Za(e,t,r,n,i,s){var o=r&Fg,a=e.length,u=t.length;if(a!=u&&!(o&&u>a))return!1;var c=s.get(e),l=s.get(t);if(c&&l)return c==t&&l==e;var f=-1,h=!0,p=r&Lg?new jr:void 0;for(s.set(e,t),s.set(t,e);++f<a;){var d=e[f],m=t[f];if(n)var b=o?n(m,d,f,t,e,s):n(d,m,f,e,t,s);if(b!==void 0){if(b)continue;h=!1;break}if(p){if(!Mg(t,function(E,g){if(!Ig(p,g)&&(d===E||i(d,E,r,n,s)))return p.push(g)})){h=!1;break}}else if(!(d===m||i(d,m,r,n,s))){h=!1;break}}return s.delete(e),s.delete(t),h}function Vg(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}function Ug(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Hg=1,zg=2,qg="[object Boolean]",Kg="[object Date]",Jg="[object Error]",Wg="[object Map]",Yg="[object Number]",Gg="[object RegExp]",Zg="[object Set]",Qg="[object String]",Xg="[object Symbol]",tv="[object ArrayBuffer]",ev="[object DataView]",so=Ct?Ct.prototype:void 0,Cn=so?so.valueOf:void 0;function rv(e,t,r,n,i,s,o){switch(r){case ev:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case tv:return!(e.byteLength!=t.byteLength||!s(new qr(e),new qr(t)));case qg:case Kg:case Yg:return ke(+e,+t);case Jg:return e.name==t.name&&e.message==t.message;case Gg:case Qg:return e==t+"";case Wg:var a=Vg;case Zg:var u=n&Hg;if(a||(a=Ug),e.size!=t.size&&!u)return!1;var c=o.get(e);if(c)return c==t;n|=zg,o.set(e,t);var l=Za(a(e),a(t),n,i,s,o);return o.delete(e),l;case Xg:if(Cn)return Cn.call(e)==Cn.call(t)}return!1}var nv=1,iv=Object.prototype,sv=iv.hasOwnProperty;function ov(e,t,r,n,i,s){var o=r&nv,a=Xn(e),u=a.length,c=Xn(t),l=c.length;if(u!=l&&!o)return!1;for(var f=u;f--;){var h=a[f];if(!(o?h in t:sv.call(t,h)))return!1}var p=s.get(e),d=s.get(t);if(p&&d)return p==t&&d==e;var m=!0;s.set(e,t),s.set(t,e);for(var b=o;++f<u;){h=a[f];var E=e[h],g=t[h];if(n)var y=o?n(g,E,h,t,e,s):n(E,g,h,e,t,s);if(!(y===void 0?E===g||i(E,g,r,n,s):y)){m=!1;break}b||(b=h=="constructor")}if(m&&!b){var _=e.constructor,S=t.constructor;_!=S&&"constructor"in e&&"constructor"in t&&!(typeof _=="function"&&_ instanceof _&&typeof S=="function"&&S instanceof S)&&(m=!1)}return s.delete(e),s.delete(t),m}var av=1,oo="[object Arguments]",ao="[object Array]",vr="[object Object]",cv=Object.prototype,co=cv.hasOwnProperty;function uv(e,t,r,n,i,s){var o=pt(e),a=pt(t),u=o?ao:rr(e),c=a?ao:rr(t);u=u==oo?vr:u,c=c==oo?vr:c;var l=u==vr,f=c==vr,h=u==c;if(h&&Ae(e)){if(!Ae(t))return!1;o=!0,l=!1}if(h&&!l)return s||(s=new Ot),o||Bi(e)?Za(e,t,r,n,i,s):rv(e,t,u,r,n,i,s);if(!(r&av)){var p=l&&co.call(e,"__wrapped__"),d=f&&co.call(t,"__wrapped__");if(p||d){var m=p?e.value():e,b=d?t.value():t;return s||(s=new Ot),i(m,b,r,n,s)}}return h?(s||(s=new Ot),ov(e,t,r,n,i,s)):!1}function un(e,t,r,n,i){return e===t?!0:e==null||t==null||!at(e)&&!at(t)?e!==e&&t!==t:uv(e,t,r,n,un,i)}var lv=1,fv=2;function hv(e,t,r,n){var i=r.length,s=i;if(e==null)return!s;for(e=Object(e);i--;){var o=r[i];if(o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++i<s;){o=r[i];var a=o[0],u=e[a],c=o[1];if(o[2]){if(u===void 0&&!(a in e))return!1}else{var l=new Ot,f;if(!(f===void 0?un(c,u,lv|fv,n,l):f))return!1}}return!0}function Qa(e){return e===e&&!ct(e)}function pv(e){for(var t=sn(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,Qa(i)]}return t}function Xa(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function dv(e){var t=pv(e);return t.length==1&&t[0][2]?Xa(t[0][0],t[0][1]):function(r){return r===e||hv(r,e,t)}}function mv(e,t){return e!=null&&t in Object(e)}function gv(e,t,r){t=Li(t,e);for(var n=-1,i=t.length,s=!1;++n<i;){var o=fr(t[n]);if(!(s=e!=null&&r(e,o)))break;e=e[o]}return s||++n!=i?s:(i=e==null?0:e.length,!!i&&ki(i)&&rn(o,i)&&(pt(e)||zr(e)))}function vv(e,t){return e!=null&&gv(e,t,mv)}var yv=1,bv=2;function _v(e,t){return Ii(e)&&Qa(t)?Xa(fr(e),t):function(r){var n=ya(r,e);return n===void 0&&n===t?vv(r,e):un(t,n,yv|bv)}}function wv(e){return function(t){return t==null?void 0:t[e]}}function Ev(e){return function(t){return va(t,e)}}function Sv(e){return Ii(e)?wv(fr(e)):Ev(e)}function xv(e){return typeof e=="function"?e:e==null?Ci:typeof e=="object"?pt(e)?_v(e[0],e[1]):dv(e):Sv(e)}function Tv(e,t,r,n){for(var i=-1,s=e==null?0:e.length;++i<s;){var o=e[i];t(n,o,r(o),e)}return n}function $v(e){return function(t,r,n){for(var i=-1,s=Object(t),o=n(t),a=o.length;a--;){var u=o[++i];if(r(s[u],u,s)===!1)break}return t}}var Ov=$v();const tc=Ov;function Av(e,t){return e&&tc(e,t,sn)}function jv(e,t){return function(r,n){if(r==null)return r;if(!ur(r))return e(r,n);for(var i=r.length,s=-1,o=Object(r);++s<i&&n(o[s],s,o)!==!1;);return r}}var Rv=jv(Av);const Dv=Rv;function Cv(e,t,r,n){return Dv(e,function(i,s,o){t(n,i,r(i),o)}),n}function Pv(e,t){return function(r,n){var i=pt(r)?Tv:Cv,s={};return i(r,e,xv(n),s)}}var kv=function(){return At.Date.now()};const Pn=kv;var Nv="Expected a function",Bv=Math.max,Mv=Math.min;function zi(e,t,r){var n,i,s,o,a,u,c=0,l=!1,f=!1,h=!0;if(typeof e!="function")throw new TypeError(Nv);t=Ps(t)||0,ct(r)&&(l=!!r.leading,f="maxWait"in r,s=f?Bv(Ps(r.maxWait)||0,t):s,h="trailing"in r?!!r.trailing:h);function p(v){var x=n,O=i;return n=i=void 0,c=v,o=e.apply(O,x),o}function d(v){return c=v,a=setTimeout(E,t),l?p(v):o}function m(v){var x=v-u,O=v-c,V=t-x;return f?Mv(V,s-O):V}function b(v){var x=v-u,O=v-c;return u===void 0||x>=t||x<0||f&&O>=s}function E(){var v=Pn();if(b(v))return g(v);a=setTimeout(E,m(v))}function g(v){return a=void 0,h&&n?p(v):(n=i=void 0,o)}function y(){a!==void 0&&clearTimeout(a),c=0,n=u=i=a=void 0}function _(){return a===void 0?o:g(Pn())}function S(){var v=Pn(),x=b(v);if(n=arguments,i=this,u=v,x){if(a===void 0)return d(u);if(f)return clearTimeout(a),a=setTimeout(E,t),p(u)}return a===void 0&&(a=setTimeout(E,t)),o}return S.cancel=y,S.flush=_,S}function ni(e,t,r){(r!==void 0&&!ke(e[t],r)||r===void 0&&!(t in e))&&nn(e,t,r)}function Iv(e){return at(e)&&ur(e)}function ii(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function Fv(e){return ca(e,Mi(e))}function Lv(e,t,r,n,i,s,o){var a=ii(e,r),u=ii(t,r),c=o.get(u);if(c){ni(e,r,c);return}var l=s?s(a,u,r+"",e,t,o):void 0,f=l===void 0;if(f){var h=pt(u),p=!h&&Ae(u),d=!h&&!p&&Bi(u);l=u,h||p||d?pt(a)?l=a:Iv(a)?l=Nf(a):p?(f=!1,l=qa(u,!0)):d?(f=!1,l=Ka(u,!0)):l=[]:Vi(u)||zr(u)?(l=a,zr(a)?l=Fv(a):(!ct(a)||ce(a))&&(l=Ja(u))):f=!1}f&&(o.set(u,l),i(l,u,n,s,o),o.delete(u)),ni(e,r,l)}function ec(e,t,r,n,i){e!==t&&tc(t,function(s,o){if(i||(i=new Ot),ct(s))Lv(e,t,o,r,ec,n,i);else{var a=n?n(ii(e,o),s,o+"",e,t,i):void 0;a===void 0&&(a=s),ni(e,o,a)}},Mi)}var Vv={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Uv=Ra(Vv);const Hv=Uv;var rc=/[&<>"']/g,zv=RegExp(rc.source);function qv(e){return e=pe(e),e&&zv.test(e)?e.replace(rc,Hv):e}var Kv=Object.prototype,Jv=Kv.hasOwnProperty,Wv=Pv(function(e,t,r){Jv.call(e,r)?e[r].push(t):nn(e,r,[t])});const nc=Wv;var Yv="[object String]";function bt(e){return typeof e=="string"||!pt(e)&&at(e)&&Et(e)==Yv}function Gv(e,t){return sa(t,function(r){return e[r]})}var Zv="[object ArrayBuffer]";function Qv(e){return at(e)&&Et(e)==Zv}var uo=Pt&&Pt.isArrayBuffer,Xv=uo?lr(uo):Qv;const ty=Xv;var ey="[object Boolean]";function ry(e){return e===!0||e===!1||at(e)&&Et(e)==ey}var ny="[object Date]";function iy(e){return at(e)&&Et(e)==ny}var lo=Pt&&Pt.isDate,sy=lo?lr(lo):iy;const oy=sy;function ay(e,t){return un(e,t)}var cy="[object Number]";function ic(e){return typeof e=="number"||at(e)&&Et(e)==cy}function uy(e){return ic(e)&&e!=+e}function ly(e){return e===null}function fy(e){return e===void 0}var hy=Ui(function(e,t,r){return e+(r?"-":"")+t.toLowerCase()});const py=hy;var dy=ja("toLowerCase");const my=dy;var gy=fa(function(e,t,r){ec(e,t,r)});const Dt=gy;function vy(e,t,r,n){if(!ct(e))return e;t=Li(t,e);for(var i=-1,s=t.length,o=s-1,a=e;a!=null&&++i<s;){var u=fr(t[i]),c=r;if(u==="__proto__"||u==="constructor"||u==="prototype")return e;if(i!=o){var l=a[u];c=void 0,c===void 0&&(c=ct(l)?l:rn(t[i+1])?[]:{})}Pi(a,u,c),a=a[u]}return e}function yy(e,t,r){return e==null?e:vy(e,t,r)}var by=Ui(function(e,t,r){return e+(r?"_":"")+t.toLowerCase()});const _y=by;var sc=Object.prototype,wy=sc.hasOwnProperty;function fo(e,t,r,n){return e===void 0||ke(e,sc[r])&&!wy.call(n,r)?t:e}var Ey={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};function Sy(e){return"\\"+Ey[e]}var xy=/<%=([\s\S]+?)%>/g;const oc=xy;var Ty=/<%-([\s\S]+?)%>/g;const $y=Ty;var Oy=/<%([\s\S]+?)%>/g;const Ay=Oy;var jy={escape:$y,evaluate:Ay,interpolate:oc,variable:"",imports:{_:{escape:qv}}};const ho=jy;var Ry="Invalid `variable` option passed into `_.template`",Dy=/\b__p \+= '';/g,Cy=/\b(__p \+=) '' \+/g,Py=/(__e\(.*?\)|\b__t\)) \+\n'';/g,ky=/[()=,{}\[\]\/\s]/,Ny=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,yr=/($^)/,By=/['\n\r\u2028\u2029\\]/g,My=Object.prototype,po=My.hasOwnProperty;function ac(e,t,r){var n=ho.imports._.templateSettings||ho;r&&la(e,t,r)&&(t=void 0),e=pe(e),t=Vs({},t,n,fo);var i=Vs({},t.imports,n.imports,fo),s=sn(i),o=Gv(i,s),a,u,c=0,l=t.interpolate||yr,f="__p += '",h=RegExp((t.escape||yr).source+"|"+l.source+"|"+(l===oc?Ny:yr).source+"|"+(t.evaluate||yr).source+"|$","g"),p=po.call(t,"sourceURL")?"//# sourceURL="+(t.sourceURL+"").replace(/\s/g," ")+`
3
3
  `:"";e.replace(h,function(b,E,g,y,_,S){return g||(g=y),f+=e.slice(c,S).replace(By,Sy),E&&(a=!0,f+=`' +
4
4
  __e(`+E+`) +
@@ -51,15 +51,15 @@ version: 2.9.0
51
51
  * Copyright (c) 2025, VTJ.PRO All rights reserved.
52
52
  * @name @vtj/core
53
53
  * @author CHC chenhuachun1549@dingtalk.com
54
- * @version 0.10.9
54
+ * @version 0.10.10
55
55
  * @license <a href="https://vtj.pro/license.html">MIT License</a>
56
- */const X0="0.10.9",t1="BuiltIn",Zi="VueMaterial",Qi="VueRouterMaterial",e1=[Zi,Qi],r1={vue:"Vue","vue-router":"VueRouter"},Hc={[Zi]:["Transition","TransitionGroup","KeepAlive","Teleport","Suspense"],[Qi]:["RouterView","RouterLink"]},n1=["slot","template","component","img","div","p","h1","h2","h3","span","a"];let i1=class{},zc=class{constructor(){A(this,"listeners",[]);A(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}},Cr=class qc{constructor(t,r,n){A(this,"isUnset",!1);this.name=t,this.value=r,this.defaultValue=n,this.setValue(r)}setValue(t){this.value=t,this.isUnset=this.value===this.defaultValue}getValue(){var t;return(t=this.value)!=null?t:this.defaultValue}static toDsl(t={}){return Object.entries(t).reduce((r,[n,i])=>(i.isUnset||(r[n]=i.getValue()),r),{})}static parse(t={}){return Object.entries(t).reduce((r,[n,i])=>(r[n]=new qc(n,i),r),{})}},Pr=class Kc{constructor(t){A(this,"name");A(this,"handler");A(this,"modifiers",{});this.schema=t;const{name:r,handler:n}=this.schema;this.name=r,this.handler=n,this.update(t)}update(t){Object.assign(this.schema,t);const{handler:r,modifiers:n={}}=this.schema;this.handler=r,this.modifiers=n}static toDsl(t){return Object.entries(t).reduce((r,[n,i])=>{const{handler:s,modifiers:o}=i;return r[n]={name:n,handler:s,modifiers:o},r},{})}static parse(t={}){return Object.entries(t).reduce((r,[n,i])=>(r[n]=new Kc(i),r),{})}},Ke=class Jc{constructor(t){A(this,"id");A(this,"name","");A(this,"arg");A(this,"modifiers");A(this,"value");A(this,"iterator");this.schema=t,this.id=t.id||gt(),this.update(t)}update(t){Object.assign(this.schema,t);const{name:r,arg:n,modifiers:i,value:s,iterator:o}=this.schema;this.name=r,this.arg=n,this.modifiers=i,this.value=s,this.iterator=o}static parse(t=[]){return t.map(r=>new Jc(r))}static toDsl(t=[]){return t.map(r=>{const{name:n,arg:i,modifiers:s,value:o,iterator:a,id:u}=r;return{id:u,name:n,arg:i,modifiers:s,value:o,iterator:a}})}};const nt="EVENT_NODE_CHANGE";var Ft;let Jr=(Ft=class{constructor(t,r=null){A(this,"__VTJ_NODE__",!0);A(this,"locked",!1);A(this,"id");A(this,"name");A(this,"from");A(this,"invisible",!1);A(this,"children","");A(this,"slot");A(this,"props",{});A(this,"events",{});A(this,"directives",[]);A(this,"disposed",!1);this.parent=r;const{id:n=gt(),name:i,from:s=""}=t;this.id=n,this.name=i,this.from=s,this.update(t,!0),Ft.nodes[this.id]=this}update(t,r=!1){const{invisible:n=!1,locked:i=!1,children:s=[],slot:o,props:a={},events:u={},directives:c=[]}=t;this.invisible=n,this.locked=i,this.setChildren(s,!0),this.setSlot(o,!0),this.props=Cr.parse(a),this.events=Pr.parse(u),this.directives=Ke.parse(c),r||I.emit(nt,this)}setChildren(t="",r=!1){Array.isArray(t)?this.children=t.map(n=>new Ft(n,this)):this.children=t,r||I.emit(nt,this)}setSlot(t,r=!1){this.slot=typeof t=="string"?{name:t,params:[]}:t,r||I.emit(nt,this)}setProp(t,r,n,i=!1){const s=this.props[t];s?s.setValue(r):this.props[t]=new Cr(t,r,n),i||I.emit(nt,this)}removeProp(t,r=!1){delete this.props[t],r||I.emit(nt,this)}getPropValue(t){const r=this.props[t];if(r)return r.getValue()}setEvent(t,r=!1){const n=this.events[t.name];n?n.update(t):this.events[t.name]=new Pr(t),r||I.emit(nt,this)}removeEvent(t,r=!1){delete this.events[t],r||I.emit(nt,this)}setDirective(t,r=!1){const n=t instanceof Ke?t:new Ke(t),i=this.directives.findIndex(s=>s.id===t.id);i>=0?this.directives.splice(i,1,n):this.directives.push(n),r||I.emit(nt,this)}removeDirective(t,r=!1){const n=this.directives.findIndex(i=>i===t||i.id===t.id);n>=0&&this.directives.splice(n,1),r||I.emit(nt,this)}removeChild(t,r=!1){const{children:n,disposed:i}=this;if(i||!Array.isArray(n))return;const s=n.findIndex(o=>o===t);t.parent=null,n.splice(s,1),r||I.emit(nt,this)}appendChild(t,r=!1){const{children:n,disposed:i}=this;i||(t.parent=this,Array.isArray(n)?n.push(t):this.children=[t],r||I.emit(nt,this))}insertAfter(t,r=!1){if(!this.parent)return;const n=this.parent.children;if(Array.isArray(n)){t.parent=this.parent;const i=n.indexOf(this);n.splice(i+1,0,t),r||I.emit(nt,this.parent)}}insertBefore(t,r=!1){if(!this.parent)return;const n=this.parent.children;if(Array.isArray(n)){t.parent=this.parent;const i=n.indexOf(this);n.splice(i,0,t),r||I.emit(nt,this.parent)}}movePrev(t=!1){const r=this.parent;if(!r)return;const n=r.children;if(Array.isArray(n)){const i=n.indexOf(this);i>0&&(n.splice(i,1),n.splice(i-1,0,this),t||I.emit(nt,r))}}moveNext(t=!1){const r=this.parent;if(!r)return;const n=r.children;if(Array.isArray(n)){const i=n.indexOf(this);i>-1&&i<n.length-1&&(n.splice(i,1),n.splice(i+1,0,this),t||I.emit(nt,r))}}toDsl(){const{id:t,name:r,from:n,invisible:i,locked:s,slot:o,children:a,props:u,directives:c,events:l}=this,f=Array.isArray(a)?a.map(h=>h.toDsl()):a;return{id:t,name:r,from:n,invisible:i,locked:s,slot:o,children:f,props:Cr.toDsl(u),directives:Ke.toDsl(c),events:Pr.toDsl(l)}}dispose(t=!1){const{children:r,disposed:n}=this;n||(Array.isArray(r)&&r.forEach(i=>i.dispose(!0)),this.parent?this.parent.removeChild(this,t):t||I.emit(nt,this),this.parent=null,this.disposed=!0,delete Ft.nodes[this.id])}lock(t=!1){if(this.locked=!0,Array.isArray(this.children))for(const r of this.children)r.lock(!0);t||I.emit(nt,this)}unlock(t=!1){if(this.locked=!1,Array.isArray(this.children))for(const r of this.children)r.unlock(!0);t||I.emit(nt,this)}setVisible(t,r=!1){if(this.invisible=!t,Array.isArray(this.children))for(const n of this.children)n.setVisible(t,!0);r||I.emit(nt,this)}isChild(t){let r=!1;if(Array.isArray(this.children)){for(const n of this.children)if(t===n||t.id===n.id){r=!0;break}else if(r=n.isChild(t),r)break}return r}},A(Ft,"nodes",{}),Ft);const G="EVENT_BLOCK_CHANGE";var qt;let re=(qt=class{constructor(t){A(this,"__VTJ_BLOCK__",!0);A(this,"id");A(this,"name","");A(this,"inject",[]);A(this,"state",{});A(this,"lifeCycles",{});A(this,"methods",{});A(this,"computed",{});A(this,"watch",[]);A(this,"css","");A(this,"props",[]);A(this,"emits",[]);A(this,"slots",[]);A(this,"dataSources",{});A(this,"nodes",[]);A(this,"locked",!1);A(this,"disposed",!1);const{id:r}=t;this.id=r||gt(),this.update(t,!0)}update(t,r=!1){for(const i of qt.normalAttrs){const s=t[i];s&&(this[i]=s)}const{nodes:n=[]}=t;n.length&&(this.nodes=n.map(i=>new Jr(i))),r||I.emit(G,this)}toDsl(t){const{__VTJ_BLOCK__:r,id:n,nodes:i}=this;return st(z({},qt.normalAttrs.reduce((s,o)=>(s[o]=this[o],s),{})),{__VTJ_BLOCK__:r,__VERSION__:t||Dc().toString(),id:n,nodes:i.map(s=>s.toDsl())})}dispose(){this.nodes.map(t=>t.dispose(!0)),this.nodes=[],this.disposed=!0}setFunction(t,r,n,i=!1){this[t][r]=n,i||I.emit(G,this)}removeFunction(t,r,n=!1){delete this[t][r],n||I.emit(G,this)}setState(t,r,n=!1){this.state[t]=r,n||I.emit(G,this)}removeState(t,r=!1){delete this.state[t],r||I.emit(G,this)}setCss(t,r=!1){this.css=t,r||I.emit(G,this)}setWatch(t,r=!1){t.id=t.id||gt();const n=this.watch.findIndex(i=>i.id&&i.id===t.id||i===t);n>-1?this.watch.splice(n,1,t):this.watch.push(t),r||I.emit(G,this)}removeWatch(t,r=!1){const n=this.watch.findIndex(i=>i.id&&i.id===t.id||i===t);n>-1&&(this.watch.splice(n,1),r||I.emit(G,this))}setProp(t,r=!1){const n=this.props.findIndex(i=>typeof i=="string"?i===t.name:i.name===t.name);n>-1?this.props.splice(n,1,t):this.props.push(t),r||I.emit(G,this)}removeProp(t,r=!1){const n=this.props.findIndex(i=>typeof i=="string"?i===t.name:i.name===t.name);n>-1&&(this.props.splice(n,1),r||I.emit(G,this))}setEmit(t,r=!1){const n=bt(t)?{name:t,params:[]}:t,i=this.emits.findIndex(s=>s===n.name||s===n);i>-1?this.emits.splice(i,1,n):this.emits.push(n),r||I.emit(G,this)}removeEmit(t,r=!1){const n=this.emits.findIndex(i=>bt(i)?i===t:i.name===t);n>-1&&(this.emits.splice(n,1),r||I.emit(G,this))}setSlot(t,r=!1){const n=bt(t)?{name:t,params:[]}:t,i=this.slots.findIndex(s=>s===n.name||s===n);i>-1?this.slots.splice(i,1,n):this.slots.push(n),r||I.emit(G,this)}removeSlot(t,r=!1){const n=this.slots.findIndex(i=>bt(i)?i===t:i.name===t);n>-1&&(this.slots.splice(n,1),r||I.emit(G,this))}setInject(t,r=!1){const n=this.inject.findIndex(i=>i.name===t.name);n>-1?this.inject.splice(n,1,t):this.inject.push(t),r||I.emit(G,this)}removeInject(t,r=!1){const n=this.inject.findIndex(i=>i.name===t.name);n>-1&&(this.inject.splice(n,1),r||I.emit(G,this))}setDataSource(t,r=!1){this.dataSources[t.name]=t,r||I.emit(G,this)}removeDataSource(t,r=!1){delete this.dataSources[t],r||I.emit(G,this)}insertAfter(t,r,n=!1){t.parent=null;const i=this.nodes.indexOf(r);this.nodes.splice(i+1,0,t),n||I.emit(G,this)}insertBefore(t,r,n=!1){t.parent=null;const i=this.nodes.indexOf(r);this.nodes.splice(i,0,t),n||I.emit(G,this)}appendNode(t,r=!1){t.parent=null,this.nodes.push(t),r||I.emit(G,this)}addNode(t,r,n="inner",i=!1){r?["left","top"].includes(n)?r.parent?r.insertAfter(t,i):this.insertBefore(t,r,i):["right","bottom"].includes(n)?r.parent?r.insertAfter(t,i):this.insertAfter(t,r,i):r.appendChild(t,i):this.appendNode(t,i)}__removeNode(t,r=!1){const n=this.nodes.findIndex(i=>i.id===t.id);n>-1&&(this.nodes.splice(n,1),r||I.emit(G,this))}removeNode(t,r=!1){t.parent?t.dispose(r):(t.dispose(!0),this.__removeNode(t,r))}move(t,r,n="inner",i=!1){t.parent?t.parent.removeChild(t,!0):this.__removeNode(t,!0),this.addNode(t,r,n,i)}movePrev(t,r=!1){if(t.parent)t.movePrev(r);else{const n=this.nodes,i=n.indexOf(t);i>0&&(n.splice(i,1),n.splice(i-1,0,t),r||I.emit(G,this))}}moveNext(t,r=!1){if(t.parent)t.moveNext(r);else{const n=this.nodes,i=n.indexOf(t);i>-1&&i<n.length-1&&(n.splice(i,1),n.splice(i+1,0,t),r||I.emit(G,this))}}cloneNode(t,r=!1){const n=ts(t.toDsl()),i=new Jr(n);return this.addNode(i,t,"bottom",r),i}lock(t=!1){this.locked=!0;for(const r of this.nodes)r.lock(!0);t||I.emit(G,this)}unlock(t=!1){this.locked=!1;for(const r of this.nodes)r.unlock(!0);t||I.emit(G,this)}isChild(t){let r=!1;for(const n of this.nodes)if(t===n||t.id===n.id){r=!0;break}else if(r=n.isChild(t),r)break;return r}},A(qt,"normalAttrs",["name","locked","inject","state","lifeCycles","methods","computed","watch","css","props","emits","slots","dataSources","__TEMPLATE_ID__"]),qt);const it="EVENT_PROJECT_CHANGE",fi="EVENT_PROJECT_ACTIVED",hi="EVENT_PROJECT_DEPS_CHANGE",Je="EVENT_PROJECT_PAGES_CHANGE",Ee="EVENT_PROJECT_BLOCKS_CHANGE",pi="EVENT_PROJECT_APIS_CHANGE",di="EVENT_PROJECT_META_CHANGE",Wc="EVENT_PROJECT_PUBLISH",Yc="EVENT_PROJECT_FILE_PUBLISH",Gc="EVENT_PROJECT_GEN_SOURCE",Xe=class Xe{constructor(t){A(this,"id","");A(this,"platform","web");A(this,"name","");A(this,"description","");A(this,"homepage","");A(this,"dependencies",[]);A(this,"pages",[]);A(this,"blocks",[]);A(this,"apis",[]);A(this,"meta",[]);A(this,"currentFile",null);A(this,"config",{});A(this,"uniConfig",{});A(this,"__BASE_PATH__","/");const{id:r}=t;this.id=r||gt(),this.update(t,!0)}update(t,r=!1){for(const n of Xe.attrs){const i=t[n];i&&(this[n]=i)}r||I.emit(it,{model:this,type:"update",data:t})}isPageFile(t){return t.type==="page"}cleanPagesDsl(t){for(const r of t)delete r.dsl,r.children&&r.children.length&&this.cleanPagesDsl(r.children)}toDsl(t){const{id:r}=this,n=Xe.attrs.reduce((i,s)=>(i[s]=this[s],i),{});return n.pages&&(n.pages=n.pages.map(i=>nr(st(z({},i),{dsl:void 0}))),this.cleanPagesDsl(n.pages)),n.blocks&&(n.blocks=n.blocks.map(i=>nr(st(z({},i),{dsl:void 0})))),z({__VTJ_PROJECT__:!0,id:r},n)}active(t,r=!1){this.currentFile=t,r||I.emit(fi,{model:this,type:"update",data:t})}deactivate(t=!1){this.currentFile=null,t||I.emit(fi,{model:this,type:"update",data:null})}setDeps(t,r=!1){const n=this.dependencies,i=n.findIndex(o=>o.package===t.package);let s;if(i>-1?(s="update",n.splice(i,1,z(z({},n[i]),t))):(s="create",n.push(t)),!r){const o={model:this,type:s,data:t};I.emit(hi,o),I.emit(it,o)}}removeDeps(t,r=!1){const n=this.dependencies,i=n.findIndex(s=>s.package===t.package);if(i>-1&&n.splice(i,1),!r){const s={model:this,type:"delete",data:t};I.emit(hi,s),I.emit(it,s)}}getPage(t){const r=(n,i=[])=>{for(const s of i){if(s.id===n)return s;if(s.children&&s.children.length){const o=r(n,s.children);if(o)return o}}};return r(t,this.pages)}getPages(){const t=(r=[])=>{let n=[];for(const i of r)i.dir?i.children&&i.children.length&&(n=n.concat(t(i.children))):n.push(i);return n};return t(this.pages)}createPage(t,r,n=!1){return L(this,null,function*(){if(t.id=t.raw?t.name:t.id||gt(),t.type="page",t.dir?t.children=[]:t.dsl=t.dsl||new re({id:t.id,name:si(t.name)}).toDsl(),r){const i=this.getPage(r);i?i.children?i.children.push(t):i.children=[t]:console.warn(`not found PageFile for id: ${r} `)}else this.pages.push(t);if(!n){const i={model:this,type:"create",data:t};I.emit(Je,i),I.emit(it,i)}!this.currentFile&&!t.dir&&(yield xe(1e3),this.active(t,n))})}updatePage(t,r=!1){const n=this.getPage(t.id);if(n?Object.assign(n,t):console.warn(`not found PageFile for id: ${t.id} `),!r){const i={model:this,type:"update",data:t};I.emit(Je,i),I.emit(it,i)}}clonePage(t,r,n=!1){var f;const i=gt(),s=`${t.name}Copy`,o=`${t.title}_副本`,a=new re({id:i,name:s}).toDsl(),u=Dt({},t,{id:i,name:s,title:o,dsl:a}),c=r?((f=this.getPage(r))==null?void 0:f.children)||[]:this.pages,l=c.findIndex(h=>h.id===t.id);if(c.splice(l+1,0,u),!n){const h={model:this,type:"clone",data:{source:t,target:u}};I.emit(Je,h),I.emit(it,h)}}saveToBlock(t,r=!1){return L(this,null,function*(){this.active(t,r),yield xe(1e3);const n=gt(),i=t.name,s=t.title,o=new re({id:n,name:i}).toDsl(),a=Dt({},t,{id:n,name:i,title:s,dsl:o,type:"block",fromType:"Schema"});if(this.blocks.push(a),!r){const u={model:this,type:"create",data:a};I.emit(Ee,u),I.emit(it,u)}})}removePage(t,r=!1){var s;const n=this.getPage(t),i=(o,a)=>{const u=a.findIndex(c=>c.id===o);if(u>=0){a.splice(u,1);return}for(const c of a)c.children&&c.children.length&&i(o,c.children)};if(i(t,this.pages),t===this.homepage&&(this.homepage=""),((s=this.currentFile)==null?void 0:s.id)===t&&this.deactivate(r),!r){const o={model:this,type:"delete",data:n};I.emit(Je,o),I.emit(it,o)}}getBlock(t){return this.blocks.find(r=>r.id===t)}createBlock(t,r=!1){return L(this,null,function*(){const n=t.id||gt(),i=si(t.name);t.id=n,t.type="block",t.dsl=new re({id:n,name:i}).toDsl(),this.blocks.push(t);const s=t.fromType||"Schema";if(!r){const o={model:this,type:"create",data:t};I.emit(Ee,o),I.emit(it,o)}!this.currentFile&&s==="Schema"&&(yield xe(1e3),this.active(t,r))})}updateBlock(t,r=!1){const n=this.getBlock(t.id);if(n?(Object.assign(n,t),n.dsl&&(n.dsl.name=t.name)):console.warn(`not found PageFile for id: ${t.id} `),!r){const i={model:this,type:"update",data:t};I.emit(Ee,i),I.emit(it,i)}}cloneBlock(t,r=!1){const n=gt(),i=`${t.name}Copy`,s=`${t.title}_副本`,o=new re({id:n,name:i}).toDsl(),a=Dt({},t,{id:n,name:i,title:s,dsl:o}),u=this.blocks.findIndex(c=>c.id===t.id);if(this.blocks.splice(u+1,0,a),!r){const c={model:this,type:"clone",data:{source:t,target:a}};I.emit(Ee,c),I.emit(it,c)}}removeBlock(t,r=!1){var o;const n=this.getBlock(t),i=this.blocks,s=i.findIndex(a=>a.id===t);if(s>-1?(i.splice(s,1),((o=this.currentFile)==null?void 0:o.id)===t&&this.deactivate(r)):console.warn(`not found PageFile for id: ${t} `),!r){const a={model:this,type:"delete",data:n};I.emit(Ee,a),I.emit(it,a)}}existBlockName(t,r=[]){return this.blocks.some(n=>n.name===t&&!r.includes(n.id))}existPageName(t,r=[]){return this.getPages().some(n=>n.name===t&&!r.includes(n.id))}setApi(t,r=!1){const n=this.apis.find(s=>s.name===t.name||s.id===t.id);let i;if(n?(i="update",Object.assign(n,t)):(i="create",t.id=gt(),this.apis.push(t)),!r){const s={model:this,type:i,data:t};I.emit(pi,s),I.emit(it,s)}}removeApi(t,r=!1){const n=this.apis.findIndex(i=>i.name===t||i.id===t);if(n>-1?this.apis.splice(n,1):console.warn(`not found Api for name: ${t} `),!r){const i={model:this,type:"delete",data:t};I.emit(pi,i),I.emit(it,i)}}existApiName(t,r=[]){return this.apis.some(n=>n.name===t&&!r.includes(n.id))}setMeta(t,r=!1){const n=this.meta.find(s=>s.code===t.code||s.id===t.id);let i;if(n?(i="update",Object.assign(n,t)):(i="create",t.id=gt(),this.meta.push(t)),!r){const s={model:this,type:i,data:t};I.emit(di,s),I.emit(it,s)}}removeMeta(t,r=!1){const n=this.meta.findIndex(i=>i.code===t||i.id===t);if(n>-1?this.meta.splice(n,1):console.warn(`not found meta for name: ${name} `),!r){const i={model:this,type:"delete",data:t};I.emit(di,i),I.emit(it,i)}}existMetaCode(t,r=[]){return this.meta.some(n=>n.code===t&&!r.includes(n.id))}setHomepage(t,r=!1){if(this.homepage=t,!r){const n={model:this,type:"update",data:t};I.emit(it,n)}}setConfig(t,r=!1){if(this.config=Object.assign(this.config,t),!r){const n={model:this,type:"update",data:t};I.emit(it,n)}}setUniConfig(t,r,n=!1){if(this.uniConfig=Object.assign(this.uniConfig,{[t]:r}),!n){const i={model:this,type:"update",data:this.uniConfig};I.emit(it,i)}}publish(t){const r={model:this,type:"publish",data:t||this};t?I.emit(Yc,r):I.emit(Wc,r)}genSource(){const t={model:this,type:"gen",data:null};I.emit(Gc,t)}};A(Xe,"attrs",["platform","name","homepage","description","dependencies","pages","blocks","apis","meta","config","uniConfig","__BASE_PATH__"]);let ue=Xe;const We="EVENT_HISTORY_CHANGE",kr="EVENT_HISTORY_LOAD";let Xi=class{constructor(t,r={}){A(this,"options",{max:50});A(this,"index",-1);A(this,"id");A(this,"items");Object.assign(this.options,r);const{id:n,items:i=[]}=t;this.id=n,this.items=i}toDsl(){const{id:t,items:r}=this;return{id:t,items:r.map(n=>({id:n.id,label:n.label}))}}get(t){return this.items.find(r=>r.id===t)}add(t,r=!1){const{max:n}=this.options,i={id:gt(),label:new Date().toLocaleString(),dsl:nr(t)};if(this.items.unshift(i),this.items.length>n){const s=this.items.splice(n);r||I.emit(We,{model:this,type:"delete",data:s.map(o=>o.id)})}this.index=-1,r||I.emit(We,{model:this,type:"create",data:i})}remove(t,r=!1){const n=this.items.findIndex(i=>i.id===t);n>-1?(this.items.splice(n,1),n===this.index?this.index=-1:this.index>=this.items.length&&(this.index=this.items.length-1)):console.warn(`not found HistoryItem for id: ${t} `),r||I.emit(We,{model:this,type:"delete",data:[t]})}forward(t=!1){const{index:r,items:n}=this;if(r<0)return;--this.index;const i=n[this.index];i&&!t&&I.emit(kr,{model:this,type:"load",data:i})}backward(t=!1){const{index:r,items:n}=this;if(r>=n.length-1)return;r<0&&(this.index=0),++this.index;const i=n[this.index];i&&!t&&I.emit(kr,{model:this,type:"load",data:i})}load(t,r=!1){const n=this.items.findIndex(i=>i.id===t);n>=0&&(this.index=n,r||I.emit(kr,{model:this,type:"load",data:this.items[n]}))}clear(t=!1){this.index=-1;const r=this.items.map(n=>n.id);this.items=[],t||I.emit(We,{model:this,type:"clear",data:r})}};const I=Lc();function s1(e){return e instanceof re}function o1(e){return e instanceof Jr}function a1(e){return!!e.__VTJ_BLOCK__}function ts(e){const t=nr(e);return delete t.id,Array.isArray(t.children)&&(t.children=t.children.map(r=>ts(r))),t}function c1(e){const t=e.fromType||"Schema";return t==="Schema"?{type:"Schema",id:e.id}:t==="UrlSchema"?{type:"UrlSchema",url:(e.urls||"").split(",")[0]||""}:t==="Plugin"?{type:"Plugin",urls:(e.urls||"").split(","),library:e.library}:""}const p2=Object.freeze(Object.defineProperty({__proto__:null,BUILT_IN_COMPONENTS:Hc,BUILT_IN_LIBRARAY_MAP:r1,BUILT_IN_MATERIALS:e1,BUILT_IN_NAME:t1,BUILT_IN_TAGS:n1,BUILT_IN_VUE:Zi,BUILT_IN_VUE_ROUTER:Qi,Base:zc,BlockModel:re,DirectiveModel:Ke,EVENT_BLOCK_CHANGE:G,EVENT_HISTORY_CHANGE:We,EVENT_HISTORY_LOAD:kr,EVENT_NODE_CHANGE:nt,EVENT_PROJECT_ACTIVED:fi,EVENT_PROJECT_APIS_CHANGE:pi,EVENT_PROJECT_BLOCKS_CHANGE:Ee,EVENT_PROJECT_CHANGE:it,EVENT_PROJECT_DEPS_CHANGE:hi,EVENT_PROJECT_FILE_PUBLISH:Yc,EVENT_PROJECT_GEN_SOURCE:Gc,EVENT_PROJECT_META_CHANGE:di,EVENT_PROJECT_PAGES_CHANGE:Je,EVENT_PROJECT_PUBLISH:Wc,EventModel:Pr,HistoryModel:Xi,NodeModel:Jr,ProjectModel:ue,PropModel:Cr,Service:i1,VTJ_CORE_VERSION:X0,cloneDsl:ts,createNodeFrom:c1,emitter:I,isBlock:s1,isBlockSchema:a1,isNode:o1},Symbol.toStringTag,{value:"Module"}));var u1=Object.defineProperty,l1=(e,t,r)=>t in e?u1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,xt=(e,t,r)=>l1(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)}})();/**!
56
+ */const X0="0.10.10",t1="BuiltIn",Zi="VueMaterial",Qi="VueRouterMaterial",e1=[Zi,Qi],r1={vue:"Vue","vue-router":"VueRouter"},Hc={[Zi]:["Transition","TransitionGroup","KeepAlive","Teleport","Suspense"],[Qi]:["RouterView","RouterLink"]},n1=["slot","template","component","img","div","p","h1","h2","h3","span","a"];let i1=class{},zc=class{constructor(){A(this,"listeners",[]);A(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}},Cr=class qc{constructor(t,r,n){A(this,"isUnset",!1);this.name=t,this.value=r,this.defaultValue=n,this.setValue(r)}setValue(t){this.value=t,this.isUnset=this.value===this.defaultValue}getValue(){var t;return(t=this.value)!=null?t:this.defaultValue}static toDsl(t={}){return Object.entries(t).reduce((r,[n,i])=>(i.isUnset||(r[n]=i.getValue()),r),{})}static parse(t={}){return Object.entries(t).reduce((r,[n,i])=>(r[n]=new qc(n,i),r),{})}},Pr=class Kc{constructor(t){A(this,"name");A(this,"handler");A(this,"modifiers",{});this.schema=t;const{name:r,handler:n}=this.schema;this.name=r,this.handler=n,this.update(t)}update(t){Object.assign(this.schema,t);const{handler:r,modifiers:n={}}=this.schema;this.handler=r,this.modifiers=n}static toDsl(t){return Object.entries(t).reduce((r,[n,i])=>{const{handler:s,modifiers:o}=i;return r[n]={name:n,handler:s,modifiers:o},r},{})}static parse(t={}){return Object.entries(t).reduce((r,[n,i])=>(r[n]=new Kc(i),r),{})}},Ke=class Jc{constructor(t){A(this,"id");A(this,"name","");A(this,"arg");A(this,"modifiers");A(this,"value");A(this,"iterator");this.schema=t,this.id=t.id||gt(),this.update(t)}update(t){Object.assign(this.schema,t);const{name:r,arg:n,modifiers:i,value:s,iterator:o}=this.schema;this.name=r,this.arg=n,this.modifiers=i,this.value=s,this.iterator=o}static parse(t=[]){return t.map(r=>new Jc(r))}static toDsl(t=[]){return t.map(r=>{const{name:n,arg:i,modifiers:s,value:o,iterator:a,id:u}=r;return{id:u,name:n,arg:i,modifiers:s,value:o,iterator:a}})}};const nt="EVENT_NODE_CHANGE";var Ft;let Jr=(Ft=class{constructor(t,r=null){A(this,"__VTJ_NODE__",!0);A(this,"locked",!1);A(this,"id");A(this,"name");A(this,"from");A(this,"invisible",!1);A(this,"children","");A(this,"slot");A(this,"props",{});A(this,"events",{});A(this,"directives",[]);A(this,"disposed",!1);this.parent=r;const{id:n=gt(),name:i,from:s=""}=t;this.id=n,this.name=i,this.from=s,this.update(t,!0),Ft.nodes[this.id]=this}update(t,r=!1){const{invisible:n=!1,locked:i=!1,children:s=[],slot:o,props:a={},events:u={},directives:c=[]}=t;this.invisible=n,this.locked=i,this.setChildren(s,!0),this.setSlot(o,!0),this.props=Cr.parse(a),this.events=Pr.parse(u),this.directives=Ke.parse(c),r||I.emit(nt,this)}setChildren(t="",r=!1){Array.isArray(t)?this.children=t.map(n=>new Ft(n,this)):this.children=t,r||I.emit(nt,this)}setSlot(t,r=!1){this.slot=typeof t=="string"?{name:t,params:[]}:t,r||I.emit(nt,this)}setProp(t,r,n,i=!1){const s=this.props[t];s?s.setValue(r):this.props[t]=new Cr(t,r,n),i||I.emit(nt,this)}removeProp(t,r=!1){delete this.props[t],r||I.emit(nt,this)}getPropValue(t){const r=this.props[t];if(r)return r.getValue()}setEvent(t,r=!1){const n=this.events[t.name];n?n.update(t):this.events[t.name]=new Pr(t),r||I.emit(nt,this)}removeEvent(t,r=!1){delete this.events[t],r||I.emit(nt,this)}setDirective(t,r=!1){const n=t instanceof Ke?t:new Ke(t),i=this.directives.findIndex(s=>s.id===t.id);i>=0?this.directives.splice(i,1,n):this.directives.push(n),r||I.emit(nt,this)}removeDirective(t,r=!1){const n=this.directives.findIndex(i=>i===t||i.id===t.id);n>=0&&this.directives.splice(n,1),r||I.emit(nt,this)}removeChild(t,r=!1){const{children:n,disposed:i}=this;if(i||!Array.isArray(n))return;const s=n.findIndex(o=>o===t);t.parent=null,n.splice(s,1),r||I.emit(nt,this)}appendChild(t,r=!1){const{children:n,disposed:i}=this;i||(t.parent=this,Array.isArray(n)?n.push(t):this.children=[t],r||I.emit(nt,this))}insertAfter(t,r=!1){if(!this.parent)return;const n=this.parent.children;if(Array.isArray(n)){t.parent=this.parent;const i=n.indexOf(this);n.splice(i+1,0,t),r||I.emit(nt,this.parent)}}insertBefore(t,r=!1){if(!this.parent)return;const n=this.parent.children;if(Array.isArray(n)){t.parent=this.parent;const i=n.indexOf(this);n.splice(i,0,t),r||I.emit(nt,this.parent)}}movePrev(t=!1){const r=this.parent;if(!r)return;const n=r.children;if(Array.isArray(n)){const i=n.indexOf(this);i>0&&(n.splice(i,1),n.splice(i-1,0,this),t||I.emit(nt,r))}}moveNext(t=!1){const r=this.parent;if(!r)return;const n=r.children;if(Array.isArray(n)){const i=n.indexOf(this);i>-1&&i<n.length-1&&(n.splice(i,1),n.splice(i+1,0,this),t||I.emit(nt,r))}}toDsl(){const{id:t,name:r,from:n,invisible:i,locked:s,slot:o,children:a,props:u,directives:c,events:l}=this,f=Array.isArray(a)?a.map(h=>h.toDsl()):a;return{id:t,name:r,from:n,invisible:i,locked:s,slot:o,children:f,props:Cr.toDsl(u),directives:Ke.toDsl(c),events:Pr.toDsl(l)}}dispose(t=!1){const{children:r,disposed:n}=this;n||(Array.isArray(r)&&r.forEach(i=>i.dispose(!0)),this.parent?this.parent.removeChild(this,t):t||I.emit(nt,this),this.parent=null,this.disposed=!0,delete Ft.nodes[this.id])}lock(t=!1){if(this.locked=!0,Array.isArray(this.children))for(const r of this.children)r.lock(!0);t||I.emit(nt,this)}unlock(t=!1){if(this.locked=!1,Array.isArray(this.children))for(const r of this.children)r.unlock(!0);t||I.emit(nt,this)}setVisible(t,r=!1){if(this.invisible=!t,Array.isArray(this.children))for(const n of this.children)n.setVisible(t,!0);r||I.emit(nt,this)}isChild(t){let r=!1;if(Array.isArray(this.children)){for(const n of this.children)if(t===n||t.id===n.id){r=!0;break}else if(r=n.isChild(t),r)break}return r}},A(Ft,"nodes",{}),Ft);const G="EVENT_BLOCK_CHANGE";var qt;let re=(qt=class{constructor(t){A(this,"__VTJ_BLOCK__",!0);A(this,"id");A(this,"name","");A(this,"inject",[]);A(this,"state",{});A(this,"lifeCycles",{});A(this,"methods",{});A(this,"computed",{});A(this,"watch",[]);A(this,"css","");A(this,"props",[]);A(this,"emits",[]);A(this,"slots",[]);A(this,"dataSources",{});A(this,"nodes",[]);A(this,"locked",!1);A(this,"disposed",!1);const{id:r}=t;this.id=r||gt(),this.update(t,!0)}update(t,r=!1){for(const i of qt.normalAttrs){const s=t[i];s&&(this[i]=s)}const{nodes:n=[]}=t;n.length&&(this.nodes=n.map(i=>new Jr(i))),r||I.emit(G,this)}toDsl(t){const{__VTJ_BLOCK__:r,id:n,nodes:i}=this;return st(z({},qt.normalAttrs.reduce((s,o)=>(s[o]=this[o],s),{})),{__VTJ_BLOCK__:r,__VERSION__:t||Dc().toString(),id:n,nodes:i.map(s=>s.toDsl())})}dispose(){this.nodes.map(t=>t.dispose(!0)),this.nodes=[],this.disposed=!0}setFunction(t,r,n,i=!1){this[t][r]=n,i||I.emit(G,this)}removeFunction(t,r,n=!1){delete this[t][r],n||I.emit(G,this)}setState(t,r,n=!1){this.state[t]=r,n||I.emit(G,this)}removeState(t,r=!1){delete this.state[t],r||I.emit(G,this)}setCss(t,r=!1){this.css=t,r||I.emit(G,this)}setWatch(t,r=!1){t.id=t.id||gt();const n=this.watch.findIndex(i=>i.id&&i.id===t.id||i===t);n>-1?this.watch.splice(n,1,t):this.watch.push(t),r||I.emit(G,this)}removeWatch(t,r=!1){const n=this.watch.findIndex(i=>i.id&&i.id===t.id||i===t);n>-1&&(this.watch.splice(n,1),r||I.emit(G,this))}setProp(t,r=!1){const n=this.props.findIndex(i=>typeof i=="string"?i===t.name:i.name===t.name);n>-1?this.props.splice(n,1,t):this.props.push(t),r||I.emit(G,this)}removeProp(t,r=!1){const n=this.props.findIndex(i=>typeof i=="string"?i===t.name:i.name===t.name);n>-1&&(this.props.splice(n,1),r||I.emit(G,this))}setEmit(t,r=!1){const n=bt(t)?{name:t,params:[]}:t,i=this.emits.findIndex(s=>s===n.name||s===n);i>-1?this.emits.splice(i,1,n):this.emits.push(n),r||I.emit(G,this)}removeEmit(t,r=!1){const n=this.emits.findIndex(i=>bt(i)?i===t:i.name===t);n>-1&&(this.emits.splice(n,1),r||I.emit(G,this))}setSlot(t,r=!1){const n=bt(t)?{name:t,params:[]}:t,i=this.slots.findIndex(s=>s===n.name||s===n);i>-1?this.slots.splice(i,1,n):this.slots.push(n),r||I.emit(G,this)}removeSlot(t,r=!1){const n=this.slots.findIndex(i=>bt(i)?i===t:i.name===t);n>-1&&(this.slots.splice(n,1),r||I.emit(G,this))}setInject(t,r=!1){const n=this.inject.findIndex(i=>i.name===t.name);n>-1?this.inject.splice(n,1,t):this.inject.push(t),r||I.emit(G,this)}removeInject(t,r=!1){const n=this.inject.findIndex(i=>i.name===t.name);n>-1&&(this.inject.splice(n,1),r||I.emit(G,this))}setDataSource(t,r=!1){this.dataSources[t.name]=t,r||I.emit(G,this)}removeDataSource(t,r=!1){delete this.dataSources[t],r||I.emit(G,this)}insertAfter(t,r,n=!1){t.parent=null;const i=this.nodes.indexOf(r);this.nodes.splice(i+1,0,t),n||I.emit(G,this)}insertBefore(t,r,n=!1){t.parent=null;const i=this.nodes.indexOf(r);this.nodes.splice(i,0,t),n||I.emit(G,this)}appendNode(t,r=!1){t.parent=null,this.nodes.push(t),r||I.emit(G,this)}addNode(t,r,n="inner",i=!1){r?["left","top"].includes(n)?r.parent?r.insertAfter(t,i):this.insertBefore(t,r,i):["right","bottom"].includes(n)?r.parent?r.insertAfter(t,i):this.insertAfter(t,r,i):r.appendChild(t,i):this.appendNode(t,i)}__removeNode(t,r=!1){const n=this.nodes.findIndex(i=>i.id===t.id);n>-1&&(this.nodes.splice(n,1),r||I.emit(G,this))}removeNode(t,r=!1){t.parent?t.dispose(r):(t.dispose(!0),this.__removeNode(t,r))}move(t,r,n="inner",i=!1){t.parent?t.parent.removeChild(t,!0):this.__removeNode(t,!0),this.addNode(t,r,n,i)}movePrev(t,r=!1){if(t.parent)t.movePrev(r);else{const n=this.nodes,i=n.indexOf(t);i>0&&(n.splice(i,1),n.splice(i-1,0,t),r||I.emit(G,this))}}moveNext(t,r=!1){if(t.parent)t.moveNext(r);else{const n=this.nodes,i=n.indexOf(t);i>-1&&i<n.length-1&&(n.splice(i,1),n.splice(i+1,0,t),r||I.emit(G,this))}}cloneNode(t,r=!1){const n=ts(t.toDsl()),i=new Jr(n);return this.addNode(i,t,"bottom",r),i}lock(t=!1){this.locked=!0;for(const r of this.nodes)r.lock(!0);t||I.emit(G,this)}unlock(t=!1){this.locked=!1;for(const r of this.nodes)r.unlock(!0);t||I.emit(G,this)}isChild(t){let r=!1;for(const n of this.nodes)if(t===n||t.id===n.id){r=!0;break}else if(r=n.isChild(t),r)break;return r}},A(qt,"normalAttrs",["name","locked","inject","state","lifeCycles","methods","computed","watch","css","props","emits","slots","dataSources","__TEMPLATE_ID__"]),qt);const it="EVENT_PROJECT_CHANGE",fi="EVENT_PROJECT_ACTIVED",hi="EVENT_PROJECT_DEPS_CHANGE",Je="EVENT_PROJECT_PAGES_CHANGE",Ee="EVENT_PROJECT_BLOCKS_CHANGE",pi="EVENT_PROJECT_APIS_CHANGE",di="EVENT_PROJECT_META_CHANGE",Wc="EVENT_PROJECT_PUBLISH",Yc="EVENT_PROJECT_FILE_PUBLISH",Gc="EVENT_PROJECT_GEN_SOURCE",Xe=class Xe{constructor(t){A(this,"id","");A(this,"platform","web");A(this,"name","");A(this,"description","");A(this,"homepage","");A(this,"dependencies",[]);A(this,"pages",[]);A(this,"blocks",[]);A(this,"apis",[]);A(this,"meta",[]);A(this,"currentFile",null);A(this,"config",{});A(this,"uniConfig",{});A(this,"__BASE_PATH__","/");const{id:r}=t;this.id=r||gt(),this.update(t,!0)}update(t,r=!1){for(const n of Xe.attrs){const i=t[n];i&&(this[n]=i)}r||I.emit(it,{model:this,type:"update",data:t})}isPageFile(t){return t.type==="page"}cleanPagesDsl(t){for(const r of t)delete r.dsl,r.children&&r.children.length&&this.cleanPagesDsl(r.children)}toDsl(t){const{id:r}=this,n=Xe.attrs.reduce((i,s)=>(i[s]=this[s],i),{});return n.pages&&(n.pages=n.pages.map(i=>nr(st(z({},i),{dsl:void 0}))),this.cleanPagesDsl(n.pages)),n.blocks&&(n.blocks=n.blocks.map(i=>nr(st(z({},i),{dsl:void 0})))),z({__VTJ_PROJECT__:!0,id:r},n)}active(t,r=!1){this.currentFile=t,r||I.emit(fi,{model:this,type:"update",data:t})}deactivate(t=!1){this.currentFile=null,t||I.emit(fi,{model:this,type:"update",data:null})}setDeps(t,r=!1){const n=this.dependencies,i=n.findIndex(o=>o.package===t.package);let s;if(i>-1?(s="update",n.splice(i,1,z(z({},n[i]),t))):(s="create",n.push(t)),!r){const o={model:this,type:s,data:t};I.emit(hi,o),I.emit(it,o)}}removeDeps(t,r=!1){const n=this.dependencies,i=n.findIndex(s=>s.package===t.package);if(i>-1&&n.splice(i,1),!r){const s={model:this,type:"delete",data:t};I.emit(hi,s),I.emit(it,s)}}getPage(t){const r=(n,i=[])=>{for(const s of i){if(s.id===n)return s;if(s.children&&s.children.length){const o=r(n,s.children);if(o)return o}}};return r(t,this.pages)}getPages(){const t=(r=[])=>{let n=[];for(const i of r)i.dir?i.children&&i.children.length&&(n=n.concat(t(i.children))):n.push(i);return n};return t(this.pages)}createPage(t,r,n=!1){return L(this,null,function*(){if(t.id=t.raw?t.name:t.id||gt(),t.type="page",t.dir?t.children=[]:t.dsl=t.dsl||new re({id:t.id,name:si(t.name)}).toDsl(),r){const i=this.getPage(r);i?i.children?i.children.push(t):i.children=[t]:console.warn(`not found PageFile for id: ${r} `)}else this.pages.push(t);if(!n){const i={model:this,type:"create",data:t};I.emit(Je,i),I.emit(it,i)}!this.currentFile&&!t.dir&&(yield xe(1e3),this.active(t,n))})}updatePage(t,r=!1){const n=this.getPage(t.id);if(n?Object.assign(n,t):console.warn(`not found PageFile for id: ${t.id} `),!r){const i={model:this,type:"update",data:t};I.emit(Je,i),I.emit(it,i)}}clonePage(t,r,n=!1){var f;const i=gt(),s=`${t.name}Copy`,o=`${t.title}_副本`,a=new re({id:i,name:s}).toDsl(),u=Dt({},t,{id:i,name:s,title:o,dsl:a}),c=r?((f=this.getPage(r))==null?void 0:f.children)||[]:this.pages,l=c.findIndex(h=>h.id===t.id);if(c.splice(l+1,0,u),!n){const h={model:this,type:"clone",data:{source:t,target:u}};I.emit(Je,h),I.emit(it,h)}}saveToBlock(t,r=!1){return L(this,null,function*(){this.active(t,r),yield xe(1e3);const n=gt(),i=t.name,s=t.title,o=new re({id:n,name:i}).toDsl(),a=Dt({},t,{id:n,name:i,title:s,dsl:o,type:"block",fromType:"Schema"});if(this.blocks.push(a),!r){const u={model:this,type:"create",data:a};I.emit(Ee,u),I.emit(it,u)}})}removePage(t,r=!1){var s;const n=this.getPage(t),i=(o,a)=>{const u=a.findIndex(c=>c.id===o);if(u>=0){a.splice(u,1);return}for(const c of a)c.children&&c.children.length&&i(o,c.children)};if(i(t,this.pages),t===this.homepage&&(this.homepage=""),((s=this.currentFile)==null?void 0:s.id)===t&&this.deactivate(r),!r){const o={model:this,type:"delete",data:n};I.emit(Je,o),I.emit(it,o)}}getBlock(t){return this.blocks.find(r=>r.id===t)}createBlock(t,r=!1){return L(this,null,function*(){const n=t.id||gt(),i=si(t.name);t.id=n,t.type="block",t.dsl=new re({id:n,name:i}).toDsl(),this.blocks.push(t);const s=t.fromType||"Schema";if(!r){const o={model:this,type:"create",data:t};I.emit(Ee,o),I.emit(it,o)}!this.currentFile&&s==="Schema"&&(yield xe(1e3),this.active(t,r))})}updateBlock(t,r=!1){const n=this.getBlock(t.id);if(n?(Object.assign(n,t),n.dsl&&(n.dsl.name=t.name)):console.warn(`not found PageFile for id: ${t.id} `),!r){const i={model:this,type:"update",data:t};I.emit(Ee,i),I.emit(it,i)}}cloneBlock(t,r=!1){const n=gt(),i=`${t.name}Copy`,s=`${t.title}_副本`,o=new re({id:n,name:i}).toDsl(),a=Dt({},t,{id:n,name:i,title:s,dsl:o}),u=this.blocks.findIndex(c=>c.id===t.id);if(this.blocks.splice(u+1,0,a),!r){const c={model:this,type:"clone",data:{source:t,target:a}};I.emit(Ee,c),I.emit(it,c)}}removeBlock(t,r=!1){var o;const n=this.getBlock(t),i=this.blocks,s=i.findIndex(a=>a.id===t);if(s>-1?(i.splice(s,1),((o=this.currentFile)==null?void 0:o.id)===t&&this.deactivate(r)):console.warn(`not found PageFile for id: ${t} `),!r){const a={model:this,type:"delete",data:n};I.emit(Ee,a),I.emit(it,a)}}existBlockName(t,r=[]){return this.blocks.some(n=>n.name===t&&!r.includes(n.id))}existPageName(t,r=[]){return this.getPages().some(n=>n.name===t&&!r.includes(n.id))}setApi(t,r=!1){const n=this.apis.find(s=>s.name===t.name||s.id===t.id);let i;if(n?(i="update",Object.assign(n,t)):(i="create",t.id=gt(),this.apis.push(t)),!r){const s={model:this,type:i,data:t};I.emit(pi,s),I.emit(it,s)}}removeApi(t,r=!1){const n=this.apis.findIndex(i=>i.name===t||i.id===t);if(n>-1?this.apis.splice(n,1):console.warn(`not found Api for name: ${t} `),!r){const i={model:this,type:"delete",data:t};I.emit(pi,i),I.emit(it,i)}}existApiName(t,r=[]){return this.apis.some(n=>n.name===t&&!r.includes(n.id))}setMeta(t,r=!1){const n=this.meta.find(s=>s.code===t.code||s.id===t.id);let i;if(n?(i="update",Object.assign(n,t)):(i="create",t.id=gt(),this.meta.push(t)),!r){const s={model:this,type:i,data:t};I.emit(di,s),I.emit(it,s)}}removeMeta(t,r=!1){const n=this.meta.findIndex(i=>i.code===t||i.id===t);if(n>-1?this.meta.splice(n,1):console.warn(`not found meta for name: ${name} `),!r){const i={model:this,type:"delete",data:t};I.emit(di,i),I.emit(it,i)}}existMetaCode(t,r=[]){return this.meta.some(n=>n.code===t&&!r.includes(n.id))}setHomepage(t,r=!1){if(this.homepage=t,!r){const n={model:this,type:"update",data:t};I.emit(it,n)}}setConfig(t,r=!1){if(this.config=Object.assign(this.config,t),!r){const n={model:this,type:"update",data:t};I.emit(it,n)}}setUniConfig(t,r,n=!1){if(this.uniConfig=Object.assign(this.uniConfig,{[t]:r}),!n){const i={model:this,type:"update",data:this.uniConfig};I.emit(it,i)}}publish(t){const r={model:this,type:"publish",data:t||this};t?I.emit(Yc,r):I.emit(Wc,r)}genSource(){const t={model:this,type:"gen",data:null};I.emit(Gc,t)}};A(Xe,"attrs",["platform","name","homepage","description","dependencies","pages","blocks","apis","meta","config","uniConfig","__BASE_PATH__"]);let ue=Xe;const We="EVENT_HISTORY_CHANGE",kr="EVENT_HISTORY_LOAD";let Xi=class{constructor(t,r={}){A(this,"options",{max:50});A(this,"index",-1);A(this,"id");A(this,"items");Object.assign(this.options,r);const{id:n,items:i=[]}=t;this.id=n,this.items=i}toDsl(){const{id:t,items:r}=this;return{id:t,items:r.map(n=>({id:n.id,label:n.label}))}}get(t){return this.items.find(r=>r.id===t)}add(t,r=!1){const{max:n}=this.options,i={id:gt(),label:new Date().toLocaleString(),dsl:nr(t)};if(this.items.unshift(i),this.items.length>n){const s=this.items.splice(n);r||I.emit(We,{model:this,type:"delete",data:s.map(o=>o.id)})}this.index=-1,r||I.emit(We,{model:this,type:"create",data:i})}remove(t,r=!1){const n=this.items.findIndex(i=>i.id===t);n>-1?(this.items.splice(n,1),n===this.index?this.index=-1:this.index>=this.items.length&&(this.index=this.items.length-1)):console.warn(`not found HistoryItem for id: ${t} `),r||I.emit(We,{model:this,type:"delete",data:[t]})}forward(t=!1){const{index:r,items:n}=this;if(r<0)return;--this.index;const i=n[this.index];i&&!t&&I.emit(kr,{model:this,type:"load",data:i})}backward(t=!1){const{index:r,items:n}=this;if(r>=n.length-1)return;r<0&&(this.index=0),++this.index;const i=n[this.index];i&&!t&&I.emit(kr,{model:this,type:"load",data:i})}load(t,r=!1){const n=this.items.findIndex(i=>i.id===t);n>=0&&(this.index=n,r||I.emit(kr,{model:this,type:"load",data:this.items[n]}))}clear(t=!1){this.index=-1;const r=this.items.map(n=>n.id);this.items=[],t||I.emit(We,{model:this,type:"clear",data:r})}};const I=Lc();function s1(e){return e instanceof re}function o1(e){return e instanceof Jr}function a1(e){return!!e.__VTJ_BLOCK__}function ts(e){const t=nr(e);return delete t.id,Array.isArray(t.children)&&(t.children=t.children.map(r=>ts(r))),t}function c1(e){const t=e.fromType||"Schema";return t==="Schema"?{type:"Schema",id:e.id}:t==="UrlSchema"?{type:"UrlSchema",url:(e.urls||"").split(",")[0]||""}:t==="Plugin"?{type:"Plugin",urls:(e.urls||"").split(","),library:e.library}:""}const p2=Object.freeze(Object.defineProperty({__proto__:null,BUILT_IN_COMPONENTS:Hc,BUILT_IN_LIBRARAY_MAP:r1,BUILT_IN_MATERIALS:e1,BUILT_IN_NAME:t1,BUILT_IN_TAGS:n1,BUILT_IN_VUE:Zi,BUILT_IN_VUE_ROUTER:Qi,Base:zc,BlockModel:re,DirectiveModel:Ke,EVENT_BLOCK_CHANGE:G,EVENT_HISTORY_CHANGE:We,EVENT_HISTORY_LOAD:kr,EVENT_NODE_CHANGE:nt,EVENT_PROJECT_ACTIVED:fi,EVENT_PROJECT_APIS_CHANGE:pi,EVENT_PROJECT_BLOCKS_CHANGE:Ee,EVENT_PROJECT_CHANGE:it,EVENT_PROJECT_DEPS_CHANGE:hi,EVENT_PROJECT_FILE_PUBLISH:Yc,EVENT_PROJECT_GEN_SOURCE:Gc,EVENT_PROJECT_META_CHANGE:di,EVENT_PROJECT_PAGES_CHANGE:Je,EVENT_PROJECT_PUBLISH:Wc,EventModel:Pr,HistoryModel:Xi,NodeModel:Jr,ProjectModel:ue,PropModel:Cr,Service:i1,VTJ_CORE_VERSION:X0,cloneDsl:ts,createNodeFrom:c1,emitter:I,isBlock:s1,isBlockSchema:a1,isNode:o1},Symbol.toStringTag,{value:"Module"}));var u1=Object.defineProperty,l1=(e,t,r)=>t in e?u1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,xt=(e,t,r)=>l1(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)}})();/**!
57
57
  * Copyright (c) 2025, VTJ.PRO All rights reserved.
58
58
  * @name @vtj/utils
59
59
  * @author CHC chenhuachun1549@dingtalk.com
60
- * @version 0.10.9
60
+ * @version 0.10.10
61
61
  * @license <a href="https://vtj.pro/license.html">MIT License</a>
62
- */const f1="0.10.9";/**
62
+ */const f1="0.10.10";/**
63
63
  * @vue/shared v3.5.13
64
64
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
65
65
  * @license MIT
@@ -67,14 +67,14 @@ version: 2.9.0
67
67
  `).forEach(function(s){i=s.indexOf(":"),r=s.substring(0,i).trim().toLowerCase(),n=s.substring(i+1).trim(),!(!r||t[r]&&Vb[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},Lo=Symbol("internals");function ze(e){return e&&String(e).trim().toLowerCase()}function Mr(e){return e===!1||e==null?e:$.isArray(e)?e.map(Mr):String(e)}function Hb(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 zb=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Un(e,t,r,n,i){if($.isFunction(n))return n.call(this,t,r);if(i&&(t=r),!!$.isString(t)){if($.isString(n))return t.indexOf(n)!==-1;if($.isRegExp(n))return n.test(t)}}function qb(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function Kb(e,t){const r=$.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 yt=class{constructor(t){t&&this.set(t)}set(t,r,n){const i=this;function s(a,u,c){const l=ze(u);if(!l)throw new Error("header name must be a non-empty string");const f=$.findKey(i,l);(!f||i[f]===void 0||c===!0||c===void 0&&i[f]!==!1)&&(i[f||u]=Mr(a))}const o=(a,u)=>$.forEach(a,(c,l)=>s(c,l,u));if($.isPlainObject(t)||t instanceof this.constructor)o(t,r);else if($.isString(t)&&(t=t.trim())&&!zb(t))o(Ub(t),r);else if($.isHeaders(t))for(const[a,u]of t.entries())s(u,a,n);else t!=null&&s(r,t,n);return this}get(t,r){if(t=ze(t),t){const n=$.findKey(this,t);if(n){const i=this[n];if(!r)return i;if(r===!0)return Hb(i);if($.isFunction(r))return r.call(this,i,n);if($.isRegExp(r))return r.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=ze(t),t){const n=$.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||Un(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let i=!1;function s(o){if(o=ze(o),o){const a=$.findKey(n,o);a&&(!r||Un(n,n[a],a,r))&&(delete n[a],i=!0)}}return $.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||Un(this,this[s],s,t,!0))&&(delete this[s],i=!0)}return i}normalize(t){const r=this,n={};return $.forEach(this,(i,s)=>{const o=$.findKey(n,s);if(o){r[o]=Mr(i),delete r[s];return}const a=t?qb(s):String(s).trim();a!==s&&delete r[s],r[a]=Mr(i),n[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return $.forEach(this,(n,i)=>{n!=null&&n!==!1&&(r[i]=t&&$.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(`
68
68
  `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(i=>n.set(i)),n}static accessor(t){const r=(this[Lo]=this[Lo]={accessors:{}}).accessors,n=this.prototype;function i(s){const o=ze(s);r[o]||(Kb(n,s),r[o]=!0)}return $.isArray(t)?t.forEach(i):i(t),this}};yt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);$.reduceDescriptors(yt.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});$.freezeMethods(yt);function Hn(e,t){const r=this||dr,n=t||r,i=yt.from(n.headers);let s=n.data;return $.forEach(e,function(o){s=o.call(r,s,i.normalize(),t?t.status:void 0)}),i.normalize(),s}function Su(e){return!!(e&&e.__CANCEL__)}function Me(e,t,r){J.call(this,e!=null?e:"canceled",J.ERR_CANCELED,t,r),this.name="CanceledError"}$.inherits(Me,J,{__CANCEL__:!0});function xu(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new J("Request failed with status code "+r.status,[J.ERR_BAD_REQUEST,J.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function Jb(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Wb(e,t){e=e||10;const r=new Array(e),n=new Array(e);let i=0,s=0,o;return t=t!==void 0?t:1e3,function(a){const u=Date.now(),c=n[s];o||(o=u),r[i]=a,n[i]=u;let l=s,f=0;for(;l!==i;)f+=r[l++],l=l%e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),u-o<t)return;const h=c&&u-c;return h?Math.round(f*1e3/h):void 0}}function Yb(e,t){let r=0,n=1e3/t,i,s;const o=(a,u=Date.now())=>{r=u,i=null,s&&(clearTimeout(s),s=null),e.apply(null,a)};return[(...a)=>{const u=Date.now(),c=u-r;c>=n?o(a,u):(i=a,s||(s=setTimeout(()=>{s=null,o(i)},n-c)))},()=>i&&o(i)]}const Yr=(e,t,r=3)=>{let n=0;const i=Wb(50,250);return Yb(s=>{const o=s.loaded,a=s.lengthComputable?s.total:void 0,u=o-n,c=i(u),l=o<=a;n=o;const f={loaded:o,total:a,progress:a?o/a:void 0,bytes:u,rate:c||void 0,estimated:c&&a&&l?(a-o)/c:void 0,event:s,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(f)},r)},Vo=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},Uo=e=>(...t)=>$.asap(()=>e(...t)),Gb=ot.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,ot.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(ot.origin),ot.navigator&&/(msie|trident)/i.test(ot.navigator.userAgent)):()=>!0,Zb=ot.hasStandardBrowserEnv?{write(e,t,r,n,i,s){const o=[e+"="+encodeURIComponent(t)];$.isNumber(r)&&o.push("expires="+new Date(r).toGMTString()),$.isString(n)&&o.push("path="+n),$.isString(i)&&o.push("domain="+i),s===!0&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Qb(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Xb(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Tu(e,t,r){let n=!Qb(t);return e&&n||r==!1?Xb(e,t):t}const Ho=e=>e instanceof yt?z({},e):e;function le(e,t){t=t||{};const r={};function n(c,l,f,h){return $.isPlainObject(c)&&$.isPlainObject(l)?$.merge.call({caseless:h},c,l):$.isPlainObject(l)?$.merge({},l):$.isArray(l)?l.slice():l}function i(c,l,f,h){if($.isUndefined(l)){if(!$.isUndefined(c))return n(void 0,c,f,h)}else return n(c,l,f,h)}function s(c,l){if(!$.isUndefined(l))return n(void 0,l)}function o(c,l){if($.isUndefined(l)){if(!$.isUndefined(c))return n(void 0,c)}else return n(void 0,l)}function a(c,l,f){if(f in t)return n(c,l);if(f in e)return n(void 0,c)}const u={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(c,l,f)=>i(Ho(c),Ho(l),f,!0)};return $.forEach(Object.keys(Object.assign({},e,t)),function(c){const l=u[c]||i,f=l(e[c],t[c],c);$.isUndefined(f)&&l!==a||(r[c]=f)}),r}const $u=e=>{const t=le({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:s,headers:o,auth:a}=t;t.headers=o=yt.from(o),t.url=_u(Tu(t.baseURL,t.url),e.params,e.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let u;if($.isFormData(r)){if(ot.hasStandardBrowserEnv||ot.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((u=o.getContentType())!==!1){const[c,...l]=u?u.split(";").map(f=>f.trim()).filter(Boolean):[];o.setContentType([c||"multipart/form-data",...l].join("; "))}}if(ot.hasStandardBrowserEnv&&(n&&$.isFunction(n)&&(n=n(t)),n||n!==!1&&Gb(t.url))){const c=i&&s&&Zb.read(s);c&&o.set(i,c)}return t},t_=typeof XMLHttpRequest<"u",e_=t_&&function(e){return new Promise(function(t,r){const n=$u(e);let i=n.data;const s=yt.from(n.headers).normalize();let{responseType:o,onUploadProgress:a,onDownloadProgress:u}=n,c,l,f,h,p;function d(){h&&h(),p&&p(),n.cancelToken&&n.cancelToken.unsubscribe(c),n.signal&&n.signal.removeEventListener("abort",c)}let m=new XMLHttpRequest;m.open(n.method.toUpperCase(),n.url,!0),m.timeout=n.timeout;function b(){if(!m)return;const g=yt.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),y={data:!o||o==="text"||o==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:g,config:e,request:m};xu(function(_){t(_),d()},function(_){r(_),d()},y),m=null}"onloadend"in m?m.onloadend=b:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.indexOf("file:")===0)||setTimeout(b)},m.onabort=function(){m&&(r(new J("Request aborted",J.ECONNABORTED,e,m)),m=null)},m.onerror=function(){r(new J("Network Error",J.ERR_NETWORK,e,m)),m=null},m.ontimeout=function(){let g=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const y=n.transitional||wu;n.timeoutErrorMessage&&(g=n.timeoutErrorMessage),r(new J(g,y.clarifyTimeoutError?J.ETIMEDOUT:J.ECONNABORTED,e,m)),m=null},i===void 0&&s.setContentType(null),"setRequestHeader"in m&&$.forEach(s.toJSON(),function(g,y){m.setRequestHeader(y,g)}),$.isUndefined(n.withCredentials)||(m.withCredentials=!!n.withCredentials),o&&o!=="json"&&(m.responseType=n.responseType),u&&([f,p]=Yr(u,!0),m.addEventListener("progress",f)),a&&m.upload&&([l,h]=Yr(a),m.upload.addEventListener("progress",l),m.upload.addEventListener("loadend",h)),(n.cancelToken||n.signal)&&(c=g=>{m&&(r(!g||g.type?new Me(null,e,m):g),m.abort(),m=null)},n.cancelToken&&n.cancelToken.subscribe(c),n.signal&&(n.signal.aborted?c():n.signal.addEventListener("abort",c)));const E=Jb(n.url);if(E&&ot.protocols.indexOf(E)===-1){r(new J("Unsupported protocol "+E+":",J.ERR_BAD_REQUEST,e));return}m.send(i||null)})},r_=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let n=new AbortController,i;const s=function(c){if(!i){i=!0,a();const l=c instanceof Error?c:this.reason;n.abort(l instanceof J?l:new Me(l instanceof Error?l.message:l))}};let o=t&&setTimeout(()=>{o=null,s(new J(`timeout ${t} of ms exceeded`,J.ETIMEDOUT))},t);const a=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(s):c.removeEventListener("abort",s)}),e=null)};e.forEach(c=>c.addEventListener("abort",s));const{signal:u}=n;return u.unsubscribe=()=>$.asap(a),u}},n_=function*(e,t){let r=e.byteLength;if(r<t){yield e;return}let n=0,i;for(;n<r;)i=n+t,yield e.slice(n,i),n=i},i_=function(e,t){return $n(this,null,function*(){try{for(var r=xs(s_(e)),n,i,s;n=!(i=yield new Gt(r.next())).done;n=!1){const o=i.value;yield*On(n_(o,t))}}catch(i){s=[i]}finally{try{n&&(i=r.return)&&(yield new Gt(i.call(r)))}finally{if(s)throw s[0]}}})},s_=function(e){return $n(this,null,function*(){if(e[Symbol.asyncIterator]){yield*On(e);return}const t=e.getReader();try{for(;;){const{done:r,value:n}=yield new Gt(t.read());if(r)break;yield n}}finally{yield new Gt(t.cancel())}})},zo=(e,t,r,n)=>{const i=i_(e,t);let s=0,o,a=c=>{o||(o=!0,n&&n(c))};return new ReadableStream({pull(c){return L(this,null,function*(){try{const{done:l,value:f}=yield i.next();if(l){a(),c.close();return}let h=f.byteLength;if(r){let p=s+=h;r(p)}c.enqueue(new Uint8Array(f))}catch(l){throw a(l),l}})},cancel(c){return a(c),i.return()}},{highWaterMark:2})},yn=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Ou=yn&&typeof ReadableStream=="function",o_=yn&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):e=>L(void 0,null,function*(){return new Uint8Array(yield new Response(e).arrayBuffer())})),Au=(e,...t)=>{try{return!!e(...t)}catch(r){return!1}},a_=Ou&&Au(()=>{let e=!1;const t=new Request(ot.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),qo=64*1024,Ei=Ou&&Au(()=>$.isReadableStream(new Response("").body)),Gr={stream:Ei&&(e=>e.body)};yn&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Gr[t]&&(Gr[t]=$.isFunction(e[t])?r=>r[t]():(r,n)=>{throw new J(`Response type '${t}' is not supported`,J.ERR_NOT_SUPPORT,n)})})})(new Response);const c_=e=>L(void 0,null,function*(){if(e==null)return 0;if($.isBlob(e))return e.size;if($.isSpecCompliantForm(e))return(yield new Request(ot.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if($.isArrayBufferView(e)||$.isArrayBuffer(e))return e.byteLength;if($.isURLSearchParams(e)&&(e=e+""),$.isString(e))return(yield o_(e)).byteLength}),u_=(e,t)=>L(void 0,null,function*(){const r=$.toFiniteNumber(e.getContentLength());return r!=null?r:c_(t)}),l_=yn&&(e=>L(void 0,null,function*(){let{url:t,method:r,data:n,signal:i,cancelToken:s,timeout:o,onDownloadProgress:a,onUploadProgress:u,responseType:c,headers:l,withCredentials:f="same-origin",fetchOptions:h}=$u(e);c=c?(c+"").toLowerCase():"text";let p=r_([i,s&&s.toAbortSignal()],o),d;const m=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let b;try{if(u&&a_&&r!=="get"&&r!=="head"&&(b=yield u_(l,n))!==0){let S=new Request(t,{method:"POST",body:n,duplex:"half"}),v;if($.isFormData(n)&&(v=S.headers.get("content-type"))&&l.setContentType(v),S.body){const[x,O]=Vo(b,Yr(Uo(u)));n=zo(S.body,qo,x,O)}}$.isString(f)||(f=f?"include":"omit");const E="credentials"in Request.prototype;d=new Request(t,st(z({},h),{signal:p,method:r.toUpperCase(),headers:l.normalize().toJSON(),body:n,duplex:"half",credentials:E?f:void 0}));let g=yield fetch(d);const y=Ei&&(c==="stream"||c==="response");if(Ei&&(a||y&&m)){const S={};["status","statusText","headers"].forEach(V=>{S[V]=g[V]});const v=$.toFiniteNumber(g.headers.get("content-length")),[x,O]=a&&Vo(v,Yr(Uo(a),!0))||[];g=new Response(zo(g.body,qo,x,()=>{O&&O(),m&&m()}),S)}c=c||"text";let _=yield Gr[$.findKey(Gr,c)||"text"](g,e);return!y&&m&&m(),yield new Promise((S,v)=>{xu(S,v,{data:_,headers:yt.from(g.headers),status:g.status,statusText:g.statusText,config:e,request:d})})}catch(E){throw m&&m(),E&&E.name==="TypeError"&&/fetch/i.test(E.message)?Object.assign(new J("Network Error",J.ERR_NETWORK,e,d),{cause:E.cause||E}):J.from(E,E&&E.code,e,d)}})),Si={http:Tb,xhr:e_,fetch:l_};$.forEach(Si,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(r){}Object.defineProperty(e,"adapterName",{value:t})}});const Ko=e=>`- ${e}`,f_=e=>$.isFunction(e)||e===null||e===!1,ju={getAdapter:e=>{e=$.isArray(e)?e:[e];const{length:t}=e;let r,n;const i={};for(let s=0;s<t;s++){r=e[s];let o;if(n=r,!f_(r)&&(n=Si[(o=String(r)).toLowerCase()],n===void 0))throw new J(`Unknown adapter '${o}'`);if(n)break;i[o||"#"+s]=n}if(!n){const s=Object.entries(i).map(([a,u])=>`adapter ${a} `+(u===!1?"is not supported by the environment":"is not available in the build"));let o=t?s.length>1?`since :
69
69
  `+s.map(Ko).join(`
70
- `):" "+Ko(s[0]):"as no adapter specified";throw new J("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return n},adapters:Si};function zn(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Me(null,e)}function Jo(e){return zn(e),e.headers=yt.from(e.headers),e.data=Hn.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),ju.getAdapter(e.adapter||dr.adapter)(e).then(function(t){return zn(e),t.data=Hn.call(e,e.transformResponse,t),t.headers=yt.from(t.headers),t},function(t){return Su(t)||(zn(e),t&&t.response&&(t.response.data=Hn.call(e,e.transformResponse,t.response),t.response.headers=yt.from(t.response.headers))),Promise.reject(t)})}const Ru="1.8.1",bn={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{bn[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Wo={};bn.transitional=function(e,t,r){function n(i,s){return"[Axios v"+Ru+"] Transitional option '"+i+"'"+s+(r?". "+r:"")}return(i,s,o)=>{if(e===!1)throw new J(n(s," has been removed"+(t?" in "+t:"")),J.ERR_DEPRECATED);return t&&!Wo[s]&&(Wo[s]=!0,console.warn(n(s," has been deprecated since v"+t+" and will be removed in the near future"))),e?e(i,s,o):!0}};bn.spelling=function(e){return(t,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};function h_(e,t,r){if(typeof e!="object")throw new J("options must be an object",J.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let i=n.length;for(;i-- >0;){const s=n[i],o=t[s];if(o){const a=e[s],u=a===void 0||o(a,s,e);if(u!==!0)throw new J("option "+s+" must be "+u,J.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new J("Unknown option "+s,J.ERR_BAD_OPTION)}}const Ir={assertOptions:h_,validators:bn},Rt=Ir.validators;let se=class{constructor(e){this.defaults=e,this.interceptors={request:new Fo,response:new Fo}}request(e,t){return L(this,null,function*(){try{return yield this._request(e,t)}catch(r){if(r instanceof Error){let n={};Error.captureStackTrace?Error.captureStackTrace(n):n=new Error;const i=n.stack?n.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=`
70
+ `):" "+Ko(s[0]):"as no adapter specified";throw new J("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return n},adapters:Si};function zn(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Me(null,e)}function Jo(e){return zn(e),e.headers=yt.from(e.headers),e.data=Hn.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),ju.getAdapter(e.adapter||dr.adapter)(e).then(function(t){return zn(e),t.data=Hn.call(e,e.transformResponse,t),t.headers=yt.from(t.headers),t},function(t){return Su(t)||(zn(e),t&&t.response&&(t.response.data=Hn.call(e,e.transformResponse,t.response),t.response.headers=yt.from(t.response.headers))),Promise.reject(t)})}const Ru="1.8.2",bn={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{bn[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Wo={};bn.transitional=function(e,t,r){function n(i,s){return"[Axios v"+Ru+"] Transitional option '"+i+"'"+s+(r?". "+r:"")}return(i,s,o)=>{if(e===!1)throw new J(n(s," has been removed"+(t?" in "+t:"")),J.ERR_DEPRECATED);return t&&!Wo[s]&&(Wo[s]=!0,console.warn(n(s," has been deprecated since v"+t+" and will be removed in the near future"))),e?e(i,s,o):!0}};bn.spelling=function(e){return(t,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};function h_(e,t,r){if(typeof e!="object")throw new J("options must be an object",J.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let i=n.length;for(;i-- >0;){const s=n[i],o=t[s];if(o){const a=e[s],u=a===void 0||o(a,s,e);if(u!==!0)throw new J("option "+s+" must be "+u,J.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new J("Unknown option "+s,J.ERR_BAD_OPTION)}}const Ir={assertOptions:h_,validators:bn},Rt=Ir.validators;let se=class{constructor(e){this.defaults=e,this.interceptors={request:new Fo,response:new Fo}}request(e,t){return L(this,null,function*(){try{return yield this._request(e,t)}catch(r){if(r instanceof Error){let n={};Error.captureStackTrace?Error.captureStackTrace(n):n=new Error;const i=n.stack?n.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=`
71
71
  `+i):r.stack=i}catch(s){}}throw r}})}_request(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=le(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:i}=t;r!==void 0&&Ir.assertOptions(r,{silentJSONParsing:Rt.transitional(Rt.boolean),forcedJSONParsing:Rt.transitional(Rt.boolean),clarifyTimeoutError:Rt.transitional(Rt.boolean)},!1),n!=null&&($.isFunction(n)?t.paramsSerializer={serialize:n}:Ir.assertOptions(n,{encode:Rt.function,serialize:Rt.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Ir.assertOptions(t,{baseUrl:Rt.spelling("baseURL"),withXsrfToken:Rt.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let s=i&&$.merge(i.common,i[t.method]);i&&$.forEach(["delete","get","head","post","put","patch","common"],p=>{delete i[p]}),t.headers=yt.concat(s,i);const o=[];let a=!0;this.interceptors.request.forEach(function(p){typeof p.runWhen=="function"&&p.runWhen(t)===!1||(a=a&&p.synchronous,o.unshift(p.fulfilled,p.rejected))});const u=[];this.interceptors.response.forEach(function(p){u.push(p.fulfilled,p.rejected)});let c,l=0,f;if(!a){const p=[Jo.bind(this),void 0];for(p.unshift.apply(p,o),p.push.apply(p,u),f=p.length,c=Promise.resolve(t);l<f;)c=c.then(p[l++],p[l++]);return c}f=o.length;let h=t;for(l=0;l<f;){const p=o[l++],d=o[l++];try{h=p(h)}catch(m){d.call(this,m);break}}try{c=Jo.call(this,h)}catch(p){return Promise.reject(p)}for(l=0,f=u.length;l<f;)c=c.then(u[l++],u[l++]);return c}getUri(e){e=le(this.defaults,e);const t=Tu(e.baseURL,e.url,e.allowAbsoluteUrls);return _u(t,e.params,e.paramsSerializer)}};$.forEach(["delete","get","head","options"],function(e){se.prototype[e]=function(t,r){return this.request(le(r||{},{method:e,url:t,data:(r||{}).data}))}});$.forEach(["post","put","patch"],function(e){function t(r){return function(n,i,s){return this.request(le(s||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:n,data:i}))}}se.prototype[e]=t(),se.prototype[e+"Form"]=t(!0)});let p_=class Du{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(i){r=i});const n=this;this.promise.then(i=>{if(!n._listeners)return;let s=n._listeners.length;for(;s-- >0;)n._listeners[s](i);n._listeners=null}),this.promise.then=i=>{let s;const o=new Promise(a=>{n.subscribe(a),s=a}).then(i);return o.cancel=function(){n.unsubscribe(s)},o},t(function(i,s,o){n.reason||(n.reason=new Me(i,s,o),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new Du(function(r){t=r}),cancel:t}}};function d_(e){return function(t){return e.apply(null,t)}}function m_(e){return $.isObject(e)&&e.isAxiosError===!0}const xi={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(xi).forEach(([e,t])=>{xi[t]=e});function Cu(e){const t=new se(e),r=uu(se.prototype.request,t);return $.extend(r,se.prototype,t,{allOwnKeys:!0}),$.extend(r,t,null,{allOwnKeys:!0}),r.create=function(n){return Cu(le(e,n))},r}const tt=Cu(dr);tt.Axios=se;tt.CanceledError=Me;tt.CancelToken=p_;tt.isCancel=Su;tt.VERSION=Ru;tt.toFormData=vn;tt.AxiosError=J;tt.Cancel=tt.CanceledError;tt.all=function(e){return Promise.all(e)};tt.spread=d_;tt.isAxiosError=m_;tt.mergeConfig=le;tt.AxiosHeaders=yt;tt.formToJSON=e=>Eu($.isHTMLForm(e)?new FormData(e):e);tt.getAdapter=ju.getAdapter;tt.HttpStatusCode=xi;tt.default=tt;const{Axios:y2,AxiosError:b2,CanceledError:_2,isCancel:w2,CancelToken:E2,VERSION:S2,all:x2,Cancel:T2,isAxiosError:$2,spread:O2,toFormData:A2,AxiosHeaders:j2,HttpStatusCode:R2,formToJSON:D2,getAdapter:C2,mergeConfig:P2}=tt,g_={form:"application/x-www-form-urlencoded",json:"application/json",data:"multipart/form-data"},v_=["put","post","patch"],Ti="Local-Request-Id",y_=100,b_=300;let Pu=class{constructor(t={}){xt(this,"axios"),xt(this,"settings"),xt(this,"records",{}),xt(this,"isLoading",!1),xt(this,"stopSkipWarn"),xt(this,"showLoading"),xt(this,"showError"),this.settings=Object.assign({type:"form"},t.settings||{});const r=Dr(t,["settings","query"]);this.axios=tt.create(Dt({headers:{"Content-Type":"application/x-www-form-urlencoded"},timeout:2*60*1e3},r)),this.setupSkipWarn(this.settings),this.showLoading=zi(this.openLoading.bind(this),y_),this.showError=cc(this._showError.bind(this),b_,{leading:!0,trailing:!1})}setConfig(t={}){this.settings=Dt(this.settings,t.settings||{});const r=Dr(t,["settings","query"]);this.axios.defaults=Dt(this.axios.defaults,r),this.setupSkipWarn(this.settings)}cancel(t,r="请求已取消"){if(t){const n=this.records[t];if(!n)return;n.source.cancel(r)}else for(const n of Object.values(this.records))n.source.cancel(r)}createHeaders(t,r,n){const i=r.injectHeaders?typeof r.headers=="function"?r.headers(t,n,r):r.headers||{}:{},s=z(z({"Content-Type":g_[r.type||"form"]},n.headers),i);return r.skipWarn&&(s[Ti]=t),s}isJsonType(t){return Object.entries(t).some(([r,n])=>r.toLowerCase()==="content-type"&&String(n).includes("application/json"))}toFormData(t,r="data"){if(t instanceof FormData||t instanceof URLSearchParams)return t;const n=r==="data"?new FormData:new URLSearchParams;return Object.entries(t).forEach(([i,s])=>{n.append(i,s)}),n}createSendData(t,r,n,i,s={}){const{type:o,skipWarn:a}=t,{name:u="skipWarn"}=a||{};let{data:c,params:l={},method:f="get"}=r;const h=i?{[u]:!0}:{};return v_.includes(f.toLowerCase())?(c=Object.assign(c||{},h),c=o!=="json"||!this.isJsonType(n)?this.toFormData(c,o):c,l=z({},s)):o==="form"?l=z(z(z({},c||{}),s),h):(c&&(o!=="json"||!this.isJsonType(n))&&(c=this.toFormData(c,o)),l=z(z({},s),h)),{data:c,params:l}}createUrl(t){let{url:r,params:n}=t;if(r){let i=Ji(r)?new URL(r).origin:"";const s=i?r.replace(i,""):r;try{const o=Vc(s,{encode:encodeURIComponent});return i+o(n||{})}catch(o){console.warn("createUrl","pathToRegexpCompile error",r)}}return r}openLoading(t){const{loading:r,showLoading:n}=t;r&&n&&Object.keys(this.records).length>0&&(this.isLoading=!0,n())}closeLoading(t){const{loading:r,hideLoading:n}=t;if(!r)return;this.isLoading=!1;const i=Object.keys(this.records);n&&i.length===0&&(this.isLoading=!1,n())}_showError(t,r){var s;const{failMessage:n,showError:i}=t;if(n&&i){const o=(s=r.response)==null?void 0:s.data,a=(o==null?void 0:o.message)||(o==null?void 0:o.msg)||(r==null?void 0:r.message)||(r==null?void 0:r.msg)||"未知错误";i(a,r)}}validResponse(t,r){const{validSuccess:n,validate:i}=t;return n&&i?!!i(r):!0}isSkipWarnResponse(t){return!!t.promise}send(t={},r=!1){const n=Dt({},this.settings,t.settings||{}),i=t.query||{},s=Dr(t,["settings","query"]),o=Cc(!1),a=tt.CancelToken.source();this.records[o]={settings:n,config:s,source:a};const u=this.createUrl(s),c=this.createHeaders(o,n,s),{data:l,params:f}=this.createSendData(n,s,c,r,i);return this.showLoading(n),new Promise((h,p)=>{this.axios(st(z({cancelToken:a.token},s),{url:u,headers:c,data:l,params:f})).then(d=>{var m;return this.isSkipWarnResponse(d)?h(d.promise):this.validResponse(n,d)?h(n.originResponse?d:(m=d.data)==null?void 0:m.data):(this.showError(n,d.data),p(d.data))}).catch(d=>(this.showError(n,d),p(d))).finally(()=>{delete this.records[o],this.closeLoading(n)})})}useResponse(t,r){const{response:n}=this.axios.interceptors,i=n.use(t,r);return()=>n.eject(i)}useRequest(t,r){const{request:n}=this.axios.interceptors,i=n.use(t,r);return()=>n.eject(i)}setupSkipWarn(t){if(this.stopSkipWarn&&(this.stopSkipWarn(),this.stopSkipWarn=void 0),!t.skipWarn)return;const{code:r,executor:n,callback:i,complete:s}=t.skipWarn;this.stopSkipWarn=this.useResponse(o=>{const a=(o.config.headers||{})[Ti],u=this.records[a];if(!u)return o;const{data:c}=o;if(!c||typeof c!="object")return o;if((c==null?void 0:c.code)===r){i&&i(o);const l=new Promise(n).then(()=>this.send(st(z({},u.config),{settings:u.settings}),!0));l.catch(f=>f).finally(()=>{s&&s()}),o.promise=l}return o})}};function _n(e={}){const t=new Pu(e),r=t.send.bind(t),n=t.cancel.bind(t),i=t.setConfig.bind(t),s=t.useRequest.bind(t),o=t.useResponse.bind(t);return Object.assign(r,st(z({},t),{instance:t,send:r,cancel:n,setConfig:i,useRequest:s,useResponse:o}))}const or=_n({settings:{injectHeaders:!0,loading:!0,originResponse:!0}});function ku(e){const t=typeof e=="string"?{url:e}:e;return(r,n)=>or.send(Dt({},t,n||{},{data:r}))}function __(e){const t={};for(const[r,n]of Object.entries(e))t[r]=ku(n);return t}function w_(e,t){const r=Vn(null),n=Vn(),i=Vn(!0);return e.then(s=>{r.value=t?t(s):s}).catch(s=>{n.value=s}).finally(()=>{i.value=!1}),{data:r,error:n,loading:i}}const De=typeof window<"u",E_=e=>new Promise((t,r)=>{const n=new FileReader;n.readAsDataURL(e),n.onload=()=>{t(n.result)},n.onerror=i=>{r(i)}});function Nu(e){const t={};return e?(e.forEach((r,n)=>{t[n]=typeof r=="string"?decodeURIComponent(r):r}),t):{}}function S_(e){var o;const t=e.split(","),r=(o=t[0].match(/:(.*?);/))==null?void 0:o[1],n=atob(t[1]);let i=n.length;const s=new Uint8Array(i);for(;i--;)s[i]=n.charCodeAt(i);return new Blob([s],{type:r})}function x_(e,t){const r=e;return r.lastModified=Date.now(),r.lastModifiedDate=new Date,r.name=t,r}const T_=e=>De?window.requestAnimationFrame(e):setTimeout(e,16),$_=e=>De?window.cancelAnimationFrame(e):clearTimeout(e);let cs=class{constructor(t={}){xt(this,"options",{type:"cache",expired:0,prefix:"__VTJ_"}),xt(this,"caches",{}),xt(this,"types"),this.types={local:De?window.localStorage:this.caches,session:De?window.sessionStorage:this.caches,cache:this.caches},this.config(t)}config(t={}){this.options=Object.assign(this.options,t)}save(t,r,n={}){const{type:i,expired:s,prefix:o}=z(z({},this.options),n),a=Date.now(),u=o+t,c=this.types[i]||this.caches,l={value:r,timestamp:a,expired:s};c===this.caches?c[u]=l:c.setItem(u,JSON.stringify(l))}get(t,r={}){const{type:n,prefix:i}=z(z({},this.options),r),s=i+t,o=this.types[n]||this.caches;let a;if(o===this.caches)a=o[s];else{const f=o.getItem(s);f&&(a=JSON.parse(f))}if(!a)return null;const{value:u,timestamp:c,expired:l}=a;return l>0&&c+l<Date.now()?(this.remove(t,r),null):u}remove(t,r={}){const{type:n,prefix:i}=z(z({},this.options),r),s=this.types[n]||this.caches,o=i+t;s===this.caches?delete s[o]:s.removeItem(o)}clear(t={}){const{type:r}=z(z({},this.options),t),n=this.types[r]||this.caches;n===this.caches?this.caches={}:n.clear()}};const Fr=new cs;function Bu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Lr={exports:{}},O_=Lr.exports,Yo;function A_(){return Yo||(Yo=1,function(e,t){(function(r,n){n(t,e)})(O_,function(r,n){var i={timeout:5e3,jsonpCallback:"callback"};function s(){return"jsonp_"+Date.now()+"_"+Math.ceil(Math.random()*1e5)}function o(c){try{delete window[c]}catch(l){window[c]=void 0}}function a(c){var l=document.getElementById(c);l&&document.getElementsByTagName("head")[0].removeChild(l)}function u(c){var l=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],f=c,h=l.timeout||i.timeout,p=l.jsonpCallback||i.jsonpCallback,d=void 0;return new Promise(function(m,b){var E=l.jsonpCallbackFunction||s(),g=p+"_"+E;window[E]=function(_){m({ok:!0,json:function(){return Promise.resolve(_)}}),d&&clearTimeout(d),a(g),o(E)},f+=f.indexOf("?")===-1?"?":"&";var y=document.createElement("script");y.setAttribute("src",""+f+p+"="+E),l.charset&&y.setAttribute("charset",l.charset),l.nonce&&y.setAttribute("nonce",l.nonce),l.referrerPolicy&&y.setAttribute("referrerPolicy",l.referrerPolicy),l.crossorigin&&y.setAttribute("crossorigin","true"),y.id=g,document.getElementsByTagName("head")[0].appendChild(y),d=setTimeout(function(){b(new Error("JSONP request to "+c+" timed out")),o(E),a(g),window[E]=function(){o(E)}},h),y.onerror=function(){b(new Error("JSONP request to "+c+" failed")),o(E),a(g),d&&clearTimeout(d)}})}n.exports=u})}(Lr,Lr.exports)),Lr.exports}var j_=A_();const R_=Bu(j_);function D_(e){if(De){const{protocol:t,host:r,pathname:n}=location;return`${t}//${r}${e?n:""}`}else return null}function C_(e=""){const t=e.match(Ki);return t?t[0]:""}function Mu(e){const t=[];for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push([r,encodeURIComponent(e[r])].join("="));return t.join("&")}function $i(e,t,r){const n={};e=(e||location.search).replace(/^[^]*\?/,""),t=t||"&",r=r||"=";let i;const s=new RegExp("(?:^|\\"+t+")([^\\"+r+"\\"+t+"]+)(?:\\"+r+"([^\\"+t+"]*))?","g");for(;(i=s.exec(e))!==null;)i[1]!==e&&(n[decodeURIComponent(i[1])]=decodeURIComponent(i[2]||""));return n}function Iu(e,t){t=typeof t=="string"?$i(t):t;const r=e.split("?")[0],n=$i(e),i=Object.assign({},n,t),s=Mu(i);return s?[r,s].join("?"):e}const oe=Object.freeze(Object.defineProperty({__proto__:null,append:Iu,getCurrentHost:D_,getHost:C_,parse:$i,stringify:Mu},Symbol.toStringTag,{value:"Module"}));function us(r){return L(this,arguments,function*(e,t={}){const{query:n={}}=t;e.includes("${")&&(e=ac(e)(n||{}));const i=Iu(e,n);return yield(yield R_(i,t)).json()})}var qn,Go;function P_(){if(Go)return qn;Go=1,qn=function(n,i,s){var o=document.head||document.getElementsByTagName("head")[0],a=document.createElement("script");typeof i=="function"&&(s=i,i={}),i=i||{},s=s||function(){},a.type=i.type||"text/javascript",a.charset=i.charset||"utf8",a.async="async"in i?!!i.async:!0,a.src=n,i.attrs&&e(a,i.attrs),i.text&&(a.text=""+i.text);var u="onload"in a?t:r;u(a,s),a.onload||t(a,s),o.appendChild(a)};function e(n,i){for(var s in i)n.setAttribute(s,i[s])}function t(n,i){n.onload=function(){this.onerror=this.onload=null,i(null,n)},n.onerror=function(){this.onerror=this.onload=null,i(new Error("Failed to load "+this.src),n)}}function r(n,i){n.onreadystatechange=function(){this.readyState!="complete"&&this.readyState!="loaded"||(this.onreadystatechange=null,i(null,n))}}return qn}var k_=P_();const N_=Bu(k_);function Oi(e,t={}){return new Promise((r,n)=>{const{library:i}=t;N_(e,t,(s,o)=>{s?n(s):r(i?window[i]:void 0)})})}const Zo={debug:-1,log:0,info:0,warn:1,error:2},B_=function(e,t,r,n){return function(...i){if(t&&Zo[t]<=Zo[e]&&console[e].apply&&(n==="*"||r.startsWith(n)))return console[e].apply(console,M_(i,r))}};function M_(e,t){return t!=="*"&&(typeof e[0]=="string"?e[0]=`[${t}] ${e[0]}`:e=["["+t+"]"].concat(e)),e}function I_(e,t){if(!e)return{targetLevel:t.level,targetBizName:t.bizName};if(~e.indexOf(":")){const r=e.split(":");return{targetLevel:r[0],targetBizName:r[1]}}return{targetLevel:e,targetBizName:"*"}}const F_={level:"warn",bizName:"*"};class Fu{constructor(t){xt(this,"config"),xt(this,"options"),this.options=z(z({},F_),t);const r=typeof location<"u"?location:{},n=(/__(?:logConf|logLevel)__=([^#/&]*)/.exec(r.href)||[])[1];this.config=I_(n,t)}_log(t){const{targetLevel:r,targetBizName:n}=this.config,{bizName:i}=this.options;return B_(t,r,i,n)}debug(...t){return this._log("debug")(...t)}log(...t){return this._log("log")(...t)}info(...t){return this._log("info")(...t)}warn(...t){return this._log("warn")(...t)}error(...t){return this._log("error")(...t)}}function Lu(e){return new Fu(e)}const ae=Lu({level:"log",bizName:"VTJ"});/*! js-cookie v3.0.5 | MIT */function Or(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)e[n]=r[n]}return e}var L_={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function Ai(e,t){function r(i,s,o){if(!(typeof document>"u")){o=Or({},t,o),typeof o.expires=="number"&&(o.expires=new Date(Date.now()+o.expires*864e5)),o.expires&&(o.expires=o.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var u in o)o[u]&&(a+="; "+u,o[u]!==!0&&(a+="="+o[u].split(";")[0]));return document.cookie=i+"="+e.write(s,i)+a}}function n(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var s=document.cookie?document.cookie.split("; "):[],o={},a=0;a<s.length;a++){var u=s[a].split("="),c=u.slice(1).join("=");try{var l=decodeURIComponent(u[0]);if(o[l]=e.read(c,l),i===l)break}catch(f){}}return i?o[i]:o}}return Object.create({set:r,get:n,remove:function(i,s){r(i,"",Or({},s,{expires:-1}))},withAttributes:function(i){return Ai(this.converter,Or({},this.attributes,i))},withConverter:function(i){return Ai(Or({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var ls=Ai(L_,{path:"/"});function V_(e,t,r){ls.set(e,t,r)}function U_(e){return ls.get(e)}function H_(e,t){ls.remove(e,t)}const Vr=Object.freeze(Object.defineProperty({__proto__:null,get:U_,remove:H_,set:V_},Symbol.toStringTag,{value:"Module"}));function z_(e,t=""){const r=document.createElement("a");r.download=t,r.href=e,r.target="_blank",r.click()}function fs(e,t="",r){const n=new Blob([e],{type:r}),i=document.createElement("a");i.download=t,i.style.display="none",i.href=URL.createObjectURL(n),i.click(),URL.revokeObjectURL(i.href)}function q_(e,t="",r){return L(this,null,function*(){return fetch(e,{credentials:"include"}).then(n=>L(this,null,function*(){const i=yield n.blob();return fs(i,t,r),i}))})}function K_(e,t=""){const r=JSON.stringify(e);fs(r,t,"application/json")}const B2=Object.freeze(Object.defineProperty({__proto__:null,AES:w0,LOCAL_REQUEST_ID:Ti,Logger:Fu,MD5:v0,RSA:_0,Request:Pu,Storage:cs,VTJ_UTILS_VERSION:f1,arrayToKv:M0,arrayToMap:Pc,arrayToTree:H0,avg:L0,axios:tt,base64:y0,blobToFile:x_,cAF:$_,camelCase:Nt,cloneDeep:nr,compress:Z0,cookie:Vr,createApi:ku,createApis:__,createRequest:_n,dataURLtoBlob:S_,dateFormat:D0,dayjs:Wi,debounce:zi,decompress:Q0,dedupArray:kc,delay:xe,downloadBlob:fs,downloadJson:K_,downloadRemoteFile:q_,downloadUrl:z_,fileToBase64:E_,flatChildren:Mc,formDataToJson:Nu,get:ya,getLogger:Lu,groupBy:nc,isArray:pt,isArrayBuffer:ty,isBoolean:ry,isBuffer:Ae,isCarNo:$0,isClient:De,isDate:oy,isDef:k0,isEmail:S0,isEqual:ay,isFunction:ce,isIdCardNo:x0,isMobilePhone:T0,isNaN:uy,isNull:ly,isNumber:ic,isObject:ct,isPlainObject:Vi,isString:bt,isSymbol:cr,isUndefined:fy,isUrl:Ji,jsonp:us,kebabCase:py,kvToArray:I0,loadScript:Oi,logger:ae,lowerFirst:my,mapToObject:fn,merge:Dt,mitt:Lc,noop:kf,now:N0,numberFormat:A0,numeral:Oc,omit:Dr,pathToRegexp:hn,pathToRegexpCompile:Vc,pathToRegexpMatch:Uc,pathToRegexpParse:Yi,pick:Nc,rAF:T_,rCar:Tc,rEmail:Ec,rID:Sc,rMobile:xc,rURL:Ki,random:B0,request:or,set:yy,snakeCase:_y,splitParser:V0,splitStringify:U0,storage:Fr,sum:Bc,template:ac,throttle:cc,timestamp:Dc,toArray:ui,toFixed:j0,toRawType:P0,toTypeString:Rc,trim:li,uid:gt,unAES:E0,unBase64:b0,unRSA:ci,upperFirst:cn,upperFirstCamelCase:si,url:oe,useApi:w_,uuid:Cc,zipObject:F0},Symbol.toStringTag,{value:"Module"}));/**!
72
72
  * Copyright (c) 2025, VTJ.PRO All rights reserved.
73
73
  * @name @vtj/renderer
74
74
  * @author CHC chenhuachun1549@dingtalk.com
75
- * @version 0.10.9
75
+ * @version 0.10.10
76
76
  * @license <a href="https://vtj.pro/license.html">MIT License</a>
77
- */const hs="0.10.9";var ht=(e=>(e.Runtime="Runtime",e.Design="Design",e.Raw="Raw",e.VNode="VNode",e))(ht||{});const ji=["$el","$emit","$nextTick","$parent","$root","$attrs","$slots","$watch","$props","$options","$forceUpdate"],J_=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeUnmount","unmounted","errorCaptured","renderTracked","renderTriggered","activated","deactivated"],Vu=["vIf","vShow","vModel","vFor","vBind","vHtml"],Uu={String,Number,Boolean,Array,Object,Function,Date},Oe="VtjPage",Qe="VtjHomepage",Hu="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".split(","),zu="component,slot".split(",");function Ye(e,t){return e.map(r=>Ji(r)||r.startsWith("/")?r:`${t}${r}`)}function wn(e){return/\.css$/.test(e)}function En(e){return/\.js$/.test(e)}function qu(e){return/\.json$/.test(e)}function W_(e){return e.map(t=>`<script src="${oe.append(t,{v:hs})}"><\/script>`).join("")}function Y_(e=[]){return e.map(t=>`<link rel="stylesheet" href="${oe.append(t,{v:hs})}" />`).join("")}function Ku(e,t=!1){return t&&e.endsWith(".prod.js")?e.replace(".prod.js",".js"):e}function Ju(e,t,r=!1){const n=e.filter(h=>!!h.enabled),i=[],s=[],o=[],a=[],u={},c={},l=[],f={};return n.forEach(({urls:h,assetsUrl:p,library:d,assetsLibrary:m,localeLibrary:b})=>{h==null||h.forEach(E=>{En(E)&&i.push(Ku(E,r)),wn(E)&&s.push(E)}),d&&(a.push(d),u[d]=Ye(h||[],t),b&&(c[d]=b)),p&&o.push(p),m&&l.push(m),d&&m&&(f[m]=d)}),{scripts:Ye(i,t),css:Ye(s,t),materials:Ye(o,t),libraryExports:a,materialExports:kc(l),materialMapLibrary:f,libraryMap:u,libraryLocaleMap:c}}function Wu(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 ps(e){return bt(e)?e:JSON.stringify(e)}function ds(e,t,r){const n=e.CSSStyleSheet;if(n.prototype.replaceSync){const i=new n;i.id=t,i.replaceSync(r);const s=e.document,o=s.adoptedStyleSheets,a=Array.from(o).filter(u=>u.id!==t);s.adoptedStyleSheets=[...a,i]}else{const i=e.document;let s=i.getElementById(t);s?s.innerHTML=r:(s=i.createElement("style"),s.id=t,s.innerHTML=r,i.head.appendChild(s))}}function Yu(e,t){return L(this,null,function*(){const r=yield window.fetch(t).then(n=>n.text()).catch(()=>"");r&&ds(window,e,r)})}function Gu(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 Zu(n,i){return L(this,arguments,function*(e,t,r=window){const s=r.document,o=r.document.head;let a=r[t];return a?a.default||a:new Promise((u,c)=>{for(const l of e){const f=s.createElement("script");f.src=l,f.onload=()=>{a=r[t],a?u(a.default||a):c(null)},f.onerror=h=>{c(h)},o.appendChild(f)}})})}function Qu(e){return ce(e)||ce(e==null?void 0:e.install)}function Xu(e){return zu.includes(e)}function tl(e){return Hu.includes(e)}function Ce(e=window){const t=window.Mock;if(t)return t;const r=e.Mock;if(r)return window.Mock=r,r}function Pe(e,t,r=!1,n=!1){var i;try{const s=['"use strict";',"var __self = arguments[0];"];s.push("return ");let o=(e.value||"").trim();o=o.replace(/this(\W|$)/g,(u,c)=>`__self${c}`),o=s.join(`
77
+ */const hs="0.10.10";var ht=(e=>(e.Runtime="Runtime",e.Design="Design",e.Raw="Raw",e.VNode="VNode",e))(ht||{});const ji=["$el","$emit","$nextTick","$parent","$root","$attrs","$slots","$watch","$props","$options","$forceUpdate"],J_=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeUnmount","unmounted","errorCaptured","renderTracked","renderTriggered","activated","deactivated"],Vu=["vIf","vShow","vModel","vFor","vBind","vHtml"],Uu={String,Number,Boolean,Array,Object,Function,Date},Oe="VtjPage",Qe="VtjHomepage",Hu="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".split(","),zu="component,slot".split(",");function Ye(e,t){return e.map(r=>Ji(r)||r.startsWith("/")?r:`${t}${r}`)}function wn(e){return/\.css$/.test(e)}function En(e){return/\.js$/.test(e)}function qu(e){return/\.json$/.test(e)}function W_(e){return e.map(t=>`<script src="${oe.append(t,{v:hs})}"><\/script>`).join("")}function Y_(e=[]){return e.map(t=>`<link rel="stylesheet" href="${oe.append(t,{v:hs})}" />`).join("")}function Ku(e,t=!1){return t&&e.endsWith(".prod.js")?e.replace(".prod.js",".js"):e}function Ju(e,t,r=!1){const n=e.filter(h=>!!h.enabled),i=[],s=[],o=[],a=[],u={},c={},l=[],f={};return n.forEach(({urls:h,assetsUrl:p,library:d,assetsLibrary:m,localeLibrary:b})=>{h==null||h.forEach(E=>{En(E)&&i.push(Ku(E,r)),wn(E)&&s.push(E)}),d&&(a.push(d),u[d]=Ye(h||[],t),b&&(c[d]=b)),p&&o.push(p),m&&l.push(m),d&&m&&(f[m]=d)}),{scripts:Ye(i,t),css:Ye(s,t),materials:Ye(o,t),libraryExports:a,materialExports:kc(l),materialMapLibrary:f,libraryMap:u,libraryLocaleMap:c}}function Wu(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 ps(e){return bt(e)?e:JSON.stringify(e)}function ds(e,t,r){const n=e.CSSStyleSheet;if(n.prototype.replaceSync){const i=new n;i.id=t,i.replaceSync(r);const s=e.document,o=s.adoptedStyleSheets,a=Array.from(o).filter(u=>u.id!==t);s.adoptedStyleSheets=[...a,i]}else{const i=e.document;let s=i.getElementById(t);s?s.innerHTML=r:(s=i.createElement("style"),s.id=t,s.innerHTML=r,i.head.appendChild(s))}}function Yu(e,t){return L(this,null,function*(){const r=yield window.fetch(t).then(n=>n.text()).catch(()=>"");r&&ds(window,e,r)})}function Gu(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 Zu(n,i){return L(this,arguments,function*(e,t,r=window){const s=r.document,o=r.document.head;let a=r[t];return a?a.default||a:new Promise((u,c)=>{for(const l of e){const f=s.createElement("script");f.src=l,f.onload=()=>{a=r[t],a?u(a.default||a):c(null)},f.onerror=h=>{c(h)},o.appendChild(f)}})})}function Qu(e){return ce(e)||ce(e==null?void 0:e.install)}function Xu(e){return zu.includes(e)}function tl(e){return Hu.includes(e)}function Ce(e=window){const t=window.Mock;if(t)return t;const r=e.Mock;if(r)return window.Mock=r,r}function Pe(e,t,r=!1,n=!1){var i;try{const s=['"use strict";',"var __self = arguments[0];"];s.push("return ");let o=(e.value||"").trim();o=o.replace(/this(\W|$)/g,(u,c)=>`__self${c}`),o=s.join(`
78
78
  `)+o;const a=`with(${r?"{}":"$scope || {}"}) { ${o} }`;return new Function("$scope",a)(t)}catch(s){if(ae.error("parseExpression.error",s,e,(i=t==null?void 0:t.__self)!=null?i:t),n)throw s}}function Zr(e,t,r=!1,n=!1){var s;const i=Pe(e,t,r,n);if(typeof i!="function"&&(ae.error("parseFunction.error","not a function",e,(s=t==null?void 0:t.__self)!=null?s:t),n))throw new Error(`"${e.value}" not a function`);return i}function wt(e){return e&&e.type==="JSExpression"}function Ie(e){return typeof e=="object"&&e&&e.type==="JSFunction"}function el(e){return wt(e)||Ie(e)}function G_(e){return el(e)?e.value:JSON.stringify(e)}const Z_={session:!1,authKey:"Authorization",storageKey:"ACCESS_STORAGE",storagePrefix:"__VTJ_",unauthorized:void 0,auth:"/#/login",redirectParam:"r",unauthorizedCode:401,unauthorizedMessage:"登录已经失效,请重新登录!",noPermissionMessage:"无权限访问该页面",appName:""},ms=Symbol("access");class rl{constructor(t){A(this,"options");A(this,"data",null);A(this,"mode",ht.Raw);this.options=Object.assign({},Z_,t),this.loadData()}connect(t){const{mode:r,router:n,request:i}=t;this.mode=r,n&&this.mode===ht.Raw&&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&&(Fr.save(r,t,{type:"local",prefix:n}),i&&Vr.set(s,this.data.token))}clear(){const{storageKey:t,storagePrefix:r,session:n,authKey:i}=this.options;this.data=null,Fr.remove(t,{type:"local",prefix:r}),n&&Vr.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):ui(t).every(i=>n[i]||n[r+"."+i])}some(t){const{appName:r}=this.options,{permissions:n={}}=this.data||{};return ui(t).some(i=>n[i]||n[r+"."+i])}install(t){t.config.globalProperties.$access||(t.config.globalProperties.$access=this,t.provide(ms,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=>ci(i,r));this.data=JSON.parse(n.join(""));return}if(typeof t=="string")try{const n=r?ci(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=Fr.get(t,{type:"local",prefix:r});this.setData(n||null)}isLogined(){const{session:t,authKey:r}=this.options;return t&&r?!!Vr.get(r):!!this.getToken()}hasRoutePermission(t){if(t.name===Oe){const r=t.params.id;return r&&this.can(r)}return!0}setGuard(t){t.beforeEach((r,n,i)=>this.guard(r,i))}guard(t,r){return L(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),ce(i)?(i(),r(!1)):bt(i)?r(i):r(!1)}}r(!1),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 n;const{unauthorizedCode:r=401}=this.options;return t.status===r||((n=t.data)==null?void 0:n.code)===r}showUnauthorizedAlert(t){return L(this,null,function*(){const{unauthorizedMessage:r="登录已失效"}=this.options;this.isUnauthorized(t)&&(yield this.showTip(r),this.toLogin())})}showTip(t){return L(this,null,function*(){const{alert:r}=this.options;return r?(yield xe(150),yield r(t,{title:"提示",type:"warning"}).catch(()=>!1)):!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=>L(this,null,function*(){return yield this.showUnauthorizedAlert(r),r}),r=>L(this,null,function*(){const n=r.response||r||{};return yield this.showUnauthorizedAlert(n),Promise.reject(r)}))}}function nl(){return Xo(ms,null)}function Q_(e={}){const{notify:t,loading:r,settings:n={}}=e;let i=null;return{request:_n({settings:z({type:"form",validSuccess:!0,originResponse:!1,loading:!0,validate:s=>{var o,a;return((o=s.data)==null?void 0:o.code)===0||!!((a=s.data)!=null&&a.success)},failMessage:!0,showError:s=>{t&&t(s||"未知错误")},showLoading:()=>{i&&i.close(),r&&(i=r())},hideLoading:()=>{i&&(i.close(),i=null)}},n)}),jsonp:us,notify:t,loading:r}}function il(e,t){const{jsonp:r,request:n}=t;if(e.method==="jsonp")return(i={})=>r(e.url,st(z({},e.jsonpOptions),{query:i}));{const i=e.headers?Pe(e.headers,{},!0):void 0,s={url:e.url,method:e.method,settings:st(z({},e.settings),{headers:i})};return(o,a)=>(delete s.data,n.send(Dt(s,a||{},{data:o})))}}function sl(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 ol(e=[],t=[],r){const n={};for(const i of e)n[i.id]=il(i,r);for(const i of t)n[i.id]=sl(i,r);return n}function al(){return L(this,arguments,function*(e=[],t=window){const r=Ce(t);r&&(gs(t),e.forEach(n=>ul(r,n)))})}function cl(e,t=window){const r=Ie(e.mockTemplate)&&e.mockTemplate.value?Zr(e.mockTemplate,{},!0):void 0,n=Ce(t);return(...i)=>L(this,null,function*(){let s={};if(r)try{s=yield r.apply(r,i)}catch(o){ae.warn("模拟数据模版异常",o)}return n==null?void 0:n.mock(s)})}function ul(e,t){if(!t.mock)return;const{url:r,mockTemplate:n}=t;if(r&&n){const i=hn(`${r}(.*)`),s=Uc(r,{decode:decodeURIComponent}),o=Pe(n,{},!0);e.mock(i,a=>{var f;const u=oe.parse(a.url)||{},c=a.body instanceof FormData?Nu(a.body):a.body,l=(f=s(a.url))==null?void 0:f.params;return Object.assign(a,{data:c,params:u,query:l}),e.mock(o(a))})}}function gs(e=window){const t=Ce(e);t&&(t._mocked={})}class ll{constructor(t){A(this,"__id",null);A(this,"__mode");A(this,"__instance",null);A(this,"__contextRefs",{});A(this,"__refs",{});A(this,"context",{});A(this,"state",{});A(this,"props",{});A(this,"$props",{});A(this,"$refs",{});A(this,"$el",null);A(this,"$emit",null);A(this,"$nextTick",null);A(this,"$parent",null);A(this,"$root",null);A(this,"$attrs",null);A(this,"$slots",null);A(this,"$watch",null);A(this,"$options",null);A(this,"$forceUpdate",null);A(this,"$components",{});A(this,"$libs",{});A(this,"$apis",{});A(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=en){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&&ji.forEach(t=>{var r;this[t]=(r=this.__instance)==null?void 0:r[t]})}__cleanup(){ji.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===ht.Runtime){const{id:n,type:i}=t,s=n&&(r=this.__transform[n])!=null?r:t.value;return Zr({type:i,value:s},this)}else return Zr(t,this)}__parseExpression(t){var r;if(t)if(this.__mode===ht.Runtime){const{id:n,type:i}=t,s=n&&(r=this.__transform[n])!=null?r:t.value;return Pe({type:i,value:s},this)}else return Pe(t,this)}__ref(t=null,r){if(this.__mode!==ht.VNode)return t&&t!==this.__id&&(this.__contextRefs[t]=this),n=>L(this,null,function*(){var s,o;yield xe(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,ht.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=z(z({},this.context),t),n=st(z({},r),{context:r});return n.context.__proto__=this.context,n.__proto__=this,n}}function Qr(e){var f,h;const{Vue:t=en,mode:r=ht.Runtime,components:n={},libs:i={},apis:s={},loader:o}=e,a=t.computed(()=>e.dsl),u={$components:n,$libs:i,$apis:s},c=new ll({mode:r,dsl:a.value,attrs:u}),l=t.defineComponent(z({name:a.value.name,props:z({},tw((f=a.value.props)!=null?f:[],c)),setup(p){var y,_,S,v;c.$props=p,c.props=p,a.value.id&&ds(e.window||window,a.value.id,a.value.css||""),c.state=ew(t,(y=a.value.state)!=null?y:{},c);const d=rw(t,(_=a.value.computed)!=null?_:{},c),m=nw((S=a.value.methods)!=null?S:{},c),b=iw(t,a.value.inject,c),E=fl(a.value.dataSources||{},c),g=z(z(z(z({},b),d),m),E);return c.setup(g,t),sw(t,(v=a.value.watch)!=null?v:[],c),{vtj:c}},emits:X_(a.value.emits),expose:["vtj"],render(){if(!a.value.nodes)return null;const p=a.value.nodes||[];return p.length===1?ar(p[0],c,t,o):p.map(d=>ar(d,c,t,o))}},ow((h=a.value.lifeCycles)!=null?h:{},c)));return{renderer:t.markRaw(l),context:c}}function X_(e=[]){return e.map(t=>bt(t)?t:t.name)}function tw(e=[],t){const r=n=>n?(Array.isArray(n)?n:[n]).map(i=>Uu[i]):void 0;return e.map(n=>bt(n)?{name:n}:{name:n.name,type:n.type,required:n.required,default:wt(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 ew(e,t,r){return e.reactive(Object.keys(t||{}).reduce((n,i)=>{let s=t[i];return wt(s)?s=r.__parseExpression(s):Ie(s)&&(s=r.__parseFunction(s)),n[i]=s,n},{}))}function rw(e,t,r){return Object.entries(t!=null?t:{}).reduce((n,[i,s])=>(n[i]=e.computed(r.__parseFunction(s)),n),{})}function nw(e,t){return Object.entries(e!=null?e:{}).reduce((r,[n,i])=>(r[n]=t.__parseFunction(i),r),{})}function iw(e,t=[],r){return t.reduce((n,i)=>{var c;const{name:s,from:o}=i||{};i.default;const a=wt(o)?r.__parseExpression(o)||s:o!=null?o:s,u=wt(i.default)?r.__parseExpression(i.default):(c=i.default)!=null?c:null;return n[s]=e.inject(a,u),n},{})}function fl(e,t){return Object.keys(e).reduce((r,n)=>{const i=e[n];if(i.type==="mock")r[n]=cl(i);else if(i.ref){const s=t.$apis[i.ref],o=Ie(i.transform)?i.transform.value?t.__parseFunction(i.transform):void 0:i.transform;r[n]=(...a)=>L(this,null,function*(){const u=yield s.apply(t,a);return o?o(u):u})}return r},{})}function sw(e,t=[],r){t.forEach(n=>{e.watch(r.__parseExpression(n.source),r.__parseFunction(n.handler),{deep:n.deep,immediate:n.immediate})})}function ow(e,t){return Object.entries(e!=null?e:{}).reduce((r,[n,i])=>(r[n]=t.__parseFunction(i),r),{})}let Kn=[],te={};const hl=e=>e;function vs(r){return L(this,arguments,function*(e,t=window){const{urls:n=[],library:i}=e,s=n.filter(a=>En(a));if(s.length===0||!i)return null;const o=n.filter(a=>wn(a));return o.length&&Gu(o,t),yield Zu(s,i,t).catch(a=>(console.warn("loadScriptUrl error",s,i,a),null))})}function Xr(e){const{getDsl:t,getDslByUrl:r,options:n}=e;return n.window&&(Kn.forEach(i=>{delete n.window[i]}),Kn=[]),(i,s,o=en)=>{if(!s||typeof s=="string")return i;if(s.type==="Schema"&&s.id){let a=te[s.id];return a||(a=te[s.id]=o.defineAsyncComponent(()=>L(this,null,function*(){const u=yield t(s.id);return u&&(u.name=i),u?Qr(st(z({},n),{Vue:o,dsl:u,mode:ht.Runtime,loader:Xr(e)})).renderer:null})),a)}if(s.type==="UrlSchema"&&s.url){let a=te[s.url];return a||(a=te[s.url]=o.defineAsyncComponent(()=>L(this,null,function*(){const u=yield r(s.url);return u&&(u.name=i),u?Qr(st(z({},n),{Vue:o,dsl:u,mode:ht.Runtime,loader:Xr(e)})).renderer:null})),a)}if(s.type==="Plugin"){let a=s.library?te[s.library]:null;return a||(s.library&&Kn.push(s.library),a=te[s.library||Symbol()]=o.defineAsyncComponent(()=>L(this,null,function*(){return(yield vs(s,n.window))||(console.warn("getPlugin result is null",s),null)})),a)}return i}}function aw(){te={}}function ar(e,t,r=en,n=hl){var m;if(!e||!e.name||e.invisible)return null;const i=(m=r.getCurrentInstance())==null?void 0:m.appContext,{id:s=null,directives:o=[]}=e,{vIf:a,vFor:u,vShow:c,vModels:l,vBind:f,vHtml:h,others:p}=uw(o);if(a&&!lw(a,t))return null;const d=b=>{var O,V,w,T;const E=b.$components,g=(()=>{var C,M,D,k;if(e.name==="component")return fw(b,(C=e.props)==null?void 0:C.is);if(e.name==="slot")return e.name;const F=n(e.name,e.from,r);return bt(F)?Xu(F)||tl(F)?F:(k=(D=E[F])!=null?D:(M=i==null?void 0:i.app)==null?void 0:M.component(F))!=null?k:F:F})(),y=hw(s,(O=e.props)!=null?O:{},b),_=pw(r,(V=e.events)!=null?V:{},b);if(e.name==="slot")return dw(r,e,y,b,n);f&&Object.assign(y,b.__parseExpression(f.value)),c&&(y.style=Object.assign((w=y.style)!=null?w:{},gw(c,b))),h&&Object.assign(y,vw(h,b)),l.forEach(F=>{Object.assign(y,yw(r,F,b))});const S=bw(r,(T=e.children)!=null?T:[],b,n,e);let v=r.createVNode(g,z(z({},y),_),S);const x=i?cw(i,p,b):[];return x.length&&(v=r.withDirectives(v,x)),v};return u?Ew(u,d,t):d(t)}function cw(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 uw(e=[]){const t=e.find(u=>Nt(u.name)==="vIf"),r=e.find(u=>Nt(u.name)==="vFor"),n=e.find(u=>Nt(u.name)==="vShow"),i=e.find(u=>Nt(u.name)==="vBind"),s=e.find(u=>Nt(u.name)==="vHtml"),o=e.filter(u=>Nt(u.name)==="vModel"),a=e.filter(u=>!Vu.includes(Nt(u.name)));return{vIf:t,vFor:r,vShow:n,vModels:o,vBind:i,others:a,vHtml:s}}function lw(e,t){return!!t.__parseExpression(e.value)}function fw(e,t){return t?wt(t)?e.__parseExpression(t):t:"div"}function hw(e,t,r){const n=Ri(t,r);return n.ref=r.__ref(e,n.ref),n}function Ri(e,t){return wt(e)?t.__parseExpression(e):Ie(e)?t.__parseFunction(e):Array.isArray(e)?e.map(r=>Ri(r,t)):typeof e=="object"?Object.keys(e||{}).reduce((r,n)=>{let i=e[n];return r[n]=Ri(i,t),r},{}):e}function pw(e,t,r){const n=["passive","capture","once"],i={capture:"Capture",once:"Once",passive:"OnceCapture"};return Object.keys(t||{}).reduce((s,o)=>{const a=t[o],u=ys(a.modifiers),c=u.find(h=>n.includes(h)),l="on"+cn(o)+(c&&i[c]||""),f=r.__parseFunction(a.handler);return f&&(s[l]=e.withModifiers(f,u)),s},{})}function ys(e={},t=!1){const r=Object.keys(e);return t?r.map(n=>"."+n):r}function dw(e,t,r,n,i){var u;const{children:s}=t,o=mw(t,n),a=(u=n.$slots)==null?void 0:u[o.name];return a?a(r):s?bt(s)?e.createTextVNode(s):wt(s)?e.createTextVNode(ps(n.__parseExpression(s))):Array.isArray(s)?s.map(c=>ar(c,n,e,i)):null:null}function mw(e,t){const{props:r}=e,n=(r==null?void 0:r.name)||"default";return{name:wt(n)?t.__parseExpression(n):n,params:[]}}function gw(e,t){return t.__parseExpression(e.value)?{}:{display:"none"}}function vw(e,t){return{innerHTML:t.__parseExpression(e.value)||""}}function yw(e,t,r){var a;const n={type:"JSFunction",value:(a=t.value)!=null&&a.value?`(v) => {
79
79
  ${t.value.value} = v;
80
80
  }`:"(v) => {}"},i=r.__parseFunction(n),s=ys(wt(t.modifiers)?r.__parseExpression(t.modifiers):t.modifiers),o=wt(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 bw(e,t,r,n,i){if(!t)return null;if(bt(t))return{default:()=>t};if(wt(t))return{default:()=>ps(r.__parseExpression(t))};if(Array.isArray(t)&&t.length>0){const s=_w(t),o=a=>!a||!i?{}:i!=null&&i.id&&Object.keys(a).length?{[`scope_${i.id}`]:a}:{};return Object.entries(s).reduce((a,[u,{nodes:c,params:l}])=>(a[u]=f=>{const h=l.length?Nc(f!=null?f:{},l):o(f);return c.map(p=>ar(p,r.__clone(h),e,n))},a),{})}return null}function _w(e){const t={default:{params:[],nodes:[]}};for(const r of e){const n=ww(r.slot),i=n.name;t[i]?(t[i].nodes.push(r),t[i].params=t[i].params.concat(n.params)):t[i]={nodes:[r],params:n.params}}return t}function ww(e="default"){return bt(e)?{name:e,params:[]}:z({params:[]},e)}function Ew(e,t,r){const{value:n,iterator:i}=e,{item:s="item",index:o="index"}=i||{};let a=r.__parseExpression(n)||[];return Number.isInteger(a)&&(a=new Array(a).fill(!0).map((u,c)=>c+1)),Array.isArray(a)?a.map((u,c)=>t(r.__clone({[s]:u,[o]:c}))):(console.warn("[vForRender]:",`${n==null?void 0:n.value} is not a Arrary`),[])}function pl(e){return Dl()?(Cl(e),!0):!1}const dl=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Sw=e=>e!=null,xw=()=>{};function Tw(e){return Array.isArray(e)?e:[e]}function $w(...e){if(e.length!==1)return Al(...e);const t=e[0];return typeof t=="function"?jl(Rl(()=>({get:t,set:xw}))):Ur(t)}const Ow=dl?window:void 0,Aw=dl?window.document:void 0;function jw(e){var t;const r=Di(e);return(t=r==null?void 0:r.$el)!=null?t:r}function Rw(){const e=Pl(!1),t=Nl();return t&&kl(()=>{e.value=!0},t),e}function Dw(e){const t=Rw();return ea(()=>(t.value,!!e()))}function Cw(e,t,r={}){const h=r,{window:n=Ow}=h,i=Tn(h,["window"]);let s;const o=Dw(()=>n&&"MutationObserver"in n),a=()=>{s&&(s.disconnect(),s=void 0)},u=ea(()=>{const p=Di(e),d=Tw(p).map(jw).filter(Sw);return new Set(d)}),c=ta(()=>u.value,p=>{a(),o.value&&p.size&&(s=new MutationObserver(t),p.forEach(d=>s.observe(d,i)))},{immediate:!0,flush:"post"}),l=()=>s==null?void 0:s.takeRecords(),f=()=>{c(),a()};return pl(f),{isSupported:o,stop:f,takeRecords:l}}function Pw(e=null,t={}){var r,n,i;const{document:s=Aw,restoreOnUnmount:o=f=>f}=t,a=(r=s==null?void 0:s.title)!=null?r:"",u=$w((n=e!=null?e:s==null?void 0:s.title)!=null?n:null),c=!!(e&&typeof e=="function");function l(f){if(!("titleTemplate"in t))return f;const h=t.titleTemplate||"%s";return typeof h=="function"?h(f):Di(h).replace(/%s/g,f)}return ta(u,(f,h)=>{f!==h&&s&&(s.title=l(f!=null?f:""))},{immediate:!0}),t.observe&&!t.titleTemplate&&s&&!c&&Cw((i=s.head)==null?void 0:i.querySelector("title"),()=>{s&&s.title!==u.value&&(u.value=l(s.title))},{childList:!0}),pl(()=>{if(o){const f=o(a,u.value||"");f!=null&&s&&(s.title=f)}}),u}const Qo=tn({name:"VtjPageContainer",setup(){return L(this,null,function*(){const e=_s(),t=ra(),r=t.params.id,n=r?e.getPage(r):e.getHomepage(),i=n?yield e.getRenderComponent(n.id):null,s=Ur(Symbol());return n&&(Object.assign(t.meta,n.meta||{},{cache:n.cache}),Pw(n.title||"VTJ")),{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?Yn(e,st(z({},t),{key:r})):Yn("div","页面不存在")},activated(){this.meta.cache===!1&&(this.sid=Symbol())}}),kw={"data-l-h6o7ki7":"",class:"vtj-startup__wrapper"},Nw={"data-l-h6o7ki7":"",class:"vtj-startup"},Bw={"data-l-h6o7ki7":"",class:"vtj-startup__name"},Mw={"data-l-h6o7ki7":"",class:"span"},Iw={"data-l-h6o7ki7":"",class:"vtj-startup__tagline"},Fw={"data-l-h6o7ki7":"",class:"vtj-startup__actions"},ml=tn({__name:"Startup",props:{name:{default:"VTJ.PRO"},tagline:{default:"基于 Vue3 + TypeScript 快速打造高生产力的低代码研发平台"},actionText:{default:"开始设计"},link:{}},setup(e){((n,i)=>{let s=document.getElementById("h6o7ki7");s||(s=document.createElement("style"),s.id="h6o7ki7",document.head.appendChild(s),s.innerHTML=i)})("h6o7ki7",`
@@ -158,4 +158,4 @@ version: 2.9.0
158
158
  }
159
159
  .vtj-startup__actions .button[data-l-h6o7ki7]:hover{
160
160
  opacity: 0.7;
161
- }`);const t=e,r=()=>{if(typeof window<"u"){if(t.link){typeof t.link=="function"?t.link():window.location.href=t.link;return}let n=(window.__VTJ_LINK__||{}).href||window.location.pathname+"__vtj__/#/";window.location.href=n}};return(n,i)=>(Wn(),$l("div",kw,[Zt("div",Nw,[Zt("h1",Bw,[Zt("span",Mw,jn(t.name),1)]),Zt("div",Iw,jn(t.tagline),1),Zt("div",Fw,[i[0]||(i[0]=Zt("span",{"data-l-h6o7ki7":"",class:"span"},"设置项目主页后,将替换此页面显示",-1)),Zt("span",{"data-l-h6o7ki7":"",class:"button",onClick:r},jn(t.actionText),1)])])]))}}),Lw=tn({name:"VtjStartupContainer",render(){return Yn(ml)}}),bs=Symbol("Provider");var gl=(e=>(e.Production="production",e.Development="development",e))(gl||{});class vl extends zc{constructor(r){super();A(this,"mode");A(this,"globals",{});A(this,"modules",{});A(this,"adapter",{request:or,jsonp:us});A(this,"apis",{});A(this,"dependencies",{});A(this,"materials",{});A(this,"library",{});A(this,"service");A(this,"project",null);A(this,"components",{});A(this,"nodeEnv","development");A(this,"router",null);A(this,"materialPath","./");A(this,"urlDslCaches",{});this.options=r;const{service:n,mode:i=ht.Raw,dependencies:s,materials:o,project:a={},adapter:u={},globals:c={},modules:l={},router:f=null,materialPath:h="./",nodeEnv:p="development"}=r;this.mode=i,this.modules=l,this.service=n,this.router=f,this.materialPath=h,this.nodeEnv=p,s&&(this.dependencies=s),o&&(this.materials=o),Object.assign(this.globals,c),Object.assign(this.adapter,u);const{access:d,request:m}=this.adapter;d&&d.connect({mode:i,router:f,request:m}),a&&i!==ht.Design?this.load(a):this.project=a}createMock(r){return(...n)=>L(this,null,function*(){var s;let i={};if(r)try{i=yield r.apply(r,n)}catch(o){ae.warn("模拟数据模版异常",o)}return(s=Ce())==null?void 0:s.mock(i)})}load(r){return L(this,null,function*(){const n=this.modules[`.vtj/projects/${r.id}.json`]||this.modules[`/src/.vtj/projects/${r.id}.json`];if(this.project=n?yield n():yield this.service.init(r),!this.project)throw new Error("project is null");const{apis:i=[],meta:s=[]}=this.project,o=window;o.CKEDITOR_VERSION=void 0,this.mode===ht.Raw?yield this.loadDependencies(o):yield this.loadAssets(o),this.initMock(o),this.apis=ol(i,s,this.adapter),gs(o),al(i,o),r.platform!=="uniapp"&&this.initRouter(),this.triggerReady()})}initMock(r){const n=Ce(r);n&&n.setup({timeout:"50-500"})}loadDependencies(r){return L(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 L(this,null,function*(){const{dependencies:n=[]}=this.project,{dependencies:i,library:s,components:o,materialPath:a,nodeEnv:u}=this,{libraryExports:c,libraryMap:l,materials:f,materialExports:h,materialMapLibrary:p}=Ju(n,a,u==="development");for(const d of c){const m=i[d],b=r[d];if(b)s[d]=b;else if(m)r[d]=s[d]=yield m();else{const E=l[d]||[];for(const g of E)wn(g)&&(yield Yu(d,oe.append(g,{v:An}))),En(g)&&(yield Oi(oe.append(g,{v:An})));s[d]=r[d]}}if(u==="development"){for(const m of f)yield Oi(oe.append(m,{v:An}));const d=this.materials||{};for(const m of h){const b=r[p[m]],E=Hc[m];if(E)b&&E.forEach(g=>{o[g]=b[g]});else{const g=d[m]?(yield d[m]()).default:r[m];g&&b&&(g.components||[]).forEach(y=>{o[y.name]=Wu(y,b)})}}}})}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:a,pageRouteName:u=o,routeMeta:c}=i,l=a?"":"/",f={path:`${l}${u}/:id`,name:Oe,component:Qo},h={path:l,name:Qe,component:n!=null&&n.homepage?Qo:s.startupComponent||Lw,meta:c};r.hasRoute(Oe)&&r.removeRoute(Oe),r.hasRoute(Qe)&&r.removeRoute(Qe),a?(r.addRoute(a,f),r.addRoute(a,h)):(r.addRoute(f),r.addRoute(h))}install(r){const n=r.config.globalProperties.installed||{};for(const[i,s]of Object.entries(this.library))!n[i]&&Qu(s)&&(r.use(s),n[i]=!0);this.options.install&&r.use(this.options.install),this.adapter.access&&r.use(this.adapter.access),r.provide(bs,this),r.config.globalProperties.$provider=this,r.config.globalProperties.installed=n,this.mode===ht.Design&&(r.config.errorHandler=(i,s,o)=>{const a=s==null?void 0:s.$options.name,u=typeof i=="string"?i:(i==null?void 0:i.message)||(i==null?void 0:i.msg)||"未知错误",c=`[ ${a} ] ${u} ${o}`;console.error("[VTJ Error]:",{err:i,instance:s,info:o},i==null?void 0:i.stack),this.adapter.notify&&this.adapter.notify(c,"组件渲染错误","error")})}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 a of o){if(a.id===s)return a;if(a.children&&a.children.length){const u=i(s,a.children);if(u)return u}}};return i(r,n)||null}getHomepage(){const{homepage:r}=this.project||{};return r?this.getPage(r):null}getDsl(r){return L(this,null,function*(){const n=this.modules[`.vtj/files/${r}.json`]||this.modules[`/src/.vtj/files/${r}.json`];return n?yield n():this.service.getFile(r,this.project||void 0).catch(()=>null)})}getDslByUrl(r){return L(this,null,function*(){return this.urlDslCaches[r]||(this.urlDslCaches[r]=this.adapter.request.send({url:r,method:"get",settings:{validSuccess:!1,originResponse:!0}}).then(i=>i.data).catch(()=>null))})}createDslRenderer(r,n={}){const{library:i,components:s,mode:o,apis:a}=this,u=z({mode:o,Vue:i.Vue,components:s,libs:i,apis:a,window},n),c=Xr({getDsl:l=>L(this,null,function*(){return(yield this.getDsl(l))||null}),getDslByUrl:l=>L(this,null,function*(){return(yield this.getDslByUrl(l))||null}),options:u});return Qr(st(z({},u),{dsl:r,loader:c}))}getRenderComponent(r,n){return L(this,null,function*(){var u;const i=this.getFile(r);if(!i)return ae.warn(`Can not find file: ${r}`),null;n&&n(i);const s=`.vtj/vue/${r}.vue`,o=this.modules[s]||this.modules[`/src/pages/${r}.vue`];if(o)return(u=yield o())==null?void 0:u.default;const a=yield this.getDsl(i.id);return a?this.createDslRenderer(a).renderer:(ae.warn(`Can not find dsl: ${r}`),null)})}defineUrlSchemaComponent(r,n){return Ts(()=>L(this,null,function*(){const i=yield this.getDslByUrl(r);return i?(i.name=n||i.name,this.createDslRenderer(i).renderer):null}))}definePluginComponent(r){return Ts(()=>L(this,null,function*(){return yield vs(r,window)}))}}function Vw(e){const t=new vl(e);return{provider:t,onReady:r=>t.ready(r)}}function _s(e={}){const t=Xo(bs,null);if(!t)throw new Error("Can not find provider");if(t.nodeEnv==="development"){const{id:r,version:n}=e;r&&n&&L(this,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}const yl={type:"json",validSuccess:!0,originResponse:!1,failMessage:!0,validate:e=>{var t;return((t=e.data)==null?void 0:t.code)===0}},Uw=(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:yl}),Hw=(e,t="/__vtj__/api/uploader.json")=>(r,n)=>L(void 0,null,function*(){return yield e.send({url:t,method:"post",data:{files:r,projectId:n},settings:st(z({},yl),{type:"data"})}).then(i=>i&&i[0]?i[0]:null).catch(()=>null)});function zw(e){return _n({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 Sn{constructor(t=or){A(this,"api");A(this,"pluginCaches",{});A(this,"uploader");this.api=Uw(t),this.uploader=Hw(t)}getExtension(){return L(this,null,function*(){console.log("BaseService.getExtension")})}init(t){return L(this,null,function*(){return console.log("BaseService.init",t),{}})}saveProject(t,r){return L(this,null,function*(){return!!(yield this.api("saveProject",t,{type:r}).catch(()=>!1))})}saveMaterials(t,r){return L(this,null,function*(){return console.log("BaseService.saveMaterials",t,r),!1})}saveFile(t){return L(this,null,function*(){return console.log("BaseService.saveFile",t),!1})}getFile(t){return L(this,null,function*(){return console.log("BaseService.getFile",t),{}})}removeFile(t){return L(this,null,function*(){return console.log("BaseService.removeFile",t),!1})}saveHistory(t){return L(this,null,function*(){return console.log("BaseService.saveHistory",t),!1})}removeHistory(t){return L(this,null,function*(){return console.log("BaseService.removeHistory",t),!1})}getHistory(t){return L(this,null,function*(){return console.log("BaseService.getHistory",t),{}})}getHistoryItem(t,r){return L(this,null,function*(){return console.log("BaseService.getHistoryItem",t,r),{}})}saveHistoryItem(t,r){return L(this,null,function*(){return console.log("BaseService.saveHistoryItem",t,r),!1})}removeHistoryItem(t,r){return L(this,null,function*(){return console.log("BaseService.removeHistoryItem",t,r),!1})}publish(t){return L(this,null,function*(){return!!(yield this.api("publish",t).catch(()=>!1))})}publishFile(t,r){return L(this,null,function*(){return!!(yield this.api("publishFile",{project:t,file:r}).catch(()=>!1))})}genVueContent(t,r){return L(this,null,function*(){return yield this.api("genVueContent",{project:t,dsl:r}).catch(()=>"")})}createRawPage(t){return L(this,null,function*(){return yield this.api("createRawPage",t).catch(()=>"")})}removeRawPage(t){return L(this,null,function*(){return yield this.api("removeRawPage",t).catch(()=>"")})}uploadStaticFile(t,r){return L(this,null,function*(){return yield this.uploader(t,r).catch(()=>null)})}getStaticFiles(t){return L(this,null,function*(){return yield this.api("getStaticFiles",t).catch(()=>[])})}removeStaticFile(t,r){return L(this,null,function*(){return yield this.api("removeStaticFile",{name:t,projectId:r}).catch(()=>"")})}clearStaticFiles(t){return L(this,null,function*(){return yield this.api("clearStaticFiles",t).catch(()=>"")})}getPluginMaterial(t){return L(this,null,function*(){const{urls:r=[]}=t,n=r.filter(s=>qu(s))[0];return n?this.pluginCaches[n]||(this.pluginCaches[n]=or.send({url:n,method:"get",settings:{validSuccess:!1,originResponse:!0}}).then(s=>s.data).catch(()=>null)):null})}genSource(t){return L(this,null,function*(){return console.log("BaseService.genSource",t),""})}}const mt=new cs({type:"local",expired:0,prefix:"__VTJ_"});class qw extends Sn{init(t){const r=new ue(t),n=mt.get(`project_${r.id}`),i=Object.assign(r.toDsl(),n||{});return mt.save(`project_${r.id}`,i),Promise.resolve(i)}saveProject(t){const r=new ue(t);return mt.save(`project_${r.id}`,r.toDsl()),Promise.resolve(!0)}saveMaterials(t,r){return mt.save(`materials_${t.id}`,fn(r)),Promise.resolve(!0)}saveFile(t){return mt.save(`file_${t.id}`,t),Promise.resolve(!0)}getFile(t){const r=mt.get(`file_${t}`);return r?Promise.resolve(r):Promise.reject(null)}removeFile(t){return mt.remove(`file_${t}`),Promise.resolve(!0)}saveHistory(t){return mt.save(`history_${t.id}`,t),Promise.resolve(!0)}removeHistory(t){const r=mt.get(`history_${t}`);if(r){const n=(r.items||[]).map(i=>i.id);this.removeHistoryItem(t,n),mt.remove(`history_${t}`)}return Promise.resolve(!0)}getHistory(t){const r=mt.get(`history_${t}`),n=new Xi(r||{id:t});return Promise.resolve(n.toDsl())}getHistoryItem(t,r){const n=mt.get(`history_${t}_${r}`);return Promise.resolve(n)}saveHistoryItem(t,r){return mt.save(`history_${t}_${r.id}`,r),Promise.resolve(!0)}removeHistoryItem(t,r){return r.forEach(n=>{mt.remove(`history_${t}_${n}`)}),Promise.resolve(!0)}}class bl extends Sn{constructor(){super(...arguments);A(this,"projects",{});A(this,"materials",{});A(this,"files",{});A(this,"histories",{});A(this,"historyItems",{})}init(r){const n=new ue(r),i=this.projects[n.id]||{},s=Object.assign(n.toDsl(),i);return this.projects[s.id]=s,Promise.resolve(s)}saveProject(r){const n=new ue(r);return this.projects[n.id]=n.toDsl(),Promise.resolve(!0)}saveMaterials(r,n){return r.id&&(this.materials[r.id]=fn(n)),Promise.resolve(!0)}saveFile(r){return this.files[r.id]=r,Promise.resolve(!0)}getFile(r){const n=this.files[r];return n?Promise.resolve(n):Promise.reject(null)}removeFile(r){return delete this.files[r],Promise.resolve(!0)}saveHistory(r){return this.histories[r.id]=r,Promise.resolve(!0)}removeHistory(r){const n=this.histories[r];if(n){const i=(n.items||[]).map(s=>s.id);this.removeHistoryItem(r,i),delete this.historyItems[r]}return Promise.resolve(!0)}getHistory(r){const n=this.histories[r],i=new Xi(n||{id:r});return Promise.resolve(i)}getHistoryItem(r,n){const i=`${r}_${n}`,s=this.historyItems[i]||{};return Promise.resolve(s)}saveHistoryItem(r,n){const i=`${r}_${n.id}`;return this.historyItems[i]=n,Promise.resolve(!0)}removeHistoryItem(r,n){return n.forEach(i=>{const s=`${r}_${i}`;delete this.historyItems[s]}),Promise.resolve(!0)}}let Jn=null;function Kw(){return Jn||(Jn=new bl,Jn)}class Jw extends Sn{constructor(){super(...arguments);A(this,"getFileCaches",{})}getExtension(){return L(this,null,function*(){return yield this.api("getExtension",{}).catch(()=>{})})}init(r){return L(this,null,function*(){return(yield this.api("init",r).catch(()=>null))||{}})}saveProject(r,n){return L(this,null,function*(){return!!(yield this.api("saveProject",r,{type:n}).catch(()=>!1))})}saveMaterials(r,n){return L(this,null,function*(){return!!(yield this.api("saveMaterials",{project:r,materials:fn(n)}).catch(()=>!1))})}saveFile(r){return L(this,null,function*(){return!!(yield this.api("saveFile",r).catch(()=>!1))})}getFile(r){return L(this,null,function*(){return this.getFileCaches[r]||(this.getFileCaches[r]=this.api("getFile",r).catch(()=>null)).finally(()=>{delete this.getFileCaches[r]})})}removeFile(r){return L(this,null,function*(){return!!(yield this.api("removeFile",r).catch(()=>!1))})}saveHistory(r){return L(this,null,function*(){return!!(yield this.api("saveHistory",r).catch(()=>!1))})}removeHistory(r){return L(this,null,function*(){return!!(yield this.api("removeHistory",r).catch(()=>!1))})}getHistory(r){return L(this,null,function*(){return(yield this.api("getHistory",r).catch(()=>null))||{}})}getHistoryItem(r,n){return L(this,null,function*(){return(yield this.api("getHistoryItem",{fId:r,id:n}).catch(()=>null))||{}})}saveHistoryItem(r,n){return L(this,null,function*(){return!!(yield this.api("saveHistoryItem",{fId:r,item:n}).catch(()=>!1))})}removeHistoryItem(r,n){return L(this,null,function*(){return!!(yield this.api("removeHistoryItem",{fId:r,ids:n}).catch(()=>!1))})}}function _l(e,t,r=[]){return r.map(n=>{const{id:i,title:s,icon:o,children:a,hidden:u}=n;return{id:i,title:s,icon:o,hidden:u,url:`${e}/${t}/${i}`,children:a&&a.length?_l(e,t,a):void 0}})}function wl(e,t){if(!t)return e;let r=[];for(const n of e)if(n.children&&n.children.length){const i=wl(n.children,t);i.length&&(n.children=i,r.push(n))}else t.can(n.id.toString())&&r.push(n);return r}function Ww(e){const{menuPathPrefix:t="",pageRouteName:r="page",disableMenusFilter:n=!1}=e||{},i=_s(),s=ra(),o=nl(),a=Ur(!1),u=Ur(!1),c=i.project;Ol(()=>{const{name:h,params:p,meta:d}=s;if(h===Oe){const m=i.getPage(p.id);a.value=!(m!=null&&m.mask),u.value=!!(m!=null&&m.pure)}else if(h===Qe){const m=i.getHomepage();a.value=!(m!=null&&m.mask),u.value=!!(m!=null&&m.pure)}else a.value=!d.mask,u.value=!!d.pure});const l=_l(t,r,c==null?void 0:c.pages),f=c==null?void 0:c.config;return{disabled:a,logo:f==null?void 0:f.logo,themeSwitchable:f==null?void 0:f.themeSwitchable,title:(f==null?void 0:f.title)||(c==null?void 0:c.description)||(c==null?void 0:c.name)||"VTJ App",menus:n?l:wl(l,o),pure:u}}const M2=Object.freeze(Object.defineProperty({__proto__:null,ACCESS_KEY:ms,Access:rl,BUILD_IN_TAGS:zu,BUILT_IN_DIRECTIVES:Vu,BaseService:Sn,CONTEXT_HOST:ji,Context:ll,ContextMode:ht,DATA_TYPES:Uu,HOMEPAGE_ROUTE_NAME:Qe,HTML_TAGS:Hu,JSCodeToString:G_,LIFE_CYCLES_LIST:J_,LocalService:Jw,MemoryService:bl,NodeEnv:gl,PAGE_ROUTE_NAME:Oe,Provider:vl,Startup:ml,StorageService:qw,VTJ_RENDERER_VERSION:hs,adoptedStyleSheets:ds,clearLoaderCache:aw,createAdapter:Q_,createAssetScripts:W_,createAssetsCss:Y_,createDataSources:fl,createLoader:Xr,createMemoryService:Kw,createMetaApi:sl,createMock:cl,createProvider:Vw,createRenderer:Qr,createSchemaApi:il,createSchemaApis:ol,createServiceRequest:zw,defaultLoader:hl,fillBasePath:Ye,getMock:Ce,getModifiers:ys,getPlugin:vs,getRawComponent:Wu,isBuiltInTag:Xu,isCSSUrl:wn,isJSCode:el,isJSExpression:wt,isJSFunction:Ie,isJSON:qu,isJSUrl:En,isNativeTag:tl,isVuePlugin:Qu,loadCss:Yu,loadCssUrl:Gu,loadScriptUrl:Zu,mockApi:ul,mockApis:al,mockCleanup:gs,nodeRender:ar,parseDeps:Ju,parseExpression:Pe,parseFunction:Zr,providerKey:bs,removeProdFlag:Ku,toString:ps,useAccess:nl,useMask:Ww,useProvider:_s},Symbol.toStringTag,{value:"Module"})),Yw=tn({__name:"app",setup(e){return(t,r)=>{const n=Bl("router-view");return Wn(),$s(Os(Hl),{locale:Os(Ul)},{default:As(()=>[(Wn(),$s(Ml,null,{default:As(()=>[Il(n)]),_:1}))]),_:1},8,["locale"])}}}),Gw=[{path:"/",name:"home",component:()=>Ve(()=>import("./index-ChFaPzB9.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]),import.meta.url)},{path:"/preview/:id",name:"preview",component:()=>Ve(()=>import("./preview-5sWUbX5I.js"),__vite__mapDeps([21,13,14,1,2,3,4,5,6,7,8,9,10,11,12,15,16,17,18]),import.meta.url)},{path:"/page/:id",name:"page",component:()=>Ve(()=>import("./page-CmpRl7SB.js"),__vite__mapDeps([22,13,14,1,2,3,4,5,6,7,8,9,10,11,12,15,16,17,18]),import.meta.url),meta:{pure:!0}},{path:"/pages/:id",name:"page",component:()=>Ve(()=>import("./uni-page-ByIXJ059.js"),__vite__mapDeps([23,1,2,19,24]),import.meta.url),meta:{pure:!0}},{path:"/auth",name:"auth",component:()=>Ve(()=>import("./auth-BdTZicaH.js"),__vite__mapDeps([25,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,19,26]),import.meta.url)}],Zw=Ll({history:Vl(),routes:Gw}),Qw="RRO_IDE_ACCESS_STORAGE__",ws=Fl(Yw),Xw=new rl({storageKey:Qw});ws.use(Xw);ws.use(Zw);ws.mount("#app");export{Gc as $,Q_ as A,fi as B,ae as C,hi as D,Yc as E,Wc as F,G,nt as H,zw as I,ce as J,A0 as K,ya as L,rl as M,We as N,Jw as O,re as P,Xi as Q,yy as R,T_ as S,Vw as T,Zi as U,kr as V,Qi as W,si as X,j0 as Y,ct as Z,$_ as _,Qw as a,t1 as a0,nc as a1,s1 as a2,Ju as a3,Y_ as a4,W_ as a5,r1 as a6,Wu as a7,ol as a8,gs as a9,al as aa,Jr as ab,zi as ac,aw as ad,wt as ae,Ie as af,E_ as ag,Pe as ah,Zr as ai,Ke as aj,Vu as ak,c1 as al,G_ as am,J_ as an,Uu as ao,cl as ap,S_ as aq,P0 as ar,Vi as as,M2 as at,p2 as au,B2 as av,wn as aw,En as ax,Gu as ay,Zu as az,Fr as b,kc as c,Dt as d,gt as e,Ji as f,Nt as g,py as h,nr as i,z_ as j,ds as k,zc as l,ay as m,xe as n,bt as o,vl as p,ue as q,I as r,it as s,Ee as t,ui as u,q_ as v,Je as w,us as x,ht as y,Pc as z};
161
+ }`);const t=e,r=()=>{if(typeof window<"u"){if(t.link){typeof t.link=="function"?t.link():window.location.href=t.link;return}let n=(window.__VTJ_LINK__||{}).href||window.location.pathname+"__vtj__/#/";window.location.href=n}};return(n,i)=>(Wn(),$l("div",kw,[Zt("div",Nw,[Zt("h1",Bw,[Zt("span",Mw,jn(t.name),1)]),Zt("div",Iw,jn(t.tagline),1),Zt("div",Fw,[i[0]||(i[0]=Zt("span",{"data-l-h6o7ki7":"",class:"span"},"设置项目主页后,将替换此页面显示",-1)),Zt("span",{"data-l-h6o7ki7":"",class:"button",onClick:r},jn(t.actionText),1)])])]))}}),Lw=tn({name:"VtjStartupContainer",render(){return Yn(ml)}}),bs=Symbol("Provider");var gl=(e=>(e.Production="production",e.Development="development",e))(gl||{});class vl extends zc{constructor(r){super();A(this,"mode");A(this,"globals",{});A(this,"modules",{});A(this,"adapter",{request:or,jsonp:us});A(this,"apis",{});A(this,"dependencies",{});A(this,"materials",{});A(this,"library",{});A(this,"service");A(this,"project",null);A(this,"components",{});A(this,"nodeEnv","development");A(this,"router",null);A(this,"materialPath","./");A(this,"urlDslCaches",{});this.options=r;const{service:n,mode:i=ht.Raw,dependencies:s,materials:o,project:a={},adapter:u={},globals:c={},modules:l={},router:f=null,materialPath:h="./",nodeEnv:p="development"}=r;this.mode=i,this.modules=l,this.service=n,this.router=f,this.materialPath=h,this.nodeEnv=p,s&&(this.dependencies=s),o&&(this.materials=o),Object.assign(this.globals,c),Object.assign(this.adapter,u);const{access:d,request:m}=this.adapter;d&&d.connect({mode:i,router:f,request:m}),a&&i!==ht.Design?this.load(a):this.project=a}createMock(r){return(...n)=>L(this,null,function*(){var s;let i={};if(r)try{i=yield r.apply(r,n)}catch(o){ae.warn("模拟数据模版异常",o)}return(s=Ce())==null?void 0:s.mock(i)})}load(r){return L(this,null,function*(){const n=this.modules[`.vtj/projects/${r.id}.json`]||this.modules[`/src/.vtj/projects/${r.id}.json`];if(this.project=n?yield n():yield this.service.init(r),!this.project)throw new Error("project is null");const{apis:i=[],meta:s=[]}=this.project,o=window;o.CKEDITOR_VERSION=void 0,this.mode===ht.Raw?yield this.loadDependencies(o):yield this.loadAssets(o),this.initMock(o),this.apis=ol(i,s,this.adapter),gs(o),al(i,o),r.platform!=="uniapp"&&this.initRouter(),this.triggerReady()})}initMock(r){const n=Ce(r);n&&n.setup({timeout:"50-500"})}loadDependencies(r){return L(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 L(this,null,function*(){const{dependencies:n=[]}=this.project,{dependencies:i,library:s,components:o,materialPath:a,nodeEnv:u}=this,{libraryExports:c,libraryMap:l,materials:f,materialExports:h,materialMapLibrary:p}=Ju(n,a,u==="development");for(const d of c){const m=i[d],b=r[d];if(b)s[d]=b;else if(m)r[d]=s[d]=yield m();else{const E=l[d]||[];for(const g of E)wn(g)&&(yield Yu(d,oe.append(g,{v:An}))),En(g)&&(yield Oi(oe.append(g,{v:An})));s[d]=r[d]}}if(u==="development"){for(const m of f)yield Oi(oe.append(m,{v:An}));const d=this.materials||{};for(const m of h){const b=r[p[m]],E=Hc[m];if(E)b&&E.forEach(g=>{o[g]=b[g]});else{const g=d[m]?(yield d[m]()).default:r[m];g&&b&&(g.components||[]).forEach(y=>{o[y.name]=Wu(y,b)})}}}})}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:a,pageRouteName:u=o,routeMeta:c}=i,l=a?"":"/",f={path:`${l}${u}/:id`,name:Oe,component:Qo},h={path:l,name:Qe,component:n!=null&&n.homepage?Qo:s.startupComponent||Lw,meta:c};r.hasRoute(Oe)&&r.removeRoute(Oe),r.hasRoute(Qe)&&r.removeRoute(Qe),a?(r.addRoute(a,f),r.addRoute(a,h)):(r.addRoute(f),r.addRoute(h))}install(r){const n=r.config.globalProperties.installed||{};for(const[i,s]of Object.entries(this.library))!n[i]&&Qu(s)&&(r.use(s),n[i]=!0);this.options.install&&r.use(this.options.install),this.adapter.access&&r.use(this.adapter.access),r.provide(bs,this),r.config.globalProperties.$provider=this,r.config.globalProperties.installed=n,this.mode===ht.Design&&(r.config.errorHandler=(i,s,o)=>{const a=s==null?void 0:s.$options.name,u=typeof i=="string"?i:(i==null?void 0:i.message)||(i==null?void 0:i.msg)||"未知错误",c=`[ ${a} ] ${u} ${o}`;console.error("[VTJ Error]:",{err:i,instance:s,info:o},i==null?void 0:i.stack),this.adapter.notify&&this.adapter.notify(c,"组件渲染错误","error")})}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 a of o){if(a.id===s)return a;if(a.children&&a.children.length){const u=i(s,a.children);if(u)return u}}};return i(r,n)||null}getHomepage(){const{homepage:r}=this.project||{};return r?this.getPage(r):null}getDsl(r){return L(this,null,function*(){const n=this.modules[`.vtj/files/${r}.json`]||this.modules[`/src/.vtj/files/${r}.json`];return n?yield n():this.service.getFile(r,this.project||void 0).catch(()=>null)})}getDslByUrl(r){return L(this,null,function*(){return this.urlDslCaches[r]||(this.urlDslCaches[r]=this.adapter.request.send({url:r,method:"get",settings:{validSuccess:!1,originResponse:!0}}).then(i=>i.data).catch(()=>null))})}createDslRenderer(r,n={}){const{library:i,components:s,mode:o,apis:a}=this,u=z({mode:o,Vue:i.Vue,components:s,libs:i,apis:a,window},n),c=Xr({getDsl:l=>L(this,null,function*(){return(yield this.getDsl(l))||null}),getDslByUrl:l=>L(this,null,function*(){return(yield this.getDslByUrl(l))||null}),options:u});return Qr(st(z({},u),{dsl:r,loader:c}))}getRenderComponent(r,n){return L(this,null,function*(){var u;const i=this.getFile(r);if(!i)return ae.warn(`Can not find file: ${r}`),null;n&&n(i);const s=`.vtj/vue/${r}.vue`,o=this.modules[s]||this.modules[`/src/pages/${r}.vue`];if(o)return(u=yield o())==null?void 0:u.default;const a=yield this.getDsl(i.id);return a?this.createDslRenderer(a).renderer:(ae.warn(`Can not find dsl: ${r}`),null)})}defineUrlSchemaComponent(r,n){return Ts(()=>L(this,null,function*(){const i=yield this.getDslByUrl(r);return i?(i.name=n||i.name,this.createDslRenderer(i).renderer):null}))}definePluginComponent(r){return Ts(()=>L(this,null,function*(){return yield vs(r,window)}))}}function Vw(e){const t=new vl(e);return{provider:t,onReady:r=>t.ready(r)}}function _s(e={}){const t=Xo(bs,null);if(!t)throw new Error("Can not find provider");if(t.nodeEnv==="development"){const{id:r,version:n}=e;r&&n&&L(this,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}const yl={type:"json",validSuccess:!0,originResponse:!1,failMessage:!0,validate:e=>{var t;return((t=e.data)==null?void 0:t.code)===0}},Uw=(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:yl}),Hw=(e,t="/__vtj__/api/uploader.json")=>(r,n)=>L(void 0,null,function*(){return yield e.send({url:t,method:"post",data:{files:r,projectId:n},settings:st(z({},yl),{type:"data"})}).then(i=>i&&i[0]?i[0]:null).catch(()=>null)});function zw(e){return _n({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 Sn{constructor(t=or){A(this,"api");A(this,"pluginCaches",{});A(this,"uploader");this.api=Uw(t),this.uploader=Hw(t)}getExtension(){return L(this,null,function*(){console.log("BaseService.getExtension")})}init(t){return L(this,null,function*(){return console.log("BaseService.init",t),{}})}saveProject(t,r){return L(this,null,function*(){return!!(yield this.api("saveProject",t,{type:r}).catch(()=>!1))})}saveMaterials(t,r){return L(this,null,function*(){return console.log("BaseService.saveMaterials",t,r),!1})}saveFile(t){return L(this,null,function*(){return console.log("BaseService.saveFile",t),!1})}getFile(t){return L(this,null,function*(){return console.log("BaseService.getFile",t),{}})}removeFile(t){return L(this,null,function*(){return console.log("BaseService.removeFile",t),!1})}saveHistory(t){return L(this,null,function*(){return console.log("BaseService.saveHistory",t),!1})}removeHistory(t){return L(this,null,function*(){return console.log("BaseService.removeHistory",t),!1})}getHistory(t){return L(this,null,function*(){return console.log("BaseService.getHistory",t),{}})}getHistoryItem(t,r){return L(this,null,function*(){return console.log("BaseService.getHistoryItem",t,r),{}})}saveHistoryItem(t,r){return L(this,null,function*(){return console.log("BaseService.saveHistoryItem",t,r),!1})}removeHistoryItem(t,r){return L(this,null,function*(){return console.log("BaseService.removeHistoryItem",t,r),!1})}publish(t){return L(this,null,function*(){return!!(yield this.api("publish",t).catch(()=>!1))})}publishFile(t,r){return L(this,null,function*(){return!!(yield this.api("publishFile",{project:t,file:r}).catch(()=>!1))})}genVueContent(t,r){return L(this,null,function*(){return yield this.api("genVueContent",{project:t,dsl:r}).catch(()=>"")})}createRawPage(t){return L(this,null,function*(){return yield this.api("createRawPage",t).catch(()=>"")})}removeRawPage(t){return L(this,null,function*(){return yield this.api("removeRawPage",t).catch(()=>"")})}uploadStaticFile(t,r){return L(this,null,function*(){return yield this.uploader(t,r).catch(()=>null)})}getStaticFiles(t){return L(this,null,function*(){return yield this.api("getStaticFiles",t).catch(()=>[])})}removeStaticFile(t,r){return L(this,null,function*(){return yield this.api("removeStaticFile",{name:t,projectId:r}).catch(()=>"")})}clearStaticFiles(t){return L(this,null,function*(){return yield this.api("clearStaticFiles",t).catch(()=>"")})}getPluginMaterial(t){return L(this,null,function*(){const{urls:r=[]}=t,n=r.filter(s=>qu(s))[0];return n?this.pluginCaches[n]||(this.pluginCaches[n]=or.send({url:n,method:"get",settings:{validSuccess:!1,originResponse:!0}}).then(s=>s.data).catch(()=>null)):null})}genSource(t){return L(this,null,function*(){return console.log("BaseService.genSource",t),""})}}const mt=new cs({type:"local",expired:0,prefix:"__VTJ_"});class qw extends Sn{init(t){const r=new ue(t),n=mt.get(`project_${r.id}`),i=Object.assign(r.toDsl(),n||{});return mt.save(`project_${r.id}`,i),Promise.resolve(i)}saveProject(t){const r=new ue(t);return mt.save(`project_${r.id}`,r.toDsl()),Promise.resolve(!0)}saveMaterials(t,r){return mt.save(`materials_${t.id}`,fn(r)),Promise.resolve(!0)}saveFile(t){return mt.save(`file_${t.id}`,t),Promise.resolve(!0)}getFile(t){const r=mt.get(`file_${t}`);return r?Promise.resolve(r):Promise.reject(null)}removeFile(t){return mt.remove(`file_${t}`),Promise.resolve(!0)}saveHistory(t){return mt.save(`history_${t.id}`,t),Promise.resolve(!0)}removeHistory(t){const r=mt.get(`history_${t}`);if(r){const n=(r.items||[]).map(i=>i.id);this.removeHistoryItem(t,n),mt.remove(`history_${t}`)}return Promise.resolve(!0)}getHistory(t){const r=mt.get(`history_${t}`),n=new Xi(r||{id:t});return Promise.resolve(n.toDsl())}getHistoryItem(t,r){const n=mt.get(`history_${t}_${r}`);return Promise.resolve(n)}saveHistoryItem(t,r){return mt.save(`history_${t}_${r.id}`,r),Promise.resolve(!0)}removeHistoryItem(t,r){return r.forEach(n=>{mt.remove(`history_${t}_${n}`)}),Promise.resolve(!0)}}class bl extends Sn{constructor(){super(...arguments);A(this,"projects",{});A(this,"materials",{});A(this,"files",{});A(this,"histories",{});A(this,"historyItems",{})}init(r){const n=new ue(r),i=this.projects[n.id]||{},s=Object.assign(n.toDsl(),i);return this.projects[s.id]=s,Promise.resolve(s)}saveProject(r){const n=new ue(r);return this.projects[n.id]=n.toDsl(),Promise.resolve(!0)}saveMaterials(r,n){return r.id&&(this.materials[r.id]=fn(n)),Promise.resolve(!0)}saveFile(r){return this.files[r.id]=r,Promise.resolve(!0)}getFile(r){const n=this.files[r];return n?Promise.resolve(n):Promise.reject(null)}removeFile(r){return delete this.files[r],Promise.resolve(!0)}saveHistory(r){return this.histories[r.id]=r,Promise.resolve(!0)}removeHistory(r){const n=this.histories[r];if(n){const i=(n.items||[]).map(s=>s.id);this.removeHistoryItem(r,i),delete this.historyItems[r]}return Promise.resolve(!0)}getHistory(r){const n=this.histories[r],i=new Xi(n||{id:r});return Promise.resolve(i)}getHistoryItem(r,n){const i=`${r}_${n}`,s=this.historyItems[i]||{};return Promise.resolve(s)}saveHistoryItem(r,n){const i=`${r}_${n.id}`;return this.historyItems[i]=n,Promise.resolve(!0)}removeHistoryItem(r,n){return n.forEach(i=>{const s=`${r}_${i}`;delete this.historyItems[s]}),Promise.resolve(!0)}}let Jn=null;function Kw(){return Jn||(Jn=new bl,Jn)}class Jw extends Sn{constructor(){super(...arguments);A(this,"getFileCaches",{})}getExtension(){return L(this,null,function*(){return yield this.api("getExtension",{}).catch(()=>{})})}init(r){return L(this,null,function*(){return(yield this.api("init",r).catch(()=>null))||{}})}saveProject(r,n){return L(this,null,function*(){return!!(yield this.api("saveProject",r,{type:n}).catch(()=>!1))})}saveMaterials(r,n){return L(this,null,function*(){return!!(yield this.api("saveMaterials",{project:r,materials:fn(n)}).catch(()=>!1))})}saveFile(r){return L(this,null,function*(){return!!(yield this.api("saveFile",r).catch(()=>!1))})}getFile(r){return L(this,null,function*(){return this.getFileCaches[r]||(this.getFileCaches[r]=this.api("getFile",r).catch(()=>null)).finally(()=>{delete this.getFileCaches[r]})})}removeFile(r){return L(this,null,function*(){return!!(yield this.api("removeFile",r).catch(()=>!1))})}saveHistory(r){return L(this,null,function*(){return!!(yield this.api("saveHistory",r).catch(()=>!1))})}removeHistory(r){return L(this,null,function*(){return!!(yield this.api("removeHistory",r).catch(()=>!1))})}getHistory(r){return L(this,null,function*(){return(yield this.api("getHistory",r).catch(()=>null))||{}})}getHistoryItem(r,n){return L(this,null,function*(){return(yield this.api("getHistoryItem",{fId:r,id:n}).catch(()=>null))||{}})}saveHistoryItem(r,n){return L(this,null,function*(){return!!(yield this.api("saveHistoryItem",{fId:r,item:n}).catch(()=>!1))})}removeHistoryItem(r,n){return L(this,null,function*(){return!!(yield this.api("removeHistoryItem",{fId:r,ids:n}).catch(()=>!1))})}}function _l(e,t,r=[]){return r.map(n=>{const{id:i,title:s,icon:o,children:a,hidden:u}=n;return{id:i,title:s,icon:o,hidden:u,url:`${e}/${t}/${i}`,children:a&&a.length?_l(e,t,a):void 0}})}function wl(e,t){if(!t)return e;let r=[];for(const n of e)if(n.children&&n.children.length){const i=wl(n.children,t);i.length&&(n.children=i,r.push(n))}else t.can(n.id.toString())&&r.push(n);return r}function Ww(e){const{menuPathPrefix:t="",pageRouteName:r="page",disableMenusFilter:n=!1}=e||{},i=_s(),s=ra(),o=nl(),a=Ur(!1),u=Ur(!1),c=i.project;Ol(()=>{const{name:h,params:p,meta:d}=s;if(h===Oe){const m=i.getPage(p.id);a.value=!(m!=null&&m.mask),u.value=!!(m!=null&&m.pure)}else if(h===Qe){const m=i.getHomepage();a.value=!(m!=null&&m.mask),u.value=!!(m!=null&&m.pure)}else a.value=!d.mask,u.value=!!d.pure});const l=_l(t,r,c==null?void 0:c.pages),f=c==null?void 0:c.config;return{disabled:a,logo:f==null?void 0:f.logo,themeSwitchable:f==null?void 0:f.themeSwitchable,title:(f==null?void 0:f.title)||(c==null?void 0:c.description)||(c==null?void 0:c.name)||"VTJ App",menus:n?l:wl(l,o),pure:u}}const M2=Object.freeze(Object.defineProperty({__proto__:null,ACCESS_KEY:ms,Access:rl,BUILD_IN_TAGS:zu,BUILT_IN_DIRECTIVES:Vu,BaseService:Sn,CONTEXT_HOST:ji,Context:ll,ContextMode:ht,DATA_TYPES:Uu,HOMEPAGE_ROUTE_NAME:Qe,HTML_TAGS:Hu,JSCodeToString:G_,LIFE_CYCLES_LIST:J_,LocalService:Jw,MemoryService:bl,NodeEnv:gl,PAGE_ROUTE_NAME:Oe,Provider:vl,Startup:ml,StorageService:qw,VTJ_RENDERER_VERSION:hs,adoptedStyleSheets:ds,clearLoaderCache:aw,createAdapter:Q_,createAssetScripts:W_,createAssetsCss:Y_,createDataSources:fl,createLoader:Xr,createMemoryService:Kw,createMetaApi:sl,createMock:cl,createProvider:Vw,createRenderer:Qr,createSchemaApi:il,createSchemaApis:ol,createServiceRequest:zw,defaultLoader:hl,fillBasePath:Ye,getMock:Ce,getModifiers:ys,getPlugin:vs,getRawComponent:Wu,isBuiltInTag:Xu,isCSSUrl:wn,isJSCode:el,isJSExpression:wt,isJSFunction:Ie,isJSON:qu,isJSUrl:En,isNativeTag:tl,isVuePlugin:Qu,loadCss:Yu,loadCssUrl:Gu,loadScriptUrl:Zu,mockApi:ul,mockApis:al,mockCleanup:gs,nodeRender:ar,parseDeps:Ju,parseExpression:Pe,parseFunction:Zr,providerKey:bs,removeProdFlag:Ku,toString:ps,useAccess:nl,useMask:Ww,useProvider:_s},Symbol.toStringTag,{value:"Module"})),Yw=tn({__name:"app",setup(e){return(t,r)=>{const n=Bl("router-view");return Wn(),$s(Os(Hl),{locale:Os(Ul)},{default:As(()=>[(Wn(),$s(Ml,null,{default:As(()=>[Il(n)]),_:1}))]),_:1},8,["locale"])}}}),Gw=[{path:"/",name:"home",component:()=>Ve(()=>import("./index-2Jp4B2N8.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]),import.meta.url)},{path:"/preview/:id",name:"preview",component:()=>Ve(()=>import("./preview-DY0TSY6p.js"),__vite__mapDeps([21,13,14,1,2,3,4,5,6,7,8,9,10,11,12,15,16,17,18]),import.meta.url)},{path:"/page/:id",name:"page",component:()=>Ve(()=>import("./page-V0hkKlxc.js"),__vite__mapDeps([22,13,14,1,2,3,4,5,6,7,8,9,10,11,12,15,16,17,18]),import.meta.url),meta:{pure:!0}},{path:"/pages/:id",name:"page",component:()=>Ve(()=>import("./uni-page-ByIXJ059.js"),__vite__mapDeps([23,1,2,19,24]),import.meta.url),meta:{pure:!0}},{path:"/auth",name:"auth",component:()=>Ve(()=>import("./auth-C_sSG0Ju.js"),__vite__mapDeps([25,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,19,26]),import.meta.url)}],Zw=Ll({history:Vl(),routes:Gw}),Qw="RRO_IDE_ACCESS_STORAGE__",ws=Fl(Yw),Xw=new rl({storageKey:Qw});ws.use(Xw);ws.use(Zw);ws.mount("#app");export{Gc as $,Q_ as A,fi as B,ae as C,hi as D,Yc as E,Wc as F,G,nt as H,zw as I,ce as J,A0 as K,ya as L,rl as M,We as N,Jw as O,re as P,Xi as Q,yy as R,T_ as S,Vw as T,Zi as U,kr as V,Qi as W,si as X,j0 as Y,ct as Z,$_ as _,Qw as a,t1 as a0,nc as a1,s1 as a2,Ju as a3,Y_ as a4,W_ as a5,r1 as a6,Wu as a7,ol as a8,gs as a9,al as aa,Jr as ab,zi as ac,aw as ad,wt as ae,Ie as af,E_ as ag,Pe as ah,Zr as ai,Ke as aj,Vu as ak,c1 as al,G_ as am,J_ as an,Uu as ao,cl as ap,S_ as aq,P0 as ar,Vi as as,M2 as at,p2 as au,B2 as av,wn as aw,En as ax,Gu as ay,Zu as az,Fr as b,kc as c,Dt as d,gt as e,Ji as f,Nt as g,py as h,nr as i,z_ as j,ds as k,zc as l,ay as m,xe as n,bt as o,vl as p,ue as q,I as r,it as s,Ee as t,ui as u,q_ as v,Je as w,us as x,ht as y,Pc as z};
@@ -1,2 +1,2 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./vue-router-Dv428VRb.js","./vue-DpQa2Qs4.js"])))=>i.map(i=>d[i]);
2
- var B=Object.defineProperty,T=Object.defineProperties;var I=Object.getOwnPropertyDescriptors;var A=Object.getOwnPropertySymbols;var S=Object.prototype.hasOwnProperty,V=Object.prototype.propertyIsEnumerable;var O=(o,t,e)=>t in o?B(o,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[t]=e,g=(o,t)=>{for(var e in t||(t={}))S.call(t,e)&&O(o,e,t[e]);if(A)for(var e of A(t))V.call(t,e)&&O(o,e,t[e]);return o},l=(o,t)=>T(o,I(t));var E=(o,t,e)=>new Promise((_,i)=>{var p=a=>{try{s(e.next(a))}catch(m){i(m)}},c=a=>{try{s(e.throw(a))}catch(m){i(m)}},s=a=>a.done?_(a.value):Promise.resolve(a.value).then(p,c);s((e=e.apply(o,t)).next())});import{_ as P}from"./monaco-editor-B8dwQNlP.js";import{useRoute as L}from"./vue-router-Dv428VRb.js";import{A as k,O as D,I as K,M,a as b,T as j,y as G}from"./index-DsCqhanp.js";import{a as H}from"./element-plus-oE4l1K8x.js";import"./vxe-prHpAmaX.js";import{E as N,B as Y}from"./extension-DeER1NbG.js";import{n as R,l as q}from"./utils-Du5uEC3_.js";import{d as z,aC as w,e as F,h as J,K as Q,O as U,P as W,o as X}from"./vue-DpQa2Qs4.js";import"./lodash-es-BL-d_OSa.js";import"./@vueuse-dS-W09Vv.js";import"./@element-plus-icons-vue-CRZvKNrz.js";import"./shared-CFJLz5mK.js";import"./dayjs-DO-COJPZ.js";import"./html2canvas-CIV5arX1.js";import"./mockjs-BEvXV3hb.js";const lt=z({__name:"page",setup(o){return E(this,null,function*(){let t,e;const _=k({loading:q,notify:R}),i=new D(K(R)),p=([t,e]=w(()=>i.getExtension().catch(()=>null)),t=yield t,e(),t),{options:c,adapters:s}=p?([t,e]=w(()=>new N(p).load()),t=yield t,e(),t):{},{__BASE_PATH__:a="/"}=p||{},m=s==null?void 0:s.access,x=s==null?void 0:s.remote,f=m?new M(l(g({},m),{alert:H.alert,storageKey:b})):void 0,{provider:y,onReady:h}=j(l(g({mode:G.Runtime,service:i,materialPath:a,adapter:Object.assign(_,{access:f,remote:x},(c==null?void 0:c.adapter)||{})},c||{}),{dependencies:{Vue:()=>P(()=>import("./vue-DpQa2Qs4.js").then(r=>r.ay),[],import.meta.url),VueRouter:()=>P(()=>import("./vue-router-Dv428VRb.js"),__vite__mapDeps([0,1]),import.meta.url)}})),v=L(),u=F(),d=J();return h(()=>E(this,null,function*(){const r=d==null?void 0:d.appContext.app;r&&(r.use(Y),r.use(y)),u.value=yield y.getRenderComponent(v.params.id.toString(),n=>{Object.assign(v.meta,n.meta);const C=r==null?void 0:r._container;(n==null?void 0:n.type)==="page"&&C.classList.add("is-page"),(n==null?void 0:n.pure)&&C.classList.add("is-pure")})})),(r,n)=>u.value?(X(),Q(W(u.value),{key:0})):U("",!0)})}});export{lt as default};
2
+ var B=Object.defineProperty,T=Object.defineProperties;var I=Object.getOwnPropertyDescriptors;var A=Object.getOwnPropertySymbols;var S=Object.prototype.hasOwnProperty,V=Object.prototype.propertyIsEnumerable;var O=(o,t,e)=>t in o?B(o,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[t]=e,g=(o,t)=>{for(var e in t||(t={}))S.call(t,e)&&O(o,e,t[e]);if(A)for(var e of A(t))V.call(t,e)&&O(o,e,t[e]);return o},l=(o,t)=>T(o,I(t));var E=(o,t,e)=>new Promise((_,i)=>{var p=a=>{try{s(e.next(a))}catch(m){i(m)}},c=a=>{try{s(e.throw(a))}catch(m){i(m)}},s=a=>a.done?_(a.value):Promise.resolve(a.value).then(p,c);s((e=e.apply(o,t)).next())});import{_ as P}from"./monaco-editor-B8dwQNlP.js";import{useRoute as L}from"./vue-router-Dv428VRb.js";import{A as k,O as D,I as K,M,a as b,T as j,y as G}from"./index-B9KVCtyS.js";import{a as H}from"./element-plus-oE4l1K8x.js";import"./vxe-DEIHqUXR.js";import{E as N,B as Y}from"./extension-CGygQNgp.js";import{n as R,l as q}from"./utils-Du5uEC3_.js";import{d as z,aC as w,e as F,h as J,K as Q,O as U,P as W,o as X}from"./vue-DpQa2Qs4.js";import"./lodash-es-BL-d_OSa.js";import"./@vueuse-dS-W09Vv.js";import"./@element-plus-icons-vue-CRZvKNrz.js";import"./shared-CFJLz5mK.js";import"./dayjs-DO-COJPZ.js";import"./html2canvas-CIV5arX1.js";import"./mockjs-BEvXV3hb.js";const lt=z({__name:"page",setup(o){return E(this,null,function*(){let t,e;const _=k({loading:q,notify:R}),i=new D(K(R)),p=([t,e]=w(()=>i.getExtension().catch(()=>null)),t=yield t,e(),t),{options:c,adapters:s}=p?([t,e]=w(()=>new N(p).load()),t=yield t,e(),t):{},{__BASE_PATH__:a="/"}=p||{},m=s==null?void 0:s.access,x=s==null?void 0:s.remote,f=m?new M(l(g({},m),{alert:H.alert,storageKey:b})):void 0,{provider:y,onReady:h}=j(l(g({mode:G.Runtime,service:i,materialPath:a,adapter:Object.assign(_,{access:f,remote:x},(c==null?void 0:c.adapter)||{})},c||{}),{dependencies:{Vue:()=>P(()=>import("./vue-DpQa2Qs4.js").then(r=>r.ay),[],import.meta.url),VueRouter:()=>P(()=>import("./vue-router-Dv428VRb.js"),__vite__mapDeps([0,1]),import.meta.url)}})),v=L(),u=F(),d=J();return h(()=>E(this,null,function*(){const r=d==null?void 0:d.appContext.app;r&&(r.use(Y),r.use(y)),u.value=yield y.getRenderComponent(v.params.id.toString(),n=>{Object.assign(v.meta,n.meta);const C=r==null?void 0:r._container;(n==null?void 0:n.type)==="page"&&C.classList.add("is-page"),(n==null?void 0:n.pure)&&C.classList.add("is-pure")})})),(r,n)=>u.value?(X(),Q(W(u.value),{key:0})):U("",!0)})}});export{lt as default};
@@ -1,2 +1,2 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./vue-router-Dv428VRb.js","./vue-DpQa2Qs4.js"])))=>i.map(i=>d[i]);
2
- var B=Object.defineProperty,T=Object.defineProperties;var I=Object.getOwnPropertyDescriptors;var C=Object.getOwnPropertySymbols;var S=Object.prototype.hasOwnProperty,V=Object.prototype.propertyIsEnumerable;var A=(o,t,e)=>t in o?B(o,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[t]=e,l=(o,t)=>{for(var e in t||(t={}))S.call(t,e)&&A(o,e,t[e]);if(C)for(var e of C(t))V.call(t,e)&&A(o,e,t[e]);return o},O=(o,t)=>T(o,I(t));var g=(o,t,e)=>new Promise((_,i)=>{var p=a=>{try{s(e.next(a))}catch(m){i(m)}},c=a=>{try{s(e.throw(a))}catch(m){i(m)}},s=a=>a.done?_(a.value):Promise.resolve(a.value).then(p,c);s((e=e.apply(o,t)).next())});import{_ as w}from"./monaco-editor-B8dwQNlP.js";import{useRoute as L}from"./vue-router-Dv428VRb.js";import{a as k}from"./element-plus-oE4l1K8x.js";import"./vxe-prHpAmaX.js";import{E as D,B as K}from"./extension-DeER1NbG.js";import{A as M,O as b,I as j,M as G,a as H,T as N,y as Y}from"./index-DsCqhanp.js";import{n as P,l as q}from"./utils-Du5uEC3_.js";import{d as z,aC as R,e as F,h as J,K as Q,O as U,P as W,o as X}from"./vue-DpQa2Qs4.js";import"./lodash-es-BL-d_OSa.js";import"./@vueuse-dS-W09Vv.js";import"./@element-plus-icons-vue-CRZvKNrz.js";import"./shared-CFJLz5mK.js";import"./dayjs-DO-COJPZ.js";import"./html2canvas-CIV5arX1.js";import"./mockjs-BEvXV3hb.js";const gt=z({__name:"preview",setup(o){return g(this,null,function*(){let t,e;const _=M({loading:q,notify:P}),i=new b(j(P)),p=([t,e]=R(()=>i.getExtension().catch(()=>null)),t=yield t,e(),t),{options:c,adapters:s}=p?([t,e]=R(()=>new D(p).load()),t=yield t,e(),t):{},{__BASE_PATH__:a="/"}=p||{},m=s==null?void 0:s.access,x=s==null?void 0:s.remote,f=m?new G(l({alert:k.alert,storageKey:H},m)):void 0,{provider:E,onReady:h}=N(O(l({mode:Y.Runtime,service:i,materialPath:a},c||{}),{adapter:Object.assign(_,{access:f,remote:x},(c==null?void 0:c.adapter)||{}),dependencies:{Vue:()=>w(()=>import("./vue-DpQa2Qs4.js").then(r=>r.ay),[],import.meta.url),VueRouter:()=>w(()=>import("./vue-router-Dv428VRb.js"),__vite__mapDeps([0,1]),import.meta.url)}})),v=L(),u=F(),d=J();return h(()=>g(this,null,function*(){const r=d==null?void 0:d.appContext.app;r&&(r.use(K),r.use(E)),u.value=yield E.getRenderComponent(v.params.id.toString(),n=>{Object.assign(v.meta,n.meta);const y=r==null?void 0:r._container;(n==null?void 0:n.type)==="page"&&y.classList.add("is-page"),(n==null?void 0:n.pure)&&y.classList.add("is-pure")})})),(r,n)=>u.value?(X(),Q(W(u.value),{key:0})):U("",!0)})}});export{gt as default};
2
+ var B=Object.defineProperty,T=Object.defineProperties;var I=Object.getOwnPropertyDescriptors;var C=Object.getOwnPropertySymbols;var S=Object.prototype.hasOwnProperty,V=Object.prototype.propertyIsEnumerable;var A=(o,t,e)=>t in o?B(o,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[t]=e,l=(o,t)=>{for(var e in t||(t={}))S.call(t,e)&&A(o,e,t[e]);if(C)for(var e of C(t))V.call(t,e)&&A(o,e,t[e]);return o},O=(o,t)=>T(o,I(t));var g=(o,t,e)=>new Promise((_,i)=>{var p=a=>{try{s(e.next(a))}catch(m){i(m)}},c=a=>{try{s(e.throw(a))}catch(m){i(m)}},s=a=>a.done?_(a.value):Promise.resolve(a.value).then(p,c);s((e=e.apply(o,t)).next())});import{_ as w}from"./monaco-editor-B8dwQNlP.js";import{useRoute as L}from"./vue-router-Dv428VRb.js";import{a as k}from"./element-plus-oE4l1K8x.js";import"./vxe-DEIHqUXR.js";import{E as D,B as K}from"./extension-CGygQNgp.js";import{A as M,O as b,I as j,M as G,a as H,T as N,y as Y}from"./index-B9KVCtyS.js";import{n as P,l as q}from"./utils-Du5uEC3_.js";import{d as z,aC as R,e as F,h as J,K as Q,O as U,P as W,o as X}from"./vue-DpQa2Qs4.js";import"./lodash-es-BL-d_OSa.js";import"./@vueuse-dS-W09Vv.js";import"./@element-plus-icons-vue-CRZvKNrz.js";import"./shared-CFJLz5mK.js";import"./dayjs-DO-COJPZ.js";import"./html2canvas-CIV5arX1.js";import"./mockjs-BEvXV3hb.js";const gt=z({__name:"preview",setup(o){return g(this,null,function*(){let t,e;const _=M({loading:q,notify:P}),i=new b(j(P)),p=([t,e]=R(()=>i.getExtension().catch(()=>null)),t=yield t,e(),t),{options:c,adapters:s}=p?([t,e]=R(()=>new D(p).load()),t=yield t,e(),t):{},{__BASE_PATH__:a="/"}=p||{},m=s==null?void 0:s.access,x=s==null?void 0:s.remote,f=m?new G(l({alert:k.alert,storageKey:H},m)):void 0,{provider:E,onReady:h}=N(O(l({mode:Y.Runtime,service:i,materialPath:a},c||{}),{adapter:Object.assign(_,{access:f,remote:x},(c==null?void 0:c.adapter)||{}),dependencies:{Vue:()=>w(()=>import("./vue-DpQa2Qs4.js").then(r=>r.ay),[],import.meta.url),VueRouter:()=>w(()=>import("./vue-router-Dv428VRb.js"),__vite__mapDeps([0,1]),import.meta.url)}})),v=L(),u=F(),d=J();return h(()=>g(this,null,function*(){const r=d==null?void 0:d.appContext.app;r&&(r.use(K),r.use(E)),u.value=yield E.getRenderComponent(v.params.id.toString(),n=>{Object.assign(v.meta,n.meta);const y=r==null?void 0:r._container;(n==null?void 0:n.type)==="page"&&y.classList.add("is-page"),(n==null?void 0:n.pure)&&y.classList.add("is-pure")})})),(r,n)=>u.value?(X(),Q(W(u.value),{key:0})):U("",!0)})}});export{gt as default};