@vtj/ui 0.11.10 → 0.11.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -9,10 +9,10 @@ import { VXETable as jt, VxeTableFilterModule as yl, VxeTableEditModule as bl, V
9
9
  * Copyright (c) 2025, VTJ.PRO All rights reserved.
10
10
  * @name @vtj/ui
11
11
  * @author CHC chenhuachun1549@dingtalk.com
12
- * @version 0.11.10
12
+ * @version 0.11.12
13
13
  * @license <a href="https://vtj.pro/license.html">MIT License</a>
14
14
  */
15
- const t2 = "0.11.10", Dl = {
15
+ const t2 = "0.11.12", Dl = {
16
16
  default: 14,
17
17
  small: 12,
18
18
  large: 18
package/dist/index.umd.js CHANGED
@@ -2,9 +2,9 @@
2
2
  * Copyright (c) 2025, VTJ.PRO All rights reserved.
3
3
  * @name @vtj/ui
4
4
  * @author CHC chenhuachun1549@dingtalk.com
5
- * @version 0.11.10
5
+ * @version 0.11.12
6
6
  * @license <a href="https://vtj.pro/license.html">MIT License</a>
7
- */const ie="0.11.10",Te={default:14,small:12,large:18},Wn={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},hoverEffect:{type:Boolean}};function Ve(o){return typeof o=="string"?o:`${o}px`}function tt(o=0,t){if(typeof o=="number")return o;if(/(%|vh|vw)$/i.test(o)){const e=Number.parseInt(o);return Math.floor(t*e/100)}return Number.parseInt(o)}function Ut(o,t={}){const n={...t};return typeof o=="boolean"?n:Object.assign(n,o||{})}const Lt="__VTJ_UI_INSTALLED__",mt=Symbol("ADAPTER_KEY");function Vt(){const o=Vue.getCurrentInstance(),t=o==null?void 0:o.appContext.config.globalProperties.$adapter;return t||Vue.inject(mt,{})}const Yr={getCustom:async o=>VtjUtils.storage.get(o,{type:"local"}),saveCustom:async o=>{VtjUtils.storage.save(o.id,o,{type:"local"})}},Gr={install(o,t={}){const n=Object.assign(Yr,t),{components:e=[],fieldEditors:r={}}=n;Yo(r);for(const l of e)l.name&&o.component(l.name,l);[ElementPlus.ElMessage,ElementPlus.ElMessageBox,ElementPlus.ElNotification].forEach(l=>{o.use(l)}),o.config.globalProperties.$adapter=n,o.provide(mt,n)}},Jn=(o=[])=>({install:(n,e={})=>{n[Lt]||(n[Lt]=!0,o.forEach(r=>{r.name&&n.component(r.name,r)}),e.adapter&&n.provide(mt,e.adapter))}});let Ue;const Qn=new RegExp(`\\<script.*src=["'](?<src>[^"']+)`,"gm");let Wr=60*1e3;async function Jr(){var e;const o=await fetch("?t="+Date.now()).then(r=>r.text());Qn.lastIndex=0;let t=[],n;for(;n=Qn.exec(o);)(e=n.groups)!=null&&e.src&&t.push(n.groups.src);return t}async function Qr(){const o=await Jr();if(!Ue)return Ue=o,!1;let t=!1;Ue.length!==o.length&&(t=!0);for(let n=0;n<Ue.length;n++)if(Ue[n]!==o[n]){t=!0;break}return Ue=o,t}async function Zr(){await ElementPlus.ElMessageBox.confirm("系统发现新版本,请确认是否需要更新。如果确定,系统将会重新登录,请注意存档。",{title:"系统更新",type:"warning",closeOnClickModal:!1}).catch(()=>!1)&&(top||window).location.reload()}function Zn(o){setTimeout(async()=>{await Qr()&&await Zr(),Zn()},o||Wr)}function el(o){Zn(o)}const tl=["src"],de=Vue.defineComponent({name:"XIcon",__name:"Icon",props:Wn,setup(o){const t=o,n=Vue.useAttrs(),e=Vue.getCurrentInstance(),r=Vue.computed(()=>{if(!t.icon)return null;const i=e==null?void 0:e.appContext.app;return typeof t.icon=="object"?Vue.markRaw(t.icon):(i==null?void 0:i.component(t.icon))||t.icon}),l=Vue.computed(()=>{const i={"is-pointer":!!n.onClick,"is-hover-effect":t.hoverEffect};return!r.value&&t.icon&&(i[t.icon]=!0),i}),u=Vue.computed(()=>({"background-color":t.background,"border-radius":t.radius?Ve(t.radius):void 0,padding:t.padding?Ve(t.padding):void 0})),a=Vue.computed(()=>{var i;return typeof t.size=="number"?t.size:(i=Te[t.size])!=null?i:void 0});return(i,s)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElIcon),{class:Vue.normalizeClass(["x-icon",l.value]),color:t.color,size:a.value,style:Vue.normalizeStyle(u.value)},{default:Vue.withCtx(()=>[Vue.renderSlot(i.$slots,"default",{},()=>[r.value?(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(r.value),{key:0})):Vue.createCommentVNode("",!0),t.src?(Vue.openBlock(),Vue.createElementBlock("img",{key:1,src:t.src},null,8,tl)):Vue.createCommentVNode("",!0)])]),_:3},8,["class","color","size","style"]))}}),nl={class:"x-menu__wrapper"},ol={key:1,class:"x-menu__title"},rl={key:0,class:"x-menu__title"},eo=Vue.defineComponent({inheritAttrs:!1,name:"XMenuItem",__name:"MenuItem",props:{item:{},subMenu:{},defaultIcon:{}},setup(o){const t=o,n=Vue.getCurrentInstance(),e=u=>{if(u){if(typeof u=="string"){const a=n==null?void 0:n.appContext.app;return(a==null?void 0:a.component(u))||t.defaultIcon||u}return u}},r=u=>typeof u=="object"?u:{value:u},l=(u=[])=>u.filter(a=>!a.hidden);return(u,a)=>t.item.children?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElSubMenu),Vue.mergeProps({key:0,disabled:t.item.disabled},t.subMenu,{index:String(t.item.id)}),{title:Vue.withCtx(()=>[Vue.createElementVNode("div",nl,[t.item.icon?(Vue.openBlock(),Vue.createBlock(Vue.unref(de),{key:0,icon:e(t.item.icon)},null,8,["icon"])):Vue.createCommentVNode("",!0),t.item.title?(Vue.openBlock(),Vue.createElementBlock("span",ol,Vue.toDisplayString(t.item.title),1)):Vue.createCommentVNode("",!0),t.item.badge?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElBadge),Vue.mergeProps({key:2,class:"x-menu__badge"},r(t.item.badge)),{default:Vue.withCtx(()=>a[0]||(a[0]=[Vue.createElementVNode("i",null,null,-1)])),_:1},16)):Vue.createCommentVNode("",!0)])]),default:Vue.withCtx(()=>[(Vue.openBlock(!0),Vue.createElementBlock(Vue.Fragment,null,Vue.renderList(l(t.item.children),i=>(Vue.openBlock(),Vue.createBlock(Vue.unref(eo),{key:i.id,item:i,subMenu:t.subMenu,defaultIcon:t.defaultIcon},null,8,["item","subMenu","defaultIcon"]))),128))]),_:1},16,["disabled","index"])):(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElMenuItem),{key:1,index:String(t.item.id),disabled:t.item.disabled},{title:Vue.withCtx(()=>[t.item.title?(Vue.openBlock(),Vue.createElementBlock("span",rl,Vue.toDisplayString(t.item.title),1)):Vue.createCommentVNode("",!0),t.item.badge?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElBadge),Vue.mergeProps({key:1,class:"x-menu__badge"},r(t.item.badge)),{default:Vue.withCtx(()=>a[1]||(a[1]=[Vue.createElementVNode("i",null,null,-1)])),_:1},16)):Vue.createCommentVNode("",!0)]),default:Vue.withCtx(()=>[t.item.icon?(Vue.openBlock(),Vue.createBlock(Vue.unref(de),{key:0,icon:e(t.item.icon)},null,8,["icon"])):Vue.createCommentVNode("",!0)]),_:1},8,["index","disabled"]))}}),Se=Vue.defineComponent({inheritAttrs:!1,name:"XMenu",__name:"Menu",props:{data:{default:()=>[]},subMenu:{},defaultIcon:{}},emits:["select"],setup(o,{emit:t}){const n=o,e=t,r=Vue.computed(()=>n.data.filter(a=>!a.hidden)),l=(a,i)=>{const s=(c,d=[])=>{var m;for(const p of d){if(p.id.toString()===c.toString())return p;if((m=p.children)!=null&&m.length){const f=s(c,p.children);if(f)return f}}};return s(i,a)},u=a=>{const i=l(r.value,a);i&&e("select",i)};return(a,i)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElMenu),Vue.mergeProps({class:"x-menu"},a.$attrs,{onSelect:u}),{default:Vue.withCtx(()=>[(Vue.openBlock(!0),Vue.createElementBlock(Vue.Fragment,null,Vue.renderList(r.value,s=>(Vue.openBlock(),Vue.createBlock(Vue.unref(eo),{item:{...s,icon:s.icon},defaultIcon:n.defaultIcon,subMenu:n.subMenu},null,8,["item","defaultIcon","subMenu"]))),256))]),_:1},16))}}),Ht={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},background:{type:String,default:"always"},circle:{type:Boolean},draggable:{type:Boolean}};function ll(o){return Vue.computed(()=>{const t=o.tooltip;if(t)return typeof t=="string"?{content:t}:t})}function al(o){return Vue.computed(()=>{const t=o.badge;if(t)return typeof t=="object"?t:{value:t}})}function ul(o){return Vue.computed(()=>{const{dropdown:t,menus:n}=o;if(n&&n.length>0)return Object.assign({popperClass:"x-action__menus",size:o.size},t||{})})}function to(o){const t=Vue.getCurrentInstance();return Vue.computed(()=>{const n=Vue.unref(o);if(n)if(typeof n=="string"||n.setup||n.render||Vue.isVNode(n)){const e=t==null?void 0:t.appContext.app;return{icon:typeof n=="string"&&(e==null?void 0:e.component(n))||n}}else return n;return null})}function De(o){const t=to(o);return t.value?Vue.markRaw(Vue.defineComponent({render:()=>Vue.h(de,t.value)})):void 0}function ht(o,t){return Vue.computed(()=>{const n=Vue.unref(o);return typeof n=="function"?n(t):!!n})}function no(o,t,n){const e=Vue.shallowRef(t),r=Vue.ref(!1),l=async a=>{const i=Vue.unref(o);return i?typeof i=="function"?await i(a):i:t},u=async a=>(r.value=!0,await l(a).then(i=>(e.value=i||t,r.value=!1,Vue.unref(e))));return Vue.watch(()=>o,()=>{u(n)},{immediate:!0}),n&&Vue.watch(n,()=>{u(n)}),{data:e,loading:r,loader:u}}function il(o=1e3){const t=Vue.ref(0);let n;const e=()=>{n=VtjUtils.rAF(()=>{++t.value,t.value<o&&e()})};return Vue.onMounted(e),Vue.onUnmounted(()=>{n&&VtjUtils.cAF(n)}),r=>t.value>=r}function oo(o=[]){const t=Vue.useSlots();return Object.keys(t).filter(n=>!o.includes(n))}const sl={key:0},cl=Vue.defineComponent({__name:"Trigger",props:Ht,emits:["click"],setup(o,{emit:t}){const n=o,e=t,r=De(Vue.toRef(n,"icon")),l=ht(Vue.toRef(n,"disabled")),u=Vue.computed(()=>({[`is-${n.mode}`]:!!n.mode,[`is-${n.type}`]:!!n.type,[`is-${n.size}`]:!!n.size&&n.size!=="default",[`is-background-${n.background}`]:n.mode==="icon"&&!!n.background,"is-disabled":!!n.disabled,"is-circle":!!n.circle})),a=i=>{if(i.preventDefault(),!l.value)return e("click"),!1};return(i,s)=>n.mode==="button"?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElButton),Vue.mergeProps({key:0,icon:Vue.unref(r),type:n.type,size:n.size,disabled:Vue.unref(l)},n.button,{onClick:a}),{default:Vue.withCtx(()=>[Vue.createTextVNode(Vue.toDisplayString(i.label),1)]),_:1},16,["icon","type","size","disabled"])):(Vue.openBlock(),Vue.createElementBlock("div",{key:1,class:Vue.normalizeClass(["x-action__inner",u.value]),onClick:a},[(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(Vue.unref(r)))),i.label?(Vue.openBlock(),Vue.createElementBlock("span",sl,Vue.toDisplayString(i.label),1)):Vue.createCommentVNode("",!0)],2))}}),dl=["draggable"],Q=Vue.defineComponent({name:"XAction",__name:"Action",props:Ht,emits:["click","command","dragstart","dragend"],setup(o,{emit:t}){const n=o,e=Vue.useSlots(),r=t,l=ll(n),u=al(n),a=ul(n),i=ht(Vue.toRef(n,"disabled")),s=Vue.computed(()=>!!n.draggable&&!i.value),c=Vue.computed(()=>({[`x-action--${n.mode}`]:!!n.mode})),d=()=>{i.value||r("click",Vue.toRaw(n))},m=b=>{var _;if(i.value)return;const y=(_=n.menus)==null?void 0:_.find(C=>C.command===b);y&&r("command",Vue.toRaw(y))},p=b=>{s&&r("dragstart",Vue.toRaw(n),b)},f=b=>{s&&r("dragend",Vue.toRaw(n),b)},V=b=>Vue.h(ElementPlus.ElBadge,u.value,()=>[].concat(b)),h=b=>Vue.h(ElementPlus.ElDropdown,{...a.value,disabled:i.value,onCommand:m},{default:()=>[b],dropdown:()=>[Vue.h(ElementPlus.ElDropdownMenu,()=>(n.menus||[]).map((y,_)=>Vue.h(ElementPlus.ElDropdownItem,y,()=>e.item?e.item({item:y,index:_}):y.label)))]}),w=b=>Vue.h(ElementPlus.ElTooltip,{...l.value,disabled:i.value},()=>[b]),v=Vue.computed(()=>{var _;let b=Vue.h(Vue.markRaw(cl),{...n,onClick:d});const y=(_=e.default)==null?void 0:_.call(e);return y&&y.length&&(b=y[0]),u.value&&(b=V(b)),a.value&&(b=h(b)),l.value&&(b=w(b)),b});return(b,y)=>(Vue.openBlock(),Vue.createElementBlock("div",{class:Vue.normalizeClass(["x-action",c.value]),draggable:s.value,onDragstart:p,onDragend:f},[(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(v.value)))],42,dl))}}),ro={items:{type:Array},mode:{type:String,default:"button"},size:{type:String,default:"default"},type:{type:String},background:{type:String,default:"always"},circle:{type:Boolean},disabled:{type:[Boolean,Function]},tooltip:{type:Object},badge:{type:Object},dropdown:{type:Object},button:{type:Object}},ze=Vue.defineComponent({name:"XActionBar",__name:"ActionBar",props:ro,emits:["click","command"],setup(o,{emit:t}){const n=o,e=t,r=Vue.computed(()=>(n.items||[]).map(a=>a==="|"?a:{...a,badge:a.badge?{...n.badge,...typeof a.badge=="object"?a.badge||{}:{value:a.badge}}:void 0,tooltip:a.tooltip?{...n.tooltip,...typeof a.tooltip=="object"?a.tooltip||{}:{content:a.tooltip}}:void 0})),l=a=>{e("click",a)},u=(a,i)=>{e("command",a,i)};return(a,i)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(j),{class:"x-action-bar",align:"center"},{default:Vue.withCtx(()=>[(Vue.openBlock(!0),Vue.createElementBlock(Vue.Fragment,null,Vue.renderList(r.value,s=>(Vue.openBlock(),Vue.createElementBlock(Vue.Fragment,null,[s==="|"?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElDivider),{key:0,direction:"vertical",class:"x-action-bar__divider"})):(Vue.openBlock(),Vue.createBlock(Vue.unref(Q),Vue.mergeProps({key:1,mode:n.mode,size:n.size,type:n.type,circle:n.circle,background:n.background,button:n.button,dropdown:n.dropdown,disabled:Vue.unref(ht)(n.disabled,s).value,ref_for:!0},s,{onClick:l,onCommand:c=>u(s,c)}),null,16,["mode","size","type","circle","background","button","dropdown","disabled","onCommand"]))],64))),256))]),_:1}))}}),lo={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}},j=Vue.defineComponent({name:"XContainer",__name:"Container",props:lo,setup(o,{expose:t}){const n=o,e=Vue.useAttrs(),r=Vue.getCurrentInstance(),l=Vue.ref(),u=Vue.computed(()=>{var c;return(c=l.value)==null?void 0:c.$el}),a=Vue.computed(()=>{const c=r==null?void 0:r.parent;if(!c)return!1;const d=c.proxy;return d.$options.name==="XContainer"||!!d.flex}),i=Vue.computed(()=>{var c;return{"is-fit":n.fit,"is-flex":n.flex&&!n.inline,"is-inline-flex":n.flex&&n.inline,[`is-direction-${n.direction}`]:n.flex&&n.direction!=="row",[`is-wrap-${n.wrap}`]:n.flex&&n.wrap!=="nowrap",[`is-justify-${n.justify}`]:n.flex&&n.justify!=="flex-start",[`is-align-${n.align}`]:n.flex&&n.align!=="flex-start",[`is-align-content-${n.alignContent}`]:n.flex&&n.alignContent!=="stretch","is-grow":(c=n.grow)!=null?c:a.value,"is-shrink":n.shrink,[`is-align-self-${n.alignSelf}`]:a.value&&n.alignSelf!=="auto",[`is-overflow-${n.overflow}`]:!!n.overflow,"is-padding":!!n.padding,"is-pointer":n.autoPointer&&!!e.onClick,"is-gap":!!n.gap}}),s=Vue.computed(()=>{const{width:c,height:d,fit:m}=n;return m?null:{width:c?Ve(c):void 0,height:d?Ve(d):void 0}});return t({$vtjEl:u}),(c,d)=>(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(n.tag),{ref_key:"elRef",ref:l,class:Vue.normalizeClass(["x-container",i.value]),style:Vue.normalizeStyle(s.value)},{default:Vue.withCtx(()=>[Vue.renderSlot(c.$slots,"default")]),_:3},8,["class","style"]))}}),ao={size:{type:String,default:"default"},content:{type:String,default:""},subtitle:{type:String},icon:{type:[String,Object]},border:{type:Boolean},more:{type:Boolean}},fl={class:"x-header__content"},pl={key:0,class:"x-header__actions"},Xt=Vue.defineComponent({name:"XHeader",inheritAttrs:!1,__name:"Header",props:ao,setup(o){const t=o,n=De(Vue.toRef(t,"icon")),e=Vue.useAttrs(),r=Vue.computed(()=>({[`is-size-${t.size}`]:!!t.size&&t.size!=="default","is-border":t.border,"is-pointer":!!e.onClick}));return(l,u)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(j),{class:Vue.normalizeClass(["x-header",r.value]),justify:"space-between",align:"center"},{default:Vue.withCtx(()=>[Vue.createVNode(Vue.unref(j),{align:"center",class:Vue.normalizeClass(["x-header__wrapper",r.value]),grow:"",onClick:Vue.unref(e).onClick},{default:Vue.withCtx(()=>[Vue.unref(n)?(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(Vue.unref(n)),{key:0,class:"x-header__icon",onClick:Vue.unref(e).onClickIcon||Vue.unref(e).onClick},null,8,["onClick"])):Vue.createCommentVNode("",!0),Vue.createElementVNode("span",fl,[Vue.renderSlot(l.$slots,"default",{},()=>[Vue.createTextVNode(Vue.toDisplayString(t.content),1)])]),t.more?(Vue.openBlock(),Vue.createBlock(Vue.unref(de),{key:1,class:"x-header__more",icon:Vue.unref(VtjIcons.ArrowRight)},null,8,["icon"])):Vue.createCommentVNode("",!0),t.subtitle||l.$slots.subtitle?(Vue.openBlock(),Vue.createElementBlock("span",{key:2,class:"x-header__subtitle",onClick:u[0]||(u[0]=(...a)=>Vue.unref(e).onClick&&Vue.unref(e).onClick(...a))},[Vue.renderSlot(l.$slots,"subtitle",{},()=>[Vue.createTextVNode(Vue.toDisplayString(t.subtitle),1)])])):Vue.createCommentVNode("",!0)]),_:3},8,["class","onClick"]),l.$slots.actions?(Vue.openBlock(),Vue.createElementBlock("div",pl,[Vue.renderSlot(l.$slots,"actions")])):Vue.createCommentVNode("",!0)]),_:3},8,["class"]))}}),uo={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}},Le=Vue.defineComponent({name:"XPanel",__name:"Panel",props:uo,setup(o,{expose:t}){const n=o,e=Vue.ref(),r=Vue.computed(()=>({"x-panel--card":!!n.card,"x-panel--default":!n.card,[`is-${n.size}`]:!!n.size&&n.size!=="default","is-border":!!n.border,"is-radius":!!n.radius,[`is-shadow-${n.shadow}`]:!!n.shadow&&n.shadow!=="none"})),l=Vue.computed(()=>n.header===null?null:typeof n.header=="string"?{content:n.header,size:n.size}:{...n.header,size:n.size}),u=Vue.computed(()=>n.fit||n.height?"auto":void 0);return t({bodyRef:e}),(a,i)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(j),{class:Vue.normalizeClass(["x-panel",r.value]),direction:"column",fit:n.fit,width:n.width,height:n.height},{default:Vue.withCtx(()=>[l.value?(Vue.openBlock(),Vue.createBlock(Vue.unref(j),{key:0,flex:!1,class:"x-panel__header"},{default:Vue.withCtx(()=>[Vue.renderSlot(a.$slots,"header",{},()=>[Vue.createVNode(Vue.unref(Xt),Vue.normalizeProps(Vue.guardReactiveProps(l.value)),{default:Vue.withCtx(()=>[Vue.renderSlot(a.$slots,"title")]),actions:Vue.withCtx(()=>[Vue.renderSlot(a.$slots,"actions")]),_:3},16)])]),_:3})):Vue.createCommentVNode("",!0),Vue.createVNode(Vue.unref(j),Vue.mergeProps({ref_key:"bodyRef",ref:e,flex:!1,overflow:u.value,grow:"",padding:"",class:"x-panel__body"},n.body),{default:Vue.withCtx(()=>[Vue.renderSlot(a.$slots,"default")]),_:3},16,["overflow"]),a.$slots.footer?(Vue.openBlock(),Vue.createBlock(Vue.unref(j),Vue.mergeProps({key:1,flex:!1,padding:"",class:"x-panel__footer"},n.footer),{default:Vue.withCtx(()=>[Vue.renderSlot(a.$slots,"footer")]),_:3},16)):Vue.createCommentVNode("",!0)]),_:3},8,["class","fit","width","height"]))}}),io="user-select-none";class qt{constructor(t,n={}){Ee(this,"scope");Ee(this,"dragging",!1);this.el=t,this.options=n,this.scope=Vue.effectScope(),this.scope.run(()=>{this.init()})}getHandle(){const{selector:t,handle:n}=this.options;return t?this.el.querySelector(t):n}getTarget(){const{target:t="body"}=this.options;return typeof t=="string"?document.querySelector(t):Vue.unref(t)||document.body}init(){const{el:t,options:n}=this,{disabled:e,delay:r=150,onStart:l,onEnd:u}=n;if(e)return;let a=null;const i=this.getHandle(),s=this.getTarget();let c=t.getBoundingClientRect(),d=null;const{x:m,y:p}=VueUse.useDraggable(t,{initialValue:{x:c.x,y:c.y},...n,handle:i,onStart:(f,V)=>{document.body.classList.add(io),clearTimeout(a),a=setTimeout(()=>{this.dragging=!0,c=t.getBoundingClientRect(),d=s==null?void 0:s.getBoundingClientRect(),l&&l(f,V)},r)},onEnd:(f,V)=>{if(clearTimeout(a),document.body.classList.remove(io),this.dragging&&d){this.dragging=!1;const{x:h,y:w}=f,v=this.getPosition(d,c,h,w);u&&u(v,V),d=null}}});Vue.watch([m,p],()=>{if(this.dragging&&d){const f=this.getPosition(d,c,m.value,p.value);t.style.left=`${f.x}px`,t.style.top=`${f.y}px`}})}getPosition(t,n,e,r){const{edge:l=50}=this.options,u=-n.width+t.x+l,a=t.width+t.x-l,i=t.y,s=t.height+t.y-l,c=Math.min(a,Math.max(e,u)),d=Math.min(s,Math.max(r,i));return{x:c-t.x,y:d-t.y}}destory(){this.scope.stop()}}const so={mounted(o,t){const n=t.value||{},e=new qt(o,n);o.__draggable__=e},updated(o,t){const n=t.value||{};let e=o.__draggable__;e&&!VtjUtils.isEqual(e.options,n)&&(e.destory(),o.__draggable__=new qt(o,n))},unmounted(o){const t=o.__draggable__;t&&(t.destory(),o.__draggable__=null)}},Kt="user-select-none";class Yt{constructor(t,n={}){Ee(this,"scope");Ee(this,"resizing",Vue.ref(!1));Ee(this,"direction",Vue.ref(""));Ee(this,"MIE",null);Ee(this,"cleanMousedown");Ee(this,"cleanMouseup");this.el=t,this.options=n,this.scope=Vue.effectScope(),this.scope.run(()=>{this.init()})}init(){const{el:t,options:n}=this,{disabled:e,onStart:r,onEnd:l}=n;if(e)return;this.MIE=VueUse.useMouseInElement(t),this.cleanMousedown=VueUse.useEventListener(document,"mousedown",()=>{var i;(i=this.direction)!=null&&i.value&&this.MIE&&(this.resizing.value=!0,t.classList.add("is-resizing",`is-${this.direction.value}-resizing`),r&&r(this.direction.value,this.MIE))}),this.cleanMouseup=VueUse.useEventListener(document,"mouseup",()=>{var i;this.resizing.value&&((i=this.direction)!=null&&i.value)&&this.MIE&&(t.classList.remove("is-resizing",`is-${this.direction.value}-resizing`),l&&l(this.direction.value,this.MIE)),this.resizing.value=!1}),Vue.watch(this.direction,i=>{const s=document.body;s.style.cursor=i?`${i}-resize`:"",i?s.classList.add(Kt):s.classList.remove(Kt)});const{x:u,y:a}=this.MIE;Vue.watch([u,a],()=>{this.resizing.value?this.resize():this.direction.value=this.getDirection()})}resize(){const{MIE:t,direction:n,resizing:e,options:r,el:l}=this,u=(n==null?void 0:n.value)||"";if(!t||!e.value||!u)return;const{x:a,y:i,elementX:s,elementY:c,elementHeight:d,elementWidth:m}=t,{onResizing:p}=r,{minWidth:f=0,minHeight:V=0,maxWidth:h=99999,maxHeight:w=99999}=r;if(u.includes("e")){const v=Math.min(Math.max(s.value,f),h);l.style.width=`${v}px`}if(u.includes("s")){const v=Math.min(Math.max(c.value,V),w);l.style.height=`${v}px`}if(u.includes("w")){const v=Math.min(Math.max(m.value-s.value,f),h);l.style.width=`${v}px`,l.style.left=`${a.value}px`}if(u.includes("n")){const v=Math.min(Math.max(d.value-c.value,V),w);this.el.style.height=`${v}px`,this.el.style.top=`${i.value}px`}p&&p(u,t)}getDirection(){if(!this.MIE)return"";const{elementX:t,elementY:n,elementHeight:e,elementWidth:r,isOutside:l}=this.MIE;if(l.value)return"";const{dirs:u=["n","s","w","e"],edge:a=5}=this.options;let i="";return u.includes("n")&&n.value<=a?i+="n":u.includes("s")&&n.value>e.value-a&&(i+="s"),u.includes("w")&&t.value<=a?i+="w":u.includes("e")&&t.value>r.value-a&&(i+="e"),i}destory(){var n;const t=document.body;t.style.cursor="",t.classList.remove(Kt),this.cleanMousedown&&this.cleanMousedown(),this.cleanMouseup&&this.cleanMouseup(),(n=this.MIE)==null||n.stop(),this.scope.stop()}}const Gt={mounted(o,t){const n=t.value||{},e=new Yt(o,n);o.__resizable__=e},updated(o,t){const n=t.value||{};let e=o.__resizable__;e&&!VtjUtils.isEqual(e.options,n)&&(e.destory(),o.__resizable__=new Yt(o,n))},unmounted(o){const t=o.__resizable__;t&&(t.destory(),o.__resizable__=null)}},co={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},pure:{type:Boolean}};let He=1e3;function ml(o,t){const{width:n,height:e}=VueUse.useElementSize(t),r=Vue.reactive({mode:o.mode||"normal",wrapperWidth:0,wrapperHeight:0,width:0,height:0,top:0,left:0,zIndex:++He,dragging:!1,resizing:!1});return Vue.watch([n,e],([l,u])=>{r.wrapperWidth=l,r.wrapperHeight=u,r.width=tt(o.width,l),r.height=tt(o.height,u),r.left=o.left?tt(o.left,l)-r.width/2:Math.max(Math.floor((l-r.width)/2),0),r.top=o.top?tt(o.top,u):Math.max(Math.floor((u-r.height)/2),0)}),Vue.watch(r,l=>{He=Math.max(l.zIndex,He)}),{state:r,normal:Vue.computed(()=>r.mode==="normal"),maximized:Vue.computed(()=>r.mode==="maximized"),minimized:Vue.computed(()=>r.mode==="minimized")}}function Vl(o,t){const n=Vue.computed(()=>{const{width:a,height:i,top:s,left:c,zIndex:d}=t;return{width:`${a}px`,height:`${i}px`,top:`${s}px`,left:`${c}px`,zIndex:d}}),e=Vue.computed(()=>{const{zIndex:a}=t;return{zIndex:a}}),r=Vue.computed(()=>({[`is-${t.mode}`]:!!t.mode,"is-draggable":!!o.draggable,"is-resizable":!!o.resizable,"is-primary":!!o.primary,"is-pure":!!o.pure})),l=Vue.computed(()=>({[`is-${t.mode}`]:!!t.mode,"is-dragging":t.dragging,"is-resizing":t.resizing})),u=Vue.computed(()=>({zIndex:t.zIndex}));return{styles:n,classes:r,wrapperClass:l,modalStyle:u,zIndexStyle:e}}function hl(o,t,n){const e=c=>{t.mode=c,["maximized","minimized","normal"].includes(c)&&n(c),n("modeChange",c)},r=async()=>{(!o.beforeClose||await o.beforeClose())&&(n("update:modelValue",!1),n("close"),n("destroy"))};return{close:r,changeMode:e,show:()=>e("normal"),hide:()=>e("minimized"),active:c=>{const d=c.target.nodeName||"";["INPUT","TEXTAREA","RADIO","CHECKBOX"].includes(d.toUpperCase())||(t.zIndex=Math.max(t.zIndex,++He))},submit:()=>n("submit"),cancel:()=>{n("cancel"),r()}}}function gl(o,t,n,e){return Vue.computed(()=>{var l;const r=typeof o.draggable=="boolean"?!o.draggable:!!((l=o.draggable)!=null&&l.disabled);return{...VtjUtils.isObject(o.draggable)?o.draggable:{},disabled:r,target:e,selector:".x-panel__header",onStart(u){t.dragging=!0,t.zIndex=Math.max(t.zIndex,++He),n("dragStart",u)},onMove(u){n("dragging",u)},onEnd(u){if(t.mode==="maximized")return;const{x:a,y:i}=u;t.left=a,t.top=i,t.dragging=!1,n("dragEnd",u)}}})}function vl(o,t,n){return Vue.computed(()=>{var r;const e=typeof o.resizable=="boolean"?!o.resizable:!!((r=o.resizable)!=null&&r.disabled);return{minWidth:200,minHeight:150,...VtjUtils.isObject(o.resizable)?o.resizable:{},disabled:e,dirs:["e","s","w"],onStart(l,u){t.resizing=!0,t.zIndex=Math.max(t.zIndex,++He),n("resizeStart",l,u)},onResizing(l,u){n("resizing",l,u)},onEnd(l,u){const a=document.body.getBoundingClientRect();t.left=u.elementPositionX.value-a.x,t.top=u.elementPositionY.value-a.y,t.width=u.elementWidth.value,t.height=u.elementHeight.value,t.resizing=!1,n("resizeEnd",l,u)}}})}function yl(o,t){const n=o.componentInstance;if(!n)return;let e=null;return Vue.onMounted(()=>{const r=Vue.unref(t),l=Vue.unref(r==null?void 0:r.bodyRef);e=n.$el,l&&l.$el&&l.$el.appendChild(e)}),Vue.onUnmounted(()=>{e&&e.parentNode&&e.parentNode.removeChild(e)}),{componentInstance:n}}const wl=["src"],Xe=Vue.defineComponent({name:"XDialog",__name:"Dialog",props:co,emits:["update:modelValue","open","close","destroy","maximized","minimized","normal","modeChange","dragStart","dragging","dragEnd","resizeStart","resizeEnd","resizing","submit","cancel"],setup(o,{expose:t,emit:n}){const e=o,r=n,l=Vue.getCurrentInstance(),u=Vue.ref(),a=Vue.ref(),{state:i,maximized:s,minimized:c,normal:d}=ml(e,u),{styles:m,classes:p,wrapperClass:f,modalStyle:V,zIndexStyle:h}=Vl(e,i),{changeMode:w,active:v,close:b,show:y,hide:_,submit:C,cancel:g}=hl(e,i,r),x=gl(e,i,r,u),S=vl(e,i,r),I=yl(e,a);Vue.watchEffect(async()=>{e.modelValue?(await Vue.nextTick(),l&&(r("open",l),document.body.classList.add("x-dialog-visible"))):document.body.classList.remove("x-dialog-visible")}),Vue.onUnmounted(()=>{document.body.classList.remove("x-dialog-visible")});const z=Vue.computed(()=>{var N;return(N=a.value)==null?void 0:N.$el});return t({$vtjEl:z,panelRef:a,state:i,maximized:s,minimized:c,changeMode:w,show:y,hide:_,submit:C,cancel:g,close:b,componentInstance:I}),(N,T)=>e.modelValue?(Vue.openBlock(),Vue.createBlock(Vue.Teleport,{key:0,to:"body"},[Vue.createElementVNode("div",{ref_key:"wrapper",ref:u,class:Vue.normalizeClass(["x-dialog__wrapper",Vue.unref(f)]),style:Vue.normalizeStyle(Vue.unref(h))},[e.modal?(Vue.openBlock(),Vue.createElementBlock("div",{key:0,class:"x-dialog__modal",style:Vue.normalizeStyle(Vue.unref(V))},null,4)):Vue.createCommentVNode("",!0),Vue.withDirectives((Vue.openBlock(),Vue.createBlock(Vue.unref(Le),Vue.mergeProps({ref_key:"panelRef",ref:a,class:["x-dialog",Vue.unref(p)],card:"",shadow:"always",header:{icon:e.icon,subtitle:e.subtitle},width:"800px",height:"600px",footer:{justify:"space-between",flex:!0,align:"center"},style:Vue.unref(m),size:e.size,body:{padding:e.bodyPadding},onClick:Vue.unref(v)},N.$attrs),Vue.createSlots({title:Vue.withCtx(()=>[Vue.createTextVNode(Vue.toDisplayString(e.title),1)]),actions:Vue.withCtx(()=>[Vue.renderSlot(N.$slots,"actions"),e.minimizable?(Vue.openBlock(),Vue.createBlock(Vue.unref(Q),{key:0,icon:Vue.unref(VtjIcons.Minimize),size:e.size,mode:"icon",type:"primary",background:"hover",onClick:T[0]||(T[0]=A=>Vue.unref(w)("minimized"))},null,8,["icon","size"])):Vue.createCommentVNode("",!0),e.maximizable?(Vue.openBlock(),Vue.createElementBlock(Vue.Fragment,{key:1},[Vue.unref(d)?(Vue.openBlock(),Vue.createBlock(Vue.unref(Q),{key:1,icon:Vue.unref(VtjIcons.Maximize),size:e.size,mode:"icon",type:"primary",background:"hover",onClick:T[2]||(T[2]=A=>Vue.unref(w)("maximized"))},null,8,["icon","size"])):(Vue.openBlock(),Vue.createBlock(Vue.unref(Q),{key:0,icon:Vue.unref(VtjIcons.Popup),size:e.size,mode:"icon",type:"primary",background:"hover",onClick:T[1]||(T[1]=A=>Vue.unref(w)("normal"))},null,8,["icon","size"]))],64)):Vue.createCommentVNode("",!0),e.closable?(Vue.openBlock(),Vue.createBlock(Vue.unref(Q),{key:2,icon:Vue.unref(VtjIcons.RawClose),size:e.size,mode:"icon",type:"danger",background:"hover",onClick:Vue.unref(b)},null,8,["icon","size","onClick"])):Vue.createCommentVNode("",!0)]),default:Vue.withCtx(()=>[Vue.renderSlot(N.$slots,"default",{},()=>[e.content?(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(e.content),{key:0})):Vue.createCommentVNode("",!0),e.src?(Vue.openBlock(),Vue.createElementBlock("iframe",{key:1,src:e.src,class:"x-dialog__frame"},null,8,wl)):Vue.createCommentVNode("",!0)])]),_:2},[e.cancel||e.submit||N.$slots.footer||N.$slots.extra||N.$slots.handle?{name:"footer",fn:Vue.withCtx(()=>[Vue.renderSlot(N.$slots,"footer",{},()=>[Vue.createVNode(Vue.unref(j),{align:"center"},{default:Vue.withCtx(()=>[Vue.renderSlot(N.$slots,"extra")]),_:3}),Vue.createVNode(Vue.unref(j),{align:"center"},{default:Vue.withCtx(()=>[Vue.renderSlot(N.$slots,"handle"),e.cancel?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElButton),{key:0,type:"default",size:e.size,onClick:Vue.unref(g)},{default:Vue.withCtx(()=>[Vue.createTextVNode(Vue.toDisplayString(typeof e.cancel=="string"?e.cancel:"取消"),1)]),_:1},8,["size","onClick"])):Vue.createCommentVNode("",!0),e.submit?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElButton),{key:1,type:"primary",size:e.size,onClick:Vue.unref(C)},{default:Vue.withCtx(()=>[Vue.createTextVNode(Vue.toDisplayString(typeof e.submit=="string"?e.submit:"确定"),1)]),_:1},8,["size","onClick"])):Vue.createCommentVNode("",!0)]),_:3})])]),key:"0"}:void 0]),1040,["header","class","style","size","body","onClick"])),[[Vue.unref(so),Vue.unref(x)],[Vue.unref(Gt),Vue.unref(S)]])],6)])):Vue.createCommentVNode("",!0)}});function gt(o,t){const n=document.createElement("div"),e=Vue.createVNode(Xe,o);e.appContext=t!=null?t:gt._context,Vue.render(e,n);const r=()=>{var l;Vue.render(null,n),(l=n.parentNode)==null||l.removeChild(n)};return e.props.onDestroy=()=>{r()},document.body.appendChild(n),{vnode:e,destroy:r}}const bl=Vue.defineComponent({__name:"Sidebar",props:{collapsed:{type:Boolean}},setup(o){const t=o;return(n,e)=>Vue.withDirectives((Vue.openBlock(),Vue.createBlock(Vue.unref(j),{class:Vue.normalizeClass(["x-mask-sidebar",{"is-collapsed":t.collapsed}]),grow:!1,flex:"",direction:"column"},{default:Vue.withCtx(()=>[Vue.renderSlot(n.$slots,"brand"),Vue.createVNode(Vue.unref(j),{class:"x-mask-sidebar__wrapper",flex:"",grow:"",direction:"column",justify:"space-between",align:"center"},{default:Vue.withCtx(()=>[Vue.renderSlot(n.$slots,"default"),e[0]||(e[0]=Vue.createElementVNode("div",{class:"x-mask-sidebar__helper"},null,-1))]),_:3})]),_:3},8,["class"])),[[Vue.unref(Gt),{dirs:["e"],disabled:t.collapsed,maxWidth:500,minWidth:200}]])}}),Cl=Vue.defineComponent({__name:"SwitchBar",props:{collasped:{type:Boolean,default:!1},favorite:{type:Boolean,default:!1},keyword:{}},emits:["update:collasped","update:keyword","update:favorite"],setup(o,{emit:t}){const n=o,e=t,r=Vue.ref(!1),l=Vue.ref(""),u=Vue.ref(!1),a=()=>{r.value=!0},i=()=>{l.value="",r.value=!1,e("update:keyword",l.value)},s=()=>{e("update:collasped",!n.collasped)},c=()=>{e("update:keyword",l.value)},d=()=>{e("update:favorite",u.value)};return(m,p)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(j),{class:"x-mask-switch-bar",justify:"space-between",align:"center"},{default:Vue.withCtx(()=>[n.collasped?Vue.createCommentVNode("",!0):(Vue.openBlock(),Vue.createBlock(Vue.unref(j),{key:0,class:"x-mask-switch-bar__left",grow:""},{default:Vue.withCtx(()=>[r.value?Vue.createCommentVNode("",!0):(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElSwitch),{key:0,modelValue:u.value,"onUpdate:modelValue":p[0]||(p[0]=f=>u.value=f),class:"x-mask-switch-bar__switch","active-icon":Vue.unref(VtjIcons.StarFilled),"inactive-icon":Vue.unref(VtjIcons.Menu),onChange:d},null,8,["modelValue","active-icon","inactive-icon"])),r.value?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElInput),{key:1,modelValue:l.value,"onUpdate:modelValue":p[1]||(p[1]=f=>l.value=f),class:"x-mask-switch-bar__input",size:"small",placeholder:"请输入查询关键字",onInput:c,"prefix-icon":Vue.unref(VtjIcons.Search)},{suffix:Vue.withCtx(()=>[Vue.createVNode(Vue.unref(de),{icon:Vue.unref(VtjIcons.Close),onClick:i},null,8,["icon"])]),_:1},8,["modelValue","prefix-icon"])):Vue.createCommentVNode("",!0)]),_:1})),Vue.createVNode(Vue.unref(j),{class:Vue.normalizeClass(["x-mask-switch-bar__right",{"is-collasped":n.collasped}]),flex:"",align:"center",justify:"center"},{default:Vue.withCtx(()=>[!r.value&&!n.collasped?(Vue.openBlock(),Vue.createBlock(Vue.unref(Q),{key:0,icon:Vue.unref(VtjIcons.Search),mode:"icon",background:"hover",size:"default",circle:"",onClick:a},null,8,["icon"])):Vue.createCommentVNode("",!0),n.collasped?(Vue.openBlock(),Vue.createBlock(Vue.unref(Q),{key:1,icon:Vue.unref(VtjIcons.Expand),mode:"icon",size:"default",background:"hover",onClick:s,circle:""},null,8,["icon"])):Vue.createCommentVNode("",!0),n.collasped?Vue.createCommentVNode("",!0):(Vue.openBlock(),Vue.createBlock(Vue.unref(Q),{key:2,icon:Vue.unref(VtjIcons.Fold),mode:"icon",size:"default",background:"hover",circle:"",onClick:s},null,8,["icon"]))]),_:1},8,["class"])]),_:1}))}}),_l=["src"],kl={key:0},El=Vue.defineComponent({__name:"Brand",props:{collapsed:{type:Boolean,default:!1},logo:{},title:{},url:{}},setup(o){const t=o,n=VueRouter.useRouter(),e=()=>{t.url&&n.push(t.url)};return(r,l)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(j),{class:Vue.normalizeClass(["x-mask-brand",{"is-collapsed":t.collapsed}]),align:"center"},{default:Vue.withCtx(()=>[Vue.createVNode(Vue.unref(j),{class:"x-mask-brand__logo",flex:"",justify:"center",align:"center",onClick:e},{default:Vue.withCtx(()=>[Vue.renderSlot(r.$slots,"logo",{},()=>[t.logo?(Vue.openBlock(),Vue.createElementBlock("img",{key:0,src:t.logo},null,8,_l)):Vue.createCommentVNode("",!0)])]),_:3}),Vue.createVNode(Vue.unref(j),{class:"x-mask-brand__title",flex:"",align:"center"},{default:Vue.withCtx(()=>[t.title?(Vue.openBlock(),Vue.createElementBlock("span",kl,[Vue.renderSlot(r.$slots,"title",{},()=>[Vue.createTextVNode(Vue.toDisplayString(t.title),1)])])):Vue.createCommentVNode("",!0)]),_:3})]),_:3},8,["class"]))}}),vt="__favorites__",yt="__search__",Sl=Vue.defineComponent({__name:"Menu",props:{collapse:{type:Boolean,default:!1},keyword:{},favorite:{type:Boolean},favorites:{},flatMenus:{},menus:{},active:{}},emits:["select"],setup(o,{emit:t}){const n=o,e=Vue.computed(()=>n.menus||[]),r=t,l=Vue.computed(()=>{var s;return String((s=n.active)==null?void 0:s.id)}),u=Vue.computed(()=>{var s;return[{id:vt,title:"收藏",icon:VtjIcons.Star,children:(s=n.favorites)!=null&&s.length?n.favorites:[{id:vt+"empty",disabled:!0,title:"暂无收藏菜单"}]}]}),a=Vue.computed(()=>{const s=(n.keyword||"").trim(),c=s?(n.flatMenus||[]).filter(d=>{var m;return(m=d.title)==null?void 0:m.includes(s)}):[];return[{id:yt,title:"搜索",icon:VtjIcons.Search,children:c!=null&&c.length?c:[{id:yt+"empty",disabled:!0,title:"查询匹配不到菜单项"}]}]}),i=s=>{r("select",s)};return(s,c)=>(Vue.openBlock(),Vue.createElementBlock(Vue.Fragment,null,[Vue.withDirectives(Vue.createVNode(Vue.unref(j),{class:"x-mask-menu",grow:"",flex:!1,overflow:"auto"},{default:Vue.withCtx(()=>[Vue.withDirectives(Vue.createVNode(Vue.unref(Se),{subMenu:{popperClass:"x-mask-menu-popper",teleported:!0,showTimeout:200,hideTimeout:200},data:e.value,"default-icon":Vue.unref(VtjIcons.Document),collapse:!0,"collapse-transition":!1,"default-active":l.value,onSelect:i},null,8,["data","default-icon","default-active"]),[[Vue.vShow,n.collapse]]),Vue.withDirectives(Vue.createVNode(Vue.unref(Se),{subMenu:{popperClass:"x-mask-menu-popper",teleported:!0},data:e.value,"default-icon":Vue.unref(VtjIcons.Document),collapse:!1,"collapse-transition":!1,"default-active":l.value,onSelect:i},null,8,["data","default-icon","default-active"]),[[Vue.vShow,!n.collapse]]),e.value.length?Vue.createCommentVNode("",!0):(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElEmpty),{key:0,description:"暂无菜单数据"}))]),_:1},512),[[Vue.vShow,!n.favorite&&!n.keyword]]),Vue.withDirectives(Vue.createVNode(Vue.unref(j),{class:"x-mask-menu",grow:"",flex:!1,overflow:"auto"},{default:Vue.withCtx(()=>[Vue.withDirectives(Vue.createVNode(Vue.unref(Se),{class:"x-mask-menu__favorites",subMenu:{popperClass:"x-mask-menu-popper",teleported:!0,showTimeout:200,hideTimeout:200},data:u.value,"default-icon":Vue.unref(VtjIcons.Document),collapse:!0,"collapse-transition":!1,"default-active":l.value,"default-openeds":[vt],onSelect:i},null,8,["data","default-icon","default-active","default-openeds"]),[[Vue.vShow,n.collapse]]),Vue.withDirectives(Vue.createVNode(Vue.unref(Se),{class:"x-mask-menu__favorites",subMenu:{popperClass:"x-mask-menu-popper",teleported:!0,showTimeout:200,hideTimeout:200},data:u.value,"default-icon":Vue.unref(VtjIcons.Document),collapse:!1,"collapse-transition":!1,"default-active":l.value,"default-openeds":[vt],onSelect:i},null,8,["data","default-icon","default-active","default-openeds"]),[[Vue.vShow,!n.collapse]])]),_:1},512),[[Vue.vShow,n.favorite&&!n.keyword]]),n.keyword?Vue.withDirectives((Vue.openBlock(),Vue.createBlock(Vue.unref(j),{key:0,class:"x-mask-menu",grow:"",flex:!1,overflow:"auto"},{default:Vue.withCtx(()=>[Vue.withDirectives(Vue.createVNode(Vue.unref(Se),{class:"x-mask-menu__search",subMenu:{popperClass:"x-mask-menu-popper",teleported:!0,showTimeout:200,hideTimeout:200},data:a.value,"default-icon":Vue.unref(VtjIcons.Document),collapse:!0,"collapse-transition":!1,"default-active":l.value,"default-openeds":[yt],onSelect:i},null,8,["data","default-icon","default-active","default-openeds"]),[[Vue.vShow,n.collapse]]),Vue.withDirectives(Vue.createVNode(Vue.unref(Se),{class:"x-mask-menu__search",subMenu:{popperClass:"x-mask-menu-popper",teleported:!0,showTimeout:200,hideTimeout:200},data:a.value,"default-icon":Vue.unref(VtjIcons.Document),collapse:!1,"collapse-transition":!1,"default-active":l.value,"default-openeds":[yt],onSelect:i},null,8,["data","default-icon","default-active","default-openeds"]),[[Vue.vShow,!n.collapse]])]),_:1},512)),[[Vue.vShow,!!n.keyword]]):Vue.createCommentVNode("",!0)],64))}}),xl="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",fo=140,po={logo:{type:String,default:xl},title:{type:String,default:"VTJ.PRO"},menus:{type:[Array,Function],default(){return[]}},favorites:{type:[Array,Function],default(){return[]}},menuAdapter:{type:Function},home:{type:[String,Object],default:"/"},tabs:{type:Number,default:20},actions:{type:Array},avatar:{type:String},theme:{type:Boolean},disabled:{type:Boolean},addFavorite:{type:Function},removeFavorite:{type:Function},userCardWidth:{type:Number,default:350},pure:{type:Boolean}},Wt=Symbol(),Jt="$mask",Bl={class:"x-mask-tabs__trigger"},Pl={key:1},Nl=["onDragstart","onDragend"],Tl={key:1},Dl=Vue.defineComponent({__name:"Tabs",props:{tabs:{},home:{},isActiveTab:{type:Function},value:{},favorites:{}},emits:["click","remove","refresh","toggleFavorite","dialog"],setup(o,{emit:t}){const n=o,e=t,r=c=>{const d=!!n.favorites.find(m=>{var p;return m===c.menu||m.id===((p=c.menu)==null?void 0:p.id)});return[{icon:VtjIcons.Refresh,label:"刷新",name:"refresh",value:c},"|",{icon:d?VtjIcons.StarFilled:VtjIcons.Star,label:"收藏",name:"favorite",value:c.menu,disabled:!c.menu||!!c.menu.hidden},"|",{icon:VtjIcons.CopyDocument,label:"弹窗",name:"dialog",value:c}]},l=c=>{const d=c.paneName;if(d===n.home.id){e("click",n.home);return}const m=n.tabs.find(p=>p.id===d);m&&e("click",m)},u=c=>{const d=n.tabs.find(m=>m.id===c);d&&e("remove",d)},a=c=>{switch(c.name){case"refresh":e("refresh",c.value);break;case"favorite":e("toggleFavorite",c.value);break;case"dialog":e("dialog",c.value);break}},i=(c,d)=>{d.dataTransfer&&(d.dataTransfer.setData("tab",c.id),d.target&&d.target.classList.add("is-dagging"))},s=(c,d)=>{d.target&&d.target.classList.remove("is-dagging")};return(c,d)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(j),{ref:"tabsRef",class:"x-mask-tabs",height:"100%",grow:"",flex:"",justify:"flex-end",direction:"column"},{default:Vue.withCtx(()=>[Vue.createVNode(Vue.unref(ElementPlus.ElTabs),{type:"card","model-value":n.value,onTabRemove:u,onTabClick:l},{default:Vue.withCtx(()=>[n.home?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElTabPane),{key:0,name:n.home.id},{label:Vue.withCtx(()=>[Vue.createElementVNode("div",Bl,[n.home.icon?(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(Vue.unref(De)(n.home.icon)),{key:0})):Vue.createCommentVNode("",!0),n.home.title?(Vue.openBlock(),Vue.createElementBlock("span",Pl,Vue.toDisplayString(n.home.title),1)):Vue.createCommentVNode("",!0)])]),_:1},8,["name"])):Vue.createCommentVNode("",!0),(Vue.openBlock(!0),Vue.createElementBlock(Vue.Fragment,null,Vue.renderList(n.tabs,m=>(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElTabPane),{key:m.id,name:m.id,lazy:"",closable:""},{label:Vue.withCtx(()=>[Vue.createVNode(Vue.unref(ElementPlus.ElPopover),{"open-delay":500,placement:"bottom",trigger:"hover",width:"200px",disabled:m.id!==n.value},{reference:Vue.withCtx(()=>[Vue.createElementVNode("div",{class:"x-mask-tabs__trigger",draggable:"true",onDragstart:p=>i(m,p),onDragend:p=>s(m,p)},[m.icon?(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(Vue.unref(De)(m.icon)),{key:0})):Vue.createCommentVNode("",!0),m.title?(Vue.openBlock(),Vue.createElementBlock("span",Tl,Vue.toDisplayString(m.title),1)):Vue.createCommentVNode("",!0)],40,Nl)]),default:Vue.withCtx(()=>[Vue.createVNode(Vue.unref(ze),{items:r(m),mode:"text",size:"small",type:"info",onClick:a},null,8,["items"])]),_:2},1032,["disabled"])]),_:2},1032,["name"]))),128))]),_:1},8,["model-value"])]),_:1},512))}}),zl=Vue.defineComponent({__name:"ThemeSwitch",setup(o){const t=VueUse.useDark(),n=Vue.computed(()=>t.value?VtjIcons.Sunny:VtjIcons.Moon),e=()=>{t.value=!t.value};return(r,l)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(Q),{icon:n.value,dropdown:{size:"small"},mode:"icon",circle:"",background:"hover",type:"primary",onClick:e},null,8,["icon"]))}}),Il={class:"x-mask-toolbar__menu-item"},Ml=Vue.defineComponent({__name:"Toolbar",props:{tabs:{default:()=>[]},actions:{},theme:{type:Boolean}},emits:["closeOtherTabs","closeAllTabs","closeTab","clickTab","actionClick","actionCommand"],setup(o,{emit:t}){const n=o,e=t,r=Vue.computed(()=>{const s=n.tabs.map((c,d)=>({divided:d===0,label:c.title,command:c}));return[{label:"关闭其他",command:"other"},{label:"关闭全部",command:"all"},...s]}),l=s=>{e("closeTab",s.command)},u=s=>{switch(s.command){case"all":e("closeAllTabs");break;case"other":e("closeOtherTabs");break;default:e("clickTab",s.command);break}},a=s=>{e("actionClick",s)},i=(s,c)=>{e("actionCommand",s,c)};return(s,c)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(j),{class:"x-mask-toolbar",align:"center"},{default:Vue.withCtx(()=>[Vue.createVNode(Vue.unref(Q),{icon:Vue.unref(VtjIcons.MoreFilled),menus:r.value,dropdown:{size:"small"},type:"primary",mode:"icon",circle:"",background:"hover",onCommand:u},{item:Vue.withCtx(({item:d})=>[Vue.createElementVNode("span",Il,[Vue.createTextVNode(Vue.toDisplayString(d.label)+" ",1),["other","all"].includes(d.command)?Vue.createCommentVNode("",!0):(Vue.openBlock(),Vue.createBlock(Vue.unref(de),{key:0,onClick:Vue.withModifiers(m=>l(d),["stop"]),icon:Vue.unref(VtjIcons.Close)},null,8,["onClick","icon"]))])]),_:1},8,["icon","menus"]),Vue.createVNode(Vue.unref(ElementPlus.ElDivider),{direction:"vertical"}),n.actions?(Vue.openBlock(),Vue.createBlock(Vue.unref(ze),{key:0,circle:"",mode:"icon",size:"default",background:"hover",type:"primary",items:s.actions,onClick:a,onCommand:i},null,8,["items"])):Vue.createCommentVNode("",!0),n.actions?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElDivider),{key:1,direction:"vertical"})):Vue.createCommentVNode("",!0),n.theme?(Vue.openBlock(),Vue.createBlock(zl,{key:2})):Vue.createCommentVNode("",!0),n.theme?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElDivider),{key:3,direction:"vertical"})):Vue.createCommentVNode("",!0),Vue.renderSlot(s.$slots,"default")]),_:3}))}}),Al=Vue.defineComponent({__name:"Avatar",props:{avatar:{},width:{default:350}},setup(o){const t=o;return(n,e)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElPopover),{width:t.width,"popper-class":"x-mask-avatar__popper",disabled:!n.$slots.default},{reference:Vue.withCtx(()=>[Vue.createVNode(Vue.unref(ElementPlus.ElAvatar),{class:"x-mask-avatar",shape:"circle",icon:Vue.unref(VtjIcons.UserFilled),src:t.avatar,size:26},null,8,["icon","src"])]),default:Vue.withCtx(()=>[n.$slots.default?Vue.renderSlot(n.$slots,"default",{key:0}):Vue.createCommentVNode("",!0)]),_:3},8,["width","disabled"]))}}),mo=Vue.defineComponent({__name:"Content",props:{createView:{type:Function},exclude:{},pure:{type:Boolean}},setup(o){const t=o;return(n,e)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(j),{class:"x-mask__content",overflow:"auto",flex:!1,grow:"",padding:!1},{default:Vue.withCtx(()=>[Vue.createElementVNode("div",{class:Vue.normalizeClass(["x-mask__inner",{"is-pure":t.pure}])},[Vue.renderSlot(n.$slots,"default"),Vue.createVNode(Vue.unref(VueRouter.RouterView),null,{default:Vue.withCtx(({Component:r,route:l})=>[(Vue.openBlock(),Vue.createBlock(Vue.KeepAlive,{exclude:t.exclude},[r?(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(t.createView(r,l)),{key:l.fullPath})):Vue.createCommentVNode("",!0)],1032,["exclude"]))]),_:1})],2)]),_:3}))}});function Rl(){const o=Vue.ref(!1),t=Vue.ref(""),n=Vue.ref(!1);return{collapsed:o,keyword:t,favorite:n}}function $l(o){const t=VtjUtils.uid();return Vue.computed(()=>{const n=o.home;return Object.assign({id:t,url:"/",name:"MaskHome",icon:VtjIcons.HomeFilled,closable:!1},typeof n=="string"?{url:n}:n||{})})}function Vo(o,t){let n=[];return o.forEach(e=>{e=t?t(e):e,e.children?n=n.concat(Vo(e.children,t)):n.push(e)}),n}function Fl(o,t){const n=VueRouter.useRouter(),e=Vue.shallowRef([]),r=Vue.shallowRef([]),l=Vue.computed(()=>Vo(e.value,o.menuAdapter)),u=Vue.computed(()=>VtjUtils.arrayToMap(l.value,"id")),a=Vue.ref(null),i=f=>{const V=typeof f=="object"?f.id:f,h=u.value.get(V);if(!h){console.warn("找不到菜单",f);return}const{type:w="route",url:v,title:b,icon:y}=h;if(!v){a.value=h,t("select",h);return}if(w==="route"){VtjUtils.isUrl(v)||v.startsWith("//")?window.open(v):(a.value=h,n.push(v).catch(_=>_));return}if(w==="window"){window.open(v);return}w==="dialog"&&gt({resizable:!0,bodyPadding:!1,width:"80%",height:"80%",title:b,icon:y,src:v})},s=async()=>{var f,V;e.value=typeof o.menus=="function"?await o.menus()||[]:(f=o.menus)!=null?f:[],r.value=typeof o.favorites=="function"?await o.favorites()||[]:(V=o.favorites)!=null?V:[]},c=f=>{r.value=[f,...r.value],o.addFavorite&&o.addFavorite(f)},d=f=>{r.value=r.value.filter(V=>V.id!==f.id),o.removeFavorite&&o.removeFavorite(f)},m=f=>!!r.value.find(V=>V===f||V.id===f.id),p=f=>{m(f)?d(f):c(f)};return Vue.watchEffect(s),{menus:e,favorites:r,flatMenus:l,active:a,select:i,toggleFavorite:p}}function Ol(o,t,n,e,r){const l=VueRouter.useRoute(),u=VueRouter.useRouter(),a={},i=Vue.ref([]),s=Vue.ref(),{width:c}=VueUse.useElementSize(s),d=Vue.computed(()=>Math.floor(c.value/fo)),m=Vue.computed(()=>i.value.slice(0,d.value).filter(M=>!M.dialog)),p=Vue.computed(()=>i.value.slice(d.value)),f=M=>n.value.find(k=>k.url===M),V=M=>l.fullPath===M.url,h=M=>r.value.id===M.id,w=M=>r.value.id===M?r.value:i.value.find(k=>k.id===M),v=Vue.ref(""),b=Vue.computed(()=>w(v.value)),y=M=>{u.push(M.url).catch(k=>k)},_=M=>{v.value=M.id,l.fullPath!==M.url&&y(M)},C=()=>{y(r.value)},g=M=>{const k=i.value.find(E=>E.url===M.url||E.id===M.id);k?_(k):(i.value.unshift(M),_(M))},x=async M=>{var we;const{url:k=l.fullPath,icon:E,title:D}=M||{},O=a[k],X=VtjUtils.uid(),ue=VtjUtils.upperFirstCamelCase(k);return{id:X,name:ue,url:k,icon:E,title:D||((we=f(l.path))==null?void 0:we.title)||"新建页签",closable:!0,menu:M,...O?await O():{}}},S=async(M,k)=>{if(!(!k&&!await ElementPlus.ElMessageBox.confirm("是否关闭页签","提示",{type:"warning"}).catch(()=>!1))){if(i.value=i.value.filter(E=>E.id!==M.id),v.value===M.id){const E=i.value[0];y(E||r.value)}return M}},I=M=>{const k=i.value.findIndex(E=>E.id===M.id);if(k>=0){const E=i.value[k];i.value.splice(k,1,Object.assign(E,M))}},z=async()=>{if(!await ElementPlus.ElMessageBox.confirm("是否关闭全部页签","提示",{type:"warning"}).catch(()=>!1))return;const k=i.value;return i.value=[],_(r.value),k},N=async()=>{if(!await ElementPlus.ElMessageBox.confirm("是否关闭其他页签","提示",{type:"warning"}).catch(()=>!1))return;const k=i.value.filter(E=>E.id!==v.value);return i.value=i.value.filter(E=>E.id===v.value),k},T=M=>{const k=i.value.filter(E=>E.id!==M.id);i.value=[M,...k],_(M)},A=async M=>{b.value&&b.value.closable&&(h(b.value)||(await S(b.value,!0),await VtjUtils.delay(0),M?u.push(M):u.push(r.value.url)))},Y=async()=>{await Vue.nextTick();const M=r.value.url===l.path,k=f(l.fullPath);if(M)v.value=r.value.id;else{const E=await x(k);g(E)}await Vue.nextTick(),e.value=k||null};return Vue.watch(n,Y),Vue.watch(l,Y),Vue.provide(Wt,a),{tabRef:s,tabs:i,showTabs:m,currentTab:b,changeTab:y,removeTab:S,updateTab:I,addTab:g,home:r,tabValue:v,isCurrentTab:V,activeHome:C,activeTab:_,dropdownTabs:p,removeAllTabs:z,removeOtherTabs:N,moveToShow:T,closeCurrnetTab:A}}function jl(o,t){const n=new Map,e=Vue.ref([]),r=Vue.reactive({}),l=Vue.getCurrentInstance(),u={},{updateTab:a,isCurrentTab:i,activeHome:s,tabs:c}=o,d=(y,_)=>{const C=_.fullPath;if(n.has(C))return n.get(C);{const g=VtjUtils.upperFirstCamelCase(C),x={name:g,setup(){const S=Vue.computed(()=>r[C]||document.body),I=Vue.computed(()=>!r[C]),z=Vue.computed(()=>!e.value.includes(g));return Vue.provide(VueRouter.routeLocationKey,Vue.toRaw({..._})),()=>z.value?Vue.h(Vue.Teleport,{to:S.value,disabled:I.value},[Vue.h(y)]):null}};return n.set(C,x),x}},m=y=>{y.dialog=void 0,delete r[y.url];const _=u[y.id];_&&(_.destroy(),delete u[y.id],a(y))},p=(y=[])=>{y.forEach(_=>{m(_)})},f=async y=>{y.dialog={...y.dialog,pure:t.pure,onMinimized:()=>{m(y)},onClose:async()=>{m(y),c.value=c.value.filter(C=>C.id!==y.id)}},a(y);const _=gt({title:y.title,icon:y.icon,modal:!1,resizable:!0,draggable:!0,maximizable:!0,minimizable:!0,...y.dialog,onOpen(C){var g,x;r[y.url]=(x=(g=C.refs.panelRef)==null?void 0:g.bodyRef)==null?void 0:x.$el}},l==null?void 0:l.appContext);return await Vue.nextTick(),i(y)&&s(),u[y.id]=_,_},V=async y=>{e.value=[y.name],await Vue.nextTick(),e.value=[]},h=async y=>{e.value=y.map(_=>_.name),await Vue.nextTick(),e.value=[]},w=y=>(y.preventDefault(),!1),v=y=>{if(y.dataTransfer){const _=y.dataTransfer.getData("tab"),C=c.value.find(g=>g.id===_);if(C){const{clientX:g,clientY:x}=y;C.dialog={left:g,top:x},f(C)}}},b=y=>!!r[y];return VueUse.useEventListener(document,"dragover",w),VueUse.useEventListener(document,"drop",v),{createView:d,openDialog:f,refresh:V,exclude:e,cleanCache:h,hasDialog:b,closeDialog:m,closeDialogs:p}}const ho=Vue.defineComponent({name:"XMask",__name:"Mask",props:po,emits:["select","actionClick","actionCommand"],setup(o,{emit:t}){const n=o,e=t,r=$l(n),{collapsed:l,keyword:u,favorite:a}=Rl(),{menus:i,favorites:s,flatMenus:c,active:d,select:m,toggleFavorite:p}=Fl(n,e),{tabRef:f,showTabs:V,currentTab:h,changeTab:w,removeTab:v,tabs:b,updateTab:y,isCurrentTab:_,activeHome:C,removeAllTabs:g,removeOtherTabs:x,dropdownTabs:S,moveToShow:I,closeCurrnetTab:z}=Ol(n,e,c,d,r),{createView:N,openDialog:T,closeDialog:A,refresh:Y,exclude:M,cleanCache:k,closeDialogs:E}=jl({tabs:b,updateTab:y,isCurrentTab:_,activeHome:C},n),D=async H=>{await v(H)&&await k([H])},O=async()=>{const H=await g();H&&(E(H),await k(H))},X=async()=>{const H=await x();H&&(E(H),await k(H))},ue=H=>{e("actionClick",H)},we=(H,te)=>{e("actionCommand",H,te)},Yn=async H=>{const te=Vue.toValue(H||h);te&&(te.dialog&&A(te),await v(te,!0),await VtjUtils.delay(50))};return Vue.watch(h,H=>{H!=null&&H.dialog&&A(H)}),Vue.provide(Jt,{tabs:b,flatMenus:c,favorites:s,updateTab:y,active:d,currentTab:h,closeCurrnetTab:z,close:Yn}),(H,te)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(j),{class:Vue.normalizeClass(["x-mask",{"is-disabled":n.disabled}]),fit:""},{default:Vue.withCtx(()=>[n.disabled?(Vue.openBlock(),Vue.createBlock(mo,{key:1,createView:Vue.unref(N),exclude:Vue.unref(M),pure:n.pure},{default:Vue.withCtx(()=>[H.$slots.default?Vue.renderSlot(H.$slots,"default",{key:0}):Vue.createCommentVNode("",!0)]),_:3},8,["createView","exclude","pure"])):(Vue.openBlock(),Vue.createElementBlock(Vue.Fragment,{key:0},[Vue.createVNode(bl,{collapsed:Vue.unref(l)},{brand:Vue.withCtx(()=>[Vue.createVNode(El,{logo:n.logo,title:n.title,url:Vue.unref(r).url,collapsed:Vue.unref(l)},null,8,["logo","title","url","collapsed"])]),default:Vue.withCtx(()=>[Vue.createVNode(Cl,{collasped:Vue.unref(l),"onUpdate:collasped":te[0]||(te[0]=Z=>Vue.isRef(l)?l.value=Z:null),favorite:Vue.unref(a),"onUpdate:favorite":te[1]||(te[1]=Z=>Vue.isRef(a)?a.value=Z:null),keyword:Vue.unref(u),"onUpdate:keyword":te[2]||(te[2]=Z=>Vue.isRef(u)?u.value=Z:null)},null,8,["collasped","favorite","keyword"]),Vue.createVNode(Sl,{collapse:Vue.unref(l),keyword:Vue.unref(u),favorite:Vue.unref(a),favorites:Vue.unref(s),flatMenus:Vue.unref(c),menus:Vue.unref(i),active:Vue.unref(d),onSelect:Vue.unref(m)},null,8,["collapse","keyword","favorite","favorites","flatMenus","menus","active","onSelect"])]),_:1},8,["collapsed"]),Vue.createVNode(Vue.unref(j),{class:"x-mask__main",grow:"",shrink:"",flex:"",direction:"column",overflow:"hidden"},{default:Vue.withCtx(()=>[Vue.createVNode(Vue.unref(j),{class:"x-mask-topbar",justify:"space-between",align:"center"},{default:Vue.withCtx(()=>{var Z;return[Vue.createVNode(Dl,{ref_key:"tabRef",ref:f,favorites:Vue.unref(s),tabs:Vue.unref(V),home:Vue.unref(r),value:(Z=Vue.unref(h))==null?void 0:Z.id,onClick:Vue.unref(w),onToggleFavorite:Vue.unref(p),onRemove:D,onDialog:Vue.unref(T),onRefresh:Vue.unref(Y)},null,8,["favorites","tabs","home","value","onClick","onToggleFavorite","onDialog","onRefresh"]),Vue.createVNode(Ml,{tabs:Vue.unref(S),actions:n.actions,theme:n.theme,onCloseOtherTabs:X,onCloseAllTabs:O,onCloseTab:D,onClickTab:Vue.unref(I),onActionClick:ue,onActionCommand:we},{default:Vue.withCtx(()=>[Vue.createVNode(Al,{avatar:n.avatar,width:n.userCardWidth},Vue.createSlots({_:2},[H.$slots.user?{name:"default",fn:Vue.withCtx(()=>[Vue.renderSlot(H.$slots,"user")]),key:"0"}:void 0]),1032,["avatar","width"])]),_:3},8,["tabs","actions","theme","onClickTab"])]}),_:3}),Vue.createVNode(mo,{createView:Vue.unref(N),exclude:Vue.unref(M),pure:n.pure},{default:Vue.withCtx(()=>[H.$slots.default?Vue.renderSlot(H.$slots,"default",{key:0}):Vue.createCommentVNode("",!0)]),_:3},8,["createView","exclude","pure"])]),_:3})],64))]),_:3},8,["class"]))}});function Ul(o={}){const t=VueRouter.useRoute(),n=Vue.inject(Wt,null),e=Vue.inject(Jt,null);if(n){const l=typeof o=="function"?o:async()=>o;n[t.fullPath]=l}return{tab:Vue.computed(()=>e?e.tabs.value.find(l=>l.url===t.fullPath):null),mask:e}}const Qt=Vue.defineComponent({__name:"SelectEditor",props:{options:{default:()=>[]}},emits:["change"],setup(o,{emit:t}){const n=o,e=t,r=l=>{const u=n.options.filter(a=>Array.isArray(l)?l.includes(a.value):l===a.value);e("change",l,u)};return(l,u)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElSelect),Vue.mergeProps(l.$attrs,{onChange:r}),{default:Vue.withCtx(()=>[(Vue.openBlock(!0),Vue.createElementBlock(Vue.Fragment,null,Vue.renderList(n.options,(a,i)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElOption),Vue.mergeProps({key:`item_${i}_${a.value}`,ref_for:!0},a),Vue.createSlots({_:2},[l.$slots.option?{name:"default",fn:Vue.withCtx(()=>[Vue.renderSlot(l.$slots,"option",{option:a})]),key:"0"}:void 0]),1040))),128))]),_:3},16))}}),Ll=Vue.defineComponent({__name:"CheckboxEditor",props:{options:{default:()=>[]},button:{type:Boolean,default:!1}},setup(o){const t=o,n=Vue.computed(()=>Vue.markRaw(t.button?ElementPlus.ElCheckboxButton:ElementPlus.ElCheckbox));return(e,r)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElCheckboxGroup),Vue.normalizeProps(Vue.guardReactiveProps(e.$attrs)),{default:Vue.withCtx(()=>[(Vue.openBlock(!0),Vue.createElementBlock(Vue.Fragment,null,Vue.renderList(t.options,(l,u)=>(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(n.value),Vue.mergeProps({key:`item_${u}_${l.value}`,ref_for:!0},l),{default:Vue.withCtx(()=>[Vue.createTextVNode(Vue.toDisplayString(l.label),1)]),_:2},1040))),128))]),_:1},16))}}),Hl=Vue.defineComponent({__name:"RadioEditor",props:{options:{default:()=>[]},button:{type:Boolean,default:!1}},setup(o){const t=o,n=Vue.computed(()=>Vue.markRaw(t.button?ElementPlus.ElRadioButton:ElementPlus.ElRadio));return(e,r)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElRadioGroup),Vue.normalizeProps(Vue.guardReactiveProps(e.$attrs)),{default:Vue.withCtx(()=>[(Vue.openBlock(!0),Vue.createElementBlock(Vue.Fragment,null,Vue.renderList(t.options,(l,u)=>(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(n.value),Vue.mergeProps({key:`item_${u}_${l.value}`,ref_for:!0},l),{default:Vue.withCtx(()=>[Vue.createTextVNode(Vue.toDisplayString(l.label),1)]),_:2},1040))),128))]),_:1},16))}}),Ie={filterResetMethod(o){const{options:t,column:n}=o;if(n.filterResetMethod){n.filterResetMethod(o);return}t.forEach(e=>{e.value=""})},filterRecoverMethod(o){const{option:t,column:n}=o;if(n.filterRecoverMethod){n.filterRecoverMethod(o);return}t.value=""},filterMethod(o){const{option:t,row:n,column:e}=o;if(e.filterMethod)return e.filterMethod(o);const{value:r}=t,l=n[e.field];return VtjUtils.isString(l)?l.indexOf(String(r))>-1:l===r}},Xl=Vue.defineComponent({name:"InputEdit",__name:"InputEdit",props:{params:{},renderOpts:{}},setup(o){const t=o,{renderProps:n,renderEvents:e,cellValue:r,onChange:l}=Fe(t.renderOpts,t.params);return(u,a)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElInput),Vue.mergeProps({size:"small",clearable:"",modelValue:Vue.unref(r),"onUpdate:modelValue":a[0]||(a[0]=i=>Vue.isRef(r)?r.value=i:null),onInput:Vue.unref(l)},Vue.unref(n),Vue.toHandlers(Vue.unref(e))),null,16,["modelValue","onInput"]))}}),ql={class:"x-grid__filter"},Zt=Vue.defineComponent({name:"InputFilter",__name:"InputFilter",props:{params:{},renderOpts:{}},setup(o){const t=o,{renderProps:n,renderEvents:e,state:r,load:l,onChange:u,onKeyup:a}=Mt(t.renderOpts,t.params);return l(),(i,s)=>(Vue.openBlock(),Vue.createElementBlock("div",ql,[Vue.createVNode(Vue.unref(ElementPlus.ElInput),Vue.mergeProps({size:"small",placeholder:"输入关键字回车筛选",clearable:"",modelValue:Vue.unref(r).option.value,"onUpdate:modelValue":s[0]||(s[0]=c=>Vue.unref(r).option.value=c),onInput:Vue.unref(u),onKeyup:Vue.withKeys(Vue.withModifiers(Vue.unref(a),["stop"]),["enter"])},Vue.unref(n),Vue.toHandlers(Vue.unref(e))),null,16,["modelValue","onInput","onKeyup"])]))}}),qe={autofocus:".el-input__inner",renderDefault(o,t){var r;const{row:n,column:e}=t;return[Vue.createTextVNode((r=n[e.field])!=null?r:"")]},renderEdit(o,t){return[Vue.h(Xl,{params:t,renderOpts:o})]},renderCell(o,t){var r;const{row:n,column:e}=t;return[Vue.createTextVNode((r=n[e.field])!=null?r:"")]}},Kl={cellClassName:"x-grid__edit",...qe,...Ie,renderFilter(o,t){return[Vue.h(Zt,{params:t,renderOpts:o})]}};/**!
7
+ */const ie="0.11.12",Te={default:14,small:12,large:18},Wn={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},hoverEffect:{type:Boolean}};function Ve(o){return typeof o=="string"?o:`${o}px`}function tt(o=0,t){if(typeof o=="number")return o;if(/(%|vh|vw)$/i.test(o)){const e=Number.parseInt(o);return Math.floor(t*e/100)}return Number.parseInt(o)}function Ut(o,t={}){const n={...t};return typeof o=="boolean"?n:Object.assign(n,o||{})}const Lt="__VTJ_UI_INSTALLED__",mt=Symbol("ADAPTER_KEY");function Vt(){const o=Vue.getCurrentInstance(),t=o==null?void 0:o.appContext.config.globalProperties.$adapter;return t||Vue.inject(mt,{})}const Yr={getCustom:async o=>VtjUtils.storage.get(o,{type:"local"}),saveCustom:async o=>{VtjUtils.storage.save(o.id,o,{type:"local"})}},Gr={install(o,t={}){const n=Object.assign(Yr,t),{components:e=[],fieldEditors:r={}}=n;Yo(r);for(const l of e)l.name&&o.component(l.name,l);[ElementPlus.ElMessage,ElementPlus.ElMessageBox,ElementPlus.ElNotification].forEach(l=>{o.use(l)}),o.config.globalProperties.$adapter=n,o.provide(mt,n)}},Jn=(o=[])=>({install:(n,e={})=>{n[Lt]||(n[Lt]=!0,o.forEach(r=>{r.name&&n.component(r.name,r)}),e.adapter&&n.provide(mt,e.adapter))}});let Ue;const Qn=new RegExp(`\\<script.*src=["'](?<src>[^"']+)`,"gm");let Wr=60*1e3;async function Jr(){var e;const o=await fetch("?t="+Date.now()).then(r=>r.text());Qn.lastIndex=0;let t=[],n;for(;n=Qn.exec(o);)(e=n.groups)!=null&&e.src&&t.push(n.groups.src);return t}async function Qr(){const o=await Jr();if(!Ue)return Ue=o,!1;let t=!1;Ue.length!==o.length&&(t=!0);for(let n=0;n<Ue.length;n++)if(Ue[n]!==o[n]){t=!0;break}return Ue=o,t}async function Zr(){await ElementPlus.ElMessageBox.confirm("系统发现新版本,请确认是否需要更新。如果确定,系统将会重新登录,请注意存档。",{title:"系统更新",type:"warning",closeOnClickModal:!1}).catch(()=>!1)&&(top||window).location.reload()}function Zn(o){setTimeout(async()=>{await Qr()&&await Zr(),Zn()},o||Wr)}function el(o){Zn(o)}const tl=["src"],de=Vue.defineComponent({name:"XIcon",__name:"Icon",props:Wn,setup(o){const t=o,n=Vue.useAttrs(),e=Vue.getCurrentInstance(),r=Vue.computed(()=>{if(!t.icon)return null;const i=e==null?void 0:e.appContext.app;return typeof t.icon=="object"?Vue.markRaw(t.icon):(i==null?void 0:i.component(t.icon))||t.icon}),l=Vue.computed(()=>{const i={"is-pointer":!!n.onClick,"is-hover-effect":t.hoverEffect};return!r.value&&t.icon&&(i[t.icon]=!0),i}),u=Vue.computed(()=>({"background-color":t.background,"border-radius":t.radius?Ve(t.radius):void 0,padding:t.padding?Ve(t.padding):void 0})),a=Vue.computed(()=>{var i;return typeof t.size=="number"?t.size:(i=Te[t.size])!=null?i:void 0});return(i,s)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElIcon),{class:Vue.normalizeClass(["x-icon",l.value]),color:t.color,size:a.value,style:Vue.normalizeStyle(u.value)},{default:Vue.withCtx(()=>[Vue.renderSlot(i.$slots,"default",{},()=>[r.value?(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(r.value),{key:0})):Vue.createCommentVNode("",!0),t.src?(Vue.openBlock(),Vue.createElementBlock("img",{key:1,src:t.src},null,8,tl)):Vue.createCommentVNode("",!0)])]),_:3},8,["class","color","size","style"]))}}),nl={class:"x-menu__wrapper"},ol={key:1,class:"x-menu__title"},rl={key:0,class:"x-menu__title"},eo=Vue.defineComponent({inheritAttrs:!1,name:"XMenuItem",__name:"MenuItem",props:{item:{},subMenu:{},defaultIcon:{}},setup(o){const t=o,n=Vue.getCurrentInstance(),e=u=>{if(u){if(typeof u=="string"){const a=n==null?void 0:n.appContext.app;return(a==null?void 0:a.component(u))||t.defaultIcon||u}return u}},r=u=>typeof u=="object"?u:{value:u},l=(u=[])=>u.filter(a=>!a.hidden);return(u,a)=>t.item.children?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElSubMenu),Vue.mergeProps({key:0,disabled:t.item.disabled},t.subMenu,{index:String(t.item.id)}),{title:Vue.withCtx(()=>[Vue.createElementVNode("div",nl,[t.item.icon?(Vue.openBlock(),Vue.createBlock(Vue.unref(de),{key:0,icon:e(t.item.icon)},null,8,["icon"])):Vue.createCommentVNode("",!0),t.item.title?(Vue.openBlock(),Vue.createElementBlock("span",ol,Vue.toDisplayString(t.item.title),1)):Vue.createCommentVNode("",!0),t.item.badge?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElBadge),Vue.mergeProps({key:2,class:"x-menu__badge"},r(t.item.badge)),{default:Vue.withCtx(()=>a[0]||(a[0]=[Vue.createElementVNode("i",null,null,-1)])),_:1},16)):Vue.createCommentVNode("",!0)])]),default:Vue.withCtx(()=>[(Vue.openBlock(!0),Vue.createElementBlock(Vue.Fragment,null,Vue.renderList(l(t.item.children),i=>(Vue.openBlock(),Vue.createBlock(Vue.unref(eo),{key:i.id,item:i,subMenu:t.subMenu,defaultIcon:t.defaultIcon},null,8,["item","subMenu","defaultIcon"]))),128))]),_:1},16,["disabled","index"])):(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElMenuItem),{key:1,index:String(t.item.id),disabled:t.item.disabled},{title:Vue.withCtx(()=>[t.item.title?(Vue.openBlock(),Vue.createElementBlock("span",rl,Vue.toDisplayString(t.item.title),1)):Vue.createCommentVNode("",!0),t.item.badge?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElBadge),Vue.mergeProps({key:1,class:"x-menu__badge"},r(t.item.badge)),{default:Vue.withCtx(()=>a[1]||(a[1]=[Vue.createElementVNode("i",null,null,-1)])),_:1},16)):Vue.createCommentVNode("",!0)]),default:Vue.withCtx(()=>[t.item.icon?(Vue.openBlock(),Vue.createBlock(Vue.unref(de),{key:0,icon:e(t.item.icon)},null,8,["icon"])):Vue.createCommentVNode("",!0)]),_:1},8,["index","disabled"]))}}),Se=Vue.defineComponent({inheritAttrs:!1,name:"XMenu",__name:"Menu",props:{data:{default:()=>[]},subMenu:{},defaultIcon:{}},emits:["select"],setup(o,{emit:t}){const n=o,e=t,r=Vue.computed(()=>n.data.filter(a=>!a.hidden)),l=(a,i)=>{const s=(c,d=[])=>{var m;for(const p of d){if(p.id.toString()===c.toString())return p;if((m=p.children)!=null&&m.length){const f=s(c,p.children);if(f)return f}}};return s(i,a)},u=a=>{const i=l(r.value,a);i&&e("select",i)};return(a,i)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElMenu),Vue.mergeProps({class:"x-menu"},a.$attrs,{onSelect:u}),{default:Vue.withCtx(()=>[(Vue.openBlock(!0),Vue.createElementBlock(Vue.Fragment,null,Vue.renderList(r.value,s=>(Vue.openBlock(),Vue.createBlock(Vue.unref(eo),{item:{...s,icon:s.icon},defaultIcon:n.defaultIcon,subMenu:n.subMenu},null,8,["item","defaultIcon","subMenu"]))),256))]),_:1},16))}}),Ht={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},background:{type:String,default:"always"},circle:{type:Boolean},draggable:{type:Boolean}};function ll(o){return Vue.computed(()=>{const t=o.tooltip;if(t)return typeof t=="string"?{content:t}:t})}function al(o){return Vue.computed(()=>{const t=o.badge;if(t)return typeof t=="object"?t:{value:t}})}function ul(o){return Vue.computed(()=>{const{dropdown:t,menus:n}=o;if(n&&n.length>0)return Object.assign({popperClass:"x-action__menus",size:o.size},t||{})})}function to(o){const t=Vue.getCurrentInstance();return Vue.computed(()=>{const n=Vue.unref(o);if(n)if(typeof n=="string"||n.setup||n.render||Vue.isVNode(n)){const e=t==null?void 0:t.appContext.app;return{icon:typeof n=="string"&&(e==null?void 0:e.component(n))||n}}else return n;return null})}function De(o){const t=to(o);return t.value?Vue.markRaw(Vue.defineComponent({render:()=>Vue.h(de,t.value)})):void 0}function ht(o,t){return Vue.computed(()=>{const n=Vue.unref(o);return typeof n=="function"?n(t):!!n})}function no(o,t,n){const e=Vue.shallowRef(t),r=Vue.ref(!1),l=async a=>{const i=Vue.unref(o);return i?typeof i=="function"?await i(a):i:t},u=async a=>(r.value=!0,await l(a).then(i=>(e.value=i||t,r.value=!1,Vue.unref(e))));return Vue.watch(()=>o,()=>{u(n)},{immediate:!0}),n&&Vue.watch(n,()=>{u(n)}),{data:e,loading:r,loader:u}}function il(o=1e3){const t=Vue.ref(0);let n;const e=()=>{n=VtjUtils.rAF(()=>{++t.value,t.value<o&&e()})};return Vue.onMounted(e),Vue.onUnmounted(()=>{n&&VtjUtils.cAF(n)}),r=>t.value>=r}function oo(o=[]){const t=Vue.useSlots();return Object.keys(t).filter(n=>!o.includes(n))}const sl={key:0},cl=Vue.defineComponent({__name:"Trigger",props:Ht,emits:["click"],setup(o,{emit:t}){const n=o,e=t,r=De(Vue.toRef(n,"icon")),l=ht(Vue.toRef(n,"disabled")),u=Vue.computed(()=>({[`is-${n.mode}`]:!!n.mode,[`is-${n.type}`]:!!n.type,[`is-${n.size}`]:!!n.size&&n.size!=="default",[`is-background-${n.background}`]:n.mode==="icon"&&!!n.background,"is-disabled":!!n.disabled,"is-circle":!!n.circle})),a=i=>{if(i.preventDefault(),!l.value)return e("click"),!1};return(i,s)=>n.mode==="button"?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElButton),Vue.mergeProps({key:0,icon:Vue.unref(r),type:n.type,size:n.size,disabled:Vue.unref(l)},n.button,{onClick:a}),{default:Vue.withCtx(()=>[Vue.createTextVNode(Vue.toDisplayString(i.label),1)]),_:1},16,["icon","type","size","disabled"])):(Vue.openBlock(),Vue.createElementBlock("div",{key:1,class:Vue.normalizeClass(["x-action__inner",u.value]),onClick:a},[(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(Vue.unref(r)))),i.label?(Vue.openBlock(),Vue.createElementBlock("span",sl,Vue.toDisplayString(i.label),1)):Vue.createCommentVNode("",!0)],2))}}),dl=["draggable"],Q=Vue.defineComponent({name:"XAction",__name:"Action",props:Ht,emits:["click","command","dragstart","dragend"],setup(o,{emit:t}){const n=o,e=Vue.useSlots(),r=t,l=ll(n),u=al(n),a=ul(n),i=ht(Vue.toRef(n,"disabled")),s=Vue.computed(()=>!!n.draggable&&!i.value),c=Vue.computed(()=>({[`x-action--${n.mode}`]:!!n.mode})),d=()=>{i.value||r("click",Vue.toRaw(n))},m=b=>{var _;if(i.value)return;const y=(_=n.menus)==null?void 0:_.find(C=>C.command===b);y&&r("command",Vue.toRaw(y))},p=b=>{s&&r("dragstart",Vue.toRaw(n),b)},f=b=>{s&&r("dragend",Vue.toRaw(n),b)},V=b=>Vue.h(ElementPlus.ElBadge,u.value,()=>[].concat(b)),h=b=>Vue.h(ElementPlus.ElDropdown,{...a.value,disabled:i.value,onCommand:m},{default:()=>[b],dropdown:()=>[Vue.h(ElementPlus.ElDropdownMenu,()=>(n.menus||[]).map((y,_)=>Vue.h(ElementPlus.ElDropdownItem,y,()=>e.item?e.item({item:y,index:_}):y.label)))]}),w=b=>Vue.h(ElementPlus.ElTooltip,{...l.value,disabled:i.value},()=>[b]),v=Vue.computed(()=>{var _;let b=Vue.h(Vue.markRaw(cl),{...n,onClick:d});const y=(_=e.default)==null?void 0:_.call(e);return y&&y.length&&(b=y[0]),u.value&&(b=V(b)),a.value&&(b=h(b)),l.value&&(b=w(b)),b});return(b,y)=>(Vue.openBlock(),Vue.createElementBlock("div",{class:Vue.normalizeClass(["x-action",c.value]),draggable:s.value,onDragstart:p,onDragend:f},[(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(v.value)))],42,dl))}}),ro={items:{type:Array},mode:{type:String,default:"button"},size:{type:String,default:"default"},type:{type:String},background:{type:String,default:"always"},circle:{type:Boolean},disabled:{type:[Boolean,Function]},tooltip:{type:Object},badge:{type:Object},dropdown:{type:Object},button:{type:Object}},ze=Vue.defineComponent({name:"XActionBar",__name:"ActionBar",props:ro,emits:["click","command"],setup(o,{emit:t}){const n=o,e=t,r=Vue.computed(()=>(n.items||[]).map(a=>a==="|"?a:{...a,badge:a.badge?{...n.badge,...typeof a.badge=="object"?a.badge||{}:{value:a.badge}}:void 0,tooltip:a.tooltip?{...n.tooltip,...typeof a.tooltip=="object"?a.tooltip||{}:{content:a.tooltip}}:void 0})),l=a=>{e("click",a)},u=(a,i)=>{e("command",a,i)};return(a,i)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(j),{class:"x-action-bar",align:"center"},{default:Vue.withCtx(()=>[(Vue.openBlock(!0),Vue.createElementBlock(Vue.Fragment,null,Vue.renderList(r.value,s=>(Vue.openBlock(),Vue.createElementBlock(Vue.Fragment,null,[s==="|"?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElDivider),{key:0,direction:"vertical",class:"x-action-bar__divider"})):(Vue.openBlock(),Vue.createBlock(Vue.unref(Q),Vue.mergeProps({key:1,mode:n.mode,size:n.size,type:n.type,circle:n.circle,background:n.background,button:n.button,dropdown:n.dropdown,disabled:Vue.unref(ht)(n.disabled,s).value,ref_for:!0},s,{onClick:l,onCommand:c=>u(s,c)}),null,16,["mode","size","type","circle","background","button","dropdown","disabled","onCommand"]))],64))),256))]),_:1}))}}),lo={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}},j=Vue.defineComponent({name:"XContainer",__name:"Container",props:lo,setup(o,{expose:t}){const n=o,e=Vue.useAttrs(),r=Vue.getCurrentInstance(),l=Vue.ref(),u=Vue.computed(()=>{var c;return(c=l.value)==null?void 0:c.$el}),a=Vue.computed(()=>{const c=r==null?void 0:r.parent;if(!c)return!1;const d=c.proxy;return d.$options.name==="XContainer"||!!d.flex}),i=Vue.computed(()=>{var c;return{"is-fit":n.fit,"is-flex":n.flex&&!n.inline,"is-inline-flex":n.flex&&n.inline,[`is-direction-${n.direction}`]:n.flex&&n.direction!=="row",[`is-wrap-${n.wrap}`]:n.flex&&n.wrap!=="nowrap",[`is-justify-${n.justify}`]:n.flex&&n.justify!=="flex-start",[`is-align-${n.align}`]:n.flex&&n.align!=="flex-start",[`is-align-content-${n.alignContent}`]:n.flex&&n.alignContent!=="stretch","is-grow":(c=n.grow)!=null?c:a.value,"is-shrink":n.shrink,[`is-align-self-${n.alignSelf}`]:a.value&&n.alignSelf!=="auto",[`is-overflow-${n.overflow}`]:!!n.overflow,"is-padding":!!n.padding,"is-pointer":n.autoPointer&&!!e.onClick,"is-gap":!!n.gap}}),s=Vue.computed(()=>{const{width:c,height:d,fit:m}=n;return m?null:{width:c?Ve(c):void 0,height:d?Ve(d):void 0}});return t({$vtjEl:u}),(c,d)=>(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(n.tag),{ref_key:"elRef",ref:l,class:Vue.normalizeClass(["x-container",i.value]),style:Vue.normalizeStyle(s.value)},{default:Vue.withCtx(()=>[Vue.renderSlot(c.$slots,"default")]),_:3},8,["class","style"]))}}),ao={size:{type:String,default:"default"},content:{type:String,default:""},subtitle:{type:String},icon:{type:[String,Object]},border:{type:Boolean},more:{type:Boolean}},fl={class:"x-header__content"},pl={key:0,class:"x-header__actions"},Xt=Vue.defineComponent({name:"XHeader",inheritAttrs:!1,__name:"Header",props:ao,setup(o){const t=o,n=De(Vue.toRef(t,"icon")),e=Vue.useAttrs(),r=Vue.computed(()=>({[`is-size-${t.size}`]:!!t.size&&t.size!=="default","is-border":t.border,"is-pointer":!!e.onClick}));return(l,u)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(j),{class:Vue.normalizeClass(["x-header",r.value]),justify:"space-between",align:"center"},{default:Vue.withCtx(()=>[Vue.createVNode(Vue.unref(j),{align:"center",class:Vue.normalizeClass(["x-header__wrapper",r.value]),grow:"",onClick:Vue.unref(e).onClick},{default:Vue.withCtx(()=>[Vue.unref(n)?(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(Vue.unref(n)),{key:0,class:"x-header__icon",onClick:Vue.unref(e).onClickIcon||Vue.unref(e).onClick},null,8,["onClick"])):Vue.createCommentVNode("",!0),Vue.createElementVNode("span",fl,[Vue.renderSlot(l.$slots,"default",{},()=>[Vue.createTextVNode(Vue.toDisplayString(t.content),1)])]),t.more?(Vue.openBlock(),Vue.createBlock(Vue.unref(de),{key:1,class:"x-header__more",icon:Vue.unref(VtjIcons.ArrowRight)},null,8,["icon"])):Vue.createCommentVNode("",!0),t.subtitle||l.$slots.subtitle?(Vue.openBlock(),Vue.createElementBlock("span",{key:2,class:"x-header__subtitle",onClick:u[0]||(u[0]=(...a)=>Vue.unref(e).onClick&&Vue.unref(e).onClick(...a))},[Vue.renderSlot(l.$slots,"subtitle",{},()=>[Vue.createTextVNode(Vue.toDisplayString(t.subtitle),1)])])):Vue.createCommentVNode("",!0)]),_:3},8,["class","onClick"]),l.$slots.actions?(Vue.openBlock(),Vue.createElementBlock("div",pl,[Vue.renderSlot(l.$slots,"actions")])):Vue.createCommentVNode("",!0)]),_:3},8,["class"]))}}),uo={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}},Le=Vue.defineComponent({name:"XPanel",__name:"Panel",props:uo,setup(o,{expose:t}){const n=o,e=Vue.ref(),r=Vue.computed(()=>({"x-panel--card":!!n.card,"x-panel--default":!n.card,[`is-${n.size}`]:!!n.size&&n.size!=="default","is-border":!!n.border,"is-radius":!!n.radius,[`is-shadow-${n.shadow}`]:!!n.shadow&&n.shadow!=="none"})),l=Vue.computed(()=>n.header===null?null:typeof n.header=="string"?{content:n.header,size:n.size}:{...n.header,size:n.size}),u=Vue.computed(()=>n.fit||n.height?"auto":void 0);return t({bodyRef:e}),(a,i)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(j),{class:Vue.normalizeClass(["x-panel",r.value]),direction:"column",fit:n.fit,width:n.width,height:n.height},{default:Vue.withCtx(()=>[l.value?(Vue.openBlock(),Vue.createBlock(Vue.unref(j),{key:0,flex:!1,class:"x-panel__header"},{default:Vue.withCtx(()=>[Vue.renderSlot(a.$slots,"header",{},()=>[Vue.createVNode(Vue.unref(Xt),Vue.normalizeProps(Vue.guardReactiveProps(l.value)),{default:Vue.withCtx(()=>[Vue.renderSlot(a.$slots,"title")]),actions:Vue.withCtx(()=>[Vue.renderSlot(a.$slots,"actions")]),_:3},16)])]),_:3})):Vue.createCommentVNode("",!0),Vue.createVNode(Vue.unref(j),Vue.mergeProps({ref_key:"bodyRef",ref:e,flex:!1,overflow:u.value,grow:"",padding:"",class:"x-panel__body"},n.body),{default:Vue.withCtx(()=>[Vue.renderSlot(a.$slots,"default")]),_:3},16,["overflow"]),a.$slots.footer?(Vue.openBlock(),Vue.createBlock(Vue.unref(j),Vue.mergeProps({key:1,flex:!1,padding:"",class:"x-panel__footer"},n.footer),{default:Vue.withCtx(()=>[Vue.renderSlot(a.$slots,"footer")]),_:3},16)):Vue.createCommentVNode("",!0)]),_:3},8,["class","fit","width","height"]))}}),io="user-select-none";class qt{constructor(t,n={}){Ee(this,"scope");Ee(this,"dragging",!1);this.el=t,this.options=n,this.scope=Vue.effectScope(),this.scope.run(()=>{this.init()})}getHandle(){const{selector:t,handle:n}=this.options;return t?this.el.querySelector(t):n}getTarget(){const{target:t="body"}=this.options;return typeof t=="string"?document.querySelector(t):Vue.unref(t)||document.body}init(){const{el:t,options:n}=this,{disabled:e,delay:r=150,onStart:l,onEnd:u}=n;if(e)return;let a=null;const i=this.getHandle(),s=this.getTarget();let c=t.getBoundingClientRect(),d=null;const{x:m,y:p}=VueUse.useDraggable(t,{initialValue:{x:c.x,y:c.y},...n,handle:i,onStart:(f,V)=>{document.body.classList.add(io),clearTimeout(a),a=setTimeout(()=>{this.dragging=!0,c=t.getBoundingClientRect(),d=s==null?void 0:s.getBoundingClientRect(),l&&l(f,V)},r)},onEnd:(f,V)=>{if(clearTimeout(a),document.body.classList.remove(io),this.dragging&&d){this.dragging=!1;const{x:h,y:w}=f,v=this.getPosition(d,c,h,w);u&&u(v,V),d=null}}});Vue.watch([m,p],()=>{if(this.dragging&&d){const f=this.getPosition(d,c,m.value,p.value);t.style.left=`${f.x}px`,t.style.top=`${f.y}px`}})}getPosition(t,n,e,r){const{edge:l=50}=this.options,u=-n.width+t.x+l,a=t.width+t.x-l,i=t.y,s=t.height+t.y-l,c=Math.min(a,Math.max(e,u)),d=Math.min(s,Math.max(r,i));return{x:c-t.x,y:d-t.y}}destory(){this.scope.stop()}}const so={mounted(o,t){const n=t.value||{},e=new qt(o,n);o.__draggable__=e},updated(o,t){const n=t.value||{};let e=o.__draggable__;e&&!VtjUtils.isEqual(e.options,n)&&(e.destory(),o.__draggable__=new qt(o,n))},unmounted(o){const t=o.__draggable__;t&&(t.destory(),o.__draggable__=null)}},Kt="user-select-none";class Yt{constructor(t,n={}){Ee(this,"scope");Ee(this,"resizing",Vue.ref(!1));Ee(this,"direction",Vue.ref(""));Ee(this,"MIE",null);Ee(this,"cleanMousedown");Ee(this,"cleanMouseup");this.el=t,this.options=n,this.scope=Vue.effectScope(),this.scope.run(()=>{this.init()})}init(){const{el:t,options:n}=this,{disabled:e,onStart:r,onEnd:l}=n;if(e)return;this.MIE=VueUse.useMouseInElement(t),this.cleanMousedown=VueUse.useEventListener(document,"mousedown",()=>{var i;(i=this.direction)!=null&&i.value&&this.MIE&&(this.resizing.value=!0,t.classList.add("is-resizing",`is-${this.direction.value}-resizing`),r&&r(this.direction.value,this.MIE))}),this.cleanMouseup=VueUse.useEventListener(document,"mouseup",()=>{var i;this.resizing.value&&((i=this.direction)!=null&&i.value)&&this.MIE&&(t.classList.remove("is-resizing",`is-${this.direction.value}-resizing`),l&&l(this.direction.value,this.MIE)),this.resizing.value=!1}),Vue.watch(this.direction,i=>{const s=document.body;s.style.cursor=i?`${i}-resize`:"",i?s.classList.add(Kt):s.classList.remove(Kt)});const{x:u,y:a}=this.MIE;Vue.watch([u,a],()=>{this.resizing.value?this.resize():this.direction.value=this.getDirection()})}resize(){const{MIE:t,direction:n,resizing:e,options:r,el:l}=this,u=(n==null?void 0:n.value)||"";if(!t||!e.value||!u)return;const{x:a,y:i,elementX:s,elementY:c,elementHeight:d,elementWidth:m}=t,{onResizing:p}=r,{minWidth:f=0,minHeight:V=0,maxWidth:h=99999,maxHeight:w=99999}=r;if(u.includes("e")){const v=Math.min(Math.max(s.value,f),h);l.style.width=`${v}px`}if(u.includes("s")){const v=Math.min(Math.max(c.value,V),w);l.style.height=`${v}px`}if(u.includes("w")){const v=Math.min(Math.max(m.value-s.value,f),h);l.style.width=`${v}px`,l.style.left=`${a.value}px`}if(u.includes("n")){const v=Math.min(Math.max(d.value-c.value,V),w);this.el.style.height=`${v}px`,this.el.style.top=`${i.value}px`}p&&p(u,t)}getDirection(){if(!this.MIE)return"";const{elementX:t,elementY:n,elementHeight:e,elementWidth:r,isOutside:l}=this.MIE;if(l.value)return"";const{dirs:u=["n","s","w","e"],edge:a=5}=this.options;let i="";return u.includes("n")&&n.value<=a?i+="n":u.includes("s")&&n.value>e.value-a&&(i+="s"),u.includes("w")&&t.value<=a?i+="w":u.includes("e")&&t.value>r.value-a&&(i+="e"),i}destory(){var n;const t=document.body;t.style.cursor="",t.classList.remove(Kt),this.cleanMousedown&&this.cleanMousedown(),this.cleanMouseup&&this.cleanMouseup(),(n=this.MIE)==null||n.stop(),this.scope.stop()}}const Gt={mounted(o,t){const n=t.value||{},e=new Yt(o,n);o.__resizable__=e},updated(o,t){const n=t.value||{};let e=o.__resizable__;e&&!VtjUtils.isEqual(e.options,n)&&(e.destory(),o.__resizable__=new Yt(o,n))},unmounted(o){const t=o.__resizable__;t&&(t.destory(),o.__resizable__=null)}},co={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},pure:{type:Boolean}};let He=1e3;function ml(o,t){const{width:n,height:e}=VueUse.useElementSize(t),r=Vue.reactive({mode:o.mode||"normal",wrapperWidth:0,wrapperHeight:0,width:0,height:0,top:0,left:0,zIndex:++He,dragging:!1,resizing:!1});return Vue.watch([n,e],([l,u])=>{r.wrapperWidth=l,r.wrapperHeight=u,r.width=tt(o.width,l),r.height=tt(o.height,u),r.left=o.left?tt(o.left,l)-r.width/2:Math.max(Math.floor((l-r.width)/2),0),r.top=o.top?tt(o.top,u):Math.max(Math.floor((u-r.height)/2),0)}),Vue.watch(r,l=>{He=Math.max(l.zIndex,He)}),{state:r,normal:Vue.computed(()=>r.mode==="normal"),maximized:Vue.computed(()=>r.mode==="maximized"),minimized:Vue.computed(()=>r.mode==="minimized")}}function Vl(o,t){const n=Vue.computed(()=>{const{width:a,height:i,top:s,left:c,zIndex:d}=t;return{width:`${a}px`,height:`${i}px`,top:`${s}px`,left:`${c}px`,zIndex:d}}),e=Vue.computed(()=>{const{zIndex:a}=t;return{zIndex:a}}),r=Vue.computed(()=>({[`is-${t.mode}`]:!!t.mode,"is-draggable":!!o.draggable,"is-resizable":!!o.resizable,"is-primary":!!o.primary,"is-pure":!!o.pure})),l=Vue.computed(()=>({[`is-${t.mode}`]:!!t.mode,"is-dragging":t.dragging,"is-resizing":t.resizing})),u=Vue.computed(()=>({zIndex:t.zIndex}));return{styles:n,classes:r,wrapperClass:l,modalStyle:u,zIndexStyle:e}}function hl(o,t,n){const e=c=>{t.mode=c,["maximized","minimized","normal"].includes(c)&&n(c),n("modeChange",c)},r=async()=>{(!o.beforeClose||await o.beforeClose())&&(n("update:modelValue",!1),n("close"),n("destroy"))};return{close:r,changeMode:e,show:()=>e("normal"),hide:()=>e("minimized"),active:c=>{const d=c.target.nodeName||"";["INPUT","TEXTAREA","RADIO","CHECKBOX"].includes(d.toUpperCase())||(t.zIndex=Math.max(t.zIndex,++He))},submit:()=>n("submit"),cancel:()=>{n("cancel"),r()}}}function gl(o,t,n,e){return Vue.computed(()=>{var l;const r=typeof o.draggable=="boolean"?!o.draggable:!!((l=o.draggable)!=null&&l.disabled);return{...VtjUtils.isObject(o.draggable)?o.draggable:{},disabled:r,target:e,selector:".x-panel__header",onStart(u){t.dragging=!0,t.zIndex=Math.max(t.zIndex,++He),n("dragStart",u)},onMove(u){n("dragging",u)},onEnd(u){if(t.mode==="maximized")return;const{x:a,y:i}=u;t.left=a,t.top=i,t.dragging=!1,n("dragEnd",u)}}})}function vl(o,t,n){return Vue.computed(()=>{var r;const e=typeof o.resizable=="boolean"?!o.resizable:!!((r=o.resizable)!=null&&r.disabled);return{minWidth:200,minHeight:150,...VtjUtils.isObject(o.resizable)?o.resizable:{},disabled:e,dirs:["e","s","w"],onStart(l,u){t.resizing=!0,t.zIndex=Math.max(t.zIndex,++He),n("resizeStart",l,u)},onResizing(l,u){n("resizing",l,u)},onEnd(l,u){const a=document.body.getBoundingClientRect();t.left=u.elementPositionX.value-a.x,t.top=u.elementPositionY.value-a.y,t.width=u.elementWidth.value,t.height=u.elementHeight.value,t.resizing=!1,n("resizeEnd",l,u)}}})}function yl(o,t){const n=o.componentInstance;if(!n)return;let e=null;return Vue.onMounted(()=>{const r=Vue.unref(t),l=Vue.unref(r==null?void 0:r.bodyRef);e=n.$el,l&&l.$el&&l.$el.appendChild(e)}),Vue.onUnmounted(()=>{e&&e.parentNode&&e.parentNode.removeChild(e)}),{componentInstance:n}}const wl=["src"],Xe=Vue.defineComponent({name:"XDialog",__name:"Dialog",props:co,emits:["update:modelValue","open","close","destroy","maximized","minimized","normal","modeChange","dragStart","dragging","dragEnd","resizeStart","resizeEnd","resizing","submit","cancel"],setup(o,{expose:t,emit:n}){const e=o,r=n,l=Vue.getCurrentInstance(),u=Vue.ref(),a=Vue.ref(),{state:i,maximized:s,minimized:c,normal:d}=ml(e,u),{styles:m,classes:p,wrapperClass:f,modalStyle:V,zIndexStyle:h}=Vl(e,i),{changeMode:w,active:v,close:b,show:y,hide:_,submit:C,cancel:g}=hl(e,i,r),x=gl(e,i,r,u),S=vl(e,i,r),I=yl(e,a);Vue.watchEffect(async()=>{e.modelValue?(await Vue.nextTick(),l&&(r("open",l),document.body.classList.add("x-dialog-visible"))):document.body.classList.remove("x-dialog-visible")}),Vue.onUnmounted(()=>{document.body.classList.remove("x-dialog-visible")});const z=Vue.computed(()=>{var N;return(N=a.value)==null?void 0:N.$el});return t({$vtjEl:z,panelRef:a,state:i,maximized:s,minimized:c,changeMode:w,show:y,hide:_,submit:C,cancel:g,close:b,componentInstance:I}),(N,T)=>e.modelValue?(Vue.openBlock(),Vue.createBlock(Vue.Teleport,{key:0,to:"body"},[Vue.createElementVNode("div",{ref_key:"wrapper",ref:u,class:Vue.normalizeClass(["x-dialog__wrapper",Vue.unref(f)]),style:Vue.normalizeStyle(Vue.unref(h))},[e.modal?(Vue.openBlock(),Vue.createElementBlock("div",{key:0,class:"x-dialog__modal",style:Vue.normalizeStyle(Vue.unref(V))},null,4)):Vue.createCommentVNode("",!0),Vue.withDirectives((Vue.openBlock(),Vue.createBlock(Vue.unref(Le),Vue.mergeProps({ref_key:"panelRef",ref:a,class:["x-dialog",Vue.unref(p)],card:"",shadow:"always",header:{icon:e.icon,subtitle:e.subtitle},width:"800px",height:"600px",footer:{justify:"space-between",flex:!0,align:"center"},style:Vue.unref(m),size:e.size,body:{padding:e.bodyPadding},onClick:Vue.unref(v)},N.$attrs),Vue.createSlots({title:Vue.withCtx(()=>[Vue.createTextVNode(Vue.toDisplayString(e.title),1)]),actions:Vue.withCtx(()=>[Vue.renderSlot(N.$slots,"actions"),e.minimizable?(Vue.openBlock(),Vue.createBlock(Vue.unref(Q),{key:0,icon:Vue.unref(VtjIcons.Minimize),size:e.size,mode:"icon",type:"primary",background:"hover",onClick:T[0]||(T[0]=A=>Vue.unref(w)("minimized"))},null,8,["icon","size"])):Vue.createCommentVNode("",!0),e.maximizable?(Vue.openBlock(),Vue.createElementBlock(Vue.Fragment,{key:1},[Vue.unref(d)?(Vue.openBlock(),Vue.createBlock(Vue.unref(Q),{key:1,icon:Vue.unref(VtjIcons.Maximize),size:e.size,mode:"icon",type:"primary",background:"hover",onClick:T[2]||(T[2]=A=>Vue.unref(w)("maximized"))},null,8,["icon","size"])):(Vue.openBlock(),Vue.createBlock(Vue.unref(Q),{key:0,icon:Vue.unref(VtjIcons.Popup),size:e.size,mode:"icon",type:"primary",background:"hover",onClick:T[1]||(T[1]=A=>Vue.unref(w)("normal"))},null,8,["icon","size"]))],64)):Vue.createCommentVNode("",!0),e.closable?(Vue.openBlock(),Vue.createBlock(Vue.unref(Q),{key:2,icon:Vue.unref(VtjIcons.RawClose),size:e.size,mode:"icon",type:"danger",background:"hover",onClick:Vue.unref(b)},null,8,["icon","size","onClick"])):Vue.createCommentVNode("",!0)]),default:Vue.withCtx(()=>[Vue.renderSlot(N.$slots,"default",{},()=>[e.content?(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(e.content),{key:0})):Vue.createCommentVNode("",!0),e.src?(Vue.openBlock(),Vue.createElementBlock("iframe",{key:1,src:e.src,class:"x-dialog__frame"},null,8,wl)):Vue.createCommentVNode("",!0)])]),_:2},[e.cancel||e.submit||N.$slots.footer||N.$slots.extra||N.$slots.handle?{name:"footer",fn:Vue.withCtx(()=>[Vue.renderSlot(N.$slots,"footer",{},()=>[Vue.createVNode(Vue.unref(j),{align:"center"},{default:Vue.withCtx(()=>[Vue.renderSlot(N.$slots,"extra")]),_:3}),Vue.createVNode(Vue.unref(j),{align:"center"},{default:Vue.withCtx(()=>[Vue.renderSlot(N.$slots,"handle"),e.cancel?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElButton),{key:0,type:"default",size:e.size,onClick:Vue.unref(g)},{default:Vue.withCtx(()=>[Vue.createTextVNode(Vue.toDisplayString(typeof e.cancel=="string"?e.cancel:"取消"),1)]),_:1},8,["size","onClick"])):Vue.createCommentVNode("",!0),e.submit?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElButton),{key:1,type:"primary",size:e.size,onClick:Vue.unref(C)},{default:Vue.withCtx(()=>[Vue.createTextVNode(Vue.toDisplayString(typeof e.submit=="string"?e.submit:"确定"),1)]),_:1},8,["size","onClick"])):Vue.createCommentVNode("",!0)]),_:3})])]),key:"0"}:void 0]),1040,["header","class","style","size","body","onClick"])),[[Vue.unref(so),Vue.unref(x)],[Vue.unref(Gt),Vue.unref(S)]])],6)])):Vue.createCommentVNode("",!0)}});function gt(o,t){const n=document.createElement("div"),e=Vue.createVNode(Xe,o);e.appContext=t!=null?t:gt._context,Vue.render(e,n);const r=()=>{var l;Vue.render(null,n),(l=n.parentNode)==null||l.removeChild(n)};return e.props.onDestroy=()=>{r()},document.body.appendChild(n),{vnode:e,destroy:r}}const bl=Vue.defineComponent({__name:"Sidebar",props:{collapsed:{type:Boolean}},setup(o){const t=o;return(n,e)=>Vue.withDirectives((Vue.openBlock(),Vue.createBlock(Vue.unref(j),{class:Vue.normalizeClass(["x-mask-sidebar",{"is-collapsed":t.collapsed}]),grow:!1,flex:"",direction:"column"},{default:Vue.withCtx(()=>[Vue.renderSlot(n.$slots,"brand"),Vue.createVNode(Vue.unref(j),{class:"x-mask-sidebar__wrapper",flex:"",grow:"",direction:"column",justify:"space-between",align:"center"},{default:Vue.withCtx(()=>[Vue.renderSlot(n.$slots,"default"),e[0]||(e[0]=Vue.createElementVNode("div",{class:"x-mask-sidebar__helper"},null,-1))]),_:3})]),_:3},8,["class"])),[[Vue.unref(Gt),{dirs:["e"],disabled:t.collapsed,maxWidth:500,minWidth:200}]])}}),Cl=Vue.defineComponent({__name:"SwitchBar",props:{collasped:{type:Boolean,default:!1},favorite:{type:Boolean,default:!1},keyword:{}},emits:["update:collasped","update:keyword","update:favorite"],setup(o,{emit:t}){const n=o,e=t,r=Vue.ref(!1),l=Vue.ref(""),u=Vue.ref(!1),a=()=>{r.value=!0},i=()=>{l.value="",r.value=!1,e("update:keyword",l.value)},s=()=>{e("update:collasped",!n.collasped)},c=()=>{e("update:keyword",l.value)},d=()=>{e("update:favorite",u.value)};return(m,p)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(j),{class:"x-mask-switch-bar",justify:"space-between",align:"center"},{default:Vue.withCtx(()=>[n.collasped?Vue.createCommentVNode("",!0):(Vue.openBlock(),Vue.createBlock(Vue.unref(j),{key:0,class:"x-mask-switch-bar__left",grow:""},{default:Vue.withCtx(()=>[r.value?Vue.createCommentVNode("",!0):(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElSwitch),{key:0,modelValue:u.value,"onUpdate:modelValue":p[0]||(p[0]=f=>u.value=f),class:"x-mask-switch-bar__switch","active-icon":Vue.unref(VtjIcons.StarFilled),"inactive-icon":Vue.unref(VtjIcons.Menu),onChange:d},null,8,["modelValue","active-icon","inactive-icon"])),r.value?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElInput),{key:1,modelValue:l.value,"onUpdate:modelValue":p[1]||(p[1]=f=>l.value=f),class:"x-mask-switch-bar__input",size:"small",placeholder:"请输入查询关键字",onInput:c,"prefix-icon":Vue.unref(VtjIcons.Search)},{suffix:Vue.withCtx(()=>[Vue.createVNode(Vue.unref(de),{icon:Vue.unref(VtjIcons.Close),onClick:i},null,8,["icon"])]),_:1},8,["modelValue","prefix-icon"])):Vue.createCommentVNode("",!0)]),_:1})),Vue.createVNode(Vue.unref(j),{class:Vue.normalizeClass(["x-mask-switch-bar__right",{"is-collasped":n.collasped}]),flex:"",align:"center",justify:"center"},{default:Vue.withCtx(()=>[!r.value&&!n.collasped?(Vue.openBlock(),Vue.createBlock(Vue.unref(Q),{key:0,icon:Vue.unref(VtjIcons.Search),mode:"icon",background:"hover",size:"default",circle:"",onClick:a},null,8,["icon"])):Vue.createCommentVNode("",!0),n.collasped?(Vue.openBlock(),Vue.createBlock(Vue.unref(Q),{key:1,icon:Vue.unref(VtjIcons.Expand),mode:"icon",size:"default",background:"hover",onClick:s,circle:""},null,8,["icon"])):Vue.createCommentVNode("",!0),n.collasped?Vue.createCommentVNode("",!0):(Vue.openBlock(),Vue.createBlock(Vue.unref(Q),{key:2,icon:Vue.unref(VtjIcons.Fold),mode:"icon",size:"default",background:"hover",circle:"",onClick:s},null,8,["icon"]))]),_:1},8,["class"])]),_:1}))}}),_l=["src"],kl={key:0},El=Vue.defineComponent({__name:"Brand",props:{collapsed:{type:Boolean,default:!1},logo:{},title:{},url:{}},setup(o){const t=o,n=VueRouter.useRouter(),e=()=>{t.url&&n.push(t.url)};return(r,l)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(j),{class:Vue.normalizeClass(["x-mask-brand",{"is-collapsed":t.collapsed}]),align:"center"},{default:Vue.withCtx(()=>[Vue.createVNode(Vue.unref(j),{class:"x-mask-brand__logo",flex:"",justify:"center",align:"center",onClick:e},{default:Vue.withCtx(()=>[Vue.renderSlot(r.$slots,"logo",{},()=>[t.logo?(Vue.openBlock(),Vue.createElementBlock("img",{key:0,src:t.logo},null,8,_l)):Vue.createCommentVNode("",!0)])]),_:3}),Vue.createVNode(Vue.unref(j),{class:"x-mask-brand__title",flex:"",align:"center"},{default:Vue.withCtx(()=>[t.title?(Vue.openBlock(),Vue.createElementBlock("span",kl,[Vue.renderSlot(r.$slots,"title",{},()=>[Vue.createTextVNode(Vue.toDisplayString(t.title),1)])])):Vue.createCommentVNode("",!0)]),_:3})]),_:3},8,["class"]))}}),vt="__favorites__",yt="__search__",Sl=Vue.defineComponent({__name:"Menu",props:{collapse:{type:Boolean,default:!1},keyword:{},favorite:{type:Boolean},favorites:{},flatMenus:{},menus:{},active:{}},emits:["select"],setup(o,{emit:t}){const n=o,e=Vue.computed(()=>n.menus||[]),r=t,l=Vue.computed(()=>{var s;return String((s=n.active)==null?void 0:s.id)}),u=Vue.computed(()=>{var s;return[{id:vt,title:"收藏",icon:VtjIcons.Star,children:(s=n.favorites)!=null&&s.length?n.favorites:[{id:vt+"empty",disabled:!0,title:"暂无收藏菜单"}]}]}),a=Vue.computed(()=>{const s=(n.keyword||"").trim(),c=s?(n.flatMenus||[]).filter(d=>{var m;return(m=d.title)==null?void 0:m.includes(s)}):[];return[{id:yt,title:"搜索",icon:VtjIcons.Search,children:c!=null&&c.length?c:[{id:yt+"empty",disabled:!0,title:"查询匹配不到菜单项"}]}]}),i=s=>{r("select",s)};return(s,c)=>(Vue.openBlock(),Vue.createElementBlock(Vue.Fragment,null,[Vue.withDirectives(Vue.createVNode(Vue.unref(j),{class:"x-mask-menu",grow:"",flex:!1,overflow:"auto"},{default:Vue.withCtx(()=>[Vue.withDirectives(Vue.createVNode(Vue.unref(Se),{subMenu:{popperClass:"x-mask-menu-popper",teleported:!0,showTimeout:200,hideTimeout:200},data:e.value,"default-icon":Vue.unref(VtjIcons.Document),collapse:!0,"collapse-transition":!1,"default-active":l.value,onSelect:i},null,8,["data","default-icon","default-active"]),[[Vue.vShow,n.collapse]]),Vue.withDirectives(Vue.createVNode(Vue.unref(Se),{subMenu:{popperClass:"x-mask-menu-popper",teleported:!0},data:e.value,"default-icon":Vue.unref(VtjIcons.Document),collapse:!1,"collapse-transition":!1,"default-active":l.value,onSelect:i},null,8,["data","default-icon","default-active"]),[[Vue.vShow,!n.collapse]]),e.value.length?Vue.createCommentVNode("",!0):(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElEmpty),{key:0,description:"暂无菜单数据"}))]),_:1},512),[[Vue.vShow,!n.favorite&&!n.keyword]]),Vue.withDirectives(Vue.createVNode(Vue.unref(j),{class:"x-mask-menu",grow:"",flex:!1,overflow:"auto"},{default:Vue.withCtx(()=>[Vue.withDirectives(Vue.createVNode(Vue.unref(Se),{class:"x-mask-menu__favorites",subMenu:{popperClass:"x-mask-menu-popper",teleported:!0,showTimeout:200,hideTimeout:200},data:u.value,"default-icon":Vue.unref(VtjIcons.Document),collapse:!0,"collapse-transition":!1,"default-active":l.value,"default-openeds":[vt],onSelect:i},null,8,["data","default-icon","default-active","default-openeds"]),[[Vue.vShow,n.collapse]]),Vue.withDirectives(Vue.createVNode(Vue.unref(Se),{class:"x-mask-menu__favorites",subMenu:{popperClass:"x-mask-menu-popper",teleported:!0,showTimeout:200,hideTimeout:200},data:u.value,"default-icon":Vue.unref(VtjIcons.Document),collapse:!1,"collapse-transition":!1,"default-active":l.value,"default-openeds":[vt],onSelect:i},null,8,["data","default-icon","default-active","default-openeds"]),[[Vue.vShow,!n.collapse]])]),_:1},512),[[Vue.vShow,n.favorite&&!n.keyword]]),n.keyword?Vue.withDirectives((Vue.openBlock(),Vue.createBlock(Vue.unref(j),{key:0,class:"x-mask-menu",grow:"",flex:!1,overflow:"auto"},{default:Vue.withCtx(()=>[Vue.withDirectives(Vue.createVNode(Vue.unref(Se),{class:"x-mask-menu__search",subMenu:{popperClass:"x-mask-menu-popper",teleported:!0,showTimeout:200,hideTimeout:200},data:a.value,"default-icon":Vue.unref(VtjIcons.Document),collapse:!0,"collapse-transition":!1,"default-active":l.value,"default-openeds":[yt],onSelect:i},null,8,["data","default-icon","default-active","default-openeds"]),[[Vue.vShow,n.collapse]]),Vue.withDirectives(Vue.createVNode(Vue.unref(Se),{class:"x-mask-menu__search",subMenu:{popperClass:"x-mask-menu-popper",teleported:!0,showTimeout:200,hideTimeout:200},data:a.value,"default-icon":Vue.unref(VtjIcons.Document),collapse:!1,"collapse-transition":!1,"default-active":l.value,"default-openeds":[yt],onSelect:i},null,8,["data","default-icon","default-active","default-openeds"]),[[Vue.vShow,!n.collapse]])]),_:1},512)),[[Vue.vShow,!!n.keyword]]):Vue.createCommentVNode("",!0)],64))}}),xl="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",fo=140,po={logo:{type:String,default:xl},title:{type:String,default:"VTJ.PRO"},menus:{type:[Array,Function],default(){return[]}},favorites:{type:[Array,Function],default(){return[]}},menuAdapter:{type:Function},home:{type:[String,Object],default:"/"},tabs:{type:Number,default:20},actions:{type:Array},avatar:{type:String},theme:{type:Boolean},disabled:{type:Boolean},addFavorite:{type:Function},removeFavorite:{type:Function},userCardWidth:{type:Number,default:350},pure:{type:Boolean}},Wt=Symbol(),Jt="$mask",Bl={class:"x-mask-tabs__trigger"},Pl={key:1},Nl=["onDragstart","onDragend"],Tl={key:1},Dl=Vue.defineComponent({__name:"Tabs",props:{tabs:{},home:{},isActiveTab:{type:Function},value:{},favorites:{}},emits:["click","remove","refresh","toggleFavorite","dialog"],setup(o,{emit:t}){const n=o,e=t,r=c=>{const d=!!n.favorites.find(m=>{var p;return m===c.menu||m.id===((p=c.menu)==null?void 0:p.id)});return[{icon:VtjIcons.Refresh,label:"刷新",name:"refresh",value:c},"|",{icon:d?VtjIcons.StarFilled:VtjIcons.Star,label:"收藏",name:"favorite",value:c.menu,disabled:!c.menu||!!c.menu.hidden},"|",{icon:VtjIcons.CopyDocument,label:"弹窗",name:"dialog",value:c}]},l=c=>{const d=c.paneName;if(d===n.home.id){e("click",n.home);return}const m=n.tabs.find(p=>p.id===d);m&&e("click",m)},u=c=>{const d=n.tabs.find(m=>m.id===c);d&&e("remove",d)},a=c=>{switch(c.name){case"refresh":e("refresh",c.value);break;case"favorite":e("toggleFavorite",c.value);break;case"dialog":e("dialog",c.value);break}},i=(c,d)=>{d.dataTransfer&&(d.dataTransfer.setData("tab",c.id),d.target&&d.target.classList.add("is-dagging"))},s=(c,d)=>{d.target&&d.target.classList.remove("is-dagging")};return(c,d)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(j),{ref:"tabsRef",class:"x-mask-tabs",height:"100%",grow:"",flex:"",justify:"flex-end",direction:"column"},{default:Vue.withCtx(()=>[Vue.createVNode(Vue.unref(ElementPlus.ElTabs),{type:"card","model-value":n.value,onTabRemove:u,onTabClick:l},{default:Vue.withCtx(()=>[n.home?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElTabPane),{key:0,name:n.home.id},{label:Vue.withCtx(()=>[Vue.createElementVNode("div",Bl,[n.home.icon?(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(Vue.unref(De)(n.home.icon)),{key:0})):Vue.createCommentVNode("",!0),n.home.title?(Vue.openBlock(),Vue.createElementBlock("span",Pl,Vue.toDisplayString(n.home.title),1)):Vue.createCommentVNode("",!0)])]),_:1},8,["name"])):Vue.createCommentVNode("",!0),(Vue.openBlock(!0),Vue.createElementBlock(Vue.Fragment,null,Vue.renderList(n.tabs,m=>(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElTabPane),{key:m.id,name:m.id,lazy:"",closable:""},{label:Vue.withCtx(()=>[Vue.createVNode(Vue.unref(ElementPlus.ElPopover),{"open-delay":500,placement:"bottom",trigger:"hover",width:"200px",disabled:m.id!==n.value},{reference:Vue.withCtx(()=>[Vue.createElementVNode("div",{class:"x-mask-tabs__trigger",draggable:"true",onDragstart:p=>i(m,p),onDragend:p=>s(m,p)},[m.icon?(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(Vue.unref(De)(m.icon)),{key:0})):Vue.createCommentVNode("",!0),m.title?(Vue.openBlock(),Vue.createElementBlock("span",Tl,Vue.toDisplayString(m.title),1)):Vue.createCommentVNode("",!0)],40,Nl)]),default:Vue.withCtx(()=>[Vue.createVNode(Vue.unref(ze),{items:r(m),mode:"text",size:"small",type:"info",onClick:a},null,8,["items"])]),_:2},1032,["disabled"])]),_:2},1032,["name"]))),128))]),_:1},8,["model-value"])]),_:1},512))}}),zl=Vue.defineComponent({__name:"ThemeSwitch",setup(o){const t=VueUse.useDark(),n=Vue.computed(()=>t.value?VtjIcons.Sunny:VtjIcons.Moon),e=()=>{t.value=!t.value};return(r,l)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(Q),{icon:n.value,dropdown:{size:"small"},mode:"icon",circle:"",background:"hover",type:"primary",onClick:e},null,8,["icon"]))}}),Il={class:"x-mask-toolbar__menu-item"},Ml=Vue.defineComponent({__name:"Toolbar",props:{tabs:{default:()=>[]},actions:{},theme:{type:Boolean}},emits:["closeOtherTabs","closeAllTabs","closeTab","clickTab","actionClick","actionCommand"],setup(o,{emit:t}){const n=o,e=t,r=Vue.computed(()=>{const s=n.tabs.map((c,d)=>({divided:d===0,label:c.title,command:c}));return[{label:"关闭其他",command:"other"},{label:"关闭全部",command:"all"},...s]}),l=s=>{e("closeTab",s.command)},u=s=>{switch(s.command){case"all":e("closeAllTabs");break;case"other":e("closeOtherTabs");break;default:e("clickTab",s.command);break}},a=s=>{e("actionClick",s)},i=(s,c)=>{e("actionCommand",s,c)};return(s,c)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(j),{class:"x-mask-toolbar",align:"center"},{default:Vue.withCtx(()=>[Vue.createVNode(Vue.unref(Q),{icon:Vue.unref(VtjIcons.MoreFilled),menus:r.value,dropdown:{size:"small"},type:"primary",mode:"icon",circle:"",background:"hover",onCommand:u},{item:Vue.withCtx(({item:d})=>[Vue.createElementVNode("span",Il,[Vue.createTextVNode(Vue.toDisplayString(d.label)+" ",1),["other","all"].includes(d.command)?Vue.createCommentVNode("",!0):(Vue.openBlock(),Vue.createBlock(Vue.unref(de),{key:0,onClick:Vue.withModifiers(m=>l(d),["stop"]),icon:Vue.unref(VtjIcons.Close)},null,8,["onClick","icon"]))])]),_:1},8,["icon","menus"]),Vue.createVNode(Vue.unref(ElementPlus.ElDivider),{direction:"vertical"}),n.actions?(Vue.openBlock(),Vue.createBlock(Vue.unref(ze),{key:0,circle:"",mode:"icon",size:"default",background:"hover",type:"primary",items:s.actions,onClick:a,onCommand:i},null,8,["items"])):Vue.createCommentVNode("",!0),n.actions?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElDivider),{key:1,direction:"vertical"})):Vue.createCommentVNode("",!0),n.theme?(Vue.openBlock(),Vue.createBlock(zl,{key:2})):Vue.createCommentVNode("",!0),n.theme?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElDivider),{key:3,direction:"vertical"})):Vue.createCommentVNode("",!0),Vue.renderSlot(s.$slots,"default")]),_:3}))}}),Al=Vue.defineComponent({__name:"Avatar",props:{avatar:{},width:{default:350}},setup(o){const t=o;return(n,e)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElPopover),{width:t.width,"popper-class":"x-mask-avatar__popper",disabled:!n.$slots.default},{reference:Vue.withCtx(()=>[Vue.createVNode(Vue.unref(ElementPlus.ElAvatar),{class:"x-mask-avatar",shape:"circle",icon:Vue.unref(VtjIcons.UserFilled),src:t.avatar,size:26},null,8,["icon","src"])]),default:Vue.withCtx(()=>[n.$slots.default?Vue.renderSlot(n.$slots,"default",{key:0}):Vue.createCommentVNode("",!0)]),_:3},8,["width","disabled"]))}}),mo=Vue.defineComponent({__name:"Content",props:{createView:{type:Function},exclude:{},pure:{type:Boolean}},setup(o){const t=o;return(n,e)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(j),{class:"x-mask__content",overflow:"auto",flex:!1,grow:"",padding:!1},{default:Vue.withCtx(()=>[Vue.createElementVNode("div",{class:Vue.normalizeClass(["x-mask__inner",{"is-pure":t.pure}])},[Vue.renderSlot(n.$slots,"default"),Vue.createVNode(Vue.unref(VueRouter.RouterView),null,{default:Vue.withCtx(({Component:r,route:l})=>[(Vue.openBlock(),Vue.createBlock(Vue.KeepAlive,{exclude:t.exclude},[r?(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(t.createView(r,l)),{key:l.fullPath})):Vue.createCommentVNode("",!0)],1032,["exclude"]))]),_:1})],2)]),_:3}))}});function Rl(){const o=Vue.ref(!1),t=Vue.ref(""),n=Vue.ref(!1);return{collapsed:o,keyword:t,favorite:n}}function $l(o){const t=VtjUtils.uid();return Vue.computed(()=>{const n=o.home;return Object.assign({id:t,url:"/",name:"MaskHome",icon:VtjIcons.HomeFilled,closable:!1},typeof n=="string"?{url:n}:n||{})})}function Vo(o,t){let n=[];return o.forEach(e=>{e=t?t(e):e,e.children?n=n.concat(Vo(e.children,t)):n.push(e)}),n}function Fl(o,t){const n=VueRouter.useRouter(),e=Vue.shallowRef([]),r=Vue.shallowRef([]),l=Vue.computed(()=>Vo(e.value,o.menuAdapter)),u=Vue.computed(()=>VtjUtils.arrayToMap(l.value,"id")),a=Vue.ref(null),i=f=>{const V=typeof f=="object"?f.id:f,h=u.value.get(V);if(!h){console.warn("找不到菜单",f);return}const{type:w="route",url:v,title:b,icon:y}=h;if(!v){a.value=h,t("select",h);return}if(w==="route"){VtjUtils.isUrl(v)||v.startsWith("//")?window.open(v):(a.value=h,n.push(v).catch(_=>_));return}if(w==="window"){window.open(v);return}w==="dialog"&&gt({resizable:!0,bodyPadding:!1,width:"80%",height:"80%",title:b,icon:y,src:v})},s=async()=>{var f,V;e.value=typeof o.menus=="function"?await o.menus()||[]:(f=o.menus)!=null?f:[],r.value=typeof o.favorites=="function"?await o.favorites()||[]:(V=o.favorites)!=null?V:[]},c=f=>{r.value=[f,...r.value],o.addFavorite&&o.addFavorite(f)},d=f=>{r.value=r.value.filter(V=>V.id!==f.id),o.removeFavorite&&o.removeFavorite(f)},m=f=>!!r.value.find(V=>V===f||V.id===f.id),p=f=>{m(f)?d(f):c(f)};return Vue.watchEffect(s),{menus:e,favorites:r,flatMenus:l,active:a,select:i,toggleFavorite:p}}function Ol(o,t,n,e,r){const l=VueRouter.useRoute(),u=VueRouter.useRouter(),a={},i=Vue.ref([]),s=Vue.ref(),{width:c}=VueUse.useElementSize(s),d=Vue.computed(()=>Math.floor(c.value/fo)),m=Vue.computed(()=>i.value.slice(0,d.value).filter(M=>!M.dialog)),p=Vue.computed(()=>i.value.slice(d.value)),f=M=>n.value.find(k=>k.url===M),V=M=>l.fullPath===M.url,h=M=>r.value.id===M.id,w=M=>r.value.id===M?r.value:i.value.find(k=>k.id===M),v=Vue.ref(""),b=Vue.computed(()=>w(v.value)),y=M=>{u.push(M.url).catch(k=>k)},_=M=>{v.value=M.id,l.fullPath!==M.url&&y(M)},C=()=>{y(r.value)},g=M=>{const k=i.value.find(E=>E.url===M.url||E.id===M.id);k?_(k):(i.value.unshift(M),_(M))},x=async M=>{var we;const{url:k=l.fullPath,icon:E,title:D}=M||{},O=a[k],X=VtjUtils.uid(),ue=VtjUtils.upperFirstCamelCase(k);return{id:X,name:ue,url:k,icon:E,title:D||((we=f(l.path))==null?void 0:we.title)||"新建页签",closable:!0,menu:M,...O?await O():{}}},S=async(M,k)=>{if(!(!k&&!await ElementPlus.ElMessageBox.confirm("是否关闭页签","提示",{type:"warning"}).catch(()=>!1))){if(i.value=i.value.filter(E=>E.id!==M.id),v.value===M.id){const E=i.value[0];y(E||r.value)}return M}},I=M=>{const k=i.value.findIndex(E=>E.id===M.id);if(k>=0){const E=i.value[k];i.value.splice(k,1,Object.assign(E,M))}},z=async()=>{if(!await ElementPlus.ElMessageBox.confirm("是否关闭全部页签","提示",{type:"warning"}).catch(()=>!1))return;const k=i.value;return i.value=[],_(r.value),k},N=async()=>{if(!await ElementPlus.ElMessageBox.confirm("是否关闭其他页签","提示",{type:"warning"}).catch(()=>!1))return;const k=i.value.filter(E=>E.id!==v.value);return i.value=i.value.filter(E=>E.id===v.value),k},T=M=>{const k=i.value.filter(E=>E.id!==M.id);i.value=[M,...k],_(M)},A=async M=>{b.value&&b.value.closable&&(h(b.value)||(await S(b.value,!0),await VtjUtils.delay(0),M?u.push(M):u.push(r.value.url)))},Y=async()=>{await Vue.nextTick();const M=r.value.url===l.path,k=f(l.fullPath);if(M)v.value=r.value.id;else{const E=await x(k);g(E)}await Vue.nextTick(),e.value=k||null};return Vue.watch(n,Y),Vue.watch(l,Y),Vue.provide(Wt,a),{tabRef:s,tabs:i,showTabs:m,currentTab:b,changeTab:y,removeTab:S,updateTab:I,addTab:g,home:r,tabValue:v,isCurrentTab:V,activeHome:C,activeTab:_,dropdownTabs:p,removeAllTabs:z,removeOtherTabs:N,moveToShow:T,closeCurrnetTab:A}}function jl(o,t){const n=new Map,e=Vue.ref([]),r=Vue.reactive({}),l=Vue.getCurrentInstance(),u={},{updateTab:a,isCurrentTab:i,activeHome:s,tabs:c}=o,d=(y,_)=>{const C=_.fullPath;if(n.has(C))return n.get(C);{const g=VtjUtils.upperFirstCamelCase(C),x={name:g,setup(){const S=Vue.computed(()=>r[C]||document.body),I=Vue.computed(()=>!r[C]),z=Vue.computed(()=>!e.value.includes(g));return Vue.provide(VueRouter.routeLocationKey,Vue.toRaw({..._})),()=>z.value?Vue.h(Vue.Teleport,{to:S.value,disabled:I.value},[Vue.h(y)]):null}};return n.set(C,x),x}},m=y=>{y.dialog=void 0,delete r[y.url];const _=u[y.id];_&&(_.destroy(),delete u[y.id],a(y))},p=(y=[])=>{y.forEach(_=>{m(_)})},f=async y=>{y.dialog={...y.dialog,pure:t.pure,onMinimized:()=>{m(y)},onClose:async()=>{m(y),c.value=c.value.filter(C=>C.id!==y.id)}},a(y);const _=gt({title:y.title,icon:y.icon,modal:!1,resizable:!0,draggable:!0,maximizable:!0,minimizable:!0,...y.dialog,onOpen(C){var g,x;r[y.url]=(x=(g=C.refs.panelRef)==null?void 0:g.bodyRef)==null?void 0:x.$el}},l==null?void 0:l.appContext);return await Vue.nextTick(),i(y)&&s(),u[y.id]=_,_},V=async y=>{e.value=[y.name],await Vue.nextTick(),e.value=[]},h=async y=>{e.value=y.map(_=>_.name),await Vue.nextTick(),e.value=[]},w=y=>(y.preventDefault(),!1),v=y=>{if(y.dataTransfer){const _=y.dataTransfer.getData("tab"),C=c.value.find(g=>g.id===_);if(C){const{clientX:g,clientY:x}=y;C.dialog={left:g,top:x},f(C)}}},b=y=>!!r[y];return VueUse.useEventListener(document,"dragover",w),VueUse.useEventListener(document,"drop",v),{createView:d,openDialog:f,refresh:V,exclude:e,cleanCache:h,hasDialog:b,closeDialog:m,closeDialogs:p}}const ho=Vue.defineComponent({name:"XMask",__name:"Mask",props:po,emits:["select","actionClick","actionCommand"],setup(o,{emit:t}){const n=o,e=t,r=$l(n),{collapsed:l,keyword:u,favorite:a}=Rl(),{menus:i,favorites:s,flatMenus:c,active:d,select:m,toggleFavorite:p}=Fl(n,e),{tabRef:f,showTabs:V,currentTab:h,changeTab:w,removeTab:v,tabs:b,updateTab:y,isCurrentTab:_,activeHome:C,removeAllTabs:g,removeOtherTabs:x,dropdownTabs:S,moveToShow:I,closeCurrnetTab:z}=Ol(n,e,c,d,r),{createView:N,openDialog:T,closeDialog:A,refresh:Y,exclude:M,cleanCache:k,closeDialogs:E}=jl({tabs:b,updateTab:y,isCurrentTab:_,activeHome:C},n),D=async H=>{await v(H)&&await k([H])},O=async()=>{const H=await g();H&&(E(H),await k(H))},X=async()=>{const H=await x();H&&(E(H),await k(H))},ue=H=>{e("actionClick",H)},we=(H,te)=>{e("actionCommand",H,te)},Yn=async H=>{const te=Vue.toValue(H||h);te&&(te.dialog&&A(te),await v(te,!0),await VtjUtils.delay(50))};return Vue.watch(h,H=>{H!=null&&H.dialog&&A(H)}),Vue.provide(Jt,{tabs:b,flatMenus:c,favorites:s,updateTab:y,active:d,currentTab:h,closeCurrnetTab:z,close:Yn}),(H,te)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(j),{class:Vue.normalizeClass(["x-mask",{"is-disabled":n.disabled}]),fit:""},{default:Vue.withCtx(()=>[n.disabled?(Vue.openBlock(),Vue.createBlock(mo,{key:1,createView:Vue.unref(N),exclude:Vue.unref(M),pure:n.pure},{default:Vue.withCtx(()=>[H.$slots.default?Vue.renderSlot(H.$slots,"default",{key:0}):Vue.createCommentVNode("",!0)]),_:3},8,["createView","exclude","pure"])):(Vue.openBlock(),Vue.createElementBlock(Vue.Fragment,{key:0},[Vue.createVNode(bl,{collapsed:Vue.unref(l)},{brand:Vue.withCtx(()=>[Vue.createVNode(El,{logo:n.logo,title:n.title,url:Vue.unref(r).url,collapsed:Vue.unref(l)},null,8,["logo","title","url","collapsed"])]),default:Vue.withCtx(()=>[Vue.createVNode(Cl,{collasped:Vue.unref(l),"onUpdate:collasped":te[0]||(te[0]=Z=>Vue.isRef(l)?l.value=Z:null),favorite:Vue.unref(a),"onUpdate:favorite":te[1]||(te[1]=Z=>Vue.isRef(a)?a.value=Z:null),keyword:Vue.unref(u),"onUpdate:keyword":te[2]||(te[2]=Z=>Vue.isRef(u)?u.value=Z:null)},null,8,["collasped","favorite","keyword"]),Vue.createVNode(Sl,{collapse:Vue.unref(l),keyword:Vue.unref(u),favorite:Vue.unref(a),favorites:Vue.unref(s),flatMenus:Vue.unref(c),menus:Vue.unref(i),active:Vue.unref(d),onSelect:Vue.unref(m)},null,8,["collapse","keyword","favorite","favorites","flatMenus","menus","active","onSelect"])]),_:1},8,["collapsed"]),Vue.createVNode(Vue.unref(j),{class:"x-mask__main",grow:"",shrink:"",flex:"",direction:"column",overflow:"hidden"},{default:Vue.withCtx(()=>[Vue.createVNode(Vue.unref(j),{class:"x-mask-topbar",justify:"space-between",align:"center"},{default:Vue.withCtx(()=>{var Z;return[Vue.createVNode(Dl,{ref_key:"tabRef",ref:f,favorites:Vue.unref(s),tabs:Vue.unref(V),home:Vue.unref(r),value:(Z=Vue.unref(h))==null?void 0:Z.id,onClick:Vue.unref(w),onToggleFavorite:Vue.unref(p),onRemove:D,onDialog:Vue.unref(T),onRefresh:Vue.unref(Y)},null,8,["favorites","tabs","home","value","onClick","onToggleFavorite","onDialog","onRefresh"]),Vue.createVNode(Ml,{tabs:Vue.unref(S),actions:n.actions,theme:n.theme,onCloseOtherTabs:X,onCloseAllTabs:O,onCloseTab:D,onClickTab:Vue.unref(I),onActionClick:ue,onActionCommand:we},{default:Vue.withCtx(()=>[Vue.createVNode(Al,{avatar:n.avatar,width:n.userCardWidth},Vue.createSlots({_:2},[H.$slots.user?{name:"default",fn:Vue.withCtx(()=>[Vue.renderSlot(H.$slots,"user")]),key:"0"}:void 0]),1032,["avatar","width"])]),_:3},8,["tabs","actions","theme","onClickTab"])]}),_:3}),Vue.createVNode(mo,{createView:Vue.unref(N),exclude:Vue.unref(M),pure:n.pure},{default:Vue.withCtx(()=>[H.$slots.default?Vue.renderSlot(H.$slots,"default",{key:0}):Vue.createCommentVNode("",!0)]),_:3},8,["createView","exclude","pure"])]),_:3})],64))]),_:3},8,["class"]))}});function Ul(o={}){const t=VueRouter.useRoute(),n=Vue.inject(Wt,null),e=Vue.inject(Jt,null);if(n){const l=typeof o=="function"?o:async()=>o;n[t.fullPath]=l}return{tab:Vue.computed(()=>e?e.tabs.value.find(l=>l.url===t.fullPath):null),mask:e}}const Qt=Vue.defineComponent({__name:"SelectEditor",props:{options:{default:()=>[]}},emits:["change"],setup(o,{emit:t}){const n=o,e=t,r=l=>{const u=n.options.filter(a=>Array.isArray(l)?l.includes(a.value):l===a.value);e("change",l,u)};return(l,u)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElSelect),Vue.mergeProps(l.$attrs,{onChange:r}),{default:Vue.withCtx(()=>[(Vue.openBlock(!0),Vue.createElementBlock(Vue.Fragment,null,Vue.renderList(n.options,(a,i)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElOption),Vue.mergeProps({key:`item_${i}_${a.value}`,ref_for:!0},a),Vue.createSlots({_:2},[l.$slots.option?{name:"default",fn:Vue.withCtx(()=>[Vue.renderSlot(l.$slots,"option",{option:a})]),key:"0"}:void 0]),1040))),128))]),_:3},16))}}),Ll=Vue.defineComponent({__name:"CheckboxEditor",props:{options:{default:()=>[]},button:{type:Boolean,default:!1}},setup(o){const t=o,n=Vue.computed(()=>Vue.markRaw(t.button?ElementPlus.ElCheckboxButton:ElementPlus.ElCheckbox));return(e,r)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElCheckboxGroup),Vue.normalizeProps(Vue.guardReactiveProps(e.$attrs)),{default:Vue.withCtx(()=>[(Vue.openBlock(!0),Vue.createElementBlock(Vue.Fragment,null,Vue.renderList(t.options,(l,u)=>(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(n.value),Vue.mergeProps({key:`item_${u}_${l.value}`,ref_for:!0},l),{default:Vue.withCtx(()=>[Vue.createTextVNode(Vue.toDisplayString(l.label),1)]),_:2},1040))),128))]),_:1},16))}}),Hl=Vue.defineComponent({__name:"RadioEditor",props:{options:{default:()=>[]},button:{type:Boolean,default:!1}},setup(o){const t=o,n=Vue.computed(()=>Vue.markRaw(t.button?ElementPlus.ElRadioButton:ElementPlus.ElRadio));return(e,r)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElRadioGroup),Vue.normalizeProps(Vue.guardReactiveProps(e.$attrs)),{default:Vue.withCtx(()=>[(Vue.openBlock(!0),Vue.createElementBlock(Vue.Fragment,null,Vue.renderList(t.options,(l,u)=>(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(n.value),Vue.mergeProps({key:`item_${u}_${l.value}`,ref_for:!0},l),{default:Vue.withCtx(()=>[Vue.createTextVNode(Vue.toDisplayString(l.label),1)]),_:2},1040))),128))]),_:1},16))}}),Ie={filterResetMethod(o){const{options:t,column:n}=o;if(n.filterResetMethod){n.filterResetMethod(o);return}t.forEach(e=>{e.value=""})},filterRecoverMethod(o){const{option:t,column:n}=o;if(n.filterRecoverMethod){n.filterRecoverMethod(o);return}t.value=""},filterMethod(o){const{option:t,row:n,column:e}=o;if(e.filterMethod)return e.filterMethod(o);const{value:r}=t,l=n[e.field];return VtjUtils.isString(l)?l.indexOf(String(r))>-1:l===r}},Xl=Vue.defineComponent({name:"InputEdit",__name:"InputEdit",props:{params:{},renderOpts:{}},setup(o){const t=o,{renderProps:n,renderEvents:e,cellValue:r,onChange:l}=Fe(t.renderOpts,t.params);return(u,a)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElInput),Vue.mergeProps({size:"small",clearable:"",modelValue:Vue.unref(r),"onUpdate:modelValue":a[0]||(a[0]=i=>Vue.isRef(r)?r.value=i:null),onInput:Vue.unref(l)},Vue.unref(n),Vue.toHandlers(Vue.unref(e))),null,16,["modelValue","onInput"]))}}),ql={class:"x-grid__filter"},Zt=Vue.defineComponent({name:"InputFilter",__name:"InputFilter",props:{params:{},renderOpts:{}},setup(o){const t=o,{renderProps:n,renderEvents:e,state:r,load:l,onChange:u,onKeyup:a}=Mt(t.renderOpts,t.params);return l(),(i,s)=>(Vue.openBlock(),Vue.createElementBlock("div",ql,[Vue.createVNode(Vue.unref(ElementPlus.ElInput),Vue.mergeProps({size:"small",placeholder:"输入关键字回车筛选",clearable:"",modelValue:Vue.unref(r).option.value,"onUpdate:modelValue":s[0]||(s[0]=c=>Vue.unref(r).option.value=c),onInput:Vue.unref(u),onKeyup:Vue.withKeys(Vue.withModifiers(Vue.unref(a),["stop"]),["enter"])},Vue.unref(n),Vue.toHandlers(Vue.unref(e))),null,16,["modelValue","onInput","onKeyup"])]))}}),qe={autofocus:".el-input__inner",renderDefault(o,t){var r;const{row:n,column:e}=t;return[Vue.createTextVNode((r=n[e.field])!=null?r:"")]},renderEdit(o,t){return[Vue.h(Xl,{params:t,renderOpts:o})]},renderCell(o,t){var r;const{row:n,column:e}=t;return[Vue.createTextVNode((r=n[e.field])!=null?r:"")]}},Kl={cellClassName:"x-grid__edit",...qe,...Ie,renderFilter(o,t){return[Vue.h(Zt,{params:t,renderOpts:o})]}};/**!
8
8
  * Sortable 1.15.6
9
9
  * @author RubaXa <trash@rubaxa.org>
10
10
  * @author owenm <owen23355@gmail.com>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vtj/ui",
3
3
  "private": false,
4
- "version": "0.11.10",
4
+ "version": "0.11.12",
5
5
  "type": "module",
6
6
  "keywords": [
7
7
  "低代码引擎",
@@ -29,8 +29,8 @@
29
29
  "sortablejs": "~1.15.6",
30
30
  "vxe-table": "~4.6.17",
31
31
  "vxe-table-plugin-menus": "~4.0.3",
32
- "@vtj/icons": "~0.11.10",
33
- "@vtj/utils": "~0.11.10"
32
+ "@vtj/icons": "~0.11.12",
33
+ "@vtj/utils": "~0.11.12"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@types/qrcode": "^1.5.5",
@@ -2,8 +2,7 @@ import { VxeGlobalRendererHandles } from '../../types';
2
2
  import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, CreateComponentPublicInstanceWithMixins, ExtractPropTypes, PropType, Component, VNodeProps, AllowedComponentProps, ComponentCustomProps, GlobalComponents, GlobalDirectives } from 'vue';
3
3
  import { EpPropFinalized, EpPropMergeType } from 'element-plus/es/utils/index.mjs';
4
4
  import { IDatePickerType } from 'element-plus/es/components/date-picker/src/date-picker.type.mjs';
5
- import { Placement, Options } from '@popperjs/core';
6
- import { GetDisabledHours, GetDisabledMinutes, GetDisabledSeconds, SingleOrRange, DateModelType, ModelValueType } from 'element-plus';
5
+ import { Placement, GetDisabledHours, GetDisabledMinutes, GetDisabledSeconds, SingleOrRange, Options, DateModelType, ModelValueType } from 'element-plus';
7
6
  export interface Props {
8
7
  params: VxeGlobalRendererHandles.RenderEditParams;
9
8
  renderOpts: VxeGlobalRendererHandles.RenderEditOptions;
@@ -1,10 +1,10 @@
1
1
  import { VxeGlobalRendererHandles } from '../../types';
2
- import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, CreateComponentPublicInstanceWithMixins, ExtractPropTypes, PropType, ComputedRef, Ref, GlobalComponents, GlobalDirectives, Component, ShallowRef, VNodeProps, AllowedComponentProps, ComponentCustomProps, ComponentInternalInstance, Slot, ComponentPublicInstance, ComponentOptionsBase, VNode, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties } from 'vue';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, CreateComponentPublicInstanceWithMixins, ExtractPropTypes, PropType, ComputedRef, Ref, GlobalComponents, GlobalDirectives, Component, ShallowRef, WritableComputedRef, VNodeProps, AllowedComponentProps, ComponentCustomProps, ComponentInternalInstance, Slot, ComponentPublicInstance, ComponentOptionsBase, VNode, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties } from 'vue';
3
3
  import { PickerColumns, PickerFields, PickerLoader, PickerDialogProps, PickerGridProps, PickerOption } from '../../..';
4
4
  import { EpPropFinalized, EpPropMergeType } from 'element-plus/es/utils/index.mjs';
5
- import { PopperEffect } from 'element-plus/es/element-plus/index.js';
6
- import { Options, Placement } from '@popperjs/core';
7
- import { SelectOptionProxy, ElTooltip, MessageBoxData } from 'element-plus';
5
+ import { PopperEffect } from 'element-plus/es/components/popper/index.js';
6
+ import { Options, Placement, SelectOptionProxy, TooltipInstance, MessageBoxData } from 'element-plus';
7
+ import { DebouncedFunc } from 'lodash';
8
8
  import { Props } from '../../../picker/Dialog';
9
9
  import { GridColumns, GridCustomInfo, GridLoader, GridCellRenders, GridEditRenders, GridFilterRenders, GridSortableEvent, GridSortableOptions } from '../..';
10
10
  import { Options } from 'sortablejs';
@@ -202,55 +202,98 @@ declare const _default: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsM
202
202
  "onPopup-scroll"?: ((...args: any[]) => any) | undefined;
203
203
  }, {
204
204
  modelValue: ComputedRef<string | number | boolean | any[] | Record<string, any> | undefined>;
205
- selectedLabel: ComputedRef<any>;
205
+ selectedLabel: ComputedRef<string | string[]>;
206
206
  calculatorRef: ShallowRef<HTMLElement | undefined>;
207
207
  inputStyle: ComputedRef<{
208
208
  minWidth: string;
209
209
  }>;
210
210
  inputId: Ref<string | undefined>;
211
- contentId: Ref<string | undefined>;
212
- nsSelect: Ref<string | undefined>;
213
- nsInput: Ref<string | undefined>;
214
- states: Reactive<Record<string, any>>;
211
+ contentId: Ref<string>;
212
+ nsSelect: {
213
+ namespace: ComputedRef<string>;
214
+ b: (blockSuffix?: string) => string;
215
+ e: (element?: string) => string;
216
+ m: (modifier?: string) => string;
217
+ be: (blockSuffix?: string, element?: string) => string;
218
+ em: (element?: string, modifier?: string) => string;
219
+ bm: (blockSuffix?: string, modifier?: string) => string;
220
+ bem: (blockSuffix?: string, element?: string, modifier?: string) => string;
221
+ is: {
222
+ (name: string, state: boolean | undefined): string;
223
+ (name: string): string;
224
+ };
225
+ cssVar: (object: Record<string, string>) => Record<string, string>;
226
+ cssVarName: (name: string) => string;
227
+ cssVarBlock: (object: Record<string, string>) => Record<string, string>;
228
+ cssVarBlockName: (name: string) => string;
229
+ };
230
+ nsInput: {
231
+ namespace: ComputedRef<string>;
232
+ b: (blockSuffix?: string) => string;
233
+ e: (element?: string) => string;
234
+ m: (modifier?: string) => string;
235
+ be: (blockSuffix?: string, element?: string) => string;
236
+ em: (element?: string, modifier?: string) => string;
237
+ bm: (blockSuffix?: string, modifier?: string) => string;
238
+ bem: (blockSuffix?: string, element?: string, modifier?: string) => string;
239
+ is: {
240
+ (name: string, state: boolean | undefined): string;
241
+ (name: string): string;
242
+ };
243
+ cssVar: (object: Record<string, string>) => Record<string, string>;
244
+ cssVarName: (name: string) => string;
245
+ cssVarBlock: (object: Record<string, string>) => Record<string, string>;
246
+ cssVarBlockName: (name: string) => string;
247
+ };
248
+ states: {
249
+ inputValue: string;
250
+ options: Map<any, any>;
251
+ cachedOptions: Map<any, any>;
252
+ optionValues: any[];
253
+ selected: any[];
254
+ selectionWidth: number;
255
+ collapseItemWidth: number;
256
+ selectedLabel: string;
257
+ hoveringIndex: number;
258
+ previousQuery: null;
259
+ inputHovering: boolean;
260
+ menuVisibleOnFocus: boolean;
261
+ isBeforeHide: boolean;
262
+ };
215
263
  isFocused: Ref<boolean>;
216
264
  expanded: Ref<boolean>;
217
265
  optionsArray: ComputedRef<any[]>;
218
- hoverOption: Ref<unknown>;
219
- selectSize: ComputedRef<"" | "default" | "small" | "large">;
266
+ hoverOption: Ref<any>;
267
+ selectSize: ComputedRef<"" | "small" | "default" | "large">;
220
268
  filteredOptionsCount: ComputedRef<number>;
221
- resetCalculatorWidth: () => void;
222
269
  updateTooltip: () => void;
223
270
  updateTagTooltip: () => void;
224
271
  debouncedOnInputChange: DebouncedFunc<() => void>;
225
- onInput: (event: Event) => void;
226
- deletePrevTag: (event: Event) => void;
227
- deleteTag: (event: Event, tag: any) => void;
228
- deleteSelected: (event: Event) => void;
272
+ onInput: (event: any) => void;
273
+ deletePrevTag: (e: any) => void;
274
+ deleteTag: (event: any, tag: any) => void;
275
+ deleteSelected: (event: any) => void;
229
276
  handleOptionSelect: (option: any) => void;
230
277
  scrollToOption: (option: any) => void;
231
278
  hasModelValue: ComputedRef<boolean>;
232
279
  shouldShowPlaceholder: ComputedRef<boolean>;
233
280
  currentPlaceholder: ComputedRef<string>;
234
- mouseEnterEventName: Ref<string | null>;
281
+ mouseEnterEventName: ComputedRef<"mouseenter" | null>;
235
282
  needStatusIcon: ComputedRef<boolean>;
236
283
  showClose: ComputedRef<boolean>;
237
- iconComponent: ComputedRef<string>;
238
- iconReverse: ComputedRef<boolean>;
239
- validateState: ComputedRef<string>;
240
- popupScroll: (data: {
241
- scrollTop: number;
242
- scrollLeft: number;
243
- }) => void;
244
- validateIcon: ComputedRef<unknown>;
284
+ iconComponent: ComputedRef< EpPropMergeType<(new (...args: any[]) => (string | Component) & {}) | (() => string | Component) | ((new (...args: any[]) => (string | Component) & {}) | (() => string | Component))[], unknown, unknown> | undefined>;
285
+ iconReverse: ComputedRef<string>;
286
+ validateState: ComputedRef<"" | "error" | "success" | "validating">;
287
+ validateIcon: ComputedRef<any>;
245
288
  showNewOption: ComputedRef<boolean>;
246
289
  updateOptions: () => void;
247
290
  collapseTagSize: ComputedRef<"default" | "small">;
248
291
  setSelected: () => void;
249
- selectDisabled: ComputedRef<boolean>;
292
+ selectDisabled: ComputedRef<boolean | undefined>;
250
293
  emptyText: ComputedRef<string | null>;
251
- handleCompositionStart: (e: Event) => void;
252
- handleCompositionUpdate: (e: Event) => void;
253
- handleCompositionEnd: (e: Event) => void;
294
+ handleCompositionStart: (event: CompositionEvent) => void;
295
+ handleCompositionUpdate: (event: CompositionEvent) => void;
296
+ handleCompositionEnd: (event: CompositionEvent) => void;
254
297
  onOptionCreate: (vm: SelectOptionProxy) => void;
255
298
  onOptionDestroy: (key: any, vm: SelectOptionProxy) => void;
256
299
  handleMenuEnter: () => void;
@@ -262,20 +305,28 @@ declare const _default: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsM
262
305
  toggleMenu: () => void;
263
306
  selectOption: () => void;
264
307
  getValueKey: (item: any) => any;
265
- navigateOptions: (direction: string) => void;
308
+ navigateOptions: (direction: any) => void;
266
309
  dropdownMenuVisible: WritableComputedRef<boolean>;
267
- showTagList: ComputedRef<unknown[]>;
268
- collapseTagList: ComputedRef<unknown[]>;
269
- tagStyle: ComputedRef<unknown>;
270
- collapseTagStyle: ComputedRef<unknown>;
271
- popperRef: ComputedRef<unknown>;
310
+ showTagList: ComputedRef<any[]>;
311
+ collapseTagList: ComputedRef<any[]>;
312
+ popupScroll: (data: {
313
+ scrollTop: number;
314
+ scrollLeft: number;
315
+ }) => void;
316
+ tagStyle: ComputedRef<{
317
+ maxWidth: string;
318
+ }>;
319
+ collapseTagStyle: ComputedRef<{
320
+ maxWidth: string;
321
+ }>;
322
+ popperRef: ComputedRef<HTMLElement | undefined>;
272
323
  inputRef: Ref<HTMLInputElement | null>;
273
- tooltipRef: Ref<InstanceType< ElTooltip> | null>;
274
- tagTooltipRef: Ref<InstanceType< ElTooltip> | null>;
324
+ tooltipRef: Ref< TooltipInstance | null>;
325
+ tagTooltipRef: Ref< TooltipInstance | null>;
275
326
  prefixRef: Ref<HTMLElement>;
276
327
  suffixRef: Ref<HTMLElement>;
277
328
  selectRef: Ref<HTMLElement>;
278
- wrapperRef: Ref<HTMLElement>;
329
+ wrapperRef: ShallowRef<HTMLElement | undefined>;
279
330
  selectionRef: Ref<HTMLElement>;
280
331
  scrollbarRef: Ref<{
281
332
  handleScroll: () => void;
@@ -415,55 +466,98 @@ declare const _default: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsM
415
466
  "onPopup-scroll"?: ((...args: any[]) => any) | undefined;
416
467
  }, {
417
468
  modelValue: ComputedRef<string | number | boolean | any[] | Record<string, any> | undefined>;
418
- selectedLabel: ComputedRef<any>;
469
+ selectedLabel: ComputedRef<string | string[]>;
419
470
  calculatorRef: ShallowRef<HTMLElement | undefined>;
420
471
  inputStyle: ComputedRef<{
421
472
  minWidth: string;
422
473
  }>;
423
474
  inputId: Ref<string | undefined>;
424
- contentId: Ref<string | undefined>;
425
- nsSelect: Ref<string | undefined>;
426
- nsInput: Ref<string | undefined>;
427
- states: Reactive<Record<string, any>>;
475
+ contentId: Ref<string>;
476
+ nsSelect: {
477
+ namespace: ComputedRef<string>;
478
+ b: (blockSuffix?: string) => string;
479
+ e: (element?: string) => string;
480
+ m: (modifier?: string) => string;
481
+ be: (blockSuffix?: string, element?: string) => string;
482
+ em: (element?: string, modifier?: string) => string;
483
+ bm: (blockSuffix?: string, modifier?: string) => string;
484
+ bem: (blockSuffix?: string, element?: string, modifier?: string) => string;
485
+ is: {
486
+ (name: string, state: boolean | undefined): string;
487
+ (name: string): string;
488
+ };
489
+ cssVar: (object: Record<string, string>) => Record<string, string>;
490
+ cssVarName: (name: string) => string;
491
+ cssVarBlock: (object: Record<string, string>) => Record<string, string>;
492
+ cssVarBlockName: (name: string) => string;
493
+ };
494
+ nsInput: {
495
+ namespace: ComputedRef<string>;
496
+ b: (blockSuffix?: string) => string;
497
+ e: (element?: string) => string;
498
+ m: (modifier?: string) => string;
499
+ be: (blockSuffix?: string, element?: string) => string;
500
+ em: (element?: string, modifier?: string) => string;
501
+ bm: (blockSuffix?: string, modifier?: string) => string;
502
+ bem: (blockSuffix?: string, element?: string, modifier?: string) => string;
503
+ is: {
504
+ (name: string, state: boolean | undefined): string;
505
+ (name: string): string;
506
+ };
507
+ cssVar: (object: Record<string, string>) => Record<string, string>;
508
+ cssVarName: (name: string) => string;
509
+ cssVarBlock: (object: Record<string, string>) => Record<string, string>;
510
+ cssVarBlockName: (name: string) => string;
511
+ };
512
+ states: {
513
+ inputValue: string;
514
+ options: Map<any, any>;
515
+ cachedOptions: Map<any, any>;
516
+ optionValues: any[];
517
+ selected: any[];
518
+ selectionWidth: number;
519
+ collapseItemWidth: number;
520
+ selectedLabel: string;
521
+ hoveringIndex: number;
522
+ previousQuery: null;
523
+ inputHovering: boolean;
524
+ menuVisibleOnFocus: boolean;
525
+ isBeforeHide: boolean;
526
+ };
428
527
  isFocused: Ref<boolean>;
429
528
  expanded: Ref<boolean>;
430
529
  optionsArray: ComputedRef<any[]>;
431
- hoverOption: Ref<unknown>;
432
- selectSize: ComputedRef<"" | "default" | "small" | "large">;
530
+ hoverOption: Ref<any>;
531
+ selectSize: ComputedRef<"" | "small" | "default" | "large">;
433
532
  filteredOptionsCount: ComputedRef<number>;
434
- resetCalculatorWidth: () => void;
435
533
  updateTooltip: () => void;
436
534
  updateTagTooltip: () => void;
437
535
  debouncedOnInputChange: DebouncedFunc<() => void>;
438
- onInput: (event: Event) => void;
439
- deletePrevTag: (event: Event) => void;
440
- deleteTag: (event: Event, tag: any) => void;
441
- deleteSelected: (event: Event) => void;
536
+ onInput: (event: any) => void;
537
+ deletePrevTag: (e: any) => void;
538
+ deleteTag: (event: any, tag: any) => void;
539
+ deleteSelected: (event: any) => void;
442
540
  handleOptionSelect: (option: any) => void;
443
541
  scrollToOption: (option: any) => void;
444
542
  hasModelValue: ComputedRef<boolean>;
445
543
  shouldShowPlaceholder: ComputedRef<boolean>;
446
544
  currentPlaceholder: ComputedRef<string>;
447
- mouseEnterEventName: Ref<string | null>;
545
+ mouseEnterEventName: ComputedRef<"mouseenter" | null>;
448
546
  needStatusIcon: ComputedRef<boolean>;
449
547
  showClose: ComputedRef<boolean>;
450
- iconComponent: ComputedRef<string>;
451
- iconReverse: ComputedRef<boolean>;
452
- validateState: ComputedRef<string>;
453
- popupScroll: (data: {
454
- scrollTop: number;
455
- scrollLeft: number;
456
- }) => void;
457
- validateIcon: ComputedRef<unknown>;
548
+ iconComponent: ComputedRef< EpPropMergeType<(new (...args: any[]) => (string | Component) & {}) | (() => string | Component) | ((new (...args: any[]) => (string | Component) & {}) | (() => string | Component))[], unknown, unknown> | undefined>;
549
+ iconReverse: ComputedRef<string>;
550
+ validateState: ComputedRef<"" | "error" | "success" | "validating">;
551
+ validateIcon: ComputedRef<any>;
458
552
  showNewOption: ComputedRef<boolean>;
459
553
  updateOptions: () => void;
460
554
  collapseTagSize: ComputedRef<"default" | "small">;
461
555
  setSelected: () => void;
462
- selectDisabled: ComputedRef<boolean>;
556
+ selectDisabled: ComputedRef<boolean | undefined>;
463
557
  emptyText: ComputedRef<string | null>;
464
- handleCompositionStart: (e: Event) => void;
465
- handleCompositionUpdate: (e: Event) => void;
466
- handleCompositionEnd: (e: Event) => void;
558
+ handleCompositionStart: (event: CompositionEvent) => void;
559
+ handleCompositionUpdate: (event: CompositionEvent) => void;
560
+ handleCompositionEnd: (event: CompositionEvent) => void;
467
561
  onOptionCreate: (vm: SelectOptionProxy) => void;
468
562
  onOptionDestroy: (key: any, vm: SelectOptionProxy) => void;
469
563
  handleMenuEnter: () => void;
@@ -475,20 +569,28 @@ declare const _default: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsM
475
569
  toggleMenu: () => void;
476
570
  selectOption: () => void;
477
571
  getValueKey: (item: any) => any;
478
- navigateOptions: (direction: string) => void;
572
+ navigateOptions: (direction: any) => void;
479
573
  dropdownMenuVisible: WritableComputedRef<boolean>;
480
- showTagList: ComputedRef<unknown[]>;
481
- collapseTagList: ComputedRef<unknown[]>;
482
- tagStyle: ComputedRef<unknown>;
483
- collapseTagStyle: ComputedRef<unknown>;
484
- popperRef: ComputedRef<unknown>;
574
+ showTagList: ComputedRef<any[]>;
575
+ collapseTagList: ComputedRef<any[]>;
576
+ popupScroll: (data: {
577
+ scrollTop: number;
578
+ scrollLeft: number;
579
+ }) => void;
580
+ tagStyle: ComputedRef<{
581
+ maxWidth: string;
582
+ }>;
583
+ collapseTagStyle: ComputedRef<{
584
+ maxWidth: string;
585
+ }>;
586
+ popperRef: ComputedRef<HTMLElement | undefined>;
485
587
  inputRef: Ref<HTMLInputElement | null>;
486
- tooltipRef: Ref<InstanceType< ElTooltip> | null>;
487
- tagTooltipRef: Ref<InstanceType< ElTooltip> | null>;
588
+ tooltipRef: Ref< TooltipInstance | null>;
589
+ tagTooltipRef: Ref< TooltipInstance | null>;
488
590
  prefixRef: Ref<HTMLElement>;
489
591
  suffixRef: Ref<HTMLElement>;
490
592
  selectRef: Ref<HTMLElement>;
491
- wrapperRef: Ref<HTMLElement>;
593
+ wrapperRef: ShallowRef<HTMLElement | undefined>;
492
594
  selectionRef: Ref<HTMLElement>;
493
595
  scrollbarRef: Ref<{
494
596
  handleScroll: () => void;
@@ -1,9 +1,9 @@
1
- import { nextTick, DefineComponent, ExtractPropTypes, PropType, ComputedRef, Ref, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, CreateComponentPublicInstanceWithMixins, Component, ShallowRef, VNodeProps, AllowedComponentProps, ComponentCustomProps, GlobalComponents, GlobalDirectives, ComponentInternalInstance, Slot, ComponentPublicInstance, ComponentOptionsBase, VNode, DebuggerEvent, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties } from 'vue';
1
+ import { nextTick, DefineComponent, ExtractPropTypes, PropType, ComputedRef, Ref, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, CreateComponentPublicInstanceWithMixins, Component, ShallowRef, WritableComputedRef, VNodeProps, AllowedComponentProps, ComponentCustomProps, GlobalComponents, GlobalDirectives, ComponentInternalInstance, Slot, ComponentPublicInstance, ComponentOptionsBase, VNode, DebuggerEvent, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties } from 'vue';
2
2
  import { PickerLoader, PickerColumns, PickerFields, PickerDialogProps, PickerGridProps, PickerOption } from './types';
3
3
  import { EpPropFinalized, EpPropMergeType } from 'element-plus/es/utils/index.mjs';
4
- import { PopperEffect } from 'element-plus/es/element-plus/index.js';
5
- import { Options, Placement } from '@popperjs/core';
6
- import { SelectOptionProxy, ElTooltip, MessageBoxData } from 'element-plus';
4
+ import { PopperEffect } from 'element-plus/es/components/popper/index.js';
5
+ import { Options, Placement, SelectOptionProxy, TooltipInstance, MessageBoxData } from 'element-plus';
6
+ import { DebouncedFunc } from 'lodash';
7
7
  import { Props } from './Dialog';
8
8
  import { GridColumns, GridCustomInfo, GridLoader, GridCellRenders, GridEditRenders, GridFilterRenders, GridSortableEvent, GridSortableOptions } from '..';
9
9
  import { Options } from 'sortablejs';
@@ -259,55 +259,98 @@ declare const _default: DefineComponent<ExtractPropTypes<{
259
259
  "onPopup-scroll"?: ((...args: any[]) => any) | undefined;
260
260
  }, {
261
261
  modelValue: ComputedRef<string | number | boolean | any[] | Record<string, any> | undefined>;
262
- selectedLabel: ComputedRef<any>;
262
+ selectedLabel: ComputedRef<string | string[]>;
263
263
  calculatorRef: ShallowRef<HTMLElement | undefined>;
264
264
  inputStyle: ComputedRef<{
265
265
  minWidth: string;
266
266
  }>;
267
267
  inputId: Ref<string | undefined>;
268
- contentId: Ref<string | undefined>;
269
- nsSelect: Ref<string | undefined>;
270
- nsInput: Ref<string | undefined>;
271
- states: Reactive<Record<string, any>>;
268
+ contentId: Ref<string>;
269
+ nsSelect: {
270
+ namespace: ComputedRef<string>;
271
+ b: (blockSuffix?: string) => string;
272
+ e: (element?: string) => string;
273
+ m: (modifier?: string) => string;
274
+ be: (blockSuffix?: string, element?: string) => string;
275
+ em: (element?: string, modifier?: string) => string;
276
+ bm: (blockSuffix?: string, modifier?: string) => string;
277
+ bem: (blockSuffix?: string, element?: string, modifier?: string) => string;
278
+ is: {
279
+ (name: string, state: boolean | undefined): string;
280
+ (name: string): string;
281
+ };
282
+ cssVar: (object: Record<string, string>) => Record<string, string>;
283
+ cssVarName: (name: string) => string;
284
+ cssVarBlock: (object: Record<string, string>) => Record<string, string>;
285
+ cssVarBlockName: (name: string) => string;
286
+ };
287
+ nsInput: {
288
+ namespace: ComputedRef<string>;
289
+ b: (blockSuffix?: string) => string;
290
+ e: (element?: string) => string;
291
+ m: (modifier?: string) => string;
292
+ be: (blockSuffix?: string, element?: string) => string;
293
+ em: (element?: string, modifier?: string) => string;
294
+ bm: (blockSuffix?: string, modifier?: string) => string;
295
+ bem: (blockSuffix?: string, element?: string, modifier?: string) => string;
296
+ is: {
297
+ (name: string, state: boolean | undefined): string;
298
+ (name: string): string;
299
+ };
300
+ cssVar: (object: Record<string, string>) => Record<string, string>;
301
+ cssVarName: (name: string) => string;
302
+ cssVarBlock: (object: Record<string, string>) => Record<string, string>;
303
+ cssVarBlockName: (name: string) => string;
304
+ };
305
+ states: {
306
+ inputValue: string;
307
+ options: Map<any, any>;
308
+ cachedOptions: Map<any, any>;
309
+ optionValues: any[];
310
+ selected: any[];
311
+ selectionWidth: number;
312
+ collapseItemWidth: number;
313
+ selectedLabel: string;
314
+ hoveringIndex: number;
315
+ previousQuery: null;
316
+ inputHovering: boolean;
317
+ menuVisibleOnFocus: boolean;
318
+ isBeforeHide: boolean;
319
+ };
272
320
  isFocused: Ref<boolean>;
273
321
  expanded: Ref<boolean>;
274
322
  optionsArray: ComputedRef<any[]>;
275
- hoverOption: Ref<unknown>;
276
- selectSize: ComputedRef<"" | "default" | "small" | "large">;
323
+ hoverOption: Ref<any>;
324
+ selectSize: ComputedRef<"" | "small" | "default" | "large">;
277
325
  filteredOptionsCount: ComputedRef<number>;
278
- resetCalculatorWidth: () => void;
279
326
  updateTooltip: () => void;
280
327
  updateTagTooltip: () => void;
281
328
  debouncedOnInputChange: DebouncedFunc<() => void>;
282
- onInput: (event: Event) => void;
283
- deletePrevTag: (event: Event) => void;
284
- deleteTag: (event: Event, tag: any) => void;
285
- deleteSelected: (event: Event) => void;
329
+ onInput: (event: any) => void;
330
+ deletePrevTag: (e: any) => void;
331
+ deleteTag: (event: any, tag: any) => void;
332
+ deleteSelected: (event: any) => void;
286
333
  handleOptionSelect: (option: any) => void;
287
334
  scrollToOption: (option: any) => void;
288
335
  hasModelValue: ComputedRef<boolean>;
289
336
  shouldShowPlaceholder: ComputedRef<boolean>;
290
337
  currentPlaceholder: ComputedRef<string>;
291
- mouseEnterEventName: Ref<string | null>;
338
+ mouseEnterEventName: ComputedRef<"mouseenter" | null>;
292
339
  needStatusIcon: ComputedRef<boolean>;
293
340
  showClose: ComputedRef<boolean>;
294
- iconComponent: ComputedRef<string>;
295
- iconReverse: ComputedRef<boolean>;
296
- validateState: ComputedRef<string>;
297
- popupScroll: (data: {
298
- scrollTop: number;
299
- scrollLeft: number;
300
- }) => void;
301
- validateIcon: ComputedRef<unknown>;
341
+ iconComponent: ComputedRef< EpPropMergeType<(new (...args: any[]) => (string | Component) & {}) | (() => string | Component) | ((new (...args: any[]) => (string | Component) & {}) | (() => string | Component))[], unknown, unknown> | undefined>;
342
+ iconReverse: ComputedRef<string>;
343
+ validateState: ComputedRef<"" | "error" | "success" | "validating">;
344
+ validateIcon: ComputedRef<any>;
302
345
  showNewOption: ComputedRef<boolean>;
303
346
  updateOptions: () => void;
304
347
  collapseTagSize: ComputedRef<"default" | "small">;
305
348
  setSelected: () => void;
306
- selectDisabled: ComputedRef<boolean>;
349
+ selectDisabled: ComputedRef<boolean | undefined>;
307
350
  emptyText: ComputedRef<string | null>;
308
- handleCompositionStart: (e: Event) => void;
309
- handleCompositionUpdate: (e: Event) => void;
310
- handleCompositionEnd: (e: Event) => void;
351
+ handleCompositionStart: (event: CompositionEvent) => void;
352
+ handleCompositionUpdate: (event: CompositionEvent) => void;
353
+ handleCompositionEnd: (event: CompositionEvent) => void;
311
354
  onOptionCreate: (vm: SelectOptionProxy) => void;
312
355
  onOptionDestroy: (key: any, vm: SelectOptionProxy) => void;
313
356
  handleMenuEnter: () => void;
@@ -319,20 +362,28 @@ declare const _default: DefineComponent<ExtractPropTypes<{
319
362
  toggleMenu: () => void;
320
363
  selectOption: () => void;
321
364
  getValueKey: (item: any) => any;
322
- navigateOptions: (direction: string) => void;
365
+ navigateOptions: (direction: any) => void;
323
366
  dropdownMenuVisible: WritableComputedRef<boolean>;
324
- showTagList: ComputedRef<unknown[]>;
325
- collapseTagList: ComputedRef<unknown[]>;
326
- tagStyle: ComputedRef<unknown>;
327
- collapseTagStyle: ComputedRef<unknown>;
328
- popperRef: ComputedRef<unknown>;
367
+ showTagList: ComputedRef<any[]>;
368
+ collapseTagList: ComputedRef<any[]>;
369
+ popupScroll: (data: {
370
+ scrollTop: number;
371
+ scrollLeft: number;
372
+ }) => void;
373
+ tagStyle: ComputedRef<{
374
+ maxWidth: string;
375
+ }>;
376
+ collapseTagStyle: ComputedRef<{
377
+ maxWidth: string;
378
+ }>;
379
+ popperRef: ComputedRef<HTMLElement | undefined>;
329
380
  inputRef: Ref<HTMLInputElement | null>;
330
- tooltipRef: Ref<InstanceType< ElTooltip> | null>;
331
- tagTooltipRef: Ref<InstanceType< ElTooltip> | null>;
381
+ tooltipRef: Ref< TooltipInstance | null>;
382
+ tagTooltipRef: Ref< TooltipInstance | null>;
332
383
  prefixRef: Ref<HTMLElement>;
333
384
  suffixRef: Ref<HTMLElement>;
334
385
  selectRef: Ref<HTMLElement>;
335
- wrapperRef: Ref<HTMLElement>;
386
+ wrapperRef: ShallowRef<HTMLElement | undefined>;
336
387
  selectionRef: Ref<HTMLElement>;
337
388
  scrollbarRef: Ref<{
338
389
  handleScroll: () => void;
@@ -472,55 +523,98 @@ declare const _default: DefineComponent<ExtractPropTypes<{
472
523
  "onPopup-scroll"?: ((...args: any[]) => any) | undefined;
473
524
  }, {
474
525
  modelValue: ComputedRef<string | number | boolean | any[] | Record<string, any> | undefined>;
475
- selectedLabel: ComputedRef<any>;
526
+ selectedLabel: ComputedRef<string | string[]>;
476
527
  calculatorRef: ShallowRef<HTMLElement | undefined>;
477
528
  inputStyle: ComputedRef<{
478
529
  minWidth: string;
479
530
  }>;
480
531
  inputId: Ref<string | undefined>;
481
- contentId: Ref<string | undefined>;
482
- nsSelect: Ref<string | undefined>;
483
- nsInput: Ref<string | undefined>;
484
- states: Reactive<Record<string, any>>;
532
+ contentId: Ref<string>;
533
+ nsSelect: {
534
+ namespace: ComputedRef<string>;
535
+ b: (blockSuffix?: string) => string;
536
+ e: (element?: string) => string;
537
+ m: (modifier?: string) => string;
538
+ be: (blockSuffix?: string, element?: string) => string;
539
+ em: (element?: string, modifier?: string) => string;
540
+ bm: (blockSuffix?: string, modifier?: string) => string;
541
+ bem: (blockSuffix?: string, element?: string, modifier?: string) => string;
542
+ is: {
543
+ (name: string, state: boolean | undefined): string;
544
+ (name: string): string;
545
+ };
546
+ cssVar: (object: Record<string, string>) => Record<string, string>;
547
+ cssVarName: (name: string) => string;
548
+ cssVarBlock: (object: Record<string, string>) => Record<string, string>;
549
+ cssVarBlockName: (name: string) => string;
550
+ };
551
+ nsInput: {
552
+ namespace: ComputedRef<string>;
553
+ b: (blockSuffix?: string) => string;
554
+ e: (element?: string) => string;
555
+ m: (modifier?: string) => string;
556
+ be: (blockSuffix?: string, element?: string) => string;
557
+ em: (element?: string, modifier?: string) => string;
558
+ bm: (blockSuffix?: string, modifier?: string) => string;
559
+ bem: (blockSuffix?: string, element?: string, modifier?: string) => string;
560
+ is: {
561
+ (name: string, state: boolean | undefined): string;
562
+ (name: string): string;
563
+ };
564
+ cssVar: (object: Record<string, string>) => Record<string, string>;
565
+ cssVarName: (name: string) => string;
566
+ cssVarBlock: (object: Record<string, string>) => Record<string, string>;
567
+ cssVarBlockName: (name: string) => string;
568
+ };
569
+ states: {
570
+ inputValue: string;
571
+ options: Map<any, any>;
572
+ cachedOptions: Map<any, any>;
573
+ optionValues: any[];
574
+ selected: any[];
575
+ selectionWidth: number;
576
+ collapseItemWidth: number;
577
+ selectedLabel: string;
578
+ hoveringIndex: number;
579
+ previousQuery: null;
580
+ inputHovering: boolean;
581
+ menuVisibleOnFocus: boolean;
582
+ isBeforeHide: boolean;
583
+ };
485
584
  isFocused: Ref<boolean>;
486
585
  expanded: Ref<boolean>;
487
586
  optionsArray: ComputedRef<any[]>;
488
- hoverOption: Ref<unknown>;
489
- selectSize: ComputedRef<"" | "default" | "small" | "large">;
587
+ hoverOption: Ref<any>;
588
+ selectSize: ComputedRef<"" | "small" | "default" | "large">;
490
589
  filteredOptionsCount: ComputedRef<number>;
491
- resetCalculatorWidth: () => void;
492
590
  updateTooltip: () => void;
493
591
  updateTagTooltip: () => void;
494
592
  debouncedOnInputChange: DebouncedFunc<() => void>;
495
- onInput: (event: Event) => void;
496
- deletePrevTag: (event: Event) => void;
497
- deleteTag: (event: Event, tag: any) => void;
498
- deleteSelected: (event: Event) => void;
593
+ onInput: (event: any) => void;
594
+ deletePrevTag: (e: any) => void;
595
+ deleteTag: (event: any, tag: any) => void;
596
+ deleteSelected: (event: any) => void;
499
597
  handleOptionSelect: (option: any) => void;
500
598
  scrollToOption: (option: any) => void;
501
599
  hasModelValue: ComputedRef<boolean>;
502
600
  shouldShowPlaceholder: ComputedRef<boolean>;
503
601
  currentPlaceholder: ComputedRef<string>;
504
- mouseEnterEventName: Ref<string | null>;
602
+ mouseEnterEventName: ComputedRef<"mouseenter" | null>;
505
603
  needStatusIcon: ComputedRef<boolean>;
506
604
  showClose: ComputedRef<boolean>;
507
- iconComponent: ComputedRef<string>;
508
- iconReverse: ComputedRef<boolean>;
509
- validateState: ComputedRef<string>;
510
- popupScroll: (data: {
511
- scrollTop: number;
512
- scrollLeft: number;
513
- }) => void;
514
- validateIcon: ComputedRef<unknown>;
605
+ iconComponent: ComputedRef< EpPropMergeType<(new (...args: any[]) => (string | Component) & {}) | (() => string | Component) | ((new (...args: any[]) => (string | Component) & {}) | (() => string | Component))[], unknown, unknown> | undefined>;
606
+ iconReverse: ComputedRef<string>;
607
+ validateState: ComputedRef<"" | "error" | "success" | "validating">;
608
+ validateIcon: ComputedRef<any>;
515
609
  showNewOption: ComputedRef<boolean>;
516
610
  updateOptions: () => void;
517
611
  collapseTagSize: ComputedRef<"default" | "small">;
518
612
  setSelected: () => void;
519
- selectDisabled: ComputedRef<boolean>;
613
+ selectDisabled: ComputedRef<boolean | undefined>;
520
614
  emptyText: ComputedRef<string | null>;
521
- handleCompositionStart: (e: Event) => void;
522
- handleCompositionUpdate: (e: Event) => void;
523
- handleCompositionEnd: (e: Event) => void;
615
+ handleCompositionStart: (event: CompositionEvent) => void;
616
+ handleCompositionUpdate: (event: CompositionEvent) => void;
617
+ handleCompositionEnd: (event: CompositionEvent) => void;
524
618
  onOptionCreate: (vm: SelectOptionProxy) => void;
525
619
  onOptionDestroy: (key: any, vm: SelectOptionProxy) => void;
526
620
  handleMenuEnter: () => void;
@@ -532,20 +626,28 @@ declare const _default: DefineComponent<ExtractPropTypes<{
532
626
  toggleMenu: () => void;
533
627
  selectOption: () => void;
534
628
  getValueKey: (item: any) => any;
535
- navigateOptions: (direction: string) => void;
629
+ navigateOptions: (direction: any) => void;
536
630
  dropdownMenuVisible: WritableComputedRef<boolean>;
537
- showTagList: ComputedRef<unknown[]>;
538
- collapseTagList: ComputedRef<unknown[]>;
539
- tagStyle: ComputedRef<unknown>;
540
- collapseTagStyle: ComputedRef<unknown>;
541
- popperRef: ComputedRef<unknown>;
631
+ showTagList: ComputedRef<any[]>;
632
+ collapseTagList: ComputedRef<any[]>;
633
+ popupScroll: (data: {
634
+ scrollTop: number;
635
+ scrollLeft: number;
636
+ }) => void;
637
+ tagStyle: ComputedRef<{
638
+ maxWidth: string;
639
+ }>;
640
+ collapseTagStyle: ComputedRef<{
641
+ maxWidth: string;
642
+ }>;
643
+ popperRef: ComputedRef<HTMLElement | undefined>;
542
644
  inputRef: Ref<HTMLInputElement | null>;
543
- tooltipRef: Ref<InstanceType< ElTooltip> | null>;
544
- tagTooltipRef: Ref<InstanceType< ElTooltip> | null>;
645
+ tooltipRef: Ref< TooltipInstance | null>;
646
+ tagTooltipRef: Ref< TooltipInstance | null>;
545
647
  prefixRef: Ref<HTMLElement>;
546
648
  suffixRef: Ref<HTMLElement>;
547
649
  selectRef: Ref<HTMLElement>;
548
- wrapperRef: Ref<HTMLElement>;
650
+ wrapperRef: ShallowRef<HTMLElement | undefined>;
549
651
  selectionRef: Ref<HTMLElement>;
550
652
  scrollbarRef: Ref<{
551
653
  handleScroll: () => void;
@@ -2,7 +2,7 @@
2
2
  * Copyright (c) 2025, VTJ.PRO All rights reserved.
3
3
  * @name @vtj/ui
4
4
  * @author CHC chenhuachun1549@dingtalk.com
5
- * @version 0.11.9
5
+ * @version 0.11.11
6
6
  * @license <a href="https://vtj.pro/license.html">MIT License</a>
7
7
  */
8
- export declare const version = "0.11.9";
8
+ export declare const version = "0.11.11";