@vtj/pro 0.8.6 → 0.8.7

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.
@@ -51,13 +51,13 @@ version: 2.9.0
51
51
  * Copyright (c) 2024, VTJ.PRO All rights reserved.
52
52
  * @name @vtj/core
53
53
  * @author CHC chenhuachun1549@dingtalk.com
54
- * @version 0.8.5
54
+ * @version 0.8.7
55
55
  * @license <a href="https://vtj.pro/license.html">MIT License</a>
56
56
  */const da="BuiltIn",du="VueMaterial",pu="VueRouterMaterial",pg={vue:"Vue","vue-router":"VueRouter"},hg={[du]:["Transition","TransitionGroup","KeepAlive","Teleport","Suspense"],[pu]:["RouterView","RouterLink"]};let co=class{listeners=[];isReady=!1;triggerReady(){this.isReady=!0;for(const e of this.listeners)e();this.listeners=[]}ready(e){this.isReady?e():this.listeners.push(e)}resetReady(){this.isReady=!1}},Ei=class hu{constructor(e,t,r){this.name=e,this.value=t,this.defaultValue=r,this.setValue(t)}isUnset=!1;setValue(e){this.value=e,this.isUnset=this.value===this.defaultValue}getValue(){return this.value??this.defaultValue}static toDsl(e={}){return Object.entries(e).reduce((t,[r,i])=>(i.isUnset||(t[r]=i.getValue()),t),{})}static parse(e={}){return Object.entries(e).reduce((t,[r,i])=>(t[r]=new hu(r,i),t),{})}},Ai=class mu{constructor(e){this.schema=e;const{name:t,handler:r}=this.schema;this.name=t,this.handler=r,this.update(e)}name;handler;modifiers={};update(e){Object.assign(this.schema,e);const{handler:t,modifiers:r={}}=this.schema;this.handler=t,this.modifiers=r}static toDsl(e){return Object.entries(e).reduce((t,[r,i])=>{const{handler:a,modifiers:o}=i;return t[r]={name:r,handler:a,modifiers:o},t},{})}static parse(e={}){return Object.entries(e).reduce((t,[r,i])=>(t[r]=new mu(i),t),{})}},pn=class fu{constructor(e){this.schema=e,this.id=e.id||ut(),this.update(e)}id;name="";arg;modifiers;value;iterator;update(e){Object.assign(this.schema,e);const{name:t,arg:r,modifiers:i,value:a,iterator:o}=this.schema;this.name=t,this.arg=r,this.modifiers=i,this.value=a,this.iterator=o}static parse(e=[]){return e.map(t=>new fu(t))}static toDsl(e=[]){return e.map(t=>{const{name:r,arg:i,modifiers:a,value:o,iterator:s,id:l}=t;return{id:l,name:r,arg:i,modifiers:a,value:o,iterator:s}})}};const ke="EVENT_NODE_CHANGE";let Jr=class Dr{constructor(e,t=null){this.parent=t;const{id:r=ut(),name:i,from:a=""}=e;this.id=r,this.name=i,this.from=a,this.update(e,!0),Dr.nodes[this.id]=this}__VTJ_NODE__=!0;locked=!1;static nodes={};id;name;from;invisible=!1;children="";slot;props={};events={};directives=[];disposed=!1;update(e,t=!1){const{invisible:r=!1,locked:i=!1,children:a=[],slot:o,props:s={},events:l={},directives:c=[]}=e;this.invisible=r,this.locked=i,this.setChildren(a,!0),this.setSlot(o,!0),this.props=Ei.parse(s),this.events=Ai.parse(l),this.directives=pn.parse(c),t||G.emit(ke,this)}setChildren(e="",t=!1){Array.isArray(e)?this.children=e.map(r=>new Dr(r,this)):this.children=e,t||G.emit(ke,this)}setSlot(e,t=!1){this.slot=typeof e=="string"?{name:e,params:[]}:e,t||G.emit(ke,this)}setProp(e,t,r,i=!1){const a=this.props[e];a?a.setValue(t):this.props[e]=new Ei(e,t,r),i||G.emit(ke,this)}removeProp(e,t=!1){delete this.props[e],t||G.emit(ke,this)}getPropValue(e){const t=this.props[e];if(t)return t.getValue()}setEvent(e,t=!1){const r=this.events[e.name];r?r.update(e):this.events[e.name]=new Ai(e),t||G.emit(ke,this)}removeEvent(e,t=!1){delete this.events[e],t||G.emit(ke,this)}setDirective(e,t=!1){const r=this.directives.findIndex(i=>i.id===e.id);r>=0?this.directives.splice(r,1,new pn(e)):this.directives.push(new pn(e)),t||G.emit(ke,this)}removeDirective(e,t=!1){const r=this.directives.findIndex(i=>i===e||i.id===e.id);r>=0&&this.directives.splice(r,1),t||G.emit(ke,this)}removeChild(e,t=!1){const{children:r,disposed:i}=this;if(i||!Array.isArray(r))return;const a=r.findIndex(o=>o===e);e.parent=null,r.splice(a,1),t||G.emit(ke,this)}appendChild(e,t=!1){const{children:r,disposed:i}=this;i||(e.parent=this,Array.isArray(r)?r.push(e):this.children=[e],t||G.emit(ke,this))}insertAfter(e,t=!1){if(!this.parent)return;const r=this.parent.children;if(Array.isArray(r)){e.parent=this.parent;const i=r.indexOf(this);r.splice(i+1,0,e),t||G.emit(ke,this.parent)}}insertBefore(e,t=!1){if(!this.parent)return;const r=this.parent.children;if(Array.isArray(r)){e.parent=this.parent;const i=r.indexOf(this);r.splice(i,0,e),t||G.emit(ke,this.parent)}}movePrev(e=!1){const t=this.parent;if(!t)return;const r=t.children;if(Array.isArray(r)){const i=r.indexOf(this);i>0&&(r.splice(i,1),r.splice(i-1,0,this),e||G.emit(ke,t))}}moveNext(e=!1){const t=this.parent;if(!t)return;const r=t.children;if(Array.isArray(r)){const i=r.indexOf(this);i>-1&&i<r.length-1&&(r.splice(i,1),r.splice(i+1,0,this),e||G.emit(ke,t))}}toDsl(){const{id:e,name:t,from:r,invisible:i,locked:a,slot:o,children:s,props:l,directives:c,events:u}=this,p=Array.isArray(s)?s.map(m=>m.toDsl()):s;return{id:e,name:t,from:r,invisible:i,locked:a,slot:o,children:p,props:Ei.toDsl(l),directives:pn.toDsl(c),events:Ai.toDsl(u)}}dispose(e=!1){const{children:t,disposed:r}=this;r||(Array.isArray(t)&&t.forEach(i=>i.dispose(!0)),this.parent?this.parent.removeChild(this,e):e||G.emit(ke,this),this.parent=null,this.disposed=!0,delete Dr.nodes[this.id])}lock(e=!1){if(this.locked=!0,Array.isArray(this.children))for(const t of this.children)t.lock(!0);e||G.emit(ke,this)}unlock(e=!1){if(this.locked=!1,Array.isArray(this.children))for(const t of this.children)t.unlock(!0);e||G.emit(ke,this)}setVisible(e,t=!1){if(this.invisible=!e,Array.isArray(this.children))for(const r of this.children)r.setVisible(e,!0);t||G.emit(ke,this)}isChild(e){let t=!1;if(Array.isArray(this.children)){for(const r of this.children)if(e===r||e.id===r.id){t=!0;break}else if(t=r.isChild(e),t)break}return t}};const ge="EVENT_BLOCK_CHANGE";let fn=class pa{__VTJ_BLOCK__=!0;id;name="";inject=[];state={};lifeCycles={};methods={};computed={};watch=[];css="";props=[];emits=[];slots=[];dataSources={};nodes=[];locked=!1;disposed=!1;static normalAttrs=["name","locked","inject","state","lifeCycles","methods","computed","watch","css","props","emits","slots","dataSources"];constructor(e){const{id:t}=e;this.id=t||ut(),this.update(e,!0)}update(e,t=!1){for(const i of pa.normalAttrs){const a=e[i];a&&(this[i]=a)}const{nodes:r=[]}=e;r.length&&(this.nodes=r.map(i=>new Jr(i))),t||G.emit(ge,this)}toDsl(e){const{__VTJ_BLOCK__:t,id:r,nodes:i}=this;return{...pa.normalAttrs.reduce((a,o)=>(a[o]=this[o],a),{}),__VTJ_BLOCK__:t,__VERSION__:e||au().toString(),id:r,nodes:i.map(a=>a.toDsl())}}dispose(){this.nodes.map(e=>e.dispose(!0)),this.nodes=[],this.disposed=!0}setFunction(e,t,r,i=!1){this[e][t]=r,i||G.emit(ge,this)}removeFunction(e,t,r=!1){delete this[e][t],r||G.emit(ge,this)}setState(e,t,r=!1){this.state[e]=t,r||G.emit(ge,this)}removeState(e,t=!1){delete this.state[e],t||G.emit(ge,this)}setCss(e,t=!1){this.css=e,t||G.emit(ge,this)}setWatch(e,t=!1){e.id=e.id||ut();const r=this.watch.findIndex(i=>i.id&&i.id===e.id||i===e);r>-1?this.watch.splice(r,1,e):this.watch.push(e),t||G.emit(ge,this)}removeWatch(e,t=!1){const r=this.watch.findIndex(i=>i.id&&i.id===e.id||i===e);r>-1&&(this.watch.splice(r,1),t||G.emit(ge,this))}setProp(e,t=!1){const r=this.props.findIndex(i=>typeof i=="string"?i===e.name:i.name===e.name);r>-1?this.props.splice(r,1,e):this.props.push(e),t||G.emit(ge,this)}removeProp(e,t=!1){const r=this.props.findIndex(i=>typeof i=="string"?i===e.name:i.name===e.name);r>-1&&(this.props.splice(r,1),t||G.emit(ge,this))}setEmit(e,t=!1){const r=this.emits.findIndex(i=>i===e);r>-1?this.emits.splice(r,1,e):this.emits.push(e),t||G.emit(ge,this)}removeEmit(e,t=!1){const r=this.emits.findIndex(i=>i===e);r>-1&&(this.emits.splice(r,1),t||G.emit(ge,this))}setSlot(e,t=!1){const r=this.slots.findIndex(i=>i===e);r>-1?this.slots.splice(r,1,e):this.slots.push(e),t||G.emit(ge,this)}removeSlot(e,t=!1){const r=this.slots.findIndex(i=>i===e);r>-1&&(this.slots.splice(r,1),t||G.emit(ge,this))}setInject(e,t=!1){const r=this.inject.findIndex(i=>i.name===e.name);r>-1?this.inject.splice(r,1,e):this.inject.push(e),t||G.emit(ge,this)}removeInject(e,t=!1){const r=this.inject.findIndex(i=>i.name===e.name);r>-1&&(this.inject.splice(r,1),t||G.emit(ge,this))}setDataSource(e,t=!1){this.dataSources[e.name]=e,t||G.emit(ge,this)}removeDataSource(e,t=!1){delete this.dataSources[e],t||G.emit(ge,this)}insertAfter(e,t,r=!1){e.parent=null;const i=this.nodes.indexOf(t);this.nodes.splice(i+1,0,e),r||G.emit(ge,this)}insertBefore(e,t,r=!1){e.parent=null;const i=this.nodes.indexOf(t);this.nodes.splice(i,0,e),r||G.emit(ge,this)}appendNode(e,t=!1){e.parent=null,this.nodes.push(e),t||G.emit(ge,this)}addNode(e,t,r="inner",i=!1){t?["left","top"].includes(r)?t.parent?t.insertAfter(e,i):this.insertBefore(e,t,i):["right","bottom"].includes(r)?t.parent?t.insertAfter(e,i):this.insertAfter(e,t,i):t.appendChild(e,i):this.appendNode(e,i)}__removeNode(e,t=!1){const r=this.nodes.findIndex(i=>i.id===e.id);r>-1&&(this.nodes.splice(r,1),t||G.emit(ge,this))}removeNode(e,t=!1){e.parent?e.dispose(t):(e.dispose(!0),this.__removeNode(e,t))}move(e,t,r="inner",i=!1){e.parent?e.parent.removeChild(e,!0):this.__removeNode(e,!0),this.addNode(e,t,r,i)}movePrev(e,t=!1){if(e.parent)e.movePrev(t);else{const r=this.nodes,i=r.indexOf(e);i>0&&(r.splice(i,1),r.splice(i-1,0,e),t||G.emit(ge,this))}}moveNext(e,t=!1){if(e.parent)e.moveNext(t);else{const r=this.nodes,i=r.indexOf(e);i>-1&&i<r.length-1&&(r.splice(i,1),r.splice(i+1,0,e),t||G.emit(ge,this))}}cloneNode(e,t=!1){const r=yu(e.toDsl()),i=new Jr(r);return this.addNode(i,e,"bottom",t),i}lock(e=!1){this.locked=!0;for(const t of this.nodes)t.lock(!0);e||G.emit(ge,this)}unlock(e=!1){this.locked=!1;for(const t of this.nodes)t.unlock(!0);e||G.emit(ge,this)}isChild(e){let t=!1;for(const r of this.nodes)if(e===r||e.id===r.id){t=!0;break}else if(t=r.isChild(e),t)break;return t}};const Ne="EVENT_PROJECT_CHANGE",rr="EVENT_PROJECT_ACTIVED",ha="EVENT_PROJECT_DEPS_CHANGE",Un="EVENT_PROJECT_PAGES_CHANGE",Or="EVENT_PROJECT_BLOCKS_CHANGE",Gs="EVENT_PROJECT_APIS_CHANGE",vu="EVENT_PROJECT_PUBLISH",gu="EVENT_PROJECT_FILE_PUBLISH";let mg=class ma{id="";name="";description="";homepage="";dependencies=[];pages=[];blocks=[];apis=[];currentFile=null;config={};static attrs=["name","homepage","description","dependencies","pages","blocks","apis","config"];constructor(e){const{id:t}=e;this.id=t||ut(),this.update(e,!0)}update(e,t=!1){for(const r of ma.attrs){const i=e[r];i&&(this[r]=i)}t||G.emit(Ne,{model:this,type:"update",data:e})}isPageFile(e){return e.type==="page"}toDsl(e){const{id:t}=this,r=ma.attrs.reduce((i,a)=>(i[a]=this[a],i),{});return r.pages&&(r.pages=r.pages.map(i=>(delete i.dsl,i))),r.blocks&&(r.blocks=r.blocks.map(i=>(delete i.dsl,i))),{__VTJ_PROJECT__:!0,__VERSION__:e||au().toString(),id:t,...r}}active(e,t=!1){this.currentFile=e,t||G.emit(rr,{model:this,type:"update",data:e})}deactivate(e=!1){this.currentFile=null,e||G.emit(rr,{model:this,type:"update",data:null})}setDeps(e,t=!1){const r=this.dependencies,i=r.findIndex(o=>o.package===e.package);let a;if(i>-1?(a="update",r.splice(i,1,{...r[i],...e})):(a="create",r.push(e)),!t){const o={model:this,type:a,data:e};G.emit(ha,o),G.emit(Ne,o)}}removeDeps(e,t=!1){const r=this.dependencies,i=r.findIndex(a=>a.package===e.package);if(i>-1&&r.splice(i,1),!t){const a={model:this,type:"delete",data:e};G.emit(ha,a),G.emit(Ne,a)}}getPage(e){const t=(r,i=[])=>{for(const a of i){if(a.id===r)return a;if(a.children&&a.children.length){const o=t(r,a.children);if(o)return o}}};return t(e,this.pages)}getPages(){const e=(t=[])=>{let r=[];for(const i of t)i.dir?i.children&&i.children.length&&(r=r.concat(e(i.children))):r.push(i);return r};return e(this.pages)}createPage(e,t,r=!1){if(e.id=e.raw?e.name:e.id||ut(),e.type="page",e.dir?e.children=[]:e.dsl=e.dsl||new fn({id:e.id,name:Wr(e.name)}).toDsl(),t){const i=this.getPage(t);i?i.children?i.children.push(e):i.children=[e]:console.warn(`not found PageFile for id: ${t} `)}else this.pages.push(e);if(!this.currentFile&&!e.dir&&this.active(e,r),!r){const i={model:this,type:"create",data:e};G.emit(Un,i),G.emit(Ne,i)}}updatePage(e,t=!1){const r=this.getPage(e.id);if(r?Object.assign(r,e):console.warn(`not found PageFile for id: ${e.id} `),!t){const i={model:this,type:"update",data:e};G.emit(Un,i),G.emit(Ne,i)}}clonePage(e,t,r=!1){const i=ut(),a=`${e.name}Copy`,o=`${e.title}_副本`,s=new fn({id:i,name:a}).toDsl(),l=pt({},e,{id:i,name:a,title:o,dsl:s}),c=t?this.getPage(t)?.children||[]:this.pages,u=c.findIndex(p=>p.id===e.id);if(c.splice(u+1,0,l),!r){const p={model:this,type:"clone",data:{page:e,newPage:l}};G.emit(Un,p),G.emit(Ne,p)}}removePage(e,t=!1){const r=this.getPage(e),i=(a,o)=>{const s=o.findIndex(l=>l.id===a);if(s>=0){o.splice(s,1);return}for(const l of o)if(l.children&&l.children.length)return i(a,l.children)};if(i(e,this.pages),e===this.homepage&&(this.homepage=""),this.currentFile?.id===e&&this.deactivate(t),!t){const a={model:this,type:"delete",data:r};G.emit(Un,a),G.emit(Ne,a)}}getBlock(e){return this.blocks.find(t=>t.id===e)}createBlock(e,t=!1){const r=e.id||ut(),i=Wr(e.name);e.id=r,e.type="block",e.dsl=new fn({id:r,name:i}).toDsl(),this.blocks.push(e);const a=e.fromType||"Schema";if(!this.currentFile&&a==="Schema"&&this.active(e,t),!t){const o={model:this,type:"create",data:e};G.emit(Or,o),G.emit(Ne,o)}}updateBlock(e,t=!1){const r=this.getBlock(e.id);if(r?(Object.assign(r,e),r.dsl&&(r.dsl.name=e.name)):console.warn(`not found PageFile for id: ${e.id} `),!t){const i={model:this,type:"update",data:e};G.emit(Or,i),G.emit(Ne,i)}}removeBlock(e,t=!1){const r=this.getBlock(e),i=this.blocks,a=i.findIndex(o=>o.id===e);if(a>-1?(i.splice(a,1),this.currentFile?.id===e&&this.deactivate(t)):console.warn(`not found PageFile for id: ${e} `),!t){const o={model:this,type:"delete",data:r};G.emit(Or,o),G.emit(Ne,o)}}existBlockName(e,t=[]){return this.blocks.some(r=>r.name===e&&!t.includes(r.id))}existPageName(e,t=[]){return this.getPages().some(r=>r.name===e&&!t.includes(r.id))}setApi(e,t=!1){const r=this.apis.find(a=>a.name===e.name||a.id===e.id);let i;if(r?(i="update",Object.assign(r,e)):(i="create",e.id=ut(),this.apis.push(e)),!t){const a={model:this,type:i,data:e};G.emit(Gs,a),G.emit(Ne,a)}}removeApi(e,t=!1){const r=this.apis.findIndex(i=>i.name===e||i.id===e);if(r>-1?this.apis.splice(r,1):console.warn(`not found Api for name: ${e} `),!t){const i={model:this,type:"delete",data:e};G.emit(Gs,i),G.emit(Ne,i)}}existApiName(e,t=[]){return this.apis.some(r=>r.name===e&&!t.includes(r.id))}setHomepage(e,t=!1){if(this.homepage=e,!t){const r={model:this,type:"update",data:e};G.emit(Ne,r)}}setConfig(e,t=!1){if(this.config=Object.assign(this.config,e),!t){const r={model:this,type:"update",data:e};G.emit(Ne,r)}}publish(e){const t={model:this,type:"publish",data:e||this};e?G.emit(gu,t):G.emit(vu,t)}};const Wn="EVENT_HISTORY_CHANGE",Ir="EVENT_HISTORY_LOAD";let fg=class{options={max:50};index=-1;id;items;constructor(e,t={}){Object.assign(this.options,t);const{id:r,items:i=[]}=e;this.id=r,this.items=i}toDsl(){const{id:e,items:t}=this;return{id:e,items:t.map(r=>({id:r.id,label:r.label}))}}get(e){return this.items.find(t=>t.id===e)}add(e,t=!1){const{max:r}=this.options,i={id:ut(),label:new Date().toLocaleString(),dsl:Qt(e)};if(this.items.unshift(i),this.items.length>r){const a=this.items.splice(r);t||G.emit(Wn,{model:this,type:"delete",data:a.map(o=>o.id)})}this.index=-1,t||G.emit(Wn,{model:this,type:"create",data:i})}remove(e,t=!1){const r=this.items.findIndex(i=>i.id===e);r>-1?(this.items.splice(r,1),r===this.index?this.index=-1:this.index>=this.items.length&&(this.index=this.items.length-1)):console.warn(`not found HistoryItem for id: ${e} `),t||G.emit(Wn,{model:this,type:"delete",data:[e]})}forward(e=!1){const{index:t,items:r}=this;if(t<0)return;--this.index;const i=r[this.index];i&&!e&&G.emit(Ir,{model:this,type:"load",data:i})}backward(e=!1){const{index:t,items:r}=this;if(t>=r.length-1)return;t<0&&(this.index=0),++this.index;const i=r[this.index];i&&!e&&G.emit(Ir,{model:this,type:"load",data:i})}load(e,t=!1){const r=this.items.findIndex(i=>i.id===e);r>=0&&(this.index=r,t||G.emit(Ir,{model:this,type:"load",data:this.items[r]}))}clear(e=!1){this.index=-1;const t=this.items.map(r=>r.id);this.items=[],e||G.emit(Wn,{model:this,type:"clear",data:t})}};const G=ng();function Ce(n){return n instanceof fn}function yu(n){return delete n.id,Array.isArray(n.children)&&(n.children=n.children.map(e=>yu(e))),n}function vg(n){const e=n.fromType||"Schema";return e==="Schema"?{type:"Schema",id:n.id}:e==="UrlSchema"?{type:"UrlSchema",url:(n.urls||"").split(",")[0]||""}:e==="Plugin"?{type:"Plugin",urls:(n.urls||"").split(","),library:n.library}:""}/**!
57
57
  * Copyright (c) 2024, VTJ.PRO All rights reserved.
58
58
  * @name @vtj/icons
59
59
  * @author CHC chenhuachun1549@dingtalk.com
60
- * @version 0.8.5
60
+ * @version 0.8.7
61
61
  * @license <a href="https://vtj.pro/license.html">MIT License</a>
62
62
  */const gg=I({name:"ExitFullscreen",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>_("svg",{viewBox:"0 0 1024 1024",width:"1em",height:"1em"},[[{path:"M298.666667 298.666667V85.333333h85.333333v298.666667H85.333333V298.666667h213.333334z m426.666666-213.333334v213.333334h213.333334v85.333333h-298.666667V85.333333h85.333333zM298.666667 938.666667v-213.333334H85.333333v-85.333333h298.666667v298.666667H298.666667z m426.666666 0h-85.333333v-298.666667h298.666667v85.333333h-213.333334v213.333334z"}].map((e,t)=>_("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),yg=I({name:"Fixed",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>_("svg",{viewBox:"0 0 1024 1024",width:"1em",height:"1em"},[[{path:"M374.442667 486.229333l-81.237334 101.034667c-2.218667 4.352-2.218667 6.570667 0 8.789333 0 2.218667 2.218667 4.352 6.570667 4.352H719.36c4.352 0 6.570667-2.133333 6.570667-4.352 0-2.218667 2.218667-4.437333 0-8.789333l-81.237334-101.034667H374.442667z m362.922666 179.2H281.770667a66.56 66.56 0 0 1-57.173334-35.754666 67.242667 67.242667 0 0 1 7.082667-66.730667l104.96-128.853333h345.856l104.96 128.853333c14.250667 19.029333 19.029333 45.226667 7.168 66.730667a66.56 66.56 0 0 1-57.258667 35.84zM380.16 178.773333H639.146667L680.362667 76.544c2.218667-4.266667 0-6.485333 0-6.485333 0-2.218667-2.133333-4.352-6.485334-4.352H347.562667c-4.352 0-6.570667 2.133333-6.570667 4.266666 0 2.218667-2.133333 4.437333 0 6.570667l39.253333 102.229333z m307.114667 62.122667H331.861333l-57.173333-145.493333a61.269333 61.269333 0 0 1 7.082667-57.173334 63.317333 63.317333 0 0 1 52.48-26.282666h355.413333c21.418667 0 40.533333 9.557333 52.48 26.197333 11.946667 16.725333 14.250667 38.229333 7.082667 57.258667l-61.952 145.493333z",color:"#FFFFFF"},{path:"M386.901333 426.922667h245.248V245.76H386.901333v181.162667z m309.930667 59.733333H322.304V186.026667h372.053333v300.544h2.474667zM510.72 992.256c-19.029333-16.725333-28.586667-40.618667-30.976-66.816L458.24 636.842667h107.349333l-21.418666 288.597333a127.146667 127.146667 0 0 1-33.450667 66.816",color:"#FFFFFF"},{path:"M19.2 905.557333m52.48 0l878.08 0q52.48 0 52.48 52.48l0 0.085334q0 52.48-52.48 52.48l-878.08 0q-52.48 0-52.48-52.48l0-0.085334q0-52.48 52.48-52.48Z",color:"#FFFFFF"}].map((e,t)=>_("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),bg=I({name:"Fullscreen",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>_("svg",{viewBox:"0 0 1024 1024",width:"1em",height:"1em"},[[{path:"M170.666667 170.666667v213.333333H85.333333V85.333333h298.666667v85.333334H170.666667z m682.666666 213.333333V170.666667h-213.333333V85.333333h298.666667v298.666667h-85.333334zM170.666667 640v213.333333h213.333333v85.333334H85.333333v-298.666667h85.333334z m682.666666 0h85.333334v298.666667h-298.666667v-85.333334h213.333333v-213.333333z"}].map((e,t)=>_("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),wg=I({name:"Invisible",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>_("svg",{viewBox:"0 0 1024 1024",width:"1em",height:"1em"},[[{path:"M891.0336 113.7664a32 32 0 0 1 0 45.2352l-104.6016 104.6016a380.1088 380.1088 0 0 1 81.408 65.024l4.5312 4.7104c2.6112 2.6368 5.4272 5.3504 8.704 8.3968l11.6224 10.4192 30.6176 26.624 12.9792 11.6224c53.76 48.8448 73.984 78.7456 73.984 120.064 0 47.488-26.7776 79.744-100.3776 142.848l-17.8432 15.4368a471.04 471.04 0 0 0-15.5392 14.1312l-4.7104 4.6592-10.5984 11.008c-80.8192 81.4336-209.4848 129.536-346.7008 129.536-86.784 0-169.5744-18.9696-239.1808-53.3504l-135.5264 135.5008a32 32 0 1 1-45.2352-45.2352l123.8784-123.904a364.9536 364.9536 0 0 1-63.4368-56.192l-1.8176-2.048a249.0112 249.0112 0 0 0-21.4016-20.1728l-12.6976-10.7776-17.6896-14.72-12.4672-10.496C36.6592 581.7856 12.8 549.9392 12.8 510.464c0-38.7072 19.3792-66.5088 70.8096-111.7952l12.4416-10.7776 27.4688-23.1168c13.568-11.4688 21.4016-18.56 27.8016-25.3184l3.712-4.0448a30.0544 30.0544 0 1 1 44.9792 39.936c-6.656 7.4752-13.2352 14.0032-22.9888 22.6816l-9.216 8.0384-42.8544 36.1728c-12.288 10.6752-21.4528 19.328-29.2608 27.8016-15.1808 16.4352-22.784 30.0032-22.784 40.448 0 10.1376 7.2448 23.2448 21.7344 39.0912 7.8592 8.6016 17.152 17.408 29.696 28.2624l11.5968 9.856 17.4336 14.5152c17.8176 14.8224 28.416 24.0128 36.9664 32.5376l4.9664 5.0944 11.3408 12.3648a315.8272 315.8272 0 0 0 55.168 45.568l89.7536-89.8304a30.0544 30.0544 0 0 1 10.1632-10.1632l217.4976-217.472a146.4064 146.4064 0 0 0-200.1152 70.7328 146.4832 146.4832 0 0 0-12.288 69.632 30.0544 30.0544 0 0 1-60.0064 4.224 206.7712 206.7712 0 0 1 17.408-98.304c46.2592-103.936 168.448-150.8608 272.4096-104.576 9.3696 4.1728 18.2528 8.96 26.6496 14.2592l56.5248-56.5504c-50.5088-17.7408-106.88-27.3664-165.2736-27.3664-95.1808 0-185.7024 25.472-254.7968 71.552A30.08 30.08 0 0 1 226.3808 273.92c79.0272-52.736 181.3248-81.664 288.1536-81.664 75.3152 0 148.0704 14.4896 211.712 41.0368l119.552-119.5008a32 32 0 0 1 45.2352 0z m-148.5568 193.792l-71.0656 71.0912a206.592 206.592 0 0 1 29.824 215.808c-46.2848 103.9616-168.4992 150.8608-272.4608 104.576a205.7216 205.7216 0 0 1-48-29.7472l-60.1088 60.0832 10.112 4.2496c51.968 20.9664 110.7968 32.7168 170.88 34.2016l12.8768 0.1536c124.928 0 240.7168-44.1088 309.504-117.4272l6.656-6.8864c3.1744-3.1744 6.5536-6.4 10.4704-9.984l8.6528-7.7824 44.6976-38.8352c17.5872-15.6928 29.568-27.776 38.8864-39.68 11.2384-14.336 16.8192-26.624 16.8192-36.864 0-10.6752-5.9904-23.552-18.0224-38.6048-9.1648-11.4688-20.7104-23.1424-37.376-38.144l-11.904-10.496-26.7776-23.1936c-11.1104-9.728-18.4832-16.4608-25.0112-22.9376l-13.312-13.7472a332.9792 332.9792 0 0 0-75.3408-55.808z m-113.8432 113.8688l-205.056 205.0816a146.4064 146.4064 0 0 0 222.72-56.5248 146.3552 146.3552 0 0 0-17.664-148.5568z",color:"#CCCCCC"}].map((e,t)=>_("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),xg=I({name:"LineHeight",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>_("svg",{viewBox:"0 0 1024 1024",width:"1em",height:"1em"},[[{path:"M648 160H104c-4.4 0-8 3.6-8 8v128c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-64h168v560h-92c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h264c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-92V232h168v64c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V168c0-4.4-3.6-8-8-8z m272.8 546H856V318h64.8c6 0 9.4-7 5.7-11.7L825.7 178.7c-2.9-3.7-8.5-3.7-11.3 0L713.6 306.3c-3.7 4.7-0.4 11.7 5.7 11.7H784v388h-64.8c-6 0-9.4 7-5.7 11.7l100.8 127.5c2.9 3.7 8.5 3.7 11.3 0l100.8-127.5c3.8-4.7 0.4-11.7-5.6-11.7z"}].map((e,t)=>_("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),bu=I({name:"Maximize",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>_("svg",{viewBox:"0 0 1024 1024",width:"1em",height:"1em"},[[{path:"M926.45937303 97.54062697v828.2973677H97.54062697V97.54062697h828.91874606m4.97102697-77.6722963h-838.8608c-39.7682157 0-72.07989097 32.31167525-72.07989097 72.07989096v839.48217837c0 39.7682157 32.31167525 72.07989097 72.07989097 72.07989097h839.48217837c39.7682157 0 72.07989097-32.31167525 72.07989096-72.07989097v-838.8608c0-40.38959408-32.31167525-72.70126933-72.70126933-72.70126933 0.62137837 0 0 0 0 0z"}].map((e,t)=>_("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),wu=I({name:"Minimize",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>_("svg",{viewBox:"0 0 1024 1024",width:"1em",height:"1em"},[[{path:"M65.23884 456.152041 958.760137 456.152041l0 111.695918L65.23884 567.847959 65.23884 456.152041z"}].map((e,t)=>_("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),xu=I({name:"Popup",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>_("svg",{viewBox:"0 0 1024 1024",width:"1em",height:"1em"},[[{path:"M959.72 0H294.216a63.96 63.96 0 0 0-63.96 63.96v127.92H64.28A63.96 63.96 0 0 0 0.32 255.84V959.4a63.96 63.96 0 0 0 63.96 63.96h703.56a63.96 63.96 0 0 0 63.96-63.96V792.465h127.92a63.96 63.96 0 0 0 63.96-63.96V63.96A63.96 63.96 0 0 0 959.72 0zM767.84 728.505V959.4H64.28V255.84h703.56z m189.322 0H831.8V255.84a63.96 63.96 0 0 0-63.96-63.96H294.216V63.96H959.72z"}].map((e,t)=>_("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),_g=I({name:"QrCodeLogin",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>_("svg",{viewBox:"0 0 1024 1024",width:"1em",height:"1em"},[[{path:"M1024 866.459826V1024h-78.781217v-157.540174H1024z m-157.540174 0V1024H801.391304l-13.712695-13.712696v-143.827478h78.781217z m-78.758956-315.080348v157.540174h157.517913V551.401739H1024v236.321391H708.919652v-78.781217h-78.758956l-0.022261 143.805217-78.758957-78.758956v-222.586435h236.321392z m-315.080348 0l-0.022261 143.805218-143.782957-143.805218h143.805218zM1024 0v472.598261H551.379478V0H1024zM472.598261 0v472.598261h-222.564174l-78.758957-78.758957h222.564174V78.758957H78.758957v222.541913L0 222.564174V0h472.598261z m472.620522 78.758957H630.160696v315.080347H945.196522V78.758957zM315.080348 157.540174v157.540174H157.540174V157.540174h157.540174z m551.379478 0v157.540174h-157.540174V157.540174h157.540174z",color:"#26B8CF"}].map((e,t)=>_("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),_u=I({name:"RawClose",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>_("svg",{viewBox:"0 0 1024 1024",width:"1em",height:"1em"},[[{path:"M512 432.46249999L865.92499999 78.49999973a56.13749998 56.13749998 0 0 1 79.53750003-5e-8 56.17500029 56.17500029 0 0 1 0 79.53750002L591.49999971 512l353.925 353.92499999c21.97500029 21.97500029 22.12499972 57.4125003 0 79.53750003a56.17500029 56.17500029 0 0 1-79.53750004 0L512 591.49999971 158.07500001 945.50000027a56.13749998 56.13749998 0 0 1-79.53750003 5e-8 56.17500029 56.17500029 0 0 1 0-79.53750002L432.50000029 512 78.49999973 158.07500001a56.13749998 56.13749998 0 0 1-5e-8-79.53750003 56.17500029 56.17500029 0 0 1 79.53750002 0L512 432.50000029z"}].map((e,t)=>_("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),Sg=I({name:"RawLock",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>_("svg",{viewBox:"0 0 1024 1024",width:"1em",height:"1em"},[[{path:"M800.421 436.525h-63.661v-148.673c0-124.507-100.762-225.757-224.732-225.757-123.98 0-224.857 101.25-224.857 225.766v148.662h-63.593c-30.667 0-55.532 24.952-55.532 55.752v407.048c0 30.848 24.865 55.82 55.532 55.82h576.9c30.667 0 55.465-24.97 55.465-55.82v-407.048c0-30.802-24.855-55.752-55.532-55.752zM543.203 706.409v88.88c-0.016 4.026-3.264 7.287-7.282 7.325h-47.733c-4.039-0.022-7.307-3.287-7.334-7.322v-88.882c-22.423-11.518-37.953-34.602-37.953-61.659 0-38.288 30.945-69.425 69.070-69.425 38.183 0 69.138 31.136 69.138 69.415 0.057 27.067-15.473 50.152-37.905 61.659zM650.514 436.525h-276.989v-144.986c0-76.691 62.196-139.146 138.552-139.146 76.366 0 138.447 62.454 138.447 139.146v144.986z"}].map((e,t)=>_("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),kg=I({name:"RawUnLock",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>_("svg",{viewBox:"0 0 1024 1024",width:"1em",height:"1em"},[[{path:"M796.444 446.009H343.61V320.853c0-86.47 70.542-157.013 157.013-157.013s157.014 70.542 157.014 157.013c0 25.031 20.48 45.511 45.51 45.511s45.512-20.48 45.512-45.51c0-136.534-111.502-248.036-248.036-248.036S252.587 184.32 252.587 320.853V446.01H204.8c-25.031 0-45.511 20.48-45.511 45.511v420.978c0 25.03 20.48 45.51 45.511 45.51h591.644c25.032 0 45.512-20.48 45.512-45.51V491.52c0-25.031-20.48-45.511-45.512-45.511zM537.031 737.28c-2.275 0-4.551 2.276-4.551 4.551v43.236c0 43.235-13.653 50.062-31.858 50.062s-31.858-4.551-31.858-50.062V739.556c0-2.276-2.275-4.552-4.55-4.552-13.654-9.102-22.756-25.03-22.756-45.51 0-31.858 27.306-59.165 59.164-59.165s59.165 25.031 59.165 59.164c2.275 20.48-9.103 36.41-22.756 47.787z"}].map((e,t)=>_("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),jg=I({name:"Rows",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>_("svg",{viewBox:"0 0 1024 1024",width:"1em",height:"1em"},[[{path:"M915.692308 275.692308h-807.384616c-15.753846 0-29.538462-13.784615-29.538461-29.538462v-59.076923C78.769231 171.323077 92.553846 157.538462 108.307692 157.538462h807.384616c15.753846 0 29.538462 13.784615 29.538461 29.538461v59.076923c0 15.753846-13.784615 29.538462-29.538461 29.538462z m0 293.415384h-807.384616c-15.753846 0-29.538462-13.784615-29.538461-29.538461v-59.076923c0-13.784615 13.784615-27.569231 29.538461-27.569231h807.384616c15.753846 0 29.538462 13.784615 29.538461 29.538461v59.076924c0 13.784615-13.784615 27.569231-29.538461 27.56923z m0 297.353846h-807.384616c-15.753846 0-29.538462-13.784615-29.538461-29.538461v-59.076923c0-15.753846 13.784615-29.538462 29.538461-29.538462h807.384616c15.753846 0 29.538462 13.784615 29.538461 29.538462v59.076923c0 15.753846-13.784615 29.538462-29.538461 29.538461z"}].map((e,t)=>_("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),Vg=I({name:"Skin",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>_("svg",{viewBox:"0 0 1024 1024",width:"1em",height:"1em"},[[{path:"M910.74 338.74L756.8 195.33c-11.5-10.71-27.32-16.15-43.59-14.99-1.53-0.12-3.03-0.18-4.48-0.18h-82.01l-5.75 2.98c-30.39 15.75-69.15 24.42-109.16 24.42s-78.78-8.67-109.16-24.42l-5.75-2.98h-82.02c-20.91 0-39.71 10.63-49.43 27.51L113.29 349.43C102.78 359.21 97 372.22 97 386.06c0 13.84 5.78 26.84 16.29 36.63l111.17 103.58c9.31 8.66 21.33 13.87 34.27 14.95v250.3c0 28.84 25.19 52.31 56.14 52.31h393.85c30.96 0 56.14-23.47 56.14-52.31V530.57c13.1-1 25.28-6.23 34.68-14.98l111.18-103.58c21.7-20.19 21.7-53.07 0.02-73.27z m0 0"}].map((e,t)=>_("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),Cg=I({name:"UnFixed",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>_("svg",{viewBox:"0 0 1024 1024",width:"1em",height:"1em"},[[{path:"M301.824 455.509333l-168.021333 18.261334c-5.973333 2.048-8.021333 4.010667-8.021334 8.106666-2.048 1.962667-2.048 5.973333 1.962667 10.069334l386.730667 386.730666c4.010667 4.010667 8.021333 4.010667 10.069333 1.962667 2.048-1.962667 6.058667-1.962667 8.106667-8.021333l18.261333-168.106667-249.088-249.002667z m168.106667 467.626667L83.2 536.661333C62.976 516.266667 56.917333 485.802667 65.024 457.472a80.725333 80.725333 0 0 1 62.72-50.602667l198.4-20.224 293.546667 293.546667-20.224 198.4c-4.010667 28.330667-22.272 54.613333-50.602667 62.72-28.330667 8.106667-58.709333 2.048-78.933333-18.176z m93.098666-720.64l240.896 240.896 133.632-56.661333c6.058667-2.048 6.058667-6.058667 6.058667-6.058667 2.048-2.048 2.048-6.144-2.048-10.24L637.952 66.901333C633.856 62.805333 629.76 62.805333 627.797333 64.853333c-2.048 2.048-6.058667 2.048-6.058666 6.144l-58.709334 131.584z m224.682667 317.866667L486.058667 218.709333 560.981333 46.592a73.557333 73.557333 0 0 1 54.613334-42.496 76.032 76.032 0 0 1 66.901333 22.186667l301.653333 301.738666a75.946667 75.946667 0 0 1 22.186667 66.816 73.557333 73.557333 0 0 1-42.496 54.613334l-176.128 70.826666z",color:"#FFFFFF"},{path:"M360.618667 421.12l224.682666 224.682667 165.973334-165.973334L526.592 255.146667 360.618667 421.12z m226.730666 315.818667L269.482667 419.072l255.146666-255.061333 315.733334 315.818666-255.146667 255.146667 2.133333 1.962667z",color:"#FFFFFF"},{path:"M0.256 1008.213333c-2.048-30.378667 10.069333-58.709333 30.293333-83.029333L257.365333 662.016l91.050667 91.136L85.333333 979.882667a152.576 152.576 0 0 1-84.992 28.330666",color:"#FFFFFF"}].map((e,t)=>_("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),$g=I({name:"UserLogin",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>_("svg",{viewBox:"0 0 1024 1024",width:"1em",height:"1em"},[[{path:"M943.081739 44.877913a79.09287 79.09287 0 0 1 79.805218 75.620174l0.111304 4.296348v511.510261a79.09287 79.09287 0 0 1-75.620174 79.805217l-4.296348 0.111304H685.612522v100.930783h178.799304v145.229913l-124.660869-0.022261-54.227479-54.227478h124.66087v-36.730435l-161.413565-0.022261-54.227479-54.227478h36.841739v-100.930783h-137.772521l-54.249739-54.249739h481.458087c26.000696 0 46.124522-18.988522 47.838608-44.432695l0.111305-3.494957V147.055304c0-27.158261-20.769391-47.949913-47.949913-47.949913H102.177391c-25.978435 0-46.124522 19.010783-47.838608 44.432696l-0.111305 3.517217v129.78087L0 222.608696V124.416l0.111304-3.917913A79.026087 79.026087 0 0 1 75.620174 44.966957l4.296348-0.111305h863.165217z m-38.244174 118.160696v435.021913l-529.408-0.022261L118.160696 340.769391V163.038609h786.676869z",color:"#26B8CF"}].map((e,t)=>_("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),Eg=I({name:"Visible",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>_("svg",{viewBox:"0 0 1024 1024",width:"1em",height:"1em"},[[{path:"M514.5344 192.2304c137.216 0 265.856 48.0768 346.7008 129.536l8.576 8.9344c5.888 6.144 12.288 12.16 22.8864 21.4528l30.592 26.624 13.0048 11.6224c53.76 48.8448 73.984 78.7456 73.984 120.064 0 45.952-25.088 77.6448-93.4144 136.832l-24.832 21.4528c-9.0112 7.936-14.976 13.4656-20.224 18.7904l-10.5984 11.008c-80.8192 81.4336-209.4848 129.536-346.7008 129.536-141.7216 0-272.896-50.6112-353.2544-136.3456l-8.064-8.8576-4.2496-4.4544c-6.7072-6.784-15.3088-14.336-29.8496-26.5216l-17.6896-14.72-12.4672-10.496C36.6592 581.7856 12.8 549.9392 12.8 510.464c0-41.6768 22.4768-70.7328 83.2512-122.5728l27.4688-23.1168c13.568-11.4688 21.4016-18.56 27.8016-25.3184l3.712-4.0448a30.0544 30.0544 0 1 1 44.9792 39.936l-5.76 6.2464c-6.8608 7.168-14.592 14.336-26.4448 24.4736L124.928 442.24c-12.288 10.6752-21.4528 19.328-29.2608 27.8016-15.1808 16.4352-22.784 30.0032-22.784 40.448 0 10.1376 7.2448 23.2448 21.7344 39.0912 7.8592 8.6016 17.152 17.408 29.696 28.2624l11.5968 9.856 27.2896 22.784c15.1296 12.7488 24.064 20.8896 32.0768 29.3632l11.3408 12.3648c31.7696 33.28 74.496 61.3888 124.16 81.408 55.6544 22.4512 119.2192 34.3552 183.7312 34.3552 121.2672 0 233.9072-41.5488 303.3088-111.0272l12.8512-13.2864 6.7328-6.5024c3.584-3.4048 7.6032-7.04 12.3904-11.264l44.6976-38.8352 10.9312-9.984c11.8528-11.0848 20.7104-20.4288 27.9552-29.696 11.2384-14.336 16.8192-26.624 16.8192-36.864 0-10.6752-5.9904-23.552-18.0224-38.6048-9.1648-11.4688-20.7104-23.1424-37.376-38.144l-11.904-10.496-26.7776-23.1936-12.4416-11.0592c-4.8384-4.3776-8.832-8.192-12.544-11.8784l-13.312-13.7472c-69.4272-69.4784-182.016-111.0272-303.3088-111.0272-95.1808 0-185.7024 25.472-254.7968 71.552A30.08 30.08 0 0 1 226.3808 273.92c79.0272-52.736 181.3248-81.664 288.1536-81.664z m-1.8176 111.9488c31.8976 0 62.5664 7.1168 91.008 21.12a30.08 30.08 0 0 1-26.5472 53.9392 146.4064 146.4064 0 0 0-210.688 131.3024 146.4064 146.4064 0 0 0 146.2272 146.2016 146.4064 146.4064 0 0 0 146.2272-146.2016c0-23.936-5.888-47.6672-17.0496-68.608a30.0544 30.0544 0 0 1 53.0688-28.2624 206.7712 206.7712 0 0 1 24.0896 96.8704c0 113.792-92.544 206.336-206.336 206.336s-206.336-92.544-206.336-206.336c0-113.8176 92.544-206.3616 206.336-206.3616z m97.2544 152.0128l3.2256 0.4864c16.2304 3.4048 26.6496 19.2512 23.296 35.4304-3.5072 17.4592-12.7488 42.9312-29.3888 67.4816-28.5184 42.0352-69.248 64.4352-117.504 64.4352-3.9936 0-7.9616-0.1536-12.0064-0.4608a30.0544 30.0544 0 1 1 4.4544-59.9552c29.5424 2.176 53.1456-8.448 71.424-32.384l3.3792-4.6336 2.6624-4.0704c5.888-9.3184 10.5984-19.3792 14.1568-29.4656l2.1504-6.4512a115.712 115.712 0 0 0 0.768-2.6368l1.8944-7.2192c4.352-13.3632 17.4848-21.9392 31.488-20.5568z",color:"#CCCCCC"}].map((e,t)=>_("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),Ag=Object.freeze(Object.defineProperty({__proto__:null,ExitFullscreen:gg,Fixed:yg,Fullscreen:bg,Invisible:wg,LineHeight:xg,Maximize:bu,Minimize:wu,Popup:xu,QrCodeLogin:_g,RawClose:_u,RawLock:Sg,RawUnLock:kg,Rows:jg,Skin:Vg,UnFixed:Cg,UserLogin:$g,Visible:Eg},Symbol.toStringTag,{value:"Module"}));function X(n,e){return Pt(I({name:n,render(){return _("i",{class:e})}}))}const Tg=X("VtjIconWindowMax","vtj-icon-window-max"),Bg=X("VtjIconWindowMin","vtj-icon-window-min"),zg=X("VtjIconWindowClose","vtj-icon-window-close"),Dg=X("VtjIconWindowNormal","vtj-icon-window-normal"),Og=X("VtjIconWindowDown","vtj-icon-window-down"),Ig=X("VtjIconWindowUp","vtj-icon-window-up"),Rg=X("VtjIconNpSave","vtj-icon-np-save"),Mg=X("VtjIconNpFile","vtj-icon-np-file"),Pg=X("VtjIconNpEdit","vtj-icon-np-edit"),Ng=X("VtjIconNpShare","vtj-icon-np-share"),Fg=X("VtjIconNpSearch","vtj-icon-np-search"),Hg=X("VtjIconNpExport","vtj-icon-np-export"),Lg=X("VtjIconNpImport","vtj-icon-np-import"),Ug=X("VtjIconNpList","vtj-icon-np-list"),Wg=X("VtjIconNpPrint","vtj-icon-np-print"),Jg=X("VtjIconNpCancel","vtj-icon-np-cancel"),qg=X("VtjIconNpConfirm","vtj-icon-np-confirm"),Gg=X("VtjIconNpReset","vtj-icon-np-reset"),Yg=X("VtjIconNpReturnAll","vtj-icon-np-return-all"),Kg=X("VtjIconNpReturn","vtj-icon-np-return"),Xg=X("VtjIconNpRemove","vtj-icon-np-remove"),Qg=X("VtjIconNpRemoveRow","vtj-icon-np-remove-row"),Zg=X("VtjIconNpDelete","vtj-icon-np-delete"),e6=X("VtjIconNpExit","vtj-icon-np-exit"),t6=X("VtjIconNpRefresh","vtj-icon-np-refresh"),n6=X("VtjIconNpAdd","vtj-icon-np-add"),r6=X("VtjIconNpSelect","vtj-icon-np-select"),i6=X("VtjIconNpAddRow","vtj-icon-np-add-row"),a6=X("VtjIconNpExtend","vtj-icon-np-extend"),o6=X("VtjIconNpClose","vtj-icon-np-close"),s6=X("VtjIconNpSubmit","vtj-icon-np-submit"),l6=X("VtjIconDeps","vtj-icon-deps"),Su=X("VtjIconBack","vtj-icon-back"),ku=X("VtjIconHome","vtj-icon-home"),ju=X("VtjIconApi","vtj-icon-api"),c6=X("VtjIconExport","vtj-icon-export"),u6=X("VtjIconImport","vtj-icon-import"),d6=X("VtjIconGreater","vtj-icon-greater"),p6=X("VtjIconSmaller","vtj-icon-smaller"),uo=X("VtjIconCheck","vtj-icon-check"),Vu=X("VtjIconSwitch","vtj-icon-switch"),po=X("VtjIconCopy","vtj-icon-copy"),ho=X("VtjIconLock","vtj-icon-lock"),Cu=X("VtjIconUnlock","vtj-icon-unlock"),mo=X("VtjIconLayers","vtj-icon-layers"),h6=X("VtjIconConsole","vtj-icon-console"),m6=X("VtjIconTeam","vtj-icon-team"),f6=X("VtjIconPublish","vtj-icon-publish"),$u=X("VtjIconPreview","vtj-icon-preview"),Eu=X("VtjIconSave","vtj-icon-save"),Au=X("VtjIconPc","vtj-icon-pc"),Tu=X("VtjIconPhone","vtj-icon-phone"),Bu=X("VtjIconPad","vtj-icon-pad"),zu=X("VtjIconRedo","vtj-icon-redo"),Du=X("VtjIconRefresh","vtj-icon-refresh"),Ou=X("VtjIconUndo","vtj-icon-undo"),Iu=X("VtjIconCategory","vtj-icon-category"),v6=X("VtjIconProject","vtj-icon-project"),g6=X("VtjIconNotice","vtj-icon-notice"),y6=X("VtjIconFav","vtj-icon-fav"),b6=X("VtjIconBug","vtj-icon-bug"),w6=X("VtjIconFile","vtj-icon-file"),x6=X("VtjIconFolder","vtj-icon-folder"),_6=X("VtjIconUpload","vtj-icon-upload"),S6=X("VtjIconDownload","vtj-icon-download"),k6=X("VtjIconUser","vtj-icon-user"),fo=X("VtjIconSetting","vtj-icon-setting"),j6=X("VtjIconArrowRight","vtj-icon-arrow-right"),V6=X("VtjIconArrowLeft","vtj-icon-arrow-left"),Ru=X("VtjIconArrowDown","vtj-icon-arrow-down"),Mu=X("VtjIconArrowUp","vtj-icon-arrow-up"),C6=X("VtjIconShare","vtj-icon-share"),$6=X("VtjIconData","vtj-icon-data"),E6=X("VtjIconTemplate","vtj-icon-template"),A6=X("VtjIconExitFullscreen","vtj-icon-exit-fullscreen"),T6=X("VtjIconFullscreen","vtj-icon-fullscreen"),vo=X("VtjIconEdit","vtj-icon-edit"),lr=X("VtjIconRemove","vtj-icon-remove"),B6=X("VtjIconJs","vtj-icon-js"),z6=X("VtjIconDatabase","vtj-icon-database"),Pu=X("VtjIconInfo","vtj-icon-info"),go=X("VtjIconPlus","vtj-icon-plus"),D6=X("VtjIconMinus","vtj-icon-minus"),yo=X("VtjIconHelp","vtj-icon-help"),Nu=X("VtjIconVars","vtj-icon-vars"),Fu=X("VtjIconOutline","vtj-icon-outline"),Hu=X("VtjIconVisible","vtj-icon-visible"),bo=X("VtjIconInvisible","vtj-icon-invisible"),Lu=X("VtjIconDocument","vtj-icon-document"),Uu=X("VtjIconHistory","vtj-icon-history"),O6=X("VtjIconFixed","vtj-icon-fixed"),I6=X("VtjIconUnfixed","vtj-icon-unfixed"),Wu=X("VtjIconSearch","vtj-icon-search"),R6=X("VtjIconMore","vtj-icon-more"),M6=X("VtjIconClose","vtj-icon-close"),Ju=X("VtjIconComponents","vtj-icon-components"),qu=X("VtjIconBlock","vtj-icon-block"),P6=Object.freeze(Object.defineProperty({__proto__:null,VtjIconApi:ju,VtjIconArrowDown:Ru,VtjIconArrowLeft:V6,VtjIconArrowRight:j6,VtjIconArrowUp:Mu,VtjIconBack:Su,VtjIconBlock:qu,VtjIconBug:b6,VtjIconCategory:Iu,VtjIconCheck:uo,VtjIconClose:M6,VtjIconComponents:Ju,VtjIconConsole:h6,VtjIconCopy:po,VtjIconData:$6,VtjIconDatabase:z6,VtjIconDeps:l6,VtjIconDocument:Lu,VtjIconDownload:S6,VtjIconEdit:vo,VtjIconExitFullscreen:A6,VtjIconExport:c6,VtjIconFav:y6,VtjIconFile:w6,VtjIconFixed:O6,VtjIconFolder:x6,VtjIconFullscreen:T6,VtjIconGreater:d6,VtjIconHelp:yo,VtjIconHistory:Uu,VtjIconHome:ku,VtjIconImport:u6,VtjIconInfo:Pu,VtjIconInvisible:bo,VtjIconJs:B6,VtjIconLayers:mo,VtjIconLock:ho,VtjIconMinus:D6,VtjIconMore:R6,VtjIconNotice:g6,VtjIconNpAdd:n6,VtjIconNpAddRow:i6,VtjIconNpCancel:Jg,VtjIconNpClose:o6,VtjIconNpConfirm:qg,VtjIconNpDelete:Zg,VtjIconNpEdit:Pg,VtjIconNpExit:e6,VtjIconNpExport:Hg,VtjIconNpExtend:a6,VtjIconNpFile:Mg,VtjIconNpImport:Lg,VtjIconNpList:Ug,VtjIconNpPrint:Wg,VtjIconNpRefresh:t6,VtjIconNpRemove:Xg,VtjIconNpRemoveRow:Qg,VtjIconNpReset:Gg,VtjIconNpReturn:Kg,VtjIconNpReturnAll:Yg,VtjIconNpSave:Rg,VtjIconNpSearch:Fg,VtjIconNpSelect:r6,VtjIconNpShare:Ng,VtjIconNpSubmit:s6,VtjIconOutline:Fu,VtjIconPad:Bu,VtjIconPc:Au,VtjIconPhone:Tu,VtjIconPlus:go,VtjIconPreview:$u,VtjIconProject:v6,VtjIconPublish:f6,VtjIconRedo:zu,VtjIconRefresh:Du,VtjIconRemove:lr,VtjIconSave:Eu,VtjIconSearch:Wu,VtjIconSetting:fo,VtjIconShare:C6,VtjIconSmaller:p6,VtjIconSwitch:Vu,VtjIconTeam:m6,VtjIconTemplate:E6,VtjIconUndo:Ou,VtjIconUnfixed:I6,VtjIconUnlock:Cu,VtjIconUpload:_6,VtjIconUser:k6,VtjIconVars:Nu,VtjIconVisible:Hu,VtjIconWindowClose:zg,VtjIconWindowDown:Og,VtjIconWindowMax:Tg,VtjIconWindowMin:Bg,VtjIconWindowNormal:Dg,VtjIconWindowUp:Ig},Symbol.toStringTag,{value:"Module"})),N6="data:image/svg+xml,%3csvg%20data-icon='BorderAll'%20aria-hidden='true'%20focusable='false'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20style='display:%20block'%20%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M14%202H2v12h12V2zm-2%202H4v8h8V4z'%3e%3c/path%3e%3c/svg%3e",F6="data:image/svg+xml,%3csvg%20data-icon='BorderBottom'%20aria-hidden='true'%20focusable='false'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20style='display:%20block'%20%3e%3cpath%20opacity='.4'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M4%2011V4h8v7h2V2H2v9h2z'%3e%3c/path%3e%3cpath%20d='M2%2014v-2h12v2z'%3e%3c/path%3e%3c/svg%3e",H6="data:image/svg+xml,%3csvg%20data-icon='BorderLeft'%20aria-hidden='true'%20focusable='false'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20style='display:%20block'%20%3e%3cpath%20opacity='.4'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M5%204h7v8H5v2h9V2H5v2z'%3e%3c/path%3e%3cpath%20d='M2%202h2v12H2z'%3e%3c/path%3e%3c/svg%3e",L6="data:image/svg+xml,%3csvg%20data-icon='BorderRight'%20aria-hidden='true'%20focusable='false'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20style='display:%20block'%20%3e%3cpath%20opacity='.4'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M11%204H4v8h7v2H2V2h9v2z'%3e%3c/path%3e%3cpath%20d='M14%202h-2v12h2z'%3e%3c/path%3e%3c/svg%3e",U6="data:image/svg+xml,%3csvg%20data-icon='BorderStyleDashed'%20aria-hidden='true'%20focusable='false'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20style='display:%20block'%20%3e%3cpath%20d='M0%207h4v2H0zm6%200h4v2H6zm6%200h4v2h-4z'%3e%3c/path%3e%3c/svg%3e",W6="data:image/svg+xml,%3csvg%20data-icon='BorderStyleDotted'%20aria-hidden='true'%20focusable='false'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20style='display:%20block'%20%3e%3cpath%20d='M1%207h2v2H1zm4%200h2v2H5zm4%200h2v2H9zm4%200h2v2h-2z'%3e%3c/path%3e%3c/svg%3e",J6="data:image/svg+xml,%3csvg%20data-icon='BorderStyleSolid'%20aria-hidden='true'%20focusable='false'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20style='display:%20block'%20%3e%3cpath%20d='M1%207h14v2H1z'%3e%3c/path%3e%3c/svg%3e",q6="data:image/svg+xml,%3csvg%20data-icon='BorderTop'%20aria-hidden='true'%20focusable='false'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20style='display:%20block'%20%3e%3cpath%20opacity='.4'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M12%205v7H4V5H2v9h12V5h-2z'%3e%3c/path%3e%3cpath%20d='M14%202v2H2V2z'%3e%3c/path%3e%3c/svg%3e",G6="data:image/svg+xml,%3csvg%20viewBox='0%200%2024%2024'%20width='16'%20height='16'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M13.4%2012l6.3-6.3c.4-.4.4-1%200-1.4-.4-.4-1-.4-1.4%200L12%2010.6%205.7%204.3c-.4-.4-1-.4-1.4%200-.4.4-.4%201%200%201.4l6.3%206.3-6.3%206.3c-.4.4-.4%201%200%201.4.2.2.4.3.7.3.3%200%20.5-.1.7-.3l6.3-6.3%206.3%206.3c.2.2.4.3.7.3s.5-.1.7-.3c.4-.4.4-1%200-1.4L13.4%2012z'%20%3e%3c/path%3e%3c/svg%3e",Gu="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='16px'%20height='16px'%20viewBox='0%200%2016%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e全局/关闭%3c/title%3e%3cg%20id='全局/关闭'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%20stroke-linecap='round'%3e%3cg%20id='编组-56备份-2'%20transform='translate(2.000000,%202.000000)'%20stroke='currentColor'%20stroke-width='1.2'%3e%3cline%20x1='6'%20y1='1.65412684e-11'%20x2='6'%20y2='12'%20id='路径-4'%20transform='translate(6.000000,%206.000000)%20rotate(-225.000000)%20translate(-6.000000,%20-6.000000)%20'%3e%3c/line%3e%3cline%20x1='-4.71192529e-12'%20y1='6'%20x2='12'%20y2='6'%20id='路径-3'%20transform='translate(6.000000,%206.000000)%20rotate(-225.000000)%20translate(-6.000000,%20-6.000000)%20'%3e%3c/line%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Y6="data:image/svg+xml,%3csvg%20data-icon='CursorAuto'%20aria-hidden='true'%20focusable='false'%20viewBox='0%200%2011%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill='currentColor'%20d='M9.716%208.113L1%201v11.533l2.71-2.69%202.364%204.732%202.023-1.048L5.79%208.912z'%3e%3c/path%3e%3c/svg%3e",K6="data:image/svg+xml,%3csvg%20data-icon='CursorNone'%20aria-hidden='true'%20focusable='false'%20viewBox='0%200%2015%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill='currentColor'%20d='M13.716%208.113L10.734%205.68%205%2011.414v1.12l2.71-2.69%202.363%204.732%202.023-1.05L9.79%208.913l3.926-.8zm-2.14-6.537L8.938%204.214%205%201v7.15l-3.424%203.425.85.85%2010-10-.85-.85z'%3e%3c/path%3e%3c/svg%3e",X6="data:image/svg+xml,%3csvg%20data-icon='CursorNoDrop'%20aria-hidden='true'%20focusable='false'%20viewBox='0%200%2016%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill='currentColor'%20d='M8%201C4.134%201%201%204.133%201%208s3.134%207%207%207%207-3.133%207-7-3.134-7-7-7zm5%207a4.97%204.97%200%2001-.832%202.75l-6.92-6.918A4.97%204.97%200%20018%203c2.757%200%205%202.243%205%205zM3%208c0-1.018.31-1.963.833-2.753l6.92%206.92A4.97%204.97%200%20018%2013c-2.757%200-5-2.243-5-5z'%3e%3c/path%3e%3c/svg%3e",Q6="data:image/svg+xml,%3csvg%20data-icon='CursorPointer'%20aria-hidden='true'%20focusable='false'%20viewBox='0%200%2014%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill='currentColor'%20d='M11.45%205.864h-.35v2.08h-.704V5.16a.703.703%200%2000-.703-.702H8.99V7.24h-.7V4.46a.703.703%200%2000-.703-.704h-.703V7.27H6.18V2a1.054%201.054%200%2000-2.108%200v7.378l-1.867-1.6A.843.843%200%2000.967%208.904S3.72%2013.594%204.775%2015H11.1l1.135-3.973c.18-.628.27-1.278.27-1.93v-2.18c0-.58-.473-1.053-1.055-1.053zM6%2012.5a.5.5%200%2001-1%200v-2a.5.5%200%20011%200v2zm2%200a.5.5%200%2001-1%200v-2a.5.5%200%20011%200v2zm2%200a.5.5%200%2001-1%200v-2a.5.5%200%20011%200v2z'%3e%3c/path%3e%3c/svg%3e",Z6="data:image/svg+xml,%3csvg%20data-icon='DisplayBlock'%20aria-hidden='true'%20focusable='false'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20style='display:%20block'%20%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M2%204h12v8H2V4zm10%202H4v4h8V6z'%3e%3c/path%3e%3cpath%20opacity='.6'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M2%201h12v1H2V1zm0%2013h12v1H2v-1z'%3e%3c/path%3e%3c/svg%3e",e4="data:image/svg+xml,%3csvg%20data-icon='DisplayFlex'%20aria-hidden='true'%20focusable='false'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20style='display:%20block'%20%3e%3cpath%20opacity='.6'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M2%202h12v12H2V2zM1%201h14v14H1V1z'%3e%3c/path%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M7%204H4v8h3V4zm2%200h3v8H9V4z'%3e%3c/path%3e%3c/svg%3e",t4="data:image/svg+xml,%3csvg%20data-icon='DisplayInlineBlock'%20aria-hidden='true'%20focusable='false'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20style='display:%20block'%20%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M4%204h8v8H4V4zm6%202H6v4h4V6z'%3e%3c/path%3e%3cpath%20opacity='.6'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M1%202h1v12H1V2zm14%200h-1v12h1V2z'%3e%3c/path%3e%3c/svg%3e",n4="data:image/svg+xml,%3csvg%20data-icon='DisplayInline'%20aria-hidden='true'%20focusable='false'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20style='display:%20block'%20%3e%3cpath%20opacity='.6'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M1%202h1v12H1V2zm14%200h-1v12h1V2z'%3e%3c/path%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M7.25%203L3.5%2013h2l1-3h3l1%203h2L8.75%203h-1.5zm1.917%206L8%205.5%206.833%209h2.334z'%20%3e%3c/path%3e%3c/svg%3e",r4="data:image/svg+xml,%3csvg%20data-icon='EyeInvisible'%20aria-hidden='true'%20focusable='false'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20style='display:%20block'%20%3e%3cpath%20opacity='.6'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M9.842%203.33A5.537%205.537%200%20008%203C4.134%203%201%207.5%201%208c0%20.23.666%201.311%201.763%202.409l2.242-2.242a3%203%200%20013.162-3.162l1.675-1.676zm-2.009%207.665a3%203%200%20003.162-3.162l2.242-2.242C14.334%206.69%2015%207.77%2015%208c0%20.5-3.134%205-7%205a5.538%205.538%200%2001-1.842-.33l1.675-1.675z'%20%3e%3c/path%3e%3cpath%20d='M2%2014L14%202'%20stroke='currentColor'%20stroke-width='1.5'%3e%3c/path%3e%3c/svg%3e",i4="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='icon-a-Alignbaselinerow'%20viewBox='0%200%201024%201024'%3e%3cpath%20d='M864%200v480h160v64h-160v224H544v-224h-64v480H160V544H0v-64h160V256h320v224h64V0h320zM416%20320H224v160h192v-160z%20m384-256h-192v416h192V64z'%3e%3c/path%3e%3c/svg%3e",a4="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='icon-a-Aligncenterrow'%20viewBox='0%200%201024%201024'%3e%3cpath%20d='M480%2064v416h64V64h320v416h160v64h-160v416H544V544h-64v416H160V544H0v-64h160V64h320z'%3e%3c/path%3e%3c/svg%3e",o4="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='icon-a-Alignflex-endrow'%20viewBox='0%200%201024%201024'%3e%3cpath%20d='M480%20800V96H160v704h320z%20m384%200V96H544v704h320z%20m160%20128v-64H0v64h1024z'%3e%3c/path%3e%3c/svg%3e",s4="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='icon-a-Alignflex-startrow'%20viewBox='0%200%201024%201024'%3e%3cpath%20d='M480%20224v704H160V224h320z%20m384%200v704H544V224h320z%20m160-128v64H0V96h1024z'%3e%3c/path%3e%3c/svg%3e",l4="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='icon-a-Alignstretchrow'%20viewBox='0%200%201024%201024'%3e%3cpath%20d='M1024%20960v64H0v-64h1024zM480%20128v768H160V128h320z%20m384%200v768H544V128h320z%20m160-128v64H0V0h1024z'%3e%3c/path%3e%3c/svg%3e",c4="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='icon-a-Directioncolumn-reverse'%20viewBox='0%200%201024%201024'%3e%3cpath%20d='M896%20704H128v320h768V704z%20m0-320H128v256h768v-256z%20m-128-192l-256-192-256%20192%20192%200.032V320h128V192h192z'%3e%3c/path%3e%3c/svg%3e",u4="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='icon-a-Directioncolumn'%20viewBox='0%200%201024%201024'%3e%3cpath%20d='M896%20320H128V0h768v320z%20m0%20320H128v-256h768v256z%20m-128%20192l-256%20192-256-192%20192-0.032V704h128v128h192z'%3e%3c/path%3e%3c/svg%3e",d4="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='icon-a-Directionrow-reverse'%20viewBox='0%200%201024%201024'%3e%3cpath%20d='M704%20128v768h320V128H704zM384%20128v768h256V128h-256zM192%20256l-192%20256%20192%20256%200.032-192H320v-128H192V256z'%3e%3c/path%3e%3c/svg%3e",p4="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='icon-a-Directionrow'%20viewBox='0%200%201024%201024'%3e%3cpath%20d='M320%20128v768H0V128h320z%20m320%200v768h-256V128h256z%20m192%20128l192%20256-192%20256-0.032-192H704v-128h128V256z'%3e%3c/path%3e%3c/svg%3e",h4="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='icon-a-Justifycenterrow'%20viewBox='0%200%201024%201024'%3e%3cpath%20d='M480%201024V0h64v1024h-64z%20m128-64V64h320v896H608zM96%20960V64h320v896H96z'%3e%3c/path%3e%3c/svg%3e",m4="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='icon-a-Justifyflex-endrow'%20viewBox='0%200%201024%201024'%3e%3cpath%20d='M416%20160H96v704h320V160z%20m384%200H480v704h320V160z%20m128-160h-64v1024h64V0z'%3e%3c/path%3e%3c/svg%3e",f4="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='icon-a-Justifyflex-startrow'%20viewBox='0%200%201024%201024'%3e%3cpath%20d='M608%20160h320v704H608V160zM224%20160h320v704H224V160zM96%200h64v1024H96V0z'%3e%3c/path%3e%3c/svg%3e",v4="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='icon-a-Justifyspace-aroundrow'%20viewBox='0%200%201024%201024'%3e%3cpath%20d='M320%20864H192v160H128v-160H0V160h128V0h64v160h128v704z%20m704%200h-128v160h-64v-160h-128V160h128V0h64v160h128v704z'%3e%3c/path%3e%3c/svg%3e",g4="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='icon-a-Justifyspace-betweenrow'%20viewBox='0%200%201024%201024'%3e%3cpath%20d='M64%201024H0V0h64v1024z%20m384-160H128V160h320v704z%20m448%200H576V160h320v704z%20m128%20160h-64V0h64v1024z'%3e%3c/path%3e%3c/svg%3e",y4="data:image/svg+xml,%3csvg%20data-icon='FontStyleItalic'%20aria-hidden='true'%20focusable='false'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20style='display:%20block'%20%3e%3cpath%20fill='currentColor'%20stroke='currentColor'%20d='M7.5%203.5h5v1h-5zm-4%208h5v1h-5z'%3e%3c/path%3e%3cpath%20d='M5.5%2012l5-8'%20stroke='currentColor'%20stroke-width='2'%3e%3c/path%3e%3c/svg%3e",b4="data:image/svg+xml,%3csvg%20data-icon='FontStyleNone'%20aria-hidden='true'%20focusable='false'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20style='display:%20block'%20%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M9%203h2v2H9v6h2v2H5v-2h2V5H5V3h4z'%20fill='currentColor'%20%3e%3c/path%3e%3c/svg%3e",w4="data:image/svg+xml,%3csvg%20data-icon='PositionAll'%20aria-hidden='true'%20focusable='false'%20viewBox='0%200%2015%2015'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='currentColor'%3e%3cpath%20d='M3%203h9v9H3z'%3e%3c/path%3e%3cpath%20opacity='.3'%20d='M2%2013V2h11v11H2M14%201H1v13h13V1'%3e%3c/path%3e%3c/g%3e%3c/svg%3e",x4="data:image/svg+xml,%3csvg%20data-icon='PositionBottomLeft'%20aria-hidden='true'%20focusable='false'%20viewBox='0%200%2015%2015'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill='currentColor'%20d='M3%208h4v4H3z'%3e%3c/path%3e%3cpath%20opacity='.3'%20fill='currentColor'%20d='M2%2013V2h11v11H2M14%201H1v13h13V1'%3e%3c/path%3e%3c/svg%3e",_4="data:image/svg+xml,%3csvg%20data-icon='PositionBottomRight'%20aria-hidden='true'%20focusable='false'%20viewBox='0%200%2015%2015'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill='currentColor'%20d='M8%208h4v4H8z'%3e%3c/path%3e%3cpath%20opacity='.3'%20fill='currentColor'%20d='M2%2013V2h11v11H2M14%201H1v13h13V1'%3e%3c/path%3e%3c/svg%3e",S4="data:image/svg+xml,%3csvg%20data-icon='PositionBottom'%20aria-hidden='true'%20focusable='false'%20viewBox='0%200%2015%2015'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill='currentColor'%20d='M3%208h9v4H3z'%3e%3c/path%3e%3cpath%20opacity='.3'%20fill='currentColor'%20d='M2%2013V2h11v11H2M14%201H1v13h13V1'%3e%3c/path%3e%3c/svg%3e",k4="data:image/svg+xml,%3csvg%20data-icon='PositionLeft'%20aria-hidden='true'%20focusable='false'%20viewBox='0%200%2015%2015'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill='currentColor'%20d='M3%203h4v9H3z'%3e%3c/path%3e%3cpath%20opacity='.3'%20fill='currentColor'%20d='M2%2013V2h11v11H2M14%201H1v13h13V1'%3e%3c/path%3e%3c/svg%3e",j4="data:image/svg+xml,%3csvg%20data-icon='PositionRight'%20aria-hidden='true'%20focusable='false'%20viewBox='0%200%2015%2015'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill='currentColor'%20d='M8%203h4v9H8z'%3e%3c/path%3e%3cpath%20opacity='.3'%20fill='currentColor'%20d='M2%2013V2h11v11H2M14%201H1v13h13V1'%3e%3c/path%3e%3c/svg%3e",V4="data:image/svg+xml,%3csvg%20data-icon='PositionTopleft'%20aria-hidden='true'%20focusable='false'%20viewBox='0%200%2015%2015'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill='currentColor'%20d='M3%203h4v4H3z'%3e%3c/path%3e%3cpath%20opacity='.3'%20fill='currentColor'%20d='M2%2013V2h11v11H2M14%201H1v13h13V1'%3e%3c/path%3e%3c/svg%3e",C4="data:image/svg+xml,%3csvg%20data-icon='PositionTopright'%20aria-hidden='true'%20focusable='false'%20viewBox='0%200%2015%2015'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill='currentColor'%20d='M8%203h4v4H8z'%3e%3c/path%3e%3cpath%20opacity='.3'%20fill='currentColor'%20d='M2%2013V2h11v11H2M14%201H1v13h13V1'%3e%3c/path%3e%3c/svg%3e",$4="data:image/svg+xml,%3csvg%20data-icon='PositionTop'%20aria-hidden='true'%20focusable='false'%20viewBox='0%200%2015%2015'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill='currentColor'%20d='M3%203h9v4H3z'%3e%3c/path%3e%3cpath%20opacity='.3'%20fill='currentColor'%20d='M2%2013V2h11v11H2M14%201H1v13h13V1'%3e%3c/path%3e%3c/svg%3e",E4="data:image/svg+xml,%3csvg%20data-icon='TextAlignCenter'%20aria-hidden='true'%20focusable='false'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20style='display:%20block'%20%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M14%202H2v2h12V2zm-2%203H4v2h8V5zm-8%206h8v2H4v-2zm10-3H2v2h12V8z'%20fill='currentColor'%20%3e%3c/path%3e%3c/svg%3e",A4="data:image/svg+xml,%3csvg%20data-icon='TextAlignJustify'%20aria-hidden='true'%20focusable='false'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20style='display:%20block'%20%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M14%202H2v2h12V2zm0%203H2v2h12V5zM2%2011h12v2H2v-2zm12-3H2v2h12V8z'%20fill='currentColor'%20%3e%3c/path%3e%3c/svg%3e",T4="data:image/svg+xml,%3csvg%20data-icon='TextAlignLeft'%20aria-hidden='true'%20focusable='false'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20style='display:%20block'%20%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M14%202H2v2h12V2zm-4%203H2v2h8V5zm-8%206h8v2H2v-2zm12-3H2v2h12V8z'%20fill='currentColor'%20%3e%3c/path%3e%3c/svg%3e",B4="data:image/svg+xml,%3csvg%20data-icon='TextAlignRight'%20aria-hidden='true'%20focusable='false'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20style='display:%20block'%20%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M14%202H2v2h12V2zm0%203H6v2h8V5zm-8%206h8v2H6v-2zm8-3H2v2h12V8z'%20fill='currentColor'%20%3e%3c/path%3e%3c/svg%3e",z4="data:image/svg+xml,%3csvg%20data-icon='TextDecorationOverline'%20aria-hidden='true'%20focusable='false'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20style='display:%20block'%20%3e%3cpath%20fill='currentColor'%20d='M1%201h14v1H1z'%3e%3c/path%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M12%203H4v2h3v8h2V5h3V3z'%20fill='currentColor'%3e%3c/path%3e%3c/svg%3e",D4="data:image/svg+xml,%3csvg%20data-icon='TextDecorationStrike'%20aria-hidden='true'%20focusable='false'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20style='display:%20block'%20%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M4%203h8v2H9v2H7V5H4V3zm3%206v4h2V9H7z'%20fill='currentColor'%20%3e%3c/path%3e%3cpath%20fill='currentColor'%20d='M1%208h14v1H1z'%3e%3c/path%3e%3c/svg%3e",O4="data:image/svg+xml,%3csvg%20data-icon='TextDecorationUnderline'%20aria-hidden='true'%20focusable='false'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20style='display:%20block'%20%3e%3cpath%20fill='currentColor'%20d='M1%2014h14v1H1z'%3e%3c/path%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M12%203H4v2h3v8h2V5h3V3z'%20fill='currentColor'%3e%3c/path%3e%3c/svg%3e",I4="data:image/svg+xml,%3csvg%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20data-icon='TileX'%20aria-hidden='true'%20focusable='false'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%3e%3cpath%20fill='currentColor'%20d='M1%206h4v4H1zm5%200h4v4H6zm5%200h4v4h-4z'%3e%3c/path%3e%3c/svg%3e",R4="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20data-icon='TileXY'%20aria-hidden='true'%20focusable='false'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%3e%3cpath%20fill='currentColor'%20d='M1%201h4v4H1zm5%200h4v4H6zm5%200h4v4h-4zM1%206h4v4H1zm5%200h4v4H6zm5%200h4v4h-4zM1%2011h4v4H1zm5%200h4v4H6zm5%200h4v4h-4z'%3e%3c/path%3e%3c/svg%3e",M4="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20data-icon='TileY'%20aria-hidden='true'%20focusable='false'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%3e%3cpath%20fill='currentColor'%20d='M6%201h4v4H6zm0%205h4v4H6zm0%205h4v4H6z'%3e%3c/path%3e%3c/svg%3e",fa={...H2,...Ag,...P6};(function(){if(typeof window>"u"||typeof EventTarget>"u")return;const n=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(e,t,r){typeof r!="boolean"&&(r=r||{},r.passive=!1),n.call(this,e,t,r)}})();const P4=n=>typeof n=="symbol";new Set(Object.getOwnPropertyNames(Symbol).filter(n=>n!=="arguments"&&n!=="caller").map(n=>Symbol[n]).filter(P4));function Yu(n,e){return function(){return n.apply(e,arguments)}}const{toString:N4}=Object.prototype,{getPrototypeOf:wo}=Object,si=(n=>e=>{const t=N4.call(e);return n[t]||(n[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),yt=n=>(n=n.toLowerCase(),e=>si(e)===n),li=n=>e=>typeof e===n,{isArray:Dn}=Array,ir=li("undefined");function F4(n){return n!==null&&!ir(n)&&n.constructor!==null&&!ir(n.constructor)&&nt(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const Ku=yt("ArrayBuffer");function H4(n){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(n):e=n&&n.buffer&&Ku(n.buffer),e}const L4=li("string"),nt=li("function"),Xu=li("number"),ci=n=>n!==null&&typeof n=="object",U4=n=>n===!0||n===!1,Rr=n=>{if(si(n)!=="object")return!1;const e=wo(n);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in n)&&!(Symbol.iterator in n)},W4=yt("Date"),J4=yt("File"),q4=yt("Blob"),G4=yt("FileList"),Y4=n=>ci(n)&&nt(n.pipe),K4=n=>{let e;return n&&(typeof FormData=="function"&&n instanceof FormData||nt(n.append)&&((e=si(n))==="formdata"||e==="object"&&nt(n.toString)&&n.toString()==="[object FormData]"))},X4=yt("URLSearchParams"),Q4=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function cr(n,e,{allOwnKeys:t=!1}={}){if(n===null||typeof n>"u")return;let r,i;if(typeof n!="object"&&(n=[n]),Dn(n))for(r=0,i=n.length;r<i;r++)e.call(null,n[r],r,n);else{const a=t?Object.getOwnPropertyNames(n):Object.keys(n),o=a.length;let s;for(r=0;r<o;r++)s=a[r],e.call(null,n[s],s,n)}}function Qu(n,e){e=e.toLowerCase();const t=Object.keys(n);let r=t.length,i;for(;r-- >0;)if(i=t[r],e===i.toLowerCase())return i;return null}const Zu=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,e0=n=>!ir(n)&&n!==Zu;function va(){const{caseless:n}=e0(this)&&this||{},e={},t=(r,i)=>{const a=n&&Qu(e,i)||i;Rr(e[a])&&Rr(r)?e[a]=va(e[a],r):Rr(r)?e[a]=va({},r):Dn(r)?e[a]=r.slice():e[a]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&cr(arguments[r],t);return e}const Z4=(n,e,t,{allOwnKeys:r}={})=>(cr(e,(i,a)=>{t&&nt(i)?n[a]=Yu(i,t):n[a]=i},{allOwnKeys:r}),n),e8=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),t8=(n,e,t,r)=>{n.prototype=Object.create(e.prototype,r),n.prototype.constructor=n,Object.defineProperty(n,"super",{value:e.prototype}),t&&Object.assign(n.prototype,t)},n8=(n,e,t,r)=>{let i,a,o;const s={};if(e=e||{},n==null)return e;do{for(i=Object.getOwnPropertyNames(n),a=i.length;a-- >0;)o=i[a],(!r||r(o,n,e))&&!s[o]&&(e[o]=n[o],s[o]=!0);n=t!==!1&&wo(n)}while(n&&(!t||t(n,e))&&n!==Object.prototype);return e},r8=(n,e,t)=>{n=String(n),(t===void 0||t>n.length)&&(t=n.length),t-=e.length;const r=n.indexOf(e,t);return r!==-1&&r===t},i8=n=>{if(!n)return null;if(Dn(n))return n;let e=n.length;if(!Xu(e))return null;const t=new Array(e);for(;e-- >0;)t[e]=n[e];return t},a8=(n=>e=>n&&e instanceof n)(typeof Uint8Array<"u"&&wo(Uint8Array)),o8=(n,e)=>{const t=(n&&n[Symbol.iterator]).call(n);let r;for(;(r=t.next())&&!r.done;){const i=r.value;e.call(n,i[0],i[1])}},s8=(n,e)=>{let t;const r=[];for(;(t=n.exec(e))!==null;)r.push(t);return r},l8=yt("HTMLFormElement"),c8=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,r){return t.toUpperCase()+r}),Ys=(({hasOwnProperty:n})=>(e,t)=>n.call(e,t))(Object.prototype),u8=yt("RegExp"),t0=(n,e)=>{const t=Object.getOwnPropertyDescriptors(n),r={};cr(t,(i,a)=>{let o;(o=e(i,a,n))!==!1&&(r[a]=o||i)}),Object.defineProperties(n,r)},d8=n=>{t0(n,(e,t)=>{if(nt(n)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;const r=n[t];if(nt(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},p8=(n,e)=>{const t={},r=i=>{i.forEach(a=>{t[a]=!0})};return Dn(n)?r(n):r(String(n).split(e)),t},h8=()=>{},m8=(n,e)=>(n=+n,Number.isFinite(n)?n:e),Ti="abcdefghijklmnopqrstuvwxyz",Ks="0123456789",n0={DIGIT:Ks,ALPHA:Ti,ALPHA_DIGIT:Ti+Ti.toUpperCase()+Ks},f8=(n=16,e=n0.ALPHA_DIGIT)=>{let t="";const{length:r}=e;for(;n--;)t+=e[Math.random()*r|0];return t};function v8(n){return!!(n&&nt(n.append)&&n[Symbol.toStringTag]==="FormData"&&n[Symbol.iterator])}const g8=n=>{const e=new Array(10),t=(r,i)=>{if(ci(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[i]=r;const a=Dn(r)?[]:{};return cr(r,(o,s)=>{const l=t(o,i+1);!ir(l)&&(a[s]=l)}),e[i]=void 0,a}}return r};return t(n,0)},y8=yt("AsyncFunction"),b8=n=>n&&(ci(n)||nt(n))&&nt(n.then)&&nt(n.catch),H={isArray:Dn,isArrayBuffer:Ku,isBuffer:F4,isFormData:K4,isArrayBufferView:H4,isString:L4,isNumber:Xu,isBoolean:U4,isObject:ci,isPlainObject:Rr,isUndefined:ir,isDate:W4,isFile:J4,isBlob:q4,isRegExp:u8,isFunction:nt,isStream:Y4,isURLSearchParams:X4,isTypedArray:a8,isFileList:G4,forEach:cr,merge:va,extend:Z4,trim:Q4,stripBOM:e8,inherits:t8,toFlatObject:n8,kindOf:si,kindOfTest:yt,endsWith:r8,toArray:i8,forEachEntry:o8,matchAll:s8,isHTMLForm:l8,hasOwnProperty:Ys,hasOwnProp:Ys,reduceDescriptors:t0,freezeMethods:d8,toObjectSet:p8,toCamelCase:c8,noop:h8,toFiniteNumber:m8,findKey:Qu,global:Zu,isContextDefined:e0,ALPHABET:n0,generateString:f8,isSpecCompliantForm:v8,toJSONObject:g8,isAsyncFn:y8,isThenable:b8};function ve(n,e,t,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=n,this.name="AxiosError",e&&(this.code=e),t&&(this.config=t),r&&(this.request=r),i&&(this.response=i)}H.inherits(ve,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:H.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const r0=ve.prototype,i0={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(n=>{i0[n]={value:n}});Object.defineProperties(ve,i0);Object.defineProperty(r0,"isAxiosError",{value:!0});ve.from=(n,e,t,r,i,a)=>{const o=Object.create(r0);return H.toFlatObject(n,o,function(s){return s!==Error.prototype},s=>s!=="isAxiosError"),ve.call(o,n.message,e,t,r,i),o.cause=n,o.name=n.name,a&&Object.assign(o,a),o};const w8=null;function ga(n){return H.isPlainObject(n)||H.isArray(n)}function a0(n){return H.endsWith(n,"[]")?n.slice(0,-2):n}function Xs(n,e,t){return n?n.concat(e).map(function(r,i){return r=a0(r),!t&&i?"["+r+"]":r}).join(t?".":""):e}function x8(n){return H.isArray(n)&&!n.some(ga)}const _8=H.toFlatObject(H,{},null,function(n){return/^is[A-Z]/.test(n)});function ui(n,e,t){if(!H.isObject(n))throw new TypeError("target must be an object");e=e||new FormData,t=H.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(h,f){return!H.isUndefined(f[h])});const r=t.metaTokens,i=t.visitor||c,a=t.dots,o=t.indexes,s=(t.Blob||typeof Blob<"u"&&Blob)&&H.isSpecCompliantForm(e);if(!H.isFunction(i))throw new TypeError("visitor must be a function");function l(h){if(h===null)return"";if(H.isDate(h))return h.toISOString();if(!s&&H.isBlob(h))throw new ve("Blob is not supported. Use a Buffer instead.");return H.isArrayBuffer(h)||H.isTypedArray(h)?s&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function c(h,f,v){let g=h;if(h&&!v&&typeof h=="object"){if(H.endsWith(f,"{}"))f=r?f:f.slice(0,-2),h=JSON.stringify(h);else if(H.isArray(h)&&x8(h)||(H.isFileList(h)||H.endsWith(f,"[]"))&&(g=H.toArray(h)))return f=a0(f),g.forEach(function(k,b){!(H.isUndefined(k)||k===null)&&e.append(o===!0?Xs([f],b,a):o===null?f:f+"[]",l(k))}),!1}return ga(h)?!0:(e.append(Xs(v,f,a),l(h)),!1)}const u=[],p=Object.assign(_8,{defaultVisitor:c,convertValue:l,isVisitable:ga});function m(h,f){if(!H.isUndefined(h)){if(u.indexOf(h)!==-1)throw Error("Circular reference detected in "+f.join("."));u.push(h),H.forEach(h,function(v,g){(!(H.isUndefined(v)||v===null)&&i.call(e,v,H.isString(g)?g.trim():g,f,p))===!0&&m(v,f?f.concat(g):[g])}),u.pop()}}if(!H.isObject(n))throw new TypeError("data must be an object");return m(n),e}function Qs(n){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g,function(t){return e[t]})}function xo(n,e){this._pairs=[],n&&ui(n,this,e)}const o0=xo.prototype;o0.append=function(n,e){this._pairs.push([n,e])};o0.toString=function(n){const e=n?function(t){return n.call(this,t,Qs)}:Qs;return this._pairs.map(function(t){return e(t[0])+"="+e(t[1])},"").join("&")};function S8(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function s0(n,e,t){if(!e)return n;const r=t&&t.encode||S8,i=t&&t.serialize;let a;if(i?a=i(e,t):a=H.isURLSearchParams(e)?e.toString():new xo(e,t).toString(r),a){const o=n.indexOf("#");o!==-1&&(n=n.slice(0,o)),n+=(n.indexOf("?")===-1?"?":"&")+a}return n}let Zs=class{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){H.forEach(this.handlers,function(t){t!==null&&e(t)})}};const l0={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},k8=typeof URLSearchParams<"u"?URLSearchParams:xo,j8=typeof FormData<"u"?FormData:null,V8=typeof Blob<"u"?Blob:null,C8={isBrowser:!0,classes:{URLSearchParams:k8,FormData:j8,Blob:V8},protocols:["http","https","file","blob","url","data"]},c0=typeof window<"u"&&typeof document<"u",$8=(n=>c0&&["ReactNative","NativeScript","NS"].indexOf(n)<0)(typeof navigator<"u"&&navigator.product),E8=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",A8=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:c0,hasStandardBrowserEnv:$8,hasStandardBrowserWebWorkerEnv:E8},Symbol.toStringTag,{value:"Module"})),ht={...A8,...C8};function T8(n,e){return ui(n,new ht.classes.URLSearchParams,Object.assign({visitor:function(t,r,i,a){return ht.isNode&&H.isBuffer(t)?(this.append(r,t.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},e))}function B8(n){return H.matchAll(/\w+|\[(\w*)]/g,n).map(e=>e[0]==="[]"?"":e[1]||e[0])}function z8(n){const e={},t=Object.keys(n);let r;const i=t.length;let a;for(r=0;r<i;r++)a=t[r],e[a]=n[a];return e}function u0(n){function e(t,r,i,a){let o=t[a++];if(o==="__proto__")return!0;const s=Number.isFinite(+o),l=a>=t.length;return o=!o&&H.isArray(i)?i.length:o,l?(H.hasOwnProp(i,o)?i[o]=[i[o],r]:i[o]=r,!s):((!i[o]||!H.isObject(i[o]))&&(i[o]=[]),e(t,r,i[o],a)&&H.isArray(i[o])&&(i[o]=z8(i[o])),!s)}if(H.isFormData(n)&&H.isFunction(n.entries)){const t={};return H.forEachEntry(n,(r,i)=>{e(B8(r),i,t,0)}),t}return null}function D8(n,e,t){if(H.isString(n))try{return(e||JSON.parse)(n),H.trim(n)}catch(r){if(r.name!=="SyntaxError")throw r}return(t||JSON.stringify)(n)}const _o={transitional:l0,adapter:["xhr","http"],transformRequest:[function(n,e){const t=e.getContentType()||"",r=t.indexOf("application/json")>-1,i=H.isObject(n);if(i&&H.isHTMLForm(n)&&(n=new FormData(n)),H.isFormData(n))return r?JSON.stringify(u0(n)):n;if(H.isArrayBuffer(n)||H.isBuffer(n)||H.isStream(n)||H.isFile(n)||H.isBlob(n))return n;if(H.isArrayBufferView(n))return n.buffer;if(H.isURLSearchParams(n))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),n.toString();let a;if(i){if(t.indexOf("application/x-www-form-urlencoded")>-1)return T8(n,this.formSerializer).toString();if((a=H.isFileList(n))||t.indexOf("multipart/form-data")>-1){const o=this.env&&this.env.FormData;return ui(a?{"files[]":n}:n,o&&new o,this.formSerializer)}}return i||r?(e.setContentType("application/json",!1),D8(n)):n}],transformResponse:[function(n){const e=this.transitional||_o.transitional,t=e&&e.forcedJSONParsing,r=this.responseType==="json";if(n&&H.isString(n)&&(t&&!this.responseType||r)){const i=!(e&&e.silentJSONParsing)&&r;try{return JSON.parse(n)}catch(a){if(i)throw a.name==="SyntaxError"?ve.from(a,ve.ERR_BAD_RESPONSE,this,null,this.response):a}}return n}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ht.classes.FormData,Blob:ht.classes.Blob},validateStatus:function(n){return n>=200&&n<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};H.forEach(["delete","get","head","post","put","patch"],n=>{_o.headers[n]={}});const So=_o,O8=H.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),I8=n=>{const e={};let t,r,i;return n&&n.split(`
63
63
  `).forEach(function(a){i=a.indexOf(":"),t=a.substring(0,i).trim().toLowerCase(),r=a.substring(i+1).trim(),!(!t||e[t]&&O8[t])&&(t==="set-cookie"?e[t]?e[t].push(r):e[t]=[r]:e[t]=e[t]?e[t]+", "+r:r)}),e},el=Symbol("internals");function Nn(n){return n&&String(n).trim().toLowerCase()}function Mr(n){return n===!1||n==null?n:H.isArray(n)?n.map(Mr):String(n)}function R8(n){const e=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=t.exec(n);)e[r[1]]=r[2];return e}const M8=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function Bi(n,e,t,r,i){if(H.isFunction(r))return r.call(this,e,t);if(i&&(e=t),!!H.isString(e)){if(H.isString(r))return e.indexOf(r)!==-1;if(H.isRegExp(r))return r.test(e)}}function P8(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,r)=>t.toUpperCase()+r)}function N8(n,e){const t=H.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(n,r+t,{value:function(i,a,o){return this[r].call(this,e,i,a,o)},configurable:!0})})}class di{constructor(e){e&&this.set(e)}set(e,t,r){const i=this;function a(s,l,c){const u=Nn(l);if(!u)throw new Error("header name must be a non-empty string");const p=H.findKey(i,u);(!p||i[p]===void 0||c===!0||c===void 0&&i[p]!==!1)&&(i[p||l]=Mr(s))}const o=(s,l)=>H.forEach(s,(c,u)=>a(c,u,l));return H.isPlainObject(e)||e instanceof this.constructor?o(e,t):H.isString(e)&&(e=e.trim())&&!M8(e)?o(I8(e),t):e!=null&&a(t,e,r),this}get(e,t){if(e=Nn(e),e){const r=H.findKey(this,e);if(r){const i=this[r];if(!t)return i;if(t===!0)return R8(i);if(H.isFunction(t))return t.call(this,i,r);if(H.isRegExp(t))return t.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Nn(e),e){const r=H.findKey(this,e);return!!(r&&this[r]!==void 0&&(!t||Bi(this,this[r],r,t)))}return!1}delete(e,t){const r=this;let i=!1;function a(o){if(o=Nn(o),o){const s=H.findKey(r,o);s&&(!t||Bi(r,r[s],s,t))&&(delete r[s],i=!0)}}return H.isArray(e)?e.forEach(a):a(e),i}clear(e){const t=Object.keys(this);let r=t.length,i=!1;for(;r--;){const a=t[r];(!e||Bi(this,this[a],a,e,!0))&&(delete this[a],i=!0)}return i}normalize(e){const t=this,r={};return H.forEach(this,(i,a)=>{const o=H.findKey(r,a);if(o){t[o]=Mr(i),delete t[a];return}const s=e?P8(a):String(a).trim();s!==a&&delete t[a],t[s]=Mr(i),r[s]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return H.forEach(this,(r,i)=>{r!=null&&r!==!1&&(t[i]=e&&H.isArray(r)?r.join(", "):r)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join(`
@@ -68,7 +68,7 @@ version: 2.9.0
68
68
  * Copyright (c) 2024, VTJ.PRO All rights reserved.
69
69
  * @name @vtj/ui
70
70
  * @author CHC chenhuachun1549@dingtalk.com
71
- * @version 0.8.5
71
+ * @version 0.8.7
72
72
  * @license <a href="https://vtj.pro/license.html">MIT License</a>
73
73
  */const $5={default:14,small:12,large:18},E5={icon:{type:[String,Object]},color:{type:String},size:{type:[Number,String],default:"inherit"},src:{type:String},background:{type:String},padding:{type:Number},radius:{type:Number}};function ar(n){return typeof n=="string"?n:`${n}px`}function jr(n=0,e){if(typeof n=="number")return n;if(/(%|vh|vw)$/i.test(n)){const t=Number.parseInt(n);return Math.floor(e*t/100)}return Number.parseInt(n)}const A5=Symbol("ADAPTER_KEY");function T5(){return Mt(A5,{})}const B5=["src"],it=I({name:"XIcon",__name:"Icon",props:E5,setup(n){const e=n,t=Oa(),r=sr(),i=z(()=>{if(!e.icon)return null;const l=r?.appContext.app;return typeof e.icon=="object"?Pt(e.icon):l?.component(e.icon)||e.icon}),a=z(()=>{const l={"is-pointer":!!t.onClick};return!i.value&&e.icon&&(l[e.icon]=!0),l}),o=z(()=>({"background-color":e.background,"border-radius":e.radius?ar(e.radius):void 0,padding:e.padding?ar(e.padding):void 0})),s=z(()=>typeof e.size=="number"?e.size:$5[e.size]??void 0);return(l,c)=>(y(),V(d(Hn),{class:ce(["x-icon",a.value]),color:e.color,size:s.value,style:Rt(o.value)},{default:j(()=>[de(l.$slots,"default",{},()=>[i.value?(y(),V(Ge(i.value),{key:0})):R("",!0),e.src?(y(),M("img",{key:1,src:e.src},null,8,B5)):R("",!0)])]),_:3},8,["class","color","size","style"]))}}),S0={name:{type:String},label:{type:String},value:{type:[String,Number,Object,Array,Boolean]},icon:{type:[String,Object]},mode:{type:String,default:"button"},menus:{type:Array},tooltip:{type:[String,Object]},badge:{type:[String,Number,Object]},dropdown:{type:Object},button:{type:Object},disabled:{type:[Boolean,Function]},size:{type:String,default:"default"},type:{type:String,default:"primary"},background:{type:String,default:"always"},circle:{type:Boolean},draggable:{type:Boolean}};function z5(n){return z(()=>{const e=n.tooltip;if(e)return typeof e=="string"?{content:e}:e})}function D5(n){return z(()=>{const e=n.badge;if(e)return typeof e=="object"?e:{value:e}})}function O5(n){return z(()=>{const{dropdown:e,menus:t}=n;if(t&&t.length>0)return Object.assign({popperClass:"x-action__menus",size:n.size},e||{})})}function I5(n){const e=sr();return z(()=>{const t=d(n);if(t)if(typeof t=="string"||t.setup||t.render||f2(t)){const r=e?.appContext.app;return{icon:typeof t=="string"&&r?.component(t)||t}}else return t;return null})}function jo(n){const e=I5(n);return e.value?Pt(I({render:()=>Re(it,e.value)})):void 0}function Vo(n,e){return z(()=>{const t=d(n);return typeof t=="function"?t(e):!!t})}const R5={key:0},M5=I({__name:"Trigger",props:S0,emits:["click"],setup(n,{emit:e}){const t=n,r=e,i=jo(Fr(t,"icon")),a=Vo(Fr(t,"disabled")),o=z(()=>({[`is-${t.mode}`]:!!t.mode,[`is-${t.type}`]:!!t.type,[`is-${t.size}`]:!!t.size&&t.size!=="default",[`is-background-${t.background}`]:t.mode==="icon"&&!!t.background,"is-disabled":!!t.disabled,"is-circle":!!t.circle})),s=l=>{if(l.preventDefault(),!a.value)return r("click"),!1};return(l,c)=>t.mode==="button"?(y(),V(d(xe),pe({key:0,icon:d(i),type:t.type,size:t.size,disabled:d(a)},t.button,{onClick:s}),{default:j(()=>[le(te(l.label),1)]),_:1},16,["icon","type","size","disabled"])):(y(),M("div",{key:1,class:ce(["x-action__inner",o.value]),onClick:s},[(y(),V(Ge(d(i)))),l.label?(y(),M("span",R5,te(l.label),1)):R("",!0)],2))}}),P5=["draggable"],Be=I({name:"XAction",__name:"Action",props:S0,emits:["click","command","dragstart","dragend"],setup(n,{emit:e}){const t=n,r=h2(),i=e,a=z5(t),o=D5(t),s=O5(t),l=Vo(Fr(t,"disabled")),c=z(()=>!!t.draggable&&!l.value),u=z(()=>({[`x-action--${t.mode}`]:!!t.mode})),p=()=>{l.value||i("click",Dt(t))},m=w=>{if(l.value)return;const S=t.menus?.find(C=>C.command===w);S&&i("command",Dt(S))},h=w=>{c&&i("dragstart",Dt(t),w)},f=w=>{c&&i("dragend",Dt(t),w)},v=w=>Re(_2,o.value,()=>[].concat(w)),g=w=>Re(Na,{...s.value,disabled:l.value,onCommand:m},{default:()=>[w],dropdown:()=>[Re(Pa,()=>(t.menus||[]).map((S,C)=>Re(Hr,S,()=>r.item?r.item({item:S,index:C}):S.label)))]}),k=w=>Re(Xr,{...a.value,disabled:l.value},()=>[w]),b=z(()=>{let w=Re(Pt(M5),{...t,onClick:p});const S=r.default?.();return S&&S.length&&(w=S[0]),o.value&&(w=v(w)),s.value&&(w=g(w)),a.value&&(w=k(w)),w});return(w,S)=>(y(),M("div",{class:ce(["x-action",u.value]),draggable:c.value,onDragstart:h,onDragend:f},[(y(),V(Ge(b.value)))],42,P5))}}),N5={items:{type:Array},mode:{type:String,default:"button"},size:{type:String,default:"default"},type:{type:String,default:"primary"},background:{type:String,default:"always"},circle:{type:Boolean},disabled:{type:[Boolean,Function]},tooltip:{type:Object},badge:{type:Object},dropdown:{type:Object},button:{type:Object}},F5=I({name:"XActionBar",__name:"ActionBar",props:N5,emits:["click","command"],setup(n,{emit:e}){const t=n,r=e,i=z(()=>(t.items||[]).map(s=>s==="|"?s:{...s,badge:s.badge?{...t.badge,...typeof s.badge=="object"?s.badge||{}:{value:s.badge}}:void 0,tooltip:s.tooltip?{...t.tooltip,...typeof s.tooltip=="object"?s.tooltip||{}:{content:s.tooltip}}:void 0})),a=s=>{r("click",s)},o=(s,l)=>{r("command",s,l)};return(s,l)=>(y(),V(d(se),{class:"x-action-bar",align:"center"},{default:j(()=>[(y(!0),M(ne,null,ae(i.value,c=>(y(),M(ne,null,[c==="|"?(y(),V(d(Qr),{key:0,direction:"vertical",class:"x-action-bar__divider"})):(y(),V(d(Be),pe({key:1,mode:t.mode,size:t.size,type:t.type,circle:t.circle,background:t.background,button:t.button,dropdown:t.dropdown,disabled:d(Vo)(t.disabled,c).value,ref_for:!0},c,{onClick:a,onCommand:u=>o(c,u)}),null,16,["mode","size","type","circle","background","button","dropdown","disabled","onCommand"]))],64))),256))]),_:1}))}}),H5={tag:{type:String,default:"div"},fit:{type:Boolean,default:!1},width:{type:[String,Number]},height:{type:[String,Number]},flex:{type:Boolean,default:!0},inline:{type:Boolean},direction:{type:String,default:"row"},wrap:{type:String,default:"nowrap"},justify:{type:String,default:"flex-start"},align:{type:String,default:"flex-start"},alignContent:{type:String,default:"stretch"},grow:{type:Boolean,default:!1},shrink:{type:Boolean,default:!1},alignSelf:{type:String,default:"auto"},overflow:{type:String},padding:{type:Boolean,default:!1},gap:{type:Boolean},autoPointer:{type:Boolean}},se=I({name:"XContainer",__name:"Container",props:H5,setup(n){const e=n,t=Oa(),r=sr(),i=z(()=>{const s=r?.parent;if(!s)return!1;const l=s.proxy;return l.$options.name==="XContainer"||!!l.flex}),a=z(()=>({"is-fit":e.fit,"is-flex":e.flex&&!e.inline,"is-inline-flex":e.flex&&e.inline,[`is-direction-${e.direction}`]:e.flex&&e.direction!=="row",[`is-wrap-${e.wrap}`]:e.flex&&e.wrap!=="nowrap",[`is-justify-${e.justify}`]:e.flex&&e.justify!=="flex-start",[`is-align-${e.align}`]:e.flex&&e.align!=="flex-start",[`is-align-content-${e.alignContent}`]:e.flex&&e.alignContent!=="stretch","is-grow":e.grow??i.value,"is-shrink":e.shrink,[`is-align-self-${e.alignSelf}`]:i.value&&e.alignSelf!=="auto",[`is-overflow-${e.overflow}`]:!!e.overflow,"is-padding":!!e.padding,"is-pointer":e.autoPointer&&!!t.onClick,"is-gap":!!e.gap})),o=z(()=>{const{width:s,height:l,fit:c}=e;return c?null:{width:s?ar(s):void 0,height:l?ar(l):void 0}});return(s,l)=>(y(),V(Ge(e.tag),{class:ce(["x-container",a.value]),style:Rt(o.value)},{default:j(()=>[de(s.$slots,"default")]),_:3},8,["class","style"]))}}),L5={size:{type:String,default:"default"},content:{type:String,default:""},subtitle:{type:String},icon:{type:[String,Object]},border:{type:Boolean},more:{type:Boolean}},U5={class:"x-header__content"},W5={key:0,class:"x-header__actions"},J5=I({name:"XHeader",inheritAttrs:!1,__name:"Header",props:L5,setup(n){const e=n,t=jo(Fr(e,"icon")),r=Oa(),i=z(()=>({[`is-size-${e.size}`]:!!e.size&&e.size!=="default","is-border":e.border,"is-pointer":!!r.onClick}));return(a,o)=>(y(),V(d(se),{class:ce(["x-header",i.value]),justify:"space-between",align:"center"},{default:j(()=>[_(d(se),{align:"center",class:ce(["x-header__wrapper",i.value]),grow:"",onClick:d(r).onClick},{default:j(()=>[d(t)?(y(),V(Ge(d(t)),{key:0,class:"x-header__icon",onClick:d(r).onClickIcon||d(r).onClick},null,8,["onClick"])):R("",!0),P("span",U5,[de(a.$slots,"default",{},()=>[le(te(e.content),1)])]),e.more?(y(),V(d(it),{key:1,class:"x-header__more",icon:d(Il)},null,8,["icon"])):R("",!0),e.subtitle||a.$slots.subtitle?(y(),M("span",{key:2,class:"x-header__subtitle",onClick:o[0]||(o[0]=(...s)=>d(r).onClick&&d(r).onClick(...s))},[de(a.$slots,"subtitle",{},()=>[le(te(e.subtitle),1)])])):R("",!0)]),_:3},8,["class","onClick"]),a.$slots.actions?(y(),M("div",W5,[de(a.$slots,"actions")])):R("",!0)]),_:3},8,["class"]))}}),q5={fit:{type:Boolean,default:!1},width:{type:[String,Number]},height:{type:[String,Number]},border:{type:Boolean,default:!0},radius:{type:Boolean,default:!0},card:{type:Boolean},size:{type:String},shadow:{type:String},header:{type:[String,Object]},body:{type:Object},footer:{type:Object}},dr=I({name:"XPanel",__name:"Panel",props:q5,setup(n,{expose:e}){const t=n,r=D(),i=z(()=>({"x-panel--card":!!t.card,"x-panel--default":!t.card,[`is-${t.size}`]:!!t.size&&t.size!=="default","is-border":!!t.border,"is-radius":!!t.radius,[`is-shadow-${t.shadow}`]:!!t.shadow&&t.shadow!=="none"})),a=z(()=>t.header===null?null:typeof t.header=="string"?{content:t.header,size:t.size}:{...t.header,size:t.size}),o=z(()=>t.fit||t.height?"auto":void 0);return e({bodyRef:r}),(s,l)=>(y(),V(d(se),{class:ce(["x-panel",i.value]),direction:"column",fit:t.fit,width:t.width,height:t.height},{default:j(()=>[a.value?(y(),V(d(se),{key:0,flex:!1,class:"x-panel__header"},{default:j(()=>[de(s.$slots,"header",{},()=>[_(d(J5),Cn($n(a.value)),{default:j(()=>[de(s.$slots,"title")]),actions:j(()=>[de(s.$slots,"actions")]),_:3},16)])]),_:3})):R("",!0),_(d(se),pe({ref_key:"bodyRef",ref:r,flex:!1,overflow:o.value,grow:"",padding:"",class:"x-panel__body"},t.body),{default:j(()=>[de(s.$slots,"default")]),_:3},16,["overflow"]),s.$slots.footer?(y(),V(d(se),pe({key:1,flex:!1,padding:"",class:"x-panel__footer"},t.footer),{default:j(()=>[de(s.$slots,"footer")]),_:3},16)):R("",!0)]),_:3},8,["class","fit","width","height"]))}}),dl="user-select-none";class pl{constructor(e,t={}){this.el=e,this.options=t,this.scope=kl(),this.scope.run(()=>{this.init()})}scope;dragging=!1;getHandle(){const{selector:e,handle:t}=this.options;return e?this.el.querySelector(e):t}getTarget(){const{target:e="body"}=this.options;return typeof e=="string"?document.querySelector(e):d(e)||document.body}init(){const{el:e,options:t}=this,{disabled:r,delay:i=150,onStart:a,onEnd:o}=t;if(r)return;let s=null;const l=this.getHandle(),c=this.getTarget();let u=e.getBoundingClientRect(),p=null;const{x:m,y:h}=Z2(e,{initialValue:{x:u.x,y:u.y},...t,handle:l,onStart:(f,v)=>{document.body.classList.add(dl),clearTimeout(s),s=setTimeout(()=>{this.dragging=!0,u=e.getBoundingClientRect(),p=c?.getBoundingClientRect(),a&&a(f,v)},i)},onEnd:(f,v)=>{if(clearTimeout(s),document.body.classList.remove(dl),this.dragging&&p){this.dragging=!1;const{x:g,y:k}=f,b=this.getPosition(p,u,g,k);o&&o(b,v),p=null}}});oe([m,h],()=>{if(this.dragging&&p){const f=this.getPosition(p,u,m.value,h.value);e.style.left=`${f.x}px`,e.style.top=`${f.y}px`}})}getPosition(e,t,r,i){const{edge:a=50}=this.options,o=-t.width+a,s=e.width-a,l=0,c=e.height-a,u=Math.min(s,Math.max(r,o)),p=Math.min(c,Math.max(i,l));return{x:u,y:p}}destory(){this.scope.stop()}}const G5={mounted(n,e){const t=e.value||{},r=new pl(n,t);n.__draggable__=r},updated(n,e){const t=e.value||{};let r=n.__draggable__;r&&!ao(r.options,t)&&(r.destory(),n.__draggable__=new pl(n,t))},unmounted(n){const e=n.__draggable__;e&&(e.destory(),n.__draggable__=null)}},Oi="user-select-none";class hl{constructor(e,t={}){this.el=e,this.options=t,this.scope=kl(),this.scope.run(()=>{this.init()})}scope;resizing=D(!1);direction=D("");MIE=null;cleanMousedown;cleanMouseup;init(){const{el:e,options:t}=this,{disabled:r,onStart:i,onEnd:a}=t;if(r)return;this.MIE=Q2(e),this.cleanMousedown=Uo(document,"mousedown",()=>{this.direction?.value&&this.MIE&&(this.resizing.value=!0,e.classList.add("is-resizing",`is-${this.direction.value}-resizing`),i&&i(this.direction.value,this.MIE))}),this.cleanMouseup=Uo(document,"mouseup",()=>{this.resizing.value&&this.direction?.value&&this.MIE&&(e.classList.remove("is-resizing",`is-${this.direction.value}-resizing`),a&&a(this.direction.value,this.MIE)),this.resizing.value=!1}),oe(this.direction,l=>{const c=document.body;c.style.cursor=l?`${l}-resize`:"",l?c.classList.add(Oi):c.classList.remove(Oi)});const{x:o,y:s}=this.MIE;oe([o,s],()=>{this.resizing.value?this.resize():this.direction.value=this.getDirection()})}resize(){const{MIE:e,direction:t,resizing:r,options:i,el:a}=this,o=t?.value||"";if(!e||!r.value||!o)return;const{x:s,y:l,elementX:c,elementY:u,elementHeight:p,elementWidth:m}=e,{onResizing:h}=i,{minWidth:f=0,minHeight:v=0,maxWidth:g=99999,maxHeight:k=99999}=i;if(o.includes("e")){const b=Math.min(Math.max(c.value,f),g);a.style.width=`${b}px`}if(o.includes("s")){const b=Math.min(Math.max(u.value,v),k);a.style.height=`${b}px`}if(o.includes("w")){const b=Math.min(Math.max(m.value-c.value,f),g);a.style.width=`${b}px`,a.style.left=`${s.value}px`}if(o.includes("n")){const b=Math.min(Math.max(p.value-u.value,v),k);this.el.style.height=`${b}px`,this.el.style.top=`${l.value}px`}h&&h(o,e)}getDirection(){if(!this.MIE)return"";const{elementX:e,elementY:t,elementHeight:r,elementWidth:i,isOutside:a}=this.MIE;if(a.value)return"";const{dirs:o=["n","s","w","e"],edge:s=5}=this.options;let l="";return o.includes("n")&&t.value<=s?l+="n":o.includes("s")&&t.value>r.value-s&&(l+="s"),o.includes("w")&&e.value<=s?l+="w":o.includes("e")&&e.value>i.value-s&&(l+="e"),l}destory(){const e=document.body;e.style.cursor="",e.classList.remove(Oi),this.cleanMousedown&&this.cleanMousedown(),this.cleanMouseup&&this.cleanMouseup(),this.MIE?.stop(),this.scope.stop()}}const ja={mounted(n,e){const t=e.value||{},r=new hl(n,t);n.__resizable__=r},updated(n,e){const t=e.value||{};let r=n.__resizable__;r&&!ao(r.options,t)&&(r.destory(),n.__resizable__=new hl(n,t))},unmounted(n){const e=n.__resizable__;e&&(e.destory(),n.__resizable__=null)}},Y5={modelValue:{type:Boolean,default:!0},title:{type:String},subtitle:{type:String},icon:{type:[String,Object]},size:{type:String,default:"default"},width:{type:[Number,String],default:"70%"},height:{type:[Number,String],default:"70%"},left:{type:[Number,String]},top:{type:[Number,String]},modal:{type:Boolean,default:!0},draggable:{type:[Boolean,Object],default:!0},resizable:{type:[Boolean,Object]},closable:{type:Boolean,default:!0},maximizable:{type:Boolean,default:!1},minimizable:{type:Boolean,default:!1},mode:{type:String,default:"normal"},content:{type:Object},src:{type:String},componentInstance:{type:Object},beforeClose:{type:Function},submit:{type:[Boolean,String]},cancel:{type:[Boolean,String]},bodyPadding:{type:Boolean,default:!0},primary:{type:Boolean}};let gn=1e3;function K5(n,e){const{width:t,height:r}=bn(e),i=Zt({mode:n.mode||"normal",wrapperWidth:0,wrapperHeight:0,width:0,height:0,top:0,left:0,zIndex:++gn,dragging:!1,resizing:!1});return oe([t,r],([a,o])=>{i.wrapperWidth=a,i.wrapperHeight=o,i.width=jr(n.width,a),i.height=jr(n.height,o),i.left=n.left?jr(n.left,a)-i.width/2:Math.max(Math.floor((a-i.width)/2),0),i.top=n.top?jr(n.top,o):Math.max(Math.floor((o-i.height)/2),0)}),oe(i,a=>{gn=Math.max(a.zIndex,gn)}),{state:i,normal:z(()=>i.mode==="normal"),maximized:z(()=>i.mode==="maximized"),minimized:z(()=>i.mode==="minimized")}}function X5(n,e){const t=z(()=>{const{width:o,height:s,top:l,left:c,zIndex:u}=e;return{width:`${o}px`,height:`${s}px`,top:`${l}px`,left:`${c}px`,zIndex:u}}),r=z(()=>({[`is-${e.mode}`]:!!e.mode,"is-draggable":!!n.draggable,"is-resizable":!!n.resizable,"is-primary":!!n.primary})),i=z(()=>({[`is-${e.mode}`]:!!e.mode,"is-dragging":e.dragging,"is-resizing":e.resizing})),a=z(()=>({zIndex:e.zIndex}));return{styles:t,classes:r,wrapperClass:i,modalStyle:a}}function Q5(n,e,t){const r=a=>{e.mode=a,["maximized","minimized","normal"].includes(a)&&t(a),t("modeChange",a)},i=async()=>{(!n.beforeClose||await n.beforeClose())&&(t("update:modelValue",!1),t("close"),t("destroy"))};return{close:i,changeMode:r,show:()=>r("normal"),hide:()=>r("minimized"),active:a=>{const o=a.target.nodeName||"";["INPUT","TEXTAREA","RADIO","CHECKBOX"].includes(o.toUpperCase())||(e.zIndex=Math.max(e.zIndex,++gn))},submit:()=>t("submit"),cancel:()=>{t("cancel"),i()}}}function Z5(n,e,t,r){return z(()=>{const i=typeof n.draggable=="boolean"?!n.draggable:!!n.draggable?.disabled;return{...Oe(n.draggable)?n.draggable:{},disabled:i,target:r,selector:".x-panel__header",onStart(a){e.dragging=!0,e.zIndex=Math.max(e.zIndex,++gn),t("dragStart",a)},onMove(a){t("dragging",a)},onEnd(a){if(e.mode==="maximized")return;const{x:o,y:s}=a;e.left=o,e.top=s,e.dragging=!1,t("dragEnd",a)}}})}function ey(n,e,t){return z(()=>{const r=typeof n.resizable=="boolean"?!n.resizable:!!n.resizable?.disabled;return{minWidth:200,minHeight:150,...Oe(n.resizable)?n.resizable:{},disabled:r,dirs:["e","s","w"],onStart(i,a){e.resizing=!0,e.zIndex=Math.max(e.zIndex,++gn),t("resizeStart",i,a)},onResizing(i,a){t("resizing",i,a)},onEnd(i,a){e.left=a.elementPositionX.value,e.top=a.elementPositionY.value,e.width=a.elementWidth.value,e.height=a.elementHeight.value,e.resizing=!1,t("resizeEnd",i,a)}}})}function ty(n,e){const t=n.componentInstance;if(!t)return;let r=null;return Ia(()=>{const i=d(e),a=d(i?.bodyRef);r=t.$el,a&&a.$el&&a.$el.appendChild(r)}),Ra(()=>{r&&r.parentNode&&r.parentNode.removeChild(r)}),{componentInstance:t}}const ny=["src"],jt=I({name:"XDialog",__name:"Dialog",props:Y5,emits:["update:modelValue","open","close","destroy","maximized","minimized","normal","modeChange","dragStart","dragging","dragEnd","resizeStart","resizeEnd","resizing","submit","cancel"],setup(n,{expose:e,emit:t}){const r=n,i=t,a=sr(),o=D(),s=D(),{state:l,maximized:c,minimized:u,normal:p}=K5(r,o),{styles:m,classes:h,wrapperClass:f,modalStyle:v}=X5(r,l),{changeMode:g,active:k,close:b,show:w,hide:S,submit:C,cancel:x}=Q5(r,l,i),$=Z5(r,l,i,o),E=ey(r,l,i),U=ty(r,s);jl(async()=>{r.modelValue&&(await dt(),a&&i("open",a))});const T=z(()=>s.value?.$el);return e({$vtjEl:T,panelRef:s,state:l,maximized:c,minimized:u,changeMode:g,show:w,hide:S,submit:C,cancel:x,close:b,componentInstance:U}),(B,F)=>r.modelValue?(y(),V(m2,{key:0,to:"body"},[P("div",{ref_key:"wrapper",ref:o,class:ce(["x-dialog__wrapper",d(f)])},[r.modal?(y(),M("div",{key:0,class:"x-dialog__modal",style:Rt(d(v))},null,4)):R("",!0),mt((y(),V(d(dr),pe({ref_key:"panelRef",ref:s,class:["x-dialog",d(h)],card:"",shadow:"always",header:{icon:r.icon,subtitle:r.subtitle},width:"800px",height:"600px",footer:{justify:"space-between",flex:!0,align:"center"},style:d(m),size:r.size,body:{padding:r.bodyPadding},onClick:d(k)},B.$attrs),Kt({title:j(()=>[le(te(r.title),1)]),actions:j(()=>[de(B.$slots,"actions"),r.minimizable?(y(),V(d(Be),{key:0,icon:d(wu),size:r.size,mode:"icon",type:"primary",background:"hover",onClick:F[0]||(F[0]=A=>d(g)("minimized"))},null,8,["icon","size"])):R("",!0),r.maximizable?(y(),M(ne,{key:1},[d(p)?(y(),V(d(Be),{key:1,icon:d(bu),size:r.size,mode:"icon",type:"primary",background:"hover",onClick:F[2]||(F[2]=A=>d(g)("maximized"))},null,8,["icon","size"])):(y(),V(d(Be),{key:0,icon:d(xu),size:r.size,mode:"icon",type:"primary",background:"hover",onClick:F[1]||(F[1]=A=>d(g)("normal"))},null,8,["icon","size"]))],64)):R("",!0),r.closable?(y(),V(d(Be),{key:2,icon:d(_u),size:r.size,mode:"icon",type:"danger",background:"hover",onClick:d(b)},null,8,["icon","size","onClick"])):R("",!0)]),default:j(()=>[de(B.$slots,"default",{},()=>[r.content?(y(),V(Ge(r.content),{key:0})):R("",!0),r.src?(y(),M("iframe",{key:1,src:r.src,class:"x-dialog__frame"},null,8,ny)):R("",!0)])]),_:2},[r.cancel||r.submit||B.$slots.footer||B.$slots.extra||B.$slots.handle?{name:"footer",fn:j(()=>[de(B.$slots,"footer",{},()=>[_(d(se),{align:"center"},{default:j(()=>[de(B.$slots,"extra")]),_:3}),_(d(se),{align:"center"},{default:j(()=>[de(B.$slots,"handle"),r.cancel?(y(),V(d(xe),{key:0,type:"default",size:r.size,onClick:d(x)},{default:j(()=>[le(te(typeof r.cancel=="string"?r.cancel:"取消"),1)]),_:1},8,["size","onClick"])):R("",!0),r.submit?(y(),V(d(xe),{key:1,type:"primary",size:r.size,onClick:d(C)},{default:j(()=>[le(te(typeof r.submit=="string"?r.submit:"确定"),1)]),_:1},8,["size","onClick"])):R("",!0)]),_:3})])]),key:"0"}:void 0]),1040,["header","class","style","size","body","onClick"])),[[d(G5),d($)],[d(ja),d(E)]])],2)])):R("",!0)}});function k0(n,e){const t=document.createElement("div"),r=_(jt,n);r.appContext=e??k0._context,No(r,t);const i=()=>{No(null,t),t.parentNode?.removeChild(t)};return r.props.onDestroy=()=>{i()},document.body.appendChild(t),{vnode:r,destroy:i}}const ry=I({__name:"SelectEditor",props:{options:{default:()=>[]}},setup(n){const e=n;return(t,r)=>(y(),V(d(Ha),Cn($n(t.$attrs)),{default:j(()=>[(y(!0),M(ne,null,ae(e.options,(i,a)=>(y(),V(d(La),pe({key:`item_${a}_${i.value}`,ref_for:!0},i),Kt({_:2},[t.$slots.option?{name:"default",fn:j(()=>[de(t.$slots,"option",{option:i})]),key:"0"}:void 0]),1040))),128))]),_:3},16))}}),iy=I({__name:"CheckboxEditor",props:{options:{default:()=>[]},button:{type:Boolean,default:!1}},setup(n){const e=n,t=z(()=>Pt(e.button?V2:C2));return(r,i)=>(y(),V(d($2),Cn($n(r.$attrs)),{default:j(()=>[(y(!0),M(ne,null,ae(e.options,(a,o)=>(y(),V(Ge(t.value),pe({key:`item_${o}_${a.value}`,ref_for:!0},a),{default:j(()=>[le(te(a.label),1)]),_:2},1040))),128))]),_:1},16))}}),ay=I({__name:"RadioEditor",props:{options:{default:()=>[]},button:{type:Boolean,default:!1}},setup(n){const e=n,t=z(()=>Pt(e.button?qn:E2));return(r,i)=>(y(),V(d(Ua),Cn($n(r.$attrs)),{default:j(()=>[(y(!0),M(ne,null,ae(e.options,(a,o)=>(y(),V(Ge(t.value),pe({key:`item_${o}_${a.value}`,ref_for:!0},a),{default:j(()=>[le(te(a.label),1)]),_:2},1040))),128))]),_:1},16))}}),j0={none:{component:"div",props:{class:"x-field-none"}},text:{component:Ye,props:{clearable:!0},defaultValue:""},textarea:{component:Ye,props:{type:"textarea",rows:2},defaultValue:""},select:{component:ry,props:{clearable:!0}},checkbox:{component:iy,props:{},defaultValue:[]},radio:{component:ay,props:{}},number:{component:El,props:{}},date:{component:Fo,props:{}},time:{component:S2,props:{}},datetime:{component:Fo,props:{type:"datetime"}},switch:{component:Fa,props:{}},rate:{component:k2,props:{}},slider:{component:Al,props:{}},cascader:{component:j2,props:{}}},oy={name:{type:String},label:{type:String},editor:{type:[String,Object],default:"text"},props:{type:Object},modelValue:{type:[String,Number,Boolean,Object,Array],default(n){return j0[n.editor]?.defaultValue}},size:{type:String},width:{type:[String,Number]},tooltipMessage:{type:[Boolean,Object],default:!0},tooltipPosition:{type:[String,Number],default:"outer"},placeholder:{type:String},disabled:{type:Boolean},readonly:{type:Boolean},options:{type:[Array,Function]},visible:{type:[Boolean,Object,Function],default:!0},cascader:{type:[String,Array]},error:{type:String},tip:{type:String},inline:{type:Boolean}};async function sy(n,e){const t=n.options;return t?typeof t=="function"?await t(e)||[]:t:[]}function ly(n,e,t,r,i){const a=D([]),o=z(()=>!r||!i?{}:oo(n.cascader).reduce((s,l)=>(s[l]=Ar(i,l),s),{}));return oe(o,async s=>{if(t.value){a.value=await sy(n,s);const l=r?.exposed?.reset;l&&n.name&&l(n.name)}},{immediate:!0}),{editor:z(()=>{const{editor:s="text",placeholder:l,label:c="...",disabled:u,readonly:p}=n,m={...n.props,placeholder:l||(l===null?void 0:`请输入${c}`),disabled:u,readonly:p,options:a.value,onFocus:()=>e("focus"),onBlur:()=>e("blur"),onChange:f=>e("change",f)},h=typeof s=="string"?j0[s]:{component:s,props:{}};return pt({},h,{props:m})})}}const cy={key:1,class:"el-form-item__error"},uy={key:0,class:"x-field__tip"},ee=I({name:"XField",__name:"Field",props:oy,emits:["update:modelValue","change","focus","blur"],setup(n,{expose:e,emit:t}){const r=n,i=t,a=Mt(V0,null),o=Mt(g2,null),s=Mt(C0,null),l=z(()=>!a?.proxy||!s?r.visible:typeof r.visible=="function"?r.visible(s):Oe(r.visible)?Object.entries(r.visible).every(([C,x])=>Ar(s,C)===x):r.visible),c=()=>a?.proxy&&s&&r.name?Ar(s,r.name)??r.modelValue:r.modelValue,u=D(c()),{editor:p}=ly(r,i,l,a,s),m=D(),h=D(),f=z(()=>r.size||o?.size||"default"),v=z(()=>Object.assign({},a?.props.tooltipMessage||{},typeof r.tooltipMessage=="boolean"?{}:r.tooltipMessage)),g=(C="")=>r.error?r.error:C.includes("is required")?`${r.label||r.name}是必填项!`:C,k=z(()=>{const C=a?.props.tooltipMessage??r.tooltipMessage;return{[`is-tooltip-${r.tooltipPosition}`]:!!C&&!!r.tooltipPosition}}),b=z(()=>{const C=a?.proxy;return{width:r.width?ar(r.width):C&&C.inline&&C.inlineColumns?`${100/C.inlineColumns}%`:null}}),w=z(()=>({right:typeof r.tooltipPosition=="number"?`${r.tooltipPosition}px`:void 0})),S=z(()=>({...p.value.props,modelValue:u.value,"onUpdate:modelValue":C=>{u.value=C}}));return oe(u,(C,x)=>{l.value&&!ao(C,x)&&(i("update:modelValue",C),a?.proxy&&s&&r.name&&_i(s,r.name,C))}),oe(()=>!a?.proxy||!r.name||!s?r.modelValue:Ar(s,r.name)??r.modelValue,C=>{l.value&&(u.value=C)},{immediate:!0}),oe(l,C=>{a?.proxy&&s&&r.name&&(C?(u.value=c(),_i(s,r.name,u.value)):(u.value=void 0,_i(s,r.name,void 0)))},{immediate:!0}),e({fieldValue:u,itemRef:m,editorRef:h,focus:()=>{h.value?.focus&&h.value.focus()},blur:()=>{h.value?.foucs&&h.value.blur()}}),(C,x)=>l.value?(y(),V(d(Ma),pe({key:0,class:["x-field",k.value],ref_key:"itemRef",ref:m,prop:r.name,label:C.label,size:f.value,style:b.value},C.$attrs),Kt({error:j(({error:$})=>[de(C.$slots,"error",{error:$},()=>[d(a)?.props.tooltipMessage??r.tooltipMessage?(y(),M("div",{key:0,class:"x-field__info",style:Rt(w.value)},[_(d(Xr),pe({content:g($)},v.value),{default:j(()=>[_(d(it),{class:"x-field__trigger",icon:d(L2),size:f.value},null,8,["icon","size"])]),_:2},1040,["content"])],4)):(y(),M("div",cy,te(g($)),1))])]),default:j(()=>[P("div",{class:ce(["x-field__editor_wrap",{"is-inline":r.inline}])},[de(C.$slots,"editor",{editor:S.value},()=>[d(p).component?(y(),V(Ge(d(p).component),pe({key:0,class:"x-field__editor",ref_key:"editorRef",ref:h,modelValue:u.value,"onUpdate:modelValue":x[0]||(x[0]=$=>u.value=$)},d(p).props),Kt({_:2},[C.$slots.option?{name:"option",fn:j(({option:$})=>[de(C.$slots,"option",{option:$})]),key:"0"}:void 0]),1040,["modelValue"])):R("",!0)]),r.tip||C.$slots.tip?(y(),M("div",uy,[de(C.$slots,"tip",{},()=>[le(te(r.tip),1)])])):R("",!0)],2),de(C.$slots,"default")]),_:2},[C.$slots.label?{name:"label",fn:j(()=>[de(C.$slots,"label")]),key:"0"}:void 0]),1040,["prop","label","size","class","style"])):R("",!0)}}),dy={model:{type:Object,default(){return Object.create(null)}},inline:{type:Boolean},inlineColumns:{type:Number},footer:{type:Boolean,default:!0},submitText:{type:String,default:"提交"},resetText:{type:String,default:"重置"},submitMethod:{type:Function},tooltipMessage:{type:[Object,Boolean],default:void 0}},V0=Symbol("formInstanceKey"),C0=Symbol("formModelKey"),pi=I({name:"XForm",__name:"Form",props:dy,emits:["change","submit","reset"],setup(n,{expose:e,emit:t}){const r=n,i=t,a=sr(),o=D(),s=Zt(r.model||{}),l=D(!1);Wi(V0,a),Wi(C0,s),oe(()=>r.model,p=>{Object.assign(s,p)},{deep:!0}),oe(s,()=>{i("change",Dt(s))});const c=async()=>{await o.value.validate().catch(()=>!1)&&(i("submit",Dt(s)),r.submitMethod&&(l.value=!0,await r.submitMethod(Dt(s)),l.value=!1))},u=p=>{o.value.resetFields(p),i("reset")};return e({formRef:o,model:s,submit:c,reset:u}),(p,m)=>(y(),V(d(qe),pe({ref_key:"formRef",ref:o,class:"x-form",inline:r.inline,model:s,onKeyup:Jn(c,["enter"]),onSubmit:m[1]||(m[1]=hn(()=>{},["stop","prevent"]))},p.$attrs),{default:j(()=>[de(p.$slots,"default"),r.footer?(y(),V(d(ee),{key:0,editor:"none",class:"x-form__footer",label:" "},{editor:j(()=>[de(p.$slots,"footer",{},()=>[r.submitText?(y(),V(d(xe),{key:0,loading:l.value,type:"primary",onClick:c},{default:j(()=>[le(te(r.submitText),1)]),_:1},8,["loading"])):R("",!0),r.resetText?(y(),V(d(xe),{key:1,type:"default",onClick:m[0]||(m[0]=()=>u())},{default:j(()=>[le(te(r.resetText),1)]),_:1})):R("",!0),de(p.$slots,"action")])]),_:3})):R("",!0)]),_:3},16,["inline","model"]))}}),py={modelValue:{type:Boolean,default:!0},size:{type:String},formProps:{type:Object},submit:{type:[Boolean,String],default:"确定"},cancel:{type:[Boolean,String],default:"取消"},model:{type:Object,default(){return Object.create(null)}},rules:{type:Object},submitMethod:{type:Function}},Vt=I({name:"XDialogForm",__name:"DialogForm",props:py,emits:["update:modelValue","submit","close"],setup(n,{expose:e,emit:t}){const r=n,i=t,a=D(),o=D(),s=z(()=>o.value?.$vtjEl),l=()=>{a.value?.submit()},c=()=>{i("update:modelValue",!1),i("close")},u=async h=>{i("submit",h),r.submitMethod?await r.submitMethod(h)&&c():c()},p=z(()=>r.formProps?.disabled?!1:r.submit),m=z(()=>r.formProps?.disabled?!1:r.cancel);return e({$vtjEl:s,formRef:a,dialogRef:o}),(h,f)=>(y(),V(d(jt),pe({ref_key:"dialogRef",ref:o,class:"x-dialog-form","model-value":r.modelValue,submit:p.value,cancel:m.value,size:r.size,onSubmit:l,onClose:c,minimizable:!1,maximizable:!1},h.$attrs),Kt({default:j(()=>[_(d(pi),pe({ref_key:"formRef",ref:a,class:"x-dialog-form__form",footer:!1,"label-width":"80px",size:r.size,model:r.model,rules:r.rules,"submit-method":u},r.formProps),{default:j(()=>[de(h.$slots,"default")]),_:3},16,["size","model","rules"])]),_:2},[h.$slots.extra?{name:"extra",fn:j(()=>[de(h.$slots,"extra")]),key:"0"}:void 0,h.$slots.handle?{name:"handle",fn:j(()=>[de(h.$slots,"handle")]),key:"1"}:void 0,h.$slots.footer?{name:"footer",fn:j(()=>[de(h.$slots,"footer")]),key:"2"}:void 0]),1040,["model-value","submit","cancel","size"]))}}),hy={items:{type:Array,default(){return[]}},border:{type:Boolean},fit:{type:Boolean},align:{type:String}},my={class:"x-tabs__label-inner"},fy={key:0,class:"x-tabs__actions"},Co=I({name:"XTabs",__name:"Tabs",props:hy,emits:["actionClick","actionCommand"],setup(n,{emit:e}){const t=n,r=e,i=l=>{const{label:c,name:u,value:p,disabled:m,closable:h,lazy:f}=l;return{label:c,name:p??u,disabled:m,closable:h,lazy:f}},a=z(()=>({"is-no-border":!t.border,"is-fit":!!t.fit,[`is-align-${t.align}`]:!!t.align})),o=l=>{r("actionClick",l)},s=l=>{r("actionCommand",l)};return(l,c)=>(y(),V(d(b2),pe({class:["x-tabs",a.value]},l.$attrs),{default:j(()=>[(y(!0),M(ne,null,ae(t.items,u=>(y(),V(d(y2),pe({key:u.value??u.name,ref_for:!0},i(u)),{label:j(()=>[de(l.$slots,"label",pe({ref_for:!0},u),()=>[u.icon?(y(),V(Ge(d(jo)(u.icon)),{key:0,class:"x-tabs__icon"})):R("",!0),P("div",my,[le(te(u.label)+" ",1),u.actions&&[u.name,u.value].includes(l.$attrs.modelValue)?(y(),M("div",fy,[(y(!0),M(ne,null,ae(u.actions,p=>(y(),V(d(Be),pe({mode:"icon",type:"primary",size:"small",circle:"",ref_for:!0},p,{onClick:o,onCommand:s}),null,16))),256))])):R("",!0)])])]),default:j(()=>[de(l.$slots,"default",pe({ref_for:!0},u),()=>[u.component?(y(),V(Ge(u.component),pe({key:0,ref_for:!0},u.props),null,16)):R("",!0)])]),_:2},1040))),128))]),_:3},16,["class"]))}}),vy={name:{type:String,default:"VTJ.PRO"},tagline:{type:String,default:"基于 Vue3 + TypeScript 快速打造高生产力的低代码研发平台"},actionText:{type:String,default:"开始设计"},actionLink:{type:String,default:"/@vtj/pro/"}},gy={class:"x-startup"},yy={class:"x-startup__wrapper"},by={class:"x-startup__name"},wy={class:"clip"},xy={class:"x-startup__tagline"},_y={class:"x-startup__actions"},Sy=I({__name:"Startup",props:vy,setup(n){const e=n,t=()=>{if(typeof window<"u"){let r=(window.__VTJ_LINK__||{}).href||window.location.pathname+"@vtj/pro/#/";window.location.href=r}};return(r,i)=>(y(),M("div",gy,[P("div",yy,[P("div",by,[P("span",wy,te(e.name),1)]),P("div",xy,te(e.tagline),1),P("div",_y,[_(d(xe),{type:"primary",size:"large",round:"",icon:d(Rl),onClick:t},{default:j(()=>[le(te(e.actionText),1)]),_:1},8,["icon"])])])]))}}),ky={units:{type:[String,Object,Array]},unit:{type:String},appendWidth:{type:Number,default:100},withUnit:{type:Boolean,default:!0},format:{type:String},modelValue:{type:[String,Number]},selectProps:{type:Object}},$0=I({name:"XInputUnit",__name:"InputUnit",props:ky,emits:["update:modelValue","update:unit","change","unit-change"],setup(n,{expose:e,emit:t}){const r=n,i=t,a=z(()=>oo(r.units).map(f=>typeof f=="string"?{label:f,value:f}:f)),o=z(()=>{const f=a.value.map(v=>v.value);return r.unit&&f.push(r.unit),lu(f)}),s=D(),l=D(),c=f=>r.format&&f?Y3(Number(f)||0,r.format):f,u=f=>{if(!r.withUnit||typeof f!="string")return{value:c(f),unit:r.unit};for(const v of o.value){const g=new RegExp(`${v}$`);if(g.test(f))return{value:c(f.toString().replace(g,"")),unit:v}}return{value:c(f),unit:r.unit}},p=()=>{const f=c(l.value),v=s.value;return r.withUnit&&f&&v?`${f}${v}`:f};oe(()=>r.modelValue,f=>{const{value:v,unit:g}=u(f);s.value=g,l.value=v},{immediate:!0}),oe(l,f=>{i("change",f)});const m=async()=>{const{value:f,unit:v}=u(p());l.value=f,s.value=v,i("update:modelValue",p())},h=()=>{i("unit-change",s.value),m()};return e({parser:u,formatValue:c}),(f,v)=>(y(),V(d(Ye),{modelValue:l.value,"onUpdate:modelValue":v[1]||(v[1]=g=>l.value=g),modelModifiers:{trim:!0},class:"x-input-unit",onChange:m},Kt({_:2},[a.value.length?{name:"append",fn:j(()=>[_(d(Ha),pe({class:"x-input-unit__unit",modelValue:s.value,"onUpdate:modelValue":v[0]||(v[0]=g=>s.value=g),size:f.$attrs.size,style:{width:`${r.appendWidth}px`}},f.$props.selectProps,{onChange:h}),{default:j(()=>[(y(!0),M(ne,null,ae(a.value,g=>(y(),V(d(La),{key:g.value,label:g.label,value:g.value},null,8,["label","value"]))),128))]),_:1},16,["modelValue","size","style"])]),key:"0"}:{name:"suffix",fn:j(()=>[s.value?(y(),M("div",{key:0,class:"x-input-unit__unit"},[P("span",null,te(s.value),1)])):R("",!0)]),key:"1"}]),1032,["modelValue"]))}});var jy=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},E0={},Xe={};let $o;const Vy=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];Xe.getSymbolSize=function(n){if(!n)throw new Error('"version" cannot be null or undefined');if(n<1||n>40)throw new Error('"version" should be in range from 1 to 40');return n*4+17};Xe.getSymbolTotalCodewords=function(n){return Vy[n]};Xe.getBCHDigit=function(n){let e=0;for(;n!==0;)e++,n>>>=1;return e};Xe.setToSJISFunction=function(n){if(typeof n!="function")throw new Error('"toSJISFunc" is not a valid function.');$o=n};Xe.isKanjiModeEnabled=function(){return typeof $o<"u"};Xe.toSJIS=function(n){return $o(n)};var hi={};(function(n){n.L={bit:1},n.M={bit:0},n.Q={bit:3},n.H={bit:2};function e(t){if(typeof t!="string")throw new Error("Param is not a string");switch(t.toLowerCase()){case"l":case"low":return n.L;case"m":case"medium":return n.M;case"q":case"quartile":return n.Q;case"h":case"high":return n.H;default:throw new Error("Unknown EC Level: "+t)}}n.isValid=function(t){return t&&typeof t.bit<"u"&&t.bit>=0&&t.bit<4},n.from=function(t,r){if(n.isValid(t))return t;try{return e(t)}catch{return r}}})(hi);function A0(){this.buffer=[],this.length=0}A0.prototype={get:function(n){const e=Math.floor(n/8);return(this.buffer[e]>>>7-n%8&1)===1},put:function(n,e){for(let t=0;t<e;t++)this.putBit((n>>>e-t-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(n){const e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),n&&(this.buffer[e]|=128>>>this.length%8),this.length++}};var Cy=A0;function pr(n){if(!n||n<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=n,this.data=new Uint8Array(n*n),this.reservedBit=new Uint8Array(n*n)}pr.prototype.set=function(n,e,t,r){const i=n*this.size+e;this.data[i]=t,r&&(this.reservedBit[i]=!0)};pr.prototype.get=function(n,e){return this.data[n*this.size+e]};pr.prototype.xor=function(n,e,t){this.data[n*this.size+e]^=t};pr.prototype.isReserved=function(n,e){return this.reservedBit[n*this.size+e]};var $y=pr,T0={};(function(n){const e=Xe.getSymbolSize;n.getRowColCoords=function(t){if(t===1)return[];const r=Math.floor(t/7)+2,i=e(t),a=i===145?26:Math.ceil((i-13)/(2*r-2))*2,o=[i-7];for(let s=1;s<r-1;s++)o[s]=o[s-1]-a;return o.push(6),o.reverse()},n.getPositions=function(t){const r=[],i=n.getRowColCoords(t),a=i.length;for(let o=0;o<a;o++)for(let s=0;s<a;s++)o===0&&s===0||o===0&&s===a-1||o===a-1&&s===0||r.push([i[o],i[s]]);return r}})(T0);var B0={};const Ey=Xe.getSymbolSize,ml=7;B0.getPositions=function(n){const e=Ey(n);return[[0,0],[e-ml,0],[0,e-ml]]};var z0={};(function(n){n.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const e={N1:3,N2:3,N3:40,N4:10};n.isValid=function(r){return r!=null&&r!==""&&!isNaN(r)&&r>=0&&r<=7},n.from=function(r){return n.isValid(r)?parseInt(r,10):void 0},n.getPenaltyN1=function(r){const i=r.size;let a=0,o=0,s=0,l=null,c=null;for(let u=0;u<i;u++){o=s=0,l=c=null;for(let p=0;p<i;p++){let m=r.get(u,p);m===l?o++:(o>=5&&(a+=e.N1+(o-5)),l=m,o=1),m=r.get(p,u),m===c?s++:(s>=5&&(a+=e.N1+(s-5)),c=m,s=1)}o>=5&&(a+=e.N1+(o-5)),s>=5&&(a+=e.N1+(s-5))}return a},n.getPenaltyN2=function(r){const i=r.size;let a=0;for(let o=0;o<i-1;o++)for(let s=0;s<i-1;s++){const l=r.get(o,s)+r.get(o,s+1)+r.get(o+1,s)+r.get(o+1,s+1);(l===4||l===0)&&a++}return a*e.N2},n.getPenaltyN3=function(r){const i=r.size;let a=0,o=0,s=0;for(let l=0;l<i;l++){o=s=0;for(let c=0;c<i;c++)o=o<<1&2047|r.get(l,c),c>=10&&(o===1488||o===93)&&a++,s=s<<1&2047|r.get(c,l),c>=10&&(s===1488||s===93)&&a++}return a*e.N3},n.getPenaltyN4=function(r){let i=0;const a=r.data.length;for(let o=0;o<a;o++)i+=r.data[o];return Math.abs(Math.ceil(i*100/a/5)-10)*e.N4};function t(r,i,a){switch(r){case n.Patterns.PATTERN000:return(i+a)%2===0;case n.Patterns.PATTERN001:return i%2===0;case n.Patterns.PATTERN010:return a%3===0;case n.Patterns.PATTERN011:return(i+a)%3===0;case n.Patterns.PATTERN100:return(Math.floor(i/2)+Math.floor(a/3))%2===0;case n.Patterns.PATTERN101:return i*a%2+i*a%3===0;case n.Patterns.PATTERN110:return(i*a%2+i*a%3)%2===0;case n.Patterns.PATTERN111:return(i*a%3+(i+a)%2)%2===0;default:throw new Error("bad maskPattern:"+r)}}n.applyMask=function(r,i){const a=i.size;for(let o=0;o<a;o++)for(let s=0;s<a;s++)i.isReserved(s,o)||i.xor(s,o,t(r,s,o))},n.getBestMask=function(r,i){const a=Object.keys(n.Patterns).length;let o=0,s=1/0;for(let l=0;l<a;l++){i(l),n.applyMask(l,r);const c=n.getPenaltyN1(r)+n.getPenaltyN2(r)+n.getPenaltyN3(r)+n.getPenaltyN4(r);n.applyMask(l,r),c<s&&(s=c,o=l)}return o}})(z0);var mi={};const It=hi,Vr=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],Cr=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];mi.getBlocksCount=function(n,e){switch(e){case It.L:return Vr[(n-1)*4+0];case It.M:return Vr[(n-1)*4+1];case It.Q:return Vr[(n-1)*4+2];case It.H:return Vr[(n-1)*4+3];default:return}};mi.getTotalCodewordsCount=function(n,e){switch(e){case It.L:return Cr[(n-1)*4+0];case It.M:return Cr[(n-1)*4+1];case It.Q:return Cr[(n-1)*4+2];case It.H:return Cr[(n-1)*4+3];default:return}};var D0={},fi={};const Yn=new Uint8Array(512),Gr=new Uint8Array(256);(function(){let n=1;for(let e=0;e<255;e++)Yn[e]=n,Gr[n]=e,n<<=1,n&256&&(n^=285);for(let e=255;e<512;e++)Yn[e]=Yn[e-255]})();fi.log=function(n){if(n<1)throw new Error("log("+n+")");return Gr[n]};fi.exp=function(n){return Yn[n]};fi.mul=function(n,e){return n===0||e===0?0:Yn[Gr[n]+Gr[e]]};(function(n){const e=fi;n.mul=function(t,r){const i=new Uint8Array(t.length+r.length-1);for(let a=0;a<t.length;a++)for(let o=0;o<r.length;o++)i[a+o]^=e.mul(t[a],r[o]);return i},n.mod=function(t,r){let i=new Uint8Array(t);for(;i.length-r.length>=0;){const a=i[0];for(let s=0;s<r.length;s++)i[s]^=e.mul(r[s],a);let o=0;for(;o<i.length&&i[o]===0;)o++;i=i.slice(o)}return i},n.generateECPolynomial=function(t){let r=new Uint8Array([1]);for(let i=0;i<t;i++)r=n.mul(r,new Uint8Array([1,e.exp(i)]));return r}})(D0);const O0=D0;function Eo(n){this.genPoly=void 0,this.degree=n,this.degree&&this.initialize(this.degree)}Eo.prototype.initialize=function(n){this.degree=n,this.genPoly=O0.generateECPolynomial(this.degree)};Eo.prototype.encode=function(n){if(!this.genPoly)throw new Error("Encoder not initialized");const e=new Uint8Array(n.length+this.degree);e.set(n);const t=O0.mod(e,this.genPoly),r=this.degree-t.length;if(r>0){const i=new Uint8Array(this.degree);return i.set(t,r),i}return t};var Ay=Eo,I0={},Ft={},Ao={};Ao.isValid=function(n){return!isNaN(n)&&n>=1&&n<=40};var bt={};const R0="[0-9]+",Ty="[A-Z $%*+\\-./:]+";let or="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";or=or.replace(/u/g,"\\u");const By="(?:(?![A-Z0-9 $%*+\\-./:]|"+or+`)(?:.|[\r
74
74
  ]))+`;bt.KANJI=new RegExp(or,"g");bt.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");bt.BYTE=new RegExp(By,"g");bt.NUMERIC=new RegExp(R0,"g");bt.ALPHANUMERIC=new RegExp(Ty,"g");const zy=new RegExp("^"+or+"$"),Dy=new RegExp("^"+R0+"$"),Oy=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");bt.testKanji=function(n){return zy.test(n)};bt.testNumeric=function(n){return Dy.test(n)};bt.testAlphanumeric=function(n){return Oy.test(n)};(function(n){const e=Ao,t=bt;n.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},n.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},n.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},n.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},n.MIXED={bit:-1},n.getCharCountIndicator=function(i,a){if(!i.ccBits)throw new Error("Invalid mode: "+i);if(!e.isValid(a))throw new Error("Invalid version: "+a);return a>=1&&a<10?i.ccBits[0]:a<27?i.ccBits[1]:i.ccBits[2]},n.getBestModeForData=function(i){return t.testNumeric(i)?n.NUMERIC:t.testAlphanumeric(i)?n.ALPHANUMERIC:t.testKanji(i)?n.KANJI:n.BYTE},n.toString=function(i){if(i&&i.id)return i.id;throw new Error("Invalid mode")},n.isValid=function(i){return i&&i.bit&&i.ccBits};function r(i){if(typeof i!="string")throw new Error("Param is not a string");switch(i.toLowerCase()){case"numeric":return n.NUMERIC;case"alphanumeric":return n.ALPHANUMERIC;case"kanji":return n.KANJI;case"byte":return n.BYTE;default:throw new Error("Unknown mode: "+i)}}n.from=function(i,a){if(n.isValid(i))return i;try{return r(i)}catch{return a}}})(Ft);(function(n){const e=Xe,t=mi,r=hi,i=Ft,a=Ao,o=7973,s=e.getBCHDigit(o);function l(m,h,f){for(let v=1;v<=40;v++)if(h<=n.getCapacity(v,f,m))return v}function c(m,h){return i.getCharCountIndicator(m,h)+4}function u(m,h){let f=0;return m.forEach(function(v){const g=c(v.mode,h);f+=g+v.getBitsLength()}),f}function p(m,h){for(let f=1;f<=40;f++)if(u(m,f)<=n.getCapacity(f,h,i.MIXED))return f}n.from=function(m,h){return a.isValid(m)?parseInt(m,10):h},n.getCapacity=function(m,h,f){if(!a.isValid(m))throw new Error("Invalid QR Code version");typeof f>"u"&&(f=i.BYTE);const v=e.getSymbolTotalCodewords(m),g=t.getTotalCodewordsCount(m,h),k=(v-g)*8;if(f===i.MIXED)return k;const b=k-c(f,m);switch(f){case i.NUMERIC:return Math.floor(b/10*3);case i.ALPHANUMERIC:return Math.floor(b/11*2);case i.KANJI:return Math.floor(b/13);case i.BYTE:default:return Math.floor(b/8)}},n.getBestVersionForData=function(m,h){let f;const v=r.from(h,r.M);if(Array.isArray(m)){if(m.length>1)return p(m,v);if(m.length===0)return 1;f=m[0]}else f=m;return l(f.mode,f.getLength(),v)},n.getEncodedBits=function(m){if(!a.isValid(m)||m<7)throw new Error("Invalid QR Code version");let h=m<<12;for(;e.getBCHDigit(h)-s>=0;)h^=o<<e.getBCHDigit(h)-s;return m<<12|h}})(I0);var M0={};const Va=Xe,P0=1335,Iy=21522,fl=Va.getBCHDigit(P0);M0.getEncodedBits=function(n,e){const t=n.bit<<3|e;let r=t<<10;for(;Va.getBCHDigit(r)-fl>=0;)r^=P0<<Va.getBCHDigit(r)-fl;return(t<<10|r)^Iy};var N0={};const Ry=Ft;function _n(n){this.mode=Ry.NUMERIC,this.data=n.toString()}_n.getBitsLength=function(n){return 10*Math.floor(n/3)+(n%3?n%3*3+1:0)};_n.prototype.getLength=function(){return this.data.length};_n.prototype.getBitsLength=function(){return _n.getBitsLength(this.data.length)};_n.prototype.write=function(n){let e,t,r;for(e=0;e+3<=this.data.length;e+=3)t=this.data.substr(e,3),r=parseInt(t,10),n.put(r,10);const i=this.data.length-e;i>0&&(t=this.data.substr(e),r=parseInt(t,10),n.put(r,i*3+1))};var My=_n;const Py=Ft,Ii=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function Sn(n){this.mode=Py.ALPHANUMERIC,this.data=n}Sn.getBitsLength=function(n){return 11*Math.floor(n/2)+6*(n%2)};Sn.prototype.getLength=function(){return this.data.length};Sn.prototype.getBitsLength=function(){return Sn.getBitsLength(this.data.length)};Sn.prototype.write=function(n){let e;for(e=0;e+2<=this.data.length;e+=2){let t=Ii.indexOf(this.data[e])*45;t+=Ii.indexOf(this.data[e+1]),n.put(t,11)}this.data.length%2&&n.put(Ii.indexOf(this.data[e]),6)};var Ny=Sn,Fy=function(n){for(var e=[],t=n.length,r=0;r<t;r++){var i=n.charCodeAt(r);if(i>=55296&&i<=56319&&t>r+1){var a=n.charCodeAt(r+1);a>=56320&&a<=57343&&(i=(i-55296)*1024+a-56320+65536,r+=1)}if(i<128){e.push(i);continue}if(i<2048){e.push(i>>6|192),e.push(i&63|128);continue}if(i<55296||i>=57344&&i<65536){e.push(i>>12|224),e.push(i>>6&63|128),e.push(i&63|128);continue}if(i>=65536&&i<=1114111){e.push(i>>18|240),e.push(i>>12&63|128),e.push(i>>6&63|128),e.push(i&63|128);continue}e.push(239,191,189)}return new Uint8Array(e).buffer};const Hy=Fy,Ly=Ft;function kn(n){this.mode=Ly.BYTE,typeof n=="string"&&(n=Hy(n)),this.data=new Uint8Array(n)}kn.getBitsLength=function(n){return n*8};kn.prototype.getLength=function(){return this.data.length};kn.prototype.getBitsLength=function(){return kn.getBitsLength(this.data.length)};kn.prototype.write=function(n){for(let e=0,t=this.data.length;e<t;e++)n.put(this.data[e],8)};var Uy=kn;const Wy=Ft,Jy=Xe;function jn(n){this.mode=Wy.KANJI,this.data=n}jn.getBitsLength=function(n){return n*13};jn.prototype.getLength=function(){return this.data.length};jn.prototype.getBitsLength=function(){return jn.getBitsLength(this.data.length)};jn.prototype.write=function(n){let e;for(e=0;e<this.data.length;e++){let t=Jy.toSJIS(this.data[e]);if(t>=33088&&t<=40956)t-=33088;else if(t>=57408&&t<=60351)t-=49472;else throw new Error("Invalid SJIS character: "+this.data[e]+`
@@ -81,18 +81,18 @@ Minimum version required to store current data is: `+a+`.
81
81
  * Copyright (c) 2024, VTJ.PRO All rights reserved.
82
82
  * @name @vtj/renderer
83
83
  * @author CHC chenhuachun1549@dingtalk.com
84
- * @version 0.8.5
84
+ * @version 0.8.7
85
85
  * @license <a href="https://vtj.pro/license.html">MIT License</a>
86
- */const Kn="0.8.5";var Je=(n=>(n.Runtime="Runtime",n.Design="Design",n.Raw="Raw",n.VNode="VNode",n))(Je||{});const gl=["$el","$emit","$nextTick","$parent","$root","$attrs","$slots","$watch","$props","$options","$forceUpdate"],Pb=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeUnmount","unmounted","errorCaptured","renderTracked","renderTriggered","activated","deactivated"],Nb=["vIf","vShow","vModel","vFor","vBind"],W0={String,Number,Boolean,Array,Object,Function,Date};function $r(n,e){return n.map(t=>J3(t)?t:`${e}${t}`)}function Do(n){return/\.css$/.test(n)}function Oo(n){return/\.js$/.test(n)}function Fb(n){return/\.json$/.test(n)}function yl(n){return n.map(e=>`<script src="${vn.append(e,{v:Kn})}"><\/script>`).join("")}function Hb(n=[]){return n.map(e=>`<link rel="stylesheet" href="${vn.append(e,{v:Kn})}" />`).join("")}function J0(n,e){const t=n.filter(p=>!!p.enabled),r=[],i=[],a=[],o=[],s={},l={},c=[],u={};return t.forEach(({urls:p,assetsUrl:m,library:h,assetsLibrary:f,localeLibrary:v})=>{p?.forEach(g=>{Oo(g)&&r.push(g),Do(g)&&i.push(g)}),h&&(o.push(h),s[h]=$r(p||[],e),v&&(l[h]=v)),m&&a.push(m),f&&c.push(f),h&&f&&(u[f]=h)}),{scripts:$r(r,e),css:$r(i,e),materials:$r(a,e),libraryExports:o,materialExports:lu(c),materialMapLibrary:u,libraryMap:s,libraryLocaleMap:l}}function Aa(n,e){const{name:t,parent:r,alias:i}=n;return r?e[r]?.[i||t]:e[i||t]}function q0(n){return Bn(n)?n:JSON.stringify(n)}function G0(n,e,t){const r=n.CSSStyleSheet;if(r.prototype.replaceSync){const i=new r;i.id=e,i.replaceSync(t);const a=n.document,o=a.adoptedStyleSheets,s=Array.from(o).filter(l=>l.id!==e);a.adoptedStyleSheets=[...s,i]}else{const i=n.document;let a=i.getElementById(e);a?a.innerHTML=t:(a=i.createElement("style"),a.id=e,a.innerHTML=t,i.head.appendChild(a))}}async function Lb(n,e){const t=await window.fetch(e).then(r=>r.text()).catch(()=>"");t&&G0(window,n,t)}function Y0(n,e=window){const t=e.document,r=e.document.head;for(const i of n)if(!t.getElementById(i)){const a=t.createElement("link");a.rel="stylesheet",a.id=i,a.href=i,r.appendChild(a)}}async function Ub(n,e,t=window){const r=t.document,i=t.document.head;let a=t[e];return a?a.default||a:new Promise((o,s)=>{for(const l of n){const c=r.createElement("script");c.src=l,c.onload=()=>{a=t[e],a&&o(a.default||a)},c.onerror=u=>{s(u)},i.appendChild(c)}})}function Wb(n){return Qn(n)||Qn(n?.install)}function gt(n,e,t=!1,r=!1){try{const i=['"use strict";',"var __self = arguments[0];"];i.push("return ");let a=(n.value||"").trim();a=a.replace(/this(\W|$)/g,(s,l)=>`__self${l}`),a=i.join(`
86
+ */const Kn="0.8.7";var Je=(n=>(n.Runtime="Runtime",n.Design="Design",n.Raw="Raw",n.VNode="VNode",n))(Je||{});const gl=["$el","$emit","$nextTick","$parent","$root","$attrs","$slots","$watch","$props","$options","$forceUpdate"],Pb=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeUnmount","unmounted","errorCaptured","renderTracked","renderTriggered","activated","deactivated"],Nb=["vIf","vShow","vModel","vFor","vBind"],W0={String,Number,Boolean,Array,Object,Function,Date};function $r(n,e){return n.map(t=>J3(t)?t:`${e}${t}`)}function Do(n){return/\.css$/.test(n)}function Oo(n){return/\.js$/.test(n)}function Fb(n){return/\.json$/.test(n)}function yl(n){return n.map(e=>`<script src="${vn.append(e,{v:Kn})}"><\/script>`).join("")}function Hb(n=[]){return n.map(e=>`<link rel="stylesheet" href="${vn.append(e,{v:Kn})}" />`).join("")}function J0(n,e){const t=n.filter(p=>!!p.enabled),r=[],i=[],a=[],o=[],s={},l={},c=[],u={};return t.forEach(({urls:p,assetsUrl:m,library:h,assetsLibrary:f,localeLibrary:v})=>{p?.forEach(g=>{Oo(g)&&r.push(g),Do(g)&&i.push(g)}),h&&(o.push(h),s[h]=$r(p||[],e),v&&(l[h]=v)),m&&a.push(m),f&&c.push(f),h&&f&&(u[f]=h)}),{scripts:$r(r,e),css:$r(i,e),materials:$r(a,e),libraryExports:o,materialExports:lu(c),materialMapLibrary:u,libraryMap:s,libraryLocaleMap:l}}function Aa(n,e){const{name:t,parent:r,alias:i}=n;return r?e[r]?.[i||t]:e[i||t]}function q0(n){return Bn(n)?n:JSON.stringify(n)}function G0(n,e,t){const r=n.CSSStyleSheet;if(r.prototype.replaceSync){const i=new r;i.id=e,i.replaceSync(t);const a=n.document,o=a.adoptedStyleSheets,s=Array.from(o).filter(l=>l.id!==e);a.adoptedStyleSheets=[...s,i]}else{const i=n.document;let a=i.getElementById(e);a?a.innerHTML=t:(a=i.createElement("style"),a.id=e,a.innerHTML=t,i.head.appendChild(a))}}async function Lb(n,e){const t=await window.fetch(e).then(r=>r.text()).catch(()=>"");t&&G0(window,n,t)}function Y0(n,e=window){const t=e.document,r=e.document.head;for(const i of n)if(!t.getElementById(i)){const a=t.createElement("link");a.rel="stylesheet",a.id=i,a.href=i,r.appendChild(a)}}async function Ub(n,e,t=window){const r=t.document,i=t.document.head;let a=t[e];return a?a.default||a:new Promise((o,s)=>{for(const l of n){const c=r.createElement("script");c.src=l,c.onload=()=>{a=t[e],a&&o(a.default||a)},c.onerror=u=>{s(u)},i.appendChild(c)}})}function Wb(n){return Qn(n)||Qn(n?.install)}function gt(n,e,t=!1,r=!1){try{const i=['"use strict";',"var __self = arguments[0];"];i.push("return ");let a=(n.value||"").trim();a=a.replace(/this(\W|$)/g,(s,l)=>`__self${l}`),a=i.join(`
87
87
  `)+a;const o=`with(${t?"{}":"$scope || {}"}) { ${a} }`;return new Function("$scope",o)(e)}catch(i){if(Ke.error("parseExpression.error",i,n,e?.__self??e),r)throw i}}function Ta(n,e,t=!1,r=!1){const i=gt(n,e,t,r);if(typeof i!="function"&&(Ke.error("parseFunction.error","not a function",n,e?.__self??e),r))throw new Error(`"${n.value}" not a function`);return i}function Pe(n){return n&&n.type==="JSExpression"}function hr(n){return typeof n=="object"&&n&&n.type==="JSFunction"}function Jb(n){return Pe(n)||hr(n)}function Vn(n){return Jb(n)?n.value:JSON.stringify(n)}let cn=null;const qb=y0({settings:{type:"form",validSuccess:!0,originResponse:!1,loading:!0,validate:n=>n.data?.code===0||!!n.data?.success,failMessage:!0,showError:n=>{en.error({message:n||"未知错误"})},showLoading:()=>{cn&&cn.close(),cn=Tl.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.05)"})},hideLoading:()=>{cn&&(cn.close(),cn=null)}}});function Gb(n,e){const{jsonp:t,request:r}=e;if(n.method==="jsonp")return(i={})=>t(n.url,{...n.jsonpOptions,query:i});{const i=n.headers?gt(n.headers,{},!0):void 0,a={url:n.url,method:n.method,settings:{...n.settings,headers:i}};return(o,s)=>r.send(pt(a,s||{},{data:o}))}}function K0(n=[],e){return n.reduce((t,r)=>(t[r.id]=Gb(r,e),t),{})}function X0(n=[]){Xn.setup({timeout:"50-500"}),Io(),n.forEach(e=>Yb(e))}function Yb(n){if(!n.mock)return;const{url:e,mockTemplate:t}=n;if(e&&t){const r=lo(`${e}(.*)`),i=og(e,{decode:decodeURIComponent}),a=gt(t,{},!0);Xn.mock(r,o=>{const s=vn.parse(o.url)||{},l=o.body instanceof FormData?l5(o.body):o.body,c=i(o.url)?.params;return Object.assign(o,{data:l,params:s,query:c}),Xn.mock(a(o))})}}function Io(){Xn._mocked={}}class Kb{__id=null;__mode;__instance=null;__contextRefs={};__refs={};context={};state={};props={};$props={};$refs={};$el=null;$emit=null;$nextTick=null;$parent=null;$root=null;$attrs=null;$slots=null;$watch=null;$options=null;$forceUpdate=null;$components={};$libs={};$apis={};__transform={};constructor(e){const{mode:t,dsl:r,attrs:i}=e;this.__mode=t,r&&(this.__id=r.id||null,this.__transform=r.transform||{}),i&&Object.assign(this,i)}setup(e,t=ei){const r=t.getCurrentInstance();if(!r)return;this.__instance=r.proxy;const i=r.appContext.config.globalProperties;Object.assign(this,i),Object.assign(this,e||{}),this.__proxy(),t.onMounted(()=>{this.__proxy()}),t.onUnmounted(()=>{this.__cleanup()})}__proxy(){this.__instance&&gl.forEach(e=>{this[e]=this.__instance?.[e]})}__cleanup(){gl.forEach(e=>{this[e]=null})}__parseFunction(e){if(e)if(this.__mode===Je.Runtime){const{id:t,type:r}=e,i=t?this.__transform[t]??e.value:e.value;return Ta({type:r,value:i},this)}else return Ta(e,this)}__parseExpression(e){if(e)if(this.__mode===Je.Runtime){const{id:t,type:r}=e,i=t?this.__transform[t]??e.value:e.value;return gt({type:r,value:i},this)}else return gt(e,this)}__ref(e=null,t){if(this.__mode!==Je.VNode)return e&&e!==this.__id&&(this.__contextRefs[e]=this),r=>{let i=r?.$vtjEl||r?.$el||r;if(!i){typeof t=="string"&&(delete this.$refs[t],e&&delete this.__refs[e]);return}if(i.nodeType===3&&i.nextSibling&&(i=i.nextSibling),i.__vtj__=e,Je.Design===this.__mode&&(i.__context__=this),e&&(this.__refs[e]=r),typeof t=="function")t(r);else if(t){const a=this.$refs[t];if(a){const o=new Set([].concat(a,r));this.$refs[t]=Array.from(o)}else this.$refs[t]=r}return r}}__clone(e={}){const t={...this.context,...e},r={...t,context:t};return r.context.__proto__=this.context,r.__proto__=this,r}}function Ba(n){const{Vue:e=ei,mode:t=Je.Runtime,components:r={},libs:i={},apis:a={},loader:o}=n,s=e.computed(()=>n.dsl),l={$components:r,$libs:i,$apis:a},c=new Kb({mode:t,dsl:s.value,attrs:l}),u=e.defineComponent({name:s.value.name,props:{...Xb(s.value.props??[],c)},setup(p){c.$props=p,c.props=p,s.value.id&&G0(n.window||window,s.value.id,s.value.css||""),c.state=Qb(e,s.value.state??{},c);const m=Zb(e,s.value.computed??{},c),h=e7(s.value.methods??{},c),f=t7(e,s.value.inject,c),v=n7(s.value.dataSources||{},c),g={...f,...m,...h,...v};return c.setup(g,e),r7(e,s.value.watch??[],c),{vtj:c}},emits:[...s.value.emits??[]],expose:["vtj"],render(){if(!s.value.nodes)return null;const p=s.value.nodes||[];return p.length===1?Kr(p[0],c,e,o):p.map(m=>Kr(m,c,e,o))},...i7(s.value.lifeCycles??{},c)});return{renderer:e.markRaw(u),context:c}}function Xb(n=[],e){const t=r=>r?(Array.isArray(r)?r:[r]).map(i=>W0[i]):void 0;return n.map(r=>Bn(r)?{name:r}:{name:r.name,type:r.type,required:r.required,default:Pe(r.default)?e.__parseExpression(r.default):r.default}).reduce((r,i)=>(r[i.name]={type:t(i.type),required:i.required,default:i.default},r),{})}function Qb(n,e,t){return n.reactive(Object.keys(e||{}).reduce((r,i)=>{let a=e[i];return Pe(a)?a=t.__parseExpression(a):hr(a)&&(a=t.__parseFunction(a)),r[i]=a,r},{}))}function Zb(n,e,t){return Object.entries(e??{}).reduce((r,[i,a])=>(r[i]=n.computed(t.__parseFunction(a)),r),{})}function e7(n,e){return Object.entries(n??{}).reduce((t,[r,i])=>(t[r]=e.__parseFunction(i),t),{})}function t7(n,e=[],t){return e.reduce((r,i)=>{const{name:a,from:o}=i||{};i.default;const s=Pe(o)?t.__parseExpression(o)||a:o??a,l=Pe(i.default)?t.__parseExpression(i.default):i.default??null;return r[a]=n.inject(s,l),r},{})}function n7(n,e){return Object.keys(n).reduce((t,r)=>{const i=n[r],a=e.$apis[i.ref],o=hr(i.transform)?i.transform.value?e.__parseFunction(i.transform):void 0:i.transform;return t[r]=async(...s)=>{const l=await a.apply(e,s);return o?o(l):l},t},{})}function r7(n,e=[],t){e.forEach(r=>{n.watch(t.__parseExpression(r.source),t.__parseFunction(r.handler),{deep:r.deep,immediate:r.immediate})})}function i7(n,e){return Object.entries(n??{}).reduce((t,[r,i])=>(t[r]=e.__parseFunction(i),t),{})}let Hi=[];const a7=n=>n;async function Q0(n,e=window){const{urls:t=[],library:r}=n,i=t.filter(l=>Oo(l));if(i.length===0||!r)return null;const a=t.filter(l=>Do(l));let o;const s=await Ub(i,r,e).catch(()=>null);return s?.plugin&&(o=s.plugin),o?{component:o,css:a}:null}function za(n){const{getDsl:e,getDslByUrl:t,options:r}=n;return r.window&&(Hi.forEach(i=>{delete r.window[i]}),Hi=[]),(i,a,o=ei)=>!a||typeof a=="string"?i:a.type==="Schema"&&a.id?o.defineAsyncComponent(async()=>{const s=await e(a.id);return s&&(s.name=i),s?Ba({...r,Vue:o,dsl:s,mode:Je.Runtime,loader:za(n)}).renderer:null}):a.type==="UrlSchema"&&a.url?o.defineAsyncComponent(async()=>{const s=await t(a.url);return s&&(s.name=i),s?Ba({...r,Vue:o,dsl:s,mode:Je.Runtime,loader:za(n)}).renderer:null}):a.type==="Plugin"?(a.library&&Hi.push(a.library),o.defineAsyncComponent(async()=>{const s=await Q0(a,r.window);return s?(Y0(s.css,r.window),s.component):null})):i}function Kr(n,e,t=ei,r=a7){if(!n||!n.name||n.invisible)return null;const{id:i=null,directives:a=[]}=n,{vIf:o,vFor:s,vShow:l,vModels:c,vBind:u}=o7(a);if(o&&!s7(o,e))return null;const p=m=>{const h=m.$components,f=(()=>{if(n.name==="component")return l7(m,n.props?.is);if(n.name==="slot")return n.name;const b=r(n.name,n.from,t);return Bn(b)?h[b]??b:b})(),v=c7(i,n.props??{},m),g=u7(t,n.events??{},m);if(n.name==="slot")return d7(t,n,v,m,r);u&&Object.assign(v,m.__parseExpression(u.value)),l&&(v.style=Object.assign(v.style??{},h7(l,m))),c.forEach(b=>{Object.assign(v,m7(t,b,m))});const k=f7(t,n.children??[],m,r,n);return t.createVNode(f,{...v,...g},k)};return s?y7(s,p,e):p(e)}function o7(n=[]){const e=n.find(s=>qt(s.name)==="vIf"),t=n.find(s=>qt(s.name)==="vFor"),r=n.find(s=>qt(s.name)==="vShow"),i=n.find(s=>qt(s.name)==="vBind"),a=n.filter(s=>qt(s.name)==="vModel"),o=n.filter(s=>!Nb.includes(qt(s.name)));return{vIf:e,vFor:t,vShow:r,vModels:a,vBind:i,others:o}}function s7(n,e){return!!e.__parseExpression(n.value)}function l7(n,e){return e?Pe(e)?n.__parseExpression(e):e:"div"}function c7(n,e,t){const r=Object.keys(e||{}).reduce((i,a)=>{let o=e[a];return Pe(o)?o=t.__parseExpression(o):hr(o)&&(o=t.__parseFunction(o)),i[a]=o,i},{});return r.ref=t.__ref(n,r.ref),r}function u7(n,e,t){const r=["passive","capture","once"],i={capture:"Capture",once:"Once",passive:"OnceCapture"};return Object.keys(e||{}).reduce((a,o)=>{const s=e[o],l=Z0(s.modifiers),c=l.find(m=>r.includes(m)),u="on"+no(o)+(c&&i[c]||""),p=t.__parseFunction(s.handler);return p&&(a[u]=n.withModifiers(p,l)),a},{})}function Z0(n={},e=!1){const t=Object.keys(n);return e?t.map(r=>"."+r):t}function d7(n,e,t,r,i){const{children:a}=e,o=p7(e,r),s=r.$slots?.[o.name];return s?s(t):a?Bn(a)?n.createTextVNode(a):Pe(a)?n.createTextVNode(q0(r.__parseExpression(a))):Array.isArray(a)?a.map(l=>Kr(l,r,n,i)):null:null}function p7(n,e){const{props:t}=n,r=t?.name||"default";return{name:Pe(r)?e.__parseExpression(r):r,params:[]}}function h7(n,e){return e.__parseExpression(n.value)?{}:{display:"none"}}function m7(n,e,t){const r={type:"JSFunction",value:e.value?.value?`(v) => {
88
88
  ${e.value.value} = v;
89
89
  }`:"(v) => {}"},i=t.__parseFunction(r),a=Z0(e.modifiers),o=Pe(e.arg)?t.__parseExpression(e.arg):e.arg||"modelValue";return{[o]:t.__parseExpression(e.value),[`onUpdate:${o}`]:a.length&&i?n.withModifiers(i,a):i}}function f7(n,e,t,r,i){if(!e)return null;if(Bn(e))return{default:()=>e};if(Pe(e))return{default:()=>q0(t.__parseExpression(e))};if(Array.isArray(e)&&e.length>0){const a=v7(e),o=s=>!s||!i?{}:i?.id&&Object.keys(s).length?{[`scope_${i.id}`]:s}:{};return Object.entries(a).reduce((s,[l,{nodes:c,params:u}])=>(s[l]=p=>{const m=u.length?tg(p??{},u):o(p);return c.map(h=>Kr(h,t.__clone(m),n,r))},s),{})}return null}function v7(n){const e={default:{params:[],nodes:[]}};for(const t of n){const r=g7(t.slot),i=r.name;e[i]?(e[i].nodes.push(t),e[i].params=e[i].params.concat(r.params)):e[i]={nodes:[t],params:r.params}}return e}function g7(n="default"){return Bn(n)?{name:n,params:[]}:{params:[],...n}}function y7(n,e,t){const{value:r,iterator:i}=n,{item:a="item",index:o="index"}=i||{};let s=t.__parseExpression(r)||[];return Number.isInteger(s)&&(s=new Array(s).fill(!0).map((l,c)=>c+1)),Array.isArray(s)?s.map((l,c)=>e(t.__clone({[a]:l,[o]:c}))):(console.warn("[vForRender]:",`${r?.value} is not a Arrary`),[])}const bl=I({name:"VtjPageContainer",async setup(){const n=w7(),e=rd(),t=e.params.id,r=t?n.getPage(t):n.getHomepage(),i=r?await n.getRenderComponent(r.id):null;return r&&ed(r.title||"VTJ"),{provider:n,component:i,file:r,query:e.query}},render(){return this.component?Re(this.component,this.query):Re("div","页面不存在")}}),b7=I({name:"VtjStartupContainer",render(){return Re(Sy)}}),e2=Symbol("Provider");class t2 extends co{mode;globals={};modules={};adapter={request:qb,jsonp:m5};apis={};dependencies={};materials={};library={};service;project=null;components={};nodeEnv="development";router=null;materialPath="./";urlDslCaches={};constructor(e){super();const{service:t,mode:r=Je.Raw,dependencies:i,materials:a,project:o={},adapter:s={},globals:l={},modules:c={},router:u=null,materialPath:p="./",nodeEnv:m="development"}=e;this.mode=r,this.modules=c,this.service=t,this.router=u,this.materialPath=p,this.nodeEnv=m,i&&(this.dependencies=i),a&&(this.materials=a),Object.assign(this.globals,l),Object.assign(this.adapter,s),r!==Je.Design&&this.load(o)}async load(e){const t=this.modules[`.vtj/projects/${e.id}.json`];if(this.project=t?await t():await this.service.init(e),!this.project)throw new Error("project is null");const{dependencies:r=[],apis:i}=this.project,{dependencies:a,library:o,components:s,materialPath:l}=this,{libraryExports:c,libraryMap:u,materials:p,materialExports:m,materialMapLibrary:h}=J0(r,l),f=window;f.CKEDITOR_VERSION=void 0;for(const g of c){const k=a[g],b=f[g];if(b)o[g]=b;else if(k)f[g]=o[g]=await k();else{const w=u[g]||[];for(const S of w)Do(S)&&await Lb(g,vn.append(S,{v:Kn})),Oo(S)&&await ll(vn.append(S,{v:Kn}));o[g]=f[g]}}for(const g of p)await ll(vn.append(g,{v:Kn}));const v=this.materials||{};for(const g of m){const k=f[h[g]],b=hg[g];if(b)k&&b.forEach(w=>{s[w]=k[w]});else{const w=v[g]?(await v[g]()).default:f[g];w&&k&&(w.components||[]).forEach(S=>{s[S.name]=Aa(S,k)})}}i&&(this.apis=K0(i,this.adapter),Io(),this.project.config?.mock&&X0(i)),this.initRouter(),this.triggerReady()}initRouter(){const{router:e,project:t}=this;e&&(e.addRoute({path:"/page/:id",name:"VtjPage",component:bl}),e.addRoute({path:"/",name:"VtjHomepage",component:t?.homepage?bl:b7}))}install(e){const t=e.config.globalProperties.installed||{};for(const[r,i]of Object.entries(this.library))!t[r]&&Wb(i)&&(e.use(i),t[r]=!0);e.provide(e2,this),e.config.globalProperties.installed=t}getFile(e){const{blocks:t=[]}=this.project||{};return this.getPage(e)||t.find(r=>r.id===e)||null}getPage(e){const{pages:t=[]}=this.project||{},r=(i,a=[])=>{for(const o of a){if(o.id===i)return o;if(o.children&&o.children.length){const s=r(i,o.children);if(s)return s}}};return r(e,t)||null}getHomepage(){const{homepage:e}=this.project||{};return e?this.getPage(e):null}async getDsl(e){const t=this.modules[`.vtj/files/${e}.json`];return t?await t():this.service.getFile(e).catch(()=>null)}async getDslByUrl(e){return this.urlDslCaches[e]||(this.urlDslCaches[e]=this.adapter.request.send({url:e,method:"get",settings:{validSuccess:!1,originResponse:!0}}).then(r=>r.data).catch(()=>null))}createDslRenderer(e,t={}){const{library:r,components:i,mode:a,apis:o}=this,s={mode:a,Vue:r.Vue,components:i,libs:r,apis:o,window,...t},l=za({getDsl:async c=>await this.getDsl(c)||null,getDslByUrl:async c=>await this.getDslByUrl(c)||null,options:s});return Ba({...s,dsl:e,loader:l})}async getRenderComponent(e){const t=this.getFile(e);if(!t)return Ke.warn(`Can not find file: ${e}`),null;const r=`.vtj/vue/${e}.vue`,i=this.modules[r];if(i)return(await i())?.default;const a=await this.getDsl(t.id);return a?this.createDslRenderer(a).renderer:(Ke.warn(`Can not find dsl: ${e}`),null)}defineUrlSchemaComponent(e,t){return Ji(async()=>{const r=await this.getDslByUrl(e);return r?(r.name=t||r.name,this.createDslRenderer(r).renderer):null})}definePluginComponent(e){return Ji(async()=>{const t=await Q0(e,window);return t?(Y0(t.css),t.component):null})}}function q_(n){const e=new t2(n);return{provider:e,onReady:t=>e.ready(t)}}function w7(n={}){const e=Mt(e2);if(!e)throw new Error("Can not find provider");if(e.mode===Je.Raw&&e.nodeEnv==="development"){const{id:t,version:r}=n;t&&r&&(async()=>{const i=await e.getDsl(t);i?.__VERSION__!==r&&en.warning({title:i?.name,message:"当前组件源码版本与运行时版本不一致,请重新发布组件"})})()}return e}const Ro=new g0({settings:{type:"json",validSuccess:!0,originResponse:!1,failMessage:!0,validate:n=>n.data?.code===0,showError:n=>{en.error({message:n||"未知错误"})}}}),x7=(n="/vtj/local/repository/${type}.json")=>(e,t)=>Ro.send({url:n,method:"post",query:{type:e},data:{type:e,data:t}}),_7=(n="/vtj/local/repository/uploader.json")=>async(e,t)=>await Ro.send({url:n,method:"post",data:{files:e,projectId:t},settings:{type:"data"}}).then(r=>r&&r[0]?r[0]:null).catch(()=>null);class S7{api;pluginCaches={};uploader;constructor(){this.api=x7(),this.uploader=_7()}async init(e){return console.log("BaseService.init",e),{}}async saveProject(e){return!!await this.api("saveProject",e).catch(()=>!1)}async saveMaterials(e,t){return console.log("BaseService.saveMaterials",e,t),!1}async saveFile(e){return console.log("BaseService.saveFile",e),!1}async getFile(e){return console.log("BaseService.getFile",e),{}}async removeFile(e){return console.log("BaseService.removeFile",e),!1}async saveHistory(e){return console.log("BaseService.saveHistory",e),!1}async removeHistory(e){return console.log("BaseService.removeHistory",e),!1}async getHistory(e){return console.log("BaseService.getHistory",e),{}}async getHistoryItem(e,t){return console.log("BaseService.getHistoryItem",e,t),{}}async saveHistoryItem(e,t){return console.log("BaseService.saveHistoryItem",e,t),!1}async removeHistoryItem(e,t){return console.log("BaseService.removeHistoryItem",e,t),!1}async publish(e){return!!await this.api("publish",e).catch(()=>!1)}async publishFile(e,t){return!!await this.api("publishFile",{project:e,file:t}).catch(()=>!1)}async genVueContent(e,t){return await this.api("genVueContent",{project:e,dsl:t}).catch(()=>"")}async createRawPage(e){return await this.api("createRawPage",e).catch(()=>"")}async removeRawPage(e){return await this.api("removeRawPage",e).catch(()=>"")}async uploadStaticFile(e,t){return await this.uploader(e,t).catch(()=>null)}async getStaticFiles(e){return await this.api("getStaticFiles",e).catch(()=>[])}async removeStaticFile(e,t){return await this.api("removeStaticFile",{name:e,projectId:t}).catch(()=>"")}async clearStaticFiles(e){return await this.api("clearStaticFiles",e).catch(()=>"")}async getPluginMaterial(e){const{urls:t=[]}=e,r=t.filter(a=>Fb(a))[0];return r?this.pluginCaches[r]||(this.pluginCaches[r]=Ro.send({url:r,method:"get",settings:{validSuccess:!1,originResponse:!0}}).then(a=>a.data).catch(()=>null)):null}}new b0({type:"local",expired:0,prefix:"__VTJ_"});class G_ extends S7{getFileCaches={};async init(e){return await this.api("init",e).catch(()=>null)||{}}async saveProject(e){return!!await this.api("saveProject",e).catch(()=>!1)}async saveMaterials(e,t){return!!await this.api("saveMaterials",{project:e,materials:eg(t)}).catch(()=>!1)}async saveFile(e){return!!await this.api("saveFile",e).catch(()=>!1)}async getFile(e){return this.getFileCaches[e]||(this.getFileCaches[e]=this.api("getFile",e).catch(()=>null)).finally(()=>{delete this.getFileCaches[e]})}async removeFile(e){return!!await this.api("removeFile",e).catch(()=>!1)}async saveHistory(e){return!!await this.api("saveHistory",e).catch(()=>!1)}async removeHistory(e){return!!await this.api("removeHistory",e).catch(()=>!1)}async getHistory(e){return await this.api("getHistory",e).catch(()=>null)||{}}async getHistoryItem(e,t){return await this.api("getHistoryItem",{fId:e,id:t}).catch(()=>null)||{}}async saveHistoryItem(e,t){return!!await this.api("saveHistoryItem",{fId:e,item:t}).catch(()=>!1)}async removeHistoryItem(e,t){return!!await this.api("removeHistoryItem",{fId:e,ids:t}).catch(()=>!1)}}/**!
90
90
  * Copyright (c) 2024, VTJ.PRO All rights reserved.
91
91
  * @name @vtj/designer
92
92
  * @author CHC chenhuachun1549@dingtalk.com
93
- * @version 0.8.5
93
+ * @version 0.8.7
94
94
  * @license <a href="https://vtj.pro/license.html">MIT License</a>
95
- */const k7="0.8.5",wl={width:390,height:844},xl={width:1180,height:820},Ct=/^[A-Za-z_$][\:\w_-]*$/,j7=["click","dblclick","mouseenter","mouseleave","mousedown","mouseup","mouseover","contextmenu"],V7=["keydown","keyup","keypress"],C7=["GET","POST","PUT","PATCH","DELETE","JSONP"],$7=["stop","prevent","capture","self","once","passive"];var at=(n=>(n.Block="block",n.Node="node",n))(at||{});function n2(){const n=Le(),e=z(()=>n.project.value?.dependencies??[]),t=z(()=>n.project.value?.apis??[]);return{engine:n,dependencies:e,apis:t}}function Ht(n,e){const t=z(()=>u2.getWidgets(d(n),d(e)).filter(i=>!i.invisible)),r=D();return{widgets:t,widgetsRef:r}}function r2(){const n=Le();return{span:z(()=>{const e=n.skeleton?.skeletonRef.leftWidth||400,t=Math.min(Math.floor((e-50)/120),24);return Math.floor(24/t)}),engine:n}}function E7(){const n=Le(),e=z(()=>n.project.value?.blocks??[]);return{engine:n,blocks:e}}const A7=(n=[])=>n.map(e=>e.name);function T7(){const n=Le(),{components:e,groups:t,componentMap:r}=n.assets,i=Zt({}),a=z(()=>{const p={};return t.value&&t.value.forEach(m=>{p[m.name]=m}),p}),o=z(()=>t.value?t.value.map(p=>({label:`${p.label} (${p.count})`,name:p.name,disabled:!p.children?.length})):[]),s=D(o.value[0]?.name),l=D(""),c=z(()=>a.value[s.value]);jl(()=>{const p=o.value.reduce((m,h)=>(m[h.name]=A7(a.value[h.name].children),m),{});Object.assign(i,p)}),oe(o,p=>{p.length&&!s.value&&(s.value=p[0].name)},{immediate:!0});const u=z(()=>{const p=l.value.toLowerCase();return!p||!e?[]:e.filter(m=>m.name.toLowerCase().includes(p)||m.label?.toLowerCase().includes(p))});return{components:e,groups:t,componentMap:r,groupMap:a,tabs:o,model:i,currentTab:s,currentGroup:c,searchKey:l,searchResult:u}}function Ie(){const n=Le(),e=z(()=>n.current.value),t=z(()=>n.simulator.renderer?.context??null),r=z(()=>n.isEmptyCurrent.value);return{engine:n,current:e,isEmpty:r,context:t}}function B7(n,e,t,r){const i=Le();i.simulator.init(n,e,t,r);const a=z(()=>i.simulator.designer.value),o=z(()=>Li("hover",a.value?.hover.value)),s=z(()=>Li("dropping",a.value?.dropping.value)),l=z(()=>Li("selected",a.value?.selected.value));return oe(i.changed,()=>{a.value?.updateRect()}),{designer:a,dropping:s,hover:o,selected:l}}function z7(n,e=!0){const{top:t,height:r,width:i,left:a}=n||{};if(r>100&&i>200)return"inner";let o,s;return s=t>30?"top":"bottom",o=e||a<300&&i<300?"left":"right",[o,s].join("-")}function D7(n){const{rect:e,type:t}=n,{left:r,width:i,top:a,height:o}=e,s={left:r,width:i,top:a,height:o};switch(t){case"left":s.left=0,s.width=0;break;case"right":s.left=s.left+s.width-4,s.width=0;break;case"bottom":s.top=s.top+s.height-4,s.height=0;break;case"top":s.height=0;break}return s}function Li(n,e){if(!e)return null;const{left:t,top:r,width:i,height:a}=n==="dropping"?D7(e):e.rect,o={left:`${t}px`,top:`${r}px`,width:`${i}px`,height:`${a}px`,visibility:i||a?"visible":"hidden"};return{...e,style:o,position:z7(e.rect,n!=="selected")}}function wt(){const n=Le(),e=z(()=>n.simulator.designer.value),t=z(()=>e.value?.selected.value),r=z(()=>Ce(t.value?.model));return{engine:n,designer:e,selected:t,isSelectBlock:r}}function O7(n,e){const t=D(""),{selected:r,isSelectBlock:i}=wt(),a=z(()=>r.value?.model.id),o=z(()=>{const l=Gi(n),c=Gi(e),u=[];if(!l)return u;const p=c?.__contextRefs[a.value||""],m=c===p||i.value?[]:Object.keys(p?.context||{}).filter(S=>!["context","ref"].includes(S)).map(S=>`this.context.${S}`);m.length&&u.push({title:"上下文",items:m});const h=l.inject.map(S=>`this.${S.name}`);h.length&&u.push({title:"注入",items:h});const f=l.props.map(S=>typeof S=="string"?`this.props.${S}`:`this.props.${S.name}`);f.length&&u.push({title:"属性",items:f});const v=Object.keys(l.state).map(S=>`this.state.${S}`);v.length&&u.push({title:"状态",items:v});const g=Object.keys(l.computed).map(S=>`this.${S}.value`);g.length&&u.push({title:"计算属性",items:g});const k=Object.keys(l.methods).map(S=>`this.${S}`);k.length&&u.push({title:"方法",items:k});const b=Object.keys(l.dataSources).map(S=>`this.${S}`);b.length&&u.push({title:"数据源",items:b});const w=Object.keys(c?.$refs||{}).map(S=>`this.$refs.${S}`);return w.length&&u.push({title:"refs",items:w}),u}),s=z(()=>{if(!t.value)return o.value;const l=t.value.toLowerCase(),c=[];return o.value.forEach(u=>{const p=u.items.filter(m=>m.toLowerCase().includes(l));p.length&&c.push({title:u.title,items:p})}),c});return{keyword:t,options:o,searchResult:s}}const Er=[{name:"StringSetter",label:"文本"},{name:"ExpressionSetter",label:"表达式"}];function I7(n){const e=Le(),t=z(()=>{const l=n.value?.model||null;return Ce(l)?null:l}),r=D();oe(t,async l=>{l?.from?r.value=await e.assets.getBlockMaterial(l.from)||void 0:r.value=void 0},{immediate:!0});const i=z(()=>t.value?[{name:"key",setters:Er,value:t.value.getPropValue("key")},{name:"ref",setters:Er,value:t.value.getPropValue("ref")},{name:"class",label:"class",setters:Er,value:t.value.getPropValue("class")},{name:"children",label:"文本",title:"如设置组件文本,将清空子组件",setters:Er,value:Array.isArray(t.value.children)?"":t.value.children}]:[]),a=z(()=>{if(!t.value)return[];const l=r.value||e.assets.componentMap.get(t.value.name);return l?(l.props||[]).map(c=>({...c,value:t.value?.getPropValue(c.name)??c.defaultValue})):[]}),o=l=>i.value.some(c=>c.name===l)||a.value.some(c=>c.name===l)||l==="style",s=z(()=>t.value?Object.keys(t.value.props).filter(l=>!o(l)).map(l=>({name:l,setters:"InputSetter",value:t.value?.getPropValue(l)})):[]);return{commonProps:i,componentProps:a,customProps:s,node:t,change:(l,c)=>{t.value&&(l==="children"?t.value.setChildren(c):t.value.setProp(l,c))},addCustom:l=>{l&&t.value?.setProp(l,"")},removeCustom:l=>{t.value?.removeProp(l)},isExist:o}}function Ae(n,e="提示"){return en.warning({title:e,message:n})}async function On(n){return await Zr.confirm(n,"提示",{type:"warning"}).catch(()=>!1)}function We(n,e="success"){return yn({message:n,type:e})}function De(n,e,t=!1){let r=!0;try{n.type==="JSExpression"?gt(n,e,t,!0):Ta(n,e,t,!0)}catch(i){r=!1,en.error({title:"代码错误",message:i.message})}return r}function i2(){const n=Le(),e=z(()=>n.simulator.designer.value),t=z(()=>n.current.value?n.history.value:null),r=z(()=>t.value?.items.length||0),i=()=>{e.value?.cleanHelper(),t.value?.forward()},a=()=>{t.value?.backward(),e.value?.cleanHelper()},o=c=>{e.value?.cleanHelper(),t.value?.load(c),We("已载入历史记录","success")},s=z(()=>r.value<=1?!0:(t.value?.index||-1)<=0),l=z(()=>r.value<=1?!0:(t.value?.index||-1)>=r.value-1);return{engine:n,history:t,total:r,forward:i,backward:a,load:o,forwardDisabled:s,backwardDisabled:l}}function an(){const n=Le(),e=z(()=>n.project.value);return{engine:n,project:e}}function R7(n){const e=Le(),t=z(()=>{const s=n.value?.model||null;return!s||Ce(s)?null:s}),r=D();oe(t,async s=>{s?.from?r.value=await e.assets.getBlockMaterial(s.from)||void 0:r.value=void 0},{immediate:!0});const i=z(()=>{if(Ce(t.value))return[];const s=t.value?.events||{};return j7.map(l=>({name:l,event:s[l]}))}),a=z(()=>{if(Ce(t.value))return[];const s=t.value?.events||{};return V7.map(l=>({name:l,event:s[l]}))}),o=z(()=>{if(!t.value||Ce(t.value))return[];const s=t.value.events||{};return(r.value?.events||e.assets.componentMap.get(t.value.name)?.events||[]).map(l=>{const c=typeof l=="string"?l:l.name;return{name:c,event:s[c]}})});return{mouseEventList:i,keyboardEventList:a,componentEventList:o}}const M7=(n,e)=>new pn({name:n,value:void 0,iterator:e}),P7=(n="modelValue")=>new pn({name:"vModel",value:void 0,arg:n});function N7(n){if(!n)return[];const{props:e=[],events:t=[]}=n;if(e.length&&t.length){const r=t.filter(i=>(typeof i=="string"?i:i.name).startsWith("update:")).map(i=>i=typeof i=="string"?i:i.name);return r.length?e.filter(i=>r.some(a=>a.includes(i.name))):[]}return[]}function F7(n){const e=Le(),t=z(()=>{const p=n.value?.model||null;return Ce(p)?null:p}),r=p=>z(()=>t.value&&(t.value.directives||[]).find(m=>m.name===p)||M7(p)),i=()=>z(()=>{if(!t.value)return[];const p=e.assets.componentMap.get(t.value.name||"");return(p?N7(p):[]).map(m=>(t.value?.directives||[]).find(h=>h.name==="vModel"&&h.arg==m.name)||P7(m.name))}),a=r("vIf"),o=r("vShow"),s=r("vBind"),l=r("vFor"),c=i(),u={vIf:a,vShow:o,vBind:s,vFor:l};return{engine:e,node:t,vIf:a,vShow:o,vBind:s,vFor:l,vModels:c,onValueChange:(p,m)=>{const h=u[p];t.value&&(m?(h.value.value=m,t.value.setDirective(h.value)):(h.value.value=void 0,t.value.removeDirective(h.value)))},onForChange:(p,m)=>{if(t.value){if(p==="value"){m?(l.value.value=m,t.value.setDirective(l.value)):t.value.removeDirective(l.value);return}(p==="item"||p==="index")&&(l.value.iterator={...l.value.iterator,[p]:m||void 0},t.value.setDirective(l.value))}},onModelChange:(p,m)=>{if(!t.value)return;const h=parseInt(p),f=c.value[h];f&&(m?(f.value=m,t.value.setDirective(f)):(f.value=void 0,t.value.removeDirective(f)))}}}function H7(){const{engine:n,project:e}=an(),t=z(()=>e.value?.apis||[]);return{engine:n,project:e,apis:t}}const L7="data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1711803009570'%20class='icon'%20viewBox='0%200%201280%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='1500'%20width='320'%20height='256'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cpath%20d='M557.85%201023l-122-35.4c-12.8-3.6-20-17-16.4-29.8L692.45%2017.4c3.6-12.8%2017-20%2029.8-16.4l122%2035.4c12.8%203.6%2020%2017%2016.4%2029.8L587.65%201006.6c-3.8%2012.8-17%2020.2-29.8%2016.4z%20m-228-224.4l87-92.8c9.2-9.8%208.6-25.4-1.6-34.4L234.05%20512l181.2-159.4c10.2-9%2011-24.6%201.6-34.4l-87-92.8c-9-9.6-24.2-10.2-34-1L7.65%20494.4c-10.2%209.4-10.2%2025.6%200%2035l288.2%20270.2c9.8%209.2%2025%208.8%2034-1z%20m654.4%201.2l288.2-270.2c10.2-9.4%2010.2-25.6%200-35L984.25%20224.2c-9.6-9-24.8-8.6-34%201L863.25%20318c-9.2%209.8-8.6%2025.4%201.6%2034.4L1046.05%20512l-181.2%20159.4c-10.2%209-11%2024.6-1.6%2034.4l87%2092.8c9%209.8%2024.2%2010.2%2034%201.2z'%20fill='%230157fe'%20p-id='1501'%3e%3c/path%3e%3c/svg%3e",U7=["title","src"],W7={key:1},J7=I({name:"LogoWidget",inheritAttrs:!1,__name:"index",props:{icon:{},text:{default:"VTJ"},link:{}},setup(n){const{engine:e}=Ie(),t=n,r=z(()=>t.icon||e.project.value?.config?.logo||L7),i=()=>{t.link&&(location.href=t.link)};return(a,o)=>(y(),M("div",{class:"v-logo-widget",onClick:i},[r.value?(y(),M("img",{key:0,title:t.text,class:"v-logo-widget__icon",src:r.value},null,8,U7)):(y(),M("span",W7,te(t.text),1))]))}}),q7={class:"v-empty-widget"},G7=I({name:"EmptyWidget",__name:"index",setup(n){return(e,t)=>(y(),M("div",q7,"EmptyWidget"))}}),Y7={class:"v-switcher-widget"},K7={key:1},X7=I({name:"SwitcherWidget",inheritAttrs:!1,__name:"index",emits:["click"],setup(n,{emit:e}){const t=e,{engine:r}=Ie(),i=z(()=>r.project.value?.config?.title||r.project.value?.name),a=z(()=>r.project.value?.currentFile?.title),o=()=>{t("click",r.project.value)};return(s,l)=>(y(),M("div",Y7,[_(d(xe),{size:"small",round:"",onClick:o},{default:j(()=>[_(d(Su),{class:"v-switcher-widget__back"}),P("span",null,te(i.value),1),a.value?(y(),V(d(Qr),{key:0,direction:"vertical"})):R("",!0),a.value?(y(),M("span",K7,te(a.value),1)):R("",!0)]),_:1})]))}}),Q7={class:"v-toolbar-widget"},Z7=I({name:"ToolbarWidget",inheritAttrs:!1,__name:"index",props:{preview:{type:Boolean}},setup(n,{expose:e}){const t=n,{forward:r,backward:i,forwardDisabled:a,backwardDisabled:o}=i2(),s=D("pc");return e({mode:s}),(l,c)=>(y(),M("div",Q7,[_(d(Ua),{size:"small",modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=u=>s.value=u)},{default:j(()=>[_(d(qn),{label:"pc",value:"pc"},{default:j(()=>[_(d(Au))]),_:1}),_(d(qn),{label:"mobile",value:"mobile"},{default:j(()=>[_(d(Tu))]),_:1}),_(d(qn),{label:"pad",value:"pad"},{default:j(()=>[_(d(Bu))]),_:1})]),_:1},8,["modelValue"]),R("",!0),_(d(A2),null,{default:j(()=>[_(d(xe),{type:"default",size:"small",onClick:d(i),disabled:d(o)||!!t.preview},{default:j(()=>[_(d(Ou))]),_:1},8,["onClick","disabled"]),_(d(xe),{type:"default",size:"small",onClick:d(r),disabled:d(a)||!!t.preview},{default:j(()=>[_(d(zu))]),_:1},8,["onClick","disabled"])]),_:1})]))}}),e9={class:"v-actions-widget"},t9=P("span",null,"发布",-1),n9=I({name:"ActionsWidget",inheritAttrs:!1,__name:"index",props:{coder:{type:Boolean,default:!0}},setup(n){const{engine:e,designer:t}=wt(),r=D(!1),i=()=>{e.current.value?(r.value?e.skeleton?.getWidget("Previewer")?.widgetRef.refresh():(t.value?.setSelected(null),e.simulator.refresh()),We("刷新完成","success")):We("请先打开文件","warning")},a=async()=>{e.current.value?(r.value&&(e.skeleton?.closePreview(),r.value=!1,await ou(1e3)),t.value?.setSelected(e.current.value)):We("请先打开文件","warning")},o=()=>{if(e.project.value)if(e.current.value){if(r.value){e.skeleton?.closePreview(),r.value=!1;return}e.skeleton?.openPreview(""),r.value=!0}else We("请先打开文件","warning")},s=()=>{const c=e.project.value;c&&(c.currentFile?c.publish(c.currentFile):We("请先打开文件","warning"))},l=c=>{const u=e.project.value;u&&(c==="current"?s():u.publish())};return(c,u)=>(y(),M("div",e9,[R("",!0),R("",!0),_(d(xe),{onClick:o,type:r.value?"warning":"default",size:"small",title:"预览"},{default:j(()=>[_(d($u))]),_:1},8,["type"]),_(d(xe),{onClick:i,type:"default",size:"small",title:"刷新"},{default:j(()=>[_(d(Du))]),_:1}),_(d(xe),{type:"default",size:"small",title:"页面设置",onClick:a},{default:j(()=>[_(d(fo))]),_:1}),_(d(Qr),{direction:"vertical"}),_(d(Na),{"split-button":"",type:"primary",size:"small",onClick:s,onCommand:l},{dropdown:j(()=>[_(d(Pa),null,{default:j(()=>[_(d(Hr),{command:"current"},{default:j(()=>[le("发布页面")]),_:1}),_(d(Hr),{command:"project"},{default:j(()=>[le("整站发布")]),_:1})]),_:1})]),default:j(()=>[t9]),_:1})]))}}),r9={class:"v-icon-setter"},i9={class:"v-icon-setter__content"},a9={class:"v-icon-setter__list"},a2=I({name:"IconSetter",__name:"icon",props:{modelValue:{default:""},size:{default:"small"}},emits:["change","update:modelValue"],setup(n,{emit:e}){const t=n,r=e,i=D(!1),a=D(t.modelValue),o=D(""),s=z(()=>fa[t.modelValue]||t.modelValue),l=z(()=>{const h=Object.entries(fa);return o.value?h.filter(f=>f[0].toLowerCase().includes(o.value)):h}),c=h=>{a.value=h},u=()=>{r("change",a.value),r("update:modelValue",a.value),i.value=!1},p=()=>{a.value="",r("change",""),r("update:modelValue",""),i.value=!1},m=()=>{i.value=!0};return(h,f)=>(y(),M("div",r9,[_(d(Ye),{size:t.size,readonly:"",placeholder:"请选择图标","model-value":t.modelValue,"suffix-icon":d(Ml),onFocus:m},{prepend:j(()=>[_(d(it),{icon:s.value},null,8,["icon"])]),_:1},8,["size","model-value","suffix-icon"]),i.value?(y(),V(d(jt),{key:0,title:"图标选择器",width:"1000px",height:"600px",cancel:"",submit:"",clear:"",modelValue:i.value,"onUpdate:modelValue":f[1]||(f[1]=v=>i.value=v),onSubmit:u},{extra:j(()=>[_(d(xe),{size:"default",type:"warning",onClick:p},{default:j(()=>[le(" 清除绑定 ")]),_:1})]),default:j(()=>[P("div",i9,[_(d(Ye),{size:t.size,"prefix-icon":d(Pl),clearable:"",modelValue:o.value,"onUpdate:modelValue":f[0]||(f[0]=v=>o.value=v),placeholder:"请输入查询关键字"},null,8,["size","prefix-icon","modelValue"]),P("div",a9,[(y(!0),M(ne,null,ae(l.value,v=>(y(),V(d(it),{icon:v[1],onClick:g=>c(v[0]),class:ce({"is-active":a.value===v[0]})},null,8,["icon","onClick","class"]))),256)),l.value.length===0?(y(),V(d(ze),{key:0})):R("",!0)])])]),_:1},8,["modelValue"])):R("",!0)]))}}),o9=I({name:"PageForm",__name:"form",props:{item:{},parentId:{}},setup(n){const e=n,{project:t}=an(),r=z(()=>e.item?"编辑页面":"新增页面"),i=()=>({dir:!1,name:"",title:"",icon:"",mask:!0,hidden:!1,raw:!1}),a=D(e.item||i()),o=[{label:"页面",value:!1},{label:"目录",value:!0}],s=c=>{a.value&&(a.value.name=Wr(c))},l=async c=>t.value?.existPageName(c.name,[c.id])?(Ae("页面名称已存在,请更换"),!1):(e.item?t.value?.updatePage(c):t.value?.createPage(c,e.parentId),!0);return(c,u)=>(y(),V(d(Vt),{title:r.value,width:"800px",height:"500px","form-props":{tooltipMessage:!1},model:a.value,"submit-method":l},{default:j(()=>[_(d(ee),{name:"dir",label:"类型",editor:"radio",options:o,props:{button:!0,size:"small"},disabled:!!e.item,required:""},null,8,["disabled"]),_(d(ee),{name:"name",label:"名称",required:"",onChange:s,rules:{pattern:d(Ct),message:"名称格式不正确"}},null,8,["rules"]),_(d(ee),{name:"title",label:"标题",required:""}),_(d(ee),{name:"icon",label:"菜单图标",editor:"none"},{editor:j(()=>[_(a2,{modelValue:a.value.icon,"onUpdate:modelValue":u[0]||(u[0]=p=>a.value.icon=p),size:"default"},null,8,["modelValue"])]),_:1}),_(d(ee),{visible:{dir:!1},name:"mask",label:"包含母版",editor:"switch"}),_(d(ee),{name:"hidden",label:"隐藏菜单",editor:"switch"}),_(d(ee),{visible:{dir:!1},disabled:!!e.item,inline:"",name:"raw",label:"源码模式",editor:"switch",tip:"页面是非低代码开发,不能在线编辑"},null,8,["disabled"])]),_:1},8,["title","model"]))}}),_l=I({name:"VIcon",__name:"Icon",props:{icon:{},label:{},active:{type:Boolean,default:!1},open:{type:Boolean,default:!1}},emits:["click"],setup(n,{emit:e}){const t=n,r=e,i=z(()=>({"is-active":t.active,"is-open":t.open})),a=()=>{r("click")};return(o,s)=>(y(),V(d(Xr),{effect:"dark",placement:"right",content:o.label,"show-after":600},{default:j(()=>[P("div",{class:ce(["v-apps-region__icon",i.value]),onClick:a},[(y(),V(Ge(o.icon)))],2)]),_:1},8,["content"]))}}),fe=I({name:"VPanel",__name:"panel",props:{title:{},subtitle:{},plus:{type:Boolean},back:{type:Boolean},edit:{type:Boolean},remove:{type:Boolean},save:{type:Boolean},header:{type:Boolean,default:!0},collapsable:{type:Boolean}},emits:["plus","back","remove","save","edit"],setup(n,{emit:e}){const t=n,r=e,i=D(!1),a=z(()=>({"is-collapsed":!!i.value})),o=()=>{r("plus")},s=()=>{r("edit")},l=()=>{r("back")},c=()=>{r("remove")},u=()=>{r("save")},p=z(()=>t.header?{content:t.title,subtitle:t.subtitle,icon:t.back?J2:void 0,onClickBack:t.back?l:void 0,onClick:t.collapsable?()=>{i.value=!i.value}:void 0}:null),m=h=>{i.value=h};return(h,f)=>(y(),V(d(dr),{class:ce(["v-panel",a.value]),border:!1,header:p.value,fit:""},Kt({actions:j(()=>[t.plus?(y(),V(d(Be),{key:0,size:h.$attrs.size,mode:"icon",icon:d(go),background:"hover",title:"新增",onClick:o},null,8,["size","icon"])):R("",!0),t.edit?(y(),V(d(Be),{key:1,size:h.$attrs.size,mode:"icon",icon:d(Rl),background:"hover",title:"编辑",onClick:s},null,8,["size","icon"])):R("",!0),t.remove?(y(),V(d(Be),{key:2,size:h.$attrs.size,mode:"icon",icon:d(Dl),background:"hover",title:"清除",onClick:c},null,8,["size","icon"])):R("",!0),t.save?(y(),V(d(Be),{key:3,size:h.$attrs.size,mode:"icon",icon:d(Eu),background:"hover",title:"保存",onClick:u},null,8,["size","icon"])):R("",!0),t.collapsable?mt((y(),V(d(Be),{key:4,size:h.$attrs.size,mode:"icon",icon:d(Ml),background:"hover",title:"展开",onClick:f[0]||(f[0]=v=>m(!1))},null,8,["size","icon"])),[[Xt,i.value]]):R("",!0),t.collapsable?mt((y(),V(d(Be),{key:5,size:h.$attrs.size,mode:"icon",icon:d(q2),background:"hover",title:"收起",onClick:f[1]||(f[1]=v=>m(!0))},null,8,["size","icon"])),[[Xt,!i.value]]):R("",!0),de(h.$slots,"actions")]),default:j(()=>[de(h.$slots,"default")]),_:2},[h.$slots.footer?{name:"footer",fn:j(()=>[de(h.$slots,"footer")]),key:"0"}:void 0]),1032,["class","header"]))}}),s9={class:"v-tabs__header"},l9={key:0,class:"v-tabs__actions"},gi=I({__name:"tabs",props:{items:{default:()=>[]},menus:{},modelValue:{},stretch:{type:Boolean},checkable:{type:Boolean}},emits:["update:modelValue","command","remove","action-click"],setup(n,{emit:e}){const t=n,r=e,i=D((t.modelValue||t.items[0]?.name)??"");oe(i,()=>{r("update:modelValue",i.value)}),oe(()=>t.modelValue,l=>{i.value=l});const a=l=>{r("command",l)},o=l=>{r("remove",l)},s=l=>{r("action-click",l)};return(l,c)=>(y(),V(d(dr),{class:"v-tabs",border:!1,fit:"",radius:!1},{header:j(()=>[P("div",s9,[_(d(Co),{class:"v-tabs__tabs",items:t.items,type:"card",modelValue:i.value,"onUpdate:modelValue":c[0]||(c[0]=u=>i.value=u),onTabRemove:o,onActionClick:s,stretch:t.stretch},null,8,["items","modelValue","stretch"]),t.menus&&t.menus.length?(y(),M("div",l9,[t.menus&&t.menus.length?(y(),V(d(Be),{key:0,mode:"icon",size:"small",icon:d(Ja),background:"hover",dropdown:{size:"small",placement:"bottom-end"},menus:t.menus,onCommand:a},{item:j(({item:u})=>[P("span",null,[t.checkable?(y(),V(d(uo),{key:0,class:ce({"v-tabs__checked":!0,"is-checked":u.checked})},null,8,["class"])):R("",!0),le(" "+te(u.label),1)])]),_:1},8,["icon","menus"])):R("",!0)])):R("",!0)])]),default:j(()=>[de(l.$slots,"default")]),_:3}))}}),c9={key:2,class:"v-item__index"},u9={class:"v-item__content"},d9={key:3,class:"v-item__subtitle"},Me=I({name:"VItem",__name:"item",props:{icon:{},index:{},tag:{},tagType:{},title:{},subtitle:{},actions:{default:()=>[]},background:{type:Boolean},border:{type:Boolean},switch:{type:Boolean},modelValue:{},active:{type:Boolean},hover:{type:Boolean},small:{type:Boolean}},emits:["click","action","update:modelValue","switch"],setup(n,{emit:e}){const t={add:{label:"创建",icon:go},copy:{label:"复制",icon:po},edit:{label:"编辑",icon:vo},remove:{label:"删除",icon:lr},lock:{label:"锁定",icon:ho},unlock:{label:"解锁",icon:Cu},invisible:{label:"隐藏",icon:bo},visible:{label:"显示",icon:Hu},home:{label:"主页",icon:ku}},r=n,i=e,a=D(!!r.modelValue),o=z(()=>r.actions.map(u=>{const p=t[u];return{name:u,...p}})),s=z(()=>({"is-background":r.background,"is-border":r.border,"is-active":r.active,"is-hover":r.hover,"is-small":r.small})),l=()=>{i("click",r.modelValue)},c=async u=>{u==="remove"?await Zr.confirm("确定删除吗?","提示",{type:"warning"}).catch(()=>!1)&&i("action",{name:u,modelValue:r.modelValue}):i("action",{name:u,modelValue:r.modelValue})};return oe(a,u=>{i("update:modelValue",u),i("switch",u)}),oe(()=>r.modelValue,u=>{a.value=!!u}),(u,p)=>(y(),V(d(se),{class:ce(["v-item",s.value]),justify:"space-between",align:"center",onClick:l},{default:j(()=>[_(d(se),{class:"v-item__title",align:"center"},{default:j(()=>[de(u.$slots,"default",{},()=>[u.icon?(y(),V(d(it),{key:0,icon:u.icon},null,8,["icon"])):R("",!0),r.tag?(y(),V(d(N2),{key:1,class:"v-item__tag",size:"small",type:r.tagType},{default:j(()=>[le(te(r.tag),1)]),_:1},8,["type"])):R("",!0),u.index!==void 0?(y(),M("span",c9," # "+te(u.index),1)):R("",!0),P("span",u9,te(u.title),1),u.subtitle?(y(),M("span",d9,te(u.subtitle),1)):R("",!0)])]),_:3}),_(d(se),{class:"v-item__actions",onClick:p[1]||(p[1]=hn(()=>{},["stop"]))},{default:j(()=>[(y(!0),M(ne,null,ae(o.value,m=>(y(),V(d(Be),{name:m.name,title:m.label,mode:"icon",size:"small",background:"none",type:"info",icon:m.icon,onClick:h=>c(m.name)},null,8,["name","title","icon","onClick"]))),256)),r.switch?(y(),V(d(Fa),{key:0,modelValue:a.value,"onUpdate:modelValue":p[0]||(p[0]=m=>a.value=m),class:"v-item__switch",size:"small"},null,8,["modelValue"])):R("",!0),de(u.$slots,"status")]),_:3})]),_:3},8,["class"]))}}),p9=["draggable"],h9={class:"v-box__name"},m9={class:"v-box__label"},Da=I({name:"VBox",__name:"box",props:{name:{},title:{},editable:{type:Boolean},active:{type:Boolean},draggable:{type:Boolean},tag:{},tagType:{}},emits:["edit","remove","dragstart","dragend"],setup(n,{emit:e}){const t=n,r=e,i=()=>{r("edit")},a=async()=>{await Zr.confirm("确认删除?","提示",{type:"warning"}).catch(()=>!1)&&r("remove")},o=z(()=>({"is-active":t.active,"is-draggable":t.draggable})),s=()=>{r("dragstart",t)},l=()=>{r("dragend",t)};return(c,u)=>(y(),M("div",{class:ce(["v-box",o.value]),draggable:c.draggable,onDragstart:s,onDragend:l},[_(d(se),{direction:"column",justify:"center",align:"center"},{default:j(()=>[P("span",h9,te(t.name),1),P("span",m9,te(t.title),1)]),_:1}),t.editable?(y(),V(d(se),{key:0,class:"v-box__footer",justify:"flex-end",align:"center"},{default:j(()=>[_(d(it),{icon:d(vo),onClick:i},null,8,["icon"]),_(d(it),{icon:d(lr),onClick:a},null,8,["icon"])]),_:1})):R("",!0),t.tag?(y(),M("span",{key:1,class:ce(["v-box__tag",{[`is-${t.tagType}`]:!!t.tagType}])},te(t.tag),3)):R("",!0)],42,p9))}}),f9={class:"v-context-viewer"},v9=I({__name:"viewer",props:{context:{}},emits:["pick","copy"],setup(n,{emit:e}){const t=n,r=e,i=["$provider","$apis","$components","context"],a=u=>{const p=u.value,m=Ci(p);return m==="Object"||m==="Module"?Object.keys(p||{}).length===0:m==="Array"?p.length===0:!0},o=(u,p="this")=>typeof u=="object"?Array.isArray(u)?u.map((m,h)=>{const f=`[${h}]`;return{label:f,value:m,type:Ci(m),path:`${p}${f}`}}):Object.entries(u).map(([m,h])=>({label:m,value:h,type:Ci(h),path:`${p}.${m}`})).filter(m=>!m.label.startsWith("__")&&!i.includes(m.label)):[],s=(u,p)=>{if(u.level===0)p(o(t.context));else{const m=Dt(u.data.value);p(o(m,u.data.path))}},l=u=>{r("copy",u.path)},c=u=>{r("pick",u.path)};return(u,p)=>(y(),M("div",f9,[u.context?(y(),V(d(Wa),{key:0,lazy:"",load:s,"expand-on-click-node":!1,props:{isLeaf:a}},{default:j(({data:m})=>[_(Me,{title:m.label,clickable:"",onClick:h=>c(m),background:"",actions:["copy"],onAction:h=>l(m),grow:"",small:""},null,8,["title","onClick","onAction"])]),_:1},8,["props"])):R("",!0)]))}}),Mo=I({__name:"binder",props:{title:{},context:{},block:{},model:{},rules:{},modelValue:{type:Boolean},submitMethod:{type:Function},unbindEnabled:{type:Boolean}},emits:["unbind","submit","cancel","pick","update:modelValue","close"],setup(n,{emit:e}){const t=n,r=e,{searchResult:i,keyword:a}=O7(t.block,t.context),{copy:o}=td({}),s=[{name:"normal",label:"常用"},{name:"viewer",label:"高级"}],l=D("normal"),c=D(),u=async k=>{r("submit",k),t.submitMethod?await t.submitMethod(k)&&p():p()},p=()=>{r("update:modelValue",!1),r("close")},m=()=>{r("unbind")},h=()=>{p()},f=async()=>{c.value?.submit()},v=k=>{r("pick",k)},g=k=>{o(k),yn.success({message:"已经复制到粘贴板"})};return(k,b)=>(y(),V(d(jt),{"model-value":t.modelValue,class:"v-binder",title:k.title,width:"1000px",height:"600px","body-padding":!1,maximizable:!1,minimizable:!1,onClose:p},{default:j(()=>[_(d(se),{fit:"",direction:"row",overflow:"hidden"},{default:j(()=>[_(d(se),{width:"30%",height:"100%"},{default:j(()=>[_(gi,{class:"v-binder__tabs",items:s,modelValue:l.value,"onUpdate:modelValue":b[1]||(b[1]=w=>l.value=w)},{default:j(()=>[_(d(se),{class:"v-binder__tab-content",fit:"",padding:"",flex:!1},{default:j(()=>[mt(P("div",null,[_(d(Ye),{modelValue:d(a),"onUpdate:modelValue":b[0]||(b[0]=w=>qi(a)?a.value=w:null),size:"small",clearable:"","prefix-icon":d(Pl),placeholder:"筛选可用项"},null,8,["modelValue","prefix-icon"]),(y(!0),M(ne,null,ae(d(i),w=>(y(),M("div",null,[_(d(Qr),{"border-style":"dotted"},{default:j(()=>[le(te(w.title),1)]),_:2},1024),(y(!0),M(ne,null,ae(w.items,S=>(y(),V(Me,{title:S,background:"",actions:["copy"],small:"",onClick:C=>v(S),onAction:C=>g(S)},null,8,["title","onClick","onAction"]))),256))]))),256)),d(i).length?R("",!0):(y(),V(d(ze),{key:0}))],512),[[Xt,l.value==="normal"]]),mt(_(v9,{context:t.context,onCopy:g,onPick:v},null,8,["context"]),[[Xt,l.value==="viewer"]])]),_:1})]),_:1},8,["modelValue"])]),_:1}),_(d(dr),{grow:"",header:null,border:!1},{footer:j(()=>[_(d(se),{justify:"space-between"},{default:j(()=>[_(d(se),null,{default:j(()=>[k.unbindEnabled?(y(),V(d(xe),{key:0,type:"warning",size:"default",onClick:m},{default:j(()=>[le(" 移除绑定 ")]),_:1})):R("",!0)]),_:1}),_(d(se),null,{default:j(()=>[_(d(xe),{type:"default",size:"default",onClick:h},{default:j(()=>[le(" 取消 ")]),_:1}),_(d(xe),{type:"primary",size:"default",onClick:f},{default:j(()=>[le(" 确定 ")]),_:1})]),_:1})]),_:1})]),default:j(()=>[_(d(pi),{ref_key:"formRef",ref:c,class:"v-binder__form",footer:!1,"label-position":"top","tooltip-message":!1,model:t.model,rules:t.rules,"submit-method":u},{default:j(()=>[de(k.$slots,"default")]),_:3},8,["model","rules"])]),_:3})]),_:3})]),_:3},8,["model-value","title"]))}}),g9={class:"v-slots-picker__sn"},y9=I({__name:"slots",props:{slots:{default:()=>[]}},emits:["submit","update:modelValue"],setup(n,{emit:e}){const t=n,r=e,i=D(),a=z(()=>`${50*Math.ceil(t.slots.length/4)+180}px`),o=l=>{i.value=l},s=()=>{i.value?(r("submit",i.value),r("update:modelValue",!1)):Ae("请选择插槽")};return(l,c)=>(y(),V(d(jt),pe({class:"v-slots-picker",title:"选择插槽",width:"600px",height:a.value,submit:"",cancel:"",onSubmit:s},l.$attrs),{default:j(()=>[_(d(zl),{title:"该组件支持多个插槽,请选择放置到其中一个",type:"warning",closable:!1}),_(d(se),{class:"v-slots-picker__content",justify:"space-around",alignContent:"flex-start",gap:"",wrap:"wrap"},{default:j(()=>[(y(!0),M(ne,null,ae(t.slots,(u,p)=>(y(),V(d(se),{class:ce(["v-slots-picker__item",{"is-active":u.name===i.value?.name}]),grow:"",flex:!1,onClick:m=>o(u)},{default:j(()=>[P("span",g9,"#"+te(p+1),1),le(" "+te(u.name),1)]),_:2},1032,["class","onClick"]))),256))]),_:1})]),_:1},16,["height"]))}}),o2=I({name:"Viewport",__name:"viewport",props:{mode:{default:"pc"},width:{},height:{}},setup(n){const e=n,t=z(()=>[`is-${e.mode}`]),r=z(()=>{if(e.mode==="pc")return 1;const a=e.mode==="mobile"?wl:xl,{width:o,height:s}=a,l=o>0?(e.width||0)/o:1,c=s>0?(e.height||0)/s:1;return Math.min(l,c)}),i=z(()=>{if(e.mode==="pc")return{};const a=e.mode==="mobile"?wl:xl,{width:o,height:s}=a;return{width:`${o}px`,height:`${s}px`,left:"50%",top:"50%",transform:`translate(-50%, -50%) scale(${r.value})`}});return(a,o)=>(y(),M("div",{class:ce(["v-viewport",t.value]),style:Rt(i.value)},[de(a.$slots,"default")],6))}}),b9=I({name:"PagesWidget",__name:"index",setup(n){const{project:e,engine:t}=an(),r=z(()=>e.value?.pages||[]),{current:i}=Ie(),a=D(!1),o=D(),s=D(),l=()=>{s.value=void 0,o.value=void 0,a.value=!0},c=async h=>{const{name:f,modelValue:v}=h,{data:g,node:k}=v;if(f==="add"&&(o.value=void 0,s.value=g.id,a.value=!0),f==="edit"&&(o.value=Qt(g),s.value=void 0,a.value=!0),f==="remove"){if(g.dir){const b=e.value?.getPage(g.id);if(b&&b.children?.length){Ae("请先删除子页面");return}}e.value?.removePage(g.id)}if(f==="copy"){const b=k.parent?.data.id;e.value?.clonePage(g,b)}f==="home"&&(e.value?.setHomepage(g.id),We("设置主页成功","success"))},u=async h=>{h.raw&&We("这是源码模式页面,不能低代码设计","warning"),h.dir||h.raw?t.project.value?.deactivate():t.project.value?.active(h)},p=(h,f,v)=>v==="inner"?!!f.data.dir:!0,m=()=>{e.value?.update({pages:Gi(r)})};return(h,f)=>(y(),V(d(fe),{class:"v-pages-widget",title:"页面管理",plus:"",subtitle:"(共 0 条)",onPlus:l},{default:j(()=>[_(d(Wa),{data:r.value,"node-key":"id","default-expand-all":"",draggable:"","allow-drop":p,onNodeDrop:m},{default:j(({data:v,node:g})=>[_(d(Me),{class:"v-pages-widget__item",icon:d(fa)[v.icon],title:v.title,subtitle:v.name,"model-value":{data:v,node:g},actions:v.dir?["add","edit","remove"]:v.raw?["home","edit","remove"]:["home","copy","edit","remove"],onAction:c,onClick:k=>u(v),active:d(i)?.id===v.id,tag:d(e)?.homepage===v.id?"主页":void 0,"tag-type":"success",grow:"",small:"",background:"",hover:""},null,8,["icon","title","subtitle","model-value","actions","onClick","active","tag"])]),_:1},8,["data"]),a.value?(y(),V(o9,{key:0,modelValue:a.value,"onUpdate:modelValue":f[0]||(f[0]=v=>a.value=v),item:o.value,"parent-id":s.value},null,8,["modelValue","item","parent-id"])):R("",!0)]),_:1}))}}),w9={class:"v-file-setter"},Po=I({name:"FileSetter",__name:"file",props:{modelValue:{},attachment:{}},emits:["change","update:modelValue"],setup(n,{emit:e}){const t=n,r=e,{engine:i,project:a}=an(),o=D([]),s=D(!1),l=b=>Array.isArray(b)?b.map(w=>({name:w.filename,url:w.filepath})):b?{name:b.filename,url:b.filepath}:null,c=async b=>{if(i&&a.value){const w=await i.service.uploadStaticFile(b,a.value.id);return l(w)}return null},u=b=>b?(b||"").split(",").map(w=>({url:w})):[],p=D(u(t.modelValue)),m=z(()=>Array.isArray(p.value)?p.value.map(b=>b.url).join(","):p.value?p.value.url:"");oe(()=>t.modelValue,b=>{p.value=u(b)}),oe(s,async b=>{if(b){const w=await i.service.getStaticFiles(a.value?.id).catch(()=>null);o.value=l(w)}});const h=()=>{if(!p.value||Array.isArray(p.value)&&p.value.length===0)return Ae("请选择文件"),!1;const b=(t.attachment?.accept||"").toLowerCase().split(",");return b.length>0?[].concat(p.value).every(w=>{const S=w.name||w.url.split("?")[0],C=S.substring(S.lastIndexOf(".")).toLowerCase();return b.includes(C)})?!0:(Ae(`只支持 ${b.join(",")} 文件`),!1):!0},f=()=>{h()&&(r("change",m.value),r("update:modelValue",m.value),s.value=!1)},v=()=>{p.value=[],r("change",void 0),r("update:modelValue",void 0),s.value=!1},g=()=>{s.value=!0},k=b=>{b.name&&a.value?.id&&i.service.removeStaticFile(b.name,a.value?.id)};return(b,w)=>(y(),M("div",w9,[_(d(Ye),pe({readonly:"",onFocus:g,"model-value":t.modelValue,"suffix-icon":d(G2)},b.$attrs),null,16,["model-value","suffix-icon"]),s.value?(y(),V(d(jt),{key:0,modelValue:s.value,"onUpdate:modelValue":w[1]||(w[1]=S=>s.value=S),title:"文件选择器",width:"600px",height:"400px",cancel:"",submit:"",onSubmit:f},{extra:j(()=>[_(d(xe),{type:"warning",size:"default",onClick:v},{default:j(()=>[le(" 清除 ")]),_:1})]),default:j(()=>[_(d(Mb),pe({size:"small","list-type":"list",selectable:!0,uploader:c,"model-value":o.value,"select-value":p.value,"onUpdate:selectValue":w[0]||(w[0]=S=>p.value=S)},t.attachment,{onRemove:k}),null,16,["model-value","select-value"])]),_:1},8,["modelValue"])):R("",!0)]))}}),x9=I({name:"BlocksWidget",__name:"index",setup(n){const{span:e}=r2(),{blocks:t,engine:r}=E7(),i=[{label:"设计",value:"Schema",border:!0},{label:"引用",value:"UrlSchema",border:!0},{label:"插件",value:"Plugin",border:!0}],a={Schema:{label:"设计",type:"primary"},UrlSchema:{label:"引用",type:"warning"},Plugin:{label:"插件",type:"danger"}},o=D(void 0),{current:s}=Ie(),l=D(!1),c=z(()=>o.value?.id?"编辑区块":"新增区块"),u=z(()=>`(共 ${t.value.length} 个)`),p=()=>({fromType:"Schema",name:"",title:"",urls:"",library:"",type:"block"}),m=z(()=>{if(o.value?.fromType==="UrlSchema")return".json";if(o.value?.fromType==="Plugin")return".js,.css,.json"}),h=z(()=>o.value?.fromType==="Plugin"),f=async x=>{const $=x,E=r.project.value;if(!E)return!1;if(x.id)if(!E.existBlockName($.name,[$.id]))E.updateBlock($);else return Ae(`名称【${$.name}】已经存在,请更换名称`),!1;else if(!E.existBlockName($.name))E.createBlock($);else return Ae(`名称【${$.name}】已经存在,请更换名称`),!1;return!0},v=()=>{o.value=p(),l.value=!0},g=x=>{o.value=Qt(x),l.value=!0},k=x=>{r.project.value?.removeBlock(x.id)},b=x=>{o.value&&(o.value.name=Wr(x))},w=async x=>{(!x.fromType||x.fromType==="Schema")&&r.project.value?.active(x)},S=async x=>{const $=vg(x),E=await r.assets.getBlockMaterial($,x.name),U=r.skeleton?.getWidget("Designer")?.widgetRef?.designer;U&&E&&U.setDragging(E)},C=()=>{const x=r.skeleton?.getWidget("Designer")?.widgetRef?.designer;x&&x.setDragging(null)};return(x,$)=>(y(),V(d(fe),{class:"v-blocks-widget",title:"区块管理",subtitle:u.value,plus:"",onPlus:v},{default:j(()=>[_(d(Xi),{wrap:"wrap",gutter:5},{default:j(()=>[(y(!0),M(ne,null,ae(d(t),E=>(y(),V(d(Ki),{key:E.id,span:d(e)},{default:j(()=>[_(d(Da),{name:E.name,title:E.title,active:d(s)?.id===E.id,editable:"",tag:a[E.fromType||"Schema"]?.label,tagType:a[E.fromType||"Schema"]?.type,onEdit:U=>g(E),onRemove:U=>k(E),onClick:U=>w(E),draggable:d(s)?.id!==E.id,onDragstart:U=>S(E),onDragend:C},null,8,["name","title","active","tag","tagType","onEdit","onRemove","onClick","draggable","onDragstart"])]),_:2},1032,["span"]))),128))]),_:1}),d(t).length?R("",!0):(y(),V(d(ze),{key:0})),_(d(Vt),{modelValue:l.value,"onUpdate:modelValue":$[0]||($[0]=E=>l.value=E),title:c.value,model:o.value,width:"600px",height:"400px","form-props":{tooltipMessage:!1},"submit-method":f},{default:j(()=>[_(d(ee),{name:"fromType",label:"类型",required:"",editor:"radio",disabled:!!o.value?.id,options:i},null,8,["disabled"]),_(d(ee),{name:"name",label:"名称",required:"",tip:"名称为英文驼峰格式",rules:{message:"名称格式错误",pattern:d(Ct)},onChange:b},null,8,["rules"]),_(d(ee),{name:"title",label:"标题",required:""}),o.value?.fromType==="Plugin"?(y(),V(d(ee),{key:0,name:"library",label:"插件名称",required:""})):R("",!0),["Plugin","UrlSchema"].includes(o.value?.fromType||"")?(y(),V(d(ee),{key:1,name:"urls",label:"资源文件",required:"",editor:Po,props:{attachment:{accept:m.value,multiple:h.value}}},null,8,["props"])):R("",!0)]),_:1},8,["modelValue","title","model"])]),_:1},8,["subtitle"]))}}),_9={class:"v-components-widget__search"},S9={key:0,class:"v-components-widget__result"},k9={class:"v-components-widget__list"},j9=I({name:"ComponentsWidget",__name:"index",setup(n){const{span:e,engine:t}=r2(),{tabs:r,currentTab:i,currentGroup:a,model:o,searchKey:s,searchResult:l}=T7(),c=p=>{const m=t.skeleton?.getWidget("Designer")?.widgetRef?.designer;m&&m.setDragging(p)},u=()=>{const p=t.skeleton?.getWidget("Designer")?.widgetRef?.designer;p&&p.setDragging(null)};return(p,m)=>(y(),V(d(fe),{class:"v-components-widget",title:"组件库",body:{flex:!0,direction:"column"}},{default:j(()=>[P("div",_9,[_(d(Ye),{modelValue:d(s),"onUpdate:modelValue":m[0]||(m[0]=h=>qi(s)?s.value=h:null),placeholder:"搜索组件",clearable:"",size:"small"},{prefix:j(()=>[_(d(Wu))]),_:1},8,["modelValue"])]),d(s)?(y(),M("div",S9,[_(d(Xi),{wrap:"wrap",gutter:5},{default:j(()=>[(y(!0),M(ne,null,ae(d(l),h=>(y(),V(d(Ki),{span:d(e),key:h.name},{default:j(()=>[_(d(Da),{name:h.name,title:h.label||h.name,draggable:"",onDragstart:f=>c(h),onDragend:u},null,8,["name","title","onDragstart"])]),_:2},1032,["span"]))),128))]),_:1}),d(l).length?R("",!0):(y(),V(d(ze),{key:0}))])):(y(),V(d(Co),{key:1,items:d(r),modelValue:d(i),"onUpdate:modelValue":m[2]||(m[2]=h=>qi(i)?i.value=h:null)},{default:j(()=>[P("div",k9,[d(a)?(y(),V(d(T2),{key:0,modelValue:d(o)[d(i)],"onUpdate:modelValue":m[1]||(m[1]=h=>d(o)[d(i)]=h)},{default:j(()=>[(y(!0),M(ne,null,ae(d(a).children,h=>(y(),V(d(B2),{key:h.name,name:h.name,title:`${h.label} (${h.count})`},{default:j(()=>[h.components?(y(),V(d(Xi),{key:0,wrap:"wrap",gutter:5},{default:j(()=>[(y(!0),M(ne,null,ae(h.components,f=>(y(),V(d(Ki),{span:d(e),key:f.name},{default:j(()=>[_(d(Da),{name:f.name,title:f.label||f.name,draggable:"",onDragstart:v=>c(f),onDragend:u},null,8,["name","title","onDragstart"])]),_:2},1032,["span"]))),128))]),_:2},1024)):R("",!0)]),_:2},1032,["name","title"]))),128))]),_:1},8,["modelValue"])):R("",!0)])]),_:1},8,["items","modelValue"]))]),_:1}))}}),V9=I({name:"OutlineWidget",__name:"index",setup(n){const{engine:e,designer:t,selected:r}=wt(),{current:i}=Ie(),a=D([]),o=(x,$)=>{if($==="slot")return[];if(Ce(x))return x.locked?["unlock"]:["lock"];const E=x.parent;return E&&(E.locked||E.invisible)?[]:i.value?.locked?[]:x.locked?["unlock"]:x.invisible?["visible"]:["lock","invisible","copy","remove"]},s=(x,$)=>{const E={};if(!x.some(T=>T.slot))return l(x);for(const T of x){const B=T.slot?.name||"default";E[B]||(E[B]=[]),E[B].push(T)}const U=[];for(const[T,B]of Object.entries(E))U.push({id:`${$.id}-${T}`,label:`#${T}`,type:"slot",model:$,disabled:!0,children:l(B)});return U},l=x=>{const $=[];return x.forEach(E=>{const U={id:E.id,label:E.name,type:E.id,model:E};Array.isArray(E.children)&&(U.children=s(E.children,E)),$.push(U)}),$},c=()=>{if(!i.value)return[];const{id:x,name:$,nodes:E}=i.value;return[{id:x,label:$,type:x,model:i.value,children:l(E)}]},u=async()=>{a.value=c(),r.value?.model&&(await dt(),t.value?.setSelected(r.value.model))},p=z(()=>r.value?.model.id),m=x=>{const $=x.data;if($.type==="slot"||Ce($.model)||$.model.locked||$.model.name==="template")return!1;const E=e.assets.componentMap.get($.model.name);return E?(t.value?.setDragging(E),!0):!1},h=async(x,$,E)=>{const U=$.data,T={prev:"top",next:"bottom",inner:"inner"}[E];let B=!1;if(Ce(U.model))B=E==="inner",t.value?.setDropping(B?U.model:null,"inner");else{const F=U.model;B=!!await t.value?.allowDrop(F,T),t.value?.setDropping(B?F:null,"inner")}return B},f=x=>{const $=x?.model;if(!$||$.invisible||x.type==="slot"){t.value?.setSelected(null),t.value?.setHover(null);return}t.value?.setSelected($),t.value?.setHover(null)},v=async(x,$,E)=>{const U=x.data,T=$.data;if(Ce(T.model)){const N=U.model;delete N.slot,i.value?.move(N,void 0,"inner"),t.value?.setDropping(null),t.value?.setDragging(null);return}const B=T.model,F={before:"left",after:"right"}[E]||"inner";if(!await t.value?.allowDrop(B,F)){t.value?.setDropping(null),u(),yn.warning({message:`${U.model.name}不能放置到该位置`}),t.value?.setDragging(null);return}const A=await t.value?.getDropSlot(E==="inner"?B:B.parent);if(A!==null){const N=U.model;N.slot=A,i.value?.move(N,B,F)}else u();t.value?.setDropping(null),t.value?.setDragging(null),e.simulator.refresh()},g=x=>{if(x.type==="slot"){t.value?.setHover(null);return}Ce(x.model)?t.value?.setHover(x.model):(t.value?.setHover(x.model),x.model.invisible&&t.value?.setHover(null),x.model.name==="slot"&&t.value?.setHover(null))},k=()=>{t.value?.setHover(null)},b=x=>{const $=x.data;$.dragging=!0;const E=e.assets.componentMap.get($.model.name);E&&t.value?.setDragging(E)},w=async x=>{const $=x.data;$.dragging=!1},S=(x,$)=>{x&&((x.id===$.id||!Ce(x)&&$.isChild(x))&&t.value?.setSelected(null),t.value?.setHover(null))},C=x=>{const{name:$,modelValue:E}=x,U=r.value?.model;switch($){case"lock":S(U,E),E.lock();break;case"unlock":S(U,E),E.unlock();break;case"invisible":S(U,E),E.setVisible(!1);break;case"visible":E.setVisible(!0);break;case"copy":const T=i.value?.cloneNode(E);T&&t.value?.setSelected(T);break;case"remove":S(U,E),i.value?.removeNode(E);break}};return oe(e.changed,u,{immediate:!0}),(x,$)=>(y(),V(d(fe),{class:"v-outline-widget",title:"大纲树"},{default:j(()=>[(y(),V(d(Wa),{key:d(e).changed.value,data:a.value,"node-key":"id","default-expand-all":"",draggable:"","empty-text":"请新建或打开文件","current-node-key":p.value,"highlight-current":!0,"expand-on-click-node":!1,"allow-drop":h,"allow-drag":m,onCurrentChange:f,onNodeDrop:v,onNodeDragStart:b,onNodeDragEnd:w},{default:j(({data:E,node:U})=>[_(d(Me),{class:ce(["v-outline-widget__item",{"is-locked":E.model.locked,"is-invisible":E.model.invisible,"is-dragging":E.dragging,"is-slot":E.type==="slot"}]),active:!E.model.invisible&&U.isCurrent&&E.type!=="slot",grow:"",small:"",background:"",hover:"","model-value":E.model,icon:E.model.locked?d(ho):E.model.invisible?d(bo):void 0,title:E.label,subtitle:E.type,actions:o(E.model,E.type),onAction:C,onMouseenter:T=>g(E),onMouseleave:k},null,8,["class","active","model-value","icon","title","subtitle","actions","onMouseenter"])]),_:1},8,["data","current-node-key"]))]),_:1}))}}),C9=I({name:"HistoryWidget",__name:"index",setup(n){const{history:e,load:t,total:r}=i2(),i=z(()=>`(共 ${r.value} 条)`),a=s=>{s.name==="remove"&&e.value?.remove(s.modelValue.id)},o=async()=>{await On("确定要清空历史记录吗?")&&e.value?.clear()};return(s,l)=>(y(),V(d(fe),{class:"v-history-widget",title:"历史记录",subtitle:i.value,remove:!!d(r),onRemove:o},{default:j(()=>[d(r)===0?(y(),V(d(ze),{key:0,"image-size":50})):R("",!0),d(e)?(y(!0),M(ne,{key:1},ae(d(e).items,(c,u)=>(y(),V(d(Me),{index:u+1,title:c.label,"model-value":c,active:u==d(e).index,small:"",background:"",actions:["remove"],onAction:a,onClick:p=>d(t)(c.id)},null,8,["index","title","model-value","active","onClick"]))),256)):R("",!0)]),_:1},8,["subtitle","remove"]))}}),$9=I({__name:"base-info",setup(n){const e=C7.map(t=>({label:t,value:t.toLowerCase()}));return(t,r)=>(y(),M("div",null,[_(d(ee),{name:"method",label:"请求类型",required:"",editor:"radio",options:d(e)},null,8,["options"]),_(d(ee),{name:"name",label:"接口名称",required:"",rules:{pattern:d(Ct),message:"名称格式不正确"}},null,8,["rules"]),_(d(ee),{name:"label",label:"备注说明",required:""}),_(d(ee),{name:"url",label:"接口URL",required:""})]))}}),Te=Ji({loader:()=>p2(()=>import("./Editor-BKlikwSl-BjFYNt7y.js"),__vite__mapDeps([0,1,2,3]),import.meta.url),loadingComponent:I({render(){return Re("div","正在拼命加载...")}}),errorComponent:I({render(){return Re("div","组件加载失败!")}})}),E9=I({__name:"request-settings",setup(n){const e=[{label:"表单",value:"form"},{label:"JSON",value:"json"},{label:"文件",value:"data"}],t=Mt("currentModel",null);return(r,i)=>(y(),M("div",null,[_(d(se),{justify:"space-between"},{default:j(()=>[_(d(ee),{name:"settings.loading",size:"small",label:"加载提示",editor:"switch"}),_(d(ee),{size:"small",name:"settings.failMessage",label:"失败提示",editor:"switch"}),_(d(ee),{size:"small",name:"settings.validSuccess",label:"校验成功",editor:"switch"}),_(d(ee),{size:"small",name:"settings.originResponse",label:"原始响应",editor:"switch"}),_(d(ee),{size:"small",name:"settings.injectHeaders",label:"注入请求头",editor:"switch"})]),_:1}),_(d(ee),{size:"small",name:"settings.type",label:"发送数据类型",editor:"radio",options:e,props:{button:!0}}),_(d(ee),{size:"small",name:"headers.value",label:"请求头配置",tip:"支持 JSExpression 或 JSFunction"},{editor:j(()=>[_(d(Te),{dark:"",height:"260px",modelValue:d(t).headers.value,"onUpdate:modelValue":i[0]||(i[0]=a=>d(t).headers.value=a)},null,8,["modelValue"])]),_:1})]))}}),A9=I({__name:"jsonp-options",setup(n){return(e,t)=>(y(),M("div",null,[_(d(ee),{name:"jsonpOptions.jsonpCallback",size:"small",label:"jsonpCallback"}),_(d(ee),{name:"jsonpOptions.jsonpCallbackFunction",size:"small",label:"jsonpCallbackFunction"}),_(d(ee),{name:"jsonpOptions.timeout",size:"small",label:"timeout",editor:"number"}),_(d(ee),{name:"jsonpOptions.crossorigin",size:"small",label:"crossorigin",editor:"switch"})]))}}),T9=P("span",null,"模拟数据模板",-1),B9=I({__name:"mock-template",setup(n){const e=Mt("currentModel",null),{project:t}=an(),r=z(()=>t.value?.config||{}),i=()=>{window.open("https://vtj.pro/help/mock.html")};return(a,o)=>(y(),M("div",null,[r.value.mock?R("",!0):(y(),V(d(zl),{key:0,type:"warning",title:"需要在项目配置中开启模拟数据",closable:!1,style:{"margin-bottom":"20px"}})),_(d(ee),{size:"small",name:"mock",label:"开启模拟数据",disabled:!r.value.mock,editor:"switch"},null,8,["disabled"]),_(d(se),{justify:"space-between"},{default:j(()=>[T9,_(d(Be),{icon:d(yo),mode:"text",label:"帮助",onClick:i},null,8,["icon"])]),_:1}),_(d(ee),{size:"small",name:"mockTemplate.value",label:" "},{editor:j(()=>[_(d(Te),{dark:"",height:r.value.mock?"330px":"280px",lang:"typescript",disabled:!r.value.mock,readonly:!r.value.mock,modelValue:d(e).mockTemplate.value,"onUpdate:modelValue":o[0]||(o[0]=s=>d(e).mockTemplate.value=s)},null,8,["height","disabled","readonly","modelValue"])]),_:1})]))}}),z9={key:0},D9=I({__name:"form",props:{model:{},project:{}},setup(n){const e=n,t=z(()=>e.model?"编辑API":"新增API"),r=D("base"),i=D(),a=D(),o=D(e.model||{}),s=D(!1),l=D(""),c=[{label:"基础信息",value:"base"},{label:"请求配置",value:"settings"},{label:"模拟数据",value:"mock"}];Wi("currentModel",o);const u=z(()=>o.value?.method==="jsonp");oe(()=>e.model,v=>{o.value=Object.assign({},v||{}),r.value="base"},{immediate:!0}),oe(r,async()=>{a.value?.formRef.validate(async v=>{v||(await dt(),r.value="base")})});const p=()=>{i.value?.cancel()},m=()=>{a.value?.submit()},h=async v=>e.project?.existApiName(o.value.name,e.model?[o.value.id]:[])?(Ae(`API名称 [ ${o.value.name} ] 已存在`),!1):o.value.headers&&!De(o.value.headers,window)||o.value.mockTemplate&&!De(o.value.mockTemplate,window)?!1:(e.project?.setApi(o.value),i.value?.close(),!0),f=()=>{if(o.value.mockTemplate){const v=gt(o.value.mockTemplate,{},!0),{url:g,method:k}=o.value,b=Xn.mock(v({url:g,type:k}));l.value=JSON.stringify(b,null,2),s.value=!0}};return(v,g)=>(y(),V(d(jt),{ref_key:"dialogRef",ref:i,title:t.value,width:"1000px",height:"600px"},{default:j(()=>[_(d(se),{fit:""},{default:j(()=>[_(d(se),{width:"100px",shrink:!1},{default:j(()=>[_(d(Co),{modelValue:r.value,"onUpdate:modelValue":g[0]||(g[0]=k=>r.value=k),items:c,"tab-position":"left",border:"",fit:""},null,8,["modelValue"])]),_:1}),_(d(dr),{header:null,border:!1,overflow:"auto",grow:"",shrink:!0,fit:""},{footer:j(()=>[_(d(se),{justify:"space-between"},{default:j(()=>[P("div",null,[r.value==="mock"?(y(),V(d(xe),{key:0,disabled:!e.project?.config?.mock,type:"warning",onClick:f},{default:j(()=>[le(" 预览 ")]),_:1},8,["disabled"])):R("",!0)]),P("div",null,[_(d(xe),{onClick:p},{default:j(()=>[le("取消")]),_:1}),_(d(xe),{type:"primary",onClick:m},{default:j(()=>[le("保存")]),_:1})])]),_:1})]),default:j(()=>[_(d(pi),{ref_key:"formRef",ref:a,footer:!1,labelPosition:"top",tooltipMessage:!1,model:o.value,submitMethod:h},{default:j(()=>[mt(_($9,null,null,512),[[Xt,r.value==="base"]]),r.value==="settings"?(y(),M("div",z9,[u.value?(y(),V(A9,{key:0})):(y(),V(E9,{key:1}))])):R("",!0),r.value==="mock"?(y(),V(B9,{key:1})):R("",!0)]),_:1},8,["model"])]),_:1})]),_:1}),s.value?(y(),V(d(Bl),{key:0,class:"v-drawer",modelValue:s.value,"onUpdate:modelValue":g[1]||(g[1]=k=>s.value=k),title:"模拟数据结果",direction:"btt","append-to-body":"",size:"80%"},{default:j(()=>[_(d(Te),{"model-value":l.value,border:"",dark:"",height:"100%",lang:"json"},null,8,["model-value"])]),_:1},8,["modelValue"])):R("",!0)]),_:1},8,["title"]))}}),O9=I({name:"ApisWidget",__name:"index",setup(n){const e=D(!1),t=D(null),r=D(!1),i=z(()=>a.value?.apis||[]),{project:a}=an(),o=()=>({id:"",method:"get",name:"",label:"",url:"",settings:{loading:!0,failMessage:!0,validSuccess:!0,originResponse:!1,injectHeaders:!1,type:"form"},headers:{type:"JSExpression",value:"({})"},jsonpOptions:{},mock:!1,mockTemplate:{type:"JSFunction",value:`(req) => {
95
+ */const k7="0.8.7",wl={width:390,height:844},xl={width:1180,height:820},Ct=/^[A-Za-z_$][\:\w_-]*$/,j7=["click","dblclick","mouseenter","mouseleave","mousedown","mouseup","mouseover","contextmenu"],V7=["keydown","keyup","keypress"],C7=["GET","POST","PUT","PATCH","DELETE","JSONP"],$7=["stop","prevent","capture","self","once","passive"];var at=(n=>(n.Block="block",n.Node="node",n))(at||{});function n2(){const n=Le(),e=z(()=>n.project.value?.dependencies??[]),t=z(()=>n.project.value?.apis??[]);return{engine:n,dependencies:e,apis:t}}function Ht(n,e){const t=z(()=>u2.getWidgets(d(n),d(e)).filter(i=>!i.invisible)),r=D();return{widgets:t,widgetsRef:r}}function r2(){const n=Le();return{span:z(()=>{const e=n.skeleton?.skeletonRef.leftWidth||400,t=Math.min(Math.floor((e-50)/120),24);return Math.floor(24/t)}),engine:n}}function E7(){const n=Le(),e=z(()=>n.project.value?.blocks??[]);return{engine:n,blocks:e}}const A7=(n=[])=>n.map(e=>e.name);function T7(){const n=Le(),{components:e,groups:t,componentMap:r}=n.assets,i=Zt({}),a=z(()=>{const p={};return t.value&&t.value.forEach(m=>{p[m.name]=m}),p}),o=z(()=>t.value?t.value.map(p=>({label:`${p.label} (${p.count})`,name:p.name,disabled:!p.children?.length})):[]),s=D(o.value[0]?.name),l=D(""),c=z(()=>a.value[s.value]);jl(()=>{const p=o.value.reduce((m,h)=>(m[h.name]=A7(a.value[h.name].children),m),{});Object.assign(i,p)}),oe(o,p=>{p.length&&!s.value&&(s.value=p[0].name)},{immediate:!0});const u=z(()=>{const p=l.value.toLowerCase();return!p||!e?[]:e.filter(m=>m.name.toLowerCase().includes(p)||m.label?.toLowerCase().includes(p))});return{components:e,groups:t,componentMap:r,groupMap:a,tabs:o,model:i,currentTab:s,currentGroup:c,searchKey:l,searchResult:u}}function Ie(){const n=Le(),e=z(()=>n.current.value),t=z(()=>n.simulator.renderer?.context??null),r=z(()=>n.isEmptyCurrent.value);return{engine:n,current:e,isEmpty:r,context:t}}function B7(n,e,t,r){const i=Le();i.simulator.init(n,e,t,r);const a=z(()=>i.simulator.designer.value),o=z(()=>Li("hover",a.value?.hover.value)),s=z(()=>Li("dropping",a.value?.dropping.value)),l=z(()=>Li("selected",a.value?.selected.value));return oe(i.changed,()=>{a.value?.updateRect()}),{designer:a,dropping:s,hover:o,selected:l}}function z7(n,e=!0){const{top:t,height:r,width:i,left:a}=n||{};if(r>100&&i>200)return"inner";let o,s;return s=t>30?"top":"bottom",o=e||a<300&&i<300?"left":"right",[o,s].join("-")}function D7(n){const{rect:e,type:t}=n,{left:r,width:i,top:a,height:o}=e,s={left:r,width:i,top:a,height:o};switch(t){case"left":s.left=0,s.width=0;break;case"right":s.left=s.left+s.width-4,s.width=0;break;case"bottom":s.top=s.top+s.height-4,s.height=0;break;case"top":s.height=0;break}return s}function Li(n,e){if(!e)return null;const{left:t,top:r,width:i,height:a}=n==="dropping"?D7(e):e.rect,o={left:`${t}px`,top:`${r}px`,width:`${i}px`,height:`${a}px`,visibility:i||a?"visible":"hidden"};return{...e,style:o,position:z7(e.rect,n!=="selected")}}function wt(){const n=Le(),e=z(()=>n.simulator.designer.value),t=z(()=>e.value?.selected.value),r=z(()=>Ce(t.value?.model));return{engine:n,designer:e,selected:t,isSelectBlock:r}}function O7(n,e){const t=D(""),{selected:r,isSelectBlock:i}=wt(),a=z(()=>r.value?.model.id),o=z(()=>{const l=Gi(n),c=Gi(e),u=[];if(!l)return u;const p=c?.__contextRefs[a.value||""],m=c===p||i.value?[]:Object.keys(p?.context||{}).filter(S=>!["context","ref"].includes(S)).map(S=>`this.context.${S}`);m.length&&u.push({title:"上下文",items:m});const h=l.inject.map(S=>`this.${S.name}`);h.length&&u.push({title:"注入",items:h});const f=l.props.map(S=>typeof S=="string"?`this.props.${S}`:`this.props.${S.name}`);f.length&&u.push({title:"属性",items:f});const v=Object.keys(l.state).map(S=>`this.state.${S}`);v.length&&u.push({title:"状态",items:v});const g=Object.keys(l.computed).map(S=>`this.${S}.value`);g.length&&u.push({title:"计算属性",items:g});const k=Object.keys(l.methods).map(S=>`this.${S}`);k.length&&u.push({title:"方法",items:k});const b=Object.keys(l.dataSources).map(S=>`this.${S}`);b.length&&u.push({title:"数据源",items:b});const w=Object.keys(c?.$refs||{}).map(S=>`this.$refs.${S}`);return w.length&&u.push({title:"refs",items:w}),u}),s=z(()=>{if(!t.value)return o.value;const l=t.value.toLowerCase(),c=[];return o.value.forEach(u=>{const p=u.items.filter(m=>m.toLowerCase().includes(l));p.length&&c.push({title:u.title,items:p})}),c});return{keyword:t,options:o,searchResult:s}}const Er=[{name:"StringSetter",label:"文本"},{name:"ExpressionSetter",label:"表达式"}];function I7(n){const e=Le(),t=z(()=>{const l=n.value?.model||null;return Ce(l)?null:l}),r=D();oe(t,async l=>{l?.from?r.value=await e.assets.getBlockMaterial(l.from)||void 0:r.value=void 0},{immediate:!0});const i=z(()=>t.value?[{name:"key",setters:Er,value:t.value.getPropValue("key")},{name:"ref",setters:Er,value:t.value.getPropValue("ref")},{name:"class",label:"class",setters:Er,value:t.value.getPropValue("class")},{name:"children",label:"文本",title:"如设置组件文本,将清空子组件",setters:Er,value:Array.isArray(t.value.children)?"":t.value.children}]:[]),a=z(()=>{if(!t.value)return[];const l=r.value||e.assets.componentMap.get(t.value.name);return l?(l.props||[]).map(c=>({...c,value:t.value?.getPropValue(c.name)??c.defaultValue})):[]}),o=l=>i.value.some(c=>c.name===l)||a.value.some(c=>c.name===l)||l==="style",s=z(()=>t.value?Object.keys(t.value.props).filter(l=>!o(l)).map(l=>({name:l,setters:"InputSetter",value:t.value?.getPropValue(l)})):[]);return{commonProps:i,componentProps:a,customProps:s,node:t,change:(l,c)=>{t.value&&(l==="children"?t.value.setChildren(c):t.value.setProp(l,c))},addCustom:l=>{l&&t.value?.setProp(l,"")},removeCustom:l=>{t.value?.removeProp(l)},isExist:o}}function Ae(n,e="提示"){return en.warning({title:e,message:n})}async function On(n){return await Zr.confirm(n,"提示",{type:"warning"}).catch(()=>!1)}function We(n,e="success"){return yn({message:n,type:e})}function De(n,e,t=!1){let r=!0;try{n.type==="JSExpression"?gt(n,e,t,!0):Ta(n,e,t,!0)}catch(i){r=!1,en.error({title:"代码错误",message:i.message})}return r}function i2(){const n=Le(),e=z(()=>n.simulator.designer.value),t=z(()=>n.current.value?n.history.value:null),r=z(()=>t.value?.items.length||0),i=()=>{e.value?.cleanHelper(),t.value?.forward()},a=()=>{t.value?.backward(),e.value?.cleanHelper()},o=c=>{e.value?.cleanHelper(),t.value?.load(c),We("已载入历史记录","success")},s=z(()=>r.value<=1?!0:(t.value?.index||-1)<=0),l=z(()=>r.value<=1?!0:(t.value?.index||-1)>=r.value-1);return{engine:n,history:t,total:r,forward:i,backward:a,load:o,forwardDisabled:s,backwardDisabled:l}}function an(){const n=Le(),e=z(()=>n.project.value);return{engine:n,project:e}}function R7(n){const e=Le(),t=z(()=>{const s=n.value?.model||null;return!s||Ce(s)?null:s}),r=D();oe(t,async s=>{s?.from?r.value=await e.assets.getBlockMaterial(s.from)||void 0:r.value=void 0},{immediate:!0});const i=z(()=>{if(Ce(t.value))return[];const s=t.value?.events||{};return j7.map(l=>({name:l,event:s[l]}))}),a=z(()=>{if(Ce(t.value))return[];const s=t.value?.events||{};return V7.map(l=>({name:l,event:s[l]}))}),o=z(()=>{if(!t.value||Ce(t.value))return[];const s=t.value.events||{};return(r.value?.events||e.assets.componentMap.get(t.value.name)?.events||[]).map(l=>{const c=typeof l=="string"?l:l.name;return{name:c,event:s[c]}})});return{mouseEventList:i,keyboardEventList:a,componentEventList:o}}const M7=(n,e)=>new pn({name:n,value:void 0,iterator:e}),P7=(n="modelValue")=>new pn({name:"vModel",value:void 0,arg:n});function N7(n){if(!n)return[];const{props:e=[],events:t=[]}=n;if(e.length&&t.length){const r=t.filter(i=>(typeof i=="string"?i:i.name).startsWith("update:")).map(i=>i=typeof i=="string"?i:i.name);return r.length?e.filter(i=>r.some(a=>a.includes(i.name))):[]}return[]}function F7(n){const e=Le(),t=z(()=>{const p=n.value?.model||null;return Ce(p)?null:p}),r=p=>z(()=>t.value&&(t.value.directives||[]).find(m=>m.name===p)||M7(p)),i=()=>z(()=>{if(!t.value)return[];const p=e.assets.componentMap.get(t.value.name||"");return(p?N7(p):[]).map(m=>(t.value?.directives||[]).find(h=>h.name==="vModel"&&h.arg==m.name)||P7(m.name))}),a=r("vIf"),o=r("vShow"),s=r("vBind"),l=r("vFor"),c=i(),u={vIf:a,vShow:o,vBind:s,vFor:l};return{engine:e,node:t,vIf:a,vShow:o,vBind:s,vFor:l,vModels:c,onValueChange:(p,m)=>{const h=u[p];t.value&&(m?(h.value.value=m,t.value.setDirective(h.value)):(h.value.value=void 0,t.value.removeDirective(h.value)))},onForChange:(p,m)=>{if(t.value){if(p==="value"){m?(l.value.value=m,t.value.setDirective(l.value)):t.value.removeDirective(l.value);return}(p==="item"||p==="index")&&(l.value.iterator={...l.value.iterator,[p]:m||void 0},t.value.setDirective(l.value))}},onModelChange:(p,m)=>{if(!t.value)return;const h=parseInt(p),f=c.value[h];f&&(m?(f.value=m,t.value.setDirective(f)):(f.value=void 0,t.value.removeDirective(f)))}}}function H7(){const{engine:n,project:e}=an(),t=z(()=>e.value?.apis||[]);return{engine:n,project:e,apis:t}}const L7="data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1711803009570'%20class='icon'%20viewBox='0%200%201280%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='1500'%20width='320'%20height='256'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cpath%20d='M557.85%201023l-122-35.4c-12.8-3.6-20-17-16.4-29.8L692.45%2017.4c3.6-12.8%2017-20%2029.8-16.4l122%2035.4c12.8%203.6%2020%2017%2016.4%2029.8L587.65%201006.6c-3.8%2012.8-17%2020.2-29.8%2016.4z%20m-228-224.4l87-92.8c9.2-9.8%208.6-25.4-1.6-34.4L234.05%20512l181.2-159.4c10.2-9%2011-24.6%201.6-34.4l-87-92.8c-9-9.6-24.2-10.2-34-1L7.65%20494.4c-10.2%209.4-10.2%2025.6%200%2035l288.2%20270.2c9.8%209.2%2025%208.8%2034-1z%20m654.4%201.2l288.2-270.2c10.2-9.4%2010.2-25.6%200-35L984.25%20224.2c-9.6-9-24.8-8.6-34%201L863.25%20318c-9.2%209.8-8.6%2025.4%201.6%2034.4L1046.05%20512l-181.2%20159.4c-10.2%209-11%2024.6-1.6%2034.4l87%2092.8c9%209.8%2024.2%2010.2%2034%201.2z'%20fill='%230157fe'%20p-id='1501'%3e%3c/path%3e%3c/svg%3e",U7=["title","src"],W7={key:1},J7=I({name:"LogoWidget",inheritAttrs:!1,__name:"index",props:{icon:{},text:{default:"VTJ"},link:{}},setup(n){const{engine:e}=Ie(),t=n,r=z(()=>t.icon||e.project.value?.config?.logo||L7),i=()=>{t.link&&(location.href=t.link)};return(a,o)=>(y(),M("div",{class:"v-logo-widget",onClick:i},[r.value?(y(),M("img",{key:0,title:t.text,class:"v-logo-widget__icon",src:r.value},null,8,U7)):(y(),M("span",W7,te(t.text),1))]))}}),q7={class:"v-empty-widget"},G7=I({name:"EmptyWidget",__name:"index",setup(n){return(e,t)=>(y(),M("div",q7,"EmptyWidget"))}}),Y7={class:"v-switcher-widget"},K7={key:1},X7=I({name:"SwitcherWidget",inheritAttrs:!1,__name:"index",emits:["click"],setup(n,{emit:e}){const t=e,{engine:r}=Ie(),i=z(()=>r.project.value?.config?.title||r.project.value?.name),a=z(()=>r.project.value?.currentFile?.title),o=()=>{t("click",r.project.value)};return(s,l)=>(y(),M("div",Y7,[_(d(xe),{size:"small",round:"",onClick:o},{default:j(()=>[_(d(Su),{class:"v-switcher-widget__back"}),P("span",null,te(i.value),1),a.value?(y(),V(d(Qr),{key:0,direction:"vertical"})):R("",!0),a.value?(y(),M("span",K7,te(a.value),1)):R("",!0)]),_:1})]))}}),Q7={class:"v-toolbar-widget"},Z7=I({name:"ToolbarWidget",inheritAttrs:!1,__name:"index",props:{preview:{type:Boolean}},setup(n,{expose:e}){const t=n,{forward:r,backward:i,forwardDisabled:a,backwardDisabled:o}=i2(),s=D("pc");return e({mode:s}),(l,c)=>(y(),M("div",Q7,[_(d(Ua),{size:"small",modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=u=>s.value=u)},{default:j(()=>[_(d(qn),{label:"pc",value:"pc"},{default:j(()=>[_(d(Au))]),_:1}),_(d(qn),{label:"mobile",value:"mobile"},{default:j(()=>[_(d(Tu))]),_:1}),_(d(qn),{label:"pad",value:"pad"},{default:j(()=>[_(d(Bu))]),_:1})]),_:1},8,["modelValue"]),R("",!0),_(d(A2),null,{default:j(()=>[_(d(xe),{type:"default",size:"small",onClick:d(i),disabled:d(o)||!!t.preview},{default:j(()=>[_(d(Ou))]),_:1},8,["onClick","disabled"]),_(d(xe),{type:"default",size:"small",onClick:d(r),disabled:d(a)||!!t.preview},{default:j(()=>[_(d(zu))]),_:1},8,["onClick","disabled"])]),_:1})]))}}),e9={class:"v-actions-widget"},t9=P("span",null,"发布",-1),n9=I({name:"ActionsWidget",inheritAttrs:!1,__name:"index",props:{coder:{type:Boolean,default:!0}},setup(n){const{engine:e,designer:t}=wt(),r=D(!1),i=()=>{e.current.value?(r.value?e.skeleton?.getWidget("Previewer")?.widgetRef.refresh():(t.value?.setSelected(null),e.simulator.refresh()),We("刷新完成","success")):We("请先打开文件","warning")},a=async()=>{e.current.value?(r.value&&(e.skeleton?.closePreview(),r.value=!1,await ou(1e3)),t.value?.setSelected(e.current.value)):We("请先打开文件","warning")},o=()=>{if(e.project.value)if(e.current.value){if(r.value){e.skeleton?.closePreview(),r.value=!1;return}e.skeleton?.openPreview(""),r.value=!0}else We("请先打开文件","warning")},s=()=>{const c=e.project.value;c&&(c.currentFile?c.publish(c.currentFile):We("请先打开文件","warning"))},l=c=>{const u=e.project.value;u&&(c==="current"?s():u.publish())};return(c,u)=>(y(),M("div",e9,[R("",!0),R("",!0),_(d(xe),{onClick:o,type:r.value?"warning":"default",size:"small",title:"预览"},{default:j(()=>[_(d($u))]),_:1},8,["type"]),_(d(xe),{onClick:i,type:"default",size:"small",title:"刷新"},{default:j(()=>[_(d(Du))]),_:1}),_(d(xe),{type:"default",size:"small",title:"页面设置",onClick:a},{default:j(()=>[_(d(fo))]),_:1}),_(d(Qr),{direction:"vertical"}),_(d(Na),{"split-button":"",type:"primary",size:"small",onClick:s,onCommand:l},{dropdown:j(()=>[_(d(Pa),null,{default:j(()=>[_(d(Hr),{command:"current"},{default:j(()=>[le("发布页面")]),_:1}),_(d(Hr),{command:"project"},{default:j(()=>[le("整站发布")]),_:1})]),_:1})]),default:j(()=>[t9]),_:1})]))}}),r9={class:"v-icon-setter"},i9={class:"v-icon-setter__content"},a9={class:"v-icon-setter__list"},a2=I({name:"IconSetter",__name:"icon",props:{modelValue:{default:""},size:{default:"small"}},emits:["change","update:modelValue"],setup(n,{emit:e}){const t=n,r=e,i=D(!1),a=D(t.modelValue),o=D(""),s=z(()=>fa[t.modelValue]||t.modelValue),l=z(()=>{const h=Object.entries(fa);return o.value?h.filter(f=>f[0].toLowerCase().includes(o.value)):h}),c=h=>{a.value=h},u=()=>{r("change",a.value),r("update:modelValue",a.value),i.value=!1},p=()=>{a.value="",r("change",""),r("update:modelValue",""),i.value=!1},m=()=>{i.value=!0};return(h,f)=>(y(),M("div",r9,[_(d(Ye),{size:t.size,readonly:"",placeholder:"请选择图标","model-value":t.modelValue,"suffix-icon":d(Ml),onFocus:m},{prepend:j(()=>[_(d(it),{icon:s.value},null,8,["icon"])]),_:1},8,["size","model-value","suffix-icon"]),i.value?(y(),V(d(jt),{key:0,title:"图标选择器",width:"1000px",height:"600px",cancel:"",submit:"",clear:"",modelValue:i.value,"onUpdate:modelValue":f[1]||(f[1]=v=>i.value=v),onSubmit:u},{extra:j(()=>[_(d(xe),{size:"default",type:"warning",onClick:p},{default:j(()=>[le(" 清除绑定 ")]),_:1})]),default:j(()=>[P("div",i9,[_(d(Ye),{size:t.size,"prefix-icon":d(Pl),clearable:"",modelValue:o.value,"onUpdate:modelValue":f[0]||(f[0]=v=>o.value=v),placeholder:"请输入查询关键字"},null,8,["size","prefix-icon","modelValue"]),P("div",a9,[(y(!0),M(ne,null,ae(l.value,v=>(y(),V(d(it),{icon:v[1],onClick:g=>c(v[0]),class:ce({"is-active":a.value===v[0]})},null,8,["icon","onClick","class"]))),256)),l.value.length===0?(y(),V(d(ze),{key:0})):R("",!0)])])]),_:1},8,["modelValue"])):R("",!0)]))}}),o9=I({name:"PageForm",__name:"form",props:{item:{},parentId:{}},setup(n){const e=n,{project:t}=an(),r=z(()=>e.item?"编辑页面":"新增页面"),i=()=>({dir:!1,name:"",title:"",icon:"",mask:!0,hidden:!1,raw:!1}),a=D(e.item||i()),o=[{label:"页面",value:!1},{label:"目录",value:!0}],s=c=>{a.value&&(a.value.name=Wr(c))},l=async c=>t.value?.existPageName(c.name,[c.id])?(Ae("页面名称已存在,请更换"),!1):(e.item?t.value?.updatePage(c):t.value?.createPage(c,e.parentId),!0);return(c,u)=>(y(),V(d(Vt),{title:r.value,width:"800px",height:"500px","form-props":{tooltipMessage:!1},model:a.value,"submit-method":l},{default:j(()=>[_(d(ee),{name:"dir",label:"类型",editor:"radio",options:o,props:{button:!0,size:"small"},disabled:!!e.item,required:""},null,8,["disabled"]),_(d(ee),{name:"name",label:"名称",required:"",onChange:s,rules:{pattern:d(Ct),message:"名称格式不正确"}},null,8,["rules"]),_(d(ee),{name:"title",label:"标题",required:""}),_(d(ee),{name:"icon",label:"菜单图标",editor:"none"},{editor:j(()=>[_(a2,{modelValue:a.value.icon,"onUpdate:modelValue":u[0]||(u[0]=p=>a.value.icon=p),size:"default"},null,8,["modelValue"])]),_:1}),_(d(ee),{visible:{dir:!1},name:"mask",label:"包含母版",editor:"switch"}),_(d(ee),{name:"hidden",label:"隐藏菜单",editor:"switch"}),_(d(ee),{visible:{dir:!1},disabled:!!e.item,inline:"",name:"raw",label:"源码模式",editor:"switch",tip:"页面是非低代码开发,不能在线编辑"},null,8,["disabled"])]),_:1},8,["title","model"]))}}),_l=I({name:"VIcon",__name:"Icon",props:{icon:{},label:{},active:{type:Boolean,default:!1},open:{type:Boolean,default:!1}},emits:["click"],setup(n,{emit:e}){const t=n,r=e,i=z(()=>({"is-active":t.active,"is-open":t.open})),a=()=>{r("click")};return(o,s)=>(y(),V(d(Xr),{effect:"dark",placement:"right",content:o.label,"show-after":600},{default:j(()=>[P("div",{class:ce(["v-apps-region__icon",i.value]),onClick:a},[(y(),V(Ge(o.icon)))],2)]),_:1},8,["content"]))}}),fe=I({name:"VPanel",__name:"panel",props:{title:{},subtitle:{},plus:{type:Boolean},back:{type:Boolean},edit:{type:Boolean},remove:{type:Boolean},save:{type:Boolean},header:{type:Boolean,default:!0},collapsable:{type:Boolean}},emits:["plus","back","remove","save","edit"],setup(n,{emit:e}){const t=n,r=e,i=D(!1),a=z(()=>({"is-collapsed":!!i.value})),o=()=>{r("plus")},s=()=>{r("edit")},l=()=>{r("back")},c=()=>{r("remove")},u=()=>{r("save")},p=z(()=>t.header?{content:t.title,subtitle:t.subtitle,icon:t.back?J2:void 0,onClickBack:t.back?l:void 0,onClick:t.collapsable?()=>{i.value=!i.value}:void 0}:null),m=h=>{i.value=h};return(h,f)=>(y(),V(d(dr),{class:ce(["v-panel",a.value]),border:!1,header:p.value,fit:""},Kt({actions:j(()=>[t.plus?(y(),V(d(Be),{key:0,size:h.$attrs.size,mode:"icon",icon:d(go),background:"hover",title:"新增",onClick:o},null,8,["size","icon"])):R("",!0),t.edit?(y(),V(d(Be),{key:1,size:h.$attrs.size,mode:"icon",icon:d(Rl),background:"hover",title:"编辑",onClick:s},null,8,["size","icon"])):R("",!0),t.remove?(y(),V(d(Be),{key:2,size:h.$attrs.size,mode:"icon",icon:d(Dl),background:"hover",title:"清除",onClick:c},null,8,["size","icon"])):R("",!0),t.save?(y(),V(d(Be),{key:3,size:h.$attrs.size,mode:"icon",icon:d(Eu),background:"hover",title:"保存",onClick:u},null,8,["size","icon"])):R("",!0),t.collapsable?mt((y(),V(d(Be),{key:4,size:h.$attrs.size,mode:"icon",icon:d(Ml),background:"hover",title:"展开",onClick:f[0]||(f[0]=v=>m(!1))},null,8,["size","icon"])),[[Xt,i.value]]):R("",!0),t.collapsable?mt((y(),V(d(Be),{key:5,size:h.$attrs.size,mode:"icon",icon:d(q2),background:"hover",title:"收起",onClick:f[1]||(f[1]=v=>m(!0))},null,8,["size","icon"])),[[Xt,!i.value]]):R("",!0),de(h.$slots,"actions")]),default:j(()=>[de(h.$slots,"default")]),_:2},[h.$slots.footer?{name:"footer",fn:j(()=>[de(h.$slots,"footer")]),key:"0"}:void 0]),1032,["class","header"]))}}),s9={class:"v-tabs__header"},l9={key:0,class:"v-tabs__actions"},gi=I({__name:"tabs",props:{items:{default:()=>[]},menus:{},modelValue:{},stretch:{type:Boolean},checkable:{type:Boolean}},emits:["update:modelValue","command","remove","action-click"],setup(n,{emit:e}){const t=n,r=e,i=D((t.modelValue||t.items[0]?.name)??"");oe(i,()=>{r("update:modelValue",i.value)}),oe(()=>t.modelValue,l=>{i.value=l});const a=l=>{r("command",l)},o=l=>{r("remove",l)},s=l=>{r("action-click",l)};return(l,c)=>(y(),V(d(dr),{class:"v-tabs",border:!1,fit:"",radius:!1},{header:j(()=>[P("div",s9,[_(d(Co),{class:"v-tabs__tabs",items:t.items,type:"card",modelValue:i.value,"onUpdate:modelValue":c[0]||(c[0]=u=>i.value=u),onTabRemove:o,onActionClick:s,stretch:t.stretch},null,8,["items","modelValue","stretch"]),t.menus&&t.menus.length?(y(),M("div",l9,[t.menus&&t.menus.length?(y(),V(d(Be),{key:0,mode:"icon",size:"small",icon:d(Ja),background:"hover",dropdown:{size:"small",placement:"bottom-end"},menus:t.menus,onCommand:a},{item:j(({item:u})=>[P("span",null,[t.checkable?(y(),V(d(uo),{key:0,class:ce({"v-tabs__checked":!0,"is-checked":u.checked})},null,8,["class"])):R("",!0),le(" "+te(u.label),1)])]),_:1},8,["icon","menus"])):R("",!0)])):R("",!0)])]),default:j(()=>[de(l.$slots,"default")]),_:3}))}}),c9={key:2,class:"v-item__index"},u9={class:"v-item__content"},d9={key:3,class:"v-item__subtitle"},Me=I({name:"VItem",__name:"item",props:{icon:{},index:{},tag:{},tagType:{},title:{},subtitle:{},actions:{default:()=>[]},background:{type:Boolean},border:{type:Boolean},switch:{type:Boolean},modelValue:{},active:{type:Boolean},hover:{type:Boolean},small:{type:Boolean}},emits:["click","action","update:modelValue","switch"],setup(n,{emit:e}){const t={add:{label:"创建",icon:go},copy:{label:"复制",icon:po},edit:{label:"编辑",icon:vo},remove:{label:"删除",icon:lr},lock:{label:"锁定",icon:ho},unlock:{label:"解锁",icon:Cu},invisible:{label:"隐藏",icon:bo},visible:{label:"显示",icon:Hu},home:{label:"主页",icon:ku}},r=n,i=e,a=D(!!r.modelValue),o=z(()=>r.actions.map(u=>{const p=t[u];return{name:u,...p}})),s=z(()=>({"is-background":r.background,"is-border":r.border,"is-active":r.active,"is-hover":r.hover,"is-small":r.small})),l=()=>{i("click",r.modelValue)},c=async u=>{u==="remove"?await Zr.confirm("确定删除吗?","提示",{type:"warning"}).catch(()=>!1)&&i("action",{name:u,modelValue:r.modelValue}):i("action",{name:u,modelValue:r.modelValue})};return oe(a,u=>{i("update:modelValue",u),i("switch",u)}),oe(()=>r.modelValue,u=>{a.value=!!u}),(u,p)=>(y(),V(d(se),{class:ce(["v-item",s.value]),justify:"space-between",align:"center",onClick:l},{default:j(()=>[_(d(se),{class:"v-item__title",align:"center"},{default:j(()=>[de(u.$slots,"default",{},()=>[u.icon?(y(),V(d(it),{key:0,icon:u.icon},null,8,["icon"])):R("",!0),r.tag?(y(),V(d(N2),{key:1,class:"v-item__tag",size:"small",type:r.tagType},{default:j(()=>[le(te(r.tag),1)]),_:1},8,["type"])):R("",!0),u.index!==void 0?(y(),M("span",c9," # "+te(u.index),1)):R("",!0),P("span",u9,te(u.title),1),u.subtitle?(y(),M("span",d9,te(u.subtitle),1)):R("",!0)])]),_:3}),_(d(se),{class:"v-item__actions",onClick:p[1]||(p[1]=hn(()=>{},["stop"]))},{default:j(()=>[(y(!0),M(ne,null,ae(o.value,m=>(y(),V(d(Be),{name:m.name,title:m.label,mode:"icon",size:"small",background:"none",type:"info",icon:m.icon,onClick:h=>c(m.name)},null,8,["name","title","icon","onClick"]))),256)),r.switch?(y(),V(d(Fa),{key:0,modelValue:a.value,"onUpdate:modelValue":p[0]||(p[0]=m=>a.value=m),class:"v-item__switch",size:"small"},null,8,["modelValue"])):R("",!0),de(u.$slots,"status")]),_:3})]),_:3},8,["class"]))}}),p9=["draggable"],h9={class:"v-box__name"},m9={class:"v-box__label"},Da=I({name:"VBox",__name:"box",props:{name:{},title:{},editable:{type:Boolean},active:{type:Boolean},draggable:{type:Boolean},tag:{},tagType:{}},emits:["edit","remove","dragstart","dragend"],setup(n,{emit:e}){const t=n,r=e,i=()=>{r("edit")},a=async()=>{await Zr.confirm("确认删除?","提示",{type:"warning"}).catch(()=>!1)&&r("remove")},o=z(()=>({"is-active":t.active,"is-draggable":t.draggable})),s=()=>{r("dragstart",t)},l=()=>{r("dragend",t)};return(c,u)=>(y(),M("div",{class:ce(["v-box",o.value]),draggable:c.draggable,onDragstart:s,onDragend:l},[_(d(se),{direction:"column",justify:"center",align:"center"},{default:j(()=>[P("span",h9,te(t.name),1),P("span",m9,te(t.title),1)]),_:1}),t.editable?(y(),V(d(se),{key:0,class:"v-box__footer",justify:"flex-end",align:"center"},{default:j(()=>[_(d(it),{icon:d(vo),onClick:i},null,8,["icon"]),_(d(it),{icon:d(lr),onClick:a},null,8,["icon"])]),_:1})):R("",!0),t.tag?(y(),M("span",{key:1,class:ce(["v-box__tag",{[`is-${t.tagType}`]:!!t.tagType}])},te(t.tag),3)):R("",!0)],42,p9))}}),f9={class:"v-context-viewer"},v9=I({__name:"viewer",props:{context:{}},emits:["pick","copy"],setup(n,{emit:e}){const t=n,r=e,i=["$provider","$apis","$components","context"],a=u=>{const p=u.value,m=Ci(p);return m==="Object"||m==="Module"?Object.keys(p||{}).length===0:m==="Array"?p.length===0:!0},o=(u,p="this")=>typeof u=="object"?Array.isArray(u)?u.map((m,h)=>{const f=`[${h}]`;return{label:f,value:m,type:Ci(m),path:`${p}${f}`}}):Object.entries(u).map(([m,h])=>({label:m,value:h,type:Ci(h),path:`${p}.${m}`})).filter(m=>!m.label.startsWith("__")&&!i.includes(m.label)):[],s=(u,p)=>{if(u.level===0)p(o(t.context));else{const m=Dt(u.data.value);p(o(m,u.data.path))}},l=u=>{r("copy",u.path)},c=u=>{r("pick",u.path)};return(u,p)=>(y(),M("div",f9,[u.context?(y(),V(d(Wa),{key:0,lazy:"",load:s,"expand-on-click-node":!1,props:{isLeaf:a}},{default:j(({data:m})=>[_(Me,{title:m.label,clickable:"",onClick:h=>c(m),background:"",actions:["copy"],onAction:h=>l(m),grow:"",small:""},null,8,["title","onClick","onAction"])]),_:1},8,["props"])):R("",!0)]))}}),Mo=I({__name:"binder",props:{title:{},context:{},block:{},model:{},rules:{},modelValue:{type:Boolean},submitMethod:{type:Function},unbindEnabled:{type:Boolean}},emits:["unbind","submit","cancel","pick","update:modelValue","close"],setup(n,{emit:e}){const t=n,r=e,{searchResult:i,keyword:a}=O7(t.block,t.context),{copy:o}=td({}),s=[{name:"normal",label:"常用"},{name:"viewer",label:"高级"}],l=D("normal"),c=D(),u=async k=>{r("submit",k),t.submitMethod?await t.submitMethod(k)&&p():p()},p=()=>{r("update:modelValue",!1),r("close")},m=()=>{r("unbind")},h=()=>{p()},f=async()=>{c.value?.submit()},v=k=>{r("pick",k)},g=k=>{o(k),yn.success({message:"已经复制到粘贴板"})};return(k,b)=>(y(),V(d(jt),{"model-value":t.modelValue,class:"v-binder",title:k.title,width:"1000px",height:"600px","body-padding":!1,maximizable:!1,minimizable:!1,onClose:p},{default:j(()=>[_(d(se),{fit:"",direction:"row",overflow:"hidden"},{default:j(()=>[_(d(se),{width:"30%",height:"100%"},{default:j(()=>[_(gi,{class:"v-binder__tabs",items:s,modelValue:l.value,"onUpdate:modelValue":b[1]||(b[1]=w=>l.value=w)},{default:j(()=>[_(d(se),{class:"v-binder__tab-content",fit:"",padding:"",flex:!1},{default:j(()=>[mt(P("div",null,[_(d(Ye),{modelValue:d(a),"onUpdate:modelValue":b[0]||(b[0]=w=>qi(a)?a.value=w:null),size:"small",clearable:"","prefix-icon":d(Pl),placeholder:"筛选可用项"},null,8,["modelValue","prefix-icon"]),(y(!0),M(ne,null,ae(d(i),w=>(y(),M("div",null,[_(d(Qr),{"border-style":"dotted"},{default:j(()=>[le(te(w.title),1)]),_:2},1024),(y(!0),M(ne,null,ae(w.items,S=>(y(),V(Me,{title:S,background:"",actions:["copy"],small:"",onClick:C=>v(S),onAction:C=>g(S)},null,8,["title","onClick","onAction"]))),256))]))),256)),d(i).length?R("",!0):(y(),V(d(ze),{key:0}))],512),[[Xt,l.value==="normal"]]),mt(_(v9,{context:t.context,onCopy:g,onPick:v},null,8,["context"]),[[Xt,l.value==="viewer"]])]),_:1})]),_:1},8,["modelValue"])]),_:1}),_(d(dr),{grow:"",header:null,border:!1},{footer:j(()=>[_(d(se),{justify:"space-between"},{default:j(()=>[_(d(se),null,{default:j(()=>[k.unbindEnabled?(y(),V(d(xe),{key:0,type:"warning",size:"default",onClick:m},{default:j(()=>[le(" 移除绑定 ")]),_:1})):R("",!0)]),_:1}),_(d(se),null,{default:j(()=>[_(d(xe),{type:"default",size:"default",onClick:h},{default:j(()=>[le(" 取消 ")]),_:1}),_(d(xe),{type:"primary",size:"default",onClick:f},{default:j(()=>[le(" 确定 ")]),_:1})]),_:1})]),_:1})]),default:j(()=>[_(d(pi),{ref_key:"formRef",ref:c,class:"v-binder__form",footer:!1,"label-position":"top","tooltip-message":!1,model:t.model,rules:t.rules,"submit-method":u},{default:j(()=>[de(k.$slots,"default")]),_:3},8,["model","rules"])]),_:3})]),_:3})]),_:3},8,["model-value","title"]))}}),g9={class:"v-slots-picker__sn"},y9=I({__name:"slots",props:{slots:{default:()=>[]}},emits:["submit","update:modelValue"],setup(n,{emit:e}){const t=n,r=e,i=D(),a=z(()=>`${50*Math.ceil(t.slots.length/4)+180}px`),o=l=>{i.value=l},s=()=>{i.value?(r("submit",i.value),r("update:modelValue",!1)):Ae("请选择插槽")};return(l,c)=>(y(),V(d(jt),pe({class:"v-slots-picker",title:"选择插槽",width:"600px",height:a.value,submit:"",cancel:"",onSubmit:s},l.$attrs),{default:j(()=>[_(d(zl),{title:"该组件支持多个插槽,请选择放置到其中一个",type:"warning",closable:!1}),_(d(se),{class:"v-slots-picker__content",justify:"space-around",alignContent:"flex-start",gap:"",wrap:"wrap"},{default:j(()=>[(y(!0),M(ne,null,ae(t.slots,(u,p)=>(y(),V(d(se),{class:ce(["v-slots-picker__item",{"is-active":u.name===i.value?.name}]),grow:"",flex:!1,onClick:m=>o(u)},{default:j(()=>[P("span",g9,"#"+te(p+1),1),le(" "+te(u.name),1)]),_:2},1032,["class","onClick"]))),256))]),_:1})]),_:1},16,["height"]))}}),o2=I({name:"Viewport",__name:"viewport",props:{mode:{default:"pc"},width:{},height:{}},setup(n){const e=n,t=z(()=>[`is-${e.mode}`]),r=z(()=>{if(e.mode==="pc")return 1;const a=e.mode==="mobile"?wl:xl,{width:o,height:s}=a,l=o>0?(e.width||0)/o:1,c=s>0?(e.height||0)/s:1;return Math.min(l,c)}),i=z(()=>{if(e.mode==="pc")return{};const a=e.mode==="mobile"?wl:xl,{width:o,height:s}=a;return{width:`${o}px`,height:`${s}px`,left:"50%",top:"50%",transform:`translate(-50%, -50%) scale(${r.value})`}});return(a,o)=>(y(),M("div",{class:ce(["v-viewport",t.value]),style:Rt(i.value)},[de(a.$slots,"default")],6))}}),b9=I({name:"PagesWidget",__name:"index",setup(n){const{project:e,engine:t}=an(),r=z(()=>e.value?.pages||[]),{current:i}=Ie(),a=D(!1),o=D(),s=D(),l=()=>{s.value=void 0,o.value=void 0,a.value=!0},c=async h=>{const{name:f,modelValue:v}=h,{data:g,node:k}=v;if(f==="add"&&(o.value=void 0,s.value=g.id,a.value=!0),f==="edit"&&(o.value=Qt(g),s.value=void 0,a.value=!0),f==="remove"){if(g.dir){const b=e.value?.getPage(g.id);if(b&&b.children?.length){Ae("请先删除子页面");return}}e.value?.removePage(g.id)}if(f==="copy"){const b=k.parent?.data.id;e.value?.clonePage(g,b)}f==="home"&&(e.value?.setHomepage(g.id),We("设置主页成功","success"))},u=async h=>{h.raw&&We("这是源码模式页面,不能低代码设计","warning"),h.dir||h.raw?t.project.value?.deactivate():t.project.value?.active(h)},p=(h,f,v)=>v==="inner"?!!f.data.dir:!0,m=()=>{e.value?.update({pages:Gi(r)})};return(h,f)=>(y(),V(d(fe),{class:"v-pages-widget",title:"页面管理",plus:"",subtitle:"(共 0 条)",onPlus:l},{default:j(()=>[_(d(Wa),{data:r.value,"node-key":"id","default-expand-all":"",draggable:"","allow-drop":p,onNodeDrop:m},{default:j(({data:v,node:g})=>[_(d(Me),{class:"v-pages-widget__item",icon:d(fa)[v.icon],title:v.title,subtitle:v.name,"model-value":{data:v,node:g},actions:v.dir?["add","edit","remove"]:v.raw?["home","edit","remove"]:["home","copy","edit","remove"],onAction:c,onClick:k=>u(v),active:d(i)?.id===v.id,tag:d(e)?.homepage===v.id?"主页":void 0,"tag-type":"success",grow:"",small:"",background:"",hover:""},null,8,["icon","title","subtitle","model-value","actions","onClick","active","tag"])]),_:1},8,["data"]),a.value?(y(),V(o9,{key:0,modelValue:a.value,"onUpdate:modelValue":f[0]||(f[0]=v=>a.value=v),item:o.value,"parent-id":s.value},null,8,["modelValue","item","parent-id"])):R("",!0)]),_:1}))}}),w9={class:"v-file-setter"},Po=I({name:"FileSetter",__name:"file",props:{modelValue:{},attachment:{}},emits:["change","update:modelValue"],setup(n,{emit:e}){const t=n,r=e,{engine:i,project:a}=an(),o=D([]),s=D(!1),l=b=>Array.isArray(b)?b.map(w=>({name:w.filename,url:w.filepath})):b?{name:b.filename,url:b.filepath}:null,c=async b=>{if(i&&a.value){const w=await i.service.uploadStaticFile(b,a.value.id);return l(w)}return null},u=b=>b?(b||"").split(",").map(w=>({url:w})):[],p=D(u(t.modelValue)),m=z(()=>Array.isArray(p.value)?p.value.map(b=>b.url).join(","):p.value?p.value.url:"");oe(()=>t.modelValue,b=>{p.value=u(b)}),oe(s,async b=>{if(b){const w=await i.service.getStaticFiles(a.value?.id).catch(()=>null);o.value=l(w)}});const h=()=>{if(!p.value||Array.isArray(p.value)&&p.value.length===0)return Ae("请选择文件"),!1;const b=(t.attachment?.accept||"").toLowerCase().split(",");return b.length>0?[].concat(p.value).every(w=>{const S=w.name||w.url.split("?")[0],C=S.substring(S.lastIndexOf(".")).toLowerCase();return b.includes(C)})?!0:(Ae(`只支持 ${b.join(",")} 文件`),!1):!0},f=()=>{h()&&(r("change",m.value),r("update:modelValue",m.value),s.value=!1)},v=()=>{p.value=[],r("change",void 0),r("update:modelValue",void 0),s.value=!1},g=()=>{s.value=!0},k=b=>{b.name&&a.value?.id&&i.service.removeStaticFile(b.name,a.value?.id)};return(b,w)=>(y(),M("div",w9,[_(d(Ye),pe({readonly:"",onFocus:g,"model-value":t.modelValue,"suffix-icon":d(G2)},b.$attrs),null,16,["model-value","suffix-icon"]),s.value?(y(),V(d(jt),{key:0,modelValue:s.value,"onUpdate:modelValue":w[1]||(w[1]=S=>s.value=S),title:"文件选择器",width:"600px",height:"400px",cancel:"",submit:"",onSubmit:f},{extra:j(()=>[_(d(xe),{type:"warning",size:"default",onClick:v},{default:j(()=>[le(" 清除 ")]),_:1})]),default:j(()=>[_(d(Mb),pe({size:"small","list-type":"list",selectable:!0,uploader:c,"model-value":o.value,"select-value":p.value,"onUpdate:selectValue":w[0]||(w[0]=S=>p.value=S)},t.attachment,{onRemove:k}),null,16,["model-value","select-value"])]),_:1},8,["modelValue"])):R("",!0)]))}}),x9=I({name:"BlocksWidget",__name:"index",setup(n){const{span:e}=r2(),{blocks:t,engine:r}=E7(),i=[{label:"设计",value:"Schema",border:!0},{label:"引用",value:"UrlSchema",border:!0},{label:"插件",value:"Plugin",border:!0}],a={Schema:{label:"设计",type:"primary"},UrlSchema:{label:"引用",type:"warning"},Plugin:{label:"插件",type:"danger"}},o=D(void 0),{current:s}=Ie(),l=D(!1),c=z(()=>o.value?.id?"编辑区块":"新增区块"),u=z(()=>`(共 ${t.value.length} 个)`),p=()=>({fromType:"Schema",name:"",title:"",urls:"",library:"",type:"block"}),m=z(()=>{if(o.value?.fromType==="UrlSchema")return".json";if(o.value?.fromType==="Plugin")return".js,.css,.json"}),h=z(()=>o.value?.fromType==="Plugin"),f=async x=>{const $=x,E=r.project.value;if(!E)return!1;if(x.id)if(!E.existBlockName($.name,[$.id]))E.updateBlock($);else return Ae(`名称【${$.name}】已经存在,请更换名称`),!1;else if(!E.existBlockName($.name))E.createBlock($);else return Ae(`名称【${$.name}】已经存在,请更换名称`),!1;return!0},v=()=>{o.value=p(),l.value=!0},g=x=>{o.value=Qt(x),l.value=!0},k=x=>{r.project.value?.removeBlock(x.id)},b=x=>{o.value&&(o.value.name=Wr(x))},w=async x=>{(!x.fromType||x.fromType==="Schema")&&r.project.value?.active(x)},S=async x=>{const $=vg(x),E=await r.assets.getBlockMaterial($,x.name),U=r.skeleton?.getWidget("Designer")?.widgetRef?.designer;U&&E&&U.setDragging(E)},C=()=>{const x=r.skeleton?.getWidget("Designer")?.widgetRef?.designer;x&&x.setDragging(null)};return(x,$)=>(y(),V(d(fe),{class:"v-blocks-widget",title:"区块管理",subtitle:u.value,plus:"",onPlus:v},{default:j(()=>[_(d(Xi),{wrap:"wrap",gutter:5},{default:j(()=>[(y(!0),M(ne,null,ae(d(t),E=>(y(),V(d(Ki),{key:E.id,span:d(e)},{default:j(()=>[_(d(Da),{name:E.name,title:E.title,active:d(s)?.id===E.id,editable:"",tag:a[E.fromType||"Schema"]?.label,tagType:a[E.fromType||"Schema"]?.type,onEdit:U=>g(E),onRemove:U=>k(E),onClick:U=>w(E),draggable:d(s)?.id!==E.id,onDragstart:U=>S(E),onDragend:C},null,8,["name","title","active","tag","tagType","onEdit","onRemove","onClick","draggable","onDragstart"])]),_:2},1032,["span"]))),128))]),_:1}),d(t).length?R("",!0):(y(),V(d(ze),{key:0})),_(d(Vt),{modelValue:l.value,"onUpdate:modelValue":$[0]||($[0]=E=>l.value=E),title:c.value,model:o.value,width:"600px",height:"400px","form-props":{tooltipMessage:!1},"submit-method":f},{default:j(()=>[_(d(ee),{name:"fromType",label:"类型",required:"",editor:"radio",disabled:!!o.value?.id,options:i},null,8,["disabled"]),_(d(ee),{name:"name",label:"名称",required:"",tip:"名称为英文驼峰格式",rules:{message:"名称格式错误",pattern:d(Ct)},onChange:b},null,8,["rules"]),_(d(ee),{name:"title",label:"标题",required:""}),o.value?.fromType==="Plugin"?(y(),V(d(ee),{key:0,name:"library",label:"插件名称",required:""})):R("",!0),["Plugin","UrlSchema"].includes(o.value?.fromType||"")?(y(),V(d(ee),{key:1,name:"urls",label:"资源文件",required:"",editor:Po,props:{attachment:{accept:m.value,multiple:h.value}}},null,8,["props"])):R("",!0)]),_:1},8,["modelValue","title","model"])]),_:1},8,["subtitle"]))}}),_9={class:"v-components-widget__search"},S9={key:0,class:"v-components-widget__result"},k9={class:"v-components-widget__list"},j9=I({name:"ComponentsWidget",__name:"index",setup(n){const{span:e,engine:t}=r2(),{tabs:r,currentTab:i,currentGroup:a,model:o,searchKey:s,searchResult:l}=T7(),c=p=>{const m=t.skeleton?.getWidget("Designer")?.widgetRef?.designer;m&&m.setDragging(p)},u=()=>{const p=t.skeleton?.getWidget("Designer")?.widgetRef?.designer;p&&p.setDragging(null)};return(p,m)=>(y(),V(d(fe),{class:"v-components-widget",title:"组件库",body:{flex:!0,direction:"column"}},{default:j(()=>[P("div",_9,[_(d(Ye),{modelValue:d(s),"onUpdate:modelValue":m[0]||(m[0]=h=>qi(s)?s.value=h:null),placeholder:"搜索组件",clearable:"",size:"small"},{prefix:j(()=>[_(d(Wu))]),_:1},8,["modelValue"])]),d(s)?(y(),M("div",S9,[_(d(Xi),{wrap:"wrap",gutter:5},{default:j(()=>[(y(!0),M(ne,null,ae(d(l),h=>(y(),V(d(Ki),{span:d(e),key:h.name},{default:j(()=>[_(d(Da),{name:h.name,title:h.label||h.name,draggable:"",onDragstart:f=>c(h),onDragend:u},null,8,["name","title","onDragstart"])]),_:2},1032,["span"]))),128))]),_:1}),d(l).length?R("",!0):(y(),V(d(ze),{key:0}))])):(y(),V(d(Co),{key:1,items:d(r),modelValue:d(i),"onUpdate:modelValue":m[2]||(m[2]=h=>qi(i)?i.value=h:null)},{default:j(()=>[P("div",k9,[d(a)?(y(),V(d(T2),{key:0,modelValue:d(o)[d(i)],"onUpdate:modelValue":m[1]||(m[1]=h=>d(o)[d(i)]=h)},{default:j(()=>[(y(!0),M(ne,null,ae(d(a).children,h=>(y(),V(d(B2),{key:h.name,name:h.name,title:`${h.label} (${h.count})`},{default:j(()=>[h.components?(y(),V(d(Xi),{key:0,wrap:"wrap",gutter:5},{default:j(()=>[(y(!0),M(ne,null,ae(h.components,f=>(y(),V(d(Ki),{span:d(e),key:f.name},{default:j(()=>[_(d(Da),{name:f.name,title:f.label||f.name,draggable:"",onDragstart:v=>c(f),onDragend:u},null,8,["name","title","onDragstart"])]),_:2},1032,["span"]))),128))]),_:2},1024)):R("",!0)]),_:2},1032,["name","title"]))),128))]),_:1},8,["modelValue"])):R("",!0)])]),_:1},8,["items","modelValue"]))]),_:1}))}}),V9=I({name:"OutlineWidget",__name:"index",setup(n){const{engine:e,designer:t,selected:r}=wt(),{current:i}=Ie(),a=D([]),o=(x,$)=>{if($==="slot")return[];if(Ce(x))return x.locked?["unlock"]:["lock"];const E=x.parent;return E&&(E.locked||E.invisible)?[]:i.value?.locked?[]:x.locked?["unlock"]:x.invisible?["visible"]:["lock","invisible","copy","remove"]},s=(x,$)=>{const E={};if(!x.some(T=>T.slot))return l(x);for(const T of x){const B=T.slot?.name||"default";E[B]||(E[B]=[]),E[B].push(T)}const U=[];for(const[T,B]of Object.entries(E))U.push({id:`${$.id}-${T}`,label:`#${T}`,type:"slot",model:$,disabled:!0,children:l(B)});return U},l=x=>{const $=[];return x.forEach(E=>{const U={id:E.id,label:E.name,type:E.id,model:E};Array.isArray(E.children)&&(U.children=s(E.children,E)),$.push(U)}),$},c=()=>{if(!i.value)return[];const{id:x,name:$,nodes:E}=i.value;return[{id:x,label:$,type:x,model:i.value,children:l(E)}]},u=async()=>{a.value=c(),r.value?.model&&(await dt(),t.value?.setSelected(r.value.model))},p=z(()=>r.value?.model.id),m=x=>{const $=x.data;if($.type==="slot"||Ce($.model)||$.model.locked||$.model.name==="template")return!1;const E=e.assets.componentMap.get($.model.name);return E?(t.value?.setDragging(E),!0):!1},h=async(x,$,E)=>{const U=$.data,T={prev:"top",next:"bottom",inner:"inner"}[E];let B=!1;if(Ce(U.model))B=E==="inner",t.value?.setDropping(B?U.model:null,"inner");else{const F=U.model;B=!!await t.value?.allowDrop(F,T),t.value?.setDropping(B?F:null,"inner")}return B},f=x=>{const $=x?.model;if(!$||$.invisible||x.type==="slot"){t.value?.setSelected(null),t.value?.setHover(null);return}t.value?.setSelected($),t.value?.setHover(null)},v=async(x,$,E)=>{const U=x.data,T=$.data;if(Ce(T.model)){const N=U.model;delete N.slot,i.value?.move(N,void 0,"inner"),t.value?.setDropping(null),t.value?.setDragging(null);return}const B=T.model,F={before:"left",after:"right"}[E]||"inner";if(!await t.value?.allowDrop(B,F)){t.value?.setDropping(null),u(),yn.warning({message:`${U.model.name}不能放置到该位置`}),t.value?.setDragging(null);return}const A=await t.value?.getDropSlot(E==="inner"?B:B.parent);if(A!==null){const N=U.model;N.slot=A,i.value?.move(N,B,F)}else u();t.value?.setDropping(null),t.value?.setDragging(null),e.simulator.refresh()},g=x=>{if(x.type==="slot"){t.value?.setHover(null);return}Ce(x.model)?t.value?.setHover(x.model):(t.value?.setHover(x.model),x.model.invisible&&t.value?.setHover(null),x.model.name==="slot"&&t.value?.setHover(null))},k=()=>{t.value?.setHover(null)},b=x=>{const $=x.data;$.dragging=!0;const E=e.assets.componentMap.get($.model.name);E&&t.value?.setDragging(E)},w=async x=>{const $=x.data;$.dragging=!1},S=(x,$)=>{x&&((x.id===$.id||!Ce(x)&&$.isChild(x))&&t.value?.setSelected(null),t.value?.setHover(null))},C=x=>{const{name:$,modelValue:E}=x,U=r.value?.model;switch($){case"lock":S(U,E),E.lock();break;case"unlock":S(U,E),E.unlock();break;case"invisible":S(U,E),E.setVisible(!1);break;case"visible":E.setVisible(!0);break;case"copy":const T=i.value?.cloneNode(E);T&&t.value?.setSelected(T);break;case"remove":S(U,E),i.value?.removeNode(E);break}};return oe(e.changed,u,{immediate:!0}),(x,$)=>(y(),V(d(fe),{class:"v-outline-widget",title:"大纲树"},{default:j(()=>[(y(),V(d(Wa),{key:d(e).changed.value,data:a.value,"node-key":"id","default-expand-all":"",draggable:"","empty-text":"请新建或打开文件","current-node-key":p.value,"highlight-current":!0,"expand-on-click-node":!1,"allow-drop":h,"allow-drag":m,onCurrentChange:f,onNodeDrop:v,onNodeDragStart:b,onNodeDragEnd:w},{default:j(({data:E,node:U})=>[_(d(Me),{class:ce(["v-outline-widget__item",{"is-locked":E.model.locked,"is-invisible":E.model.invisible,"is-dragging":E.dragging,"is-slot":E.type==="slot"}]),active:!E.model.invisible&&U.isCurrent&&E.type!=="slot",grow:"",small:"",background:"",hover:"","model-value":E.model,icon:E.model.locked?d(ho):E.model.invisible?d(bo):void 0,title:E.label,subtitle:E.type,actions:o(E.model,E.type),onAction:C,onMouseenter:T=>g(E),onMouseleave:k},null,8,["class","active","model-value","icon","title","subtitle","actions","onMouseenter"])]),_:1},8,["data","current-node-key"]))]),_:1}))}}),C9=I({name:"HistoryWidget",__name:"index",setup(n){const{history:e,load:t,total:r}=i2(),i=z(()=>`(共 ${r.value} 条)`),a=s=>{s.name==="remove"&&e.value?.remove(s.modelValue.id)},o=async()=>{await On("确定要清空历史记录吗?")&&e.value?.clear()};return(s,l)=>(y(),V(d(fe),{class:"v-history-widget",title:"历史记录",subtitle:i.value,remove:!!d(r),onRemove:o},{default:j(()=>[d(r)===0?(y(),V(d(ze),{key:0,"image-size":50})):R("",!0),d(e)?(y(!0),M(ne,{key:1},ae(d(e).items,(c,u)=>(y(),V(d(Me),{index:u+1,title:c.label,"model-value":c,active:u==d(e).index,small:"",background:"",actions:["remove"],onAction:a,onClick:p=>d(t)(c.id)},null,8,["index","title","model-value","active","onClick"]))),256)):R("",!0)]),_:1},8,["subtitle","remove"]))}}),$9=I({__name:"base-info",setup(n){const e=C7.map(t=>({label:t,value:t.toLowerCase()}));return(t,r)=>(y(),M("div",null,[_(d(ee),{name:"method",label:"请求类型",required:"",editor:"radio",options:d(e)},null,8,["options"]),_(d(ee),{name:"name",label:"接口名称",required:"",rules:{pattern:d(Ct),message:"名称格式不正确"}},null,8,["rules"]),_(d(ee),{name:"label",label:"备注说明",required:""}),_(d(ee),{name:"url",label:"接口URL",required:""})]))}}),Te=Ji({loader:()=>p2(()=>import("./Editor-BKlikwSl-BjFYNt7y.js"),__vite__mapDeps([0,1,2,3]),import.meta.url),loadingComponent:I({render(){return Re("div","正在拼命加载...")}}),errorComponent:I({render(){return Re("div","组件加载失败!")}})}),E9=I({__name:"request-settings",setup(n){const e=[{label:"表单",value:"form"},{label:"JSON",value:"json"},{label:"文件",value:"data"}],t=Mt("currentModel",null);return(r,i)=>(y(),M("div",null,[_(d(se),{justify:"space-between"},{default:j(()=>[_(d(ee),{name:"settings.loading",size:"small",label:"加载提示",editor:"switch"}),_(d(ee),{size:"small",name:"settings.failMessage",label:"失败提示",editor:"switch"}),_(d(ee),{size:"small",name:"settings.validSuccess",label:"校验成功",editor:"switch"}),_(d(ee),{size:"small",name:"settings.originResponse",label:"原始响应",editor:"switch"}),_(d(ee),{size:"small",name:"settings.injectHeaders",label:"注入请求头",editor:"switch"})]),_:1}),_(d(ee),{size:"small",name:"settings.type",label:"发送数据类型",editor:"radio",options:e,props:{button:!0}}),_(d(ee),{size:"small",name:"headers.value",label:"请求头配置",tip:"支持 JSExpression 或 JSFunction"},{editor:j(()=>[_(d(Te),{dark:"",height:"260px",modelValue:d(t).headers.value,"onUpdate:modelValue":i[0]||(i[0]=a=>d(t).headers.value=a)},null,8,["modelValue"])]),_:1})]))}}),A9=I({__name:"jsonp-options",setup(n){return(e,t)=>(y(),M("div",null,[_(d(ee),{name:"jsonpOptions.jsonpCallback",size:"small",label:"jsonpCallback"}),_(d(ee),{name:"jsonpOptions.jsonpCallbackFunction",size:"small",label:"jsonpCallbackFunction"}),_(d(ee),{name:"jsonpOptions.timeout",size:"small",label:"timeout",editor:"number"}),_(d(ee),{name:"jsonpOptions.crossorigin",size:"small",label:"crossorigin",editor:"switch"})]))}}),T9=P("span",null,"模拟数据模板",-1),B9=I({__name:"mock-template",setup(n){const e=Mt("currentModel",null),{project:t}=an(),r=z(()=>t.value?.config||{}),i=()=>{window.open("https://vtj.pro/help/mock.html")};return(a,o)=>(y(),M("div",null,[r.value.mock?R("",!0):(y(),V(d(zl),{key:0,type:"warning",title:"需要在项目配置中开启模拟数据",closable:!1,style:{"margin-bottom":"20px"}})),_(d(ee),{size:"small",name:"mock",label:"开启模拟数据",disabled:!r.value.mock,editor:"switch"},null,8,["disabled"]),_(d(se),{justify:"space-between"},{default:j(()=>[T9,_(d(Be),{icon:d(yo),mode:"text",label:"帮助",onClick:i},null,8,["icon"])]),_:1}),_(d(ee),{size:"small",name:"mockTemplate.value",label:" "},{editor:j(()=>[_(d(Te),{dark:"",height:r.value.mock?"330px":"280px",lang:"typescript",disabled:!r.value.mock,readonly:!r.value.mock,modelValue:d(e).mockTemplate.value,"onUpdate:modelValue":o[0]||(o[0]=s=>d(e).mockTemplate.value=s)},null,8,["height","disabled","readonly","modelValue"])]),_:1})]))}}),z9={key:0},D9=I({__name:"form",props:{model:{},project:{}},setup(n){const e=n,t=z(()=>e.model?"编辑API":"新增API"),r=D("base"),i=D(),a=D(),o=D(e.model||{}),s=D(!1),l=D(""),c=[{label:"基础信息",value:"base"},{label:"请求配置",value:"settings"},{label:"模拟数据",value:"mock"}];Wi("currentModel",o);const u=z(()=>o.value?.method==="jsonp");oe(()=>e.model,v=>{o.value=Object.assign({},v||{}),r.value="base"},{immediate:!0}),oe(r,async()=>{a.value?.formRef.validate(async v=>{v||(await dt(),r.value="base")})});const p=()=>{i.value?.cancel()},m=()=>{a.value?.submit()},h=async v=>e.project?.existApiName(o.value.name,e.model?[o.value.id]:[])?(Ae(`API名称 [ ${o.value.name} ] 已存在`),!1):o.value.headers&&!De(o.value.headers,window)||o.value.mockTemplate&&!De(o.value.mockTemplate,window)?!1:(e.project?.setApi(o.value),i.value?.close(),!0),f=()=>{if(o.value.mockTemplate){const v=gt(o.value.mockTemplate,{},!0),{url:g,method:k}=o.value,b=Xn.mock(v({url:g,type:k}));l.value=JSON.stringify(b,null,2),s.value=!0}};return(v,g)=>(y(),V(d(jt),{ref_key:"dialogRef",ref:i,title:t.value,width:"1000px",height:"600px"},{default:j(()=>[_(d(se),{fit:""},{default:j(()=>[_(d(se),{width:"100px",shrink:!1},{default:j(()=>[_(d(Co),{modelValue:r.value,"onUpdate:modelValue":g[0]||(g[0]=k=>r.value=k),items:c,"tab-position":"left",border:"",fit:""},null,8,["modelValue"])]),_:1}),_(d(dr),{header:null,border:!1,overflow:"auto",grow:"",shrink:!0,fit:""},{footer:j(()=>[_(d(se),{justify:"space-between"},{default:j(()=>[P("div",null,[r.value==="mock"?(y(),V(d(xe),{key:0,disabled:!e.project?.config?.mock,type:"warning",onClick:f},{default:j(()=>[le(" 预览 ")]),_:1},8,["disabled"])):R("",!0)]),P("div",null,[_(d(xe),{onClick:p},{default:j(()=>[le("取消")]),_:1}),_(d(xe),{type:"primary",onClick:m},{default:j(()=>[le("保存")]),_:1})])]),_:1})]),default:j(()=>[_(d(pi),{ref_key:"formRef",ref:a,footer:!1,labelPosition:"top",tooltipMessage:!1,model:o.value,submitMethod:h},{default:j(()=>[mt(_($9,null,null,512),[[Xt,r.value==="base"]]),r.value==="settings"?(y(),M("div",z9,[u.value?(y(),V(A9,{key:0})):(y(),V(E9,{key:1}))])):R("",!0),r.value==="mock"?(y(),V(B9,{key:1})):R("",!0)]),_:1},8,["model"])]),_:1})]),_:1}),s.value?(y(),V(d(Bl),{key:0,class:"v-drawer",modelValue:s.value,"onUpdate:modelValue":g[1]||(g[1]=k=>s.value=k),title:"模拟数据结果",direction:"btt","append-to-body":"",size:"80%"},{default:j(()=>[_(d(Te),{"model-value":l.value,border:"",dark:"",height:"100%",lang:"json"},null,8,["model-value"])]),_:1},8,["modelValue"])):R("",!0)]),_:1},8,["title"]))}}),O9=I({name:"ApisWidget",__name:"index",setup(n){const e=D(!1),t=D(null),r=D(!1),i=z(()=>a.value?.apis||[]),{project:a}=an(),o=()=>({id:"",method:"get",name:"",label:"",url:"",settings:{loading:!0,failMessage:!0,validSuccess:!0,originResponse:!1,injectHeaders:!1,type:"form"},headers:{type:"JSExpression",value:"({})"},jsonpOptions:{},mock:!1,mockTemplate:{type:"JSFunction",value:`(req) => {
96
96
  return {
97
97
  code: 0,
98
98
  data: null