xframelib 0.4.0 → 0.4.5

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