xframelib 0.4.7 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,5 +1,9 @@
1
- import{h as Hi,openBlock as H,createElementBlock as tt,normalizeStyle as yt,renderSlot as dt,reactive as pn,computed as ft,defineComponent as Bt,ref as nt,onMounted as mn,onUpdated as qi,nextTick as gn,normalizeClass as Xi,createElementVNode as K,createCommentVNode as kt,createVNode as vn,Transition as yn,withCtx as jt,withModifiers as wn,getCurrentInstance as Gi,watch as Wt,onBeforeUnmount as Vi,resolveComponent as bn,createBlock as at,withDirectives as Ki,Fragment as wt,createTextVNode as Sn,toDisplayString as Yi,vShow as Ji,markRaw as Cn,toRefs as Zi,renderList as zt,resolveDynamicComponent as bt}from"vue";import{Client as Qi,ClientContext as me}from"@hprose/rpc-core";import{ByteStream as xn}from"@hprose/io";import{HttpTransport as to}from"@hprose/rpc-html5";var eo={name:"splitpanes",props:{horizontal:{type:Boolean},pushOtherPanes:{type:Boolean,default:!0},dblClickSplitter:{type:Boolean,default:!0},rtl:{type:Boolean,default:!1},firstSplitter:{type:Boolean}},provide(){return{requestUpdate:this.requestUpdate,onPaneAdd:this.onPaneAdd,onPaneRemove:this.onPaneRemove,onPaneClick:this.onPaneClick}},data:()=>({container:null,ready:!1,panes:[],touch:{mouseDown:!1,dragging:!1,activeSplitter:null},splitterTaps:{splitter:null,timeoutId:null}}),computed:{panesCount(){return this.panes.length},indexedPanes(){return this.panes.reduce((e,t)=>(e[t.id]=t)&&e,{})}},methods:{updatePaneComponents(){this.panes.forEach(e=>{e.update&&e.update({[this.horizontal?"height":"width"]:`${this.indexedPanes[e.id].size}%`})})},bindEvents(){document.addEventListener("mousemove",this.onMouseMove,{passive:!1}),document.addEventListener("mouseup",this.onMouseUp),"ontouchstart"in window&&(document.addEventListener("touchmove",this.onMouseMove,{passive:!1}),document.addEventListener("touchend",this.onMouseUp))},unbindEvents(){document.removeEventListener("mousemove",this.onMouseMove,{passive:!1}),document.removeEventListener("mouseup",this.onMouseUp),"ontouchstart"in window&&(document.removeEventListener("touchmove",this.onMouseMove,{passive:!1}),document.removeEventListener("touchend",this.onMouseUp))},onMouseDown(e,t){this.bindEvents(),this.touch.mouseDown=!0,this.touch.activeSplitter=t},onMouseMove(e){this.touch.mouseDown&&(e.preventDefault(),this.touch.dragging=!0,this.calculatePanesSize(this.getCurrentMouseDrag(e)),this.$emit("resize",this.panes.map(t=>({min:t.min,max:t.max,size:t.size}))))},onMouseUp(){this.touch.dragging&&this.$emit("resized",this.panes.map(e=>({min:e.min,max:e.max,size:e.size}))),this.touch.mouseDown=!1,setTimeout(()=>{this.touch.dragging=!1,this.unbindEvents()},100)},onSplitterClick(e,t){"ontouchstart"in window&&(e.preventDefault(),this.dblClickSplitter&&(this.splitterTaps.splitter===t?(clearTimeout(this.splitterTaps.timeoutId),this.splitterTaps.timeoutId=null,this.onSplitterDblClick(e,t),this.splitterTaps.splitter=null):(this.splitterTaps.splitter=t,this.splitterTaps.timeoutId=setTimeout(()=>{this.splitterTaps.splitter=null},500)))),this.touch.dragging||this.$emit("splitter-click",this.panes[t])},onSplitterDblClick(e,t){let n=0;this.panes=this.panes.map((i,r)=>(i.size=r===t?i.max:i.min,r!==t&&(n+=i.min),i)),this.panes[t].size-=n,this.$emit("pane-maximize",this.panes[t])},onPaneClick(e,t){this.$emit("pane-click",this.indexedPanes[t])},getCurrentMouseDrag(e){const t=this.container.getBoundingClientRect(),{clientX:n,clientY:i}="ontouchstart"in window&&e.touches?e.touches[0]:e;return{x:n-t.left,y:i-t.top}},getCurrentDragPercentage(e){e=e[this.horizontal?"y":"x"];const t=this.container[this.horizontal?"clientHeight":"clientWidth"];return this.rtl&&!this.horizontal&&(e=t-e),100*e/t},calculatePanesSize(e){const t=this.touch.activeSplitter;let n={prevPanesSize:this.sumPrevPanesSize(t),nextPanesSize:this.sumNextPanesSize(t),prevReachedMinPanes:0,nextReachedMinPanes:0};const i=0+(this.pushOtherPanes?0:n.prevPanesSize),r=100-(this.pushOtherPanes?0:n.nextPanesSize),c=Math.max(Math.min(this.getCurrentDragPercentage(e),r),i);let y=[t,t+1],v=this.panes[y[0]]||null,b=this.panes[y[1]]||null;const C=v.max<100&&c>=v.max+n.prevPanesSize,z=b.max<100&&c<=100-(b.max+this.sumNextPanesSize(t+1));if(C||z)C?(v.size=v.max,b.size=Math.max(100-v.max-n.prevPanesSize-n.nextPanesSize,0)):(v.size=Math.max(100-b.max-n.prevPanesSize-this.sumNextPanesSize(t+1),0),b.size=b.max);else{if(this.pushOtherPanes){const M=this.doPushOtherPanes(n,c);if(!M)return;({sums:n,panesToResize:y}=M),v=this.panes[y[0]]||null,b=this.panes[y[1]]||null}v!==null&&(v.size=Math.min(Math.max(c-n.prevPanesSize-n.prevReachedMinPanes,v.min),v.max)),b!==null&&(b.size=Math.min(Math.max(100-c-n.nextPanesSize-n.nextReachedMinPanes,b.min),b.max))}},doPushOtherPanes(e,t){const n=this.touch.activeSplitter,i=[n,n+1];return t<e.prevPanesSize+this.panes[i[0]].min&&(i[0]=this.findPrevExpandedPane(n).index,e.prevReachedMinPanes=0,i[0]<n&&this.panes.forEach((r,c)=>{c>i[0]&&c<=n&&(r.size=r.min,e.prevReachedMinPanes+=r.min)}),e.prevPanesSize=this.sumPrevPanesSize(i[0]),i[0]===void 0)?(e.prevReachedMinPanes=0,this.panes[0].size=this.panes[0].min,this.panes.forEach((r,c)=>{c>0&&c<=n&&(r.size=r.min,e.prevReachedMinPanes+=r.min)}),this.panes[i[1]].size=100-e.prevReachedMinPanes-this.panes[0].min-e.prevPanesSize-e.nextPanesSize,null):t>100-e.nextPanesSize-this.panes[i[1]].min&&(i[1]=this.findNextExpandedPane(n).index,e.nextReachedMinPanes=0,i[1]>n+1&&this.panes.forEach((r,c)=>{c>n&&c<i[1]&&(r.size=r.min,e.nextReachedMinPanes+=r.min)}),e.nextPanesSize=this.sumNextPanesSize(i[1]-1),i[1]===void 0)?(e.nextReachedMinPanes=0,this.panes[this.panesCount-1].size=this.panes[this.panesCount-1].min,this.panes.forEach((r,c)=>{c<this.panesCount-1&&c>=n+1&&(r.size=r.min,e.nextReachedMinPanes+=r.min)}),this.panes[i[0]].size=100-e.prevPanesSize-e.nextReachedMinPanes-this.panes[this.panesCount-1].min-e.nextPanesSize,null):{sums:e,panesToResize:i}},sumPrevPanesSize(e){return this.panes.reduce((t,n,i)=>t+(i<e?n.size:0),0)},sumNextPanesSize(e){return this.panes.reduce((t,n,i)=>t+(i>e+1?n.size:0),0)},findPrevExpandedPane(e){return[...this.panes].reverse().find(t=>t.index<e&&t.size>t.min)||{}},findNextExpandedPane(e){return this.panes.find(t=>t.index>e+1&&t.size>t.min)||{}},checkSplitpanesNodes(){Array.from(this.container.children).forEach(e=>{const t=e.classList.contains("splitpanes__pane"),n=e.classList.contains("splitpanes__splitter");if(!t&&!n)return e.parentNode.removeChild(e),void console.warn("Splitpanes: Only <pane> elements are allowed at the root of <splitpanes>. One of your DOM nodes was removed.")})},addSplitter(e,t,n=!1){const i=e-1,r=document.createElement("div");r.classList.add("splitpanes__splitter"),n||(r.onmousedown=c=>this.onMouseDown(c,i),typeof window!="undefined"&&"ontouchstart"in window&&(r.ontouchstart=c=>this.onMouseDown(c,i)),r.onclick=c=>this.onSplitterClick(c,i+1)),this.dblClickSplitter&&(r.ondblclick=c=>this.onSplitterDblClick(c,i+1)),t.parentNode.insertBefore(r,t)},removeSplitter(e){e.onmousedown=void 0,e.onclick=void 0,e.ondblclick=void 0,e.parentNode.removeChild(e)},redoSplitters(){const e=Array.from(this.container.children);e.forEach(n=>{n.className.includes("splitpanes__splitter")&&this.removeSplitter(n)});let t=0;e.forEach(n=>{n.className.includes("splitpanes__pane")&&(!t&&this.firstSplitter?this.addSplitter(t,n,!0):t&&this.addSplitter(t,n),t++)})},requestUpdate({target:e,...t}){const n=this.indexedPanes[e._.uid];Object.entries(t).forEach(([i,r])=>n[i]=r)},onPaneAdd(e){let t=-1;Array.from(e.$el.parentNode.children).some(r=>(r.className.includes("splitpanes__pane")&&t++,r===e.$el));const n=parseFloat(e.minSize),i=parseFloat(e.maxSize);this.panes.splice(t,0,{id:e._.uid,index:t,min:isNaN(n)?0:n,max:isNaN(i)?100:i,size:e.size===null?null:parseFloat(e.size),givenSize:e.size,update:e.update}),this.panes.forEach((r,c)=>r.index=c),this.ready&&this.$nextTick(()=>{this.redoSplitters(),this.resetPaneSizes({addedPane:this.panes[t]}),this.$emit("pane-add",{index:t,panes:this.panes.map(r=>({min:r.min,max:r.max,size:r.size}))})})},onPaneRemove(e){const t=this.panes.findIndex(i=>i.id===e._.uid),n=this.panes.splice(t,1)[0];this.panes.forEach((i,r)=>i.index=r),this.$nextTick(()=>{this.redoSplitters(),this.resetPaneSizes({removedPane:{...n,index:t}}),this.$emit("pane-remove",{removed:n,panes:this.panes.map(i=>({min:i.min,max:i.max,size:i.size}))})})},resetPaneSizes(e={}){e.addedPane||e.removedPane?this.panes.some(t=>t.givenSize!==null||t.min||t.max<100)?this.equalizeAfterAddOrRemove(e):this.equalize():this.initialPanesSizing(),this.ready&&this.$emit("resized",this.panes.map(t=>({min:t.min,max:t.max,size:t.size})))},equalize(){const e=100/this.panesCount;let t=0;const n=[],i=[];this.panes.forEach(r=>{r.size=Math.max(Math.min(e,r.max),r.min),t-=r.size,r.size>=r.max&&n.push(r.id),r.size<=r.min&&i.push(r.id)}),t>.1&&this.readjustSizes(t,n,i)},initialPanesSizing(){let e=100;const t=[],n=[];let i=0;this.panes.forEach(c=>{e-=c.size,c.size!==null&&i++,c.size>=c.max&&t.push(c.id),c.size<=c.min&&n.push(c.id)});let r=100;e>.1&&(this.panes.forEach(c=>{c.size===null&&(c.size=Math.max(Math.min(e/(this.panesCount-i),c.max),c.min)),r-=c.size}),r>.1&&this.readjustSizes(e,t,n))},equalizeAfterAddOrRemove({addedPane:e}={}){let t=100/this.panesCount,n=0;const i=[],r=[];e&&e.givenSize!==null&&(t=(100-e.givenSize)/(this.panesCount-1)),this.panes.forEach(c=>{n-=c.size,c.size>=c.max&&i.push(c.id),c.size<=c.min&&r.push(c.id)}),Math.abs(n)<.1||(this.panes.forEach(c=>{e&&e.givenSize!==null&&e.id===c.id||(c.size=Math.max(Math.min(t,c.max),c.min)),n-=c.size,c.size>=c.max&&i.push(c.id),c.size<=c.min&&r.push(c.id)}),n>.1&&this.readjustSizes(n,i,r))},readjustSizes(e,t,n){let i;i=e>0?e/(this.panesCount-t.length):e/(this.panesCount-n.length),this.panes.forEach(r=>{if(e>0&&!t.includes(r.id)){const c=Math.max(Math.min(r.size+i,r.max),r.min);e-=c-r.size,r.size=c}else if(!n.includes(r.id)){const c=Math.max(Math.min(r.size+i,r.max),r.min);e-=c-r.size,r.size=c}r.update({[this.horizontal?"height":"width"]:`${this.indexedPanes[r.id].size}%`})}),Math.abs(e)>.1&&this.$nextTick(()=>{this.ready&&console.warn("Splitpanes: Could not resize panes correctly due to their constraints.")})}},watch:{panes:{deep:!0,immediate:!1,handler(){this.updatePaneComponents()}},horizontal(){this.updatePaneComponents()},firstSplitter(){this.redoSplitters()},dblClickSplitter(e){[...this.container.querySelectorAll(".splitpanes__splitter")].forEach((t,n)=>{t.ondblclick=e?i=>this.onSplitterDblClick(i,n):void 0})}},beforeUnmount(){this.ready=!1},mounted(){this.container=this.$refs.container,this.checkSplitpanesNodes(),this.redoSplitters(),this.resetPaneSizes(),this.updatePaneComponents(),this.$emit("ready"),this.ready=!0},render(){return Hi("div",{ref:"container",class:["splitpanes","splitpanes--"+(this.horizontal?"horizontal":"vertical"),{"splitpanes--dragging":this.touch.dragging}]},this.$slots.default())},__file:"src/controls/splitpanes/splitpanes.vue"},ge={name:"pane",inject:["requestUpdate","onPaneAdd","onPaneRemove","onPaneClick"],props:{size:{type:[Number,String],default:10},minSize:{type:[Number,String],default:0},maxSize:{type:[Number,String],default:100}},data:()=>({style:{}}),mounted(){this.onPaneAdd(this)},beforeUnmount(){this.onPaneRemove(this)},methods:{update(e){this.style=e}},computed:{sizeNumber(){return this.size||this.size===0?parseFloat(this.size):null},minSizeNumber(){return parseFloat(this.minSize)},maxSizeNumber(){return parseFloat(this.maxSize)}},watch:{sizeNumber(e){this.requestUpdate({target:this,size:e})},minSizeNumber(e){this.requestUpdate({target:this,min:e})},maxSizeNumber(e){this.requestUpdate({target:this,max:e})}}};ge.render=function(e,t,n,i,r,c){return H(),tt("div",{class:"splitpanes__pane",onClick:t[0]||(t[0]=y=>c.onPaneClick(y,e._.uid)),style:yt(e.style)},[dt(e.$slots,"default")],4)},ge.__file="src/controls/splitpanes/pane.vue";var Mt=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function ve(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var no={exports:{}},En=no.exports=function(e){var t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function n(w,u){var h=w[0],d=w[1],l=w[2],p=w[3];d=((d+=((l=((l+=((p=((p+=((h=((h+=(d&l|~d&p)+u[0]-680876936|0)<<7|h>>>25)+d|0)&d|~h&l)+u[1]-389564586|0)<<12|p>>>20)+h|0)&h|~p&d)+u[2]+606105819|0)<<17|l>>>15)+p|0)&p|~l&h)+u[3]-1044525330|0)<<22|d>>>10)+l|0,d=((d+=((l=((l+=((p=((p+=((h=((h+=(d&l|~d&p)+u[4]-176418897|0)<<7|h>>>25)+d|0)&d|~h&l)+u[5]+1200080426|0)<<12|p>>>20)+h|0)&h|~p&d)+u[6]-1473231341|0)<<17|l>>>15)+p|0)&p|~l&h)+u[7]-45705983|0)<<22|d>>>10)+l|0,d=((d+=((l=((l+=((p=((p+=((h=((h+=(d&l|~d&p)+u[8]+1770035416|0)<<7|h>>>25)+d|0)&d|~h&l)+u[9]-1958414417|0)<<12|p>>>20)+h|0)&h|~p&d)+u[10]-42063|0)<<17|l>>>15)+p|0)&p|~l&h)+u[11]-1990404162|0)<<22|d>>>10)+l|0,d=((d+=((l=((l+=((p=((p+=((h=((h+=(d&l|~d&p)+u[12]+1804603682|0)<<7|h>>>25)+d|0)&d|~h&l)+u[13]-40341101|0)<<12|p>>>20)+h|0)&h|~p&d)+u[14]-1502002290|0)<<17|l>>>15)+p|0)&p|~l&h)+u[15]+1236535329|0)<<22|d>>>10)+l|0,d=((d+=((l=((l+=((p=((p+=((h=((h+=(d&p|l&~p)+u[1]-165796510|0)<<5|h>>>27)+d|0)&l|d&~l)+u[6]-1069501632|0)<<9|p>>>23)+h|0)&d|h&~d)+u[11]+643717713|0)<<14|l>>>18)+p|0)&h|p&~h)+u[0]-373897302|0)<<20|d>>>12)+l|0,d=((d+=((l=((l+=((p=((p+=((h=((h+=(d&p|l&~p)+u[5]-701558691|0)<<5|h>>>27)+d|0)&l|d&~l)+u[10]+38016083|0)<<9|p>>>23)+h|0)&d|h&~d)+u[15]-660478335|0)<<14|l>>>18)+p|0)&h|p&~h)+u[4]-405537848|0)<<20|d>>>12)+l|0,d=((d+=((l=((l+=((p=((p+=((h=((h+=(d&p|l&~p)+u[9]+568446438|0)<<5|h>>>27)+d|0)&l|d&~l)+u[14]-1019803690|0)<<9|p>>>23)+h|0)&d|h&~d)+u[3]-187363961|0)<<14|l>>>18)+p|0)&h|p&~h)+u[8]+1163531501|0)<<20|d>>>12)+l|0,d=((d+=((l=((l+=((p=((p+=((h=((h+=(d&p|l&~p)+u[13]-1444681467|0)<<5|h>>>27)+d|0)&l|d&~l)+u[2]-51403784|0)<<9|p>>>23)+h|0)&d|h&~d)+u[7]+1735328473|0)<<14|l>>>18)+p|0)&h|p&~h)+u[12]-1926607734|0)<<20|d>>>12)+l|0,d=((d+=((l=((l+=((p=((p+=((h=((h+=(d^l^p)+u[5]-378558|0)<<4|h>>>28)+d|0)^d^l)+u[8]-2022574463|0)<<11|p>>>21)+h|0)^h^d)+u[11]+1839030562|0)<<16|l>>>16)+p|0)^p^h)+u[14]-35309556|0)<<23|d>>>9)+l|0,d=((d+=((l=((l+=((p=((p+=((h=((h+=(d^l^p)+u[1]-1530992060|0)<<4|h>>>28)+d|0)^d^l)+u[4]+1272893353|0)<<11|p>>>21)+h|0)^h^d)+u[7]-155497632|0)<<16|l>>>16)+p|0)^p^h)+u[10]-1094730640|0)<<23|d>>>9)+l|0,d=((d+=((l=((l+=((p=((p+=((h=((h+=(d^l^p)+u[13]+681279174|0)<<4|h>>>28)+d|0)^d^l)+u[0]-358537222|0)<<11|p>>>21)+h|0)^h^d)+u[3]-722521979|0)<<16|l>>>16)+p|0)^p^h)+u[6]+76029189|0)<<23|d>>>9)+l|0,d=((d+=((l=((l+=((p=((p+=((h=((h+=(d^l^p)+u[9]-640364487|0)<<4|h>>>28)+d|0)^d^l)+u[12]-421815835|0)<<11|p>>>21)+h|0)^h^d)+u[15]+530742520|0)<<16|l>>>16)+p|0)^p^h)+u[2]-995338651|0)<<23|d>>>9)+l|0,d=((d+=((p=((p+=(d^((h=((h+=(l^(d|~p))+u[0]-198630844|0)<<6|h>>>26)+d|0)|~l))+u[7]+1126891415|0)<<10|p>>>22)+h|0)^((l=((l+=(h^(p|~d))+u[14]-1416354905|0)<<15|l>>>17)+p|0)|~h))+u[5]-57434055|0)<<21|d>>>11)+l|0,d=((d+=((p=((p+=(d^((h=((h+=(l^(d|~p))+u[12]+1700485571|0)<<6|h>>>26)+d|0)|~l))+u[3]-1894986606|0)<<10|p>>>22)+h|0)^((l=((l+=(h^(p|~d))+u[10]-1051523|0)<<15|l>>>17)+p|0)|~h))+u[1]-2054922799|0)<<21|d>>>11)+l|0,d=((d+=((p=((p+=(d^((h=((h+=(l^(d|~p))+u[8]+1873313359|0)<<6|h>>>26)+d|0)|~l))+u[15]-30611744|0)<<10|p>>>22)+h|0)^((l=((l+=(h^(p|~d))+u[6]-1560198380|0)<<15|l>>>17)+p|0)|~h))+u[13]+1309151649|0)<<21|d>>>11)+l|0,d=((d+=((p=((p+=(d^((h=((h+=(l^(d|~p))+u[4]-145523070|0)<<6|h>>>26)+d|0)|~l))+u[11]-1120210379|0)<<10|p>>>22)+h|0)^((l=((l+=(h^(p|~d))+u[2]+718787259|0)<<15|l>>>17)+p|0)|~h))+u[9]-343485551|0)<<21|d>>>11)+l|0,w[0]=h+w[0]|0,w[1]=d+w[1]|0,w[2]=l+w[2]|0,w[3]=p+w[3]|0}function i(w){var u,h=[];for(u=0;u<64;u+=4)h[u>>2]=w.charCodeAt(u)+(w.charCodeAt(u+1)<<8)+(w.charCodeAt(u+2)<<16)+(w.charCodeAt(u+3)<<24);return h}function r(w){var u,h=[];for(u=0;u<64;u+=4)h[u>>2]=w[u]+(w[u+1]<<8)+(w[u+2]<<16)+(w[u+3]<<24);return h}function c(w){var u,h,d,l,p,P,I=w.length,L=[1732584193,-271733879,-1732584194,271733878];for(u=64;u<=I;u+=64)n(L,i(w.substring(u-64,u)));for(h=(w=w.substring(u-64)).length,d=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],u=0;u<h;u+=1)d[u>>2]|=w.charCodeAt(u)<<(u%4<<3);if(d[u>>2]|=128<<(u%4<<3),u>55)for(n(L,d),u=0;u<16;u+=1)d[u]=0;return l=(l=8*I).toString(16).match(/(.*?)(.{0,8})$/),p=parseInt(l[2],16),P=parseInt(l[1],16)||0,d[14]=p,d[15]=P,n(L,d),L}function y(w){var u,h,d,l,p,P,I=w.length,L=[1732584193,-271733879,-1732584194,271733878];for(u=64;u<=I;u+=64)n(L,r(w.subarray(u-64,u)));for(h=(w=u-64<I?w.subarray(u-64):new Uint8Array(0)).length,d=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],u=0;u<h;u+=1)d[u>>2]|=w[u]<<(u%4<<3);if(d[u>>2]|=128<<(u%4<<3),u>55)for(n(L,d),u=0;u<16;u+=1)d[u]=0;return l=(l=8*I).toString(16).match(/(.*?)(.{0,8})$/),p=parseInt(l[2],16),P=parseInt(l[1],16)||0,d[14]=p,d[15]=P,n(L,d),L}function v(w){var u,h="";for(u=0;u<4;u+=1)h+=t[w>>8*u+4&15]+t[w>>8*u&15];return h}function b(w){var u;for(u=0;u<w.length;u+=1)w[u]=v(w[u]);return w.join("")}function C(w){return/[\u0080-\uFFFF]/.test(w)&&(w=unescape(encodeURIComponent(w))),w}function z(w,u){var h,d=w.length,l=new ArrayBuffer(d),p=new Uint8Array(l);for(h=0;h<d;h+=1)p[h]=w.charCodeAt(h);return u?p:l}function M(w){return String.fromCharCode.apply(null,new Uint8Array(w))}function D(w,u,h){var d=new Uint8Array(w.byteLength+u.byteLength);return d.set(new Uint8Array(w)),d.set(new Uint8Array(u),w.byteLength),h?d:d.buffer}function T(w){var u,h=[],d=w.length;for(u=0;u<d-1;u+=2)h.push(parseInt(w.substr(u,2),16));return String.fromCharCode.apply(String,h)}function R(){this.reset()}return b(c("hello")),typeof ArrayBuffer=="undefined"||ArrayBuffer.prototype.slice||function(){function w(u,h){return(u=0|u||0)<0?Math.max(u+h,0):Math.min(u,h)}ArrayBuffer.prototype.slice=function(u,h){var d,l,p,P,I=this.byteLength,L=w(u,I),O=I;return h!==e&&(O=w(h,I)),L>O?new ArrayBuffer(0):(d=O-L,l=new ArrayBuffer(d),p=new Uint8Array(l),P=new Uint8Array(this,L,d),p.set(P),l)}}(),R.prototype.append=function(w){return this.appendBinary(C(w)),this},R.prototype.appendBinary=function(w){this._buff+=w,this._length+=w.length;var u,h=this._buff.length;for(u=64;u<=h;u+=64)n(this._hash,i(this._buff.substring(u-64,u)));return this._buff=this._buff.substring(u-64),this},R.prototype.end=function(w){var u,h,d=this._buff,l=d.length,p=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(u=0;u<l;u+=1)p[u>>2]|=d.charCodeAt(u)<<(u%4<<3);return this._finish(p,l),h=b(this._hash),w&&(h=T(h)),this.reset(),h},R.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},R.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},R.prototype.setState=function(w){return this._buff=w.buff,this._length=w.length,this._hash=w.hash,this},R.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},R.prototype._finish=function(w,u){var h,d,l,p=u;if(w[p>>2]|=128<<(p%4<<3),p>55)for(n(this._hash,w),p=0;p<16;p+=1)w[p]=0;h=(h=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),d=parseInt(h[2],16),l=parseInt(h[1],16)||0,w[14]=d,w[15]=l,n(this._hash,w)},R.hash=function(w,u){return R.hashBinary(C(w),u)},R.hashBinary=function(w,u){var h=b(c(w));return u?T(h):h},R.ArrayBuffer=function(){this.reset()},R.ArrayBuffer.prototype.append=function(w){var u,h=D(this._buff.buffer,w,!0),d=h.length;for(this._length+=w.byteLength,u=64;u<=d;u+=64)n(this._hash,r(h.subarray(u-64,u)));return this._buff=u-64<d?new Uint8Array(h.buffer.slice(u-64)):new Uint8Array(0),this},R.ArrayBuffer.prototype.end=function(w){var u,h,d=this._buff,l=d.length,p=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(u=0;u<l;u+=1)p[u>>2]|=d[u]<<(u%4<<3);return this._finish(p,l),h=b(this._hash),w&&(h=T(h)),this.reset(),h},R.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},R.ArrayBuffer.prototype.getState=function(){var w=R.prototype.getState.call(this);return w.buff=M(w.buff),w},R.ArrayBuffer.prototype.setState=function(w){return w.buff=z(w.buff,!0),R.prototype.setState.call(this,w)},R.ArrayBuffer.prototype.destroy=R.prototype.destroy,R.ArrayBuffer.prototype._finish=R.prototype._finish,R.ArrayBuffer.hash=function(w,u){var h=b(y(new Uint8Array(w)));return u?T(h):h},R}();const ye=[];class pt{static addHandler(t,n,i){t.addEventListener?t.addEventListener(n,i,!1):t.attachEvent?t.attachEvent("on"+n,i):t["on"+n]=i}static windowResizeHandler(t){pt.addHandler(window,"resize",t)}static fullscreenEnabled(){const t=window.document;return document.fullscreenEnabled||window.fullScreen||t.mozFullscreenEnabled||t.webkitIsFullScreen}static fullScreen(t,n){if(n){const i=window.document;let r=window.document.exitFullscreen||i.msExitFullscreen||i.mozCancelFullScreen||i.webkitCancelFullScreen;if(r!==void 0&&r)r.call(window.document);else if(window.ActiveXObject!==void 0){let c=new window.ActiveXObject("WScript.Shell");c!=null&&c.SendKeys("{F11}")}}else{let i=t;i||(i=window.document.documentElement);let r=i.requestFullScreen||i.webkitRequestFullScreen||i.mozRequestFullScreen||i.msRequestFullScreen;if(r!==void 0&&r)r.call(i);else if(window.ActiveXObject!==void 0){let c=new window.ActiveXObject("WScript.Shell");c!=null&&c.SendKeys("{F11}")}}}static requestFullScreen(t){let n=t;n||(n=window.document.documentElement);var i=n.requestFullScreen||n.webkitRequestFullScreen||n.mozRequestFullScreen||n.msRequestFullScreen;if(i)i.call(n);else if(window.ActiveXObject!==void 0){var r=new window.ActiveXObject("WScript.Shell");r!==null&&r.SendKeys("{F11}")}}static exitFullScreen(){const t=window.document;var n=document.exitFullscreen||t.mozCancelFullScreen||t.webkitExitFullscreen||t.webkitExitFullscreen;if(n)n.call(document);else if(window.ActiveXObject!==void 0){var i=new window.ActiveXObject("WScript.Shell");i!==null&&i.SendKeys("{F11}")}}static fullScreenElement(){return window.document.fullscreenElement||window.document.webkitFullscreenElement||window.document.mozFullscreenElement||window.document.msFullscreenElement}static isFullScreen(){return!!pt.fullScreenElement()}static onFullScreenChanged(t){let n;"onfullscreenchange"in window.document?n="fullscreenchange":"onwebkitfullscreenchange"in window.document?n="webkitfullscreenchange":"onmozfullscreenchange"in window.document&&(n="mozfullscreenchange"),n?document.addEventListener(n,function(){const i=pt.isFullScreen();t(i)}):document.addEventListener("MSFullscreenChange",function(){const i=pt.isFullScreen();t(i)})}static stringifyCircularHandler(t,n){if(typeof n=="object"&&n!==null){if(ye.indexOf(n)!==-1)return;ye.push(n)}return n}static jsonStringify(t){if(!t)return"";const n=JSON.stringify(t,pt.stringifyCircularHandler);return ye.length=0,n}static jsonParse(t){const n=pt.jsonStringify(t);if(n.length>1)return JSON.parse(n)}static getObjectURL(t){let n;const i=window;return i.createObjcectURL!=null?n=i.createOjcectURL(t):window.URL!=null?n=window.URL.createObjectURL(t):window.webkitURL!=null&&(n=window.webkitURL.createObjectURL(t)),n}static getFileShortMD5(t,n){const i=File.prototype,r=i.slice||i.mozSlice||i.webkitSlice,c=t,y=new En.ArrayBuffer,v=new FileReader;v.onload=function(b){y.append(b.target?.result);const C=y.end();n({isOK:!0,data:C})},v.onerror=function(){const b="\u8BA1\u7B97\u6587\u4EF6\u7B80\u5355\u6458\u8981\u9519\u8BEF\uFF01";console.warn(b),n({isOK:!1,data:b})},function(){const b=2097152>=c.size?c.size:2097152;v.readAsArrayBuffer(r.call(c,0,b))}()}static MD5(t,n=!1){return En.hash(t,n)}static copyText=t=>new Promise((n,i)=>{const r=document.createElement("input");r.value=t,document.body.appendChild(r),r.select(),document.execCommand("copy"),r.remove(),n(!0)})}class Ft{static isNullOrEmpty=t=>t===null||t===""||t===void 0||t.length===0;static isNotEmpty=t=>t!==null&&t!==""&&t!==void 0&&t.length!==0;static toHump(t){return t.replace(/[\-\/\_](\w)/g,(n,i)=>i.toUpperCase()).replace("views","")}}class we{prefixKey;storage;constructor(t="",n=localStorage){this.prefixKey=t,this.storage=n}getKey(t){return`${this.prefixKey}${t}`.toUpperCase()}set(t,n,i=604800){const r=JSON.stringify({value:n,expire:i!==null?new Date().getTime()+1e3*i:null});this.storage.setItem(this.getKey(t),r)}get(t,n=null){const i=this.storage.getItem(this.getKey(t));if(i)try{const r=JSON.parse(i),{value:c,expire:y}=r;if(y===null||y>=Date.now())return c;this.remove(this.getKey(t))}catch{return n}return n}remove(t){this.storage.removeItem(this.getKey(t))}clear(){this.storage.clear()}setCookie(t,n,i=604800){document.cookie=`${this.getKey(t)}=${n}; Max-Age=${i}`}getCookie(t){const n=document.cookie.split("; ");for(let i=0,r=n.length;i<r;i++){const c=n[i].split("=");if(c[0]===this.getKey(t))return c[1]}return""}removeCookie(t){this.setCookie(t,1,-1)}clearCookie(){const t=document.cookie.match(/[^ =;]+(?==)/g);if(t)for(let n=t.length;n--;)document.cookie=t[n]+"=0;expire="+new Date(0).toUTCString()}}const io=new we("",localStorage);function $t(){let e=[];const t="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";for(var n=0;n<36;n++)e[n]=t.substr(Math.floor(16*Math.random()),1);return e[14]="4",e[19]=t.substr(3&Number(e[19])|8,1),e[8]=e[13]=e[18]=e[23]="-",e.join("")}function oo(){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)})}function ro(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)}function so(e){var t=e.toLowerCase();if(Ht(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}function ao(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}var St,_t;function co(e){if(typeof e=="object"||!e)return;const t=e.toLowerCase().substr(0,1);return t==="#"?St.Hex:t==="r"||t==="("?St.RGBA:t==="h"?St.Hsla:St.RGBA}function uo(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),v=parseFloat(t[3])/(/%$/.test(t[3])?100:1);if(y===0)n=i=r=v;else{var b=v<=.5?v*(y+1):v+y-v*y,C=2*v-b;n=be(C,b,c+1/3),i=be(C,b,c),r=be(C,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})`}}}function be(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Ht(e){return/^#([0-9a-fA-F]{3}|[0-9a-fA-f]{6})$/.test(e)}function lo(e,t,n){const i=(e<<16|t<<8|n).toString(16);return"#"+new Array(Math.abs(i.length-7)).join("0")+i}function Se(e){let t=e.toLowerCase();if(Ht(e)){if(t.length===4){let i="#";for(let r=1;r<4;r+=1)i+=t.slice(r,r+1).concat(t.slice(r,r+1));t=i}const n=[];for(let i=1;i<7;i+=2)n.push(parseInt("0x"+t.slice(i,i+2)));return"RGB("+n.join(",")+")"}return t}function ho(e){if(!Ht(e))return;const[t,n,i]=Se(e).replace(/(?:\(|\)|rgb|RGB)*/g,"").split(",").map(r=>Number(r));return .299*t+.578*n+.114*i<192}function fo(e,t){return e=e.indexOf("#")>=0?e.substring(1,e.length):e,t=Math.trunc(255*t/100),`#${xe(e.substring(0,2),t)}${xe(e.substring(2,4),t)}${xe(e.substring(4,6),t)}`}function po(e,t){return e=e.indexOf("#")>=0?e.substring(1,e.length):e,t=Math.trunc(255*t/100),`#${Ce(e.substring(0,2),t)}${Ce(e.substring(2,4),t)}${Ce(e.substring(4,6),t)}`}function Ce(e,t){const n=parseInt(e,16)+t,i=n>255?255:n;return i.toString(16).length>1?i.toString(16):`0${i.toString(16)}`}function kn(e,t,n){const i=[e,t,n].map(r=>(r/=255)<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4));return .2126*i[0]+.7152*i[1]+.0722*i[2]}function mo(e){const t=Se(e.substring(1));var n,i;return n=t.split(","),i=[0,0,0],(kn(~~n[0],~~n[1],~~n[2])+.05)/(kn(i[0],i[1],i[2])+.05)>=12?"#000000":"#FFFFFF"}function xe(e,t){const n=parseInt(e,16)-t,i=n<0?0:n;return i.toString(16).length>1?i.toString(16):`0${i.toString(16)}`}function Ee(e){return{all:e=e||new Map,on(t,n){const i=e?.get(t);i&&i.push(n)||e?.set(t,[n])},off(t,n){const i=e?.get(t);i&&i.splice(i.indexOf(n)>>>0,1)},emit(t,n){(e?.get(t)||[]).slice().map(i=>{i(n)}),(e?.get("*")||[]).slice().map(i=>{i(t,n)})}}}(_t=St||(St={}))[_t.RGBA=0]="RGBA",_t[_t.Hex=1]="Hex",_t[_t.Hsla=2]="Hsla";const It=Ee(),G={HproseServiceErrorEvent:"HproseServiceError",WebAPIErrorEvent:"WebAPIError",AlertInfoEvent:"AlertInfoEvent",CommonWarnEvent:"CommonWarnEvent",WidgetLoadedEvent:"WidgetLoaded",WidgetUnLoadedEvent:"WidgetUnLoaded",WidgetVisibleChanged:"WidgetVisibleChanged",AxiosRequestErrorEvent:"AxiosRequestErrorEvent"},ke=(e,t)=>{const n=document.createElement("a");n.download=t,n.style.display="none";const i=new Blob([e],{type:"application/octet-stream"});n.href=URL.createObjectURL(i),document.body.appendChild(n),n.click(),document.body.removeChild(n)};function go(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)}const vo=(e,t)=>{const n=JSON.stringify(e,null,2);t?ke(n,t+".json"):It.emit(G.CommonWarnEvent,"\u53C2\u6570JsonID\u4E0D\u80FD\u4E3A\u7A7A\uFF01")},yo=(e,t,n)=>{e.get(t).then(function(i){ke(i.data,n)}).catch(i=>{console.warn(i),It.emit(G.CommonWarnEvent,"\u4E0B\u8F7D\u6587\u4EF6\u62A5\u9519\uFF01")})};function zn(e){const t=e.lastIndexOf("/")+1;let n=e.substring(t);return n=decodeURI(n.split("?")[0]),n}function wo({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||zn(e)),document.createEvent){const v=document.createEvent("MouseEvents");return v.initEvent("click",!0,!0),y.dispatchEvent(v),r(!0)}return e.indexOf("?")===-1&&(e+="?download"),window.open(e,t),r(!0)}{const y=document.createElement("canvas"),v=document.createElement("img");v.setAttribute("crossOrigin","Anonymous"),v.src=e,v.onload=b=>{y.width=v.width,y.height=v.height,y.getContext("2d").drawImage(v,0,0,v.width,v.height),y.toBlob(C=>{if(C){const z=document.createElement("a");z.href=window.URL.createObjectURL(C),z.download=zn(e),z.click(),URL.revokeObjectURL(z.href),r(!0)}},"image/jpeg")},v.onerror=b=>c(b)}})}function bo(e){for(var t=new Date().getTime();new Date().getTime()-t<e;);console.log(`\u5F3A\u5236\u7B49\u5F85${e}\u6BEB\u79D2`)}class At{hproseURL;client;hproseProxy;static httpTransport;constructor(t){if(t&&!Ft.isNullOrEmpty(t)){if(At.httpTransport||(At.httpTransport=new to),this.client=new Qi(t),!this.client)throw Error("Hprose Client\u521D\u59CB\u5316\u9519\u8BEF");this.hproseURL=t,this.init()}}init(){this.client&&this.client.useServiceAsync().then(t=>{this.hproseProxy=t}).catch(t=>{String(t).indexOf("find this method ~")>0?(this.hproseProxy=this.client?.useService(),console.warn("\u65E7\u7248\u672C\u4E0D\u652F\u6301useServiceAsync")):It.emit(G.HproseServiceErrorEvent,"\u521D\u59CB\u5316\u9ED8\u8BA4Hprose!"),console.warn(t)})}async getProxy(){if(!this.hproseProxy)try{this.client&&(this.hproseProxy=await this.client.useServiceAsync())}catch(t){console.warn(t),this.hproseProxy=this.client?.useService()}return this.hproseProxy}async invoke(t,n,i){if(this.client)return await this.client.invoke(t,n,i)}encode(t,n,i){return this.client?this.client.codec.encode(t,n,i):void 0}decode(t,n){return this.client?this.client.codec.decode(t,n):void 0}}const mt=new we("user",localStorage);function Rt(){return mt.get("access_token")}function ze(){mt.remove("access_token"),A.User&&delete A.User}function Mn(){return Rt()?.refresh}class Dt{hproseClient;hpProxyObj;defaultContext=new me;constructor(t){this.hproseClient=new At(t),this.hpProxyObj=null}getClientContext(t,n){const i={};n&&(i.requestHeaders=n);const r=Rt();i.httpRequestHeaders=t||{};const c=i.httpRequestHeaders;return r&&(c.token=r.token),new me(i)}async getHproseProxy(){if(!this.hproseClient)throw new Error("HproseClient\u5BF9\u8C61\u4E3A\u6784\u5EFA\uFF0C\u65E0\u6CD5\u8C03\u7528Hprose\u65B9\u6CD5");if(!this.hpProxyObj){const t=await this.hproseClient.getProxy();this.hpProxyObj=t}return this.hpProxyObj||It.emit(G.HproseServiceErrorEvent,"HproseProxy\u5BF9\u8C61\u4E3A\u7A7A\uFF0C\u65E0\u6CD5\u8C03\u7528Hprose\u65B9\u6CD5\uFF01"),this.hpProxyObj}async hproseInvoke(t,n,i){if(!this.hproseClient)throw new Error("HproseClient\u5BF9\u8C61\u4E3A\u6784\u5EFA\uFF0C\u65E0\u6CD5\u8C03\u7528Hprose\u65B9\u6CD5");return await this.hproseClient.invoke(t,n,i)}async hproseInvokeContext(t,n,...i){if(!this.hproseClient)throw new Error("HproseClient\u5BF9\u8C61\u4E3A\u6784\u5EFA\uFF0C\u65E0\u6CD5\u8C03\u7528Hprose\u65B9\u6CD5");const r=Rt();return console.log(r,"userToken3"),r&&(n||(n=new me({httpRequestHeaders:{token:r.token}}))),await this.hproseClient.invoke(t,i,n)}async hproseInvokeEncode(t){const n=new xn(t).toBytes(),i=await this.hproseClient.client?.request(n,this.defaultContext);return i&&this.hproseClient.client?.codec.decode(i,this.defaultContext)}encodeRequest(t,...n){const i=this.hproseClient.client?.codec?.encode(t,n,this.defaultContext);return xn.toString(i)}}class So{message;eventBus;constructor(t,n){t&&(this.message=t),n&&(this.eventBus=n)}msg(t,n=3,i="success"){if(this.message)if(typeof this.message=="function")this.message({type:i,message:t,duration:n});else switch(i){case"info":this.message.info(t,n);break;case"success":this.message.success(t,n);break;case"warning":this.message.warn(t,n);break;case"error":this.message.error(t,n)}else{switch(i){case"info":case"success":console.log(t);break;case"warning":console.warn(t);break;case"error":i="dark",console.error(t)}this.eventBus&&this.eventBus.emit(G.AlertInfoEvent,{type:i,info:t})}}info(t,n=3){this.msg(t,n,"info")}warn(t,n=3){this.msg(t,n,"warning")}err(t,n=3){this.msg(t,n,"error")}}const Me=new Map,A={Config:SysConfig,EventBus:It,DefaultProxyClient:null,Axios:void 0};function Co(e){_n(e.message,e.axios,e.defaultHproseURL),e.config&&(A.Config=e.config)}const _n=function(e,t,n){n?A.Config.DefaultHproseAPI=n:!A.Config.DefaultHproseAPI&&A.Config.ServiceURL&&(A.Config.DefaultHproseAPI=A.Config.ServiceURL.DefaultHproseAPI),t&&(A.Axios=t),A.Config.DefaultHproseAPI&&Ft.isNotEmpty(A.Config.DefaultHproseAPI)&&(A.DefaultProxyClient=new Dt(A.Config.DefaultHproseAPI));const i=new So(e,A.EventBus);A.Message=i,A.EventBus.on(G.HproseServiceErrorEvent,r=>{const c=`\u5F53\u524D\u540E\u53F0\u4E1A\u52A1\u670D\u52A1\u4E0D\u53EF\u7528!${r}`;i.warn(c)}),A.EventBus.on(G.WebAPIErrorEvent,r=>{const c=`WebAPI\u540E\u53F0\u670D\u52A1\u4E0D\u53EF\u7528!${r}`;i.warn(c)}),A.EventBus.on(G.CommonWarnEvent,r=>{i.warn(r)})};function In(e){if(e&&Ft.isNotEmpty(e)){if(Me.has(e))return Me.get(e);{const t=new Dt(e);return Me.set(e,t),t}}}function xo(e){const t=In(e);return t&&(A.DefaultProxyClient=t),t}function _e(e,t,n,i="json",r){const c={baseURL:A.Config.ServiceURL.DefaultWebAPI,timeout:6e4,params:e,headers:{"Content-Type":"application/json",Authorization:"bearer "+Rt()?.token},responseType:i,cancelToken:r};if(n)for(let y in n)c.headers[y]=n[y];return t&&(c.baseURL=t),c}function ct(e,t,n,i,r="json",c,y){const v=_e(n,t,i,r,c);return y&&y>=2e4&&(v.timeout=y),A.Axios?.get(e,v).catch(function(b){console.error(b);const C=`http\u8BF7\u6C42\u9519\u8BEF\uFF1A${t}${e}`;A.EventBus.emit(G.AxiosRequestErrorEvent,C)})}function Ie(e,t,n,i,r,c="json",y){const v=_e(i,t,r,c);y&&y>=2e4&&(v.timeout=y);const b=function(C){let z=new FormData;return C&&Object.keys(C).forEach(M=>{if(!C)return;let D=C[M];var T;D!=null&&z.append(M,(T=D)instanceof Blob?T:T.toString())}),z}(n);return A.Axios?.post(e,b,v).catch(function(C){console.error(C);const z=`post\u8BF7\u6C42\u9519\u8BEF\uFF1A${t}${e}`;A.EventBus.emit(G.AxiosRequestErrorEvent,z)})}function Eo(e,t,n,i,r,c="json",y){const v=_e(i,t,r,c);return y&&y>=2e4&&(v.timeout=y),A.Axios?.post(e,n,v).catch(function(b){console.error(b);const C=`post\u8BF7\u6C42\u9519\u8BEF\uFF1A${t}${e}`;A.EventBus.emit(G.AxiosRequestErrorEvent,C)})}function ko(e,t){return ct(e,void 0,t)}function zo(e,t){return Ie(e,void 0,t)}function Mo(e,t){return A.Axios?.get(e,{params:t}).catch(function(n){console.error(n);const i=`\u5916\u90E8Get\u670D\u52A1\u8BF7\u6C42\u9519\u8BEF\uFF1A${e}`;A.EventBus.emit(G.AxiosRequestErrorEvent,i)})}var Re={exports:{}},_o=typeof window!="undefined"?window:Mt!==void 0?Mt:typeof self!="undefined"?self:{},Io=function(e){if(!e)return!1;var t=Ro.call(e);return t==="[object Function]"||typeof e=="function"&&t!=="[object RegExp]"||typeof window!="undefined"&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)},Ro=Object.prototype.toString,Le=function(e){return e.replace(/^\s+|\s+$/g,"")},Lo=function(){for(var e={},t=0;t<arguments.length;t++){var n=arguments[t];for(var i in n)Po.call(n,i)&&(e[i]=n[i])}return e},Po=Object.prototype.hasOwnProperty,Rn=_o,Bo=Io,Ao=function(e){if(!e)return{};for(var t,n={},i=Le(e).split(`
2
- `),r=0;r<i.length;r++){var c=i[r],y=c.indexOf(":"),v=Le(c.slice(0,y)).toLowerCase(),b=Le(c.slice(y+1));n[v]===void 0?n[v]=b:(t=n[v],Object.prototype.toString.call(t)==="[object Array]"?n[v].push(b):n[v]=[n[v],b])}return n},Do=Lo;function Ln(e,t,n){var i=e;return Bo(t)?(n=t,typeof e=="string"&&(i={uri:e})):i=Do(t,{uri:e}),i.callback=n,i}function ut(e,t,n){return Pn(t=Ln(e,t,n))}function Pn(e){if(e.callback===void 0)throw new Error("callback argument missing");var t=!1,n=function(h,d,l){t||(t=!0,e.callback(h,d,l))};function i(){var h=void 0;if(h=b.response?b.response:b.responseText||function(d){try{if(d.responseType==="document")return d.responseXML;var l=d.responseXML&&d.responseXML.documentElement.nodeName==="parsererror";if(d.responseType===""&&!l)return d.responseXML}catch{}return null}(b),w)try{h=JSON.parse(h)}catch{}return h}function r(h){return clearTimeout(C),h instanceof Error||(h=new Error(""+(h||"Unknown XMLHttpRequest Error"))),h.statusCode=0,n(h,u)}function c(){if(!v){var h;clearTimeout(C),h=e.useXDR&&b.status===void 0?200:b.status===1223?204:b.status;var d=u,l=null;return h!==0?(d={body:i(),statusCode:h,method:M,headers:{},url:z,rawRequest:b},b.getAllResponseHeaders&&(d.headers=Ao(b.getAllResponseHeaders()))):l=new Error("Internal XMLHttpRequest Error"),n(l,d,d.body)}}var y,v,b=e.xhr||null;b||(b=e.cors||e.useXDR?new ut.XDomainRequest:new ut.XMLHttpRequest);var C,z=b.url=e.uri||e.url,M=b.method=e.method||"GET",D=e.body||e.data,T=b.headers=e.headers||{},R=!!e.sync,w=!1,u={body:void 0,headers:{},statusCode:0,method:M,url:z,rawRequest:b};if("json"in e&&e.json!==!1&&(w=!0,T.accept||T.Accept||(T.Accept="application/json"),M!=="GET"&&M!=="HEAD"&&(T["content-type"]||T["Content-Type"]||(T["Content-Type"]="application/json"),D=JSON.stringify(e.json===!0?D:e.json))),b.onreadystatechange=function(){b.readyState===4&&setTimeout(c,0)},b.onload=c,b.onerror=r,b.onprogress=function(){},b.onabort=function(){v=!0},b.ontimeout=r,b.open(M,z,!R,e.username,e.password),R||(b.withCredentials=!!e.withCredentials),!R&&e.timeout>0&&(C=setTimeout(function(){if(!v){v=!0,b.abort("timeout");var h=new Error("XMLHttpRequest timeout");h.code="ETIMEDOUT",r(h)}},e.timeout)),b.setRequestHeader)for(y in T)T.hasOwnProperty(y)&&b.setRequestHeader(y,T[y]);else if(e.headers&&!function(h){for(var d in h)if(h.hasOwnProperty(d))return!1;return!0}(e.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in e&&(b.responseType=e.responseType),"beforeSend"in e&&typeof e.beforeSend=="function"&&e.beforeSend(b),b.send(D||null),b}Re.exports=ut,Re.exports.default=ut,ut.XMLHttpRequest=Rn.XMLHttpRequest||function(){},ut.XDomainRequest="withCredentials"in new ut.XMLHttpRequest?ut.XMLHttpRequest:Rn.XDomainRequest,function(e,t){for(var n=0;n<e.length;n++)t(e[n])}(["get","put","post","patch","head","delete"],function(e){ut[e==="delete"?"del":e]=function(t,n,i){return(n=Ln(t,n,i)).method=e.toUpperCase(),Pn(n)}});var To=Re.exports;const No=[200,201,202,204,308],Oo=[408,502,503,504];class Uo{endpoint;file;headers;method;chunkSize;attempts;delayBeforeAttempt;md5;chunk;chunkCount;chunkByteSize;maxFileBytes;endpointValue;totalChunks;attemptCount;offline;paused;success;currentXhr;reader;eventTarget;fileName;constructor(t){this.endpoint=t.endpoint,this.file=t.file,this.fileName=encodeURI(this.file.name),this.headers=t.headers||{},this.method=t.method||"PUT",this.chunkSize=t.chunkSize||5120,this.attempts=t.attempts||5,this.delayBeforeAttempt=t.delayBeforeAttempt||1,this.md5=t.md5||"",this.maxFileBytes=1024*(t.maxFileSize||0),this.chunkCount=0,this.chunkByteSize=1024*this.chunkSize,this.totalChunks=Math.ceil(this.file.size/this.chunkByteSize),this.attemptCount=0,this.offline=!1,this.paused=!1,this.success=!1,this.reader=new FileReader,this.eventTarget=Ee(),this.validateOptions(),this.getEndpoint().then(()=>this.sendChunks()),typeof window!="undefined"&&(window.addEventListener("online",()=>{this.offline&&(this.offline=!1,this.dispatch("online"),this.sendChunks())}),window.addEventListener("offline",()=>{this.offline=!0,this.dispatch("offline")}))}on(t,n){this.eventTarget.on(t,n)}abort(){this.pause(),this.currentXhr?.abort()}pause(){this.paused=!0}resume(){this.paused&&(this.paused=!1,this.sendChunks())}dispatch(t,n){this.eventTarget.emit(t,n)}validateOptions(){if(!this.endpoint||typeof this.endpoint!="function"&&typeof this.endpoint!="string")throw new TypeError("endpoint\u5FC5\u987B\u4E3A\uFF1A\u6587\u4EF6\u4E0A\u4F20URL\u5B57\u7B26\u4E32\uFF0C\u6216\u8FD4\u56DE\u5730\u5740\u7684\u51FD\u6570\uFF01");if(!(this.file instanceof File))throw new TypeError("file\u5FC5\u987B\u4E3A\u6587\u4EF6\u5BF9\u8C61");if(this.headers&&typeof this.headers!="object")throw new TypeError("\u6587\u4EF6\u5934\u5FC5\u987B\u4E3A\u5BF9\u8C61\u6216\u7A7A\uFF01");if(this.chunkSize&&(typeof this.chunkSize!="number"||this.chunkSize<=0||this.chunkSize%256!=0))throw new TypeError("chunkSize\u5FC5\u987B\u5927\u4E8E0,\u5E76\u662F256\u7684\u6574\u6570\u500D");if(this.maxFileBytes>0&&this.maxFileBytes<this.file.size)throw new Error(`\u6587\u4EF6\u5927\u5C0F\u8D85\u8FC7\u6700\u5927\u5141\u8BB8\u503C\uFF1A(${this.file.size} > ${this.maxFileBytes})`);if(this.attempts&&(typeof this.attempts!="number"||this.attempts<=0))throw new TypeError("\u91CD\u8BD5\u6B21\u6570\u5FC5\u987B\u4E3A\u6B63\u6570\uFF01");if(this.delayBeforeAttempt&&(typeof this.delayBeforeAttempt!="number"||this.delayBeforeAttempt<0))throw new TypeError("\u5EF6\u65F6\u91CD\u8BD5\u65F6\u95F4\u5FC5\u987B\u4E3A\u6B63\u6570\uFF01\u9ED8\u8BA4\u4E3A1")}getEndpoint(){return typeof this.endpoint=="string"?(this.endpointValue=this.endpoint,Promise.resolve(this.endpoint)):this.endpoint(this.file).then(t=>(this.endpointValue=t,this.endpointValue))}getChunk(){return new Promise(t=>{const n=this.totalChunks===1?this.file.size:this.chunkByteSize,i=n*this.chunkCount;this.reader.onload=()=>{this.reader.result!==null&&(this.chunk=new Blob([this.reader.result],{type:"application/octet-stream"})),t(()=>{})},this.reader.readAsArrayBuffer(this.file.slice(i,i+n))})}xhrPromise(t){const n=i=>{i.upload.onprogress=r=>{const c=100/this.totalChunks,y=c*this.file.size,v=c*this.chunkCount,b=r.loaded/(r.total??y)*c;this.dispatch("progress",Math.min(v+b,100))}};return new Promise((i,r)=>{this.currentXhr=To({...t,beforeSend:n},(c,y)=>(this.currentXhr=void 0,c?r(c):i(y)))})}sendChunk(){if(!this.chunk)return;const t=this.chunkCount*this.chunkByteSize,n=t+this.chunk.size-1,i={...this.headers,FileName:this.fileName,FileMD5:this.md5,"Content-Type":this.file.type,"Content-Range":`bytes ${t}-${n}/${this.file.size}`};if(this.dispatch("attempt",{chunkNumber:this.chunkCount,chunkSize:this.chunk.size}),this.endpointValue)return this.xhrPromise({headers:i,url:this.endpointValue,method:this.method,body:this.chunk});console.warn("\u6587\u4EF6\u4E0A\u4F20endpointValue\u4E0D\u80FD\u4E3A\u7A7A\uFF01"),this.dispatch("error",{message:"\u6587\u4EF6\u4E0A\u4F20endpointValue\u4E0D\u80FD\u4E3A\u7A7A\uFF01\u53D6\u6D88\u4E0A\u4F20\uFF01",chunk:this.chunkCount,attempts:this.attemptCount})}manageRetries(){if(this.attemptCount<this.attempts)return setTimeout(()=>this.sendChunks(),1e3*this.delayBeforeAttempt),void this.dispatch("attemptFailure",{message:`\u4E0A\u4F20\u5206\u7247\uFF1A${this.chunkCount}\u5931\u8D25\u3002\u8FD8\u4F1A\u518D\u5C1D\u8BD5 ${this.attempts-this.attemptCount}\u6B21\uFF01`,chunkNumber:this.chunkCount,attemptsLeft:this.attempts-this.attemptCount});this.dispatch("error",{message:`\u4E0A\u4F20\u5206\u7247\u9519\u8BEF\uFF1A ${this.chunkCount}\u3002\u505C\u6B62\u5C1D\u8BD5\uFF0C\u53D6\u6D88\u4E0A\u4F20\uFF01`,chunk:this.chunkCount,attempts:this.attemptCount})}sendChunks(){this.paused||this.offline||this.success||this.getChunk().then(()=>this.sendChunk()).then(t=>{if(this.attemptCount=this.attemptCount+1,t!=null&&No.includes(t.statusCode)){this.dispatch("chunkSuccess",{chunk:this.chunkCount,attempts:this.attemptCount,response:t}),this.attemptCount=0,this.chunkCount=this.chunkCount+1,this.chunkCount<this.totalChunks?this.sendChunks():(this.success=!0,this.dispatch("success"));const n=100*(this.chunkCount/this.totalChunks*this.file.size)/this.file.size;this.dispatch("progress",n)}else if(t!=null&&Oo.includes(t.statusCode)){if(this.paused||this.offline)return;this.manageRetries()}else{if(this.paused||this.offline)return;this.dispatch("error",{message:`\u670D\u52A1\u5668\u9519\u8BEF:${t?.statusCode}\uFF0C\u505C\u6B62\u4E0A\u4F20\u3002`,chunkNumber:this.chunkCount,attempts:this.attemptCount})}}).catch(t=>{this.paused||this.offline||this.manageRetries()})}}const jo=e=>new Uo(e),Wo=new class{hasClass(e,t){return e.className.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))}addClass(e,t){this.hasClass(e,t)||(e.className+=" "+t)}removeClass(e,t){if(this.hasClass(e,t)){const n=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className=e.className.replace(n," ")}}toggleClass(e,t){this.hasClass(e,t)?this.removeClass(e,t):this.addClass(e,t)}},Bn=mt.get("is_LockScreen",!1),Tt={isLock:Bn,lockTime:Bn=="true"?Dn():0};function An(e){Tt.isLock=e,mt.set("is_LockScreen",e,10),e&&(ze(),console.log("\u9501\u5C4F\u4E86\u2026\u2026"))}function Fo(){return mt.get("is_LockScreen",!1)}function Dn(){let e=3600;return A.Config.UI?.LockTime&&A.Config.UI?.LockTime>=10&&(e=A.Config.UI.LockTime),e}let Pe;function Be(){clearInterval(Pe),window.location.href.indexOf("/login")>0||Tt.isLock||(An(!1),Tt.lockTime=Dn(),Pe=setInterval(()=>{if(Tt.lockTime--,Tt.lockTime<=0)return An(!0),clearInterval(Pe)},1e3))}function $o(){Be(),document.addEventListener("mousedown",Be)}function Ho(){document.removeEventListener("mousedown",Be)}var qo={exports:{}},qt=qo.exports=function e(t,n,i){function r(v,b){if(!n[v]){if(!t[v]){if(!b&&ve)return ve(v);if(c)return c(v,!0);var C=new Error("Cannot find module '"+v+"'");throw C.code="MODULE_NOT_FOUND",C}var z=n[v]={exports:{}};t[v][0].call(z.exports,function(M){var D=t[v][1][M];return r(D||M)},z,z.exports,e,t,n,i)}return n[v].exports}for(var c=ve,y=0;y<i.length;y++)r(i[y]);return r}({1:[function(e,t,n){(function(i){var r,c,y=i.MutationObserver||i.WebKitMutationObserver;if(y){var v=0,b=new y(D),C=i.document.createTextNode("");b.observe(C,{characterData:!0}),r=function(){C.data=v=++v%2}}else if(i.setImmediate||i.MessageChannel===void 0)r="document"in i&&"onreadystatechange"in i.document.createElement("script")?function(){var R=i.document.createElement("script");R.onreadystatechange=function(){D(),R.onreadystatechange=null,R.parentNode.removeChild(R),R=null},i.document.documentElement.appendChild(R)}:function(){setTimeout(D,0)};else{var z=new i.MessageChannel;z.port1.onmessage=D,r=function(){z.port2.postMessage(0)}}var M=[];function D(){var R,w;c=!0;for(var u=M.length;u;){for(w=M,M=[],R=-1;++R<u;)w[R]();u=M.length}c=!1}function T(R){M.push(R)!==1||c||r()}t.exports=T}).call(this,Mt!==void 0?Mt:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],2:[function(e,t,n){var i=e(1);function r(){}var c={},y=["REJECTED"],v=["FULFILLED"],b=["PENDING"];function C(l){if(typeof l!="function")throw new TypeError("resolver must be a function");this.state=b,this.queue=[],this.outcome=void 0,l!==r&&T(this,l)}function z(l,p,P){this.promise=l,typeof p=="function"&&(this.onFulfilled=p,this.callFulfilled=this.otherCallFulfilled),typeof P=="function"&&(this.onRejected=P,this.callRejected=this.otherCallRejected)}function M(l,p,P){i(function(){var I;try{I=p(P)}catch(L){return c.reject(l,L)}I===l?c.reject(l,new TypeError("Cannot resolve promise with itself")):c.resolve(l,I)})}function D(l){var p=l&&l.then;if(l&&(typeof l=="object"||typeof l=="function")&&typeof p=="function")return function(){p.apply(l,arguments)}}function T(l,p){var P=!1;function I(j){P||(P=!0,c.reject(l,j))}function L(j){P||(P=!0,c.resolve(l,j))}function O(){p(L,I)}var U=R(O);U.status==="error"&&I(U.value)}function R(l,p){var P={};try{P.value=l(p),P.status="success"}catch(I){P.status="error",P.value=I}return P}function w(l){return l instanceof this?l:c.resolve(new this(r),l)}function u(l){var p=new this(r);return c.reject(p,l)}function h(l){var p=this;if(Object.prototype.toString.call(l)!=="[object Array]")return this.reject(new TypeError("must be an array"));var P=l.length,I=!1;if(!P)return this.resolve([]);for(var L=new Array(P),O=0,U=-1,j=new this(r);++U<P;)$(l[U],U);return j;function $(X,V){function it(Q){L[V]=Q,++O!==P||I||(I=!0,c.resolve(j,L))}p.resolve(X).then(it,function(Q){I||(I=!0,c.reject(j,Q))})}}function d(l){var p=this;if(Object.prototype.toString.call(l)!=="[object Array]")return this.reject(new TypeError("must be an array"));var P=l.length,I=!1;if(!P)return this.resolve([]);for(var L=-1,O=new this(r);++L<P;)U(l[L]);return O;function U(j){p.resolve(j).then(function($){I||(I=!0,c.resolve(O,$))},function($){I||(I=!0,c.reject(O,$))})}}t.exports=C,C.prototype.catch=function(l){return this.then(null,l)},C.prototype.then=function(l,p){if(typeof l!="function"&&this.state===v||typeof p!="function"&&this.state===y)return this;var P=new this.constructor(r);return this.state!==b?M(P,this.state===v?l:p,this.outcome):this.queue.push(new z(P,l,p)),P},z.prototype.callFulfilled=function(l){c.resolve(this.promise,l)},z.prototype.otherCallFulfilled=function(l){M(this.promise,this.onFulfilled,l)},z.prototype.callRejected=function(l){c.reject(this.promise,l)},z.prototype.otherCallRejected=function(l){M(this.promise,this.onRejected,l)},c.resolve=function(l,p){var P=R(D,p);if(P.status==="error")return c.reject(l,P.value);var I=P.value;if(I)T(l,I);else{l.state=v,l.outcome=p;for(var L=-1,O=l.queue.length;++L<O;)l.queue[L].callFulfilled(p)}return l},c.reject=function(l,p){l.state=y,l.outcome=p;for(var P=-1,I=l.queue.length;++P<I;)l.queue[P].callRejected(p);return l},C.resolve=w,C.reject=u,C.all=h,C.race=d},{1:1}],3:[function(e,t,n){(function(i){typeof i.Promise!="function"&&(i.Promise=e(2))}).call(this,Mt!==void 0?Mt:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{2:2}],4:[function(e,t,n){var i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o};function r(o,s){if(!(o instanceof s))throw new TypeError("Cannot call a class as a function")}function c(){try{if(typeof indexedDB!="undefined")return indexedDB;if(typeof webkitIndexedDB!="undefined")return webkitIndexedDB;if(typeof mozIndexedDB!="undefined")return mozIndexedDB;if(typeof OIndexedDB!="undefined")return OIndexedDB;if(typeof msIndexedDB!="undefined")return msIndexedDB}catch{return}}var y=c();function v(){try{if(!y||!y.open)return!1;var o=typeof openDatabase!="undefined"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),s=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!o||s)&&typeof indexedDB!="undefined"&&typeof IDBKeyRange!="undefined"}catch{return!1}}function b(o,s){o=o||[],s=s||{};try{return new Blob(o,s)}catch(f){if(f.name!=="TypeError")throw f;for(var a=new(typeof BlobBuilder!="undefined"?BlobBuilder:typeof MSBlobBuilder!="undefined"?MSBlobBuilder:typeof MozBlobBuilder!="undefined"?MozBlobBuilder:WebKitBlobBuilder),m=0;m<o.length;m+=1)a.append(o[m]);return a.getBlob(s.type)}}typeof Promise=="undefined"&&e(3);var C=Promise;function z(o,s){s&&o.then(function(a){s(null,a)},function(a){s(a)})}function M(o,s,a){typeof s=="function"&&o.then(s),typeof a=="function"&&o.catch(a)}function D(o){return typeof o!="string"&&(console.warn(o+" used as a key, but it is not a string."),o=String(o)),o}function T(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var R="local-forage-detect-blob-support",w=void 0,u={},h=Object.prototype.toString,d="readonly",l="readwrite";function p(o){for(var s=o.length,a=new ArrayBuffer(s),m=new Uint8Array(a),f=0;f<s;f++)m[f]=o.charCodeAt(f);return a}function P(o){return new C(function(s){var a=o.transaction(R,l),m=b([""]);a.objectStore(R).put(m,"key"),a.onabort=function(f){f.preventDefault(),f.stopPropagation(),s(!1)},a.oncomplete=function(){var f=navigator.userAgent.match(/Chrome\/(\d+)/),g=navigator.userAgent.match(/Edge\//);s(g||!f||parseInt(f[1],10)>=43)}}).catch(function(){return!1})}function I(o){return typeof w=="boolean"?C.resolve(w):P(o).then(function(s){return w=s})}function L(o){var s=u[o.name],a={};a.promise=new C(function(m,f){a.resolve=m,a.reject=f}),s.deferredOperations.push(a),s.dbReady?s.dbReady=s.dbReady.then(function(){return a.promise}):s.dbReady=a.promise}function O(o){var s=u[o.name].deferredOperations.pop();if(s)return s.resolve(),s.promise}function U(o,s){var a=u[o.name].deferredOperations.pop();if(a)return a.reject(s),a.promise}function j(o,s){return new C(function(a,m){if(u[o.name]=u[o.name]||Xe(),o.db){if(!s)return a(o.db);L(o),o.db.close()}var f=[o.name];s&&f.push(o.version);var g=y.open.apply(y,f);s&&(g.onupgradeneeded=function(S){var x=g.result;try{x.createObjectStore(o.storeName),S.oldVersion<=1&&x.createObjectStore(R)}catch(E){if(E.name!=="ConstraintError")throw E;console.warn('The database "'+o.name+'" has been upgraded from version '+S.oldVersion+" to version "+S.newVersion+', but the storage "'+o.storeName+'" already exists.')}}),g.onerror=function(S){S.preventDefault(),m(g.error)},g.onsuccess=function(){var S=g.result;S.onversionchange=function(x){x.target.close()},a(S),O(o)}})}function $(o){return j(o,!1)}function X(o){return j(o,!0)}function V(o,s){if(!o.db)return!0;var a=!o.db.objectStoreNames.contains(o.storeName),m=o.version<o.db.version,f=o.version>o.db.version;if(m&&(o.version!==s&&console.warn('The database "'+o.name+`" can't be downgraded from version `+o.db.version+" to version "+o.version+"."),o.version=o.db.version),f||a){if(a){var g=o.db.version+1;g>o.version&&(o.version=g)}return!0}return!1}function it(o){return new C(function(s,a){var m=new FileReader;m.onerror=a,m.onloadend=function(f){var g=btoa(f.target.result||"");s({__local_forage_encoded_blob:!0,data:g,type:o.type})},m.readAsBinaryString(o)})}function Q(o){return b([p(atob(o.data))],{type:o.type})}function rt(o){return o&&o.__local_forage_encoded_blob}function se(o){var s=this,a=s._initReady().then(function(){var m=u[s._dbInfo.name];if(m&&m.dbReady)return m.dbReady});return M(a,o,o),a}function ae(o){L(o);for(var s=u[o.name],a=s.forages,m=0;m<a.length;m++){var f=a[m];f._dbInfo.db&&(f._dbInfo.db.close(),f._dbInfo.db=null)}return o.db=null,$(o).then(function(g){return o.db=g,V(o)?X(o):g}).then(function(g){o.db=s.db=g;for(var S=0;S<a.length;S++)a[S]._dbInfo.db=g}).catch(function(g){throw U(o,g),g})}function st(o,s,a,m){m===void 0&&(m=1);try{var f=o.db.transaction(o.storeName,s);a(null,f)}catch(g){if(m>0&&(!o.db||g.name==="InvalidStateError"||g.name==="NotFoundError"))return C.resolve().then(function(){if(!o.db||g.name==="NotFoundError"&&!o.db.objectStoreNames.contains(o.storeName)&&o.version<=o.db.version)return o.db&&(o.version=o.db.version+1),X(o)}).then(function(){return ae(o).then(function(){st(o,s,a,m-1)})}).catch(a);a(g)}}function Xe(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function Kn(o){var s=this,a={db:null};if(o)for(var m in o)a[m]=o[m];var f=u[a.name];f||(f=Xe(),u[a.name]=f),f.forages.push(s),s._initReady||(s._initReady=s.ready,s.ready=se);var g=[];function S(){return C.resolve()}for(var x=0;x<f.forages.length;x++){var E=f.forages[x];E!==s&&g.push(E._initReady().catch(S))}var k=f.forages.slice(0);return C.all(g).then(function(){return a.db=f.db,$(a)}).then(function(_){return a.db=_,V(a,s._defaultConfig.version)?X(a):_}).then(function(_){a.db=f.db=_,s._dbInfo=a;for(var B=0;B<k.length;B++){var N=k[B];N!==s&&(N._dbInfo.db=a.db,N._dbInfo.version=a.version)}})}function Yn(o,s){var a=this;o=D(o);var m=new C(function(f,g){a.ready().then(function(){st(a._dbInfo,d,function(S,x){if(S)return g(S);try{var E=x.objectStore(a._dbInfo.storeName).get(o);E.onsuccess=function(){var k=E.result;k===void 0&&(k=null),rt(k)&&(k=Q(k)),f(k)},E.onerror=function(){g(E.error)}}catch(k){g(k)}})}).catch(g)});return z(m,s),m}function Jn(o,s){var a=this,m=new C(function(f,g){a.ready().then(function(){st(a._dbInfo,d,function(S,x){if(S)return g(S);try{var E=x.objectStore(a._dbInfo.storeName).openCursor(),k=1;E.onsuccess=function(){var _=E.result;if(_){var B=_.value;rt(B)&&(B=Q(B));var N=o(B,_.key,k++);N!==void 0?f(N):_.continue()}else f()},E.onerror=function(){g(E.error)}}catch(_){g(_)}})}).catch(g)});return z(m,s),m}function Zn(o,s,a){var m=this;o=D(o);var f=new C(function(g,S){var x;m.ready().then(function(){return x=m._dbInfo,h.call(s)==="[object Blob]"?I(x.db).then(function(E){return E?s:it(s)}):s}).then(function(E){st(m._dbInfo,l,function(k,_){if(k)return S(k);try{var B=_.objectStore(m._dbInfo.storeName);E===null&&(E=void 0);var N=B.put(E,o);_.oncomplete=function(){E===void 0&&(E=null),g(E)},_.onabort=_.onerror=function(){var W=N.error?N.error:N.transaction.error;S(W)}}catch(W){S(W)}})}).catch(S)});return z(f,a),f}function Qn(o,s){var a=this;o=D(o);var m=new C(function(f,g){a.ready().then(function(){st(a._dbInfo,l,function(S,x){if(S)return g(S);try{var E=x.objectStore(a._dbInfo.storeName).delete(o);x.oncomplete=function(){f()},x.onerror=function(){g(E.error)},x.onabort=function(){var k=E.error?E.error:E.transaction.error;g(k)}}catch(k){g(k)}})}).catch(g)});return z(m,s),m}function ti(o){var s=this,a=new C(function(m,f){s.ready().then(function(){st(s._dbInfo,l,function(g,S){if(g)return f(g);try{var x=S.objectStore(s._dbInfo.storeName).clear();S.oncomplete=function(){m()},S.onabort=S.onerror=function(){var E=x.error?x.error:x.transaction.error;f(E)}}catch(E){f(E)}})}).catch(f)});return z(a,o),a}function ei(o){var s=this,a=new C(function(m,f){s.ready().then(function(){st(s._dbInfo,d,function(g,S){if(g)return f(g);try{var x=S.objectStore(s._dbInfo.storeName).count();x.onsuccess=function(){m(x.result)},x.onerror=function(){f(x.error)}}catch(E){f(E)}})}).catch(f)});return z(a,o),a}function ni(o,s){var a=this,m=new C(function(f,g){o<0?f(null):a.ready().then(function(){st(a._dbInfo,d,function(S,x){if(S)return g(S);try{var E=x.objectStore(a._dbInfo.storeName),k=!1,_=E.openKeyCursor();_.onsuccess=function(){var B=_.result;B?o===0||k?f(B.key):(k=!0,B.advance(o)):f(null)},_.onerror=function(){g(_.error)}}catch(B){g(B)}})}).catch(g)});return z(m,s),m}function ii(o){var s=this,a=new C(function(m,f){s.ready().then(function(){st(s._dbInfo,d,function(g,S){if(g)return f(g);try{var x=S.objectStore(s._dbInfo.storeName).openKeyCursor(),E=[];x.onsuccess=function(){var k=x.result;k?(E.push(k.key),k.continue()):m(E)},x.onerror=function(){f(x.error)}}catch(k){f(k)}})}).catch(f)});return z(a,o),a}function oi(o,s){s=T.apply(this,arguments);var a=this.config();(o=typeof o!="function"&&o||{}).name||(o.name=o.name||a.name,o.storeName=o.storeName||a.storeName);var m,f=this;if(o.name){var g=o.name===a.name&&f._dbInfo.db?C.resolve(f._dbInfo.db):$(o).then(function(S){var x=u[o.name],E=x.forages;x.db=S;for(var k=0;k<E.length;k++)E[k]._dbInfo.db=S;return S});m=o.storeName?g.then(function(S){if(S.objectStoreNames.contains(o.storeName)){var x=S.version+1;L(o);var E=u[o.name],k=E.forages;S.close();for(var _=0;_<k.length;_++){var B=k[_];B._dbInfo.db=null,B._dbInfo.version=x}return new C(function(N,W){var F=y.open(o.name,x);F.onerror=function(ot){F.result.close(),W(ot)},F.onupgradeneeded=function(){F.result.deleteObjectStore(o.storeName)},F.onsuccess=function(){var ot=F.result;ot.close(),N(ot)}}).then(function(N){E.db=N;for(var W=0;W<k.length;W++){var F=k[W];F._dbInfo.db=N,O(F._dbInfo)}}).catch(function(N){throw(U(o,N)||C.resolve()).catch(function(){}),N})}}):g.then(function(S){L(o);var x=u[o.name],E=x.forages;S.close();for(var k=0;k<E.length;k++)E[k]._dbInfo.db=null;return new C(function(_,B){var N=y.deleteDatabase(o.name);N.onerror=function(){var W=N.result;W&&W.close(),B(N.error)},N.onblocked=function(){console.warn('dropInstance blocked for database "'+o.name+'" until all open connections are closed')},N.onsuccess=function(){var W=N.result;W&&W.close(),_(W)}}).then(function(_){x.db=_;for(var B=0;B<E.length;B++)O(E[B]._dbInfo)}).catch(function(_){throw(U(o,_)||C.resolve()).catch(function(){}),_})})}else m=C.reject("Invalid arguments");return z(m,s),m}var ri={_driver:"asyncStorage",_initStorage:Kn,_support:v(),iterate:Jn,getItem:Yn,setItem:Zn,removeItem:Qn,clear:ti,length:ei,key:ni,keys:ii,dropInstance:oi};function si(){return typeof openDatabase=="function"}var lt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ai="~~local_forage_type~",Ge=/^~~local_forage_type~([^~]+)~/,Ot="__lfsc__:",ce=Ot.length,ue="arbf",le="blob",Ve="si08",Ke="ui08",Ye="uic8",Je="si16",Ze="si32",Qe="ur16",tn="ui32",en="fl32",nn="fl64",on=ce+ue.length,rn=Object.prototype.toString;function sn(o){var s,a,m,f,g,S=.75*o.length,x=o.length,E=0;o[o.length-1]==="="&&(S--,o[o.length-2]==="="&&S--);var k=new ArrayBuffer(S),_=new Uint8Array(k);for(s=0;s<x;s+=4)a=lt.indexOf(o[s]),m=lt.indexOf(o[s+1]),f=lt.indexOf(o[s+2]),g=lt.indexOf(o[s+3]),_[E++]=a<<2|m>>4,_[E++]=(15&m)<<4|f>>2,_[E++]=(3&f)<<6|63&g;return k}function he(o){var s,a=new Uint8Array(o),m="";for(s=0;s<a.length;s+=3)m+=lt[a[s]>>2],m+=lt[(3&a[s])<<4|a[s+1]>>4],m+=lt[(15&a[s+1])<<2|a[s+2]>>6],m+=lt[63&a[s+2]];return a.length%3==2?m=m.substring(0,m.length-1)+"=":a.length%3==1&&(m=m.substring(0,m.length-2)+"=="),m}function ci(o,s){var a="";if(o&&(a=rn.call(o)),o&&(a==="[object ArrayBuffer]"||o.buffer&&rn.call(o.buffer)==="[object ArrayBuffer]")){var m,f=Ot;o instanceof ArrayBuffer?(m=o,f+=ue):(m=o.buffer,a==="[object Int8Array]"?f+=Ve:a==="[object Uint8Array]"?f+=Ke:a==="[object Uint8ClampedArray]"?f+=Ye:a==="[object Int16Array]"?f+=Je:a==="[object Uint16Array]"?f+=Qe:a==="[object Int32Array]"?f+=Ze:a==="[object Uint32Array]"?f+=tn:a==="[object Float32Array]"?f+=en:a==="[object Float64Array]"?f+=nn:s(new Error("Failed to get type for BinaryArray"))),s(f+he(m))}else if(a==="[object Blob]"){var g=new FileReader;g.onload=function(){var S=ai+o.type+"~"+he(this.result);s(Ot+le+S)},g.readAsArrayBuffer(o)}else try{s(JSON.stringify(o))}catch(S){console.error("Couldn't convert value into a JSON string: ",o),s(null,S)}}function ui(o){if(o.substring(0,ce)!==Ot)return JSON.parse(o);var s,a=o.substring(on),m=o.substring(ce,on);if(m===le&&Ge.test(a)){var f=a.match(Ge);s=f[1],a=a.substring(f[0].length)}var g=sn(a);switch(m){case ue:return g;case le:return b([g],{type:s});case Ve:return new Int8Array(g);case Ke:return new Uint8Array(g);case Ye:return new Uint8ClampedArray(g);case Je:return new Int16Array(g);case Qe:return new Uint16Array(g);case Ze:return new Int32Array(g);case tn:return new Uint32Array(g);case en:return new Float32Array(g);case nn:return new Float64Array(g);default:throw new Error("Unkown type: "+m)}}var de={serialize:ci,deserialize:ui,stringToBuffer:sn,bufferToString:he};function an(o,s,a,m){o.executeSql("CREATE TABLE IF NOT EXISTS "+s.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],a,m)}function li(o){var s=this,a={db:null};if(o)for(var m in o)a[m]=typeof o[m]!="string"?o[m].toString():o[m];var f=new C(function(g,S){try{a.db=openDatabase(a.name,String(a.version),a.description,a.size)}catch(x){return S(x)}a.db.transaction(function(x){an(x,a,function(){s._dbInfo=a,g()},function(E,k){S(k)})},S)});return a.serializer=de,f}function ht(o,s,a,m,f,g){o.executeSql(a,m,f,function(S,x){x.code===x.SYNTAX_ERR?S.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[s.storeName],function(E,k){k.rows.length?g(E,x):an(E,s,function(){E.executeSql(a,m,f,g)},g)},g):g(S,x)},g)}function hi(o,s){var a=this;o=D(o);var m=new C(function(f,g){a.ready().then(function(){var S=a._dbInfo;S.db.transaction(function(x){ht(x,S,"SELECT * FROM "+S.storeName+" WHERE key = ? LIMIT 1",[o],function(E,k){var _=k.rows.length?k.rows.item(0).value:null;_&&(_=S.serializer.deserialize(_)),f(_)},function(E,k){g(k)})})}).catch(g)});return z(m,s),m}function di(o,s){var a=this,m=new C(function(f,g){a.ready().then(function(){var S=a._dbInfo;S.db.transaction(function(x){ht(x,S,"SELECT * FROM "+S.storeName,[],function(E,k){for(var _=k.rows,B=_.length,N=0;N<B;N++){var W=_.item(N),F=W.value;if(F&&(F=S.serializer.deserialize(F)),(F=o(F,W.key,N+1))!==void 0)return void f(F)}f()},function(E,k){g(k)})})}).catch(g)});return z(m,s),m}function cn(o,s,a,m){var f=this;o=D(o);var g=new C(function(S,x){f.ready().then(function(){s===void 0&&(s=null);var E=s,k=f._dbInfo;k.serializer.serialize(s,function(_,B){B?x(B):k.db.transaction(function(N){ht(N,k,"INSERT OR REPLACE INTO "+k.storeName+" (key, value) VALUES (?, ?)",[o,_],function(){S(E)},function(W,F){x(F)})},function(N){if(N.code===N.QUOTA_ERR){if(m>0)return void S(cn.apply(f,[o,E,a,m-1]));x(N)}})})}).catch(x)});return z(g,a),g}function fi(o,s,a){return cn.apply(this,[o,s,a,1])}function pi(o,s){var a=this;o=D(o);var m=new C(function(f,g){a.ready().then(function(){var S=a._dbInfo;S.db.transaction(function(x){ht(x,S,"DELETE FROM "+S.storeName+" WHERE key = ?",[o],function(){f()},function(E,k){g(k)})})}).catch(g)});return z(m,s),m}function mi(o){var s=this,a=new C(function(m,f){s.ready().then(function(){var g=s._dbInfo;g.db.transaction(function(S){ht(S,g,"DELETE FROM "+g.storeName,[],function(){m()},function(x,E){f(E)})})}).catch(f)});return z(a,o),a}function gi(o){var s=this,a=new C(function(m,f){s.ready().then(function(){var g=s._dbInfo;g.db.transaction(function(S){ht(S,g,"SELECT COUNT(key) as c FROM "+g.storeName,[],function(x,E){var k=E.rows.item(0).c;m(k)},function(x,E){f(E)})})}).catch(f)});return z(a,o),a}function vi(o,s){var a=this,m=new C(function(f,g){a.ready().then(function(){var S=a._dbInfo;S.db.transaction(function(x){ht(x,S,"SELECT key FROM "+S.storeName+" WHERE id = ? LIMIT 1",[o+1],function(E,k){var _=k.rows.length?k.rows.item(0).key:null;f(_)},function(E,k){g(k)})})}).catch(g)});return z(m,s),m}function yi(o){var s=this,a=new C(function(m,f){s.ready().then(function(){var g=s._dbInfo;g.db.transaction(function(S){ht(S,g,"SELECT key FROM "+g.storeName,[],function(x,E){for(var k=[],_=0;_<E.rows.length;_++)k.push(E.rows.item(_).key);m(k)},function(x,E){f(E)})})}).catch(f)});return z(a,o),a}function wi(o){return new C(function(s,a){o.transaction(function(m){m.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(f,g){for(var S=[],x=0;x<g.rows.length;x++)S.push(g.rows.item(x).name);s({db:o,storeNames:S})},function(f,g){a(g)})},function(m){a(m)})})}function bi(o,s){s=T.apply(this,arguments);var a=this.config();(o=typeof o!="function"&&o||{}).name||(o.name=o.name||a.name,o.storeName=o.storeName||a.storeName);var m,f=this;return z(m=o.name?new C(function(g){var S;S=o.name===a.name?f._dbInfo.db:openDatabase(o.name,"","",0),o.storeName?g({db:S,storeNames:[o.storeName]}):g(wi(S))}).then(function(g){return new C(function(S,x){g.db.transaction(function(E){function k(W){return new C(function(F,ot){E.executeSql("DROP TABLE IF EXISTS "+W,[],function(){F()},function(dn,Pt){ot(Pt)})})}for(var _=[],B=0,N=g.storeNames.length;B<N;B++)_.push(k(g.storeNames[B]));C.all(_).then(function(){S()}).catch(function(W){x(W)})},function(E){x(E)})})}):C.reject("Invalid arguments"),s),m}var Si={_driver:"webSQLStorage",_initStorage:li,_support:si(),iterate:di,getItem:hi,setItem:fi,removeItem:pi,clear:mi,length:gi,key:vi,keys:yi,dropInstance:bi};function Ci(){try{return typeof localStorage!="undefined"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function un(o,s){var a=o.name+"/";return o.storeName!==s.storeName&&(a+=o.storeName+"/"),a}function xi(){var o="_localforage_support_test";try{return localStorage.setItem(o,!0),localStorage.removeItem(o),!1}catch{return!0}}function Ei(){return!xi()||localStorage.length>0}function ki(o){var s=this,a={};if(o)for(var m in o)a[m]=o[m];return a.keyPrefix=un(o,s._defaultConfig),Ei()?(s._dbInfo=a,a.serializer=de,C.resolve()):C.reject()}function zi(o){var s=this,a=s.ready().then(function(){for(var m=s._dbInfo.keyPrefix,f=localStorage.length-1;f>=0;f--){var g=localStorage.key(f);g.indexOf(m)===0&&localStorage.removeItem(g)}});return z(a,o),a}function Mi(o,s){var a=this;o=D(o);var m=a.ready().then(function(){var f=a._dbInfo,g=localStorage.getItem(f.keyPrefix+o);return g&&(g=f.serializer.deserialize(g)),g});return z(m,s),m}function _i(o,s){var a=this,m=a.ready().then(function(){for(var f=a._dbInfo,g=f.keyPrefix,S=g.length,x=localStorage.length,E=1,k=0;k<x;k++){var _=localStorage.key(k);if(_.indexOf(g)===0){var B=localStorage.getItem(_);if(B&&(B=f.serializer.deserialize(B)),(B=o(B,_.substring(S),E++))!==void 0)return B}}});return z(m,s),m}function Ii(o,s){var a=this,m=a.ready().then(function(){var f,g=a._dbInfo;try{f=localStorage.key(o)}catch{f=null}return f&&(f=f.substring(g.keyPrefix.length)),f});return z(m,s),m}function Ri(o){var s=this,a=s.ready().then(function(){for(var m=s._dbInfo,f=localStorage.length,g=[],S=0;S<f;S++){var x=localStorage.key(S);x.indexOf(m.keyPrefix)===0&&g.push(x.substring(m.keyPrefix.length))}return g});return z(a,o),a}function Li(o){var s=this.keys().then(function(a){return a.length});return z(s,o),s}function Pi(o,s){var a=this;o=D(o);var m=a.ready().then(function(){var f=a._dbInfo;localStorage.removeItem(f.keyPrefix+o)});return z(m,s),m}function Bi(o,s,a){var m=this;o=D(o);var f=m.ready().then(function(){s===void 0&&(s=null);var g=s;return new C(function(S,x){var E=m._dbInfo;E.serializer.serialize(s,function(k,_){if(_)x(_);else try{localStorage.setItem(E.keyPrefix+o,k),S(g)}catch(B){B.name!=="QuotaExceededError"&&B.name!=="NS_ERROR_DOM_QUOTA_REACHED"||x(B),x(B)}})})});return z(f,a),f}function Ai(o,s){if(s=T.apply(this,arguments),!(o=typeof o!="function"&&o||{}).name){var a=this.config();o.name=o.name||a.name,o.storeName=o.storeName||a.storeName}var m,f=this;return z(m=o.name?new C(function(g){o.storeName?g(un(o,f._defaultConfig)):g(o.name+"/")}).then(function(g){for(var S=localStorage.length-1;S>=0;S--){var x=localStorage.key(S);x.indexOf(g)===0&&localStorage.removeItem(x)}}):C.reject("Invalid arguments"),s),m}var Di={_driver:"localStorageWrapper",_initStorage:ki,_support:Ci(),iterate:_i,getItem:Mi,setItem:Bi,removeItem:Pi,clear:zi,length:Li,key:Ii,keys:Ri,dropInstance:Ai},Ti=function(o,s){return o===s||typeof o=="number"&&typeof s=="number"&&isNaN(o)&&isNaN(s)},Ni=function(o,s){for(var a=o.length,m=0;m<a;){if(Ti(o[m],s))return!0;m++}return!1},ln=Array.isArray||function(o){return Object.prototype.toString.call(o)==="[object Array]"},Lt={},hn={},Et={INDEXEDDB:ri,WEBSQL:Si,LOCALSTORAGE:Di},Oi=[Et.INDEXEDDB._driver,Et.WEBSQL._driver,Et.LOCALSTORAGE._driver],Ut=["dropInstance"],fe=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(Ut),Ui={description:"",driver:Oi.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function ji(o,s){o[s]=function(){var a=arguments;return o.ready().then(function(){return o[s].apply(o,a)})}}function pe(){for(var o=1;o<arguments.length;o++){var s=arguments[o];if(s)for(var a in s)s.hasOwnProperty(a)&&(ln(s[a])?arguments[0][a]=s[a].slice():arguments[0][a]=s[a])}return arguments[0]}var Wi=new(function(){function o(s){for(var a in r(this,o),Et)if(Et.hasOwnProperty(a)){var m=Et[a],f=m._driver;this[a]=f,Lt[f]||this.defineDriver(m)}this._defaultConfig=pe({},Ui),this._config=pe({},this._defaultConfig,s),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return o.prototype.config=function(s){if((s===void 0?"undefined":i(s))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var a in s){if(a==="storeName"&&(s[a]=s[a].replace(/\W/g,"_")),a==="version"&&typeof s[a]!="number")return new Error("Database version must be a number.");this._config[a]=s[a]}return!("driver"in s)||!s.driver||this.setDriver(this._config.driver)}return typeof s=="string"?this._config[s]:this._config},o.prototype.defineDriver=function(s,a,m){var f=new C(function(g,S){try{var x=s._driver,E=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!s._driver)return void S(E);for(var k=fe.concat("_initStorage"),_=0,B=k.length;_<B;_++){var N=k[_];if((!Ni(Ut,N)||s[N])&&typeof s[N]!="function")return void S(E)}(function(){for(var F=function(Fi){return function(){var $i=new Error("Method "+Fi+" is not implemented by the current driver"),fn=C.reject($i);return z(fn,arguments[arguments.length-1]),fn}},ot=0,dn=Ut.length;ot<dn;ot++){var Pt=Ut[ot];s[Pt]||(s[Pt]=F(Pt))}})();var W=function(F){Lt[x]&&console.info("Redefining LocalForage driver: "+x),Lt[x]=s,hn[x]=F,g()};"_support"in s?s._support&&typeof s._support=="function"?s._support().then(W,S):W(!!s._support):W(!0)}catch(F){S(F)}});return M(f,a,m),f},o.prototype.driver=function(){return this._driver||null},o.prototype.getDriver=function(s,a,m){var f=Lt[s]?C.resolve(Lt[s]):C.reject(new Error("Driver not found."));return M(f,a,m),f},o.prototype.getSerializer=function(s){var a=C.resolve(de);return M(a,s),a},o.prototype.ready=function(s){var a=this,m=a._driverSet.then(function(){return a._ready===null&&(a._ready=a._initDriver()),a._ready});return M(m,s,s),m},o.prototype.setDriver=function(s,a,m){var f=this;ln(s)||(s=[s]);var g=this._getSupportedDrivers(s);function S(){f._config.driver=f.driver()}function x(_){return f._extend(_),S(),f._ready=f._initStorage(f._config),f._ready}function E(_){return function(){var B=0;function N(){for(;B<_.length;){var W=_[B];return B++,f._dbInfo=null,f._ready=null,f.getDriver(W).then(x).catch(N)}S();var F=new Error("No available storage method found.");return f._driverSet=C.reject(F),f._driverSet}return N()}}var k=this._driverSet!==null?this._driverSet.catch(function(){return C.resolve()}):C.resolve();return this._driverSet=k.then(function(){var _=g[0];return f._dbInfo=null,f._ready=null,f.getDriver(_).then(function(B){f._driver=B._driver,S(),f._wrapLibraryMethodsWithReady(),f._initDriver=E(g)})}).catch(function(){S();var _=new Error("No available storage method found.");return f._driverSet=C.reject(_),f._driverSet}),M(this._driverSet,a,m),this._driverSet},o.prototype.supports=function(s){return!!hn[s]},o.prototype._extend=function(s){pe(this,s)},o.prototype._getSupportedDrivers=function(s){for(var a=[],m=0,f=s.length;m<f;m++){var g=s[m];this.supports(g)&&a.push(g)}return a},o.prototype._wrapLibraryMethodsWithReady=function(){for(var s=0,a=fe.length;s<a;s++)ji(this,fe[s])},o.prototype.createInstance=function(s){return new o(s)},o}());t.exports=Wi},{3:3}]},{},[4])(4),Tn={exports:{}};(function(e){Tn.exports=(()=>{const t=typeof window=="object"?window:this;t.HTMLElement||console.warn("streamsaver is meant to run on browsers main thread");let n=null,i=!1;const r=t.WebStreamsPolyfill||{},c=t.isSecureContext;let y=/constructor/i.test(t.HTMLElement)||!!t.safari||!!t.WebKitPoint;const v=c||"MozAppearance"in document.documentElement.style?"iframe":"navigate",b={createWriteStream:function(z,M,D){let T={size:null,pathname:null,writableStrategy:void 0,readableStrategy:void 0},R=0,w=null,u=null,h=null;if(Number.isFinite(M)?([D,M]=[M,D],console.warn("[StreamSaver] Depricated pass an object as 2nd argument when creating a write stream"),T.size=D,T.writableStrategy=M):M&&M.highWaterMark?(console.warn("[StreamSaver] Depricated pass an object as 2nd argument when creating a write stream"),T.size=D,T.writableStrategy=M):T=M||{},!y){n||(n=c?C(b.mitm):function(P){const I="width=200,height=100",L=document.createDocumentFragment(),O={frame:t.open(P,"popup",I),loaded:!1,isIframe:!1,isPopup:!0,remove(){O.frame.close()},addEventListener(...j){L.addEventListener(...j)},dispatchEvent(...j){L.dispatchEvent(...j)},removeEventListener(...j){L.removeEventListener(...j)},postMessage(...j){O.frame.postMessage(...j)}},U=j=>{j.source===O.frame&&(O.loaded=!0,t.removeEventListener("message",U),O.dispatchEvent(new Event("load")))};return t.addEventListener("message",U),O}(b.mitm)),u=new MessageChannel,z=encodeURIComponent(z.replace(/\//g,":")).replace(/['()]/g,escape).replace(/\*/g,"%2A");const l={transferringReadable:i,pathname:T.pathname||Math.random().toString().slice(-6)+"/"+z,headers:{"Content-Type":"application/octet-stream; charset=utf-8","Content-Disposition":"attachment; filename*=UTF-8''"+z}};T.size&&(l.headers["Content-Length"]=T.size);const p=[l,"*",[u.port2]];if(i){const P=v==="iframe"?void 0:{transform(L,O){if(!(L instanceof Uint8Array))throw new TypeError("Can only wirte Uint8Arrays");R+=L.length,O.enqueue(L),w&&(location.href=w,w=null)},flush(){w&&(location.href=w)}};h=new b.TransformStream(P,T.writableStrategy,T.readableStrategy);const I=h.readable;u.port1.postMessage({readableStream:I},[I])}u.port1.onmessage=P=>{P.data.download&&(v==="navigate"?(n.remove(),n=null,R?location.href=P.data.download:w=P.data.download):(n.isPopup&&(n.remove(),n=null,v==="iframe"&&C(b.mitm)),C(P.data.download)))},n.loaded?n.postMessage(...p):n.addEventListener("load",()=>{n.postMessage(...p)},{once:!0})}let d=[];return!y&&h&&h.writable||new b.WritableStream({write(l){if(!(l instanceof Uint8Array))throw new TypeError("Can only wirte Uint8Arrays");y?d.push(l):(u.port1.postMessage(l),R+=l.length,w&&(location.href=w,w=null))},close(){if(y){const l=new Blob(d,{type:"application/octet-stream; charset=utf-8"}),p=document.createElement("a");p.href=URL.createObjectURL(l),p.download=z,p.click()}else u.port1.postMessage("end")},abort(){d=[],u.port1.postMessage("abort"),u.port1.onmessage=null,u.port1.close(),u.port2.close(),u=null}},T.writableStrategy)},WritableStream:t.WritableStream||r.WritableStream,supported:!0,version:{full:"2.0.5",major:2,minor:0,dot:5},mitm:"/mitm.html"};function C(z){if(!z)throw new Error("meh");const M=document.createElement("iframe");return M.hidden=!0,M.src=z,M.loaded=!1,M.name="iframe",M.isIframe=!0,M.postMessage=(...D)=>M.contentWindow.postMessage(...D),M.addEventListener("load",()=>{M.loaded=!0},{once:!0}),document.body.appendChild(M),M}try{new Response(new ReadableStream),c&&!("serviceWorker"in navigator)&&(y=!0)}catch{y=!0}return(z=>{try{z()}catch{}})(()=>{const{readable:z}=new TransformStream,M=new MessageChannel;M.port1.postMessage(z,[z]),M.port1.close(),M.port2.close(),i=!0,Object.defineProperty(b,"TransformStream",{configurable:!1,writable:!1,value:TransformStream})}),b})()})();var Xo=Tn.exports;class Go{fileID;downloadURL;ChunkUnitM=1048576;chunkByteSize;totalChunks=1;currentDB;keys;fileMetaData=null;finishNum=0;eventTarget;cancelSource;isStarting=!1;fileName;cacheSize=6;requestTimeout=6e4;constructor(t,n,i=3,r=6,c=6e4){this.fileID=t,this.downloadURL=n,this.chunkByteSize=i*this.ChunkUnitM,this.eventTarget=Ee(),this.initIndexDB(),r>=3&&(this.cacheSize=r),c>this.requestTimeout&&(this.requestTimeout=c)}on(t,n){this.eventTarget.on(t,n)}dispatch(t,n){this.eventTarget.emit(t,n)}dispatchError(t){this.eventTarget.emit("error",t)}dispatchInfo(t){this.eventTarget.emit("info",t)}async queryDownloadFileMeta(t,n="",i){this.dispatchInfo("\u5F00\u59CB\u83B7\u53D6\u6587\u4EF6\u4FE1\u606F");const r=await ct(n,t,i);let c=null;return r&&r.status===200&&(c=r.data),c}async getIFileMeta(){if(this.fileMetaData===null){const t=await this.currentDB?.getItem("fileinfo");this.fileMetaData=t||null}return this.fileMetaData}initIndexDB(){this.currentDB=qt.createInstance({name:this.fileID,driver:qt.INDEXEDDB})}async init(t){if(this.finishNum=0,t){const n="fileinfo";this.fileMetaData={id:t.id,name:t.name,length:t.length,downloadID:t.downloadID,chunkSize:this.chunkByteSize},this.fileName=t.name,this.currentDB?.setItem(n,this.fileMetaData)}if(this.fileMetaData!=null){const n=this.fileMetaData.chunkSize;n!=null&&n>0&&(this.chunkByteSize=n)}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(),qt.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(t){return new Promise(n=>setTimeout(n,t))}async download(t){t&&(this.downloadURL=t);const n=this.downloadURL;if(!n)throw Error("\u4E0B\u8F7DURL\u4E0D\u80FD\u4E3A\u7A7A!");this.currentDB||this.initIndexDB();const i=A.Axios.CancelToken;this.cancelSource=i.source(),this.isStarting=!0;const r={key:this.fileMetaData?.downloadID};let c=0;const y=this.cacheSize;let v=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 C=b*this.chunkByteSize;let z=C+this.chunkByteSize-1;this.fileMetaData&&z>this.fileMetaData.length&&(z=this.fileMetaData.length-1);const M={range:`bytes=${C}-${z}`};for(;v>=y;)await this.sleep(200);const D=b.toString();this.dispatchInfo(`\u5F00\u59CB\u4E0B\u8F7D\u5206\u7247${b+1}/${this.totalChunks}`),v++,ct("",n,r,M,"arraybuffer",this.cancelSource?.token,this.requestTimeout).then(async T=>{const R=T.data;v--,await this.currentDB?.setItem(D,R),c++,c>this.finishNum&&(this.finishNum=c,this.downloadProgress());const w=parseInt(D)+1;this.dispatchInfo(`\u5B8C\u6210\u4E0B\u8F7D\u5206\u7247${w}/${this.totalChunks}`),this.savefile()}).catch(T=>{v--;const R=parseInt(D)+1;this.dispatchError(`\u4E0B\u8F7D\u7B2C${R}\uFF09\u4E2A\u5206\u7247\u5185\u5BB9\u5931\u8D25\uFF01`)})}this.finishNum===this.totalChunks&&this.savefile()}downloadProgress(){const t=100*this.finishNum/this.totalChunks;this.dispatch("downloadProgress",t)}outputProgress(t){const n=100*t/this.totalChunks;this.dispatch("saveProgress",n)}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 t=Xo.createWriteStream(this.fileName).getWriter();let n=0;for(let i=0;i<this.totalChunks;i++){const r=i.toString();let c=await this.currentDB?.getItem(r);if(c||(c=await this.currentDB?.getItem(r)),!c)return void this.dispatchError(`\u8F93\u51FA\u5206\u7247\u7B2C${i+1}\uFF09\u4E2A\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u9519\u8BEF\u9000\u51FA\uFF01`);let y=new Response(c).body;if(y===null)return void this.dispatchError(`\u8F93\u51FA\u5206\u7247\u7B2C${i+1}\uFF09\u4E2A\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u9519\u8BEF\u9000\u51FA\uFF01`);const v=y.getReader();for(;;){const{done:b,value:C}=await v.read();if(b)break;await t.write(C)}n++,this.outputProgress(n),this.dispatchInfo(`\u5B8C\u6210\u7B2C${i+1}\u4E2A\u5206\u7247\u8F93\u51FA`)}t.close(),qt.dropInstance({name:this.fileID}),this.dispatch("success"),this.isStarting=!1,this.dispatchInfo("\u5B8C\u6210\u6587\u4EF6\u4E0B\u8F7D")}}}const Vo=Object.prototype.toString;function Y(e,t){return Vo.call(e)===`[object ${t}]`}function Ae(e){return Y(e,"Function")}const Nn=e=>e!==void 0,De=e=>!Nn(e);function Te(e){return e===null}function Ko(e){return De(e)&&Te(e)}function Yo(e){return De(e)||Te(e)}const Ct=e=>e!==null&&Y(e,"Object");function Jo(e){return Y(e,"Date")}function Zo(e){return Y(e,"Number")}function Qo(e){return Y(e,"AsyncFunction")}function tr(e){return Y(e,"Promise")&&Ct(e)&&Ae(e.then)&&Ae(e.catch)}function Xt(e){return Y(e,"String")}function er(e){return e===!0||e===!1||Y(e,"Boolean")}function On(e){return e&&Array.isArray(e)}const nr=()=>typeof window!="undefined",ir=e=>typeof window!="undefined"&&Y(e,"Window"),or=e=>Ct(e)&&!!e.tagName,rr=typeof window=="undefined";function sr(e){return e&&["IMAGE","IMG"].includes(e.tagName)}function ar(e){return e==null||(Xt(e)||On(e)?e.length===0:!!Ct(e)&&JSON.stringify(e)==="{}")}function cr(e){return Y(e,"Error")}function ur(e){return Y(e,"WeakSet")}function lr(e){return Y(e,"WeakMap")}function hr(e){return Y(e,"Symbol")}function dr(e){return Y(e,"Map")}const fr=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);function pr(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}function Un(e={},t={}){let n;for(n in t)e[n]=Ct(e[n])?Un(e[n],t[n]):e[n]=t[n];return e}const J=pn({panelGroups:{}}),jn=()=>({useGroupAccordion:e=>ft(()=>J.panelGroups[e].accordion),setGroupAccordionStatus:(e,t)=>{J.panelGroups[e]={...J.panelGroups[e],accordion:t}},panelExpanded:(e,t)=>ft(()=>J.panelGroups[e]?.panelExpandStatus?.[t]||!1),setPanelExpandedStatus:(e,t,n)=>{J.panelGroups[e]={...J.panelGroups[e],panelExpandStatus:{...J.panelGroups[e]?.panelExpandStatus||{},[t]:n}}},togglePanelExpandedStatus:(e,t)=>{J.panelGroups[e].accordion&&(J.panelGroups[e].panelExpandStatus[t]||Object.keys(J.panelGroups[e].panelExpandStatus).forEach(n=>{J.panelGroups[e].panelExpandStatus[n]=!1})),J.panelGroups[e].panelExpandStatus[t]=!J.panelGroups[e].panelExpandStatus[t]}}),Ne=e=>e>255?255:e<0?0:e,Gt=(e,t)=>{const n=e.replace("#",""),i=parseInt(n,16),r=Ne((i>>16)+t),c=Ne((i>>8&255)+t);return"#"+(Ne((255&i)+t)|c<<8|r<<16).toString(16)};var Vt=Bt({name:"VueCollapsiblePanelGroup",props:{accordion:{type:Boolean,default:!1},baseColor:{type:String,default:"#333333"}},setup(e){const t=nt(`group-${$t()}`),{setGroupAccordionStatus:n}=jn(),i={"--base-color":e.baseColor,"--border-color":Gt(e.baseColor,180),"--bg-color-header":Gt(e.baseColor,140),"--bg-color-header-hover":Gt(e.baseColor,190),"--bg-color-header-active":Gt(e.baseColor,200),"--bg-color-body":"#fff"};return n(t.value,e.accordion),{idGroup:t,cssColorVars:i}}});const mr=["data-id-group"];Vt.render=function(e,t,n,i,r,c){return H(),tt("div",{"data-id-group":e.idGroup,style:yt(e.cssColorVars),class:"vcpg"},[dt(e.$slots,"default")],12,mr)},Vt.__scopeId="data-v-23ab5317",Vt.__file="src/controls/collapsepanel/VCollapsiblePanelGroup.vue";var Kt=Bt({name:"VueCollapsiblePanel",props:{expanded:{type:Boolean,default:!0}},setup(e,t){const n=`panel-${$t()}`,i=nt(),r=nt(),c=nt(),{panelExpanded:y,togglePanelExpandedStatus:v,setPanelExpandedStatus:b}=jn(),C=ft(()=>({hasContent:t.slots.content&&t.slots.content()[0].children.length>0,dataKey:$t()})),z=ft(()=>i.value?.parentElement?.getAttribute("data-id-group")||""),M=ft(()=>y(z.value,n).value&&C.value.hasContent);return mn(()=>{b(z.value,n,e.expanded)}),qi(()=>{(async()=>(await gn(),r.value&&c.value&&(r.value.style.height=`${Math.min(c.value.scrollHeight,r.value.scrollHeight)}px`)))()}),{body:C,panelRef:i,bodyRef:r,bodyContentRef:c,isExpanded:M,collapse:D=>{D.style.height="0"},expand:D=>{D.style.height=`${D.scrollHeight}px`},toggle:()=>{C.value.hasContent&&v(z.value,n)},toggleIcon:`
1
+ import{h as oo,openBlock as H,createElementBlock as tt,normalizeStyle as yt,renderSlot as ft,reactive as wn,computed as pt,defineComponent as Bt,ref as nt,onMounted as bn,onUpdated as ro,nextTick as Sn,normalizeClass as so,createElementVNode as K,createCommentVNode as zt,createVNode as Cn,Transition as xn,withCtx as Wt,withModifiers as En,getCurrentInstance as ao,watch as $t,onBeforeUnmount as co,resolveComponent as kn,createBlock as ct,withDirectives as uo,Fragment as wt,createTextVNode as zn,toDisplayString as lo,vShow as ho,markRaw as Mn,toRefs as fo,renderList as Mt,resolveDynamicComponent as bt}from"vue";import{Client as po,ClientContext as ye}from"@hprose/rpc-core";import{ByteStream as _n}from"@hprose/io";import{HttpTransport as mo}from"@hprose/rpc-html5";import go from"axios";var vo={name:"splitpanes",props:{horizontal:{type:Boolean},pushOtherPanes:{type:Boolean,default:!0},dblClickSplitter:{type:Boolean,default:!0},rtl:{type:Boolean,default:!1},firstSplitter:{type:Boolean}},provide(){return{requestUpdate:this.requestUpdate,onPaneAdd:this.onPaneAdd,onPaneRemove:this.onPaneRemove,onPaneClick:this.onPaneClick}},data:()=>({container:null,ready:!1,panes:[],touch:{mouseDown:!1,dragging:!1,activeSplitter:null},splitterTaps:{splitter:null,timeoutId:null}}),computed:{panesCount(){return this.panes.length},indexedPanes(){return this.panes.reduce((e,t)=>(e[t.id]=t)&&e,{})}},methods:{updatePaneComponents(){this.panes.forEach(e=>{e.update&&e.update({[this.horizontal?"height":"width"]:`${this.indexedPanes[e.id].size}%`})})},bindEvents(){document.addEventListener("mousemove",this.onMouseMove,{passive:!1}),document.addEventListener("mouseup",this.onMouseUp),"ontouchstart"in window&&(document.addEventListener("touchmove",this.onMouseMove,{passive:!1}),document.addEventListener("touchend",this.onMouseUp))},unbindEvents(){document.removeEventListener("mousemove",this.onMouseMove,{passive:!1}),document.removeEventListener("mouseup",this.onMouseUp),"ontouchstart"in window&&(document.removeEventListener("touchmove",this.onMouseMove,{passive:!1}),document.removeEventListener("touchend",this.onMouseUp))},onMouseDown(e,t){this.bindEvents(),this.touch.mouseDown=!0,this.touch.activeSplitter=t},onMouseMove(e){this.touch.mouseDown&&(e.preventDefault(),this.touch.dragging=!0,this.calculatePanesSize(this.getCurrentMouseDrag(e)),this.$emit("resize",this.panes.map(t=>({min:t.min,max:t.max,size:t.size}))))},onMouseUp(){this.touch.dragging&&this.$emit("resized",this.panes.map(e=>({min:e.min,max:e.max,size:e.size}))),this.touch.mouseDown=!1,setTimeout(()=>{this.touch.dragging=!1,this.unbindEvents()},100)},onSplitterClick(e,t){"ontouchstart"in window&&(e.preventDefault(),this.dblClickSplitter&&(this.splitterTaps.splitter===t?(clearTimeout(this.splitterTaps.timeoutId),this.splitterTaps.timeoutId=null,this.onSplitterDblClick(e,t),this.splitterTaps.splitter=null):(this.splitterTaps.splitter=t,this.splitterTaps.timeoutId=setTimeout(()=>{this.splitterTaps.splitter=null},500)))),this.touch.dragging||this.$emit("splitter-click",this.panes[t])},onSplitterDblClick(e,t){let n=0;this.panes=this.panes.map((i,r)=>(i.size=r===t?i.max:i.min,r!==t&&(n+=i.min),i)),this.panes[t].size-=n,this.$emit("pane-maximize",this.panes[t])},onPaneClick(e,t){this.$emit("pane-click",this.indexedPanes[t])},getCurrentMouseDrag(e){const t=this.container.getBoundingClientRect(),{clientX:n,clientY:i}="ontouchstart"in window&&e.touches?e.touches[0]:e;return{x:n-t.left,y:i-t.top}},getCurrentDragPercentage(e){e=e[this.horizontal?"y":"x"];const t=this.container[this.horizontal?"clientHeight":"clientWidth"];return this.rtl&&!this.horizontal&&(e=t-e),100*e/t},calculatePanesSize(e){const t=this.touch.activeSplitter;let n={prevPanesSize:this.sumPrevPanesSize(t),nextPanesSize:this.sumNextPanesSize(t),prevReachedMinPanes:0,nextReachedMinPanes:0};const i=0+(this.pushOtherPanes?0:n.prevPanesSize),r=100-(this.pushOtherPanes?0:n.nextPanesSize),c=Math.max(Math.min(this.getCurrentDragPercentage(e),r),i);let v=[t,t+1],y=this.panes[v[0]]||null,w=this.panes[v[1]]||null;const S=y.max<100&&c>=y.max+n.prevPanesSize,E=w.max<100&&c<=100-(w.max+this.sumNextPanesSize(t+1));if(S||E)S?(y.size=y.max,w.size=Math.max(100-y.max-n.prevPanesSize-n.nextPanesSize,0)):(y.size=Math.max(100-w.max-n.prevPanesSize-this.sumNextPanesSize(t+1),0),w.size=w.max);else{if(this.pushOtherPanes){const z=this.doPushOtherPanes(n,c);if(!z)return;({sums:n,panesToResize:v}=z),y=this.panes[v[0]]||null,w=this.panes[v[1]]||null}y!==null&&(y.size=Math.min(Math.max(c-n.prevPanesSize-n.prevReachedMinPanes,y.min),y.max)),w!==null&&(w.size=Math.min(Math.max(100-c-n.nextPanesSize-n.nextReachedMinPanes,w.min),w.max))}},doPushOtherPanes(e,t){const n=this.touch.activeSplitter,i=[n,n+1];return t<e.prevPanesSize+this.panes[i[0]].min&&(i[0]=this.findPrevExpandedPane(n).index,e.prevReachedMinPanes=0,i[0]<n&&this.panes.forEach((r,c)=>{c>i[0]&&c<=n&&(r.size=r.min,e.prevReachedMinPanes+=r.min)}),e.prevPanesSize=this.sumPrevPanesSize(i[0]),i[0]===void 0)?(e.prevReachedMinPanes=0,this.panes[0].size=this.panes[0].min,this.panes.forEach((r,c)=>{c>0&&c<=n&&(r.size=r.min,e.prevReachedMinPanes+=r.min)}),this.panes[i[1]].size=100-e.prevReachedMinPanes-this.panes[0].min-e.prevPanesSize-e.nextPanesSize,null):t>100-e.nextPanesSize-this.panes[i[1]].min&&(i[1]=this.findNextExpandedPane(n).index,e.nextReachedMinPanes=0,i[1]>n+1&&this.panes.forEach((r,c)=>{c>n&&c<i[1]&&(r.size=r.min,e.nextReachedMinPanes+=r.min)}),e.nextPanesSize=this.sumNextPanesSize(i[1]-1),i[1]===void 0)?(e.nextReachedMinPanes=0,this.panes[this.panesCount-1].size=this.panes[this.panesCount-1].min,this.panes.forEach((r,c)=>{c<this.panesCount-1&&c>=n+1&&(r.size=r.min,e.nextReachedMinPanes+=r.min)}),this.panes[i[0]].size=100-e.prevPanesSize-e.nextReachedMinPanes-this.panes[this.panesCount-1].min-e.nextPanesSize,null):{sums:e,panesToResize:i}},sumPrevPanesSize(e){return this.panes.reduce((t,n,i)=>t+(i<e?n.size:0),0)},sumNextPanesSize(e){return this.panes.reduce((t,n,i)=>t+(i>e+1?n.size:0),0)},findPrevExpandedPane(e){return[...this.panes].reverse().find(t=>t.index<e&&t.size>t.min)||{}},findNextExpandedPane(e){return this.panes.find(t=>t.index>e+1&&t.size>t.min)||{}},checkSplitpanesNodes(){Array.from(this.container.children).forEach(e=>{const t=e.classList.contains("splitpanes__pane"),n=e.classList.contains("splitpanes__splitter");if(!t&&!n)return e.parentNode.removeChild(e),void console.warn("Splitpanes: Only <pane> elements are allowed at the root of <splitpanes>. One of your DOM nodes was removed.")})},addSplitter(e,t,n=!1){const i=e-1,r=document.createElement("div");r.classList.add("splitpanes__splitter"),n||(r.onmousedown=c=>this.onMouseDown(c,i),typeof window<"u"&&"ontouchstart"in window&&(r.ontouchstart=c=>this.onMouseDown(c,i)),r.onclick=c=>this.onSplitterClick(c,i+1)),this.dblClickSplitter&&(r.ondblclick=c=>this.onSplitterDblClick(c,i+1)),t.parentNode.insertBefore(r,t)},removeSplitter(e){e.onmousedown=void 0,e.onclick=void 0,e.ondblclick=void 0,e.parentNode.removeChild(e)},redoSplitters(){const e=Array.from(this.container.children);e.forEach(n=>{n.className.includes("splitpanes__splitter")&&this.removeSplitter(n)});let t=0;e.forEach(n=>{n.className.includes("splitpanes__pane")&&(!t&&this.firstSplitter?this.addSplitter(t,n,!0):t&&this.addSplitter(t,n),t++)})},requestUpdate({target:e,...t}){const n=this.indexedPanes[e._.uid];Object.entries(t).forEach(([i,r])=>n[i]=r)},onPaneAdd(e){let t=-1;Array.from(e.$el.parentNode.children).some(r=>(r.className.includes("splitpanes__pane")&&t++,r===e.$el));const n=parseFloat(e.minSize),i=parseFloat(e.maxSize);this.panes.splice(t,0,{id:e._.uid,index:t,min:isNaN(n)?0:n,max:isNaN(i)?100:i,size:e.size===null?null:parseFloat(e.size),givenSize:e.size,update:e.update}),this.panes.forEach((r,c)=>r.index=c),this.ready&&this.$nextTick(()=>{this.redoSplitters(),this.resetPaneSizes({addedPane:this.panes[t]}),this.$emit("pane-add",{index:t,panes:this.panes.map(r=>({min:r.min,max:r.max,size:r.size}))})})},onPaneRemove(e){const t=this.panes.findIndex(i=>i.id===e._.uid),n=this.panes.splice(t,1)[0];this.panes.forEach((i,r)=>i.index=r),this.$nextTick(()=>{this.redoSplitters(),this.resetPaneSizes({removedPane:{...n,index:t}}),this.$emit("pane-remove",{removed:n,panes:this.panes.map(i=>({min:i.min,max:i.max,size:i.size}))})})},resetPaneSizes(e={}){e.addedPane||e.removedPane?this.panes.some(t=>t.givenSize!==null||t.min||t.max<100)?this.equalizeAfterAddOrRemove(e):this.equalize():this.initialPanesSizing(),this.ready&&this.$emit("resized",this.panes.map(t=>({min:t.min,max:t.max,size:t.size})))},equalize(){const e=100/this.panesCount;let t=0;const n=[],i=[];this.panes.forEach(r=>{r.size=Math.max(Math.min(e,r.max),r.min),t-=r.size,r.size>=r.max&&n.push(r.id),r.size<=r.min&&i.push(r.id)}),t>.1&&this.readjustSizes(t,n,i)},initialPanesSizing(){let e=100;const t=[],n=[];let i=0;this.panes.forEach(c=>{e-=c.size,c.size!==null&&i++,c.size>=c.max&&t.push(c.id),c.size<=c.min&&n.push(c.id)});let r=100;e>.1&&(this.panes.forEach(c=>{c.size===null&&(c.size=Math.max(Math.min(e/(this.panesCount-i),c.max),c.min)),r-=c.size}),r>.1&&this.readjustSizes(e,t,n))},equalizeAfterAddOrRemove({addedPane:e}={}){let t=100/this.panesCount,n=0;const i=[],r=[];e&&e.givenSize!==null&&(t=(100-e.givenSize)/(this.panesCount-1)),this.panes.forEach(c=>{n-=c.size,c.size>=c.max&&i.push(c.id),c.size<=c.min&&r.push(c.id)}),Math.abs(n)<.1||(this.panes.forEach(c=>{e&&e.givenSize!==null&&e.id===c.id||(c.size=Math.max(Math.min(t,c.max),c.min)),n-=c.size,c.size>=c.max&&i.push(c.id),c.size<=c.min&&r.push(c.id)}),n>.1&&this.readjustSizes(n,i,r))},readjustSizes(e,t,n){let i;i=e>0?e/(this.panesCount-t.length):e/(this.panesCount-n.length),this.panes.forEach(r=>{if(e>0&&!t.includes(r.id)){const c=Math.max(Math.min(r.size+i,r.max),r.min);e-=c-r.size,r.size=c}else if(!n.includes(r.id)){const c=Math.max(Math.min(r.size+i,r.max),r.min);e-=c-r.size,r.size=c}r.update({[this.horizontal?"height":"width"]:`${this.indexedPanes[r.id].size}%`})}),Math.abs(e)>.1&&this.$nextTick(()=>{this.ready&&console.warn("Splitpanes: Could not resize panes correctly due to their constraints.")})}},watch:{panes:{deep:!0,immediate:!1,handler(){this.updatePaneComponents()}},horizontal(){this.updatePaneComponents()},firstSplitter(){this.redoSplitters()},dblClickSplitter(e){[...this.container.querySelectorAll(".splitpanes__splitter")].forEach((t,n)=>{t.ondblclick=e?i=>this.onSplitterDblClick(i,n):void 0})}},beforeUnmount(){this.ready=!1},mounted(){this.container=this.$refs.container,this.checkSplitpanesNodes(),this.redoSplitters(),this.resetPaneSizes(),this.updatePaneComponents(),this.$emit("ready"),this.ready=!0},render(){return oo("div",{ref:"container",class:["splitpanes","splitpanes--"+(this.horizontal?"horizontal":"vertical"),{"splitpanes--dragging":this.touch.dragging}]},this.$slots.default())},__file:"src/controls/splitpanes/splitpanes.vue"},we={name:"pane",inject:["requestUpdate","onPaneAdd","onPaneRemove","onPaneClick"],props:{size:{type:[Number,String],default:10},minSize:{type:[Number,String],default:0},maxSize:{type:[Number,String],default:100}},data:()=>({style:{}}),mounted(){this.onPaneAdd(this)},beforeUnmount(){this.onPaneRemove(this)},methods:{update(e){this.style=e}},computed:{sizeNumber(){return this.size||this.size===0?parseFloat(this.size):null},minSizeNumber(){return parseFloat(this.minSize)},maxSizeNumber(){return parseFloat(this.maxSize)}},watch:{sizeNumber(e){this.requestUpdate({target:this,size:e})},minSizeNumber(e){this.requestUpdate({target:this,min:e})},maxSizeNumber(e){this.requestUpdate({target:this,max:e})}}};we.render=function(e,t,n,i,r,c){return H(),tt("div",{class:"splitpanes__pane",onClick:t[0]||(t[0]=v=>c.onPaneClick(v,e._.uid)),style:yt(e.style)},[ft(e.$slots,"default")],4)},we.__file="src/controls/splitpanes/pane.vue";var _t=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function be(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var yo={exports:{}},Rn=yo.exports=function(e){var t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function n(b,u){var d=b[0],h=b[1],l=b[2],p=b[3];h=((h+=((l=((l+=((p=((p+=((d=((d+=(h&l|~h&p)+u[0]-680876936|0)<<7|d>>>25)+h|0)&h|~d&l)+u[1]-389564586|0)<<12|p>>>20)+d|0)&d|~p&h)+u[2]+606105819|0)<<17|l>>>15)+p|0)&p|~l&d)+u[3]-1044525330|0)<<22|h>>>10)+l|0,h=((h+=((l=((l+=((p=((p+=((d=((d+=(h&l|~h&p)+u[4]-176418897|0)<<7|d>>>25)+h|0)&h|~d&l)+u[5]+1200080426|0)<<12|p>>>20)+d|0)&d|~p&h)+u[6]-1473231341|0)<<17|l>>>15)+p|0)&p|~l&d)+u[7]-45705983|0)<<22|h>>>10)+l|0,h=((h+=((l=((l+=((p=((p+=((d=((d+=(h&l|~h&p)+u[8]+1770035416|0)<<7|d>>>25)+h|0)&h|~d&l)+u[9]-1958414417|0)<<12|p>>>20)+d|0)&d|~p&h)+u[10]-42063|0)<<17|l>>>15)+p|0)&p|~l&d)+u[11]-1990404162|0)<<22|h>>>10)+l|0,h=((h+=((l=((l+=((p=((p+=((d=((d+=(h&l|~h&p)+u[12]+1804603682|0)<<7|d>>>25)+h|0)&h|~d&l)+u[13]-40341101|0)<<12|p>>>20)+d|0)&d|~p&h)+u[14]-1502002290|0)<<17|l>>>15)+p|0)&p|~l&d)+u[15]+1236535329|0)<<22|h>>>10)+l|0,h=((h+=((l=((l+=((p=((p+=((d=((d+=(h&p|l&~p)+u[1]-165796510|0)<<5|d>>>27)+h|0)&l|h&~l)+u[6]-1069501632|0)<<9|p>>>23)+d|0)&h|d&~h)+u[11]+643717713|0)<<14|l>>>18)+p|0)&d|p&~d)+u[0]-373897302|0)<<20|h>>>12)+l|0,h=((h+=((l=((l+=((p=((p+=((d=((d+=(h&p|l&~p)+u[5]-701558691|0)<<5|d>>>27)+h|0)&l|h&~l)+u[10]+38016083|0)<<9|p>>>23)+d|0)&h|d&~h)+u[15]-660478335|0)<<14|l>>>18)+p|0)&d|p&~d)+u[4]-405537848|0)<<20|h>>>12)+l|0,h=((h+=((l=((l+=((p=((p+=((d=((d+=(h&p|l&~p)+u[9]+568446438|0)<<5|d>>>27)+h|0)&l|h&~l)+u[14]-1019803690|0)<<9|p>>>23)+d|0)&h|d&~h)+u[3]-187363961|0)<<14|l>>>18)+p|0)&d|p&~d)+u[8]+1163531501|0)<<20|h>>>12)+l|0,h=((h+=((l=((l+=((p=((p+=((d=((d+=(h&p|l&~p)+u[13]-1444681467|0)<<5|d>>>27)+h|0)&l|h&~l)+u[2]-51403784|0)<<9|p>>>23)+d|0)&h|d&~h)+u[7]+1735328473|0)<<14|l>>>18)+p|0)&d|p&~d)+u[12]-1926607734|0)<<20|h>>>12)+l|0,h=((h+=((l=((l+=((p=((p+=((d=((d+=(h^l^p)+u[5]-378558|0)<<4|d>>>28)+h|0)^h^l)+u[8]-2022574463|0)<<11|p>>>21)+d|0)^d^h)+u[11]+1839030562|0)<<16|l>>>16)+p|0)^p^d)+u[14]-35309556|0)<<23|h>>>9)+l|0,h=((h+=((l=((l+=((p=((p+=((d=((d+=(h^l^p)+u[1]-1530992060|0)<<4|d>>>28)+h|0)^h^l)+u[4]+1272893353|0)<<11|p>>>21)+d|0)^d^h)+u[7]-155497632|0)<<16|l>>>16)+p|0)^p^d)+u[10]-1094730640|0)<<23|h>>>9)+l|0,h=((h+=((l=((l+=((p=((p+=((d=((d+=(h^l^p)+u[13]+681279174|0)<<4|d>>>28)+h|0)^h^l)+u[0]-358537222|0)<<11|p>>>21)+d|0)^d^h)+u[3]-722521979|0)<<16|l>>>16)+p|0)^p^d)+u[6]+76029189|0)<<23|h>>>9)+l|0,h=((h+=((l=((l+=((p=((p+=((d=((d+=(h^l^p)+u[9]-640364487|0)<<4|d>>>28)+h|0)^h^l)+u[12]-421815835|0)<<11|p>>>21)+d|0)^d^h)+u[15]+530742520|0)<<16|l>>>16)+p|0)^p^d)+u[2]-995338651|0)<<23|h>>>9)+l|0,h=((h+=((p=((p+=(h^((d=((d+=(l^(h|~p))+u[0]-198630844|0)<<6|d>>>26)+h|0)|~l))+u[7]+1126891415|0)<<10|p>>>22)+d|0)^((l=((l+=(d^(p|~h))+u[14]-1416354905|0)<<15|l>>>17)+p|0)|~d))+u[5]-57434055|0)<<21|h>>>11)+l|0,h=((h+=((p=((p+=(h^((d=((d+=(l^(h|~p))+u[12]+1700485571|0)<<6|d>>>26)+h|0)|~l))+u[3]-1894986606|0)<<10|p>>>22)+d|0)^((l=((l+=(d^(p|~h))+u[10]-1051523|0)<<15|l>>>17)+p|0)|~d))+u[1]-2054922799|0)<<21|h>>>11)+l|0,h=((h+=((p=((p+=(h^((d=((d+=(l^(h|~p))+u[8]+1873313359|0)<<6|d>>>26)+h|0)|~l))+u[15]-30611744|0)<<10|p>>>22)+d|0)^((l=((l+=(d^(p|~h))+u[6]-1560198380|0)<<15|l>>>17)+p|0)|~d))+u[13]+1309151649|0)<<21|h>>>11)+l|0,h=((h+=((p=((p+=(h^((d=((d+=(l^(h|~p))+u[4]-145523070|0)<<6|d>>>26)+h|0)|~l))+u[11]-1120210379|0)<<10|p>>>22)+d|0)^((l=((l+=(d^(p|~h))+u[2]+718787259|0)<<15|l>>>17)+p|0)|~d))+u[9]-343485551|0)<<21|h>>>11)+l|0,b[0]=d+b[0]|0,b[1]=h+b[1]|0,b[2]=l+b[2]|0,b[3]=p+b[3]|0}function i(b){var u,d=[];for(u=0;u<64;u+=4)d[u>>2]=b.charCodeAt(u)+(b.charCodeAt(u+1)<<8)+(b.charCodeAt(u+2)<<16)+(b.charCodeAt(u+3)<<24);return d}function r(b){var u,d=[];for(u=0;u<64;u+=4)d[u>>2]=b[u]+(b[u+1]<<8)+(b[u+2]<<16)+(b[u+3]<<24);return d}function c(b){var u,d,h,l,p,B,R=b.length,A=[1732584193,-271733879,-1732584194,271733878];for(u=64;u<=R;u+=64)n(A,i(b.substring(u-64,u)));for(d=(b=b.substring(u-64)).length,h=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],u=0;u<d;u+=1)h[u>>2]|=b.charCodeAt(u)<<(u%4<<3);if(h[u>>2]|=128<<(u%4<<3),u>55)for(n(A,h),u=0;u<16;u+=1)h[u]=0;return l=(l=8*R).toString(16).match(/(.*?)(.{0,8})$/),p=parseInt(l[2],16),B=parseInt(l[1],16)||0,h[14]=p,h[15]=B,n(A,h),A}function v(b){var u,d,h,l,p,B,R=b.length,A=[1732584193,-271733879,-1732584194,271733878];for(u=64;u<=R;u+=64)n(A,r(b.subarray(u-64,u)));for(d=(b=u-64<R?b.subarray(u-64):new Uint8Array(0)).length,h=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],u=0;u<d;u+=1)h[u>>2]|=b[u]<<(u%4<<3);if(h[u>>2]|=128<<(u%4<<3),u>55)for(n(A,h),u=0;u<16;u+=1)h[u]=0;return l=(l=8*R).toString(16).match(/(.*?)(.{0,8})$/),p=parseInt(l[2],16),B=parseInt(l[1],16)||0,h[14]=p,h[15]=B,n(A,h),A}function y(b){var u,d="";for(u=0;u<4;u+=1)d+=t[b>>8*u+4&15]+t[b>>8*u&15];return d}function w(b){var u;for(u=0;u<b.length;u+=1)b[u]=y(b[u]);return b.join("")}function S(b){return/[\u0080-\uFFFF]/.test(b)&&(b=unescape(encodeURIComponent(b))),b}function E(b,u){var d,h=b.length,l=new ArrayBuffer(h),p=new Uint8Array(l);for(d=0;d<h;d+=1)p[d]=b.charCodeAt(d);return u?p:l}function z(b){return String.fromCharCode.apply(null,new Uint8Array(b))}function L(b,u,d){var h=new Uint8Array(b.byteLength+u.byteLength);return h.set(new Uint8Array(b)),h.set(new Uint8Array(u),b.byteLength),d?h:h.buffer}function D(b){var u,d=[],h=b.length;for(u=0;u<h-1;u+=2)d.push(parseInt(b.substr(u,2),16));return String.fromCharCode.apply(String,d)}function P(){this.reset()}return w(c("hello")),typeof ArrayBuffer>"u"||ArrayBuffer.prototype.slice||function(){function b(u,d){return(u=0|u||0)<0?Math.max(u+d,0):Math.min(u,d)}ArrayBuffer.prototype.slice=function(u,d){var h,l,p,B,R=this.byteLength,A=b(u,R),U=R;return d!==e&&(U=b(d,R)),A>U?new ArrayBuffer(0):(h=U-A,l=new ArrayBuffer(h),p=new Uint8Array(l),B=new Uint8Array(this,A,h),p.set(B),l)}}(),P.prototype.append=function(b){return this.appendBinary(S(b)),this},P.prototype.appendBinary=function(b){this._buff+=b,this._length+=b.length;var u,d=this._buff.length;for(u=64;u<=d;u+=64)n(this._hash,i(this._buff.substring(u-64,u)));return this._buff=this._buff.substring(u-64),this},P.prototype.end=function(b){var u,d,h=this._buff,l=h.length,p=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(u=0;u<l;u+=1)p[u>>2]|=h.charCodeAt(u)<<(u%4<<3);return this._finish(p,l),d=w(this._hash),b&&(d=D(d)),this.reset(),d},P.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},P.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},P.prototype.setState=function(b){return this._buff=b.buff,this._length=b.length,this._hash=b.hash,this},P.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},P.prototype._finish=function(b,u){var d,h,l,p=u;if(b[p>>2]|=128<<(p%4<<3),p>55)for(n(this._hash,b),p=0;p<16;p+=1)b[p]=0;d=(d=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),h=parseInt(d[2],16),l=parseInt(d[1],16)||0,b[14]=h,b[15]=l,n(this._hash,b)},P.hash=function(b,u){return P.hashBinary(S(b),u)},P.hashBinary=function(b,u){var d=w(c(b));return u?D(d):d},P.ArrayBuffer=function(){this.reset()},P.ArrayBuffer.prototype.append=function(b){var u,d=L(this._buff.buffer,b,!0),h=d.length;for(this._length+=b.byteLength,u=64;u<=h;u+=64)n(this._hash,r(d.subarray(u-64,u)));return this._buff=u-64<h?new Uint8Array(d.buffer.slice(u-64)):new Uint8Array(0),this},P.ArrayBuffer.prototype.end=function(b){var u,d,h=this._buff,l=h.length,p=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(u=0;u<l;u+=1)p[u>>2]|=h[u]<<(u%4<<3);return this._finish(p,l),d=w(this._hash),b&&(d=D(d)),this.reset(),d},P.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},P.ArrayBuffer.prototype.getState=function(){var b=P.prototype.getState.call(this);return b.buff=z(b.buff),b},P.ArrayBuffer.prototype.setState=function(b){return b.buff=E(b.buff,!0),P.prototype.setState.call(this,b)},P.ArrayBuffer.prototype.destroy=P.prototype.destroy,P.ArrayBuffer.prototype._finish=P.prototype._finish,P.ArrayBuffer.hash=function(b,u){var d=w(v(new Uint8Array(b)));return u?D(d):d},P}();const Se=[];class lt{static addHandler(t,n,i){t.addEventListener?t.addEventListener(n,i,!1):t.attachEvent?t.attachEvent("on"+n,i):t["on"+n]=i}static windowResizeHandler(t){lt.addHandler(window,"resize",t)}static fullscreenEnabled(){const t=window.document;return document.fullscreenEnabled||window.fullScreen||t.mozFullscreenEnabled||t.webkitIsFullScreen}static fullScreen(t,n){if(n){const i=window.document;let r=window.document.exitFullscreen||i.msExitFullscreen||i.mozCancelFullScreen||i.webkitCancelFullScreen;if(r!==void 0&&r)r.call(window.document);else if(window.ActiveXObject!==void 0){let c=new window.ActiveXObject("WScript.Shell");c!=null&&c.SendKeys("{F11}")}}else{let i=t;i||(i=window.document.documentElement);let r=i.requestFullScreen||i.webkitRequestFullScreen||i.mozRequestFullScreen||i.msRequestFullScreen;if(r!==void 0&&r)r.call(i);else if(window.ActiveXObject!==void 0){let c=new window.ActiveXObject("WScript.Shell");c!=null&&c.SendKeys("{F11}")}}}static requestFullScreen(t=window.document.documentElement){let n=t;var i=n.requestFullScreen||n.webkitRequestFullScreen||n.mozRequestFullScreen||n.msRequestFullScreen;if(i)i.call(n);else if(window.ActiveXObject!==void 0){var r=new window.ActiveXObject("WScript.Shell");r!==null&&r.SendKeys("{F11}")}}static exitFullScreen(){const t=window.document;var n=document.exitFullscreen||t.mozCancelFullScreen||t.webkitExitFullscreen||t.webkitExitFullscreen;if(n)n.call(document);else if(window.ActiveXObject!==void 0){var i=new window.ActiveXObject("WScript.Shell");i!==null&&i.SendKeys("{F11}")}}static fullScreenElement(){return window.document.fullscreenElement||window.document.webkitFullscreenElement||window.document.mozFullscreenElement||window.document.msFullscreenElement}static isFullScreen(){return!!lt.fullScreenElement()}static onFullScreenChanged(t){let n;"onfullscreenchange"in window.document?n="fullscreenchange":"onwebkitfullscreenchange"in window.document?n="webkitfullscreenchange":"onmozfullscreenchange"in window.document&&(n="mozfullscreenchange"),n?document.addEventListener(n,function(){const i=lt.isFullScreen();t(i)}):document.addEventListener("MSFullscreenChange",function(){const i=lt.isFullScreen();t(i)})}static stringifyCircularHandler(t,n){if(typeof n=="object"&&n!==null){if(Se.indexOf(n)!==-1)return;Se.push(n)}return n}static jsonStringify(t){if(!t)return"";const n=JSON.stringify(t,lt.stringifyCircularHandler);return Se.length=0,n}static jsonParse(t){const n=lt.jsonStringify(t);if(n.length>1)return JSON.parse(n)}static getObjectURL(t){let n;const i=window;return i.createObjcectURL!=null?n=i.createOjcectURL(t):window.URL!=null?n=window.URL.createObjectURL(t):window.webkitURL!=null&&(n=window.webkitURL.createObjectURL(t)),n}static getFileShortMD5(t,n){const i=File.prototype,r=i.slice||i.mozSlice||i.webkitSlice,c=t,v=new Rn.ArrayBuffer,y=new FileReader;y.onload=function(w){v.append(w.target?.result);const S=v.end();n({isOK:!0,data:S})},y.onerror=function(){const w="\u8BA1\u7B97\u6587\u4EF6\u7B80\u5355\u6458\u8981\u9519\u8BEF\uFF01";console.warn(w),n({isOK:!1,data:w})},function(){const w=2097152>=c.size?c.size:2097152;y.readAsArrayBuffer(r.call(c,0,w))}()}static MD5(t,n=!1){return Rn.hash(t,n)}static copyText=t=>new Promise((n,i)=>{const r=document.createElement("input");r.value=t,document.body.appendChild(r),r.select(),document.execCommand("copy"),r.remove(),n(!0)})}class Ft{static isNullOrEmpty=t=>t===null||t===""||t===void 0||t.length===0;static isNotEmpty=t=>t!==null&&t!==""&&t!==void 0&&t.length!==0;static toHump(t){return t.replace(/[\-\/\_](\w)/g,(n,i)=>i.toUpperCase()).replace("views","")}}class Ht{prefixKey;storage;constructor(t="",n=localStorage){this.prefixKey=t,this.storage=n}getKey(t){return`${this.prefixKey}${t}`.toUpperCase()}set(t,n,i=604800){const r=JSON.stringify({value:n,expire:i!==null?new Date().getTime()+1e3*i:null});this.storage.setItem(this.getKey(t),r)}get(t,n=null){const i=this.storage.getItem(this.getKey(t));if(i)try{const r=JSON.parse(i),{value:c,expire:v}=r;if(v===null||v>=Date.now())return c;this.remove(this.getKey(t))}catch{return n}return n}remove(t){this.storage.removeItem(this.getKey(t))}clear(){this.storage.clear()}setCookie(t,n,i=604800){document.cookie=`${this.getKey(t)}=${n}; Max-Age=${i}`}getCookie(t){const n=document.cookie.split("; ");for(let i=0,r=n.length;i<r;i++){const c=n[i].split("=");if(c[0]===this.getKey(t))return c[1]}return""}removeCookie(t){this.setCookie(t,1,-1)}clearCookie(){const t=document.cookie.match(/[^ =;]+(?==)/g);if(t)for(let n=t.length;n--;)document.cookie=t[n]+"=0;expire="+new Date(0).toUTCString()}}const wo=new Ht("",localStorage);function qt(){let e=[];const t="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";for(var n=0;n<36;n++)e[n]=t.substr(Math.floor(16*Math.random()),1);return e[14]="4",e[19]=t.substr(3&Number(e[19])|8,1),e[8]=e[13]=e[18]=e[23]="-",e.join("")}function bo(){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)})}function So(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)}function Co(e){var t=e.toLowerCase();if(Gt(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}function xo(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}var St,Rt;function Eo(e){if(typeof e=="object"||!e)return;const t=e.toLowerCase().substr(0,1);return t==="#"?St.Hex:t==="r"||t==="("?St.RGBA:t==="h"?St.Hsla:St.RGBA}function ko(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,v=parseFloat(t[2])/(/%$/.test(t[2])?100:1),y=parseFloat(t[3])/(/%$/.test(t[3])?100:1);if(v===0)n=i=r=y;else{var w=y<=.5?y*(v+1):y+v-y*v,S=2*y-w;n=Ce(S,w,c+1/3),i=Ce(S,w,c),r=Ce(S,w,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})`}}}function Ce(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Gt(e){return/^#([0-9a-fA-F]{3}|[0-9a-fA-f]{6})$/.test(e)}function zo(e,t,n){const i=(e<<16|t<<8|n).toString(16);return"#"+new Array(Math.abs(i.length-7)).join("0")+i}function xe(e){let t=e.toLowerCase();if(Gt(e)){if(t.length===4){let i="#";for(let r=1;r<4;r+=1)i+=t.slice(r,r+1).concat(t.slice(r,r+1));t=i}const n=[];for(let i=1;i<7;i+=2)n.push(parseInt("0x"+t.slice(i,i+2)));return"RGB("+n.join(",")+")"}return t}function Mo(e){if(!Gt(e))return;const[t,n,i]=xe(e).replace(/(?:\(|\)|rgb|RGB)*/g,"").split(",").map(r=>Number(r));return .299*t+.578*n+.114*i<192}function _o(e,t){return e=e.indexOf("#")>=0?e.substring(1,e.length):e,t=Math.trunc(255*t/100),`#${ke(e.substring(0,2),t)}${ke(e.substring(2,4),t)}${ke(e.substring(4,6),t)}`}function Ro(e,t){return e=e.indexOf("#")>=0?e.substring(1,e.length):e,t=Math.trunc(255*t/100),`#${Ee(e.substring(0,2),t)}${Ee(e.substring(2,4),t)}${Ee(e.substring(4,6),t)}`}function Ee(e,t){const n=parseInt(e,16)+t,i=n>255?255:n;return i.toString(16).length>1?i.toString(16):`0${i.toString(16)}`}function In(e,t,n){const i=[e,t,n].map(r=>(r/=255)<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4));return .2126*i[0]+.7152*i[1]+.0722*i[2]}function Io(e){const t=xe(e.substring(1));var n,i;return n=t.split(","),i=[0,0,0],(In(~~n[0],~~n[1],~~n[2])+.05)/(In(i[0],i[1],i[2])+.05)>=12?"#000000":"#FFFFFF"}function ke(e,t){const n=parseInt(e,16)-t,i=n<0?0:n;return i.toString(16).length>1?i.toString(16):`0${i.toString(16)}`}function ze(e){return{all:e=e||new Map,on(t,n){const i=e?.get(t);i&&i.push(n)||e?.set(t,[n])},off(t,n){const i=e?.get(t);i&&i.splice(i.indexOf(n)>>>0,1)},emit(t,n){(e?.get(t)||[]).slice().map(i=>{i(n)}),(e?.get("*")||[]).slice().map(i=>{i(t,n)})}}}(Rt=St||(St={}))[Rt.RGBA=0]="RGBA",Rt[Rt.Hex=1]="Hex",Rt[Rt.Hsla=2]="Hsla";const It=ze(),X={HproseServiceErrorEvent:"HproseServiceError",WebAPIErrorEvent:"WebAPIError",AlertInfoEvent:"AlertInfoEvent",CommonWarnEvent:"CommonWarnEvent",WidgetLoadedEvent:"WidgetLoaded",WidgetUnLoadedEvent:"WidgetUnLoaded",WidgetVisibleChanged:"WidgetVisibleChanged",AxiosRequestErrorEvent:"AxiosRequestErrorEvent"},Xt=(e,t)=>{const n=document.createElement("a");n.download=t,n.style.display="none";const i=new Blob([e],{type:"application/octet-stream"});n.href=URL.createObjectURL(i),document.body.appendChild(n),n.click(),document.body.removeChild(n)};function Lo(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)}const Ln=(e,t)=>{const n=JSON.stringify(e,null,2);t?Xt(n,t+".json"):It.emit(X.CommonWarnEvent,"\u53C2\u6570JsonID\u4E0D\u80FD\u4E3A\u7A7A\uFF01")},Po=(e,t,n)=>{e.get(t).then(function(i){Xt(i.data,n)}).catch(i=>{console.warn(i),It.emit(X.CommonWarnEvent,"\u4E0B\u8F7D\u6587\u4EF6\u62A5\u9519\uFF01")})};function Pn(e){const t=e.lastIndexOf("/")+1;let n=e.substring(t);return n=decodeURI(n.split("?")[0]),n}function Bo({url:e,target:t="_blank",fileName:n}){const i=new URL(e).host==location.host;return new Promise((r,c)=>{if(i){const v=document.createElement("a");if(v.href=e,v.target=t,v.download!==void 0&&(v.download=n||Pn(e)),document.createEvent){const y=document.createEvent("MouseEvents");return y.initEvent("click",!0,!0),v.dispatchEvent(y),r(!0)}return e.indexOf("?")===-1&&(e+="?download"),window.open(e,t),r(!0)}{const v=document.createElement("canvas"),y=document.createElement("img");y.setAttribute("crossOrigin","Anonymous"),y.src=e,y.onload=w=>{v.width=y.width,v.height=y.height,v.getContext("2d").drawImage(y,0,0,y.width,y.height),v.toBlob(S=>{if(S){const E=document.createElement("a");E.href=window.URL.createObjectURL(S),E.download=Pn(e),E.click(),URL.revokeObjectURL(E.href),r(!0)}},"image/jpeg")},y.onerror=w=>c(w)}})}function Ao(e){for(var t=new Date().getTime();new Date().getTime()-t<e;);console.log(`\u5F3A\u5236\u7B49\u5F85${e}\u6BEB\u79D2`)}class Ut{hproseURL;client;hproseProxy;static httpTransport;constructor(t){if(t&&!Ft.isNullOrEmpty(t)){if(Ut.httpTransport||(Ut.httpTransport=new mo),this.client=new po(t),!this.client)throw Error("Hprose Client\u521D\u59CB\u5316\u9519\u8BEF");this.hproseURL=t,this.init()}}init(){this.client&&this.client.useServiceAsync().then(t=>{this.hproseProxy=t}).catch(t=>{String(t).indexOf("find this method ~")>0?(this.hproseProxy=this.client?.useService(),console.warn("\u65E7\u7248\u672C\u4E0D\u652F\u6301useServiceAsync")):It.emit(X.HproseServiceErrorEvent,"\u521D\u59CB\u5316\u9ED8\u8BA4Hprose!"),console.warn(t)})}async getProxy(){if(!this.hproseProxy)try{this.client&&(this.hproseProxy=await this.client.useServiceAsync())}catch(t){console.warn(t),this.hproseProxy=this.client?.useService()}return this.hproseProxy}async invoke(t,n,i){if(this.client)return await this.client.invoke(t,n,i)}encode(t,n,i){return this.client?this.client.codec.encode(t,n,i):void 0}decode(t,n){return this.client?this.client.codec.decode(t,n):void 0}}const mt=new Ht("user",localStorage);function Ct(){return mt.get("access_token")}function Me(){mt.remove("access_token"),I.User&&delete I.User}function Bn(){return Ct()?.refresh}class At{hproseClient;hpProxyObj;defaultContext=new ye;constructor(t){this.hproseClient=new Ut(t),this.hpProxyObj=null}getClientContext(t,n){const i={};n&&(i.requestHeaders=n);const r=Ct();i.httpRequestHeaders=t||{};const c=i.httpRequestHeaders;return r&&(c.token=r.token),new ye(i)}async getHproseProxy(){if(!this.hproseClient)throw new Error("HproseClient\u5BF9\u8C61\u4E3A\u6784\u5EFA\uFF0C\u65E0\u6CD5\u8C03\u7528Hprose\u65B9\u6CD5");if(!this.hpProxyObj){const t=await this.hproseClient.getProxy();this.hpProxyObj=t}return this.hpProxyObj||It.emit(X.HproseServiceErrorEvent,"HproseProxy\u5BF9\u8C61\u4E3A\u7A7A\uFF0C\u65E0\u6CD5\u8C03\u7528Hprose\u65B9\u6CD5\uFF01"),this.hpProxyObj}async hproseInvoke(t,n,i){if(!this.hproseClient)throw new Error("HproseClient\u5BF9\u8C61\u4E3A\u6784\u5EFA\uFF0C\u65E0\u6CD5\u8C03\u7528Hprose\u65B9\u6CD5");return await this.hproseClient.invoke(t,n,i)}async hproseInvokeContext(t,n,...i){if(!this.hproseClient)throw new Error("HproseClient\u5BF9\u8C61\u4E3A\u6784\u5EFA\uFF0C\u65E0\u6CD5\u8C03\u7528Hprose\u65B9\u6CD5");const r=Ct();return console.log(r,"userToken3"),r&&(n||(n=new ye({httpRequestHeaders:{token:r.token}}))),await this.hproseClient.invoke(t,i,n)}async hproseInvokeEncode(t){const n=new _n(t).toBytes(),i=await this.hproseClient.client?.request(n,this.defaultContext);return i&&this.hproseClient.client?.codec.decode(i,this.defaultContext)}encodeRequest(t,...n){const i=this.hproseClient.client?.codec?.encode(t,n,this.defaultContext);return _n.toString(i)}}class To{message;eventBus;constructor(t,n){t&&(this.message=t),n&&(this.eventBus=n)}msg(t,n=3,i="success"){if(this.message)if(typeof this.message=="function")this.message({type:i,message:t,duration:n});else switch(i){case"info":this.message.info(t,n);break;case"success":this.message.success(t,n);break;case"warning":this.message.warn(t,n);break;case"error":this.message.error(t,n)}else{switch(i){case"info":case"success":console.log(t);break;case"warning":console.warn(t);break;case"error":i="dark",console.error(t)}this.eventBus&&this.eventBus.emit(X.AlertInfoEvent,{type:i,info:t})}}info(t,n=3){this.msg(t,n,"info")}warn(t,n=3){this.msg(t,n,"warning")}err(t,n=3){this.msg(t,n,"error")}}const _e=new Map,I={Config:SysConfig,EventBus:It,DefaultProxyClient:null,Axios:go};function Do(e){An(e.message,e.defaultHproseURL),e.config&&(I.Config=e.config)}const An=function(e,t){t?I.Config.DefaultHproseAPI=t:!I.Config.DefaultHproseAPI&&I.Config.ServiceURL&&(I.Config.DefaultHproseAPI=I.Config.ServiceURL.DefaultHproseAPI),I.Config.DefaultHproseAPI&&Ft.isNotEmpty(I.Config.DefaultHproseAPI)&&(I.DefaultProxyClient=new At(I.Config.DefaultHproseAPI));const n=new To(e,I.EventBus);I.Message=n,I.EventBus.on(X.HproseServiceErrorEvent,i=>{const r=`\u5F53\u524D\u540E\u53F0\u4E1A\u52A1\u670D\u52A1\u4E0D\u53EF\u7528!${i}`;n.warn(r)}),I.EventBus.on(X.WebAPIErrorEvent,i=>{const r=`WebAPI\u540E\u53F0\u670D\u52A1\u4E0D\u53EF\u7528!${i}`;n.warn(r)}),I.EventBus.on(X.CommonWarnEvent,i=>{n.warn(i)})};function Tn(e){if(e&&Ft.isNotEmpty(e)){if(_e.has(e))return _e.get(e);{const t=new At(e);return _e.set(e,t),t}}}function No(e){const t=Tn(e);return t&&(I.DefaultProxyClient=t),t}function Re(e,t,n,i="json",r){const c={baseURL:I.Config.ServiceURL.DefaultWebAPI,timeout:6e4,params:e,headers:{"Content-Type":"application/json",Authorization:"bearer "+Ct()?.token},responseType:i,cancelToken:r};if(n)for(let v in n)c.headers[v]=n[v];return t&&(c.baseURL=t),c}function rt(e,t,n,i,r="json",c,v){const y=Re(n,t,i,r,c);return v&&v>=2e4&&(y.timeout=v),I.Axios?.get(e,y).catch(function(w){console.error(w);const S=`http\u8BF7\u6C42\u9519\u8BEF\uFF1A${t}${e}`;I.EventBus.emit(X.AxiosRequestErrorEvent,S)})}function Ie(e,t,n,i,r,c="json",v){const y=Re(i,t,r,c);v&&v>=2e4&&(y.timeout=v);const w=function(S){let E=new FormData;return S&&Object.keys(S).forEach(z=>{if(!S)return;let L=S[z];var D;L!=null&&E.append(z,(D=L)instanceof Blob?D:D.toString())}),E}(n);return I.Axios?.post(e,w,y).catch(function(S){console.error(S);const E=`post\u8BF7\u6C42\u9519\u8BEF\uFF1A${t}${e}`;I.EventBus.emit(X.AxiosRequestErrorEvent,E)})}function Uo(e,t,n,i,r,c="json",v){const y=Re(i,t,r,c);return v&&v>=2e4&&(y.timeout=v),I.Axios?.post(e,n,y).catch(function(w){console.error(w);const S=`post\u8BF7\u6C42\u9519\u8BEF\uFF1A${t}${e}`;I.EventBus.emit(X.AxiosRequestErrorEvent,S)})}function Oo(e,t){return rt(e,void 0,t)}function jo(e,t){return Ie(e,void 0,t)}function Wo(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(X.AxiosRequestErrorEvent,i)})}var Le={exports:{}},$o=typeof window<"u"?window:_t!==void 0?_t:typeof self<"u"?self:{},Fo=function(e){if(!e)return!1;var t=Ho.call(e);return t==="[object Function]"||typeof e=="function"&&t!=="[object RegExp]"||typeof window<"u"&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)},Ho=Object.prototype.toString,Pe=function(e){return e.replace(/^\s+|\s+$/g,"")},qo=function(){for(var e={},t=0;t<arguments.length;t++){var n=arguments[t];for(var i in n)Go.call(n,i)&&(e[i]=n[i])}return e},Go=Object.prototype.hasOwnProperty,Dn=$o,Xo=Fo,Vo=function(e){if(!e)return{};for(var t,n={},i=Pe(e).split(`
2
+ `),r=0;r<i.length;r++){var c=i[r],v=c.indexOf(":"),y=Pe(c.slice(0,v)).toLowerCase(),w=Pe(c.slice(v+1));n[y]===void 0?n[y]=w:(t=n[y],Object.prototype.toString.call(t)==="[object Array]"?n[y].push(w):n[y]=[n[y],w])}return n},Ko=qo;function Nn(e,t,n){var i=e;return Xo(t)?(n=t,typeof e=="string"&&(i={uri:e})):i=Ko(t,{uri:e}),i.callback=n,i}function ut(e,t,n){return Un(t=Nn(e,t,n))}function Un(e){if(e.callback===void 0)throw new Error("callback argument missing");var t=!1,n=function(d,h,l){t||(t=!0,e.callback(d,h,l))};function i(){var d=void 0;if(d=w.response?w.response:w.responseText||function(h){try{if(h.responseType==="document")return h.responseXML;var l=h.responseXML&&h.responseXML.documentElement.nodeName==="parsererror";if(h.responseType===""&&!l)return h.responseXML}catch{}return null}(w),b)try{d=JSON.parse(d)}catch{}return d}function r(d){return clearTimeout(S),d instanceof Error||(d=new Error(""+(d||"Unknown XMLHttpRequest Error"))),d.statusCode=0,n(d,u)}function c(){if(!y){var d;clearTimeout(S),d=e.useXDR&&w.status===void 0?200:w.status===1223?204:w.status;var h=u,l=null;return d!==0?(h={body:i(),statusCode:d,method:z,headers:{},url:E,rawRequest:w},w.getAllResponseHeaders&&(h.headers=Vo(w.getAllResponseHeaders()))):l=new Error("Internal XMLHttpRequest Error"),n(l,h,h.body)}}var v,y,w=e.xhr||null;w||(w=e.cors||e.useXDR?new ut.XDomainRequest:new ut.XMLHttpRequest);var S,E=w.url=e.uri||e.url,z=w.method=e.method||"GET",L=e.body||e.data,D=w.headers=e.headers||{},P=!!e.sync,b=!1,u={body:void 0,headers:{},statusCode:0,method:z,url:E,rawRequest:w};if("json"in e&&e.json!==!1&&(b=!0,D.accept||D.Accept||(D.Accept="application/json"),z!=="GET"&&z!=="HEAD"&&(D["content-type"]||D["Content-Type"]||(D["Content-Type"]="application/json"),L=JSON.stringify(e.json===!0?L:e.json))),w.onreadystatechange=function(){w.readyState===4&&setTimeout(c,0)},w.onload=c,w.onerror=r,w.onprogress=function(){},w.onabort=function(){y=!0},w.ontimeout=r,w.open(z,E,!P,e.username,e.password),P||(w.withCredentials=!!e.withCredentials),!P&&e.timeout>0&&(S=setTimeout(function(){if(!y){y=!0,w.abort("timeout");var d=new Error("XMLHttpRequest timeout");d.code="ETIMEDOUT",r(d)}},e.timeout)),w.setRequestHeader)for(v in D)D.hasOwnProperty(v)&&w.setRequestHeader(v,D[v]);else if(e.headers&&!function(d){for(var h in d)if(d.hasOwnProperty(h))return!1;return!0}(e.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in e&&(w.responseType=e.responseType),"beforeSend"in e&&typeof e.beforeSend=="function"&&e.beforeSend(w),w.send(L||null),w}Le.exports=ut,Le.exports.default=ut,ut.XMLHttpRequest=Dn.XMLHttpRequest||function(){},ut.XDomainRequest="withCredentials"in new ut.XMLHttpRequest?ut.XMLHttpRequest:Dn.XDomainRequest,function(e,t){for(var n=0;n<e.length;n++)t(e[n])}(["get","put","post","patch","head","delete"],function(e){ut[e==="delete"?"del":e]=function(t,n,i){return(n=Nn(t,n,i)).method=e.toUpperCase(),Un(n)}});var Yo=Le.exports;const Jo=[200,201,202,204,308],Zo=[408,502,503,504];class Qo{endpoint;file;headers;method;chunkSize;attempts;delayBeforeAttempt;md5;chunk;chunkCount;chunkByteSize;maxFileBytes;endpointValue;totalChunks;attemptCount;offline;paused;success;currentXhr;reader;eventTarget;fileName;constructor(t){this.endpoint=t.endpoint,this.file=t.file,this.fileName=encodeURI(this.file.name),this.headers=t.headers||{},this.method=t.method||"PUT",this.chunkSize=t.chunkSize||5120,this.attempts=t.attempts||5,this.delayBeforeAttempt=t.delayBeforeAttempt||1,this.md5=t.md5||"",this.maxFileBytes=1024*(t.maxFileSize||0),this.chunkCount=0,this.chunkByteSize=1024*this.chunkSize,this.totalChunks=Math.ceil(this.file.size/this.chunkByteSize),this.attemptCount=0,this.offline=!1,this.paused=!1,this.success=!1,this.reader=new FileReader,this.eventTarget=ze(),this.validateOptions(),this.getEndpoint().then(()=>this.sendChunks()),typeof window<"u"&&(window.addEventListener("online",()=>{this.offline&&(this.offline=!1,this.dispatch("online"),this.sendChunks())}),window.addEventListener("offline",()=>{this.offline=!0,this.dispatch("offline")}))}on(t,n){this.eventTarget.on(t,n)}abort(){this.pause(),this.currentXhr?.abort()}pause(){this.paused=!0}resume(){this.paused&&(this.paused=!1,this.sendChunks())}dispatch(t,n){this.eventTarget.emit(t,n)}validateOptions(){if(!this.endpoint||typeof this.endpoint!="function"&&typeof this.endpoint!="string")throw new TypeError("endpoint\u5FC5\u987B\u4E3A\uFF1A\u6587\u4EF6\u4E0A\u4F20URL\u5B57\u7B26\u4E32\uFF0C\u6216\u8FD4\u56DE\u5730\u5740\u7684\u51FD\u6570\uFF01");if(!(this.file instanceof File))throw new TypeError("file\u5FC5\u987B\u4E3A\u6587\u4EF6\u5BF9\u8C61");if(this.headers&&typeof this.headers!="object")throw new TypeError("\u6587\u4EF6\u5934\u5FC5\u987B\u4E3A\u5BF9\u8C61\u6216\u7A7A\uFF01");if(this.chunkSize&&(typeof this.chunkSize!="number"||this.chunkSize<=0||this.chunkSize%256!=0))throw new TypeError("chunkSize\u5FC5\u987B\u5927\u4E8E0,\u5E76\u662F256\u7684\u6574\u6570\u500D");if(this.maxFileBytes>0&&this.maxFileBytes<this.file.size)throw new Error(`\u6587\u4EF6\u5927\u5C0F\u8D85\u8FC7\u6700\u5927\u5141\u8BB8\u503C\uFF1A(${this.file.size} > ${this.maxFileBytes})`);if(this.attempts&&(typeof this.attempts!="number"||this.attempts<=0))throw new TypeError("\u91CD\u8BD5\u6B21\u6570\u5FC5\u987B\u4E3A\u6B63\u6570\uFF01");if(this.delayBeforeAttempt&&(typeof this.delayBeforeAttempt!="number"||this.delayBeforeAttempt<0))throw new TypeError("\u5EF6\u65F6\u91CD\u8BD5\u65F6\u95F4\u5FC5\u987B\u4E3A\u6B63\u6570\uFF01\u9ED8\u8BA4\u4E3A1")}getEndpoint(){return typeof this.endpoint=="string"?(this.endpointValue=this.endpoint,Promise.resolve(this.endpoint)):this.endpoint(this.file).then(t=>(this.endpointValue=t,this.endpointValue))}getChunk(){return new Promise(t=>{const n=this.totalChunks===1?this.file.size:this.chunkByteSize,i=n*this.chunkCount;this.reader.onload=()=>{this.reader.result!==null&&(this.chunk=new Blob([this.reader.result],{type:"application/octet-stream"})),t(()=>{})},this.reader.readAsArrayBuffer(this.file.slice(i,i+n))})}xhrPromise(t){const n=i=>{i.upload.onprogress=r=>{const c=100/this.totalChunks,v=c*this.file.size,y=c*this.chunkCount,w=r.loaded/(r.total??v)*c;this.dispatch("progress",Math.min(y+w,100))}};return new Promise((i,r)=>{this.currentXhr=Yo({...t,beforeSend:n},(c,v)=>(this.currentXhr=void 0,c?r(c):i(v)))})}sendChunk(){if(!this.chunk)return;const t=this.chunkCount*this.chunkByteSize,n=t+this.chunk.size-1,i={...this.headers,FileName:this.fileName,FileMD5:this.md5,"Content-Type":this.file.type,"Content-Range":`bytes ${t}-${n}/${this.file.size}`};if(this.dispatch("attempt",{chunkNumber:this.chunkCount,chunkSize:this.chunk.size}),this.endpointValue)return this.xhrPromise({headers:i,url:this.endpointValue,method:this.method,body:this.chunk});console.warn("\u6587\u4EF6\u4E0A\u4F20endpointValue\u4E0D\u80FD\u4E3A\u7A7A\uFF01"),this.dispatch("error",{message:"\u6587\u4EF6\u4E0A\u4F20endpointValue\u4E0D\u80FD\u4E3A\u7A7A\uFF01\u53D6\u6D88\u4E0A\u4F20\uFF01",chunk:this.chunkCount,attempts:this.attemptCount})}manageRetries(){if(this.attemptCount<this.attempts)return setTimeout(()=>this.sendChunks(),1e3*this.delayBeforeAttempt),void this.dispatch("attemptFailure",{message:`\u4E0A\u4F20\u5206\u7247\uFF1A${this.chunkCount}\u5931\u8D25\u3002\u8FD8\u4F1A\u518D\u5C1D\u8BD5 ${this.attempts-this.attemptCount}\u6B21\uFF01`,chunkNumber:this.chunkCount,attemptsLeft:this.attempts-this.attemptCount});this.dispatch("error",{message:`\u4E0A\u4F20\u5206\u7247\u9519\u8BEF\uFF1A ${this.chunkCount}\u3002\u505C\u6B62\u5C1D\u8BD5\uFF0C\u53D6\u6D88\u4E0A\u4F20\uFF01`,chunk:this.chunkCount,attempts:this.attemptCount})}sendChunks(){this.paused||this.offline||this.success||this.getChunk().then(()=>this.sendChunk()).then(t=>{if(this.attemptCount=this.attemptCount+1,t!=null&&Jo.includes(t.statusCode)){this.dispatch("chunkSuccess",{chunk:this.chunkCount,attempts:this.attemptCount,response:t}),this.attemptCount=0,this.chunkCount=this.chunkCount+1,this.chunkCount<this.totalChunks?this.sendChunks():(this.success=!0,this.dispatch("success"));const n=100*(this.chunkCount/this.totalChunks*this.file.size)/this.file.size;this.dispatch("progress",n)}else if(t!=null&&Zo.includes(t.statusCode)){if(this.paused||this.offline)return;this.manageRetries()}else{if(this.paused||this.offline)return;this.dispatch("error",{message:`\u670D\u52A1\u5668\u9519\u8BEF:${t?.statusCode}\uFF0C\u505C\u6B62\u4E0A\u4F20\u3002`,chunkNumber:this.chunkCount,attempts:this.attemptCount})}}).catch(t=>{this.paused||this.offline||this.manageRetries()})}}const tr=e=>new Qo(e),er=new class{hasClass(e,t){return e.className.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))}addClass(e,t){this.hasClass(e,t)||(e.className+=" "+t)}removeClass(e,t){if(this.hasClass(e,t)){const n=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className=e.className.replace(n," ")}}toggleClass(e,t){this.hasClass(e,t)?this.removeClass(e,t):this.addClass(e,t)}setCSSProperty(e,t,n){e?.style.setProperty(t,n)}},On=mt.get("is_LockScreen",!1),Tt={isLock:On,lockTime:On=="true"?Wn():0};function jn(e){Tt.isLock=e,mt.set("is_LockScreen",e,10),e&&(Me(),console.log("\u9501\u5C4F\u4E86\u2026\u2026"))}function nr(){return mt.get("is_LockScreen",!1)}function Wn(){let e=3600;return I.Config.UI?.LockTime&&I.Config.UI?.LockTime>=10&&(e=I.Config.UI.LockTime),e}let Be;function Ae(){clearInterval(Be),window.location.href.indexOf("/login")>0||Tt.isLock||(jn(!1),Tt.lockTime=Wn(),Be=setInterval(()=>{if(Tt.lockTime--,Tt.lockTime<=0)return jn(!0),clearInterval(Be)},1e3))}function ir(){Ae(),document.addEventListener("mousedown",Ae)}function or(){document.removeEventListener("mousedown",Ae)}var rr={exports:{}},Vt=rr.exports=function e(t,n,i){function r(y,w){if(!n[y]){if(!t[y]){if(!w&&be)return be(y);if(c)return c(y,!0);var S=new Error("Cannot find module '"+y+"'");throw S.code="MODULE_NOT_FOUND",S}var E=n[y]={exports:{}};t[y][0].call(E.exports,function(z){var L=t[y][1][z];return r(L||z)},E,E.exports,e,t,n,i)}return n[y].exports}for(var c=be,v=0;v<i.length;v++)r(i[v]);return r}({1:[function(e,t,n){(function(i){var r,c,v=i.MutationObserver||i.WebKitMutationObserver;if(v){var y=0,w=new v(L),S=i.document.createTextNode("");w.observe(S,{characterData:!0}),r=function(){S.data=y=++y%2}}else if(i.setImmediate||i.MessageChannel===void 0)r="document"in i&&"onreadystatechange"in i.document.createElement("script")?function(){var P=i.document.createElement("script");P.onreadystatechange=function(){L(),P.onreadystatechange=null,P.parentNode.removeChild(P),P=null},i.document.documentElement.appendChild(P)}:function(){setTimeout(L,0)};else{var E=new i.MessageChannel;E.port1.onmessage=L,r=function(){E.port2.postMessage(0)}}var z=[];function L(){var P,b;c=!0;for(var u=z.length;u;){for(b=z,z=[],P=-1;++P<u;)b[P]();u=z.length}c=!1}function D(P){z.push(P)!==1||c||r()}t.exports=D}).call(this,_t!==void 0?_t:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(e,t,n){var i=e(1);function r(){}var c={},v=["REJECTED"],y=["FULFILLED"],w=["PENDING"];function S(l){if(typeof l!="function")throw new TypeError("resolver must be a function");this.state=w,this.queue=[],this.outcome=void 0,l!==r&&D(this,l)}function E(l,p,B){this.promise=l,typeof p=="function"&&(this.onFulfilled=p,this.callFulfilled=this.otherCallFulfilled),typeof B=="function"&&(this.onRejected=B,this.callRejected=this.otherCallRejected)}function z(l,p,B){i(function(){var R;try{R=p(B)}catch(A){return c.reject(l,A)}R===l?c.reject(l,new TypeError("Cannot resolve promise with itself")):c.resolve(l,R)})}function L(l){var p=l&&l.then;if(l&&(typeof l=="object"||typeof l=="function")&&typeof p=="function")return function(){p.apply(l,arguments)}}function D(l,p){var B=!1;function R(j){B||(B=!0,c.reject(l,j))}function A(j){B||(B=!0,c.resolve(l,j))}function U(){p(A,R)}var O=P(U);O.status==="error"&&R(O.value)}function P(l,p){var B={};try{B.value=l(p),B.status="success"}catch(R){B.status="error",B.value=R}return B}function b(l){return l instanceof this?l:c.resolve(new this(r),l)}function u(l){var p=new this(r);return c.reject(p,l)}function d(l){var p=this;if(Object.prototype.toString.call(l)!=="[object Array]")return this.reject(new TypeError("must be an array"));var B=l.length,R=!1;if(!B)return this.resolve([]);for(var A=new Array(B),U=0,O=-1,j=new this(r);++O<B;)F(l[O],O);return j;function F(G,V){function it(Q){A[V]=Q,++U!==B||R||(R=!0,c.resolve(j,A))}p.resolve(G).then(it,function(Q){R||(R=!0,c.reject(j,Q))})}}function h(l){var p=this;if(Object.prototype.toString.call(l)!=="[object Array]")return this.reject(new TypeError("must be an array"));var B=l.length,R=!1;if(!B)return this.resolve([]);for(var A=-1,U=new this(r);++A<B;)O(l[A]);return U;function O(j){p.resolve(j).then(function(F){R||(R=!0,c.resolve(U,F))},function(F){R||(R=!0,c.reject(U,F))})}}t.exports=S,S.prototype.catch=function(l){return this.then(null,l)},S.prototype.then=function(l,p){if(typeof l!="function"&&this.state===y||typeof p!="function"&&this.state===v)return this;var B=new this.constructor(r);return this.state!==w?z(B,this.state===y?l:p,this.outcome):this.queue.push(new E(B,l,p)),B},E.prototype.callFulfilled=function(l){c.resolve(this.promise,l)},E.prototype.otherCallFulfilled=function(l){z(this.promise,this.onFulfilled,l)},E.prototype.callRejected=function(l){c.reject(this.promise,l)},E.prototype.otherCallRejected=function(l){z(this.promise,this.onRejected,l)},c.resolve=function(l,p){var B=P(L,p);if(B.status==="error")return c.reject(l,B.value);var R=B.value;if(R)D(l,R);else{l.state=y,l.outcome=p;for(var A=-1,U=l.queue.length;++A<U;)l.queue[A].callFulfilled(p)}return l},c.reject=function(l,p){l.state=v,l.outcome=p;for(var B=-1,R=l.queue.length;++B<R;)l.queue[B].callRejected(p);return l},S.resolve=b,S.reject=u,S.all=d,S.race=h},{1:1}],3:[function(e,t,n){(function(i){typeof i.Promise!="function"&&(i.Promise=e(2))}).call(this,_t!==void 0?_t:typeof self<"u"?self:typeof window<"u"?window:{})},{2:2}],4:[function(e,t,n){var i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o};function r(o,s){if(!(o instanceof s))throw new TypeError("Cannot call a class as a function")}function c(){try{if(typeof indexedDB<"u")return indexedDB;if(typeof webkitIndexedDB<"u")return webkitIndexedDB;if(typeof mozIndexedDB<"u")return mozIndexedDB;if(typeof OIndexedDB<"u")return OIndexedDB;if(typeof msIndexedDB<"u")return msIndexedDB}catch{return}}var v=c();function y(){try{if(!v||!v.open)return!1;var o=typeof openDatabase<"u"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),s=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!o||s)&&typeof indexedDB<"u"&&typeof IDBKeyRange<"u"}catch{return!1}}function w(o,s){o=o||[],s=s||{};try{return new Blob(o,s)}catch(f){if(f.name!=="TypeError")throw f;for(var a=new(typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder),m=0;m<o.length;m+=1)a.append(o[m]);return a.getBlob(s.type)}}typeof Promise>"u"&&e(3);var S=Promise;function E(o,s){s&&o.then(function(a){s(null,a)},function(a){s(a)})}function z(o,s,a){typeof s=="function"&&o.then(s),typeof a=="function"&&o.catch(a)}function L(o){return typeof o!="string"&&(console.warn(o+" used as a key, but it is not a string."),o=String(o)),o}function D(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var P="local-forage-detect-blob-support",b=void 0,u={},d=Object.prototype.toString,h="readonly",l="readwrite";function p(o){for(var s=o.length,a=new ArrayBuffer(s),m=new Uint8Array(a),f=0;f<s;f++)m[f]=o.charCodeAt(f);return a}function B(o){return new S(function(s){var a=o.transaction(P,l),m=w([""]);a.objectStore(P).put(m,"key"),a.onabort=function(f){f.preventDefault(),f.stopPropagation(),s(!1)},a.oncomplete=function(){var f=navigator.userAgent.match(/Chrome\/(\d+)/),g=navigator.userAgent.match(/Edge\//);s(g||!f||parseInt(f[1],10)>=43)}}).catch(function(){return!1})}function R(o){return typeof b=="boolean"?S.resolve(b):B(o).then(function(s){return b=s})}function A(o){var s=u[o.name],a={};a.promise=new S(function(m,f){a.resolve=m,a.reject=f}),s.deferredOperations.push(a),s.dbReady?s.dbReady=s.dbReady.then(function(){return a.promise}):s.dbReady=a.promise}function U(o){var s=u[o.name].deferredOperations.pop();if(s)return s.resolve(),s.promise}function O(o,s){var a=u[o.name].deferredOperations.pop();if(a)return a.reject(s),a.promise}function j(o,s){return new S(function(a,m){if(u[o.name]=u[o.name]||Je(),o.db){if(!s)return a(o.db);A(o),o.db.close()}var f=[o.name];s&&f.push(o.version);var g=v.open.apply(v,f);s&&(g.onupgradeneeded=function(C){var x=g.result;try{x.createObjectStore(o.storeName),C.oldVersion<=1&&x.createObjectStore(P)}catch(k){if(k.name!=="ConstraintError")throw k;console.warn('The database "'+o.name+'" has been upgraded from version '+C.oldVersion+" to version "+C.newVersion+', but the storage "'+o.storeName+'" already exists.')}}),g.onerror=function(C){C.preventDefault(),m(g.error)},g.onsuccess=function(){var C=g.result;C.onversionchange=function(x){x.target.close()},a(C),U(o)}})}function F(o){return j(o,!1)}function G(o){return j(o,!0)}function V(o,s){if(!o.db)return!0;var a=!o.db.objectStoreNames.contains(o.storeName),m=o.version<o.db.version,f=o.version>o.db.version;if(m&&(o.version!==s&&console.warn('The database "'+o.name+`" can't be downgraded from version `+o.db.version+" to version "+o.version+"."),o.version=o.db.version),f||a){if(a){var g=o.db.version+1;g>o.version&&(o.version=g)}return!0}return!1}function it(o){return new S(function(s,a){var m=new FileReader;m.onerror=a,m.onloadend=function(f){var g=btoa(f.target.result||"");s({__local_forage_encoded_blob:!0,data:g,type:o.type})},m.readAsBinaryString(o)})}function Q(o){return w([p(atob(o.data))],{type:o.type})}function st(o){return o&&o.__local_forage_encoded_blob}function ue(o){var s=this,a=s._initReady().then(function(){var m=u[s._dbInfo.name];if(m&&m.dbReady)return m.dbReady});return z(a,o,o),a}function le(o){A(o);for(var s=u[o.name],a=s.forages,m=0;m<a.length;m++){var f=a[m];f._dbInfo.db&&(f._dbInfo.db.close(),f._dbInfo.db=null)}return o.db=null,F(o).then(function(g){return o.db=g,V(o)?G(o):g}).then(function(g){o.db=s.db=g;for(var C=0;C<a.length;C++)a[C]._dbInfo.db=g}).catch(function(g){throw O(o,g),g})}function at(o,s,a,m){m===void 0&&(m=1);try{var f=o.db.transaction(o.storeName,s);a(null,f)}catch(g){if(m>0&&(!o.db||g.name==="InvalidStateError"||g.name==="NotFoundError"))return S.resolve().then(function(){if(!o.db||g.name==="NotFoundError"&&!o.db.objectStoreNames.contains(o.storeName)&&o.version<=o.db.version)return o.db&&(o.version=o.db.version+1),G(o)}).then(function(){return le(o).then(function(){at(o,s,a,m-1)})}).catch(a);a(g)}}function Je(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function ui(o){var s=this,a={db:null};if(o)for(var m in o)a[m]=o[m];var f=u[a.name];f||(f=Je(),u[a.name]=f),f.forages.push(s),s._initReady||(s._initReady=s.ready,s.ready=ue);var g=[];function C(){return S.resolve()}for(var x=0;x<f.forages.length;x++){var k=f.forages[x];k!==s&&g.push(k._initReady().catch(C))}var M=f.forages.slice(0);return S.all(g).then(function(){return a.db=f.db,F(a)}).then(function(_){return a.db=_,V(a,s._defaultConfig.version)?G(a):_}).then(function(_){a.db=f.db=_,s._dbInfo=a;for(var T=0;T<M.length;T++){var N=M[T];N!==s&&(N._dbInfo.db=a.db,N._dbInfo.version=a.version)}})}function li(o,s){var a=this;o=L(o);var m=new S(function(f,g){a.ready().then(function(){at(a._dbInfo,h,function(C,x){if(C)return g(C);try{var k=x.objectStore(a._dbInfo.storeName).get(o);k.onsuccess=function(){var M=k.result;M===void 0&&(M=null),st(M)&&(M=Q(M)),f(M)},k.onerror=function(){g(k.error)}}catch(M){g(M)}})}).catch(g)});return E(m,s),m}function hi(o,s){var a=this,m=new S(function(f,g){a.ready().then(function(){at(a._dbInfo,h,function(C,x){if(C)return g(C);try{var k=x.objectStore(a._dbInfo.storeName).openCursor(),M=1;k.onsuccess=function(){var _=k.result;if(_){var T=_.value;st(T)&&(T=Q(T));var N=o(T,_.key,M++);N!==void 0?f(N):_.continue()}else f()},k.onerror=function(){g(k.error)}}catch(_){g(_)}})}).catch(g)});return E(m,s),m}function di(o,s,a){var m=this;o=L(o);var f=new S(function(g,C){var x;m.ready().then(function(){return x=m._dbInfo,d.call(s)==="[object Blob]"?R(x.db).then(function(k){return k?s:it(s)}):s}).then(function(k){at(m._dbInfo,l,function(M,_){if(M)return C(M);try{var T=_.objectStore(m._dbInfo.storeName);k===null&&(k=void 0);var N=T.put(k,o);_.oncomplete=function(){k===void 0&&(k=null),g(k)},_.onabort=_.onerror=function(){var W=N.error?N.error:N.transaction.error;C(W)}}catch(W){C(W)}})}).catch(C)});return E(f,a),f}function fi(o,s){var a=this;o=L(o);var m=new S(function(f,g){a.ready().then(function(){at(a._dbInfo,l,function(C,x){if(C)return g(C);try{var k=x.objectStore(a._dbInfo.storeName).delete(o);x.oncomplete=function(){f()},x.onerror=function(){g(k.error)},x.onabort=function(){var M=k.error?k.error:k.transaction.error;g(M)}}catch(M){g(M)}})}).catch(g)});return E(m,s),m}function pi(o){var s=this,a=new S(function(m,f){s.ready().then(function(){at(s._dbInfo,l,function(g,C){if(g)return f(g);try{var x=C.objectStore(s._dbInfo.storeName).clear();C.oncomplete=function(){m()},C.onabort=C.onerror=function(){var k=x.error?x.error:x.transaction.error;f(k)}}catch(k){f(k)}})}).catch(f)});return E(a,o),a}function mi(o){var s=this,a=new S(function(m,f){s.ready().then(function(){at(s._dbInfo,h,function(g,C){if(g)return f(g);try{var x=C.objectStore(s._dbInfo.storeName).count();x.onsuccess=function(){m(x.result)},x.onerror=function(){f(x.error)}}catch(k){f(k)}})}).catch(f)});return E(a,o),a}function gi(o,s){var a=this,m=new S(function(f,g){o<0?f(null):a.ready().then(function(){at(a._dbInfo,h,function(C,x){if(C)return g(C);try{var k=x.objectStore(a._dbInfo.storeName),M=!1,_=k.openKeyCursor();_.onsuccess=function(){var T=_.result;T?o===0||M?f(T.key):(M=!0,T.advance(o)):f(null)},_.onerror=function(){g(_.error)}}catch(T){g(T)}})}).catch(g)});return E(m,s),m}function vi(o){var s=this,a=new S(function(m,f){s.ready().then(function(){at(s._dbInfo,h,function(g,C){if(g)return f(g);try{var x=C.objectStore(s._dbInfo.storeName).openKeyCursor(),k=[];x.onsuccess=function(){var M=x.result;M?(k.push(M.key),M.continue()):m(k)},x.onerror=function(){f(x.error)}}catch(M){f(M)}})}).catch(f)});return E(a,o),a}function yi(o,s){s=D.apply(this,arguments);var a=this.config();(o=typeof o!="function"&&o||{}).name||(o.name=o.name||a.name,o.storeName=o.storeName||a.storeName);var m,f=this;if(o.name){var g=o.name===a.name&&f._dbInfo.db?S.resolve(f._dbInfo.db):F(o).then(function(C){var x=u[o.name],k=x.forages;x.db=C;for(var M=0;M<k.length;M++)k[M]._dbInfo.db=C;return C});m=o.storeName?g.then(function(C){if(C.objectStoreNames.contains(o.storeName)){var x=C.version+1;A(o);var k=u[o.name],M=k.forages;C.close();for(var _=0;_<M.length;_++){var T=M[_];T._dbInfo.db=null,T._dbInfo.version=x}return new S(function(N,W){var $=v.open(o.name,x);$.onerror=function(ot){$.result.close(),W(ot)},$.onupgradeneeded=function(){$.result.deleteObjectStore(o.storeName)},$.onsuccess=function(){var ot=$.result;ot.close(),N(ot)}}).then(function(N){k.db=N;for(var W=0;W<M.length;W++){var $=M[W];$._dbInfo.db=N,U($._dbInfo)}}).catch(function(N){throw(O(o,N)||S.resolve()).catch(function(){}),N})}}):g.then(function(C){A(o);var x=u[o.name],k=x.forages;C.close();for(var M=0;M<k.length;M++)k[M]._dbInfo.db=null;return new S(function(_,T){var N=v.deleteDatabase(o.name);N.onerror=function(){var W=N.result;W&&W.close(),T(N.error)},N.onblocked=function(){console.warn('dropInstance blocked for database "'+o.name+'" until all open connections are closed')},N.onsuccess=function(){var W=N.result;W&&W.close(),_(W)}}).then(function(_){x.db=_;for(var T=0;T<k.length;T++)U(k[T]._dbInfo)}).catch(function(_){throw(O(o,_)||S.resolve()).catch(function(){}),_})})}else m=S.reject("Invalid arguments");return E(m,s),m}var wi={_driver:"asyncStorage",_initStorage:ui,_support:y(),iterate:hi,getItem:li,setItem:di,removeItem:fi,clear:pi,length:mi,key:gi,keys:vi,dropInstance:yi};function bi(){return typeof openDatabase=="function"}var ht="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Si="~~local_forage_type~",Ze=/^~~local_forage_type~([^~]+)~/,Ot="__lfsc__:",he=Ot.length,de="arbf",fe="blob",Qe="si08",tn="ui08",en="uic8",nn="si16",on="si32",rn="ur16",sn="ui32",an="fl32",cn="fl64",un=he+de.length,ln=Object.prototype.toString;function hn(o){var s,a,m,f,g,C=.75*o.length,x=o.length,k=0;o[o.length-1]==="="&&(C--,o[o.length-2]==="="&&C--);var M=new ArrayBuffer(C),_=new Uint8Array(M);for(s=0;s<x;s+=4)a=ht.indexOf(o[s]),m=ht.indexOf(o[s+1]),f=ht.indexOf(o[s+2]),g=ht.indexOf(o[s+3]),_[k++]=a<<2|m>>4,_[k++]=(15&m)<<4|f>>2,_[k++]=(3&f)<<6|63&g;return M}function pe(o){var s,a=new Uint8Array(o),m="";for(s=0;s<a.length;s+=3)m+=ht[a[s]>>2],m+=ht[(3&a[s])<<4|a[s+1]>>4],m+=ht[(15&a[s+1])<<2|a[s+2]>>6],m+=ht[63&a[s+2]];return a.length%3==2?m=m.substring(0,m.length-1)+"=":a.length%3==1&&(m=m.substring(0,m.length-2)+"=="),m}function Ci(o,s){var a="";if(o&&(a=ln.call(o)),o&&(a==="[object ArrayBuffer]"||o.buffer&&ln.call(o.buffer)==="[object ArrayBuffer]")){var m,f=Ot;o instanceof ArrayBuffer?(m=o,f+=de):(m=o.buffer,a==="[object Int8Array]"?f+=Qe:a==="[object Uint8Array]"?f+=tn:a==="[object Uint8ClampedArray]"?f+=en:a==="[object Int16Array]"?f+=nn:a==="[object Uint16Array]"?f+=rn:a==="[object Int32Array]"?f+=on:a==="[object Uint32Array]"?f+=sn:a==="[object Float32Array]"?f+=an:a==="[object Float64Array]"?f+=cn:s(new Error("Failed to get type for BinaryArray"))),s(f+pe(m))}else if(a==="[object Blob]"){var g=new FileReader;g.onload=function(){var C=Si+o.type+"~"+pe(this.result);s(Ot+fe+C)},g.readAsArrayBuffer(o)}else try{s(JSON.stringify(o))}catch(C){console.error("Couldn't convert value into a JSON string: ",o),s(null,C)}}function xi(o){if(o.substring(0,he)!==Ot)return JSON.parse(o);var s,a=o.substring(un),m=o.substring(he,un);if(m===fe&&Ze.test(a)){var f=a.match(Ze);s=f[1],a=a.substring(f[0].length)}var g=hn(a);switch(m){case de:return g;case fe:return w([g],{type:s});case Qe:return new Int8Array(g);case tn:return new Uint8Array(g);case en:return new Uint8ClampedArray(g);case nn:return new Int16Array(g);case rn:return new Uint16Array(g);case on:return new Int32Array(g);case sn:return new Uint32Array(g);case an:return new Float32Array(g);case cn:return new Float64Array(g);default:throw new Error("Unkown type: "+m)}}var me={serialize:Ci,deserialize:xi,stringToBuffer:hn,bufferToString:pe};function dn(o,s,a,m){o.executeSql("CREATE TABLE IF NOT EXISTS "+s.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],a,m)}function Ei(o){var s=this,a={db:null};if(o)for(var m in o)a[m]=typeof o[m]!="string"?o[m].toString():o[m];var f=new S(function(g,C){try{a.db=openDatabase(a.name,String(a.version),a.description,a.size)}catch(x){return C(x)}a.db.transaction(function(x){dn(x,a,function(){s._dbInfo=a,g()},function(k,M){C(M)})},C)});return a.serializer=me,f}function dt(o,s,a,m,f,g){o.executeSql(a,m,f,function(C,x){x.code===x.SYNTAX_ERR?C.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[s.storeName],function(k,M){M.rows.length?g(k,x):dn(k,s,function(){k.executeSql(a,m,f,g)},g)},g):g(C,x)},g)}function ki(o,s){var a=this;o=L(o);var m=new S(function(f,g){a.ready().then(function(){var C=a._dbInfo;C.db.transaction(function(x){dt(x,C,"SELECT * FROM "+C.storeName+" WHERE key = ? LIMIT 1",[o],function(k,M){var _=M.rows.length?M.rows.item(0).value:null;_&&(_=C.serializer.deserialize(_)),f(_)},function(k,M){g(M)})})}).catch(g)});return E(m,s),m}function zi(o,s){var a=this,m=new S(function(f,g){a.ready().then(function(){var C=a._dbInfo;C.db.transaction(function(x){dt(x,C,"SELECT * FROM "+C.storeName,[],function(k,M){for(var _=M.rows,T=_.length,N=0;N<T;N++){var W=_.item(N),$=W.value;if($&&($=C.serializer.deserialize($)),($=o($,W.key,N+1))!==void 0)return void f($)}f()},function(k,M){g(M)})})}).catch(g)});return E(m,s),m}function fn(o,s,a,m){var f=this;o=L(o);var g=new S(function(C,x){f.ready().then(function(){s===void 0&&(s=null);var k=s,M=f._dbInfo;M.serializer.serialize(s,function(_,T){T?x(T):M.db.transaction(function(N){dt(N,M,"INSERT OR REPLACE INTO "+M.storeName+" (key, value) VALUES (?, ?)",[o,_],function(){C(k)},function(W,$){x($)})},function(N){if(N.code===N.QUOTA_ERR){if(m>0)return void C(fn.apply(f,[o,k,a,m-1]));x(N)}})})}).catch(x)});return E(g,a),g}function Mi(o,s,a){return fn.apply(this,[o,s,a,1])}function _i(o,s){var a=this;o=L(o);var m=new S(function(f,g){a.ready().then(function(){var C=a._dbInfo;C.db.transaction(function(x){dt(x,C,"DELETE FROM "+C.storeName+" WHERE key = ?",[o],function(){f()},function(k,M){g(M)})})}).catch(g)});return E(m,s),m}function Ri(o){var s=this,a=new S(function(m,f){s.ready().then(function(){var g=s._dbInfo;g.db.transaction(function(C){dt(C,g,"DELETE FROM "+g.storeName,[],function(){m()},function(x,k){f(k)})})}).catch(f)});return E(a,o),a}function Ii(o){var s=this,a=new S(function(m,f){s.ready().then(function(){var g=s._dbInfo;g.db.transaction(function(C){dt(C,g,"SELECT COUNT(key) as c FROM "+g.storeName,[],function(x,k){var M=k.rows.item(0).c;m(M)},function(x,k){f(k)})})}).catch(f)});return E(a,o),a}function Li(o,s){var a=this,m=new S(function(f,g){a.ready().then(function(){var C=a._dbInfo;C.db.transaction(function(x){dt(x,C,"SELECT key FROM "+C.storeName+" WHERE id = ? LIMIT 1",[o+1],function(k,M){var _=M.rows.length?M.rows.item(0).key:null;f(_)},function(k,M){g(M)})})}).catch(g)});return E(m,s),m}function Pi(o){var s=this,a=new S(function(m,f){s.ready().then(function(){var g=s._dbInfo;g.db.transaction(function(C){dt(C,g,"SELECT key FROM "+g.storeName,[],function(x,k){for(var M=[],_=0;_<k.rows.length;_++)M.push(k.rows.item(_).key);m(M)},function(x,k){f(k)})})}).catch(f)});return E(a,o),a}function Bi(o){return new S(function(s,a){o.transaction(function(m){m.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(f,g){for(var C=[],x=0;x<g.rows.length;x++)C.push(g.rows.item(x).name);s({db:o,storeNames:C})},function(f,g){a(g)})},function(m){a(m)})})}function Ai(o,s){s=D.apply(this,arguments);var a=this.config();(o=typeof o!="function"&&o||{}).name||(o.name=o.name||a.name,o.storeName=o.storeName||a.storeName);var m,f=this;return E(m=o.name?new S(function(g){var C;C=o.name===a.name?f._dbInfo.db:openDatabase(o.name,"","",0),o.storeName?g({db:C,storeNames:[o.storeName]}):g(Bi(C))}).then(function(g){return new S(function(C,x){g.db.transaction(function(k){function M(W){return new S(function($,ot){k.executeSql("DROP TABLE IF EXISTS "+W,[],function(){$()},function(vn,Pt){ot(Pt)})})}for(var _=[],T=0,N=g.storeNames.length;T<N;T++)_.push(M(g.storeNames[T]));S.all(_).then(function(){C()}).catch(function(W){x(W)})},function(k){x(k)})})}):S.reject("Invalid arguments"),s),m}var Ti={_driver:"webSQLStorage",_initStorage:Ei,_support:bi(),iterate:zi,getItem:ki,setItem:Mi,removeItem:_i,clear:Ri,length:Ii,key:Li,keys:Pi,dropInstance:Ai};function Di(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function pn(o,s){var a=o.name+"/";return o.storeName!==s.storeName&&(a+=o.storeName+"/"),a}function Ni(){var o="_localforage_support_test";try{return localStorage.setItem(o,!0),localStorage.removeItem(o),!1}catch{return!0}}function Ui(){return!Ni()||localStorage.length>0}function Oi(o){var s=this,a={};if(o)for(var m in o)a[m]=o[m];return a.keyPrefix=pn(o,s._defaultConfig),Ui()?(s._dbInfo=a,a.serializer=me,S.resolve()):S.reject()}function ji(o){var s=this,a=s.ready().then(function(){for(var m=s._dbInfo.keyPrefix,f=localStorage.length-1;f>=0;f--){var g=localStorage.key(f);g.indexOf(m)===0&&localStorage.removeItem(g)}});return E(a,o),a}function Wi(o,s){var a=this;o=L(o);var m=a.ready().then(function(){var f=a._dbInfo,g=localStorage.getItem(f.keyPrefix+o);return g&&(g=f.serializer.deserialize(g)),g});return E(m,s),m}function $i(o,s){var a=this,m=a.ready().then(function(){for(var f=a._dbInfo,g=f.keyPrefix,C=g.length,x=localStorage.length,k=1,M=0;M<x;M++){var _=localStorage.key(M);if(_.indexOf(g)===0){var T=localStorage.getItem(_);if(T&&(T=f.serializer.deserialize(T)),(T=o(T,_.substring(C),k++))!==void 0)return T}}});return E(m,s),m}function Fi(o,s){var a=this,m=a.ready().then(function(){var f,g=a._dbInfo;try{f=localStorage.key(o)}catch{f=null}return f&&(f=f.substring(g.keyPrefix.length)),f});return E(m,s),m}function Hi(o){var s=this,a=s.ready().then(function(){for(var m=s._dbInfo,f=localStorage.length,g=[],C=0;C<f;C++){var x=localStorage.key(C);x.indexOf(m.keyPrefix)===0&&g.push(x.substring(m.keyPrefix.length))}return g});return E(a,o),a}function qi(o){var s=this.keys().then(function(a){return a.length});return E(s,o),s}function Gi(o,s){var a=this;o=L(o);var m=a.ready().then(function(){var f=a._dbInfo;localStorage.removeItem(f.keyPrefix+o)});return E(m,s),m}function Xi(o,s,a){var m=this;o=L(o);var f=m.ready().then(function(){s===void 0&&(s=null);var g=s;return new S(function(C,x){var k=m._dbInfo;k.serializer.serialize(s,function(M,_){if(_)x(_);else try{localStorage.setItem(k.keyPrefix+o,M),C(g)}catch(T){T.name!=="QuotaExceededError"&&T.name!=="NS_ERROR_DOM_QUOTA_REACHED"||x(T),x(T)}})})});return E(f,a),f}function Vi(o,s){if(s=D.apply(this,arguments),!(o=typeof o!="function"&&o||{}).name){var a=this.config();o.name=o.name||a.name,o.storeName=o.storeName||a.storeName}var m,f=this;return E(m=o.name?new S(function(g){o.storeName?g(pn(o,f._defaultConfig)):g(o.name+"/")}).then(function(g){for(var C=localStorage.length-1;C>=0;C--){var x=localStorage.key(C);x.indexOf(g)===0&&localStorage.removeItem(x)}}):S.reject("Invalid arguments"),s),m}var Ki={_driver:"localStorageWrapper",_initStorage:Oi,_support:Di(),iterate:$i,getItem:Wi,setItem:Xi,removeItem:Gi,clear:ji,length:qi,key:Fi,keys:Hi,dropInstance:Vi},Yi=function(o,s){return o===s||typeof o=="number"&&typeof s=="number"&&isNaN(o)&&isNaN(s)},Ji=function(o,s){for(var a=o.length,m=0;m<a;){if(Yi(o[m],s))return!0;m++}return!1},mn=Array.isArray||function(o){return Object.prototype.toString.call(o)==="[object Array]"},Lt={},gn={},kt={INDEXEDDB:wi,WEBSQL:Ti,LOCALSTORAGE:Ki},Zi=[kt.INDEXEDDB._driver,kt.WEBSQL._driver,kt.LOCALSTORAGE._driver],jt=["dropInstance"],ge=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(jt),Qi={description:"",driver:Zi.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function to(o,s){o[s]=function(){var a=arguments;return o.ready().then(function(){return o[s].apply(o,a)})}}function ve(){for(var o=1;o<arguments.length;o++){var s=arguments[o];if(s)for(var a in s)s.hasOwnProperty(a)&&(mn(s[a])?arguments[0][a]=s[a].slice():arguments[0][a]=s[a])}return arguments[0]}var eo=new(function(){function o(s){for(var a in r(this,o),kt)if(kt.hasOwnProperty(a)){var m=kt[a],f=m._driver;this[a]=f,Lt[f]||this.defineDriver(m)}this._defaultConfig=ve({},Qi),this._config=ve({},this._defaultConfig,s),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return o.prototype.config=function(s){if((s===void 0?"undefined":i(s))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var a in s){if(a==="storeName"&&(s[a]=s[a].replace(/\W/g,"_")),a==="version"&&typeof s[a]!="number")return new Error("Database version must be a number.");this._config[a]=s[a]}return!("driver"in s)||!s.driver||this.setDriver(this._config.driver)}return typeof s=="string"?this._config[s]:this._config},o.prototype.defineDriver=function(s,a,m){var f=new S(function(g,C){try{var x=s._driver,k=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!s._driver)return void C(k);for(var M=ge.concat("_initStorage"),_=0,T=M.length;_<T;_++){var N=M[_];if((!Ji(jt,N)||s[N])&&typeof s[N]!="function")return void C(k)}(function(){for(var $=function(no){return function(){var io=new Error("Method "+no+" is not implemented by the current driver"),yn=S.reject(io);return E(yn,arguments[arguments.length-1]),yn}},ot=0,vn=jt.length;ot<vn;ot++){var Pt=jt[ot];s[Pt]||(s[Pt]=$(Pt))}})();var W=function($){Lt[x]&&console.info("Redefining LocalForage driver: "+x),Lt[x]=s,gn[x]=$,g()};"_support"in s?s._support&&typeof s._support=="function"?s._support().then(W,C):W(!!s._support):W(!0)}catch($){C($)}});return z(f,a,m),f},o.prototype.driver=function(){return this._driver||null},o.prototype.getDriver=function(s,a,m){var f=Lt[s]?S.resolve(Lt[s]):S.reject(new Error("Driver not found."));return z(f,a,m),f},o.prototype.getSerializer=function(s){var a=S.resolve(me);return z(a,s),a},o.prototype.ready=function(s){var a=this,m=a._driverSet.then(function(){return a._ready===null&&(a._ready=a._initDriver()),a._ready});return z(m,s,s),m},o.prototype.setDriver=function(s,a,m){var f=this;mn(s)||(s=[s]);var g=this._getSupportedDrivers(s);function C(){f._config.driver=f.driver()}function x(_){return f._extend(_),C(),f._ready=f._initStorage(f._config),f._ready}function k(_){return function(){var T=0;function N(){for(;T<_.length;){var W=_[T];return T++,f._dbInfo=null,f._ready=null,f.getDriver(W).then(x).catch(N)}C();var $=new Error("No available storage method found.");return f._driverSet=S.reject($),f._driverSet}return N()}}var M=this._driverSet!==null?this._driverSet.catch(function(){return S.resolve()}):S.resolve();return this._driverSet=M.then(function(){var _=g[0];return f._dbInfo=null,f._ready=null,f.getDriver(_).then(function(T){f._driver=T._driver,C(),f._wrapLibraryMethodsWithReady(),f._initDriver=k(g)})}).catch(function(){C();var _=new Error("No available storage method found.");return f._driverSet=S.reject(_),f._driverSet}),z(this._driverSet,a,m),this._driverSet},o.prototype.supports=function(s){return!!gn[s]},o.prototype._extend=function(s){ve(this,s)},o.prototype._getSupportedDrivers=function(s){for(var a=[],m=0,f=s.length;m<f;m++){var g=s[m];this.supports(g)&&a.push(g)}return a},o.prototype._wrapLibraryMethodsWithReady=function(){for(var s=0,a=ge.length;s<a;s++)to(this,ge[s])},o.prototype.createInstance=function(s){return new o(s)},o}());t.exports=eo},{3:3}]},{},[4])(4),$n={exports:{}};/*! streamsaver. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */(function(e){$n.exports=(()=>{const t=typeof window=="object"?window:this;t.HTMLElement||console.warn("streamsaver is meant to run on browsers main thread");let n=null,i=!1;const r=t.WebStreamsPolyfill||{},c=t.isSecureContext;let v=/constructor/i.test(t.HTMLElement)||!!t.safari||!!t.WebKitPoint;const y=c||"MozAppearance"in document.documentElement.style?"iframe":"navigate",w={createWriteStream:function(E,z,L){let D={size:null,pathname:null,writableStrategy:void 0,readableStrategy:void 0},P=0,b=null,u=null,d=null;if(Number.isFinite(z)?([L,z]=[z,L],console.warn("[StreamSaver] Deprecated pass an object as 2nd argument when creating a write stream"),D.size=L,D.writableStrategy=z):z&&z.highWaterMark?(console.warn("[StreamSaver] Deprecated pass an object as 2nd argument when creating a write stream"),D.size=L,D.writableStrategy=z):D=z||{},!v){n||(n=c?S(w.mitm):function(B){const R="width=200,height=100",A=document.createDocumentFragment(),U={frame:t.open(B,"popup",R),loaded:!1,isIframe:!1,isPopup:!0,remove(){U.frame.close()},addEventListener(...j){A.addEventListener(...j)},dispatchEvent(...j){A.dispatchEvent(...j)},removeEventListener(...j){A.removeEventListener(...j)},postMessage(...j){U.frame.postMessage(...j)}},O=j=>{j.source===U.frame&&(U.loaded=!0,t.removeEventListener("message",O),U.dispatchEvent(new Event("load")))};return t.addEventListener("message",O),U}(w.mitm)),u=new MessageChannel,E=encodeURIComponent(E.replace(/\//g,":")).replace(/['()]/g,escape).replace(/\*/g,"%2A");const l={transferringReadable:i,pathname:D.pathname||Math.random().toString().slice(-6)+"/"+E,headers:{"Content-Type":"application/octet-stream; charset=utf-8","Content-Disposition":"attachment; filename*=UTF-8''"+E}};D.size&&(l.headers["Content-Length"]=D.size);const p=[l,"*",[u.port2]];if(i){const B=y==="iframe"?void 0:{transform(A,U){if(!(A instanceof Uint8Array))throw new TypeError("Can only write Uint8Arrays");P+=A.length,U.enqueue(A),b&&(location.href=b,b=null)},flush(){b&&(location.href=b)}};d=new w.TransformStream(B,D.writableStrategy,D.readableStrategy);const R=d.readable;u.port1.postMessage({readableStream:R},[R])}u.port1.onmessage=B=>{B.data.download?y==="navigate"?(n.remove(),n=null,P?location.href=B.data.download:b=B.data.download):(n.isPopup&&(n.remove(),n=null,y==="iframe"&&S(w.mitm)),S(B.data.download)):B.data.abort&&(h=[],u.port1.postMessage("abort"),u.port1.onmessage=null,u.port1.close(),u.port2.close(),u=null)},n.loaded?n.postMessage(...p):n.addEventListener("load",()=>{n.postMessage(...p)},{once:!0})}let h=[];return!v&&d&&d.writable||new w.WritableStream({write(l){if(!(l instanceof Uint8Array))throw new TypeError("Can only write Uint8Arrays");v?h.push(l):(u.port1.postMessage(l),P+=l.length,b&&(location.href=b,b=null))},close(){if(v){const l=new Blob(h,{type:"application/octet-stream; charset=utf-8"}),p=document.createElement("a");p.href=URL.createObjectURL(l),p.download=E,p.click()}else u.port1.postMessage("end")},abort(){h=[],u.port1.postMessage("abort"),u.port1.onmessage=null,u.port1.close(),u.port2.close(),u=null}},D.writableStrategy)},WritableStream:t.WritableStream||r.WritableStream,supported:!0,version:{full:"2.0.5",major:2,minor:0,dot:5},mitm:"https://jimmywarting.github.io/StreamSaver.js/mitm.html?version=2.0.0"};function S(E){if(!E)throw new Error("meh");const z=document.createElement("iframe");return z.hidden=!0,z.src=E,z.loaded=!1,z.name="iframe",z.isIframe=!0,z.postMessage=(...L)=>z.contentWindow.postMessage(...L),z.addEventListener("load",()=>{z.loaded=!0},{once:!0}),document.body.appendChild(z),z}try{new Response(new ReadableStream),c&&!("serviceWorker"in navigator)&&(v=!0)}catch{v=!0}return(E=>{try{E()}catch{}})(()=>{const{readable:E}=new TransformStream,z=new MessageChannel;z.port1.postMessage(E,[E]),z.port1.close(),z.port2.close(),i=!0,Object.defineProperty(w,"TransformStream",{configurable:!1,writable:!1,value:TransformStream})}),w})()})();var sr=$n.exports;class ar{fileID;downloadURL;ChunkUnitM=1048576;chunkByteSize;totalChunks=1;currentDB;keys;fileMetaData=null;finishNum=0;eventTarget;cancelSource;isStarting=!1;fileName;cacheSize=6;requestTimeout=6e4;constructor(t,n,i=3,r=6,c=6e4){this.fileID=t,this.downloadURL=n,this.chunkByteSize=i*this.ChunkUnitM,this.eventTarget=ze(),this.initIndexDB(),r>=3&&(this.cacheSize=r),c>this.requestTimeout&&(this.requestTimeout=c)}on(t,n){this.eventTarget.on(t,n)}dispatch(t,n){this.eventTarget.emit(t,n)}dispatchError(t){this.eventTarget.emit("error",t)}dispatchInfo(t){this.eventTarget.emit("info",t)}async queryDownloadFileMeta(t,n="",i){this.dispatchInfo("\u5F00\u59CB\u83B7\u53D6\u6587\u4EF6\u4FE1\u606F");const r=await rt(n,t,i);let c=null;return r&&r.status===200&&(c=r.data),c}async getIFileMeta(){if(this.fileMetaData===null){const t=await this.currentDB?.getItem("fileinfo");this.fileMetaData=t||null}return this.fileMetaData}initIndexDB(){this.currentDB=Vt.createInstance({name:this.fileID,driver:Vt.INDEXEDDB})}async init(t){if(this.finishNum=0,t){const n="fileinfo";this.fileMetaData={id:t.id,name:t.name,length:t.length,downloadID:t.downloadID,chunkSize:this.chunkByteSize},this.fileName=t.name,this.currentDB?.setItem(n,this.fileMetaData)}if(this.fileMetaData!=null){const n=this.fileMetaData.chunkSize;n!=null&&n>0&&(this.chunkByteSize=n)}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(),Vt.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(t){return new Promise(n=>setTimeout(n,t))}async download(t,n){let i=t;if(!i&&this.downloadURL&&(i=this.downloadURL),!i)throw Error("\u4E0B\u8F7DURL\u4E0D\u80FD\u4E3A\u7A7A!");this.currentDB||this.initIndexDB();const r=I.Axios.CancelToken;this.cancelSource=r.source(),this.isStarting=!0;const c={key:this.fileMetaData?.downloadID};let v=0;const y=this.cacheSize;let w=0;for(let S=0;S<this.totalChunks;S++){if(this.keys&&this.keys?.indexOf(S.toString())>=0){v++,v>this.finishNum&&(this.finishNum=v,this.downloadProgress());continue}const E=S*this.chunkByteSize;let z=E+this.chunkByteSize-1;this.fileMetaData&&z>this.fileMetaData.length&&(z=this.fileMetaData.length-1);const L={range:`bytes=${E}-${z}`};for(;w>=y;)await this.sleep(200);const D=S.toString();this.dispatchInfo(`\u5F00\u59CB\u4E0B\u8F7D\u5206\u7247${S+1}/${this.totalChunks}`),w++,rt(i,n,c,L,"arraybuffer",this.cancelSource?.token,this.requestTimeout).then(async P=>{const b=P.data;w--,await this.currentDB?.setItem(D,b),v++,v>this.finishNum&&(this.finishNum=v,this.downloadProgress());const u=parseInt(D)+1;this.dispatchInfo(`\u5B8C\u6210\u4E0B\u8F7D\u5206\u7247${u}/${this.totalChunks}`),this.savefile()}).catch(P=>{w--;const b=parseInt(D)+1;this.dispatchError(`\u4E0B\u8F7D\u7B2C${b}\uFF09\u4E2A\u5206\u7247\u5185\u5BB9\u5931\u8D25\uFF01`)})}this.finishNum===this.totalChunks&&this.savefile()}downloadProgress(){const t=100*this.finishNum/this.totalChunks;this.dispatch("downloadProgress",t)}outputProgress(t){const n=100*t/this.totalChunks;this.dispatch("saveProgress",n)}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 t=sr.createWriteStream(this.fileName).getWriter();let n=0;for(let i=0;i<this.totalChunks;i++){const r=i.toString();let c=await this.currentDB?.getItem(r);if(c||(c=await this.currentDB?.getItem(r)),!c)return void this.dispatchError(`\u8F93\u51FA\u5206\u7247\u7B2C${i+1}\uFF09\u4E2A\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u9519\u8BEF\u9000\u51FA\uFF01`);let v=new Response(c).body;if(v===null)return void this.dispatchError(`\u8F93\u51FA\u5206\u7247\u7B2C${i+1}\uFF09\u4E2A\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u9519\u8BEF\u9000\u51FA\uFF01`);const y=v.getReader();for(;;){const{done:w,value:S}=await y.read();if(w)break;await t.write(S)}n++,this.outputProgress(n),this.dispatchInfo(`\u5B8C\u6210\u7B2C${i+1}\u4E2A\u5206\u7247\u8F93\u51FA`)}t.close(),Vt.dropInstance({name:this.fileID}),this.dispatch("success"),this.isStarting=!1,this.dispatchInfo("\u5B8C\u6210\u6587\u4EF6\u4E0B\u8F7D")}}}const cr=Object.prototype.toString;function Y(e,t){return cr.call(e)===`[object ${t}]`}function Te(e){return Y(e,"Function")}const Fn=e=>e!==void 0,De=e=>!Fn(e);function Ne(e){return e===null}function ur(e){return De(e)&&Ne(e)}function lr(e){return De(e)||Ne(e)}const xt=e=>e!==null&&Y(e,"Object");function hr(e){return Y(e,"Date")}function dr(e){return Y(e,"Number")}function fr(e){return Y(e,"AsyncFunction")}function pr(e){return Y(e,"Promise")&&xt(e)&&Te(e.then)&&Te(e.catch)}function Kt(e){return Y(e,"String")}function mr(e){return e===!0||e===!1||Y(e,"Boolean")}function Hn(e){return e&&Array.isArray(e)}const gr=()=>typeof window<"u",vr=e=>typeof window<"u"&&Y(e,"Window"),yr=e=>xt(e)&&!!e.tagName,wr=typeof window>"u";function br(e){return e&&["IMAGE","IMG"].includes(e.tagName)}function Sr(e){return e==null||(Kt(e)||Hn(e)?e.length===0:!!xt(e)&&JSON.stringify(e)==="{}")}function Cr(e){return Y(e,"Error")}function xr(e){return Y(e,"WeakSet")}function Er(e){return Y(e,"WeakMap")}function kr(e){return Y(e,"Symbol")}function zr(e){return Y(e,"Map")}const Mr=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);function _r(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}function qn(e={},t={}){let n;for(n in t)e[n]=xt(e[n])?qn(e[n],t[n]):e[n]=t[n];return e}function Gn(e){const t=function(w){if(!w)return;const S=w,E=[];if(S)for(let z of S){const L=Xn(z);L&&E.push(L)}return E}(e.bussinessRoutes),n=function(w){if(!w)return;const S=w;if(S&&S.length>0){const E=[];return S.forEach(z=>{const L=Vn(z);L&&E.push(L)}),E}}(e.widgetMenuConfig),i=function(w){if(!!w&&w.length>0){const S=[];return w.forEach(E=>{const z=function(L){if(!!L)return{id:L.id,label:L.label,container:L.container,preload:L.preload,afterid:L.afterid,bindid:L.bindid,group:L.group}}(E);z&&S.push(z)}),S}}(e.widgetConfig),r=(c=e.functionList)&&c.length>0?c:void 0;var c;const v=e.pkgObject.version,y=e.pkgObject.name;return{id:function(w,S){const E=`${w}_${S}`;return lt.MD5(E)}(y,v),name:I.Config.UI.SiteTitle,group:I.Config.UI.Group,product:y,version:v,routes:t,widgetMenu:n,widgets:i,functions:r}}function Xn(e){if(e){let t=0;e.meta?.hidden&&(t=1);let n={path:e.path,name:e.name,title:e.meta?.title,type:t,index:e.meta?.index};if(e.children){const i=[];for(let r of e.children){const c=Xn(r);c&&i.push(c)}i.length>0&&(n.children=i)}return n}}function Vn(e){if(!e)return;const t={name:e.name,index:e.index,path:e.path,type:e.type};return e.children&&e.children.length>0&&(t.children=[],e.children.forEach(n=>{const i=Vn(n);i&&t.children?.push(i)})),t}function Rr(e,t="IconifyList.ts"){let n="",i=`const iconlist={
3
+ `,r=0;e.forEach(c=>{const v=c.split(":");if(v&&v.length===2){const y="icon"+r;n+=`import ${y} from '~icons/${v[0]}/${v[1]}'
4
+ `,i+=` '${c}':${y},
5
+ `,r++}}),r>0&&(i+=`};
6
+ `,Xt(n+i+"export default iconlist;","IconifyList.ts"))}function Ir(e,t){const n=Gn(e);Ln(n,t),I.Message?.msg("\u5BFC\u51FA\u7CFB\u7EDF\u529F\u80FD\u6743\u9650\u6587\u4EF6\u6210\u529F\uFF01")}const J=wn({panelGroups:{}}),Kn=()=>({useGroupAccordion:e=>pt(()=>J.panelGroups[e].accordion),setGroupAccordionStatus:(e,t)=>{J.panelGroups[e]={...J.panelGroups[e],accordion:t}},panelExpanded:(e,t)=>pt(()=>J.panelGroups[e]?.panelExpandStatus?.[t]||!1),setPanelExpandedStatus:(e,t,n)=>{J.panelGroups[e]={...J.panelGroups[e],panelExpandStatus:{...J.panelGroups[e]?.panelExpandStatus||{},[t]:n}}},togglePanelExpandedStatus:(e,t)=>{J.panelGroups[e].accordion&&(J.panelGroups[e].panelExpandStatus[t]||Object.keys(J.panelGroups[e].panelExpandStatus).forEach(n=>{J.panelGroups[e].panelExpandStatus[n]=!1})),J.panelGroups[e].panelExpandStatus[t]=!J.panelGroups[e].panelExpandStatus[t]}}),Ue=e=>e>255?255:e<0?0:e,Yt=(e,t)=>{const n=e.replace("#",""),i=parseInt(n,16),r=Ue((i>>16)+t),c=Ue((i>>8&255)+t);return"#"+(Ue((255&i)+t)|c<<8|r<<16).toString(16)};var Jt=Bt({name:"VueCollapsiblePanelGroup",props:{accordion:{type:Boolean,default:!1},baseColor:{type:String,default:"#333333"}},setup(e){const t=nt(`group-${qt()}`),{setGroupAccordionStatus:n}=Kn(),i={"--base-color":e.baseColor,"--border-color":Yt(e.baseColor,180),"--bg-color-header":Yt(e.baseColor,140),"--bg-color-header-hover":Yt(e.baseColor,190),"--bg-color-header-active":Yt(e.baseColor,200),"--bg-color-body":"#fff"};return n(t.value,e.accordion),{idGroup:t,cssColorVars:i}}});const Lr=["data-id-group"];Jt.render=function(e,t,n,i,r,c){return H(),tt("div",{"data-id-group":e.idGroup,style:yt(e.cssColorVars),class:"vcpg"},[ft(e.$slots,"default")],12,Lr)},Jt.__scopeId="data-v-23ab5317",Jt.__file="src/controls/collapsepanel/VCollapsiblePanelGroup.vue";var Zt=Bt({name:"VueCollapsiblePanel",props:{expanded:{type:Boolean,default:!0}},setup(e,t){const n=`panel-${qt()}`,i=nt(),r=nt(),c=nt(),{panelExpanded:v,togglePanelExpandedStatus:y,setPanelExpandedStatus:w}=Kn(),S=pt(()=>({hasContent:t.slots.content&&t.slots.content()[0].children.length>0,dataKey:qt()})),E=pt(()=>i.value?.parentElement?.getAttribute("data-id-group")||""),z=pt(()=>v(E.value,n).value&&S.value.hasContent);return bn(()=>{w(E.value,n,e.expanded)}),ro(()=>{(async()=>(await Sn(),r.value&&c.value&&(r.value.style.height=`${Math.min(c.value.scrollHeight,r.value.scrollHeight)}px`)))()}),{body:S,panelRef:i,bodyRef:r,bodyContentRef:c,isExpanded:z,collapse:L=>{L.style.height="0"},expand:L=>{L.style.height=`${L.scrollHeight}px`},toggle:()=>{S.value.hasContent&&y(E.value,n)},toggleIcon:`
3
7
  <svg
4
8
  width="24px"
5
9
  height="24px"
@@ -9,4 +13,4 @@ import{h as Hi,openBlock as H,createElementBlock as tt,normalizeStyle as yt,rend
9
13
  >
10
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"/>
11
15
  </svg>
12
- `}}});const gr={class:"vcp__header-title"},vr={key:0,class:"vcp__header-icon"},yr=["innerHTML"],wr={key:0,ref:"bodyRef",class:"vcp__body"},br={ref:"bodyContentRef",class:"vcp__body-content"};function Oe(e){return window.TouchEvent&&e instanceof TouchEvent}Kt.render=function(e,t,n,i,r,c){return H(),tt("section",{ref:"panelRef",class:Xi(["vcp",{"vcp--expanded":e.isExpanded,"vcp--expandable":e.body.hasContent}])},[K("header",{class:"vcp__header",onClick:t[0]||(t[0]=(...y)=>e.toggle&&e.toggle(...y))},[K("div",gr,[dt(e.$slots,"title")]),e.body.hasContent?(H(),tt("div",vr,[dt(e.$slots,"icon",{},()=>[K("span",{innerHTML:e.toggleIcon},null,8,yr)])])):kt("v-if",!0)]),vn(yn,{"data-key":e.body.dataKey,name:"slide",onBeforeEnter:e.collapse,onEnter:e.expand,onBeforeLeave:e.expand,onLeave:e.collapse},{default:jt(()=>[e.isExpanded?(H(),tt("div",wr,[K("div",br,[dt(e.$slots,"content")],512)],512)):kt("v-if",!0)]),_:3},8,["data-key","onBeforeEnter","onEnter","onBeforeLeave","onLeave"])],2)},Kt.__scopeId="data-v-08c94cf8",Kt.__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 Ue(this.clientX,this.clientY)}static bindDown(t,n,i,r=!1){const c=v=>{n(new Z(v))},y=v=>{v.touches.length===1&&n(new Z(v)),v.touches.length>1&&i&&i(new Z(v))};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 Z(y))},c=y=>{y.touches.length===1&&n(new Z(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 Z(y))},c=y=>{y.touches.length===0&&n(new Z(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}){Oe(this.e)?n&&n(this.e):t&&t(this.e)}}class Ue{x;y;constructor(t,n){this.x=t,this.y=n}clone(){return new Ue(this.x,this.y)}}class Sr{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 Cr{_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=Jt(this._group),i=Jt(t);n.splice(n.indexOf(this),1),i.push(this),Fn()}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(Jt(this._group)),Fn()}}const Yt=new Map;function Jt(e){return Yt.has(e)||Yt.set(e,[]),Yt.get(e)}function Wn(e,t){return e>t?-Wn(t,e):e<0&&t>=0?1:e-t}function Fn(){let e=0;for(const t of function(n){const i=[];return n.forEach((r,c)=>i.push(c)),i}(Yt).sort(Wn))for(const n of Jt(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=Zt(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 Zt(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 xr{container;options;handles;constructor(t,n){if(this.container=t,this.options=n,t&&n){this.handles=$n.map(b=>new b(t,this));const{width:i,height:r}=je(t),c=n.maxWidth||window.innerWidth,y=n.maxHeight||window.innerHeight;let v=!1;(i<n.minWidth||i>c)&&(t.style.width=`${Hn(i,n.minWidth,c)}px`,v=!0),(r<n.minHeight||r>y)&&(t.style.height=`${Hn(r,n.minHeight,y)}px`,v=!0),v&&n.onResize&&n.onResize()}}teardown(){this.handles?.forEach(t=>t.teardown())}}const $n=[];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}=Zt(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}=Zt(this.container),c=this.helper.options,y=c.maxWidth||window.innerWidth,v=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-v,0),this.maxTop=r-c.minHeight,this.minBottom=n+c.minHeight,this.maxBottom=Math.min(n+v,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}=Zt(this.container),v=this.helper.options;v&&(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=`${v.minWidth}px`,this.container.style.left=`${this.maxLeft}px`):c<this.minRight?this.container.style.width=`${v.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=`${v.minHeight}px`,this.container.style.top=`${this.maxTop}px`):y<this.minBottom?this.container.style.height=`${v.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 Hn(e,t,n){return e<t?t:e>n?n:e}$n.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 Qt=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 Er=["disabled"];Qt.render=function(e,t,n,i,r,c){return H(),tt("div",{class:"btn",style:yt(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]=wn((...y)=>e.mousedown&&e.mousedown(...y),["stop"])),onTouchstart:t[3]||(t[3]=wn((...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},[dt(e.$slots,"default")],44,Er)},Qt.__scopeId="data-v-71662210",Qt.__file="src/controls/vuewindow/window/Button.vue";const We=new Set;function qn(e){return e!==null?parseFloat(e):0}function te(e){const t=window.getComputedStyle(e);return{width:Math.ceil([t.paddingLeft,t.width,t.paddingRight].map(qn).reduce((n,i)=>n+i)),height:Math.ceil([t.paddingTop,t.height,t.paddingBottom].map(qn).reduce((n,i)=>n+i))}}class Xn{width;height;constructor(t,n){this.width=t,this.height=n}}function kr(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 zr(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 ee=[];var ne=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:Qt},setup(e,{emit:t}){const n=Gi();if(!n)return;const{proxy:i}=n;let r=0,c,y,v;const b=nt(e.isOpen),C=()=>{ee.push(i),v=new Cr(e.zGroup,z),e.isOpen&&(gn(()=>{r++==0&&(d(i),function(){const I=M.value,{width:L,height:O}=je(I);let U,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")U=e.left,j=e.top;else{const $=e.positionHint||"auto";switch($){case"auto":{let X=20,V=50,it=0;do{if(ee.every(Q=>{if(!Q.isOpen||i==Q)return!0;const rt=kr(Q);if(rt==null)return!0;const{left:se,top:ae}=rt;return zr(se,ae,X,V)>16}))break;X=(X+40)%(window.innerWidth-200),V=(V+40)%(window.innerHeight-200)}while(++it<100);U=X,j=V}break;case"center":U=(window.innerWidth-L)/2,j=(window.innerHeight-O)/2,console.log(U,j,window.innerWidth,window.innerHeight,"111111");break;default:try{const X=$.split("/").map(Number);if(X.length!=2)throw null;const[V,it]=X;if(!isFinite(V)||!isFinite(it))throw null;U=V>=0?V:window.innerWidth-L+V,j=it>=0?it:window.innerHeight-O+it}catch{throw new Error(`invalid position string: ${$}`)}}}I&&(I.style.left=`${U}px`,I.style.top=`${j}px`)}()),e.resizable&&l(),P(),c=new Sr(D.value,M.value,{onMove:()=>P(),onMoveStart:()=>t("move-start"),onMoveEnd:()=>t("move-end")}),e.resizable&&function(){const{height:I}=je(D.value);y=new xr(M.value,{onResize:()=>l(),onResizeStart:()=>t("resize-start"),onResizeEnd:()=>t("resize-end"),minWidth:e.minWidth,minHeight:e.minHeight+I,maxWidth:e.maxWidth,maxHeight:e.maxHeight?e.maxHeight+I:void 0})}()}),e.activateWhenOpen&&R()),We.add(i)};function z(I){w.value.zIndex=`${I}`}const M=nt(null),D=nt(null),T=nt(null);function R(){v.raise(),t("activate")}const w=nt({...e.windowStyle.window,zIndex:"auto",overflow:e.overflow}),u=ft(()=>e.windowStyle.titlebar),h=ft(()=>{const I={...e.windowStyle.content};return e.resizable?I.padding="0":e.padding!=null&&(I.padding=`${e.padding}px`),e.isScrollable&&(I.overflow="auto"),I});function d(I){const{width:L,height:O,top:U,left:j}=I,$=M;if($&&L!=null&&($.value.style.width=`${L}px`),O!=null){const X=D.value;if(X){const V=te(X).height;$.value.style.height=`${O+V}px`}}$&&j!=null&&($.value.style.left=`${j}px`),$&&U!=null&&($.value.style.top=`${U}px`)}function l(I=!0){const L=M.value,O=D.value,U=T.value;if(U&&L&&O){const{width:j,height:$}=te(U),{width:X,height:V}=te(L),it=te(O).height,Q=X-(U.offsetWidth-j),rt=V-it-(U.offsetHeight-$);U.style.width=`${Q}px`,U.style.height=`${rt}px`,p(),t("resize",new Xn(Q,rt)),I&&(t("update:width",Q),t("update:height",rt))}}function p(){const I=M.value;if(I){const L=I.getBoundingClientRect();L.left<0&&(w.value.left="0px"),L.top<0&&(w.value.top="0px"),L.right>window.innerWidth&&(w.value.left=window.innerWidth-L.width+"px"),L.bottom>window.innerHeight&&(w.value.top=window.innerHeight-L.height+"px")}}function P(I=!0){p();const L=M.value;if(L){const{left:O,top:U}=L.getBoundingClientRect();I&&(t("update:left",O),t("update:top",U))}}return Wt(()=>e.isOpen,I=>{b.value=I}),Wt(()=>e.zGroup,I=>{v.group=I}),Wt(()=>e.width,I=>{d({width:I}),l(!1)}),Wt(()=>e.height,I=>{d({height:I}),l(!1)}),mn(()=>{C()}),Vi(()=>{We.delete(this),v.unregister(),y&&y.teardown(),c&&c.teardown(),ee.splice(ee.indexOf(i),1)}),{isOpen:b,windowEl:M,titlebar:D,content:T,activate:R,styleWindow:w,styleTitlebar:u,styleContent:h,closeButtonClick:function(){b.value=!1,t("closebuttonclick")}}}});const Mr={class:"title"},_r=Sn("\xD7");var Gn,vt;ne.render=function(e,t,n,i,r,c){const y=bn("myButton");return H(),at(yn,{name:"fade",onAfterLeave:t[2]||(t[2]=v=>e.$emit("close")),onAfterEnter:t[3]||(t[3]=v=>e.$emit("open"))},{default:jt(()=>[Ki(K("div",{class:"window",style:yt(e.styleWindow),ref:"windowEl",onMousedown:t[0]||(t[0]=(...v)=>e.activate&&e.activate(...v)),onTouchstart:t[1]||(t[1]=(...v)=>e.activate&&e.activate(...v))},[K("div",{class:"titlebar",style:yt(e.styleTitlebar),ref:"titlebar"},[K("div",Mr,[e.$slots.title?dt(e.$slots,"title",{key:0}):(H(),tt(wt,{key:1},[Sn(Yi(e.title),1)],2112))]),e.closeButton?(H(),at(y,{key:0,windowStyle:e.windowStyle,onClick:e.closeButtonClick},{default:jt(()=>[_r]),_:1},8,["windowStyle","onClick"])):kt("v-if",!0)],4),K("div",{class:"content",style:yt(e.styleContent),ref:"content"},[dt(e.$slots,"default")],4)],36),[[Ji,e.isOpen]])]),_:3})},ne.__file="src/controls/vuewindow/window/index.vue",(vt=Gn||(Gn={}))[vt.StyleBlack=0]="StyleBlack",vt[vt.StyleWhite=1]="StyleWhite",vt[vt.StyleMetal=2]="StyleMetal",vt[vt.StyleGrayblue=3]="StyleGrayblue";const Ir={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)"}},Rr={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)"}},Lr={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)"}},Pr={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)"}},Br=ne;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 Ar{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;Ct(t)?n=t:Xt(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=Cn(i.default);this.getContainerComponents(t.container).value.set(t.id,r),this.widgetsLoadedSet.add(t.id),A.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),A.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 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&&A.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=nt(new Map);return this.layoutMap.set(t,n),n}}addContainerComponent(t,n){}}var Fe=Bt({name:"MainContainer",props:{widgetConfig:{type:Array,required:!0,default:()=>[]},layoutStyle:{type:Object}},components:{},setup(e,{attrs:t,slots:n,emit:i}){const r=pn({topContainer:void 0,centerBackContainer:void 0,centerMainContainer:void 0,centerFrontContainer:void 0,bottomContainer:void 0,leftContainer:void 0,rightContainer:void 0});if(!A.LayoutManager){const T=new Ar(r,e.widgetConfig);A.LayoutManager=T,T.preloadWidgets()}const c=M(q.top),y=M(q.centerBack),v=M(q.centerFront),b=M(q.left),C=M(q.right),z=M(q.bottom);function M(T){return A.LayoutManager?.getContainerComponents(T)}const D=ft(()=>e.layoutStyle);return{...Zi(r),topContainerComponents:c,centerbackComponents:y,centerfrontComponents:v,leftContainerComponents:b,rightContainerComponents:C,bottomContainerComponents:z,containerStyle:D}}});const Dr={ref:"topContainer",class:"topContainer"},Tr={ref:"centerBackContainer",class:"centerdiv backContainer"},Nr={ref:"centerMainContainer",class:"centerdiv mainContainer"},Or={ref:"centerFrontContainer",class:"centerdiv centerContainer"},Ur={ref:"leftContainer",class:"leftContainer"},jr={ref:"rightContainer",class:"rightContainer"},Wr={ref:"bottomContainer",class:"bottomContainer"};Fe.render=function(e,t,n,i,r,c){const y=bn("router-view");return H(),tt("div",{class:"layoutContainer",style:yt(e.containerStyle)},[K("div",Dr,[(H(!0),tt(wt,null,zt(e.topContainerComponents,([v,b])=>(H(),at(bt(b),{key:v}))),128))],512),K("div",null,[kt(" \u5E95\u5C42-\u4E3B\u5BB9\u5668 "),K("div",Tr,[(H(!0),tt(wt,null,zt(e.centerbackComponents,([v,b])=>(H(),at(bt(b),{key:v}))),128))],512),kt(" \u4E3B\u8981\u5BB9\u5668 "),K("div",Nr,[vn(y,null,{default:jt(({Component:v})=>[(H(),at(bt(v)))]),_:1})],512),kt(" \u6D6E\u52A8-\u4E3B\u5BB9\u5668 "),K("div",Or,[(H(!0),tt(wt,null,zt(e.centerfrontComponents,([v,b])=>(H(),at(bt(b),{key:v}))),128))],512),K("div",Ur,[(H(!0),tt(wt,null,zt(e.leftContainerComponents,([v,b])=>(H(),at(bt(b),{key:v}))),128))],512),K("div",jr,[(H(!0),tt(wt,null,zt(e.rightContainerComponents,([v,b])=>(H(),at(bt(b),{key:v}))),128))],512)]),K("div",Wr,[(H(!0),tt(wt,null,zt(e.bottomContainerComponents,([v,b])=>(H(),at(bt(b),{key:v}))),128))],512)],4)},Fe.__file="src/controls/layoutcontainer/layout.vue";class Fr{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;Ct(t)?n=t:Xt(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=Cn(i.default);this.getContainerComponents(t.container).value.set(t.id,r),this.widgetsLoadedSet.add(t.id),A.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),A.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 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&&A.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=nt(new Map);return this.layoutMap.set(t,n),n}}addContainerComponent(t,n){}}const ie=new Map,$e=new Map;let oe;const $r={getDefaultClient(){if(oe||(oe=new Dt(SysConfig.DefaultHproseAPI)),!oe)throw Error("HproseProxy\u5BF9\u8C61\u4E3A\u7A7A");return oe},registerHprose(e,t){const n=$e.get(e);if(!n){const i=new Dt(t);ie.set(e,i)}return n},getHprose:e=>$e?.get(e),getProxyHprose:e=>ie.get(e),unregisterHprose(e){ie.get(e)&&($e.delete(e),ie.delete(e))}},Hr=4e3,xt={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"},qr=A.Config.ServiceURL.LoginAuthURL;function He(){const e=Mn();e&&ct(xt.RefreshToken,qr,{refreshToken:e}).then(t=>{re(t.data)})}function Vn(e){A.User||(A.User={id:e.id,name:e.name});const t=new Date().getTime(),n=new Date(e.expire).getTime()-t;n>0&&(n<=4e3?He():setTimeout(He,n-4e3))}function re(e){A.User&&(A.User.doubleToken=e);const t=new Date().getTime(),n=new Date(e.accessToken.expires).getTime()-t;if(n>0&&A.User){const i={id:A.User.id,name:A.User.name,token:e.accessToken.tokenContent,expire:e.accessToken.expires,refresh:e.refreshToken.tokenContent};mt.set("access_token",i,n/1e3),Vn(i)}else mt.remove("access_token")}function qe(e){A.User=e}const Nt=A.Config.ServiceURL.LoginAuthURL;async function Xr(e){const t=(await ct(xt.Login,Nt,e))?.data;return t&&t.isSuccess&&(qe(t.resultValue),re(t.resultValue.doubleToken)),t}async function Gr(e){const t=(await ct(xt.CheckLogin,Nt,e))?.data;return t&&t.isSuccess&&(qe(t.resultValue),re(t.resultValue.doubleToken)),t}function Vr(e){return ct(xt.ChangePWD,Nt,e)}function Kr(){const e=Rt();e&&(Ie(xt.Logout,Nt,{token:e.token,reftoken:e.refresh}),ze())}function Yr(e){return ct(xt.CheckToken,Nt,{token:e})}export{Go as BigFileDownload,ke as Download,wo as DownloadByUrl,St as EnumColor,A as Global,$r as GlobalHprose,It as GlobalMitt,pt as H5Tool,At as HproseClient,yo as HttpDownload,vo as JsonDownload,Fe as LayoutContainer,q as LayoutContainerEnum,Fr as LayoutManager,pr as ObjToUrlParams,ge as Pane,Dt as ProxyClient,go as SaveAs,eo as Splitpanes,we as Storage,Ft as StringUtils,Ir as StyleBlack,Pr as StyleGrayblue,Lr as StyleMetal,Rr as StyleWhite,G as SysEvents,Hr as TOKEN_REFRESH_TIME,xt as USER_TOKEN_API,Kt as VCollapsiblePanel,Vt as VCollapsiblePanelGroup,ne as VWindow,Xn as WindowResizeEvent,Br as WindowType,mo as calculateBestTextColor,Vr as changePWD,Vn as checkDoRefreshToken,Gr as checkLogin,Yr as checkToken,ze as clearLocalToken,ho as colorIsDark,jo as createFileUpload,fo as darken,Un as deepMerge,He as doRefreshToken,ko as get,Mo as getData,ro as getHexColor,Rt as getLocalToken,Fo as getLockState,ao as getLongHexColor,In as getProxyClient,so as getRGBColor,uo as getRGBColorFromHSLA,Mn as getRefreshToken,Se as hexToRGB,_n as init,xo as initDefaultProxyClient,Co as initXFrame,Y as is,On as isArray,Qo as isAsyncFunction,er as isBoolean,nr as isClient,Jo as isDate,Nn as isDef,or as isElement,ar as isEmpty,co as isEnumColor,cr as isError,Ae as isFunction,Ht as isHexColor,sr as isImageDom,dr as isMap,Te as isNull,Ko as isNullAndUnDef,Yo as isNullOrUnDef,Zo as isNumber,Ct as isObject,tr as isPromise,rr as isServer,Xt as isString,hr as isSymbol,De as isUnDef,fr as isValidURL,lr as isWeakMap,ur as isWeakSet,ir as isWindow,Wo as jquery,po as lighten,Xr as login,Kr as logout,oo as newGuid,$o as onLockListener,zo as post,ct as requestGet,Ie as requestPost,Eo as requestPostBody,lo as rgbToHex,re as setLocalToken,qe as setUser,bo as sleep,io as storage,mt as storageHelper,Ho as unLockListener,$t as uuid};
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};