@vtj/pro 0.10.14 → 0.10.15

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 (29) hide show
  1. package/README.md +105 -0
  2. package/dist/@vtj/materials/assets/antdv/index.umd.js +2 -2
  3. package/dist/@vtj/materials/assets/charts/index.umd.js +2 -2
  4. package/dist/@vtj/materials/assets/element/index.umd.js +2 -2
  5. package/dist/@vtj/materials/assets/ui/index.umd.js +2 -2
  6. package/dist/@vtj/materials/assets/uni-h5/index.umd.js +2 -2
  7. package/dist/@vtj/materials/assets/uni-ui/index.umd.js +2 -2
  8. package/dist/@vtj/materials/assets/vant/index.umd.js +2 -2
  9. package/dist/@vtj/materials/deps/@vtj/charts/index.umd.js +2 -2
  10. package/dist/@vtj/materials/deps/@vtj/icons/index.umd.js +2 -2
  11. package/dist/@vtj/materials/deps/@vtj/ui/index.umd.js +2 -2
  12. package/dist/@vtj/materials/deps/@vtj/utils/index.umd.js +3 -3
  13. package/dist/assets/auth-C8lTUs_h.css +1 -0
  14. package/dist/assets/auth-DA1mfYXi.js +1 -0
  15. package/dist/assets/{extension-BjjqxGHx.css → extension-DYYKpooH.css} +1 -1
  16. package/dist/assets/{extension-kftWXojB.js → extension-YQJ_fg-F.js} +50 -50
  17. package/dist/assets/index-6aoo888I.css +1 -0
  18. package/dist/assets/{index-BE_ghj_v.js → index-B5dNOhMJ.js} +10 -10
  19. package/dist/assets/index-fMh9I_lk.js +1 -0
  20. package/dist/assets/{page-Cl1zW7OU.js → page-DBocEj87.js} +1 -1
  21. package/dist/assets/{preview-CdZWNi1g.js → preview-Ck1S6FvZ.js} +1 -1
  22. package/dist/index.html +3 -3
  23. package/dist/uni/assets/{index-BDr_Qpyh.js → index-DkfhQd6q.js} +6 -6
  24. package/dist/uni/index.html +1 -1
  25. package/package.json +30 -13
  26. package/dist/assets/auth-DwMNsYC3.js +0 -1
  27. package/dist/assets/auth-rAe8S_7e.css +0 -1
  28. package/dist/assets/index-DkxHwSWL.js +0 -1
  29. package/dist/assets/index-qxxdDj8s.css +0 -1
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-DkxHwSWL.js","./vue-router-D8EXeL0F.js","./vue-DnfbZNhx.js","./element-plus-DD5kVcxH.js","./lodash-es-BL-d_OSa.js","./@vueuse-DVn-X0V4.js","./@element-plus-icons-vue-CKT2Xck5.js","./shared-CFJLz5mK.js","./dayjs-DO-COJPZ.js","./element-plus-CfFwvTok.css","./vxe-CFTIhv1S.js","./vxe-BAb1d5vW.css","./extension-kftWXojB.js","./monaco-editor-B8dwQNlP.js","./monaco-editor-Cpw7ccEV.css","./html2canvas-CIV5arX1.js","./mockjs-BSD1DCM1.js","./extension-BjjqxGHx.css","./utils-DTAkbY9y.js","./_plugin-vue_export-helper-DlAUqK2U.js","./index-qxxdDj8s.css","./preview-CdZWNi1g.js","./page-Cl1zW7OU.js","./uni-page-Bjgk97mC.js","./uni-page-Diqmj53r.css","./auth-DwMNsYC3.js","./auth-rAe8S_7e.css"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-fMh9I_lk.js","./vue-router-D8EXeL0F.js","./vue-DnfbZNhx.js","./element-plus-DD5kVcxH.js","./lodash-es-BL-d_OSa.js","./@vueuse-DVn-X0V4.js","./@element-plus-icons-vue-CKT2Xck5.js","./shared-CFJLz5mK.js","./dayjs-DO-COJPZ.js","./element-plus-CfFwvTok.css","./vxe-CFTIhv1S.js","./vxe-BAb1d5vW.css","./extension-YQJ_fg-F.js","./monaco-editor-B8dwQNlP.js","./monaco-editor-Cpw7ccEV.css","./html2canvas-CIV5arX1.js","./mockjs-BSD1DCM1.js","./extension-DYYKpooH.css","./utils-DTAkbY9y.js","./_plugin-vue_export-helper-DlAUqK2U.js","./index-6aoo888I.css","./preview-Ck1S6FvZ.js","./page-DBocEj87.js","./uni-page-Bjgk97mC.js","./uni-page-Diqmj53r.css","./auth-DA1mfYXi.js","./auth-C8lTUs_h.css"])))=>i.map(i=>d[i]);
2
2
  var pl=Object.defineProperty,dl=Object.defineProperties;var ml=Object.getOwnPropertyDescriptors;var vr=Object.getOwnPropertySymbols;var vs=Object.prototype.hasOwnProperty,ys=Object.prototype.propertyIsEnumerable;var de=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),gl=e=>{throw TypeError(e)};var En=(e,t,r)=>t in e?pl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,z=(e,t)=>{for(var r in t||(t={}))vs.call(t,r)&&En(e,r,t[r]);if(vr)for(var r of vr(t))ys.call(t,r)&&En(e,r,t[r]);return e},st=(e,t)=>dl(e,ml(t));var bs=(e,t)=>{var r={};for(var n in e)vs.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&vr)for(var n of vr(e))t.indexOf(n)<0&&ys.call(e,n)&&(r[n]=e[n]);return r};var $=(e,t,r)=>En(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},Sn=(e,t,r)=>{var n=(o,a,u,c)=>{try{var l=r[o](a),f=(a=l.value)instanceof Gt,p=l.done;Promise.resolve(f?a[0]:a).then(h=>f?n(o==="return"?o:"next",a[1]?{done:h.done,value:h.value}:h,u,c):u({value:h,done:p})).catch(h=>n("throw",h,u,c))}catch(h){c(h)}},i=o=>s[o]=a=>new Promise((u,c)=>n(o,a,u,c)),s={};return r=r.apply(e,t),s[de("asyncIterator")]=()=>s,i("next"),i("throw"),i("return"),s},xn=e=>{var t=e[de("asyncIterator")],r=!1,n,i={};return t==null?(t=e[de("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||gl("Object expected"),a(u)}),1)}}),i[de("iterator")]=()=>i,n("next"),"throw"in t?n("throw"):i.throw=s=>{throw s},"return"in t&&n("return"),i},_s=(e,t,r)=>(t=e[de("asyncIterator")])?t.call(e):(e=e[de("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{ay as Xr,d as Oi,az as ws,v as Go,e as Hn,w as vl,ah as zn,K as Es,u as Ss,ai as yl,o as xs,L as Ts,aA as bl,T as _l,av as wl}from"./vue-DnfbZNhx.js";import{useRoute as Zo,createRouter as El,createWebHashHistory as Sl}from"./vue-router-D8EXeL0F.js";import{z as xl,E as Tl}from"./element-plus-DD5kVcxH.js";import{_ as Ue}from"./monaco-editor-B8dwQNlP.js";import"./lodash-es-BL-d_OSa.js";import"./@vueuse-DVn-X0V4.js";import"./@element-plus-icons-vue-CKT2Xck5.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 Ol={ENV_TYPE:"live",NODE_ENV:"production"},Al=typeof global=="object"&&global&&global.Object===Object&&global;const Qo=Al;var $l=typeof self=="object"&&self&&self.Object===Object&&self,Rl=Qo||$l||Function("return this")();const $t=Rl;var jl=$t.Symbol;const Ct=jl;var Xo=Object.prototype,Dl=Xo.hasOwnProperty,Cl=Xo.toString,He=Ct?Ct.toStringTag:void 0;function Pl(e){var t=Dl.call(e,He),r=e[He];try{e[He]=void 0;var n=!0}catch(s){}var i=Cl.call(e);return n&&(t?e[He]=r:delete e[He]),i}var Bl=Object.prototype,Nl=Bl.toString;function kl(e){return Nl.call(e)}var Il="[object Null]",Ml="[object Undefined]",Os=Ct?Ct.toStringTag:void 0;function Et(e){return e==null?e===void 0?Ml:Il:Os&&Os in Object(e)?Pl(e):kl(e)}function at(e){return e!=null&&typeof e=="object"}var Fl="[object Symbol]";function ur(e){return typeof e=="symbol"||at(e)&&Et(e)==Fl}function ta(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 Ll=Array.isArray;const pt=Ll;var As=Ct?Ct.prototype:void 0,$s=As?As.toString:void 0;function ea(e){if(typeof e=="string")return e;if(pt(e))return ta(e,ea)+"";if(ur(e))return $s?$s.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var Vl=/\s/;function Ul(e){for(var t=e.length;t--&&Vl.test(e.charAt(t)););return t}var Hl=/^\s+/;function zl(e){return e&&e.slice(0,Ul(e)+1).replace(Hl,"")}function ct(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Rs=NaN,ql=/^[-+]0x[0-9a-f]+$/i,Kl=/^0b[01]+$/i,Jl=/^0o[0-7]+$/i,Wl=parseInt;function js(e){if(typeof e=="number")return e;if(ur(e))return Rs;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=zl(e);var r=Kl.test(e);return r||Jl.test(e)?Wl(e.slice(2),r?2:8):ql.test(e)?Rs:+e}function Ai(e){return e}var Yl="[object AsyncFunction]",Gl="[object Function]",Zl="[object GeneratorFunction]",Ql="[object Proxy]";function ae(e){if(!ct(e))return!1;var t=Et(e);return t==Gl||t==Zl||t==Yl||t==Ql}var Xl=$t["__core-js_shared__"];const Tn=Xl;var Ds=function(){var e=/[^.]+$/.exec(Tn&&Tn.keys&&Tn.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function tf(e){return!!Ds&&Ds in e}var ef=Function.prototype,rf=ef.toString;function le(e){if(e!=null){try{return rf.call(e)}catch(t){}try{return e+""}catch(t){}}return""}var nf=/[\\^$.*+?()[\]{}|]/g,sf=/^\[object .+?Constructor\]$/,of=Function.prototype,af=Object.prototype,cf=of.toString,uf=af.hasOwnProperty,lf=RegExp("^"+cf.call(uf).replace(nf,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ff(e){if(!ct(e)||tf(e))return!1;var t=ae(e)?lf:sf;return t.test(le(e))}function hf(e,t){return e==null?void 0:e[t]}function fe(e,t){var r=hf(e,t);return ff(r)?r:void 0}var pf=fe($t,"WeakMap");const qn=pf;var Cs=Object.create,df=function(){function e(){}return function(t){if(!ct(t))return{};if(Cs)return Cs(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();const mf=df;function ra(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 gf(){}function vf(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}var yf=800,bf=16,_f=Date.now;function wf(e){var t=0,r=0;return function(){var n=_f(),i=bf-(n-r);if(r=n,i>0){if(++t>=yf)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Ef(e){return function(){return e}}var Sf=function(){try{var e=fe(Object,"defineProperty");return e({},"",{}),e}catch(t){}}();const Ur=Sf;var xf=Ur?function(e,t){return Ur(e,"toString",{configurable:!0,enumerable:!1,value:Ef(t),writable:!0})}:Ai;const Tf=xf;var Of=wf(Tf);const Af=Of;function $f(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}var Rf=9007199254740991,jf=/^(?:0|[1-9]\d*)$/;function tn(e,t){var r=typeof e;return t=t!=null?t:Rf,!!t&&(r=="number"||r!="symbol"&&jf.test(e))&&e>-1&&e%1==0&&e<t}function en(e,t,r){t=="__proto__"&&Ur?Ur(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function Ne(e,t){return e===t||e!==e&&t!==t}var Df=Object.prototype,Cf=Df.hasOwnProperty;function $i(e,t,r){var n=e[t];(!(Cf.call(e,t)&&Ne(n,r))||r===void 0&&!(t in e))&&en(e,t,r)}function na(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?en(r,a,u):$i(r,a,u)}return r}var Ps=Math.max;function Pf(e,t,r){return t=Ps(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,s=Ps(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),ra(e,this,a)}}function ia(e,t){return Af(Pf(e,t,Ai),e+"")}var Bf=9007199254740991;function Ri(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Bf}function lr(e){return e!=null&&Ri(e.length)&&!ae(e)}function sa(e,t,r){if(!ct(r))return!1;var n=typeof t;return(n=="number"?lr(r)&&tn(t,r.length):n=="string"&&t in r)?Ne(r[t],e):!1}function oa(e){return ia(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&&sa(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 Nf=Object.prototype;function ji(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Nf;return e===r}function kf(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var If="[object Arguments]";function Bs(e){return at(e)&&Et(e)==If}var aa=Object.prototype,Mf=aa.hasOwnProperty,Ff=aa.propertyIsEnumerable,Lf=Bs(function(){return arguments}())?Bs:function(e){return at(e)&&Mf.call(e,"callee")&&!Ff.call(e,"callee")};const Hr=Lf;function Vf(){return!1}var ca=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ns=ca&&typeof module=="object"&&module&&!module.nodeType&&module,Uf=Ns&&Ns.exports===ca,ks=Uf?$t.Buffer:void 0,Hf=ks?ks.isBuffer:void 0,zf=Hf||Vf;const Re=zf;var qf="[object Arguments]",Kf="[object Array]",Jf="[object Boolean]",Wf="[object Date]",Yf="[object Error]",Gf="[object Function]",Zf="[object Map]",Qf="[object Number]",Xf="[object Object]",th="[object RegExp]",eh="[object Set]",rh="[object String]",nh="[object WeakMap]",ih="[object ArrayBuffer]",sh="[object DataView]",oh="[object Float32Array]",ah="[object Float64Array]",ch="[object Int8Array]",uh="[object Int16Array]",lh="[object Int32Array]",fh="[object Uint8Array]",hh="[object Uint8ClampedArray]",ph="[object Uint16Array]",dh="[object Uint32Array]",X={};X[oh]=X[ah]=X[ch]=X[uh]=X[lh]=X[fh]=X[hh]=X[ph]=X[dh]=!0,X[qf]=X[Kf]=X[ih]=X[Jf]=X[sh]=X[Wf]=X[Yf]=X[Gf]=X[Zf]=X[Qf]=X[Xf]=X[th]=X[eh]=X[rh]=X[nh]=!1;function mh(e){return at(e)&&Ri(e.length)&&!!X[Et(e)]}function fr(e){return function(t){return e(t)}}var ua=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ze=ua&&typeof module=="object"&&module&&!module.nodeType&&module,gh=Ze&&Ze.exports===ua,On=gh&&Qo.process,vh=function(){try{var e=Ze&&Ze.require&&Ze.require("util").types;return e||On&&On.binding&&On.binding("util")}catch(t){}}();const Pt=vh;var Is=Pt&&Pt.isTypedArray,yh=Is?fr(Is):mh;const Di=yh;var bh=Object.prototype,_h=bh.hasOwnProperty;function la(e,t){var r=pt(e),n=!r&&Hr(e),i=!r&&!n&&Re(e),s=!r&&!n&&!i&&Di(e),o=r||n||i||s,a=o?kf(e.length,String):[],u=a.length;for(var c in e)(t||_h.call(e,c))&&!(o&&(c=="length"||i&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||tn(c,u)))&&a.push(c);return a}function fa(e,t){return function(r){return e(t(r))}}var wh=fa(Object.keys,Object);const Eh=wh;var Sh=Object.prototype,xh=Sh.hasOwnProperty;function Th(e){if(!ji(e))return Eh(e);var t=[];for(var r in Object(e))xh.call(e,r)&&r!="constructor"&&t.push(r);return t}function rn(e){return lr(e)?la(e):Th(e)}function Oh(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var Ah=Object.prototype,$h=Ah.hasOwnProperty;function Rh(e){if(!ct(e))return Oh(e);var t=ji(e),r=[];for(var n in e)n=="constructor"&&(t||!$h.call(e,n))||r.push(n);return r}function Ci(e){return lr(e)?la(e,!0):Rh(e)}var jh=oa(function(e,t,r,n){na(t,Ci(t),e,n)});const Ms=jh;var Dh=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ch=/^\w*$/;function Pi(e,t){if(pt(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||ur(e)?!0:Ch.test(e)||!Dh.test(e)||t!=null&&e in Object(t)}var Ph=fe(Object,"create");const er=Ph;function Bh(){this.__data__=er?er(null):{},this.size=0}function Nh(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var kh="__lodash_hash_undefined__",Ih=Object.prototype,Mh=Ih.hasOwnProperty;function Fh(e){var t=this.__data__;if(er){var r=t[e];return r===kh?void 0:r}return Mh.call(t,e)?t[e]:void 0}var Lh=Object.prototype,Vh=Lh.hasOwnProperty;function Uh(e){var t=this.__data__;return er?t[e]!==void 0:Vh.call(t,e)}var Hh="__lodash_hash_undefined__";function zh(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=er&&t===void 0?Hh:t,this}function te(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])}}te.prototype.clear=Bh,te.prototype.delete=Nh,te.prototype.get=Fh,te.prototype.has=Uh,te.prototype.set=zh;function qh(){this.__data__=[],this.size=0}function nn(e,t){for(var r=e.length;r--;)if(Ne(e[r][0],t))return r;return-1}var Kh=Array.prototype,Jh=Kh.splice;function Wh(e){var t=this.__data__,r=nn(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Jh.call(t,r,1),--this.size,!0}function Yh(e){var t=this.__data__,r=nn(t,e);return r<0?void 0:t[r][1]}function Gh(e){return nn(this.__data__,e)>-1}function Zh(e,t){var r=this.__data__,n=nn(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,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=qh,It.prototype.delete=Wh,It.prototype.get=Yh,It.prototype.has=Gh,It.prototype.set=Zh;var Qh=fe($t,"Map");const rr=Qh;function Xh(){this.size=0,this.__data__={hash:new te,map:new(rr||It),string:new te}}function tp(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function sn(e,t){var r=e.__data__;return tp(t)?r[typeof t=="string"?"string":"hash"]:r.map}function ep(e){var t=sn(this,e).delete(e);return this.size-=t?1:0,t}function rp(e){return sn(this,e).get(e)}function np(e){return sn(this,e).has(e)}function ip(e,t){var r=sn(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,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=Xh,Mt.prototype.delete=ep,Mt.prototype.get=rp,Mt.prototype.has=np,Mt.prototype.set=ip;var sp="Expected a function";function Bi(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(Bi.Cache||Mt),r}Bi.Cache=Mt;var op=500;function ap(e){var t=Bi(e,function(n){return r.size===op&&r.clear(),n}),r=t.cache;return t}var cp=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,up=/\\(\\)?/g,lp=ap(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(cp,function(r,n,i,s){t.push(i?s.replace(up,"$1"):n||r)}),t});const fp=lp;function he(e){return e==null?"":ea(e)}function Ni(e,t){return pt(e)?e:Pi(e,t)?[e]:fp(he(e))}function hr(e){if(typeof e=="string"||ur(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function ha(e,t){t=Ni(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[hr(t[r++])];return r&&r==n?e:void 0}function pa(e,t,r){var n=e==null?void 0:ha(e,t);return n===void 0?r:n}function hp(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}var pp=fa(Object.getPrototypeOf,Object);const da=pp;var dp="[object Object]",mp=Function.prototype,gp=Object.prototype,ma=mp.toString,vp=gp.hasOwnProperty,yp=ma.call(Object);function ki(e){if(!at(e)||Et(e)!=dp)return!1;var t=da(e);if(t===null)return!0;var r=vp.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&ma.call(r)==yp}var bp="[object DOMException]",_p="[object Error]";function ga(e){if(!at(e))return!1;var t=Et(e);return t==_p||t==bp||typeof e.message=="string"&&typeof e.name=="string"&&!ki(e)}var wp=ia(function(e,t){try{return ra(e,void 0,t)}catch(r){return ga(r)?r:new Error(r)}});const Ep=wp;function Sp(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 xp(e,t,r){var n=e.length;return r=r===void 0?n:r,Sp(e,t,r)}var Tp="\\ud800-\\udfff",Op="\\u0300-\\u036f",Ap="\\ufe20-\\ufe2f",$p="\\u20d0-\\u20ff",Rp=Op+Ap+$p,jp="\\ufe0e\\ufe0f",Dp="\\u200d",Cp=RegExp("["+Dp+Tp+Rp+jp+"]");function va(e){return Cp.test(e)}function Pp(e){return e.split("")}var ya="\\ud800-\\udfff",Bp="\\u0300-\\u036f",Np="\\ufe20-\\ufe2f",kp="\\u20d0-\\u20ff",Ip=Bp+Np+kp,Mp="\\ufe0e\\ufe0f",Fp="["+ya+"]",Kn="["+Ip+"]",Jn="\\ud83c[\\udffb-\\udfff]",Lp="(?:"+Kn+"|"+Jn+")",ba="[^"+ya+"]",_a="(?:\\ud83c[\\udde6-\\uddff]){2}",wa="[\\ud800-\\udbff][\\udc00-\\udfff]",Vp="\\u200d",Ea=Lp+"?",Sa="["+Mp+"]?",Up="(?:"+Vp+"(?:"+[ba,_a,wa].join("|")+")"+Sa+Ea+")*",Hp=Sa+Ea+Up,zp="(?:"+[ba+Kn+"?",Kn,_a,wa,Fp].join("|")+")",qp=RegExp(Jn+"(?="+Jn+")|"+zp+Hp,"g");function Kp(e){return e.match(qp)||[]}function Jp(e){return va(e)?Kp(e):Pp(e)}function xa(e){return function(t){t=he(t);var r=va(t)?Jp(t):void 0,n=r?r[0]:t.charAt(0),i=r?xp(r,1).join(""):t.slice(1);return n[e]()+i}}var Wp=xa("toUpperCase");const on=Wp;function Yp(e){return on(he(e).toLowerCase())}function Gp(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 Ta(e){return function(t){return e==null?void 0:e[t]}}var Zp={À:"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"},Qp=Ta(Zp);const Xp=Qp;var td=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ed="\\u0300-\\u036f",rd="\\ufe20-\\ufe2f",nd="\\u20d0-\\u20ff",id=ed+rd+nd,sd="["+id+"]",od=RegExp(sd,"g");function ad(e){return e=he(e),e&&e.replace(td,Xp).replace(od,"")}var cd=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function ud(e){return e.match(cd)||[]}var ld=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function fd(e){return ld.test(e)}var Oa="\\ud800-\\udfff",hd="\\u0300-\\u036f",pd="\\ufe20-\\ufe2f",dd="\\u20d0-\\u20ff",md=hd+pd+dd,Aa="\\u2700-\\u27bf",$a="a-z\\xdf-\\xf6\\xf8-\\xff",gd="\\xac\\xb1\\xd7\\xf7",vd="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",yd="\\u2000-\\u206f",bd=" \\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",Ra="A-Z\\xc0-\\xd6\\xd8-\\xde",_d="\\ufe0e\\ufe0f",ja=gd+vd+yd+bd,Da="['’]",Fs="["+ja+"]",wd="["+md+"]",Ca="\\d+",Ed="["+Aa+"]",Pa="["+$a+"]",Ba="[^"+Oa+ja+Ca+Aa+$a+Ra+"]",Sd="\\ud83c[\\udffb-\\udfff]",xd="(?:"+wd+"|"+Sd+")",Td="[^"+Oa+"]",Na="(?:\\ud83c[\\udde6-\\uddff]){2}",ka="[\\ud800-\\udbff][\\udc00-\\udfff]",ye="["+Ra+"]",Od="\\u200d",Ls="(?:"+Pa+"|"+Ba+")",Ad="(?:"+ye+"|"+Ba+")",Vs="(?:"+Da+"(?:d|ll|m|re|s|t|ve))?",Us="(?:"+Da+"(?:D|LL|M|RE|S|T|VE))?",Ia=xd+"?",Ma="["+_d+"]?",$d="(?:"+Od+"(?:"+[Td,Na,ka].join("|")+")"+Ma+Ia+")*",Rd="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",jd="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Dd=Ma+Ia+$d,Cd="(?:"+[Ed,Na,ka].join("|")+")"+Dd,Pd=RegExp([ye+"?"+Pa+"+"+Vs+"(?="+[Fs,ye,"$"].join("|")+")",Ad+"+"+Us+"(?="+[Fs,ye+Ls,"$"].join("|")+")",ye+"?"+Ls+"+"+Vs,ye+"+"+Us,jd,Rd,Ca,Cd].join("|"),"g");function Bd(e){return e.match(Pd)||[]}function Nd(e,t,r){return e=he(e),t=t,t===void 0?fd(e)?Bd(e):ud(e):e.match(t)||[]}var kd="['’]",Id=RegExp(kd,"g");function Ii(e){return function(t){return Gp(Nd(ad(t).replace(Id,"")),e,"")}}var Md=Ii(function(e,t,r){return t=t.toLowerCase(),e+(r?Yp(t):t)});const Nt=Md;function Fd(){this.__data__=new It,this.size=0}function Ld(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function Vd(e){return this.__data__.get(e)}function Ud(e){return this.__data__.has(e)}var Hd=200;function zd(e,t){var r=this.__data__;if(r instanceof It){var n=r.__data__;if(!rr||n.length<Hd-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Mt(n)}return r.set(e,t),this.size=r.size,this}function At(e){var t=this.__data__=new It(e);this.size=t.size}At.prototype.clear=Fd,At.prototype.delete=Ld,At.prototype.get=Vd,At.prototype.has=Ud,At.prototype.set=zd;var Fa=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Hs=Fa&&typeof module=="object"&&module&&!module.nodeType&&module,qd=Hs&&Hs.exports===Fa,zs=qd?$t.Buffer:void 0,qs=zs?zs.allocUnsafe:void 0;function La(e,t){if(t)return e.slice();var r=e.length,n=qs?qs(r):new e.constructor(r);return e.copy(n),n}function Kd(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 Jd(){return[]}var Wd=Object.prototype,Yd=Wd.propertyIsEnumerable,Ks=Object.getOwnPropertySymbols,Gd=Ks?function(e){return e==null?[]:(e=Object(e),Kd(Ks(e),function(t){return Yd.call(e,t)}))}:Jd;const Zd=Gd;function Qd(e,t,r){var n=t(e);return pt(e)?n:hp(n,r(e))}function Wn(e){return Qd(e,rn,Zd)}var Xd=fe($t,"DataView");const Yn=Xd;var tm=fe($t,"Promise");const Gn=tm;var em=fe($t,"Set");const Zn=em;var Js="[object Map]",rm="[object Object]",Ws="[object Promise]",Ys="[object Set]",Gs="[object WeakMap]",Zs="[object DataView]",nm=le(Yn),im=le(rr),sm=le(Gn),om=le(Zn),am=le(qn),Qt=Et;(Yn&&Qt(new Yn(new ArrayBuffer(1)))!=Zs||rr&&Qt(new rr)!=Js||Gn&&Qt(Gn.resolve())!=Ws||Zn&&Qt(new Zn)!=Ys||qn&&Qt(new qn)!=Gs)&&(Qt=function(e){var t=Et(e),r=t==rm?e.constructor:void 0,n=r?le(r):"";if(n)switch(n){case nm:return Zs;case im:return Js;case sm:return Ws;case om:return Ys;case am:return Gs}return t});const nr=Qt;var cm=Object.prototype,um=cm.hasOwnProperty;function lm(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&um.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var fm=$t.Uint8Array;const zr=fm;function Mi(e){var t=new e.constructor(e.byteLength);return new zr(t).set(new zr(e)),t}function hm(e,t){var r=Mi(e.buffer);return new e.constructor(r,e.byteOffset,e.byteLength)}var pm=/\w*$/;function dm(e){var t=new e.constructor(e.source,pm.exec(e));return t.lastIndex=e.lastIndex,t}var Qs=Ct?Ct.prototype:void 0,Xs=Qs?Qs.valueOf:void 0;function mm(e){return Xs?Object(Xs.call(e)):{}}function Va(e,t){var r=t?Mi(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var gm="[object Boolean]",vm="[object Date]",ym="[object Map]",bm="[object Number]",_m="[object RegExp]",wm="[object Set]",Em="[object String]",Sm="[object Symbol]",xm="[object ArrayBuffer]",Tm="[object DataView]",Om="[object Float32Array]",Am="[object Float64Array]",$m="[object Int8Array]",Rm="[object Int16Array]",jm="[object Int32Array]",Dm="[object Uint8Array]",Cm="[object Uint8ClampedArray]",Pm="[object Uint16Array]",Bm="[object Uint32Array]";function Nm(e,t,r){var n=e.constructor;switch(t){case xm:return Mi(e);case gm:case vm:return new n(+e);case Tm:return hm(e);case Om:case Am:case $m:case Rm:case jm:case Dm:case Cm:case Pm:case Bm:return Va(e,r);case ym:return new n;case bm:case Em:return new n(e);case _m:return dm(e);case wm:return new n;case Sm:return mm(e)}}function Ua(e){return typeof e.constructor=="function"&&!ji(e)?mf(da(e)):{}}var km="[object Map]";function Im(e){return at(e)&&nr(e)==km}var to=Pt&&Pt.isMap,Mm=to?fr(to):Im;const Fm=Mm;var Lm="[object Set]";function Vm(e){return at(e)&&nr(e)==Lm}var eo=Pt&&Pt.isSet,Um=eo?fr(eo):Vm;const Hm=Um;var zm=1,Ha="[object Arguments]",qm="[object Array]",Km="[object Boolean]",Jm="[object Date]",Wm="[object Error]",za="[object Function]",Ym="[object GeneratorFunction]",Gm="[object Map]",Zm="[object Number]",qa="[object Object]",Qm="[object RegExp]",Xm="[object Set]",tg="[object String]",eg="[object Symbol]",rg="[object WeakMap]",ng="[object ArrayBuffer]",ig="[object DataView]",sg="[object Float32Array]",og="[object Float64Array]",ag="[object Int8Array]",cg="[object Int16Array]",ug="[object Int32Array]",lg="[object Uint8Array]",fg="[object Uint8ClampedArray]",hg="[object Uint16Array]",pg="[object Uint32Array]",Q={};Q[Ha]=Q[qm]=Q[ng]=Q[ig]=Q[Km]=Q[Jm]=Q[sg]=Q[og]=Q[ag]=Q[cg]=Q[ug]=Q[Gm]=Q[Zm]=Q[qa]=Q[Qm]=Q[Xm]=Q[tg]=Q[eg]=Q[lg]=Q[fg]=Q[hg]=Q[pg]=!0,Q[Wm]=Q[za]=Q[rg]=!1;function Rr(e,t,r,n,i,s){var o,a=t&zm;if(o!==void 0)return o;if(!ct(e))return e;var u=pt(e);if(u)o=lm(e);else{var c=nr(e),l=c==za||c==Ym;if(Re(e))return La(e,a);if(c==qa||c==Ha||l&&!i)o=l?{}:Ua(e);else{if(!Q[c])return i?e:{};o=Nm(e,c,a)}}s||(s=new At);var f=s.get(e);if(f)return f;s.set(e,o),Hm(e)?e.forEach(function(m){o.add(Rr(m,t,r,m,e,s))}):Fm(e)&&e.forEach(function(m,d){o.set(d,Rr(m,t,r,d,e,s))});var p=Wn,h=u?void 0:p(e);return $f(h||e,function(m,d){h&&(d=m,m=e[d]),$i(o,d,Rr(m,t,r,d,e,s))}),o}var dg=1,mg=4;function ir(e){return Rr(e,dg|mg)}var gg="__lodash_hash_undefined__";function vg(e){return this.__data__.set(e,gg),this}function yg(e){return this.__data__.has(e)}function jr(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new Mt;++t<r;)this.add(e[t])}jr.prototype.add=jr.prototype.push=vg,jr.prototype.has=yg;function bg(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 _g(e,t){return e.has(t)}var wg=1,Eg=2;function Ka(e,t,r,n,i,s){var o=r&wg,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,p=!0,h=r&Eg?new jr:void 0;for(s.set(e,t),s.set(t,e);++f<a;){var m=e[f],d=t[f];if(n)var b=o?n(d,m,f,t,e,s):n(m,d,f,e,t,s);if(b!==void 0){if(b)continue;p=!1;break}if(h){if(!bg(t,function(E,g){if(!_g(h,g)&&(m===E||i(m,E,r,n,s)))return h.push(g)})){p=!1;break}}else if(!(m===d||i(m,d,r,n,s))){p=!1;break}}return s.delete(e),s.delete(t),p}function Sg(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}function xg(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Tg=1,Og=2,Ag="[object Boolean]",$g="[object Date]",Rg="[object Error]",jg="[object Map]",Dg="[object Number]",Cg="[object RegExp]",Pg="[object Set]",Bg="[object String]",Ng="[object Symbol]",kg="[object ArrayBuffer]",Ig="[object DataView]",ro=Ct?Ct.prototype:void 0,An=ro?ro.valueOf:void 0;function Mg(e,t,r,n,i,s,o){switch(r){case Ig:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case kg:return!(e.byteLength!=t.byteLength||!s(new zr(e),new zr(t)));case Ag:case $g:case Dg:return Ne(+e,+t);case Rg:return e.name==t.name&&e.message==t.message;case Cg:case Bg:return e==t+"";case jg:var a=Sg;case Pg:var u=n&Tg;if(a||(a=xg),e.size!=t.size&&!u)return!1;var c=o.get(e);if(c)return c==t;n|=Og,o.set(e,t);var l=Ka(a(e),a(t),n,i,s,o);return o.delete(e),l;case Ng:if(An)return An.call(e)==An.call(t)}return!1}var Fg=1,Lg=Object.prototype,Vg=Lg.hasOwnProperty;function Ug(e,t,r,n,i,s){var o=r&Fg,a=Wn(e),u=a.length,c=Wn(t),l=c.length;if(u!=l&&!o)return!1;for(var f=u;f--;){var p=a[f];if(!(o?p in t:Vg.call(t,p)))return!1}var h=s.get(e),m=s.get(t);if(h&&m)return h==t&&m==e;var d=!0;s.set(e,t),s.set(t,e);for(var b=o;++f<u;){p=a[f];var E=e[p],g=t[p];if(n)var y=o?n(g,E,p,t,e,s):n(E,g,p,e,t,s);if(!(y===void 0?E===g||i(E,g,r,n,s):y)){d=!1;break}b||(b=p=="constructor")}if(d&&!b){var _=e.constructor,S=t.constructor;_!=S&&"constructor"in e&&"constructor"in t&&!(typeof _=="function"&&_ instanceof _&&typeof S=="function"&&S instanceof S)&&(d=!1)}return s.delete(e),s.delete(t),d}var Hg=1,no="[object Arguments]",io="[object Array]",yr="[object Object]",zg=Object.prototype,so=zg.hasOwnProperty;function qg(e,t,r,n,i,s){var o=pt(e),a=pt(t),u=o?io:nr(e),c=a?io:nr(t);u=u==no?yr:u,c=c==no?yr:c;var l=u==yr,f=c==yr,p=u==c;if(p&&Re(e)){if(!Re(t))return!1;o=!0,l=!1}if(p&&!l)return s||(s=new At),o||Di(e)?Ka(e,t,r,n,i,s):Mg(e,t,u,r,n,i,s);if(!(r&Hg)){var h=l&&so.call(e,"__wrapped__"),m=f&&so.call(t,"__wrapped__");if(h||m){var d=h?e.value():e,b=m?t.value():t;return s||(s=new At),i(d,b,r,n,s)}}return p?(s||(s=new At),Ug(e,t,r,n,i,s)):!1}function an(e,t,r,n,i){return e===t?!0:e==null||t==null||!at(e)&&!at(t)?e!==e&&t!==t:qg(e,t,r,n,an,i)}var Kg=1,Jg=2;function Wg(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 At,f;if(!(f===void 0?an(c,u,Kg|Jg,n,l):f))return!1}}return!0}function Ja(e){return e===e&&!ct(e)}function Yg(e){for(var t=rn(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,Ja(i)]}return t}function Wa(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function Gg(e){var t=Yg(e);return t.length==1&&t[0][2]?Wa(t[0][0],t[0][1]):function(r){return r===e||Wg(r,e,t)}}function Zg(e,t){return e!=null&&t in Object(e)}function Qg(e,t,r){t=Ni(t,e);for(var n=-1,i=t.length,s=!1;++n<i;){var o=hr(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&&Ri(i)&&tn(o,i)&&(pt(e)||Hr(e)))}function Xg(e,t){return e!=null&&Qg(e,t,Zg)}var tv=1,ev=2;function rv(e,t){return Pi(e)&&Ja(t)?Wa(hr(e),t):function(r){var n=pa(r,e);return n===void 0&&n===t?Xg(r,e):an(t,n,tv|ev)}}function nv(e){return function(t){return t==null?void 0:t[e]}}function iv(e){return function(t){return ha(t,e)}}function sv(e){return Pi(e)?nv(hr(e)):iv(e)}function ov(e){return typeof e=="function"?e:e==null?Ai:typeof e=="object"?pt(e)?rv(e[0],e[1]):Gg(e):sv(e)}function av(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 cv(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 uv=cv();const Ya=uv;function lv(e,t){return e&&Ya(e,t,rn)}function fv(e,t){return function(r,n){if(r==null)return r;if(!lr(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 hv=fv(lv);const pv=hv;function dv(e,t,r,n){return pv(e,function(i,s,o){t(n,i,r(i),o)}),n}function mv(e,t){return function(r,n){var i=pt(r)?av:dv,s={};return i(r,e,ov(n),s)}}var gv=function(){return $t.Date.now()};const $n=gv;var vv="Expected a function",yv=Math.max,bv=Math.min;function Fi(e,t,r){var n,i,s,o,a,u,c=0,l=!1,f=!1,p=!0;if(typeof e!="function")throw new TypeError(vv);t=js(t)||0,ct(r)&&(l=!!r.leading,f="maxWait"in r,s=f?yv(js(r.maxWait)||0,t):s,p="trailing"in r?!!r.trailing:p);function h(v){var x=n,A=i;return n=i=void 0,c=v,o=e.apply(A,x),o}function m(v){return c=v,a=setTimeout(E,t),l?h(v):o}function d(v){var x=v-u,A=v-c,V=t-x;return f?bv(V,s-A):V}function b(v){var x=v-u,A=v-c;return u===void 0||x>=t||x<0||f&&A>=s}function E(){var v=$n();if(b(v))return g(v);a=setTimeout(E,d(v))}function g(v){return a=void 0,p&&n?h(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($n())}function S(){var v=$n(),x=b(v);if(n=arguments,i=this,u=v,x){if(a===void 0)return m(u);if(f)return clearTimeout(a),a=setTimeout(E,t),h(u)}return a===void 0&&(a=setTimeout(E,t)),o}return S.cancel=y,S.flush=_,S}function Qn(e,t,r){(r!==void 0&&!Ne(e[t],r)||r===void 0&&!(t in e))&&en(e,t,r)}function _v(e){return at(e)&&lr(e)}function Xn(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function wv(e){return na(e,Ci(e))}function Ev(e,t,r,n,i,s,o){var a=Xn(e,r),u=Xn(t,r),c=o.get(u);if(c){Qn(e,r,c);return}var l=s?s(a,u,r+"",e,t,o):void 0,f=l===void 0;if(f){var p=pt(u),h=!p&&Re(u),m=!p&&!h&&Di(u);l=u,p||h||m?pt(a)?l=a:_v(a)?l=vf(a):h?(f=!1,l=La(u,!0)):m?(f=!1,l=Va(u,!0)):l=[]:ki(u)||Hr(u)?(l=a,Hr(a)?l=wv(a):(!ct(a)||ae(a))&&(l=Ua(u))):f=!1}f&&(o.set(u,l),i(l,u,n,s,o),o.delete(u)),Qn(e,r,l)}function Ga(e,t,r,n,i){e!==t&&Ya(t,function(s,o){if(i||(i=new At),ct(s))Ev(e,t,o,r,Ga,n,i);else{var a=n?n(Xn(e,o),s,o+"",e,t,i):void 0;a===void 0&&(a=s),Qn(e,o,a)}},Ci)}var Sv={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},xv=Ta(Sv);const Tv=xv;var Za=/[&<>"']/g,Ov=RegExp(Za.source);function Av(e){return e=he(e),e&&Ov.test(e)?e.replace(Za,Tv):e}var $v=Object.prototype,Rv=$v.hasOwnProperty,jv=mv(function(e,t,r){Rv.call(e,r)?e[r].push(t):en(e,r,[t])});const Qa=jv;var Dv="[object String]";function bt(e){return typeof e=="string"||!pt(e)&&at(e)&&Et(e)==Dv}function Cv(e,t){return ta(t,function(r){return e[r]})}var Pv="[object ArrayBuffer]";function Bv(e){return at(e)&&Et(e)==Pv}var oo=Pt&&Pt.isArrayBuffer,Nv=oo?fr(oo):Bv;const kv=Nv;var Iv="[object Boolean]";function Mv(e){return e===!0||e===!1||at(e)&&Et(e)==Iv}var Fv="[object Date]";function Lv(e){return at(e)&&Et(e)==Fv}var ao=Pt&&Pt.isDate,Vv=ao?fr(ao):Lv;const Uv=Vv;function Hv(e,t){return an(e,t)}var zv="[object Number]";function Xa(e){return typeof e=="number"||at(e)&&Et(e)==zv}function qv(e){return Xa(e)&&e!=+e}function Kv(e){return e===null}function Jv(e){return e===void 0}var Wv=Ii(function(e,t,r){return e+(r?"-":"")+t.toLowerCase()});const Yv=Wv;var Gv=xa("toLowerCase");const Zv=Gv;var Qv=oa(function(e,t,r){Ga(e,t,r)});const Dt=Qv;function Xv(e,t,r,n){if(!ct(e))return e;t=Ni(t,e);for(var i=-1,s=t.length,o=s-1,a=e;a!=null&&++i<s;){var u=hr(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:tn(t[i+1])?[]:{})}$i(a,u,c),a=a[u]}return e}function ty(e,t,r){return e==null?e:Xv(e,t,r)}var ey=Ii(function(e,t,r){return e+(r?"_":"")+t.toLowerCase()});const ry=ey;var tc=Object.prototype,ny=tc.hasOwnProperty;function co(e,t,r,n){return e===void 0||Ne(e,tc[r])&&!ny.call(n,r)?t:e}var iy={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};function sy(e){return"\\"+iy[e]}var oy=/<%=([\s\S]+?)%>/g;const ec=oy;var ay=/<%-([\s\S]+?)%>/g;const cy=ay;var uy=/<%([\s\S]+?)%>/g;const ly=uy;var fy={escape:cy,evaluate:ly,interpolate:ec,variable:"",imports:{_:{escape:Av}}};const uo=fy;var hy="Invalid `variable` option passed into `_.template`",py=/\b__p \+= '';/g,dy=/\b(__p \+=) '' \+/g,my=/(__e\(.*?\)|\b__t\)) \+\n'';/g,gy=/[()=,{}\[\]\/\s]/,vy=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,br=/($^)/,yy=/['\n\r\u2028\u2029\\]/g,by=Object.prototype,lo=by.hasOwnProperty;function rc(e,t,r){var n=uo.imports._.templateSettings||uo;r&&sa(e,t,r)&&(t=void 0),e=he(e),t=Ms({},t,n,co);var i=Ms({},t.imports,n.imports,co),s=rn(i),o=Cv(i,s),a,u,c=0,l=t.interpolate||br,f="__p += '",p=RegExp((t.escape||br).source+"|"+l.source+"|"+(l===ec?vy:br).source+"|"+(t.evaluate||br).source+"|$","g"),h=lo.call(t,"sourceURL")?"//# sourceURL="+(t.sourceURL+"").replace(/\s/g," ")+`
3
3
  `:"";e.replace(p,function(b,E,g,y,_,S){return g||(g=y),f+=e.slice(c,S).replace(yy,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.14
54
+ * @version 0.10.15
55
55
  * @license <a href="https://vtj.pro/license.html">MIT License</a>
56
- */const N1="0.10.14",k1="BuiltIn",Ki="VueMaterial",Ji="VueRouterMaterial",I1=[Ki,Ji],M1={vue:"Vue","vue-router":"VueRouter"},Mc={[Ki]:["Transition","TransitionGroup","KeepAlive","Teleport","Suspense"],[Ji]:["RouterView","RouterLink"]},F1=["slot","template","component","img","div","p","h1","h2","h3","span","a"];let L1=class{},Fc=class{constructor(){$(this,"listeners",[]);$(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}},Pr=class Lc{constructor(t,r,n){$(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 Lc(n,i),r),{})}};class xe{constructor(t){$(this,"name");$(this,"handler");$(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 xe(i),r),{})}}let Je=class Vc{constructor(t){$(this,"id");$(this,"name","");$(this,"arg");$(this,"modifiers");$(this,"value");$(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 Vc(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 Kr=(Ft=class{constructor(t,r=null){$(this,"__VTJ_NODE__",!0);$(this,"locked",!1);$(this,"id");$(this,"name");$(this,"from");$(this,"invisible",!1);$(this,"children","");$(this,"slot");$(this,"props",{});$(this,"events",{});$(this,"directives",[]);$(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=Pr.parse(a),this.events=xe.parse(u),this.directives=Je.parse(c),r||M.emit(nt,this)}setChildren(t="",r=!1){Array.isArray(t)?this.children=t.map(n=>new Ft(n,this)):this.children=t,r||M.emit(nt,this)}setSlot(t,r=!1){this.slot=typeof t=="string"?{name:t,params:[]}:t,r||M.emit(nt,this)}setProp(t,r,n,i=!1){const s=this.props[t];s?s.setValue(r):this.props[t]=new Pr(t,r,n),i||M.emit(nt,this)}removeProp(t,r=!1){delete this.props[t],r||M.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 xe(t),r||M.emit(nt,this)}removeEvent(t,r=!1){delete this.events[t],r||M.emit(nt,this)}setDirective(t,r=!1){const n=t instanceof Je?t:new Je(t),i=this.directives.findIndex(s=>s.id===t.id);i>=0?this.directives.splice(i,1,n):this.directives.push(n),r||M.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||M.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||M.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||M.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||M.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||M.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||M.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||M.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(p=>p.toDsl()):a;return{id:t,name:r,from:n,invisible:i,locked:s,slot:o,children:f,props:Pr.toDsl(u),directives:Je.toDsl(c),events:xe.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||M.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||M.emit(nt,this)}unlock(t=!1){if(this.locked=!1,Array.isArray(this.children))for(const r of this.children)r.unlock(!0);t||M.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||M.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}},$(Ft,"nodes",{}),Ft);const G="EVENT_BLOCK_CHANGE";var qt;let ee=(qt=class{constructor(t){$(this,"__VTJ_BLOCK__",!0);$(this,"id");$(this,"name","");$(this,"inject",[]);$(this,"state",{});$(this,"lifeCycles",{});$(this,"methods",{});$(this,"computed",{});$(this,"watch",[]);$(this,"css","");$(this,"props",[]);$(this,"emits",[]);$(this,"slots",[]);$(this,"dataSources",{});$(this,"nodes",[]);$(this,"locked",!1);$(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 Kr(i))),r||M.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||Oc().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||M.emit(G,this)}removeFunction(t,r,n=!1){delete this[t][r],n||M.emit(G,this)}setState(t,r,n=!1){this.state[t]=r,n||M.emit(G,this)}removeState(t,r=!1){delete this.state[t],r||M.emit(G,this)}setCss(t,r=!1){this.css=t,r||M.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||M.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||M.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||M.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||M.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||M.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||M.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||M.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||M.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||M.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||M.emit(G,this))}setDataSource(t,r=!1){this.dataSources[t.name]=t,r||M.emit(G,this)}removeDataSource(t,r=!1){delete this.dataSources[t],r||M.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||M.emit(G,this)}insertBefore(t,r,n=!1){t.parent=null;const i=this.nodes.indexOf(r);this.nodes.splice(i,0,t),n||M.emit(G,this)}appendNode(t,r=!1){t.parent=null,this.nodes.push(t),r||M.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||M.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||M.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||M.emit(G,this))}}cloneNode(t,r=!1){const n=Yi(t.toDsl()),i=new Kr(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||M.emit(G,this)}unlock(t=!1){this.locked=!1;for(const r of this.nodes)r.unlock(!0);t||M.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}},$(qt,"normalAttrs",["name","locked","inject","state","lifeCycles","methods","computed","watch","css","props","emits","slots","dataSources","__TEMPLATE_ID__"]),qt);const it="EVENT_PROJECT_CHANGE",oi="EVENT_PROJECT_ACTIVED",ai="EVENT_PROJECT_DEPS_CHANGE",We="EVENT_PROJECT_PAGES_CHANGE",we="EVENT_PROJECT_BLOCKS_CHANGE",ci="EVENT_PROJECT_APIS_CHANGE",ui="EVENT_PROJECT_META_CHANGE",Uc="EVENT_PROJECT_PUBLISH",Hc="EVENT_PROJECT_FILE_PUBLISH",zc="EVENT_PROJECT_GEN_SOURCE",tr=class tr{constructor(t){$(this,"id","");$(this,"platform","web");$(this,"name","");$(this,"description","");$(this,"homepage","");$(this,"dependencies",[]);$(this,"pages",[]);$(this,"blocks",[]);$(this,"apis",[]);$(this,"meta",[]);$(this,"currentFile",null);$(this,"config",{});$(this,"uniConfig",{});$(this,"__BASE_PATH__","/");const{id:r}=t;this.id=r||gt(),this.update(t,!0)}update(t,r=!1){for(const n of tr.attrs){const i=t[n];i&&(this[n]=i)}r||M.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=tr.attrs.reduce((i,s)=>(i[s]=this[s],i),{});return n.pages&&(n.pages=n.pages.map(i=>ir(st(z({},i),{dsl:void 0}))),this.cleanPagesDsl(n.pages)),n.blocks&&(n.blocks=n.blocks.map(i=>ir(st(z({},i),{dsl:void 0})))),z({__VTJ_PROJECT__:!0,id:r},n)}active(t,r=!1){this.currentFile=t,r||M.emit(oi,{model:this,type:"update",data:t})}deactivate(t=!1){this.currentFile=null,t||M.emit(oi,{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};M.emit(ai,o),M.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};M.emit(ai,s),M.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 ee({id:t.id,name:ti(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};M.emit(We,i),M.emit(it,i)}!this.currentFile&&!t.dir&&(yield Se(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};M.emit(We,i),M.emit(it,i)}}clonePage(t,r,n=!1){var f;const i=gt(),s=`${t.name}Copy`,o=`${t.title}_副本`,a=new ee({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(p=>p.id===t.id);if(c.splice(l+1,0,u),!n){const p={model:this,type:"clone",data:{source:t,target:u}};M.emit(We,p),M.emit(it,p)}}saveToBlock(t,r=!1){return L(this,null,function*(){this.active(t,r),yield Se(1e3);const n=gt(),i=t.name,s=t.title,o=new ee({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};M.emit(we,u),M.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};M.emit(We,o),M.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=ti(t.name);t.id=n,t.type="block",t.dsl=new ee({id:n,name:i}).toDsl(),this.blocks.push(t);const s=t.fromType||"Schema";if(!r){const o={model:this,type:"create",data:t};M.emit(we,o),M.emit(it,o)}!this.currentFile&&s==="Schema"&&(yield Se(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};M.emit(we,i),M.emit(it,i)}}cloneBlock(t,r=!1){const n=gt(),i=`${t.name}Copy`,s=`${t.title}_副本`,o=new ee({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}};M.emit(we,c),M.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};M.emit(we,a),M.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};M.emit(ci,s),M.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};M.emit(ci,i),M.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};M.emit(ui,s),M.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};M.emit(ui,i),M.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};M.emit(it,n)}}setConfig(t,r=!1){if(this.config=Object.assign(this.config,t),!r){const n={model:this,type:"update",data:t};M.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};M.emit(it,i)}}publish(t){const r={model:this,type:"publish",data:t||this};t?M.emit(Hc,r):M.emit(Uc,r)}genSource(){const t={model:this,type:"gen",data:null};M.emit(zc,t)}};$(tr,"attrs",["platform","name","homepage","description","dependencies","pages","blocks","apis","meta","config","uniConfig","__BASE_PATH__"]);let ce=tr;const Ye="EVENT_HISTORY_CHANGE",Br="EVENT_HISTORY_LOAD";let Wi=class{constructor(t,r={}){$(this,"options",{max:50});$(this,"index",-1);$(this,"id");$(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:ir(t)};if(this.items.unshift(i),this.items.length>n){const s=this.items.splice(n);r||M.emit(Ye,{model:this,type:"delete",data:s.map(o=>o.id)})}this.index=-1,r||M.emit(Ye,{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||M.emit(Ye,{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&&M.emit(Br,{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&&M.emit(Br,{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||M.emit(Br,{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||M.emit(Ye,{model:this,type:"clear",data:r})}};const M=Nc();function V1(e){return e instanceof ee}function U1(e){return e instanceof Kr}function H1(e){return!!e.__VTJ_BLOCK__}function Yi(e){const t=ir(e);return delete t.id,Array.isArray(t.children)&&(t.children=t.children.map(r=>Yi(r))),t}function z1(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 Pw=Object.freeze(Object.defineProperty({__proto__:null,BUILT_IN_COMPONENTS:Mc,BUILT_IN_LIBRARAY_MAP:M1,BUILT_IN_MATERIALS:I1,BUILT_IN_NAME:k1,BUILT_IN_TAGS:F1,BUILT_IN_VUE:Ki,BUILT_IN_VUE_ROUTER:Ji,Base:Fc,BlockModel:ee,DirectiveModel:Je,EVENT_BLOCK_CHANGE:G,EVENT_HISTORY_CHANGE:Ye,EVENT_HISTORY_LOAD:Br,EVENT_NODE_CHANGE:nt,EVENT_PROJECT_ACTIVED:oi,EVENT_PROJECT_APIS_CHANGE:ci,EVENT_PROJECT_BLOCKS_CHANGE:we,EVENT_PROJECT_CHANGE:it,EVENT_PROJECT_DEPS_CHANGE:ai,EVENT_PROJECT_FILE_PUBLISH:Hc,EVENT_PROJECT_GEN_SOURCE:zc,EVENT_PROJECT_META_CHANGE:ui,EVENT_PROJECT_PAGES_CHANGE:We,EVENT_PROJECT_PUBLISH:Uc,EventModel:xe,HistoryModel:Wi,NodeModel:Kr,ProjectModel:ce,PropModel:Pr,Service:L1,VTJ_CORE_VERSION:N1,cloneDsl:Yi,createNodeFrom:z1,emitter:M,isBlock:V1,isBlockSchema:H1,isNode:U1},Symbol.toStringTag,{value:"Module"}));var q1=Object.defineProperty,K1=(e,t,r)=>t in e?q1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,xt=(e,t,r)=>K1(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 N1="0.10.15",k1="BuiltIn",Ki="VueMaterial",Ji="VueRouterMaterial",I1=[Ki,Ji],M1={vue:"Vue","vue-router":"VueRouter"},Mc={[Ki]:["Transition","TransitionGroup","KeepAlive","Teleport","Suspense"],[Ji]:["RouterView","RouterLink"]},F1=["slot","template","component","img","div","p","h1","h2","h3","span","a"];let L1=class{},Fc=class{constructor(){$(this,"listeners",[]);$(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}},Pr=class Lc{constructor(t,r,n){$(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 Lc(n,i),r),{})}};class xe{constructor(t){$(this,"name");$(this,"handler");$(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 xe(i),r),{})}}let Je=class Vc{constructor(t){$(this,"id");$(this,"name","");$(this,"arg");$(this,"modifiers");$(this,"value");$(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 Vc(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 Kr=(Ft=class{constructor(t,r=null){$(this,"__VTJ_NODE__",!0);$(this,"locked",!1);$(this,"id");$(this,"name");$(this,"from");$(this,"invisible",!1);$(this,"children","");$(this,"slot");$(this,"props",{});$(this,"events",{});$(this,"directives",[]);$(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=Pr.parse(a),this.events=xe.parse(u),this.directives=Je.parse(c),r||M.emit(nt,this)}setChildren(t="",r=!1){Array.isArray(t)?this.children=t.map(n=>new Ft(n,this)):this.children=t,r||M.emit(nt,this)}setSlot(t,r=!1){this.slot=typeof t=="string"?{name:t,params:[]}:t,r||M.emit(nt,this)}setProp(t,r,n,i=!1){const s=this.props[t];s?s.setValue(r):this.props[t]=new Pr(t,r,n),i||M.emit(nt,this)}removeProp(t,r=!1){delete this.props[t],r||M.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 xe(t),r||M.emit(nt,this)}removeEvent(t,r=!1){delete this.events[t],r||M.emit(nt,this)}setDirective(t,r=!1){const n=t instanceof Je?t:new Je(t),i=this.directives.findIndex(s=>s.id===t.id);i>=0?this.directives.splice(i,1,n):this.directives.push(n),r||M.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||M.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||M.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||M.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||M.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||M.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||M.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||M.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(p=>p.toDsl()):a;return{id:t,name:r,from:n,invisible:i,locked:s,slot:o,children:f,props:Pr.toDsl(u),directives:Je.toDsl(c),events:xe.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||M.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||M.emit(nt,this)}unlock(t=!1){if(this.locked=!1,Array.isArray(this.children))for(const r of this.children)r.unlock(!0);t||M.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||M.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}},$(Ft,"nodes",{}),Ft);const G="EVENT_BLOCK_CHANGE";var qt;let ee=(qt=class{constructor(t){$(this,"__VTJ_BLOCK__",!0);$(this,"id");$(this,"name","");$(this,"inject",[]);$(this,"state",{});$(this,"lifeCycles",{});$(this,"methods",{});$(this,"computed",{});$(this,"watch",[]);$(this,"css","");$(this,"props",[]);$(this,"emits",[]);$(this,"slots",[]);$(this,"dataSources",{});$(this,"nodes",[]);$(this,"locked",!1);$(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 Kr(i))),r||M.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||Oc().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||M.emit(G,this)}removeFunction(t,r,n=!1){delete this[t][r],n||M.emit(G,this)}setState(t,r,n=!1){this.state[t]=r,n||M.emit(G,this)}removeState(t,r=!1){delete this.state[t],r||M.emit(G,this)}setCss(t,r=!1){this.css=t,r||M.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||M.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||M.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||M.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||M.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||M.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||M.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||M.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||M.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||M.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||M.emit(G,this))}setDataSource(t,r=!1){this.dataSources[t.name]=t,r||M.emit(G,this)}removeDataSource(t,r=!1){delete this.dataSources[t],r||M.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||M.emit(G,this)}insertBefore(t,r,n=!1){t.parent=null;const i=this.nodes.indexOf(r);this.nodes.splice(i,0,t),n||M.emit(G,this)}appendNode(t,r=!1){t.parent=null,this.nodes.push(t),r||M.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||M.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||M.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||M.emit(G,this))}}cloneNode(t,r=!1){const n=Yi(t.toDsl()),i=new Kr(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||M.emit(G,this)}unlock(t=!1){this.locked=!1;for(const r of this.nodes)r.unlock(!0);t||M.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}},$(qt,"normalAttrs",["name","locked","inject","state","lifeCycles","methods","computed","watch","css","props","emits","slots","dataSources","__TEMPLATE_ID__"]),qt);const it="EVENT_PROJECT_CHANGE",oi="EVENT_PROJECT_ACTIVED",ai="EVENT_PROJECT_DEPS_CHANGE",We="EVENT_PROJECT_PAGES_CHANGE",we="EVENT_PROJECT_BLOCKS_CHANGE",ci="EVENT_PROJECT_APIS_CHANGE",ui="EVENT_PROJECT_META_CHANGE",Uc="EVENT_PROJECT_PUBLISH",Hc="EVENT_PROJECT_FILE_PUBLISH",zc="EVENT_PROJECT_GEN_SOURCE",tr=class tr{constructor(t){$(this,"id","");$(this,"platform","web");$(this,"name","");$(this,"description","");$(this,"homepage","");$(this,"dependencies",[]);$(this,"pages",[]);$(this,"blocks",[]);$(this,"apis",[]);$(this,"meta",[]);$(this,"currentFile",null);$(this,"config",{});$(this,"uniConfig",{});$(this,"__BASE_PATH__","/");const{id:r}=t;this.id=r||gt(),this.update(t,!0)}update(t,r=!1){for(const n of tr.attrs){const i=t[n];i&&(this[n]=i)}r||M.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=tr.attrs.reduce((i,s)=>(i[s]=this[s],i),{});return n.pages&&(n.pages=n.pages.map(i=>ir(st(z({},i),{dsl:void 0}))),this.cleanPagesDsl(n.pages)),n.blocks&&(n.blocks=n.blocks.map(i=>ir(st(z({},i),{dsl:void 0})))),z({__VTJ_PROJECT__:!0,id:r},n)}active(t,r=!1){this.currentFile=t,r||M.emit(oi,{model:this,type:"update",data:t})}deactivate(t=!1){this.currentFile=null,t||M.emit(oi,{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};M.emit(ai,o),M.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};M.emit(ai,s),M.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 ee({id:t.id,name:ti(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};M.emit(We,i),M.emit(it,i)}!this.currentFile&&!t.dir&&(yield Se(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};M.emit(We,i),M.emit(it,i)}}clonePage(t,r,n=!1){var f;const i=gt(),s=`${t.name}Copy`,o=`${t.title}_副本`,a=new ee({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(p=>p.id===t.id);if(c.splice(l+1,0,u),!n){const p={model:this,type:"clone",data:{source:t,target:u}};M.emit(We,p),M.emit(it,p)}}saveToBlock(t,r=!1){return L(this,null,function*(){this.active(t,r),yield Se(1e3);const n=gt(),i=t.name,s=t.title,o=new ee({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};M.emit(we,u),M.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};M.emit(We,o),M.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=ti(t.name);t.id=n,t.type="block",t.dsl=new ee({id:n,name:i}).toDsl(),this.blocks.push(t);const s=t.fromType||"Schema";if(!r){const o={model:this,type:"create",data:t};M.emit(we,o),M.emit(it,o)}!this.currentFile&&s==="Schema"&&(yield Se(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};M.emit(we,i),M.emit(it,i)}}cloneBlock(t,r=!1){const n=gt(),i=`${t.name}Copy`,s=`${t.title}_副本`,o=new ee({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}};M.emit(we,c),M.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};M.emit(we,a),M.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};M.emit(ci,s),M.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};M.emit(ci,i),M.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};M.emit(ui,s),M.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};M.emit(ui,i),M.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};M.emit(it,n)}}setConfig(t,r=!1){if(this.config=Object.assign(this.config,t),!r){const n={model:this,type:"update",data:t};M.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};M.emit(it,i)}}publish(t){const r={model:this,type:"publish",data:t||this};t?M.emit(Hc,r):M.emit(Uc,r)}genSource(){const t={model:this,type:"gen",data:null};M.emit(zc,t)}};$(tr,"attrs",["platform","name","homepage","description","dependencies","pages","blocks","apis","meta","config","uniConfig","__BASE_PATH__"]);let ce=tr;const Ye="EVENT_HISTORY_CHANGE",Br="EVENT_HISTORY_LOAD";let Wi=class{constructor(t,r={}){$(this,"options",{max:50});$(this,"index",-1);$(this,"id");$(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:ir(t)};if(this.items.unshift(i),this.items.length>n){const s=this.items.splice(n);r||M.emit(Ye,{model:this,type:"delete",data:s.map(o=>o.id)})}this.index=-1,r||M.emit(Ye,{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||M.emit(Ye,{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&&M.emit(Br,{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&&M.emit(Br,{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||M.emit(Br,{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||M.emit(Ye,{model:this,type:"clear",data:r})}};const M=Nc();function V1(e){return e instanceof ee}function U1(e){return e instanceof Kr}function H1(e){return!!e.__VTJ_BLOCK__}function Yi(e){const t=ir(e);return delete t.id,Array.isArray(t.children)&&(t.children=t.children.map(r=>Yi(r))),t}function z1(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 Pw=Object.freeze(Object.defineProperty({__proto__:null,BUILT_IN_COMPONENTS:Mc,BUILT_IN_LIBRARAY_MAP:M1,BUILT_IN_MATERIALS:I1,BUILT_IN_NAME:k1,BUILT_IN_TAGS:F1,BUILT_IN_VUE:Ki,BUILT_IN_VUE_ROUTER:Ji,Base:Fc,BlockModel:ee,DirectiveModel:Je,EVENT_BLOCK_CHANGE:G,EVENT_HISTORY_CHANGE:Ye,EVENT_HISTORY_LOAD:Br,EVENT_NODE_CHANGE:nt,EVENT_PROJECT_ACTIVED:oi,EVENT_PROJECT_APIS_CHANGE:ci,EVENT_PROJECT_BLOCKS_CHANGE:we,EVENT_PROJECT_CHANGE:it,EVENT_PROJECT_DEPS_CHANGE:ai,EVENT_PROJECT_FILE_PUBLISH:Hc,EVENT_PROJECT_GEN_SOURCE:zc,EVENT_PROJECT_META_CHANGE:ui,EVENT_PROJECT_PAGES_CHANGE:We,EVENT_PROJECT_PUBLISH:Uc,EventModel:xe,HistoryModel:Wi,NodeModel:Kr,ProjectModel:ce,PropModel:Pr,Service:L1,VTJ_CORE_VERSION:N1,cloneDsl:Yi,createNodeFrom:z1,emitter:M,isBlock:V1,isBlockSchema:H1,isNode:U1},Symbol.toStringTag,{value:"Module"}));var q1=Object.defineProperty,K1=(e,t,r)=>t in e?q1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,xt=(e,t,r)=>K1(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.14
60
+ * @version 0.10.15
61
61
  * @license <a href="https://vtj.pro/license.html">MIT License</a>
62
- */const J1="0.10.14";/**
62
+ */const J1="0.10.15";/**
63
63
  * @vue/shared v3.5.13
64
64
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
65
65
  * @license MIT
@@ -68,13 +68,13 @@ version: 2.9.0
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[Io]=this[Io]={accessors:{}}).accessors,n=this.prototype;function i(s){const o=qe(s);r[o]||($b(n,s),r[o]=!0)}return O.isArray(t)?t.forEach(i):i(t),this}};yt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);O.reduceDescriptors(yt.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});O.freezeMethods(yt);function Mn(e,t){const r=this||mr,n=t||r,i=yt.from(n.headers);let s=n.data;return O.forEach(e,function(o){s=o.call(r,s,i.normalize(),t?t.status:void 0)}),i.normalize(),s}function vu(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"}O.inherits(Me,J,{__CANCEL__:!0});function yu(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 Rb(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function jb(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 p=c&&u-c;return p?Math.round(f*1e3/p):void 0}}function Db(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 Wr=(e,t,r=3)=>{let n=0;const i=jb(50,250);return Db(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)},Mo=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},Fo=e=>(...t)=>O.asap(()=>e(...t)),Cb=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,Pb=ot.hasStandardBrowserEnv?{write(e,t,r,n,i,s){const o=[e+"="+encodeURIComponent(t)];O.isNumber(r)&&o.push("expires="+new Date(r).toGMTString()),O.isString(n)&&o.push("path="+n),O.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 Bb(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Nb(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function bu(e,t,r){let n=!Bb(t);return e&&n||r==!1?Nb(e,t):t}const Lo=e=>e instanceof yt?z({},e):e;function ue(e,t){t=t||{};const r={};function n(c,l,f,p){return O.isPlainObject(c)&&O.isPlainObject(l)?O.merge.call({caseless:p},c,l):O.isPlainObject(l)?O.merge({},l):O.isArray(l)?l.slice():l}function i(c,l,f,p){if(O.isUndefined(l)){if(!O.isUndefined(c))return n(void 0,c,f,p)}else return n(c,l,f,p)}function s(c,l){if(!O.isUndefined(l))return n(void 0,l)}function o(c,l){if(O.isUndefined(l)){if(!O.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(Lo(c),Lo(l),f,!0)};return O.forEach(Object.keys(Object.assign({},e,t)),function(c){const l=u[c]||i,f=l(e[c],t[c],c);O.isUndefined(f)&&l!==a||(r[c]=f)}),r}const _u=e=>{const t=ue({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:s,headers:o,auth:a}=t;t.headers=o=yt.from(o),t.url=du(bu(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let u;if(O.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&&O.isFunction(n)&&(n=n(t)),n||n!==!1&&Cb(t.url))){const c=i&&s&&Pb.read(s);c&&o.set(i,c)}return t},kb=typeof XMLHttpRequest<"u",Ib=kb&&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,p,h;function m(){p&&p(),h&&h(),n.cancelToken&&n.cancelToken.unsubscribe(c),n.signal&&n.signal.removeEventListener("abort",c)}let d=new XMLHttpRequest;d.open(n.method.toUpperCase(),n.url,!0),d.timeout=n.timeout;function b(){if(!d)return;const g=yt.from("getAllResponseHeaders"in d&&d.getAllResponseHeaders()),y={data:!o||o==="text"||o==="json"?d.responseText:d.response,status:d.status,statusText:d.statusText,headers:g,config:e,request:d};yu(function(_){t(_),m()},function(_){r(_),m()},y),d=null}"onloadend"in d?d.onloadend=b:d.onreadystatechange=function(){!d||d.readyState!==4||d.status===0&&!(d.responseURL&&d.responseURL.indexOf("file:")===0)||setTimeout(b)},d.onabort=function(){d&&(r(new J("Request aborted",J.ECONNABORTED,e,d)),d=null)},d.onerror=function(){r(new J("Network Error",J.ERR_NETWORK,e,d)),d=null},d.ontimeout=function(){let g=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const y=n.transitional||mu;n.timeoutErrorMessage&&(g=n.timeoutErrorMessage),r(new J(g,y.clarifyTimeoutError?J.ETIMEDOUT:J.ECONNABORTED,e,d)),d=null},i===void 0&&s.setContentType(null),"setRequestHeader"in d&&O.forEach(s.toJSON(),function(g,y){d.setRequestHeader(y,g)}),O.isUndefined(n.withCredentials)||(d.withCredentials=!!n.withCredentials),o&&o!=="json"&&(d.responseType=n.responseType),u&&([f,h]=Wr(u,!0),d.addEventListener("progress",f)),a&&d.upload&&([l,p]=Wr(a),d.upload.addEventListener("progress",l),d.upload.addEventListener("loadend",p)),(n.cancelToken||n.signal)&&(c=g=>{d&&(r(!g||g.type?new Me(null,e,d):g),d.abort(),d=null)},n.cancelToken&&n.cancelToken.subscribe(c),n.signal&&(n.signal.aborted?c():n.signal.addEventListener("abort",c)));const E=Rb(n.url);if(E&&ot.protocols.indexOf(E)===-1){r(new J("Unsupported protocol "+E+":",J.ERR_BAD_REQUEST,e));return}d.send(i||null)})},Mb=(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=()=>O.asap(a),u}},Fb=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},Lb=function(e,t){return Sn(this,null,function*(){try{for(var r=_s(Vb(e)),n,i,s;n=!(i=yield new Gt(r.next())).done;n=!1){const o=i.value;yield*xn(Fb(o,t))}}catch(i){s=[i]}finally{try{n&&(i=r.return)&&(yield new Gt(i.call(r)))}finally{if(s)throw s[0]}}})},Vb=function(e){return Sn(this,null,function*(){if(e[Symbol.asyncIterator]){yield*xn(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())}})},Vo=(e,t,r,n)=>{const i=Lb(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 p=f.byteLength;if(r){let h=s+=p;r(h)}c.enqueue(new Uint8Array(f))}catch(l){throw a(l),l}})},cancel(c){return a(c),i.return()}},{highWaterMark:2})},gn=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",wu=gn&&typeof ReadableStream=="function",Ub=gn&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):e=>L(void 0,null,function*(){return new Uint8Array(yield new Response(e).arrayBuffer())})),Eu=(e,...t)=>{try{return!!e(...t)}catch(r){return!1}},Hb=wu&&Eu(()=>{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}),Uo=64*1024,vi=wu&&Eu(()=>O.isReadableStream(new Response("").body)),Yr={stream:vi&&(e=>e.body)};gn&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Yr[t]&&(Yr[t]=O.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 zb=e=>L(void 0,null,function*(){if(e==null)return 0;if(O.isBlob(e))return e.size;if(O.isSpecCompliantForm(e))return(yield new Request(ot.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(O.isArrayBufferView(e)||O.isArrayBuffer(e))return e.byteLength;if(O.isURLSearchParams(e)&&(e=e+""),O.isString(e))return(yield Ub(e)).byteLength}),qb=(e,t)=>L(void 0,null,function*(){const r=O.toFiniteNumber(e.getContentLength());return r!=null?r:zb(t)}),Kb=gn&&(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:p}=_u(e);c=c?(c+"").toLowerCase():"text";let h=Mb([i,s&&s.toAbortSignal()],o),m;const d=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let b;try{if(u&&Hb&&r!=="get"&&r!=="head"&&(b=yield qb(l,n))!==0){let S=new Request(t,{method:"POST",body:n,duplex:"half"}),v;if(O.isFormData(n)&&(v=S.headers.get("content-type"))&&l.setContentType(v),S.body){const[x,A]=Mo(b,Wr(Fo(u)));n=Vo(S.body,Uo,x,A)}}O.isString(f)||(f=f?"include":"omit");const E="credentials"in Request.prototype;m=new Request(t,st(z({},p),{signal:h,method:r.toUpperCase(),headers:l.normalize().toJSON(),body:n,duplex:"half",credentials:E?f:void 0}));let g=yield fetch(m);const y=vi&&(c==="stream"||c==="response");if(vi&&(a||y&&d)){const S={};["status","statusText","headers"].forEach(V=>{S[V]=g[V]});const v=O.toFiniteNumber(g.headers.get("content-length")),[x,A]=a&&Mo(v,Wr(Fo(a),!0))||[];g=new Response(Vo(g.body,Uo,x,()=>{A&&A(),d&&d()}),S)}c=c||"text";let _=yield Yr[O.findKey(Yr,c)||"text"](g,e);return!y&&d&&d(),yield new Promise((S,v)=>{yu(S,v,{data:_,headers:yt.from(g.headers),status:g.status,statusText:g.statusText,config:e,request:m})})}catch(E){throw d&&d(),E&&E.name==="TypeError"&&/fetch/i.test(E.message)?Object.assign(new J("Network Error",J.ERR_NETWORK,e,m),{cause:E.cause||E}):J.from(E,E&&E.code,e,m)}})),yi={http:ab,xhr:Ib,fetch:Kb};O.forEach(yi,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(r){}Object.defineProperty(e,"adapterName",{value:t})}});const Ho=e=>`- ${e}`,Jb=e=>O.isFunction(e)||e===null||e===!1,Su={getAdapter:e=>{e=O.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,!Jb(r)&&(n=yi[(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(Ho).join(`
70
70
  `):" "+Ho(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:yi};function Fn(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Me(null,e)}function zo(e){return Fn(e),e.headers=yt.from(e.headers),e.data=Mn.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Su.getAdapter(e.adapter||mr.adapter)(e).then(function(t){return Fn(e),t.data=Mn.call(e,e.transformResponse,t),t.headers=yt.from(t.headers),t},function(t){return vu(t)||(Fn(e),t&&t.response&&(t.response.data=Mn.call(e,e.transformResponse,t.response),t.response.headers=yt.from(t.response.headers))),Promise.reject(t)})}const xu="1.8.3",vn={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{vn[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const qo={};vn.transitional=function(e,t,r){function n(i,s){return"[Axios v"+xu+"] 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&&!qo[s]&&(qo[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}};vn.spelling=function(e){return(t,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};function Wb(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 Mr={assertOptions:Wb,validators:vn},jt=Mr.validators;let ie=class{constructor(e){this.defaults=e,this.interceptors={request:new ko,response:new ko}}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
- `+i):r.stack=i}catch(s){}}throw r}})}_request(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=ue(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:i}=t;r!==void 0&&Mr.assertOptions(r,{silentJSONParsing:jt.transitional(jt.boolean),forcedJSONParsing:jt.transitional(jt.boolean),clarifyTimeoutError:jt.transitional(jt.boolean)},!1),n!=null&&(O.isFunction(n)?t.paramsSerializer={serialize:n}:Mr.assertOptions(n,{encode:jt.function,serialize:jt.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Mr.assertOptions(t,{baseUrl:jt.spelling("baseURL"),withXsrfToken:jt.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let s=i&&O.merge(i.common,i[t.method]);i&&O.forEach(["delete","get","head","post","put","patch","common"],h=>{delete i[h]}),t.headers=yt.concat(s,i);const o=[];let a=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(t)===!1||(a=a&&h.synchronous,o.unshift(h.fulfilled,h.rejected))});const u=[];this.interceptors.response.forEach(function(h){u.push(h.fulfilled,h.rejected)});let c,l=0,f;if(!a){const h=[zo.bind(this),void 0];for(h.unshift.apply(h,o),h.push.apply(h,u),f=h.length,c=Promise.resolve(t);l<f;)c=c.then(h[l++],h[l++]);return c}f=o.length;let p=t;for(l=0;l<f;){const h=o[l++],m=o[l++];try{p=h(p)}catch(d){m.call(this,d);break}}try{c=zo.call(this,p)}catch(h){return Promise.reject(h)}for(l=0,f=u.length;l<f;)c=c.then(u[l++],u[l++]);return c}getUri(e){e=ue(this.defaults,e);const t=bu(e.baseURL,e.url,e.allowAbsoluteUrls);return du(t,e.params,e.paramsSerializer)}};O.forEach(["delete","get","head","options"],function(e){ie.prototype[e]=function(t,r){return this.request(ue(r||{},{method:e,url:t,data:(r||{}).data}))}});O.forEach(["post","put","patch"],function(e){function t(r){return function(n,i,s){return this.request(ue(s||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:n,data:i}))}}ie.prototype[e]=t(),ie.prototype[e+"Form"]=t(!0)});let Yb=class Tu{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 Tu(function(r){t=r}),cancel:t}}};function Gb(e){return function(t){return e.apply(null,t)}}function Zb(e){return O.isObject(e)&&e.isAxiosError===!0}const bi={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(bi).forEach(([e,t])=>{bi[t]=e});function Ou(e){const t=new ie(e),r=nu(ie.prototype.request,t);return O.extend(r,ie.prototype,t,{allOwnKeys:!0}),O.extend(r,t,null,{allOwnKeys:!0}),r.create=function(n){return Ou(ue(e,n))},r}const tt=Ou(mr);tt.Axios=ie;tt.CanceledError=Me;tt.CancelToken=Yb;tt.isCancel=vu;tt.VERSION=xu;tt.toFormData=mn;tt.AxiosError=J;tt.Cancel=tt.CanceledError;tt.all=function(e){return Promise.all(e)};tt.spread=Gb;tt.isAxiosError=Zb;tt.mergeConfig=ue;tt.AxiosHeaders=yt;tt.formToJSON=e=>gu(O.isHTMLForm(e)?new FormData(e):e);tt.getAdapter=Su.getAdapter;tt.HttpStatusCode=bi;tt.default=tt;const{Axios:Mw,AxiosError:Fw,CanceledError:Lw,isCancel:Vw,CancelToken:Uw,VERSION:Hw,all:zw,Cancel:qw,isAxiosError:Kw,spread:Jw,toFormData:Ww,AxiosHeaders:Yw,HttpStatusCode:Gw,formToJSON:Zw,getAdapter:Qw,mergeConfig:Xw}=tt,Qb={form:"application/x-www-form-urlencoded",json:"application/json",data:"multipart/form-data"},Xb=["put","post","patch"],_i="Local-Request-Id",t_=100,e_=300;let Au=class{constructor(e={}){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"},e.settings||{});const t=Cr(e,["settings","query"]);this.axios=tt.create(Dt({headers:{"Content-Type":"application/x-www-form-urlencoded"},timeout:2*60*1e3},t)),this.setupSkipWarn(this.settings),this.showLoading=Fi(this.openLoading.bind(this),t_),this.showError=nc(this._showError.bind(this),e_,{leading:!0,trailing:!1})}setConfig(e={}){this.settings=Dt(this.settings,e.settings||{});const t=Cr(e,["settings","query"]);this.axios.defaults=Dt(this.axios.defaults,t),this.setupSkipWarn(this.settings)}cancel(e,t="请求已取消"){if(e){const r=this.records[e];if(!r)return;r.source.cancel(t)}else for(const r of Object.values(this.records))r.source.cancel(t)}createHeaders(e,t,r){const n=t.injectHeaders?typeof t.headers=="function"?t.headers(e,r,t):t.headers||{}:{},i=z(z({"Content-Type":Qb[t.type||"form"]},r.headers),n);return t.skipWarn&&(i[_i]=e),i}isJsonType(e){return Object.entries(e).some(([t,r])=>t.toLowerCase()==="content-type"&&String(r).includes("application/json"))}toFormData(e,t="data"){if(e instanceof FormData||e instanceof URLSearchParams)return e;const r=t==="data"?new FormData:new URLSearchParams;return Object.entries(e).forEach(([n,i])=>{r.append(n,i)}),r}createSendData(e,t,r,n,i={}){const{type:s,skipWarn:o}=e,{name:a="skipWarn"}=o||{};let{data:u,params:c={},method:l="get"}=t;const f=n?{[a]:!0}:{};return Xb.includes(l.toLowerCase())?(u=Object.assign(u||{},f),u=s!=="json"||!this.isJsonType(r)?this.toFormData(u,s):u,c=z({},i)):s==="form"?c=z(z(z({},u||{}),i),f):(u&&(s!=="json"||!this.isJsonType(r))&&(u=this.toFormData(u,s)),c=z(z({},i),f)),{data:u,params:c}}createUrl(e){let{url:t,params:r}=e;if(t){let n=Ui(t)?new URL(t).origin:"";const i=n?t.replace(n,""):t;try{const s=kc(i,{encode:encodeURIComponent});return n+s(r||{})}catch(s){console.warn("createUrl","pathToRegexpCompile error",t)}}return t}openLoading(e){const{loading:t,showLoading:r}=e;t&&r&&Object.keys(this.records).length>0&&(this.isLoading=!0,r())}closeLoading(e){const{loading:t,hideLoading:r}=e;if(!t)return;this.isLoading=!1;const n=Object.keys(this.records);r&&n.length===0&&(this.isLoading=!1,r())}_showError(e,t){var i;const{failMessage:r,showError:n}=e;if(r&&n){const s=(i=t.response)==null?void 0:i.data,o=(s==null?void 0:s.message)||(s==null?void 0:s.msg)||(t==null?void 0:t.message)||(t==null?void 0:t.msg)||"未知错误";n(o,t)}}validResponse(e,t){const{validSuccess:r,validate:n}=e;return r&&n?!!n(t):!0}isSkipWarnResponse(e){return!!e.promise}send(e={},t=!1){const r=Dt({},this.settings,e.settings||{}),n=e.query||{},i=Cr(e,["settings","query"]),s=Ac(!1),o=tt.CancelToken.source();this.records[s]={settings:r,config:i,source:o};const a=this.createUrl(i),u=this.createHeaders(s,r,i),{data:c,params:l}=this.createSendData(r,i,u,t,n);return this.showLoading(r),new Promise((f,p)=>{this.axios(st(z({cancelToken:o.token},i),{url:a,headers:u,data:c,params:l})).then(h=>{var m;return this.isSkipWarnResponse(h)?f(h.promise):this.validResponse(r,h)?f(r.originResponse?h:(m=h.data)==null?void 0:m.data):(this.showError(r,h.data),p(h.data))}).catch(h=>(this.showError(r,h),p(h))).finally(()=>{delete this.records[s],this.closeLoading(r)})})}useResponse(e,t){const{response:r}=this.axios.interceptors,n=r.use(e,t);return()=>r.eject(n)}useRequest(e,t){const{request:r}=this.axios.interceptors,n=r.use(e,t);return()=>r.eject(n)}setupSkipWarn(e){if(this.stopSkipWarn&&(this.stopSkipWarn(),this.stopSkipWarn=void 0),!e.skipWarn)return;const{code:t,executor:r,callback:n,complete:i}=e.skipWarn;this.stopSkipWarn=this.useResponse(s=>{const o=(s.config.headers||{})[_i],a=this.records[o];if(!a)return s;const{data:u}=s;if(!u||typeof u!="object")return s;if((u==null?void 0:u.code)===t){n&&n(s);const c=new Promise(r).then(()=>this.send(st(z({},a.config),{settings:a.settings}),!0));c.catch(l=>l).finally(()=>{i&&i()}),s.promise=c}return s})}};function yn(e={}){const t=new Au(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 ar=yn({settings:{injectHeaders:!0,loading:!0,originResponse:!0}});function $u(e){const t=typeof e=="string"?{url:e}:e;return(r,n)=>ar.send(Dt({},t,n||{},{data:r}))}function r_(e){const t={};for(const[r,n]of Object.entries(e))t[r]=$u(n);return t}function n_(e,t){const r=kn(null),n=kn(),i=kn(!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 Ce=typeof window<"u",i_=e=>new Promise((t,r)=>{const n=new FileReader;n.readAsDataURL(e),n.onload=()=>{t(n.result)},n.onerror=i=>{r(i)}});function Ru(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 o_(e,t){const r=e;return r.lastModified=Date.now(),r.lastModifiedDate=new Date,r.name=t,r}const a_=e=>Ce?window.requestAnimationFrame(e):setTimeout(e,16),c_=e=>Ce?window.cancelAnimationFrame(e):clearTimeout(e);class ns{constructor(t={}){xt(this,"options",{type:"cache",expired:0,prefix:"__VTJ_"}),xt(this,"caches",{}),xt(this,"types"),this.types={local:Ce?window.localStorage:this.caches,session:Ce?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 ns;function ju(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Lr={exports:{}},u_=Lr.exports,Ko;function l_(){return Ko||(Ko=1,function(e,t){(function(r,n){n(t,e)})(u_,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,p=l.timeout||i.timeout,h=l.jsonpCallback||i.jsonpCallback,m=void 0;return new Promise(function(d,b){var E=l.jsonpCallbackFunction||s(),g=h+"_"+E;window[E]=function(_){d({ok:!0,json:function(){return Promise.resolve(_)}}),m&&clearTimeout(m),a(g),o(E)},f+=f.indexOf("?")===-1?"?":"&";var y=document.createElement("script");y.setAttribute("src",""+f+h+"="+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),m=setTimeout(function(){b(new Error("JSONP request to "+c+" timed out")),o(E),a(g),window[E]=function(){o(E)}},p),y.onerror=function(){b(new Error("JSONP request to "+c+" failed")),o(E),a(g),m&&clearTimeout(m)}})}n.exports=u})}(Lr,Lr.exports)),Lr.exports}var f_=l_();const h_=ju(f_);function p_(e){if(Ce){const{protocol:t,host:r,pathname:n}=location;return`${t}//${r}${e?n:""}`}else return null}function d_(e=""){const t=e.match(Vi);return t?t[0]:""}function Du(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 wi(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 Cu(e,t){t=typeof t=="string"?wi(t):t;const r=e.split("?")[0],n=wi(e),i=Object.assign({},n,t),s=Du(i);return s?[r,s].join("?"):e}const se=Object.freeze(Object.defineProperty({__proto__:null,append:Cu,getCurrentHost:p_,getHost:d_,parse:wi,stringify:Du},Symbol.toStringTag,{value:"Module"}));function is(r){return L(this,arguments,function*(e,t={}){const{query:n={}}=t;e.includes("${")&&(e=rc(e)(n||{}));const i=Cu(e,n);return yield(yield h_(i,t)).json()})}var Ln,Jo;function m_(){if(Jo)return Ln;Jo=1,Ln=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 Ln}var g_=m_();const v_=ju(g_);function Ei(e,t={}){return new Promise((r,n)=>{const{library:i}=t;v_(e,t,(s,o)=>{s?n(s):r(i?window[i]:void 0)})})}const Wo={debug:-1,log:0,info:0,warn:1,error:2},y_=function(e,t,r,n){return function(...i){if(t&&Wo[t]<=Wo[e]&&console[e].apply&&(n==="*"||r.startsWith(n)))return console[e].apply(console,b_(i,r))}};function b_(e,t){return t!=="*"&&(typeof e[0]=="string"?e[0]=`[${t}] ${e[0]}`:e=["["+t+"]"].concat(e)),e}function __(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 w_={level:"warn",bizName:"*"};class Pu{constructor(t){xt(this,"config"),xt(this,"options"),this.options=z(z({},w_),t);const r=typeof location<"u"?location:{},n=(/__(?:logConf|logLevel)__=([^#/&]*)/.exec(r.href)||[])[1];this.config=__(n,t)}_log(t){const{targetLevel:r,targetBizName:n}=this.config,{bizName:i}=this.options;return y_(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 Bu(e){return new Pu(e)}const oe=Bu({level:"log",bizName:"VTJ"});/*! js-cookie v3.0.5 | MIT */function $r(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 E_={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 Si(e,t){function r(i,s,o){if(!(typeof document>"u")){o=$r({},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,"",$r({},s,{expires:-1}))},withAttributes:function(i){return Si(this.converter,$r({},this.attributes,i))},withConverter:function(i){return Si($r({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var ss=Si(E_,{path:"/"});function S_(e,t,r){ss.set(e,t,r)}function x_(e){return ss.get(e)}function T_(e,t){ss.remove(e,t)}const Vr=Object.freeze(Object.defineProperty({__proto__:null,get:x_,remove:T_,set:S_},Symbol.toStringTag,{value:"Module"}));function O_(e,t=""){const r=document.createElement("a");r.download=t,r.href=e,r.target="_blank",r.click()}function os(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 A_(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 os(i,t,r),i}))})}function $_(e,t=""){const r=JSON.stringify(e);os(r,t,"application/json")}const tE=Object.freeze(Object.defineProperty({__proto__:null,AES:n1,LOCAL_REQUEST_ID:_i,Logger:Pu,MD5:Xy,RSA:r1,Request:Au,Storage:ns,VTJ_UTILS_VERSION:J1,arrayToKv:b1,arrayToMap:$c,arrayToTree:T1,avg:E1,axios:tt,base64:t1,blobToFile:o_,cAF:c_,camelCase:Nt,cloneDeep:ir,compress:P1,cookie:Vr,createApi:$u,createApis:r_,createRequest:yn,dataURLtoBlob:s_,dateFormat:p1,dayjs:Hi,debounce:Fi,decompress:B1,dedupArray:Rc,delay:Se,downloadBlob:os,downloadJson:$_,downloadRemoteFile:A_,downloadUrl:O_,fileToBase64:i_,flatChildren:Cc,formDataToJson:Ru,get:pa,getLogger:Bu,groupBy:Qa,isArray:pt,isArrayBuffer:kv,isBoolean:Mv,isBuffer:Re,isCarNo:c1,isClient:Ce,isDate:Uv,isDef:g1,isEmail:s1,isEqual:Hv,isFunction:ae,isIdCardNo:o1,isMobilePhone:a1,isNaN:qv,isNull:Kv,isNumber:Xa,isObject:ct,isPlainObject:ki,isString:bt,isSymbol:ur,isUndefined:Jv,isUrl:Ui,jsonp:is,kebabCase:Yv,kvToArray:_1,loadScript:Ei,logger:oe,lowerFirst:Zv,mapToObject:un,merge:Dt,mitt:Nc,noop:gf,now:v1,numberFormat:l1,numeral:Ec,omit:Cr,pathToRegexp:ln,pathToRegexpCompile:kc,pathToRegexpMatch:Ic,pathToRegexpParse:zi,pick:jc,rAF:a_,rCar:_c,rEmail:vc,rID:yc,rMobile:bc,rURL:Vi,random:y1,request:ar,set:ty,snakeCase:ry,splitParser:S1,splitStringify:x1,storage:Fr,sum:Dc,template:rc,throttle:nc,timestamp:Oc,toArray:ii,toFixed:f1,toRawType:m1,toTypeString:Tc,trim:si,uid:gt,unAES:i1,unBase64:e1,unRSA:ni,upperFirst:on,upperFirstCamelCase:ti,url:se,useApi:n_,uuid:Ac,zipObject:w1},Symbol.toStringTag,{value:"Module"}));/**!
71
+ `+i):r.stack=i}catch(s){}}throw r}})}_request(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=ue(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:i}=t;r!==void 0&&Mr.assertOptions(r,{silentJSONParsing:jt.transitional(jt.boolean),forcedJSONParsing:jt.transitional(jt.boolean),clarifyTimeoutError:jt.transitional(jt.boolean)},!1),n!=null&&(O.isFunction(n)?t.paramsSerializer={serialize:n}:Mr.assertOptions(n,{encode:jt.function,serialize:jt.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Mr.assertOptions(t,{baseUrl:jt.spelling("baseURL"),withXsrfToken:jt.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let s=i&&O.merge(i.common,i[t.method]);i&&O.forEach(["delete","get","head","post","put","patch","common"],h=>{delete i[h]}),t.headers=yt.concat(s,i);const o=[];let a=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(t)===!1||(a=a&&h.synchronous,o.unshift(h.fulfilled,h.rejected))});const u=[];this.interceptors.response.forEach(function(h){u.push(h.fulfilled,h.rejected)});let c,l=0,f;if(!a){const h=[zo.bind(this),void 0];for(h.unshift.apply(h,o),h.push.apply(h,u),f=h.length,c=Promise.resolve(t);l<f;)c=c.then(h[l++],h[l++]);return c}f=o.length;let p=t;for(l=0;l<f;){const h=o[l++],m=o[l++];try{p=h(p)}catch(d){m.call(this,d);break}}try{c=zo.call(this,p)}catch(h){return Promise.reject(h)}for(l=0,f=u.length;l<f;)c=c.then(u[l++],u[l++]);return c}getUri(e){e=ue(this.defaults,e);const t=bu(e.baseURL,e.url,e.allowAbsoluteUrls);return du(t,e.params,e.paramsSerializer)}};O.forEach(["delete","get","head","options"],function(e){ie.prototype[e]=function(t,r){return this.request(ue(r||{},{method:e,url:t,data:(r||{}).data}))}});O.forEach(["post","put","patch"],function(e){function t(r){return function(n,i,s){return this.request(ue(s||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:n,data:i}))}}ie.prototype[e]=t(),ie.prototype[e+"Form"]=t(!0)});let Yb=class Tu{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 Tu(function(r){t=r}),cancel:t}}};function Gb(e){return function(t){return e.apply(null,t)}}function Zb(e){return O.isObject(e)&&e.isAxiosError===!0}const bi={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(bi).forEach(([e,t])=>{bi[t]=e});function Ou(e){const t=new ie(e),r=nu(ie.prototype.request,t);return O.extend(r,ie.prototype,t,{allOwnKeys:!0}),O.extend(r,t,null,{allOwnKeys:!0}),r.create=function(n){return Ou(ue(e,n))},r}const tt=Ou(mr);tt.Axios=ie;tt.CanceledError=Me;tt.CancelToken=Yb;tt.isCancel=vu;tt.VERSION=xu;tt.toFormData=mn;tt.AxiosError=J;tt.Cancel=tt.CanceledError;tt.all=function(e){return Promise.all(e)};tt.spread=Gb;tt.isAxiosError=Zb;tt.mergeConfig=ue;tt.AxiosHeaders=yt;tt.formToJSON=e=>gu(O.isHTMLForm(e)?new FormData(e):e);tt.getAdapter=Su.getAdapter;tt.HttpStatusCode=bi;tt.default=tt;const{Axios:Mw,AxiosError:Fw,CanceledError:Lw,isCancel:Vw,CancelToken:Uw,VERSION:Hw,all:zw,Cancel:qw,isAxiosError:Kw,spread:Jw,toFormData:Ww,AxiosHeaders:Yw,HttpStatusCode:Gw,formToJSON:Zw,getAdapter:Qw,mergeConfig:Xw}=tt,Qb={form:"application/x-www-form-urlencoded",json:"application/json",data:"multipart/form-data"},Xb=["put","post","patch"],_i="Local-Request-Id",t_=100,e_=300;let Au=class{constructor(e={}){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"},e.settings||{});const t=Cr(e,["settings","query"]);this.axios=tt.create(Dt({headers:{"Content-Type":"application/x-www-form-urlencoded"},timeout:2*60*1e3},t)),this.setupSkipWarn(this.settings),this.showLoading=Fi(this.openLoading.bind(this),t_),this.showError=nc(this._showError.bind(this),e_,{leading:!0,trailing:!1})}setConfig(e={}){this.settings=Dt(this.settings,e.settings||{});const t=Cr(e,["settings","query"]);this.axios.defaults=Dt(this.axios.defaults,t),this.setupSkipWarn(this.settings)}cancel(e,t="请求已取消"){if(e){const r=this.records[e];if(!r)return;r.source.cancel(t)}else for(const r of Object.values(this.records))r.source.cancel(t)}createHeaders(e,t,r){const n=t.injectHeaders?typeof t.headers=="function"?t.headers(e,r,t):t.headers||{}:{},i=z(z({"Content-Type":Qb[t.type||"form"]},r.headers),n);return t.skipWarn&&(i[_i]=e),i}isJsonType(e){return Object.entries(e).some(([t,r])=>t.toLowerCase()==="content-type"&&String(r).includes("application/json"))}toFormData(e,t="data"){if(e instanceof FormData||e instanceof URLSearchParams)return e;const r=t==="data"?new FormData:new URLSearchParams;return Object.entries(e).forEach(([n,i])=>{r.append(n,i)}),r}createSendData(e,t,r,n,i={}){const{type:s,skipWarn:o}=e,{name:a="skipWarn"}=o||{};let{data:u,params:c={},method:l="get"}=t;const f=n?{[a]:!0}:{};return Xb.includes(l.toLowerCase())?(u=Object.assign(u||{},f),u=s!=="json"||!this.isJsonType(r)?this.toFormData(u,s):u,c=z({},i)):s==="form"?c=z(z(z({},u||{}),i),f):(u&&(s!=="json"||!this.isJsonType(r))&&(u=this.toFormData(u,s)),c=z(z({},i),f)),{data:u,params:c}}createUrl(e){let{url:t,params:r}=e;if(t){let n=Ui(t)?new URL(t).origin:"";const i=n?t.replace(n,""):t;try{const s=kc(i,{encode:encodeURIComponent});return n+s(r||{})}catch(s){console.warn("createUrl","pathToRegexpCompile error",t)}}return t}openLoading(e){const{loading:t,showLoading:r}=e;t&&r&&Object.keys(this.records).length>0&&(this.isLoading=!0,r())}closeLoading(e){const{loading:t,hideLoading:r}=e;if(!t)return;this.isLoading=!1;const n=Object.keys(this.records);r&&n.length===0&&(this.isLoading=!1,r())}_showError(e,t){var i;const{failMessage:r,showError:n}=e;if(r&&n){const s=(i=t==null?void 0:t.response)==null?void 0:i.data,o=(s==null?void 0:s.message)||(s==null?void 0:s.msg)||(t==null?void 0:t.message)||(t==null?void 0:t.msg)||"未知错误";n(o,t)}}validResponse(e,t){const{validSuccess:r,validate:n}=e;return r&&n?!!n(t):!0}isSkipWarnResponse(e){return!!e.promise}send(e={},t=!1){const r=Dt({},this.settings,e.settings||{}),n=e.query||{},i=Cr(e,["settings","query"]),s=Ac(!1),o=tt.CancelToken.source();this.records[s]={settings:r,config:i,source:o};const a=this.createUrl(i),u=this.createHeaders(s,r,i),{data:c,params:l}=this.createSendData(r,i,u,t,n);return this.showLoading(r),new Promise((f,p)=>{this.axios(st(z({cancelToken:o.token},i),{url:a,headers:u,data:c,params:l})).then(h=>{var m;return this.isSkipWarnResponse(h)?f(h.promise):this.validResponse(r,h)?f(r.originResponse?h:(m=h.data)==null?void 0:m.data):(this.showError(r,h.data),p(h.data))}).catch(h=>(this.showError(r,h),p(h))).finally(()=>{delete this.records[s],this.closeLoading(r)})})}useResponse(e,t){const{response:r}=this.axios.interceptors,n=r.use(e,t);return()=>r.eject(n)}useRequest(e,t){const{request:r}=this.axios.interceptors,n=r.use(e,t);return()=>r.eject(n)}setupSkipWarn(e){if(this.stopSkipWarn&&(this.stopSkipWarn(),this.stopSkipWarn=void 0),!e.skipWarn)return;const{code:t,executor:r,callback:n,complete:i}=e.skipWarn;this.stopSkipWarn=this.useResponse(s=>{const o=(s.config.headers||{})[_i],a=this.records[o];if(!a)return s;const{data:u}=s;if(!u||typeof u!="object")return s;if((u==null?void 0:u.code)===t){n&&n(s);const c=new Promise(r).then(()=>this.send(st(z({},a.config),{settings:a.settings}),!0));c.catch(l=>l).finally(()=>{i&&i()}),s.promise=c}return s})}};function yn(e={}){const t=new Au(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 ar=yn({settings:{injectHeaders:!0,loading:!0,originResponse:!0}});function $u(e){const t=typeof e=="string"?{url:e}:e;return(r,n)=>ar.send(Dt({},t,n||{},{data:r}))}function r_(e){const t={};for(const[r,n]of Object.entries(e))t[r]=$u(n);return t}function n_(e,t){const r=kn(null),n=kn(),i=kn(!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 Ce=typeof window<"u",i_=e=>new Promise((t,r)=>{const n=new FileReader;n.readAsDataURL(e),n.onload=()=>{t(n.result)},n.onerror=i=>{r(i)}});function Ru(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 o_(e,t){const r=e;return r.lastModified=Date.now(),r.lastModifiedDate=new Date,r.name=t,r}const a_=e=>Ce?window.requestAnimationFrame(e):setTimeout(e,16),c_=e=>Ce?window.cancelAnimationFrame(e):clearTimeout(e);class ns{constructor(t={}){xt(this,"options",{type:"cache",expired:0,prefix:"__VTJ_"}),xt(this,"caches",{}),xt(this,"types"),this.types={local:Ce?window.localStorage:this.caches,session:Ce?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 ns;function ju(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Lr={exports:{}},u_=Lr.exports,Ko;function l_(){return Ko||(Ko=1,function(e,t){(function(r,n){n(t,e)})(u_,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,p=l.timeout||i.timeout,h=l.jsonpCallback||i.jsonpCallback,m=void 0;return new Promise(function(d,b){var E=l.jsonpCallbackFunction||s(),g=h+"_"+E;window[E]=function(_){d({ok:!0,json:function(){return Promise.resolve(_)}}),m&&clearTimeout(m),a(g),o(E)},f+=f.indexOf("?")===-1?"?":"&";var y=document.createElement("script");y.setAttribute("src",""+f+h+"="+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),m=setTimeout(function(){b(new Error("JSONP request to "+c+" timed out")),o(E),a(g),window[E]=function(){o(E)}},p),y.onerror=function(){b(new Error("JSONP request to "+c+" failed")),o(E),a(g),m&&clearTimeout(m)}})}n.exports=u})}(Lr,Lr.exports)),Lr.exports}var f_=l_();const h_=ju(f_);function p_(e){if(Ce){const{protocol:t,host:r,pathname:n}=location;return`${t}//${r}${e?n:""}`}else return null}function d_(e=""){const t=e.match(Vi);return t?t[0]:""}function Du(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 wi(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 Cu(e,t){t=typeof t=="string"?wi(t):t;const r=e.split("?")[0],n=wi(e),i=Object.assign({},n,t),s=Du(i);return s?[r,s].join("?"):e}const se=Object.freeze(Object.defineProperty({__proto__:null,append:Cu,getCurrentHost:p_,getHost:d_,parse:wi,stringify:Du},Symbol.toStringTag,{value:"Module"}));function is(r){return L(this,arguments,function*(e,t={}){const{query:n={}}=t;e.includes("${")&&(e=rc(e)(n||{}));const i=Cu(e,n);return yield(yield h_(i,t)).json()})}var Ln,Jo;function m_(){if(Jo)return Ln;Jo=1,Ln=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 Ln}var g_=m_();const v_=ju(g_);function Ei(e,t={}){return new Promise((r,n)=>{const{library:i}=t;v_(e,t,(s,o)=>{s?n(s):r(i?window[i]:void 0)})})}const Wo={debug:-1,log:0,info:0,warn:1,error:2},y_=function(e,t,r,n){return function(...i){if(t&&Wo[t]<=Wo[e]&&console[e].apply&&(n==="*"||r.startsWith(n)))return console[e].apply(console,b_(i,r))}};function b_(e,t){return t!=="*"&&(typeof e[0]=="string"?e[0]=`[${t}] ${e[0]}`:e=["["+t+"]"].concat(e)),e}function __(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 w_={level:"warn",bizName:"*"};class Pu{constructor(t){xt(this,"config"),xt(this,"options"),this.options=z(z({},w_),t);const r=typeof location<"u"?location:{},n=(/__(?:logConf|logLevel)__=([^#/&]*)/.exec(r.href)||[])[1];this.config=__(n,t)}_log(t){const{targetLevel:r,targetBizName:n}=this.config,{bizName:i}=this.options;return y_(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 Bu(e){return new Pu(e)}const oe=Bu({level:"log",bizName:"VTJ"});/*! js-cookie v3.0.5 | MIT */function $r(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 E_={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 Si(e,t){function r(i,s,o){if(!(typeof document>"u")){o=$r({},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,"",$r({},s,{expires:-1}))},withAttributes:function(i){return Si(this.converter,$r({},this.attributes,i))},withConverter:function(i){return Si($r({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var ss=Si(E_,{path:"/"});function S_(e,t,r){ss.set(e,t,r)}function x_(e){return ss.get(e)}function T_(e,t){ss.remove(e,t)}const Vr=Object.freeze(Object.defineProperty({__proto__:null,get:x_,remove:T_,set:S_},Symbol.toStringTag,{value:"Module"}));function O_(e,t=""){const r=document.createElement("a");r.download=t,r.href=e,r.target="_blank",r.click()}function os(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 A_(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 os(i,t,r),i}))})}function $_(e,t=""){const r=JSON.stringify(e);os(r,t,"application/json")}const tE=Object.freeze(Object.defineProperty({__proto__:null,AES:n1,LOCAL_REQUEST_ID:_i,Logger:Pu,MD5:Xy,RSA:r1,Request:Au,Storage:ns,VTJ_UTILS_VERSION:J1,arrayToKv:b1,arrayToMap:$c,arrayToTree:T1,avg:E1,axios:tt,base64:t1,blobToFile:o_,cAF:c_,camelCase:Nt,cloneDeep:ir,compress:P1,cookie:Vr,createApi:$u,createApis:r_,createRequest:yn,dataURLtoBlob:s_,dateFormat:p1,dayjs:Hi,debounce:Fi,decompress:B1,dedupArray:Rc,delay:Se,downloadBlob:os,downloadJson:$_,downloadRemoteFile:A_,downloadUrl:O_,fileToBase64:i_,flatChildren:Cc,formDataToJson:Ru,get:pa,getLogger:Bu,groupBy:Qa,isArray:pt,isArrayBuffer:kv,isBoolean:Mv,isBuffer:Re,isCarNo:c1,isClient:Ce,isDate:Uv,isDef:g1,isEmail:s1,isEqual:Hv,isFunction:ae,isIdCardNo:o1,isMobilePhone:a1,isNaN:qv,isNull:Kv,isNumber:Xa,isObject:ct,isPlainObject:ki,isString:bt,isSymbol:ur,isUndefined:Jv,isUrl:Ui,jsonp:is,kebabCase:Yv,kvToArray:_1,loadScript:Ei,logger:oe,lowerFirst:Zv,mapToObject:un,merge:Dt,mitt:Nc,noop:gf,now:v1,numberFormat:l1,numeral:Ec,omit:Cr,pathToRegexp:ln,pathToRegexpCompile:kc,pathToRegexpMatch:Ic,pathToRegexpParse:zi,pick:jc,rAF:a_,rCar:_c,rEmail:vc,rID:yc,rMobile:bc,rURL:Vi,random:y1,request:ar,set:ty,snakeCase:ry,splitParser:S1,splitStringify:x1,storage:Fr,sum:Dc,template:rc,throttle:nc,timestamp:Oc,toArray:ii,toFixed:f1,toRawType:m1,toTypeString:Tc,trim:si,uid:gt,unAES:i1,unBase64:e1,unRSA:ni,upperFirst:on,upperFirstCamelCase:ti,url:se,useApi:n_,uuid:Ac,zipObject:w1},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.14
75
+ * @version 0.10.15
76
76
  * @license <a href="https://vtj.pro/license.html">MIT License</a>
77
- */const Ae="0.10.14";var ht=(e=>(e.Runtime="Runtime",e.Design="Design",e.Raw="Raw",e.VNode="VNode",e))(ht||{});const xi=["$el","$emit","$nextTick","$parent","$root","$attrs","$slots","$watch","$props","$options","$forceUpdate"],R_=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeUnmount","unmounted","errorCaptured","renderTracked","renderTriggered","activated","deactivated"],Nu=["vIf","vShow","vModel","vFor","vBind","vHtml"],ku={String,Number,Boolean,Array,Object,Function,Date},$e="VtjPage",Xe="VtjHomepage",Iu="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(","),Mu="component,slot".split(",");function Ge(e,t){return e.map(r=>Ui(r)||r.startsWith("/")?r:`${t}${r}`)}function bn(e){return/\.css$/.test(e)}function _n(e){return/\.js$/.test(e)}function Fu(e){return/\.json$/.test(e)}function j_(e){return e.map(t=>`<script src="${se.append(t,{v:Ae})}"><\/script>`).join("")}function D_(e=[]){return e.map(t=>`<link rel="stylesheet" href="${se.append(t,{v:Ae})}" />`).join("")}function Lu(e,t=!1){return t&&e.endsWith(".prod.js")?e.replace(".prod.js",".js"):e}function Vu(e,t,r=!1){const n=e.filter(p=>!!p.enabled),i=[],s=[],o=[],a=[],u={},c={},l=[],f={};return n.forEach(({urls:p,assetsUrl:h,library:m,assetsLibrary:d,localeLibrary:b})=>{p==null||p.forEach(E=>{_n(E)&&i.push(Lu(E,r)),bn(E)&&s.push(E)}),m&&(a.push(m),u[m]=Ge(p||[],t),b&&(c[m]=b)),h&&o.push(h),d&&l.push(d),m&&d&&(f[d]=m)}),{scripts:Ge(i,t),css:Ge(s,t),materials:Ge(o,t),libraryExports:a,materialExports:Rc(l),materialMapLibrary:f,libraryMap:u,libraryLocaleMap:c}}function Uu(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 as(e){return bt(e)?e:JSON.stringify(e)}function cs(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 Hu(e,t){return L(this,null,function*(){const r=yield window.fetch(t).then(n=>n.text()).catch(()=>"");r&&cs(window,e,r)})}function zu(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 qu(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=p=>{c(p)},o.appendChild(f)}})})}function Ku(e){return ae(e)||ae(e==null?void 0:e.install)}function Ju(e){return Mu.includes(e)}function Wu(e){return Iu.includes(e)}function Pe(e=window){const t=window==null?void 0:window.Mock;if(t)return t;const r=e==null?void 0:e.Mock;if(r&&window)return window.Mock=r,r}function C_(e,t,r){Object.assign(t.meta,r.meta);const n=e==null?void 0:e._container;(r==null?void 0:r.type)==="page"&&n.classList.add("is-page"),r!=null&&r.pure&&n.classList.add("is-pure")}function Be(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
- `)+o;const a=`with(${r?"{}":"$scope || {}"}) { ${o} }`;return new Function("$scope",a)(t)}catch(s){if(oe.error("parseExpression.error",s,e,(i=t==null?void 0:t.__self)!=null?i:t),n)throw s}}function Gr(e,t,r=!1,n=!1){var s;const i=Be(e,t,r,n);if(typeof i!="function"&&(oe.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 Fe(e){return typeof e=="object"&&e&&e.type==="JSFunction"}function Yu(e){return wt(e)||Fe(e)}function P_(e){return Yu(e)?e.value:JSON.stringify(e)}const B_={session:!1,authKey:"Authorization",storageKey:"ACCESS_STORAGE",storagePrefix:"__VTJ_",unauthorized:void 0,auth:"/#/login",redirectParam:"r",unauthorizedCode:401,unauthorizedMessage:"登录已经失效,请重新登录!",noPermissionMessage:"无权限访问该页面",appName:""},us=Symbol("access");class ls{constructor(t){$(this,"options");$(this,"data",null);$(this,"mode",ht.Raw);this.options=Object.assign({},B_,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):ii(t).every(i=>n[i]||n[r+"."+i])}some(t){const{appName:r}=this.options,{permissions:n={}}=this.data||{};return ii(t).some(i=>n[i]||n[r+"."+i])}install(t){t.config.globalProperties.$access||(t.config.globalProperties.$access=this,t.provide(us,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=>ni(i,r));this.data=JSON.parse(n.join(""));return}if(typeof t=="string")try{const n=r?ni(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===$e){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),ae(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 Se(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 Gu(){return Go(us,null)}function N_(e={}){const{notify:t,loading:r,settings:n={},Startup:i,access:s,remote:o="https://lcdp.vtj.pro"}=e;let a=null;return{request:yn({settings:z({type:"form",validSuccess:!0,originResponse:!1,loading:!0,validate:u=>{var c,l;return((c=u.data)==null?void 0:c.code)===0||!!((l=u.data)!=null&&l.success)},failMessage:!0,showError:u=>{t&&t(u||"未知错误")},showLoading:()=>{a&&a.close(),r&&(a=r())},hideLoading:()=>{a&&(a.close(),a=null)}},n)}),jsonp:is,notify:t,loading:r,startupComponent:i,remote:o,access:s?Zu(s):void 0}}function Zu(e={}){const t={storageKey:"RRO_IDE_ACCESS_STORAGE__",auth:"https://lcdp.vtj.pro/auth.html",privateKey:"MIIBOgIBAAJBAKoIzmn1FYQ1YOhOBw9EhABxZ+PySAIaydI+zdhoKflrdgJ4A5E4/5gbQmRpk09hPWG8nvX7h+l/QLU8kXxAIBECAwEAAQJAAlgpxQY6sByLsXqzJcthC8LSGsLf2JEJkHwlnpwFqlEV8UCkoINpuZ2Wzl+aftURu5rIfAzRCQBvHmeOTW9/zQIhAO5ufWDmnSLyfAAsNo5JRNpVuLFCFodR8Xm+ulDlosR/AiEAtpAltyP9wmCABKG/v/hrtTr3mcvFNGCjoGa9bUAok28CIHbrVs9w1ijrBlvTsXYwJw46uP539uKRRT4ymZzlm9QjAiB+1KH/G9f9pEEL9rtaSOG7JF5D0JcOjlze4MGVFs+ZrQIhALKOUFBNr2zEsyJIjw2PlvEucdlG77UniszjXTROHSPd"};return new ls(Object.assign(t,e))}function Qu(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?Be(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 Xu(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 tl(e=[],t=[],r){const n={};for(const i of e)n[i.id]=Qu(i,r);for(const i of t)n[i.id]=Xu(i,r);return n}function el(){return L(this,arguments,function*(e=[],t=window){const r=Pe(t);r&&(fs(t),e.forEach(n=>nl(r,n)))})}function rl(e,t=window){const r=Fe(e.mockTemplate)&&e.mockTemplate.value?Gr(e.mockTemplate,{},!0):void 0,n=Pe(t);return(...i)=>L(this,null,function*(){let s={};if(r)try{s=yield r.apply(r,i)}catch(o){oe.warn("模拟数据模版异常",o)}return n==null?void 0:n.mock(s)})}function nl(e,t){if(!t.mock)return;const{url:r,mockTemplate:n}=t;if(r&&n){const i=ln(`${r}(.*)`),s=Ic(r,{decode:decodeURIComponent}),o=Be(n,{},!0);e.mock(i,a=>{var f;const u=se.parse(a.url)||{},c=a.body instanceof FormData?Ru(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 fs(e=window){const t=Pe(e);t&&(t._mocked={})}class il{constructor(t){$(this,"__id",null);$(this,"__mode");$(this,"__instance",null);$(this,"__contextRefs",{});$(this,"__refs",{});$(this,"context",{});$(this,"state",{});$(this,"props",{});$(this,"$props",{});$(this,"$refs",{});$(this,"$el",null);$(this,"$emit",null);$(this,"$nextTick",null);$(this,"$parent",null);$(this,"$root",null);$(this,"$attrs",null);$(this,"$slots",null);$(this,"$watch",null);$(this,"$options",null);$(this,"$forceUpdate",null);$(this,"$components",{});$(this,"$libs",{});$(this,"$apis",{});$(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=Xr){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&&xi.forEach(t=>{var r;this[t]=(r=this.__instance)==null?void 0:r[t]})}__cleanup(){xi.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 Gr({type:i,value:s},this)}else return Gr(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 Be({type:i,value:s},this)}else return Be(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 Se(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 Zr(e){var f,p;const{Vue:t=Xr,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 il({mode:r,dsl:a.value,attrs:u}),l=t.defineComponent(z({name:a.value.name,props:z({},I_((f=a.value.props)!=null?f:[],c)),setup(h){var y,_,S,v;c.$props=h,c.props=h,a.value.id&&cs(e.window||window,a.value.id,a.value.css||""),c.state=M_(t,(y=a.value.state)!=null?y:{},c);const m=F_(t,(_=a.value.computed)!=null?_:{},c),d=L_((S=a.value.methods)!=null?S:{},c),b=V_(t,a.value.inject,c),E=sl(a.value.dataSources||{},c),g=z(z(z(z({},b),m),d),E);return c.setup(g,t),U_(t,(v=a.value.watch)!=null?v:[],c),{vtj:c}},emits:k_(a.value.emits),expose:["vtj"],render(){if(!a.value.nodes)return null;const h=a.value.nodes||[];return h.length===1?cr(h[0],c,t,o):h.map(m=>cr(m,c,t,o))}},H_((p=a.value.lifeCycles)!=null?p:{},c)));return{renderer:t.markRaw(l),context:c}}function k_(e=[]){return e.map(t=>bt(t)?t:t.name)}function I_(e=[],t){const r=n=>n?(Array.isArray(n)?n:[n]).map(i=>ku[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 M_(e,t,r){return e.reactive(Object.keys(t||{}).reduce((n,i)=>{let s=t[i];return wt(s)?s=r.__parseExpression(s):Fe(s)&&(s=r.__parseFunction(s)),n[i]=s,n},{}))}function F_(e,t,r){return Object.entries(t!=null?t:{}).reduce((n,[i,s])=>(n[i]=e.computed(r.__parseFunction(s)),n),{})}function L_(e,t){return Object.entries(e!=null?e:{}).reduce((r,[n,i])=>(r[n]=t.__parseFunction(i),r),{})}function V_(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 sl(e,t){return Object.keys(e).reduce((r,n)=>{const i=e[n];if(i.type==="mock")r[n]=rl(i);else if(i.ref){const s=t.$apis[i.ref],o=Fe(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 U_(e,t=[],r){t.forEach(n=>{e.watch(r.__parseExpression(n.source),r.__parseFunction(n.handler),{deep:n.deep,immediate:n.immediate})})}function H_(e,t){return Object.entries(e!=null?e:{}).reduce((r,[n,i])=>(r[n]=t.__parseFunction(i),r),{})}let Vn=[],Xt={};const ol=e=>e;function hs(r){return L(this,arguments,function*(e,t=window){const{urls:n=[],library:i}=e,s=n.filter(a=>_n(a));if(s.length===0||!i)return null;const o=n.filter(a=>bn(a));return o.length&&zu(o,t),yield qu(s,i,t).catch(a=>(console.warn("loadScriptUrl error",s,i,a),null))})}function Qr(e){const{getDsl:t,getDslByUrl:r,options:n}=e;return n.window&&(Vn.forEach(i=>{delete n.window[i]}),Vn=[]),(i,s,o=Xr)=>{if(!s||typeof s=="string")return i;if(s.type==="Schema"&&s.id){let a=Xt[s.id];return a||(a=Xt[s.id]=o.defineAsyncComponent(()=>L(this,null,function*(){const u=yield t(s.id);return u&&(u.name=i),u?Zr(st(z({},n),{Vue:o,dsl:u,mode:ht.Runtime,loader:Qr(e)})).renderer:null})),a)}if(s.type==="UrlSchema"&&s.url){let a=Xt[s.url];return a||(a=Xt[s.url]=o.defineAsyncComponent(()=>L(this,null,function*(){const u=yield r(s.url);return u&&(u.name=i),u?Zr(st(z({},n),{Vue:o,dsl:u,mode:ht.Runtime,loader:Qr(e)})).renderer:null})),a)}if(s.type==="Plugin"){let a=s.library?Xt[s.library]:null;return a||(s.library&&Vn.push(s.library),a=Xt[s.library||Symbol()]=o.defineAsyncComponent(()=>L(this,null,function*(){return(yield hs(s,n.window))||(console.warn("getPlugin result is null",s),null)})),a)}return i}}function z_(){Xt={}}function cr(e,t,r=Xr,n=ol){var d;if(!e||!e.name||e.invisible)return null;const i=(d=r.getCurrentInstance())==null?void 0:d.appContext,{id:s=null,directives:o=[]}=e,{vIf:a,vFor:u,vShow:c,vModels:l,vBind:f,vHtml:p,others:h}=K_(o);if(a&&!J_(a,t))return null;const m=b=>{var A,V,w,T;const E=b.$components,g=(()=>{var C,I,D,B;if(e.name==="component")return W_(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)?Ju(F)||Wu(F)?F:(B=(D=E[F])!=null?D:(I=i==null?void 0:i.app)==null?void 0:I.component(F))!=null?B:F:F})(),y=Y_(s,(A=e.props)!=null?A:{},b),_=G_(r,(V=e.events)!=null?V:{},b);if(e.name==="slot")return Z_(r,e,y,b,n);f&&Object.assign(y,b.__parseExpression(f.value)),c&&(y.style=Object.assign((w=y.style)!=null?w:{},X_(c,b))),p&&Object.assign(y,tw(p,b)),l.forEach(F=>{Object.assign(y,ew(r,F,b))});const S=rw(r,(T=e.children)!=null?T:[],b,n,e);let v=r.createVNode(g,z(z({},y),_),S);const x=i?q_(i,h,b):[];return x.length&&(v=r.withDirectives(v,x)),v};return u?sw(u,m,t):m(t)}function q_(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 K_(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=>!Nu.includes(Nt(u.name)));return{vIf:t,vFor:r,vShow:n,vModels:o,vBind:i,others:a,vHtml:s}}function J_(e,t){return!!t.__parseExpression(e.value)}function W_(e,t){return t?wt(t)?e.__parseExpression(t):t:"div"}function Y_(e,t,r){const n=Ti(t,r);return n.ref=r.__ref(e,n.ref),n}function Ti(e,t){return wt(e)?t.__parseExpression(e):Fe(e)?t.__parseFunction(e):Array.isArray(e)?e.map(r=>Ti(r,t)):typeof e=="object"?Object.keys(e||{}).reduce((r,n)=>{let i=e[n];return r[n]=Ti(i,t),r},{}):e}function G_(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=ps(a.modifiers),c=u.find(p=>n.includes(p)),l="on"+on(o)+(c&&i[c]||""),f=r.__parseFunction(a.handler);return f&&(s[l]=e.withModifiers(f,u)),s},{})}function ps(e={},t=!1){const r=Object.keys(e);return t?r.map(n=>"."+n):r}function Z_(e,t,r,n,i){var u;const{children:s}=t,o=Q_(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(as(n.__parseExpression(s))):Array.isArray(s)?s.map(c=>cr(c,n,e,i)):null:null}function Q_(e,t){const{props:r}=e,n=(r==null?void 0:r.name)||"default";return{name:wt(n)?t.__parseExpression(n):n,params:[]}}function X_(e,t){return t.__parseExpression(e.value)?{}:{display:"none"}}function tw(e,t){return{innerHTML:t.__parseExpression(e.value)||""}}function ew(e,t,r){var a;const n={type:"JSFunction",value:(a=t.value)!=null&&a.value?`(v) => {
77
+ */const Ae="0.10.15";var ht=(e=>(e.Runtime="Runtime",e.Design="Design",e.Raw="Raw",e.VNode="VNode",e))(ht||{});const xi=["$el","$emit","$nextTick","$parent","$root","$attrs","$slots","$watch","$props","$options","$forceUpdate"],R_=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeUnmount","unmounted","errorCaptured","renderTracked","renderTriggered","activated","deactivated"],Nu=["vIf","vShow","vModel","vFor","vBind","vHtml"],ku={String,Number,Boolean,Array,Object,Function,Date},$e="VtjPage",Xe="VtjHomepage",Iu="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(","),Mu="component,slot".split(",");function Ge(e,t){return e.map(r=>Ui(r)||r.startsWith("/")?r:`${t}${r}`)}function bn(e){return/\.css$/.test(e)}function _n(e){return/\.js$/.test(e)}function Fu(e){return/\.json$/.test(e)}function j_(e){return e.map(t=>`<script src="${se.append(t,{v:Ae})}"><\/script>`).join("")}function D_(e=[]){return e.map(t=>`<link rel="stylesheet" href="${se.append(t,{v:Ae})}" />`).join("")}function Lu(e,t=!1){return t&&e.endsWith(".prod.js")?e.replace(".prod.js",".js"):e}function Vu(e,t,r=!1){const n=e.filter(p=>!!p.enabled),i=[],s=[],o=[],a=[],u={},c={},l=[],f={};return n.forEach(({urls:p,assetsUrl:h,library:m,assetsLibrary:d,localeLibrary:b})=>{p==null||p.forEach(E=>{_n(E)&&i.push(Lu(E,r)),bn(E)&&s.push(E)}),m&&(a.push(m),u[m]=Ge(p||[],t),b&&(c[m]=b)),h&&o.push(h),d&&l.push(d),m&&d&&(f[d]=m)}),{scripts:Ge(i,t),css:Ge(s,t),materials:Ge(o,t),libraryExports:a,materialExports:Rc(l),materialMapLibrary:f,libraryMap:u,libraryLocaleMap:c}}function Uu(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 as(e){return bt(e)?e:JSON.stringify(e)}function cs(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 Hu(e,t){return L(this,null,function*(){const r=yield window.fetch(t).then(n=>n.text()).catch(()=>"");r&&cs(window,e,r)})}function zu(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 qu(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=p=>{c(p)},o.appendChild(f)}})})}function Ku(e){return ae(e)||ae(e==null?void 0:e.install)}function Ju(e){return Mu.includes(e)}function Wu(e){return Iu.includes(e)}function Pe(e=window){const t=window==null?void 0:window.Mock;if(t)return t;const r=e==null?void 0:e.Mock;if(r&&window)return window.Mock=r,r}function C_(e,t,r){Object.assign(t.meta,r.meta);const n=e==null?void 0:e._container;(r==null?void 0:r.type)==="page"&&n.classList.add("is-page"),r!=null&&r.pure&&n.classList.add("is-pure")}function Be(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
+ `)+o;const a=`with(${r?"{}":"$scope || {}"}) { ${o} }`;return new Function("$scope",a)(t)}catch(s){if(oe.error("parseExpression.error",s,e,(i=t==null?void 0:t.__self)!=null?i:t),n)throw s}}function Gr(e,t,r=!1,n=!1){var s;const i=Be(e,t,r,n);if(typeof i!="function"&&(oe.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 Fe(e){return typeof e=="object"&&e&&e.type==="JSFunction"}function Yu(e){return wt(e)||Fe(e)}function P_(e){return Yu(e)?e.value:JSON.stringify(e)}const B_={session:!1,authKey:"Authorization",storageKey:"ACCESS_STORAGE",storagePrefix:"__VTJ_",unauthorized:void 0,auth:"/#/login",redirectParam:"r",unauthorizedCode:401,unauthorizedMessage:"登录已经失效,请重新登录!",noPermissionMessage:"无权限访问该页面",appName:""},us=Symbol("access");class ls{constructor(t){$(this,"options");$(this,"data",null);$(this,"mode",ht.Raw);$(this,"interceptResponse",!0);this.options=Object.assign({},B_,t),this.loadData()}enableIntercept(){this.interceptResponse=!0}disableIntercept(){this.interceptResponse=!1}connect(t){const{mode:r,router:n,request:i}=t;this.mode=r,n&&this.mode===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):ii(t).every(i=>n[i]||n[r+"."+i])}some(t){const{appName:r}=this.options,{permissions:n={}}=this.data||{};return ii(t).some(i=>n[i]||n[r+"."+i])}install(t){t.config.globalProperties.$access||(t.config.globalProperties.$access=this,t.provide(us,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=>ni(i,r));this.data=JSON.parse(n.join(""));return}if(typeof t=="string")try{const n=r?ni(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===$e){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),ae(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 Se(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 this.interceptResponse&&(yield this.showUnauthorizedAlert(r)),r}),r=>L(this,null,function*(){if(!this.interceptResponse)return Promise.reject(r);const n=r.response||r||{};return yield this.showUnauthorizedAlert(n),Promise.reject(r)}))}}function Gu(){return Go(us,null)}function N_(e={}){const{notify:t,loading:r,settings:n={},Startup:i,access:s,remote:o="https://lcdp.vtj.pro"}=e;let a=null;return{request:yn({settings:z({type:"form",validSuccess:!0,originResponse:!1,loading:!0,validate:u=>{var c,l;return((c=u.data)==null?void 0:c.code)===0||!!((l=u.data)!=null&&l.success)},failMessage:!0,showError:u=>{t&&t(u||"未知错误")},showLoading:()=>{a&&a.close(),r&&(a=r())},hideLoading:()=>{a&&(a.close(),a=null)}},n)}),jsonp:is,notify:t,loading:r,startupComponent:i,remote:o,access:s?Zu(s):void 0}}function Zu(e={}){const t={storageKey:"RRO_IDE_ACCESS_STORAGE__",auth:"https://lcdp.vtj.pro/auth.html",privateKey:"MIIBOgIBAAJBAKoIzmn1FYQ1YOhOBw9EhABxZ+PySAIaydI+zdhoKflrdgJ4A5E4/5gbQmRpk09hPWG8nvX7h+l/QLU8kXxAIBECAwEAAQJAAlgpxQY6sByLsXqzJcthC8LSGsLf2JEJkHwlnpwFqlEV8UCkoINpuZ2Wzl+aftURu5rIfAzRCQBvHmeOTW9/zQIhAO5ufWDmnSLyfAAsNo5JRNpVuLFCFodR8Xm+ulDlosR/AiEAtpAltyP9wmCABKG/v/hrtTr3mcvFNGCjoGa9bUAok28CIHbrVs9w1ijrBlvTsXYwJw46uP539uKRRT4ymZzlm9QjAiB+1KH/G9f9pEEL9rtaSOG7JF5D0JcOjlze4MGVFs+ZrQIhALKOUFBNr2zEsyJIjw2PlvEucdlG77UniszjXTROHSPd"};return new ls(Object.assign(t,e))}function Qu(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?Be(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 Xu(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 tl(e=[],t=[],r){const n={};for(const i of e)n[i.id]=Qu(i,r);for(const i of t)n[i.id]=Xu(i,r);return n}function el(){return L(this,arguments,function*(e=[],t=window){const r=Pe(t);r&&(fs(t),e.forEach(n=>nl(r,n)))})}function rl(e,t=window){const r=Fe(e.mockTemplate)&&e.mockTemplate.value?Gr(e.mockTemplate,{},!0):void 0,n=Pe(t);return(...i)=>L(this,null,function*(){let s={};if(r)try{s=yield r.apply(r,i)}catch(o){oe.warn("模拟数据模版异常",o)}return n==null?void 0:n.mock(s)})}function nl(e,t){if(!t.mock)return;const{url:r,mockTemplate:n}=t;if(r&&n){const i=ln(`${r}(.*)`),s=Ic(r,{decode:decodeURIComponent}),o=Be(n,{},!0);e.mock(i,a=>{var f;const u=se.parse(a.url)||{},c=a.body instanceof FormData?Ru(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 fs(e=window){const t=Pe(e);t&&(t._mocked={})}class il{constructor(t){$(this,"__id",null);$(this,"__mode");$(this,"__instance",null);$(this,"__contextRefs",{});$(this,"__refs",{});$(this,"context",{});$(this,"state",{});$(this,"props",{});$(this,"$props",{});$(this,"$refs",{});$(this,"$el",null);$(this,"$emit",null);$(this,"$nextTick",null);$(this,"$parent",null);$(this,"$root",null);$(this,"$attrs",null);$(this,"$slots",null);$(this,"$watch",null);$(this,"$options",null);$(this,"$forceUpdate",null);$(this,"$components",{});$(this,"$libs",{});$(this,"$apis",{});$(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=Xr){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&&xi.forEach(t=>{var r;this[t]=(r=this.__instance)==null?void 0:r[t]})}__cleanup(){xi.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 Gr({type:i,value:s},this)}else return Gr(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 Be({type:i,value:s},this)}else return Be(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 Se(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 Zr(e){var f,p;const{Vue:t=Xr,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 il({mode:r,dsl:a.value,attrs:u}),l=t.defineComponent(z({name:a.value.name,props:z({},I_((f=a.value.props)!=null?f:[],c)),setup(h){var y,_,S,v;c.$props=h,c.props=h,a.value.id&&cs(e.window||window,a.value.id,a.value.css||""),c.state=M_(t,(y=a.value.state)!=null?y:{},c);const m=F_(t,(_=a.value.computed)!=null?_:{},c),d=L_((S=a.value.methods)!=null?S:{},c),b=V_(t,a.value.inject,c),E=sl(a.value.dataSources||{},c),g=z(z(z(z({},b),m),d),E);return c.setup(g,t),U_(t,(v=a.value.watch)!=null?v:[],c),{vtj:c}},emits:k_(a.value.emits),expose:["vtj"],render(){if(!a.value.nodes)return null;const h=a.value.nodes||[];return h.length===1?cr(h[0],c,t,o):h.map(m=>cr(m,c,t,o))}},H_((p=a.value.lifeCycles)!=null?p:{},c)));return{renderer:t.markRaw(l),context:c}}function k_(e=[]){return e.map(t=>bt(t)?t:t.name)}function I_(e=[],t){const r=n=>n?(Array.isArray(n)?n:[n]).map(i=>ku[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 M_(e,t,r){return e.reactive(Object.keys(t||{}).reduce((n,i)=>{let s=t[i];return wt(s)?s=r.__parseExpression(s):Fe(s)&&(s=r.__parseFunction(s)),n[i]=s,n},{}))}function F_(e,t,r){return Object.entries(t!=null?t:{}).reduce((n,[i,s])=>(n[i]=e.computed(r.__parseFunction(s)),n),{})}function L_(e,t){return Object.entries(e!=null?e:{}).reduce((r,[n,i])=>(r[n]=t.__parseFunction(i),r),{})}function V_(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 sl(e,t){return Object.keys(e).reduce((r,n)=>{const i=e[n];if(i.type==="mock")r[n]=rl(i);else if(i.ref){const s=t.$apis[i.ref],o=Fe(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 U_(e,t=[],r){t.forEach(n=>{e.watch(r.__parseExpression(n.source),r.__parseFunction(n.handler),{deep:n.deep,immediate:n.immediate})})}function H_(e,t){return Object.entries(e!=null?e:{}).reduce((r,[n,i])=>(r[n]=t.__parseFunction(i),r),{})}let Vn=[],Xt={};const ol=e=>e;function hs(r){return L(this,arguments,function*(e,t=window){const{urls:n=[],library:i}=e,s=n.filter(a=>_n(a));if(s.length===0||!i)return null;const o=n.filter(a=>bn(a));return o.length&&zu(o,t),yield qu(s,i,t).catch(a=>(console.warn("loadScriptUrl error",s,i,a),null))})}function Qr(e){const{getDsl:t,getDslByUrl:r,options:n}=e;return n.window&&(Vn.forEach(i=>{delete n.window[i]}),Vn=[]),(i,s,o=Xr)=>{if(!s||typeof s=="string")return i;if(s.type==="Schema"&&s.id){let a=Xt[s.id];return a||(a=Xt[s.id]=o.defineAsyncComponent(()=>L(this,null,function*(){const u=yield t(s.id);return u&&(u.name=i),u?Zr(st(z({},n),{Vue:o,dsl:u,mode:ht.Runtime,loader:Qr(e)})).renderer:null})),a)}if(s.type==="UrlSchema"&&s.url){let a=Xt[s.url];return a||(a=Xt[s.url]=o.defineAsyncComponent(()=>L(this,null,function*(){const u=yield r(s.url);return u&&(u.name=i),u?Zr(st(z({},n),{Vue:o,dsl:u,mode:ht.Runtime,loader:Qr(e)})).renderer:null})),a)}if(s.type==="Plugin"){let a=s.library?Xt[s.library]:null;return a||(s.library&&Vn.push(s.library),a=Xt[s.library||Symbol()]=o.defineAsyncComponent(()=>L(this,null,function*(){return(yield hs(s,n.window))||(console.warn("getPlugin result is null",s),null)})),a)}return i}}function z_(){Xt={}}function cr(e,t,r=Xr,n=ol){var d;if(!e||!e.name||e.invisible)return null;const i=(d=r.getCurrentInstance())==null?void 0:d.appContext,{id:s=null,directives:o=[]}=e,{vIf:a,vFor:u,vShow:c,vModels:l,vBind:f,vHtml:p,others:h}=K_(o);if(a&&!J_(a,t))return null;const m=b=>{var A,V,w,T;const E=b.$components,g=(()=>{var C,I,D,B;if(e.name==="component")return W_(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)?Ju(F)||Wu(F)?F:(B=(D=E[F])!=null?D:(I=i==null?void 0:i.app)==null?void 0:I.component(F))!=null?B:F:F})(),y=Y_(s,(A=e.props)!=null?A:{},b),_=G_(r,(V=e.events)!=null?V:{},b);if(e.name==="slot")return Z_(r,e,y,b,n);f&&Object.assign(y,b.__parseExpression(f.value)),c&&(y.style=Object.assign((w=y.style)!=null?w:{},X_(c,b))),p&&Object.assign(y,tw(p,b)),l.forEach(F=>{Object.assign(y,ew(r,F,b))});const S=rw(r,(T=e.children)!=null?T:[],b,n,e);let v=r.createVNode(g,z(z({},y),_),S);const x=i?q_(i,h,b):[];return x.length&&(v=r.withDirectives(v,x)),v};return u?sw(u,m,t):m(t)}function q_(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 K_(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=>!Nu.includes(Nt(u.name)));return{vIf:t,vFor:r,vShow:n,vModels:o,vBind:i,others:a,vHtml:s}}function J_(e,t){return!!t.__parseExpression(e.value)}function W_(e,t){return t?wt(t)?e.__parseExpression(t):t:"div"}function Y_(e,t,r){const n=Ti(t,r);return n.ref=r.__ref(e,n.ref),n}function Ti(e,t){return wt(e)?t.__parseExpression(e):Fe(e)?t.__parseFunction(e):Array.isArray(e)?e.map(r=>Ti(r,t)):typeof e=="object"?Object.keys(e||{}).reduce((r,n)=>{let i=e[n];return r[n]=Ti(i,t),r},{}):e}function G_(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=ps(a.modifiers),c=u.find(p=>n.includes(p)),l="on"+on(o)+(c&&i[c]||""),f=r.__parseFunction(a.handler);return f&&(s[l]=e.withModifiers(f,u)),s},{})}function ps(e={},t=!1){const r=Object.keys(e);return t?r.map(n=>"."+n):r}function Z_(e,t,r,n,i){var u;const{children:s}=t,o=Q_(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(as(n.__parseExpression(s))):Array.isArray(s)?s.map(c=>cr(c,n,e,i)):null:null}function Q_(e,t){const{props:r}=e,n=(r==null?void 0:r.name)||"default";return{name:wt(n)?t.__parseExpression(n):n,params:[]}}function X_(e,t){return t.__parseExpression(e.value)?{}:{display:"none"}}function tw(e,t){return{innerHTML:t.__parseExpression(e.value)||""}}function ew(e,t,r){var a;const n={type:"JSFunction",value:(a=t.value)!=null&&a.value?`(v) => {
79
79
  ${t.value.value} = v;
80
- }`:"(v) => {}"},i=r.__parseFunction(n),s=ps(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 rw(e,t,r,n,i){if(!t)return null;if(bt(t))return{default:()=>t};if(wt(t))return{default:()=>as(r.__parseExpression(t))};if(Array.isArray(t)&&t.length>0){const s=nw(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 p=l.length?jc(f!=null?f:{},l):o(f);return c.map(h=>cr(h,r.__clone(p),e,n))},a),{})}return null}function nw(e){const t={default:{params:[],nodes:[]}};for(const r of e){const n=iw(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 iw(e="default"){return bt(e)?{name:e,params:[]}:z({params:[]},e)}function sw(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`),[])}const Yo=Oi({name:"VtjPageContainer",setup(){return L(this,null,function*(){const e=ms(),t=Zo(),r=t.params.id,n=r?e.getPage(r):e.getHomepage(),i=n?yield e.getRenderComponent(n.id):null,s=Hn(Symbol());if(n){Object.assign(t.meta,n.meta||{},{cache:n.cache});const{useTitle:o}=e==null?void 0:e.adapter;o&&o(n.title||"VTJ")}return{provider:e,component:i,file:n,query:t.query,meta:t.meta,sid:s,route:t}})},render(){const{component:e,query:t,sid:r}=this;return e?zn(e,st(z({},t),{key:r})):zn("div","页面不存在")},activated(){this.meta.cache===!1&&(this.sid=Symbol())}}),ow=Oi({name:"VtjStartupContainer",render(){return zn("div","page not found!")}}),ds=Symbol("Provider");var al=(e=>(e.Production="production",e.Development="development",e))(al||{});class cl extends Fc{constructor(r){super();$(this,"mode");$(this,"globals",{});$(this,"modules",{});$(this,"adapter",{request:ar,jsonp:is});$(this,"apis",{});$(this,"dependencies",{});$(this,"materials",{});$(this,"library",{});$(this,"service");$(this,"project",null);$(this,"components",{});$(this,"nodeEnv","development");$(this,"router",null);$(this,"materialPath","./");$(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:p="./",nodeEnv:h="development"}=r;this.mode=i,this.modules=l,this.service=n,this.router=f,this.materialPath=p,this.nodeEnv=h,s&&(this.dependencies=s),o&&(this.materials=o),Object.assign(this.globals,c),Object.assign(this.adapter,u);const{access:m,request:d}=this.adapter;m&&m.connect({mode:i,router:f,request:d}),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){oe.warn("模拟数据模版异常",o)}return(s=Pe())==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&&(o.CKEDITOR_VERSION=void 0),this.mode===ht.Raw?yield this.loadDependencies(o):yield this.loadAssets(o),this.initMock(o),this.apis=tl(i,s,this.adapter),fs(o),el(i,o),r.platform!=="uniapp"&&this.initRouter(),this.triggerReady()})}initMock(r){const n=Pe(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:p,materialMapLibrary:h}=Vu(n,a,u==="development");for(const m of c){const d=i[m],b=r[m];if(b)s[m]=b;else if(d)r[m]=s[m]=yield d();else{const E=l[m]||[];for(const g of E)bn(g)&&(yield Hu(m,se.append(g,{v:Ae}))),_n(g)&&(yield Ei(se.append(g,{v:Ae})));s[m]=r[m]}}if(u==="development"){for(const d of f)yield Ei(se.append(d,{v:Ae}));const m=this.materials||{};for(const d of p){const b=r[h[d]],E=Mc[d];if(E)b&&E.forEach(g=>{o[g]=b[g]});else{const g=m[d]?(yield m[d]()).default:r[d];g&&b&&(g.components||[]).forEach(y=>{o[y.name]=Uu(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:$e,component:Yo},p={path:l,name:Xe,component:n!=null&&n.homepage?Yo:s.startupComponent||ow,meta:c};r.hasRoute($e)&&r.removeRoute($e),r.hasRoute(Xe)&&r.removeRoute(Xe),a?(r.addRoute(a,f),r.addRoute(a,p)):(r.addRoute(f),r.addRoute(p))}install(r){const n=r.config.globalProperties.installed||{};for(const[i,s]of Object.entries(this.library))!n[i]&&Ku(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(ds,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.adapter.request?this.urlDslCaches[r]=this.adapter.request.send({url:r,method:"get",settings:{validSuccess:!1,originResponse:!0}}).then(i=>i.data).catch(()=>null):null)})}createDslRenderer(r,n={}){const{library:i,components:s,mode:o,apis:a}=this,u=z({mode:o,Vue:i.Vue,components:s,libs:i,apis:a,window},n),c=Qr({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 Zr(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 oe.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:(oe.warn(`Can not find dsl: ${r}`),null)})}defineUrlSchemaComponent(r,n){return ws(()=>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 ws(()=>L(this,null,function*(){return yield hs(r,window)}))}}function aw(e){const t=new cl(e);return{provider:t,onReady:r=>t.ready(r)}}function ms(e={}){const t=Go(ds,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 ul={type:"json",validSuccess:!0,originResponse:!1,failMessage:!0,validate:e=>{var t;return((t=e.data)==null?void 0:t.code)===0}},cw=(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:ul}),uw=(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({},ul),{type:"data"})}).then(i=>i&&i[0]?i[0]:null).catch(()=>null)});function lw(e){return yn({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 wn{constructor(t=ar){$(this,"api");$(this,"pluginCaches",{});$(this,"uploader");this.api=cw(t),this.uploader=uw(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=>Fu(s))[0];return n?this.pluginCaches[n]||(this.pluginCaches[n]=ar.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 ns({type:"local",expired:0,prefix:"__VTJ_"});class fw extends wn{init(t){const r=new ce(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 ce(t);return mt.save(`project_${r.id}`,r.toDsl()),Promise.resolve(!0)}saveMaterials(t,r){return mt.save(`materials_${t.id}`,un(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 Wi(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 ll extends wn{constructor(){super(...arguments);$(this,"projects",{});$(this,"materials",{});$(this,"files",{});$(this,"histories",{});$(this,"historyItems",{})}init(r){const n=new ce(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 ce(r);return this.projects[n.id]=n.toDsl(),Promise.resolve(!0)}saveMaterials(r,n){return r.id&&(this.materials[r.id]=un(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 Wi(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 Un=null;function hw(){return Un||(Un=new ll,Un)}class pw extends wn{constructor(){super(...arguments);$(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:un(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 fl(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?fl(e,t,a):void 0}})}function hl(e,t){if(!t)return e;let r=[];for(const n of e)if(n.children&&n.children.length){const i=hl(n.children,t);i.length&&(n.children=i,r.push(n))}else t.can(n.id.toString())&&r.push(n);return r}function dw(e){const{menuPathPrefix:t="",pageRouteName:r="page",disableMenusFilter:n=!1}=e||{},i=ms(),s=Zo(),o=Gu(),a=Hn(!1),u=Hn(!1),c=i.project;vl(()=>{const{name:p,params:h,meta:m}=s;if(p===$e){const d=i.getPage(h.id);a.value=!(d!=null&&d.mask),u.value=!!(d!=null&&d.pure)}else if(p===Xe){const d=i.getHomepage();a.value=!(d!=null&&d.mask),u.value=!!(d!=null&&d.pure)}else a.value=!m.mask,u.value=!!m.pure});const l=fl(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:hl(l,o),pure:u}}const eE=Object.freeze(Object.defineProperty({__proto__:null,ACCESS_KEY:us,Access:ls,BUILD_IN_TAGS:Mu,BUILT_IN_DIRECTIVES:Nu,BaseService:wn,CONTEXT_HOST:xi,Context:il,ContextMode:ht,DATA_TYPES:ku,HOMEPAGE_ROUTE_NAME:Xe,HTML_TAGS:Iu,JSCodeToString:P_,LIFE_CYCLES_LIST:R_,LocalService:pw,MemoryService:ll,NodeEnv:al,PAGE_ROUTE_NAME:$e,Provider:cl,StorageService:fw,VTJ_RENDERER_VERSION:Ae,adoptedStyleSheets:cs,clearLoaderCache:z_,createAccess:Zu,createAdapter:N_,createAssetScripts:j_,createAssetsCss:D_,createDataSources:sl,createLoader:Qr,createMemoryService:hw,createMetaApi:Xu,createMock:rl,createProvider:aw,createRenderer:Zr,createSchemaApi:Qu,createSchemaApis:tl,createServiceRequest:lw,defaultLoader:ol,fillBasePath:Ge,getMock:Pe,getModifiers:ps,getPlugin:hs,getRawComponent:Uu,isBuiltInTag:Ju,isCSSUrl:bn,isJSCode:Yu,isJSExpression:wt,isJSFunction:Fe,isJSON:Fu,isJSUrl:_n,isNativeTag:Wu,isVuePlugin:Ku,loadCss:Hu,loadCssUrl:zu,loadScriptUrl:qu,mockApi:nl,mockApis:el,mockCleanup:fs,nodeRender:cr,parseDeps:Vu,parseExpression:Be,parseFunction:Gr,providerKey:ds,removeProdFlag:Lu,setupPageSetting:C_,toString:as,useAccess:Gu,useMask:dw,useProvider:ms},Symbol.toStringTag,{value:"Module"})),mw=Oi({__name:"app",setup(e){return(t,r)=>{const n=yl("router-view");return xs(),Es(Ss(Tl),{locale:Ss(xl)},{default:Ts(()=>[(xs(),Es(bl,null,{default:Ts(()=>[_l(n)]),_:1}))]),_:1},8,["locale"])}}}),gw=[{path:"/",name:"home",component:()=>Ue(()=>import("./index-DkxHwSWL.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:()=>Ue(()=>import("./preview-CdZWNi1g.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:()=>Ue(()=>import("./page-Cl1zW7OU.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:()=>Ue(()=>import("./uni-page-Bjgk97mC.js"),__vite__mapDeps([23,1,2,19,24]),import.meta.url),meta:{pure:!0}},{path:"/auth",name:"auth",component:()=>Ue(()=>import("./auth-DwMNsYC3.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)}],vw=El({history:Sl(),routes:gw}),yw="RRO_IDE_ACCESS_STORAGE__",gs=wl(mw),bw=new ls({storageKey:yw});gs.use(bw);gs.use(vw);gs.mount("#app");export{zc as $,yw as A,cl as B,oe as C,we as D,We as E,ai as F,oi as G,Uc as H,Hc as I,ae as J,l1 as K,pa as L,G as M,nt as N,Fr as O,Ye as P,C_ as Q,ty as R,a_ as S,ee as T,Wi as U,Br as V,Ki as W,ti as X,N_ as Y,ct as Z,c_ as _,Rc as a,Ji as a0,k1 as a1,Qa as a2,V1 as a3,Vu as a4,D_ as a5,j_ as a6,M1 as a7,Uu as a8,tl as a9,qu as aA,fs as aa,el as ab,Kr as ac,Fi as ad,z_ as ae,wt as af,Fe as ag,i_ as ah,Be as ai,Gr as aj,Je as ak,Nu as al,z1 as am,P_ as an,R_ as ao,ku as ap,rl as aq,s_ as ar,m1 as as,ki as at,eE as au,Pw as av,tE as aw,bn as ax,_n as ay,zu as az,Dt as b,gt as c,Ui as d,aw as e,Se as f,Nt as g,Yv as h,f1 as i,O_ as j,ir as k,cs as l,Hv as m,pw as n,bt as o,Fc as p,ce as q,M as r,ls as s,lw as t,ii as u,A_ as v,it as w,is as x,ht as y,$c as z};
80
+ }`:"(v) => {}"},i=r.__parseFunction(n),s=ps(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 rw(e,t,r,n,i){if(!t)return null;if(bt(t))return{default:()=>t};if(wt(t))return{default:()=>as(r.__parseExpression(t))};if(Array.isArray(t)&&t.length>0){const s=nw(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 p=l.length?jc(f!=null?f:{},l):o(f);return c.map(h=>cr(h,r.__clone(p),e,n))},a),{})}return null}function nw(e){const t={default:{params:[],nodes:[]}};for(const r of e){const n=iw(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 iw(e="default"){return bt(e)?{name:e,params:[]}:z({params:[]},e)}function sw(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`),[])}const Yo=Oi({name:"VtjPageContainer",setup(){return L(this,null,function*(){const e=ms(),t=Zo(),r=t.params.id,n=r?e.getPage(r):e.getHomepage(),i=n?yield e.getRenderComponent(n.id):null,s=Hn(Symbol());if(n){Object.assign(t.meta,n.meta||{},{cache:n.cache});const{useTitle:o}=e==null?void 0:e.adapter;o&&o(n.title||"VTJ")}return{provider:e,component:i,file:n,query:t.query,meta:t.meta,sid:s,route:t}})},render(){const{component:e,query:t,sid:r}=this;return e?zn(e,st(z({},t),{key:r})):zn("div","页面不存在")},activated(){this.meta.cache===!1&&(this.sid=Symbol())}}),ow=Oi({name:"VtjStartupContainer",render(){return zn("div","page not found!")}}),ds=Symbol("Provider");var al=(e=>(e.Production="production",e.Development="development",e))(al||{});class cl extends Fc{constructor(r){super();$(this,"mode");$(this,"globals",{});$(this,"modules",{});$(this,"adapter",{request:ar,jsonp:is});$(this,"apis",{});$(this,"dependencies",{});$(this,"materials",{});$(this,"library",{});$(this,"service");$(this,"project",null);$(this,"components",{});$(this,"nodeEnv","development");$(this,"router",null);$(this,"materialPath","./");$(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:p="./",nodeEnv:h="development"}=r;this.mode=i,this.modules=l,this.service=n,this.router=f,this.materialPath=p,this.nodeEnv=h,s&&(this.dependencies=s),o&&(this.materials=o),Object.assign(this.globals,c),Object.assign(this.adapter,u);const{access:m,request:d}=this.adapter;m&&m.connect({mode:i,router:f,request:d}),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){oe.warn("模拟数据模版异常",o)}return(s=Pe())==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&&(o.CKEDITOR_VERSION=void 0),this.mode===ht.Raw?yield this.loadDependencies(o):yield this.loadAssets(o),this.initMock(o),this.apis=tl(i,s,this.adapter),fs(o),el(i,o),r.platform!=="uniapp"&&this.initRouter(),this.triggerReady()})}initMock(r){const n=Pe(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:p,materialMapLibrary:h}=Vu(n,a,u==="development");for(const m of c){const d=i[m],b=r[m];if(b)s[m]=b;else if(d)r[m]=s[m]=yield d();else{const E=l[m]||[];for(const g of E)bn(g)&&(yield Hu(m,se.append(g,{v:Ae}))),_n(g)&&(yield Ei(se.append(g,{v:Ae})));s[m]=r[m]}}if(u==="development"){for(const d of f)yield Ei(se.append(d,{v:Ae}));const m=this.materials||{};for(const d of p){const b=r[h[d]],E=Mc[d];if(E)b&&E.forEach(g=>{o[g]=b[g]});else{const g=m[d]?(yield m[d]()).default:r[d];g&&b&&(g.components||[]).forEach(y=>{o[y.name]=Uu(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:$e,component:Yo},p={path:l,name:Xe,component:n!=null&&n.homepage?Yo:s.startupComponent||ow,meta:c};r.hasRoute($e)&&r.removeRoute($e),r.hasRoute(Xe)&&r.removeRoute(Xe),a?(r.addRoute(a,f),r.addRoute(a,p)):(r.addRoute(f),r.addRoute(p))}install(r){const n=r.config.globalProperties.installed||{};for(const[i,s]of Object.entries(this.library))!n[i]&&Ku(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(ds,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.adapter.request?this.urlDslCaches[r]=this.adapter.request.send({url:r,method:"get",settings:{validSuccess:!1,originResponse:!0}}).then(i=>i.data).catch(()=>null):null)})}createDslRenderer(r,n={}){const{library:i,components:s,mode:o,apis:a}=this,u=z({mode:o,Vue:i.Vue,components:s,libs:i,apis:a,window},n),c=Qr({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 Zr(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 oe.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:(oe.warn(`Can not find dsl: ${r}`),null)})}defineUrlSchemaComponent(r,n){return ws(()=>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 ws(()=>L(this,null,function*(){return yield hs(r,window)}))}}function aw(e){const t=new cl(e);return{provider:t,onReady:r=>t.ready(r)}}function ms(e={}){const t=Go(ds,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 ul={type:"json",validSuccess:!0,originResponse:!1,failMessage:!0,validate:e=>{var t;return((t=e.data)==null?void 0:t.code)===0}},cw=(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:ul}),uw=(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({},ul),{type:"data"})}).then(i=>i&&i[0]?i[0]:null).catch(()=>null)});function lw(e){return yn({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 wn{constructor(t=ar){$(this,"api");$(this,"pluginCaches",{});$(this,"uploader");this.api=cw(t),this.uploader=uw(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=>Fu(s))[0];return n?this.pluginCaches[n]||(this.pluginCaches[n]=ar.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 ns({type:"local",expired:0,prefix:"__VTJ_"});class fw extends wn{init(t){const r=new ce(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 ce(t);return mt.save(`project_${r.id}`,r.toDsl()),Promise.resolve(!0)}saveMaterials(t,r){return mt.save(`materials_${t.id}`,un(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 Wi(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 ll extends wn{constructor(){super(...arguments);$(this,"projects",{});$(this,"materials",{});$(this,"files",{});$(this,"histories",{});$(this,"historyItems",{})}init(r){const n=new ce(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 ce(r);return this.projects[n.id]=n.toDsl(),Promise.resolve(!0)}saveMaterials(r,n){return r.id&&(this.materials[r.id]=un(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 Wi(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 Un=null;function hw(){return Un||(Un=new ll,Un)}class pw extends wn{constructor(){super(...arguments);$(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:un(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 fl(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?fl(e,t,a):void 0}})}function hl(e,t){if(!t)return e;let r=[];for(const n of e)if(n.children&&n.children.length){const i=hl(n.children,t);i.length&&(n.children=i,r.push(n))}else t.can(n.id.toString())&&r.push(n);return r}function dw(e){const{menuPathPrefix:t="",pageRouteName:r="page",disableMenusFilter:n=!1}=e||{},i=ms(),s=Zo(),o=Gu(),a=Hn(!1),u=Hn(!1),c=i.project;vl(()=>{const{name:p,params:h,meta:m}=s;if(p===$e){const d=i.getPage(h.id);a.value=!(d!=null&&d.mask),u.value=!!(d!=null&&d.pure)}else if(p===Xe){const d=i.getHomepage();a.value=!(d!=null&&d.mask),u.value=!!(d!=null&&d.pure)}else a.value=!m.mask,u.value=!!m.pure});const l=fl(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:hl(l,o),pure:u}}const eE=Object.freeze(Object.defineProperty({__proto__:null,ACCESS_KEY:us,Access:ls,BUILD_IN_TAGS:Mu,BUILT_IN_DIRECTIVES:Nu,BaseService:wn,CONTEXT_HOST:xi,Context:il,ContextMode:ht,DATA_TYPES:ku,HOMEPAGE_ROUTE_NAME:Xe,HTML_TAGS:Iu,JSCodeToString:P_,LIFE_CYCLES_LIST:R_,LocalService:pw,MemoryService:ll,NodeEnv:al,PAGE_ROUTE_NAME:$e,Provider:cl,StorageService:fw,VTJ_RENDERER_VERSION:Ae,adoptedStyleSheets:cs,clearLoaderCache:z_,createAccess:Zu,createAdapter:N_,createAssetScripts:j_,createAssetsCss:D_,createDataSources:sl,createLoader:Qr,createMemoryService:hw,createMetaApi:Xu,createMock:rl,createProvider:aw,createRenderer:Zr,createSchemaApi:Qu,createSchemaApis:tl,createServiceRequest:lw,defaultLoader:ol,fillBasePath:Ge,getMock:Pe,getModifiers:ps,getPlugin:hs,getRawComponent:Uu,isBuiltInTag:Ju,isCSSUrl:bn,isJSCode:Yu,isJSExpression:wt,isJSFunction:Fe,isJSON:Fu,isJSUrl:_n,isNativeTag:Wu,isVuePlugin:Ku,loadCss:Hu,loadCssUrl:zu,loadScriptUrl:qu,mockApi:nl,mockApis:el,mockCleanup:fs,nodeRender:cr,parseDeps:Vu,parseExpression:Be,parseFunction:Gr,providerKey:ds,removeProdFlag:Lu,setupPageSetting:C_,toString:as,useAccess:Gu,useMask:dw,useProvider:ms},Symbol.toStringTag,{value:"Module"})),mw=Oi({__name:"app",setup(e){return(t,r)=>{const n=yl("router-view");return xs(),Es(Ss(Tl),{locale:Ss(xl)},{default:Ts(()=>[(xs(),Es(bl,null,{default:Ts(()=>[_l(n)]),_:1}))]),_:1},8,["locale"])}}}),gw=[{path:"/",name:"home",component:()=>Ue(()=>import("./index-fMh9I_lk.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:()=>Ue(()=>import("./preview-Ck1S6FvZ.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:()=>Ue(()=>import("./page-DBocEj87.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:()=>Ue(()=>import("./uni-page-Bjgk97mC.js"),__vite__mapDeps([23,1,2,19,24]),import.meta.url),meta:{pure:!0}},{path:"/auth",name:"auth",component:()=>Ue(()=>import("./auth-DA1mfYXi.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)}],vw=El({history:Sl(),routes:gw}),yw="RRO_IDE_ACCESS_STORAGE__",gs=wl(mw),bw=new ls({storageKey:yw});gs.use(bw);gs.use(vw);gs.mount("#app");export{zc as $,yw as A,cl as B,oe as C,it as D,we as E,We as F,ai as G,oi as H,Uc as I,ae as J,l1 as K,pa as L,Hc as M,G as N,Fr as O,nt as P,C_ as Q,ty as R,a_ as S,Ye as T,ee as U,Br as V,Wi as W,ti as X,N_ as Y,ct as Z,c_ as _,Zu as a,Ki as a0,Ji as a1,k1 as a2,Qa as a3,V1 as a4,Vu as a5,D_ as a6,j_ as a7,M1 as a8,Uu as a9,zu as aA,qu as aB,tl as aa,fs as ab,el as ac,Kr as ad,Fi as ae,z_ as af,wt as ag,Fe as ah,i_ as ai,Be as aj,Gr as ak,Je as al,Nu as am,z1 as an,P_ as ao,R_ as ap,ku as aq,rl as ar,s_ as as,m1 as at,ki as au,eE as av,Pw as aw,tE as ax,bn as ay,_n as az,Rc as b,Dt as c,gt as d,aw as e,Ui as f,Se as g,Nt as h,Yv as i,O_ as j,f1 as k,ir as l,Hv as m,pw as n,bt as o,cs as p,Fc as q,ce as r,ls as s,lw as t,ii as u,A_ as v,M as w,is as x,ht as y,$c as z};