xframelib 0.5.0 → 0.5.1
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/README.md +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.css +141 -141
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
基于 VUE3+Hprose+Typescript 的前端框架
|
|
4
4
|
|
|
5
|
+
- v0.5.1 路由权限过滤只比较 path;修改返回权限结果判断错误问题
|
|
5
6
|
- v0.5.0 增加用户权限管理组;增加 CodeHelper 来辅助生成部分代码的方法;解决大文件下载路径传递、全屏时不传对象报错等问题;引入 axios 对象外部化 axios 库
|
|
6
7
|
- v0.4.9 解决 Global.User 对象赋值错误导致 0.4.8 无法登录的问题
|
|
7
8
|
- v0.4.8 解决 UserToken 里没有 appkey 信息;刷新 token 时丢失 appkey 信息(弃用该版本)
|
package/dist/index.cjs
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
>
|
|
10
10
|
<path d="M6.34292 7.75734L4.92871 9.17155L11.9998 16.2426L19.0708 9.17158L17.6566 7.75737L11.9998 13.4142L6.34292 7.75734Z"/>
|
|
11
11
|
</svg>
|
|
12
|
-
`}}});const io={class:"vcp__header-title"},oo={key:0,class:"vcp__header-icon"},ro=["innerHTML"],so={key:0,ref:"bodyRef",class:"vcp__body"},ao={ref:"bodyContentRef",class:"vcp__body-content"};function xt(e){return window.TouchEvent&&e instanceof TouchEvent}Ne.render=function(e,t,n,i,r,c){return g.openBlock(),g.createElementBlock("section",{ref:"panelRef",class:g.normalizeClass(["vcp",{"vcp--expanded":e.isExpanded,"vcp--expandable":e.body.hasContent}])},[g.createElementVNode("header",{class:"vcp__header",onClick:t[0]||(t[0]=(...y)=>e.toggle&&e.toggle(...y))},[g.createElementVNode("div",io,[g.renderSlot(e.$slots,"title")]),e.body.hasContent?(g.openBlock(),g.createElementBlock("div",oo,[g.renderSlot(e.$slots,"icon",{},()=>[g.createElementVNode("span",{innerHTML:e.toggleIcon},null,8,ro)])])):g.createCommentVNode("v-if",!0)]),g.createVNode(g.Transition,{"data-key":e.body.dataKey,name:"slide",onBeforeEnter:e.collapse,onEnter:e.expand,onBeforeLeave:e.expand,onLeave:e.collapse},{default:g.withCtx(()=>[e.isExpanded?(g.openBlock(),g.createElementBlock("div",so,[g.createElementVNode("div",ao,[g.renderSlot(e.$slots,"content")],512)],512)):g.createCommentVNode("v-if",!0)]),_:3},8,["data-key","onBeforeEnter","onEnter","onBeforeLeave","onLeave"])],2)},Ne.__scopeId="data-v-08c94cf8",Ne.__file="src/controls/collapsepanel/VCollapsiblePanel.vue";class Y{e;constructor(t){this.e=t}stopPropagation(){this.e.stopPropagation()}preventDefault(){this.e.preventDefault()}get clientX(){return xt(this.e)?(this.e.type==="touchend"?this.e.changedTouches:this.e.touches).item(0).clientX:this.e.clientX}get clientY(){return xt(this.e)?(this.e.type==="touchend"?this.e.changedTouches:this.e.touches).item(0).clientY:this.e.clientY}get clientCoord(){return new Tt(this.clientX,this.clientY)}static bindDown(t,n,i,r=!1){const c=w=>{n(new Y(w))},y=w=>{w.touches.length===1&&n(new Y(w)),w.touches.length>1&&i&&i(new Y(w))};return t.addEventListener("mousedown",c,r),t.addEventListener("touchstart",y,r),()=>{t.removeEventListener("mousedown",c,r),t.removeEventListener("touchstart",y,r)}}static bindMove(t,n,i=!1){const r=y=>{n(new Y(y))},c=y=>{y.touches.length===1&&n(new Y(y))};return t.addEventListener("mousemove",r,i),t.addEventListener("touchmove",c,i),()=>{t.removeEventListener("mousemove",r,i),t.removeEventListener("touchmove",c,i)}}static bindUp(t,n,i=!1){const r=y=>{n(new Y(y))},c=y=>{y.touches.length===0&&n(new Y(y))};return t.addEventListener("mouseup",r,i),t.addEventListener("touchend",c,i),()=>{t.removeEventListener("mouseup",r,i),t.removeEventListener("touchend",c,i)}}originalEvent({mouse:t,touch:n}){xt(this.e)?n&&n(this.e):t&&t(this.e)}}class Tt{x;y;constructor(t,n){this.x=t,this.y=n}clone(){return new Tt(this.x,this.y)}}class co{handle;container;options;unbindDown;unbindMove;unbindUp;constructor(t,n,i={}){this.handle=t,this.container=n,this.options=i,t&&(this.unbindDown=Y.bindDown(t,this.mousedown),t.classList.add("draggable-handle"))}teardown(){this.handle?.classList.remove("draggable-handle"),this.unbindDown&&this.unbindDown(),this.unbindUp&&this.unbindUp(),this.unbindMove&&this.unbindMove()}offsetX;offsetY;mousedown=t=>{if(t.preventDefault(),this.handle){const{left:n,top:i}=this.handle.getBoundingClientRect();this.offsetX=t.clientX-n,this.offsetY=t.clientY-i}this.options.onMoveStart&&this.options.onMoveStart(),this.unbindMove=Y.bindMove(document,this.mousemove),this.unbindUp=Y.bindUp(document,this.mouseup)};mousemove=t=>{this.container&&(this.container.style.left=t.clientX-this.offsetX+"px",this.container.style.top=t.clientY-this.offsetY+"px"),this.options.onMove&&this.options.onMove()};mouseup=t=>{this.options.onMoveEnd&&this.options.onMoveEnd(),this.unbindUp(),this.unbindMove(),this.unbindUp=this.unbindMove=void 0}}class uo{_group;onChange;zIndex;constructor(t,n){this._group=t,this.onChange=n,this.a(i=>i.push(this))}set group(t){this._group=t;const n=Oe(this._group),i=Oe(t);n.splice(n.indexOf(this),1),i.push(this),kn()}get group(){return this._group}unregister(){this.a(t=>t.splice(t.indexOf(this),1))}raise(){this.a(t=>{t.splice(t.indexOf(this),1),t.push(this)})}a(t){t(Oe(this._group)),kn()}}const Ue=new Map;function Oe(e){return Ue.has(e)||Ue.set(e,[]),Ue.get(e)}function En(e,t){return e>t?-En(t,e):e<0&&t>=0?1:e-t}function kn(){let e=0;for(const t of function(n){const i=[];return n.forEach((r,c)=>i.push(c)),i}(Ue).sort(En))for(const n of Oe(t))e!=n.zIndex&&(n.zIndex=e,n.onChange(e)),e++}function Et(e){if(e){const{width:t,height:n}=e.style;e.style.width="auto",e.style.height="auto";const i=je(e);return e.style.width=t,e.style.height=n,i}return{width:0,height:0,top:0,left:0,bottom:0,right:0}}function je(e){const t=e.getBoundingClientRect(),n=t.width,i=t.height,r=t.top,c=t.left;return{width:n,height:i,top:r,left:c,bottom:r+i,right:c+n}}class lo{container;options;handles;constructor(t,n){if(this.container=t,this.options=n,t&&n){this.handles=zn.map(b=>new b(t,this));const{width:i,height:r}=Et(t),c=n.maxWidth||window.innerWidth,y=n.maxHeight||window.innerHeight;let w=!1;(i<n.minWidth||i>c)&&(t.style.width=`${Mn(i,n.minWidth,c)}px`,w=!0),(r<n.minHeight||r>y)&&(t.style.height=`${Mn(r,n.minHeight,y)}px`,w=!0),w&&n.onResize&&n.onResize()}}teardown(){this.handles?.forEach(t=>t.teardown())}}const zn=[];class ue{container;helper;handle;handleSize=8;unbindDown;unbindMove;unbindUp;constructor(t,n){this.container=t,this.helper=n,this.handle=this.createHandleElement(),this.unbindDown=Y.bindDown(this.handle,this.mousedown)}teardown(){this.unbindDown(),this.unbindUp&&this.unbindUp(),this.unbindMove&&this.unbindMove(),this.handle.parentElement.removeChild(this.handle)}x0;y0;left0;top0;width0;height0;mousedown=t=>{t.preventDefault(),t.stopPropagation();const{left:n,top:i,width:r,height:c}=je(this.container);this.x0=t.clientX,this.y0=t.clientY,this.left0=n,this.top0=i,this.width0=r,this.height0=c,this.calcSafeBoundaries(),this.helper.options&&this.helper.options.onResizeStart&&this.helper.options.onResizeStart(),this.unbindMove=Y.bindMove(document,this.mousemove),this.unbindUp=Y.bindUp(document,this.mouseup)};minLeft;maxLeft;minRight;maxRight;minTop;maxTop;minBottom;maxBottom;calcSafeBoundaries(){if(!this.helper.options)return;const{left:t,top:n,right:i,bottom:r}=je(this.container),c=this.helper.options,y=c.maxWidth||window.innerWidth,w=c.maxHeight||window.innerHeight;this.minLeft=Math.max(i-y,0),this.maxLeft=i-c.minWidth,this.minRight=t+c.minWidth,this.maxRight=Math.min(t+y,window.innerWidth),this.minTop=Math.max(r-w,0),this.maxTop=r-c.minHeight,this.minBottom=n+c.minHeight,this.maxBottom=Math.min(n+w,window.innerHeight)}mousemove=t=>{t.preventDefault(),t.stopPropagation(),this.setPosition(t),this.fixPosition(),this.helper.options&&this.helper.options.onResize&&this.helper.options.onResize()};fixPosition(){const{width:t,height:n,left:i,top:r,right:c,bottom:y}=je(this.container),w=this.helper.options;w&&(i<this.minLeft?(this.container.style.width=t+i-this.minLeft+"px",this.container.style.left=`${this.minLeft}px`):i>this.maxLeft?(this.container.style.width=`${w.minWidth}px`,this.container.style.left=`${this.maxLeft}px`):c<this.minRight?this.container.style.width=`${w.minWidth}px`:c>this.maxRight&&(this.container.style.width=this.maxRight-i+"px"),r<this.minTop?(this.container.style.height=n+r-this.minTop+"px",this.container.style.top=`${this.minTop}px`):r>this.maxTop?(this.container.style.height=`${w.minHeight}px`,this.container.style.top=`${this.maxTop}px`):y<this.minBottom?this.container.style.height=`${w.minHeight}px`:y>this.maxBottom&&(this.container.style.height=this.maxBottom-r+"px"))}mouseup=t=>{t.preventDefault(),t.stopPropagation(),this.helper.options&&this.helper.options.onResizeEnd&&this.helper.options.onResizeEnd(),this.unbindUp(),this.unbindMove(),this.unbindUp=this.unbindMove=void 0};createHandleElement(){const t=document.createElement("div"),n=t.style;return n.position="absolute",this.applyStyle(n),this.container.appendChild(t),t}}function Mn(e,t,n){return e<t?t:e>n?n:e}zn.push(class extends ue{setPosition(e){this.container.style.width=this.width0+e.clientX-this.x0+"px",this.container.style.height=this.height0+e.clientY-this.y0+"px"}applyStyle(e){e.width=2*this.handleSize+"px",e.height=2*this.handleSize+"px",e.right=-this.handleSize+"px",e.bottom=-this.handleSize+"px",e.cursor="nwse-resize"}},class extends ue{setPosition(e){this.container.style.height=this.height0+e.clientY-this.y0+"px"}applyStyle(e){e.right=`${this.handleSize}px`,e.left=`${this.handleSize}px`,e.height=2*this.handleSize+"px",e.bottom=-this.handleSize+"px",e.cursor="ns-resize"}},class extends ue{setPosition(e){this.container.style.left=this.left0+e.clientX-this.x0+"px",this.container.style.width=this.width0-(e.clientX-this.x0)+"px",this.container.style.height=this.height0+e.clientY-this.y0+"px"}applyStyle(e){e.left=-this.handleSize+"px",e.bottom=-this.handleSize+"px",e.width=2*this.handleSize+"px",e.height=2*this.handleSize+"px",e.cursor="nesw-resize"}},class extends ue{setPosition(e){this.container.style.left=this.left0+e.clientX-this.x0+"px",this.container.style.width=this.width0-(e.clientX-this.x0)+"px"}applyStyle(e){e.left=-this.handleSize+"px",e.bottom=`${this.handleSize}px`,e.width=2*this.handleSize+"px",e.top=`${this.handleSize}px`,e.cursor="ew-resize"}},class extends ue{setPosition(e){this.container.style.left=this.left0+e.clientX-this.x0+"px",this.container.style.width=this.width0-(e.clientX-this.x0)+"px",this.container.style.top=this.top0+e.clientY-this.y0+"px",this.container.style.height=this.height0-(e.clientY-this.y0)+"px"}applyStyle(e){e.left=-this.handleSize+"px",e.top=-this.handleSize+"px",e.width=2*this.handleSize+"px",e.height=2*this.handleSize+"px",e.cursor="nwse-resize"}},class extends ue{setPosition(e){this.container.style.top=this.top0+e.clientY-this.y0+"px",this.container.style.height=this.height0-(e.clientY-this.y0)+"px"}applyStyle(e){e.left=`${this.handleSize}px`,e.right=`${this.handleSize}px`,e.height=2*this.handleSize+"px",e.top=-this.handleSize+"px",e.cursor="ns-resize"}},class extends ue{setPosition(e){this.container.style.top=this.top0+e.clientY-this.y0+"px",this.container.style.height=this.height0-(e.clientY-this.y0)+"px",this.container.style.width=this.width0+e.clientX-this.x0+"px"}applyStyle(e){e.right=-this.handleSize+"px",e.top=-this.handleSize+"px",e.height=2*this.handleSize+"px",e.width=2*this.handleSize+"px",e.cursor="nesw-resize"}},class extends ue{setPosition(e){this.container.style.width=this.width0+e.clientX-this.x0+"px"}applyStyle(e){e.right=-this.handleSize+"px",e.top=`${this.handleSize}px`,e.bottom=`${this.handleSize}px`,e.width=2*this.handleSize+"px",e.cursor="ew-resize"}});var We=g.defineComponent({name:"",props:{disabled:{type:Boolean,default:!1},windowStyle:{type:Object,required:!0}},components:{},setup(e){const t=g.ref(!1),n=g.ref(!1);return{hover:t,active:n,style:function(){let i=e.windowStyle.button;return t.value&&(i={...i,...this.windowStyle.buttonHover}),n.value&&(i={...i,...this.windowStyle.buttonActive}),i},mouseup:function(i){this.active&&this.$emit("click")},mousedown:function(i){i.preventDefault(),n.value=!0;const r=Y.bindUp(document,()=>{n.value=!1,r()})}}}});const ho=["disabled"];We.render=function(e,t,n,i,r,c){return g.openBlock(),g.createElementBlock("div",{class:"btn",style:g.normalizeStyle(e.style()),onMouseenter:t[0]||(t[0]=y=>e.hover=!0),onMouseleave:t[1]||(t[1]=y=>e.hover=!1),onMousedown:t[2]||(t[2]=g.withModifiers((...y)=>e.mousedown&&e.mousedown(...y),["stop"])),onTouchstart:t[3]||(t[3]=g.withModifiers((...y)=>e.mousedown&&e.mousedown(...y),["stop"])),onMouseup:t[4]||(t[4]=(...y)=>e.mouseup&&e.mouseup(...y)),onTouchend:t[5]||(t[5]=(...y)=>e.mouseup&&e.mouseup(...y)),disabled:e.disabled},[g.renderSlot(e.$slots,"default")],44,ho)},We.__scopeId="data-v-71662210",We.__file="src/controls/vuewindow/window/Button.vue";const kt=new Set;function _n(e){return e!==null?parseFloat(e):0}function Fe(e){const t=window.getComputedStyle(e);return{width:Math.ceil([t.paddingLeft,t.width,t.paddingRight].map(_n).reduce((n,i)=>n+i)),height:Math.ceil([t.paddingTop,t.height,t.paddingBottom].map(_n).reduce((n,i)=>n+i))}}class Ln{width;height;constructor(t,n){this.width=t,this.height=n}}function fo(e){const t=e.windowEl;if(t){const n=parseFloat(t.style.left||"NaN"),i=parseFloat(t.style.top||"NaN");if(!isNaN(n)&&!isNaN(i))return{left:n,top:i}}return null}function po(e,t,n,i){const r=e-n,c=t-i;return r*r+c*c}window.addEventListener("resize",e=>{kt.forEach(t=>{t?.fixPosition()})});const $e=[];var He=g.defineComponent({name:"Window",props:{windowStyle:{type:Object,required:!0},isOpen:{type:Boolean,required:!1,default:!0},title:{type:String,required:!0,default:""},closeButton:{type:Boolean,required:!1,default:!0},resizable:{type:Boolean,required:!1,default:!1},isScrollable:{type:Boolean,required:!1,default:!1},padding:{type:Number,required:!1,default:8},activateWhenOpen:{type:Boolean,required:!1,default:!0},positionHint:{type:String,required:!1,default:""},zGroup:{type:Number,required:!1,default:1},overflow:{type:String,required:!1,default:"visible"},minWidth:{type:Number,required:!1,default:1},minHeight:{type:Number,required:!1,default:0},maxWidth:{type:Number,required:!1,default:0},maxHeight:{type:Number,required:!1,default:0},height:{type:Number,required:!1},width:{type:Number,required:!1},top:{type:Number,required:!1},left:{type:Number,required:!1}},components:{myButton:We},setup(e,{emit:t}){const n=g.getCurrentInstance();if(!n)return;const{proxy:i}=n;let r=0,c,y,w;const b=g.ref(e.isOpen),x=()=>{$e.push(i),w=new uo(e.zGroup,k),e.isOpen&&(g.nextTick(()=>{r++==0&&(h(i),function(){const B=_.value,{width:A,height:O}=Et(B);let j,W;if(e.left!==void 0!=(e.top!==void 0))throw new Error("Either of left or top is specified. Both must be set or not set.");if(typeof e.left=="number")j=e.left,W=e.top;else{const H=e.positionHint||"auto";switch(H){case"auto":{let q=20,X=50,Q=0;do{if($e.every(J=>{if(!J.isOpen||i==J)return!0;const ne=fo(J);if(ne==null)return!0;const{left:Ve,top:Ke}=ne;return po(Ve,Ke,q,X)>16}))break;q=(q+40)%(window.innerWidth-200),X=(X+40)%(window.innerHeight-200)}while(++Q<100);j=q,W=X}break;case"center":j=(window.innerWidth-A)/2,W=(window.innerHeight-O)/2,console.log(j,W,window.innerWidth,window.innerHeight,"111111");break;default:try{const q=H.split("/").map(Number);if(q.length!=2)throw null;const[X,Q]=q;if(!isFinite(X)||!isFinite(Q))throw null;j=X>=0?X:window.innerWidth-A+X,W=Q>=0?Q:window.innerHeight-O+Q}catch{throw new Error(`invalid position string: ${H}`)}}}B&&(B.style.left=`${j}px`,B.style.top=`${W}px`)}()),e.resizable&&l(),T(),c=new co(R.value,_.value,{onMove:()=>T(),onMoveStart:()=>t("move-start"),onMoveEnd:()=>t("move-end")}),e.resizable&&function(){const{height:B}=Et(R.value);y=new lo(_.value,{onResize:()=>l(),onResizeStart:()=>t("resize-start"),onResizeEnd:()=>t("resize-end"),minWidth:e.minWidth,minHeight:e.minHeight+B,maxWidth:e.maxWidth,maxHeight:e.maxHeight?e.maxHeight+B:void 0})}()}),e.activateWhenOpen&&P()),kt.add(i)};function k(B){S.value.zIndex=`${B}`}const _=g.ref(null),R=g.ref(null),N=g.ref(null);function P(){w.raise(),t("activate")}const S=g.ref({...e.windowStyle.window,zIndex:"auto",overflow:e.overflow}),u=g.computed(()=>e.windowStyle.titlebar),d=g.computed(()=>{const B={...e.windowStyle.content};return e.resizable?B.padding="0":e.padding!=null&&(B.padding=`${e.padding}px`),e.isScrollable&&(B.overflow="auto"),B});function h(B){const{width:A,height:O,top:j,left:W}=B,H=_;if(H&&A!=null&&(H.value.style.width=`${A}px`),O!=null){const q=R.value;if(q){const X=Fe(q).height;H.value.style.height=`${O+X}px`}}H&&W!=null&&(H.value.style.left=`${W}px`),H&&j!=null&&(H.value.style.top=`${j}px`)}function l(B=!0){const A=_.value,O=R.value,j=N.value;if(j&&A&&O){const{width:W,height:H}=Fe(j),{width:q,height:X}=Fe(A),Q=Fe(O).height,J=q-(j.offsetWidth-W),ne=X-Q-(j.offsetHeight-H);j.style.width=`${J}px`,j.style.height=`${ne}px`,p(),t("resize",new Ln(J,ne)),B&&(t("update:width",J),t("update:height",ne))}}function p(){const B=_.value;if(B){const A=B.getBoundingClientRect();A.left<0&&(S.value.left="0px"),A.top<0&&(S.value.top="0px"),A.right>window.innerWidth&&(S.value.left=window.innerWidth-A.width+"px"),A.bottom>window.innerHeight&&(S.value.top=window.innerHeight-A.height+"px")}}function T(B=!0){p();const A=_.value;if(A){const{left:O,top:j}=A.getBoundingClientRect();B&&(t("update:left",O),t("update:top",j))}}return g.watch(()=>e.isOpen,B=>{b.value=B}),g.watch(()=>e.zGroup,B=>{w.group=B}),g.watch(()=>e.width,B=>{h({width:B}),l(!1)}),g.watch(()=>e.height,B=>{h({height:B}),l(!1)}),g.onMounted(()=>{x()}),g.onBeforeUnmount(()=>{kt.delete(this),w.unregister(),y&&y.teardown(),c&&c.teardown(),$e.splice($e.indexOf(i),1)}),{isOpen:b,windowEl:_,titlebar:R,content:N,activate:P,styleWindow:S,styleTitlebar:u,styleContent:d,closeButtonClick:function(){b.value=!1,t("closebuttonclick")}}}});const mo={class:"title"},go=g.createTextVNode("\xD7");var Bn,le;He.render=function(e,t,n,i,r,c){const y=g.resolveComponent("myButton");return g.openBlock(),g.createBlock(g.Transition,{name:"fade",onAfterLeave:t[2]||(t[2]=w=>e.$emit("close")),onAfterEnter:t[3]||(t[3]=w=>e.$emit("open"))},{default:g.withCtx(()=>[g.withDirectives(g.createElementVNode("div",{class:"window",style:g.normalizeStyle(e.styleWindow),ref:"windowEl",onMousedown:t[0]||(t[0]=(...w)=>e.activate&&e.activate(...w)),onTouchstart:t[1]||(t[1]=(...w)=>e.activate&&e.activate(...w))},[g.createElementVNode("div",{class:"titlebar",style:g.normalizeStyle(e.styleTitlebar),ref:"titlebar"},[g.createElementVNode("div",mo,[e.$slots.title?g.renderSlot(e.$slots,"title",{key:0}):(g.openBlock(),g.createElementBlock(g.Fragment,{key:1},[g.createTextVNode(g.toDisplayString(e.title),1)],2112))]),e.closeButton?(g.openBlock(),g.createBlock(y,{key:0,windowStyle:e.windowStyle,onClick:e.closeButtonClick},{default:g.withCtx(()=>[go]),_:1},8,["windowStyle","onClick"])):g.createCommentVNode("v-if",!0)],4),g.createElementVNode("div",{class:"content",style:g.normalizeStyle(e.styleContent),ref:"content"},[g.renderSlot(e.$slots,"default")],4)],36),[[g.vShow,e.isOpen]])]),_:3})},He.__file="src/controls/vuewindow/window/index.vue",(le=Bn||(Bn={}))[le.StyleBlack=0]="StyleBlack",le[le.StyleWhite=1]="StyleWhite",le[le.StyleMetal=2]="StyleMetal",le[le.StyleGrayblue=3]="StyleGrayblue";const vo=He;var Z;exports.LayoutContainerEnum=void 0,(Z=exports.LayoutContainerEnum||(exports.LayoutContainerEnum={}))[Z.top=0]="top",Z[Z.bottom=1]="bottom",Z[Z.centerBack=2]="centerBack",Z[Z.centerMain=3]="centerMain",Z[Z.centerFront=4]="centerFront",Z[Z.left=5]="left",Z[Z.right=6]="right";class yo{layoutState;widgetCofig;layoutMap=new Map;preConditionMap=new Map;widgetsLoadedSet=new Set;constructor(t,n){this.layoutState=t,this.widgetCofig=n,this.widgetCofig.forEach(i=>{if(i.afterid)if(this.preConditionMap.has(i.afterid))this.preConditionMap.get(i.afterid)?.add(i);else{const r=new Set;r.add(i),this.preConditionMap.set(i.afterid,r)}})}getWidgetConfig(){return this.widgetCofig}preloadWidgets(){this.widgetCofig.filter(t=>t.preload&&!t.afterid).forEach(t=>{this._loadWidget(t,this.loadOtherDependenceWidgets.bind(this))})}loadWidget(t){if(!t)return;let n;de(t)?n=t:Te(t)&&(n=this.widgetCofig.find(i=>i.id===t)),n&&this._loadWidget(n,this.loadOtherDependenceWidgets.bind(this))}loadOtherDependenceWidgets(t){this.preConditionMap.has(t)&&this.preConditionMap.get(t)?.forEach(n=>{n.preload&&this._loadWidget(n)})}_loadWidget(t,n){if(!this.widgetsLoadedSet.has(t.id))return t.component().then(i=>{if(i.default){const r=g.markRaw(i.default);this.getContainerComponents(t.container).value.set(t.id,r),this.widgetsLoadedSet.add(t.id),I.EventBus.emit(G.WidgetLoadedEvent,t.id),n&&n(t.id)}})}hasDependentWidgets(t){let n=!1;if(this.preConditionMap.has(t)){const i=this.preConditionMap.get(t);if(i){for(const r of i)if(this.isWidgetLoaded(r.id)){n=!0;break}}}return n}unloadWidget(t){if(!t||!this.isWidgetLoaded(t))return;const n=this.widgetCofig.find(i=>i.id===t);if(n){if(this.preConditionMap.has(t)){const i=this.preConditionMap.get(t);if(i)for(const r of i)this.unloadWidget(r.id)}this.getContainerComponents(n.container).value.delete(t),this.widgetsLoadedSet.delete(t),I.EventBus.emit(G.WidgetUnLoadedEvent,t)}}isWidgetLoaded(t){return this.widgetsLoadedSet.has(t)}splitTwoContainer(t=!1){const n=this.layoutState.centerMainContainer,i=this.layoutState.centerBackContainer;t?(n&&(n.style.left="0",n.style.width="100%"),i&&(i.style.width="100%")):(n&&(n.style.left="50%",n.style.width="50%"),i&&(i.style.width="50%"))}getLayoutContainer(t){switch(t){case exports.LayoutContainerEnum.top:return this.layoutState.topContainer;case exports.LayoutContainerEnum.bottom:return this.layoutState.bottomContainer;case exports.LayoutContainerEnum.left:return this.layoutState.leftContainer;case exports.LayoutContainerEnum.right:return this.layoutState.rightContainer;case exports.LayoutContainerEnum.centerBack:return this.layoutState.centerBackContainer;case exports.LayoutContainerEnum.centerMain:return this.layoutState.centerMainContainer;case exports.LayoutContainerEnum.centerFront:return this.layoutState.centerFrontContainer}}changeContainerVisible(t,n=!1){const i=this.getLayoutContainer(t);i&&(i.style.visibility=n?"visible":"hidden")}changeWidgetVisible(t,n=!1){const i=this.getWidgetComponent(t);i&&I.EventBus.emit(G.WidgetVisibleChanged,{id:t,name:i.name,visible:n})}getWidgetComponent(t){if(this.widgetsLoadedSet.has(t)){const n=this.widgetCofig.find(i=>i.id===t);if(n)return this.getContainerComponents(n.container).value.get(t)}}getWigetItem(t){return this.widgetCofig.find(n=>n.id===t)}getGroupWigetItems(t){return this.widgetCofig.filter(n=>n.group===t)}getContainerComponents(t){if(this.layoutMap.has(t))return this.layoutMap.get(t);{const n=g.ref(new Map);return this.layoutMap.set(t,n),n}}addContainerComponent(t,n){}}var zt=g.defineComponent({name:"MainContainer",props:{widgetConfig:{type:Array,required:!0,default:()=>[]},layoutStyle:{type:Object}},components:{},setup(e,{attrs:t,slots:n,emit:i}){const r=g.reactive({topContainer:void 0,centerBackContainer:void 0,centerMainContainer:void 0,centerFrontContainer:void 0,bottomContainer:void 0,leftContainer:void 0,rightContainer:void 0});if(!I.LayoutManager){const N=new yo(r,e.widgetConfig);I.LayoutManager=N,N.preloadWidgets()}const c=_(exports.LayoutContainerEnum.top),y=_(exports.LayoutContainerEnum.centerBack),w=_(exports.LayoutContainerEnum.centerFront),b=_(exports.LayoutContainerEnum.left),x=_(exports.LayoutContainerEnum.right),k=_(exports.LayoutContainerEnum.bottom);function _(N){return I.LayoutManager?.getContainerComponents(N)}const R=g.computed(()=>e.layoutStyle);return{...g.toRefs(r),topContainerComponents:c,centerbackComponents:y,centerfrontComponents:w,leftContainerComponents:b,rightContainerComponents:x,bottomContainerComponents:k,containerStyle:R}}});const wo={ref:"topContainer",class:"topContainer"},bo={ref:"centerBackContainer",class:"centerdiv backContainer"},So={ref:"centerMainContainer",class:"centerdiv mainContainer"},Co={ref:"centerFrontContainer",class:"centerdiv centerContainer"},xo={ref:"leftContainer",class:"leftContainer"},Eo={ref:"rightContainer",class:"rightContainer"},ko={ref:"bottomContainer",class:"bottomContainer"};zt.render=function(e,t,n,i,r,c){const y=g.resolveComponent("router-view");return g.openBlock(),g.createElementBlock("div",{class:"layoutContainer",style:g.normalizeStyle(e.containerStyle)},[g.createElementVNode("div",wo,[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(e.topContainerComponents,([w,b])=>(g.openBlock(),g.createBlock(g.resolveDynamicComponent(b),{key:w}))),128))],512),g.createElementVNode("div",null,[g.createCommentVNode(" \u5E95\u5C42-\u4E3B\u5BB9\u5668 "),g.createElementVNode("div",bo,[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(e.centerbackComponents,([w,b])=>(g.openBlock(),g.createBlock(g.resolveDynamicComponent(b),{key:w}))),128))],512),g.createCommentVNode(" \u4E3B\u8981\u5BB9\u5668 "),g.createElementVNode("div",So,[g.createVNode(y,null,{default:g.withCtx(({Component:w})=>[(g.openBlock(),g.createBlock(g.resolveDynamicComponent(w)))]),_:1})],512),g.createCommentVNode(" \u6D6E\u52A8-\u4E3B\u5BB9\u5668 "),g.createElementVNode("div",Co,[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(e.centerfrontComponents,([w,b])=>(g.openBlock(),g.createBlock(g.resolveDynamicComponent(b),{key:w}))),128))],512),g.createElementVNode("div",xo,[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(e.leftContainerComponents,([w,b])=>(g.openBlock(),g.createBlock(g.resolveDynamicComponent(b),{key:w}))),128))],512),g.createElementVNode("div",Eo,[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(e.rightContainerComponents,([w,b])=>(g.openBlock(),g.createBlock(g.resolveDynamicComponent(b),{key:w}))),128))],512)]),g.createElementVNode("div",ko,[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(e.bottomContainerComponents,([w,b])=>(g.openBlock(),g.createBlock(g.resolveDynamicComponent(b),{key:w}))),128))],512)],4)},zt.__file="src/controls/layoutcontainer/layout.vue";const qe=new Map,Mt=new Map;let Ge;const zo={getDefaultClient(){if(Ge||(Ge=new be(SysConfig.DefaultHproseAPI)),!Ge)throw Error("HproseProxy\u5BF9\u8C61\u4E3A\u7A7A");return Ge},registerHprose(e,t){const n=Mt.get(e);if(!n){const i=new be(t);qe.set(e,i)}return n},getHprose:e=>Mt?.get(e),getProxyHprose:e=>qe.get(e),unregisterHprose(e){qe.get(e)&&(Mt.delete(e),qe.delete(e))}},fe={Login:"/api/Login/Login",CheckLogin:"\u200B/api\u200B/Check\u200B/Login",Logout:"/api/Check/ExitLogin",ChangePWD:"/api/UserManager/UpdateUserPWD",RefreshToken:"/api/Check/RefreshToken",CheckToken:"/api/Check/CheckToken"},Mo=I.Config.ServiceURL.LoginAuthURL;function _t(){const e=cn();e&&te(fe.RefreshToken,Mo,{refreshToken:e}).then(t=>{Xe(t.data)})}function Rn(e){I.User||(I.User={id:e.id,name:e.name,issystem:e.issystem,issecurity:e.issecurity,appkey:e.appkey,role:e.role,doubleToken:{accessToken:{tokenContent:e.token,expires:e.expire},refreshToken:{tokenContent:e.refresh,expires:e.expire}}});const t=new Date().getTime(),n=new Date(e.expire).getTime()-t;n>0&&(n<=4e3?_t():setTimeout(_t,n-4e3))}function Xe(e){I.User&&(I.User.doubleToken=e);const t=new Date().getTime(),n=new Date(e.accessToken.expires).getTime()-t;if(n>0&&I.User){let i=he();if(!i){const r=I.User.doubleToken;i={id:I.User.id,name:I.User.name,token:r?r.accessToken.tokenContent:"",expire:r?r.accessToken.expires:"",refresh:r?r.accessToken.tokenContent:"",issystem:I.User.issystem,issecurity:I.User.issecurity,appkey:I.User.appkey,role:I.User.role}}i.token=e.accessToken.tokenContent,i.expire=e.accessToken.expires,i.refresh=e.refreshToken.tokenContent,ce.set("access_token",i,n/1e3),Rn(i)}else ce.remove("access_token")}function Lt(e){I.User=e}const Ce=I.Config.ServiceURL.LoginAuthURL,Bt=new Le("",sessionStorage);function In(){return Bt.get("ROLE_SYSTEM_RIGHT")}function Pn(e){Bt.set("ROLE_SYSTEM_RIGHT",e)}function Tn(){Bt.remove("ROLE_SYSTEM_RIGHT")}const Rt=[],It=[],Pt=[];function xe(){return In()}function An(e,t){const n={...e};return n.meta||(n.meta={}),t.index!=null&&(n.meta.index=t.index),t.title!=null&&(n.meta.title=t.title),e.children&&(n.children=[],t.children&&t.children.forEach(i=>{const r=e.children?.find(c=>c.path===i.path);if(r){const c=An(r,i);c&&n.children?.push(c)}})),n}function Dn(e,t){const n={...e};return t.index!=null&&(n.index=t.index),e.children&&(n.children=[],t.children&&t.children.forEach(i=>{const r=e.children?.find(c=>c.name===i.name);if(r){const c=Dn(r,i);c&&n.children?.push(c)}})),n}exports.BigFileDownload=class{fileID;downloadURL;ChunkUnitM=1048576;chunkByteSize;totalChunks=1;currentDB;keys;fileMetaData=null;finishNum=0;eventTarget;cancelSource;isStarting=!1;fileName;cacheSize=6;requestTimeout=6e4;constructor(e,t,n=3,i=6,r=6e4){this.fileID=e,this.downloadURL=t,this.chunkByteSize=n*this.ChunkUnitM,this.eventTarget=lt(),this.initIndexDB(),i>=3&&(this.cacheSize=i),r>this.requestTimeout&&(this.requestTimeout=r)}on(e,t){this.eventTarget.on(e,t)}dispatch(e,t){this.eventTarget.emit(e,t)}dispatchError(e){this.eventTarget.emit("error",e)}dispatchInfo(e){this.eventTarget.emit("info",e)}async queryDownloadFileMeta(e,t="",n){this.dispatchInfo("\u5F00\u59CB\u83B7\u53D6\u6587\u4EF6\u4FE1\u606F");const i=await te(t,e,n);let r=null;return i&&i.status===200&&(r=i.data),r}async getIFileMeta(){if(this.fileMetaData===null){const e=await this.currentDB?.getItem("fileinfo");this.fileMetaData=e||null}return this.fileMetaData}initIndexDB(){this.currentDB=Pe.createInstance({name:this.fileID,driver:Pe.INDEXEDDB})}async init(e){if(this.finishNum=0,e){const t="fileinfo";this.fileMetaData={id:e.id,name:e.name,length:e.length,downloadID:e.downloadID,chunkSize:this.chunkByteSize},this.fileName=e.name,this.currentDB?.setItem(t,this.fileMetaData)}if(this.fileMetaData!=null){const t=this.fileMetaData.chunkSize;t!=null&&t>0&&(this.chunkByteSize=t)}this.fileMetaData&&(this.totalChunks=Math.ceil(this.fileMetaData.length/this.chunkByteSize)),this.dispatchInfo("\u5B8C\u6210\u521D\u59CB\u5316\u6587\u4EF6\u4FE1\u606F\uFF0C\u603B\u5206\u7247\uFF1A"+this.totalChunks),this.currentDB&&(this.keys=await this.currentDB.keys())}getTotalChunks(){return this.totalChunks}pause(){this.cancelSource&&this.isStarting&&(this.cancelSource.cancel(),this.isStarting=!1),this.dispatchInfo("\u5DF2\u6682\u505C\u4E0B\u8F7D\u4EFB\u52A1")}restart(){this.dispatchInfo("\u6B63\u5728\u91CD\u542F\u4E0B\u8F7D\u4EFB\u52A1"),this.download()}delete(){this.cancelSource&&this.cancelSource.cancel(),Pe.dropInstance({name:this.fileID}),this.currentDB=void 0,this.keys&&(this.keys.length=0,this.keys=void 0),this.finishNum=0,this.downloadProgress(),this.outputProgress(0),this.dispatchInfo("\u5DF2\u5220\u9664\u4E0B\u8F7D\u4EFB\u52A1")}sleep(e){return new Promise(t=>setTimeout(t,e))}async download(e,t){let n=e;if(!n&&this.downloadURL&&(n=this.downloadURL),!n)throw Error("\u4E0B\u8F7DURL\u4E0D\u80FD\u4E3A\u7A7A!");this.currentDB||this.initIndexDB();const i=I.Axios.CancelToken;this.cancelSource=i.source(),this.isStarting=!0;const r={key:this.fileMetaData?.downloadID};let c=0;const y=this.cacheSize;let w=0;for(let b=0;b<this.totalChunks;b++){if(this.keys&&this.keys?.indexOf(b.toString())>=0){c++,c>this.finishNum&&(this.finishNum=c,this.downloadProgress());continue}const x=b*this.chunkByteSize;let k=x+this.chunkByteSize-1;this.fileMetaData&&k>this.fileMetaData.length&&(k=this.fileMetaData.length-1);const _={range:`bytes=${x}-${k}`};for(;w>=y;)await this.sleep(200);const R=b.toString();this.dispatchInfo(`\u5F00\u59CB\u4E0B\u8F7D\u5206\u7247${b+1}/${this.totalChunks}`),w++,te(n,t,r,_,"arraybuffer",this.cancelSource?.token,this.requestTimeout).then(async N=>{const P=N.data;w--,await this.currentDB?.setItem(R,P),c++,c>this.finishNum&&(this.finishNum=c,this.downloadProgress());const S=parseInt(R)+1;this.dispatchInfo(`\u5B8C\u6210\u4E0B\u8F7D\u5206\u7247${S}/${this.totalChunks}`),this.savefile()}).catch(N=>{w--;const P=parseInt(R)+1;this.dispatchError(`\u4E0B\u8F7D\u7B2C${P}\uFF09\u4E2A\u5206\u7247\u5185\u5BB9\u5931\u8D25\uFF01`)})}this.finishNum===this.totalChunks&&this.savefile()}downloadProgress(){const e=100*this.finishNum/this.totalChunks;this.dispatch("downloadProgress",e)}outputProgress(e){const t=100*e/this.totalChunks;this.dispatch("saveProgress",t)}async savefile(){if(this.finishNum===this.totalChunks){if(!this.fileName)return void this.dispatchError("\u4E0B\u8F7D\u9519\u8BEF\uFF1A\u6587\u4EF6\u540D\u4E3A\u7A7A!");this.dispatchInfo("\u5F00\u59CB\u4FDD\u5B58\u4E0B\u8F7D\u6587\u4EF6:"+this.fileName);const e=Qi.createWriteStream(this.fileName).getWriter();let t=0;for(let n=0;n<this.totalChunks;n++){const i=n.toString();let r=await this.currentDB?.getItem(i);if(r||(r=await this.currentDB?.getItem(i)),!r)return void this.dispatchError(`\u8F93\u51FA\u5206\u7247\u7B2C${n+1}\uFF09\u4E2A\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u9519\u8BEF\u9000\u51FA\uFF01`);let c=new Response(r).body;if(c===null)return void this.dispatchError(`\u8F93\u51FA\u5206\u7247\u7B2C${n+1}\uFF09\u4E2A\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u9519\u8BEF\u9000\u51FA\uFF01`);const y=c.getReader();for(;;){const{done:w,value:b}=await y.read();if(w)break;await e.write(b)}t++,this.outputProgress(t),this.dispatchInfo(`\u5B8C\u6210\u7B2C${n+1}\u4E2A\u5206\u7247\u8F93\u51FA`)}e.close(),Pe.dropInstance({name:this.fileID}),this.dispatch("success"),this.isStarting=!1,this.dispatchInfo("\u5B8C\u6210\u6587\u4EF6\u4E0B\u8F7D")}}},exports.Download=Ie,exports.DownloadByUrl=function({url:e,target:t="_blank",fileName:n}){const i=new URL(e).host==location.host;return new Promise((r,c)=>{if(i){const y=document.createElement("a");if(y.href=e,y.target=t,y.download!==void 0&&(y.download=n||an(e)),document.createEvent){const w=document.createEvent("MouseEvents");return w.initEvent("click",!0,!0),y.dispatchEvent(w),r(!0)}return e.indexOf("?")===-1&&(e+="?download"),window.open(e,t),r(!0)}{const y=document.createElement("canvas"),w=document.createElement("img");w.setAttribute("crossOrigin","Anonymous"),w.src=e,w.onload=b=>{y.width=w.width,y.height=w.height,y.getContext("2d").drawImage(w,0,0,w.width,w.height),y.toBlob(x=>{if(x){const k=document.createElement("a");k.href=window.URL.createObjectURL(x),k.download=an(e),k.click(),URL.revokeObjectURL(k.href),r(!0)}},"image/jpeg")},w.onerror=b=>c(b)}})},exports.Global=I,exports.GlobalHprose=zo,exports.GlobalMitt=ve,exports.H5Tool=re,exports.HproseClient=Ee,exports.HttpDownload=(e,t,n)=>{e.get(t).then(function(i){Ie(i.data,n)}).catch(i=>{console.warn(i),ve.emit(G.CommonWarnEvent,"\u4E0B\u8F7D\u6587\u4EF6\u62A5\u9519\uFF01")})},exports.JsonDownload=sn,exports.LayoutContainer=zt,exports.LayoutManager=class{layoutState;widgetCofig;layoutMap=new Map;preConditionMap=new Map;widgetsLoadedSet=new Set;constructor(e,t){this.layoutState=e,this.widgetCofig=t,this.widgetCofig.forEach(n=>{if(n.afterid)if(this.preConditionMap.has(n.afterid))this.preConditionMap.get(n.afterid)?.add(n);else{const i=new Set;i.add(n),this.preConditionMap.set(n.afterid,i)}})}getWidgetConfig(){return this.widgetCofig}preloadWidgets(){this.widgetCofig.filter(e=>e.preload&&!e.afterid).forEach(e=>{this._loadWidget(e,this.loadOtherDependenceWidgets.bind(this))})}loadWidget(e){if(!e)return;let t;de(e)?t=e:Te(e)&&(t=this.widgetCofig.find(n=>n.id===e)),t&&this._loadWidget(t,this.loadOtherDependenceWidgets.bind(this))}loadOtherDependenceWidgets(e){this.preConditionMap.has(e)&&this.preConditionMap.get(e)?.forEach(t=>{t.preload&&this._loadWidget(t)})}_loadWidget(e,t){if(!this.widgetsLoadedSet.has(e.id))return e.component().then(n=>{if(n.default){const i=g.markRaw(n.default);this.getContainerComponents(e.container).value.set(e.id,i),this.widgetsLoadedSet.add(e.id),I.EventBus.emit(G.WidgetLoadedEvent,e.id),t&&t(e.id)}})}hasDependentWidgets(e){let t=!1;if(this.preConditionMap.has(e)){const n=this.preConditionMap.get(e);if(n){for(const i of n)if(this.isWidgetLoaded(i.id)){t=!0;break}}}return t}unloadWidget(e){if(!e||!this.isWidgetLoaded(e))return;const t=this.widgetCofig.find(n=>n.id===e);if(t){if(this.preConditionMap.has(e)){const n=this.preConditionMap.get(e);if(n)for(const i of n)this.unloadWidget(i.id)}this.getContainerComponents(t.container).value.delete(e),this.widgetsLoadedSet.delete(e),I.EventBus.emit(G.WidgetUnLoadedEvent,e)}}isWidgetLoaded(e){return this.widgetsLoadedSet.has(e)}splitTwoContainer(e=!1){const t=this.layoutState.centerMainContainer,n=this.layoutState.centerBackContainer;e?(t&&(t.style.left="0",t.style.width="100%"),n&&(n.style.width="100%")):(t&&(t.style.left="50%",t.style.width="50%"),n&&(n.style.width="50%"))}getLayoutContainer(e){switch(e){case exports.LayoutContainerEnum.top:return this.layoutState.topContainer;case exports.LayoutContainerEnum.bottom:return this.layoutState.bottomContainer;case exports.LayoutContainerEnum.left:return this.layoutState.leftContainer;case exports.LayoutContainerEnum.right:return this.layoutState.rightContainer;case exports.LayoutContainerEnum.centerBack:return this.layoutState.centerBackContainer;case exports.LayoutContainerEnum.centerMain:return this.layoutState.centerMainContainer;case exports.LayoutContainerEnum.centerFront:return this.layoutState.centerFrontContainer}}changeContainerVisible(e,t=!1){const n=this.getLayoutContainer(e);n&&(n.style.visibility=t?"visible":"hidden")}changeWidgetVisible(e,t=!1){const n=this.getWidgetComponent(e);n&&I.EventBus.emit(G.WidgetVisibleChanged,{id:e,name:n.name,visible:t})}getWidgetComponent(e){if(this.widgetsLoadedSet.has(e)){const t=this.widgetCofig.find(n=>n.id===e);if(t)return this.getContainerComponents(t.container).value.get(e)}}getWigetItem(e){return this.widgetCofig.find(t=>t.id===e)}getGroupWigetItems(e){return this.widgetCofig.filter(t=>t.group===e)}getContainerComponents(e){if(this.layoutMap.has(e))return this.layoutMap.get(e);{const t=g.ref(new Map);return this.layoutMap.set(e,t),t}}addContainerComponent(e,t){}},exports.ObjToUrlParams=function(e,t){let n="",i="";for(const r in t)n+=r+"="+encodeURIComponent(t[r])+"&";return n=n.replace(/&$/,""),i=/\?$/.test(e)?e+n:e.replace(/\/?$/,"?")+n,i},exports.Pane=it,exports.ProxyClient=be,exports.SaveAs=function(e,t){const n=window.URL||window.webkitURL||window,i=new Blob([e]),r=document.createElement("a");r.href=n.createObjectURL(i),r.download=t,r.click(),n.revokeObjectURL(r.href)},exports.Splitpanes=Ai,exports.Storage=Le,exports.StringUtils=_e,exports.StyleBlack={window:{color:"#fff",boxShadow:"0 0 6pt rgba(255, 255, 255, 0.75)",backgroundColor:"rgba(31, 31, 31, 0.9)"},titlebar:{backgroundColor:"rgba(63, 63, 63, 0.9)"},content:{},button:{color:"white"},buttonHover:{backgroundColor:"rgba(255, 255, 255, 0.25)"},buttonActive:{color:"black",backgroundColor:"rgba(255, 255, 255, 0.5)"}},exports.StyleGrayblue={window:{color:"#fff",fontSize:"14px",boxShadow:"0 0 3pt rgba(255, 255, 255, 0.75)",backgroundColor:"rgba(4,51,81,0.6)",borderRadius:"5px"},titlebar:{backgroundColor:"rgba(4,51,81,0.8)",border:"1px solid rgba(153, 153, 153, 0.5)",borderRadius:"5px",fontSize:"16px",fontWeight:400,color:"#fff"},content:{},button:{color:"white",fontSize:"18px"},buttonHover:{backgroundColor:"rgba(255, 255, 255, 0.25)"},buttonActive:{color:"black",backgroundColor:"rgba(255, 255, 255, 0.5)"}},exports.StyleMetal={window:{color:"#000",boxShadow:"0 4pt 8pt rgba(0, 0, 0, 0.5)",background:"linear-gradient(to bottom, rgb(215, 215, 215), rgb(191, 191, 191))"},titlebar:{background:"linear-gradient(to bottom, rgb(215, 215, 215), rgb(191, 191, 191))"},content:{},button:{color:"#000"},buttonHover:{backgroundColor:"rgba(0, 0, 0, 0.25)"},buttonActive:{color:"#fff",backgroundColor:"rgba(0, 0, 0, 0.5)"}},exports.StyleWhite={window:{color:"#000",boxShadow:"0 2pt 4pt rgba(0, 0, 0, 0.5)",backgroundColor:"rgba(239, 239, 239, 0.95)"},titlebar:{backgroundColor:"rgba(191, 191, 191, 0.9)"},content:{},button:{color:"#000"},buttonHover:{backgroundColor:"rgba(0, 0, 0, 0.25)"},buttonActive:{color:"#fff",backgroundColor:"rgba(0, 0, 0, 0.5)"}},exports.SysEvents=G,exports.TOKEN_REFRESH_TIME=4e3,exports.USER_TOKEN_API=fe,exports.VCollapsiblePanel=Ne,exports.VCollapsiblePanelGroup=De,exports.VWindow=He,exports.WindowResizeEvent=Ln,exports.WindowType=vo,exports.calculateBestTextColor=function(e){const t=at(e.substring(1));var n,i;return n=t.split(","),i=[0,0,0],(rn(~~n[0],~~n[1],~~n[2])+.05)/(rn(i[0],i[1],i[2])+.05)>=12?"#000000":"#FFFFFF"},exports.changePWD=function(e){return te(fe.ChangePWD,Ce,e)},exports.checkDoRefreshToken=Rn,exports.checkLogin=async function(e){const t=(await te(fe.CheckLogin,Ce,e))?.data;return t&&t.isSuccess&&(Lt(t.resultValue),Xe(t.resultValue.doubleToken)),t},exports.checkToken=function(e){return te(fe.CheckToken,Ce,{token:e})},exports.clearLocalToken=ht,exports.clearRight=Tn,exports.colorIsDark=function(e){if(!Re(e))return;const[t,n,i]=at(e).replace(/(?:\(|\)|rgb|RGB)*/g,"").split(",").map(r=>Number(r));return .299*t+.578*n+.114*i<192},exports.createFileUpload=e=>new Yi(e),exports.darken=function(e,t){return e=e.indexOf("#")>=0?e.substring(1,e.length):e,t=Math.trunc(255*t/100),`#${ut(e.substring(0,2),t)}${ut(e.substring(2,4),t)}${ut(e.substring(4,6),t)}`},exports.deepMerge=function e(t={},n={}){let i;for(i in n)t[i]=de(t[i])?e(t[i],n[i]):t[i]=n[i];return t},exports.doRefreshToken=_t,exports.exportSystemRights=bn,exports.get=function(e,t){return te(e,void 0,t)},exports.getCurrentSystemRight=xe,exports.getData=function(e,t){return I.Axios?.get(e,{params:t}).catch(function(n){console.error(n);const i=`\u5916\u90E8Get\u670D\u52A1\u8BF7\u6C42\u9519\u8BEF\uFF1A${e}`;I.EventBus.emit(G.AxiosRequestErrorEvent,i)})},exports.getFunctions=function(e){if(I.User?.issystem)return e;const t=xe();return t?t.functions:void 0},exports.getHexColor=function(e){const t=e.toLowerCase().replace(/rgb?a?\(/,"").replace(/\)/,"").replace(/[\s+]/g,"").split(","),n=parseFloat(t[3]||"1"),i=Math.floor(n*parseInt(t[0])+255*(1-n)),r=Math.floor(n*parseInt(t[1])+255*(1-n)),c=Math.floor(n*parseInt(t[2])+255*(1-n));return"#"+("0"+i.toString(16)).slice(-2)+("0"+r.toString(16)).slice(-2)+("0"+c.toString(16)).slice(-2)},exports.getLocalToken=he,exports.getLockState=function(){return ce.get("is_LockScreen",!1)},exports.getLongHexColor=function(e){const t=e;if(t.length===4){let i="#";for(var n=1;n<4;n+=1){const r=t.slice(n,n+1);i+=r.concat(r)}return i}return t},exports.getProxyClient=ln,exports.getRGBColor=function(e){var t=e.toLowerCase();if(Re(e)){if(t.length===4){for(var n="#",i=1;i<4;i+=1){const c=t.slice(i,i+1);n+=c.concat(c)}t=n}var r=[];for(i=1;i<7;i+=2)r.push(parseInt("0x"+t.slice(i,i+2)));return"rgb("+r.join(",")+")"}return t},exports.getRGBColorFromHSLA=function(e){if(!!e){var t=e.toLowerCase().match(/^hsla?\(\s*(\d{1,3})\s*,\s*(\d{1,3}\%)\s*,\s*(\d{1,3}\%)\s*(?:\s*,\s*(\d+(?:\.\d+)?)\s*)?\)$/i);if(!!t){var n,i,r,c=(parseFloat(t[1])%360+360)%360/360,y=parseFloat(t[2])/(/%$/.test(t[2])?100:1),w=parseFloat(t[3])/(/%$/.test(t[3])?100:1);if(y===0)n=i=r=w;else{var b=w<=.5?w*(y+1):w+y-w*y,x=2*w-b;n=st(x,b,c+1/3),i=st(x,b,c),r=st(x,b,c-1/3)}return`rgba(${n=Math.round(255*n)},${i=Math.round(255*i)},${r=Math.round(255*r)},${t[4]?parseFloat(t[4]):1})`}}},exports.getRefreshToken=cn,exports.getRight=In,exports.getRoutes=function(e){if(I.User?.issystem)return e;const t=xe();return t&&t.routes?(Pt.length>0||e.forEach(n=>{const i=t.routes?.find(r=>r.name===n.name);if(i){const r=An(n,i);r&&Pt.push(r)}}),Pt):void 0},exports.getSystemRoleRight=async function(e,t,n,i){if(Tn(),!I.User)return;let r;if(i)r=i;else{if(!t)return;let c=n;c||(c=I.Config.ServiceURL.LoginAuthURL);const y=await te(t,c,{system:e});if(!y||y.data)return void I.Message?.warn("\u65E0\u6CD5\u83B7\u53D6\u529F\u80FD\u6388\u6743\u5217\u8868\uFF01");r=y.data}return r&&Pn(r),r},exports.getWidgetConfig=function(e){if(I.User?.issystem)return e;const t=xe();return t&&t.widgets?(Rt.length>0||e?.forEach(n=>{t.widgets?.find(i=>i.id===n.id)&&Rt.push(n)}),Rt):void 0},exports.getWidgetMenus=function(e){if(I.User?.issystem)return e;const t=xe();return t&&t.widgetMenu?(It.length>0||e.forEach(n=>{const i=t.widgetMenu?.find(r=>r.name===n.name);if(i){const r=Dn(n,i);r&&It.push(r)}}),It):void 0},exports.hexToRGB=at,exports.init=un,exports.initDefaultProxyClient=function(e){const t=ln(e);return t&&(I.DefaultProxyClient=t),t},exports.initXFrame=function(e){un(e.message,e.defaultHproseURL),e.config&&(I.Config=e.config)},exports.is=V,exports.isArray=wn,exports.isAsyncFunction=function(e){return V(e,"AsyncFunction")},exports.isBoolean=function(e){return e===!0||e===!1||V(e,"Boolean")},exports.isClient=()=>typeof window<"u",exports.isDate=function(e){return V(e,"Date")},exports.isDef=yn,exports.isElement=e=>de(e)&&!!e.tagName,exports.isEmpty=function(e){return e==null||(Te(e)||wn(e)?e.length===0:!!de(e)&&JSON.stringify(e)==="{}")},exports.isEnumColor=function(e){if(typeof e=="object"||!e)return;const t=e.toLowerCase().substr(0,1);return t==="#"?exports.EnumColor.Hex:t==="r"||t==="("?exports.EnumColor.RGBA:t==="h"?exports.EnumColor.Hsla:exports.EnumColor.RGBA},exports.isError=function(e){return V(e,"Error")},exports.isFunction=wt,exports.isHexColor=Re,exports.isImageDom=function(e){return e&&["IMAGE","IMG"].includes(e.tagName)},exports.isMap=function(e){return V(e,"Map")},exports.isNull=St,exports.isNullAndUnDef=function(e){return bt(e)&&St(e)},exports.isNullOrUnDef=function(e){return bt(e)||St(e)},exports.isNumber=function(e){return V(e,"Number")},exports.isObject=de,exports.isPromise=function(e){return V(e,"Promise")&&de(e)&&wt(e.then)&&wt(e.catch)},exports.isServer=to,exports.isString=Te,exports.isSymbol=function(e){return V(e,"Symbol")},exports.isUnDef=bt,exports.isValidURL=e=>/^(https?|ftp):\/\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}|([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:[0-9]+)*(\/($|[a-zA-Z0-9.,?'\\+&%$#=~_-]+))*$/.test(e),exports.isWeakMap=function(e){return V(e,"WeakMap")},exports.isWeakSet=function(e){return V(e,"WeakSet")},exports.isWindow=e=>typeof window<"u"&&V(e,"Window"),exports.jquery=Ji,exports.lighten=function(e,t){return e=e.indexOf("#")>=0?e.substring(1,e.length):e,t=Math.trunc(255*t/100),`#${ct(e.substring(0,2),t)}${ct(e.substring(2,4),t)}${ct(e.substring(4,6),t)}`},exports.login=async function(e){const t=(await te(fe.Login,Ce,e))?.data;return t&&t.isSuccess&&(Lt(t.resultValue),Xe(t.resultValue.doubleToken)),t},exports.logout=function(){const e=he();e&&(pt(fe.Logout,Ce,{token:e.token,reftoken:e.refresh}),ht())},exports.newGuid=function(){var e=new Date().getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var n=(e+16*Math.random())%16|0;return e=Math.floor(e/16),(t==="x"?n:3&n|8).toString(16)})},exports.onLockListener=function(){yt(),document.addEventListener("mousedown",yt)},exports.post=function(e,t){return pt(e,void 0,t)},exports.requestGet=te,exports.requestPost=pt,exports.requestPostBody=function(e,t,n,i,r,c="json",y){const w=ft(i,t,r,c);return y&&y>=2e4&&(w.timeout=y),I.Axios?.post(e,n,w).catch(function(b){console.error(b);const x=`post\u8BF7\u6C42\u9519\u8BEF\uFF1A${t}${e}`;I.EventBus.emit(G.AxiosRequestErrorEvent,x)})},exports.rgbToHex=function(e,t,n){const i=(e<<16|t<<8|n).toString(16);return"#"+new Array(Math.abs(i.length-7)).join("0")+i},exports.setLocalToken=Xe,exports.setRight=Pn,exports.setUser=Lt,exports.sleep=function(e){for(var t=new Date().getTime();new Date().getTime()-t<e;);console.log(`\u5F3A\u5236\u7B49\u5F85${e}\u6BEB\u79D2`)},exports.storage=Ni,exports.storageHelper=ce,exports.unLockListener=function(){document.removeEventListener("mousedown",yt)},exports.uuid=Be,exports.writeIconifyList=function(e,t="IconifyList.ts"){let n="",i=`const iconlist={
|
|
12
|
+
`}}});const io={class:"vcp__header-title"},oo={key:0,class:"vcp__header-icon"},ro=["innerHTML"],so={key:0,ref:"bodyRef",class:"vcp__body"},ao={ref:"bodyContentRef",class:"vcp__body-content"};function xt(e){return window.TouchEvent&&e instanceof TouchEvent}Ne.render=function(e,t,n,i,r,c){return g.openBlock(),g.createElementBlock("section",{ref:"panelRef",class:g.normalizeClass(["vcp",{"vcp--expanded":e.isExpanded,"vcp--expandable":e.body.hasContent}])},[g.createElementVNode("header",{class:"vcp__header",onClick:t[0]||(t[0]=(...y)=>e.toggle&&e.toggle(...y))},[g.createElementVNode("div",io,[g.renderSlot(e.$slots,"title")]),e.body.hasContent?(g.openBlock(),g.createElementBlock("div",oo,[g.renderSlot(e.$slots,"icon",{},()=>[g.createElementVNode("span",{innerHTML:e.toggleIcon},null,8,ro)])])):g.createCommentVNode("v-if",!0)]),g.createVNode(g.Transition,{"data-key":e.body.dataKey,name:"slide",onBeforeEnter:e.collapse,onEnter:e.expand,onBeforeLeave:e.expand,onLeave:e.collapse},{default:g.withCtx(()=>[e.isExpanded?(g.openBlock(),g.createElementBlock("div",so,[g.createElementVNode("div",ao,[g.renderSlot(e.$slots,"content")],512)],512)):g.createCommentVNode("v-if",!0)]),_:3},8,["data-key","onBeforeEnter","onEnter","onBeforeLeave","onLeave"])],2)},Ne.__scopeId="data-v-08c94cf8",Ne.__file="src/controls/collapsepanel/VCollapsiblePanel.vue";class Y{e;constructor(t){this.e=t}stopPropagation(){this.e.stopPropagation()}preventDefault(){this.e.preventDefault()}get clientX(){return xt(this.e)?(this.e.type==="touchend"?this.e.changedTouches:this.e.touches).item(0).clientX:this.e.clientX}get clientY(){return xt(this.e)?(this.e.type==="touchend"?this.e.changedTouches:this.e.touches).item(0).clientY:this.e.clientY}get clientCoord(){return new Tt(this.clientX,this.clientY)}static bindDown(t,n,i,r=!1){const c=w=>{n(new Y(w))},y=w=>{w.touches.length===1&&n(new Y(w)),w.touches.length>1&&i&&i(new Y(w))};return t.addEventListener("mousedown",c,r),t.addEventListener("touchstart",y,r),()=>{t.removeEventListener("mousedown",c,r),t.removeEventListener("touchstart",y,r)}}static bindMove(t,n,i=!1){const r=y=>{n(new Y(y))},c=y=>{y.touches.length===1&&n(new Y(y))};return t.addEventListener("mousemove",r,i),t.addEventListener("touchmove",c,i),()=>{t.removeEventListener("mousemove",r,i),t.removeEventListener("touchmove",c,i)}}static bindUp(t,n,i=!1){const r=y=>{n(new Y(y))},c=y=>{y.touches.length===0&&n(new Y(y))};return t.addEventListener("mouseup",r,i),t.addEventListener("touchend",c,i),()=>{t.removeEventListener("mouseup",r,i),t.removeEventListener("touchend",c,i)}}originalEvent({mouse:t,touch:n}){xt(this.e)?n&&n(this.e):t&&t(this.e)}}class Tt{x;y;constructor(t,n){this.x=t,this.y=n}clone(){return new Tt(this.x,this.y)}}class co{handle;container;options;unbindDown;unbindMove;unbindUp;constructor(t,n,i={}){this.handle=t,this.container=n,this.options=i,t&&(this.unbindDown=Y.bindDown(t,this.mousedown),t.classList.add("draggable-handle"))}teardown(){this.handle?.classList.remove("draggable-handle"),this.unbindDown&&this.unbindDown(),this.unbindUp&&this.unbindUp(),this.unbindMove&&this.unbindMove()}offsetX;offsetY;mousedown=t=>{if(t.preventDefault(),this.handle){const{left:n,top:i}=this.handle.getBoundingClientRect();this.offsetX=t.clientX-n,this.offsetY=t.clientY-i}this.options.onMoveStart&&this.options.onMoveStart(),this.unbindMove=Y.bindMove(document,this.mousemove),this.unbindUp=Y.bindUp(document,this.mouseup)};mousemove=t=>{this.container&&(this.container.style.left=t.clientX-this.offsetX+"px",this.container.style.top=t.clientY-this.offsetY+"px"),this.options.onMove&&this.options.onMove()};mouseup=t=>{this.options.onMoveEnd&&this.options.onMoveEnd(),this.unbindUp(),this.unbindMove(),this.unbindUp=this.unbindMove=void 0}}class uo{_group;onChange;zIndex;constructor(t,n){this._group=t,this.onChange=n,this.a(i=>i.push(this))}set group(t){this._group=t;const n=Oe(this._group),i=Oe(t);n.splice(n.indexOf(this),1),i.push(this),kn()}get group(){return this._group}unregister(){this.a(t=>t.splice(t.indexOf(this),1))}raise(){this.a(t=>{t.splice(t.indexOf(this),1),t.push(this)})}a(t){t(Oe(this._group)),kn()}}const Ue=new Map;function Oe(e){return Ue.has(e)||Ue.set(e,[]),Ue.get(e)}function En(e,t){return e>t?-En(t,e):e<0&&t>=0?1:e-t}function kn(){let e=0;for(const t of function(n){const i=[];return n.forEach((r,c)=>i.push(c)),i}(Ue).sort(En))for(const n of Oe(t))e!=n.zIndex&&(n.zIndex=e,n.onChange(e)),e++}function Et(e){if(e){const{width:t,height:n}=e.style;e.style.width="auto",e.style.height="auto";const i=je(e);return e.style.width=t,e.style.height=n,i}return{width:0,height:0,top:0,left:0,bottom:0,right:0}}function je(e){const t=e.getBoundingClientRect(),n=t.width,i=t.height,r=t.top,c=t.left;return{width:n,height:i,top:r,left:c,bottom:r+i,right:c+n}}class lo{container;options;handles;constructor(t,n){if(this.container=t,this.options=n,t&&n){this.handles=zn.map(b=>new b(t,this));const{width:i,height:r}=Et(t),c=n.maxWidth||window.innerWidth,y=n.maxHeight||window.innerHeight;let w=!1;(i<n.minWidth||i>c)&&(t.style.width=`${Mn(i,n.minWidth,c)}px`,w=!0),(r<n.minHeight||r>y)&&(t.style.height=`${Mn(r,n.minHeight,y)}px`,w=!0),w&&n.onResize&&n.onResize()}}teardown(){this.handles?.forEach(t=>t.teardown())}}const zn=[];class ue{container;helper;handle;handleSize=8;unbindDown;unbindMove;unbindUp;constructor(t,n){this.container=t,this.helper=n,this.handle=this.createHandleElement(),this.unbindDown=Y.bindDown(this.handle,this.mousedown)}teardown(){this.unbindDown(),this.unbindUp&&this.unbindUp(),this.unbindMove&&this.unbindMove(),this.handle.parentElement.removeChild(this.handle)}x0;y0;left0;top0;width0;height0;mousedown=t=>{t.preventDefault(),t.stopPropagation();const{left:n,top:i,width:r,height:c}=je(this.container);this.x0=t.clientX,this.y0=t.clientY,this.left0=n,this.top0=i,this.width0=r,this.height0=c,this.calcSafeBoundaries(),this.helper.options&&this.helper.options.onResizeStart&&this.helper.options.onResizeStart(),this.unbindMove=Y.bindMove(document,this.mousemove),this.unbindUp=Y.bindUp(document,this.mouseup)};minLeft;maxLeft;minRight;maxRight;minTop;maxTop;minBottom;maxBottom;calcSafeBoundaries(){if(!this.helper.options)return;const{left:t,top:n,right:i,bottom:r}=je(this.container),c=this.helper.options,y=c.maxWidth||window.innerWidth,w=c.maxHeight||window.innerHeight;this.minLeft=Math.max(i-y,0),this.maxLeft=i-c.minWidth,this.minRight=t+c.minWidth,this.maxRight=Math.min(t+y,window.innerWidth),this.minTop=Math.max(r-w,0),this.maxTop=r-c.minHeight,this.minBottom=n+c.minHeight,this.maxBottom=Math.min(n+w,window.innerHeight)}mousemove=t=>{t.preventDefault(),t.stopPropagation(),this.setPosition(t),this.fixPosition(),this.helper.options&&this.helper.options.onResize&&this.helper.options.onResize()};fixPosition(){const{width:t,height:n,left:i,top:r,right:c,bottom:y}=je(this.container),w=this.helper.options;w&&(i<this.minLeft?(this.container.style.width=t+i-this.minLeft+"px",this.container.style.left=`${this.minLeft}px`):i>this.maxLeft?(this.container.style.width=`${w.minWidth}px`,this.container.style.left=`${this.maxLeft}px`):c<this.minRight?this.container.style.width=`${w.minWidth}px`:c>this.maxRight&&(this.container.style.width=this.maxRight-i+"px"),r<this.minTop?(this.container.style.height=n+r-this.minTop+"px",this.container.style.top=`${this.minTop}px`):r>this.maxTop?(this.container.style.height=`${w.minHeight}px`,this.container.style.top=`${this.maxTop}px`):y<this.minBottom?this.container.style.height=`${w.minHeight}px`:y>this.maxBottom&&(this.container.style.height=this.maxBottom-r+"px"))}mouseup=t=>{t.preventDefault(),t.stopPropagation(),this.helper.options&&this.helper.options.onResizeEnd&&this.helper.options.onResizeEnd(),this.unbindUp(),this.unbindMove(),this.unbindUp=this.unbindMove=void 0};createHandleElement(){const t=document.createElement("div"),n=t.style;return n.position="absolute",this.applyStyle(n),this.container.appendChild(t),t}}function Mn(e,t,n){return e<t?t:e>n?n:e}zn.push(class extends ue{setPosition(e){this.container.style.width=this.width0+e.clientX-this.x0+"px",this.container.style.height=this.height0+e.clientY-this.y0+"px"}applyStyle(e){e.width=2*this.handleSize+"px",e.height=2*this.handleSize+"px",e.right=-this.handleSize+"px",e.bottom=-this.handleSize+"px",e.cursor="nwse-resize"}},class extends ue{setPosition(e){this.container.style.height=this.height0+e.clientY-this.y0+"px"}applyStyle(e){e.right=`${this.handleSize}px`,e.left=`${this.handleSize}px`,e.height=2*this.handleSize+"px",e.bottom=-this.handleSize+"px",e.cursor="ns-resize"}},class extends ue{setPosition(e){this.container.style.left=this.left0+e.clientX-this.x0+"px",this.container.style.width=this.width0-(e.clientX-this.x0)+"px",this.container.style.height=this.height0+e.clientY-this.y0+"px"}applyStyle(e){e.left=-this.handleSize+"px",e.bottom=-this.handleSize+"px",e.width=2*this.handleSize+"px",e.height=2*this.handleSize+"px",e.cursor="nesw-resize"}},class extends ue{setPosition(e){this.container.style.left=this.left0+e.clientX-this.x0+"px",this.container.style.width=this.width0-(e.clientX-this.x0)+"px"}applyStyle(e){e.left=-this.handleSize+"px",e.bottom=`${this.handleSize}px`,e.width=2*this.handleSize+"px",e.top=`${this.handleSize}px`,e.cursor="ew-resize"}},class extends ue{setPosition(e){this.container.style.left=this.left0+e.clientX-this.x0+"px",this.container.style.width=this.width0-(e.clientX-this.x0)+"px",this.container.style.top=this.top0+e.clientY-this.y0+"px",this.container.style.height=this.height0-(e.clientY-this.y0)+"px"}applyStyle(e){e.left=-this.handleSize+"px",e.top=-this.handleSize+"px",e.width=2*this.handleSize+"px",e.height=2*this.handleSize+"px",e.cursor="nwse-resize"}},class extends ue{setPosition(e){this.container.style.top=this.top0+e.clientY-this.y0+"px",this.container.style.height=this.height0-(e.clientY-this.y0)+"px"}applyStyle(e){e.left=`${this.handleSize}px`,e.right=`${this.handleSize}px`,e.height=2*this.handleSize+"px",e.top=-this.handleSize+"px",e.cursor="ns-resize"}},class extends ue{setPosition(e){this.container.style.top=this.top0+e.clientY-this.y0+"px",this.container.style.height=this.height0-(e.clientY-this.y0)+"px",this.container.style.width=this.width0+e.clientX-this.x0+"px"}applyStyle(e){e.right=-this.handleSize+"px",e.top=-this.handleSize+"px",e.height=2*this.handleSize+"px",e.width=2*this.handleSize+"px",e.cursor="nesw-resize"}},class extends ue{setPosition(e){this.container.style.width=this.width0+e.clientX-this.x0+"px"}applyStyle(e){e.right=-this.handleSize+"px",e.top=`${this.handleSize}px`,e.bottom=`${this.handleSize}px`,e.width=2*this.handleSize+"px",e.cursor="ew-resize"}});var We=g.defineComponent({name:"",props:{disabled:{type:Boolean,default:!1},windowStyle:{type:Object,required:!0}},components:{},setup(e){const t=g.ref(!1),n=g.ref(!1);return{hover:t,active:n,style:function(){let i=e.windowStyle.button;return t.value&&(i={...i,...this.windowStyle.buttonHover}),n.value&&(i={...i,...this.windowStyle.buttonActive}),i},mouseup:function(i){this.active&&this.$emit("click")},mousedown:function(i){i.preventDefault(),n.value=!0;const r=Y.bindUp(document,()=>{n.value=!1,r()})}}}});const ho=["disabled"];We.render=function(e,t,n,i,r,c){return g.openBlock(),g.createElementBlock("div",{class:"btn",style:g.normalizeStyle(e.style()),onMouseenter:t[0]||(t[0]=y=>e.hover=!0),onMouseleave:t[1]||(t[1]=y=>e.hover=!1),onMousedown:t[2]||(t[2]=g.withModifiers((...y)=>e.mousedown&&e.mousedown(...y),["stop"])),onTouchstart:t[3]||(t[3]=g.withModifiers((...y)=>e.mousedown&&e.mousedown(...y),["stop"])),onMouseup:t[4]||(t[4]=(...y)=>e.mouseup&&e.mouseup(...y)),onTouchend:t[5]||(t[5]=(...y)=>e.mouseup&&e.mouseup(...y)),disabled:e.disabled},[g.renderSlot(e.$slots,"default")],44,ho)},We.__scopeId="data-v-71662210",We.__file="src/controls/vuewindow/window/Button.vue";const kt=new Set;function _n(e){return e!==null?parseFloat(e):0}function Fe(e){const t=window.getComputedStyle(e);return{width:Math.ceil([t.paddingLeft,t.width,t.paddingRight].map(_n).reduce((n,i)=>n+i)),height:Math.ceil([t.paddingTop,t.height,t.paddingBottom].map(_n).reduce((n,i)=>n+i))}}class Ln{width;height;constructor(t,n){this.width=t,this.height=n}}function fo(e){const t=e.windowEl;if(t){const n=parseFloat(t.style.left||"NaN"),i=parseFloat(t.style.top||"NaN");if(!isNaN(n)&&!isNaN(i))return{left:n,top:i}}return null}function po(e,t,n,i){const r=e-n,c=t-i;return r*r+c*c}window.addEventListener("resize",e=>{kt.forEach(t=>{t?.fixPosition()})});const $e=[];var He=g.defineComponent({name:"Window",props:{windowStyle:{type:Object,required:!0},isOpen:{type:Boolean,required:!1,default:!0},title:{type:String,required:!0,default:""},closeButton:{type:Boolean,required:!1,default:!0},resizable:{type:Boolean,required:!1,default:!1},isScrollable:{type:Boolean,required:!1,default:!1},padding:{type:Number,required:!1,default:8},activateWhenOpen:{type:Boolean,required:!1,default:!0},positionHint:{type:String,required:!1,default:""},zGroup:{type:Number,required:!1,default:1},overflow:{type:String,required:!1,default:"visible"},minWidth:{type:Number,required:!1,default:1},minHeight:{type:Number,required:!1,default:0},maxWidth:{type:Number,required:!1,default:0},maxHeight:{type:Number,required:!1,default:0},height:{type:Number,required:!1},width:{type:Number,required:!1},top:{type:Number,required:!1},left:{type:Number,required:!1}},components:{myButton:We},setup(e,{emit:t}){const n=g.getCurrentInstance();if(!n)return;const{proxy:i}=n;let r=0,c,y,w;const b=g.ref(e.isOpen),x=()=>{$e.push(i),w=new uo(e.zGroup,k),e.isOpen&&(g.nextTick(()=>{r++==0&&(h(i),function(){const B=_.value,{width:A,height:O}=Et(B);let j,W;if(e.left!==void 0!=(e.top!==void 0))throw new Error("Either of left or top is specified. Both must be set or not set.");if(typeof e.left=="number")j=e.left,W=e.top;else{const H=e.positionHint||"auto";switch(H){case"auto":{let q=20,X=50,Q=0;do{if($e.every(J=>{if(!J.isOpen||i==J)return!0;const ne=fo(J);if(ne==null)return!0;const{left:Ve,top:Ke}=ne;return po(Ve,Ke,q,X)>16}))break;q=(q+40)%(window.innerWidth-200),X=(X+40)%(window.innerHeight-200)}while(++Q<100);j=q,W=X}break;case"center":j=(window.innerWidth-A)/2,W=(window.innerHeight-O)/2,console.log(j,W,window.innerWidth,window.innerHeight,"111111");break;default:try{const q=H.split("/").map(Number);if(q.length!=2)throw null;const[X,Q]=q;if(!isFinite(X)||!isFinite(Q))throw null;j=X>=0?X:window.innerWidth-A+X,W=Q>=0?Q:window.innerHeight-O+Q}catch{throw new Error(`invalid position string: ${H}`)}}}B&&(B.style.left=`${j}px`,B.style.top=`${W}px`)}()),e.resizable&&l(),T(),c=new co(R.value,_.value,{onMove:()=>T(),onMoveStart:()=>t("move-start"),onMoveEnd:()=>t("move-end")}),e.resizable&&function(){const{height:B}=Et(R.value);y=new lo(_.value,{onResize:()=>l(),onResizeStart:()=>t("resize-start"),onResizeEnd:()=>t("resize-end"),minWidth:e.minWidth,minHeight:e.minHeight+B,maxWidth:e.maxWidth,maxHeight:e.maxHeight?e.maxHeight+B:void 0})}()}),e.activateWhenOpen&&P()),kt.add(i)};function k(B){S.value.zIndex=`${B}`}const _=g.ref(null),R=g.ref(null),N=g.ref(null);function P(){w.raise(),t("activate")}const S=g.ref({...e.windowStyle.window,zIndex:"auto",overflow:e.overflow}),u=g.computed(()=>e.windowStyle.titlebar),d=g.computed(()=>{const B={...e.windowStyle.content};return e.resizable?B.padding="0":e.padding!=null&&(B.padding=`${e.padding}px`),e.isScrollable&&(B.overflow="auto"),B});function h(B){const{width:A,height:O,top:j,left:W}=B,H=_;if(H&&A!=null&&(H.value.style.width=`${A}px`),O!=null){const q=R.value;if(q){const X=Fe(q).height;H.value.style.height=`${O+X}px`}}H&&W!=null&&(H.value.style.left=`${W}px`),H&&j!=null&&(H.value.style.top=`${j}px`)}function l(B=!0){const A=_.value,O=R.value,j=N.value;if(j&&A&&O){const{width:W,height:H}=Fe(j),{width:q,height:X}=Fe(A),Q=Fe(O).height,J=q-(j.offsetWidth-W),ne=X-Q-(j.offsetHeight-H);j.style.width=`${J}px`,j.style.height=`${ne}px`,p(),t("resize",new Ln(J,ne)),B&&(t("update:width",J),t("update:height",ne))}}function p(){const B=_.value;if(B){const A=B.getBoundingClientRect();A.left<0&&(S.value.left="0px"),A.top<0&&(S.value.top="0px"),A.right>window.innerWidth&&(S.value.left=window.innerWidth-A.width+"px"),A.bottom>window.innerHeight&&(S.value.top=window.innerHeight-A.height+"px")}}function T(B=!0){p();const A=_.value;if(A){const{left:O,top:j}=A.getBoundingClientRect();B&&(t("update:left",O),t("update:top",j))}}return g.watch(()=>e.isOpen,B=>{b.value=B}),g.watch(()=>e.zGroup,B=>{w.group=B}),g.watch(()=>e.width,B=>{h({width:B}),l(!1)}),g.watch(()=>e.height,B=>{h({height:B}),l(!1)}),g.onMounted(()=>{x()}),g.onBeforeUnmount(()=>{kt.delete(this),w.unregister(),y&&y.teardown(),c&&c.teardown(),$e.splice($e.indexOf(i),1)}),{isOpen:b,windowEl:_,titlebar:R,content:N,activate:P,styleWindow:S,styleTitlebar:u,styleContent:d,closeButtonClick:function(){b.value=!1,t("closebuttonclick")}}}});const mo={class:"title"},go=g.createTextVNode("\xD7");var Bn,le;He.render=function(e,t,n,i,r,c){const y=g.resolveComponent("myButton");return g.openBlock(),g.createBlock(g.Transition,{name:"fade",onAfterLeave:t[2]||(t[2]=w=>e.$emit("close")),onAfterEnter:t[3]||(t[3]=w=>e.$emit("open"))},{default:g.withCtx(()=>[g.withDirectives(g.createElementVNode("div",{class:"window",style:g.normalizeStyle(e.styleWindow),ref:"windowEl",onMousedown:t[0]||(t[0]=(...w)=>e.activate&&e.activate(...w)),onTouchstart:t[1]||(t[1]=(...w)=>e.activate&&e.activate(...w))},[g.createElementVNode("div",{class:"titlebar",style:g.normalizeStyle(e.styleTitlebar),ref:"titlebar"},[g.createElementVNode("div",mo,[e.$slots.title?g.renderSlot(e.$slots,"title",{key:0}):(g.openBlock(),g.createElementBlock(g.Fragment,{key:1},[g.createTextVNode(g.toDisplayString(e.title),1)],2112))]),e.closeButton?(g.openBlock(),g.createBlock(y,{key:0,windowStyle:e.windowStyle,onClick:e.closeButtonClick},{default:g.withCtx(()=>[go]),_:1},8,["windowStyle","onClick"])):g.createCommentVNode("v-if",!0)],4),g.createElementVNode("div",{class:"content",style:g.normalizeStyle(e.styleContent),ref:"content"},[g.renderSlot(e.$slots,"default")],4)],36),[[g.vShow,e.isOpen]])]),_:3})},He.__file="src/controls/vuewindow/window/index.vue",(le=Bn||(Bn={}))[le.StyleBlack=0]="StyleBlack",le[le.StyleWhite=1]="StyleWhite",le[le.StyleMetal=2]="StyleMetal",le[le.StyleGrayblue=3]="StyleGrayblue";const vo=He;var Z;exports.LayoutContainerEnum=void 0,(Z=exports.LayoutContainerEnum||(exports.LayoutContainerEnum={}))[Z.top=0]="top",Z[Z.bottom=1]="bottom",Z[Z.centerBack=2]="centerBack",Z[Z.centerMain=3]="centerMain",Z[Z.centerFront=4]="centerFront",Z[Z.left=5]="left",Z[Z.right=6]="right";class yo{layoutState;widgetCofig;layoutMap=new Map;preConditionMap=new Map;widgetsLoadedSet=new Set;constructor(t,n){this.layoutState=t,this.widgetCofig=n,this.widgetCofig.forEach(i=>{if(i.afterid)if(this.preConditionMap.has(i.afterid))this.preConditionMap.get(i.afterid)?.add(i);else{const r=new Set;r.add(i),this.preConditionMap.set(i.afterid,r)}})}getWidgetConfig(){return this.widgetCofig}preloadWidgets(){this.widgetCofig.filter(t=>t.preload&&!t.afterid).forEach(t=>{this._loadWidget(t,this.loadOtherDependenceWidgets.bind(this))})}loadWidget(t){if(!t)return;let n;de(t)?n=t:Te(t)&&(n=this.widgetCofig.find(i=>i.id===t)),n&&this._loadWidget(n,this.loadOtherDependenceWidgets.bind(this))}loadOtherDependenceWidgets(t){this.preConditionMap.has(t)&&this.preConditionMap.get(t)?.forEach(n=>{n.preload&&this._loadWidget(n)})}_loadWidget(t,n){if(!this.widgetsLoadedSet.has(t.id))return t.component().then(i=>{if(i.default){const r=g.markRaw(i.default);this.getContainerComponents(t.container).value.set(t.id,r),this.widgetsLoadedSet.add(t.id),I.EventBus.emit(G.WidgetLoadedEvent,t.id),n&&n(t.id)}})}hasDependentWidgets(t){let n=!1;if(this.preConditionMap.has(t)){const i=this.preConditionMap.get(t);if(i){for(const r of i)if(this.isWidgetLoaded(r.id)){n=!0;break}}}return n}unloadWidget(t){if(!t||!this.isWidgetLoaded(t))return;const n=this.widgetCofig.find(i=>i.id===t);if(n){if(this.preConditionMap.has(t)){const i=this.preConditionMap.get(t);if(i)for(const r of i)this.unloadWidget(r.id)}this.getContainerComponents(n.container).value.delete(t),this.widgetsLoadedSet.delete(t),I.EventBus.emit(G.WidgetUnLoadedEvent,t)}}isWidgetLoaded(t){return this.widgetsLoadedSet.has(t)}splitTwoContainer(t=!1){const n=this.layoutState.centerMainContainer,i=this.layoutState.centerBackContainer;t?(n&&(n.style.left="0",n.style.width="100%"),i&&(i.style.width="100%")):(n&&(n.style.left="50%",n.style.width="50%"),i&&(i.style.width="50%"))}getLayoutContainer(t){switch(t){case exports.LayoutContainerEnum.top:return this.layoutState.topContainer;case exports.LayoutContainerEnum.bottom:return this.layoutState.bottomContainer;case exports.LayoutContainerEnum.left:return this.layoutState.leftContainer;case exports.LayoutContainerEnum.right:return this.layoutState.rightContainer;case exports.LayoutContainerEnum.centerBack:return this.layoutState.centerBackContainer;case exports.LayoutContainerEnum.centerMain:return this.layoutState.centerMainContainer;case exports.LayoutContainerEnum.centerFront:return this.layoutState.centerFrontContainer}}changeContainerVisible(t,n=!1){const i=this.getLayoutContainer(t);i&&(i.style.visibility=n?"visible":"hidden")}changeWidgetVisible(t,n=!1){const i=this.getWidgetComponent(t);i&&I.EventBus.emit(G.WidgetVisibleChanged,{id:t,name:i.name,visible:n})}getWidgetComponent(t){if(this.widgetsLoadedSet.has(t)){const n=this.widgetCofig.find(i=>i.id===t);if(n)return this.getContainerComponents(n.container).value.get(t)}}getWigetItem(t){return this.widgetCofig.find(n=>n.id===t)}getGroupWigetItems(t){return this.widgetCofig.filter(n=>n.group===t)}getContainerComponents(t){if(this.layoutMap.has(t))return this.layoutMap.get(t);{const n=g.ref(new Map);return this.layoutMap.set(t,n),n}}addContainerComponent(t,n){}}var zt=g.defineComponent({name:"MainContainer",props:{widgetConfig:{type:Array,required:!0,default:()=>[]},layoutStyle:{type:Object}},components:{},setup(e,{attrs:t,slots:n,emit:i}){const r=g.reactive({topContainer:void 0,centerBackContainer:void 0,centerMainContainer:void 0,centerFrontContainer:void 0,bottomContainer:void 0,leftContainer:void 0,rightContainer:void 0});if(!I.LayoutManager){const N=new yo(r,e.widgetConfig);I.LayoutManager=N,N.preloadWidgets()}const c=_(exports.LayoutContainerEnum.top),y=_(exports.LayoutContainerEnum.centerBack),w=_(exports.LayoutContainerEnum.centerFront),b=_(exports.LayoutContainerEnum.left),x=_(exports.LayoutContainerEnum.right),k=_(exports.LayoutContainerEnum.bottom);function _(N){return I.LayoutManager?.getContainerComponents(N)}const R=g.computed(()=>e.layoutStyle);return{...g.toRefs(r),topContainerComponents:c,centerbackComponents:y,centerfrontComponents:w,leftContainerComponents:b,rightContainerComponents:x,bottomContainerComponents:k,containerStyle:R}}});const wo={ref:"topContainer",class:"topContainer"},bo={ref:"centerBackContainer",class:"centerdiv backContainer"},So={ref:"centerMainContainer",class:"centerdiv mainContainer"},Co={ref:"centerFrontContainer",class:"centerdiv centerContainer"},xo={ref:"leftContainer",class:"leftContainer"},Eo={ref:"rightContainer",class:"rightContainer"},ko={ref:"bottomContainer",class:"bottomContainer"};zt.render=function(e,t,n,i,r,c){const y=g.resolveComponent("router-view");return g.openBlock(),g.createElementBlock("div",{class:"layoutContainer",style:g.normalizeStyle(e.containerStyle)},[g.createElementVNode("div",wo,[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(e.topContainerComponents,([w,b])=>(g.openBlock(),g.createBlock(g.resolveDynamicComponent(b),{key:w}))),128))],512),g.createElementVNode("div",null,[g.createCommentVNode(" \u5E95\u5C42-\u4E3B\u5BB9\u5668 "),g.createElementVNode("div",bo,[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(e.centerbackComponents,([w,b])=>(g.openBlock(),g.createBlock(g.resolveDynamicComponent(b),{key:w}))),128))],512),g.createCommentVNode(" \u4E3B\u8981\u5BB9\u5668 "),g.createElementVNode("div",So,[g.createVNode(y,null,{default:g.withCtx(({Component:w})=>[(g.openBlock(),g.createBlock(g.resolveDynamicComponent(w)))]),_:1})],512),g.createCommentVNode(" \u6D6E\u52A8-\u4E3B\u5BB9\u5668 "),g.createElementVNode("div",Co,[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(e.centerfrontComponents,([w,b])=>(g.openBlock(),g.createBlock(g.resolveDynamicComponent(b),{key:w}))),128))],512),g.createElementVNode("div",xo,[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(e.leftContainerComponents,([w,b])=>(g.openBlock(),g.createBlock(g.resolveDynamicComponent(b),{key:w}))),128))],512),g.createElementVNode("div",Eo,[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(e.rightContainerComponents,([w,b])=>(g.openBlock(),g.createBlock(g.resolveDynamicComponent(b),{key:w}))),128))],512)]),g.createElementVNode("div",ko,[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(e.bottomContainerComponents,([w,b])=>(g.openBlock(),g.createBlock(g.resolveDynamicComponent(b),{key:w}))),128))],512)],4)},zt.__file="src/controls/layoutcontainer/layout.vue";const qe=new Map,Mt=new Map;let Ge;const zo={getDefaultClient(){if(Ge||(Ge=new be(SysConfig.DefaultHproseAPI)),!Ge)throw Error("HproseProxy\u5BF9\u8C61\u4E3A\u7A7A");return Ge},registerHprose(e,t){const n=Mt.get(e);if(!n){const i=new be(t);qe.set(e,i)}return n},getHprose:e=>Mt?.get(e),getProxyHprose:e=>qe.get(e),unregisterHprose(e){qe.get(e)&&(Mt.delete(e),qe.delete(e))}},fe={Login:"/api/Login/Login",CheckLogin:"\u200B/api\u200B/Check\u200B/Login",Logout:"/api/Check/ExitLogin",ChangePWD:"/api/UserManager/UpdateUserPWD",RefreshToken:"/api/Check/RefreshToken",CheckToken:"/api/Check/CheckToken"},Mo=I.Config.ServiceURL.LoginAuthURL;function _t(){const e=cn();e&&te(fe.RefreshToken,Mo,{refreshToken:e}).then(t=>{Xe(t.data)})}function Rn(e){I.User||(I.User={id:e.id,name:e.name,issystem:e.issystem,issecurity:e.issecurity,appkey:e.appkey,role:e.role,doubleToken:{accessToken:{tokenContent:e.token,expires:e.expire},refreshToken:{tokenContent:e.refresh,expires:e.expire}}});const t=new Date().getTime(),n=new Date(e.expire).getTime()-t;n>0&&(n<=4e3?_t():setTimeout(_t,n-4e3))}function Xe(e){I.User&&(I.User.doubleToken=e);const t=new Date().getTime(),n=new Date(e.accessToken.expires).getTime()-t;if(n>0&&I.User){let i=he();if(!i){const r=I.User.doubleToken;i={id:I.User.id,name:I.User.name,token:r?r.accessToken.tokenContent:"",expire:r?r.accessToken.expires:"",refresh:r?r.accessToken.tokenContent:"",issystem:I.User.issystem,issecurity:I.User.issecurity,appkey:I.User.appkey,role:I.User.role}}i.token=e.accessToken.tokenContent,i.expire=e.accessToken.expires,i.refresh=e.refreshToken.tokenContent,ce.set("access_token",i,n/1e3),Rn(i)}else ce.remove("access_token")}function Lt(e){I.User=e}const Ce=I.Config.ServiceURL.LoginAuthURL,Bt=new Le("",sessionStorage);function In(){return Bt.get("ROLE_SYSTEM_RIGHT")}function Pn(e){Bt.set("ROLE_SYSTEM_RIGHT",e)}function Tn(){Bt.remove("ROLE_SYSTEM_RIGHT")}const Rt=[],It=[],Pt=[];function xe(){return In()}function An(e,t){const n={...e};return n.meta||(n.meta={}),t.index!=null&&(n.meta.index=t.index),t.title!=null&&(n.meta.title=t.title),e.children&&(n.children=[],t.children&&t.children.forEach(i=>{const r=e.children?.find(c=>c.path===i.path);if(r){const c=An(r,i);c&&n.children?.push(c)}})),n}function Dn(e,t){const n={...e};return t.index!=null&&(n.index=t.index),e.children&&(n.children=[],t.children&&t.children.forEach(i=>{const r=e.children?.find(c=>c.name===i.name);if(r){const c=Dn(r,i);c&&n.children?.push(c)}})),n}exports.BigFileDownload=class{fileID;downloadURL;ChunkUnitM=1048576;chunkByteSize;totalChunks=1;currentDB;keys;fileMetaData=null;finishNum=0;eventTarget;cancelSource;isStarting=!1;fileName;cacheSize=6;requestTimeout=6e4;constructor(e,t,n=3,i=6,r=6e4){this.fileID=e,this.downloadURL=t,this.chunkByteSize=n*this.ChunkUnitM,this.eventTarget=lt(),this.initIndexDB(),i>=3&&(this.cacheSize=i),r>this.requestTimeout&&(this.requestTimeout=r)}on(e,t){this.eventTarget.on(e,t)}dispatch(e,t){this.eventTarget.emit(e,t)}dispatchError(e){this.eventTarget.emit("error",e)}dispatchInfo(e){this.eventTarget.emit("info",e)}async queryDownloadFileMeta(e,t="",n){this.dispatchInfo("\u5F00\u59CB\u83B7\u53D6\u6587\u4EF6\u4FE1\u606F");const i=await te(t,e,n);let r=null;return i&&i.status===200&&(r=i.data),r}async getIFileMeta(){if(this.fileMetaData===null){const e=await this.currentDB?.getItem("fileinfo");this.fileMetaData=e||null}return this.fileMetaData}initIndexDB(){this.currentDB=Pe.createInstance({name:this.fileID,driver:Pe.INDEXEDDB})}async init(e){if(this.finishNum=0,e){const t="fileinfo";this.fileMetaData={id:e.id,name:e.name,length:e.length,downloadID:e.downloadID,chunkSize:this.chunkByteSize},this.fileName=e.name,this.currentDB?.setItem(t,this.fileMetaData)}if(this.fileMetaData!=null){const t=this.fileMetaData.chunkSize;t!=null&&t>0&&(this.chunkByteSize=t)}this.fileMetaData&&(this.totalChunks=Math.ceil(this.fileMetaData.length/this.chunkByteSize)),this.dispatchInfo("\u5B8C\u6210\u521D\u59CB\u5316\u6587\u4EF6\u4FE1\u606F\uFF0C\u603B\u5206\u7247\uFF1A"+this.totalChunks),this.currentDB&&(this.keys=await this.currentDB.keys())}getTotalChunks(){return this.totalChunks}pause(){this.cancelSource&&this.isStarting&&(this.cancelSource.cancel(),this.isStarting=!1),this.dispatchInfo("\u5DF2\u6682\u505C\u4E0B\u8F7D\u4EFB\u52A1")}restart(){this.dispatchInfo("\u6B63\u5728\u91CD\u542F\u4E0B\u8F7D\u4EFB\u52A1"),this.download()}delete(){this.cancelSource&&this.cancelSource.cancel(),Pe.dropInstance({name:this.fileID}),this.currentDB=void 0,this.keys&&(this.keys.length=0,this.keys=void 0),this.finishNum=0,this.downloadProgress(),this.outputProgress(0),this.dispatchInfo("\u5DF2\u5220\u9664\u4E0B\u8F7D\u4EFB\u52A1")}sleep(e){return new Promise(t=>setTimeout(t,e))}async download(e,t){let n=e;if(!n&&this.downloadURL&&(n=this.downloadURL),!n)throw Error("\u4E0B\u8F7DURL\u4E0D\u80FD\u4E3A\u7A7A!");this.currentDB||this.initIndexDB();const i=I.Axios.CancelToken;this.cancelSource=i.source(),this.isStarting=!0;const r={key:this.fileMetaData?.downloadID};let c=0;const y=this.cacheSize;let w=0;for(let b=0;b<this.totalChunks;b++){if(this.keys&&this.keys?.indexOf(b.toString())>=0){c++,c>this.finishNum&&(this.finishNum=c,this.downloadProgress());continue}const x=b*this.chunkByteSize;let k=x+this.chunkByteSize-1;this.fileMetaData&&k>this.fileMetaData.length&&(k=this.fileMetaData.length-1);const _={range:`bytes=${x}-${k}`};for(;w>=y;)await this.sleep(200);const R=b.toString();this.dispatchInfo(`\u5F00\u59CB\u4E0B\u8F7D\u5206\u7247${b+1}/${this.totalChunks}`),w++,te(n,t,r,_,"arraybuffer",this.cancelSource?.token,this.requestTimeout).then(async N=>{const P=N.data;w--,await this.currentDB?.setItem(R,P),c++,c>this.finishNum&&(this.finishNum=c,this.downloadProgress());const S=parseInt(R)+1;this.dispatchInfo(`\u5B8C\u6210\u4E0B\u8F7D\u5206\u7247${S}/${this.totalChunks}`),this.savefile()}).catch(N=>{w--;const P=parseInt(R)+1;this.dispatchError(`\u4E0B\u8F7D\u7B2C${P}\uFF09\u4E2A\u5206\u7247\u5185\u5BB9\u5931\u8D25\uFF01`)})}this.finishNum===this.totalChunks&&this.savefile()}downloadProgress(){const e=100*this.finishNum/this.totalChunks;this.dispatch("downloadProgress",e)}outputProgress(e){const t=100*e/this.totalChunks;this.dispatch("saveProgress",t)}async savefile(){if(this.finishNum===this.totalChunks){if(!this.fileName)return void this.dispatchError("\u4E0B\u8F7D\u9519\u8BEF\uFF1A\u6587\u4EF6\u540D\u4E3A\u7A7A!");this.dispatchInfo("\u5F00\u59CB\u4FDD\u5B58\u4E0B\u8F7D\u6587\u4EF6:"+this.fileName);const e=Qi.createWriteStream(this.fileName).getWriter();let t=0;for(let n=0;n<this.totalChunks;n++){const i=n.toString();let r=await this.currentDB?.getItem(i);if(r||(r=await this.currentDB?.getItem(i)),!r)return void this.dispatchError(`\u8F93\u51FA\u5206\u7247\u7B2C${n+1}\uFF09\u4E2A\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u9519\u8BEF\u9000\u51FA\uFF01`);let c=new Response(r).body;if(c===null)return void this.dispatchError(`\u8F93\u51FA\u5206\u7247\u7B2C${n+1}\uFF09\u4E2A\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u9519\u8BEF\u9000\u51FA\uFF01`);const y=c.getReader();for(;;){const{done:w,value:b}=await y.read();if(w)break;await e.write(b)}t++,this.outputProgress(t),this.dispatchInfo(`\u5B8C\u6210\u7B2C${n+1}\u4E2A\u5206\u7247\u8F93\u51FA`)}e.close(),Pe.dropInstance({name:this.fileID}),this.dispatch("success"),this.isStarting=!1,this.dispatchInfo("\u5B8C\u6210\u6587\u4EF6\u4E0B\u8F7D")}}},exports.Download=Ie,exports.DownloadByUrl=function({url:e,target:t="_blank",fileName:n}){const i=new URL(e).host==location.host;return new Promise((r,c)=>{if(i){const y=document.createElement("a");if(y.href=e,y.target=t,y.download!==void 0&&(y.download=n||an(e)),document.createEvent){const w=document.createEvent("MouseEvents");return w.initEvent("click",!0,!0),y.dispatchEvent(w),r(!0)}return e.indexOf("?")===-1&&(e+="?download"),window.open(e,t),r(!0)}{const y=document.createElement("canvas"),w=document.createElement("img");w.setAttribute("crossOrigin","Anonymous"),w.src=e,w.onload=b=>{y.width=w.width,y.height=w.height,y.getContext("2d").drawImage(w,0,0,w.width,w.height),y.toBlob(x=>{if(x){const k=document.createElement("a");k.href=window.URL.createObjectURL(x),k.download=an(e),k.click(),URL.revokeObjectURL(k.href),r(!0)}},"image/jpeg")},w.onerror=b=>c(b)}})},exports.Global=I,exports.GlobalHprose=zo,exports.GlobalMitt=ve,exports.H5Tool=re,exports.HproseClient=Ee,exports.HttpDownload=(e,t,n)=>{e.get(t).then(function(i){Ie(i.data,n)}).catch(i=>{console.warn(i),ve.emit(G.CommonWarnEvent,"\u4E0B\u8F7D\u6587\u4EF6\u62A5\u9519\uFF01")})},exports.JsonDownload=sn,exports.LayoutContainer=zt,exports.LayoutManager=class{layoutState;widgetCofig;layoutMap=new Map;preConditionMap=new Map;widgetsLoadedSet=new Set;constructor(e,t){this.layoutState=e,this.widgetCofig=t,this.widgetCofig.forEach(n=>{if(n.afterid)if(this.preConditionMap.has(n.afterid))this.preConditionMap.get(n.afterid)?.add(n);else{const i=new Set;i.add(n),this.preConditionMap.set(n.afterid,i)}})}getWidgetConfig(){return this.widgetCofig}preloadWidgets(){this.widgetCofig.filter(e=>e.preload&&!e.afterid).forEach(e=>{this._loadWidget(e,this.loadOtherDependenceWidgets.bind(this))})}loadWidget(e){if(!e)return;let t;de(e)?t=e:Te(e)&&(t=this.widgetCofig.find(n=>n.id===e)),t&&this._loadWidget(t,this.loadOtherDependenceWidgets.bind(this))}loadOtherDependenceWidgets(e){this.preConditionMap.has(e)&&this.preConditionMap.get(e)?.forEach(t=>{t.preload&&this._loadWidget(t)})}_loadWidget(e,t){if(!this.widgetsLoadedSet.has(e.id))return e.component().then(n=>{if(n.default){const i=g.markRaw(n.default);this.getContainerComponents(e.container).value.set(e.id,i),this.widgetsLoadedSet.add(e.id),I.EventBus.emit(G.WidgetLoadedEvent,e.id),t&&t(e.id)}})}hasDependentWidgets(e){let t=!1;if(this.preConditionMap.has(e)){const n=this.preConditionMap.get(e);if(n){for(const i of n)if(this.isWidgetLoaded(i.id)){t=!0;break}}}return t}unloadWidget(e){if(!e||!this.isWidgetLoaded(e))return;const t=this.widgetCofig.find(n=>n.id===e);if(t){if(this.preConditionMap.has(e)){const n=this.preConditionMap.get(e);if(n)for(const i of n)this.unloadWidget(i.id)}this.getContainerComponents(t.container).value.delete(e),this.widgetsLoadedSet.delete(e),I.EventBus.emit(G.WidgetUnLoadedEvent,e)}}isWidgetLoaded(e){return this.widgetsLoadedSet.has(e)}splitTwoContainer(e=!1){const t=this.layoutState.centerMainContainer,n=this.layoutState.centerBackContainer;e?(t&&(t.style.left="0",t.style.width="100%"),n&&(n.style.width="100%")):(t&&(t.style.left="50%",t.style.width="50%"),n&&(n.style.width="50%"))}getLayoutContainer(e){switch(e){case exports.LayoutContainerEnum.top:return this.layoutState.topContainer;case exports.LayoutContainerEnum.bottom:return this.layoutState.bottomContainer;case exports.LayoutContainerEnum.left:return this.layoutState.leftContainer;case exports.LayoutContainerEnum.right:return this.layoutState.rightContainer;case exports.LayoutContainerEnum.centerBack:return this.layoutState.centerBackContainer;case exports.LayoutContainerEnum.centerMain:return this.layoutState.centerMainContainer;case exports.LayoutContainerEnum.centerFront:return this.layoutState.centerFrontContainer}}changeContainerVisible(e,t=!1){const n=this.getLayoutContainer(e);n&&(n.style.visibility=t?"visible":"hidden")}changeWidgetVisible(e,t=!1){const n=this.getWidgetComponent(e);n&&I.EventBus.emit(G.WidgetVisibleChanged,{id:e,name:n.name,visible:t})}getWidgetComponent(e){if(this.widgetsLoadedSet.has(e)){const t=this.widgetCofig.find(n=>n.id===e);if(t)return this.getContainerComponents(t.container).value.get(e)}}getWigetItem(e){return this.widgetCofig.find(t=>t.id===e)}getGroupWigetItems(e){return this.widgetCofig.filter(t=>t.group===e)}getContainerComponents(e){if(this.layoutMap.has(e))return this.layoutMap.get(e);{const t=g.ref(new Map);return this.layoutMap.set(e,t),t}}addContainerComponent(e,t){}},exports.ObjToUrlParams=function(e,t){let n="",i="";for(const r in t)n+=r+"="+encodeURIComponent(t[r])+"&";return n=n.replace(/&$/,""),i=/\?$/.test(e)?e+n:e.replace(/\/?$/,"?")+n,i},exports.Pane=it,exports.ProxyClient=be,exports.SaveAs=function(e,t){const n=window.URL||window.webkitURL||window,i=new Blob([e]),r=document.createElement("a");r.href=n.createObjectURL(i),r.download=t,r.click(),n.revokeObjectURL(r.href)},exports.Splitpanes=Ai,exports.Storage=Le,exports.StringUtils=_e,exports.StyleBlack={window:{color:"#fff",boxShadow:"0 0 6pt rgba(255, 255, 255, 0.75)",backgroundColor:"rgba(31, 31, 31, 0.9)"},titlebar:{backgroundColor:"rgba(63, 63, 63, 0.9)"},content:{},button:{color:"white"},buttonHover:{backgroundColor:"rgba(255, 255, 255, 0.25)"},buttonActive:{color:"black",backgroundColor:"rgba(255, 255, 255, 0.5)"}},exports.StyleGrayblue={window:{color:"#fff",fontSize:"14px",boxShadow:"0 0 3pt rgba(255, 255, 255, 0.75)",backgroundColor:"rgba(4,51,81,0.6)",borderRadius:"5px"},titlebar:{backgroundColor:"rgba(4,51,81,0.8)",border:"1px solid rgba(153, 153, 153, 0.5)",borderRadius:"5px",fontSize:"16px",fontWeight:400,color:"#fff"},content:{},button:{color:"white",fontSize:"18px"},buttonHover:{backgroundColor:"rgba(255, 255, 255, 0.25)"},buttonActive:{color:"black",backgroundColor:"rgba(255, 255, 255, 0.5)"}},exports.StyleMetal={window:{color:"#000",boxShadow:"0 4pt 8pt rgba(0, 0, 0, 0.5)",background:"linear-gradient(to bottom, rgb(215, 215, 215), rgb(191, 191, 191))"},titlebar:{background:"linear-gradient(to bottom, rgb(215, 215, 215), rgb(191, 191, 191))"},content:{},button:{color:"#000"},buttonHover:{backgroundColor:"rgba(0, 0, 0, 0.25)"},buttonActive:{color:"#fff",backgroundColor:"rgba(0, 0, 0, 0.5)"}},exports.StyleWhite={window:{color:"#000",boxShadow:"0 2pt 4pt rgba(0, 0, 0, 0.5)",backgroundColor:"rgba(239, 239, 239, 0.95)"},titlebar:{backgroundColor:"rgba(191, 191, 191, 0.9)"},content:{},button:{color:"#000"},buttonHover:{backgroundColor:"rgba(0, 0, 0, 0.25)"},buttonActive:{color:"#fff",backgroundColor:"rgba(0, 0, 0, 0.5)"}},exports.SysEvents=G,exports.TOKEN_REFRESH_TIME=4e3,exports.USER_TOKEN_API=fe,exports.VCollapsiblePanel=Ne,exports.VCollapsiblePanelGroup=De,exports.VWindow=He,exports.WindowResizeEvent=Ln,exports.WindowType=vo,exports.calculateBestTextColor=function(e){const t=at(e.substring(1));var n,i;return n=t.split(","),i=[0,0,0],(rn(~~n[0],~~n[1],~~n[2])+.05)/(rn(i[0],i[1],i[2])+.05)>=12?"#000000":"#FFFFFF"},exports.changePWD=function(e){return te(fe.ChangePWD,Ce,e)},exports.checkDoRefreshToken=Rn,exports.checkLogin=async function(e){const t=(await te(fe.CheckLogin,Ce,e))?.data;return t&&t.isSuccess&&(Lt(t.resultValue),Xe(t.resultValue.doubleToken)),t},exports.checkToken=function(e){return te(fe.CheckToken,Ce,{token:e})},exports.clearLocalToken=ht,exports.clearRight=Tn,exports.colorIsDark=function(e){if(!Re(e))return;const[t,n,i]=at(e).replace(/(?:\(|\)|rgb|RGB)*/g,"").split(",").map(r=>Number(r));return .299*t+.578*n+.114*i<192},exports.createFileUpload=e=>new Yi(e),exports.darken=function(e,t){return e=e.indexOf("#")>=0?e.substring(1,e.length):e,t=Math.trunc(255*t/100),`#${ut(e.substring(0,2),t)}${ut(e.substring(2,4),t)}${ut(e.substring(4,6),t)}`},exports.deepMerge=function e(t={},n={}){let i;for(i in n)t[i]=de(t[i])?e(t[i],n[i]):t[i]=n[i];return t},exports.doRefreshToken=_t,exports.exportSystemRights=bn,exports.get=function(e,t){return te(e,void 0,t)},exports.getCurrentSystemRight=xe,exports.getData=function(e,t){return I.Axios?.get(e,{params:t}).catch(function(n){console.error(n);const i=`\u5916\u90E8Get\u670D\u52A1\u8BF7\u6C42\u9519\u8BEF\uFF1A${e}`;I.EventBus.emit(G.AxiosRequestErrorEvent,i)})},exports.getFunctions=function(e){if(I.User?.issystem)return e;const t=xe();return t?t.functions:void 0},exports.getHexColor=function(e){const t=e.toLowerCase().replace(/rgb?a?\(/,"").replace(/\)/,"").replace(/[\s+]/g,"").split(","),n=parseFloat(t[3]||"1"),i=Math.floor(n*parseInt(t[0])+255*(1-n)),r=Math.floor(n*parseInt(t[1])+255*(1-n)),c=Math.floor(n*parseInt(t[2])+255*(1-n));return"#"+("0"+i.toString(16)).slice(-2)+("0"+r.toString(16)).slice(-2)+("0"+c.toString(16)).slice(-2)},exports.getLocalToken=he,exports.getLockState=function(){return ce.get("is_LockScreen",!1)},exports.getLongHexColor=function(e){const t=e;if(t.length===4){let i="#";for(var n=1;n<4;n+=1){const r=t.slice(n,n+1);i+=r.concat(r)}return i}return t},exports.getProxyClient=ln,exports.getRGBColor=function(e){var t=e.toLowerCase();if(Re(e)){if(t.length===4){for(var n="#",i=1;i<4;i+=1){const c=t.slice(i,i+1);n+=c.concat(c)}t=n}var r=[];for(i=1;i<7;i+=2)r.push(parseInt("0x"+t.slice(i,i+2)));return"rgb("+r.join(",")+")"}return t},exports.getRGBColorFromHSLA=function(e){if(!!e){var t=e.toLowerCase().match(/^hsla?\(\s*(\d{1,3})\s*,\s*(\d{1,3}\%)\s*,\s*(\d{1,3}\%)\s*(?:\s*,\s*(\d+(?:\.\d+)?)\s*)?\)$/i);if(!!t){var n,i,r,c=(parseFloat(t[1])%360+360)%360/360,y=parseFloat(t[2])/(/%$/.test(t[2])?100:1),w=parseFloat(t[3])/(/%$/.test(t[3])?100:1);if(y===0)n=i=r=w;else{var b=w<=.5?w*(y+1):w+y-w*y,x=2*w-b;n=st(x,b,c+1/3),i=st(x,b,c),r=st(x,b,c-1/3)}return`rgba(${n=Math.round(255*n)},${i=Math.round(255*i)},${r=Math.round(255*r)},${t[4]?parseFloat(t[4]):1})`}}},exports.getRefreshToken=cn,exports.getRight=In,exports.getRoutes=function(e){if(I.User?.issystem)return e;const t=xe();return t&&t.routes?(Pt.length>0||e.forEach(n=>{const i=t.routes?.find(r=>r.name===n.name);if(i){const r=An(n,i);r&&Pt.push(r)}}),Pt):void 0},exports.getSystemRoleRight=async function(e,t,n,i){if(Tn(),!I.User)return;let r;if(i)r=i;else{if(!t)return;let c=n;c||(c=I.Config.ServiceURL.LoginAuthURL);const y=await te(t,c,{system:e});if(!y||!y.data)return void I.Message?.warn("\u65E0\u6CD5\u83B7\u53D6\u529F\u80FD\u6388\u6743\u5217\u8868\uFF01");r=y.data}return r&&Pn(r),r},exports.getWidgetConfig=function(e){if(I.User?.issystem)return e;const t=xe();return t&&t.widgets?(Rt.length>0||e?.forEach(n=>{t.widgets?.find(i=>i.id===n.id)&&Rt.push(n)}),Rt):void 0},exports.getWidgetMenus=function(e){if(I.User?.issystem)return e;const t=xe();return t&&t.widgetMenu?(It.length>0||e.forEach(n=>{const i=t.widgetMenu?.find(r=>r.name===n.name);if(i){const r=Dn(n,i);r&&It.push(r)}}),It):void 0},exports.hexToRGB=at,exports.init=un,exports.initDefaultProxyClient=function(e){const t=ln(e);return t&&(I.DefaultProxyClient=t),t},exports.initXFrame=function(e){un(e.message,e.defaultHproseURL),e.config&&(I.Config=e.config)},exports.is=V,exports.isArray=wn,exports.isAsyncFunction=function(e){return V(e,"AsyncFunction")},exports.isBoolean=function(e){return e===!0||e===!1||V(e,"Boolean")},exports.isClient=()=>typeof window<"u",exports.isDate=function(e){return V(e,"Date")},exports.isDef=yn,exports.isElement=e=>de(e)&&!!e.tagName,exports.isEmpty=function(e){return e==null||(Te(e)||wn(e)?e.length===0:!!de(e)&&JSON.stringify(e)==="{}")},exports.isEnumColor=function(e){if(typeof e=="object"||!e)return;const t=e.toLowerCase().substr(0,1);return t==="#"?exports.EnumColor.Hex:t==="r"||t==="("?exports.EnumColor.RGBA:t==="h"?exports.EnumColor.Hsla:exports.EnumColor.RGBA},exports.isError=function(e){return V(e,"Error")},exports.isFunction=wt,exports.isHexColor=Re,exports.isImageDom=function(e){return e&&["IMAGE","IMG"].includes(e.tagName)},exports.isMap=function(e){return V(e,"Map")},exports.isNull=St,exports.isNullAndUnDef=function(e){return bt(e)&&St(e)},exports.isNullOrUnDef=function(e){return bt(e)||St(e)},exports.isNumber=function(e){return V(e,"Number")},exports.isObject=de,exports.isPromise=function(e){return V(e,"Promise")&&de(e)&&wt(e.then)&&wt(e.catch)},exports.isServer=to,exports.isString=Te,exports.isSymbol=function(e){return V(e,"Symbol")},exports.isUnDef=bt,exports.isValidURL=e=>/^(https?|ftp):\/\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}|([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:[0-9]+)*(\/($|[a-zA-Z0-9.,?'\\+&%$#=~_-]+))*$/.test(e),exports.isWeakMap=function(e){return V(e,"WeakMap")},exports.isWeakSet=function(e){return V(e,"WeakSet")},exports.isWindow=e=>typeof window<"u"&&V(e,"Window"),exports.jquery=Ji,exports.lighten=function(e,t){return e=e.indexOf("#")>=0?e.substring(1,e.length):e,t=Math.trunc(255*t/100),`#${ct(e.substring(0,2),t)}${ct(e.substring(2,4),t)}${ct(e.substring(4,6),t)}`},exports.login=async function(e){const t=(await te(fe.Login,Ce,e))?.data;return t&&t.isSuccess&&(Lt(t.resultValue),Xe(t.resultValue.doubleToken)),t},exports.logout=function(){const e=he();e&&(pt(fe.Logout,Ce,{token:e.token,reftoken:e.refresh}),ht())},exports.newGuid=function(){var e=new Date().getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var n=(e+16*Math.random())%16|0;return e=Math.floor(e/16),(t==="x"?n:3&n|8).toString(16)})},exports.onLockListener=function(){yt(),document.addEventListener("mousedown",yt)},exports.post=function(e,t){return pt(e,void 0,t)},exports.requestGet=te,exports.requestPost=pt,exports.requestPostBody=function(e,t,n,i,r,c="json",y){const w=ft(i,t,r,c);return y&&y>=2e4&&(w.timeout=y),I.Axios?.post(e,n,w).catch(function(b){console.error(b);const x=`post\u8BF7\u6C42\u9519\u8BEF\uFF1A${t}${e}`;I.EventBus.emit(G.AxiosRequestErrorEvent,x)})},exports.rgbToHex=function(e,t,n){const i=(e<<16|t<<8|n).toString(16);return"#"+new Array(Math.abs(i.length-7)).join("0")+i},exports.setLocalToken=Xe,exports.setRight=Pn,exports.setUser=Lt,exports.sleep=function(e){for(var t=new Date().getTime();new Date().getTime()-t<e;);console.log(`\u5F3A\u5236\u7B49\u5F85${e}\u6BEB\u79D2`)},exports.storage=Ni,exports.storageHelper=ce,exports.unLockListener=function(){document.removeEventListener("mousedown",yt)},exports.uuid=Be,exports.writeIconifyList=function(e,t="IconifyList.ts"){let n="",i=`const iconlist={
|
|
13
13
|
`,r=0;e.forEach(c=>{const y=c.split(":");if(y&&y.length===2){const w="icon"+r;n+=`import ${w} from '~icons/${y[0]}/${y[1]}'
|
|
14
14
|
`,i+=` '${c}':${w},
|
|
15
15
|
`,r++}}),r>0&&(i+=`};
|
package/dist/index.css
CHANGED
|
@@ -1,3 +1,144 @@
|
|
|
1
|
+
.splitpanes {
|
|
2
|
+
display: flex;
|
|
3
|
+
width: 100%;
|
|
4
|
+
height: 100%;
|
|
5
|
+
}
|
|
6
|
+
.splitpanes--vertical {
|
|
7
|
+
flex-direction: row;
|
|
8
|
+
}
|
|
9
|
+
.splitpanes--horizontal {
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
}
|
|
12
|
+
.splitpanes--dragging * {
|
|
13
|
+
user-select: none;
|
|
14
|
+
}
|
|
15
|
+
.splitpanes__pane {
|
|
16
|
+
width: 100%;
|
|
17
|
+
height: 100%;
|
|
18
|
+
overflow: hidden;
|
|
19
|
+
}
|
|
20
|
+
.splitpanes--vertical .splitpanes__pane {
|
|
21
|
+
transition: width 0.2s ease-out;
|
|
22
|
+
}
|
|
23
|
+
.splitpanes--horizontal .splitpanes__pane {
|
|
24
|
+
transition: height 0.2s ease-out;
|
|
25
|
+
}
|
|
26
|
+
.splitpanes--dragging .splitpanes__pane {
|
|
27
|
+
transition: none;
|
|
28
|
+
}
|
|
29
|
+
.splitpanes__splitter {
|
|
30
|
+
touch-action: none;
|
|
31
|
+
}
|
|
32
|
+
.splitpanes--vertical > .splitpanes__splitter {
|
|
33
|
+
min-width: 1px;
|
|
34
|
+
cursor: col-resize;
|
|
35
|
+
}
|
|
36
|
+
.splitpanes--horizontal > .splitpanes__splitter {
|
|
37
|
+
min-height: 1px;
|
|
38
|
+
cursor: row-resize;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.splitpanes.default-theme .splitpanes__pane {
|
|
42
|
+
background-color: #f2f2f2;
|
|
43
|
+
}
|
|
44
|
+
.splitpanes.default-theme .splitpanes__splitter {
|
|
45
|
+
background-color: #fff;
|
|
46
|
+
box-sizing: border-box;
|
|
47
|
+
position: relative;
|
|
48
|
+
flex-shrink: 0;
|
|
49
|
+
}
|
|
50
|
+
.splitpanes.default-theme .splitpanes__splitter:before, .splitpanes.default-theme .splitpanes__splitter:after {
|
|
51
|
+
content: "";
|
|
52
|
+
position: absolute;
|
|
53
|
+
top: 50%;
|
|
54
|
+
left: 50%;
|
|
55
|
+
background-color: rgba(0, 0, 0, 0.15);
|
|
56
|
+
transition: background-color 0.3s;
|
|
57
|
+
}
|
|
58
|
+
.splitpanes.default-theme .splitpanes__splitter:hover:before, .splitpanes.default-theme .splitpanes__splitter:hover:after {
|
|
59
|
+
background-color: rgba(0, 0, 0, 0.25);
|
|
60
|
+
}
|
|
61
|
+
.splitpanes.default-theme .splitpanes__splitter:first-child {
|
|
62
|
+
cursor: auto;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.default-theme.splitpanes .splitpanes .splitpanes__splitter {
|
|
66
|
+
z-index: 1;
|
|
67
|
+
}
|
|
68
|
+
.default-theme.splitpanes--vertical > .splitpanes__splitter,
|
|
69
|
+
.default-theme .splitpanes--vertical > .splitpanes__splitter {
|
|
70
|
+
width: 7px;
|
|
71
|
+
border-left: 1px solid #eee;
|
|
72
|
+
margin-left: -1px;
|
|
73
|
+
}
|
|
74
|
+
.default-theme.splitpanes--vertical > .splitpanes__splitter:before, .default-theme.splitpanes--vertical > .splitpanes__splitter:after,
|
|
75
|
+
.default-theme .splitpanes--vertical > .splitpanes__splitter:before,
|
|
76
|
+
.default-theme .splitpanes--vertical > .splitpanes__splitter:after {
|
|
77
|
+
transform: translateY(-50%);
|
|
78
|
+
width: 1px;
|
|
79
|
+
height: 30px;
|
|
80
|
+
}
|
|
81
|
+
.default-theme.splitpanes--vertical > .splitpanes__splitter:before,
|
|
82
|
+
.default-theme .splitpanes--vertical > .splitpanes__splitter:before {
|
|
83
|
+
margin-left: -2px;
|
|
84
|
+
}
|
|
85
|
+
.default-theme.splitpanes--vertical > .splitpanes__splitter:after,
|
|
86
|
+
.default-theme .splitpanes--vertical > .splitpanes__splitter:after {
|
|
87
|
+
margin-left: 1px;
|
|
88
|
+
}
|
|
89
|
+
.default-theme.splitpanes--horizontal > .splitpanes__splitter,
|
|
90
|
+
.default-theme .splitpanes--horizontal > .splitpanes__splitter {
|
|
91
|
+
height: 7px;
|
|
92
|
+
border-top: 1px solid #eee;
|
|
93
|
+
margin-top: -1px;
|
|
94
|
+
}
|
|
95
|
+
.default-theme.splitpanes--horizontal > .splitpanes__splitter:before, .default-theme.splitpanes--horizontal > .splitpanes__splitter:after,
|
|
96
|
+
.default-theme .splitpanes--horizontal > .splitpanes__splitter:before,
|
|
97
|
+
.default-theme .splitpanes--horizontal > .splitpanes__splitter:after {
|
|
98
|
+
transform: translateX(-50%);
|
|
99
|
+
width: 30px;
|
|
100
|
+
height: 1px;
|
|
101
|
+
}
|
|
102
|
+
.default-theme.splitpanes--horizontal > .splitpanes__splitter:before,
|
|
103
|
+
.default-theme .splitpanes--horizontal > .splitpanes__splitter:before {
|
|
104
|
+
margin-top: -2px;
|
|
105
|
+
}
|
|
106
|
+
.default-theme.splitpanes--horizontal > .splitpanes__splitter:after,
|
|
107
|
+
.default-theme .splitpanes--horizontal > .splitpanes__splitter:after {
|
|
108
|
+
margin-top: 1px;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.vcpg {
|
|
112
|
+
border: 1px solid var(--border-color);
|
|
113
|
+
border-radius: 4px;
|
|
114
|
+
width: 100%;
|
|
115
|
+
}
|
|
116
|
+
.vcpg ::v-deep(.vcp) * {
|
|
117
|
+
box-sizing: border-box;
|
|
118
|
+
}
|
|
119
|
+
.vcpg ::v-deep(.vcp) .vcp__header {
|
|
120
|
+
background-color: var(--bg-color-header);
|
|
121
|
+
height: 30px;
|
|
122
|
+
border-bottom: 2px solid #c6bebd;
|
|
123
|
+
transition: background-color 0.3s ease;
|
|
124
|
+
}
|
|
125
|
+
.vcpg ::v-deep(.vcp) .vcp__header .vcp__header:hover {
|
|
126
|
+
background-color: var(--bg-color-header-hover);
|
|
127
|
+
}
|
|
128
|
+
.vcpg ::v-deep(.vcp) .vcp__header .vcp__header:active {
|
|
129
|
+
background-color: var(--bg-color-header-active);
|
|
130
|
+
}
|
|
131
|
+
.vcpg ::v-deep(.vcp) .vcp:not(:first-of-type) .vcp__header {
|
|
132
|
+
border-top: 2px solid var(--border-color);
|
|
133
|
+
}
|
|
134
|
+
.vcpg ::v-deep(.vcp) .vcp__header-title {
|
|
135
|
+
font-weight: 500;
|
|
136
|
+
}
|
|
137
|
+
.vcpg ::v-deep(.vcp) .vcp__body {
|
|
138
|
+
border-top: 1px solid var(--border-color);
|
|
139
|
+
background-color: var(--bg-color-body);
|
|
140
|
+
}
|
|
141
|
+
|
|
1
142
|
.vcp__header {
|
|
2
143
|
display: flex;
|
|
3
144
|
padding: 12px;
|
|
@@ -112,147 +253,6 @@
|
|
|
112
253
|
pointer-events: none;
|
|
113
254
|
}
|
|
114
255
|
|
|
115
|
-
.vcpg {
|
|
116
|
-
border: 1px solid var(--border-color);
|
|
117
|
-
border-radius: 4px;
|
|
118
|
-
width: 100%;
|
|
119
|
-
}
|
|
120
|
-
.vcpg ::v-deep(.vcp) * {
|
|
121
|
-
box-sizing: border-box;
|
|
122
|
-
}
|
|
123
|
-
.vcpg ::v-deep(.vcp) .vcp__header {
|
|
124
|
-
background-color: var(--bg-color-header);
|
|
125
|
-
height: 30px;
|
|
126
|
-
border-bottom: 2px solid #c6bebd;
|
|
127
|
-
transition: background-color 0.3s ease;
|
|
128
|
-
}
|
|
129
|
-
.vcpg ::v-deep(.vcp) .vcp__header .vcp__header:hover {
|
|
130
|
-
background-color: var(--bg-color-header-hover);
|
|
131
|
-
}
|
|
132
|
-
.vcpg ::v-deep(.vcp) .vcp__header .vcp__header:active {
|
|
133
|
-
background-color: var(--bg-color-header-active);
|
|
134
|
-
}
|
|
135
|
-
.vcpg ::v-deep(.vcp) .vcp:not(:first-of-type) .vcp__header {
|
|
136
|
-
border-top: 2px solid var(--border-color);
|
|
137
|
-
}
|
|
138
|
-
.vcpg ::v-deep(.vcp) .vcp__header-title {
|
|
139
|
-
font-weight: 500;
|
|
140
|
-
}
|
|
141
|
-
.vcpg ::v-deep(.vcp) .vcp__body {
|
|
142
|
-
border-top: 1px solid var(--border-color);
|
|
143
|
-
background-color: var(--bg-color-body);
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
.splitpanes {
|
|
147
|
-
display: flex;
|
|
148
|
-
width: 100%;
|
|
149
|
-
height: 100%;
|
|
150
|
-
}
|
|
151
|
-
.splitpanes--vertical {
|
|
152
|
-
flex-direction: row;
|
|
153
|
-
}
|
|
154
|
-
.splitpanes--horizontal {
|
|
155
|
-
flex-direction: column;
|
|
156
|
-
}
|
|
157
|
-
.splitpanes--dragging * {
|
|
158
|
-
user-select: none;
|
|
159
|
-
}
|
|
160
|
-
.splitpanes__pane {
|
|
161
|
-
width: 100%;
|
|
162
|
-
height: 100%;
|
|
163
|
-
overflow: hidden;
|
|
164
|
-
}
|
|
165
|
-
.splitpanes--vertical .splitpanes__pane {
|
|
166
|
-
transition: width 0.2s ease-out;
|
|
167
|
-
}
|
|
168
|
-
.splitpanes--horizontal .splitpanes__pane {
|
|
169
|
-
transition: height 0.2s ease-out;
|
|
170
|
-
}
|
|
171
|
-
.splitpanes--dragging .splitpanes__pane {
|
|
172
|
-
transition: none;
|
|
173
|
-
}
|
|
174
|
-
.splitpanes__splitter {
|
|
175
|
-
touch-action: none;
|
|
176
|
-
}
|
|
177
|
-
.splitpanes--vertical > .splitpanes__splitter {
|
|
178
|
-
min-width: 1px;
|
|
179
|
-
cursor: col-resize;
|
|
180
|
-
}
|
|
181
|
-
.splitpanes--horizontal > .splitpanes__splitter {
|
|
182
|
-
min-height: 1px;
|
|
183
|
-
cursor: row-resize;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
.splitpanes.default-theme .splitpanes__pane {
|
|
187
|
-
background-color: #f2f2f2;
|
|
188
|
-
}
|
|
189
|
-
.splitpanes.default-theme .splitpanes__splitter {
|
|
190
|
-
background-color: #fff;
|
|
191
|
-
box-sizing: border-box;
|
|
192
|
-
position: relative;
|
|
193
|
-
flex-shrink: 0;
|
|
194
|
-
}
|
|
195
|
-
.splitpanes.default-theme .splitpanes__splitter:before, .splitpanes.default-theme .splitpanes__splitter:after {
|
|
196
|
-
content: "";
|
|
197
|
-
position: absolute;
|
|
198
|
-
top: 50%;
|
|
199
|
-
left: 50%;
|
|
200
|
-
background-color: rgba(0, 0, 0, 0.15);
|
|
201
|
-
transition: background-color 0.3s;
|
|
202
|
-
}
|
|
203
|
-
.splitpanes.default-theme .splitpanes__splitter:hover:before, .splitpanes.default-theme .splitpanes__splitter:hover:after {
|
|
204
|
-
background-color: rgba(0, 0, 0, 0.25);
|
|
205
|
-
}
|
|
206
|
-
.splitpanes.default-theme .splitpanes__splitter:first-child {
|
|
207
|
-
cursor: auto;
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
.default-theme.splitpanes .splitpanes .splitpanes__splitter {
|
|
211
|
-
z-index: 1;
|
|
212
|
-
}
|
|
213
|
-
.default-theme.splitpanes--vertical > .splitpanes__splitter,
|
|
214
|
-
.default-theme .splitpanes--vertical > .splitpanes__splitter {
|
|
215
|
-
width: 7px;
|
|
216
|
-
border-left: 1px solid #eee;
|
|
217
|
-
margin-left: -1px;
|
|
218
|
-
}
|
|
219
|
-
.default-theme.splitpanes--vertical > .splitpanes__splitter:before, .default-theme.splitpanes--vertical > .splitpanes__splitter:after,
|
|
220
|
-
.default-theme .splitpanes--vertical > .splitpanes__splitter:before,
|
|
221
|
-
.default-theme .splitpanes--vertical > .splitpanes__splitter:after {
|
|
222
|
-
transform: translateY(-50%);
|
|
223
|
-
width: 1px;
|
|
224
|
-
height: 30px;
|
|
225
|
-
}
|
|
226
|
-
.default-theme.splitpanes--vertical > .splitpanes__splitter:before,
|
|
227
|
-
.default-theme .splitpanes--vertical > .splitpanes__splitter:before {
|
|
228
|
-
margin-left: -2px;
|
|
229
|
-
}
|
|
230
|
-
.default-theme.splitpanes--vertical > .splitpanes__splitter:after,
|
|
231
|
-
.default-theme .splitpanes--vertical > .splitpanes__splitter:after {
|
|
232
|
-
margin-left: 1px;
|
|
233
|
-
}
|
|
234
|
-
.default-theme.splitpanes--horizontal > .splitpanes__splitter,
|
|
235
|
-
.default-theme .splitpanes--horizontal > .splitpanes__splitter {
|
|
236
|
-
height: 7px;
|
|
237
|
-
border-top: 1px solid #eee;
|
|
238
|
-
margin-top: -1px;
|
|
239
|
-
}
|
|
240
|
-
.default-theme.splitpanes--horizontal > .splitpanes__splitter:before, .default-theme.splitpanes--horizontal > .splitpanes__splitter:after,
|
|
241
|
-
.default-theme .splitpanes--horizontal > .splitpanes__splitter:before,
|
|
242
|
-
.default-theme .splitpanes--horizontal > .splitpanes__splitter:after {
|
|
243
|
-
transform: translateX(-50%);
|
|
244
|
-
width: 30px;
|
|
245
|
-
height: 1px;
|
|
246
|
-
}
|
|
247
|
-
.default-theme.splitpanes--horizontal > .splitpanes__splitter:before,
|
|
248
|
-
.default-theme .splitpanes--horizontal > .splitpanes__splitter:before {
|
|
249
|
-
margin-top: -2px;
|
|
250
|
-
}
|
|
251
|
-
.default-theme.splitpanes--horizontal > .splitpanes__splitter:after,
|
|
252
|
-
.default-theme .splitpanes--horizontal > .splitpanes__splitter:after {
|
|
253
|
-
margin-top: 1px;
|
|
254
|
-
}
|
|
255
|
-
|
|
256
256
|
.window {
|
|
257
257
|
display: flex;
|
|
258
258
|
flex-flow: column;
|
package/dist/index.js
CHANGED
|
@@ -13,4 +13,4 @@ import{h as oo,openBlock as H,createElementBlock as tt,normalizeStyle as yt,rend
|
|
|
13
13
|
>
|
|
14
14
|
<path d="M6.34292 7.75734L4.92871 9.17155L11.9998 16.2426L19.0708 9.17158L17.6566 7.75737L11.9998 13.4142L6.34292 7.75734Z"/>
|
|
15
15
|
</svg>
|
|
16
|
-
`}}});const Pr={class:"vcp__header-title"},Br={key:0,class:"vcp__header-icon"},Ar=["innerHTML"],Tr={key:0,ref:"bodyRef",class:"vcp__body"},Dr={ref:"bodyContentRef",class:"vcp__body-content"};function Oe(e){return window.TouchEvent&&e instanceof TouchEvent}Zt.render=function(e,t,n,i,r,c){return H(),tt("section",{ref:"panelRef",class:so(["vcp",{"vcp--expanded":e.isExpanded,"vcp--expandable":e.body.hasContent}])},[K("header",{class:"vcp__header",onClick:t[0]||(t[0]=(...v)=>e.toggle&&e.toggle(...v))},[K("div",Pr,[ft(e.$slots,"title")]),e.body.hasContent?(H(),tt("div",Br,[ft(e.$slots,"icon",{},()=>[K("span",{innerHTML:e.toggleIcon},null,8,Ar)])])):zt("v-if",!0)]),Cn(xn,{"data-key":e.body.dataKey,name:"slide",onBeforeEnter:e.collapse,onEnter:e.expand,onBeforeLeave:e.expand,onLeave:e.collapse},{default:Wt(()=>[e.isExpanded?(H(),tt("div",Tr,[K("div",Dr,[ft(e.$slots,"content")],512)],512)):zt("v-if",!0)]),_:3},8,["data-key","onBeforeEnter","onEnter","onBeforeLeave","onLeave"])],2)},Zt.__scopeId="data-v-08c94cf8",Zt.__file="src/controls/collapsepanel/VCollapsiblePanel.vue";class Z{e;constructor(t){this.e=t}stopPropagation(){this.e.stopPropagation()}preventDefault(){this.e.preventDefault()}get clientX(){return Oe(this.e)?(this.e.type==="touchend"?this.e.changedTouches:this.e.touches).item(0).clientX:this.e.clientX}get clientY(){return Oe(this.e)?(this.e.type==="touchend"?this.e.changedTouches:this.e.touches).item(0).clientY:this.e.clientY}get clientCoord(){return new Ye(this.clientX,this.clientY)}static bindDown(t,n,i,r=!1){const c=y=>{n(new Z(y))},v=y=>{y.touches.length===1&&n(new Z(y)),y.touches.length>1&&i&&i(new Z(y))};return t.addEventListener("mousedown",c,r),t.addEventListener("touchstart",v,r),()=>{t.removeEventListener("mousedown",c,r),t.removeEventListener("touchstart",v,r)}}static bindMove(t,n,i=!1){const r=v=>{n(new Z(v))},c=v=>{v.touches.length===1&&n(new Z(v))};return t.addEventListener("mousemove",r,i),t.addEventListener("touchmove",c,i),()=>{t.removeEventListener("mousemove",r,i),t.removeEventListener("touchmove",c,i)}}static bindUp(t,n,i=!1){const r=v=>{n(new Z(v))},c=v=>{v.touches.length===0&&n(new Z(v))};return t.addEventListener("mouseup",r,i),t.addEventListener("touchend",c,i),()=>{t.removeEventListener("mouseup",r,i),t.removeEventListener("touchend",c,i)}}originalEvent({mouse:t,touch:n}){Oe(this.e)?n&&n(this.e):t&&t(this.e)}}class Ye{x;y;constructor(t,n){this.x=t,this.y=n}clone(){return new Ye(this.x,this.y)}}class Nr{handle;container;options;unbindDown;unbindMove;unbindUp;constructor(t,n,i={}){this.handle=t,this.container=n,this.options=i,t&&(this.unbindDown=Z.bindDown(t,this.mousedown),t.classList.add("draggable-handle"))}teardown(){this.handle?.classList.remove("draggable-handle"),this.unbindDown&&this.unbindDown(),this.unbindUp&&this.unbindUp(),this.unbindMove&&this.unbindMove()}offsetX;offsetY;mousedown=t=>{if(t.preventDefault(),this.handle){const{left:n,top:i}=this.handle.getBoundingClientRect();this.offsetX=t.clientX-n,this.offsetY=t.clientY-i}this.options.onMoveStart&&this.options.onMoveStart(),this.unbindMove=Z.bindMove(document,this.mousemove),this.unbindUp=Z.bindUp(document,this.mouseup)};mousemove=t=>{this.container&&(this.container.style.left=t.clientX-this.offsetX+"px",this.container.style.top=t.clientY-this.offsetY+"px"),this.options.onMove&&this.options.onMove()};mouseup=t=>{this.options.onMoveEnd&&this.options.onMoveEnd(),this.unbindUp(),this.unbindMove(),this.unbindUp=this.unbindMove=void 0}}class Ur{_group;onChange;zIndex;constructor(t,n){this._group=t,this.onChange=n,this.a(i=>i.push(this))}set group(t){this._group=t;const n=te(this._group),i=te(t);n.splice(n.indexOf(this),1),i.push(this),Jn()}get group(){return this._group}unregister(){this.a(t=>t.splice(t.indexOf(this),1))}raise(){this.a(t=>{t.splice(t.indexOf(this),1),t.push(this)})}a(t){t(te(this._group)),Jn()}}const Qt=new Map;function te(e){return Qt.has(e)||Qt.set(e,[]),Qt.get(e)}function Yn(e,t){return e>t?-Yn(t,e):e<0&&t>=0?1:e-t}function Jn(){let e=0;for(const t of function(n){const i=[];return n.forEach((r,c)=>i.push(c)),i}(Qt).sort(Yn))for(const n of te(t))e!=n.zIndex&&(n.zIndex=e,n.onChange(e)),e++}function je(e){if(e){const{width:t,height:n}=e.style;e.style.width="auto",e.style.height="auto";const i=ee(e);return e.style.width=t,e.style.height=n,i}return{width:0,height:0,top:0,left:0,bottom:0,right:0}}function ee(e){const t=e.getBoundingClientRect(),n=t.width,i=t.height,r=t.top,c=t.left;return{width:n,height:i,top:r,left:c,bottom:r+i,right:c+n}}class Or{container;options;handles;constructor(t,n){if(this.container=t,this.options=n,t&&n){this.handles=Zn.map(w=>new w(t,this));const{width:i,height:r}=je(t),c=n.maxWidth||window.innerWidth,v=n.maxHeight||window.innerHeight;let y=!1;(i<n.minWidth||i>c)&&(t.style.width=`${Qn(i,n.minWidth,c)}px`,y=!0),(r<n.minHeight||r>v)&&(t.style.height=`${Qn(r,n.minHeight,v)}px`,y=!0),y&&n.onResize&&n.onResize()}}teardown(){this.handles?.forEach(t=>t.teardown())}}const Zn=[];class gt{container;helper;handle;handleSize=8;unbindDown;unbindMove;unbindUp;constructor(t,n){this.container=t,this.helper=n,this.handle=this.createHandleElement(),this.unbindDown=Z.bindDown(this.handle,this.mousedown)}teardown(){this.unbindDown(),this.unbindUp&&this.unbindUp(),this.unbindMove&&this.unbindMove(),this.handle.parentElement.removeChild(this.handle)}x0;y0;left0;top0;width0;height0;mousedown=t=>{t.preventDefault(),t.stopPropagation();const{left:n,top:i,width:r,height:c}=ee(this.container);this.x0=t.clientX,this.y0=t.clientY,this.left0=n,this.top0=i,this.width0=r,this.height0=c,this.calcSafeBoundaries(),this.helper.options&&this.helper.options.onResizeStart&&this.helper.options.onResizeStart(),this.unbindMove=Z.bindMove(document,this.mousemove),this.unbindUp=Z.bindUp(document,this.mouseup)};minLeft;maxLeft;minRight;maxRight;minTop;maxTop;minBottom;maxBottom;calcSafeBoundaries(){if(!this.helper.options)return;const{left:t,top:n,right:i,bottom:r}=ee(this.container),c=this.helper.options,v=c.maxWidth||window.innerWidth,y=c.maxHeight||window.innerHeight;this.minLeft=Math.max(i-v,0),this.maxLeft=i-c.minWidth,this.minRight=t+c.minWidth,this.maxRight=Math.min(t+v,window.innerWidth),this.minTop=Math.max(r-y,0),this.maxTop=r-c.minHeight,this.minBottom=n+c.minHeight,this.maxBottom=Math.min(n+y,window.innerHeight)}mousemove=t=>{t.preventDefault(),t.stopPropagation(),this.setPosition(t),this.fixPosition(),this.helper.options&&this.helper.options.onResize&&this.helper.options.onResize()};fixPosition(){const{width:t,height:n,left:i,top:r,right:c,bottom:v}=ee(this.container),y=this.helper.options;y&&(i<this.minLeft?(this.container.style.width=t+i-this.minLeft+"px",this.container.style.left=`${this.minLeft}px`):i>this.maxLeft?(this.container.style.width=`${y.minWidth}px`,this.container.style.left=`${this.maxLeft}px`):c<this.minRight?this.container.style.width=`${y.minWidth}px`:c>this.maxRight&&(this.container.style.width=this.maxRight-i+"px"),r<this.minTop?(this.container.style.height=n+r-this.minTop+"px",this.container.style.top=`${this.minTop}px`):r>this.maxTop?(this.container.style.height=`${y.minHeight}px`,this.container.style.top=`${this.maxTop}px`):v<this.minBottom?this.container.style.height=`${y.minHeight}px`:v>this.maxBottom&&(this.container.style.height=this.maxBottom-r+"px"))}mouseup=t=>{t.preventDefault(),t.stopPropagation(),this.helper.options&&this.helper.options.onResizeEnd&&this.helper.options.onResizeEnd(),this.unbindUp(),this.unbindMove(),this.unbindUp=this.unbindMove=void 0};createHandleElement(){const t=document.createElement("div"),n=t.style;return n.position="absolute",this.applyStyle(n),this.container.appendChild(t),t}}function Qn(e,t,n){return e<t?t:e>n?n:e}Zn.push(class extends gt{setPosition(e){this.container.style.width=this.width0+e.clientX-this.x0+"px",this.container.style.height=this.height0+e.clientY-this.y0+"px"}applyStyle(e){e.width=2*this.handleSize+"px",e.height=2*this.handleSize+"px",e.right=-this.handleSize+"px",e.bottom=-this.handleSize+"px",e.cursor="nwse-resize"}},class extends gt{setPosition(e){this.container.style.height=this.height0+e.clientY-this.y0+"px"}applyStyle(e){e.right=`${this.handleSize}px`,e.left=`${this.handleSize}px`,e.height=2*this.handleSize+"px",e.bottom=-this.handleSize+"px",e.cursor="ns-resize"}},class extends gt{setPosition(e){this.container.style.left=this.left0+e.clientX-this.x0+"px",this.container.style.width=this.width0-(e.clientX-this.x0)+"px",this.container.style.height=this.height0+e.clientY-this.y0+"px"}applyStyle(e){e.left=-this.handleSize+"px",e.bottom=-this.handleSize+"px",e.width=2*this.handleSize+"px",e.height=2*this.handleSize+"px",e.cursor="nesw-resize"}},class extends gt{setPosition(e){this.container.style.left=this.left0+e.clientX-this.x0+"px",this.container.style.width=this.width0-(e.clientX-this.x0)+"px"}applyStyle(e){e.left=-this.handleSize+"px",e.bottom=`${this.handleSize}px`,e.width=2*this.handleSize+"px",e.top=`${this.handleSize}px`,e.cursor="ew-resize"}},class extends gt{setPosition(e){this.container.style.left=this.left0+e.clientX-this.x0+"px",this.container.style.width=this.width0-(e.clientX-this.x0)+"px",this.container.style.top=this.top0+e.clientY-this.y0+"px",this.container.style.height=this.height0-(e.clientY-this.y0)+"px"}applyStyle(e){e.left=-this.handleSize+"px",e.top=-this.handleSize+"px",e.width=2*this.handleSize+"px",e.height=2*this.handleSize+"px",e.cursor="nwse-resize"}},class extends gt{setPosition(e){this.container.style.top=this.top0+e.clientY-this.y0+"px",this.container.style.height=this.height0-(e.clientY-this.y0)+"px"}applyStyle(e){e.left=`${this.handleSize}px`,e.right=`${this.handleSize}px`,e.height=2*this.handleSize+"px",e.top=-this.handleSize+"px",e.cursor="ns-resize"}},class extends gt{setPosition(e){this.container.style.top=this.top0+e.clientY-this.y0+"px",this.container.style.height=this.height0-(e.clientY-this.y0)+"px",this.container.style.width=this.width0+e.clientX-this.x0+"px"}applyStyle(e){e.right=-this.handleSize+"px",e.top=-this.handleSize+"px",e.height=2*this.handleSize+"px",e.width=2*this.handleSize+"px",e.cursor="nesw-resize"}},class extends gt{setPosition(e){this.container.style.width=this.width0+e.clientX-this.x0+"px"}applyStyle(e){e.right=-this.handleSize+"px",e.top=`${this.handleSize}px`,e.bottom=`${this.handleSize}px`,e.width=2*this.handleSize+"px",e.cursor="ew-resize"}});var ne=Bt({name:"",props:{disabled:{type:Boolean,default:!1},windowStyle:{type:Object,required:!0}},components:{},setup(e){const t=nt(!1),n=nt(!1);return{hover:t,active:n,style:function(){let i=e.windowStyle.button;return t.value&&(i={...i,...this.windowStyle.buttonHover}),n.value&&(i={...i,...this.windowStyle.buttonActive}),i},mouseup:function(i){this.active&&this.$emit("click")},mousedown:function(i){i.preventDefault(),n.value=!0;const r=Z.bindUp(document,()=>{n.value=!1,r()})}}}});const jr=["disabled"];ne.render=function(e,t,n,i,r,c){return H(),tt("div",{class:"btn",style:yt(e.style()),onMouseenter:t[0]||(t[0]=v=>e.hover=!0),onMouseleave:t[1]||(t[1]=v=>e.hover=!1),onMousedown:t[2]||(t[2]=En((...v)=>e.mousedown&&e.mousedown(...v),["stop"])),onTouchstart:t[3]||(t[3]=En((...v)=>e.mousedown&&e.mousedown(...v),["stop"])),onMouseup:t[4]||(t[4]=(...v)=>e.mouseup&&e.mouseup(...v)),onTouchend:t[5]||(t[5]=(...v)=>e.mouseup&&e.mouseup(...v)),disabled:e.disabled},[ft(e.$slots,"default")],44,jr)},ne.__scopeId="data-v-71662210",ne.__file="src/controls/vuewindow/window/Button.vue";const We=new Set;function ti(e){return e!==null?parseFloat(e):0}function ie(e){const t=window.getComputedStyle(e);return{width:Math.ceil([t.paddingLeft,t.width,t.paddingRight].map(ti).reduce((n,i)=>n+i)),height:Math.ceil([t.paddingTop,t.height,t.paddingBottom].map(ti).reduce((n,i)=>n+i))}}class ei{width;height;constructor(t,n){this.width=t,this.height=n}}function Wr(e){const t=e.windowEl;if(t){const n=parseFloat(t.style.left||"NaN"),i=parseFloat(t.style.top||"NaN");if(!isNaN(n)&&!isNaN(i))return{left:n,top:i}}return null}function $r(e,t,n,i){const r=e-n,c=t-i;return r*r+c*c}window.addEventListener("resize",e=>{We.forEach(t=>{t?.fixPosition()})});const oe=[];var re=Bt({name:"Window",props:{windowStyle:{type:Object,required:!0},isOpen:{type:Boolean,required:!1,default:!0},title:{type:String,required:!0,default:""},closeButton:{type:Boolean,required:!1,default:!0},resizable:{type:Boolean,required:!1,default:!1},isScrollable:{type:Boolean,required:!1,default:!1},padding:{type:Number,required:!1,default:8},activateWhenOpen:{type:Boolean,required:!1,default:!0},positionHint:{type:String,required:!1,default:""},zGroup:{type:Number,required:!1,default:1},overflow:{type:String,required:!1,default:"visible"},minWidth:{type:Number,required:!1,default:1},minHeight:{type:Number,required:!1,default:0},maxWidth:{type:Number,required:!1,default:0},maxHeight:{type:Number,required:!1,default:0},height:{type:Number,required:!1},width:{type:Number,required:!1},top:{type:Number,required:!1},left:{type:Number,required:!1}},components:{myButton:ne},setup(e,{emit:t}){const n=ao();if(!n)return;const{proxy:i}=n;let r=0,c,v,y;const w=nt(e.isOpen),S=()=>{oe.push(i),y=new Ur(e.zGroup,E),e.isOpen&&(Sn(()=>{r++==0&&(h(i),function(){const R=z.value,{width:A,height:U}=je(R);let O,j;if(e.left!==void 0!=(e.top!==void 0))throw new Error("Either of left or top is specified. Both must be set or not set.");if(typeof e.left=="number")O=e.left,j=e.top;else{const F=e.positionHint||"auto";switch(F){case"auto":{let G=20,V=50,it=0;do{if(oe.every(Q=>{if(!Q.isOpen||i==Q)return!0;const st=Wr(Q);if(st==null)return!0;const{left:ue,top:le}=st;return $r(ue,le,G,V)>16}))break;G=(G+40)%(window.innerWidth-200),V=(V+40)%(window.innerHeight-200)}while(++it<100);O=G,j=V}break;case"center":O=(window.innerWidth-A)/2,j=(window.innerHeight-U)/2,console.log(O,j,window.innerWidth,window.innerHeight,"111111");break;default:try{const G=F.split("/").map(Number);if(G.length!=2)throw null;const[V,it]=G;if(!isFinite(V)||!isFinite(it))throw null;O=V>=0?V:window.innerWidth-A+V,j=it>=0?it:window.innerHeight-U+it}catch{throw new Error(`invalid position string: ${F}`)}}}R&&(R.style.left=`${O}px`,R.style.top=`${j}px`)}()),e.resizable&&l(),B(),c=new Nr(L.value,z.value,{onMove:()=>B(),onMoveStart:()=>t("move-start"),onMoveEnd:()=>t("move-end")}),e.resizable&&function(){const{height:R}=je(L.value);v=new Or(z.value,{onResize:()=>l(),onResizeStart:()=>t("resize-start"),onResizeEnd:()=>t("resize-end"),minWidth:e.minWidth,minHeight:e.minHeight+R,maxWidth:e.maxWidth,maxHeight:e.maxHeight?e.maxHeight+R:void 0})}()}),e.activateWhenOpen&&P()),We.add(i)};function E(R){b.value.zIndex=`${R}`}const z=nt(null),L=nt(null),D=nt(null);function P(){y.raise(),t("activate")}const b=nt({...e.windowStyle.window,zIndex:"auto",overflow:e.overflow}),u=pt(()=>e.windowStyle.titlebar),d=pt(()=>{const R={...e.windowStyle.content};return e.resizable?R.padding="0":e.padding!=null&&(R.padding=`${e.padding}px`),e.isScrollable&&(R.overflow="auto"),R});function h(R){const{width:A,height:U,top:O,left:j}=R,F=z;if(F&&A!=null&&(F.value.style.width=`${A}px`),U!=null){const G=L.value;if(G){const V=ie(G).height;F.value.style.height=`${U+V}px`}}F&&j!=null&&(F.value.style.left=`${j}px`),F&&O!=null&&(F.value.style.top=`${O}px`)}function l(R=!0){const A=z.value,U=L.value,O=D.value;if(O&&A&&U){const{width:j,height:F}=ie(O),{width:G,height:V}=ie(A),it=ie(U).height,Q=G-(O.offsetWidth-j),st=V-it-(O.offsetHeight-F);O.style.width=`${Q}px`,O.style.height=`${st}px`,p(),t("resize",new ei(Q,st)),R&&(t("update:width",Q),t("update:height",st))}}function p(){const R=z.value;if(R){const A=R.getBoundingClientRect();A.left<0&&(b.value.left="0px"),A.top<0&&(b.value.top="0px"),A.right>window.innerWidth&&(b.value.left=window.innerWidth-A.width+"px"),A.bottom>window.innerHeight&&(b.value.top=window.innerHeight-A.height+"px")}}function B(R=!0){p();const A=z.value;if(A){const{left:U,top:O}=A.getBoundingClientRect();R&&(t("update:left",U),t("update:top",O))}}return $t(()=>e.isOpen,R=>{w.value=R}),$t(()=>e.zGroup,R=>{y.group=R}),$t(()=>e.width,R=>{h({width:R}),l(!1)}),$t(()=>e.height,R=>{h({height:R}),l(!1)}),bn(()=>{S()}),co(()=>{We.delete(this),y.unregister(),v&&v.teardown(),c&&c.teardown(),oe.splice(oe.indexOf(i),1)}),{isOpen:w,windowEl:z,titlebar:L,content:D,activate:P,styleWindow:b,styleTitlebar:u,styleContent:d,closeButtonClick:function(){w.value=!1,t("closebuttonclick")}}}});const Fr={class:"title"},Hr=zn("\xD7");var ni,vt;re.render=function(e,t,n,i,r,c){const v=kn("myButton");return H(),ct(xn,{name:"fade",onAfterLeave:t[2]||(t[2]=y=>e.$emit("close")),onAfterEnter:t[3]||(t[3]=y=>e.$emit("open"))},{default:Wt(()=>[uo(K("div",{class:"window",style:yt(e.styleWindow),ref:"windowEl",onMousedown:t[0]||(t[0]=(...y)=>e.activate&&e.activate(...y)),onTouchstart:t[1]||(t[1]=(...y)=>e.activate&&e.activate(...y))},[K("div",{class:"titlebar",style:yt(e.styleTitlebar),ref:"titlebar"},[K("div",Fr,[e.$slots.title?ft(e.$slots,"title",{key:0}):(H(),tt(wt,{key:1},[zn(lo(e.title),1)],2112))]),e.closeButton?(H(),ct(v,{key:0,windowStyle:e.windowStyle,onClick:e.closeButtonClick},{default:Wt(()=>[Hr]),_:1},8,["windowStyle","onClick"])):zt("v-if",!0)],4),K("div",{class:"content",style:yt(e.styleContent),ref:"content"},[ft(e.$slots,"default")],4)],36),[[ho,e.isOpen]])]),_:3})},re.__file="src/controls/vuewindow/window/index.vue",(vt=ni||(ni={}))[vt.StyleBlack=0]="StyleBlack",vt[vt.StyleWhite=1]="StyleWhite",vt[vt.StyleMetal=2]="StyleMetal",vt[vt.StyleGrayblue=3]="StyleGrayblue";const qr={window:{color:"#fff",boxShadow:"0 0 6pt rgba(255, 255, 255, 0.75)",backgroundColor:"rgba(31, 31, 31, 0.9)"},titlebar:{backgroundColor:"rgba(63, 63, 63, 0.9)"},content:{},button:{color:"white"},buttonHover:{backgroundColor:"rgba(255, 255, 255, 0.25)"},buttonActive:{color:"black",backgroundColor:"rgba(255, 255, 255, 0.5)"}},Gr={window:{color:"#000",boxShadow:"0 2pt 4pt rgba(0, 0, 0, 0.5)",backgroundColor:"rgba(239, 239, 239, 0.95)"},titlebar:{backgroundColor:"rgba(191, 191, 191, 0.9)"},content:{},button:{color:"#000"},buttonHover:{backgroundColor:"rgba(0, 0, 0, 0.25)"},buttonActive:{color:"#fff",backgroundColor:"rgba(0, 0, 0, 0.5)"}},Xr={window:{color:"#000",boxShadow:"0 4pt 8pt rgba(0, 0, 0, 0.5)",background:"linear-gradient(to bottom, rgb(215, 215, 215), rgb(191, 191, 191))"},titlebar:{background:"linear-gradient(to bottom, rgb(215, 215, 215), rgb(191, 191, 191))"},content:{},button:{color:"#000"},buttonHover:{backgroundColor:"rgba(0, 0, 0, 0.25)"},buttonActive:{color:"#fff",backgroundColor:"rgba(0, 0, 0, 0.5)"}},Vr={window:{color:"#fff",fontSize:"14px",boxShadow:"0 0 3pt rgba(255, 255, 255, 0.75)",backgroundColor:"rgba(4,51,81,0.6)",borderRadius:"5px"},titlebar:{backgroundColor:"rgba(4,51,81,0.8)",border:"1px solid rgba(153, 153, 153, 0.5)",borderRadius:"5px",fontSize:"16px",fontWeight:400,color:"#fff"},content:{},button:{color:"white",fontSize:"18px"},buttonHover:{backgroundColor:"rgba(255, 255, 255, 0.25)"},buttonActive:{color:"black",backgroundColor:"rgba(255, 255, 255, 0.5)"}},Kr=re;var q,et;(et=q||(q={}))[et.top=0]="top",et[et.bottom=1]="bottom",et[et.centerBack=2]="centerBack",et[et.centerMain=3]="centerMain",et[et.centerFront=4]="centerFront",et[et.left=5]="left",et[et.right=6]="right";class Yr{layoutState;widgetCofig;layoutMap=new Map;preConditionMap=new Map;widgetsLoadedSet=new Set;constructor(t,n){this.layoutState=t,this.widgetCofig=n,this.widgetCofig.forEach(i=>{if(i.afterid)if(this.preConditionMap.has(i.afterid))this.preConditionMap.get(i.afterid)?.add(i);else{const r=new Set;r.add(i),this.preConditionMap.set(i.afterid,r)}})}getWidgetConfig(){return this.widgetCofig}preloadWidgets(){this.widgetCofig.filter(t=>t.preload&&!t.afterid).forEach(t=>{this._loadWidget(t,this.loadOtherDependenceWidgets.bind(this))})}loadWidget(t){if(!t)return;let n;xt(t)?n=t:Kt(t)&&(n=this.widgetCofig.find(i=>i.id===t)),n&&this._loadWidget(n,this.loadOtherDependenceWidgets.bind(this))}loadOtherDependenceWidgets(t){this.preConditionMap.has(t)&&this.preConditionMap.get(t)?.forEach(n=>{n.preload&&this._loadWidget(n)})}_loadWidget(t,n){if(!this.widgetsLoadedSet.has(t.id))return t.component().then(i=>{if(i.default){const r=Mn(i.default);this.getContainerComponents(t.container).value.set(t.id,r),this.widgetsLoadedSet.add(t.id),I.EventBus.emit(X.WidgetLoadedEvent,t.id),n&&n(t.id)}})}hasDependentWidgets(t){let n=!1;if(this.preConditionMap.has(t)){const i=this.preConditionMap.get(t);if(i){for(const r of i)if(this.isWidgetLoaded(r.id)){n=!0;break}}}return n}unloadWidget(t){if(!t||!this.isWidgetLoaded(t))return;const n=this.widgetCofig.find(i=>i.id===t);if(n){if(this.preConditionMap.has(t)){const i=this.preConditionMap.get(t);if(i)for(const r of i)this.unloadWidget(r.id)}this.getContainerComponents(n.container).value.delete(t),this.widgetsLoadedSet.delete(t),I.EventBus.emit(X.WidgetUnLoadedEvent,t)}}isWidgetLoaded(t){return this.widgetsLoadedSet.has(t)}splitTwoContainer(t=!1){const n=this.layoutState.centerMainContainer,i=this.layoutState.centerBackContainer;t?(n&&(n.style.left="0",n.style.width="100%"),i&&(i.style.width="100%")):(n&&(n.style.left="50%",n.style.width="50%"),i&&(i.style.width="50%"))}getLayoutContainer(t){switch(t){case q.top:return this.layoutState.topContainer;case q.bottom:return this.layoutState.bottomContainer;case q.left:return this.layoutState.leftContainer;case q.right:return this.layoutState.rightContainer;case q.centerBack:return this.layoutState.centerBackContainer;case q.centerMain:return this.layoutState.centerMainContainer;case q.centerFront:return this.layoutState.centerFrontContainer}}changeContainerVisible(t,n=!1){const i=this.getLayoutContainer(t);i&&(i.style.visibility=n?"visible":"hidden")}changeWidgetVisible(t,n=!1){const i=this.getWidgetComponent(t);i&&I.EventBus.emit(X.WidgetVisibleChanged,{id:t,name:i.name,visible:n})}getWidgetComponent(t){if(this.widgetsLoadedSet.has(t)){const n=this.widgetCofig.find(i=>i.id===t);if(n)return this.getContainerComponents(n.container).value.get(t)}}getWigetItem(t){return this.widgetCofig.find(n=>n.id===t)}getGroupWigetItems(t){return this.widgetCofig.filter(n=>n.group===t)}getContainerComponents(t){if(this.layoutMap.has(t))return this.layoutMap.get(t);{const n=nt(new Map);return this.layoutMap.set(t,n),n}}addContainerComponent(t,n){}}var $e=Bt({name:"MainContainer",props:{widgetConfig:{type:Array,required:!0,default:()=>[]},layoutStyle:{type:Object}},components:{},setup(e,{attrs:t,slots:n,emit:i}){const r=wn({topContainer:void 0,centerBackContainer:void 0,centerMainContainer:void 0,centerFrontContainer:void 0,bottomContainer:void 0,leftContainer:void 0,rightContainer:void 0});if(!I.LayoutManager){const D=new Yr(r,e.widgetConfig);I.LayoutManager=D,D.preloadWidgets()}const c=z(q.top),v=z(q.centerBack),y=z(q.centerFront),w=z(q.left),S=z(q.right),E=z(q.bottom);function z(D){return I.LayoutManager?.getContainerComponents(D)}const L=pt(()=>e.layoutStyle);return{...fo(r),topContainerComponents:c,centerbackComponents:v,centerfrontComponents:y,leftContainerComponents:w,rightContainerComponents:S,bottomContainerComponents:E,containerStyle:L}}});const Jr={ref:"topContainer",class:"topContainer"},Zr={ref:"centerBackContainer",class:"centerdiv backContainer"},Qr={ref:"centerMainContainer",class:"centerdiv mainContainer"},ts={ref:"centerFrontContainer",class:"centerdiv centerContainer"},es={ref:"leftContainer",class:"leftContainer"},ns={ref:"rightContainer",class:"rightContainer"},is={ref:"bottomContainer",class:"bottomContainer"};$e.render=function(e,t,n,i,r,c){const v=kn("router-view");return H(),tt("div",{class:"layoutContainer",style:yt(e.containerStyle)},[K("div",Jr,[(H(!0),tt(wt,null,Mt(e.topContainerComponents,([y,w])=>(H(),ct(bt(w),{key:y}))),128))],512),K("div",null,[zt(" \u5E95\u5C42-\u4E3B\u5BB9\u5668 "),K("div",Zr,[(H(!0),tt(wt,null,Mt(e.centerbackComponents,([y,w])=>(H(),ct(bt(w),{key:y}))),128))],512),zt(" \u4E3B\u8981\u5BB9\u5668 "),K("div",Qr,[Cn(v,null,{default:Wt(({Component:y})=>[(H(),ct(bt(y)))]),_:1})],512),zt(" \u6D6E\u52A8-\u4E3B\u5BB9\u5668 "),K("div",ts,[(H(!0),tt(wt,null,Mt(e.centerfrontComponents,([y,w])=>(H(),ct(bt(w),{key:y}))),128))],512),K("div",es,[(H(!0),tt(wt,null,Mt(e.leftContainerComponents,([y,w])=>(H(),ct(bt(w),{key:y}))),128))],512),K("div",ns,[(H(!0),tt(wt,null,Mt(e.rightContainerComponents,([y,w])=>(H(),ct(bt(w),{key:y}))),128))],512)]),K("div",is,[(H(!0),tt(wt,null,Mt(e.bottomContainerComponents,([y,w])=>(H(),ct(bt(w),{key:y}))),128))],512)],4)},$e.__file="src/controls/layoutcontainer/layout.vue";class os{layoutState;widgetCofig;layoutMap=new Map;preConditionMap=new Map;widgetsLoadedSet=new Set;constructor(t,n){this.layoutState=t,this.widgetCofig=n,this.widgetCofig.forEach(i=>{if(i.afterid)if(this.preConditionMap.has(i.afterid))this.preConditionMap.get(i.afterid)?.add(i);else{const r=new Set;r.add(i),this.preConditionMap.set(i.afterid,r)}})}getWidgetConfig(){return this.widgetCofig}preloadWidgets(){this.widgetCofig.filter(t=>t.preload&&!t.afterid).forEach(t=>{this._loadWidget(t,this.loadOtherDependenceWidgets.bind(this))})}loadWidget(t){if(!t)return;let n;xt(t)?n=t:Kt(t)&&(n=this.widgetCofig.find(i=>i.id===t)),n&&this._loadWidget(n,this.loadOtherDependenceWidgets.bind(this))}loadOtherDependenceWidgets(t){this.preConditionMap.has(t)&&this.preConditionMap.get(t)?.forEach(n=>{n.preload&&this._loadWidget(n)})}_loadWidget(t,n){if(!this.widgetsLoadedSet.has(t.id))return t.component().then(i=>{if(i.default){const r=Mn(i.default);this.getContainerComponents(t.container).value.set(t.id,r),this.widgetsLoadedSet.add(t.id),I.EventBus.emit(X.WidgetLoadedEvent,t.id),n&&n(t.id)}})}hasDependentWidgets(t){let n=!1;if(this.preConditionMap.has(t)){const i=this.preConditionMap.get(t);if(i){for(const r of i)if(this.isWidgetLoaded(r.id)){n=!0;break}}}return n}unloadWidget(t){if(!t||!this.isWidgetLoaded(t))return;const n=this.widgetCofig.find(i=>i.id===t);if(n){if(this.preConditionMap.has(t)){const i=this.preConditionMap.get(t);if(i)for(const r of i)this.unloadWidget(r.id)}this.getContainerComponents(n.container).value.delete(t),this.widgetsLoadedSet.delete(t),I.EventBus.emit(X.WidgetUnLoadedEvent,t)}}isWidgetLoaded(t){return this.widgetsLoadedSet.has(t)}splitTwoContainer(t=!1){const n=this.layoutState.centerMainContainer,i=this.layoutState.centerBackContainer;t?(n&&(n.style.left="0",n.style.width="100%"),i&&(i.style.width="100%")):(n&&(n.style.left="50%",n.style.width="50%"),i&&(i.style.width="50%"))}getLayoutContainer(t){switch(t){case q.top:return this.layoutState.topContainer;case q.bottom:return this.layoutState.bottomContainer;case q.left:return this.layoutState.leftContainer;case q.right:return this.layoutState.rightContainer;case q.centerBack:return this.layoutState.centerBackContainer;case q.centerMain:return this.layoutState.centerMainContainer;case q.centerFront:return this.layoutState.centerFrontContainer}}changeContainerVisible(t,n=!1){const i=this.getLayoutContainer(t);i&&(i.style.visibility=n?"visible":"hidden")}changeWidgetVisible(t,n=!1){const i=this.getWidgetComponent(t);i&&I.EventBus.emit(X.WidgetVisibleChanged,{id:t,name:i.name,visible:n})}getWidgetComponent(t){if(this.widgetsLoadedSet.has(t)){const n=this.widgetCofig.find(i=>i.id===t);if(n)return this.getContainerComponents(n.container).value.get(t)}}getWigetItem(t){return this.widgetCofig.find(n=>n.id===t)}getGroupWigetItems(t){return this.widgetCofig.filter(n=>n.group===t)}getContainerComponents(t){if(this.layoutMap.has(t))return this.layoutMap.get(t);{const n=nt(new Map);return this.layoutMap.set(t,n),n}}addContainerComponent(t,n){}}const se=new Map,Fe=new Map;let ae;const rs={getDefaultClient(){if(ae||(ae=new At(SysConfig.DefaultHproseAPI)),!ae)throw Error("HproseProxy\u5BF9\u8C61\u4E3A\u7A7A");return ae},registerHprose(e,t){const n=Fe.get(e);if(!n){const i=new At(t);se.set(e,i)}return n},getHprose:e=>Fe?.get(e),getProxyHprose:e=>se.get(e),unregisterHprose(e){se.get(e)&&(Fe.delete(e),se.delete(e))}},ss=4e3,Et={Login:"/api/Login/Login",CheckLogin:"\u200B/api\u200B/Check\u200B/Login",Logout:"/api/Check/ExitLogin",ChangePWD:"/api/UserManager/UpdateUserPWD",RefreshToken:"/api/Check/RefreshToken",CheckToken:"/api/Check/CheckToken"},as=I.Config.ServiceURL.LoginAuthURL;function He(){const e=Bn();e&&rt(Et.RefreshToken,as,{refreshToken:e}).then(t=>{ce(t.data)})}function ii(e){I.User||(I.User={id:e.id,name:e.name,issystem:e.issystem,issecurity:e.issecurity,appkey:e.appkey,role:e.role,doubleToken:{accessToken:{tokenContent:e.token,expires:e.expire},refreshToken:{tokenContent:e.refresh,expires:e.expire}}});const t=new Date().getTime(),n=new Date(e.expire).getTime()-t;n>0&&(n<=4e3?He():setTimeout(He,n-4e3))}function ce(e){I.User&&(I.User.doubleToken=e);const t=new Date().getTime(),n=new Date(e.accessToken.expires).getTime()-t;if(n>0&&I.User){let i=Ct();if(!i){const r=I.User.doubleToken;i={id:I.User.id,name:I.User.name,token:r?r.accessToken.tokenContent:"",expire:r?r.accessToken.expires:"",refresh:r?r.accessToken.tokenContent:"",issystem:I.User.issystem,issecurity:I.User.issecurity,appkey:I.User.appkey,role:I.User.role}}i.token=e.accessToken.tokenContent,i.expire=e.accessToken.expires,i.refresh=e.refreshToken.tokenContent,mt.set("access_token",i,n/1e3),ii(i)}else mt.remove("access_token")}function qe(e){I.User=e}const Dt=I.Config.ServiceURL.LoginAuthURL;async function cs(e){const t=(await rt(Et.Login,Dt,e))?.data;return t&&t.isSuccess&&(qe(t.resultValue),ce(t.resultValue.doubleToken)),t}async function us(e){const t=(await rt(Et.CheckLogin,Dt,e))?.data;return t&&t.isSuccess&&(qe(t.resultValue),ce(t.resultValue.doubleToken)),t}function ls(e){return rt(Et.ChangePWD,Dt,e)}function hs(){const e=Ct();e&&(Ie(Et.Logout,Dt,{token:e.token,reftoken:e.refresh}),Me())}function ds(e){return rt(Et.CheckToken,Dt,{token:e})}const Ge=new Ht("",sessionStorage);function oi(){return Ge.get("ROLE_SYSTEM_RIGHT")}function ri(e){Ge.set("ROLE_SYSTEM_RIGHT",e)}function si(){Ge.remove("ROLE_SYSTEM_RIGHT")}const Xe=[],Ve=[],Ke=[];function Nt(){return oi()}async function fs(e,t,n,i){if(si(),!I.User)return;let r;if(i)r=i;else{if(!t)return;let c=n;c||(c=I.Config.ServiceURL.LoginAuthURL);const v=await rt(t,c,{system:e});if(!v||v.data)return void I.Message?.warn("\u65E0\u6CD5\u83B7\u53D6\u529F\u80FD\u6388\u6743\u5217\u8868\uFF01");r=v.data}return r&&ri(r),r}function ai(e,t){const n={...e};return n.meta||(n.meta={}),t.index!=null&&(n.meta.index=t.index),t.title!=null&&(n.meta.title=t.title),e.children&&(n.children=[],t.children&&t.children.forEach(i=>{const r=e.children?.find(c=>c.path===i.path);if(r){const c=ai(r,i);c&&n.children?.push(c)}})),n}function ps(e){if(I.User?.issystem)return e;const t=Nt();return t&&t.routes?(Ke.length>0||e.forEach(n=>{const i=t.routes?.find(r=>r.name===n.name);if(i){const r=ai(n,i);r&&Ke.push(r)}}),Ke):void 0}function ci(e,t){const n={...e};return t.index!=null&&(n.index=t.index),e.children&&(n.children=[],t.children&&t.children.forEach(i=>{const r=e.children?.find(c=>c.name===i.name);if(r){const c=ci(r,i);c&&n.children?.push(c)}})),n}function ms(e){if(I.User?.issystem)return e;const t=Nt();return t&&t.widgetMenu?(Ve.length>0||e.forEach(n=>{const i=t.widgetMenu?.find(r=>r.name===n.name);if(i){const r=ci(n,i);r&&Ve.push(r)}}),Ve):void 0}function gs(e){if(I.User?.issystem)return e;const t=Nt();return t&&t.widgets?(Xe.length>0||e?.forEach(n=>{t.widgets?.find(i=>i.id===n.id)&&Xe.push(n)}),Xe):void 0}function vs(e){if(I.User?.issystem)return e;const t=Nt();return t?t.functions:void 0}export{ar as BigFileDownload,Xt as Download,Bo as DownloadByUrl,St as EnumColor,I as Global,rs as GlobalHprose,It as GlobalMitt,lt as H5Tool,Ut as HproseClient,Po as HttpDownload,Ln as JsonDownload,$e as LayoutContainer,q as LayoutContainerEnum,os as LayoutManager,_r as ObjToUrlParams,we as Pane,At as ProxyClient,Lo as SaveAs,vo as Splitpanes,Ht as Storage,Ft as StringUtils,qr as StyleBlack,Vr as StyleGrayblue,Xr as StyleMetal,Gr as StyleWhite,X as SysEvents,ss as TOKEN_REFRESH_TIME,Et as USER_TOKEN_API,Zt as VCollapsiblePanel,Jt as VCollapsiblePanelGroup,re as VWindow,ei as WindowResizeEvent,Kr as WindowType,Io as calculateBestTextColor,ls as changePWD,ii as checkDoRefreshToken,us as checkLogin,ds as checkToken,Me as clearLocalToken,si as clearRight,Mo as colorIsDark,tr as createFileUpload,_o as darken,qn as deepMerge,He as doRefreshToken,Gn as exportSystemRights,Oo as get,Nt as getCurrentSystemRight,Wo as getData,vs as getFunctions,So as getHexColor,Ct as getLocalToken,nr as getLockState,xo as getLongHexColor,Tn as getProxyClient,Co as getRGBColor,ko as getRGBColorFromHSLA,Bn as getRefreshToken,oi as getRight,ps as getRoutes,fs as getSystemRoleRight,gs as getWidgetConfig,ms as getWidgetMenus,xe as hexToRGB,An as init,No as initDefaultProxyClient,Do as initXFrame,Y as is,Hn as isArray,fr as isAsyncFunction,mr as isBoolean,gr as isClient,hr as isDate,Fn as isDef,yr as isElement,Sr as isEmpty,Eo as isEnumColor,Cr as isError,Te as isFunction,Gt as isHexColor,br as isImageDom,zr as isMap,Ne as isNull,ur as isNullAndUnDef,lr as isNullOrUnDef,dr as isNumber,xt as isObject,pr as isPromise,wr as isServer,Kt as isString,kr as isSymbol,De as isUnDef,Mr as isValidURL,Er as isWeakMap,xr as isWeakSet,vr as isWindow,er as jquery,Ro as lighten,cs as login,hs as logout,bo as newGuid,ir as onLockListener,jo as post,rt as requestGet,Ie as requestPost,Uo as requestPostBody,zo as rgbToHex,ce as setLocalToken,ri as setRight,qe as setUser,Ao as sleep,wo as storage,mt as storageHelper,or as unLockListener,qt as uuid,Rr as writeIconifyList,Ir as writeSysRoleRight};
|
|
16
|
+
`}}});const Pr={class:"vcp__header-title"},Br={key:0,class:"vcp__header-icon"},Ar=["innerHTML"],Tr={key:0,ref:"bodyRef",class:"vcp__body"},Dr={ref:"bodyContentRef",class:"vcp__body-content"};function Oe(e){return window.TouchEvent&&e instanceof TouchEvent}Zt.render=function(e,t,n,i,r,c){return H(),tt("section",{ref:"panelRef",class:so(["vcp",{"vcp--expanded":e.isExpanded,"vcp--expandable":e.body.hasContent}])},[K("header",{class:"vcp__header",onClick:t[0]||(t[0]=(...v)=>e.toggle&&e.toggle(...v))},[K("div",Pr,[ft(e.$slots,"title")]),e.body.hasContent?(H(),tt("div",Br,[ft(e.$slots,"icon",{},()=>[K("span",{innerHTML:e.toggleIcon},null,8,Ar)])])):zt("v-if",!0)]),Cn(xn,{"data-key":e.body.dataKey,name:"slide",onBeforeEnter:e.collapse,onEnter:e.expand,onBeforeLeave:e.expand,onLeave:e.collapse},{default:Wt(()=>[e.isExpanded?(H(),tt("div",Tr,[K("div",Dr,[ft(e.$slots,"content")],512)],512)):zt("v-if",!0)]),_:3},8,["data-key","onBeforeEnter","onEnter","onBeforeLeave","onLeave"])],2)},Zt.__scopeId="data-v-08c94cf8",Zt.__file="src/controls/collapsepanel/VCollapsiblePanel.vue";class Z{e;constructor(t){this.e=t}stopPropagation(){this.e.stopPropagation()}preventDefault(){this.e.preventDefault()}get clientX(){return Oe(this.e)?(this.e.type==="touchend"?this.e.changedTouches:this.e.touches).item(0).clientX:this.e.clientX}get clientY(){return Oe(this.e)?(this.e.type==="touchend"?this.e.changedTouches:this.e.touches).item(0).clientY:this.e.clientY}get clientCoord(){return new Ye(this.clientX,this.clientY)}static bindDown(t,n,i,r=!1){const c=y=>{n(new Z(y))},v=y=>{y.touches.length===1&&n(new Z(y)),y.touches.length>1&&i&&i(new Z(y))};return t.addEventListener("mousedown",c,r),t.addEventListener("touchstart",v,r),()=>{t.removeEventListener("mousedown",c,r),t.removeEventListener("touchstart",v,r)}}static bindMove(t,n,i=!1){const r=v=>{n(new Z(v))},c=v=>{v.touches.length===1&&n(new Z(v))};return t.addEventListener("mousemove",r,i),t.addEventListener("touchmove",c,i),()=>{t.removeEventListener("mousemove",r,i),t.removeEventListener("touchmove",c,i)}}static bindUp(t,n,i=!1){const r=v=>{n(new Z(v))},c=v=>{v.touches.length===0&&n(new Z(v))};return t.addEventListener("mouseup",r,i),t.addEventListener("touchend",c,i),()=>{t.removeEventListener("mouseup",r,i),t.removeEventListener("touchend",c,i)}}originalEvent({mouse:t,touch:n}){Oe(this.e)?n&&n(this.e):t&&t(this.e)}}class Ye{x;y;constructor(t,n){this.x=t,this.y=n}clone(){return new Ye(this.x,this.y)}}class Nr{handle;container;options;unbindDown;unbindMove;unbindUp;constructor(t,n,i={}){this.handle=t,this.container=n,this.options=i,t&&(this.unbindDown=Z.bindDown(t,this.mousedown),t.classList.add("draggable-handle"))}teardown(){this.handle?.classList.remove("draggable-handle"),this.unbindDown&&this.unbindDown(),this.unbindUp&&this.unbindUp(),this.unbindMove&&this.unbindMove()}offsetX;offsetY;mousedown=t=>{if(t.preventDefault(),this.handle){const{left:n,top:i}=this.handle.getBoundingClientRect();this.offsetX=t.clientX-n,this.offsetY=t.clientY-i}this.options.onMoveStart&&this.options.onMoveStart(),this.unbindMove=Z.bindMove(document,this.mousemove),this.unbindUp=Z.bindUp(document,this.mouseup)};mousemove=t=>{this.container&&(this.container.style.left=t.clientX-this.offsetX+"px",this.container.style.top=t.clientY-this.offsetY+"px"),this.options.onMove&&this.options.onMove()};mouseup=t=>{this.options.onMoveEnd&&this.options.onMoveEnd(),this.unbindUp(),this.unbindMove(),this.unbindUp=this.unbindMove=void 0}}class Ur{_group;onChange;zIndex;constructor(t,n){this._group=t,this.onChange=n,this.a(i=>i.push(this))}set group(t){this._group=t;const n=te(this._group),i=te(t);n.splice(n.indexOf(this),1),i.push(this),Jn()}get group(){return this._group}unregister(){this.a(t=>t.splice(t.indexOf(this),1))}raise(){this.a(t=>{t.splice(t.indexOf(this),1),t.push(this)})}a(t){t(te(this._group)),Jn()}}const Qt=new Map;function te(e){return Qt.has(e)||Qt.set(e,[]),Qt.get(e)}function Yn(e,t){return e>t?-Yn(t,e):e<0&&t>=0?1:e-t}function Jn(){let e=0;for(const t of function(n){const i=[];return n.forEach((r,c)=>i.push(c)),i}(Qt).sort(Yn))for(const n of te(t))e!=n.zIndex&&(n.zIndex=e,n.onChange(e)),e++}function je(e){if(e){const{width:t,height:n}=e.style;e.style.width="auto",e.style.height="auto";const i=ee(e);return e.style.width=t,e.style.height=n,i}return{width:0,height:0,top:0,left:0,bottom:0,right:0}}function ee(e){const t=e.getBoundingClientRect(),n=t.width,i=t.height,r=t.top,c=t.left;return{width:n,height:i,top:r,left:c,bottom:r+i,right:c+n}}class Or{container;options;handles;constructor(t,n){if(this.container=t,this.options=n,t&&n){this.handles=Zn.map(w=>new w(t,this));const{width:i,height:r}=je(t),c=n.maxWidth||window.innerWidth,v=n.maxHeight||window.innerHeight;let y=!1;(i<n.minWidth||i>c)&&(t.style.width=`${Qn(i,n.minWidth,c)}px`,y=!0),(r<n.minHeight||r>v)&&(t.style.height=`${Qn(r,n.minHeight,v)}px`,y=!0),y&&n.onResize&&n.onResize()}}teardown(){this.handles?.forEach(t=>t.teardown())}}const Zn=[];class gt{container;helper;handle;handleSize=8;unbindDown;unbindMove;unbindUp;constructor(t,n){this.container=t,this.helper=n,this.handle=this.createHandleElement(),this.unbindDown=Z.bindDown(this.handle,this.mousedown)}teardown(){this.unbindDown(),this.unbindUp&&this.unbindUp(),this.unbindMove&&this.unbindMove(),this.handle.parentElement.removeChild(this.handle)}x0;y0;left0;top0;width0;height0;mousedown=t=>{t.preventDefault(),t.stopPropagation();const{left:n,top:i,width:r,height:c}=ee(this.container);this.x0=t.clientX,this.y0=t.clientY,this.left0=n,this.top0=i,this.width0=r,this.height0=c,this.calcSafeBoundaries(),this.helper.options&&this.helper.options.onResizeStart&&this.helper.options.onResizeStart(),this.unbindMove=Z.bindMove(document,this.mousemove),this.unbindUp=Z.bindUp(document,this.mouseup)};minLeft;maxLeft;minRight;maxRight;minTop;maxTop;minBottom;maxBottom;calcSafeBoundaries(){if(!this.helper.options)return;const{left:t,top:n,right:i,bottom:r}=ee(this.container),c=this.helper.options,v=c.maxWidth||window.innerWidth,y=c.maxHeight||window.innerHeight;this.minLeft=Math.max(i-v,0),this.maxLeft=i-c.minWidth,this.minRight=t+c.minWidth,this.maxRight=Math.min(t+v,window.innerWidth),this.minTop=Math.max(r-y,0),this.maxTop=r-c.minHeight,this.minBottom=n+c.minHeight,this.maxBottom=Math.min(n+y,window.innerHeight)}mousemove=t=>{t.preventDefault(),t.stopPropagation(),this.setPosition(t),this.fixPosition(),this.helper.options&&this.helper.options.onResize&&this.helper.options.onResize()};fixPosition(){const{width:t,height:n,left:i,top:r,right:c,bottom:v}=ee(this.container),y=this.helper.options;y&&(i<this.minLeft?(this.container.style.width=t+i-this.minLeft+"px",this.container.style.left=`${this.minLeft}px`):i>this.maxLeft?(this.container.style.width=`${y.minWidth}px`,this.container.style.left=`${this.maxLeft}px`):c<this.minRight?this.container.style.width=`${y.minWidth}px`:c>this.maxRight&&(this.container.style.width=this.maxRight-i+"px"),r<this.minTop?(this.container.style.height=n+r-this.minTop+"px",this.container.style.top=`${this.minTop}px`):r>this.maxTop?(this.container.style.height=`${y.minHeight}px`,this.container.style.top=`${this.maxTop}px`):v<this.minBottom?this.container.style.height=`${y.minHeight}px`:v>this.maxBottom&&(this.container.style.height=this.maxBottom-r+"px"))}mouseup=t=>{t.preventDefault(),t.stopPropagation(),this.helper.options&&this.helper.options.onResizeEnd&&this.helper.options.onResizeEnd(),this.unbindUp(),this.unbindMove(),this.unbindUp=this.unbindMove=void 0};createHandleElement(){const t=document.createElement("div"),n=t.style;return n.position="absolute",this.applyStyle(n),this.container.appendChild(t),t}}function Qn(e,t,n){return e<t?t:e>n?n:e}Zn.push(class extends gt{setPosition(e){this.container.style.width=this.width0+e.clientX-this.x0+"px",this.container.style.height=this.height0+e.clientY-this.y0+"px"}applyStyle(e){e.width=2*this.handleSize+"px",e.height=2*this.handleSize+"px",e.right=-this.handleSize+"px",e.bottom=-this.handleSize+"px",e.cursor="nwse-resize"}},class extends gt{setPosition(e){this.container.style.height=this.height0+e.clientY-this.y0+"px"}applyStyle(e){e.right=`${this.handleSize}px`,e.left=`${this.handleSize}px`,e.height=2*this.handleSize+"px",e.bottom=-this.handleSize+"px",e.cursor="ns-resize"}},class extends gt{setPosition(e){this.container.style.left=this.left0+e.clientX-this.x0+"px",this.container.style.width=this.width0-(e.clientX-this.x0)+"px",this.container.style.height=this.height0+e.clientY-this.y0+"px"}applyStyle(e){e.left=-this.handleSize+"px",e.bottom=-this.handleSize+"px",e.width=2*this.handleSize+"px",e.height=2*this.handleSize+"px",e.cursor="nesw-resize"}},class extends gt{setPosition(e){this.container.style.left=this.left0+e.clientX-this.x0+"px",this.container.style.width=this.width0-(e.clientX-this.x0)+"px"}applyStyle(e){e.left=-this.handleSize+"px",e.bottom=`${this.handleSize}px`,e.width=2*this.handleSize+"px",e.top=`${this.handleSize}px`,e.cursor="ew-resize"}},class extends gt{setPosition(e){this.container.style.left=this.left0+e.clientX-this.x0+"px",this.container.style.width=this.width0-(e.clientX-this.x0)+"px",this.container.style.top=this.top0+e.clientY-this.y0+"px",this.container.style.height=this.height0-(e.clientY-this.y0)+"px"}applyStyle(e){e.left=-this.handleSize+"px",e.top=-this.handleSize+"px",e.width=2*this.handleSize+"px",e.height=2*this.handleSize+"px",e.cursor="nwse-resize"}},class extends gt{setPosition(e){this.container.style.top=this.top0+e.clientY-this.y0+"px",this.container.style.height=this.height0-(e.clientY-this.y0)+"px"}applyStyle(e){e.left=`${this.handleSize}px`,e.right=`${this.handleSize}px`,e.height=2*this.handleSize+"px",e.top=-this.handleSize+"px",e.cursor="ns-resize"}},class extends gt{setPosition(e){this.container.style.top=this.top0+e.clientY-this.y0+"px",this.container.style.height=this.height0-(e.clientY-this.y0)+"px",this.container.style.width=this.width0+e.clientX-this.x0+"px"}applyStyle(e){e.right=-this.handleSize+"px",e.top=-this.handleSize+"px",e.height=2*this.handleSize+"px",e.width=2*this.handleSize+"px",e.cursor="nesw-resize"}},class extends gt{setPosition(e){this.container.style.width=this.width0+e.clientX-this.x0+"px"}applyStyle(e){e.right=-this.handleSize+"px",e.top=`${this.handleSize}px`,e.bottom=`${this.handleSize}px`,e.width=2*this.handleSize+"px",e.cursor="ew-resize"}});var ne=Bt({name:"",props:{disabled:{type:Boolean,default:!1},windowStyle:{type:Object,required:!0}},components:{},setup(e){const t=nt(!1),n=nt(!1);return{hover:t,active:n,style:function(){let i=e.windowStyle.button;return t.value&&(i={...i,...this.windowStyle.buttonHover}),n.value&&(i={...i,...this.windowStyle.buttonActive}),i},mouseup:function(i){this.active&&this.$emit("click")},mousedown:function(i){i.preventDefault(),n.value=!0;const r=Z.bindUp(document,()=>{n.value=!1,r()})}}}});const jr=["disabled"];ne.render=function(e,t,n,i,r,c){return H(),tt("div",{class:"btn",style:yt(e.style()),onMouseenter:t[0]||(t[0]=v=>e.hover=!0),onMouseleave:t[1]||(t[1]=v=>e.hover=!1),onMousedown:t[2]||(t[2]=En((...v)=>e.mousedown&&e.mousedown(...v),["stop"])),onTouchstart:t[3]||(t[3]=En((...v)=>e.mousedown&&e.mousedown(...v),["stop"])),onMouseup:t[4]||(t[4]=(...v)=>e.mouseup&&e.mouseup(...v)),onTouchend:t[5]||(t[5]=(...v)=>e.mouseup&&e.mouseup(...v)),disabled:e.disabled},[ft(e.$slots,"default")],44,jr)},ne.__scopeId="data-v-71662210",ne.__file="src/controls/vuewindow/window/Button.vue";const We=new Set;function ti(e){return e!==null?parseFloat(e):0}function ie(e){const t=window.getComputedStyle(e);return{width:Math.ceil([t.paddingLeft,t.width,t.paddingRight].map(ti).reduce((n,i)=>n+i)),height:Math.ceil([t.paddingTop,t.height,t.paddingBottom].map(ti).reduce((n,i)=>n+i))}}class ei{width;height;constructor(t,n){this.width=t,this.height=n}}function Wr(e){const t=e.windowEl;if(t){const n=parseFloat(t.style.left||"NaN"),i=parseFloat(t.style.top||"NaN");if(!isNaN(n)&&!isNaN(i))return{left:n,top:i}}return null}function $r(e,t,n,i){const r=e-n,c=t-i;return r*r+c*c}window.addEventListener("resize",e=>{We.forEach(t=>{t?.fixPosition()})});const oe=[];var re=Bt({name:"Window",props:{windowStyle:{type:Object,required:!0},isOpen:{type:Boolean,required:!1,default:!0},title:{type:String,required:!0,default:""},closeButton:{type:Boolean,required:!1,default:!0},resizable:{type:Boolean,required:!1,default:!1},isScrollable:{type:Boolean,required:!1,default:!1},padding:{type:Number,required:!1,default:8},activateWhenOpen:{type:Boolean,required:!1,default:!0},positionHint:{type:String,required:!1,default:""},zGroup:{type:Number,required:!1,default:1},overflow:{type:String,required:!1,default:"visible"},minWidth:{type:Number,required:!1,default:1},minHeight:{type:Number,required:!1,default:0},maxWidth:{type:Number,required:!1,default:0},maxHeight:{type:Number,required:!1,default:0},height:{type:Number,required:!1},width:{type:Number,required:!1},top:{type:Number,required:!1},left:{type:Number,required:!1}},components:{myButton:ne},setup(e,{emit:t}){const n=ao();if(!n)return;const{proxy:i}=n;let r=0,c,v,y;const w=nt(e.isOpen),S=()=>{oe.push(i),y=new Ur(e.zGroup,E),e.isOpen&&(Sn(()=>{r++==0&&(h(i),function(){const R=z.value,{width:A,height:U}=je(R);let O,j;if(e.left!==void 0!=(e.top!==void 0))throw new Error("Either of left or top is specified. Both must be set or not set.");if(typeof e.left=="number")O=e.left,j=e.top;else{const F=e.positionHint||"auto";switch(F){case"auto":{let G=20,V=50,it=0;do{if(oe.every(Q=>{if(!Q.isOpen||i==Q)return!0;const st=Wr(Q);if(st==null)return!0;const{left:ue,top:le}=st;return $r(ue,le,G,V)>16}))break;G=(G+40)%(window.innerWidth-200),V=(V+40)%(window.innerHeight-200)}while(++it<100);O=G,j=V}break;case"center":O=(window.innerWidth-A)/2,j=(window.innerHeight-U)/2,console.log(O,j,window.innerWidth,window.innerHeight,"111111");break;default:try{const G=F.split("/").map(Number);if(G.length!=2)throw null;const[V,it]=G;if(!isFinite(V)||!isFinite(it))throw null;O=V>=0?V:window.innerWidth-A+V,j=it>=0?it:window.innerHeight-U+it}catch{throw new Error(`invalid position string: ${F}`)}}}R&&(R.style.left=`${O}px`,R.style.top=`${j}px`)}()),e.resizable&&l(),B(),c=new Nr(L.value,z.value,{onMove:()=>B(),onMoveStart:()=>t("move-start"),onMoveEnd:()=>t("move-end")}),e.resizable&&function(){const{height:R}=je(L.value);v=new Or(z.value,{onResize:()=>l(),onResizeStart:()=>t("resize-start"),onResizeEnd:()=>t("resize-end"),minWidth:e.minWidth,minHeight:e.minHeight+R,maxWidth:e.maxWidth,maxHeight:e.maxHeight?e.maxHeight+R:void 0})}()}),e.activateWhenOpen&&P()),We.add(i)};function E(R){b.value.zIndex=`${R}`}const z=nt(null),L=nt(null),D=nt(null);function P(){y.raise(),t("activate")}const b=nt({...e.windowStyle.window,zIndex:"auto",overflow:e.overflow}),u=pt(()=>e.windowStyle.titlebar),d=pt(()=>{const R={...e.windowStyle.content};return e.resizable?R.padding="0":e.padding!=null&&(R.padding=`${e.padding}px`),e.isScrollable&&(R.overflow="auto"),R});function h(R){const{width:A,height:U,top:O,left:j}=R,F=z;if(F&&A!=null&&(F.value.style.width=`${A}px`),U!=null){const G=L.value;if(G){const V=ie(G).height;F.value.style.height=`${U+V}px`}}F&&j!=null&&(F.value.style.left=`${j}px`),F&&O!=null&&(F.value.style.top=`${O}px`)}function l(R=!0){const A=z.value,U=L.value,O=D.value;if(O&&A&&U){const{width:j,height:F}=ie(O),{width:G,height:V}=ie(A),it=ie(U).height,Q=G-(O.offsetWidth-j),st=V-it-(O.offsetHeight-F);O.style.width=`${Q}px`,O.style.height=`${st}px`,p(),t("resize",new ei(Q,st)),R&&(t("update:width",Q),t("update:height",st))}}function p(){const R=z.value;if(R){const A=R.getBoundingClientRect();A.left<0&&(b.value.left="0px"),A.top<0&&(b.value.top="0px"),A.right>window.innerWidth&&(b.value.left=window.innerWidth-A.width+"px"),A.bottom>window.innerHeight&&(b.value.top=window.innerHeight-A.height+"px")}}function B(R=!0){p();const A=z.value;if(A){const{left:U,top:O}=A.getBoundingClientRect();R&&(t("update:left",U),t("update:top",O))}}return $t(()=>e.isOpen,R=>{w.value=R}),$t(()=>e.zGroup,R=>{y.group=R}),$t(()=>e.width,R=>{h({width:R}),l(!1)}),$t(()=>e.height,R=>{h({height:R}),l(!1)}),bn(()=>{S()}),co(()=>{We.delete(this),y.unregister(),v&&v.teardown(),c&&c.teardown(),oe.splice(oe.indexOf(i),1)}),{isOpen:w,windowEl:z,titlebar:L,content:D,activate:P,styleWindow:b,styleTitlebar:u,styleContent:d,closeButtonClick:function(){w.value=!1,t("closebuttonclick")}}}});const Fr={class:"title"},Hr=zn("\xD7");var ni,vt;re.render=function(e,t,n,i,r,c){const v=kn("myButton");return H(),ct(xn,{name:"fade",onAfterLeave:t[2]||(t[2]=y=>e.$emit("close")),onAfterEnter:t[3]||(t[3]=y=>e.$emit("open"))},{default:Wt(()=>[uo(K("div",{class:"window",style:yt(e.styleWindow),ref:"windowEl",onMousedown:t[0]||(t[0]=(...y)=>e.activate&&e.activate(...y)),onTouchstart:t[1]||(t[1]=(...y)=>e.activate&&e.activate(...y))},[K("div",{class:"titlebar",style:yt(e.styleTitlebar),ref:"titlebar"},[K("div",Fr,[e.$slots.title?ft(e.$slots,"title",{key:0}):(H(),tt(wt,{key:1},[zn(lo(e.title),1)],2112))]),e.closeButton?(H(),ct(v,{key:0,windowStyle:e.windowStyle,onClick:e.closeButtonClick},{default:Wt(()=>[Hr]),_:1},8,["windowStyle","onClick"])):zt("v-if",!0)],4),K("div",{class:"content",style:yt(e.styleContent),ref:"content"},[ft(e.$slots,"default")],4)],36),[[ho,e.isOpen]])]),_:3})},re.__file="src/controls/vuewindow/window/index.vue",(vt=ni||(ni={}))[vt.StyleBlack=0]="StyleBlack",vt[vt.StyleWhite=1]="StyleWhite",vt[vt.StyleMetal=2]="StyleMetal",vt[vt.StyleGrayblue=3]="StyleGrayblue";const qr={window:{color:"#fff",boxShadow:"0 0 6pt rgba(255, 255, 255, 0.75)",backgroundColor:"rgba(31, 31, 31, 0.9)"},titlebar:{backgroundColor:"rgba(63, 63, 63, 0.9)"},content:{},button:{color:"white"},buttonHover:{backgroundColor:"rgba(255, 255, 255, 0.25)"},buttonActive:{color:"black",backgroundColor:"rgba(255, 255, 255, 0.5)"}},Gr={window:{color:"#000",boxShadow:"0 2pt 4pt rgba(0, 0, 0, 0.5)",backgroundColor:"rgba(239, 239, 239, 0.95)"},titlebar:{backgroundColor:"rgba(191, 191, 191, 0.9)"},content:{},button:{color:"#000"},buttonHover:{backgroundColor:"rgba(0, 0, 0, 0.25)"},buttonActive:{color:"#fff",backgroundColor:"rgba(0, 0, 0, 0.5)"}},Xr={window:{color:"#000",boxShadow:"0 4pt 8pt rgba(0, 0, 0, 0.5)",background:"linear-gradient(to bottom, rgb(215, 215, 215), rgb(191, 191, 191))"},titlebar:{background:"linear-gradient(to bottom, rgb(215, 215, 215), rgb(191, 191, 191))"},content:{},button:{color:"#000"},buttonHover:{backgroundColor:"rgba(0, 0, 0, 0.25)"},buttonActive:{color:"#fff",backgroundColor:"rgba(0, 0, 0, 0.5)"}},Vr={window:{color:"#fff",fontSize:"14px",boxShadow:"0 0 3pt rgba(255, 255, 255, 0.75)",backgroundColor:"rgba(4,51,81,0.6)",borderRadius:"5px"},titlebar:{backgroundColor:"rgba(4,51,81,0.8)",border:"1px solid rgba(153, 153, 153, 0.5)",borderRadius:"5px",fontSize:"16px",fontWeight:400,color:"#fff"},content:{},button:{color:"white",fontSize:"18px"},buttonHover:{backgroundColor:"rgba(255, 255, 255, 0.25)"},buttonActive:{color:"black",backgroundColor:"rgba(255, 255, 255, 0.5)"}},Kr=re;var q,et;(et=q||(q={}))[et.top=0]="top",et[et.bottom=1]="bottom",et[et.centerBack=2]="centerBack",et[et.centerMain=3]="centerMain",et[et.centerFront=4]="centerFront",et[et.left=5]="left",et[et.right=6]="right";class Yr{layoutState;widgetCofig;layoutMap=new Map;preConditionMap=new Map;widgetsLoadedSet=new Set;constructor(t,n){this.layoutState=t,this.widgetCofig=n,this.widgetCofig.forEach(i=>{if(i.afterid)if(this.preConditionMap.has(i.afterid))this.preConditionMap.get(i.afterid)?.add(i);else{const r=new Set;r.add(i),this.preConditionMap.set(i.afterid,r)}})}getWidgetConfig(){return this.widgetCofig}preloadWidgets(){this.widgetCofig.filter(t=>t.preload&&!t.afterid).forEach(t=>{this._loadWidget(t,this.loadOtherDependenceWidgets.bind(this))})}loadWidget(t){if(!t)return;let n;xt(t)?n=t:Kt(t)&&(n=this.widgetCofig.find(i=>i.id===t)),n&&this._loadWidget(n,this.loadOtherDependenceWidgets.bind(this))}loadOtherDependenceWidgets(t){this.preConditionMap.has(t)&&this.preConditionMap.get(t)?.forEach(n=>{n.preload&&this._loadWidget(n)})}_loadWidget(t,n){if(!this.widgetsLoadedSet.has(t.id))return t.component().then(i=>{if(i.default){const r=Mn(i.default);this.getContainerComponents(t.container).value.set(t.id,r),this.widgetsLoadedSet.add(t.id),I.EventBus.emit(X.WidgetLoadedEvent,t.id),n&&n(t.id)}})}hasDependentWidgets(t){let n=!1;if(this.preConditionMap.has(t)){const i=this.preConditionMap.get(t);if(i){for(const r of i)if(this.isWidgetLoaded(r.id)){n=!0;break}}}return n}unloadWidget(t){if(!t||!this.isWidgetLoaded(t))return;const n=this.widgetCofig.find(i=>i.id===t);if(n){if(this.preConditionMap.has(t)){const i=this.preConditionMap.get(t);if(i)for(const r of i)this.unloadWidget(r.id)}this.getContainerComponents(n.container).value.delete(t),this.widgetsLoadedSet.delete(t),I.EventBus.emit(X.WidgetUnLoadedEvent,t)}}isWidgetLoaded(t){return this.widgetsLoadedSet.has(t)}splitTwoContainer(t=!1){const n=this.layoutState.centerMainContainer,i=this.layoutState.centerBackContainer;t?(n&&(n.style.left="0",n.style.width="100%"),i&&(i.style.width="100%")):(n&&(n.style.left="50%",n.style.width="50%"),i&&(i.style.width="50%"))}getLayoutContainer(t){switch(t){case q.top:return this.layoutState.topContainer;case q.bottom:return this.layoutState.bottomContainer;case q.left:return this.layoutState.leftContainer;case q.right:return this.layoutState.rightContainer;case q.centerBack:return this.layoutState.centerBackContainer;case q.centerMain:return this.layoutState.centerMainContainer;case q.centerFront:return this.layoutState.centerFrontContainer}}changeContainerVisible(t,n=!1){const i=this.getLayoutContainer(t);i&&(i.style.visibility=n?"visible":"hidden")}changeWidgetVisible(t,n=!1){const i=this.getWidgetComponent(t);i&&I.EventBus.emit(X.WidgetVisibleChanged,{id:t,name:i.name,visible:n})}getWidgetComponent(t){if(this.widgetsLoadedSet.has(t)){const n=this.widgetCofig.find(i=>i.id===t);if(n)return this.getContainerComponents(n.container).value.get(t)}}getWigetItem(t){return this.widgetCofig.find(n=>n.id===t)}getGroupWigetItems(t){return this.widgetCofig.filter(n=>n.group===t)}getContainerComponents(t){if(this.layoutMap.has(t))return this.layoutMap.get(t);{const n=nt(new Map);return this.layoutMap.set(t,n),n}}addContainerComponent(t,n){}}var $e=Bt({name:"MainContainer",props:{widgetConfig:{type:Array,required:!0,default:()=>[]},layoutStyle:{type:Object}},components:{},setup(e,{attrs:t,slots:n,emit:i}){const r=wn({topContainer:void 0,centerBackContainer:void 0,centerMainContainer:void 0,centerFrontContainer:void 0,bottomContainer:void 0,leftContainer:void 0,rightContainer:void 0});if(!I.LayoutManager){const D=new Yr(r,e.widgetConfig);I.LayoutManager=D,D.preloadWidgets()}const c=z(q.top),v=z(q.centerBack),y=z(q.centerFront),w=z(q.left),S=z(q.right),E=z(q.bottom);function z(D){return I.LayoutManager?.getContainerComponents(D)}const L=pt(()=>e.layoutStyle);return{...fo(r),topContainerComponents:c,centerbackComponents:v,centerfrontComponents:y,leftContainerComponents:w,rightContainerComponents:S,bottomContainerComponents:E,containerStyle:L}}});const Jr={ref:"topContainer",class:"topContainer"},Zr={ref:"centerBackContainer",class:"centerdiv backContainer"},Qr={ref:"centerMainContainer",class:"centerdiv mainContainer"},ts={ref:"centerFrontContainer",class:"centerdiv centerContainer"},es={ref:"leftContainer",class:"leftContainer"},ns={ref:"rightContainer",class:"rightContainer"},is={ref:"bottomContainer",class:"bottomContainer"};$e.render=function(e,t,n,i,r,c){const v=kn("router-view");return H(),tt("div",{class:"layoutContainer",style:yt(e.containerStyle)},[K("div",Jr,[(H(!0),tt(wt,null,Mt(e.topContainerComponents,([y,w])=>(H(),ct(bt(w),{key:y}))),128))],512),K("div",null,[zt(" \u5E95\u5C42-\u4E3B\u5BB9\u5668 "),K("div",Zr,[(H(!0),tt(wt,null,Mt(e.centerbackComponents,([y,w])=>(H(),ct(bt(w),{key:y}))),128))],512),zt(" \u4E3B\u8981\u5BB9\u5668 "),K("div",Qr,[Cn(v,null,{default:Wt(({Component:y})=>[(H(),ct(bt(y)))]),_:1})],512),zt(" \u6D6E\u52A8-\u4E3B\u5BB9\u5668 "),K("div",ts,[(H(!0),tt(wt,null,Mt(e.centerfrontComponents,([y,w])=>(H(),ct(bt(w),{key:y}))),128))],512),K("div",es,[(H(!0),tt(wt,null,Mt(e.leftContainerComponents,([y,w])=>(H(),ct(bt(w),{key:y}))),128))],512),K("div",ns,[(H(!0),tt(wt,null,Mt(e.rightContainerComponents,([y,w])=>(H(),ct(bt(w),{key:y}))),128))],512)]),K("div",is,[(H(!0),tt(wt,null,Mt(e.bottomContainerComponents,([y,w])=>(H(),ct(bt(w),{key:y}))),128))],512)],4)},$e.__file="src/controls/layoutcontainer/layout.vue";class os{layoutState;widgetCofig;layoutMap=new Map;preConditionMap=new Map;widgetsLoadedSet=new Set;constructor(t,n){this.layoutState=t,this.widgetCofig=n,this.widgetCofig.forEach(i=>{if(i.afterid)if(this.preConditionMap.has(i.afterid))this.preConditionMap.get(i.afterid)?.add(i);else{const r=new Set;r.add(i),this.preConditionMap.set(i.afterid,r)}})}getWidgetConfig(){return this.widgetCofig}preloadWidgets(){this.widgetCofig.filter(t=>t.preload&&!t.afterid).forEach(t=>{this._loadWidget(t,this.loadOtherDependenceWidgets.bind(this))})}loadWidget(t){if(!t)return;let n;xt(t)?n=t:Kt(t)&&(n=this.widgetCofig.find(i=>i.id===t)),n&&this._loadWidget(n,this.loadOtherDependenceWidgets.bind(this))}loadOtherDependenceWidgets(t){this.preConditionMap.has(t)&&this.preConditionMap.get(t)?.forEach(n=>{n.preload&&this._loadWidget(n)})}_loadWidget(t,n){if(!this.widgetsLoadedSet.has(t.id))return t.component().then(i=>{if(i.default){const r=Mn(i.default);this.getContainerComponents(t.container).value.set(t.id,r),this.widgetsLoadedSet.add(t.id),I.EventBus.emit(X.WidgetLoadedEvent,t.id),n&&n(t.id)}})}hasDependentWidgets(t){let n=!1;if(this.preConditionMap.has(t)){const i=this.preConditionMap.get(t);if(i){for(const r of i)if(this.isWidgetLoaded(r.id)){n=!0;break}}}return n}unloadWidget(t){if(!t||!this.isWidgetLoaded(t))return;const n=this.widgetCofig.find(i=>i.id===t);if(n){if(this.preConditionMap.has(t)){const i=this.preConditionMap.get(t);if(i)for(const r of i)this.unloadWidget(r.id)}this.getContainerComponents(n.container).value.delete(t),this.widgetsLoadedSet.delete(t),I.EventBus.emit(X.WidgetUnLoadedEvent,t)}}isWidgetLoaded(t){return this.widgetsLoadedSet.has(t)}splitTwoContainer(t=!1){const n=this.layoutState.centerMainContainer,i=this.layoutState.centerBackContainer;t?(n&&(n.style.left="0",n.style.width="100%"),i&&(i.style.width="100%")):(n&&(n.style.left="50%",n.style.width="50%"),i&&(i.style.width="50%"))}getLayoutContainer(t){switch(t){case q.top:return this.layoutState.topContainer;case q.bottom:return this.layoutState.bottomContainer;case q.left:return this.layoutState.leftContainer;case q.right:return this.layoutState.rightContainer;case q.centerBack:return this.layoutState.centerBackContainer;case q.centerMain:return this.layoutState.centerMainContainer;case q.centerFront:return this.layoutState.centerFrontContainer}}changeContainerVisible(t,n=!1){const i=this.getLayoutContainer(t);i&&(i.style.visibility=n?"visible":"hidden")}changeWidgetVisible(t,n=!1){const i=this.getWidgetComponent(t);i&&I.EventBus.emit(X.WidgetVisibleChanged,{id:t,name:i.name,visible:n})}getWidgetComponent(t){if(this.widgetsLoadedSet.has(t)){const n=this.widgetCofig.find(i=>i.id===t);if(n)return this.getContainerComponents(n.container).value.get(t)}}getWigetItem(t){return this.widgetCofig.find(n=>n.id===t)}getGroupWigetItems(t){return this.widgetCofig.filter(n=>n.group===t)}getContainerComponents(t){if(this.layoutMap.has(t))return this.layoutMap.get(t);{const n=nt(new Map);return this.layoutMap.set(t,n),n}}addContainerComponent(t,n){}}const se=new Map,Fe=new Map;let ae;const rs={getDefaultClient(){if(ae||(ae=new At(SysConfig.DefaultHproseAPI)),!ae)throw Error("HproseProxy\u5BF9\u8C61\u4E3A\u7A7A");return ae},registerHprose(e,t){const n=Fe.get(e);if(!n){const i=new At(t);se.set(e,i)}return n},getHprose:e=>Fe?.get(e),getProxyHprose:e=>se.get(e),unregisterHprose(e){se.get(e)&&(Fe.delete(e),se.delete(e))}},ss=4e3,Et={Login:"/api/Login/Login",CheckLogin:"\u200B/api\u200B/Check\u200B/Login",Logout:"/api/Check/ExitLogin",ChangePWD:"/api/UserManager/UpdateUserPWD",RefreshToken:"/api/Check/RefreshToken",CheckToken:"/api/Check/CheckToken"},as=I.Config.ServiceURL.LoginAuthURL;function He(){const e=Bn();e&&rt(Et.RefreshToken,as,{refreshToken:e}).then(t=>{ce(t.data)})}function ii(e){I.User||(I.User={id:e.id,name:e.name,issystem:e.issystem,issecurity:e.issecurity,appkey:e.appkey,role:e.role,doubleToken:{accessToken:{tokenContent:e.token,expires:e.expire},refreshToken:{tokenContent:e.refresh,expires:e.expire}}});const t=new Date().getTime(),n=new Date(e.expire).getTime()-t;n>0&&(n<=4e3?He():setTimeout(He,n-4e3))}function ce(e){I.User&&(I.User.doubleToken=e);const t=new Date().getTime(),n=new Date(e.accessToken.expires).getTime()-t;if(n>0&&I.User){let i=Ct();if(!i){const r=I.User.doubleToken;i={id:I.User.id,name:I.User.name,token:r?r.accessToken.tokenContent:"",expire:r?r.accessToken.expires:"",refresh:r?r.accessToken.tokenContent:"",issystem:I.User.issystem,issecurity:I.User.issecurity,appkey:I.User.appkey,role:I.User.role}}i.token=e.accessToken.tokenContent,i.expire=e.accessToken.expires,i.refresh=e.refreshToken.tokenContent,mt.set("access_token",i,n/1e3),ii(i)}else mt.remove("access_token")}function qe(e){I.User=e}const Dt=I.Config.ServiceURL.LoginAuthURL;async function cs(e){const t=(await rt(Et.Login,Dt,e))?.data;return t&&t.isSuccess&&(qe(t.resultValue),ce(t.resultValue.doubleToken)),t}async function us(e){const t=(await rt(Et.CheckLogin,Dt,e))?.data;return t&&t.isSuccess&&(qe(t.resultValue),ce(t.resultValue.doubleToken)),t}function ls(e){return rt(Et.ChangePWD,Dt,e)}function hs(){const e=Ct();e&&(Ie(Et.Logout,Dt,{token:e.token,reftoken:e.refresh}),Me())}function ds(e){return rt(Et.CheckToken,Dt,{token:e})}const Ge=new Ht("",sessionStorage);function oi(){return Ge.get("ROLE_SYSTEM_RIGHT")}function ri(e){Ge.set("ROLE_SYSTEM_RIGHT",e)}function si(){Ge.remove("ROLE_SYSTEM_RIGHT")}const Xe=[],Ve=[],Ke=[];function Nt(){return oi()}async function fs(e,t,n,i){if(si(),!I.User)return;let r;if(i)r=i;else{if(!t)return;let c=n;c||(c=I.Config.ServiceURL.LoginAuthURL);const v=await rt(t,c,{system:e});if(!v||!v.data)return void I.Message?.warn("\u65E0\u6CD5\u83B7\u53D6\u529F\u80FD\u6388\u6743\u5217\u8868\uFF01");r=v.data}return r&&ri(r),r}function ai(e,t){const n={...e};return n.meta||(n.meta={}),t.index!=null&&(n.meta.index=t.index),t.title!=null&&(n.meta.title=t.title),e.children&&(n.children=[],t.children&&t.children.forEach(i=>{const r=e.children?.find(c=>c.path===i.path);if(r){const c=ai(r,i);c&&n.children?.push(c)}})),n}function ps(e){if(I.User?.issystem)return e;const t=Nt();return t&&t.routes?(Ke.length>0||e.forEach(n=>{const i=t.routes?.find(r=>r.name===n.name);if(i){const r=ai(n,i);r&&Ke.push(r)}}),Ke):void 0}function ci(e,t){const n={...e};return t.index!=null&&(n.index=t.index),e.children&&(n.children=[],t.children&&t.children.forEach(i=>{const r=e.children?.find(c=>c.name===i.name);if(r){const c=ci(r,i);c&&n.children?.push(c)}})),n}function ms(e){if(I.User?.issystem)return e;const t=Nt();return t&&t.widgetMenu?(Ve.length>0||e.forEach(n=>{const i=t.widgetMenu?.find(r=>r.name===n.name);if(i){const r=ci(n,i);r&&Ve.push(r)}}),Ve):void 0}function gs(e){if(I.User?.issystem)return e;const t=Nt();return t&&t.widgets?(Xe.length>0||e?.forEach(n=>{t.widgets?.find(i=>i.id===n.id)&&Xe.push(n)}),Xe):void 0}function vs(e){if(I.User?.issystem)return e;const t=Nt();return t?t.functions:void 0}export{ar as BigFileDownload,Xt as Download,Bo as DownloadByUrl,St as EnumColor,I as Global,rs as GlobalHprose,It as GlobalMitt,lt as H5Tool,Ut as HproseClient,Po as HttpDownload,Ln as JsonDownload,$e as LayoutContainer,q as LayoutContainerEnum,os as LayoutManager,_r as ObjToUrlParams,we as Pane,At as ProxyClient,Lo as SaveAs,vo as Splitpanes,Ht as Storage,Ft as StringUtils,qr as StyleBlack,Vr as StyleGrayblue,Xr as StyleMetal,Gr as StyleWhite,X as SysEvents,ss as TOKEN_REFRESH_TIME,Et as USER_TOKEN_API,Zt as VCollapsiblePanel,Jt as VCollapsiblePanelGroup,re as VWindow,ei as WindowResizeEvent,Kr as WindowType,Io as calculateBestTextColor,ls as changePWD,ii as checkDoRefreshToken,us as checkLogin,ds as checkToken,Me as clearLocalToken,si as clearRight,Mo as colorIsDark,tr as createFileUpload,_o as darken,qn as deepMerge,He as doRefreshToken,Gn as exportSystemRights,Oo as get,Nt as getCurrentSystemRight,Wo as getData,vs as getFunctions,So as getHexColor,Ct as getLocalToken,nr as getLockState,xo as getLongHexColor,Tn as getProxyClient,Co as getRGBColor,ko as getRGBColorFromHSLA,Bn as getRefreshToken,oi as getRight,ps as getRoutes,fs as getSystemRoleRight,gs as getWidgetConfig,ms as getWidgetMenus,xe as hexToRGB,An as init,No as initDefaultProxyClient,Do as initXFrame,Y as is,Hn as isArray,fr as isAsyncFunction,mr as isBoolean,gr as isClient,hr as isDate,Fn as isDef,yr as isElement,Sr as isEmpty,Eo as isEnumColor,Cr as isError,Te as isFunction,Gt as isHexColor,br as isImageDom,zr as isMap,Ne as isNull,ur as isNullAndUnDef,lr as isNullOrUnDef,dr as isNumber,xt as isObject,pr as isPromise,wr as isServer,Kt as isString,kr as isSymbol,De as isUnDef,Mr as isValidURL,Er as isWeakMap,xr as isWeakSet,vr as isWindow,er as jquery,Ro as lighten,cs as login,hs as logout,bo as newGuid,ir as onLockListener,jo as post,rt as requestGet,Ie as requestPost,Uo as requestPostBody,zo as rgbToHex,ce as setLocalToken,ri as setRight,qe as setUser,Ao as sleep,wo as storage,mt as storageHelper,or as unLockListener,qt as uuid,Rr as writeIconifyList,Ir as writeSysRoleRight};
|