xframelib 0.3.9 → 0.4.3

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