xframelib 1.1.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,12 +1,12 @@
1
- import{defineComponent as e,ref as t,onErrorCaptured as n,renderSlot as r,createBlock as i,createTextVNode as o,toDisplayString as s,openBlock as a,Suspense as l,withCtx as c,createElementVNode as u,resolveComponent as h,createVNode as d,createCommentVNode as f,KeepAlive as p,resolveDynamicComponent as g,markRaw as m,nextTick as v,reactive as y,watch as w,computed as b,onMounted as S,onUnmounted as C,createElementBlock as E,normalizeStyle as x,Fragment as k,renderList as T,normalizeClass as z,TransitionGroup as M,Transition as A,withDirectives as _,withModifiers as R,unref as L,vShow as I,useCssVars as D,h as N}from"vue";import P from"axios";import{Client as O,ClientContext as B}from"@hprose/rpc-core";import{ByteStream as F,Writer as W,Reader as U,ValueReader as j}from"@hprose/io";import{HttpTransport as $}from"@hprose/rpc-html5";import H from"iconv-lite";export{DecodeOptions,EncodeOptions,default as iconv}from"iconv-lite";import*as G from"@microsoft/signalr";import q from"qs";import{Icon as X}from"@iconify/vue";function V(e){return{all:e=e||new Map,on(t,n){const r=e.get(t);r?r.push(n):e.set(t,[n])},off(t,n){const r=e.get(t);r&&(n?r.splice(r.indexOf(n)>>>0,1):e.set(t,[]))},emit(t,n){let r=e.get(t);r&&r.slice().map((e=>{e(n)})),r=e.get("*"),r&&r.slice().map((e=>{e(t,n)}))}}}const K=V();var Y="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Z(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var J,Q={exports:{}},ee=Q.exports,te=(J||(J=1,function(e){var t,n;t=ee,n=function(){var e=function(){},t="undefined",n=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),r=["trace","debug","info","warn","error"],i={},o=null;function s(e,t){var n=e[t];if("function"==typeof n.bind)return n.bind(e);try{return Function.prototype.bind.call(n,e)}catch(t){return function(){return Function.prototype.apply.apply(n,[e,arguments])}}}function a(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function l(){for(var n=this.getLevel(),i=0;i<r.length;i++){var o=r[i];this[o]=i<n?e:this.methodFactory(o,n,this.name)}if(this.log=this.debug,typeof console===t&&n<this.levels.SILENT)return"No console available for logging"}function c(e){return function(){typeof console!==t&&(l.call(this),this[e].apply(this,arguments))}}function u(r,i,o){return function(r){return"debug"===r&&(r="log"),typeof console!==t&&("trace"===r&&n?a:void 0!==console[r]?s(console,r):void 0!==console.log?s(console,"log"):e)}(r)||c.apply(this,arguments)}function h(e,n){var s,a,c,h=this,d="loglevel";function f(){var e;if(typeof window!==t&&d){try{e=window.localStorage[d]}catch(e){}if(typeof e===t)try{var n=window.document.cookie,r=encodeURIComponent(d),i=n.indexOf(r+"=");-1!==i&&(e=/^([^;]+)/.exec(n.slice(i+r.length+1))[1])}catch(e){}return void 0===h.levels[e]&&(e=void 0),e}}function p(e){var t=e;if("string"==typeof t&&void 0!==h.levels[t.toUpperCase()]&&(t=h.levels[t.toUpperCase()]),"number"==typeof t&&t>=0&&t<=h.levels.SILENT)return t;throw new TypeError("log.setLevel() called with invalid level: "+e)}"string"==typeof e?d+=":"+e:"symbol"==typeof e&&(d=void 0),h.name=e,h.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},h.methodFactory=n||u,h.getLevel=function(){return null!=c?c:null!=a?a:s},h.setLevel=function(e,n){return c=p(e),!1!==n&&function(e){var n=(r[e]||"silent").toUpperCase();if(typeof window!==t&&d){try{return void(window.localStorage[d]=n)}catch(e){}try{window.document.cookie=encodeURIComponent(d)+"="+n+";"}catch(e){}}}(c),l.call(h)},h.setDefaultLevel=function(e){a=p(e),f()||h.setLevel(e,!1)},h.resetLevel=function(){c=null,function(){if(typeof window!==t&&d){try{window.localStorage.removeItem(d)}catch(e){}try{window.document.cookie=encodeURIComponent(d)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch(e){}}}(),l.call(h)},h.enableAll=function(e){h.setLevel(h.levels.TRACE,e)},h.disableAll=function(e){h.setLevel(h.levels.SILENT,e)},h.rebuild=function(){if(o!==h&&(s=p(o.getLevel())),l.call(h),o===h)for(var e in i)i[e].rebuild()},s=p(o?o.getLevel():"WARN");var g=f();null!=g&&(c=p(g)),l.call(h)}(o=new h).getLogger=function(e){if("symbol"!=typeof e&&"string"!=typeof e||""===e)throw new TypeError("You must supply a name when creating a logger.");var t=i[e];return t||(t=i[e]=new h(e,o.methodFactory)),t};var d=typeof window!==t?window.log:void 0;return o.noConflict=function(){return typeof window!==t&&window.log===o&&(window.log=d),o},o.getLoggers=function(){return i},o.default=o,o},e.exports?e.exports=n():t.log=n()}(Q)),Q.exports);const ne={HproseServiceErrorEvent:"HproseServiceError",WebAPIErrorEvent:"WebAPIError",AlertInfoEvent:"AlertInfoEvent",CommonWarnEvent:"CommonWarnEvent",WidgetLoadedEvent:"WidgetLoaded",WidgetLoaded:"WidgetLoaded",WidgetToUnloadEvent:"WidgetToUnloadEvent",WidgetUnLoadedEvent:"WidgetUnLoaded",WidgetLoadedErrorEvent:"WidgetLoadedError",WidgetVisibleChanged:"WidgetVisibleChanged",AxiosRequestErrorEvent:"AxiosRequestErrorEvent",LayoutContainerLoaded:"LayoutContainerLoaded",ModalContainerWidget_LoadModal:"ModalContainerWidget_LoadModal",ModalContainerWidget_CloseModal:"ModalContainerWidget_CloseModal",WidgetClosed:"WidgetClosed"};class re{message;eventBus;constructor(e,t=void 0){e&&(this.message=e),t&&(this.eventBus=t)}msg(e,t=3,n="success"){if(this.message)if("function"==typeof this.message)this.message({type:n,message:e,duration:t});else switch(n){case"info":this.message.info(e,t);break;case"success":this.message.success(e,t);break;case"warning":this.message.warn?this.message.warn(e,t):this.message.warning&&this.message.warning(e,t);break;case"error":this.message.error(e,t)}else{switch(n){case"info":case"success":console.log(e);break;case"warning":console.warn(e);break;case"error":n="dark",console.error(e)}this.eventBus&&this.eventBus.emit(ne.AlertInfoEvent,{type:n,info:e})}}info(e,t=3){this.msg(e,t,"info")}warn(e,t=3){this.msg(e,t,"warning")}err(e,t=3){this.msg(e,t,"error")}success(e,t=3){this.msg(e,t,"success")}}let ie=globalThis.SysConfig,oe=!1,se=!1;Function.prototype.promise=function(...e){const t=this;return function(){const n=e||[];return new Promise(((r,i)=>{n.push((function(e,t){e?i(e):r(t)})),t.apply(t,e)}))}()};const ae={Config:globalThis.SysConfig,EventBus:K,DefaultProxyClient:null,Axios:P,Message:new re(void 0,K),LayoutMap:new Map,getLayoutManager:e=>{if(!ce.WidgetConfigList||0===ce.WidgetConfigList.length)return;const t=ce.WidgetConfigList.find((t=>t.id===e));if(t){const e=t.layoutID;if(e&&ce.LayoutMap.has(e))return ce.LayoutMap.get(e)}},Logger:e=>{oe||(ie.UI.ProductLog?te.enableAll():te.setDefaultLevel("warn"),oe=!0);const t=e||"default";return te.getLogger(t)},Loading:(e="end")=>{if("end"===e)setTimeout((()=>{document.getElementById("apploading")?.remove()}),300),se=!0;else if(e)if(se){const t=`加载Widget:${e}……`;K.emit("statusmessage",t)}else{const t=document.getElementById("app-loading-info");t&&(t.innerHTML=`正在加载:${e}……`)}}},le="99,111,110,115,116,32,118,97,108,105,100,75,101,121,115,61,91,39,54,65,50,53,51,65,69,70,54,54,68,48,69,56,65,66,57,54,49,55,49,55,51,49,50,52,50,66,65,70,53,65,39,44,39,66,54,53,48,52,57,53,55,54,55,49,49,56,66,50,70,50,50,48,55,67,66,52,69,70,51,49,51,52,49,65,68,39,44,39,54,66,52,66,57,49,65,67,52,51,56,70,70,57,69,54,65,69,52,68,49,49,70,48,50,70,56,51,50,68,51,52,39,44,39,70,54,69,52,57,50,52,57,57,69,70,57,57,48,65,49,50,66,57,66,57,55,48,66,54,57,68,69,68,49,48,70,39,44,39,57,67,55,55,56,67,66,69,66,56,54,51,70,68,68,52,70,49,66,65,51,56,49,52,50,69,48,52,53,53,69,49,39,44,39,70,66,66,55,57,67,57,66,51,57,53,70,65,70,55,49,53,56,50,50,65,70,52,50,52,57,54,56,70,48,54,67,39,44,39,53,57,51,66,67,70,68,50,54,70,48,53,53,53,65,53,50,57,51,67,68,49,49,56,55,49,56,53,49,68,52,52,39,44,39,50,48,54,55,69,66,51,54,57,55,69,55,49,67,53,49,53,68,68,68,54,49,65,53,52,70,67,57,51,53,53,69,39,44,39,70,52,65,50,68,67,69,65,48,53,56,69,68,52,55,48,53,67,67,52,70,54,69,66,51,70,67,70,48,66,53,66,39,93,59,105,102,40,83,121,115,67,111,110,102,105,103,46,75,69,89,38,38,118,97,108,105,100,75,101,121,115,46,105,110,100,101,120,79,102,40,83,121,115,67,111,110,102,105,103,46,75,69,89,41,62,61,48,41,123,99,111,110,115,111,108,101,46,108,111,103,40,39,117,115,105,110,103,32,97,117,116,104,111,114,105,122,101,100,32,120,102,114,97,109,101,108,105,98,46,84,104,97,110,107,32,121,111,117,33,39,41,59,114,101,116,117,114,110,32,103,108,111,98,79,98,106,125,101,108,115,101,32,105,102,40,33,83,121,115,67,111,110,102,105,103,46,75,69,89,41,123,105,102,40,110,101,119,32,68,97,116,101,40,50,48,50,55,44,49,44,49,41,60,110,101,119,32,68,97,116,101,40,41,41,123,105,102,40,99,111,110,102,105,114,109,40,39,84,104,101,32,88,70,114,97,109,101,108,105,98,32,116,114,105,97,108,32,104,97,115,32,101,120,112,105,114,101,100,46,32,84,111,32,112,117,114,99,104,97,115,101,32,97,32,102,117,108,108,32,118,101,114,115,105,111,110,32,112,108,101,97,115,101,32,99,111,110,116,97,99,116,58,122,111,114,114,111,119,109,64,49,50,54,46,99,111,109,46,32,83,101,108,101,99,116,32,79,75,32,116,111,32,110,97,118,105,103,97,116,101,32,116,111,32,116,104,101,32,103,105,116,104,117,98,46,99,111,109,47,122,111,114,114,111,119,109,32,85,82,76,46,39,41,41,123,108,111,99,97,116,105,111,110,46,104,114,101,102,61,39,104,116,116,112,115,58,47,47,103,105,116,104,117,98,46,99,111,109,47,122,111,114,114,111,119,109,39,125,101,108,115,101,123,116,104,114,111,119,39,84,104,101,32,116,114,105,97,108,32,112,101,114,105,111,100,32,104,97,115,32,101,120,112,105,114,101,100,33,39,59,125,125,101,108,115,101,123,99,111,110,115,111,108,101,46,108,111,103,40,39,84,104,101,32,116,114,105,97,108,32,100,101,97,100,108,105,110,101,32,102,111,114,32,116,104,105,115,32,120,102,114,97,109,101,108,105,98,32,108,105,98,114,97,114,121,32,105,115,32,74,97,110,117,97,114,121,32,49,44,32,50,48,50,55,46,39,41,59,114,101,116,117,114,110,32,103,108,111,98,79,98,106,125,125,116,104,114,111,119,39,84,104,101,32,88,70,114,97,109,101,108,105,98,32,75,69,89,32,105,115,32,105,110,118,97,108,105,100,33,32,84,111,32,112,117,114,99,104,97,115,101,32,97,32,102,117,108,108,32,118,101,114,115,105,111,110,32,112,108,101,97,115,101,32,99,111,110,116,97,99,116,58,122,111,114,114,111,119,109,64,49,50,54,46,99,111,109,32,33,39,59".split(",").map((e=>Number(e)));new Function("globObj","isdev",String.fromCharCode(...le));const ce=ae;var ue=(e=>(e[e.top=0]="top",e[e.bottom=1]="bottom",e[e.centerBack=2]="centerBack",e[e.centerMain=3]="centerMain",e[e.centerFront=4]="centerFront",e[e.left=5]="left",e[e.right=6]="right",e))(ue||{});const he=(e,t)=>{const n=e.__vccOpts||e;for(const[r,i]of t)n[r]=i;return n},de=he(e({name:"SuspenseWithError",setup(){const e=t(null);return n((t=>(e.value="当前页面存在问题,无法渲染……",console.error("onErrorCaptured",t),!0))),{error:e}}}),[["render",function(e,t,n,h,d,f){return e.error?r(e.$slots,"error",{key:0},(()=>[o(s(e.error),1)])):(a(),i(l,{key:1},{default:c((()=>[r(e.$slots,"default")])),fallback:c((()=>[r(e.$slots,"fallback",{},(()=>[t[0]||(t[0]=u("div",null,"加载中……",-1))]))])),_:3}))}]]),fe=e({name:"RouterTransition",__name:"RouterTransition",setup:e=>(e,t)=>{const n=h("router-view");return a(),i(de,null,{default:c((()=>[d(n,null,{default:c((({Component:e,route:t})=>[(a(),i(p,null,[t.meta.keepAlive?(a(),i(g(e),{key:t.name})):f("",!0)],1024)),t.meta.keepAlive?f("",!0):(a(),i(g(e),{key:t.name}))])),_:1})])),_:1})}}),pe=Object.prototype.toString;function ge(e,t){return pe.call(e)===`[object ${t}]`}function me(e){return ge(e,"Function")}const ve=e=>void 0!==e,ye=e=>!ve(e);function we(e){return null===e}function be(e){return ye(e)&&we(e)}function Se(e){return ye(e)||we(e)}const Ce=e=>null!=e&&null!==e&&ge(e,"Object");function Ee(e){return ge(e,"Date")}function xe(e){return ge(e,"Number")}function ke(e){return ge(e,"AsyncFunction")}function Te(e){return ge(e,"Promise")&&Ce(e)&&me(e.then)&&me(e.catch)}function ze(e){return ge(e,"String")}function Me(e){return!0===e||!1===e||ge(e,"Boolean")}function Ae(e){return e&&Array.isArray(e)}const _e=()=>"undefined"!=typeof window,Re=e=>"undefined"!=typeof window&&ge(e,"Window"),Le=e=>pe.call(e).startsWith("[object HTML")&&!!e.tagName,Ie="undefined"==typeof window;function De(e){return e&&["IMAGE","IMG"].includes(e.tagName)}function Ne(e){return null==e||(ze(e)||Ae(e)?0===e.length:!!Ce(e)&&"{}"===JSON.stringify(e))}function Pe(e){return ge(e,"Error")}function Oe(e){return ge(e,"WeakSet")}function Be(e){return ge(e,"WeakMap")}function Fe(e){return ge(e,"Symbol")}function We(e){return ge(e,"Map")}const Ue=e=>/^(https?|ftp):\/\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}|([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:[0-9]+)*(\/($|[a-zA-Z0-9.,?'\\+&%$#=~_-]+))*$/.test(e);function je(e){return/^\s*[{[]/.test(String(e))}function $e(e){return e.includes("<kml ")&&e.includes('xmlns="http://www.opengis.net/kml/')}class He{static isNullOrEmpty=e=>null===e||""===e||void 0===e||0===e.length;static isNotEmpty=e=>null!==e&&""!==e&&void 0!==e&&0!==e.length;static toHump(e){return e.replace(/[\-\/\_](\w)/g,((e,t)=>t.toUpperCase())).replace("views","")}static getFileName(e){const t=e.lastIndexOf("/")+1;let n=e.substring(t);return n=decodeURI(n.split("?")[0]),n}static UpperFirst(e){return(e=e.toLowerCase()).replace(/\b\w|\s\w/g,(e=>e.toUpperCase()))}}class Ge{hproseURL;client;hproseProxy;static httpTransport;constructor(e){if(e&&!He.isNullOrEmpty(e)){if(Ge.httpTransport||(Ge.httpTransport=new $),this.client=new O(e),!this.client)throw Error("Hprose Client初始化错误");this.hproseURL=e,this.init()}}init(){this.client&&this.client.useServiceAsync().then((e=>{this.hproseProxy=e})).catch((e=>{String(e).indexOf("find this method ~")>0?(this.hproseProxy=this.client?.useService(),console.warn("旧版本不支持useServiceAsync")):K.emit(ne.HproseServiceErrorEvent,"初始化默认Hprose!")}))}async getProxy(){if(!this.hproseProxy)try{this.client&&(this.hproseProxy=await this.client.useServiceAsync())}catch(e){console.warn(e),this.hproseProxy=this.client?.useService()}return this.hproseProxy}async invoke(e,t,n){if(this.client)return await this.client.invoke(e,t,n)}encode(e,t,n){return this.client?this.client.codec.encode(e,t,n):void 0}decode(e,t){return this.client?this.client.codec.decode(e,t):void 0}}class qe{constructor(e="",t=globalThis.localStorage){this.prefixKey=e,this.storage=t}getKey(e){return`${this.prefixKey}${e}`.toUpperCase()}set(e,t,n=604800){const r=JSON.stringify({value:t,expire:null!==n?(new Date).getTime()+1e3*n:null});this.storage.setItem(this.getKey(e),r)}get(e,t=null){const n=this.storage.getItem(this.getKey(e));if(n)try{const t=JSON.parse(n),{value:r,expire:i}=t;if(null===i||i>=Date.now())return r;this.remove(this.getKey(e))}catch(e){return t}return t}getJsonObject(e){const t=this.storage.getItem(this.getKey(e));if(t)try{const n=JSON.parse(t);if(null===n.expire||n.expire>=Date.now())return n;this.remove(this.getKey(e))}catch(e){return}}remove(e){this.storage.removeItem(this.getKey(e))}clear(){this.storage.clear()}setCookie(e,t,n=604800){document.cookie=`${this.getKey(e)}=${t}; Max-Age=${n}`}getCookie(e){const t=document.cookie.split("; ");for(let n=0,r=t.length;n<r;n++){const r=t[n].split("=");if(r[0]===this.getKey(e))return r[1]}return""}removeCookie(e){this.setCookie(e,1,-1)}clearCookie(){const e=document.cookie.match(/[^ =;]+(?==)/g);if(e)for(let t=e.length;t--;)document.cookie=e[t]+"=0;expire="+new Date(0).toUTCString()}}const Xe=new qe("",globalThis.localStorage),Ve="access_token",Ke=new qe("user",globalThis.localStorage);function Ye(){return Ke.get(Ve)}function Ze(){Ke.remove(Ve)}function Je(){const e=Ye();return e?.refresh}class Qe{hproseClient;hpProxyObj;defaultContext=new B;constructor(e){this.hproseClient=new Ge(e),this.hpProxyObj=null}getClientContext(e,t){const n={};t&&(n.requestHeaders=t),n.httpRequestHeaders=e||{};const r=n.httpRequestHeaders,i=Ye();return i&&(r.token=i.token),ce.SystemID&&(r.sysid=ce.SystemID,ce.SystemGroup&&(r.sysgroup=ce.SystemGroup)),new B(n)}async getHproseProxy(){if(!this.hproseClient)throw new Error("HproseClient对象为构建,无法调用Hprose方法");if(!this.hpProxyObj){const e=await this.hproseClient.getProxy();this.hpProxyObj=e}return this.hpProxyObj||K.emit(ne.HproseServiceErrorEvent,"HproseProxy对象为空,无法调用Hprose方法!"),this.hpProxyObj}async hproseInvoke(e,t,n){if(!this.hproseClient)throw new Error("HproseClient对象为构建,无法调用Hprose方法");return await this.hproseClient.invoke(e,t,n)}async hproseInvokeContext(e,t,...n){if(!this.hproseClient)throw new Error("HproseClient对象为构建,无法调用Hprose方法");const r=Ye();return console.log(r,"userToken3"),r&&(t||(t=new B({httpRequestHeaders:{token:r.token}}))),await this.hproseClient.invoke(e,n,t)}async hproseInvokeEncode(e){const t=new F(e).toBytes(),n=await(this.hproseClient.client?.request(t,this.defaultContext));return n?this.hproseClient.client?.codec.decode(n,this.defaultContext):n}encodeRequest(e,...t){const n=this.hproseClient.client?.codec,r=n?.encode(e,t,this.defaultContext);return F.toString(r)}}var et,tt={exports:{}},nt=(et||(et=1,tt.exports=function(){var e=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function t(e,t){var n=e[0],r=e[1],i=e[2],o=e[3];r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+t[0]-680876936|0)<<7|n>>>25)+r|0)&r|~n&i)+t[1]-389564586|0)<<12|o>>>20)+n|0)&n|~o&r)+t[2]+606105819|0)<<17|i>>>15)+o|0)&o|~i&n)+t[3]-1044525330|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+t[4]-176418897|0)<<7|n>>>25)+r|0)&r|~n&i)+t[5]+1200080426|0)<<12|o>>>20)+n|0)&n|~o&r)+t[6]-1473231341|0)<<17|i>>>15)+o|0)&o|~i&n)+t[7]-45705983|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+t[8]+1770035416|0)<<7|n>>>25)+r|0)&r|~n&i)+t[9]-1958414417|0)<<12|o>>>20)+n|0)&n|~o&r)+t[10]-42063|0)<<17|i>>>15)+o|0)&o|~i&n)+t[11]-1990404162|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+t[12]+1804603682|0)<<7|n>>>25)+r|0)&r|~n&i)+t[13]-40341101|0)<<12|o>>>20)+n|0)&n|~o&r)+t[14]-1502002290|0)<<17|i>>>15)+o|0)&o|~i&n)+t[15]+1236535329|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+t[1]-165796510|0)<<5|n>>>27)+r|0)&i|r&~i)+t[6]-1069501632|0)<<9|o>>>23)+n|0)&r|n&~r)+t[11]+643717713|0)<<14|i>>>18)+o|0)&n|o&~n)+t[0]-373897302|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+t[5]-701558691|0)<<5|n>>>27)+r|0)&i|r&~i)+t[10]+38016083|0)<<9|o>>>23)+n|0)&r|n&~r)+t[15]-660478335|0)<<14|i>>>18)+o|0)&n|o&~n)+t[4]-405537848|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+t[9]+568446438|0)<<5|n>>>27)+r|0)&i|r&~i)+t[14]-1019803690|0)<<9|o>>>23)+n|0)&r|n&~r)+t[3]-187363961|0)<<14|i>>>18)+o|0)&n|o&~n)+t[8]+1163531501|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+t[13]-1444681467|0)<<5|n>>>27)+r|0)&i|r&~i)+t[2]-51403784|0)<<9|o>>>23)+n|0)&r|n&~r)+t[7]+1735328473|0)<<14|i>>>18)+o|0)&n|o&~n)+t[12]-1926607734|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+t[5]-378558|0)<<4|n>>>28)+r|0)^r^i)+t[8]-2022574463|0)<<11|o>>>21)+n|0)^n^r)+t[11]+1839030562|0)<<16|i>>>16)+o|0)^o^n)+t[14]-35309556|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+t[1]-1530992060|0)<<4|n>>>28)+r|0)^r^i)+t[4]+1272893353|0)<<11|o>>>21)+n|0)^n^r)+t[7]-155497632|0)<<16|i>>>16)+o|0)^o^n)+t[10]-1094730640|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+t[13]+681279174|0)<<4|n>>>28)+r|0)^r^i)+t[0]-358537222|0)<<11|o>>>21)+n|0)^n^r)+t[3]-722521979|0)<<16|i>>>16)+o|0)^o^n)+t[6]+76029189|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+t[9]-640364487|0)<<4|n>>>28)+r|0)^r^i)+t[12]-421815835|0)<<11|o>>>21)+n|0)^n^r)+t[15]+530742520|0)<<16|i>>>16)+o|0)^o^n)+t[2]-995338651|0)<<23|r>>>9)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+t[0]-198630844|0)<<6|n>>>26)+r|0)|~i))+t[7]+1126891415|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+t[14]-1416354905|0)<<15|i>>>17)+o|0)|~n))+t[5]-57434055|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+t[12]+1700485571|0)<<6|n>>>26)+r|0)|~i))+t[3]-1894986606|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+t[10]-1051523|0)<<15|i>>>17)+o|0)|~n))+t[1]-2054922799|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+t[8]+1873313359|0)<<6|n>>>26)+r|0)|~i))+t[15]-30611744|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+t[6]-1560198380|0)<<15|i>>>17)+o|0)|~n))+t[13]+1309151649|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+t[4]-145523070|0)<<6|n>>>26)+r|0)|~i))+t[11]-1120210379|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+t[2]+718787259|0)<<15|i>>>17)+o|0)|~n))+t[9]-343485551|0)<<21|r>>>11)+i|0,e[0]=n+e[0]|0,e[1]=r+e[1]|0,e[2]=i+e[2]|0,e[3]=o+e[3]|0}function n(e){var t,n=[];for(t=0;t<64;t+=4)n[t>>2]=e.charCodeAt(t)+(e.charCodeAt(t+1)<<8)+(e.charCodeAt(t+2)<<16)+(e.charCodeAt(t+3)<<24);return n}function r(e){var t,n=[];for(t=0;t<64;t+=4)n[t>>2]=e[t]+(e[t+1]<<8)+(e[t+2]<<16)+(e[t+3]<<24);return n}function i(e){var r,i,o,s,a,l,c=e.length,u=[1732584193,-271733879,-1732584194,271733878];for(r=64;r<=c;r+=64)t(u,n(e.substring(r-64,r)));for(i=(e=e.substring(r-64)).length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],r=0;r<i;r+=1)o[r>>2]|=e.charCodeAt(r)<<(r%4<<3);if(o[r>>2]|=128<<(r%4<<3),r>55)for(t(u,o),r=0;r<16;r+=1)o[r]=0;return s=(s=8*c).toString(16).match(/(.*?)(.{0,8})$/),a=parseInt(s[2],16),l=parseInt(s[1],16)||0,o[14]=a,o[15]=l,t(u,o),u}function o(e){var n,i,o,s,a,l,c=e.length,u=[1732584193,-271733879,-1732584194,271733878];for(n=64;n<=c;n+=64)t(u,r(e.subarray(n-64,n)));for(i=(e=n-64<c?e.subarray(n-64):new Uint8Array(0)).length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],n=0;n<i;n+=1)o[n>>2]|=e[n]<<(n%4<<3);if(o[n>>2]|=128<<(n%4<<3),n>55)for(t(u,o),n=0;n<16;n+=1)o[n]=0;return s=(s=8*c).toString(16).match(/(.*?)(.{0,8})$/),a=parseInt(s[2],16),l=parseInt(s[1],16)||0,o[14]=a,o[15]=l,t(u,o),u}function s(t){var n,r="";for(n=0;n<4;n+=1)r+=e[t>>8*n+4&15]+e[t>>8*n&15];return r}function a(e){var t;for(t=0;t<e.length;t+=1)e[t]=s(e[t]);return e.join("")}function l(e){return/[\u0080-\uFFFF]/.test(e)&&(e=unescape(encodeURIComponent(e))),e}function c(e){var t,n=[],r=e.length;for(t=0;t<r-1;t+=2)n.push(parseInt(e.substr(t,2),16));return String.fromCharCode.apply(String,n)}function u(){this.reset()}return a(i("hello")),"undefined"==typeof ArrayBuffer||ArrayBuffer.prototype.slice||function(){function e(e,t){return(e=0|e||0)<0?Math.max(e+t,0):Math.min(e,t)}ArrayBuffer.prototype.slice=function(t,n){var r,i,o,s,a=this.byteLength,l=e(t,a),c=a;return undefined!==n&&(c=e(n,a)),l>c?new ArrayBuffer(0):(r=c-l,i=new ArrayBuffer(r),o=new Uint8Array(i),s=new Uint8Array(this,l,r),o.set(s),i)}}(),u.prototype.append=function(e){return this.appendBinary(l(e)),this},u.prototype.appendBinary=function(e){this._buff+=e,this._length+=e.length;var r,i=this._buff.length;for(r=64;r<=i;r+=64)t(this._hash,n(this._buff.substring(r-64,r)));return this._buff=this._buff.substring(r-64),this},u.prototype.end=function(e){var t,n,r=this._buff,i=r.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<i;t+=1)o[t>>2]|=r.charCodeAt(t)<<(t%4<<3);return this._finish(o,i),n=a(this._hash),e&&(n=c(n)),this.reset(),n},u.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},u.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},u.prototype.setState=function(e){return this._buff=e.buff,this._length=e.length,this._hash=e.hash,this},u.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},u.prototype._finish=function(e,n){var r,i,o,s=n;if(e[s>>2]|=128<<(s%4<<3),s>55)for(t(this._hash,e),s=0;s<16;s+=1)e[s]=0;r=(r=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),i=parseInt(r[2],16),o=parseInt(r[1],16)||0,e[14]=i,e[15]=o,t(this._hash,e)},u.hash=function(e,t){return u.hashBinary(l(e),t)},u.hashBinary=function(e,t){var n=a(i(e));return t?c(n):n},u.ArrayBuffer=function(){this.reset()},u.ArrayBuffer.prototype.append=function(e){var n,i=function(e,t){var n=new Uint8Array(e.byteLength+t.byteLength);return n.set(new Uint8Array(e)),n.set(new Uint8Array(t),e.byteLength),n}(this._buff.buffer,e),o=i.length;for(this._length+=e.byteLength,n=64;n<=o;n+=64)t(this._hash,r(i.subarray(n-64,n)));return this._buff=n-64<o?new Uint8Array(i.buffer.slice(n-64)):new Uint8Array(0),this},u.ArrayBuffer.prototype.end=function(e){var t,n,r=this._buff,i=r.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<i;t+=1)o[t>>2]|=r[t]<<(t%4<<3);return this._finish(o,i),n=a(this._hash),e&&(n=c(n)),this.reset(),n},u.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},u.ArrayBuffer.prototype.getState=function(){var e=u.prototype.getState.call(this);return e.buff=function(e){return String.fromCharCode.apply(null,new Uint8Array(e))}(e.buff),e},u.ArrayBuffer.prototype.setState=function(e){return e.buff=function(e,t){var n,r=e.length,i=new ArrayBuffer(r),o=new Uint8Array(i);for(n=0;n<r;n+=1)o[n]=e.charCodeAt(n);return t?o:i}(e.buff,!0),u.prototype.setState.call(this,e)},u.ArrayBuffer.prototype.destroy=u.prototype.destroy,u.ArrayBuffer.prototype._finish=u.prototype._finish,u.ArrayBuffer.hash=function(e,t){var n=a(o(new Uint8Array(e)));return t?c(n):n},u}()),tt.exports);const rt=Z(nt),it=[];let ot;class st{static addHandler(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n}static removeHandler(e,t,n){e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent?e.detachEvent("on"+t,n):delete e["on"+t]}static windowResizeHandler(e){st.addHandler(window,"resize",e)}static offWindowResizeHandler(e){st.removeHandler(window,"resize",e)}static fullscreenEnabled(){const e=globalThis.document;return document.fullscreenEnabled||window.fullScreen||e.mozFullscreenEnabled||e.webkitIsFullScreen}static fullScreen(e,t){if(t){const e=globalThis.document;let t=globalThis.document.exitFullscreen||e.msExitFullscreen||e.mozCancelFullScreen||e.webkitCancelFullScreen;if(void 0!==t&&t)t.call(globalThis.document);else if(void 0!==window.ActiveXObject){let e=new window.ActiveXObject("WScript.Shell");null!=e&&e.SendKeys("{F11}")}}else{let t=e;t||(t=globalThis.document.documentElement);let n=t.requestFullScreen||t.webkitRequestFullScreen||t.mozRequestFullScreen||t.msRequestFullScreen;if(void 0!==n&&n)n.call(t);else if(void 0!==window.ActiveXObject){let e=new window.ActiveXObject("WScript.Shell");null!=e&&e.SendKeys("{F11}")}}}static requestFullScreen(e=globalThis.document.documentElement){let t=e;var n=t.requestFullScreen||t.webkitRequestFullScreen||t.mozRequestFullScreen||t.msRequestFullScreen;if(n)n.call(t);else if(void 0!==window.ActiveXObject){var r=new window.ActiveXObject("WScript.Shell");null!==r&&r.SendKeys("{F11}")}}static exitFullScreen(){const e=globalThis.document;var t=document.exitFullscreen||e.mozCancelFullScreen||e.webkitExitFullscreen||e.webkitExitFullscreen;if(t)t.call(document);else if(void 0!==window.ActiveXObject){var n=new window.ActiveXObject("WScript.Shell");null!==n&&n.SendKeys("{F11}")}}static fullScreenElement(){return globalThis.document.fullscreenElement||globalThis.document.webkitFullscreenElement||globalThis.document.mozFullscreenElement||globalThis.document.msFullscreenElement}static isFullScreen(){return!!st.fullScreenElement()}static onFullScreenChanged(e){let t;"onfullscreenchange"in globalThis.document?t="fullscreenchange":"onwebkitfullscreenchange"in globalThis.document?t="webkitfullscreenchange":"onmozfullscreenchange"in globalThis.document&&(t="mozfullscreenchange"),t?document.addEventListener(t,(function(){const t=st.isFullScreen();e(t)})):document.addEventListener("MSFullscreenChange",(function(){const t=st.isFullScreen();e(t)}))}static stringifyCircularHandler(e,t){if("object"==typeof t&&null!==t){if(-1!==it.indexOf(t))return;it.push(t)}return t}static jsonStringify(e){if(!e)return"";const t=JSON.stringify(e,st.stringifyCircularHandler);return it.length=0,t}static jsonParse(e){const t=st.jsonStringify(e);if(t.length>1)return JSON.parse(t)}static getObjectURL(e){let t;const n=window;return null!=n.createObjcectURL?t=n.createOjcectURL(e):null!=globalThis.URL?t=globalThis.URL.createObjectURL(e):null!=globalThis.webkitURL&&(t=globalThis.webkitURL.createObjectURL(e)),t}static getFileShortMD5(e,t){const n=File.prototype,r=n.slice||n.mozSlice||n.webkitSlice,i=e,o=new rt.ArrayBuffer,s=new FileReader;s.onload=function(e){o.append(e.target?.result);const n=o.end(!1);t({isOK:!0,data:n})},s.onerror=function(){const e="计算文件简单摘要错误!";console.warn(e),t({isOK:!1,data:e})},function(){const e=2097152>=i.size?i.size:2097152;s.readAsArrayBuffer(r.call(i,0,e))}()}static getFileMD5(e,t){const n=File.prototype,r=n.slice||n.mozSlice||n.webkitSlice,i=e,o=2097152,s=Math.ceil(i.size/o);let a=0;const l=new rt.ArrayBuffer,c=new FileReader;function u(){const e=a*o,t=e+o>=i.size?i.size:e+o;c.readAsArrayBuffer(r.call(i,e,t))}c.onload=function(e){if(l.append(e.target?.result),a++,a<s)u();else{const e=l.end(!1);t({isOK:!0,data:e})}},c.onerror=function(){const e=`${i.name}:计算文件简单摘要错误!`;console.warn(e),t({isOK:!1,data:e})},u()}static MD5(e,t=!1){return rt.hash(e,t)}static copyTextByCommand(e){return new Promise(((t,n)=>{const r=document.createElement("input");r.value=e,document.body.appendChild(r),r.select(),document.execCommand("copy"),r.remove(),t(!0)}))}static copyText=e=>navigator.clipboard?navigator.clipboard.writeText(e).then((function(){return!0}),(function(e){return!1})):st.copyTextByCommand(e);static copyElementTextByCommand(e){const t=document.createRange();t.selectNode(document.getElementById(e));const n=globalThis.getSelection();n.rangeCount>0&&n.removeAllRanges(),n.addRange(t);try{return document.execCommand("copy"),n.removeRange(t),!0}catch(e){return n.removeRange(t),console.error("Command复制文本错误",e),!1}}static copyElementText(e){if(!navigator.clipboard)return st.copyElementTextByCommand(e);const t=document.createRange();t.selectNode(document.getElementById(e));const n=globalThis.getSelection();return n.rangeCount>0&&n.removeAllRanges(),n.addRange(t),navigator.clipboard.writeText(n).then((function(){return n.removeRange(t),!0}),(function(e){return n.removeRange(t),console.error("Clipboard复制文本错误",e),!1}))}static setGrayMode(e){st.toggleClass(e,"grayMode",document.documentElement)}static toggleClass(e,t,n){const r=n||document.body;let{className:i}=r;i=i.replace(t,""),r.className=e?`${i} ${t} `:i}static setCssVar(e,t,n=document.documentElement){n.style.setProperty(e,t)}static dispatchWindowResize(){const e=new Event("resize");globalThis.dispatchEvent(e)}static dispatchElementEvent(e,t="click",n){let r;if(r=ze(e)?document.getElementById(e):e,r){const e=new Event(t,{bubbles:!0,cancelable:!0});n&&r.addEventListener("ev",(e=>{n(e)}),!1),r.dispatchEvent(e)}}static getRandomNum(e,t){var n=t-e,r=Math.random();return e+Math.round(r*n)}static merge(e={},t={}){let n,r,i,o;for(e||(e={}),r=0,i=t.length;r<i;r++)for(n in o=t[r],o)e[n]=o[n];return e}static setOptions(e,t){e.hasOwnProperty("options")||(e.options=e.options?Object.create(e.options):{});for(let n in t)e.options[n]=t[n];return e.options}static formatNum(e,t){let n=Math.pow(10,void 0===t?6:t);return Math.round(e*n)/n}static trim(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}static splitWords(e){return this.trim(e).split(/\s+/)}static emptyImageUrl(){return"data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="}static debounce(e,t){let n=null;return function(){n&&clearTimeout(n),n=setTimeout(e,t)}}static throttle(e,t){let n=!0;return function(){if(!n)return!1;n=!1,setTimeout((()=>{e(),n=!0}),t)}}static dataURLtoBlob(e){let t=e.split(",");if(!t||0===t.length)return;let n=t[0].match(/:(.*?);/)[1],r=atob(t[1]),i=r.length,o=new Uint8Array(i);for(;i--;)o[i]=r.charCodeAt(i);return new Blob([o],{type:n})}static getElement(e){return"string"==typeof e?document.getElementById(e):e}static getStyle(e,t){let n=e.style[t]||e.currentStyle&&e.currentStyle[t];if((!n||"auto"===n)&&document.defaultView){let r=document.defaultView.getComputedStyle(e,null);n=r?r[t]:null}return"auto"===n?null:n}static create(e,t,n){let r=document.createElement(e);return r.className=t||"",n&&n.appendChild(r),r}static removeElement(e){let t=e.parentNode;t&&t.removeChild(e)}static emptyElement(e){for(;e.firstChild;)e.removeChild(e.firstChild)}static hasClass(e,t){if(void 0!==e.classList)return e.classList.contains(t);let n=this.getClass(e);return n.length>0&&new RegExp("(^|\\s)"+t+"(\\s|$)").test(n)}static addClass(e,t){if(void 0!==e.classList){let n=this.splitWords(t);for(let t=0,r=n.length;t<r;t++)e.classList.add(n[t])}else if(!this.hasClass(e,t)){let n=this.getClass(e);this.setClass(e,(n?n+" ":"")+t)}}static removeClass(e,t){void 0!==e.classList?e.classList.remove(t):this.setClass(e,this.trim((" "+this.getClass(e)+" ").replace(" "+t+" "," ")))}static setClass(e,t){void 0===e.className.baseVal?e.className=t:e.className.baseVal=t}static getClass(e){return e.correspondingElement&&(e=e.correspondingElement),void 0===e.className.baseVal?e.className:e.className.baseVal}static createSvgElement(e,t,n,r){let i=document.createElementNS("http://www.w3.org/2000/svg","svg:svg");i.setAttribute("class","svg-path"),i.setAttribute("width",e),i.setAttribute("height",t),i.setAttribute("viewBox",`0 0 ${e} ${t}`);let o=document.createElementNS("http://www.w3.org/2000/svg","path");return o.setAttribute("d",n),i.appendChild(o),r&&r.appendChild(i),i}static parseDom(e,t=!0,n=""){t=t??!1;let r=document.createElement("div");return r.className=n||"",r.innerHTML=e,t?r:r.childNodes}static createVideoHTML(e,t,n){let r=this.create("video",t,n),i=this.create("source","",r);i.setAttribute("src",e),i.setAttribute("type","video/map4");let o=this.create("source","",r);return o.setAttribute("src",e),o.setAttribute("type","video/quicktime"),r}static readFilePromise(e,t="ArrayBuffer",n="UTF-8"){return new Promise(((r,i)=>{const o=new FileReader;switch(t){case"ArrayBuffer":o.readAsArrayBuffer(e);break;case"Text":o.readAsText(e,n);break;case"BinaryString":o.readAsBinaryString(e);break;case"DataURL":case"FileBytes":o.readAsDataURL(e)}o.onload=function(){if(o.result)if("FileBytes"===t){const e=o.result,t=e.indexOf("64,"),n=e.substring(t+3);r(n)}else r(o.result);else i(o)},o.onerror=function(){i(o)}}))}static readFileBytes(e){return this.readFilePromise(e,"FileBytes")}static promisify(e,...t){return function(){return new Promise(((n,r)=>{t.push((function(e,t){e?r(e):n(t)})),e.apply(this,t)}))}}static wait(e){return new Promise((t=>setTimeout(t,e)))}static blockEvent(e){e.preventDefault(),e.stopPropagation()}static bindDropFileHanlder(e,t){if(!e)throw Error("传入Element对象不能为空!");let n;if(ze(e)){let t=document.getElementById(e);if(t)n=t;else{const r=document.getElementsByClassName(e);if(!r||0==r.length)throw Error("未找到对应id或类名的HtmlElement对象!");t=r[0],n=t}}else{if(!Le(e))throw Error("ele参数只能为string 或 Element对象!");n=e}n&&(n.addEventListener("dragenter",this.blockEvent,!1),n.addEventListener("dragover",this.blockEvent,!1),n.addEventListener("drop",(function(e){st.blockEvent(e),t(e.dataTransfer.files)}),!1))}static getInputElement(){var e=document.activeElement;return!e||"INPUT"!=e.tagName&&"TEXTAREA"!=e.tagName&&"true"!=e.contentEditable?null:e}static guessPasteTextToFileName(e,t){let n,r=t;return ze(e)?r=(je(e)?"json":$e(e)&&"kml")||"text":(Ce(e)&&e.type||Ae(e))&&(r="json"),"text"==r?n="pasted.txt":"kml"==r?n="pasted.kml":"json"==r&&(n="pasted.json"),n}static pasteEventHanlder(e,t){const n=this;if(n.getInputElement())return;n.blockEvent(e);const r=e.clipboardData,i=Array.from(r.types||[]).join(","),o=Array.from(r.items||[]);let s;if(i.includes("text/plain")){const e=r.getData("text/plain");if(":"===e[1])return t(e);if(Ue(e))return t(e);const i=n.guessPasteTextToFileName(e);if(!i||"pasted.txt"===i)return t(e);{const t=new Blob([e]);s=[new File([t],i)]}}else s=o.map((function(e){return"file"==e.kind?e.getAsFile():null}));s=s.filter(Boolean),s.length?t(s):t(void 0)}static onPasteHandler(e,t=document){const n=this;ot=t=>{n.pasteEventHanlder(t,e)},st.addHandler(t,"paste",ot)}static offPasteHandler(e=document){ot&&st.removeHandler(e,"paste",ot)}static loadScript(e){var t=document.createElement("script");t.type="text/javascript",t.src=e,document.head.appendChild(t)}static loadJsCode(e){var t=document.createElement("script");t.type="text/javascript";try{t.appendChild(document.createTextNode(e))}catch(n){t.text=e}document.body.appendChild(t)}static deepCopy(e){return structuredClone(e)}}const at=new Map,lt=function(e,t,n){ce.Config?.ServiceURL&&ce.Config?.ServiceURL.DefaultHproseAPI&&(ce.Config.DefaultHproseAPI=ce.Config?.ServiceURL.DefaultHproseAPI,ce.DefaultProxyClient=new Qe(ce.Config?.ServiceURL.DefaultHproseAPI));const r=ce.Config.UI.GrayMode;r&&st.setGrayMode(r);const i=new re(e,ce.EventBus);ce.Message=i,ce.SystemID=t,ce.SystemGroup=n,ce.EventBus.on(ne.HproseServiceErrorEvent,(e=>{const t=`当前后台业务服务不可用!${e}`;console.warn("Hprose请求错误",t)})),ce.EventBus.on(ne.WebAPIErrorEvent,(e=>{const t=`WebAPI后台服务不可用!${e}`;console.warn("WebAPI请求错误",t)})),ce.EventBus.on(ne.AxiosRequestErrorEvent,(e=>{const t=`Http请求'${e.code}'错误: ${e.message}`;console.warn("Http请求错误",t)})),ce.EventBus.on(ne.CommonWarnEvent,(e=>{i.warn(e)}))};function ct(e){if(e&&He.isNotEmpty(e)){if(at.has(e))return at.get(e);{const t=new Qe(e);return at.set(e,t),t}}}function ut(e){const t=ct(e);return t&&(ce.DefaultProxyClient=t),t}class ht{constructor(e,t,n,r){if(this.layoutState=e,this._LayoutID=t,this._mapItemRefs=r,ce.RightWidgetConfigMap){const e=ce.RightWidgetConfigMap.get(t);e&&e.forEach((e=>{if(this.widgetConfigDiction.set(e.id,e),e.afterid)if(this.preConditionMap.has(e.afterid))this.preConditionMap.get(e.afterid)?.add(e);else{const t=new Set;t.add(e),this.preConditionMap.set(e.afterid,t)}}))}else{const e=ce.WidgetConfigList??n;e&&e.forEach((e=>{if(e.layoutID===t&&(this.widgetConfigDiction.set(e.id,e),e.afterid))if(this.preConditionMap.has(e.afterid))this.preConditionMap.get(e.afterid)?.add(e);else{const t=new Set;t.add(e),this.preConditionMap.set(e.afterid,t)}}))}}layoutMap=new Map;preConditionMap=new Map;widgetsLoadedSet=new Set;widgetConfigDiction=new Map;_LayoutID;_mapItemRefs;getLayoutID(){return this._LayoutID}getWidgetConfigMap(){return this.widgetConfigDiction}preloadWidgets(){if(this.widgetConfigDiction.size>0)for(const[e,t]of this.widgetConfigDiction)t.preload&&!t.afterid&&this._loadWidget(t)}async loadWidget(e){if(!e)return;let t;if(Ce(e)?t=e:ze(e)&&(t=this.widgetConfigDiction.get(e)),t){if(t.afterid){if(this.isWidgetLoaded(t.afterid))return this._loadWidget(t);{let e=function(t){t.layoutID===n._LayoutID&&t.widgetID===r&&(n._loadWidget(i),ce.EventBus.off(ne.WidgetLoadedEvent,e))};const n=this,r=t.afterid,i=t;return ce.EventBus.on(ne.WidgetLoadedEvent,e),this.loadWidget(t.afterid)}}return this._loadWidget(t)}}loadOtherDependenceWidgets(e){if(this.preConditionMap.has(e)){const t=this.preConditionMap.get(e);t?.forEach((e=>{e.preload&&this._loadWidget(e)}))}}_loadWidget(e){if(!this.widgetsLoadedSet.has(e.id))return e.component?e.component().then((t=>{if(t.default){const n=m(t.default);n.id=e.id,e.layout&&(n.style=e.layout),e.cssClass&&(n.cssClass=e.cssClass),e.layoutID&&(n.layoutID=e.layoutID),e.label&&(n.label=e.label),e.jsURL&&(n.jsURL=e.jsURL),e.cssURL&&(n.cssURL=e.cssURL),this.getContainerComponents(e.container).value.set(e.id,n),this.widgetsLoadedSet.add(e.id),v().then((()=>{ce.EventBus.emit(ne.WidgetLoadedEvent,{layoutID:this._LayoutID,widgetID:e.id}),this.loadOtherDependenceWidgets(e.id)}))}})).catch((t=>{ce.Logger().error("加载Widget失败!",e,t),ce.EventBus.emit(ne.WidgetLoadedErrorEvent,e)})):void 0;this.changeWidgetVisible(e.id,!0)}hasDependentWidgets(e){let t=!1;if(this.preConditionMap.has(e)){const n=this.preConditionMap.get(e);if(n)for(const e of n)if(this.isWidgetLoaded(e.id)){t=!0;break}}return t}unloadWidget(e){if(!e)return;if(!this.isWidgetLoaded(e))return;const t=this.widgetConfigDiction.get(e);if(t){if(this.preConditionMap.has(e)){const t=this.preConditionMap.get(e);if(t)for(const e of t)this.unloadWidget(e.id)}this.getContainerComponents(t.container).value.delete(e),this.widgetsLoadedSet.delete(e),this._mapItemRefs&&this._mapItemRefs.delete(e),ce.EventBus.emit(ne.WidgetUnLoadedEvent,{layoutID:this._LayoutID,widgetID:e})}}isWidgetLoaded(e){return this.widgetsLoadedSet.has(e)}splitTwoContainer(e=!1){const t=this.layoutState.centerMainContainer.value,n=this.layoutState.centerBackContainer.value;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 ue.top:return this.layoutState.topContainer.value;case ue.bottom:return this.layoutState.bottomContainer.value;case ue.left:return this.layoutState.leftContainer.value;case ue.right:return this.layoutState.rightContainer.value;case ue.centerBack:return this.layoutState.centerBackContainer.value;case ue.centerMain:return this.layoutState.centerMainContainer.value;case ue.centerFront:return this.layoutState.centerFrontContainer.value}}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.changeVisible&&n.changeVisible(t)}isWidgetVisible(e){const t=this.getWidgetComponent(e);return!!t&&(!t.isShow||t.isShow.value)}getWidgetComponent(e){if(this.widgetsLoadedSet.has(e)&&this._mapItemRefs)return this._mapItemRefs.get(e)}getWigetItem(e){return this.widgetConfigDiction.get(e)}getGroupWigetItems(e){const t=[];for(const[n,r]of this.widgetConfigDiction)r.group===e&&t.push(r);return t}getContainerComponents(e){if(this.layoutMap.has(e))return this.layoutMap.get(e);{const n=t(new Map);return this.layoutMap.set(e,n),n}}getWidgetLoadedIDList(){const e=[];return this.widgetsLoadedSet.forEach((t=>{e.push(t)})),e}unloadAllWidgets(e){const t=[];this.widgetsLoadedSet.forEach((n=>{e&&e.length>0?e.findIndex((e=>e===n))<0&&t.push(n):t.push(n)})),t.forEach((e=>this.unloadWidget(e)))}unloadWidgets(e){e&&e.length>0&&e.forEach((e=>{this.unloadWidget(e)}))}static getLayoutManager(e,t){if(t){const n=t.find((t=>t.id===e));if(n&&n.layoutID)return ce.LayoutMap.get(n.layoutID)}}dispose(){this.unloadAllWidgets(),this.widgetConfigDiction.clear(),this.widgetsLoadedSet.clear(),this._LayoutID?ce.LayoutMap.delete(this._LayoutID):(ce.LayoutMap.delete(""),ce.LayoutManager=void 0)}}const dt=["id"],ft=he(e({__name:"layout",props:{widgetConfig:{type:Array,required:!1,default:void 0},layoutID:{type:String,default:"layoutDefault"},layoutStyle:{type:Object},noLeft:{type:Boolean,default:!1},noRight:{type:Boolean,default:!1},noBottom:{type:Boolean,default:!1},noTop:{type:Boolean,default:!1},noFront:{type:Boolean,default:!1},noBack:{type:Boolean,default:!1},noMain:{type:Boolean,default:!1}},emits:["containerLoaded"],setup(e,{emit:n}){const o=e,s=n,l=o.layoutID,c=t(l),h=t(),p=t(),m=t(),v=t(),M=t(),A=t(),_=t(),R=y({top:!o.noTop,main:!o.noMain,back:!o.noBack,front:!o.noFront,left:!o.noLeft,right:!o.noRight,bottom:!o.noBottom});w((()=>o.noTop),(e=>{R.top=!e})),w((()=>o.noMain),(e=>{R.main=!e})),w((()=>o.noBack),(e=>{R.back=!e})),w((()=>o.noFront),(e=>{R.front=!e})),w((()=>o.noLeft),(e=>{R.left=!e})),w((()=>o.noRight),(e=>{R.right=!e})),w((()=>o.noBottom),(e=>{R.bottom=!e}));const L=new Map,I=(e,t)=>{e&&L.set(t,e)},D=new ht({topContainer:h,centerBackContainer:p,centerMainContainer:m,centerFrontContainer:v,bottomContainer:M,leftContainer:A,rightContainer:_},l,o.widgetConfig,L);function N(e){return D?.getContainerComponents(e).value}const P=void 0,O=b((()=>R.top?N(ue.top):P)),B=b((()=>R.back?N(ue.centerBack):P)),F=b((()=>R.front?N(ue.centerFront):P)),W=b((()=>R.left?N(ue.left):P)),U=b((()=>R.right?N(ue.right):P)),j=b((()=>R.bottom?N(ue.bottom):P)),$=b((()=>o.layoutStyle));return S((()=>{D&&(l?ce.LayoutMap.set(l,D):(ce.LayoutManager=D,ce.LayoutMap.set("",D)),s("containerLoaded",{layoutID:l,layoutManager:D}),ce.EventBus.emit(ne.LayoutContainerLoaded,{layoutID:l,layoutManager:D}),D.preloadWidgets())})),C((()=>{D&&D.dispose()})),(e,t)=>(a(),E("div",{id:c.value,class:"layoutContainer",style:x($.value)},[R.top?(a(),E("div",{key:0,ref_key:"topContainer",ref:h,class:"topContainer"},[r(e.$slots,"top",{},void 0,!0),(a(!0),E(k,null,T(O.value,(([e,t])=>(a(),i(g(t),{ref_for:!0,ref:t=>I(t,e),key:e,style:x(t.style),class:z(t.cssClass)},null,8,["style","class"])))),128))],512)):f("",!0),u("div",null,[R.main?(a(),E("div",{key:0,ref_key:"centerMainContainer",ref:m,class:"centerdiv mainContainer"},[r(e.$slots,"main",{},(()=>[d(fe)]),!0)],512)):f("",!0),R.back?(a(),E("div",{key:1,ref_key:"centerBackContainer",ref:p,class:"centerdiv backContainer"},[r(e.$slots,"back",{},void 0,!0),(a(!0),E(k,null,T(B.value,(([e,t])=>(a(),i(g(t),{ref_for:!0,ref:t=>I(t,e),key:e,style:x(t.style),class:z(t.cssClass)},null,8,["style","class"])))),128))],512)):f("",!0),R.front?(a(),E("div",{key:2,ref_key:"centerFrontContainer",ref:v,class:"centerdiv centerFrontContainer"},[r(e.$slots,"front",{},void 0,!0),(a(!0),E(k,null,T(F.value,(([e,t])=>(a(),i(g(t),{ref_for:!0,ref:t=>I(t,e),key:e,style:x(t.style),class:z(t.cssClass)},null,8,["style","class"])))),128))],512)):f("",!0),R.left?(a(),E("div",{key:3,ref_key:"leftContainer",ref:A,class:"leftContainer"},[r(e.$slots,"left",{},void 0,!0),(a(!0),E(k,null,T(W.value,(([e,t])=>(a(),i(g(t),{ref_for:!0,ref:t=>I(t,e),key:e,style:x(t.style),class:z(t.cssClass)},null,8,["style","class"])))),128))],512)):f("",!0),R.right?(a(),E("div",{key:4,ref_key:"rightContainer",ref:_,class:"rightContainer"},[r(e.$slots,"right",{},void 0,!0),(a(!0),E(k,null,T(U.value,(([e,t])=>(a(),i(g(t),{ref_for:!0,ref:t=>I(t,e),key:e,style:x(t.style),class:z(t.cssClass)},null,8,["style","class"])))),128))],512)):f("",!0)]),R.bottom?(a(),E("div",{key:1,ref_key:"bottomContainer",ref:M,class:"bottomContainer"},[r(e.$slots,"bottom",{},void 0,!0),(a(!0),E(k,null,T(j.value,(([e,t])=>(a(),i(g(t),{ref_for:!0,ref:t=>I(t,e),key:e,style:x(t.style),class:z(t.cssClass)},null,8,["style","class"])))),128))],512)):f("",!0),r(e.$slots,"default",{},void 0,!0)],12,dt))}}),[["__scopeId","data-v-982ca474"]]),pt=e({name:"RouterTransition",__name:"RouterTransitionAnimate",props:{enterActive:{default:"animated fadeIn"},leaveActive:{default:"animated fadeOut"}},setup:e=>(t,n)=>{const r=h("router-view");return a(),i(de,null,{default:c((()=>[d(r,null,{default:c((({Component:t,route:n})=>[d(M,{appear:"","enter-active-class":e.enterActive,"leave-active-class":e.leaveActive},{default:c((()=>[(a(),i(p,null,[n.meta.keepAlive?(a(),i(g(t),{key:n.name})):f("",!0)],1024)),n.meta.keepAlive?f("",!0):(a(),i(g(t),{key:n.name}))])),_:2},1032,["enter-active-class","leave-active-class"])])),_:1})])),_:1})}});function gt(){let e=[];const t="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";for(var n=0;n<36;n++){const r=Math.floor(16*Math.random());e[n]=t.substring(r,r+1)}e[14]="4";const r=3&Number(e[19])|8;return e[19]=t.substring(r,r+1),e[8]=e[13]=e[18]=e[23]="-",e.join("").toLowerCase()}function mt(){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),("x"===t?n:3&n|8).toString(16)}))}var vt={},yt=Uint8Array,wt=Uint16Array,bt=Int32Array,St=new yt([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Ct=new yt([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Et=new yt([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),xt=function(e,t){for(var n=new wt(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];var i=new bt(n[30]);for(r=1;r<30;++r)for(var o=n[r];o<n[r+1];++o)i[o]=o-n[r]<<5|r;return{b:n,r:i}},kt=xt(St,2),Tt=kt.b,zt=kt.r;Tt[28]=258,zt[258]=28;for(var Mt=xt(Ct,0),At=Mt.b,_t=Mt.r,Rt=new wt(32768),Lt=0;Lt<32768;++Lt){var It=(43690&Lt)>>1|(21845&Lt)<<1;It=(61680&(It=(52428&It)>>2|(13107&It)<<2))>>4|(3855&It)<<4,Rt[Lt]=((65280&It)>>8|(255&It)<<8)>>1}var Dt=function(e,t,n){for(var r=e.length,i=0,o=new wt(t);i<r;++i)e[i]&&++o[e[i]-1];var s,a=new wt(t);for(i=1;i<t;++i)a[i]=a[i-1]+o[i-1]<<1;if(n){s=new wt(1<<t);var l=15-t;for(i=0;i<r;++i)if(e[i])for(var c=i<<4|e[i],u=t-e[i],h=a[e[i]-1]++<<u,d=h|(1<<u)-1;h<=d;++h)s[Rt[h]>>l]=c}else for(s=new wt(r),i=0;i<r;++i)e[i]&&(s[i]=Rt[a[e[i]-1]++]>>15-e[i]);return s},Nt=new yt(288);for(Lt=0;Lt<144;++Lt)Nt[Lt]=8;for(Lt=144;Lt<256;++Lt)Nt[Lt]=9;for(Lt=256;Lt<280;++Lt)Nt[Lt]=7;for(Lt=280;Lt<288;++Lt)Nt[Lt]=8;var Pt=new yt(32);for(Lt=0;Lt<32;++Lt)Pt[Lt]=5;var Ot=Dt(Nt,9,0),Bt=Dt(Nt,9,1),Ft=Dt(Pt,5,0),Wt=Dt(Pt,5,1),Ut=function(e){for(var t=e[0],n=1;n<e.length;++n)e[n]>t&&(t=e[n]);return t},jt=function(e,t,n){var r=t/8|0;return(e[r]|e[r+1]<<8)>>(7&t)&n},$t=function(e,t){var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(7&t)},Ht=function(e){return(e+7)/8|0},Gt=function(e,t,n){return(null==t||t<0)&&(t=0),(null==n||n>e.length)&&(n=e.length),new yt(e.subarray(t,n))},qt=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],Xt=function(e,t,n){var r=new Error(t||qt[e]);if(r.code=e,Error.captureStackTrace&&Error.captureStackTrace(r,Xt),!n)throw r;return r},Vt=function(e,t,n,r){var i=e.length,o=r?r.length:0;if(!i||t.f&&!t.l)return n||new yt(0);var s=!n,a=s||2!=t.i,l=t.i;s&&(n=new yt(3*i));var c=function(e){var t=n.length;if(e>t){var r=new yt(Math.max(2*t,e));r.set(n),n=r}},u=t.f||0,h=t.p||0,d=t.b||0,f=t.l,p=t.d,g=t.m,m=t.n,v=8*i;do{if(!f){u=jt(e,h,1);var y=jt(e,h+1,3);if(h+=3,!y){var w=e[(_=Ht(h)+4)-4]|e[_-3]<<8,b=_+w;if(b>i){l&&Xt(0);break}a&&c(d+w),n.set(e.subarray(_,b),d),t.b=d+=w,t.p=h=8*b,t.f=u;continue}if(1==y)f=Bt,p=Wt,g=9,m=5;else if(2==y){var S=jt(e,h,31)+257,C=jt(e,h+10,15)+4,E=S+jt(e,h+5,31)+1;h+=14;for(var x=new yt(E),k=new yt(19),T=0;T<C;++T)k[Et[T]]=jt(e,h+3*T,7);h+=3*C;var z=Ut(k),M=(1<<z)-1,A=Dt(k,z,1);for(T=0;T<E;){var _,R=A[jt(e,h,M)];if(h+=15&R,(_=R>>4)<16)x[T++]=_;else{var L=0,I=0;for(16==_?(I=3+jt(e,h,3),h+=2,L=x[T-1]):17==_?(I=3+jt(e,h,7),h+=3):18==_&&(I=11+jt(e,h,127),h+=7);I--;)x[T++]=L}}var D=x.subarray(0,S),N=x.subarray(S);g=Ut(D),m=Ut(N),f=Dt(D,g,1),p=Dt(N,m,1)}else Xt(1);if(h>v){l&&Xt(0);break}}a&&c(d+131072);for(var P=(1<<g)-1,O=(1<<m)-1,B=h;;B=h){var F=(L=f[$t(e,h)&P])>>4;if((h+=15&L)>v){l&&Xt(0);break}if(L||Xt(2),F<256)n[d++]=F;else{if(256==F){B=h,f=null;break}var W=F-254;if(F>264){var U=St[T=F-257];W=jt(e,h,(1<<U)-1)+Tt[T],h+=U}var j=p[$t(e,h)&O],$=j>>4;if(j||Xt(3),h+=15&j,N=At[$],$>3&&(U=Ct[$],N+=$t(e,h)&(1<<U)-1,h+=U),h>v){l&&Xt(0);break}a&&c(d+131072);var H=d+W;if(d<N){var G=o-N,q=Math.min(N,H);for(G+d<0&&Xt(3);d<q;++d)n[d]=r[G+d]}for(;d<H;++d)n[d]=n[d-N]}}t.l=f,t.p=B,t.b=d,t.f=u,f&&(u=1,t.m=g,t.d=p,t.n=m)}while(!u);return d!=n.length&&s?Gt(n,0,d):n.subarray(0,d)},Kt=function(e,t,n){n<<=7&t;var r=t/8|0;e[r]|=n,e[r+1]|=n>>8},Yt=function(e,t,n){n<<=7&t;var r=t/8|0;e[r]|=n,e[r+1]|=n>>8,e[r+2]|=n>>16},Zt=function(e,t){for(var n=[],r=0;r<e.length;++r)e[r]&&n.push({s:r,f:e[r]});var i=n.length,o=n.slice();if(!i)return{t:on,l:0};if(1==i){var s=new yt(n[0].s+1);return s[n[0].s]=1,{t:s,l:1}}n.sort((function(e,t){return e.f-t.f})),n.push({s:-1,f:25001});var a=n[0],l=n[1],c=0,u=1,h=2;for(n[0]={s:-1,f:a.f+l.f,l:a,r:l};u!=i-1;)a=n[n[c].f<n[h].f?c++:h++],l=n[c!=u&&n[c].f<n[h].f?c++:h++],n[u++]={s:-1,f:a.f+l.f,l:a,r:l};var d=o[0].s;for(r=1;r<i;++r)o[r].s>d&&(d=o[r].s);var f=new wt(d+1),p=Jt(n[u-1],f,0);if(p>t){r=0;var g=0,m=p-t,v=1<<m;for(o.sort((function(e,t){return f[t.s]-f[e.s]||e.f-t.f}));r<i;++r){var y=o[r].s;if(!(f[y]>t))break;g+=v-(1<<p-f[y]),f[y]=t}for(g>>=m;g>0;){var w=o[r].s;f[w]<t?g-=1<<t-f[w]++-1:++r}for(;r>=0&&g;--r){var b=o[r].s;f[b]==t&&(--f[b],++g)}p=t}return{t:new yt(f),l:p}},Jt=function(e,t,n){return-1==e.s?Math.max(Jt(e.l,t,n+1),Jt(e.r,t,n+1)):t[e.s]=n},Qt=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new wt(++t),r=0,i=e[0],o=1,s=function(e){n[r++]=e},a=1;a<=t;++a)if(e[a]==i&&a!=t)++o;else{if(!i&&o>2){for(;o>138;o-=138)s(32754);o>2&&(s(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(s(i),--o;o>6;o-=6)s(8304);o>2&&(s(o-3<<5|8208),o=0)}for(;o--;)s(i);o=1,i=e[a]}return{c:n.subarray(0,r),n:t}},en=function(e,t){for(var n=0,r=0;r<t.length;++r)n+=e[r]*t[r];return n},tn=function(e,t,n){var r=n.length,i=Ht(t+2);e[i]=255&r,e[i+1]=r>>8,e[i+2]=255^e[i],e[i+3]=255^e[i+1];for(var o=0;o<r;++o)e[i+o+4]=n[o];return 8*(i+4+r)},nn=function(e,t,n,r,i,o,s,a,l,c,u){Kt(t,u++,n),++i[256];for(var h=Zt(i,15),d=h.t,f=h.l,p=Zt(o,15),g=p.t,m=p.l,v=Qt(d),y=v.c,w=v.n,b=Qt(g),S=b.c,C=b.n,E=new wt(19),x=0;x<y.length;++x)++E[31&y[x]];for(x=0;x<S.length;++x)++E[31&S[x]];for(var k=Zt(E,7),T=k.t,z=k.l,M=19;M>4&&!T[Et[M-1]];--M);var A,_,R,L,I=c+5<<3,D=en(i,Nt)+en(o,Pt)+s,N=en(i,d)+en(o,g)+s+14+3*M+en(E,T)+2*E[16]+3*E[17]+7*E[18];if(l>=0&&I<=D&&I<=N)return tn(t,u,e.subarray(l,l+c));if(Kt(t,u,1+(N<D)),u+=2,N<D){A=Dt(d,f,0),_=d,R=Dt(g,m,0),L=g;var P=Dt(T,z,0);for(Kt(t,u,w-257),Kt(t,u+5,C-1),Kt(t,u+10,M-4),u+=14,x=0;x<M;++x)Kt(t,u+3*x,T[Et[x]]);u+=3*M;for(var O=[y,S],B=0;B<2;++B){var F=O[B];for(x=0;x<F.length;++x){var W=31&F[x];Kt(t,u,P[W]),u+=T[W],W>15&&(Kt(t,u,F[x]>>5&127),u+=F[x]>>12)}}}else A=Ot,_=Nt,R=Ft,L=Pt;for(x=0;x<a;++x){var U=r[x];if(U>255){Yt(t,u,A[257+(W=U>>18&31)]),u+=_[W+257],W>7&&(Kt(t,u,U>>23&31),u+=St[W]);var j=31&U;Yt(t,u,R[j]),u+=L[j],j>3&&(Yt(t,u,U>>5&8191),u+=Ct[j])}else Yt(t,u,A[U]),u+=_[U]}return Yt(t,u,A[256]),u+_[256]},rn=new bt([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),on=new yt(0),sn=function(e,t,n,r,i,o){var s=o.z||e.length,a=new yt(r+s+5*(1+Math.ceil(s/7e3))+i),l=a.subarray(r,a.length-i),c=o.l,u=7&(o.r||0);if(t){u&&(l[0]=o.r>>3);for(var h=rn[t-1],d=h>>13,f=8191&h,p=(1<<n)-1,g=o.p||new wt(32768),m=o.h||new wt(p+1),v=Math.ceil(n/3),y=2*v,w=function(t){return(e[t]^e[t+1]<<v^e[t+2]<<y)&p},b=new bt(25e3),S=new wt(288),C=new wt(32),E=0,x=0,k=o.i||0,T=0,z=o.w||0,M=0;k+2<s;++k){var A=w(k),_=32767&k,R=m[A];if(g[_]=R,m[A]=_,z<=k){var L=s-k;if((E>7e3||T>24576)&&(L>423||!c)){u=nn(e,l,0,b,S,C,x,T,M,k-M,u),T=E=x=0,M=k;for(var I=0;I<286;++I)S[I]=0;for(I=0;I<30;++I)C[I]=0}var D=2,N=0,P=f,O=_-R&32767;if(L>2&&A==w(k-O))for(var B=Math.min(d,L)-1,F=Math.min(32767,k),W=Math.min(258,L);O<=F&&--P&&_!=R;){if(e[k+D]==e[k+D-O]){for(var U=0;U<W&&e[k+U]==e[k+U-O];++U);if(U>D){if(D=U,N=O,U>B)break;var j=Math.min(O,U-2),$=0;for(I=0;I<j;++I){var H=k-O+I&32767,G=H-g[H]&32767;G>$&&($=G,R=H)}}}O+=(_=R)-(R=g[_])&32767}if(N){b[T++]=268435456|zt[D]<<18|_t[N];var q=31&zt[D],X=31&_t[N];x+=St[q]+Ct[X],++S[257+q],++C[X],z=k+D,++E}else b[T++]=e[k],++S[e[k]]}}for(k=Math.max(k,z);k<s;++k)b[T++]=e[k],++S[e[k]];u=nn(e,l,c,b,S,C,x,T,M,k-M,u),c||(o.r=7&u|l[u/8|0]<<3,u-=7,o.h=m,o.p=g,o.i=k,o.w=z)}else{for(k=o.w||0;k<s+c;k+=65535){var V=k+65535;V>=s&&(l[u/8|0]=c,V=s),u=tn(l,u+1,e.subarray(k,V))}o.i=s}return Gt(a,0,r+Ht(u)+i)},an=function(){for(var e=new Int32Array(256),t=0;t<256;++t){for(var n=t,r=9;--r;)n=(1&n&&-306674912)^n>>>1;e[t]=n}return e}(),ln=function(){var e=-1;return{p:function(t){for(var n=e,r=0;r<t.length;++r)n=an[255&n^t[r]]^n>>>8;e=n},d:function(){return~e}}},cn=function(e,t,n,r,i){if(!i&&(i={l:1},t.dictionary)){var o=t.dictionary.subarray(-32768),s=new yt(o.length+e.length);s.set(o),s.set(e,o.length),e=s,i.w=o.length}return sn(e,null==t.level?6:t.level,null==t.mem?i.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):20:12+t.mem,n,r,i)},un=function(e,t){var n={};for(var r in e)n[r]=e[r];for(var r in t)n[r]=t[r];return n},hn=function(e,t,n){for(var r=e(),i=e.toString(),o=i.slice(i.indexOf("[")+1,i.lastIndexOf("]")).replace(/\s+/g,"").split(","),s=0;s<r.length;++s){var a=r[s],l=o[s];if("function"==typeof a){t+=";"+l+"=";var c=a.toString();if(a.prototype)if(-1!=c.indexOf("[native code]")){var u=c.indexOf(" ",8)+1;t+=c.slice(u,c.indexOf("(",u))}else for(var h in t+=c,a.prototype)t+=";"+l+".prototype."+h+"="+a.prototype[h].toString();else t+=c}else n[l]=a}return t},dn=[],fn=function(){return[yt,wt,bt,St,Ct,Et,Tt,At,Bt,Wt,Rt,qt,Dt,Ut,jt,$t,Ht,Gt,Xt,Vt,An,vn,yn]},pn=function(){return[yt,wt,bt,St,Ct,Et,zt,_t,Ot,Nt,Ft,Pt,Rt,rn,on,Dt,Kt,Yt,Zt,Jt,Qt,en,tn,nn,Ht,Gt,sn,cn,Mn,vn]},gn=function(){return[xn,zn,En,ln,an]},mn=function(){return[kn,Tn]},vn=function(e){return postMessage(e,[e.buffer])},yn=function(e){return e&&{out:e.size&&new yt(e.size),dictionary:e.dictionary}},wn=function(e,t,n,r,i,o){var s=function(e,t,n,r){if(!dn[n]){for(var i="",o={},s=e.length-1,a=0;a<s;++a)i=hn(e[a],i,o);dn[n]={c:hn(e[s],i,o),e:o}}var l=un({},dn[n].e);return function(e,t,n,r,i){var o=new Worker(vt[t]||(vt[t]=URL.createObjectURL(new Blob([e+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return o.onmessage=function(e){var t=e.data,n=t.$e$;if(n){var r=new Error(n[0]);r.code=n[1],r.stack=n[2],i(r,null)}else i(null,t)},o.postMessage(n,r),o}(dn[n].c+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+t.toString()+"}",n,l,function(e){var t=[];for(var n in e)e[n].buffer&&t.push((e[n]=new e[n].constructor(e[n])).buffer);return t}(l),r)}(n,r,i,(function(e,t){s.terminate(),o(e,t)}));return s.postMessage([e,t],t.consume?[e.buffer]:[]),function(){s.terminate()}},bn=function(e,t){return e[t]|e[t+1]<<8},Sn=function(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0},Cn=function(e,t){return Sn(e,t)+4294967296*Sn(e,t+4)},En=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8},xn=function(e,t){var n=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=t.level<2?4:9==t.level?2:0,e[9]=3,0!=t.mtime&&En(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),n){e[3]=8;for(var r=0;r<=n.length;++r)e[r+10]=n.charCodeAt(r)}},kn=function(e){31==e[0]&&139==e[1]&&8==e[2]||Xt(6,"invalid gzip data");var t=e[3],n=10;4&t&&(n+=2+(e[10]|e[11]<<8));for(var r=(t>>3&1)+(t>>4&1);r>0;r-=!e[n++]);return n+(2&t)},Tn=function(e){var t=e.length;return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0},zn=function(e){return 10+(e.filename?e.filename.length+1:0)};function Mn(e,t){return cn(e,t||{},0,0)}function An(e,t){return Vt(e,{i:2},t&&t.out,t&&t.dictionary)}function _n(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&Xt(7),wn(e,t,[pn,gn,function(){return[Rn]}],(function(e){return vn(Rn(e.data[0],e.data[1]))}),2,n)}function Rn(e,t){t||(t={});var n=ln(),r=e.length;n.p(e);var i=cn(e,t,zn(t),8),o=i.length;return xn(i,t),En(i,o-8,n.d()),En(i,o-4,r),i}function Ln(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&Xt(7),wn(e,t,[fn,mn,function(){return[In]}],(function(e){return vn(In(e.data[0],e.data[1]))}),3,n)}function In(e,t){var n=kn(e);return n+8>e.length&&Xt(6,"invalid gzip data"),Vt(e.subarray(n,-8),{i:2},t&&t.out||new yt(Tn(e)),t&&t.dictionary)}var Dn=function(e,t,n,r){for(var i in e){var o=e[i],s=t+i,a=r;Array.isArray(o)&&(a=un(r,o[1]),o=o[0]),o instanceof yt?n[s]=[o,a]:(n[s+="/"]=[new yt(0),a],Dn(o,s,n,r))}},Nn="undefined"!=typeof TextEncoder&&new TextEncoder,Pn="undefined"!=typeof TextDecoder&&new TextDecoder;try{Pn.decode(on,{stream:!0})}catch(e){}function On(e,t){if(Nn)return Nn.encode(e);for(var n=e.length,r=new yt(e.length+(e.length>>1)),i=0,o=function(e){r[i++]=e},s=0;s<n;++s){if(i+5>r.length){var a=new yt(i+8+(n-s<<1));a.set(r),r=a}var l=e.charCodeAt(s);l<128||t?o(l):l<2048?(o(192|l>>6),o(128|63&l)):l>55295&&l<57344?(o(240|(l=65536+(1047552&l)|1023&e.charCodeAt(++s))>>18),o(128|l>>12&63),o(128|l>>6&63),o(128|63&l)):(o(224|l>>12),o(128|l>>6&63),o(128|63&l))}return Gt(r,0,i)}function Bn(e,t){if(t){for(var n="",r=0;r<e.length;r+=16384)n+=String.fromCharCode.apply(null,e.subarray(r,r+16384));return n}if(Pn)return Pn.decode(e);var i=function(e){for(var t="",n=0;;){var r=e[n++],i=(r>127)+(r>223)+(r>239);if(n+i>e.length)return{s:t,r:Gt(e,n-1)};i?3==i?(r=((15&r)<<18|(63&e[n++])<<12|(63&e[n++])<<6|63&e[n++])-65536,t+=String.fromCharCode(55296|r>>10,56320|1023&r)):t+=1&i?String.fromCharCode((31&r)<<6|63&e[n++]):String.fromCharCode((15&r)<<12|(63&e[n++])<<6|63&e[n++]):t+=String.fromCharCode(r)}}(e),o=i.s;return(n=i.r).length&&Xt(8),o}var Fn=function(e,t){return t+30+bn(e,t+26)+bn(e,t+28)},Wn=function(e,t,n){var r=bn(e,t+28),i=Bn(e.subarray(t+46,t+46+r),!(2048&bn(e,t+8))),o=t+46+r,s=Sn(e,t+20),a=n&&4294967295==s?Un(e,o):[s,Sn(e,t+24),Sn(e,t+42)],l=a[0],c=a[1],u=a[2];return[bn(e,t+10),l,c,i,o+bn(e,t+30)+bn(e,t+32),u]},Un=function(e,t){for(;1!=bn(e,t);t+=4+bn(e,t+2));return[Cn(e,t+12),Cn(e,t+4),Cn(e,t+20)]},jn=function(e){var t=0;if(e)for(var n in e){var r=e[n].length;r>65535&&Xt(9),t+=r+4}return t},$n=function(e,t,n,r,i,o,s,a){var l=r.length,c=n.extra,u=a&&a.length,h=jn(c);En(e,t,null!=s?33639248:67324752),t+=4,null!=s&&(e[t++]=20,e[t++]=n.os),e[t]=20,t+=2,e[t++]=n.flag<<1|(o<0&&8),e[t++]=i&&8,e[t++]=255&n.compression,e[t++]=n.compression>>8;var d=new Date(null==n.mtime?Date.now():n.mtime),f=d.getFullYear()-1980;if((f<0||f>119)&&Xt(10),En(e,t,f<<25|d.getMonth()+1<<21|d.getDate()<<16|d.getHours()<<11|d.getMinutes()<<5|d.getSeconds()>>1),t+=4,-1!=o&&(En(e,t,n.crc),En(e,t+4,o<0?-o-2:o),En(e,t+8,n.size)),En(e,t+12,l),En(e,t+14,h),t+=16,null!=s&&(En(e,t,u),En(e,t+6,n.attrs),En(e,t+10,s),t+=14),e.set(r,t),t+=l,h)for(var p in c){var g=c[p],m=g.length;En(e,t,+p),En(e,t+2,m),e.set(g,t+4),t+=4+m}return u&&(e.set(a,t),t+=u),t},Hn=function(e,t,n,r,i){En(e,t,101010256),En(e,t+8,n),En(e,t+10,n),En(e,t+12,r),En(e,t+16,i)};var Gn="function"==typeof queueMicrotask?queueMicrotask:"function"==typeof setTimeout?setTimeout:function(e){e()};function qn(e){var t={filename:"",directory:"",basename:"",extension:""},n=function(e){return-1==e.indexOf("/")&&-1!=e.indexOf("\\")?"\\":"/"}(e),r=e.split(n),i=r.pop(),o=/\.([a-z][a-z0-9]*)$/i,s=o.test(i)?o.exec(i)[0]:"";return s||i.includes("*")?(t.filename=i,t.extension=s?s.slice(1):"",t.basename=i.slice(0,i.length-s.length),t.directory=r.join(n)):t.directory=i?e:r.join(n),t}function Xn(e){return qn(e).basename}function Vn(e){return qn(e).extension}function Kn(e){var t=qn(e);return t.extension?e.slice(0,e.length-t.extension.length-1):e}function Yn(e,t){var n=Kn(e);return t?n+"."+t:n}function Zn(e){var t=Vn(e);return t?Kn(e)+"."+t.toLowerCase():e}function Jn(e){return e.reduce((function(e,t,n){return 0===n?Xn(t):Qn(e,t)}),"")}function Qn(e,t){var n;return e&&t&&(n=er(e,t).replace(/[-_]$/,"")),n||""}function er(e,t){for(var n=0,r=e.length;n<r&&e[n]===t[n];n++);return e.substr(0,n)}const tr=(e,t)=>{nr(e,t)};function nr(e,t){const n=globalThis.URL||globalThis.webkitURL||window,r=new Blob([e]),i=n.createObjectURL(r),o=document.createElement("a");o.href=i,o.download=t,document.body.appendChild(o),o.click(),n.revokeObjectURL(i),setTimeout((function(){n.revokeObjectURL(i),document.body.removeChild(o)}),400)}const rr=(e,t)=>{const n=JSON.stringify(e,null,2);t?tr(n,t+".json"):K.emit(ne.CommonWarnEvent,"参数JsonID不能为空!")},ir=(e,t,n)=>{e.get(t,{responseType:"blob"}).then((function(e){tr(e.data,n)})).catch((e=>{console.warn(e),K.emit(ne.CommonWarnEvent,"下载文件报错!")}))};async function or(e,t,n){var r,i=function(e){var t=Vn(e).toLowerCase(),n={};return"kml"==t?n["application/vnd.google-earth.kml+xml"]=[".kml"]:"svg"===t?n["image/svg+xml"]=[".svg"]:"zip"===t?n["application/zip"]=[".zip"]:"txt"===t||"csv"===t||"tsv"===t||"tab"===t?n["text/csv"]=[".csv",".tsv",".tab",".txt"]:"json"===t||"geojson"===t||"topojson"===t?n["application/json"]=[".json",".geojson",".topojson"]:n["application/octet-stream"]=["."+t],{suggestedName:e,types:[{description:"Files",accept:n}]}}(e);try{if(globalThis.showSaveFilePicker){r=await globalThis.showSaveFilePicker(i);var o=await r.createWritable();await o.write(t),await o.close()}}catch(e){return void("SecurityError"==e.name?(console.warn(e.message),n(e.message)):"AbortError"==e.name?n():(console.error(e.name,e.message,e),n("Save failed for an unknown reason")))}n()}class sr{static runningInBrowser(){return"undefined"!=typeof window&&void 0!==globalThis.document}static encodeGBK(e){const t=H.encode(e,"ISO-8859-1");return H.decode(t,"gbk")}static async saveZipFromFiles(e,t){const n=[];for(let r=0;r<t.length;r++){const e=t[r],i=e.name,o=await st.readFilePromise(e,"ArrayBuffer"),s=new Uint8Array(o);n.push({filename:i,content:s})}n.length>0&&sr.zipAsync(n,(function(t,n){if(t)throw t;nr(new Blob([n]),e)}))}static saveZipFile(e,t){sr.zipAsync(t,(function(t,n){if(t)throw t;nr(new Blob([n]),e)}))}static saveZipFileSync(e,t){const n=sr.zipSync(t);return!!n&&(nr(new Blob([n]),e),!0)}static unzipSync(e){let t;if(t=e instanceof ArrayBuffer?new Uint8Array(e):e,!sr.runningInBrowser())return;const n=function(e,t){for(var n={},r=e.length-22;101010256!=Sn(e,r);--r)(!r||e.length-r>65558)&&Xt(13);var i=bn(e,r+8);if(!i)return{};var o=Sn(e,r+16),s=4294967295==o||65535==i;if(s){var a=Sn(e,r-12);(s=101075792==Sn(e,a))&&(i=Sn(e,a+32),o=Sn(e,a+48))}for(var l=t&&t.filter,c=0;c<i;++c){var u=Wn(e,o,s),h=u[0],d=u[1],f=u[2],p=u[3],g=u[4],m=u[5],v=Fn(e,m);o=g,l&&!l({name:p,size:d,originalSize:f,compression:h})||(h?8==h?n[p]=An(e.subarray(v,v+d),{out:new yt(f)}):Xt(14,"unknown compression type "+h):n[p]=Gt(e,v,v+d))}return n}(t,{filter:sr.fflateFilter});return sr.fflatePostprocess(n)}static async readZipFromFile(e){const t={content:await st.readFilePromise(e,"ArrayBuffer"),name:e.name};return sr.readZipFile(t)}static async readZipFile(e){const t=await sr.unzipAsync.promise(e.content);return Object.keys(t).reduce((function(e,n){return e.push({filename:n,content:t[n]}),e}),[])}static unzipAsync(e,t){if(!sr.runningInBrowser())throw new Error("Async unzipping only supported in the browser");let n;n=e instanceof ArrayBuffer?new Uint8Array(e):e,function(e,t,n){n||(n=t,t={}),"function"!=typeof n&&Xt(7);var r=[],i=function(){for(var e=0;e<r.length;++e)r[e]()},o={},s=function(e,t){Gn((function(){n(e,t)}))};Gn((function(){s=n}));for(var a=e.length-22;101010256!=Sn(e,a);--a)if(!a||e.length-a>65558)return s(Xt(13,0,1),null),i;var l=bn(e,a+8);if(l){var c=l,u=Sn(e,a+16),h=4294967295==u||65535==c;if(h){var d=Sn(e,a-12);(h=101075792==Sn(e,d))&&(c=l=Sn(e,d+32),u=Sn(e,d+48))}for(var f=t&&t.filter,p=function(t){var n=Wn(e,u,h),a=n[0],c=n[1],d=n[2],p=n[3],g=n[4],m=n[5],v=Fn(e,m);u=g;var y=function(e,t){e?(i(),s(e,null)):(t&&(o[p]=t),--l||s(null,o))};if(!f||f({name:p,size:c,originalSize:d,compression:a}))if(a)if(8==a){var w=e.subarray(v,v+c);if(d<524288||c>.8*d)try{y(null,An(w,{out:new yt(d)}))}catch(e){y(e,null)}else r.push(function(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&Xt(7),wn(e,t,[fn],(function(e){return vn(An(e.data[0],yn(e.data[1])))}),1,n)}(w,{size:d},y))}else y(Xt(14,"unknown compression type "+a,1),null);else y(null,Gt(e,v,v+c));else y(null,null)},g=0;g<c;++g)p()}else s(null,{})}(n,{filter:sr.fflateFilter},(function(e,n){e&&t(e),t(null,sr.fflatePostprocess(n))}))}static zipSync(e){if(!sr.runningInBrowser())throw new Error("Async zipping only supported in the browser");return function(e,t){t||(t={});var n={},r=[];Dn(e,"",n,t);var i=0,o=0;for(var s in n){var a=n[s],l=a[0],c=a[1],u=0==c.level?0:8,h=(E=On(s)).length,d=c.comment,f=d&&On(d),p=f&&f.length,g=jn(c.extra);h>65535&&Xt(11);var m=u?Mn(l,c):l,v=m.length,y=ln();y.p(l),r.push(un(c,{size:l.length,crc:y.d(),c:m,f:E,m:f,u:h!=s.length||f&&d.length!=p,o:i,compression:u})),i+=30+h+g+v,o+=76+2*(h+g)+(p||0)+v}for(var w=new yt(o+22),b=i,S=o-i,C=0;C<r.length;++C){var E=r[C];$n(w,E.o,E,E.f,E.u,E.c.length);var x=30+E.f.length+jn(E.extra);w.set(E.c,E.o+x),$n(w,i,E,E.f,E.u,E.c.length,E.o,E.m),i+=16+x+(E.m?E.m.length:0)}return Hn(w,i,r.length,S,b),w}(sr.fflatePreprocess(e))}static zipAsync(e,t){!function(e,t,n){n||(n=t,t={}),"function"!=typeof n&&Xt(7);var r={};Dn(e,"",r,t);var i=Object.keys(r),o=i.length,s=0,a=0,l=o,c=new Array(o),u=[],h=function(){for(var e=0;e<u.length;++e)u[e]()},d=function(e,t){Gn((function(){n(e,t)}))};Gn((function(){d=n}));var f=function(){var e=new yt(a+22),t=s,n=a-s;a=0;for(var r=0;r<l;++r){var i=c[r];try{var o=i.c.length;$n(e,a,i,i.f,i.u,o);var u=30+i.f.length+jn(i.extra),h=a+u;e.set(i.c,h),$n(e,s,i,i.f,i.u,o,a,i.m),s+=16+u+(i.m?i.m.length:0),a=h+o}catch(e){return d(e,null)}}Hn(e,s,c.length,n,t),d(null,e)};o||f();for(var p=function(e){var t=i[e],n=r[t],l=n[0],p=n[1],g=ln(),m=l.length;g.p(l);var v=On(t),y=v.length,w=p.comment,b=w&&On(w),S=b&&b.length,C=jn(p.extra),E=0==p.level?0:8,x=function(n,r){if(n)h(),d(n,null);else{var i=r.length;c[e]=un(p,{size:m,crc:g.d(),c:r,f:v,m:b,u:y!=t.length||b&&w.length!=S,compression:E}),s+=30+y+C+i,a+=76+2*(y+C)+(S||0)+i,--o||f()}};if(y>65535&&x(Xt(11,0,1),null),E)if(m<16e4)try{x(null,Mn(l,p))}catch(e){x(e,null)}else u.push(function(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&Xt(7),wn(e,t,[pn],(function(e){return vn(Mn(e.data[0],e.data[1]))}),0,n)}(l,p,x));else x(null,l)},g=0;g<l;++g)p(g)}(sr.fflatePreprocess(e),{},t)}static fflateFilter(e){return sr.isImportableZipPath(e.name)}static fflatePostprocess(e){return Object.keys(e).reduce((function(t,n){const r=qn(n).filename,i=sr.encodeGBK(r),o=e[n];return t[i]=o,t}),{})}static isImportableZipPath(e){const t=qn(e),n=Vn(e).toLowerCase();return"gz"!=n&&"zip"!=n&&!/^__MACOSX/.test(e)&&"."!=t.filename[0]}static fflatePreprocess(e){const t={};return e.forEach((e=>{"string"==typeof e.content?e.content=On(e.content):e.content instanceof ArrayBuffer&&(e.content=new Uint8Array(e.content)),t[e.filename]=e.content})),t}}class ar{static runningInBrowser(){return"undefined"!=typeof window&&void 0!==window.document}static isGzipped(e){return e.length>2&&e.buffer instanceof ArrayBuffer&&31==e[0]&&139==e[1]}static gzipSync(e,t){return"string"==typeof e&&(e=On(e)),ar.runningInBrowser()?Rn(e,t):void 0}static async gzipAsync(e,t){let n;if("string"==typeof e&&(n=On(e)),ar.runningInBrowser())return st.promisify(_n)(n,t)}static async readGzipFromFile(e){const t={content:await st.readFilePromise(e,"ArrayBuffer"),name:e.name};return ar.readGzipFile(t)}static readGzipFile(e){var t=e.name.replace(/\.gz$/,"");return[{name:t,content:ar.gunzipSync(e.content,t)}]}static async gunzipAsync(e,t){if(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),t=t||{},!ar.runningInBrowser())return;var n=st.promisify(Ln);let r=await n(e,t);return t.filename&&(r=Bn(r)),r}static gunzipSync(e,t){e instanceof ArrayBuffer&&(e=new Uint8Array(e));let n=In(e);return t&&(n=Bn(n)),n}}class lr{static formatToDate(e,t="YYYY-MM-DD"){let n=new Date;if(e&&(ze(e)||xe(e)?n=new Date(e):Ce(e)&&(n=e),!n))throw"date对象为空";const r=n.getFullYear(),i=String(n.getMonth()+1).padStart(2,"0"),o=String(n.getDate()).padStart(2,"0");return t.replace("YYYY",String(r)).replace("MM",i).replace("DD",o)}static formatToTime(e,t="HH:mm:ss"){let n=new Date;if(e&&(ze(e)||xe(e)?n=new Date(e):Ce(e)&&(n=e),!n))throw"date对象为空";const r=String(n.getHours()).padStart(2,"0"),i=String(n.getMinutes()).padStart(2,"0"),o=String(n.getSeconds()).padStart(2,"0");return t.replace("HH",r).replace("mm",i).replace("ss",o)}static formatToDateTime(e,t="YYYY-MM-DD HH:mm:ss"){let n=new Date;if(e&&(ze(e)||xe(e)?n=new Date(e):Ce(e)&&(n=e),!n))throw"date对象为空";return this.formatToDate(n,t.split(" ")[0])+" "+this.formatToTime(n,t.split(" ")[1])}static formatStringDateTime(e){let t=`${e.substring(0,4)}-${e.substring(4,6)}-${e.substring(6,8)}`;return 14===e.length&&(t=`${t} ${e.substring(8,10)}:${e.substring(10,12)}:${e.substring(12,14)}`),t}}let cr=!0;try{String.fromCharCode.apply(String,[1,2])}catch(e){cr=!1,Object.defineProperty(Array.prototype,"subarray",{value:Array.prototype.slice})}var ur=2654435769;function hr(e,t){var n=e.length,r=n<<2;if(t){var i=e[n-1];if(i<(r-=4)-3||i>r)return null;r=i}for(var o=new Uint8Array(r),s=0;s<r;++s)o[s]=e[s>>2]>>((3&s)<<3);return o}function dr(e,t){var n,r=e.length,i=r>>2;3&r&&++i,t?(n=new Uint32Array(i+1))[i]=r:n=new Uint32Array(i);for(var o=0;o<r;++o)n[o>>2]|=e[o]<<((3&o)<<3);return n}function fr(e){return 4294967295&e}function pr(e,t,n,r,i,o){return(n>>>5^t<<2)+(t>>>3^n<<4)^(e^t)+(o[3&r^i]^n)}function gr(e){if(e.length<16){var t=new Uint8Array(16);t.set(e),e=t}return e}function mr(e){for(var t=e.length,n=new Uint8Array(3*t),r=0,i=0;i<t;i++){var o=e.charCodeAt(i);if(o<128)n[r++]=o;else if(o<2048)n[r++]=192|o>>6,n[r++]=128|63&o;else{if(!(o<55296||o>57343)){if(i+1<t){var s=e.charCodeAt(i+1);if(o<56320&&56320<=s&&s<=57343){var a=65536+((1023&o)<<10|1023&s);n[r++]=240|a>>18,n[r++]=128|a>>12&63,n[r++]=128|a>>6&63,n[r++]=128|63&a,i++;continue}}throw new Error("Malformed string")}n[r++]=224|o>>12,n[r++]=128|o>>6&63,n[r++]=128|63&o}}return n.subarray(0,r)}function vr(e){var t=e.length;return 0===t?"":t<32767?function(e,t){for(var n=new Array(t),r=0,i=0,o=e.length;r<t&&i<o;r++){var s=e[i++];switch(s>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:n[r]=s;break;case 12:case 13:if(!(i<o))throw new Error("Unfinished UTF-8 octet sequence");n[r]=(31&s)<<6|63&e[i++];break;case 14:if(!(i+1<o))throw new Error("Unfinished UTF-8 octet sequence");n[r]=(15&s)<<12|(63&e[i++])<<6|63&e[i++];break;case 15:if(!(i+2<o))throw new Error("Unfinished UTF-8 octet sequence");var a=((7&s)<<18|(63&e[i++])<<12|(63&e[i++])<<6|63&e[i++])-65536;if(!(0<=a&&a<=1048575))throw new Error("Character outside valid Unicode range: 0x"+a.toString(16));n[r++]=a>>10&1023|55296,n[r]=1023&a|56320;break;default:throw new Error("Bad UTF-8 encoding 0x"+s.toString(16))}}return r<t&&(n.length=r),String.fromCharCode.apply(String,n)}(e,t):function(e,t){for(var n=[],r=new Array(32768),i=0,o=0,s=e.length;i<t&&o<s;i++){var a=e[o++];switch(a>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:r[i]=a;break;case 12:case 13:if(!(o<s))throw new Error("Unfinished UTF-8 octet sequence");r[i]=(31&a)<<6|63&e[o++];break;case 14:if(!(o+1<s))throw new Error("Unfinished UTF-8 octet sequence");r[i]=(15&a)<<12|(63&e[o++])<<6|63&e[o++];break;case 15:if(!(o+2<s))throw new Error("Unfinished UTF-8 octet sequence");var l=((7&a)<<18|(63&e[o++])<<12|(63&e[o++])<<6|63&e[o++])-65536;if(!(0<=l&&l<=1048575))throw new Error("Character outside valid Unicode range: 0x"+l.toString(16));r[i++]=l>>10&1023|55296,r[i]=1023&l|56320;break;default:throw new Error("Bad UTF-8 encoding 0x"+a.toString(16))}if(i>=32766){var c=i+1;r.length=c,n.push(String.fromCharCode.apply(String,r)),t-=c,i=-1}}return i>0&&(r.length=i,n.push(String.fromCharCode.apply(String,r))),n.join("")}(e,t)}function yr(e,t){return"string"==typeof e&&(e=mr(e)),"string"==typeof t&&(t=mr(t)),null==e||0===e.length?e:hr(function(e,t){var n,r,i,o,s,a,l=e.length,c=l-1;for(r=e[c],i=0,a=0|Math.floor(6+52/l);a>0;--a){for(o=(i=fr(i+ur))>>>2&3,s=0;s<c;++s)n=e[s+1],r=e[s]=fr(e[s]+pr(i,n,r,s,o,t));n=e[0],r=e[c]=fr(e[c]+pr(i,n,r,c,o,t))}return e}(dr(e,!0),dr(gr(t),!1)),!1)}function wr(e,t){return"string"==typeof e&&(e=function(e){for(var t=globalThis.atob(e),n=t.length,r=new Uint8Array(n),i=0;i<n;i++)r[i]=t.charCodeAt(i);return r}(e)),"string"==typeof t&&(t=mr(t)),null==e||0===e.length?e:hr(function(e,t){var n,r,i,o,s,a=e.length,l=a-1;for(n=e[0],i=fr(Math.floor(6+52/a)*ur);0!==i;i=fr(i-ur)){for(o=i>>>2&3,s=l;s>0;--s)r=e[s-1],n=e[s]=fr(e[s]-pr(i,n,r,s,o,t));r=e[l],n=e[0]=fr(e[0]-pr(i,n,r,0,o,t))}return e}(dr(e,!1),dr(gr(t),!1)),!0)}const br={toBytes:mr,toString:vr,encrypt:yr,encryptToString:function(e,t){return globalThis.btoa(function(e){var t=e.length;if(0===t)return"";var n=cr?e:function(e){for(var t=e.length,n=new Array(e.length),r=0;r<t;++r)n[r]=e[r];return n}(e);if(t<65535)return String.fromCharCode.apply(String,n);for(var r=32767&t,i=t>>15,o=new Array(r?i+1:i),s=0;s<i;++s)o[s]=String.fromCharCode.apply(String,n.subarray(s<<15,s+1<<15));return r&&(o[i]=String.fromCharCode.apply(String,n.subarray(i<<15,t))),o.join("")}(yr(e,t)))},decrypt:wr,decryptToString:function(e,t){return vr(wr(e,t))}},Sr=e=>{const t="1.23452384164.123412416";null!==document.getElementById(t)&&document.body.removeChild(document.getElementById(t));const n=document.createElement("canvas");n.width=200,n.height=130;const r=n.getContext("2d");r.rotate(-20*Math.PI/180),r.font="12px Vedana",r.fillStyle="rgba(200, 200, 200, 0.30)",r.textBaseline="middle",r.fillText(e,n.width/10,n.height/2);const i=document.createElement("div");return i.id=t,i.style.pointerEvents="none",i.style.top="0px",i.style.left="0px",i.style.position="fixed",i.style.zIndex="10000000",i.style.width=`${document.documentElement.clientWidth}px`,i.style.height=`${document.documentElement.clientHeight}px`,i.style.background=`url(${n.toDataURL("image/png")}) left top repeat`,document.body.appendChild(i),t},Cr={set:e=>{let t=Sr(e);null===document.getElementById(t)&&(t=Sr(e))},del:()=>{let e="1.23452384164.123412416";null!==document.getElementById(e)&&document.body.removeChild(document.getElementById(e))}};let Er;function xr(e){if(!e){if(Er)return Er;throw new Error("首次构建,signalrURL参数不能为空!")}const t=(new G.HubConnectionBuilder).configureLogging(G.LogLevel.Information).withUrl(e).withAutomaticReconnect({nextRetryDelayInMilliseconds:()=>5e3}).build();return t.keepAliveIntervalInMilliseconds=15e3,t.serverTimeoutInMilliseconds=18e5,t.start().then((()=>{ce.Logger().info("启动SignalR连接!")})),t.onclose((async()=>{ce.Logger().info("断开SignalR连接!")})),t.onreconnecting((()=>{ce.Logger().warn("SignalR服务已断线,重连中...!")})),t.onreconnected((()=>{ce.Logger().warn("SignalR重连成功!")})),Er||(Er=t),t}var kr,Tr,zr={exports:{}},Mr=zr.exports={};function Ar(){throw new Error("setTimeout has not been defined")}function _r(){throw new Error("clearTimeout has not been defined")}function Rr(e){if(kr===setTimeout)return setTimeout(e,0);if((kr===Ar||!kr)&&setTimeout)return kr=setTimeout,setTimeout(e,0);try{return kr(e,0)}catch(t){try{return kr.call(null,e,0)}catch(t){return kr.call(this,e,0)}}}!function(){try{kr="function"==typeof setTimeout?setTimeout:Ar}catch(e){kr=Ar}try{Tr="function"==typeof clearTimeout?clearTimeout:_r}catch(e){Tr=_r}}();var Lr,Ir=[],Dr=!1,Nr=-1;function Pr(){Dr&&Lr&&(Dr=!1,Lr.length?Ir=Lr.concat(Ir):Nr=-1,Ir.length&&Or())}function Or(){if(!Dr){var e=Rr(Pr);Dr=!0;for(var t=Ir.length;t;){for(Lr=Ir,Ir=[];++Nr<t;)Lr&&Lr[Nr].run();Nr=-1,t=Ir.length}Lr=null,Dr=!1,function(e){if(Tr===clearTimeout)return clearTimeout(e);if((Tr===_r||!Tr)&&clearTimeout)return Tr=clearTimeout,clearTimeout(e);try{return Tr(e)}catch(t){try{return Tr.call(null,e)}catch(t){return Tr.call(this,e)}}}(e)}}function Br(e,t){this.fun=e,this.array=t}function Fr(){}Mr.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];Ir.push(new Br(e,t)),1!==Ir.length||Dr||Rr(Or)},Br.prototype.run=function(){this.fun.apply(null,this.array)},Mr.title="browser",Mr.browser=!0,Mr.env={},Mr.argv=[],Mr.version="",Mr.versions={},Mr.on=Fr,Mr.addListener=Fr,Mr.once=Fr,Mr.off=Fr,Mr.removeListener=Fr,Mr.removeAllListeners=Fr,Mr.emit=Fr,Mr.prependListener=Fr,Mr.prependOnceListener=Fr,Mr.listeners=function(e){return[]},Mr.binding=function(e){throw new Error("process.binding is not supported")},Mr.cwd=function(){return"/"},Mr.chdir=function(e){throw new Error("process.chdir is not supported")},Mr.umask=function(){return 0};const Wr=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}(zr.exports),Ur="object"==typeof performance&&performance&&"function"==typeof performance.now?performance:Date,jr=new Set,$r="object"==typeof Wr&&Wr?Wr:{},Hr=(e,t,n,r)=>{"function"==typeof $r.emitWarning?$r.emitWarning(e,t,n,r):console.error(`[${n}] ${t}: ${e}`)};let Gr=globalThis.AbortController,qr=globalThis.AbortSignal;if(void 0===Gr){qr=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(e,t){this._onabort.push(t)}},Gr=class{constructor(){t()}signal=new qr;abort(e){if(!this.signal.aborted){this.signal.reason=e,this.signal.aborted=!0;for(const t of this.signal._onabort)t(e);this.signal.onabort?.(e)}}};let e="1"!==$r.env?.LRU_CACHE_IGNORE_AC_WARNING;const t=()=>{e&&(e=!1,Hr("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",t))}}const Xr=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),Vr=e=>Xr(e)?e<=Math.pow(2,8)?Uint8Array:e<=Math.pow(2,16)?Uint16Array:e<=Math.pow(2,32)?Uint32Array:e<=Number.MAX_SAFE_INTEGER?Kr:null:null;class Kr extends Array{constructor(e){super(e),this.fill(0)}}class Yr{heap;length;static#e=!1;static create(e){const t=Vr(e);if(!t)return[];Yr.#e=!0;const n=new Yr(e,t);return Yr.#e=!1,n}constructor(e,t){if(!Yr.#e)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new t(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}}class Zr{#t;#n;#r;#i;#o;#s;#a;#l;get perf(){return this.#l}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#c;#u;#h;#d;#f;#p;#g;#m;#v;#y;#w;#b;#S;#C;#E;#x;#k;#T;#z;static unsafeExposeInternals(e){return{starts:e.#S,ttls:e.#C,autopurgeTimers:e.#E,sizes:e.#b,keyMap:e.#h,keyList:e.#d,valList:e.#f,next:e.#p,prev:e.#g,get head(){return e.#m},get tail(){return e.#v},free:e.#y,isBackgroundFetch:t=>e.#M(t),backgroundFetch:(t,n,r,i)=>e.#A(t,n,r,i),moveToTail:t=>e.#_(t),indexes:t=>e.#R(t),rindexes:t=>e.#L(t),isStale:t=>e.#I(t)}}get max(){return this.#t}get maxSize(){return this.#n}get calculatedSize(){return this.#u}get size(){return this.#c}get fetchMethod(){return this.#s}get memoMethod(){return this.#a}get dispose(){return this.#r}get onInsert(){return this.#i}get disposeAfter(){return this.#o}constructor(e){const{max:t=0,ttl:n,ttlResolution:r=1,ttlAutopurge:i,updateAgeOnGet:o,updateAgeOnHas:s,allowStale:a,dispose:l,onInsert:c,disposeAfter:u,noDisposeOnSet:h,noUpdateTTL:d,maxSize:f=0,maxEntrySize:p=0,sizeCalculation:g,fetchMethod:m,memoMethod:v,noDeleteOnFetchRejection:y,noDeleteOnStaleGet:w,allowStaleOnFetchRejection:b,allowStaleOnFetchAbort:S,ignoreFetchAbort:C,perf:E}=e;if(void 0!==E&&"function"!=typeof E?.now)throw new TypeError("perf option must have a now() method if specified");if(this.#l=E??Ur,0!==t&&!Xr(t))throw new TypeError("max option must be a nonnegative integer");const x=t?Vr(t):Array;if(!x)throw new Error("invalid max value: "+t);if(this.#t=t,this.#n=f,this.maxEntrySize=p||this.#n,this.sizeCalculation=g,this.sizeCalculation){if(!this.#n&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if("function"!=typeof this.sizeCalculation)throw new TypeError("sizeCalculation set to non-function")}if(void 0!==v&&"function"!=typeof v)throw new TypeError("memoMethod must be a function if defined");if(this.#a=v,void 0!==m&&"function"!=typeof m)throw new TypeError("fetchMethod must be a function if specified");if(this.#s=m,this.#k=!!m,this.#h=new Map,this.#d=new Array(t).fill(void 0),this.#f=new Array(t).fill(void 0),this.#p=new x(t),this.#g=new x(t),this.#m=0,this.#v=0,this.#y=Yr.create(t),this.#c=0,this.#u=0,"function"==typeof l&&(this.#r=l),"function"==typeof c&&(this.#i=c),"function"==typeof u?(this.#o=u,this.#w=[]):(this.#o=void 0,this.#w=void 0),this.#x=!!this.#r,this.#z=!!this.#i,this.#T=!!this.#o,this.noDisposeOnSet=!!h,this.noUpdateTTL=!!d,this.noDeleteOnFetchRejection=!!y,this.allowStaleOnFetchRejection=!!b,this.allowStaleOnFetchAbort=!!S,this.ignoreFetchAbort=!!C,0!==this.maxEntrySize){if(0!==this.#n&&!Xr(this.#n))throw new TypeError("maxSize must be a positive integer if specified");if(!Xr(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#D()}if(this.allowStale=!!a,this.noDeleteOnStaleGet=!!w,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!s,this.ttlResolution=Xr(r)||0===r?r:1,this.ttlAutopurge=!!i,this.ttl=n||0,this.ttl){if(!Xr(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#N()}if(0===this.#t&&0===this.ttl&&0===this.#n)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#t&&!this.#n){const e="LRU_CACHE_UNBOUNDED";(e=>!jr.has(e))(e)&&(jr.add(e),Hr("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",e,Zr))}}getRemainingTTL(e){return this.#h.has(e)?1/0:0}#N(){const e=new Kr(this.#t),t=new Kr(this.#t);this.#C=e,this.#S=t;const n=this.ttlAutopurge?new Array(this.#t):void 0;this.#E=n,this.#P=(r,i,o=this.#l.now())=>{if(t[r]=0!==i?o:0,e[r]=i,n?.[r]&&(clearTimeout(n[r]),n[r]=void 0),0!==i&&n){const e=setTimeout((()=>{this.#I(r)&&this.#O(this.#d[r],"expire")}),i+1);e.unref&&e.unref(),n[r]=e}},this.#B=n=>{t[n]=0!==e[n]?this.#l.now():0},this.#F=(n,o)=>{if(e[o]){const s=e[o],a=t[o];if(!s||!a)return;n.ttl=s,n.start=a,n.now=r||i();const l=n.now-a;n.remainingTTL=s-l}};let r=0;const i=()=>{const e=this.#l.now();if(this.ttlResolution>0){r=e;const t=setTimeout((()=>r=0),this.ttlResolution);t.unref&&t.unref()}return e};this.getRemainingTTL=n=>{const o=this.#h.get(n);if(void 0===o)return 0;const s=e[o],a=t[o];return s&&a?s-((r||i())-a):1/0},this.#I=n=>{const o=t[n],s=e[n];return!!s&&!!o&&(r||i())-o>s}}#B=()=>{};#F=()=>{};#P=()=>{};#I=()=>!1;#D(){const e=new Kr(this.#t);this.#u=0,this.#b=e,this.#W=t=>{this.#u-=e[t],e[t]=0},this.#U=(e,t,n,r)=>{if(this.#M(t))return 0;if(!Xr(n)){if(!r)throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");if("function"!=typeof r)throw new TypeError("sizeCalculation must be a function");if(n=r(t,e),!Xr(n))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}return n},this.#j=(t,n,r)=>{if(e[t]=n,this.#n){const n=this.#n-e[t];for(;this.#u>n;)this.#$(!0)}this.#u+=e[t],r&&(r.entrySize=n,r.totalCalculatedSize=this.#u)}}#W=e=>{};#j=(e,t,n)=>{};#U=(e,t,n,r)=>{if(n||r)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#R({allowStale:e=this.allowStale}={}){if(this.#c)for(let t=this.#v;this.#H(t)&&(!e&&this.#I(t)||(yield t),t!==this.#m);)t=this.#g[t]}*#L({allowStale:e=this.allowStale}={}){if(this.#c)for(let t=this.#m;this.#H(t)&&(!e&&this.#I(t)||(yield t),t!==this.#v);)t=this.#p[t]}#H(e){return void 0!==e&&this.#h.get(this.#d[e])===e}*entries(){for(const e of this.#R())void 0===this.#f[e]||void 0===this.#d[e]||this.#M(this.#f[e])||(yield[this.#d[e],this.#f[e]])}*rentries(){for(const e of this.#L())void 0===this.#f[e]||void 0===this.#d[e]||this.#M(this.#f[e])||(yield[this.#d[e],this.#f[e]])}*keys(){for(const e of this.#R()){const t=this.#d[e];void 0===t||this.#M(this.#f[e])||(yield t)}}*rkeys(){for(const e of this.#L()){const t=this.#d[e];void 0===t||this.#M(this.#f[e])||(yield t)}}*values(){for(const e of this.#R())void 0===this.#f[e]||this.#M(this.#f[e])||(yield this.#f[e])}*rvalues(){for(const e of this.#L())void 0===this.#f[e]||this.#M(this.#f[e])||(yield this.#f[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,t={}){for(const n of this.#R()){const r=this.#f[n],i=this.#M(r)?r.__staleWhileFetching:r;if(void 0!==i&&e(i,this.#d[n],this))return this.get(this.#d[n],t)}}forEach(e,t=this){for(const n of this.#R()){const r=this.#f[n],i=this.#M(r)?r.__staleWhileFetching:r;void 0!==i&&e.call(t,i,this.#d[n],this)}}rforEach(e,t=this){for(const n of this.#L()){const r=this.#f[n],i=this.#M(r)?r.__staleWhileFetching:r;void 0!==i&&e.call(t,i,this.#d[n],this)}}purgeStale(){let e=!1;for(const t of this.#L({allowStale:!0}))this.#I(t)&&(this.#O(this.#d[t],"expire"),e=!0);return e}info(e){const t=this.#h.get(e);if(void 0===t)return;const n=this.#f[t],r=this.#M(n)?n.__staleWhileFetching:n;if(void 0===r)return;const i={value:r};if(this.#C&&this.#S){const e=this.#C[t],n=this.#S[t];if(e&&n){const t=e-(this.#l.now()-n);i.ttl=t,i.start=Date.now()}}return this.#b&&(i.size=this.#b[t]),i}dump(){const e=[];for(const t of this.#R({allowStale:!0})){const n=this.#d[t],r=this.#f[t],i=this.#M(r)?r.__staleWhileFetching:r;if(void 0===i||void 0===n)continue;const o={value:i};if(this.#C&&this.#S){o.ttl=this.#C[t];const e=this.#l.now()-this.#S[t];o.start=Math.floor(Date.now()-e)}this.#b&&(o.size=this.#b[t]),e.unshift([n,o])}return e}load(e){this.clear();for(const[t,n]of e){if(n.start){const e=Date.now()-n.start;n.start=this.#l.now()-e}this.set(t,n.value,n)}}set(e,t,n={}){if(void 0===t)return this.delete(e),this;const{ttl:r=this.ttl,start:i,noDisposeOnSet:o=this.noDisposeOnSet,sizeCalculation:s=this.sizeCalculation,status:a}=n;let{noUpdateTTL:l=this.noUpdateTTL}=n;const c=this.#U(e,t,n.size||0,s);if(this.maxEntrySize&&c>this.maxEntrySize)return a&&(a.set="miss",a.maxEntrySizeExceeded=!0),this.#O(e,"set"),this;let u=0===this.#c?void 0:this.#h.get(e);if(void 0===u)u=0===this.#c?this.#v:0!==this.#y.length?this.#y.pop():this.#c===this.#t?this.#$(!1):this.#c,this.#d[u]=e,this.#f[u]=t,this.#h.set(e,u),this.#p[this.#v]=u,this.#g[u]=this.#v,this.#v=u,this.#c++,this.#j(u,c,a),a&&(a.set="add"),l=!1,this.#z&&this.#i?.(t,e,"add");else{this.#_(u);const n=this.#f[u];if(t!==n){if(this.#k&&this.#M(n)){n.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:t}=n;void 0===t||o||(this.#x&&this.#r?.(t,e,"set"),this.#T&&this.#w?.push([t,e,"set"]))}else o||(this.#x&&this.#r?.(n,e,"set"),this.#T&&this.#w?.push([n,e,"set"]));if(this.#W(u),this.#j(u,c,a),this.#f[u]=t,a){a.set="replace";const e=n&&this.#M(n)?n.__staleWhileFetching:n;void 0!==e&&(a.oldValue=e)}}else a&&(a.set="update");this.#z&&this.onInsert?.(t,e,t===n?"update":"replace")}if(0===r||this.#C||this.#N(),this.#C&&(l||this.#P(u,r,i),a&&this.#F(a,u)),!o&&this.#T&&this.#w){const e=this.#w;let t;for(;t=e?.shift();)this.#o?.(...t)}return this}pop(){try{for(;this.#c;){const e=this.#f[this.#m];if(this.#$(!0),this.#M(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(void 0!==e)return e}}finally{if(this.#T&&this.#w){const e=this.#w;let t;for(;t=e?.shift();)this.#o?.(...t)}}}#$(e){const t=this.#m,n=this.#d[t],r=this.#f[t];return this.#k&&this.#M(r)?r.__abortController.abort(new Error("evicted")):(this.#x||this.#T)&&(this.#x&&this.#r?.(r,n,"evict"),this.#T&&this.#w?.push([r,n,"evict"])),this.#W(t),this.#E?.[t]&&(clearTimeout(this.#E[t]),this.#E[t]=void 0),e&&(this.#d[t]=void 0,this.#f[t]=void 0,this.#y.push(t)),1===this.#c?(this.#m=this.#v=0,this.#y.length=0):this.#m=this.#p[t],this.#h.delete(n),this.#c--,t}has(e,t={}){const{updateAgeOnHas:n=this.updateAgeOnHas,status:r}=t,i=this.#h.get(e);if(void 0!==i){const e=this.#f[i];if(this.#M(e)&&void 0===e.__staleWhileFetching)return!1;if(!this.#I(i))return n&&this.#B(i),r&&(r.has="hit",this.#F(r,i)),!0;r&&(r.has="stale",this.#F(r,i))}else r&&(r.has="miss");return!1}peek(e,t={}){const{allowStale:n=this.allowStale}=t,r=this.#h.get(e);if(void 0===r||!n&&this.#I(r))return;const i=this.#f[r];return this.#M(i)?i.__staleWhileFetching:i}#A(e,t,n,r){const i=void 0===t?void 0:this.#f[t];if(this.#M(i))return i;const o=new Gr,{signal:s}=n;s?.addEventListener("abort",(()=>o.abort(s.reason)),{signal:o.signal});const a={signal:o.signal,options:n,context:r},l=(r,i=!1)=>{const{aborted:s}=o.signal,l=n.ignoreFetchAbort&&void 0!==r,h=n.ignoreFetchAbort||!(!n.allowStaleOnFetchAbort||void 0===r);if(n.status&&(s&&!i?(n.status.fetchAborted=!0,n.status.fetchError=o.signal.reason,l&&(n.status.fetchAbortIgnored=!0)):n.status.fetchResolved=!0),s&&!l&&!i)return c(o.signal.reason,h);const d=u,f=this.#f[t];return(f===u||l&&i&&void 0===f)&&(void 0===r?void 0!==d.__staleWhileFetching?this.#f[t]=d.__staleWhileFetching:this.#O(e,"fetch"):(n.status&&(n.status.fetchUpdated=!0),this.set(e,r,a.options))),r},c=(r,i)=>{const{aborted:s}=o.signal,a=s&&n.allowStaleOnFetchAbort,l=a||n.allowStaleOnFetchRejection,c=l||n.noDeleteOnFetchRejection,h=u;if(this.#f[t]===u&&(!c||!i&&void 0===h.__staleWhileFetching?this.#O(e,"fetch"):a||(this.#f[t]=h.__staleWhileFetching)),l)return n.status&&void 0!==h.__staleWhileFetching&&(n.status.returnedStale=!0),h.__staleWhileFetching;if(h.__returned===h)throw r};n.status&&(n.status.fetchDispatched=!0);const u=new Promise(((t,r)=>{const s=this.#s?.(e,i,a);s&&s instanceof Promise&&s.then((e=>t(void 0===e?void 0:e)),r),o.signal.addEventListener("abort",(()=>{n.ignoreFetchAbort&&!n.allowStaleOnFetchAbort||(t(void 0),n.allowStaleOnFetchAbort&&(t=e=>l(e,!0)))}))})).then(l,(e=>(n.status&&(n.status.fetchRejected=!0,n.status.fetchError=e),c(e,!1)))),h=Object.assign(u,{__abortController:o,__staleWhileFetching:i,__returned:void 0});return void 0===t?(this.set(e,h,{...a.options,status:void 0}),t=this.#h.get(e)):this.#f[t]=h,h}#M(e){if(!this.#k)return!1;const t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty("__staleWhileFetching")&&t.__abortController instanceof Gr}async fetch(e,t={}){const{allowStale:n=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:s=this.noDisposeOnSet,size:a=0,sizeCalculation:l=this.sizeCalculation,noUpdateTTL:c=this.noUpdateTTL,noDeleteOnFetchRejection:u=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:h=this.allowStaleOnFetchRejection,ignoreFetchAbort:d=this.ignoreFetchAbort,allowStaleOnFetchAbort:f=this.allowStaleOnFetchAbort,context:p,forceRefresh:g=!1,status:m,signal:v}=t;if(!this.#k)return m&&(m.fetch="get"),this.get(e,{allowStale:n,updateAgeOnGet:r,noDeleteOnStaleGet:i,status:m});const y={allowStale:n,updateAgeOnGet:r,noDeleteOnStaleGet:i,ttl:o,noDisposeOnSet:s,size:a,sizeCalculation:l,noUpdateTTL:c,noDeleteOnFetchRejection:u,allowStaleOnFetchRejection:h,allowStaleOnFetchAbort:f,ignoreFetchAbort:d,status:m,signal:v};let w=this.#h.get(e);if(void 0===w){m&&(m.fetch="miss");const t=this.#A(e,w,y,p);return t.__returned=t}{const t=this.#f[w];if(this.#M(t)){const e=n&&void 0!==t.__staleWhileFetching;return m&&(m.fetch="inflight",e&&(m.returnedStale=!0)),e?t.__staleWhileFetching:t.__returned=t}const i=this.#I(w);if(!g&&!i)return m&&(m.fetch="hit"),this.#_(w),r&&this.#B(w),m&&this.#F(m,w),t;const o=this.#A(e,w,y,p),s=void 0!==o.__staleWhileFetching&&n;return m&&(m.fetch=i?"stale":"refresh",s&&i&&(m.returnedStale=!0)),s?o.__staleWhileFetching:o.__returned=o}}async forceFetch(e,t={}){const n=await this.fetch(e,t);if(void 0===n)throw new Error("fetch() returned undefined");return n}memo(e,t={}){const n=this.#a;if(!n)throw new Error("no memoMethod provided to constructor");const{context:r,forceRefresh:i,...o}=t,s=this.get(e,o);if(!i&&void 0!==s)return s;const a=n(e,s,{options:o,context:r});return this.set(e,a,o),a}get(e,t={}){const{allowStale:n=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,status:o}=t,s=this.#h.get(e);if(void 0!==s){const t=this.#f[s],a=this.#M(t);return o&&this.#F(o,s),this.#I(s)?(o&&(o.get="stale"),a?(o&&n&&void 0!==t.__staleWhileFetching&&(o.returnedStale=!0),n?t.__staleWhileFetching:void 0):(i||this.#O(e,"expire"),o&&n&&(o.returnedStale=!0),n?t:void 0)):(o&&(o.get="hit"),a?t.__staleWhileFetching:(this.#_(s),r&&this.#B(s),t))}o&&(o.get="miss")}#G(e,t){this.#g[t]=e,this.#p[e]=t}#_(e){e!==this.#v&&(e===this.#m?this.#m=this.#p[e]:this.#G(this.#g[e],this.#p[e]),this.#G(this.#v,e),this.#v=e)}delete(e){return this.#O(e,"delete")}#O(e,t){let n=!1;if(0!==this.#c){const r=this.#h.get(e);if(void 0!==r)if(this.#E?.[r]&&(clearTimeout(this.#E?.[r]),this.#E[r]=void 0),n=!0,1===this.#c)this.#q(t);else{this.#W(r);const n=this.#f[r];if(this.#M(n)?n.__abortController.abort(new Error("deleted")):(this.#x||this.#T)&&(this.#x&&this.#r?.(n,e,t),this.#T&&this.#w?.push([n,e,t])),this.#h.delete(e),this.#d[r]=void 0,this.#f[r]=void 0,r===this.#v)this.#v=this.#g[r];else if(r===this.#m)this.#m=this.#p[r];else{const e=this.#g[r];this.#p[e]=this.#p[r];const t=this.#p[r];this.#g[t]=this.#g[r]}this.#c--,this.#y.push(r)}}if(this.#T&&this.#w?.length){const e=this.#w;let t;for(;t=e?.shift();)this.#o?.(...t)}return n}clear(){return this.#q("delete")}#q(e){for(const t of this.#L({allowStale:!0})){const n=this.#f[t];if(this.#M(n))n.__abortController.abort(new Error("deleted"));else{const r=this.#d[t];this.#x&&this.#r?.(n,r,e),this.#T&&this.#w?.push([n,r,e])}}if(this.#h.clear(),this.#f.fill(void 0),this.#d.fill(void 0),this.#C&&this.#S){this.#C.fill(0),this.#S.fill(0);for(const e of this.#E??[])void 0!==e&&clearTimeout(e);this.#E?.fill(void 0)}if(this.#b&&this.#b.fill(0),this.#m=0,this.#v=0,this.#y.length=0,this.#u=0,this.#c=0,this.#T&&this.#w){const e=this.#w;let t;for(;t=e?.shift();)this.#o?.(...t)}}}class Jr{static defaultOptions={max:1e3,maxAge:18e5};static cache=new Zr(this.defaultOptions);static createCache(e=this.defaultOptions){return new Zr(e)}static set(e,t,n=this.cache){let r=n;r||(r=this.cache),r.set(e,t)}static get(e,t=this.cache){let n=t;return n||(n=this.cache),n.get(e)}static remove(e,t=this.cache){let n=t;return n||(n=this.cache),n.del(e)}static has(e,t=this.cache){let n=t;return n||(n=this.cache),n.has(e)}static count(e=this.cache){let t=e;return t||(t=this.cache),t.size}static maxSize(e=this.cache){let t=e;return t||(t=this.cache),t.max}static peek(e,t=this.cache){let n=t;return n||(n=this.cache),n.peek(e)}static keys(e=this.cache){let t=e;return t||(t=this.cache),t.keys()}static clear(e=this.cache){let t=e;t||(t=this.cache),t.clear()}}class Qr{static CharCodes=["A","B","C","D","E","F","G","H","J","K","L","M","N","P","Q","R","S","T","U","V","W","X","Y","Z"];static matrix2=[[3,4],[1,2]];static matrix3=[[7,8,9],[4,5,6],[1,2,3]];static matrix4=[["21","22","23","24","25"],["16","17","18","19","20"],["11","12","13","14","15"],["06","07","08","09","10"],["01","02","03","04","05"]];static matrix5=[["C","D"],["A","B"]];static dmsToDecimal(e){let t=1;if(e.direction)switch(e.direction){case"W":case"S":t=-1;break;default:t=1}return(Math.abs(e.degrees)+e.minutes/60+e.seconds/3600)*t}static xToDMS(e,t="E"){let n=t;e<0&&(n="W");const r=Math.abs(e);return this.decimalToDms(r,n)}static yToDMS(e,t="N"){let n=t;e<0&&(n="S");const r=Math.abs(e);return this.decimalToDms(r,n)}static decimalToDms(e,t){const n=Math.floor(e),r=60*(e-n),i=Math.floor(r);return{degrees:n,minutes:i,seconds:60*(r-i),direction:t}}static prefixInteger(e,t){return(Array(t).join("0")+e).slice(-t)}static serializeGrid1(e,t){const n="W"===e.direction?-1:1,r=2*e.degrees+Math.floor(e.minutes/30+1),i=this.prefixInteger(r*n+360,3),o="S"===t.direction?1:-1,s=(2*t.degrees+Math.floor(t.minutes/30+1))*o+180;return`${i}${this.CharCodes[Math.floor(s/24)]+this.CharCodes[s%24]}`}static deserializeGrid1(e){const t=e.substring(0,3);let n=Number.parseInt(t)-360,r="E";n<0&&(r="W",n=Math.abs(n)),n-=1;const i=Math.floor(n/2),o={degrees:i,minutes:30*(n-2*i),seconds:0,direction:r},s=e.substring(3,4),a=e.substring(4,5);let l=24*this.CharCodes.indexOf(s)+this.CharCodes.indexOf(a)-180,c="S";l<0&&(c="N",l=Math.abs(l)),l-=1;const u=Math.floor(l/2);return[o,{degrees:u,minutes:30*(l-2*u),seconds:0,direction:c}]}static serializeGrid2(e,t){const n=e.minutes%30,r=Math.floor(n/15),i=t.minutes%30,o=Math.floor(i/15);return this.matrix2[o][r]}static deserializeGrid2(e){return this.deserializeGrid6(e)}static serializeGrid3(e,t){const n=e.minutes%15,r=Math.floor(n/5),i=t.minutes%15,o=Math.floor(i/5);return this.matrix3[o][r]}static deserializeGrid3(e){return this.deserializeGrid7(e)}static serializeGrid4(e,t){const n=e.minutes%5,r=t.minutes%5;return this.matrix4[r][n]}static deserializeGrid4(e){return this.deserializeGrid8(e)}static serializeGrid5(e,t){const n=Math.floor(e.seconds/30),r=Math.floor(t.seconds/30);return this.matrix5[r][n]}static deserializeGrid5(e){let t=0,n=0;switch(e){case"C":t=0,n=0;break;case"D":t=1,n=0;break;case"A":t=0,n=1;break;case"B":t=1,n=1}return[30*t,30*n]}static serializeGrid6(e,t){const n=e.seconds%30,r=Math.floor(n/15),i=t.seconds%30,o=Math.floor(i/15);return this.matrix2[o][r]}static deserializeGrid6(e){let t=0,n=0;switch(e){case"3":t=0,n=0;break;case"4":t=1,n=0;break;case"1":t=0,n=1;break;case"2":t=1,n=1}return[15*t,15*n]}static serializeGrid7(e,t){const n=e.seconds%15,r=Math.floor(n/5),i=t.seconds%15,o=Math.floor(i/5);return this.matrix3[o][r]}static deserializeGrid7(e){const t=Number.parseInt(e);let n=!1,r=0,i=0;for(let o=0;o<3;o++){for(let e=0;e<3;e++)if(this.matrix3[o][e]===t){r=o,i=e,n=!0;break}if(n)break}return[5*i,5*r]}static serializeGrid8(e,t){const n=Math.floor(e.seconds%5),r=Math.floor(t.seconds%5);return this.matrix4[r][n]}static deserializeGrid8(e){let t=!1,n=0,r=0;for(let i=0;i<5;i++){for(let o=0;o<5;o++)if(this.matrix4[i][o]===e){n=i,r=o,t=!0;break}if(t)break}return[r,n]}static serializeGrid9(e,t){const n=Math.floor(1e3*(e.seconds-Math.floor(e.seconds))),r=Math.floor(n/125),i=Math.floor(1e3*(t.seconds-Math.floor(t.seconds))),o=Math.floor(i/125);return this.prefixInteger(8*(7-o)+r+1,2)}static deserializeGrid9(e){const t=Number.parseInt(e)-1,n=7-Math.floor(t/8);return[.125*(t-8*(7-n)),.125*n]}static serializeWarGrid(e,t,n=1){let r=this.serializeGrid1(e,t);return n>=2&&(r+=this.serializeGrid2(e,t),n>=3&&(r+=this.serializeGrid3(e,t),n>=4&&(r+=this.serializeGrid4(e,t),n>=5&&(r+=this.serializeGrid5(e,t),n>=6&&(r+=this.serializeGrid6(e,t),n>=7&&(r+=this.serializeGrid7(e,t),n>=8&&(r+=this.serializeGrid8(e,t),n>=9&&(r+=this.serializeGrid9(e,t))))))))),r}static deserializeWarGrid(e){const t=e.length;if(t<5)throw new Error("编码长度不小于5个");const[n,r]=this.deserializeGrid1(e);let i=[0,0];return t>=6&&(i=this.deserializeGrid2(e.substring(5,6)),n.minutes+=i[0],r.minutes+=i[1],t>=7&&(i=this.deserializeGrid3(e.substring(6,7)),n.minutes+=i[0],r.minutes+=i[1],t>=9&&(i=this.deserializeGrid4(e.substring(7,9)),n.minutes+=i[0],r.minutes+=i[1],t>=10&&(i=this.deserializeGrid5(e.substring(9,10)),n.seconds+=i[0],r.seconds+=i[1],t>=11&&(i=this.deserializeGrid6(e.substring(10,11)),n.seconds+=i[0],r.seconds+=i[1],t>=12&&(i=this.deserializeGrid7(e.substring(11,12)),n.seconds+=i[0],r.seconds+=i[1],t>=14&&(i=this.deserializeGrid8(e.substring(12,14)),n.seconds+=i[0],r.seconds+=i[1],t>=16&&(i=this.deserializeGrid9(e.substring(14,16)),n.seconds+=i[0],r.seconds+=i[1])))))))),[n,r]}}function ei(e,t){const n={};return Object.keys(e).filter((e=>t.includes(e))).forEach((t=>{n[t]=e[t]})),n}function ti(e=100,t=0){return Math.floor(Math.random()*(e-t+1))+t}function ni(e){if(!e)return;const t=e.length;return 0!==t?e[Math.floor(Math.random()*t)]:void 0}function ri(e,t="image/png"){let n=t,r="";const i=e.split(",");if(2===i.length){const e=i[0]?.match(/:(.*?);/);n=e[1],r=atob(i[1])}else r=atob(i[0]);let o=r.length;const s=new Uint8Array(o);for(;o--;)s[o]=r.charCodeAt(o);return new Blob([s],{type:n})}function ii(e){return new Promise(((t,n)=>{const r=new FileReader;r.onload=()=>t(r.result),r.onerror=n,r.readAsDataURL(e)}))}function oi(e,t,n){return e.split(t).join(n)}function si(e,t=2){const n=Math.pow(10,t);return Math.round(e*n)/n}function ai(e,t=!0,n=!0){const r=n?e>0?"E":"W":e>0?"N":"S",i=Math.floor(e),o=60*(e-i),s=Math.floor(o),a=60*(o-s);return t?`${r}:${i}°${s}′${a.toFixed(3)}″`:{degree:i*(e>0?1:-1),minute:s,second:a}}function li(e,t=3){const n=Math.floor(e),r=60*(e-n),i=Math.floor(r);return`${n} ${i} ${(60*(r-i)).toFixed(t)}`}function ci(e,t=3){const n=Math.floor(e),r=60*(e-n),i=Math.floor(r);return{degree:n,minute:i,second:si(60*(r-i),t)}}function ui(e,t,n){return e+t/60+n/3600}function hi(e,t=-1){const n=e.split(" ");if(!n||3!=n.length)return-1;const r=Number(n[0]),i=Number(n[1]),o=Number(n[2]);return r===Number.NaN||i===Number.NaN||o===Number.NaN?-1:-1!=t?si(r+i/60+o/3600,t):r+i/60+o/3600}function di(e){const t=e.match(/^([EWNS]):?(\d+)[°ºd](\d+)[′'m](\d+\.?\d*)[″"s]?$/i);if(!t)return NaN;let n=parseFloat(t[2])+parseFloat(t[3])/60+parseFloat(t[4])/3600;return(e.toUpperCase().startsWith("W")||e.toUpperCase().startsWith("S"))&&(n=-n),n}function fi(e,t,n){if(e<=0||t<=0)throw new Error("行数或列数不能小于0!");const r=e,i=t,o=Math.floor(r/2),s=Math.floor(i/2),a=Math.max(o,r-1-o,s,i-1-s),l=Array(r).fill(!1).map((()=>Array(i).fill(!1))),c=[];for(let u=0;u<=a;u++){const e=Math.max(0,o-u),t=Math.min(r-1,o+u),a=Math.max(0,s-u),h=Math.min(i-1,s+u);for(let r=e;r<=t;r++)for(let e=a;e<=h;e++)l[r][e]||(n&&n(r,e),l[r][e]=!0,c.push([r,e]))}return c}const pi=Object.freeze(Object.defineProperty({__proto__:null,base64ToBlob:ri,blobToDataURL:ii,convertDecimalism:ai,convertDecimalismData:ci,convertDecimalismSpacing:li,convertToDecimalism:ui,convertToDecimalismByString:hi,convertToDecimalismByString2:di,filterObj:ei,getRandomInt:ti,getRandomItem:ni,replaceAll:oi,reserveDecimal:si,traverseXYArrayFromInsideOut:fi},Symbol.toStringTag,{value:"Module"}));function gi(e){const t=e.toLowerCase().replace(/rgb?a?\(/,"").replace(/\)/,"").replace(/[\s+]/g,"").split(","),n=parseFloat(t[3]||"1"),r=Math.floor(n*parseInt(t[0])+255*(1-n)),i=Math.floor(n*parseInt(t[1])+255*(1-n)),o=Math.floor(n*parseInt(t[2])+255*(1-n));return"#"+("0"+r.toString(16)).slice(-2)+("0"+i.toString(16)).slice(-2)+("0"+o.toString(16)).slice(-2)}function mi(e){var t=e.toLowerCase();if(Ci(e)){if(4===t.length){for(var n="#",r=1;r<4;r+=1){const e=t.slice(r,r+1);n+=e.concat(e)}t=n}var i=[];for(r=1;r<7;r+=2)i.push(parseInt("0x"+t.slice(r,r+2)));return"rgb("+i.join(",")+")"}return t}function vi(e){const t=e;if(4===t.length){let e="#";for(var n=1;n<4;n+=1){const r=t.slice(n,n+1);e+=r.concat(r)}return e}return t}var yi=(e=>(e[e.RGBA=0]="RGBA",e[e.Hex=1]="Hex",e[e.Hsla=2]="Hsla",e))(yi||{});function wi(e){if("object"==typeof e||!e)return;const t=e.toLowerCase().substring(0,1);return"#"===t?1:"r"===t||"("===t?0:"h"===t?2:0}function bi(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,r,i,o=(parseFloat(t[1])%360+360)%360/360,s=parseFloat(t[2])/(/%$/.test(t[2])?100:1),a=parseFloat(t[3])/(/%$/.test(t[3])?100:1);if(0===s)n=r=i=a;else{var l=a<=.5?a*(s+1):a+s-a*s,c=2*a-l;n=Si(c,l,o+1/3),r=Si(c,l,o),i=Si(c,l,o-1/3)}return`rgba(${n=Math.round(255*n)},${r=Math.round(255*r)},${i=Math.round(255*i)},${t[4]?parseFloat(t[4]):1})`}}}function Si(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 Ci(e){return/^#([0-9a-fA-F]{3}|[0-9a-fA-f]{6})$/.test(e)}function Ei(e,t,n){const r=(e<<16|t<<8|n).toString(16);return"#"+new Array(Math.abs(r.length-7)).join("0")+r}function xi(e){let t=e.toLowerCase();if(Ci(e)){if(4===t.length){let e="#";for(let n=1;n<4;n+=1)e+=t.slice(n,n+1).concat(t.slice(n,n+1));t=e}const e=[];for(let n=1;n<7;n+=2)e.push(parseInt("0x"+t.slice(n,n+2)));return"RGB("+e.join(",")+")"}return t}function ki(e){if(!Ci(e))return;const[t,n,r]=xi(e).replace(/(?:\(|\)|rgb|RGB)*/g,"").split(",").map((e=>Number(e)));return.299*t+.578*n+.114*r<192}function Ti(e,t){return e=e.indexOf("#")>=0?e.substring(1,e.length):e,t=Math.trunc(255*t/100),`#${Ri(e.substring(0,2),t)}${Ri(e.substring(2,4),t)}${Ri(e.substring(4,6),t)}`}function zi(e,t){return e=e.indexOf("#")>=0?e.substring(1,e.length):e,t=Math.trunc(255*t/100),`#${Mi(e.substring(0,2),t)}${Mi(e.substring(2,4),t)}${Mi(e.substring(4,6),t)}`}function Mi(e,t){const n=parseInt(e,16)+t,r=n>255?255:n;return r.toString(16).length>1?r.toString(16):`0${r.toString(16)}`}function Ai(e,t,n){const r=[e,t,n].map((e=>(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)));return.2126*r[0]+.7152*r[1]+.0722*r[2]}function _i(e){var t,n;return n=[0,0,0],(Ai(~~(t=xi(e.substring(1)).split(","))[0],~~t[1],~~t[2])+.05)/(Ai(n[0],n[1],n[2])+.05)>=12?"#000000":"#FFFFFF"}function Ri(e,t){const n=parseInt(e,16)-t,r=n<0?0:n;return r.toString(16).length>1?r.toString(16):`0${r.toString(16)}`}function Li(e){const t=(new Date).getTime();let n=(new Date).getTime();for(;n-t<e;)n=(new Date).getTime();console.log(`强制等待${Ii}毫秒`)}function Ii(e){return new Promise((t=>setTimeout(t,e)))}function Di(e,t,n,r="json",i){const o={baseURL:ce.Config?.ServiceURL.DefaultWebAPI,timeout:6e4,params:e,paramsSerializer:{serialize:function(e){return q.stringify(e,{indices:!1,arrayFormat:"repeat"})}},headers:{"Content-Type":"application/json",Authorization:"bearer "+Ye()?.token},responseType:r,cancelToken:i};if(n)for(let s in n)o.headers[s]=n[s];return ce.SystemID&&(o.headers.sysid=ce.SystemID,ce.SystemGroup&&(o.headers.sysgroup=ce.SystemGroup)),void 0!==t&&(o.baseURL=t),o}function Ni(e,t,n,r,i="json",o,s){const a=Di(n,t,r,i,o);return s&&s>=2e4&&(a.timeout=s),ce.Axios?.get(e,a).catch((function(t){Pi(t,a.baseURL,e,"Get")}))}function Pi(e,t,n,r="Get"){const i=`${t}${n}`;if(e&&e.response){let t=!1;const n=e.response.status;switch(n){case 400:e.message="错误请求";break;case 401:e.message="未授权,请重新登录";break;case 403:e.message="拒绝访问";break;case 404:e.message="请求错误,未找到该资源";break;case 405:e.message="请求方法未允许";break;case 408:e.message="请求超时";break;case 500:const n=e.response.data;if(n){const r=n.indexOf(":"),i=n.indexOf("\n");if(r>0&&i-r>2){const o=n.substring(r+2,i);o.indexOf("System.Exception")>0?e.message="后台服务内部出错!":(t=!0,e.message=o)}else t=!0,e.message=n}else e.message="服务器端出错";break;case 501:e.message="网络未实现";break;case 502:e.message="网络错误";break;case 503:e.message="服务不可用";break;case 504:e.message="网络超时";break;case 505:e.message="http版本不支持该请求";break;default:e.message=`连接错误${e.response.status}`}let r={address:i,code:n,isExceptionInfo:t,message:e.message,result:e.response.data};if(ce.EventBus.emit(ne.AxiosRequestErrorEvent,r),t)throw new Error(e.message)}else{if(e?.message)throw new Error(e.message);console.error(e,"Http请求错误!")}}function Oi(e,t,n,r,i,o="json",s){const a=Di(r,t,i,o);s&&s>=2e4&&(a.timeout=s),a.headers["Content-Type"]="multipart/form-data";const l=function(e){let t=new FormData;return e&&Object.keys(e).forEach((n=>{if(!e)return;let r=e[n];null!=r&&(Ae(r)?r.forEach((e=>{t.append(n,ji(e))})):t.append(n,ji(r)))})),t}(n);return ce.Axios?.post(e,l,a).catch((function(e){Pi(e,t,a.baseURL,"Post")}))}function Bi(e,t,n,r,i,o="json",s){const a=Di(r,t,i,o);return s&&s>=2e4&&(a.timeout=s),ce.Axios?.post(e,n,a).catch((function(n){Pi(n,t,e,"Post")}))}function Fi(e,t,n=!1){return e.startsWith("http")?Ni("",e,t):n||t?Ni(e,void 0,t):Ni(e,"",void 0)}function Wi(e,t){return Oi(e,void 0,t)}function Ui(e,t){return ce.Axios?.get(e,{params:t}).catch((function(t){Pi(t,e,"","外部Get")}))}function ji(e){return e instanceof Blob?e:e.toString()}function $i(e,t,n){const r=t??He.getFileName(e);Ni("",e,n,void 0,"blob").then((e=>{e.data&&tr(e.data,r)}))}var Hi,Gi,qi,Xi,Vi,Ki,Yi,Zi,Ji,Qi={exports:{}};var eo=function(){if(Ji)return Qi.exports;Ji=1;var e=function(){return Gi?Hi:(Gi=1,e="undefined"!=typeof window?window:void 0!==Y?Y:"undefined"!=typeof self?self:{},Hi=e);var e}(),t=function(){if(Xi)return qi;Xi=1,qi=function(t){if(!t)return!1;var n=e.call(t);return"[object Function]"===n||"function"==typeof t&&"[object RegExp]"!==n||"undefined"!=typeof window&&(t===window.setTimeout||t===window.alert||t===window.confirm||t===window.prompt)};var e=Object.prototype.toString;return qi}(),n=function(){if(Ki)return Vi;Ki=1;var e=function(e){return e.replace(/^\s+|\s+$/g,"")},t=function(e){return"[object Array]"===Object.prototype.toString.call(e)};return Vi=function(n){if(!n)return{};for(var r=Object.create(null),i=e(n).split("\n"),o=0;o<i.length;o++){var s=i[o],a=s.indexOf(":"),l=e(s.slice(0,a)).toLowerCase(),c=e(s.slice(a+1));void 0===r[l]?r[l]=c:t(r[l])?r[l].push(c):r[l]=[r[l],c]}return r},Vi}(),r=function(){if(Zi)return Yi;Zi=1,Yi=function(){for(var t={},n=0;n<arguments.length;n++){var r=arguments[n];for(var i in r)e.call(r,i)&&(t[i]=r[i])}return t};var e=Object.prototype.hasOwnProperty;return Yi}();function i(e,n,i){var o=e;return t(n)?(i=n,"string"==typeof e&&(o={uri:e})):o=r(n,{uri:e}),o.callback=i,o}function o(e,t,n){return s(t=i(e,t,n))}function s(e){if(void 0===e.callback)throw new Error("callback argument missing");var t=!1,r=function(n,r,i){t||(t=!0,e.callback(n,r,i))};function i(){var e=void 0;if(e=u.response?u.response:u.responseText||function(e){try{if("document"===e.responseType)return e.responseXML;var t=e.responseXML&&"parsererror"===e.responseXML.documentElement.nodeName;if(""===e.responseType&&!t)return e.responseXML}catch(e){}return null}(u),v)try{e=JSON.parse(e)}catch(e){}return e}function s(e){return clearTimeout(h),e instanceof Error||(e=new Error(""+(e||"Unknown XMLHttpRequest Error"))),e.statusCode=0,r(e,y)}function a(){if(!c){var t;clearTimeout(h),t=e.useXDR&&void 0===u.status?200:1223===u.status?204:u.status;var o=y,s=null;return 0!==t?(o={body:i(),statusCode:t,method:f,headers:{},url:d,rawRequest:u},u.getAllResponseHeaders&&(o.headers=n(u.getAllResponseHeaders()))):s=new Error("Internal XMLHttpRequest Error"),r(s,o,o.body)}}var l,c,u=e.xhr||null;u||(u=e.cors||e.useXDR?new o.XDomainRequest:new o.XMLHttpRequest);var h,d=u.url=e.uri||e.url,f=u.method=e.method||"GET",p=e.body||e.data,g=u.headers=e.headers||{},m=!!e.sync,v=!1,y={body:void 0,headers:{},statusCode:0,method:f,url:d,rawRequest:u};if("json"in e&&!1!==e.json&&(v=!0,g.accept||g.Accept||(g.Accept="application/json"),"GET"!==f&&"HEAD"!==f&&(g["content-type"]||g["Content-Type"]||(g["Content-Type"]="application/json"),p=JSON.stringify(!0===e.json?p:e.json))),u.onreadystatechange=function(){4===u.readyState&&setTimeout(a,0)},u.onload=a,u.onerror=s,u.onprogress=function(){},u.onabort=function(){c=!0},u.ontimeout=s,u.open(f,d,!m,e.username,e.password),m||(u.withCredentials=!!e.withCredentials),!m&&e.timeout>0&&(h=setTimeout((function(){if(!c){c=!0,u.abort("timeout");var e=new Error("XMLHttpRequest timeout");e.code="ETIMEDOUT",s(e)}}),e.timeout)),u.setRequestHeader)for(l in g)g.hasOwnProperty(l)&&u.setRequestHeader(l,g[l]);else if(e.headers&&!function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}(e.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in e&&(u.responseType=e.responseType),"beforeSend"in e&&"function"==typeof e.beforeSend&&e.beforeSend(u),u.send(p||null),u}return Qi.exports=o,Qi.exports.default=o,o.XMLHttpRequest=e.XMLHttpRequest||function(){},o.XDomainRequest="withCredentials"in new o.XMLHttpRequest?o.XMLHttpRequest:e.XDomainRequest,function(e,t){for(var n=0;n<e.length;n++)t(e[n])}(["get","put","post","patch","head","delete"],(function(e){o["delete"===e?"del":e]=function(t,n,r){return(n=i(t,n,r)).method=e.toUpperCase(),s(n)}})),Qi.exports}();const to=Z(eo),no=[200,201,202,204,308],ro=[408,502,503,504];class io{endpoint;file;headers;method;chunkSize;attempts;delayBeforeAttempt;md5;chunkCount;chunkByteSize;cacheSize=3;currentMaxIndex=0;maxFileBytes;endpointValue;totalChunks;attemptCount;offline;paused;success;isResumed=!1;mapXhrRequest;okRecordList;eventTarget;fileName;constructor(e){this.endpoint=e.endpoint,this.file=e.file,this.fileName=encodeURI(this.file.name),this.headers=e.headers||{},this.method=e.method||"PUT",this.chunkSize=e.chunkSize||5120,this.attempts=e.attempts||5,this.delayBeforeAttempt=e.delayBeforeAttempt||1,this.md5=e.md5||"",null!=e.threadNumber&&e.threadNumber>=2&&(this.cacheSize=e.threadNumber),this.maxFileBytes=1024*(e.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.mapXhrRequest=new Map,this.okRecordList=[],this.eventTarget=V(),this.validateOptions(),this.getEndpoint().then((()=>{for(let e=0;e<this.cacheSize;e++){const t=e;if(t<this.totalChunks){const e=100*t;e>0?Ii(e).then((e=>{this.sendChunks(t)})):this.sendChunks(t)}}})),"undefined"!=typeof window&&(window.addEventListener("online",(()=>{this.offline&&(this.offline=!1,this.dispatch("online"),this.sendChunks())})),window.addEventListener("offline",(()=>{this.offline=!0,this.dispatch("offline")})))}on(e,t){this.eventTarget.on(e,t)}abort(){this.pause(),this.mapXhrRequest.size>0&&(this.mapXhrRequest.forEach(((e,t)=>{e&&e.abort()})),this.mapXhrRequest.clear())}pause(){this.paused=!0}async resume(){this.paused=!1,this.isResumed=!0;for(let e=0;e<this.totalChunks;e++){if(this.mapXhrRequest.size>=this.cacheSize){const e=500*(this.mapXhrRequest.size-this.cacheSize+1);await Ii(e)}this.sendChunks(e)}}dispatch(e,t){this.eventTarget.emit(e,t)}validateOptions(){if(!this.endpoint||"function"!=typeof this.endpoint&&"string"!=typeof this.endpoint)throw new TypeError("endpoint必须为:文件上传URL字符串,或返回地址的函数!");if(!(this.file instanceof File))throw new TypeError("file必须为文件对象");if(this.headers&&"object"!=typeof this.headers)throw new TypeError("文件头必须为对象或空!");if(this.chunkSize&&("number"!=typeof this.chunkSize||this.chunkSize<=0||this.chunkSize%256!=0))throw new TypeError("chunkSize必须大于0,并是256的整数倍");if(this.maxFileBytes>0&&this.maxFileBytes<this.file.size)throw new Error(`文件大小超过最大允许值:(${this.file.size} > ${this.maxFileBytes})`);if(this.attempts&&("number"!=typeof this.attempts||this.attempts<=0))throw new TypeError("重试次数必须为正数!");if(this.delayBeforeAttempt&&("number"!=typeof this.delayBeforeAttempt||this.delayBeforeAttempt<0))throw new TypeError("延时重试时间必须为正数!默认为1")}getEndpoint(){return"string"==typeof this.endpoint?(this.endpointValue=this.endpoint,Promise.resolve(this.endpoint)):this.endpoint(this.file).then((e=>(this.endpointValue=e,this.endpointValue)))}getChunk(e=0){return new Promise((t=>{const n=1===this.totalChunks?this.file.size:this.chunkByteSize,r=n*e,i=new FileReader;i.onload=function(){if(null!==this.result){const n=new Blob([this.result],{type:"application/octet-stream"});t({chunkIndex:e,chunkContent:n})}else t(void 0)},i.readAsArrayBuffer(this.file.slice(r,r+n))}))}xhrPromise(e){return new Promise(((t,n)=>{const r=e.headers,i=Number(r.ChunkIndex),o=to({...e},((e,r)=>(this.mapXhrRequest.delete(i),e?n(e):t(r))));this.mapXhrRequest.set(i,o)}))}sendChunk(e,t){if(!t)return;const n=e*this.chunkByteSize,r=n+t.size-1,i={...this.headers,FileName:this.fileName,FileMD5:this.md5,ChunkIndex:e.toString(),"Content-Type":this.file.type,"Content-Range":`bytes ${n}-${r}/${this.file.size}`};return this.dispatch("attempt",{chunkNumber:e,chunkSize:t.size}),this.endpointValue?this.xhrPromise({headers:i,url:this.endpointValue,method:this.method,body:t}):(console.warn("文件上传endpointValue不能为空!"),void this.dispatch("error",{message:"文件上传endpointValue不能为空!取消上传!",chunk:e,attempts:this.attemptCount}))}sendChunks(e=0){this.paused||this.offline||this.success||this.okRecordList.indexOf(e)<0&&(this.currentMaxIndex<e&&(this.currentMaxIndex=e),this.getChunk(e).then((e=>{if(e){const{chunkIndex:t,chunkContent:n}=e;return this.sendChunk(t,n)}})).then((t=>{if(t)if(no.includes(t.statusCode)){const n=JSON.parse(t.body).RESULTVALUE;if(n.STATE){this.attemptCount=0,this.chunkCount=this.chunkCount+1;const e=Math.round(n.INDEX/this.chunkByteSize);this.mapXhrRequest.delete(e),this.dispatch("chunkSuccess",{chunkCount:this.chunkCount,attempts:this.attemptCount,chunkNumber:e}),this.okRecordList.push(e),this.chunkCount<this.totalChunks&&!this.isResumed&&this.currentMaxIndex<this.totalChunks-1&&(this.currentMaxIndex++,this.sendChunks(this.currentMaxIndex));const t=100*this.chunkCount/this.totalChunks;this.dispatch("progress",t),n.END&&(this.success=!0,this.dispatch("success",this.fileName),this.okRecordList.length=0)}else{const t=`服务器错误:${n.NAME},停止上传。`;console.log(t),this.dispatch("error",{message:t,chunkNumber:e,attempts:0}),this.mapXhrRequest.delete(e),Ii(1e3).then((t=>this.sendChunks(e)))}}else if(null!=t&&ro.includes(t.statusCode)){if(this.paused||this.offline)return}else{if(this.paused||this.offline)return;console.log(`服务器错误:${t?.statusCode},停止上传。`),this.dispatch("error",{message:`服务器错误:${t?.statusCode},停止上传。`,chunkNumber:this.chunkCount,attempts:this.attemptCount})}else console.warn("上传失败的索引为:"+e)})).catch((e=>{!this.paused&&this.offline})))}}const oo=e=>new io(e),so=new class{hasClass(e,t){return e.className.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))}addClass(e,t){this.hasClass(e,t)||(e.className+=" "+t)}removeClass(e,t){if(this.hasClass(e,t)){const n=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className=e.className.replace(n," ")}}toggleClass(e,t){this.hasClass(e,t)?this.removeClass(e,t):this.addClass(e,t)}setCSSProperty(e,t,n){e?.style.setProperty(t,n)}getBoundingClientRect(e){return e&&e.getBoundingClientRect?e.getBoundingClientRect():0}getViewportOffset(e){const t=document.documentElement,n=t.scrollLeft,r=t.scrollTop,i=t.clientLeft,o=t.clientTop,s=globalThis.scrollX,a=globalThis.scrollY,l=this.getBoundingClientRect(e),{left:c,top:u,width:h,height:d}=l,f=c+s-((s||n)-(i||0)),p=u+a-((a||r)-(o||0)),g=globalThis.document.documentElement.clientWidth,m=globalThis.document.documentElement.clientHeight;return{left:f,top:p,right:g-h-f,bottom:m-d-p,rightIncludeBody:g-f,bottomIncludeBody:m-p}}hackCss(e,t){const n={};return["webkit","Moz","ms","OT"].forEach((r=>{n[`${r}${He.UpperFirst(e)}`]=t})),{...n,[e]:t}}on(e,t,n){e&&t&&n&&e.addEventListener(t,n,!1)}off(e,t,n){e&&t&&n&&e.removeEventListener(t,n,!1)}once(e,t,n){const r=function(...i){n&&n.apply(this,i),this.off(e,t,r)};this.on(e,t,r)}},ao=y({isLock:!1,lockTime:0});function lo(e){ao.isLock=e,e&&(Ze(),console.log("锁屏了……"))}function co(){return ao.isLock}let uo;function ho(){clearInterval(uo),globalThis.location.href.indexOf("/login")>0||ao.isLock||(lo(!1),ao.lockTime=function(){let e=3600;return ce.Config.UI?.LockTime&&ce.Config.UI?.LockTime>=10&&(e=ce.Config.UI.LockTime),e}(),uo=setInterval((()=>{if(ao.lockTime--,ao.lockTime<=0)return lo(!0),clearInterval(uo)}),1e3))}function fo(){ho(),document.addEventListener("mousedown",ho),document.addEventListener("mousemove",ho)}function po(){document.removeEventListener("mousedown",ho),document.removeEventListener("mousemove",ho)}function go(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 mo,vo={exports:{}},yo=(mo||(mo=1,vo.exports=function e(t,n,r){function i(s,a){if(!n[s]){if(!t[s]){if(!a&&go)return go(s);if(o)return o(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[s]={exports:{}};t[s][0].call(c.exports,(function(e){return i(t[s][1][e]||e)}),c,c.exports,e,t,n,r)}return n[s].exports}for(var o=go,s=0;s<r.length;s++)i(r[s]);return i}({1:[function(e,t,n){(function(e){var n,r,i=e.MutationObserver||e.WebKitMutationObserver;if(i){var o=0,s=new i(u),a=e.document.createTextNode("");s.observe(a,{characterData:!0}),n=function(){a.data=o=++o%2}}else if(e.setImmediate||void 0===e.MessageChannel)n="document"in e&&"onreadystatechange"in e.document.createElement("script")?function(){var t=e.document.createElement("script");t.onreadystatechange=function(){u(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},e.document.documentElement.appendChild(t)}:function(){setTimeout(u,0)};else{var l=new e.MessageChannel;l.port1.onmessage=u,n=function(){l.port2.postMessage(0)}}var c=[];function u(){var e,t;r=!0;for(var n=c.length;n;){for(t=c,c=[],e=-1;++e<n;)t[e]();n=c.length}r=!1}t.exports=function(e){1!==c.push(e)||r||n()}}).call(this,void 0!==Y?Y:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],2:[function(e,t,n){var r=e(1);function i(){}var o={},s=["REJECTED"],a=["FULFILLED"],l=["PENDING"];function c(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=l,this.queue=[],this.outcome=void 0,e!==i&&f(this,e)}function u(e,t,n){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof n&&(this.onRejected=n,this.callRejected=this.otherCallRejected)}function h(e,t,n){r((function(){var r;try{r=t(n)}catch(t){return o.reject(e,t)}r===e?o.reject(e,new TypeError("Cannot resolve promise with itself")):o.resolve(e,r)}))}function d(e){var t=e&&e.then;if(e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments)}}function f(e,t){var n=!1;function r(t){n||(n=!0,o.reject(e,t))}function i(t){n||(n=!0,o.resolve(e,t))}var s=p((function(){t(i,r)}));"error"===s.status&&r(s.value)}function p(e,t){var n={};try{n.value=e(t),n.status="success"}catch(e){n.status="error",n.value=e}return n}t.exports=c,c.prototype.catch=function(e){return this.then(null,e)},c.prototype.then=function(e,t){if("function"!=typeof e&&this.state===a||"function"!=typeof t&&this.state===s)return this;var n=new this.constructor(i);return this.state!==l?h(n,this.state===a?e:t,this.outcome):this.queue.push(new u(n,e,t)),n},u.prototype.callFulfilled=function(e){o.resolve(this.promise,e)},u.prototype.otherCallFulfilled=function(e){h(this.promise,this.onFulfilled,e)},u.prototype.callRejected=function(e){o.reject(this.promise,e)},u.prototype.otherCallRejected=function(e){h(this.promise,this.onRejected,e)},o.resolve=function(e,t){var n=p(d,t);if("error"===n.status)return o.reject(e,n.value);var r=n.value;if(r)f(e,r);else{e.state=a,e.outcome=t;for(var i=-1,s=e.queue.length;++i<s;)e.queue[i].callFulfilled(t)}return e},o.reject=function(e,t){e.state=s,e.outcome=t;for(var n=-1,r=e.queue.length;++n<r;)e.queue[n].callRejected(t);return e},c.resolve=function(e){return e instanceof this?e:o.resolve(new this(i),e)},c.reject=function(e){var t=new this(i);return o.reject(t,e)},c.all=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var n=e.length,r=!1;if(!n)return this.resolve([]);for(var s=new Array(n),a=0,l=-1,c=new this(i);++l<n;)u(e[l],l);return c;function u(e,i){t.resolve(e).then((function(e){s[i]=e,++a!==n||r||(r=!0,o.resolve(c,s))}),(function(e){r||(r=!0,o.reject(c,e))}))}},c.race=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var n=e.length,r=!1;if(!n)return this.resolve([]);for(var s=-1,a=new this(i);++s<n;)l(e[s]);return a;function l(e){t.resolve(e).then((function(e){r||(r=!0,o.resolve(a,e))}),(function(e){r||(r=!0,o.reject(a,e))}))}}},{1:1}],3:[function(e,t,n){(function(t){"function"!=typeof t.Promise&&(t.Promise=e(2))}).call(this,void 0!==Y?Y:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{2:2}],4:[function(e,t,n){var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};var o=function(){try{if("undefined"!=typeof indexedDB)return indexedDB;if("undefined"!=typeof webkitIndexedDB)return webkitIndexedDB;if("undefined"!=typeof mozIndexedDB)return mozIndexedDB;if("undefined"!=typeof OIndexedDB)return OIndexedDB;if("undefined"!=typeof msIndexedDB)return msIndexedDB}catch(e){return}}();function s(e,t){e=e||[],t=t||{};try{return new Blob(e,t)}catch(i){if("TypeError"!==i.name)throw i;for(var n=new("undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder?MozBlobBuilder:WebKitBlobBuilder),r=0;r<e.length;r+=1)n.append(e[r]);return n.getBlob(t.type)}}"undefined"==typeof Promise&&e(3);var a=Promise;function l(e,t){t&&e.then((function(e){t(null,e)}),(function(e){t(e)}))}function c(e,t,n){"function"==typeof t&&e.then(t),"function"==typeof n&&e.catch(n)}function u(e){return"string"!=typeof e&&(console.warn(e+" used as a key, but it is not a string."),e=String(e)),e}function h(){if(arguments.length&&"function"==typeof arguments[arguments.length-1])return arguments[arguments.length-1]}var d="local-forage-detect-blob-support",f=void 0,p={},g=Object.prototype.toString,m="readonly",v="readwrite";function y(e){for(var t=e.length,n=new ArrayBuffer(t),r=new Uint8Array(n),i=0;i<t;i++)r[i]=e.charCodeAt(i);return n}function w(e){return"boolean"==typeof f?a.resolve(f):function(e){return new a((function(t){var n=e.transaction(d,v),r=s([""]);n.objectStore(d).put(r,"key"),n.onabort=function(e){e.preventDefault(),e.stopPropagation(),t(!1)},n.oncomplete=function(){var e=navigator.userAgent.match(/Chrome\/(\d+)/),n=navigator.userAgent.match(/Edge\//);t(n||!e||parseInt(e[1],10)>=43)}})).catch((function(){return!1}))}(e).then((function(e){return f=e}))}function b(e){var t=p[e.name],n={};n.promise=new a((function(e,t){n.resolve=e,n.reject=t})),t.deferredOperations.push(n),t.dbReady?t.dbReady=t.dbReady.then((function(){return n.promise})):t.dbReady=n.promise}function S(e){var t=p[e.name].deferredOperations.pop();if(t)return t.resolve(),t.promise}function C(e,t){var n=p[e.name].deferredOperations.pop();if(n)return n.reject(t),n.promise}function E(e,t){return new a((function(n,r){if(p[e.name]=p[e.name]||{forages:[],db:null,dbReady:null,deferredOperations:[]},e.db){if(!t)return n(e.db);b(e),e.db.close()}var i=[e.name];t&&i.push(e.version);var s=o.open.apply(o,i);t&&(s.onupgradeneeded=function(t){var n=s.result;try{n.createObjectStore(e.storeName),t.oldVersion<=1&&n.createObjectStore(d)}catch(n){if("ConstraintError"!==n.name)throw n;console.warn('The database "'+e.name+'" has been upgraded from version '+t.oldVersion+" to version "+t.newVersion+', but the storage "'+e.storeName+'" already exists.')}}),s.onerror=function(e){e.preventDefault(),r(s.error)},s.onsuccess=function(){var t=s.result;t.onversionchange=function(e){e.target.close()},n(t),S(e)}}))}function x(e){return E(e,!1)}function k(e){return E(e,!0)}function T(e,t){if(!e.db)return!0;var n=!e.db.objectStoreNames.contains(e.storeName),r=e.version<e.db.version,i=e.version>e.db.version;if(r&&(e.version!==t&&console.warn('The database "'+e.name+"\" can't be downgraded from version "+e.db.version+" to version "+e.version+"."),e.version=e.db.version),i||n){if(n){var o=e.db.version+1;o>e.version&&(e.version=o)}return!0}return!1}function z(e){return s([y(atob(e.data))],{type:e.type})}function M(e){return e&&e.__local_forage_encoded_blob}function A(e){var t=this,n=t._initReady().then((function(){var e=p[t._dbInfo.name];if(e&&e.dbReady)return e.dbReady}));return c(n,e,e),n}function _(e,t,n,r){void 0===r&&(r=1);try{var i=e.db.transaction(e.storeName,t);n(null,i)}catch(i){if(r>0&&(!e.db||"InvalidStateError"===i.name||"NotFoundError"===i.name))return a.resolve().then((function(){if(!e.db||"NotFoundError"===i.name&&!e.db.objectStoreNames.contains(e.storeName)&&e.version<=e.db.version)return e.db&&(e.version=e.db.version+1),k(e)})).then((function(){return function(e){b(e);for(var t=p[e.name],n=t.forages,r=0;r<n.length;r++){var i=n[r];i._dbInfo.db&&(i._dbInfo.db.close(),i._dbInfo.db=null)}return e.db=null,x(e).then((function(t){return e.db=t,T(e)?k(e):t})).then((function(r){e.db=t.db=r;for(var i=0;i<n.length;i++)n[i]._dbInfo.db=r})).catch((function(t){throw C(e,t),t}))}(e).then((function(){_(e,t,n,r-1)}))})).catch(n);n(i)}}var R={_driver:"asyncStorage",_initStorage:function(e){var t=this,n={db:null};if(e)for(var r in e)n[r]=e[r];var i=p[n.name];i||(i={forages:[],db:null,dbReady:null,deferredOperations:[]},p[n.name]=i),i.forages.push(t),t._initReady||(t._initReady=t.ready,t.ready=A);var o=[];function s(){return a.resolve()}for(var l=0;l<i.forages.length;l++){var c=i.forages[l];c!==t&&o.push(c._initReady().catch(s))}var u=i.forages.slice(0);return a.all(o).then((function(){return n.db=i.db,x(n)})).then((function(e){return n.db=e,T(n,t._defaultConfig.version)?k(n):e})).then((function(e){n.db=i.db=e,t._dbInfo=n;for(var r=0;r<u.length;r++){var o=u[r];o!==t&&(o._dbInfo.db=n.db,o._dbInfo.version=n.version)}}))},_support:function(){try{if(!o||!o.open)return!1;var e="undefined"!=typeof openDatabase&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),t="function"==typeof fetch&&-1!==fetch.toString().indexOf("[native code");return(!e||t)&&"undefined"!=typeof indexedDB&&"undefined"!=typeof IDBKeyRange}catch(e){return!1}}(),iterate:function(e,t){var n=this,r=new a((function(t,r){n.ready().then((function(){_(n._dbInfo,m,(function(i,o){if(i)return r(i);try{var s=o.objectStore(n._dbInfo.storeName).openCursor(),a=1;s.onsuccess=function(){var n=s.result;if(n){var r=n.value;M(r)&&(r=z(r));var i=e(r,n.key,a++);void 0!==i?t(i):n.continue()}else t()},s.onerror=function(){r(s.error)}}catch(e){r(e)}}))})).catch(r)}));return l(r,t),r},getItem:function(e,t){var n=this;e=u(e);var r=new a((function(t,r){n.ready().then((function(){_(n._dbInfo,m,(function(i,o){if(i)return r(i);try{var s=o.objectStore(n._dbInfo.storeName).get(e);s.onsuccess=function(){var e=s.result;void 0===e&&(e=null),M(e)&&(e=z(e)),t(e)},s.onerror=function(){r(s.error)}}catch(e){r(e)}}))})).catch(r)}));return l(r,t),r},setItem:function(e,t,n){var r=this;e=u(e);var i=new a((function(n,i){var o;r.ready().then((function(){return o=r._dbInfo,"[object Blob]"===g.call(t)?w(o.db).then((function(e){return e?t:function(e){return new a((function(t,n){var r=new FileReader;r.onerror=n,r.onloadend=function(n){var r=btoa(n.target.result||"");t({__local_forage_encoded_blob:!0,data:r,type:e.type})},r.readAsBinaryString(e)}))}(t)})):t})).then((function(t){_(r._dbInfo,v,(function(o,s){if(o)return i(o);try{var a=s.objectStore(r._dbInfo.storeName);null===t&&(t=void 0);var l=a.put(t,e);s.oncomplete=function(){void 0===t&&(t=null),n(t)},s.onabort=s.onerror=function(){var e=l.error?l.error:l.transaction.error;i(e)}}catch(e){i(e)}}))})).catch(i)}));return l(i,n),i},removeItem:function(e,t){var n=this;e=u(e);var r=new a((function(t,r){n.ready().then((function(){_(n._dbInfo,v,(function(i,o){if(i)return r(i);try{var s=o.objectStore(n._dbInfo.storeName).delete(e);o.oncomplete=function(){t()},o.onerror=function(){r(s.error)},o.onabort=function(){var e=s.error?s.error:s.transaction.error;r(e)}}catch(e){r(e)}}))})).catch(r)}));return l(r,t),r},clear:function(e){var t=this,n=new a((function(e,n){t.ready().then((function(){_(t._dbInfo,v,(function(r,i){if(r)return n(r);try{var o=i.objectStore(t._dbInfo.storeName).clear();i.oncomplete=function(){e()},i.onabort=i.onerror=function(){var e=o.error?o.error:o.transaction.error;n(e)}}catch(e){n(e)}}))})).catch(n)}));return l(n,e),n},length:function(e){var t=this,n=new a((function(e,n){t.ready().then((function(){_(t._dbInfo,m,(function(r,i){if(r)return n(r);try{var o=i.objectStore(t._dbInfo.storeName).count();o.onsuccess=function(){e(o.result)},o.onerror=function(){n(o.error)}}catch(e){n(e)}}))})).catch(n)}));return l(n,e),n},key:function(e,t){var n=this,r=new a((function(t,r){e<0?t(null):n.ready().then((function(){_(n._dbInfo,m,(function(i,o){if(i)return r(i);try{var s=o.objectStore(n._dbInfo.storeName),a=!1,l=s.openKeyCursor();l.onsuccess=function(){var n=l.result;n?0===e||a?t(n.key):(a=!0,n.advance(e)):t(null)},l.onerror=function(){r(l.error)}}catch(e){r(e)}}))})).catch(r)}));return l(r,t),r},keys:function(e){var t=this,n=new a((function(e,n){t.ready().then((function(){_(t._dbInfo,m,(function(r,i){if(r)return n(r);try{var o=i.objectStore(t._dbInfo.storeName).openKeyCursor(),s=[];o.onsuccess=function(){var t=o.result;t?(s.push(t.key),t.continue()):e(s)},o.onerror=function(){n(o.error)}}catch(e){n(e)}}))})).catch(n)}));return l(n,e),n},dropInstance:function(e,t){t=h.apply(this,arguments);var n,r=this.config();if((e="function"!=typeof e&&e||{}).name||(e.name=e.name||r.name,e.storeName=e.storeName||r.storeName),e.name){var i=e.name===r.name&&this._dbInfo.db?a.resolve(this._dbInfo.db):x(e).then((function(t){var n=p[e.name],r=n.forages;n.db=t;for(var i=0;i<r.length;i++)r[i]._dbInfo.db=t;return t}));n=e.storeName?i.then((function(t){if(t.objectStoreNames.contains(e.storeName)){var n=t.version+1;b(e);var r=p[e.name],i=r.forages;t.close();for(var s=0;s<i.length;s++){var l=i[s];l._dbInfo.db=null,l._dbInfo.version=n}var c=new a((function(t,r){var i=o.open(e.name,n);i.onerror=function(e){i.result.close(),r(e)},i.onupgradeneeded=function(){i.result.deleteObjectStore(e.storeName)},i.onsuccess=function(){var e=i.result;e.close(),t(e)}}));return c.then((function(e){r.db=e;for(var t=0;t<i.length;t++){var n=i[t];n._dbInfo.db=e,S(n._dbInfo)}})).catch((function(t){throw(C(e,t)||a.resolve()).catch((function(){})),t}))}})):i.then((function(t){b(e);var n=p[e.name],r=n.forages;t.close();for(var i=0;i<r.length;i++)r[i]._dbInfo.db=null;var s=new a((function(t,n){var r=o.deleteDatabase(e.name);r.onerror=function(){var e=r.result;e&&e.close(),n(r.error)},r.onblocked=function(){console.warn('dropInstance blocked for database "'+e.name+'" until all open connections are closed')},r.onsuccess=function(){var e=r.result;e&&e.close(),t(e)}}));return s.then((function(e){n.db=e;for(var t=0;t<r.length;t++)S(r[t]._dbInfo)})).catch((function(t){throw(C(e,t)||a.resolve()).catch((function(){})),t}))}))}else n=a.reject("Invalid arguments");return l(n,t),n}};var L="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",I=/^~~local_forage_type~([^~]+)~/,D="__lfsc__:",N="arbf",P="blob",O="si08",B="ui08",F="uic8",W="si16",U="si32",j="ur16",$="ui32",H="fl32",G="fl64",q=Object.prototype.toString;function X(e){var t,n,r,i,o,s=.75*e.length,a=e.length,l=0;"="===e[e.length-1]&&(s--,"="===e[e.length-2]&&s--);var c=new ArrayBuffer(s),u=new Uint8Array(c);for(t=0;t<a;t+=4)n=L.indexOf(e[t]),r=L.indexOf(e[t+1]),i=L.indexOf(e[t+2]),o=L.indexOf(e[t+3]),u[l++]=n<<2|r>>4,u[l++]=(15&r)<<4|i>>2,u[l++]=(3&i)<<6|63&o;return c}function V(e){var t,n=new Uint8Array(e),r="";for(t=0;t<n.length;t+=3)r+=L[n[t]>>2],r+=L[(3&n[t])<<4|n[t+1]>>4],r+=L[(15&n[t+1])<<2|n[t+2]>>6],r+=L[63&n[t+2]];return n.length%3==2?r=r.substring(0,r.length-1)+"=":n.length%3==1&&(r=r.substring(0,r.length-2)+"=="),r}var K={serialize:function(e,t){var n="";if(e&&(n=q.call(e)),e&&("[object ArrayBuffer]"===n||e.buffer&&"[object ArrayBuffer]"===q.call(e.buffer))){var r,i=D;e instanceof ArrayBuffer?(r=e,i+=N):(r=e.buffer,"[object Int8Array]"===n?i+=O:"[object Uint8Array]"===n?i+=B:"[object Uint8ClampedArray]"===n?i+=F:"[object Int16Array]"===n?i+=W:"[object Uint16Array]"===n?i+=j:"[object Int32Array]"===n?i+=U:"[object Uint32Array]"===n?i+=$:"[object Float32Array]"===n?i+=H:"[object Float64Array]"===n?i+=G:t(new Error("Failed to get type for BinaryArray"))),t(i+V(r))}else if("[object Blob]"===n){var o=new FileReader;o.onload=function(){var n="~~local_forage_type~"+e.type+"~"+V(this.result);t(D+P+n)},o.readAsArrayBuffer(e)}else try{t(JSON.stringify(e))}catch(n){console.error("Couldn't convert value into a JSON string: ",e),t(null,n)}},deserialize:function(e){if(e.substring(0,9)!==D)return JSON.parse(e);var t,n=e.substring(13),r=e.substring(9,13);if(r===P&&I.test(n)){var i=n.match(I);t=i[1],n=n.substring(i[0].length)}var o=X(n);switch(r){case N:return o;case P:return s([o],{type:t});case O:return new Int8Array(o);case B:return new Uint8Array(o);case F:return new Uint8ClampedArray(o);case W:return new Int16Array(o);case j:return new Uint16Array(o);case U:return new Int32Array(o);case $:return new Uint32Array(o);case H:return new Float32Array(o);case G:return new Float64Array(o);default:throw new Error("Unkown type: "+r)}},stringToBuffer:X,bufferToString:V};function Y(e,t,n,r){e.executeSql("CREATE TABLE IF NOT EXISTS "+t.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],n,r)}function Z(e,t,n,r,i,o){e.executeSql(n,r,i,(function(e,s){s.code===s.SYNTAX_ERR?e.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[t.storeName],(function(e,a){a.rows.length?o(e,s):Y(e,t,(function(){e.executeSql(n,r,i,o)}),o)}),o):o(e,s)}),o)}function J(e,t,n,r){var i=this;e=u(e);var o=new a((function(o,s){i.ready().then((function(){void 0===t&&(t=null);var a=t,l=i._dbInfo;l.serializer.serialize(t,(function(t,c){c?s(c):l.db.transaction((function(n){Z(n,l,"INSERT OR REPLACE INTO "+l.storeName+" (key, value) VALUES (?, ?)",[e,t],(function(){o(a)}),(function(e,t){s(t)}))}),(function(t){if(t.code===t.QUOTA_ERR){if(r>0)return void o(J.apply(i,[e,a,n,r-1]));s(t)}}))}))})).catch(s)}));return l(o,n),o}var Q={_driver:"webSQLStorage",_initStorage:function(e){var t=this,n={db:null};if(e)for(var r in e)n[r]="string"!=typeof e[r]?e[r].toString():e[r];var i=new a((function(e,r){try{n.db=openDatabase(n.name,String(n.version),n.description,n.size)}catch(e){return r(e)}n.db.transaction((function(i){Y(i,n,(function(){t._dbInfo=n,e()}),(function(e,t){r(t)}))}),r)}));return n.serializer=K,i},_support:"function"==typeof openDatabase,iterate:function(e,t){var n=this,r=new a((function(t,r){n.ready().then((function(){var i=n._dbInfo;i.db.transaction((function(n){Z(n,i,"SELECT * FROM "+i.storeName,[],(function(n,r){for(var o=r.rows,s=o.length,a=0;a<s;a++){var l=o.item(a),c=l.value;if(c&&(c=i.serializer.deserialize(c)),void 0!==(c=e(c,l.key,a+1)))return void t(c)}t()}),(function(e,t){r(t)}))}))})).catch(r)}));return l(r,t),r},getItem:function(e,t){var n=this;e=u(e);var r=new a((function(t,r){n.ready().then((function(){var i=n._dbInfo;i.db.transaction((function(n){Z(n,i,"SELECT * FROM "+i.storeName+" WHERE key = ? LIMIT 1",[e],(function(e,n){var r=n.rows.length?n.rows.item(0).value:null;r&&(r=i.serializer.deserialize(r)),t(r)}),(function(e,t){r(t)}))}))})).catch(r)}));return l(r,t),r},setItem:function(e,t,n){return J.apply(this,[e,t,n,1])},removeItem:function(e,t){var n=this;e=u(e);var r=new a((function(t,r){n.ready().then((function(){var i=n._dbInfo;i.db.transaction((function(n){Z(n,i,"DELETE FROM "+i.storeName+" WHERE key = ?",[e],(function(){t()}),(function(e,t){r(t)}))}))})).catch(r)}));return l(r,t),r},clear:function(e){var t=this,n=new a((function(e,n){t.ready().then((function(){var r=t._dbInfo;r.db.transaction((function(t){Z(t,r,"DELETE FROM "+r.storeName,[],(function(){e()}),(function(e,t){n(t)}))}))})).catch(n)}));return l(n,e),n},length:function(e){var t=this,n=new a((function(e,n){t.ready().then((function(){var r=t._dbInfo;r.db.transaction((function(t){Z(t,r,"SELECT COUNT(key) as c FROM "+r.storeName,[],(function(t,n){var r=n.rows.item(0).c;e(r)}),(function(e,t){n(t)}))}))})).catch(n)}));return l(n,e),n},key:function(e,t){var n=this,r=new a((function(t,r){n.ready().then((function(){var i=n._dbInfo;i.db.transaction((function(n){Z(n,i,"SELECT key FROM "+i.storeName+" WHERE id = ? LIMIT 1",[e+1],(function(e,n){var r=n.rows.length?n.rows.item(0).key:null;t(r)}),(function(e,t){r(t)}))}))})).catch(r)}));return l(r,t),r},keys:function(e){var t=this,n=new a((function(e,n){t.ready().then((function(){var r=t._dbInfo;r.db.transaction((function(t){Z(t,r,"SELECT key FROM "+r.storeName,[],(function(t,n){for(var r=[],i=0;i<n.rows.length;i++)r.push(n.rows.item(i).key);e(r)}),(function(e,t){n(t)}))}))})).catch(n)}));return l(n,e),n},dropInstance:function(e,t){t=h.apply(this,arguments);var n=this.config();(e="function"!=typeof e&&e||{}).name||(e.name=e.name||n.name,e.storeName=e.storeName||n.storeName);var r,i=this;return r=e.name?new a((function(t){var r;r=e.name===n.name?i._dbInfo.db:openDatabase(e.name,"","",0),e.storeName?t({db:r,storeNames:[e.storeName]}):t(function(e){return new a((function(t,n){e.transaction((function(r){r.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],(function(n,r){for(var i=[],o=0;o<r.rows.length;o++)i.push(r.rows.item(o).name);t({db:e,storeNames:i})}),(function(e,t){n(t)}))}),(function(e){n(e)}))}))}(r))})).then((function(e){return new a((function(t,n){e.db.transaction((function(r){function i(e){return new a((function(t,n){r.executeSql("DROP TABLE IF EXISTS "+e,[],(function(){t()}),(function(e,t){n(t)}))}))}for(var o=[],s=0,l=e.storeNames.length;s<l;s++)o.push(i(e.storeNames[s]));a.all(o).then((function(){t()})).catch((function(e){n(e)}))}),(function(e){n(e)}))}))})):a.reject("Invalid arguments"),l(r,t),r}};function ee(e,t){var n=e.name+"/";return e.storeName!==t.storeName&&(n+=e.storeName+"/"),n}function te(){return!function(){var e="_localforage_support_test";try{return localStorage.setItem(e,!0),localStorage.removeItem(e),!1}catch(e){return!0}}()||localStorage.length>0}var ne={_driver:"localStorageWrapper",_initStorage:function(e){var t={};if(e)for(var n in e)t[n]=e[n];return t.keyPrefix=ee(e,this._defaultConfig),te()?(this._dbInfo=t,t.serializer=K,a.resolve()):a.reject()},_support:function(){try{return"undefined"!=typeof localStorage&&"setItem"in localStorage&&!!localStorage.setItem}catch(e){return!1}}(),iterate:function(e,t){var n=this,r=n.ready().then((function(){for(var t=n._dbInfo,r=t.keyPrefix,i=r.length,o=localStorage.length,s=1,a=0;a<o;a++){var l=localStorage.key(a);if(0===l.indexOf(r)){var c=localStorage.getItem(l);if(c&&(c=t.serializer.deserialize(c)),void 0!==(c=e(c,l.substring(i),s++)))return c}}}));return l(r,t),r},getItem:function(e,t){var n=this;e=u(e);var r=n.ready().then((function(){var t=n._dbInfo,r=localStorage.getItem(t.keyPrefix+e);return r&&(r=t.serializer.deserialize(r)),r}));return l(r,t),r},setItem:function(e,t,n){var r=this;e=u(e);var i=r.ready().then((function(){void 0===t&&(t=null);var n=t;return new a((function(i,o){var s=r._dbInfo;s.serializer.serialize(t,(function(t,r){if(r)o(r);else try{localStorage.setItem(s.keyPrefix+e,t),i(n)}catch(e){"QuotaExceededError"!==e.name&&"NS_ERROR_DOM_QUOTA_REACHED"!==e.name||o(e),o(e)}}))}))}));return l(i,n),i},removeItem:function(e,t){var n=this;e=u(e);var r=n.ready().then((function(){var t=n._dbInfo;localStorage.removeItem(t.keyPrefix+e)}));return l(r,t),r},clear:function(e){var t=this,n=t.ready().then((function(){for(var e=t._dbInfo.keyPrefix,n=localStorage.length-1;n>=0;n--){var r=localStorage.key(n);0===r.indexOf(e)&&localStorage.removeItem(r)}}));return l(n,e),n},length:function(e){var t=this.keys().then((function(e){return e.length}));return l(t,e),t},key:function(e,t){var n=this,r=n.ready().then((function(){var t,r=n._dbInfo;try{t=localStorage.key(e)}catch(e){t=null}return t&&(t=t.substring(r.keyPrefix.length)),t}));return l(r,t),r},keys:function(e){var t=this,n=t.ready().then((function(){for(var e=t._dbInfo,n=localStorage.length,r=[],i=0;i<n;i++){var o=localStorage.key(i);0===o.indexOf(e.keyPrefix)&&r.push(o.substring(e.keyPrefix.length))}return r}));return l(n,e),n},dropInstance:function(e,t){if(t=h.apply(this,arguments),!(e="function"!=typeof e&&e||{}).name){var n=this.config();e.name=e.name||n.name,e.storeName=e.storeName||n.storeName}var r,i=this;return r=e.name?new a((function(t){e.storeName?t(ee(e,i._defaultConfig)):t(e.name+"/")})).then((function(e){for(var t=localStorage.length-1;t>=0;t--){var n=localStorage.key(t);0===n.indexOf(e)&&localStorage.removeItem(n)}})):a.reject("Invalid arguments"),l(r,t),r}},re=function(e,t){return e===t||"number"==typeof e&&"number"==typeof t&&isNaN(e)&&isNaN(t)},ie=function(e,t){for(var n=e.length,r=0;r<n;){if(re(e[r],t))return!0;r++}return!1},oe=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},se={},ae={},le={INDEXEDDB:R,WEBSQL:Q,LOCALSTORAGE:ne},ce=[le.INDEXEDDB._driver,le.WEBSQL._driver,le.LOCALSTORAGE._driver],ue=["dropInstance"],he=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(ue),de={description:"",driver:ce.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function fe(e,t){e[t]=function(){var n=arguments;return e.ready().then((function(){return e[t].apply(e,n)}))}}function pe(){for(var e=1;e<arguments.length;e++){var t=arguments[e];if(t)for(var n in t)t.hasOwnProperty(n)&&(oe(t[n])?arguments[0][n]=t[n].slice():arguments[0][n]=t[n])}return arguments[0]}var ge=function(){function e(t){for(var n in function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),le)if(le.hasOwnProperty(n)){var r=le[n],i=r._driver;this[n]=i,se[i]||this.defineDriver(r)}this._defaultConfig=pe({},de),this._config=pe({},this._defaultConfig,t),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch((function(){}))}return e.prototype.config=function(e){if("object"===(void 0===e?"undefined":r(e))){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var t in e){if("storeName"===t&&(e[t]=e[t].replace(/\W/g,"_")),"version"===t&&"number"!=typeof e[t])return new Error("Database version must be a number.");this._config[t]=e[t]}return!("driver"in e)||!e.driver||this.setDriver(this._config.driver)}return"string"==typeof e?this._config[e]:this._config},e.prototype.defineDriver=function(e,t,n){var r=new a((function(t,n){try{var r=e._driver,i=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!e._driver)return void n(i);for(var o=he.concat("_initStorage"),s=0,c=o.length;s<c;s++){var u=o[s];if((!ie(ue,u)||e[u])&&"function"!=typeof e[u])return void n(i)}!function(){for(var t=function(e){return function(){var t=new Error("Method "+e+" is not implemented by the current driver"),n=a.reject(t);return l(n,arguments[arguments.length-1]),n}},n=0,r=ue.length;n<r;n++){var i=ue[n];e[i]||(e[i]=t(i))}}();var h=function(n){se[r]&&console.info("Redefining LocalForage driver: "+r),se[r]=e,ae[r]=n,t()};"_support"in e?e._support&&"function"==typeof e._support?e._support().then(h,n):h(!!e._support):h(!0)}catch(e){n(e)}}));return c(r,t,n),r},e.prototype.driver=function(){return this._driver||null},e.prototype.getDriver=function(e,t,n){var r=se[e]?a.resolve(se[e]):a.reject(new Error("Driver not found."));return c(r,t,n),r},e.prototype.getSerializer=function(e){var t=a.resolve(K);return c(t,e),t},e.prototype.ready=function(e){var t=this,n=t._driverSet.then((function(){return null===t._ready&&(t._ready=t._initDriver()),t._ready}));return c(n,e,e),n},e.prototype.setDriver=function(e,t,n){var r=this;oe(e)||(e=[e]);var i=this._getSupportedDrivers(e);function o(){r._config.driver=r.driver()}function s(e){return r._extend(e),o(),r._ready=r._initStorage(r._config),r._ready}var l=null!==this._driverSet?this._driverSet.catch((function(){return a.resolve()})):a.resolve();return this._driverSet=l.then((function(){var e=i[0];return r._dbInfo=null,r._ready=null,r.getDriver(e).then((function(e){r._driver=e._driver,o(),r._wrapLibraryMethodsWithReady(),r._initDriver=function(e){return function(){var t=0;return function n(){for(;t<e.length;){var i=e[t];return t++,r._dbInfo=null,r._ready=null,r.getDriver(i).then(s).catch(n)}o();var l=new Error("No available storage method found.");return r._driverSet=a.reject(l),r._driverSet}()}}(i)}))})).catch((function(){o();var e=new Error("No available storage method found.");return r._driverSet=a.reject(e),r._driverSet})),c(this._driverSet,t,n),this._driverSet},e.prototype.supports=function(e){return!!ae[e]},e.prototype._extend=function(e){pe(this,e)},e.prototype._getSupportedDrivers=function(e){for(var t=[],n=0,r=e.length;n<r;n++){var i=e[n];this.supports(i)&&t.push(i)}return t},e.prototype._wrapLibraryMethodsWithReady=function(){for(var e=0,t=he.length;e<t;e++)fe(this,he[e])},e.prototype.createInstance=function(t){return new e(t)},e}(),me=new ge;t.exports=me},{3:3}]},{},[4])(4)),vo.exports);
1
+ import{defineComponent as e,ref as t,onErrorCaptured as n,renderSlot as r,createBlock as i,createTextVNode as o,toDisplayString as s,openBlock as a,Suspense as l,withCtx as c,createElementVNode as u,resolveComponent as h,createVNode as f,createCommentVNode as d,KeepAlive as p,resolveDynamicComponent as g,markRaw as m,nextTick as v,reactive as y,watch as w,computed as b,onMounted as S,onUnmounted as C,createElementBlock as E,normalizeStyle as x,Fragment as k,renderList as M,normalizeClass as T,mergeProps as z,TransitionGroup as A,Transition as _,withDirectives as L,withModifiers as R,unref as I,vShow as D,useCssVars as P,h as N}from"vue";import O from"axios";import{Client as B,ClientContext as F}from"@hprose/rpc-core";import{ByteStream as W,Writer as U,Reader as j,ValueReader as $}from"@hprose/io";import{HttpTransport as H}from"@hprose/rpc-html5";import G from"iconv-lite";export{DecodeOptions,EncodeOptions,default as iconv}from"iconv-lite";import*as q from"@microsoft/signalr";import X from"qs";import{Icon as V}from"@iconify/vue";function Z(e){return{all:e=e||new Map,on(t,n){const r=e.get(t);r?r.push(n):e.set(t,[n])},off(t,n){const r=e.get(t);r&&(n?r.splice(r.indexOf(n)>>>0,1):e.set(t,[]))},emit(t,n){let r=e.get(t);r&&r.slice().map((e=>{e(n)})),r=e.get("*"),r&&r.slice().map((e=>{e(t,n)}))}}}const K=Z();var Y="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function J(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Q,ee={exports:{}},te=ee.exports,ne=(Q||(Q=1,function(e){var t,n;t=te,n=function(){var e=function(){},t="undefined",n=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),r=["trace","debug","info","warn","error"],i={},o=null;function s(e,t){var n=e[t];if("function"==typeof n.bind)return n.bind(e);try{return Function.prototype.bind.call(n,e)}catch(t){return function(){return Function.prototype.apply.apply(n,[e,arguments])}}}function a(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function l(){for(var n=this.getLevel(),i=0;i<r.length;i++){var o=r[i];this[o]=i<n?e:this.methodFactory(o,n,this.name)}if(this.log=this.debug,typeof console===t&&n<this.levels.SILENT)return"No console available for logging"}function c(e){return function(){typeof console!==t&&(l.call(this),this[e].apply(this,arguments))}}function u(r,i,o){return function(r){return"debug"===r&&(r="log"),typeof console!==t&&("trace"===r&&n?a:void 0!==console[r]?s(console,r):void 0!==console.log?s(console,"log"):e)}(r)||c.apply(this,arguments)}function h(e,n){var s,a,c,h=this,f="loglevel";function d(){var e;if(typeof window!==t&&f){try{e=window.localStorage[f]}catch(e){}if(typeof e===t)try{var n=window.document.cookie,r=encodeURIComponent(f),i=n.indexOf(r+"=");-1!==i&&(e=/^([^;]+)/.exec(n.slice(i+r.length+1))[1])}catch(e){}return void 0===h.levels[e]&&(e=void 0),e}}function p(e){var t=e;if("string"==typeof t&&void 0!==h.levels[t.toUpperCase()]&&(t=h.levels[t.toUpperCase()]),"number"==typeof t&&t>=0&&t<=h.levels.SILENT)return t;throw new TypeError("log.setLevel() called with invalid level: "+e)}"string"==typeof e?f+=":"+e:"symbol"==typeof e&&(f=void 0),h.name=e,h.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},h.methodFactory=n||u,h.getLevel=function(){return null!=c?c:null!=a?a:s},h.setLevel=function(e,n){return c=p(e),!1!==n&&function(e){var n=(r[e]||"silent").toUpperCase();if(typeof window!==t&&f){try{return void(window.localStorage[f]=n)}catch(e){}try{window.document.cookie=encodeURIComponent(f)+"="+n+";"}catch(e){}}}(c),l.call(h)},h.setDefaultLevel=function(e){a=p(e),d()||h.setLevel(e,!1)},h.resetLevel=function(){c=null,function(){if(typeof window!==t&&f){try{window.localStorage.removeItem(f)}catch(e){}try{window.document.cookie=encodeURIComponent(f)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch(e){}}}(),l.call(h)},h.enableAll=function(e){h.setLevel(h.levels.TRACE,e)},h.disableAll=function(e){h.setLevel(h.levels.SILENT,e)},h.rebuild=function(){if(o!==h&&(s=p(o.getLevel())),l.call(h),o===h)for(var e in i)i[e].rebuild()},s=p(o?o.getLevel():"WARN");var g=d();null!=g&&(c=p(g)),l.call(h)}(o=new h).getLogger=function(e){if("symbol"!=typeof e&&"string"!=typeof e||""===e)throw new TypeError("You must supply a name when creating a logger.");var t=i[e];return t||(t=i[e]=new h(e,o.methodFactory)),t};var f=typeof window!==t?window.log:void 0;return o.noConflict=function(){return typeof window!==t&&window.log===o&&(window.log=f),o},o.getLoggers=function(){return i},o.default=o,o},e.exports?e.exports=n():t.log=n()}(ee)),ee.exports);const re={HproseServiceErrorEvent:"HproseServiceError",WebAPIErrorEvent:"WebAPIError",AlertInfoEvent:"AlertInfoEvent",CommonWarnEvent:"CommonWarnEvent",WidgetLoadedEvent:"WidgetLoaded",WidgetLoaded:"WidgetLoaded",WidgetToUnloadEvent:"WidgetToUnloadEvent",WidgetUnLoadedEvent:"WidgetUnLoaded",WidgetLoadedErrorEvent:"WidgetLoadedError",WidgetVisibleChanged:"WidgetVisibleChanged",AxiosRequestErrorEvent:"AxiosRequestErrorEvent",LayoutContainerLoaded:"LayoutContainerLoaded",ModalContainerWidget_LoadModal:"ModalContainerWidget_LoadModal",ModalContainerWidget_CloseModal:"ModalContainerWidget_CloseModal",WidgetClosed:"WidgetClosed"};class ie{message;eventBus;constructor(e,t=void 0){e&&(this.message=e),t&&(this.eventBus=t)}msg(e,t=3,n="success"){if(this.message)if("function"==typeof this.message)this.message({type:n,message:e,duration:t});else switch(n){case"info":this.message.info(e,t);break;case"success":this.message.success(e,t);break;case"warning":this.message.warn?this.message.warn(e,t):this.message.warning&&this.message.warning(e,t);break;case"error":this.message.error(e,t)}else{switch(n){case"info":case"success":console.log(e);break;case"warning":console.warn(e);break;case"error":n="dark",console.error(e)}this.eventBus&&this.eventBus.emit(re.AlertInfoEvent,{type:n,info:e})}}info(e,t=3){this.msg(e,t,"info")}warn(e,t=3){this.msg(e,t,"warning")}err(e,t=3){this.msg(e,t,"error")}success(e,t=3){this.msg(e,t,"success")}}let oe=globalThis.SysConfig,se=!1,ae=!1;Function.prototype.promise=function(...e){const t=this;return function(){const n=e||[];return new Promise(((r,i)=>{n.push((function(e,t){e?i(e):r(t)})),t.apply(t,e)}))}()};const le={Config:globalThis.SysConfig,EventBus:K,DefaultProxyClient:null,Axios:O,Message:new ie(void 0,K),LayoutMap:new Map,getLayoutManager:e=>{if(!ue.WidgetConfigList||0===ue.WidgetConfigList.length)return;const t=ue.WidgetConfigList.find((t=>t.id===e));if(t){const e=t.layoutID;if(e&&ue.LayoutMap.has(e))return ue.LayoutMap.get(e)}},Logger:e=>{se||(oe.UI.ProductLog?ne.enableAll():ne.setDefaultLevel("warn"),se=!0);const t=e||"default";return ne.getLogger(t)},Loading:(e="end")=>{if("end"===e)setTimeout((()=>{document.getElementById("apploading")?.remove()}),300),ae=!0;else if(e)if(ae){const t=`加载Widget:${e}……`;K.emit("statusmessage",t)}else{const t=document.getElementById("app-loading-info");t&&(t.innerHTML=`正在加载:${e}……`)}}},ce="99,111,110,115,116,32,118,97,108,105,100,75,101,121,115,61,91,39,54,65,50,53,51,65,69,70,54,54,68,48,69,56,65,66,57,54,49,55,49,55,51,49,50,52,50,66,65,70,53,65,39,44,39,66,54,53,48,52,57,53,55,54,55,49,49,56,66,50,70,50,50,48,55,67,66,52,69,70,51,49,51,52,49,65,68,39,44,39,54,66,52,66,57,49,65,67,52,51,56,70,70,57,69,54,65,69,52,68,49,49,70,48,50,70,56,51,50,68,51,52,39,44,39,70,54,69,52,57,50,52,57,57,69,70,57,57,48,65,49,50,66,57,66,57,55,48,66,54,57,68,69,68,49,48,70,39,44,39,57,67,55,55,56,67,66,69,66,56,54,51,70,68,68,52,70,49,66,65,51,56,49,52,50,69,48,52,53,53,69,49,39,44,39,70,66,66,55,57,67,57,66,51,57,53,70,65,70,55,49,53,56,50,50,65,70,52,50,52,57,54,56,70,48,54,67,39,44,39,53,57,51,66,67,70,68,50,54,70,48,53,53,53,65,53,50,57,51,67,68,49,49,56,55,49,56,53,49,68,52,52,39,44,39,50,48,54,55,69,66,51,54,57,55,69,55,49,67,53,49,53,68,68,68,54,49,65,53,52,70,67,57,51,53,53,69,39,44,39,70,52,65,50,68,67,69,65,48,53,56,69,68,52,55,48,53,67,67,52,70,54,69,66,51,70,67,70,48,66,53,66,39,93,59,105,102,40,83,121,115,67,111,110,102,105,103,46,75,69,89,38,38,118,97,108,105,100,75,101,121,115,46,105,110,100,101,120,79,102,40,83,121,115,67,111,110,102,105,103,46,75,69,89,41,62,61,48,41,123,99,111,110,115,111,108,101,46,108,111,103,40,39,117,115,105,110,103,32,97,117,116,104,111,114,105,122,101,100,32,120,102,114,97,109,101,108,105,98,46,84,104,97,110,107,32,121,111,117,33,39,41,59,114,101,116,117,114,110,32,103,108,111,98,79,98,106,125,101,108,115,101,32,105,102,40,33,83,121,115,67,111,110,102,105,103,46,75,69,89,41,123,105,102,40,110,101,119,32,68,97,116,101,40,50,48,50,55,44,49,44,49,41,60,110,101,119,32,68,97,116,101,40,41,41,123,105,102,40,99,111,110,102,105,114,109,40,39,84,104,101,32,88,70,114,97,109,101,108,105,98,32,116,114,105,97,108,32,104,97,115,32,101,120,112,105,114,101,100,46,32,84,111,32,112,117,114,99,104,97,115,101,32,97,32,102,117,108,108,32,118,101,114,115,105,111,110,32,112,108,101,97,115,101,32,99,111,110,116,97,99,116,58,122,111,114,114,111,119,109,64,49,50,54,46,99,111,109,46,32,83,101,108,101,99,116,32,79,75,32,116,111,32,110,97,118,105,103,97,116,101,32,116,111,32,116,104,101,32,103,105,116,104,117,98,46,99,111,109,47,122,111,114,114,111,119,109,32,85,82,76,46,39,41,41,123,108,111,99,97,116,105,111,110,46,104,114,101,102,61,39,104,116,116,112,115,58,47,47,103,105,116,104,117,98,46,99,111,109,47,122,111,114,114,111,119,109,39,125,101,108,115,101,123,116,104,114,111,119,39,84,104,101,32,116,114,105,97,108,32,112,101,114,105,111,100,32,104,97,115,32,101,120,112,105,114,101,100,33,39,59,125,125,101,108,115,101,123,99,111,110,115,111,108,101,46,108,111,103,40,39,84,104,101,32,116,114,105,97,108,32,100,101,97,100,108,105,110,101,32,102,111,114,32,116,104,105,115,32,120,102,114,97,109,101,108,105,98,32,108,105,98,114,97,114,121,32,105,115,32,74,97,110,117,97,114,121,32,49,44,32,50,48,50,55,46,39,41,59,114,101,116,117,114,110,32,103,108,111,98,79,98,106,125,125,116,104,114,111,119,39,84,104,101,32,88,70,114,97,109,101,108,105,98,32,75,69,89,32,105,115,32,105,110,118,97,108,105,100,33,32,84,111,32,112,117,114,99,104,97,115,101,32,97,32,102,117,108,108,32,118,101,114,115,105,111,110,32,112,108,101,97,115,101,32,99,111,110,116,97,99,116,58,122,111,114,114,111,119,109,64,49,50,54,46,99,111,109,32,33,39,59".split(",").map((e=>Number(e)));new Function("globObj","isdev",String.fromCharCode(...ce));const ue=le;var he=(e=>(e[e.top=0]="top",e[e.bottom=1]="bottom",e[e.centerBack=2]="centerBack",e[e.centerMain=3]="centerMain",e[e.centerFront=4]="centerFront",e[e.left=5]="left",e[e.right=6]="right",e))(he||{});const fe=(e,t)=>{const n=e.__vccOpts||e;for(const[r,i]of t)n[r]=i;return n},de=fe(e({name:"SuspenseWithError",setup(){const e=t(null);return n((t=>(e.value="当前页面存在问题,无法渲染……",console.error("onErrorCaptured",t),!0))),{error:e}}}),[["render",function(e,t,n,h,f,d){return e.error?r(e.$slots,"error",{key:0},(()=>[o(s(e.error),1)])):(a(),i(l,{key:1},{default:c((()=>[r(e.$slots,"default")])),fallback:c((()=>[r(e.$slots,"fallback",{},(()=>[t[0]||(t[0]=u("div",null,"加载中……",-1))]))])),_:3}))}]]),pe=e({name:"RouterTransition",__name:"RouterTransition",setup:e=>(e,t)=>{const n=h("router-view");return a(),i(de,null,{default:c((()=>[f(n,null,{default:c((({Component:e,route:t})=>[(a(),i(p,null,[t.meta.keepAlive?(a(),i(g(e),{key:t.name})):d("",!0)],1024)),t.meta.keepAlive?d("",!0):(a(),i(g(e),{key:t.name}))])),_:1})])),_:1})}});class ge{static isNullOrEmpty=e=>null===e||""===e||void 0===e||0===e.length;static isNotEmpty=e=>null!==e&&""!==e&&void 0!==e&&0!==e.length;static toHump(e){return e.replace(/[\-\/\_](\w)/g,((e,t)=>t.toUpperCase())).replace("views","")}static getFileName(e){const t=e.lastIndexOf("/")+1;let n=e.substring(t);return n=decodeURI(n.split("?")[0]),n}static UpperFirst(e){return(e=e.toLowerCase()).replace(/\b\w|\s\w/g,(e=>e.toUpperCase()))}}class me{hproseURL;client;hproseProxy;static httpTransport;constructor(e){if(e&&!ge.isNullOrEmpty(e)){if(me.httpTransport||(me.httpTransport=new H),this.client=new B(e),!this.client)throw Error("Hprose Client初始化错误");this.hproseURL=e,this.init()}}init(){this.client&&this.client.useServiceAsync().then((e=>{this.hproseProxy=e})).catch((e=>{String(e).indexOf("find this method ~")>0?(this.hproseProxy=this.client?.useService(),console.warn("旧版本不支持useServiceAsync")):K.emit(re.HproseServiceErrorEvent,"初始化默认Hprose!")}))}async getProxy(){if(!this.hproseProxy)try{this.client&&(this.hproseProxy=await this.client.useServiceAsync())}catch(e){console.warn(e),this.hproseProxy=this.client?.useService()}return this.hproseProxy}async invoke(e,t,n){if(this.client)return await this.client.invoke(e,t,n)}encode(e,t,n){return this.client?this.client.codec.encode(e,t,n):void 0}decode(e,t){return this.client?this.client.codec.decode(e,t):void 0}}class ve{constructor(e="",t=globalThis.localStorage){this.prefixKey=e,this.storage=t}getKey(e){return`${this.prefixKey}${e}`.toUpperCase()}set(e,t,n=604800){const r=JSON.stringify({value:t,expire:null!==n?(new Date).getTime()+1e3*n:null});this.storage.setItem(this.getKey(e),r)}get(e,t=null){const n=this.storage.getItem(this.getKey(e));if(n)try{const t=JSON.parse(n),{value:r,expire:i}=t;if(null===i||i>=Date.now())return r;this.remove(this.getKey(e))}catch(e){return t}return t}getJsonObject(e){const t=this.storage.getItem(this.getKey(e));if(t)try{const n=JSON.parse(t);if(null===n.expire||n.expire>=Date.now())return n;this.remove(this.getKey(e))}catch(e){return}}remove(e){this.storage.removeItem(this.getKey(e))}clear(){this.storage.clear()}setCookie(e,t,n=604800){document.cookie=`${this.getKey(e)}=${t}; Max-Age=${n}`}getCookie(e){const t=document.cookie.split("; ");for(let n=0,r=t.length;n<r;n++){const r=t[n].split("=");if(r[0]===this.getKey(e))return r[1]}return""}removeCookie(e){this.setCookie(e,1,-1)}clearCookie(){const e=document.cookie.match(/[^ =;]+(?==)/g);if(e)for(let t=e.length;t--;)document.cookie=e[t]+"=0;expire="+new Date(0).toUTCString()}}const ye=new ve("",globalThis.localStorage),we="access_token",be=new ve("user",globalThis.localStorage);function Se(){return be.get(we)}function Ce(){be.remove(we)}function Ee(){const e=Se();return e?.refresh}class xe{hproseClient;hpProxyObj;defaultContext=new F;constructor(e){this.hproseClient=new me(e),this.hpProxyObj=null}getClientContext(e,t){const n={};t&&(n.requestHeaders=t),n.httpRequestHeaders=e||{};const r=n.httpRequestHeaders,i=Se();return i&&(r.token=i.token),ue.SystemID&&(r.sysid=ue.SystemID,ue.SystemGroup&&(r.sysgroup=ue.SystemGroup)),new F(n)}async getHproseProxy(){if(!this.hproseClient)throw new Error("HproseClient对象为构建,无法调用Hprose方法");if(!this.hpProxyObj){const e=await this.hproseClient.getProxy();this.hpProxyObj=e}return this.hpProxyObj||K.emit(re.HproseServiceErrorEvent,"HproseProxy对象为空,无法调用Hprose方法!"),this.hpProxyObj}async hproseInvoke(e,t,n){if(!this.hproseClient)throw new Error("HproseClient对象为构建,无法调用Hprose方法");return await this.hproseClient.invoke(e,t,n)}async hproseInvokeContext(e,t,...n){if(!this.hproseClient)throw new Error("HproseClient对象为构建,无法调用Hprose方法");const r=Se();return console.log(r,"userToken3"),r&&(t||(t=new F({httpRequestHeaders:{token:r.token}}))),await this.hproseClient.invoke(e,n,t)}async hproseInvokeEncode(e){const t=new W(e).toBytes(),n=await(this.hproseClient.client?.request(t,this.defaultContext));return n?this.hproseClient.client?.codec.decode(n,this.defaultContext):n}encodeRequest(e,...t){const n=this.hproseClient.client?.codec,r=n?.encode(e,t,this.defaultContext);return W.toString(r)}}var ke,Me={exports:{}},Te=(ke||(ke=1,Me.exports=function(){var e=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function t(e,t){var n=e[0],r=e[1],i=e[2],o=e[3];r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+t[0]-680876936|0)<<7|n>>>25)+r|0)&r|~n&i)+t[1]-389564586|0)<<12|o>>>20)+n|0)&n|~o&r)+t[2]+606105819|0)<<17|i>>>15)+o|0)&o|~i&n)+t[3]-1044525330|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+t[4]-176418897|0)<<7|n>>>25)+r|0)&r|~n&i)+t[5]+1200080426|0)<<12|o>>>20)+n|0)&n|~o&r)+t[6]-1473231341|0)<<17|i>>>15)+o|0)&o|~i&n)+t[7]-45705983|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+t[8]+1770035416|0)<<7|n>>>25)+r|0)&r|~n&i)+t[9]-1958414417|0)<<12|o>>>20)+n|0)&n|~o&r)+t[10]-42063|0)<<17|i>>>15)+o|0)&o|~i&n)+t[11]-1990404162|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+t[12]+1804603682|0)<<7|n>>>25)+r|0)&r|~n&i)+t[13]-40341101|0)<<12|o>>>20)+n|0)&n|~o&r)+t[14]-1502002290|0)<<17|i>>>15)+o|0)&o|~i&n)+t[15]+1236535329|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+t[1]-165796510|0)<<5|n>>>27)+r|0)&i|r&~i)+t[6]-1069501632|0)<<9|o>>>23)+n|0)&r|n&~r)+t[11]+643717713|0)<<14|i>>>18)+o|0)&n|o&~n)+t[0]-373897302|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+t[5]-701558691|0)<<5|n>>>27)+r|0)&i|r&~i)+t[10]+38016083|0)<<9|o>>>23)+n|0)&r|n&~r)+t[15]-660478335|0)<<14|i>>>18)+o|0)&n|o&~n)+t[4]-405537848|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+t[9]+568446438|0)<<5|n>>>27)+r|0)&i|r&~i)+t[14]-1019803690|0)<<9|o>>>23)+n|0)&r|n&~r)+t[3]-187363961|0)<<14|i>>>18)+o|0)&n|o&~n)+t[8]+1163531501|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+t[13]-1444681467|0)<<5|n>>>27)+r|0)&i|r&~i)+t[2]-51403784|0)<<9|o>>>23)+n|0)&r|n&~r)+t[7]+1735328473|0)<<14|i>>>18)+o|0)&n|o&~n)+t[12]-1926607734|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+t[5]-378558|0)<<4|n>>>28)+r|0)^r^i)+t[8]-2022574463|0)<<11|o>>>21)+n|0)^n^r)+t[11]+1839030562|0)<<16|i>>>16)+o|0)^o^n)+t[14]-35309556|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+t[1]-1530992060|0)<<4|n>>>28)+r|0)^r^i)+t[4]+1272893353|0)<<11|o>>>21)+n|0)^n^r)+t[7]-155497632|0)<<16|i>>>16)+o|0)^o^n)+t[10]-1094730640|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+t[13]+681279174|0)<<4|n>>>28)+r|0)^r^i)+t[0]-358537222|0)<<11|o>>>21)+n|0)^n^r)+t[3]-722521979|0)<<16|i>>>16)+o|0)^o^n)+t[6]+76029189|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+t[9]-640364487|0)<<4|n>>>28)+r|0)^r^i)+t[12]-421815835|0)<<11|o>>>21)+n|0)^n^r)+t[15]+530742520|0)<<16|i>>>16)+o|0)^o^n)+t[2]-995338651|0)<<23|r>>>9)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+t[0]-198630844|0)<<6|n>>>26)+r|0)|~i))+t[7]+1126891415|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+t[14]-1416354905|0)<<15|i>>>17)+o|0)|~n))+t[5]-57434055|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+t[12]+1700485571|0)<<6|n>>>26)+r|0)|~i))+t[3]-1894986606|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+t[10]-1051523|0)<<15|i>>>17)+o|0)|~n))+t[1]-2054922799|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+t[8]+1873313359|0)<<6|n>>>26)+r|0)|~i))+t[15]-30611744|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+t[6]-1560198380|0)<<15|i>>>17)+o|0)|~n))+t[13]+1309151649|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+t[4]-145523070|0)<<6|n>>>26)+r|0)|~i))+t[11]-1120210379|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+t[2]+718787259|0)<<15|i>>>17)+o|0)|~n))+t[9]-343485551|0)<<21|r>>>11)+i|0,e[0]=n+e[0]|0,e[1]=r+e[1]|0,e[2]=i+e[2]|0,e[3]=o+e[3]|0}function n(e){var t,n=[];for(t=0;t<64;t+=4)n[t>>2]=e.charCodeAt(t)+(e.charCodeAt(t+1)<<8)+(e.charCodeAt(t+2)<<16)+(e.charCodeAt(t+3)<<24);return n}function r(e){var t,n=[];for(t=0;t<64;t+=4)n[t>>2]=e[t]+(e[t+1]<<8)+(e[t+2]<<16)+(e[t+3]<<24);return n}function i(e){var r,i,o,s,a,l,c=e.length,u=[1732584193,-271733879,-1732584194,271733878];for(r=64;r<=c;r+=64)t(u,n(e.substring(r-64,r)));for(i=(e=e.substring(r-64)).length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],r=0;r<i;r+=1)o[r>>2]|=e.charCodeAt(r)<<(r%4<<3);if(o[r>>2]|=128<<(r%4<<3),r>55)for(t(u,o),r=0;r<16;r+=1)o[r]=0;return s=(s=8*c).toString(16).match(/(.*?)(.{0,8})$/),a=parseInt(s[2],16),l=parseInt(s[1],16)||0,o[14]=a,o[15]=l,t(u,o),u}function o(e){var n,i,o,s,a,l,c=e.length,u=[1732584193,-271733879,-1732584194,271733878];for(n=64;n<=c;n+=64)t(u,r(e.subarray(n-64,n)));for(i=(e=n-64<c?e.subarray(n-64):new Uint8Array(0)).length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],n=0;n<i;n+=1)o[n>>2]|=e[n]<<(n%4<<3);if(o[n>>2]|=128<<(n%4<<3),n>55)for(t(u,o),n=0;n<16;n+=1)o[n]=0;return s=(s=8*c).toString(16).match(/(.*?)(.{0,8})$/),a=parseInt(s[2],16),l=parseInt(s[1],16)||0,o[14]=a,o[15]=l,t(u,o),u}function s(t){var n,r="";for(n=0;n<4;n+=1)r+=e[t>>8*n+4&15]+e[t>>8*n&15];return r}function a(e){var t;for(t=0;t<e.length;t+=1)e[t]=s(e[t]);return e.join("")}function l(e){return/[\u0080-\uFFFF]/.test(e)&&(e=unescape(encodeURIComponent(e))),e}function c(e){var t,n=[],r=e.length;for(t=0;t<r-1;t+=2)n.push(parseInt(e.substr(t,2),16));return String.fromCharCode.apply(String,n)}function u(){this.reset()}return a(i("hello")),"undefined"==typeof ArrayBuffer||ArrayBuffer.prototype.slice||function(){function e(e,t){return(e=0|e||0)<0?Math.max(e+t,0):Math.min(e,t)}ArrayBuffer.prototype.slice=function(t,n){var r,i,o,s,a=this.byteLength,l=e(t,a),c=a;return undefined!==n&&(c=e(n,a)),l>c?new ArrayBuffer(0):(r=c-l,i=new ArrayBuffer(r),o=new Uint8Array(i),s=new Uint8Array(this,l,r),o.set(s),i)}}(),u.prototype.append=function(e){return this.appendBinary(l(e)),this},u.prototype.appendBinary=function(e){this._buff+=e,this._length+=e.length;var r,i=this._buff.length;for(r=64;r<=i;r+=64)t(this._hash,n(this._buff.substring(r-64,r)));return this._buff=this._buff.substring(r-64),this},u.prototype.end=function(e){var t,n,r=this._buff,i=r.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<i;t+=1)o[t>>2]|=r.charCodeAt(t)<<(t%4<<3);return this._finish(o,i),n=a(this._hash),e&&(n=c(n)),this.reset(),n},u.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},u.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},u.prototype.setState=function(e){return this._buff=e.buff,this._length=e.length,this._hash=e.hash,this},u.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},u.prototype._finish=function(e,n){var r,i,o,s=n;if(e[s>>2]|=128<<(s%4<<3),s>55)for(t(this._hash,e),s=0;s<16;s+=1)e[s]=0;r=(r=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),i=parseInt(r[2],16),o=parseInt(r[1],16)||0,e[14]=i,e[15]=o,t(this._hash,e)},u.hash=function(e,t){return u.hashBinary(l(e),t)},u.hashBinary=function(e,t){var n=a(i(e));return t?c(n):n},u.ArrayBuffer=function(){this.reset()},u.ArrayBuffer.prototype.append=function(e){var n,i=function(e,t){var n=new Uint8Array(e.byteLength+t.byteLength);return n.set(new Uint8Array(e)),n.set(new Uint8Array(t),e.byteLength),n}(this._buff.buffer,e),o=i.length;for(this._length+=e.byteLength,n=64;n<=o;n+=64)t(this._hash,r(i.subarray(n-64,n)));return this._buff=n-64<o?new Uint8Array(i.buffer.slice(n-64)):new Uint8Array(0),this},u.ArrayBuffer.prototype.end=function(e){var t,n,r=this._buff,i=r.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<i;t+=1)o[t>>2]|=r[t]<<(t%4<<3);return this._finish(o,i),n=a(this._hash),e&&(n=c(n)),this.reset(),n},u.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},u.ArrayBuffer.prototype.getState=function(){var e=u.prototype.getState.call(this);return e.buff=function(e){return String.fromCharCode.apply(null,new Uint8Array(e))}(e.buff),e},u.ArrayBuffer.prototype.setState=function(e){return e.buff=function(e,t){var n,r=e.length,i=new ArrayBuffer(r),o=new Uint8Array(i);for(n=0;n<r;n+=1)o[n]=e.charCodeAt(n);return t?o:i}(e.buff,!0),u.prototype.setState.call(this,e)},u.ArrayBuffer.prototype.destroy=u.prototype.destroy,u.ArrayBuffer.prototype._finish=u.prototype._finish,u.ArrayBuffer.hash=function(e,t){var n=a(o(new Uint8Array(e)));return t?c(n):n},u}()),Me.exports);const ze=J(Te),Ae=Object.prototype.toString;function _e(e,t){return Ae.call(e)===`[object ${t}]`}function Le(e){return _e(e,"Function")}const Re=e=>void 0!==e,Ie=e=>!Re(e);function De(e){return null===e}function Pe(e){return Ie(e)&&De(e)}function Ne(e){return Ie(e)||De(e)}const Oe=e=>null!=e&&null!==e&&_e(e,"Object");function Be(e){return _e(e,"Date")}function Fe(e){return _e(e,"Number")}function We(e){return _e(e,"AsyncFunction")}function Ue(e){return _e(e,"Promise")&&Oe(e)&&Le(e.then)&&Le(e.catch)}function je(e){return _e(e,"String")}function $e(e){return!0===e||!1===e||_e(e,"Boolean")}function He(e){return e&&Array.isArray(e)}const Ge=()=>"undefined"!=typeof window,qe=e=>"undefined"!=typeof window&&_e(e,"Window"),Xe=e=>Ae.call(e).startsWith("[object HTML")&&!!e.tagName,Ve="undefined"==typeof window;function Ze(e){return e&&["IMAGE","IMG"].includes(e.tagName)}function Ke(e){return null==e||(je(e)||He(e)?0===e.length:!!Oe(e)&&"{}"===JSON.stringify(e))}function Ye(e){return _e(e,"Error")}function Je(e){return _e(e,"WeakSet")}function Qe(e){return _e(e,"WeakMap")}function et(e){return _e(e,"Symbol")}function tt(e){return _e(e,"Map")}const nt=e=>/^(https?|ftp):\/\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}|([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:[0-9]+)*(\/($|[a-zA-Z0-9.,?'\\+&%$#=~_-]+))*$/.test(e);function rt(e){return/^\s*[{[]/.test(String(e))}function it(e){return e.includes("<kml ")&&e.includes('xmlns="http://www.opengis.net/kml/')}const ot=[];let st;class at{static addHandler(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n}static removeHandler(e,t,n){e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent?e.detachEvent("on"+t,n):delete e["on"+t]}static windowResizeHandler(e){at.addHandler(window,"resize",e)}static offWindowResizeHandler(e){at.removeHandler(window,"resize",e)}static fullscreenEnabled(){const e=globalThis.document;return document.fullscreenEnabled||window.fullScreen||e.mozFullscreenEnabled||e.webkitIsFullScreen}static fullScreen(e,t){if(t){const e=globalThis.document;let t=globalThis.document.exitFullscreen||e.msExitFullscreen||e.mozCancelFullScreen||e.webkitCancelFullScreen;if(void 0!==t&&t)t.call(globalThis.document);else if(void 0!==window.ActiveXObject){let e=new window.ActiveXObject("WScript.Shell");null!=e&&e.SendKeys("{F11}")}}else{let t=e;t||(t=globalThis.document.documentElement);let n=t.requestFullScreen||t.webkitRequestFullScreen||t.mozRequestFullScreen||t.msRequestFullScreen;if(void 0!==n&&n)n.call(t);else if(void 0!==window.ActiveXObject){let e=new window.ActiveXObject("WScript.Shell");null!=e&&e.SendKeys("{F11}")}}}static requestFullScreen(e=globalThis.document.documentElement){let t=e;var n=t.requestFullScreen||t.webkitRequestFullScreen||t.mozRequestFullScreen||t.msRequestFullScreen;if(n)n.call(t);else if(void 0!==window.ActiveXObject){var r=new window.ActiveXObject("WScript.Shell");null!==r&&r.SendKeys("{F11}")}}static exitFullScreen(){const e=globalThis.document;var t=document.exitFullscreen||e.mozCancelFullScreen||e.webkitExitFullscreen||e.webkitExitFullscreen;if(t)t.call(document);else if(void 0!==window.ActiveXObject){var n=new window.ActiveXObject("WScript.Shell");null!==n&&n.SendKeys("{F11}")}}static fullScreenElement(){return globalThis.document.fullscreenElement||globalThis.document.webkitFullscreenElement||globalThis.document.mozFullscreenElement||globalThis.document.msFullscreenElement}static isFullScreen(){return!!at.fullScreenElement()}static onFullScreenChanged(e){let t;"onfullscreenchange"in globalThis.document?t="fullscreenchange":"onwebkitfullscreenchange"in globalThis.document?t="webkitfullscreenchange":"onmozfullscreenchange"in globalThis.document&&(t="mozfullscreenchange"),t?document.addEventListener(t,(function(){const t=at.isFullScreen();e(t)})):document.addEventListener("MSFullscreenChange",(function(){const t=at.isFullScreen();e(t)}))}static stringifyCircularHandler(e,t){if("object"==typeof t&&null!==t){if(-1!==ot.indexOf(t))return;ot.push(t)}return t}static jsonStringify(e){if(!e)return"";const t=JSON.stringify(e,at.stringifyCircularHandler);return ot.length=0,t}static jsonParse(e){const t=at.jsonStringify(e);if(t.length>1)return JSON.parse(t)}static getObjectURL(e){let t;const n=window;return null!=n.createObjcectURL?t=n.createOjcectURL(e):null!=globalThis.URL?t=globalThis.URL.createObjectURL(e):null!=globalThis.webkitURL&&(t=globalThis.webkitURL.createObjectURL(e)),t}static getFileShortMD5(e,t){const n=File.prototype,r=n.slice||n.mozSlice||n.webkitSlice,i=e,o=new ze.ArrayBuffer,s=new FileReader;s.onload=function(e){o.append(e.target?.result);const n=o.end(!1);t({isOK:!0,data:n})},s.onerror=function(){const e="计算文件简单摘要错误!";console.warn(e),t({isOK:!1,data:e})},function(){const e=2097152>=i.size?i.size:2097152;s.readAsArrayBuffer(r.call(i,0,e))}()}static getFileMD5(e,t){const n=File.prototype,r=n.slice||n.mozSlice||n.webkitSlice,i=e,o=2097152,s=Math.ceil(i.size/o);let a=0;const l=new ze.ArrayBuffer,c=new FileReader;function u(){const e=a*o,t=e+o>=i.size?i.size:e+o;c.readAsArrayBuffer(r.call(i,e,t))}c.onload=function(e){if(l.append(e.target?.result),a++,a<s)u();else{const e=l.end(!1);t({isOK:!0,data:e})}},c.onerror=function(){const e=`${i.name}:计算文件简单摘要错误!`;console.warn(e),t({isOK:!1,data:e})},u()}static MD5(e,t=!1){return ze.hash(e,t)}static copyTextByCommand(e){return new Promise(((t,n)=>{const r=document.createElement("input");r.value=e,document.body.appendChild(r),r.select(),document.execCommand("copy"),r.remove(),t(!0)}))}static copyText=e=>navigator.clipboard?navigator.clipboard.writeText(e).then((function(){return!0}),(function(e){return!1})):at.copyTextByCommand(e);static copyElementTextByCommand(e){const t=document.createRange();t.selectNode(document.getElementById(e));const n=globalThis.getSelection();n.rangeCount>0&&n.removeAllRanges(),n.addRange(t);try{return document.execCommand("copy"),n.removeRange(t),!0}catch(e){return n.removeRange(t),console.error("Command复制文本错误",e),!1}}static copyElementText(e){if(!navigator.clipboard)return at.copyElementTextByCommand(e);const t=document.createRange();t.selectNode(document.getElementById(e));const n=globalThis.getSelection();return n.rangeCount>0&&n.removeAllRanges(),n.addRange(t),navigator.clipboard.writeText(n).then((function(){return n.removeRange(t),!0}),(function(e){return n.removeRange(t),console.error("Clipboard复制文本错误",e),!1}))}static setGrayMode(e){at.toggleClass(e,"grayMode",document.documentElement)}static toggleClass(e,t,n){const r=n||document.body;let{className:i}=r;i=i.replace(t,""),r.className=e?`${i} ${t} `:i}static setCssVar(e,t,n=document.documentElement){n.style.setProperty(e,t)}static dispatchWindowResize(){const e=new Event("resize");globalThis.dispatchEvent(e)}static dispatchElementEvent(e,t="click",n){let r;if(r=je(e)?document.getElementById(e):e,r){const e=new Event(t,{bubbles:!0,cancelable:!0});n&&r.addEventListener("ev",(e=>{n(e)}),!1),r.dispatchEvent(e)}}static getRandomNum(e,t){var n=t-e,r=Math.random();return e+Math.round(r*n)}static merge(e={},t={}){let n,r,i,o;for(e||(e={}),r=0,i=t.length;r<i;r++)for(n in o=t[r],o)e[n]=o[n];return e}static setOptions(e,t){e.hasOwnProperty("options")||(e.options=e.options?Object.create(e.options):{});for(let n in t)e.options[n]=t[n];return e.options}static formatNum(e,t){let n=Math.pow(10,void 0===t?6:t);return Math.round(e*n)/n}static trim(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}static splitWords(e){return this.trim(e).split(/\s+/)}static emptyImageUrl(){return"data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="}static debounce(e,t){let n=null;return function(){n&&clearTimeout(n),n=setTimeout(e,t)}}static throttle(e,t){let n=!0;return function(){if(!n)return!1;n=!1,setTimeout((()=>{e(),n=!0}),t)}}static dataURLtoBlob(e){let t=e.split(",");if(!t||0===t.length)return;let n=t[0].match(/:(.*?);/)[1],r=atob(t[1]),i=r.length,o=new Uint8Array(i);for(;i--;)o[i]=r.charCodeAt(i);return new Blob([o],{type:n})}static getElement(e){return"string"==typeof e?document.getElementById(e):e}static getStyle(e,t){let n=e.style[t]||e.currentStyle&&e.currentStyle[t];if((!n||"auto"===n)&&document.defaultView){let r=document.defaultView.getComputedStyle(e,null);n=r?r[t]:null}return"auto"===n?null:n}static create(e,t,n){let r=document.createElement(e);return r.className=t||"",n&&n.appendChild(r),r}static removeElement(e){let t=e.parentNode;t&&t.removeChild(e)}static emptyElement(e){for(;e.firstChild;)e.removeChild(e.firstChild)}static hasClass(e,t){if(void 0!==e.classList)return e.classList.contains(t);let n=this.getClass(e);return n.length>0&&new RegExp("(^|\\s)"+t+"(\\s|$)").test(n)}static addClass(e,t){if(void 0!==e.classList){let n=this.splitWords(t);for(let t=0,r=n.length;t<r;t++)e.classList.add(n[t])}else if(!this.hasClass(e,t)){let n=this.getClass(e);this.setClass(e,(n?n+" ":"")+t)}}static removeClass(e,t){void 0!==e.classList?e.classList.remove(t):this.setClass(e,this.trim((" "+this.getClass(e)+" ").replace(" "+t+" "," ")))}static setClass(e,t){void 0===e.className.baseVal?e.className=t:e.className.baseVal=t}static getClass(e){return e.correspondingElement&&(e=e.correspondingElement),void 0===e.className.baseVal?e.className:e.className.baseVal}static createSvgElement(e,t,n,r){let i=document.createElementNS("http://www.w3.org/2000/svg","svg:svg");i.setAttribute("class","svg-path"),i.setAttribute("width",e),i.setAttribute("height",t),i.setAttribute("viewBox",`0 0 ${e} ${t}`);let o=document.createElementNS("http://www.w3.org/2000/svg","path");return o.setAttribute("d",n),i.appendChild(o),r&&r.appendChild(i),i}static parseDom(e,t=!0,n=""){t=t??!1;let r=document.createElement("div");return r.className=n||"",r.innerHTML=e,t?r:r.childNodes}static createVideoHTML(e,t,n){let r=this.create("video",t,n),i=this.create("source","",r);i.setAttribute("src",e),i.setAttribute("type","video/map4");let o=this.create("source","",r);return o.setAttribute("src",e),o.setAttribute("type","video/quicktime"),r}static readFilePromise(e,t="ArrayBuffer",n="UTF-8"){return new Promise(((r,i)=>{const o=new FileReader;switch(t){case"ArrayBuffer":o.readAsArrayBuffer(e);break;case"Text":o.readAsText(e,n);break;case"BinaryString":o.readAsBinaryString(e);break;case"DataURL":case"FileBytes":o.readAsDataURL(e)}o.onload=function(){if(o.result)if("FileBytes"===t){const e=o.result,t=e.indexOf("64,"),n=e.substring(t+3);r(n)}else r(o.result);else i(o)},o.onerror=function(){i(o)}}))}static readFileBytes(e){return this.readFilePromise(e,"FileBytes")}static promisify(e,...t){return function(){return new Promise(((n,r)=>{t.push((function(e,t){e?r(e):n(t)})),e.apply(this,t)}))}}static wait(e){return new Promise((t=>setTimeout(t,e)))}static blockEvent(e){e.preventDefault(),e.stopPropagation()}static bindDropFileHanlder(e,t){if(!e)throw Error("传入Element对象不能为空!");let n;if(je(e)){let t=document.getElementById(e);if(t)n=t;else{const r=document.getElementsByClassName(e);if(!r||0==r.length)throw Error("未找到对应id或类名的HtmlElement对象!");t=r[0],n=t}}else{if(!Xe(e))throw Error("ele参数只能为string 或 Element对象!");n=e}n&&(n.addEventListener("dragenter",this.blockEvent,!1),n.addEventListener("dragover",this.blockEvent,!1),n.addEventListener("drop",(function(e){at.blockEvent(e),t(e.dataTransfer.files)}),!1))}static getInputElement(){var e=document.activeElement;return!e||"INPUT"!=e.tagName&&"TEXTAREA"!=e.tagName&&"true"!=e.contentEditable?null:e}static guessPasteTextToFileName(e,t){let n,r=t;return je(e)?r=(rt(e)?"json":it(e)&&"kml")||"text":(Oe(e)&&e.type||He(e))&&(r="json"),"text"==r?n="pasted.txt":"kml"==r?n="pasted.kml":"json"==r&&(n="pasted.json"),n}static pasteEventHanlder(e,t){const n=this;if(n.getInputElement())return;n.blockEvent(e);const r=e.clipboardData,i=Array.from(r.types||[]).join(","),o=Array.from(r.items||[]);let s;if(i.includes("text/plain")){const e=r.getData("text/plain");if(":"===e[1])return t(e);if(nt(e))return t(e);const i=n.guessPasteTextToFileName(e);if(!i||"pasted.txt"===i)return t(e);{const t=new Blob([e]);s=[new File([t],i)]}}else s=o.map((function(e){return"file"==e.kind?e.getAsFile():null}));s=s.filter(Boolean),s.length?t(s):t(void 0)}static onPasteHandler(e,t=document){const n=this;st=t=>{n.pasteEventHanlder(t,e)},at.addHandler(t,"paste",st)}static offPasteHandler(e=document){st&&at.removeHandler(e,"paste",st)}static loadScript(e){var t=document.createElement("script");t.type="text/javascript",t.src=e,document.head.appendChild(t)}static loadJsCode(e){var t=document.createElement("script");t.type="text/javascript";try{t.appendChild(document.createTextNode(e))}catch(n){t.text=e}document.body.appendChild(t)}static deepCopy(e){return structuredClone(e)}}const lt=new Map,ct=function(e,t,n){ue.Config?.ServiceURL&&ue.Config?.ServiceURL.DefaultHproseAPI&&(ue.Config.DefaultHproseAPI=ue.Config?.ServiceURL.DefaultHproseAPI,ue.DefaultProxyClient=new xe(ue.Config?.ServiceURL.DefaultHproseAPI));const r=ue.Config.UI.GrayMode;r&&at.setGrayMode(r);const i=new ie(e,ue.EventBus);ue.Message=i,ue.SystemID=t,ue.SystemGroup=n,ue.EventBus.on(re.HproseServiceErrorEvent,(e=>{const t=`当前后台业务服务不可用!${e}`;console.warn("Hprose请求错误",t)})),ue.EventBus.on(re.WebAPIErrorEvent,(e=>{const t=`WebAPI后台服务不可用!${e}`;console.warn("WebAPI请求错误",t)})),ue.EventBus.on(re.AxiosRequestErrorEvent,(e=>{const t=`Http请求'${e.code}'错误: ${e.message}`;console.warn("Http请求错误",t)})),ue.EventBus.on(re.CommonWarnEvent,(e=>{i.warn(e)}))};function ut(e){if(e&&ge.isNotEmpty(e)){if(lt.has(e))return lt.get(e);{const t=new xe(e);return lt.set(e,t),t}}}function ht(e){const t=ut(e);return t&&(ue.DefaultProxyClient=t),t}class ft{constructor(e,t,n,r){if(this.layoutState=e,this._LayoutID=t,this._mapItemRefs=r,ue.RightWidgetConfigMap){const e=ue.RightWidgetConfigMap.get(t);e&&e.forEach((e=>{if(this.widgetConfigDiction.set(e.id,e),e.afterid)if(this.preConditionMap.has(e.afterid))this.preConditionMap.get(e.afterid)?.add(e);else{const t=new Set;t.add(e),this.preConditionMap.set(e.afterid,t)}}))}else{const e=ue.WidgetConfigList??n;e&&e.forEach((e=>{if(e.layoutID===t&&(this.widgetConfigDiction.set(e.id,e),e.afterid))if(this.preConditionMap.has(e.afterid))this.preConditionMap.get(e.afterid)?.add(e);else{const t=new Set;t.add(e),this.preConditionMap.set(e.afterid,t)}}))}}layoutMap=new Map;preConditionMap=new Map;widgetsLoadedSet=new Set;widgetConfigDiction=new Map;_LayoutID;_mapItemRefs;getLayoutID(){return this._LayoutID}getWidgetConfigMap(){return this.widgetConfigDiction}preloadWidgets(){if(this.widgetConfigDiction.size>0)for(const[e,t]of this.widgetConfigDiction)t.preload&&!t.afterid&&this._loadWidget(t)}async loadWidget(e){if(!e)return;let t;if(Oe(e)?t=e:je(e)&&(t=this.widgetConfigDiction.get(e)),t){if(t.afterid){if(this.isWidgetLoaded(t.afterid))return this._loadWidget(t);{let e=function(t){t.layoutID===n._LayoutID&&t.widgetID===r&&(n._loadWidget(i),ue.EventBus.off(re.WidgetLoadedEvent,e))};const n=this,r=t.afterid,i=t;return ue.EventBus.on(re.WidgetLoadedEvent,e),this.loadWidget(t.afterid)}}return this._loadWidget(t)}}loadOtherDependenceWidgets(e){if(this.preConditionMap.has(e)){const t=this.preConditionMap.get(e);t?.forEach((e=>{e.preload&&this._loadWidget(e)}))}}_loadWidget(e){if(!this.widgetsLoadedSet.has(e.id))return e.component?e.component().then((t=>{if(t.default){const n=m(t.default);n.id=e.id,e.layout&&(n.style=e.layout),e.cssClass&&(n.cssClass=e.cssClass),e.layoutID&&(n.layoutID=e.layoutID),e.label&&(n.label=e.label),e.jsURL&&(n.jsURL=e.jsURL),e.cssURL&&(n.cssURL=e.cssURL),n.componentProps=e.componentProps??{},this.getContainerComponents(e.container).value.set(e.id,n),this.widgetsLoadedSet.add(e.id),v().then((()=>{ue.EventBus.emit(re.WidgetLoadedEvent,{layoutID:this._LayoutID,widgetID:e.id}),this.loadOtherDependenceWidgets(e.id)}))}})).catch((t=>{ue.Logger().error("加载Widget失败!",e,t),ue.EventBus.emit(re.WidgetLoadedErrorEvent,e)})):void 0;this.changeWidgetVisible(e.id,!0)}hasDependentWidgets(e){let t=!1;if(this.preConditionMap.has(e)){const n=this.preConditionMap.get(e);if(n)for(const e of n)if(this.isWidgetLoaded(e.id)){t=!0;break}}return t}unloadWidget(e){if(!e)return;if(!this.isWidgetLoaded(e))return;const t=this.widgetConfigDiction.get(e);if(t){if(this.preConditionMap.has(e)){const t=this.preConditionMap.get(e);if(t)for(const e of t)this.unloadWidget(e.id)}this.getContainerComponents(t.container).value.delete(e),this.widgetsLoadedSet.delete(e),this._mapItemRefs&&this._mapItemRefs.delete(e),ue.EventBus.emit(re.WidgetUnLoadedEvent,{layoutID:this._LayoutID,widgetID:e})}}isWidgetLoaded(e){return this.widgetsLoadedSet.has(e)}splitTwoContainer(e=!1){const t=this.layoutState.centerMainContainer.value,n=this.layoutState.centerBackContainer.value;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 he.top:return this.layoutState.topContainer.value;case he.bottom:return this.layoutState.bottomContainer.value;case he.left:return this.layoutState.leftContainer.value;case he.right:return this.layoutState.rightContainer.value;case he.centerBack:return this.layoutState.centerBackContainer.value;case he.centerMain:return this.layoutState.centerMainContainer.value;case he.centerFront:return this.layoutState.centerFrontContainer.value}}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.changeVisible&&n.changeVisible(t)}isWidgetVisible(e){const t=this.getWidgetComponent(e);return!!t&&(!t.isShow||t.isShow.value)}getWidgetComponent(e){if(this.widgetsLoadedSet.has(e)&&this._mapItemRefs)return this._mapItemRefs.get(e)}getWigetItem(e){return this.widgetConfigDiction.get(e)}getGroupWigetItems(e){const t=[];for(const[n,r]of this.widgetConfigDiction)r.group===e&&t.push(r);return t}getContainerComponents(e){if(this.layoutMap.has(e))return this.layoutMap.get(e);{const n=t(new Map);return this.layoutMap.set(e,n),n}}getWidgetLoadedIDList(){const e=[];return this.widgetsLoadedSet.forEach((t=>{e.push(t)})),e}unloadAllWidgets(e){const t=[];this.widgetsLoadedSet.forEach((n=>{e&&e.length>0?e.findIndex((e=>e===n))<0&&t.push(n):t.push(n)})),t.forEach((e=>this.unloadWidget(e)))}unloadWidgets(e){e&&e.length>0&&e.forEach((e=>{this.unloadWidget(e)}))}static getLayoutManager(e,t){if(t){const n=t.find((t=>t.id===e));if(n&&n.layoutID)return ue.LayoutMap.get(n.layoutID)}}dispose(){this.unloadAllWidgets(),this.widgetConfigDiction.clear(),this.widgetsLoadedSet.clear(),this._LayoutID?ue.LayoutMap.delete(this._LayoutID):(ue.LayoutMap.delete(""),ue.LayoutManager=void 0)}}const dt=["id"],pt=fe(e({__name:"layout",props:{widgetConfig:{type:Array,required:!1,default:void 0},layoutID:{type:String,default:"layoutDefault"},layoutStyle:{type:Object},noLeft:{type:Boolean,default:!1},noRight:{type:Boolean,default:!1},noBottom:{type:Boolean,default:!1},noTop:{type:Boolean,default:!1},noFront:{type:Boolean,default:!1},noBack:{type:Boolean,default:!1},noMain:{type:Boolean,default:!1}},emits:["containerLoaded"],setup(e,{emit:n}){const o=e,s=n,l=o.layoutID,c=t(l),h=t(),p=t(),m=t(),v=t(),A=t(),_=t(),L=t(),R=y({top:!o.noTop,main:!o.noMain,back:!o.noBack,front:!o.noFront,left:!o.noLeft,right:!o.noRight,bottom:!o.noBottom});w((()=>o.noTop),(e=>{R.top=!e})),w((()=>o.noMain),(e=>{R.main=!e})),w((()=>o.noBack),(e=>{R.back=!e})),w((()=>o.noFront),(e=>{R.front=!e})),w((()=>o.noLeft),(e=>{R.left=!e})),w((()=>o.noRight),(e=>{R.right=!e})),w((()=>o.noBottom),(e=>{R.bottom=!e}));const I=new Map,D=(e,t)=>{e&&I.set(t,e)},P=new ft({topContainer:h,centerBackContainer:p,centerMainContainer:m,centerFrontContainer:v,bottomContainer:A,leftContainer:_,rightContainer:L},l,o.widgetConfig,I);function N(e){return P?.getContainerComponents(e).value}const O=void 0,B=b((()=>R.top?N(he.top):O)),F=b((()=>R.back?N(he.centerBack):O)),W=b((()=>R.front?N(he.centerFront):O)),U=b((()=>R.left?N(he.left):O)),j=b((()=>R.right?N(he.right):O)),$=b((()=>R.bottom?N(he.bottom):O)),H=b((()=>o.layoutStyle));return S((()=>{P&&(l?ue.LayoutMap.set(l,P):(ue.LayoutManager=P,ue.LayoutMap.set("",P)),s("containerLoaded",{layoutID:l,layoutManager:P}),ue.EventBus.emit(re.LayoutContainerLoaded,{layoutID:l,layoutManager:P}),P.preloadWidgets())})),C((()=>{P&&P.dispose()})),(e,t)=>(a(),E("div",{id:c.value,class:"layoutContainer",style:x(H.value)},[R.top?(a(),E("div",{key:0,ref_key:"topContainer",ref:h,class:"topContainer"},[r(e.$slots,"top",{},void 0,!0),(a(!0),E(k,null,M(B.value,(([e,t])=>(a(),i(g(t),{ref_for:!0,ref:t=>D(t,e),key:e,style:x(t.style),class:T(t.cssClass)},null,8,["style","class"])))),128))],512)):d("",!0),u("div",null,[R.main?(a(),E("div",{key:0,ref_key:"centerMainContainer",ref:m,class:"centerdiv mainContainer"},[r(e.$slots,"main",{},(()=>[f(pe)]),!0)],512)):d("",!0),R.back?(a(),E("div",{key:1,ref_key:"centerBackContainer",ref:p,class:"centerdiv backContainer"},[r(e.$slots,"back",{},void 0,!0),(a(!0),E(k,null,M(F.value,(([e,t])=>(a(),i(g(t),z({ref_for:!0,ref:t=>D(t,e),key:e,style:t.style,class:t.cssClass},{ref_for:!0},t.componentProps),null,16,["style","class"])))),128))],512)):d("",!0),R.front?(a(),E("div",{key:2,ref_key:"centerFrontContainer",ref:v,class:"centerdiv centerFrontContainer"},[r(e.$slots,"front",{},void 0,!0),(a(!0),E(k,null,M(W.value,(([e,t])=>(a(),i(g(t),z({ref_for:!0,ref:t=>D(t,e),key:e,style:t.style,class:t.cssClass},{ref_for:!0},t.componentProps),null,16,["style","class"])))),128))],512)):d("",!0),R.left?(a(),E("div",{key:3,ref_key:"leftContainer",ref:_,class:"leftContainer"},[r(e.$slots,"left",{},void 0,!0),(a(!0),E(k,null,M(U.value,(([e,t])=>(a(),i(g(t),z({ref_for:!0,ref:t=>D(t,e),key:e,style:t.style,class:t.cssClass},{ref_for:!0},t.componentProps),null,16,["style","class"])))),128))],512)):d("",!0),R.right?(a(),E("div",{key:4,ref_key:"rightContainer",ref:L,class:"rightContainer"},[r(e.$slots,"right",{},void 0,!0),(a(!0),E(k,null,M(j.value,(([e,t])=>(a(),i(g(t),z({ref_for:!0,ref:t=>D(t,e),key:e,style:t.style,class:t.cssClass},{ref_for:!0},t.componentProps),null,16,["style","class"])))),128))],512)):d("",!0)]),R.bottom?(a(),E("div",{key:1,ref_key:"bottomContainer",ref:A,class:"bottomContainer"},[r(e.$slots,"bottom",{},void 0,!0),(a(!0),E(k,null,M($.value,(([e,t])=>(a(),i(g(t),z({ref_for:!0,ref:t=>D(t,e),key:e,style:t.style,class:t.cssClass},{ref_for:!0},t.componentProps),null,16,["style","class"])))),128))],512)):d("",!0),r(e.$slots,"default",{},void 0,!0)],12,dt))}}),[["__scopeId","data-v-fcfa8ef0"]]),gt=e({name:"RouterTransition",__name:"RouterTransitionAnimate",props:{enterActive:{default:"animated fadeIn"},leaveActive:{default:"animated fadeOut"}},setup:e=>(t,n)=>{const r=h("router-view");return a(),i(de,null,{default:c((()=>[f(r,null,{default:c((({Component:t,route:n})=>[f(A,{appear:"","enter-active-class":e.enterActive,"leave-active-class":e.leaveActive},{default:c((()=>[(a(),i(p,null,[n.meta.keepAlive?(a(),i(g(t),{key:n.name})):d("",!0)],1024)),n.meta.keepAlive?d("",!0):(a(),i(g(t),{key:n.name}))])),_:2},1032,["enter-active-class","leave-active-class"])])),_:1})])),_:1})}});function mt(){let e=[];const t="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";for(var n=0;n<36;n++){const r=Math.floor(16*Math.random());e[n]=t.substring(r,r+1)}e[14]="4";const r=3&Number(e[19])|8;return e[19]=t.substring(r,r+1),e[8]=e[13]=e[18]=e[23]="-",e.join("").toLowerCase()}function vt(){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),("x"===t?n:3&n|8).toString(16)}))}var yt={},wt=Uint8Array,bt=Uint16Array,St=Int32Array,Ct=new wt([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Et=new wt([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),xt=new wt([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),kt=function(e,t){for(var n=new bt(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];var i=new St(n[30]);for(r=1;r<30;++r)for(var o=n[r];o<n[r+1];++o)i[o]=o-n[r]<<5|r;return{b:n,r:i}},Mt=kt(Ct,2),Tt=Mt.b,zt=Mt.r;Tt[28]=258,zt[258]=28;for(var At=kt(Et,0),_t=At.b,Lt=At.r,Rt=new bt(32768),It=0;It<32768;++It){var Dt=(43690&It)>>1|(21845&It)<<1;Dt=(61680&(Dt=(52428&Dt)>>2|(13107&Dt)<<2))>>4|(3855&Dt)<<4,Rt[It]=((65280&Dt)>>8|(255&Dt)<<8)>>1}var Pt=function(e,t,n){for(var r=e.length,i=0,o=new bt(t);i<r;++i)e[i]&&++o[e[i]-1];var s,a=new bt(t);for(i=1;i<t;++i)a[i]=a[i-1]+o[i-1]<<1;if(n){s=new bt(1<<t);var l=15-t;for(i=0;i<r;++i)if(e[i])for(var c=i<<4|e[i],u=t-e[i],h=a[e[i]-1]++<<u,f=h|(1<<u)-1;h<=f;++h)s[Rt[h]>>l]=c}else for(s=new bt(r),i=0;i<r;++i)e[i]&&(s[i]=Rt[a[e[i]-1]++]>>15-e[i]);return s},Nt=new wt(288);for(It=0;It<144;++It)Nt[It]=8;for(It=144;It<256;++It)Nt[It]=9;for(It=256;It<280;++It)Nt[It]=7;for(It=280;It<288;++It)Nt[It]=8;var Ot=new wt(32);for(It=0;It<32;++It)Ot[It]=5;var Bt=Pt(Nt,9,0),Ft=Pt(Nt,9,1),Wt=Pt(Ot,5,0),Ut=Pt(Ot,5,1),jt=function(e){for(var t=e[0],n=1;n<e.length;++n)e[n]>t&&(t=e[n]);return t},$t=function(e,t,n){var r=t/8|0;return(e[r]|e[r+1]<<8)>>(7&t)&n},Ht=function(e,t){var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(7&t)},Gt=function(e){return(e+7)/8|0},qt=function(e,t,n){return(null==t||t<0)&&(t=0),(null==n||n>e.length)&&(n=e.length),new wt(e.subarray(t,n))},Xt=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],Vt=function(e,t,n){var r=new Error(t||Xt[e]);if(r.code=e,Error.captureStackTrace&&Error.captureStackTrace(r,Vt),!n)throw r;return r},Zt=function(e,t,n,r){var i=e.length,o=r?r.length:0;if(!i||t.f&&!t.l)return n||new wt(0);var s=!n,a=s||2!=t.i,l=t.i;s&&(n=new wt(3*i));var c=function(e){var t=n.length;if(e>t){var r=new wt(Math.max(2*t,e));r.set(n),n=r}},u=t.f||0,h=t.p||0,f=t.b||0,d=t.l,p=t.d,g=t.m,m=t.n,v=8*i;do{if(!d){u=$t(e,h,1);var y=$t(e,h+1,3);if(h+=3,!y){var w=e[(_=Gt(h)+4)-4]|e[_-3]<<8,b=_+w;if(b>i){l&&Vt(0);break}a&&c(f+w),n.set(e.subarray(_,b),f),t.b=f+=w,t.p=h=8*b,t.f=u;continue}if(1==y)d=Ft,p=Ut,g=9,m=5;else if(2==y){var S=$t(e,h,31)+257,C=$t(e,h+10,15)+4,E=S+$t(e,h+5,31)+1;h+=14;for(var x=new wt(E),k=new wt(19),M=0;M<C;++M)k[xt[M]]=$t(e,h+3*M,7);h+=3*C;var T=jt(k),z=(1<<T)-1,A=Pt(k,T,1);for(M=0;M<E;){var _,L=A[$t(e,h,z)];if(h+=15&L,(_=L>>4)<16)x[M++]=_;else{var R=0,I=0;for(16==_?(I=3+$t(e,h,3),h+=2,R=x[M-1]):17==_?(I=3+$t(e,h,7),h+=3):18==_&&(I=11+$t(e,h,127),h+=7);I--;)x[M++]=R}}var D=x.subarray(0,S),P=x.subarray(S);g=jt(D),m=jt(P),d=Pt(D,g,1),p=Pt(P,m,1)}else Vt(1);if(h>v){l&&Vt(0);break}}a&&c(f+131072);for(var N=(1<<g)-1,O=(1<<m)-1,B=h;;B=h){var F=(R=d[Ht(e,h)&N])>>4;if((h+=15&R)>v){l&&Vt(0);break}if(R||Vt(2),F<256)n[f++]=F;else{if(256==F){B=h,d=null;break}var W=F-254;if(F>264){var U=Ct[M=F-257];W=$t(e,h,(1<<U)-1)+Tt[M],h+=U}var j=p[Ht(e,h)&O],$=j>>4;if(j||Vt(3),h+=15&j,P=_t[$],$>3&&(U=Et[$],P+=Ht(e,h)&(1<<U)-1,h+=U),h>v){l&&Vt(0);break}a&&c(f+131072);var H=f+W;if(f<P){var G=o-P,q=Math.min(P,H);for(G+f<0&&Vt(3);f<q;++f)n[f]=r[G+f]}for(;f<H;++f)n[f]=n[f-P]}}t.l=d,t.p=B,t.b=f,t.f=u,d&&(u=1,t.m=g,t.d=p,t.n=m)}while(!u);return f!=n.length&&s?qt(n,0,f):n.subarray(0,f)},Kt=function(e,t,n){n<<=7&t;var r=t/8|0;e[r]|=n,e[r+1]|=n>>8},Yt=function(e,t,n){n<<=7&t;var r=t/8|0;e[r]|=n,e[r+1]|=n>>8,e[r+2]|=n>>16},Jt=function(e,t){for(var n=[],r=0;r<e.length;++r)e[r]&&n.push({s:r,f:e[r]});var i=n.length,o=n.slice();if(!i)return{t:sn,l:0};if(1==i){var s=new wt(n[0].s+1);return s[n[0].s]=1,{t:s,l:1}}n.sort((function(e,t){return e.f-t.f})),n.push({s:-1,f:25001});var a=n[0],l=n[1],c=0,u=1,h=2;for(n[0]={s:-1,f:a.f+l.f,l:a,r:l};u!=i-1;)a=n[n[c].f<n[h].f?c++:h++],l=n[c!=u&&n[c].f<n[h].f?c++:h++],n[u++]={s:-1,f:a.f+l.f,l:a,r:l};var f=o[0].s;for(r=1;r<i;++r)o[r].s>f&&(f=o[r].s);var d=new bt(f+1),p=Qt(n[u-1],d,0);if(p>t){r=0;var g=0,m=p-t,v=1<<m;for(o.sort((function(e,t){return d[t.s]-d[e.s]||e.f-t.f}));r<i;++r){var y=o[r].s;if(!(d[y]>t))break;g+=v-(1<<p-d[y]),d[y]=t}for(g>>=m;g>0;){var w=o[r].s;d[w]<t?g-=1<<t-d[w]++-1:++r}for(;r>=0&&g;--r){var b=o[r].s;d[b]==t&&(--d[b],++g)}p=t}return{t:new wt(d),l:p}},Qt=function(e,t,n){return-1==e.s?Math.max(Qt(e.l,t,n+1),Qt(e.r,t,n+1)):t[e.s]=n},en=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new bt(++t),r=0,i=e[0],o=1,s=function(e){n[r++]=e},a=1;a<=t;++a)if(e[a]==i&&a!=t)++o;else{if(!i&&o>2){for(;o>138;o-=138)s(32754);o>2&&(s(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(s(i),--o;o>6;o-=6)s(8304);o>2&&(s(o-3<<5|8208),o=0)}for(;o--;)s(i);o=1,i=e[a]}return{c:n.subarray(0,r),n:t}},tn=function(e,t){for(var n=0,r=0;r<t.length;++r)n+=e[r]*t[r];return n},nn=function(e,t,n){var r=n.length,i=Gt(t+2);e[i]=255&r,e[i+1]=r>>8,e[i+2]=255^e[i],e[i+3]=255^e[i+1];for(var o=0;o<r;++o)e[i+o+4]=n[o];return 8*(i+4+r)},rn=function(e,t,n,r,i,o,s,a,l,c,u){Kt(t,u++,n),++i[256];for(var h=Jt(i,15),f=h.t,d=h.l,p=Jt(o,15),g=p.t,m=p.l,v=en(f),y=v.c,w=v.n,b=en(g),S=b.c,C=b.n,E=new bt(19),x=0;x<y.length;++x)++E[31&y[x]];for(x=0;x<S.length;++x)++E[31&S[x]];for(var k=Jt(E,7),M=k.t,T=k.l,z=19;z>4&&!M[xt[z-1]];--z);var A,_,L,R,I=c+5<<3,D=tn(i,Nt)+tn(o,Ot)+s,P=tn(i,f)+tn(o,g)+s+14+3*z+tn(E,M)+2*E[16]+3*E[17]+7*E[18];if(l>=0&&I<=D&&I<=P)return nn(t,u,e.subarray(l,l+c));if(Kt(t,u,1+(P<D)),u+=2,P<D){A=Pt(f,d,0),_=f,L=Pt(g,m,0),R=g;var N=Pt(M,T,0);for(Kt(t,u,w-257),Kt(t,u+5,C-1),Kt(t,u+10,z-4),u+=14,x=0;x<z;++x)Kt(t,u+3*x,M[xt[x]]);u+=3*z;for(var O=[y,S],B=0;B<2;++B){var F=O[B];for(x=0;x<F.length;++x){var W=31&F[x];Kt(t,u,N[W]),u+=M[W],W>15&&(Kt(t,u,F[x]>>5&127),u+=F[x]>>12)}}}else A=Bt,_=Nt,L=Wt,R=Ot;for(x=0;x<a;++x){var U=r[x];if(U>255){Yt(t,u,A[257+(W=U>>18&31)]),u+=_[W+257],W>7&&(Kt(t,u,U>>23&31),u+=Ct[W]);var j=31&U;Yt(t,u,L[j]),u+=R[j],j>3&&(Yt(t,u,U>>5&8191),u+=Et[j])}else Yt(t,u,A[U]),u+=_[U]}return Yt(t,u,A[256]),u+_[256]},on=new St([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),sn=new wt(0),an=function(e,t,n,r,i,o){var s=o.z||e.length,a=new wt(r+s+5*(1+Math.ceil(s/7e3))+i),l=a.subarray(r,a.length-i),c=o.l,u=7&(o.r||0);if(t){u&&(l[0]=o.r>>3);for(var h=on[t-1],f=h>>13,d=8191&h,p=(1<<n)-1,g=o.p||new bt(32768),m=o.h||new bt(p+1),v=Math.ceil(n/3),y=2*v,w=function(t){return(e[t]^e[t+1]<<v^e[t+2]<<y)&p},b=new St(25e3),S=new bt(288),C=new bt(32),E=0,x=0,k=o.i||0,M=0,T=o.w||0,z=0;k+2<s;++k){var A=w(k),_=32767&k,L=m[A];if(g[_]=L,m[A]=_,T<=k){var R=s-k;if((E>7e3||M>24576)&&(R>423||!c)){u=rn(e,l,0,b,S,C,x,M,z,k-z,u),M=E=x=0,z=k;for(var I=0;I<286;++I)S[I]=0;for(I=0;I<30;++I)C[I]=0}var D=2,P=0,N=d,O=_-L&32767;if(R>2&&A==w(k-O))for(var B=Math.min(f,R)-1,F=Math.min(32767,k),W=Math.min(258,R);O<=F&&--N&&_!=L;){if(e[k+D]==e[k+D-O]){for(var U=0;U<W&&e[k+U]==e[k+U-O];++U);if(U>D){if(D=U,P=O,U>B)break;var j=Math.min(O,U-2),$=0;for(I=0;I<j;++I){var H=k-O+I&32767,G=H-g[H]&32767;G>$&&($=G,L=H)}}}O+=(_=L)-(L=g[_])&32767}if(P){b[M++]=268435456|zt[D]<<18|Lt[P];var q=31&zt[D],X=31&Lt[P];x+=Ct[q]+Et[X],++S[257+q],++C[X],T=k+D,++E}else b[M++]=e[k],++S[e[k]]}}for(k=Math.max(k,T);k<s;++k)b[M++]=e[k],++S[e[k]];u=rn(e,l,c,b,S,C,x,M,z,k-z,u),c||(o.r=7&u|l[u/8|0]<<3,u-=7,o.h=m,o.p=g,o.i=k,o.w=T)}else{for(k=o.w||0;k<s+c;k+=65535){var V=k+65535;V>=s&&(l[u/8|0]=c,V=s),u=nn(l,u+1,e.subarray(k,V))}o.i=s}return qt(a,0,r+Gt(u)+i)},ln=function(){for(var e=new Int32Array(256),t=0;t<256;++t){for(var n=t,r=9;--r;)n=(1&n&&-306674912)^n>>>1;e[t]=n}return e}(),cn=function(){var e=-1;return{p:function(t){for(var n=e,r=0;r<t.length;++r)n=ln[255&n^t[r]]^n>>>8;e=n},d:function(){return~e}}},un=function(e,t,n,r,i){if(!i&&(i={l:1},t.dictionary)){var o=t.dictionary.subarray(-32768),s=new wt(o.length+e.length);s.set(o),s.set(e,o.length),e=s,i.w=o.length}return an(e,null==t.level?6:t.level,null==t.mem?i.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):20:12+t.mem,n,r,i)},hn=function(e,t){var n={};for(var r in e)n[r]=e[r];for(var r in t)n[r]=t[r];return n},fn=function(e,t,n){for(var r=e(),i=e.toString(),o=i.slice(i.indexOf("[")+1,i.lastIndexOf("]")).replace(/\s+/g,"").split(","),s=0;s<r.length;++s){var a=r[s],l=o[s];if("function"==typeof a){t+=";"+l+"=";var c=a.toString();if(a.prototype)if(-1!=c.indexOf("[native code]")){var u=c.indexOf(" ",8)+1;t+=c.slice(u,c.indexOf("(",u))}else for(var h in t+=c,a.prototype)t+=";"+l+".prototype."+h+"="+a.prototype[h].toString();else t+=c}else n[l]=a}return t},dn=[],pn=function(){return[wt,bt,St,Ct,Et,xt,Tt,_t,Ft,Ut,Rt,Xt,Pt,jt,$t,Ht,Gt,qt,Vt,Zt,_n,yn,wn]},gn=function(){return[wt,bt,St,Ct,Et,xt,zt,Lt,Bt,Nt,Wt,Ot,Rt,on,sn,Pt,Kt,Yt,Jt,Qt,en,tn,nn,rn,Gt,qt,an,un,An,yn]},mn=function(){return[kn,zn,xn,cn,ln]},vn=function(){return[Mn,Tn]},yn=function(e){return postMessage(e,[e.buffer])},wn=function(e){return e&&{out:e.size&&new wt(e.size),dictionary:e.dictionary}},bn=function(e,t,n,r,i,o){var s=function(e,t,n,r){if(!dn[n]){for(var i="",o={},s=e.length-1,a=0;a<s;++a)i=fn(e[a],i,o);dn[n]={c:fn(e[s],i,o),e:o}}var l=hn({},dn[n].e);return function(e,t,n,r,i){var o=new Worker(yt[t]||(yt[t]=URL.createObjectURL(new Blob([e+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return o.onmessage=function(e){var t=e.data,n=t.$e$;if(n){var r=new Error(n[0]);r.code=n[1],r.stack=n[2],i(r,null)}else i(null,t)},o.postMessage(n,r),o}(dn[n].c+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+t.toString()+"}",n,l,function(e){var t=[];for(var n in e)e[n].buffer&&t.push((e[n]=new e[n].constructor(e[n])).buffer);return t}(l),r)}(n,r,i,(function(e,t){s.terminate(),o(e,t)}));return s.postMessage([e,t],t.consume?[e.buffer]:[]),function(){s.terminate()}},Sn=function(e,t){return e[t]|e[t+1]<<8},Cn=function(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0},En=function(e,t){return Cn(e,t)+4294967296*Cn(e,t+4)},xn=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8},kn=function(e,t){var n=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=t.level<2?4:9==t.level?2:0,e[9]=3,0!=t.mtime&&xn(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),n){e[3]=8;for(var r=0;r<=n.length;++r)e[r+10]=n.charCodeAt(r)}},Mn=function(e){31==e[0]&&139==e[1]&&8==e[2]||Vt(6,"invalid gzip data");var t=e[3],n=10;4&t&&(n+=2+(e[10]|e[11]<<8));for(var r=(t>>3&1)+(t>>4&1);r>0;r-=!e[n++]);return n+(2&t)},Tn=function(e){var t=e.length;return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0},zn=function(e){return 10+(e.filename?e.filename.length+1:0)};function An(e,t){return un(e,t||{},0,0)}function _n(e,t){return Zt(e,{i:2},t&&t.out,t&&t.dictionary)}function Ln(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&Vt(7),bn(e,t,[gn,mn,function(){return[Rn]}],(function(e){return yn(Rn(e.data[0],e.data[1]))}),2,n)}function Rn(e,t){t||(t={});var n=cn(),r=e.length;n.p(e);var i=un(e,t,zn(t),8),o=i.length;return kn(i,t),xn(i,o-8,n.d()),xn(i,o-4,r),i}function In(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&Vt(7),bn(e,t,[pn,vn,function(){return[Dn]}],(function(e){return yn(Dn(e.data[0],e.data[1]))}),3,n)}function Dn(e,t){var n=Mn(e);return n+8>e.length&&Vt(6,"invalid gzip data"),Zt(e.subarray(n,-8),{i:2},t&&t.out||new wt(Tn(e)),t&&t.dictionary)}var Pn=function(e,t,n,r){for(var i in e){var o=e[i],s=t+i,a=r;Array.isArray(o)&&(a=hn(r,o[1]),o=o[0]),o instanceof wt?n[s]=[o,a]:(n[s+="/"]=[new wt(0),a],Pn(o,s,n,r))}},Nn="undefined"!=typeof TextEncoder&&new TextEncoder,On="undefined"!=typeof TextDecoder&&new TextDecoder;try{On.decode(sn,{stream:!0})}catch(e){}function Bn(e,t){if(Nn)return Nn.encode(e);for(var n=e.length,r=new wt(e.length+(e.length>>1)),i=0,o=function(e){r[i++]=e},s=0;s<n;++s){if(i+5>r.length){var a=new wt(i+8+(n-s<<1));a.set(r),r=a}var l=e.charCodeAt(s);l<128||t?o(l):l<2048?(o(192|l>>6),o(128|63&l)):l>55295&&l<57344?(o(240|(l=65536+(1047552&l)|1023&e.charCodeAt(++s))>>18),o(128|l>>12&63),o(128|l>>6&63),o(128|63&l)):(o(224|l>>12),o(128|l>>6&63),o(128|63&l))}return qt(r,0,i)}function Fn(e,t){if(t){for(var n="",r=0;r<e.length;r+=16384)n+=String.fromCharCode.apply(null,e.subarray(r,r+16384));return n}if(On)return On.decode(e);var i=function(e){for(var t="",n=0;;){var r=e[n++],i=(r>127)+(r>223)+(r>239);if(n+i>e.length)return{s:t,r:qt(e,n-1)};i?3==i?(r=((15&r)<<18|(63&e[n++])<<12|(63&e[n++])<<6|63&e[n++])-65536,t+=String.fromCharCode(55296|r>>10,56320|1023&r)):t+=1&i?String.fromCharCode((31&r)<<6|63&e[n++]):String.fromCharCode((15&r)<<12|(63&e[n++])<<6|63&e[n++]):t+=String.fromCharCode(r)}}(e),o=i.s;return(n=i.r).length&&Vt(8),o}var Wn=function(e,t){return t+30+Sn(e,t+26)+Sn(e,t+28)},Un=function(e,t,n){var r=Sn(e,t+28),i=Fn(e.subarray(t+46,t+46+r),!(2048&Sn(e,t+8))),o=t+46+r,s=Cn(e,t+20),a=n&&4294967295==s?jn(e,o):[s,Cn(e,t+24),Cn(e,t+42)],l=a[0],c=a[1],u=a[2];return[Sn(e,t+10),l,c,i,o+Sn(e,t+30)+Sn(e,t+32),u]},jn=function(e,t){for(;1!=Sn(e,t);t+=4+Sn(e,t+2));return[En(e,t+12),En(e,t+4),En(e,t+20)]},$n=function(e){var t=0;if(e)for(var n in e){var r=e[n].length;r>65535&&Vt(9),t+=r+4}return t},Hn=function(e,t,n,r,i,o,s,a){var l=r.length,c=n.extra,u=a&&a.length,h=$n(c);xn(e,t,null!=s?33639248:67324752),t+=4,null!=s&&(e[t++]=20,e[t++]=n.os),e[t]=20,t+=2,e[t++]=n.flag<<1|(o<0&&8),e[t++]=i&&8,e[t++]=255&n.compression,e[t++]=n.compression>>8;var f=new Date(null==n.mtime?Date.now():n.mtime),d=f.getFullYear()-1980;if((d<0||d>119)&&Vt(10),xn(e,t,d<<25|f.getMonth()+1<<21|f.getDate()<<16|f.getHours()<<11|f.getMinutes()<<5|f.getSeconds()>>1),t+=4,-1!=o&&(xn(e,t,n.crc),xn(e,t+4,o<0?-o-2:o),xn(e,t+8,n.size)),xn(e,t+12,l),xn(e,t+14,h),t+=16,null!=s&&(xn(e,t,u),xn(e,t+6,n.attrs),xn(e,t+10,s),t+=14),e.set(r,t),t+=l,h)for(var p in c){var g=c[p],m=g.length;xn(e,t,+p),xn(e,t+2,m),e.set(g,t+4),t+=4+m}return u&&(e.set(a,t),t+=u),t},Gn=function(e,t,n,r,i){xn(e,t,101010256),xn(e,t+8,n),xn(e,t+10,n),xn(e,t+12,r),xn(e,t+16,i)};var qn="function"==typeof queueMicrotask?queueMicrotask:"function"==typeof setTimeout?setTimeout:function(e){e()};function Xn(e){var t={filename:"",directory:"",basename:"",extension:""},n=function(e){return-1==e.indexOf("/")&&-1!=e.indexOf("\\")?"\\":"/"}(e),r=e.split(n),i=r.pop(),o=/\.([a-z][a-z0-9]*)$/i,s=o.test(i)?o.exec(i)[0]:"";return s||i.includes("*")?(t.filename=i,t.extension=s?s.slice(1):"",t.basename=i.slice(0,i.length-s.length),t.directory=r.join(n)):t.directory=i?e:r.join(n),t}function Vn(e){return Xn(e).basename}function Zn(e){return Xn(e).extension}function Kn(e){var t=Xn(e);return t.extension?e.slice(0,e.length-t.extension.length-1):e}function Yn(e,t){var n=Kn(e);return t?n+"."+t:n}function Jn(e){var t=Zn(e);return t?Kn(e)+"."+t.toLowerCase():e}function Qn(e){return e.reduce((function(e,t,n){return 0===n?Vn(t):er(e,t)}),"")}function er(e,t){var n;return e&&t&&(n=tr(e,t).replace(/[-_]$/,"")),n||""}function tr(e,t){for(var n=0,r=e.length;n<r&&e[n]===t[n];n++);return e.substr(0,n)}const nr=(e,t)=>{rr(e,t)};function rr(e,t){const n=globalThis.URL||globalThis.webkitURL||window,r=new Blob([e]),i=n.createObjectURL(r),o=document.createElement("a");o.href=i,o.download=t,document.body.appendChild(o),o.click(),n.revokeObjectURL(i),setTimeout((function(){n.revokeObjectURL(i),document.body.removeChild(o)}),400)}const ir=(e,t)=>{const n=JSON.stringify(e,null,2);t?nr(n,t+".json"):K.emit(re.CommonWarnEvent,"参数JsonID不能为空!")},or=(e,t,n)=>{e.get(t,{responseType:"blob"}).then((function(e){nr(e.data,n)})).catch((e=>{console.warn(e),K.emit(re.CommonWarnEvent,"下载文件报错!")}))};async function sr(e,t,n){var r,i=function(e){var t=Zn(e).toLowerCase(),n={};return"kml"==t?n["application/vnd.google-earth.kml+xml"]=[".kml"]:"svg"===t?n["image/svg+xml"]=[".svg"]:"zip"===t?n["application/zip"]=[".zip"]:"txt"===t||"csv"===t||"tsv"===t||"tab"===t?n["text/csv"]=[".csv",".tsv",".tab",".txt"]:"json"===t||"geojson"===t||"topojson"===t?n["application/json"]=[".json",".geojson",".topojson"]:n["application/octet-stream"]=["."+t],{suggestedName:e,types:[{description:"Files",accept:n}]}}(e);try{if(globalThis.showSaveFilePicker){r=await globalThis.showSaveFilePicker(i);var o=await r.createWritable();await o.write(t),await o.close()}}catch(e){return void("SecurityError"==e.name?(console.warn(e.message),n(e.message)):"AbortError"==e.name?n():(console.error(e.name,e.message,e),n("Save failed for an unknown reason")))}n()}class ar{static runningInBrowser(){return"undefined"!=typeof window&&void 0!==globalThis.document}static encodeGBK(e){const t=G.encode(e,"ISO-8859-1");return G.decode(t,"gbk")}static async saveZipFromFiles(e,t){const n=[];for(let r=0;r<t.length;r++){const e=t[r],i=e.name,o=await at.readFilePromise(e,"ArrayBuffer"),s=new Uint8Array(o);n.push({filename:i,content:s})}n.length>0&&ar.zipAsync(n,(function(t,n){if(t)throw t;rr(new Blob([n]),e)}))}static saveZipFile(e,t){ar.zipAsync(t,(function(t,n){if(t)throw t;rr(new Blob([n]),e)}))}static saveZipFileSync(e,t){const n=ar.zipSync(t);return!!n&&(rr(new Blob([n]),e),!0)}static unzipSync(e){let t;if(t=e instanceof ArrayBuffer?new Uint8Array(e):e,!ar.runningInBrowser())return;const n=function(e,t){for(var n={},r=e.length-22;101010256!=Cn(e,r);--r)(!r||e.length-r>65558)&&Vt(13);var i=Sn(e,r+8);if(!i)return{};var o=Cn(e,r+16),s=4294967295==o||65535==i;if(s){var a=Cn(e,r-12);(s=101075792==Cn(e,a))&&(i=Cn(e,a+32),o=Cn(e,a+48))}for(var l=t&&t.filter,c=0;c<i;++c){var u=Un(e,o,s),h=u[0],f=u[1],d=u[2],p=u[3],g=u[4],m=u[5],v=Wn(e,m);o=g,l&&!l({name:p,size:f,originalSize:d,compression:h})||(h?8==h?n[p]=_n(e.subarray(v,v+f),{out:new wt(d)}):Vt(14,"unknown compression type "+h):n[p]=qt(e,v,v+f))}return n}(t,{filter:ar.fflateFilter});return ar.fflatePostprocess(n)}static async readZipFromFile(e){const t={content:await at.readFilePromise(e,"ArrayBuffer"),name:e.name};return ar.readZipFile(t)}static async readZipFile(e){const t=await ar.unzipAsync.promise(e.content);return Object.keys(t).reduce((function(e,n){return e.push({filename:n,content:t[n]}),e}),[])}static unzipAsync(e,t){if(!ar.runningInBrowser())throw new Error("Async unzipping only supported in the browser");let n;n=e instanceof ArrayBuffer?new Uint8Array(e):e,function(e,t,n){n||(n=t,t={}),"function"!=typeof n&&Vt(7);var r=[],i=function(){for(var e=0;e<r.length;++e)r[e]()},o={},s=function(e,t){qn((function(){n(e,t)}))};qn((function(){s=n}));for(var a=e.length-22;101010256!=Cn(e,a);--a)if(!a||e.length-a>65558)return s(Vt(13,0,1),null),i;var l=Sn(e,a+8);if(l){var c=l,u=Cn(e,a+16),h=4294967295==u||65535==c;if(h){var f=Cn(e,a-12);(h=101075792==Cn(e,f))&&(c=l=Cn(e,f+32),u=Cn(e,f+48))}for(var d=t&&t.filter,p=function(t){var n=Un(e,u,h),a=n[0],c=n[1],f=n[2],p=n[3],g=n[4],m=n[5],v=Wn(e,m);u=g;var y=function(e,t){e?(i(),s(e,null)):(t&&(o[p]=t),--l||s(null,o))};if(!d||d({name:p,size:c,originalSize:f,compression:a}))if(a)if(8==a){var w=e.subarray(v,v+c);if(f<524288||c>.8*f)try{y(null,_n(w,{out:new wt(f)}))}catch(e){y(e,null)}else r.push(function(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&Vt(7),bn(e,t,[pn],(function(e){return yn(_n(e.data[0],wn(e.data[1])))}),1,n)}(w,{size:f},y))}else y(Vt(14,"unknown compression type "+a,1),null);else y(null,qt(e,v,v+c));else y(null,null)},g=0;g<c;++g)p()}else s(null,{})}(n,{filter:ar.fflateFilter},(function(e,n){e&&t(e),t(null,ar.fflatePostprocess(n))}))}static zipSync(e){if(!ar.runningInBrowser())throw new Error("Async zipping only supported in the browser");return function(e,t){t||(t={});var n={},r=[];Pn(e,"",n,t);var i=0,o=0;for(var s in n){var a=n[s],l=a[0],c=a[1],u=0==c.level?0:8,h=(E=Bn(s)).length,f=c.comment,d=f&&Bn(f),p=d&&d.length,g=$n(c.extra);h>65535&&Vt(11);var m=u?An(l,c):l,v=m.length,y=cn();y.p(l),r.push(hn(c,{size:l.length,crc:y.d(),c:m,f:E,m:d,u:h!=s.length||d&&f.length!=p,o:i,compression:u})),i+=30+h+g+v,o+=76+2*(h+g)+(p||0)+v}for(var w=new wt(o+22),b=i,S=o-i,C=0;C<r.length;++C){var E=r[C];Hn(w,E.o,E,E.f,E.u,E.c.length);var x=30+E.f.length+$n(E.extra);w.set(E.c,E.o+x),Hn(w,i,E,E.f,E.u,E.c.length,E.o,E.m),i+=16+x+(E.m?E.m.length:0)}return Gn(w,i,r.length,S,b),w}(ar.fflatePreprocess(e))}static zipAsync(e,t){!function(e,t,n){n||(n=t,t={}),"function"!=typeof n&&Vt(7);var r={};Pn(e,"",r,t);var i=Object.keys(r),o=i.length,s=0,a=0,l=o,c=new Array(o),u=[],h=function(){for(var e=0;e<u.length;++e)u[e]()},f=function(e,t){qn((function(){n(e,t)}))};qn((function(){f=n}));var d=function(){var e=new wt(a+22),t=s,n=a-s;a=0;for(var r=0;r<l;++r){var i=c[r];try{var o=i.c.length;Hn(e,a,i,i.f,i.u,o);var u=30+i.f.length+$n(i.extra),h=a+u;e.set(i.c,h),Hn(e,s,i,i.f,i.u,o,a,i.m),s+=16+u+(i.m?i.m.length:0),a=h+o}catch(e){return f(e,null)}}Gn(e,s,c.length,n,t),f(null,e)};o||d();for(var p=function(e){var t=i[e],n=r[t],l=n[0],p=n[1],g=cn(),m=l.length;g.p(l);var v=Bn(t),y=v.length,w=p.comment,b=w&&Bn(w),S=b&&b.length,C=$n(p.extra),E=0==p.level?0:8,x=function(n,r){if(n)h(),f(n,null);else{var i=r.length;c[e]=hn(p,{size:m,crc:g.d(),c:r,f:v,m:b,u:y!=t.length||b&&w.length!=S,compression:E}),s+=30+y+C+i,a+=76+2*(y+C)+(S||0)+i,--o||d()}};if(y>65535&&x(Vt(11,0,1),null),E)if(m<16e4)try{x(null,An(l,p))}catch(e){x(e,null)}else u.push(function(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&Vt(7),bn(e,t,[gn],(function(e){return yn(An(e.data[0],e.data[1]))}),0,n)}(l,p,x));else x(null,l)},g=0;g<l;++g)p(g)}(ar.fflatePreprocess(e),{},t)}static fflateFilter(e){return ar.isImportableZipPath(e.name)}static fflatePostprocess(e){return Object.keys(e).reduce((function(t,n){const r=Xn(n).filename,i=ar.encodeGBK(r),o=e[n];return t[i]=o,t}),{})}static isImportableZipPath(e){const t=Xn(e),n=Zn(e).toLowerCase();return"gz"!=n&&"zip"!=n&&!/^__MACOSX/.test(e)&&"."!=t.filename[0]}static fflatePreprocess(e){const t={};return e.forEach((e=>{"string"==typeof e.content?e.content=Bn(e.content):e.content instanceof ArrayBuffer&&(e.content=new Uint8Array(e.content)),t[e.filename]=e.content})),t}}class lr{static runningInBrowser(){return"undefined"!=typeof window&&void 0!==window.document}static isGzipped(e){return e.length>2&&e.buffer instanceof ArrayBuffer&&31==e[0]&&139==e[1]}static gzipSync(e,t){return"string"==typeof e&&(e=Bn(e)),lr.runningInBrowser()?Rn(e,t):void 0}static async gzipAsync(e,t){let n;if("string"==typeof e&&(n=Bn(e)),lr.runningInBrowser())return at.promisify(Ln)(n,t)}static async readGzipFromFile(e){const t={content:await at.readFilePromise(e,"ArrayBuffer"),name:e.name};return lr.readGzipFile(t)}static readGzipFile(e){var t=e.name.replace(/\.gz$/,"");return[{name:t,content:lr.gunzipSync(e.content,t)}]}static async gunzipAsync(e,t){if(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),t=t||{},!lr.runningInBrowser())return;var n=at.promisify(In);let r=await n(e,t);return t.filename&&(r=Fn(r)),r}static gunzipSync(e,t){e instanceof ArrayBuffer&&(e=new Uint8Array(e));let n=Dn(e);return t&&(n=Fn(n)),n}}class cr{static formatToDate(e,t="YYYY-MM-DD"){let n=new Date;if(e&&(je(e)||Fe(e)?n=new Date(e):Oe(e)&&(n=e),!n))throw"date对象为空";const r=n.getFullYear(),i=String(n.getMonth()+1).padStart(2,"0"),o=String(n.getDate()).padStart(2,"0");return t.replace("YYYY",String(r)).replace("MM",i).replace("DD",o)}static formatToTime(e,t="HH:mm:ss"){let n=new Date;if(e&&(je(e)||Fe(e)?n=new Date(e):Oe(e)&&(n=e),!n))throw"date对象为空";const r=String(n.getHours()).padStart(2,"0"),i=String(n.getMinutes()).padStart(2,"0"),o=String(n.getSeconds()).padStart(2,"0");return t.replace("HH",r).replace("mm",i).replace("ss",o)}static formatToDateTime(e,t="YYYY-MM-DD HH:mm:ss"){let n=new Date;if(e&&(je(e)||Fe(e)?n=new Date(e):Oe(e)&&(n=e),!n))throw"date对象为空";return this.formatToDate(n,t.split(" ")[0])+" "+this.formatToTime(n,t.split(" ")[1])}static formatStringDateTime(e){let t=`${e.substring(0,4)}-${e.substring(4,6)}-${e.substring(6,8)}`;return 14===e.length&&(t=`${t} ${e.substring(8,10)}:${e.substring(10,12)}:${e.substring(12,14)}`),t}}let ur=!0;try{String.fromCharCode.apply(String,[1,2])}catch(e){ur=!1,Object.defineProperty(Array.prototype,"subarray",{value:Array.prototype.slice})}var hr=2654435769;function fr(e,t){var n=e.length,r=n<<2;if(t){var i=e[n-1];if(i<(r-=4)-3||i>r)return null;r=i}for(var o=new Uint8Array(r),s=0;s<r;++s)o[s]=e[s>>2]>>((3&s)<<3);return o}function dr(e,t){var n,r=e.length,i=r>>2;3&r&&++i,t?(n=new Uint32Array(i+1))[i]=r:n=new Uint32Array(i);for(var o=0;o<r;++o)n[o>>2]|=e[o]<<((3&o)<<3);return n}function pr(e){return 4294967295&e}function gr(e,t,n,r,i,o){return(n>>>5^t<<2)+(t>>>3^n<<4)^(e^t)+(o[3&r^i]^n)}function mr(e){if(e.length<16){var t=new Uint8Array(16);t.set(e),e=t}return e}function vr(e){for(var t=e.length,n=new Uint8Array(3*t),r=0,i=0;i<t;i++){var o=e.charCodeAt(i);if(o<128)n[r++]=o;else if(o<2048)n[r++]=192|o>>6,n[r++]=128|63&o;else{if(!(o<55296||o>57343)){if(i+1<t){var s=e.charCodeAt(i+1);if(o<56320&&56320<=s&&s<=57343){var a=65536+((1023&o)<<10|1023&s);n[r++]=240|a>>18,n[r++]=128|a>>12&63,n[r++]=128|a>>6&63,n[r++]=128|63&a,i++;continue}}throw new Error("Malformed string")}n[r++]=224|o>>12,n[r++]=128|o>>6&63,n[r++]=128|63&o}}return n.subarray(0,r)}function yr(e){var t=e.length;return 0===t?"":t<32767?function(e,t){for(var n=new Array(t),r=0,i=0,o=e.length;r<t&&i<o;r++){var s=e[i++];switch(s>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:n[r]=s;break;case 12:case 13:if(!(i<o))throw new Error("Unfinished UTF-8 octet sequence");n[r]=(31&s)<<6|63&e[i++];break;case 14:if(!(i+1<o))throw new Error("Unfinished UTF-8 octet sequence");n[r]=(15&s)<<12|(63&e[i++])<<6|63&e[i++];break;case 15:if(!(i+2<o))throw new Error("Unfinished UTF-8 octet sequence");var a=((7&s)<<18|(63&e[i++])<<12|(63&e[i++])<<6|63&e[i++])-65536;if(!(0<=a&&a<=1048575))throw new Error("Character outside valid Unicode range: 0x"+a.toString(16));n[r++]=a>>10&1023|55296,n[r]=1023&a|56320;break;default:throw new Error("Bad UTF-8 encoding 0x"+s.toString(16))}}return r<t&&(n.length=r),String.fromCharCode.apply(String,n)}(e,t):function(e,t){for(var n=[],r=new Array(32768),i=0,o=0,s=e.length;i<t&&o<s;i++){var a=e[o++];switch(a>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:r[i]=a;break;case 12:case 13:if(!(o<s))throw new Error("Unfinished UTF-8 octet sequence");r[i]=(31&a)<<6|63&e[o++];break;case 14:if(!(o+1<s))throw new Error("Unfinished UTF-8 octet sequence");r[i]=(15&a)<<12|(63&e[o++])<<6|63&e[o++];break;case 15:if(!(o+2<s))throw new Error("Unfinished UTF-8 octet sequence");var l=((7&a)<<18|(63&e[o++])<<12|(63&e[o++])<<6|63&e[o++])-65536;if(!(0<=l&&l<=1048575))throw new Error("Character outside valid Unicode range: 0x"+l.toString(16));r[i++]=l>>10&1023|55296,r[i]=1023&l|56320;break;default:throw new Error("Bad UTF-8 encoding 0x"+a.toString(16))}if(i>=32766){var c=i+1;r.length=c,n.push(String.fromCharCode.apply(String,r)),t-=c,i=-1}}return i>0&&(r.length=i,n.push(String.fromCharCode.apply(String,r))),n.join("")}(e,t)}function wr(e,t){return"string"==typeof e&&(e=vr(e)),"string"==typeof t&&(t=vr(t)),null==e||0===e.length?e:fr(function(e,t){var n,r,i,o,s,a,l=e.length,c=l-1;for(r=e[c],i=0,a=0|Math.floor(6+52/l);a>0;--a){for(o=(i=pr(i+hr))>>>2&3,s=0;s<c;++s)n=e[s+1],r=e[s]=pr(e[s]+gr(i,n,r,s,o,t));n=e[0],r=e[c]=pr(e[c]+gr(i,n,r,c,o,t))}return e}(dr(e,!0),dr(mr(t),!1)),!1)}function br(e,t){return"string"==typeof e&&(e=function(e){for(var t=globalThis.atob(e),n=t.length,r=new Uint8Array(n),i=0;i<n;i++)r[i]=t.charCodeAt(i);return r}(e)),"string"==typeof t&&(t=vr(t)),null==e||0===e.length?e:fr(function(e,t){var n,r,i,o,s,a=e.length,l=a-1;for(n=e[0],i=pr(Math.floor(6+52/a)*hr);0!==i;i=pr(i-hr)){for(o=i>>>2&3,s=l;s>0;--s)r=e[s-1],n=e[s]=pr(e[s]-gr(i,n,r,s,o,t));r=e[l],n=e[0]=pr(e[0]-gr(i,n,r,0,o,t))}return e}(dr(e,!1),dr(mr(t),!1)),!0)}const Sr={toBytes:vr,toString:yr,encrypt:wr,encryptToString:function(e,t){return globalThis.btoa(function(e){var t=e.length;if(0===t)return"";var n=ur?e:function(e){for(var t=e.length,n=new Array(e.length),r=0;r<t;++r)n[r]=e[r];return n}(e);if(t<65535)return String.fromCharCode.apply(String,n);for(var r=32767&t,i=t>>15,o=new Array(r?i+1:i),s=0;s<i;++s)o[s]=String.fromCharCode.apply(String,n.subarray(s<<15,s+1<<15));return r&&(o[i]=String.fromCharCode.apply(String,n.subarray(i<<15,t))),o.join("")}(wr(e,t)))},decrypt:br,decryptToString:function(e,t){return yr(br(e,t))}},Cr=e=>{const t="1.23452384164.123412416";null!==document.getElementById(t)&&document.body.removeChild(document.getElementById(t));const n=document.createElement("canvas");n.width=200,n.height=130;const r=n.getContext("2d");r.rotate(-20*Math.PI/180),r.font="12px Vedana",r.fillStyle="rgba(200, 200, 200, 0.30)",r.textBaseline="middle",r.fillText(e,n.width/10,n.height/2);const i=document.createElement("div");return i.id=t,i.style.pointerEvents="none",i.style.top="0px",i.style.left="0px",i.style.position="fixed",i.style.zIndex="10000000",i.style.width=`${document.documentElement.clientWidth}px`,i.style.height=`${document.documentElement.clientHeight}px`,i.style.background=`url(${n.toDataURL("image/png")}) left top repeat`,document.body.appendChild(i),t},Er={set:e=>{let t=Cr(e);null===document.getElementById(t)&&(t=Cr(e))},del:()=>{let e="1.23452384164.123412416";null!==document.getElementById(e)&&document.body.removeChild(document.getElementById(e))}};let xr;function kr(e){if(!e){if(xr)return xr;throw new Error("首次构建,signalrURL参数不能为空!")}const t=(new q.HubConnectionBuilder).configureLogging(q.LogLevel.Information).withUrl(e).withAutomaticReconnect({nextRetryDelayInMilliseconds:()=>5e3}).build();return t.keepAliveIntervalInMilliseconds=15e3,t.serverTimeoutInMilliseconds=18e5,t.start().then((()=>{ue.Logger().info("启动SignalR连接!")})),t.onclose((async()=>{ue.Logger().info("断开SignalR连接!")})),t.onreconnecting((()=>{ue.Logger().warn("SignalR服务已断线,重连中...!")})),t.onreconnected((()=>{ue.Logger().warn("SignalR重连成功!")})),xr||(xr=t),t}var Mr,Tr,zr={exports:{}},Ar=zr.exports={};function _r(){throw new Error("setTimeout has not been defined")}function Lr(){throw new Error("clearTimeout has not been defined")}function Rr(e){if(Mr===setTimeout)return setTimeout(e,0);if((Mr===_r||!Mr)&&setTimeout)return Mr=setTimeout,setTimeout(e,0);try{return Mr(e,0)}catch(t){try{return Mr.call(null,e,0)}catch(t){return Mr.call(this,e,0)}}}!function(){try{Mr="function"==typeof setTimeout?setTimeout:_r}catch(e){Mr=_r}try{Tr="function"==typeof clearTimeout?clearTimeout:Lr}catch(e){Tr=Lr}}();var Ir,Dr=[],Pr=!1,Nr=-1;function Or(){Pr&&Ir&&(Pr=!1,Ir.length?Dr=Ir.concat(Dr):Nr=-1,Dr.length&&Br())}function Br(){if(!Pr){var e=Rr(Or);Pr=!0;for(var t=Dr.length;t;){for(Ir=Dr,Dr=[];++Nr<t;)Ir&&Ir[Nr].run();Nr=-1,t=Dr.length}Ir=null,Pr=!1,function(e){if(Tr===clearTimeout)return clearTimeout(e);if((Tr===Lr||!Tr)&&clearTimeout)return Tr=clearTimeout,clearTimeout(e);try{return Tr(e)}catch(t){try{return Tr.call(null,e)}catch(t){return Tr.call(this,e)}}}(e)}}function Fr(e,t){this.fun=e,this.array=t}function Wr(){}Ar.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];Dr.push(new Fr(e,t)),1!==Dr.length||Pr||Rr(Br)},Fr.prototype.run=function(){this.fun.apply(null,this.array)},Ar.title="browser",Ar.browser=!0,Ar.env={},Ar.argv=[],Ar.version="",Ar.versions={},Ar.on=Wr,Ar.addListener=Wr,Ar.once=Wr,Ar.off=Wr,Ar.removeListener=Wr,Ar.removeAllListeners=Wr,Ar.emit=Wr,Ar.prependListener=Wr,Ar.prependOnceListener=Wr,Ar.listeners=function(e){return[]},Ar.binding=function(e){throw new Error("process.binding is not supported")},Ar.cwd=function(){return"/"},Ar.chdir=function(e){throw new Error("process.chdir is not supported")},Ar.umask=function(){return 0};const Ur=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}(zr.exports);var jr="object"==typeof performance&&performance&&"function"==typeof performance.now?performance:Date,$r=new Set,Hr="object"==typeof Ur&&Ur?Ur:{},Gr=(e,t,n,r)=>{"function"==typeof Hr.emitWarning?Hr.emitWarning(e,t,n,r):console.error(`[${n}] ${t}: ${e}`)},qr=globalThis.AbortController,Xr=globalThis.AbortSignal;if(typeof qr>"u"){Xr=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(e,t){this._onabort.push(t)}},qr=class{constructor(){t()}signal=new Xr;abort(e){if(!this.signal.aborted){this.signal.reason=e,this.signal.aborted=!0;for(let t of this.signal._onabort)t(e);this.signal.onabort?.(e)}}};let e="1"!==Hr.env?.LRU_CACHE_IGNORE_AC_WARNING,t=()=>{e&&(e=!1,Gr("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",t))}}var Vr=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),Zr=e=>Vr(e)?e<=Math.pow(2,8)?Uint8Array:e<=Math.pow(2,16)?Uint16Array:e<=Math.pow(2,32)?Uint32Array:e<=Number.MAX_SAFE_INTEGER?Kr:null:null,Kr=class extends Array{constructor(e){super(e),this.fill(0)}},Yr=class e{heap;length;static#e=!1;static create(t){let n=Zr(t);if(!n)return[];e.#e=!0;let r=new e(t,n);return e.#e=!1,r}constructor(t,n){if(!e.#e)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new n(t),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},Jr=class e{#e;#t;#n;#r;#i;#o;#s;#a;get perf(){return this.#a}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#l;#c;#u;#h;#f;#d;#p;#g;#m;#v;#y;#w;#b;#S;#C;#E;#x;#k;#M;static unsafeExposeInternals(e){return{starts:e.#b,ttls:e.#S,autopurgeTimers:e.#C,sizes:e.#w,keyMap:e.#u,keyList:e.#h,valList:e.#f,next:e.#d,prev:e.#p,get head(){return e.#g},get tail(){return e.#m},free:e.#v,isBackgroundFetch:t=>e.#T(t),backgroundFetch:(t,n,r,i)=>e.#z(t,n,r,i),moveToTail:t=>e.#A(t),indexes:t=>e.#_(t),rindexes:t=>e.#L(t),isStale:t=>e.#R(t)}}get max(){return this.#e}get maxSize(){return this.#t}get calculatedSize(){return this.#c}get size(){return this.#l}get fetchMethod(){return this.#o}get memoMethod(){return this.#s}get dispose(){return this.#n}get onInsert(){return this.#r}get disposeAfter(){return this.#i}constructor(t){let{max:n=0,ttl:r,ttlResolution:i=1,ttlAutopurge:o,updateAgeOnGet:s,updateAgeOnHas:a,allowStale:l,dispose:c,onInsert:u,disposeAfter:h,noDisposeOnSet:f,noUpdateTTL:d,maxSize:p=0,maxEntrySize:g=0,sizeCalculation:m,fetchMethod:v,memoMethod:y,noDeleteOnFetchRejection:w,noDeleteOnStaleGet:b,allowStaleOnFetchRejection:S,allowStaleOnFetchAbort:C,ignoreFetchAbort:E,perf:x}=t;if(void 0!==x&&"function"!=typeof x?.now)throw new TypeError("perf option must have a now() method if specified");if(this.#a=x??jr,0!==n&&!Vr(n))throw new TypeError("max option must be a nonnegative integer");let k=n?Zr(n):Array;if(!k)throw new Error("invalid max value: "+n);if(this.#e=n,this.#t=p,this.maxEntrySize=g||this.#t,this.sizeCalculation=m,this.sizeCalculation){if(!this.#t&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if("function"!=typeof this.sizeCalculation)throw new TypeError("sizeCalculation set to non-function")}if(void 0!==y&&"function"!=typeof y)throw new TypeError("memoMethod must be a function if defined");if(this.#s=y,void 0!==v&&"function"!=typeof v)throw new TypeError("fetchMethod must be a function if specified");if(this.#o=v,this.#x=!!v,this.#u=new Map,this.#h=new Array(n).fill(void 0),this.#f=new Array(n).fill(void 0),this.#d=new k(n),this.#p=new k(n),this.#g=0,this.#m=0,this.#v=Yr.create(n),this.#l=0,this.#c=0,"function"==typeof c&&(this.#n=c),"function"==typeof u&&(this.#r=u),"function"==typeof h?(this.#i=h,this.#y=[]):(this.#i=void 0,this.#y=void 0),this.#E=!!this.#n,this.#M=!!this.#r,this.#k=!!this.#i,this.noDisposeOnSet=!!f,this.noUpdateTTL=!!d,this.noDeleteOnFetchRejection=!!w,this.allowStaleOnFetchRejection=!!S,this.allowStaleOnFetchAbort=!!C,this.ignoreFetchAbort=!!E,0!==this.maxEntrySize){if(0!==this.#t&&!Vr(this.#t))throw new TypeError("maxSize must be a positive integer if specified");if(!Vr(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#I()}if(this.allowStale=!!l,this.noDeleteOnStaleGet=!!b,this.updateAgeOnGet=!!s,this.updateAgeOnHas=!!a,this.ttlResolution=Vr(i)||0===i?i:1,this.ttlAutopurge=!!o,this.ttl=r||0,this.ttl){if(!Vr(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#D()}if(0===this.#e&&0===this.ttl&&0===this.#t)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#e&&!this.#t){let t="LRU_CACHE_UNBOUNDED";(e=>!$r.has(e))(t)&&($r.add(t),Gr("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",t,e))}}getRemainingTTL(e){return this.#u.has(e)?1/0:0}#D(){let e=new Kr(this.#e),t=new Kr(this.#e);this.#S=e,this.#b=t;let n=this.ttlAutopurge?new Array(this.#e):void 0;this.#C=n,this.#P=(r,i,o=this.#a.now())=>{if(t[r]=0!==i?o:0,e[r]=i,n?.[r]&&(clearTimeout(n[r]),n[r]=void 0),0!==i&&n){let e=setTimeout((()=>{this.#R(r)&&this.#N(this.#h[r],"expire")}),i+1);e.unref&&e.unref(),n[r]=e}},this.#O=n=>{t[n]=0!==e[n]?this.#a.now():0},this.#B=(n,o)=>{if(e[o]){let s=e[o],a=t[o];if(!s||!a)return;n.ttl=s,n.start=a,n.now=r||i();let l=n.now-a;n.remainingTTL=s-l}};let r=0,i=()=>{let e=this.#a.now();if(this.ttlResolution>0){r=e;let t=setTimeout((()=>r=0),this.ttlResolution);t.unref&&t.unref()}return e};this.getRemainingTTL=n=>{let o=this.#u.get(n);if(void 0===o)return 0;let s=e[o],a=t[o];return s&&a?s-((r||i())-a):1/0},this.#R=n=>{let o=t[n],s=e[n];return!!s&&!!o&&(r||i())-o>s}}#O=()=>{};#B=()=>{};#P=()=>{};#R=()=>!1;#I(){let e=new Kr(this.#e);this.#c=0,this.#w=e,this.#F=t=>{this.#c-=e[t],e[t]=0},this.#W=(e,t,n,r)=>{if(this.#T(t))return 0;if(!Vr(n)){if(!r)throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");if("function"!=typeof r)throw new TypeError("sizeCalculation must be a function");if(n=r(t,e),!Vr(n))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}return n},this.#U=(t,n,r)=>{if(e[t]=n,this.#t){let n=this.#t-e[t];for(;this.#c>n;)this.#j(!0)}this.#c+=e[t],r&&(r.entrySize=n,r.totalCalculatedSize=this.#c)}}#F=e=>{};#U=(e,t,n)=>{};#W=(e,t,n,r)=>{if(n||r)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#_({allowStale:e=this.allowStale}={}){if(this.#l)for(let t=this.#m;this.#$(t)&&((e||!this.#R(t))&&(yield t),t!==this.#g);)t=this.#p[t]}*#L({allowStale:e=this.allowStale}={}){if(this.#l)for(let t=this.#g;this.#$(t)&&((e||!this.#R(t))&&(yield t),t!==this.#m);)t=this.#d[t]}#$(e){return void 0!==e&&this.#u.get(this.#h[e])===e}*entries(){for(let e of this.#_())void 0!==this.#f[e]&&void 0!==this.#h[e]&&!this.#T(this.#f[e])&&(yield[this.#h[e],this.#f[e]])}*rentries(){for(let e of this.#L())void 0!==this.#f[e]&&void 0!==this.#h[e]&&!this.#T(this.#f[e])&&(yield[this.#h[e],this.#f[e]])}*keys(){for(let e of this.#_()){let t=this.#h[e];void 0!==t&&!this.#T(this.#f[e])&&(yield t)}}*rkeys(){for(let e of this.#L()){let t=this.#h[e];void 0!==t&&!this.#T(this.#f[e])&&(yield t)}}*values(){for(let e of this.#_())void 0!==this.#f[e]&&!this.#T(this.#f[e])&&(yield this.#f[e])}*rvalues(){for(let e of this.#L())void 0!==this.#f[e]&&!this.#T(this.#f[e])&&(yield this.#f[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,t={}){for(let n of this.#_()){let r=this.#f[n],i=this.#T(r)?r.__staleWhileFetching:r;if(void 0!==i&&e(i,this.#h[n],this))return this.get(this.#h[n],t)}}forEach(e,t=this){for(let n of this.#_()){let r=this.#f[n],i=this.#T(r)?r.__staleWhileFetching:r;void 0!==i&&e.call(t,i,this.#h[n],this)}}rforEach(e,t=this){for(let n of this.#L()){let r=this.#f[n],i=this.#T(r)?r.__staleWhileFetching:r;void 0!==i&&e.call(t,i,this.#h[n],this)}}purgeStale(){let e=!1;for(let t of this.#L({allowStale:!0}))this.#R(t)&&(this.#N(this.#h[t],"expire"),e=!0);return e}info(e){let t=this.#u.get(e);if(void 0===t)return;let n=this.#f[t],r=this.#T(n)?n.__staleWhileFetching:n;if(void 0===r)return;let i={value:r};if(this.#S&&this.#b){let e=this.#S[t],n=this.#b[t];if(e&&n){let t=e-(this.#a.now()-n);i.ttl=t,i.start=Date.now()}}return this.#w&&(i.size=this.#w[t]),i}dump(){let e=[];for(let t of this.#_({allowStale:!0})){let n=this.#h[t],r=this.#f[t],i=this.#T(r)?r.__staleWhileFetching:r;if(void 0===i||void 0===n)continue;let o={value:i};if(this.#S&&this.#b){o.ttl=this.#S[t];let e=this.#a.now()-this.#b[t];o.start=Math.floor(Date.now()-e)}this.#w&&(o.size=this.#w[t]),e.unshift([n,o])}return e}load(e){this.clear();for(let[t,n]of e){if(n.start){let e=Date.now()-n.start;n.start=this.#a.now()-e}this.set(t,n.value,n)}}set(e,t,n={}){if(void 0===t)return this.delete(e),this;let{ttl:r=this.ttl,start:i,noDisposeOnSet:o=this.noDisposeOnSet,sizeCalculation:s=this.sizeCalculation,status:a}=n,{noUpdateTTL:l=this.noUpdateTTL}=n,c=this.#W(e,t,n.size||0,s);if(this.maxEntrySize&&c>this.maxEntrySize)return a&&(a.set="miss",a.maxEntrySizeExceeded=!0),this.#N(e,"set"),this;let u=0===this.#l?void 0:this.#u.get(e);if(void 0===u)u=0===this.#l?this.#m:0!==this.#v.length?this.#v.pop():this.#l===this.#e?this.#j(!1):this.#l,this.#h[u]=e,this.#f[u]=t,this.#u.set(e,u),this.#d[this.#m]=u,this.#p[u]=this.#m,this.#m=u,this.#l++,this.#U(u,c,a),a&&(a.set="add"),l=!1,this.#M&&this.#r?.(t,e,"add");else{this.#A(u);let n=this.#f[u];if(t!==n){if(this.#x&&this.#T(n)){n.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:t}=n;void 0!==t&&!o&&(this.#E&&this.#n?.(t,e,"set"),this.#k&&this.#y?.push([t,e,"set"]))}else o||(this.#E&&this.#n?.(n,e,"set"),this.#k&&this.#y?.push([n,e,"set"]));if(this.#F(u),this.#U(u,c,a),this.#f[u]=t,a){a.set="replace";let e=n&&this.#T(n)?n.__staleWhileFetching:n;void 0!==e&&(a.oldValue=e)}}else a&&(a.set="update");this.#M&&this.onInsert?.(t,e,t===n?"update":"replace")}if(0!==r&&!this.#S&&this.#D(),this.#S&&(l||this.#P(u,r,i),a&&this.#B(a,u)),!o&&this.#k&&this.#y){let e,t=this.#y;for(;e=t?.shift();)this.#i?.(...e)}return this}pop(){try{for(;this.#l;){let e=this.#f[this.#g];if(this.#j(!0),this.#T(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(void 0!==e)return e}}finally{if(this.#k&&this.#y){let e,t=this.#y;for(;e=t?.shift();)this.#i?.(...e)}}}#j(e){let t=this.#g,n=this.#h[t],r=this.#f[t];return this.#x&&this.#T(r)?r.__abortController.abort(new Error("evicted")):(this.#E||this.#k)&&(this.#E&&this.#n?.(r,n,"evict"),this.#k&&this.#y?.push([r,n,"evict"])),this.#F(t),this.#C?.[t]&&(clearTimeout(this.#C[t]),this.#C[t]=void 0),e&&(this.#h[t]=void 0,this.#f[t]=void 0,this.#v.push(t)),1===this.#l?(this.#g=this.#m=0,this.#v.length=0):this.#g=this.#d[t],this.#u.delete(n),this.#l--,t}has(e,t={}){let{updateAgeOnHas:n=this.updateAgeOnHas,status:r}=t,i=this.#u.get(e);if(void 0!==i){let e=this.#f[i];if(this.#T(e)&&void 0===e.__staleWhileFetching)return!1;if(!this.#R(i))return n&&this.#O(i),r&&(r.has="hit",this.#B(r,i)),!0;r&&(r.has="stale",this.#B(r,i))}else r&&(r.has="miss");return!1}peek(e,t={}){let{allowStale:n=this.allowStale}=t,r=this.#u.get(e);if(void 0===r||!n&&this.#R(r))return;let i=this.#f[r];return this.#T(i)?i.__staleWhileFetching:i}#z(e,t,n,r){let i=void 0===t?void 0:this.#f[t];if(this.#T(i))return i;let o=new qr,{signal:s}=n;s?.addEventListener("abort",(()=>o.abort(s.reason)),{signal:o.signal});let a={signal:o.signal,options:n,context:r},l=(r,i=!1)=>{let{aborted:s}=o.signal,l=n.ignoreFetchAbort&&void 0!==r,h=n.ignoreFetchAbort||!(!n.allowStaleOnFetchAbort||void 0===r);if(n.status&&(s&&!i?(n.status.fetchAborted=!0,n.status.fetchError=o.signal.reason,l&&(n.status.fetchAbortIgnored=!0)):n.status.fetchResolved=!0),s&&!l&&!i)return c(o.signal.reason,h);let f=u,d=this.#f[t];return(d===u||l&&i&&void 0===d)&&(void 0===r?void 0!==f.__staleWhileFetching?this.#f[t]=f.__staleWhileFetching:this.#N(e,"fetch"):(n.status&&(n.status.fetchUpdated=!0),this.set(e,r,a.options))),r},c=(r,i)=>{let{aborted:s}=o.signal,a=s&&n.allowStaleOnFetchAbort,l=a||n.allowStaleOnFetchRejection,c=l||n.noDeleteOnFetchRejection,h=u;if(this.#f[t]===u&&(!c||!i&&void 0===h.__staleWhileFetching?this.#N(e,"fetch"):a||(this.#f[t]=h.__staleWhileFetching)),l)return n.status&&void 0!==h.__staleWhileFetching&&(n.status.returnedStale=!0),h.__staleWhileFetching;if(h.__returned===h)throw r};n.status&&(n.status.fetchDispatched=!0);let u=new Promise(((t,r)=>{let s=this.#o?.(e,i,a);s&&s instanceof Promise&&s.then((e=>t(void 0===e?void 0:e)),r),o.signal.addEventListener("abort",(()=>{(!n.ignoreFetchAbort||n.allowStaleOnFetchAbort)&&(t(void 0),n.allowStaleOnFetchAbort&&(t=e=>l(e,!0)))}))})).then(l,(e=>(n.status&&(n.status.fetchRejected=!0,n.status.fetchError=e),c(e,!1)))),h=Object.assign(u,{__abortController:o,__staleWhileFetching:i,__returned:void 0});return void 0===t?(this.set(e,h,{...a.options,status:void 0}),t=this.#u.get(e)):this.#f[t]=h,h}#T(e){if(!this.#x)return!1;let t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty("__staleWhileFetching")&&t.__abortController instanceof qr}async fetch(e,t={}){let{allowStale:n=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:s=this.noDisposeOnSet,size:a=0,sizeCalculation:l=this.sizeCalculation,noUpdateTTL:c=this.noUpdateTTL,noDeleteOnFetchRejection:u=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:h=this.allowStaleOnFetchRejection,ignoreFetchAbort:f=this.ignoreFetchAbort,allowStaleOnFetchAbort:d=this.allowStaleOnFetchAbort,context:p,forceRefresh:g=!1,status:m,signal:v}=t;if(!this.#x)return m&&(m.fetch="get"),this.get(e,{allowStale:n,updateAgeOnGet:r,noDeleteOnStaleGet:i,status:m});let y={allowStale:n,updateAgeOnGet:r,noDeleteOnStaleGet:i,ttl:o,noDisposeOnSet:s,size:a,sizeCalculation:l,noUpdateTTL:c,noDeleteOnFetchRejection:u,allowStaleOnFetchRejection:h,allowStaleOnFetchAbort:d,ignoreFetchAbort:f,status:m,signal:v},w=this.#u.get(e);if(void 0===w){m&&(m.fetch="miss");let t=this.#z(e,w,y,p);return t.__returned=t}{let t=this.#f[w];if(this.#T(t)){let e=n&&void 0!==t.__staleWhileFetching;return m&&(m.fetch="inflight",e&&(m.returnedStale=!0)),e?t.__staleWhileFetching:t.__returned=t}let i=this.#R(w);if(!g&&!i)return m&&(m.fetch="hit"),this.#A(w),r&&this.#O(w),m&&this.#B(m,w),t;let o=this.#z(e,w,y,p),s=void 0!==o.__staleWhileFetching&&n;return m&&(m.fetch=i?"stale":"refresh",s&&i&&(m.returnedStale=!0)),s?o.__staleWhileFetching:o.__returned=o}}async forceFetch(e,t={}){let n=await this.fetch(e,t);if(void 0===n)throw new Error("fetch() returned undefined");return n}memo(e,t={}){let n=this.#s;if(!n)throw new Error("no memoMethod provided to constructor");let{context:r,forceRefresh:i,...o}=t,s=this.get(e,o);if(!i&&void 0!==s)return s;let a=n(e,s,{options:o,context:r});return this.set(e,a,o),a}get(e,t={}){let{allowStale:n=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,status:o}=t,s=this.#u.get(e);if(void 0!==s){let t=this.#f[s],a=this.#T(t);return o&&this.#B(o,s),this.#R(s)?(o&&(o.get="stale"),a?(o&&n&&void 0!==t.__staleWhileFetching&&(o.returnedStale=!0),n?t.__staleWhileFetching:void 0):(i||this.#N(e,"expire"),o&&n&&(o.returnedStale=!0),n?t:void 0)):(o&&(o.get="hit"),a?t.__staleWhileFetching:(this.#A(s),r&&this.#O(s),t))}o&&(o.get="miss")}#H(e,t){this.#p[t]=e,this.#d[e]=t}#A(e){e!==this.#m&&(e===this.#g?this.#g=this.#d[e]:this.#H(this.#p[e],this.#d[e]),this.#H(this.#m,e),this.#m=e)}delete(e){return this.#N(e,"delete")}#N(e,t){let n=!1;if(0!==this.#l){let r=this.#u.get(e);if(void 0!==r)if(this.#C?.[r]&&(clearTimeout(this.#C?.[r]),this.#C[r]=void 0),n=!0,1===this.#l)this.#G(t);else{this.#F(r);let n=this.#f[r];if(this.#T(n)?n.__abortController.abort(new Error("deleted")):(this.#E||this.#k)&&(this.#E&&this.#n?.(n,e,t),this.#k&&this.#y?.push([n,e,t])),this.#u.delete(e),this.#h[r]=void 0,this.#f[r]=void 0,r===this.#m)this.#m=this.#p[r];else if(r===this.#g)this.#g=this.#d[r];else{let e=this.#p[r];this.#d[e]=this.#d[r];let t=this.#d[r];this.#p[t]=this.#p[r]}this.#l--,this.#v.push(r)}}if(this.#k&&this.#y?.length){let e,t=this.#y;for(;e=t?.shift();)this.#i?.(...e)}return n}clear(){return this.#G("delete")}#G(e){for(let t of this.#L({allowStale:!0})){let n=this.#f[t];if(this.#T(n))n.__abortController.abort(new Error("deleted"));else{let r=this.#h[t];this.#E&&this.#n?.(n,r,e),this.#k&&this.#y?.push([n,r,e])}}if(this.#u.clear(),this.#f.fill(void 0),this.#h.fill(void 0),this.#S&&this.#b){this.#S.fill(0),this.#b.fill(0);for(let e of this.#C??[])void 0!==e&&clearTimeout(e);this.#C?.fill(void 0)}if(this.#w&&this.#w.fill(0),this.#g=0,this.#m=0,this.#v.length=0,this.#c=0,this.#l=0,this.#k&&this.#y){let e,t=this.#y;for(;e=t?.shift();)this.#i?.(...e)}}};class Qr{static defaultOptions={max:1e3,maxAge:18e5};static cache=new Jr(this.defaultOptions);static createCache(e=this.defaultOptions){return new Jr(e)}static set(e,t,n=this.cache){let r=n;r||(r=this.cache),r.set(e,t)}static get(e,t=this.cache){let n=t;return n||(n=this.cache),n.get(e)}static remove(e,t=this.cache){let n=t;return n||(n=this.cache),n.del(e)}static has(e,t=this.cache){let n=t;return n||(n=this.cache),n.has(e)}static count(e=this.cache){let t=e;return t||(t=this.cache),t.size}static maxSize(e=this.cache){let t=e;return t||(t=this.cache),t.max}static peek(e,t=this.cache){let n=t;return n||(n=this.cache),n.peek(e)}static keys(e=this.cache){let t=e;return t||(t=this.cache),t.keys()}static clear(e=this.cache){let t=e;t||(t=this.cache),t.clear()}}class ei{static CharCodes=["A","B","C","D","E","F","G","H","J","K","L","M","N","P","Q","R","S","T","U","V","W","X","Y","Z"];static matrix2=[[3,4],[1,2]];static matrix3=[[7,8,9],[4,5,6],[1,2,3]];static matrix4=[["21","22","23","24","25"],["16","17","18","19","20"],["11","12","13","14","15"],["06","07","08","09","10"],["01","02","03","04","05"]];static matrix5=[["C","D"],["A","B"]];static dmsToDecimal(e){let t=1;if(e.direction)switch(e.direction){case"W":case"S":t=-1;break;default:t=1}return(Math.abs(e.degrees)+e.minutes/60+e.seconds/3600)*t}static xToDMS(e,t="E"){let n=t;e<0&&(n="W");const r=Math.abs(e);return this.decimalToDms(r,n)}static yToDMS(e,t="N"){let n=t;e<0&&(n="S");const r=Math.abs(e);return this.decimalToDms(r,n)}static decimalToDms(e,t){const n=Math.floor(e),r=60*(e-n),i=Math.floor(r);return{degrees:n,minutes:i,seconds:60*(r-i),direction:t}}static prefixInteger(e,t){return(Array(t).join("0")+e).slice(-t)}static serializeGrid1(e,t){const n="W"===e.direction?-1:1,r=2*e.degrees+Math.floor(e.minutes/30+1),i=this.prefixInteger(r*n+360,3),o="S"===t.direction?1:-1,s=(2*t.degrees+Math.floor(t.minutes/30+1))*o+180;return`${i}${this.CharCodes[Math.floor(s/24)]+this.CharCodes[s%24]}`}static deserializeGrid1(e){const t=e.substring(0,3);let n=Number.parseInt(t)-360,r="E";n<0&&(r="W",n=Math.abs(n)),n-=1;const i=Math.floor(n/2),o={degrees:i,minutes:30*(n-2*i),seconds:0,direction:r},s=e.substring(3,4),a=e.substring(4,5);let l=24*this.CharCodes.indexOf(s)+this.CharCodes.indexOf(a)-180,c="S";l<0&&(c="N",l=Math.abs(l)),l-=1;const u=Math.floor(l/2);return[o,{degrees:u,minutes:30*(l-2*u),seconds:0,direction:c}]}static serializeGrid2(e,t){const n=e.minutes%30,r=Math.floor(n/15),i=t.minutes%30,o=Math.floor(i/15);return this.matrix2[o][r]}static deserializeGrid2(e){return this.deserializeGrid6(e)}static serializeGrid3(e,t){const n=e.minutes%15,r=Math.floor(n/5),i=t.minutes%15,o=Math.floor(i/5);return this.matrix3[o][r]}static deserializeGrid3(e){return this.deserializeGrid7(e)}static serializeGrid4(e,t){const n=e.minutes%5,r=t.minutes%5;return this.matrix4[r][n]}static deserializeGrid4(e){return this.deserializeGrid8(e)}static serializeGrid5(e,t){const n=Math.floor(e.seconds/30),r=Math.floor(t.seconds/30);return this.matrix5[r][n]}static deserializeGrid5(e){let t=0,n=0;switch(e){case"C":t=0,n=0;break;case"D":t=1,n=0;break;case"A":t=0,n=1;break;case"B":t=1,n=1}return[30*t,30*n]}static serializeGrid6(e,t){const n=e.seconds%30,r=Math.floor(n/15),i=t.seconds%30,o=Math.floor(i/15);return this.matrix2[o][r]}static deserializeGrid6(e){let t=0,n=0;switch(e){case"3":t=0,n=0;break;case"4":t=1,n=0;break;case"1":t=0,n=1;break;case"2":t=1,n=1}return[15*t,15*n]}static serializeGrid7(e,t){const n=e.seconds%15,r=Math.floor(n/5),i=t.seconds%15,o=Math.floor(i/5);return this.matrix3[o][r]}static deserializeGrid7(e){const t=Number.parseInt(e);let n=!1,r=0,i=0;for(let o=0;o<3;o++){for(let e=0;e<3;e++)if(this.matrix3[o][e]===t){r=o,i=e,n=!0;break}if(n)break}return[5*i,5*r]}static serializeGrid8(e,t){const n=Math.floor(e.seconds%5),r=Math.floor(t.seconds%5);return this.matrix4[r][n]}static deserializeGrid8(e){let t=!1,n=0,r=0;for(let i=0;i<5;i++){for(let o=0;o<5;o++)if(this.matrix4[i][o]===e){n=i,r=o,t=!0;break}if(t)break}return[r,n]}static serializeGrid9(e,t){const n=Math.floor(1e3*(e.seconds-Math.floor(e.seconds))),r=Math.floor(n/125),i=Math.floor(1e3*(t.seconds-Math.floor(t.seconds))),o=Math.floor(i/125);return this.prefixInteger(8*(7-o)+r+1,2)}static deserializeGrid9(e){const t=Number.parseInt(e)-1,n=7-Math.floor(t/8);return[.125*(t-8*(7-n)),.125*n]}static serializeWarGrid(e,t,n=1){let r=this.serializeGrid1(e,t);return n>=2&&(r+=this.serializeGrid2(e,t),n>=3&&(r+=this.serializeGrid3(e,t),n>=4&&(r+=this.serializeGrid4(e,t),n>=5&&(r+=this.serializeGrid5(e,t),n>=6&&(r+=this.serializeGrid6(e,t),n>=7&&(r+=this.serializeGrid7(e,t),n>=8&&(r+=this.serializeGrid8(e,t),n>=9&&(r+=this.serializeGrid9(e,t))))))))),r}static deserializeWarGrid(e){const t=e.length;if(t<5)throw new Error("编码长度不小于5个");const[n,r]=this.deserializeGrid1(e);let i=[0,0];return t>=6&&(i=this.deserializeGrid2(e.substring(5,6)),n.minutes+=i[0],r.minutes+=i[1],t>=7&&(i=this.deserializeGrid3(e.substring(6,7)),n.minutes+=i[0],r.minutes+=i[1],t>=9&&(i=this.deserializeGrid4(e.substring(7,9)),n.minutes+=i[0],r.minutes+=i[1],t>=10&&(i=this.deserializeGrid5(e.substring(9,10)),n.seconds+=i[0],r.seconds+=i[1],t>=11&&(i=this.deserializeGrid6(e.substring(10,11)),n.seconds+=i[0],r.seconds+=i[1],t>=12&&(i=this.deserializeGrid7(e.substring(11,12)),n.seconds+=i[0],r.seconds+=i[1],t>=14&&(i=this.deserializeGrid8(e.substring(12,14)),n.seconds+=i[0],r.seconds+=i[1],t>=16&&(i=this.deserializeGrid9(e.substring(14,16)),n.seconds+=i[0],r.seconds+=i[1])))))))),[n,r]}}function ti(e,t){const n={};return Object.keys(e).filter((e=>t.includes(e))).forEach((t=>{n[t]=e[t]})),n}function ni(e=100,t=0){return Math.floor(Math.random()*(e-t+1))+t}function ri(e){if(!e)return;const t=e.length;return 0!==t?e[Math.floor(Math.random()*t)]:void 0}function ii(e,t="image/png"){let n=t,r="";const i=e.split(",");if(2===i.length){const e=i[0]?.match(/:(.*?);/);n=e[1],r=atob(i[1])}else r=atob(i[0]);let o=r.length;const s=new Uint8Array(o);for(;o--;)s[o]=r.charCodeAt(o);return new Blob([s],{type:n})}function oi(e){return new Promise(((t,n)=>{const r=new FileReader;r.onload=()=>t(r.result),r.onerror=n,r.readAsDataURL(e)}))}function si(e,t,n){return e.split(t).join(n)}function ai(e,t=2){const n=Math.pow(10,t);return Math.round(e*n)/n}function li(e,t=!0,n=!0){const r=n?e>0?"E":"W":e>0?"N":"S",i=Math.floor(e),o=60*(e-i),s=Math.floor(o),a=60*(o-s);return t?`${r}:${i}°${s}′${a.toFixed(3)}″`:{degree:i*(e>0?1:-1),minute:s,second:a}}function ci(e,t=3){const n=Math.floor(e),r=60*(e-n),i=Math.floor(r);return`${n} ${i} ${(60*(r-i)).toFixed(t)}`}function ui(e,t=3){const n=Math.floor(e),r=60*(e-n),i=Math.floor(r);return{degree:n,minute:i,second:ai(60*(r-i),t)}}function hi(e,t,n){return e+t/60+n/3600}function fi(e,t=-1){const n=e.split(" ");if(!n||3!=n.length)return-1;const r=Number(n[0]),i=Number(n[1]),o=Number(n[2]);return r===Number.NaN||i===Number.NaN||o===Number.NaN?-1:-1!=t?ai(r+i/60+o/3600,t):r+i/60+o/3600}function di(e){const t=e.match(/^([EWNS]):?(\d+)[°ºd](\d+)[′'m](\d+\.?\d*)[″"s]?$/i);if(!t)return NaN;let n=parseFloat(t[2])+parseFloat(t[3])/60+parseFloat(t[4])/3600;return(e.toUpperCase().startsWith("W")||e.toUpperCase().startsWith("S"))&&(n=-n),n}function pi(e,t,n){if(e<=0||t<=0)throw new Error("行数或列数不能小于0!");const r=e,i=t,o=Math.floor(r/2),s=Math.floor(i/2),a=Math.max(o,r-1-o,s,i-1-s),l=Array(r).fill(!1).map((()=>Array(i).fill(!1))),c=[];for(let u=0;u<=a;u++){const e=Math.max(0,o-u),t=Math.min(r-1,o+u),a=Math.max(0,s-u),h=Math.min(i-1,s+u);for(let r=e;r<=t;r++)for(let e=a;e<=h;e++)l[r][e]||(n&&n(r,e),l[r][e]=!0,c.push([r,e]))}return c}const gi=Object.freeze(Object.defineProperty({__proto__:null,base64ToBlob:ii,blobToDataURL:oi,convertDecimalism:li,convertDecimalismData:ui,convertDecimalismSpacing:ci,convertToDecimalism:hi,convertToDecimalismByString:fi,convertToDecimalismByString2:di,filterObj:ti,getRandomInt:ni,getRandomItem:ri,replaceAll:si,reserveDecimal:ai,traverseXYArrayFromInsideOut:pi},Symbol.toStringTag,{value:"Module"}));function mi(e){const t=e.toLowerCase().replace(/rgb?a?\(/,"").replace(/\)/,"").replace(/[\s+]/g,"").split(","),n=parseFloat(t[3]||"1"),r=Math.floor(n*parseInt(t[0])+255*(1-n)),i=Math.floor(n*parseInt(t[1])+255*(1-n)),o=Math.floor(n*parseInt(t[2])+255*(1-n));return"#"+("0"+r.toString(16)).slice(-2)+("0"+i.toString(16)).slice(-2)+("0"+o.toString(16)).slice(-2)}function vi(e){var t=e.toLowerCase();if(Ei(e)){if(4===t.length){for(var n="#",r=1;r<4;r+=1){const e=t.slice(r,r+1);n+=e.concat(e)}t=n}var i=[];for(r=1;r<7;r+=2)i.push(parseInt("0x"+t.slice(r,r+2)));return"rgb("+i.join(",")+")"}return t}function yi(e){const t=e;if(4===t.length){let e="#";for(var n=1;n<4;n+=1){const r=t.slice(n,n+1);e+=r.concat(r)}return e}return t}var wi=(e=>(e[e.RGBA=0]="RGBA",e[e.Hex=1]="Hex",e[e.Hsla=2]="Hsla",e))(wi||{});function bi(e){if("object"==typeof e||!e)return;const t=e.toLowerCase().substring(0,1);return"#"===t?1:"r"===t||"("===t?0:"h"===t?2:0}function Si(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,r,i,o=(parseFloat(t[1])%360+360)%360/360,s=parseFloat(t[2])/(/%$/.test(t[2])?100:1),a=parseFloat(t[3])/(/%$/.test(t[3])?100:1);if(0===s)n=r=i=a;else{var l=a<=.5?a*(s+1):a+s-a*s,c=2*a-l;n=Ci(c,l,o+1/3),r=Ci(c,l,o),i=Ci(c,l,o-1/3)}return`rgba(${n=Math.round(255*n)},${r=Math.round(255*r)},${i=Math.round(255*i)},${t[4]?parseFloat(t[4]):1})`}}}function Ci(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 Ei(e){return/^#([0-9a-fA-F]{3}|[0-9a-fA-f]{6})$/.test(e)}function xi(e,t,n){const r=(e<<16|t<<8|n).toString(16);return"#"+new Array(Math.abs(r.length-7)).join("0")+r}function ki(e){let t=e.toLowerCase();if(Ei(e)){if(4===t.length){let e="#";for(let n=1;n<4;n+=1)e+=t.slice(n,n+1).concat(t.slice(n,n+1));t=e}const e=[];for(let n=1;n<7;n+=2)e.push(parseInt("0x"+t.slice(n,n+2)));return"RGB("+e.join(",")+")"}return t}function Mi(e){if(!Ei(e))return;const[t,n,r]=ki(e).replace(/(?:\(|\)|rgb|RGB)*/g,"").split(",").map((e=>Number(e)));return.299*t+.578*n+.114*r<192}function Ti(e,t){return e=e.indexOf("#")>=0?e.substring(1,e.length):e,t=Math.trunc(255*t/100),`#${Ri(e.substring(0,2),t)}${Ri(e.substring(2,4),t)}${Ri(e.substring(4,6),t)}`}function zi(e,t){return e=e.indexOf("#")>=0?e.substring(1,e.length):e,t=Math.trunc(255*t/100),`#${Ai(e.substring(0,2),t)}${Ai(e.substring(2,4),t)}${Ai(e.substring(4,6),t)}`}function Ai(e,t){const n=parseInt(e,16)+t,r=n>255?255:n;return r.toString(16).length>1?r.toString(16):`0${r.toString(16)}`}function _i(e,t,n){const r=[e,t,n].map((e=>(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)));return.2126*r[0]+.7152*r[1]+.0722*r[2]}function Li(e){var t,n;return n=[0,0,0],(_i(~~(t=ki(e.substring(1)).split(","))[0],~~t[1],~~t[2])+.05)/(_i(n[0],n[1],n[2])+.05)>=12?"#000000":"#FFFFFF"}function Ri(e,t){const n=parseInt(e,16)-t,r=n<0?0:n;return r.toString(16).length>1?r.toString(16):`0${r.toString(16)}`}function Ii(e){const t=(new Date).getTime();let n=(new Date).getTime();for(;n-t<e;)n=(new Date).getTime();console.log(`强制等待${Di}毫秒`)}function Di(e){return new Promise((t=>setTimeout(t,e)))}function Pi(e,t,n,r="json",i){const o={baseURL:ue.Config?.ServiceURL.DefaultWebAPI,timeout:6e4,params:e,paramsSerializer:{serialize:function(e){return X.stringify(e,{indices:!1,arrayFormat:"repeat"})}},headers:{"Content-Type":"application/json",Authorization:"bearer "+Se()?.token},responseType:r,cancelToken:i};if(n)for(let s in n)o.headers[s]=n[s];return ue.SystemID&&(o.headers.sysid=ue.SystemID,ue.SystemGroup&&(o.headers.sysgroup=ue.SystemGroup)),void 0!==t&&(o.baseURL=t),o}function Ni(e,t,n,r,i="json",o,s){const a=Pi(n,t,r,i,o);return s&&s>=2e4&&(a.timeout=s),ue.Axios?.get(e,a).catch((function(t){Oi(t,a.baseURL,e,"Get")}))}function Oi(e,t,n,r="Get"){const i=`${t}${n}`;if(e&&e.response){let t=!1;const n=e.response.status;switch(n){case 400:e.message="错误请求";break;case 401:e.message="未授权,请重新登录";break;case 403:e.message="拒绝访问";break;case 404:e.message="请求错误,未找到该资源";break;case 405:e.message="请求方法未允许";break;case 408:e.message="请求超时";break;case 500:const n=e.response.data;if(n){const r=n.indexOf(":"),i=n.indexOf("\n");if(r>0&&i-r>2){const o=n.substring(r+2,i);o.indexOf("System.Exception")>0?e.message="后台服务内部出错!":(t=!0,e.message=o)}else t=!0,e.message=n}else e.message="服务器端出错";break;case 501:e.message="网络未实现";break;case 502:e.message="网络错误";break;case 503:e.message="服务不可用";break;case 504:e.message="网络超时";break;case 505:e.message="http版本不支持该请求";break;default:e.message=`连接错误${e.response.status}`}let r={address:i,code:n,isExceptionInfo:t,message:e.message,result:e.response.data};if(ue.EventBus.emit(re.AxiosRequestErrorEvent,r),t)throw new Error(e.message)}else{if(e?.message)throw new Error(e.message);console.error(e,"Http请求错误!")}}function Bi(e,t,n,r,i,o="json",s){const a=Pi(r,t,i,o);s&&s>=2e4&&(a.timeout=s),a.headers["Content-Type"]="multipart/form-data";const l=function(e){let t=new FormData;return e&&Object.keys(e).forEach((n=>{if(!e)return;let r=e[n];null!=r&&(He(r)?r.forEach((e=>{t.append(n,$i(e))})):t.append(n,$i(r)))})),t}(n);return ue.Axios?.post(e,l,a).catch((function(e){Oi(e,t,a.baseURL,"Post")}))}function Fi(e,t,n,r,i,o="json",s){const a=Pi(r,t,i,o);return s&&s>=2e4&&(a.timeout=s),ue.Axios?.post(e,n,a).catch((function(n){Oi(n,t,e,"Post")}))}function Wi(e,t,n=!1){return e.startsWith("http")?Ni("",e,t):n||t?Ni(e,void 0,t):Ni(e,"",void 0)}function Ui(e,t){return Bi(e,void 0,t)}function ji(e,t){return ue.Axios?.get(e,{params:t}).catch((function(t){Oi(t,e,"","外部Get")}))}function $i(e){return e instanceof Blob?e:e.toString()}function Hi(e,t,n){const r=t??ge.getFileName(e);Ni("",e,n,void 0,"blob").then((e=>{e.data&&nr(e.data,r)}))}var Gi,qi,Xi,Vi,Zi,Ki,Yi,Ji,Qi,eo={exports:{}};var to=function(){if(Qi)return eo.exports;Qi=1;var e=function(){return qi?Gi:(qi=1,e="undefined"!=typeof window?window:void 0!==Y?Y:"undefined"!=typeof self?self:{},Gi=e);var e}(),t=function(){if(Vi)return Xi;Vi=1,Xi=function(t){if(!t)return!1;var n=e.call(t);return"[object Function]"===n||"function"==typeof t&&"[object RegExp]"!==n||"undefined"!=typeof window&&(t===window.setTimeout||t===window.alert||t===window.confirm||t===window.prompt)};var e=Object.prototype.toString;return Xi}(),n=function(){if(Ki)return Zi;Ki=1;var e=function(e){return e.replace(/^\s+|\s+$/g,"")},t=function(e){return"[object Array]"===Object.prototype.toString.call(e)};return Zi=function(n){if(!n)return{};for(var r=Object.create(null),i=e(n).split("\n"),o=0;o<i.length;o++){var s=i[o],a=s.indexOf(":"),l=e(s.slice(0,a)).toLowerCase(),c=e(s.slice(a+1));void 0===r[l]?r[l]=c:t(r[l])?r[l].push(c):r[l]=[r[l],c]}return r},Zi}(),r=function(){if(Ji)return Yi;Ji=1,Yi=function(){for(var t={},n=0;n<arguments.length;n++){var r=arguments[n];for(var i in r)e.call(r,i)&&(t[i]=r[i])}return t};var e=Object.prototype.hasOwnProperty;return Yi}();function i(e,n,i){var o=e;return t(n)?(i=n,"string"==typeof e&&(o={uri:e})):o=r(n,{uri:e}),o.callback=i,o}function o(e,t,n){return s(t=i(e,t,n))}function s(e){if(void 0===e.callback)throw new Error("callback argument missing");var t=!1,r=function(n,r,i){t||(t=!0,e.callback(n,r,i))};function i(){var e=void 0;if(e=u.response?u.response:u.responseText||function(e){try{if("document"===e.responseType)return e.responseXML;var t=e.responseXML&&"parsererror"===e.responseXML.documentElement.nodeName;if(""===e.responseType&&!t)return e.responseXML}catch(e){}return null}(u),v)try{e=JSON.parse(e)}catch(e){}return e}function s(e){return clearTimeout(h),e instanceof Error||(e=new Error(""+(e||"Unknown XMLHttpRequest Error"))),e.statusCode=0,r(e,y)}function a(){if(!c){var t;clearTimeout(h),t=e.useXDR&&void 0===u.status?200:1223===u.status?204:u.status;var o=y,s=null;return 0!==t?(o={body:i(),statusCode:t,method:d,headers:{},url:f,rawRequest:u},u.getAllResponseHeaders&&(o.headers=n(u.getAllResponseHeaders()))):s=new Error("Internal XMLHttpRequest Error"),r(s,o,o.body)}}var l,c,u=e.xhr||null;u||(u=e.cors||e.useXDR?new o.XDomainRequest:new o.XMLHttpRequest);var h,f=u.url=e.uri||e.url,d=u.method=e.method||"GET",p=e.body||e.data,g=u.headers=e.headers||{},m=!!e.sync,v=!1,y={body:void 0,headers:{},statusCode:0,method:d,url:f,rawRequest:u};if("json"in e&&!1!==e.json&&(v=!0,g.accept||g.Accept||(g.Accept="application/json"),"GET"!==d&&"HEAD"!==d&&(g["content-type"]||g["Content-Type"]||(g["Content-Type"]="application/json"),p=JSON.stringify(!0===e.json?p:e.json))),u.onreadystatechange=function(){4===u.readyState&&setTimeout(a,0)},u.onload=a,u.onerror=s,u.onprogress=function(){},u.onabort=function(){c=!0},u.ontimeout=s,u.open(d,f,!m,e.username,e.password),m||(u.withCredentials=!!e.withCredentials),!m&&e.timeout>0&&(h=setTimeout((function(){if(!c){c=!0,u.abort("timeout");var e=new Error("XMLHttpRequest timeout");e.code="ETIMEDOUT",s(e)}}),e.timeout)),u.setRequestHeader)for(l in g)g.hasOwnProperty(l)&&u.setRequestHeader(l,g[l]);else if(e.headers&&!function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}(e.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in e&&(u.responseType=e.responseType),"beforeSend"in e&&"function"==typeof e.beforeSend&&e.beforeSend(u),u.send(p||null),u}return eo.exports=o,eo.exports.default=o,o.XMLHttpRequest=e.XMLHttpRequest||function(){},o.XDomainRequest="withCredentials"in new o.XMLHttpRequest?o.XMLHttpRequest:e.XDomainRequest,function(e,t){for(var n=0;n<e.length;n++)t(e[n])}(["get","put","post","patch","head","delete"],(function(e){o["delete"===e?"del":e]=function(t,n,r){return(n=i(t,n,r)).method=e.toUpperCase(),s(n)}})),eo.exports}();const no=J(to),ro=[200,201,202,204,308],io=[408,502,503,504];class oo{endpoint;file;headers;method;chunkSize;attempts;delayBeforeAttempt;md5;chunkCount;chunkByteSize;cacheSize=3;currentMaxIndex=0;maxFileBytes;endpointValue;totalChunks;attemptCount;offline;paused;success;isResumed=!1;mapXhrRequest;okRecordList;eventTarget;fileName;constructor(e){this.endpoint=e.endpoint,this.file=e.file,this.fileName=encodeURI(this.file.name),this.headers=e.headers||{},this.method=e.method||"PUT",this.chunkSize=e.chunkSize||5120,this.attempts=e.attempts||5,this.delayBeforeAttempt=e.delayBeforeAttempt||1,this.md5=e.md5||"",null!=e.threadNumber&&e.threadNumber>=2&&(this.cacheSize=e.threadNumber),this.maxFileBytes=1024*(e.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.mapXhrRequest=new Map,this.okRecordList=[],this.eventTarget=Z(),this.validateOptions(),this.getEndpoint().then((()=>{for(let e=0;e<this.cacheSize;e++){const t=e;if(t<this.totalChunks){const e=100*t;e>0?Di(e).then((e=>{this.sendChunks(t)})):this.sendChunks(t)}}})),"undefined"!=typeof window&&(window.addEventListener("online",(()=>{this.offline&&(this.offline=!1,this.dispatch("online"),this.sendChunks())})),window.addEventListener("offline",(()=>{this.offline=!0,this.dispatch("offline")})))}on(e,t){this.eventTarget.on(e,t)}abort(){this.pause(),this.mapXhrRequest.size>0&&(this.mapXhrRequest.forEach(((e,t)=>{e&&e.abort()})),this.mapXhrRequest.clear())}pause(){this.paused=!0}async resume(){this.paused=!1,this.isResumed=!0;for(let e=0;e<this.totalChunks;e++){if(this.mapXhrRequest.size>=this.cacheSize){const e=500*(this.mapXhrRequest.size-this.cacheSize+1);await Di(e)}this.sendChunks(e)}}dispatch(e,t){this.eventTarget.emit(e,t)}validateOptions(){if(!this.endpoint||"function"!=typeof this.endpoint&&"string"!=typeof this.endpoint)throw new TypeError("endpoint必须为:文件上传URL字符串,或返回地址的函数!");if(!(this.file instanceof File))throw new TypeError("file必须为文件对象");if(this.headers&&"object"!=typeof this.headers)throw new TypeError("文件头必须为对象或空!");if(this.chunkSize&&("number"!=typeof this.chunkSize||this.chunkSize<=0||this.chunkSize%256!=0))throw new TypeError("chunkSize必须大于0,并是256的整数倍");if(this.maxFileBytes>0&&this.maxFileBytes<this.file.size)throw new Error(`文件大小超过最大允许值:(${this.file.size} > ${this.maxFileBytes})`);if(this.attempts&&("number"!=typeof this.attempts||this.attempts<=0))throw new TypeError("重试次数必须为正数!");if(this.delayBeforeAttempt&&("number"!=typeof this.delayBeforeAttempt||this.delayBeforeAttempt<0))throw new TypeError("延时重试时间必须为正数!默认为1")}getEndpoint(){return"string"==typeof this.endpoint?(this.endpointValue=this.endpoint,Promise.resolve(this.endpoint)):this.endpoint(this.file).then((e=>(this.endpointValue=e,this.endpointValue)))}getChunk(e=0){return new Promise((t=>{const n=1===this.totalChunks?this.file.size:this.chunkByteSize,r=n*e,i=new FileReader;i.onload=function(){if(null!==this.result){const n=new Blob([this.result],{type:"application/octet-stream"});t({chunkIndex:e,chunkContent:n})}else t(void 0)},i.readAsArrayBuffer(this.file.slice(r,r+n))}))}xhrPromise(e){return new Promise(((t,n)=>{const r=e.headers,i=Number(r.ChunkIndex),o=no({...e},((e,r)=>(this.mapXhrRequest.delete(i),e?n(e):t(r))));this.mapXhrRequest.set(i,o)}))}sendChunk(e,t){if(!t)return;const n=e*this.chunkByteSize,r=n+t.size-1,i={...this.headers,FileName:this.fileName,FileMD5:this.md5,ChunkIndex:e.toString(),"Content-Type":this.file.type,"Content-Range":`bytes ${n}-${r}/${this.file.size}`};return this.dispatch("attempt",{chunkNumber:e,chunkSize:t.size}),this.endpointValue?this.xhrPromise({headers:i,url:this.endpointValue,method:this.method,body:t}):(console.warn("文件上传endpointValue不能为空!"),void this.dispatch("error",{message:"文件上传endpointValue不能为空!取消上传!",chunk:e,attempts:this.attemptCount}))}sendChunks(e=0){this.paused||this.offline||this.success||this.okRecordList.indexOf(e)<0&&(this.currentMaxIndex<e&&(this.currentMaxIndex=e),this.getChunk(e).then((e=>{if(e){const{chunkIndex:t,chunkContent:n}=e;return this.sendChunk(t,n)}})).then((t=>{if(t)if(ro.includes(t.statusCode)){const n=JSON.parse(t.body).RESULTVALUE;if(n.STATE){this.attemptCount=0,this.chunkCount=this.chunkCount+1;const e=Math.round(n.INDEX/this.chunkByteSize);this.mapXhrRequest.delete(e),this.dispatch("chunkSuccess",{chunkCount:this.chunkCount,attempts:this.attemptCount,chunkNumber:e}),this.okRecordList.push(e),this.chunkCount<this.totalChunks&&!this.isResumed&&this.currentMaxIndex<this.totalChunks-1&&(this.currentMaxIndex++,this.sendChunks(this.currentMaxIndex));const t=100*this.chunkCount/this.totalChunks;this.dispatch("progress",t),n.END&&(this.success=!0,this.dispatch("success",this.fileName),this.okRecordList.length=0)}else{const t=`服务器错误:${n.NAME},停止上传。`;console.log(t),this.dispatch("error",{message:t,chunkNumber:e,attempts:0}),this.mapXhrRequest.delete(e),Di(1e3).then((t=>this.sendChunks(e)))}}else if(null!=t&&io.includes(t.statusCode)){if(this.paused||this.offline)return}else{if(this.paused||this.offline)return;console.log(`服务器错误:${t?.statusCode},停止上传。`),this.dispatch("error",{message:`服务器错误:${t?.statusCode},停止上传。`,chunkNumber:this.chunkCount,attempts:this.attemptCount})}else console.warn("上传失败的索引为:"+e)})).catch((e=>{!this.paused&&this.offline})))}}const so=e=>new oo(e),ao=new class{hasClass(e,t){return e.className.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))}addClass(e,t){this.hasClass(e,t)||(e.className+=" "+t)}removeClass(e,t){if(this.hasClass(e,t)){const n=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className=e.className.replace(n," ")}}toggleClass(e,t){this.hasClass(e,t)?this.removeClass(e,t):this.addClass(e,t)}setCSSProperty(e,t,n){e?.style.setProperty(t,n)}getBoundingClientRect(e){return e&&e.getBoundingClientRect?e.getBoundingClientRect():0}getViewportOffset(e){const t=document.documentElement,n=t.scrollLeft,r=t.scrollTop,i=t.clientLeft,o=t.clientTop,s=globalThis.scrollX,a=globalThis.scrollY,l=this.getBoundingClientRect(e),{left:c,top:u,width:h,height:f}=l,d=c+s-((s||n)-(i||0)),p=u+a-((a||r)-(o||0)),g=globalThis.document.documentElement.clientWidth,m=globalThis.document.documentElement.clientHeight;return{left:d,top:p,right:g-h-d,bottom:m-f-p,rightIncludeBody:g-d,bottomIncludeBody:m-p}}hackCss(e,t){const n={};return["webkit","Moz","ms","OT"].forEach((r=>{n[`${r}${ge.UpperFirst(e)}`]=t})),{...n,[e]:t}}on(e,t,n){e&&t&&n&&e.addEventListener(t,n,!1)}off(e,t,n){e&&t&&n&&e.removeEventListener(t,n,!1)}once(e,t,n){const r=function(...i){n&&n.apply(this,i),this.off(e,t,r)};this.on(e,t,r)}},lo=y({isLock:!1,lockTime:0});function co(e){lo.isLock=e,e&&(Ce(),console.log("锁屏了……"))}function uo(){return lo.isLock}let ho;function fo(){clearInterval(ho),globalThis.location.href.indexOf("/login")>0||lo.isLock||(co(!1),lo.lockTime=function(){let e=3600;return ue.Config.UI?.LockTime&&ue.Config.UI?.LockTime>=10&&(e=ue.Config.UI.LockTime),e}(),ho=setInterval((()=>{if(lo.lockTime--,lo.lockTime<=0)return co(!0),clearInterval(ho)}),1e3))}function po(){fo(),document.addEventListener("mousedown",fo),document.addEventListener("mousemove",fo)}function go(){document.removeEventListener("mousedown",fo),document.removeEventListener("mousemove",fo)}function mo(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 vo,yo={exports:{}},wo=(vo||(vo=1,yo.exports=function e(t,n,r){function i(s,a){if(!n[s]){if(!t[s]){if(!a&&mo)return mo(s);if(o)return o(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[s]={exports:{}};t[s][0].call(c.exports,(function(e){return i(t[s][1][e]||e)}),c,c.exports,e,t,n,r)}return n[s].exports}for(var o=mo,s=0;s<r.length;s++)i(r[s]);return i}({1:[function(e,t,n){(function(e){var n,r,i=e.MutationObserver||e.WebKitMutationObserver;if(i){var o=0,s=new i(u),a=e.document.createTextNode("");s.observe(a,{characterData:!0}),n=function(){a.data=o=++o%2}}else if(e.setImmediate||void 0===e.MessageChannel)n="document"in e&&"onreadystatechange"in e.document.createElement("script")?function(){var t=e.document.createElement("script");t.onreadystatechange=function(){u(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},e.document.documentElement.appendChild(t)}:function(){setTimeout(u,0)};else{var l=new e.MessageChannel;l.port1.onmessage=u,n=function(){l.port2.postMessage(0)}}var c=[];function u(){var e,t;r=!0;for(var n=c.length;n;){for(t=c,c=[],e=-1;++e<n;)t[e]();n=c.length}r=!1}t.exports=function(e){1!==c.push(e)||r||n()}}).call(this,void 0!==Y?Y:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],2:[function(e,t,n){var r=e(1);function i(){}var o={},s=["REJECTED"],a=["FULFILLED"],l=["PENDING"];function c(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=l,this.queue=[],this.outcome=void 0,e!==i&&d(this,e)}function u(e,t,n){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof n&&(this.onRejected=n,this.callRejected=this.otherCallRejected)}function h(e,t,n){r((function(){var r;try{r=t(n)}catch(t){return o.reject(e,t)}r===e?o.reject(e,new TypeError("Cannot resolve promise with itself")):o.resolve(e,r)}))}function f(e){var t=e&&e.then;if(e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments)}}function d(e,t){var n=!1;function r(t){n||(n=!0,o.reject(e,t))}function i(t){n||(n=!0,o.resolve(e,t))}var s=p((function(){t(i,r)}));"error"===s.status&&r(s.value)}function p(e,t){var n={};try{n.value=e(t),n.status="success"}catch(e){n.status="error",n.value=e}return n}t.exports=c,c.prototype.catch=function(e){return this.then(null,e)},c.prototype.then=function(e,t){if("function"!=typeof e&&this.state===a||"function"!=typeof t&&this.state===s)return this;var n=new this.constructor(i);return this.state!==l?h(n,this.state===a?e:t,this.outcome):this.queue.push(new u(n,e,t)),n},u.prototype.callFulfilled=function(e){o.resolve(this.promise,e)},u.prototype.otherCallFulfilled=function(e){h(this.promise,this.onFulfilled,e)},u.prototype.callRejected=function(e){o.reject(this.promise,e)},u.prototype.otherCallRejected=function(e){h(this.promise,this.onRejected,e)},o.resolve=function(e,t){var n=p(f,t);if("error"===n.status)return o.reject(e,n.value);var r=n.value;if(r)d(e,r);else{e.state=a,e.outcome=t;for(var i=-1,s=e.queue.length;++i<s;)e.queue[i].callFulfilled(t)}return e},o.reject=function(e,t){e.state=s,e.outcome=t;for(var n=-1,r=e.queue.length;++n<r;)e.queue[n].callRejected(t);return e},c.resolve=function(e){return e instanceof this?e:o.resolve(new this(i),e)},c.reject=function(e){var t=new this(i);return o.reject(t,e)},c.all=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var n=e.length,r=!1;if(!n)return this.resolve([]);for(var s=new Array(n),a=0,l=-1,c=new this(i);++l<n;)u(e[l],l);return c;function u(e,i){t.resolve(e).then((function(e){s[i]=e,++a!==n||r||(r=!0,o.resolve(c,s))}),(function(e){r||(r=!0,o.reject(c,e))}))}},c.race=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var n=e.length,r=!1;if(!n)return this.resolve([]);for(var s=-1,a=new this(i);++s<n;)l(e[s]);return a;function l(e){t.resolve(e).then((function(e){r||(r=!0,o.resolve(a,e))}),(function(e){r||(r=!0,o.reject(a,e))}))}}},{1:1}],3:[function(e,t,n){(function(t){"function"!=typeof t.Promise&&(t.Promise=e(2))}).call(this,void 0!==Y?Y:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{2:2}],4:[function(e,t,n){var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};var o=function(){try{if("undefined"!=typeof indexedDB)return indexedDB;if("undefined"!=typeof webkitIndexedDB)return webkitIndexedDB;if("undefined"!=typeof mozIndexedDB)return mozIndexedDB;if("undefined"!=typeof OIndexedDB)return OIndexedDB;if("undefined"!=typeof msIndexedDB)return msIndexedDB}catch(e){return}}();function s(e,t){e=e||[],t=t||{};try{return new Blob(e,t)}catch(i){if("TypeError"!==i.name)throw i;for(var n=new("undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder?MozBlobBuilder:WebKitBlobBuilder),r=0;r<e.length;r+=1)n.append(e[r]);return n.getBlob(t.type)}}"undefined"==typeof Promise&&e(3);var a=Promise;function l(e,t){t&&e.then((function(e){t(null,e)}),(function(e){t(e)}))}function c(e,t,n){"function"==typeof t&&e.then(t),"function"==typeof n&&e.catch(n)}function u(e){return"string"!=typeof e&&(console.warn(e+" used as a key, but it is not a string."),e=String(e)),e}function h(){if(arguments.length&&"function"==typeof arguments[arguments.length-1])return arguments[arguments.length-1]}var f="local-forage-detect-blob-support",d=void 0,p={},g=Object.prototype.toString,m="readonly",v="readwrite";function y(e){for(var t=e.length,n=new ArrayBuffer(t),r=new Uint8Array(n),i=0;i<t;i++)r[i]=e.charCodeAt(i);return n}function w(e){return"boolean"==typeof d?a.resolve(d):function(e){return new a((function(t){var n=e.transaction(f,v),r=s([""]);n.objectStore(f).put(r,"key"),n.onabort=function(e){e.preventDefault(),e.stopPropagation(),t(!1)},n.oncomplete=function(){var e=navigator.userAgent.match(/Chrome\/(\d+)/),n=navigator.userAgent.match(/Edge\//);t(n||!e||parseInt(e[1],10)>=43)}})).catch((function(){return!1}))}(e).then((function(e){return d=e}))}function b(e){var t=p[e.name],n={};n.promise=new a((function(e,t){n.resolve=e,n.reject=t})),t.deferredOperations.push(n),t.dbReady?t.dbReady=t.dbReady.then((function(){return n.promise})):t.dbReady=n.promise}function S(e){var t=p[e.name].deferredOperations.pop();if(t)return t.resolve(),t.promise}function C(e,t){var n=p[e.name].deferredOperations.pop();if(n)return n.reject(t),n.promise}function E(e,t){return new a((function(n,r){if(p[e.name]=p[e.name]||{forages:[],db:null,dbReady:null,deferredOperations:[]},e.db){if(!t)return n(e.db);b(e),e.db.close()}var i=[e.name];t&&i.push(e.version);var s=o.open.apply(o,i);t&&(s.onupgradeneeded=function(t){var n=s.result;try{n.createObjectStore(e.storeName),t.oldVersion<=1&&n.createObjectStore(f)}catch(n){if("ConstraintError"!==n.name)throw n;console.warn('The database "'+e.name+'" has been upgraded from version '+t.oldVersion+" to version "+t.newVersion+', but the storage "'+e.storeName+'" already exists.')}}),s.onerror=function(e){e.preventDefault(),r(s.error)},s.onsuccess=function(){var t=s.result;t.onversionchange=function(e){e.target.close()},n(t),S(e)}}))}function x(e){return E(e,!1)}function k(e){return E(e,!0)}function M(e,t){if(!e.db)return!0;var n=!e.db.objectStoreNames.contains(e.storeName),r=e.version<e.db.version,i=e.version>e.db.version;if(r&&(e.version!==t&&console.warn('The database "'+e.name+"\" can't be downgraded from version "+e.db.version+" to version "+e.version+"."),e.version=e.db.version),i||n){if(n){var o=e.db.version+1;o>e.version&&(e.version=o)}return!0}return!1}function T(e){return s([y(atob(e.data))],{type:e.type})}function z(e){return e&&e.__local_forage_encoded_blob}function A(e){var t=this,n=t._initReady().then((function(){var e=p[t._dbInfo.name];if(e&&e.dbReady)return e.dbReady}));return c(n,e,e),n}function _(e,t,n,r){void 0===r&&(r=1);try{var i=e.db.transaction(e.storeName,t);n(null,i)}catch(i){if(r>0&&(!e.db||"InvalidStateError"===i.name||"NotFoundError"===i.name))return a.resolve().then((function(){if(!e.db||"NotFoundError"===i.name&&!e.db.objectStoreNames.contains(e.storeName)&&e.version<=e.db.version)return e.db&&(e.version=e.db.version+1),k(e)})).then((function(){return function(e){b(e);for(var t=p[e.name],n=t.forages,r=0;r<n.length;r++){var i=n[r];i._dbInfo.db&&(i._dbInfo.db.close(),i._dbInfo.db=null)}return e.db=null,x(e).then((function(t){return e.db=t,M(e)?k(e):t})).then((function(r){e.db=t.db=r;for(var i=0;i<n.length;i++)n[i]._dbInfo.db=r})).catch((function(t){throw C(e,t),t}))}(e).then((function(){_(e,t,n,r-1)}))})).catch(n);n(i)}}var L={_driver:"asyncStorage",_initStorage:function(e){var t=this,n={db:null};if(e)for(var r in e)n[r]=e[r];var i=p[n.name];i||(i={forages:[],db:null,dbReady:null,deferredOperations:[]},p[n.name]=i),i.forages.push(t),t._initReady||(t._initReady=t.ready,t.ready=A);var o=[];function s(){return a.resolve()}for(var l=0;l<i.forages.length;l++){var c=i.forages[l];c!==t&&o.push(c._initReady().catch(s))}var u=i.forages.slice(0);return a.all(o).then((function(){return n.db=i.db,x(n)})).then((function(e){return n.db=e,M(n,t._defaultConfig.version)?k(n):e})).then((function(e){n.db=i.db=e,t._dbInfo=n;for(var r=0;r<u.length;r++){var o=u[r];o!==t&&(o._dbInfo.db=n.db,o._dbInfo.version=n.version)}}))},_support:function(){try{if(!o||!o.open)return!1;var e="undefined"!=typeof openDatabase&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),t="function"==typeof fetch&&-1!==fetch.toString().indexOf("[native code");return(!e||t)&&"undefined"!=typeof indexedDB&&"undefined"!=typeof IDBKeyRange}catch(e){return!1}}(),iterate:function(e,t){var n=this,r=new a((function(t,r){n.ready().then((function(){_(n._dbInfo,m,(function(i,o){if(i)return r(i);try{var s=o.objectStore(n._dbInfo.storeName).openCursor(),a=1;s.onsuccess=function(){var n=s.result;if(n){var r=n.value;z(r)&&(r=T(r));var i=e(r,n.key,a++);void 0!==i?t(i):n.continue()}else t()},s.onerror=function(){r(s.error)}}catch(e){r(e)}}))})).catch(r)}));return l(r,t),r},getItem:function(e,t){var n=this;e=u(e);var r=new a((function(t,r){n.ready().then((function(){_(n._dbInfo,m,(function(i,o){if(i)return r(i);try{var s=o.objectStore(n._dbInfo.storeName).get(e);s.onsuccess=function(){var e=s.result;void 0===e&&(e=null),z(e)&&(e=T(e)),t(e)},s.onerror=function(){r(s.error)}}catch(e){r(e)}}))})).catch(r)}));return l(r,t),r},setItem:function(e,t,n){var r=this;e=u(e);var i=new a((function(n,i){var o;r.ready().then((function(){return o=r._dbInfo,"[object Blob]"===g.call(t)?w(o.db).then((function(e){return e?t:function(e){return new a((function(t,n){var r=new FileReader;r.onerror=n,r.onloadend=function(n){var r=btoa(n.target.result||"");t({__local_forage_encoded_blob:!0,data:r,type:e.type})},r.readAsBinaryString(e)}))}(t)})):t})).then((function(t){_(r._dbInfo,v,(function(o,s){if(o)return i(o);try{var a=s.objectStore(r._dbInfo.storeName);null===t&&(t=void 0);var l=a.put(t,e);s.oncomplete=function(){void 0===t&&(t=null),n(t)},s.onabort=s.onerror=function(){var e=l.error?l.error:l.transaction.error;i(e)}}catch(e){i(e)}}))})).catch(i)}));return l(i,n),i},removeItem:function(e,t){var n=this;e=u(e);var r=new a((function(t,r){n.ready().then((function(){_(n._dbInfo,v,(function(i,o){if(i)return r(i);try{var s=o.objectStore(n._dbInfo.storeName).delete(e);o.oncomplete=function(){t()},o.onerror=function(){r(s.error)},o.onabort=function(){var e=s.error?s.error:s.transaction.error;r(e)}}catch(e){r(e)}}))})).catch(r)}));return l(r,t),r},clear:function(e){var t=this,n=new a((function(e,n){t.ready().then((function(){_(t._dbInfo,v,(function(r,i){if(r)return n(r);try{var o=i.objectStore(t._dbInfo.storeName).clear();i.oncomplete=function(){e()},i.onabort=i.onerror=function(){var e=o.error?o.error:o.transaction.error;n(e)}}catch(e){n(e)}}))})).catch(n)}));return l(n,e),n},length:function(e){var t=this,n=new a((function(e,n){t.ready().then((function(){_(t._dbInfo,m,(function(r,i){if(r)return n(r);try{var o=i.objectStore(t._dbInfo.storeName).count();o.onsuccess=function(){e(o.result)},o.onerror=function(){n(o.error)}}catch(e){n(e)}}))})).catch(n)}));return l(n,e),n},key:function(e,t){var n=this,r=new a((function(t,r){e<0?t(null):n.ready().then((function(){_(n._dbInfo,m,(function(i,o){if(i)return r(i);try{var s=o.objectStore(n._dbInfo.storeName),a=!1,l=s.openKeyCursor();l.onsuccess=function(){var n=l.result;n?0===e||a?t(n.key):(a=!0,n.advance(e)):t(null)},l.onerror=function(){r(l.error)}}catch(e){r(e)}}))})).catch(r)}));return l(r,t),r},keys:function(e){var t=this,n=new a((function(e,n){t.ready().then((function(){_(t._dbInfo,m,(function(r,i){if(r)return n(r);try{var o=i.objectStore(t._dbInfo.storeName).openKeyCursor(),s=[];o.onsuccess=function(){var t=o.result;t?(s.push(t.key),t.continue()):e(s)},o.onerror=function(){n(o.error)}}catch(e){n(e)}}))})).catch(n)}));return l(n,e),n},dropInstance:function(e,t){t=h.apply(this,arguments);var n,r=this.config();if((e="function"!=typeof e&&e||{}).name||(e.name=e.name||r.name,e.storeName=e.storeName||r.storeName),e.name){var i=e.name===r.name&&this._dbInfo.db?a.resolve(this._dbInfo.db):x(e).then((function(t){var n=p[e.name],r=n.forages;n.db=t;for(var i=0;i<r.length;i++)r[i]._dbInfo.db=t;return t}));n=e.storeName?i.then((function(t){if(t.objectStoreNames.contains(e.storeName)){var n=t.version+1;b(e);var r=p[e.name],i=r.forages;t.close();for(var s=0;s<i.length;s++){var l=i[s];l._dbInfo.db=null,l._dbInfo.version=n}var c=new a((function(t,r){var i=o.open(e.name,n);i.onerror=function(e){i.result.close(),r(e)},i.onupgradeneeded=function(){i.result.deleteObjectStore(e.storeName)},i.onsuccess=function(){var e=i.result;e.close(),t(e)}}));return c.then((function(e){r.db=e;for(var t=0;t<i.length;t++){var n=i[t];n._dbInfo.db=e,S(n._dbInfo)}})).catch((function(t){throw(C(e,t)||a.resolve()).catch((function(){})),t}))}})):i.then((function(t){b(e);var n=p[e.name],r=n.forages;t.close();for(var i=0;i<r.length;i++)r[i]._dbInfo.db=null;var s=new a((function(t,n){var r=o.deleteDatabase(e.name);r.onerror=function(){var e=r.result;e&&e.close(),n(r.error)},r.onblocked=function(){console.warn('dropInstance blocked for database "'+e.name+'" until all open connections are closed')},r.onsuccess=function(){var e=r.result;e&&e.close(),t(e)}}));return s.then((function(e){n.db=e;for(var t=0;t<r.length;t++)S(r[t]._dbInfo)})).catch((function(t){throw(C(e,t)||a.resolve()).catch((function(){})),t}))}))}else n=a.reject("Invalid arguments");return l(n,t),n}};var R="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",I=/^~~local_forage_type~([^~]+)~/,D="__lfsc__:",P="arbf",N="blob",O="si08",B="ui08",F="uic8",W="si16",U="si32",j="ur16",$="ui32",H="fl32",G="fl64",q=Object.prototype.toString;function X(e){var t,n,r,i,o,s=.75*e.length,a=e.length,l=0;"="===e[e.length-1]&&(s--,"="===e[e.length-2]&&s--);var c=new ArrayBuffer(s),u=new Uint8Array(c);for(t=0;t<a;t+=4)n=R.indexOf(e[t]),r=R.indexOf(e[t+1]),i=R.indexOf(e[t+2]),o=R.indexOf(e[t+3]),u[l++]=n<<2|r>>4,u[l++]=(15&r)<<4|i>>2,u[l++]=(3&i)<<6|63&o;return c}function V(e){var t,n=new Uint8Array(e),r="";for(t=0;t<n.length;t+=3)r+=R[n[t]>>2],r+=R[(3&n[t])<<4|n[t+1]>>4],r+=R[(15&n[t+1])<<2|n[t+2]>>6],r+=R[63&n[t+2]];return n.length%3==2?r=r.substring(0,r.length-1)+"=":n.length%3==1&&(r=r.substring(0,r.length-2)+"=="),r}var Z={serialize:function(e,t){var n="";if(e&&(n=q.call(e)),e&&("[object ArrayBuffer]"===n||e.buffer&&"[object ArrayBuffer]"===q.call(e.buffer))){var r,i=D;e instanceof ArrayBuffer?(r=e,i+=P):(r=e.buffer,"[object Int8Array]"===n?i+=O:"[object Uint8Array]"===n?i+=B:"[object Uint8ClampedArray]"===n?i+=F:"[object Int16Array]"===n?i+=W:"[object Uint16Array]"===n?i+=j:"[object Int32Array]"===n?i+=U:"[object Uint32Array]"===n?i+=$:"[object Float32Array]"===n?i+=H:"[object Float64Array]"===n?i+=G:t(new Error("Failed to get type for BinaryArray"))),t(i+V(r))}else if("[object Blob]"===n){var o=new FileReader;o.onload=function(){var n="~~local_forage_type~"+e.type+"~"+V(this.result);t(D+N+n)},o.readAsArrayBuffer(e)}else try{t(JSON.stringify(e))}catch(n){console.error("Couldn't convert value into a JSON string: ",e),t(null,n)}},deserialize:function(e){if(e.substring(0,9)!==D)return JSON.parse(e);var t,n=e.substring(13),r=e.substring(9,13);if(r===N&&I.test(n)){var i=n.match(I);t=i[1],n=n.substring(i[0].length)}var o=X(n);switch(r){case P:return o;case N:return s([o],{type:t});case O:return new Int8Array(o);case B:return new Uint8Array(o);case F:return new Uint8ClampedArray(o);case W:return new Int16Array(o);case j:return new Uint16Array(o);case U:return new Int32Array(o);case $:return new Uint32Array(o);case H:return new Float32Array(o);case G:return new Float64Array(o);default:throw new Error("Unkown type: "+r)}},stringToBuffer:X,bufferToString:V};function K(e,t,n,r){e.executeSql("CREATE TABLE IF NOT EXISTS "+t.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],n,r)}function Y(e,t,n,r,i,o){e.executeSql(n,r,i,(function(e,s){s.code===s.SYNTAX_ERR?e.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[t.storeName],(function(e,a){a.rows.length?o(e,s):K(e,t,(function(){e.executeSql(n,r,i,o)}),o)}),o):o(e,s)}),o)}function J(e,t,n,r){var i=this;e=u(e);var o=new a((function(o,s){i.ready().then((function(){void 0===t&&(t=null);var a=t,l=i._dbInfo;l.serializer.serialize(t,(function(t,c){c?s(c):l.db.transaction((function(n){Y(n,l,"INSERT OR REPLACE INTO "+l.storeName+" (key, value) VALUES (?, ?)",[e,t],(function(){o(a)}),(function(e,t){s(t)}))}),(function(t){if(t.code===t.QUOTA_ERR){if(r>0)return void o(J.apply(i,[e,a,n,r-1]));s(t)}}))}))})).catch(s)}));return l(o,n),o}var Q={_driver:"webSQLStorage",_initStorage:function(e){var t=this,n={db:null};if(e)for(var r in e)n[r]="string"!=typeof e[r]?e[r].toString():e[r];var i=new a((function(e,r){try{n.db=openDatabase(n.name,String(n.version),n.description,n.size)}catch(e){return r(e)}n.db.transaction((function(i){K(i,n,(function(){t._dbInfo=n,e()}),(function(e,t){r(t)}))}),r)}));return n.serializer=Z,i},_support:"function"==typeof openDatabase,iterate:function(e,t){var n=this,r=new a((function(t,r){n.ready().then((function(){var i=n._dbInfo;i.db.transaction((function(n){Y(n,i,"SELECT * FROM "+i.storeName,[],(function(n,r){for(var o=r.rows,s=o.length,a=0;a<s;a++){var l=o.item(a),c=l.value;if(c&&(c=i.serializer.deserialize(c)),void 0!==(c=e(c,l.key,a+1)))return void t(c)}t()}),(function(e,t){r(t)}))}))})).catch(r)}));return l(r,t),r},getItem:function(e,t){var n=this;e=u(e);var r=new a((function(t,r){n.ready().then((function(){var i=n._dbInfo;i.db.transaction((function(n){Y(n,i,"SELECT * FROM "+i.storeName+" WHERE key = ? LIMIT 1",[e],(function(e,n){var r=n.rows.length?n.rows.item(0).value:null;r&&(r=i.serializer.deserialize(r)),t(r)}),(function(e,t){r(t)}))}))})).catch(r)}));return l(r,t),r},setItem:function(e,t,n){return J.apply(this,[e,t,n,1])},removeItem:function(e,t){var n=this;e=u(e);var r=new a((function(t,r){n.ready().then((function(){var i=n._dbInfo;i.db.transaction((function(n){Y(n,i,"DELETE FROM "+i.storeName+" WHERE key = ?",[e],(function(){t()}),(function(e,t){r(t)}))}))})).catch(r)}));return l(r,t),r},clear:function(e){var t=this,n=new a((function(e,n){t.ready().then((function(){var r=t._dbInfo;r.db.transaction((function(t){Y(t,r,"DELETE FROM "+r.storeName,[],(function(){e()}),(function(e,t){n(t)}))}))})).catch(n)}));return l(n,e),n},length:function(e){var t=this,n=new a((function(e,n){t.ready().then((function(){var r=t._dbInfo;r.db.transaction((function(t){Y(t,r,"SELECT COUNT(key) as c FROM "+r.storeName,[],(function(t,n){var r=n.rows.item(0).c;e(r)}),(function(e,t){n(t)}))}))})).catch(n)}));return l(n,e),n},key:function(e,t){var n=this,r=new a((function(t,r){n.ready().then((function(){var i=n._dbInfo;i.db.transaction((function(n){Y(n,i,"SELECT key FROM "+i.storeName+" WHERE id = ? LIMIT 1",[e+1],(function(e,n){var r=n.rows.length?n.rows.item(0).key:null;t(r)}),(function(e,t){r(t)}))}))})).catch(r)}));return l(r,t),r},keys:function(e){var t=this,n=new a((function(e,n){t.ready().then((function(){var r=t._dbInfo;r.db.transaction((function(t){Y(t,r,"SELECT key FROM "+r.storeName,[],(function(t,n){for(var r=[],i=0;i<n.rows.length;i++)r.push(n.rows.item(i).key);e(r)}),(function(e,t){n(t)}))}))})).catch(n)}));return l(n,e),n},dropInstance:function(e,t){t=h.apply(this,arguments);var n=this.config();(e="function"!=typeof e&&e||{}).name||(e.name=e.name||n.name,e.storeName=e.storeName||n.storeName);var r,i=this;return r=e.name?new a((function(t){var r;r=e.name===n.name?i._dbInfo.db:openDatabase(e.name,"","",0),e.storeName?t({db:r,storeNames:[e.storeName]}):t(function(e){return new a((function(t,n){e.transaction((function(r){r.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],(function(n,r){for(var i=[],o=0;o<r.rows.length;o++)i.push(r.rows.item(o).name);t({db:e,storeNames:i})}),(function(e,t){n(t)}))}),(function(e){n(e)}))}))}(r))})).then((function(e){return new a((function(t,n){e.db.transaction((function(r){function i(e){return new a((function(t,n){r.executeSql("DROP TABLE IF EXISTS "+e,[],(function(){t()}),(function(e,t){n(t)}))}))}for(var o=[],s=0,l=e.storeNames.length;s<l;s++)o.push(i(e.storeNames[s]));a.all(o).then((function(){t()})).catch((function(e){n(e)}))}),(function(e){n(e)}))}))})):a.reject("Invalid arguments"),l(r,t),r}};function ee(e,t){var n=e.name+"/";return e.storeName!==t.storeName&&(n+=e.storeName+"/"),n}function te(){return!function(){var e="_localforage_support_test";try{return localStorage.setItem(e,!0),localStorage.removeItem(e),!1}catch(e){return!0}}()||localStorage.length>0}var ne={_driver:"localStorageWrapper",_initStorage:function(e){var t={};if(e)for(var n in e)t[n]=e[n];return t.keyPrefix=ee(e,this._defaultConfig),te()?(this._dbInfo=t,t.serializer=Z,a.resolve()):a.reject()},_support:function(){try{return"undefined"!=typeof localStorage&&"setItem"in localStorage&&!!localStorage.setItem}catch(e){return!1}}(),iterate:function(e,t){var n=this,r=n.ready().then((function(){for(var t=n._dbInfo,r=t.keyPrefix,i=r.length,o=localStorage.length,s=1,a=0;a<o;a++){var l=localStorage.key(a);if(0===l.indexOf(r)){var c=localStorage.getItem(l);if(c&&(c=t.serializer.deserialize(c)),void 0!==(c=e(c,l.substring(i),s++)))return c}}}));return l(r,t),r},getItem:function(e,t){var n=this;e=u(e);var r=n.ready().then((function(){var t=n._dbInfo,r=localStorage.getItem(t.keyPrefix+e);return r&&(r=t.serializer.deserialize(r)),r}));return l(r,t),r},setItem:function(e,t,n){var r=this;e=u(e);var i=r.ready().then((function(){void 0===t&&(t=null);var n=t;return new a((function(i,o){var s=r._dbInfo;s.serializer.serialize(t,(function(t,r){if(r)o(r);else try{localStorage.setItem(s.keyPrefix+e,t),i(n)}catch(e){"QuotaExceededError"!==e.name&&"NS_ERROR_DOM_QUOTA_REACHED"!==e.name||o(e),o(e)}}))}))}));return l(i,n),i},removeItem:function(e,t){var n=this;e=u(e);var r=n.ready().then((function(){var t=n._dbInfo;localStorage.removeItem(t.keyPrefix+e)}));return l(r,t),r},clear:function(e){var t=this,n=t.ready().then((function(){for(var e=t._dbInfo.keyPrefix,n=localStorage.length-1;n>=0;n--){var r=localStorage.key(n);0===r.indexOf(e)&&localStorage.removeItem(r)}}));return l(n,e),n},length:function(e){var t=this.keys().then((function(e){return e.length}));return l(t,e),t},key:function(e,t){var n=this,r=n.ready().then((function(){var t,r=n._dbInfo;try{t=localStorage.key(e)}catch(e){t=null}return t&&(t=t.substring(r.keyPrefix.length)),t}));return l(r,t),r},keys:function(e){var t=this,n=t.ready().then((function(){for(var e=t._dbInfo,n=localStorage.length,r=[],i=0;i<n;i++){var o=localStorage.key(i);0===o.indexOf(e.keyPrefix)&&r.push(o.substring(e.keyPrefix.length))}return r}));return l(n,e),n},dropInstance:function(e,t){if(t=h.apply(this,arguments),!(e="function"!=typeof e&&e||{}).name){var n=this.config();e.name=e.name||n.name,e.storeName=e.storeName||n.storeName}var r,i=this;return r=e.name?new a((function(t){e.storeName?t(ee(e,i._defaultConfig)):t(e.name+"/")})).then((function(e){for(var t=localStorage.length-1;t>=0;t--){var n=localStorage.key(t);0===n.indexOf(e)&&localStorage.removeItem(n)}})):a.reject("Invalid arguments"),l(r,t),r}},re=function(e,t){return e===t||"number"==typeof e&&"number"==typeof t&&isNaN(e)&&isNaN(t)},ie=function(e,t){for(var n=e.length,r=0;r<n;){if(re(e[r],t))return!0;r++}return!1},oe=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},se={},ae={},le={INDEXEDDB:L,WEBSQL:Q,LOCALSTORAGE:ne},ce=[le.INDEXEDDB._driver,le.WEBSQL._driver,le.LOCALSTORAGE._driver],ue=["dropInstance"],he=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(ue),fe={description:"",driver:ce.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function de(e,t){e[t]=function(){var n=arguments;return e.ready().then((function(){return e[t].apply(e,n)}))}}function pe(){for(var e=1;e<arguments.length;e++){var t=arguments[e];if(t)for(var n in t)t.hasOwnProperty(n)&&(oe(t[n])?arguments[0][n]=t[n].slice():arguments[0][n]=t[n])}return arguments[0]}var ge=function(){function e(t){for(var n in function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),le)if(le.hasOwnProperty(n)){var r=le[n],i=r._driver;this[n]=i,se[i]||this.defineDriver(r)}this._defaultConfig=pe({},fe),this._config=pe({},this._defaultConfig,t),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch((function(){}))}return e.prototype.config=function(e){if("object"===(void 0===e?"undefined":r(e))){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var t in e){if("storeName"===t&&(e[t]=e[t].replace(/\W/g,"_")),"version"===t&&"number"!=typeof e[t])return new Error("Database version must be a number.");this._config[t]=e[t]}return!("driver"in e)||!e.driver||this.setDriver(this._config.driver)}return"string"==typeof e?this._config[e]:this._config},e.prototype.defineDriver=function(e,t,n){var r=new a((function(t,n){try{var r=e._driver,i=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!e._driver)return void n(i);for(var o=he.concat("_initStorage"),s=0,c=o.length;s<c;s++){var u=o[s];if((!ie(ue,u)||e[u])&&"function"!=typeof e[u])return void n(i)}!function(){for(var t=function(e){return function(){var t=new Error("Method "+e+" is not implemented by the current driver"),n=a.reject(t);return l(n,arguments[arguments.length-1]),n}},n=0,r=ue.length;n<r;n++){var i=ue[n];e[i]||(e[i]=t(i))}}();var h=function(n){se[r]&&console.info("Redefining LocalForage driver: "+r),se[r]=e,ae[r]=n,t()};"_support"in e?e._support&&"function"==typeof e._support?e._support().then(h,n):h(!!e._support):h(!0)}catch(e){n(e)}}));return c(r,t,n),r},e.prototype.driver=function(){return this._driver||null},e.prototype.getDriver=function(e,t,n){var r=se[e]?a.resolve(se[e]):a.reject(new Error("Driver not found."));return c(r,t,n),r},e.prototype.getSerializer=function(e){var t=a.resolve(Z);return c(t,e),t},e.prototype.ready=function(e){var t=this,n=t._driverSet.then((function(){return null===t._ready&&(t._ready=t._initDriver()),t._ready}));return c(n,e,e),n},e.prototype.setDriver=function(e,t,n){var r=this;oe(e)||(e=[e]);var i=this._getSupportedDrivers(e);function o(){r._config.driver=r.driver()}function s(e){return r._extend(e),o(),r._ready=r._initStorage(r._config),r._ready}var l=null!==this._driverSet?this._driverSet.catch((function(){return a.resolve()})):a.resolve();return this._driverSet=l.then((function(){var e=i[0];return r._dbInfo=null,r._ready=null,r.getDriver(e).then((function(e){r._driver=e._driver,o(),r._wrapLibraryMethodsWithReady(),r._initDriver=function(e){return function(){var t=0;return function n(){for(;t<e.length;){var i=e[t];return t++,r._dbInfo=null,r._ready=null,r.getDriver(i).then(s).catch(n)}o();var l=new Error("No available storage method found.");return r._driverSet=a.reject(l),r._driverSet}()}}(i)}))})).catch((function(){o();var e=new Error("No available storage method found.");return r._driverSet=a.reject(e),r._driverSet})),c(this._driverSet,t,n),this._driverSet},e.prototype.supports=function(e){return!!ae[e]},e.prototype._extend=function(e){pe(this,e)},e.prototype._getSupportedDrivers=function(e){for(var t=[],n=0,r=e.length;n<r;n++){var i=e[n];this.supports(i)&&t.push(i)}return t},e.prototype._wrapLibraryMethodsWithReady=function(){for(var e=0,t=he.length;e<t;e++)de(this,he[e])},e.prototype.createInstance=function(t){return new e(t)},e}(),me=new ge;t.exports=me},{3:3}]},{},[4])(4)),yo.exports);
2
2
  /*!
3
3
  localForage -- Offline Storage, Improved
4
4
  Version 1.10.0
5
5
  https://localforage.github.io/localForage
6
6
  (c) 2013-2017 Mozilla, Apache License 2.0
7
- */const wo=Z(yo);var bo,So={exports:{}};bo=()=>{const e=globalThis;e.HTMLElement||console.warn("streamsaver is meant to run on browsers main thread");let t=null,n=!1;const r=e.WebStreamsPolyfill||{};let i=/constructor/i.test(e.HTMLElement)||!!e.safari||!!e.WebKitPoint;const o={createWriteStream:function(e,r=null,a=null){let l={size:null,pathname:null,writableStrategy:void 0,readableStrategy:void 0},c=0,u=null,h=null;if(Number.isFinite(r)?([a,r]=[r,a],console.warn("[StreamSaver] Deprecated pass an object as 2nd argument when creating a write stream"),l.size=a,l.writableStrategy=r):r&&r.highWaterMark?(console.warn("[StreamSaver] Deprecated pass an object as 2nd argument when creating a write stream"),l.size=a,l.writableStrategy=r):l=r||{},!i){t||(t=s(o.mitm)),u=new MessageChannel,e=encodeURIComponent(e.replace(/\//g,":")).replace(/['()]/g,escape).replace(/\*/g,"%2A");const r={transferringReadable:n,pathname:l.pathname||Math.random().toString().slice(-6)+"/"+e,headers:{"Content-Type":"application/octet-stream; charset=utf-8","Content-Disposition":"attachment; filename*=UTF-8''"+e}};l.size&&(r.headers["Content-Length"]=l.size);const i=[r,"*",[u.port2]];if(n){const e=void 0;h=new o.TransformStream(e,l.writableStrategy,l.readableStrategy);const t=h.readable;u.port1.postMessage({readableStream:t},[t])}u.port1.onmessage=e=>{e.data.download?(t.isPopup&&(t.remove(),t=null,s(o.mitm)),s(e.data.download)):e.data.abort&&(d=[],u.port1.postMessage("abort"),u.port1.onmessage=null,u.port1.close(),u.port2.close(),u=null)},t.loaded?t.postMessage(...i):t.addEventListener("load",(()=>{t.postMessage(...i)}),{once:!0})}let d=[];return!i&&h&&h.writable||new o.WritableStream({write(e){if(!(e instanceof Uint8Array))throw new TypeError("Can only write Uint8Arrays");i?d.push(e):(u.port1.postMessage(e),c+=e.length)},close(){if(i){const t=new Blob(d,{type:"application/octet-stream; charset=utf-8"}),n=document.createElement("a");n.href=URL.createObjectURL(t),n.download=e,n.click()}else u.port1.postMessage("end")},abort(){d=[],u.port1.postMessage("abort"),u.port1.onmessage=null,u.port1.close(),u.port2.close(),u=null}},l.writableStrategy)},WritableStream:e.WritableStream||r.WritableStream,supported:!0,version:{full:"2.0.5",major:2,minor:0,dot:5},mitm:"./mitm.html"};function s(e){if(!e)throw new Error("meh");const t=document.createElement("iframe");return t.hidden=!0,t.src=e,t.loaded=!1,t.name="iframe",t.isIframe=!0,t.postMessage=(...e)=>t.contentWindow.postMessage(...e),t.addEventListener("load",(()=>{t.loaded=!0}),{once:!0}),document.body.appendChild(t),t}try{new Response(new ReadableStream),"serviceWorker"in navigator||(i=!0)}catch(e){i=!0}return(()=>{try{(()=>{const{readable:e}=new TransformStream,t=new MessageChannel;t.port1.postMessage(e,[e]),t.port1.close(),t.port2.close(),n=!0,Object.defineProperty(o,"TransformStream",{configurable:!1,writable:!1,value:TransformStream})})()}catch(e){}})(),o},void 0!==So?So.exports=bo():"function"==typeof define&&"object"==typeof define.amd?define(bo):(void 0).streamSaver=bo();const Co=(null==So.exports?{}:So.exports).default||So.exports;class Eo{constructor(e,t,n=3,r=6,i=6e4){this.fileID=e,this.downloadURL=t,this.chunkByteSize=n*this.ChunkUnitM,this.eventTarget=V(),this.initIndexDB(),r>=3&&(this.cacheSize=r),i>this.requestTimeout&&(this.requestTimeout=i)}ChunkUnitM=1048576;chunkByteSize;totalChunks=1;currentDB;keys;fileMetaData=null;finishNum=0;eventTarget;cancelSource;isStarting=!1;fileName;cacheSize=6;requestTimeout=6e4;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("开始获取文件信息");const r=await Ni(t,e,n);let i=null;return r&&200===r.status&&(i=r.data),i}async getIFileMeta(){if(null===this.fileMetaData){const e=await(this.currentDB?.getItem("fileinfo"));this.fileMetaData=e||null}return this.fileMetaData}initIndexDB(){this.currentDB=wo.createInstance({name:this.fileID,driver:wo.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(null!=this.fileMetaData){const e=this.fileMetaData.chunkSize;null!=e&&e>0&&(this.chunkByteSize=e)}this.fileMetaData&&(this.totalChunks=Math.ceil(this.fileMetaData.length/this.chunkByteSize)),this.dispatchInfo("完成初始化文件信息,总分片:"+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("已暂停下载任务")}restart(){this.dispatchInfo("正在重启下载任务"),this.download()}delete(){this.cancelSource&&this.cancelSource.cancel(),wo.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("已删除下载任务")}sleep(e){return new Promise((t=>setTimeout(t,e)))}async download(e,t,n){let r=e;if(!r&&this.downloadURL&&(r=this.downloadURL),!r)throw Error("下载URL不能为空!");this.currentDB||this.initIndexDB();const i=ce.Axios.CancelToken;this.cancelSource=i.source(),this.isStarting=!0;const o={key:this.fileMetaData?.downloadID},s=n??o;let a=0;const l=this.cacheSize;let c=0;for(let u=0;u<this.totalChunks;u++){if(this.keys){const e=this.keys?.indexOf(u.toString());if(e>=0){a++,a>this.finishNum&&(this.finishNum=a,this.downloadProgress());continue}}const e=u*this.chunkByteSize;let n=e+this.chunkByteSize-1;this.fileMetaData&&n>this.fileMetaData.length&&(n=this.fileMetaData.length-1);const i={range:`bytes=${e}-${n}`};for(;c>=l;)await this.sleep(200);const o=u.toString();this.dispatchInfo(`开始下载分片${u+1}/${this.totalChunks}`),c++,Ni(r,t,s,i,"arraybuffer",this.cancelSource?.token,this.requestTimeout).then((async e=>{const t=e.data;c--,await(this.currentDB?.setItem(o,t)),a++,a>this.finishNum&&(this.finishNum=a,this.downloadProgress());const n=parseInt(o)+1;this.dispatchInfo(`完成下载分片${n}/${this.totalChunks}`),this.savefile()})).catch((e=>{c--;const t=parseInt(o)+1;this.dispatchError(`下载第${t})个分片内容失败!`)}))}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("下载错误:文件名为空!");this.dispatchInfo("开始保存下载文件:"+this.fileName);const e=Co.createWriteStream(this.fileName).getWriter();let t=0;for(let n=0;n<this.totalChunks;n++){const r=n.toString();let i=await(this.currentDB?.getItem(r));if(i||(i=await(this.currentDB?.getItem(r))),!i)return void this.dispatchError(`输出分片第${n+1})个内容为空,错误退出!`);let o=new Response(i).body;if(null===o)return void this.dispatchError(`输出分片第${n+1})个内容为空,错误退出!`);const s=o.getReader();for(;;){const{done:t,value:n}=await s.read();if(t)break;await e.write(n)}t++,this.outputProgress(t),this.dispatchInfo(`完成第${n+1}个分片输出`)}e.close(),wo.dropInstance({name:this.fileID}),this.dispatch("success"),this.isStarting=!1,this.dispatchInfo("完成文件下载")}}}function xo(e,t){let n="",r="";for(const i in t)n+=i+"="+encodeURIComponent(t[i])+"&";return n=n.replace(/&$/,""),r=/\?$/.test(e)?e+n:e.replace(/\/?$/,"?")+n,r}function ko(e={},t={}){let n;for(n in t)Ce(t[n])?e[n]=ko(e[n],t[n]):e[n]=t[n];return e}function To(e,t,n={name:void 0}){const r=e.resolve({path:t,query:n});globalThis.open(r.href,"_blank")}function zo(e){let t=e;if(e.endsWith("/")){if(e.endsWith("/#/"))return t;t=e+"#/"}else t=e+"/#/"}function Mo(e,t="/"){if(e)return e.startsWith("/")?e.startsWith(t)?e:`${t}${e}`:"/"===t?`${t}${e}`:`${t}/${e}`}function Ao(e,t){e.getRoutes().find((e=>"/"===e.path))||e.addRoute({name:"/",path:"/",redirect:t.path})}function _o(e){const t=[];let n=[];return Object.keys(e).forEach((t=>{const r=e[t];r&&n.push(...r)})),n=n.sort(((e,t)=>{let n=0,r=0;return e.meta&&(n=null!=e.meta.index?Number(e.meta.index):100),t.meta&&(r=null!=t.meta.index?Number(t.meta.index):100),n-r})),t.push(...n),n.length=0,t}function Ro(e,t=!1){let n=[];for(const r in e){const t=e[r];t&&t.length>0&&(n.push(...t),t.length=0),delete e[r]}return t&&(n=n.sort(((e,t)=>{let n=0,r=0;return null!=e.index&&(n=Number(e.index)),null!=t.index&&(r=Number(t.index)),n-r}))),n}function Lo(e,t=!1){const n=[];let r=[];return Object.keys(e).forEach((t=>{const n=e[t];n&&r.push(...n)})),t&&(r=r.sort(((e,t)=>{let n=0,r=0;return null!=e.index&&(n=Number(e.index)),null!=t.index&&(r=Number(t.index)),n-r}))),n.push(...r),r.length=0,n}const Io=new Map;function Do(e,t=!1){if(t&&Io.size>0)return Io;Io.clear();for(const n in e){const t=e[n];t&&t.length>0&&(t.forEach((e=>{let t;const n=e.layoutID;Io.has(n)&&(t=Io.get(n)),t||(t=new Array,Io.set(n,t)),t&&t.push(e)})),t.length=0),delete e[n]}return Io}function No(e,t="/"){let n=t;return e.redirect&&e.children?(n=e.path.startsWith(t)?e.path:t.endsWith("/")?t+e.path:t+"/"+e.path,No(e.children[0],n)):(n=e.path.startsWith(t)?e.path:`${t}/${e.path}`,{title:e.meta?.title,fullPath:n,path:e.path,icon:e.meta?.icon,keepAlive:e.meta?.keepAlive,name:e.name})}function Po(e){const t=function(e){if(!e)return;const t=e,n=[];if(t)for(let r of t){const e=Oo(r);e&&n.push(e)}return n}(e.bussinessRoutes),n=function(e){if(!e)return;const t=e;if(t&&t.length>0){const e=[];return t.forEach((t=>{const n=Bo(t);n&&e.push(n)})),e}}(e.widgetMenuConfig),r=function(e){if(e&&e.length>0){const t=[];return e.forEach((e=>{const n=function(e){if(e)return{id:e.id,label:e.label,layoutID:e.layoutID,container:e.container,preload:e.preload,afterid:e.afterid,bindid:e.bindid,group:e.group}}(e);n&&t.push(n)})),t}}(e.widgetConfig),i=(o=e.functionList)&&o.length>0?o:void 0;var o;const s=e.pkgObject.version,a=e.pkgObject.name,l=function(e,t){const n=`${e}_${t}`;return st.MD5(n)}(a,s);return{id:l,name:ce.Config.UI.SiteTitle,group:ce.Config.UI.Group,product:a,version:s,routes:t,widgetMenu:n,widgets:r,functions:i}}function Oo(e){if(e){let t=0;e.meta?.hidden&&(t=1);let n={path:e.path,name:e.name,title:e.meta?.title,type:t,index:e.meta?.index};if(e.children){const t=[];for(let n of e.children){const e=Oo(n);e&&t.push(e)}t.length>0&&(n.children=t)}return n}}function Bo(e){if(!e)return;const t={name:e.name,index:e.index,path:e.path,type:e.type};return e.children&&e.children.length>0&&(t.children=[],e.children.forEach((e=>{const n=Bo(e);n&&t.children?.push(n)}))),t}function Fo(e,t="IconifyList.ts"){let n="",r="const iconlist={\n",i=0;e.forEach((e=>{const t=e.split(":");if(t&&2===t.length){const o="icon"+i;n+=`import ${o} from '~icons/${t[0]}/${t[1]}'\n`,r+=`\t'${e}':${o},\n`,i++}})),i>0&&(r+="};\n",tr(n+r+"export default iconlist;","IconifyList.ts"))}function Wo(e,t){const n=Po(e);rr(n,t),ce.Message?.msg("导出系统功能权限文件成功!")}function Uo(e){let t=e.replace(/(^\s*)|(\s*$)/g,"");return t=t.replace(/[^\d]/g,""),t=t.replace(/^0/g,""),t=t.replace(/^[1-9]\d\d{1,3}$/,"100"),t}function jo(e){let t=$o(e);return t=t.replace(/^[1-9]\d\d{1,3}$/,"100"),t=t.replace(/^100\.$/,"100"),t}function $o(e){let t=e.replace(/(^\s*)|(\s*$)/g,"");return t=t.replace(/[^\d.]/g,""),t=t.replace(/^0{2}$/g,"0"),t=t.replace(/^\./g,""),t=t.replace(".","$#$").replace(/\./g,"").replace("$#$","."),t=t.replace(/^(\-)*(\d+)\.(\d\d).*$/,"$1$2.$3"),t}function Ho(e){let t=e.replace(/(^\s*)|(\s*$)/g,"");return t=t.replace(/[\.]*/g,""),t=t.replace(/(^0[\d]*)$/g,"0"),t=t.replace(/^0\d$/g,"0"),t=t.replace(/[^\d]/g,""),t}function Go(e){let t=e.replace(/[\u4e00-\u9fa5\s]+/g,"");return t=t.replace(/(^\s*)|(\s*$)/g,""),t}function qo(e){let t=e.replace(/[a-zA-Z]+/g,"");return t=t.replace(/(^\s*)|(\s*$)/g,""),t}function Xo(e){return e.replace(/(^\s*)|(\s*$)/g,"")}function Vo(e){let t=$o(e);return t=t.toString().split("."),t[0]=t[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),t=t.join("."),t}function Ko(e,t="",n="red"){return t.replace(new RegExp(e,"gi"),`<span style='color: ${n}'>${e}</span>`)}function Yo(e,t="仟佰拾亿仟佰拾万仟佰拾元角分",n=""){let r=(e+="00").indexOf(".");r>=0&&(e=e.substring(0,r)+e.substr(r+1,2)),t=t.substr(t.length-e.length);for(let i=0;i<e.length;i++)n+="零壹贰叁肆伍陆柒捌玖".substr(e.substr(i,1),1)+t.substr(i,1);return n.replace(/零角零分$/,"整").replace(/零[仟佰拾]/g,"零").replace(/零{2,}/g,"零").replace(/零([亿|万])/g,"$1").replace(/零+元/,"元").replace(/亿零{0,3}万/,"亿").replace(/^元/,"零元")}function Zo(e){return!!/^((12[0-9])|(13[0-9])|(14[5|7])|(15([0-3]|[5-9]))|(18[0|1,5-9]))\d{8}$/.test(e)}function Jo(e){return!!/\d{3}-\d{8}|\d{4}-\d{7}/.test(e)}function Qo(e){return!!/^[a-zA-Z][a-zA-Z0-9_]{4,15}$/.test(e)}function es(e){return!!/^[a-zA-Z]\w{5,15}$/.test(e)}function ts(e){return!!/^(?![a-zA-z]+$)(?!\d+$)(?![!@#$%^&\.*]+$)(?![a-zA-z\d]+$)(?![a-zA-z!@#$%^&\.*]+$)(?![\d!@#$%^&\.*]+$)[a-zA-Z\d!@#$%^&\.*]{6,16}$/.test(e)}function ns(e){let t="";return/^(?:\d+|[a-zA-Z]+|[!@#$%^&\.*]+){6,16}$/.test(e)&&(t="弱"),/^(?![a-zA-z]+$)(?!\d+$)(?![!@#$%^&\.*]+$)[a-zA-Z\d!@#$%^&\.*]{6,16}$/.test(e)&&(t="中"),/^(?![a-zA-z]+$)(?!\d+$)(?![!@#$%^&\.*]+$)(?![a-zA-z\d]+$)(?![a-zA-z!@#$%^&\.*]+$)(?![\d!@#$%^&\.*]+$)[a-zA-Z\d!@#$%^&\.*]{6,16}$/.test(e)&&(t="强"),t}function rs(e){return!!/^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/.test(e)}function is(e){return!!/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)}function os(e){return!!/^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/.test(e)}function ss(e){return!!/^[\u4e00-\u9fa5]{1,6}(·[\u4e00-\u9fa5]{1,6}){0,2}$/.test(e)}function as(e){return!!/^[1-9][0-9]{5}$/.test(e)}function ls(e){return!!/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(e)}function cs(e){return!!/^(([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-Z](([0-9]{5}[DF])|([DF]([A-HJ-NP-Z0-9])[0-9]{4})))|([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-Z][A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳使领]))$/.test(e)}function us(e){e&&ce.EventBus.emit(ne.ModalContainerWidget_LoadModal,e)}function hs(e){ce.EventBus.emit(ne.ModalContainerWidget_CloseModal,e)}let ds=[];const fs=()=>{setTimeout((async()=>{const e=await async function(){const e=await async function(e){const t=/<script.*src=["'](?<src>[^"']+)/gm,n=[];let r;for(;r=t.exec(e);)n.push(r.groups?.src??"");return n}(await fetch("/").then((e=>e.text())));if(!ds.length)return ds=e,!1;if(e.length!==ds.length)return ds=e,!0;for(let t=0;t<ds.length;t++)if(ds[t]!==e[t])return ds=e,!0;return!1}();e?confirm("页面有更新,点击确定刷新页面?")&&location.reload():fs()}),5e3)};function ps(e,t=wo.INDEXEDDB){return wo.createInstance({name:e,driver:t})}function gs(e){wo.dropInstance({name:e})}const ms=new Map,vs=t(new Map);class ys{static ZIndexMax=1;static addWindowPanel(e){ms.set(e.id,e)}static removeWindowPanel(e){ms.has(e)&&(ms.delete(e),vs.value.delete(e))}static minimizeWindowPanel(e){ms.has(e)&&vs.value.set(e,-1)}static openWindowPanel(e){ms.has(e)&&vs.value.set(e,1)}}const ws={width:1024,height:1024,body:'<path fill="currentColor" fill-rule="evenodd" d="M799.855 166.312c.023.007.043.018.084.059l57.69 57.69c.041.041.052.06.059.084a.118.118 0 0 1 0 .069c-.007.023-.018.042-.059.083L569.926 512l287.703 287.703c.041.04.052.06.059.083a.118.118 0 0 1 0 .07c-.007.022-.018.042-.059.083l-57.69 57.69c-.041.041-.06.052-.084.059a.118.118 0 0 1-.069 0c-.023-.007-.042-.018-.083-.059L512 569.926L224.297 857.629c-.04.041-.06.052-.083.059a.118.118 0 0 1-.07 0c-.022-.007-.042-.018-.083-.059l-57.69-57.69c-.041-.041-.052-.06-.059-.084a.118.118 0 0 1 0-.069c.007-.023.018-.042.059-.083L454.073 512L166.371 224.297c-.041-.04-.052-.06-.059-.083a.118.118 0 0 1 0-.07c.007-.022.018-.042.059-.083l57.69-57.69c.041-.041.06-.052.084-.059a.118.118 0 0 1 .069 0c.023.007.042.018.083.059L512 454.073l287.703-287.702c.04-.041.06-.052.083-.059a.118.118 0 0 1 .07 0Z"/>'},bs={width:1024,height:1024,body:'<path fill="currentColor" d="M872 474H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h720c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"/>'},Ss={width:1024,height:1024,body:'<path fill="currentColor" d="M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"/>'},Cs={width:1024,height:1024,body:'<path fill="currentColor" d="M326 664H104c-8.8 0-16 7.2-16 16v48c0 8.8 7.2 16 16 16h174v176c0 8.8 7.2 16 16 16h48c8.8 0 16-7.2 16-16V696c0-17.7-14.3-32-32-32zm16-576h-48c-8.8 0-16 7.2-16 16v176H104c-8.8 0-16 7.2-16 16v48c0 8.8 7.2 16 16 16h222c17.7 0 32-14.3 32-32V104c0-8.8-7.2-16-16-16zm578 576H698c-17.7 0-32 14.3-32 32v224c0 8.8 7.2 16 16 16h48c8.8 0 16-7.2 16-16V744h174c8.8 0 16-7.2 16-16v-48c0-8.8-7.2-16-16-16zm0-384H746V104c0-8.8-7.2-16-16-16h-48c-8.8 0-16 7.2-16 16v224c0 17.7 14.3 32 32 32h222c8.8 0 16-7.2 16-16v-48c0-8.8-7.2-16-16-16z"/>'},Es=["src"],xs={key:1,class:"paneltitle"},ks={class:"dragPanelBar"},Ts={class:"dragPanelContent"},zs={class:"drag-pointer-group"},Ms=he(e({__name:"XWindow",props:{top:{type:[String,Number],default:0},left:{type:[String,Number],default:0},nWidth:{type:[String,Number],default:"300px"},nHeight:{type:[String,Number],default:"400px"},icon:{type:String,default:""},title:{type:String,default:""},titleHeight:{type:[String,Number],default:"40px"},hasMin:{type:Boolean,default:!1},hasMax:{type:Boolean,default:!1},hasClose:{type:Boolean,default:!0},isDark:{type:Boolean,default:!1},pid:{type:String,default:""},tag:{type:[String,Array,Object,Number],default:""},right:{type:[String,Number],default:"unset"},bottom:{type:[String,Number],default:"unset"}},emits:["close","open","loaded","minimize"],setup(e,{expose:n,emit:o}){const l=gt(),h=e,d=o,p=t(),g=t(),m=b((()=>h.isDark)),v=t({x:0,y:0}),y=t({width:0,height:0}),k=e=>{p.value&&(p.value.style.left=`${e.x}px`,p.value.style.top=`${e.y}px`)};w((()=>v.value),(e=>{k(e)}));const T=e=>{p.value&&(p.value.style.width=`${e.width}px`,p.value.style.height=`${e.height}px`)};w((()=>y.value),(e=>{T(e)}));const M={eventListenerController:null,startingEdges:null,newEdges:null,clickStart:null,mount:()=>{Object.entries(M.refs).forEach((([e,t])=>{t.value&&t.value.addEventListener("mousedown",(t=>{M.mouseDown(t,e)}))}))},mouseDown:(e,t)=>{0==e.button&&(e.preventDefault(),M.startingEdges={left:v.value.x,top:v.value.y,right:v.value.x+y.value.width,bottom:v.value.y+y.value.height},M.newEdges={...M.startingEdges},M.clickStart={x:e.clientX,y:e.clientY},M.eventListenerController=new AbortController,document.addEventListener("mousemove",(e=>{M.mouseMove(e,t)}),{signal:M.eventListenerController.signal}),document.addEventListener("mouseup",(e=>{M.mouseUp(e,t)}),{signal:M.eventListenerController.signal}))},mouseMove:(e,t)=>{if(null!=M.startingEdges&&null!=M.newEdges&&null!=M.clickStart&&M.refs[t].value){if(e.preventDefault(),console.log("mouseMove",t),t.toLowerCase().includes("north")){M.newEdges.top=Math.max(M.startingEdges.top+e.clientY-M.clickStart.y,0);const t=M.newEdges.bottom-M.newEdges.top-100;t<0&&(M.newEdges.top+=t)}else t.toLowerCase().includes("south")&&(M.newEdges.bottom=Math.min(M.startingEdges.bottom+e.clientY-M.clickStart.y,document.body.clientHeight));if(t.toLowerCase().includes("west")){M.newEdges.left=Math.max(M.startingEdges.left+e.clientX-M.clickStart.x,0);const t=M.newEdges.right-M.newEdges.left-250;t<0&&(M.newEdges.left+=t)}else t.toLowerCase().includes("east")&&(M.newEdges.right=Math.min(M.startingEdges.right+e.clientX-M.clickStart.x,document.body.clientWidth));M.update()}},update:()=>{null!=M.newEdges&&null!=M.startingEdges&&(v.value={x:Math.max(M.newEdges.left,0),y:Math.max(M.newEdges.top,0)},y.value={width:Math.min(Math.max(M.newEdges.right-M.newEdges.left,250),document.body.clientWidth),height:Math.min(Math.max(M.newEdges.bottom-M.newEdges.top,100),document.body.clientHeight)})},mouseUp:(e,t)=>{0==e.button&&null!=M.startingEdges&&(console.log("mouseUp",t),e.preventDefault(),M.startingEdges=null,M.newEdges=null,M.clickStart=null,M.eventListenerController&&(M.eventListenerController.abort(),M.eventListenerController=null))},refs:{northWest:t(null),north:t(null),northEast:t(null),west:t(null),east:t(null),southWest:t(null),south:t(null),southEast:t(null)}},D={startingMouse:null,startingPosition:null,mouseDown:e=>{0==e.button&&(e.preventDefault(),console.log("mouseDown"),D.startingMouse={x:e.clientX,y:e.clientY},D.startingPosition=v.value,document.addEventListener("mousemove",D.mouseMove),document.addEventListener("mouseup",D.mouseUp))},mouseMove:e=>{D.startingMouse&&D.startingPosition&&(e.preventDefault(),v.value={x:Math.min(Math.max(D.startingPosition.x+e.clientX-D.startingMouse.x,0),document.body.clientWidth-y.value.width),y:Math.max(D.startingPosition.y+e.clientY-D.startingMouse.y,0)})},mouseUp:e=>{0==e.button&&D.startingMouse&&D.startingPosition&&(e.preventDefault(),D.startingMouse=null,D.startingPosition=null,console.log("mouseUp"),document.removeEventListener("mousemove",D.mouseMove),document.removeEventListener("mouseup",D.mouseUp))}};function N(e){return{id:l,icon:h.icon,title:h.title,pid:h.pid,data:e??h.tag}}const P=t(1),O=b((()=>!(-1===vs.value.get(l)))),B=t(!1),F=t(!0),W=b((()=>"z-index:"+P.value));function U(){P.value<=ys.ZIndexMax&&(ys.ZIndexMax+=1,P.value=ys.ZIndexMax)}function j(){d("minimize",N()),ys.minimizeWindowPanel(l)}function $(){B.value=!B.value}function H(){d("close",N(!1)),ys.removeWindowPanel(l),F.value=!1}const G=b((()=>B.value?Cs:Ss)),q={id:l,isShow:O,close:H,open:function(){d("open",N(!0)),F.value=!0},showHidePanel:j,updatePosition:k};function V(e,t=document.body.clientWidth){if(xe(e))return e;{const n=Number(e);if(n==n)return n;if(e.endsWith("px")){const t=e.substring(0,e.length-2);return Number(t)}if(e.endsWith("%")){const n=e.substring(0,e.length-1);return Number(n)/100*t}return 300}}function K(e,t){if(!p.value)return void console.warn("dragPanelRef.value当前窗体html元素为空!");let n=e??document.body.clientWidth,r=t??document.body.clientHeight,i=V(h.left,n),o=V(h.top,r);"unset"==h.bottom&&"unset"==h.right||("unset"!=h.right&&(i=n-V(h.right,n)-y.value.width),"unset"!=h.bottom&&(o=r-V(h.bottom,r)-y.value.height)),v.value.x=i,v.value.y=o,k(v.value)}function Y(){if(Z&&("unset"!=h.bottom||"unset"!=h.right)){const e=Z.getBoundingClientRect();K(e.width,e.height)}}let Z;return n(q),S((()=>{!function(){let e=96;if(h.hasMin||(e-=32),h.hasMax||(e-=32),h.hasClose||(e-=32),st.setCssVar("--right-bar-width",e+"px",g.value),!g.value)return;const t=xe(h.titleHeight)?h.titleHeight+"px":h.titleHeight;g.value.style.height=t,g.value.style.lineHeight=t}(),function(){const e=N(q);ys.addWindowPanel(e),d("loaded",e)}();const{parentElement:e,clientWidth:t,clientHeight:n}=function(e){if(!(e instanceof HTMLElement))throw new Error("参数必须是有效的 DOM 元素");let t=e.parentElement;for(;t&&"static"===globalThis.getComputedStyle(t).position;)t=t.parentElement,t||(t=document.documentElement);const n=t?.clientWidth,r=t?.clientHeight;return{clientWidth:n,clientHeight:r,parentElement:t}}(p.value);Z=e,y.value={width:V(h.nWidth,t),height:V(h.nHeight,n)},T(y.value),K(t,n),M.mount(),st.windowResizeHandler(Y)})),C((()=>{st.offWindowResizeHandler(Y),ys.removeWindowPanel(l)})),(t,n)=>(a(),i(A,{appear:"","enter-active-class":"animated zoomIn","leave-active-class":"animated zoomOut"},{default:c((()=>[F.value?_((a(),E("div",{key:0,ref_key:"dragPanelRef",ref:p,class:z(["dragWindowPanel",{maxPanel:B.value,dragWindowPanel_dark:m.value}]),style:x(W.value)},[u("div",{class:"dragPanelTitle",ref_key:"dragPanelTitleRef",ref:g,onMousedown:n[0]||(n[0]=(...e)=>D.mouseDown&&D.mouseDown(...e)),onClick:R(U,["stop"])},[r(t.$slots,"title",{},(()=>[h.icon?(a(),E("img",{key:0,src:h.icon,width:"24",height:"24"},null,8,Es)):f("",!0),h.title?(a(),E("span",xs,s(h.title),1)):f("",!0)]),!0),u("div",ks,[e.hasMin?(a(),i(L(X),{key:0,icon:L(bs),onClick:R(j,["stop"])},null,8,["icon"])):f("",!0),e.hasMax?(a(),i(L(X),{key:1,icon:G.value,onClick:R($,["stop"])},null,8,["icon"])):f("",!0),e.hasClose?(a(),i(L(X),{key:2,icon:L(ws),onClick:R(H,["stop"])},null,8,["icon"])):f("",!0)])],544),u("div",Ts,[r(t.$slots,"default",{},void 0,!0)]),u("div",zs,[u("div",{class:"cursor-nw-resize",ref:M.refs.northWest},null,512),u("div",{class:"cursor-n-resize",ref:M.refs.north},null,512),u("div",{class:"cursor-ne-resize",ref:M.refs.northEast},null,512),u("div",{class:"cursor-w-resize",ref:M.refs.west},null,512),n[1]||(n[1]=u("span",{style:{"pointer-events":"all",visibility:"hidden"}},null,-1)),u("div",{class:"cursor-e-resize",ref:M.refs.east},null,512),u("div",{class:"cursor-sw-resize",ref:M.refs.southWest},null,512),u("div",{class:"cursor-s-resize",ref:M.refs.south},null,512),u("div",{class:"cursor-se-resize",ref:M.refs.southEast},null,512)])],6)),[[I,O.value]]):f("",!0)])),_:3}))}}),[["__scopeId","data-v-d0d67b92"]]),As={class:"adivider"},_s={class:"contentText"},Rs=he(e({__name:"ADivider",props:{align:{type:String,default:"left"},color:{type:String,default:"#888"}},setup(e){D((e=>({v1dc34ba7:n.value})));const t=e,n=b((()=>Ci(t.color)||wi(t.color)?t.color:"#888")),i=b((()=>"left"!=t.align?"flex:1;":"width:40px;")),o=b((()=>"right"!=t.align?"flex:1;":"width:40px;"));return(e,t)=>(a(),E("div",As,[u("div",{class:"line",style:x(i.value)},null,4),u("div",_s,[r(e.$slots,"default",{},void 0,!0)]),u("div",{class:"line",style:x(o.value)},null,4)]))}}),[["__scopeId","data-v-133ad44f"]]),Ls={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((e=>({min:e.min,max:e.max,size:e.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(((e,r)=>(e.size=r===t?e.max:e.min,r!==t&&(n+=e.min),e))),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:r}="ontouchstart"in window&&e.touches?e.touches[0]:e;return{x:n-t.left,y:r-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 r=0+(this.pushOtherPanes?0:n.prevPanesSize),i=100-(this.pushOtherPanes?0:n.nextPanesSize),o=Math.max(Math.min(this.getCurrentDragPercentage(e),i),r);let s=[t,t+1],a=this.panes[s[0]]||null,l=this.panes[s[1]]||null;const c=a.max<100&&o>=a.max+n.prevPanesSize,u=l.max<100&&o<=100-(l.max+this.sumNextPanesSize(t+1));if(c||u)c?(a.size=a.max,l.size=Math.max(100-a.max-n.prevPanesSize-n.nextPanesSize,0)):(a.size=Math.max(100-l.max-n.prevPanesSize-this.sumNextPanesSize(t+1),0),l.size=l.max);else{if(this.pushOtherPanes){const e=this.doPushOtherPanes(n,o);if(!e)return;({sums:n,panesToResize:s}=e),a=this.panes[s[0]]||null,l=this.panes[s[1]]||null}null!==a&&(a.size=Math.min(Math.max(o-n.prevPanesSize-n.prevReachedMinPanes,a.min),a.max)),null!==l&&(l.size=Math.min(Math.max(100-o-n.nextPanesSize-n.nextReachedMinPanes,l.min),l.max))}},doPushOtherPanes(e,t){const n=this.touch.activeSplitter,r=[n,n+1];return t<e.prevPanesSize+this.panes[r[0]].min&&(r[0]=this.findPrevExpandedPane(n).index,e.prevReachedMinPanes=0,r[0]<n&&this.panes.forEach(((t,i)=>{i>r[0]&&i<=n&&(t.size=t.min,e.prevReachedMinPanes+=t.min)})),e.prevPanesSize=this.sumPrevPanesSize(r[0]),void 0===r[0])?(e.prevReachedMinPanes=0,this.panes[0].size=this.panes[0].min,this.panes.forEach(((t,r)=>{r>0&&r<=n&&(t.size=t.min,e.prevReachedMinPanes+=t.min)})),this.panes[r[1]].size=100-e.prevReachedMinPanes-this.panes[0].min-e.prevPanesSize-e.nextPanesSize,null):t>100-e.nextPanesSize-this.panes[r[1]].min&&(r[1]=this.findNextExpandedPane(n).index,e.nextReachedMinPanes=0,r[1]>n+1&&this.panes.forEach(((t,i)=>{i>n&&i<r[1]&&(t.size=t.min,e.nextReachedMinPanes+=t.min)})),e.nextPanesSize=this.sumNextPanesSize(r[1]-1),void 0===r[1])?(e.nextReachedMinPanes=0,this.panes[this.panesCount-1].size=this.panes[this.panesCount-1].min,this.panes.forEach(((t,r)=>{r<this.panesCount-1&&r>=n+1&&(t.size=t.min,e.nextReachedMinPanes+=t.min)})),this.panes[r[0]].size=100-e.prevPanesSize-e.nextReachedMinPanes-this.panes[this.panesCount-1].min-e.nextPanesSize,null):{sums:e,panesToResize:r}},sumPrevPanesSize(e){return this.panes.reduce(((t,n,r)=>t+(r<e?n.size:0)),0)},sumNextPanesSize(e){return this.panes.reduce(((t,n,r)=>t+(r>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 r=e-1,i=document.createElement("div");i.classList.add("splitpanes__splitter"),n||(i.onmousedown=e=>this.onMouseDown(e,r),"undefined"!=typeof window&&"ontouchstart"in window&&(i.ontouchstart=e=>this.onMouseDown(e,r)),i.onclick=e=>this.onSplitterClick(e,r+1)),this.dblClickSplitter&&(i.ondblclick=e=>this.onSplitterDblClick(e,r+1)),t.parentNode.insertBefore(i,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((e=>{e.className.includes("splitpanes__splitter")&&this.removeSplitter(e)}));let t=0;e.forEach((e=>{e.className.includes("splitpanes__pane")&&(!t&&this.firstSplitter?this.addSplitter(t,e,!0):t&&this.addSplitter(t,e),t++)}))},requestUpdate({target:e,...t}){const n=this.indexedPanes[e._.uid];Object.entries(t).forEach((([e,t])=>n[e]=t))},onPaneAdd(e){let t=-1;Array.from(e.$el.parentNode.children).some((n=>(n.className.includes("splitpanes__pane")&&t++,n===e.$el)));const n=parseFloat(e.minSize),r=parseFloat(e.maxSize);this.panes.splice(t,0,{id:e._.uid,index:t,min:isNaN(n)?0:n,max:isNaN(r)?100:r,size:null===e.size?null:parseFloat(e.size),givenSize:e.size,update:e.update}),this.panes.forEach(((e,t)=>e.index=t)),this.ready&&this.$nextTick((()=>{this.redoSplitters(),this.resetPaneSizes({addedPane:this.panes[t]}),this.$emit("pane-add",{index:t,panes:this.panes.map((e=>({min:e.min,max:e.max,size:e.size})))})}))},onPaneRemove(e){const t=this.panes.findIndex((t=>t.id===e._.uid)),n=this.panes.splice(t,1)[0];this.panes.forEach(((e,t)=>e.index=t)),this.$nextTick((()=>{this.redoSplitters(),this.resetPaneSizes({removedPane:{...n,index:t}}),this.$emit("pane-remove",{removed:n,panes:this.panes.map((e=>({min:e.min,max:e.max,size:e.size})))})}))},resetPaneSizes(e={}){e.addedPane||e.removedPane?this.panes.some((e=>null!==e.givenSize||e.min||e.max<100))?this.equalizeAfterAddOrRemove(e):this.equalize():this.initialPanesSizing(),this.ready&&this.$emit("resized",this.panes.map((e=>({min:e.min,max:e.max,size:e.size}))))},equalize(){const e=100/this.panesCount;let t=0;const n=[],r=[];this.panes.forEach((i=>{i.size=Math.max(Math.min(e,i.max),i.min),t-=i.size,i.size>=i.max&&n.push(i.id),i.size<=i.min&&r.push(i.id)})),t>.1&&this.readjustSizes(t,n,r)},initialPanesSizing(){let e=100;const t=[],n=[];let r=0;this.panes.forEach((i=>{e-=i.size,null!==i.size&&r++,i.size>=i.max&&t.push(i.id),i.size<=i.min&&n.push(i.id)}));let i=100;e>.1&&(this.panes.forEach((t=>{null===t.size&&(t.size=Math.max(Math.min(e/(this.panesCount-r),t.max),t.min)),i-=t.size})),i>.1&&this.readjustSizes(e,t,n))},equalizeAfterAddOrRemove({addedPane:e}={}){let t=100/this.panesCount,n=0;const r=[],i=[];e&&null!==e.givenSize&&(t=(100-e.givenSize)/(this.panesCount-1)),this.panes.forEach((e=>{n-=e.size,e.size>=e.max&&r.push(e.id),e.size<=e.min&&i.push(e.id)})),Math.abs(n)<.1||(this.panes.forEach((o=>{e&&null!==e.givenSize&&e.id===o.id||(o.size=Math.max(Math.min(t,o.max),o.min)),n-=o.size,o.size>=o.max&&r.push(o.id),o.size<=o.min&&i.push(o.id)})),n>.1&&this.readjustSizes(n,r,i))},readjustSizes(e,t,n){let r;r=e>0?e/(this.panesCount-t.length):e/(this.panesCount-n.length),this.panes.forEach((i=>{if(e>0&&!t.includes(i.id)){const t=Math.max(Math.min(i.size+r,i.max),i.min),n=t-i.size;e-=n,i.size=t}else if(!n.includes(i.id)){const t=Math.max(Math.min(i.size+r,i.max),i.min),n=t-i.size;e-=n,i.size=t}i.update({[this.horizontal?"height":"width"]:`${this.indexedPanes[i.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?e=>this.onSplitterDblClick(e,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 N("div",{ref:"container",class:["splitpanes","splitpanes--"+(this.horizontal?"horizontal":"vertical"),{"splitpanes--dragging":this.touch.dragging}]},this.$slots.default())}},Is={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||0===this.size?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})}}},Ds=he(Is,[["render",function(e,t,n,i,o,s){return a(),E("div",{class:"splitpanes__pane",onClick:t[0]||(t[0]=t=>s.onPaneClick(t,e._.uid)),style:x(e.style)},[r(e.$slots,"default")],4)}]]);function Ns(e){const t=new W(new F);return t.serialize(e),t.stream.toString()}function Ps(e){return null==e||""===e?e:new U(new F(e)).deserialize()}class Os{debug=!1;simple=!1;utc=!1;longType="number";dictType="object";nullType=void 0;static Instance=new Os;textEncoder=new TextEncoder;textDecoder=new TextDecoder;constructor(){}encodeResponse(e,t={}){var n=new F,r=new W(n,this.simple,this.utc),i=t;this.simple;var o=0;for(var s in i)o++;o>0&&(n.writeByte(72),r.serialize(i),r.reset()),e instanceof Error?(n.writeByte(69),r.serialize(this.debug&&e.stack?e.stack:e.message)):(n.writeByte(82),r.serialize(e)),n.writeByte(122);const a=n.takeBytes();return this.textDecoder.decode(a)}decodeRequest(e,t={}){const n=this.textEncoder.encode(e);if(0===n.length)return["~",[]];var r=new F(n),i=new U(r,!1);i.longType=this.longType,i.dictType=this.dictType;var o=r.readByte();if(console.log("tag",o),72===o){var s=i.deserialize(this.nullType);for(var a in s)t[a]=s[a];i.reset(),o=r.readByte()}switch(o){case 67:return[i.deserialize(String),this.decodeArguments(i)];case 122:return["~",[]];default:throw new Error("Invalid request:\r\n"+r.toString())}}decodeArguments(e){var t=e.stream;let n=[];if(97===t.readByte()){e.reset();var r=j.readCount(t);const o=new Array(r).fill(this.nullType);n=new Array(r),e.addReference(n);for(var i=0;i<r;++i)n[i]=e.deserialize(o[i]);t.readByte()}return n}encodeRequest(e,t,n={}){var r=new F,i=new W(r,this.simple,this.utc),o=n;this.simple&&(o.simple=!0);var s=0;for(var a in o)s++;s>0&&(r.writeByte(72),i.serialize(o),i.reset()),r.writeByte(67),i.serialize(e),t.length>0&&(i.reset(),i.serialize(t)),r.writeByte(122);const l=r.takeBytes();return this.textDecoder.decode(l)}decodeResponse(e,t={}){const n=this.textEncoder.encode(e);var r=new F(n),i=new U(r,!1);i.longType=this.longType,i.dictType=this.dictType;var o=r.readByte();if(72===o){var s=i.deserialize();for(var a in s)t[a]=s[a];i.reset(),o=r.readByte()}switch(o){case 82:return t.simple&&(i.simple=!0),console.log(o,"9999999999"),i.deserialize();case 69:throw new Error(i.deserialize(String));case 122:return;default:throw new Error("Invalid response:\r\n"+r.toString())}}}const Bs=new Map,Fs=new Map;let Ws;const Us={getDefaultClient(){if(Ws||(Ws=new Qe(SysConfig?.ServiceURL.DefaultHproseAPI)),!Ws)throw Error("HproseProxy对象为空");return Ws},registerHprose(e,t){const n=Fs.get(e);if(!n){const n=new Qe(t);Bs.set(e,n)}return n},getHprose:e=>Fs?.get(e),getProxyHprose:e=>Bs.get(e),unregisterHprose(e){Bs.get(e)&&(Fs.delete(e),Bs.delete(e))}},js=5e3,$s=36e5,Hs={Login:"/api/User/Login",ChangeMyPwd:"/api/User/ChangeMyPwd",Logout:"/api/Check/ExitLogin",RefreshToken:"/api/Check/RefreshToken",CheckToken:"/api/Check/CheckToken",GetSystemRights:"/api/System/GetSystem"},Gs="access_token",qs=ce?.Config?.ServiceURL.LoginAuthURL;function Xs(){const e=Je();e&&Ni(Hs.RefreshToken,qs,{refreshToken:e}).then((e=>{Ks(e.data)}))}function Vs(){const e=Ke.getJsonObject(Gs);if(!e)return;const t=(new Date).getTime(),n=new Date(e.expire).getTime()-t;n>0&&(n<=js?Xs():setTimeout(Xs,n-js))}function Ks(e){const t=(new Date).getTime();let n=new Date(e.accessToken.expires).getTime()-t;if(n>=$s?(n=18e5,console.warn("客户端时间与服务器不一致:过去时间!")):n<-6e5&&(n=18e5,console.warn("客户端时间与服务器不一致:未来时间!")),n>0){let t=Ye();t?(t.token=e.accessToken.tokenContent,t.expire=e.accessToken.expires,t.refresh=e.refreshToken.tokenContent):t={token:e.accessToken.tokenContent,expire:e.accessToken.expires,refresh:e.refreshToken.tokenContent},Ke.set(Gs,t,n/1e3),Vs()}else Ke.remove(Gs)}const Ys="Wm314243",Zs=ce?.Config?.ServiceURL.LoginAuthURL;async function Js(e){const t={username:e.username,pwd:br.encryptToString(e.pwd,Ys)},n=await Ni(Hs.Login,Zs,t),r=n?.data;return r&&(Ks(r.doubletoken),lo(!1)),r}function Qs(e){const t={oldpwd:br.encryptToString(e.oldpwd,Ys),newpwd:br.encryptToString(e.newpwd,Ys)};return Ni(Hs.ChangeMyPwd,Zs,t)}function ea(e){return br.encryptToString(e,Ys)}function ta(){const e=Ye();e&&(Bi(Hs.Logout,Zs,{token:e.token,reftoken:e.refresh}),Ze())}function na(e){return Ni(Hs.CheckToken,Zs,{token:e})}var ra=(e=>(e[e.Widget=0]="Widget",e[e.Route=1]="Route",e[e.URL=2]="URL",e[e.Action=3]="Action",e))(ra||{});const ia="ROLE_SYSTEM_RIGHT",oa=new qe("",globalThis.sessionStorage);function sa(){return oa.get(ia)}function aa(e){oa.set(ia,e)}function la(){oa.remove(ia)}function ca(e){if(e)for(let t=0;t<e.length;t++){const n=e[t];n.children&&n.children.length>0?(ca(n.children),0===n.children.length&&(e.splice(t,1),t--)):n.selected||(e.splice(t,1),t--)}}function ua(e,t,n="name"){e&&t&&e.forEach((e=>{const r=t.find((t=>t[n]===e[n]));r&&(e.children?r.children&&ua(e.children,r.children,n):r.children&&0!==r.children.length||r.selected&&(e.selected=r.selected))}))}function ha(e,t,n="name"){e&&t&&e.forEach((e=>{const r=t.find((t=>t[n]===e[n]));r&&(e.children?r.children&&ha(e.children,r.children,n):r.children&&0!==r.children.length||r.selected&&(e.selected=r.selected))}))}function da(e,t,n,r="name"){const i=e[n],o=t[n];i?o&&ha(i,o,r):o&&(e[n]=o)}function fa(e){if(e&&e.length>0){const t=e.length;let n,r=!1;if(t>0){r=Ce(e[0]);const i=r?e[0]:JSON.parse(e[0]);if(t>1)for(let t=1;t<e.length;t++){const n=e[t],o=r?n:JSON.parse(n);da(i,o,"routes","name"),da(i,o,"widgetMenu","name"),da(i,o,"widgets","id"),da(i,o,"functions","id")}n=i}return n&&(ca(n.routes),ca(n.widgetMenu),ca(n.widgets),ca(n.functions)),n}}const pa=[],ga=[],ma=[];function va(){return sa()}async function ya(e,t=!1){la();const n=Hs.GetSystemRights,r=ce?.Config?.ServiceURL.LoginAuthURL,i=await Ni(n,r,{systemid:e});if(!i||!i.data)return void ce.Message?.warn("无法获取功能授权列表!");const o=i.data;if(o&&o.length>0){if(t){const e=JSON.parse(o[0]);return aa(e),e}{const e=fa(o);return aa(e),e}}}function wa(e,t){const n={...e};return n.meta||(n.meta={}),null!=t.index&&(n.meta.index=t.index),null!=t.title&&(n.meta.title=t.title),e.children&&(n.children=[],t.children&&t.children.forEach((t=>{const r=e.children?.find((e=>e.path===t.path));if(r){const e=wa(r,t);e&&n.children?.push(e)}}))),n}function ba(e,t=2){if(0===t)return e;const n=va();return n&&n.routes?(ma.length>0||e.forEach((e=>{const t=n.routes?.find((t=>t.name===e.name));if(t){const n=wa(e,t);n&&ma.push(n)}})),ma):void 0}function Sa(e,t){const n={...e};return null!=t.index&&(n.index=t.index),e.children&&(n.children=[],t.children&&t.children.forEach((t=>{const r=e.children?.find((e=>e.name===t.name));if(r){const e=Sa(r,t);e&&n.children?.push(e)}}))),n}function Ca(e,t=2){if(0===t)return e;const n=va();return n&&n.widgetMenu?(ga.length>0||e.forEach((e=>{const t=n.widgetMenu?.find((t=>t.name===e.name));if(t){const n=Sa(e,t);n&&ga.push(n)}})),ga):void 0}function Ea(e,t=2){if(0===t)return e;const n=va();return n&&n.widgets?(pa.length>0||e?.forEach((e=>{const t=n.widgets?.find((t=>t.id===e.id));t&&pa.push(e)})),pa):void 0}function xa(e,t=2){if(0===t&&(ce.RightWidgetConfigMap=e,ce.RightWidgetConfigMap&&ce.RightWidgetConfigMap.size>0))return ce.RightWidgetConfigMap;const n=va();if(n&&n.widgets){const t=new Map;if(n.widgets.forEach((e=>{const n=e.layoutID;if(n){let r;t.has(n)&&(r=t.get(n)),r||(r=new Array,t.set(n,r)),r&&r.push(e)}})),n.widgets.length=0,t.size>0){const n=new Map;for(const[r,i]of t){const t=e.get(r);if(t){const e=new Array;t.forEach((t=>{i.findIndex((e=>e.id===t.id))>=0&&e.push(t)})),e.length>0&&n.set(r,e),t.length=0}}return t.clear(),ce.RightWidgetConfigMap=n,n}}else;}function ka(e,t=2){if(0===t)return e;const n=va();return n?n.functions:void 0}const Ta={mounted(e,t){const n=t.value,r=n&&n.container&&document.querySelector(n.container)||document.querySelector("#map3dContainer")||document.body,i=n&&n.selector&&e.querySelector(n.selector)||e.querySelector(".drag-el")||e;i!==e&&i.classList.add("ls-draggable"),i.onmousedown=function(t){e.style.transition="none";const n=t.clientX-e.offsetLeft,i=t.clientY-e.offsetTop,o=r.offsetWidth,s=r.offsetHeight,a=e.offsetWidth,l=e.offsetHeight;"100"!==e.style.zIndex&&(e.style.zIndex=100),r.onmousemove=function(t){let r=t.clientX-n,c=t.clientY-i;r<0&&(r=0),c<0&&(c=0),r>o-a&&(r=o-a),c>s-l&&(c=s-l),e.style.left=r+"px",e.style.top=c+"px"},r.onmouseup=function(t){r.onmousemove=r.onmouseup=null,e.style.transition="all 0.3s"}}}};function za(e){e.directive("drag",Ta)}const Ma={beforeMount(e,t){let n=null,r=0;const i=()=>t?.value(),o=()=>{Date.now()-r<100&&i(),n&&clearInterval(n),n=null};so.on(e,"mousedown",(e=>{0===e.button&&(r=Date.now(),so.once(document,"mouseup",o),n&&clearInterval(n),n=setInterval(i,100))}))}};function Aa(e){e.directive("repeatClick",Ma)}const _a={mounted(e,t){const n=t.value;e.style.visibility="hidden",e.style["animation-name"]="none";const r=function(e,t){if(function(e){const t=globalThis.scrollY||globalThis.pageYOffset||document.documentElement.scrollTop||e.parentNode.scrollTop,n=t+(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)?document.documentElement.scrollHeight>document.documentElement.clientHeight?globalThis.innerHeight:document.documentElement.clientHeight:Math.min(document.documentElement.clientHeight,globalThis.innerHeight)),r=function(e){let t;for(;void 0===e.offsetTop;)e=e.parentNode;for(t=e.offsetTop;e=e.offsetParent;)t+=e.offsetTop;return t}(e),i=r+e.clientHeight;return r<n&&i>=t}(e)){e.style.visibility="visible";for(const n in t)e.style[n]=t[n];"none"!=e.style["animation-name"]&&(e.style["animation-duration"]||(e.style["animation-duration"]="1s")),e.parentNode.removeEventListener("scroll",o)}};let i=Date.now();const o=function(){Date.now()-i>=100&&(r(e,n),i=Date.now())};setTimeout((function(){r(e,n)}),1),e.parentNode.addEventListener("scroll",o)}};function Ra(e){e.directive("wow",_a)}
7
+ */const bo=J(wo);var So,Co={exports:{}};So=()=>{const e=globalThis;e.HTMLElement||console.warn("streamsaver is meant to run on browsers main thread");let t=null,n=!1;const r=e.WebStreamsPolyfill||{};let i=/constructor/i.test(e.HTMLElement)||!!e.safari||!!e.WebKitPoint;const o={createWriteStream:function(e,r=null,a=null){let l={size:null,pathname:null,writableStrategy:void 0,readableStrategy:void 0},c=0,u=null,h=null;if(Number.isFinite(r)?([a,r]=[r,a],console.warn("[StreamSaver] Deprecated pass an object as 2nd argument when creating a write stream"),l.size=a,l.writableStrategy=r):r&&r.highWaterMark?(console.warn("[StreamSaver] Deprecated pass an object as 2nd argument when creating a write stream"),l.size=a,l.writableStrategy=r):l=r||{},!i){t||(t=s(o.mitm)),u=new MessageChannel,e=encodeURIComponent(e.replace(/\//g,":")).replace(/['()]/g,escape).replace(/\*/g,"%2A");const r={transferringReadable:n,pathname:l.pathname||Math.random().toString().slice(-6)+"/"+e,headers:{"Content-Type":"application/octet-stream; charset=utf-8","Content-Disposition":"attachment; filename*=UTF-8''"+e}};l.size&&(r.headers["Content-Length"]=l.size);const i=[r,"*",[u.port2]];if(n){const e=void 0;h=new o.TransformStream(e,l.writableStrategy,l.readableStrategy);const t=h.readable;u.port1.postMessage({readableStream:t},[t])}u.port1.onmessage=e=>{e.data.download?(t.isPopup&&(t.remove(),t=null,s(o.mitm)),s(e.data.download)):e.data.abort&&(f=[],u.port1.postMessage("abort"),u.port1.onmessage=null,u.port1.close(),u.port2.close(),u=null)},t.loaded?t.postMessage(...i):t.addEventListener("load",(()=>{t.postMessage(...i)}),{once:!0})}let f=[];return!i&&h&&h.writable||new o.WritableStream({write(e){if(!(e instanceof Uint8Array))throw new TypeError("Can only write Uint8Arrays");i?f.push(e):(u.port1.postMessage(e),c+=e.length)},close(){if(i){const t=new Blob(f,{type:"application/octet-stream; charset=utf-8"}),n=document.createElement("a");n.href=URL.createObjectURL(t),n.download=e,n.click()}else u.port1.postMessage("end")},abort(){f=[],u.port1.postMessage("abort"),u.port1.onmessage=null,u.port1.close(),u.port2.close(),u=null}},l.writableStrategy)},WritableStream:e.WritableStream||r.WritableStream,supported:!0,version:{full:"2.0.5",major:2,minor:0,dot:5},mitm:"./mitm.html"};function s(e){if(!e)throw new Error("meh");const t=document.createElement("iframe");return t.hidden=!0,t.src=e,t.loaded=!1,t.name="iframe",t.isIframe=!0,t.postMessage=(...e)=>t.contentWindow.postMessage(...e),t.addEventListener("load",(()=>{t.loaded=!0}),{once:!0}),document.body.appendChild(t),t}try{new Response(new ReadableStream),"serviceWorker"in navigator||(i=!0)}catch(e){i=!0}return(()=>{try{(()=>{const{readable:e}=new TransformStream,t=new MessageChannel;t.port1.postMessage(e,[e]),t.port1.close(),t.port2.close(),n=!0,Object.defineProperty(o,"TransformStream",{configurable:!1,writable:!1,value:TransformStream})})()}catch(e){}})(),o},void 0!==Co?Co.exports=So():"function"==typeof define&&"object"==typeof define.amd?define(So):(void 0).streamSaver=So();const Eo=(null==Co.exports?{}:Co.exports).default||Co.exports;class xo{constructor(e,t,n=3,r=6,i=6e4){this.fileID=e,this.downloadURL=t,this.chunkByteSize=n*this.ChunkUnitM,this.eventTarget=Z(),this.initIndexDB(),r>=3&&(this.cacheSize=r),i>this.requestTimeout&&(this.requestTimeout=i)}ChunkUnitM=1048576;chunkByteSize;totalChunks=1;currentDB;keys;fileMetaData=null;finishNum=0;eventTarget;cancelSource;isStarting=!1;fileName;cacheSize=6;requestTimeout=6e4;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("开始获取文件信息");const r=await Ni(t,e,n);let i=null;return r&&200===r.status&&(i=r.data),i}async getIFileMeta(){if(null===this.fileMetaData){const e=await(this.currentDB?.getItem("fileinfo"));this.fileMetaData=e||null}return this.fileMetaData}initIndexDB(){this.currentDB=bo.createInstance({name:this.fileID,driver:bo.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(null!=this.fileMetaData){const e=this.fileMetaData.chunkSize;null!=e&&e>0&&(this.chunkByteSize=e)}this.fileMetaData&&(this.totalChunks=Math.ceil(this.fileMetaData.length/this.chunkByteSize)),this.dispatchInfo("完成初始化文件信息,总分片:"+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("已暂停下载任务")}restart(){this.dispatchInfo("正在重启下载任务"),this.download()}delete(){this.cancelSource&&this.cancelSource.cancel(),bo.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("已删除下载任务")}sleep(e){return new Promise((t=>setTimeout(t,e)))}async download(e,t,n){let r=e;if(!r&&this.downloadURL&&(r=this.downloadURL),!r)throw Error("下载URL不能为空!");this.currentDB||this.initIndexDB();const i=ue.Axios.CancelToken;this.cancelSource=i.source(),this.isStarting=!0;const o={key:this.fileMetaData?.downloadID},s=n??o;let a=0;const l=this.cacheSize;let c=0;for(let u=0;u<this.totalChunks;u++){if(this.keys){const e=this.keys?.indexOf(u.toString());if(e>=0){a++,a>this.finishNum&&(this.finishNum=a,this.downloadProgress());continue}}const e=u*this.chunkByteSize;let n=e+this.chunkByteSize-1;this.fileMetaData&&n>this.fileMetaData.length&&(n=this.fileMetaData.length-1);const i={range:`bytes=${e}-${n}`};for(;c>=l;)await this.sleep(200);const o=u.toString();this.dispatchInfo(`开始下载分片${u+1}/${this.totalChunks}`),c++,Ni(r,t,s,i,"arraybuffer",this.cancelSource?.token,this.requestTimeout).then((async e=>{const t=e.data;c--,await(this.currentDB?.setItem(o,t)),a++,a>this.finishNum&&(this.finishNum=a,this.downloadProgress());const n=parseInt(o)+1;this.dispatchInfo(`完成下载分片${n}/${this.totalChunks}`),this.savefile()})).catch((e=>{c--;const t=parseInt(o)+1;this.dispatchError(`下载第${t})个分片内容失败!`)}))}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("下载错误:文件名为空!");this.dispatchInfo("开始保存下载文件:"+this.fileName);const e=Eo.createWriteStream(this.fileName).getWriter();let t=0;for(let n=0;n<this.totalChunks;n++){const r=n.toString();let i=await(this.currentDB?.getItem(r));if(i||(i=await(this.currentDB?.getItem(r))),!i)return void this.dispatchError(`输出分片第${n+1})个内容为空,错误退出!`);let o=new Response(i).body;if(null===o)return void this.dispatchError(`输出分片第${n+1})个内容为空,错误退出!`);const s=o.getReader();for(;;){const{done:t,value:n}=await s.read();if(t)break;await e.write(n)}t++,this.outputProgress(t),this.dispatchInfo(`完成第${n+1}个分片输出`)}e.close(),bo.dropInstance({name:this.fileID}),this.dispatch("success"),this.isStarting=!1,this.dispatchInfo("完成文件下载")}}}function ko(e,t){let n="",r="";for(const i in t)n+=i+"="+encodeURIComponent(t[i])+"&";return n=n.replace(/&$/,""),r=/\?$/.test(e)?e+n:e.replace(/\/?$/,"?")+n,r}function Mo(e={},t={}){let n;for(n in t)Oe(t[n])?e[n]=Mo(e[n],t[n]):e[n]=t[n];return e}function To(e,t,n={name:void 0}){const r=e.resolve({path:t,query:n});globalThis.open(r.href,"_blank")}function zo(e){let t=e;if(e.endsWith("/")){if(e.endsWith("/#/"))return t;t=e+"#/"}else t=e+"/#/"}function Ao(e,t="/"){if(e)return e.startsWith("/")?e.startsWith(t)?e:`${t}${e}`:"/"===t?`${t}${e}`:`${t}/${e}`}function _o(e,t){e.getRoutes().find((e=>"/"===e.path))||e.addRoute({name:"/",path:"/",redirect:t.path})}function Lo(e){const t=[];let n=[];return Object.keys(e).forEach((t=>{const r=e[t];r&&n.push(...r)})),n=n.sort(((e,t)=>{let n=0,r=0;return e.meta&&(n=null!=e.meta.index?Number(e.meta.index):100),t.meta&&(r=null!=t.meta.index?Number(t.meta.index):100),n-r})),t.push(...n),n.length=0,t}function Ro(e,t=!1){let n=[];for(const r in e){const t=e[r];t&&t.length>0&&(n.push(...t),t.length=0),delete e[r]}return t&&(n=n.sort(((e,t)=>{let n=0,r=0;return null!=e.index&&(n=Number(e.index)),null!=t.index&&(r=Number(t.index)),n-r}))),n}function Io(e,t=!1){const n=[];let r=[];return Object.keys(e).forEach((t=>{const n=e[t];n&&r.push(...n)})),t&&(r=r.sort(((e,t)=>{let n=0,r=0;return null!=e.index&&(n=Number(e.index)),null!=t.index&&(r=Number(t.index)),n-r}))),n.push(...r),r.length=0,n}const Do=new Map;function Po(e,t=!1){if(t&&Do.size>0)return Do;Do.clear();for(const n in e){const t=e[n];t&&t.length>0&&(t.forEach((e=>{let t;const n=e.layoutID;Do.has(n)&&(t=Do.get(n)),t||(t=new Array,Do.set(n,t)),t&&t.push(e)})),t.length=0),delete e[n]}return Do}function No(e,t="/"){let n=t;return e.redirect&&e.children?(n=e.path.startsWith(t)?e.path:t.endsWith("/")?t+e.path:t+"/"+e.path,No(e.children[0],n)):(n=e.path.startsWith(t)?e.path:`${t}/${e.path}`,{title:e.meta?.title,fullPath:n,path:e.path,icon:e.meta?.icon,keepAlive:e.meta?.keepAlive,name:e.name})}function Oo(e){const t=function(e){if(!e)return;const t=e,n=[];if(t)for(let r of t){const e=Bo(r);e&&n.push(e)}return n}(e.bussinessRoutes),n=function(e){if(!e)return;const t=e;if(t&&t.length>0){const e=[];return t.forEach((t=>{const n=Fo(t);n&&e.push(n)})),e}}(e.widgetMenuConfig),r=function(e){if(e&&e.length>0){const t=[];return e.forEach((e=>{const n=function(e){if(e)return{id:e.id,label:e.label,layoutID:e.layoutID,container:e.container,preload:e.preload,afterid:e.afterid,bindid:e.bindid,group:e.group}}(e);n&&t.push(n)})),t}}(e.widgetConfig),i=(o=e.functionList)&&o.length>0?o:void 0;var o;const s=e.pkgObject.version,a=e.pkgObject.name,l=function(e,t){const n=`${e}_${t}`;return at.MD5(n)}(a,s);return{id:l,name:ue.Config.UI.SiteTitle,group:ue.Config.UI.Group,product:a,version:s,routes:t,widgetMenu:n,widgets:r,functions:i}}function Bo(e){if(e){let t=0;e.meta?.hidden&&(t=1);let n={path:e.path,name:e.name,title:e.meta?.title,type:t,index:e.meta?.index};if(e.children){const t=[];for(let n of e.children){const e=Bo(n);e&&t.push(e)}t.length>0&&(n.children=t)}return n}}function Fo(e){if(!e)return;const t={name:e.name,index:e.index,path:e.path,type:e.type};return e.children&&e.children.length>0&&(t.children=[],e.children.forEach((e=>{const n=Fo(e);n&&t.children?.push(n)}))),t}function Wo(e,t="IconifyList.ts"){let n="",r="const iconlist={\n",i=0;e.forEach((e=>{const t=e.split(":");if(t&&2===t.length){const o="icon"+i;n+=`import ${o} from '~icons/${t[0]}/${t[1]}'\n`,r+=`\t'${e}':${o},\n`,i++}})),i>0&&(r+="};\n",nr(n+r+"export default iconlist;","IconifyList.ts"))}function Uo(e,t){const n=Oo(e);ir(n,t),ue.Message?.msg("导出系统功能权限文件成功!")}function jo(e){let t=e.replace(/(^\s*)|(\s*$)/g,"");return t=t.replace(/[^\d]/g,""),t=t.replace(/^0/g,""),t=t.replace(/^[1-9]\d\d{1,3}$/,"100"),t}function $o(e){let t=Ho(e);return t=t.replace(/^[1-9]\d\d{1,3}$/,"100"),t=t.replace(/^100\.$/,"100"),t}function Ho(e){let t=e.replace(/(^\s*)|(\s*$)/g,"");return t=t.replace(/[^\d.]/g,""),t=t.replace(/^0{2}$/g,"0"),t=t.replace(/^\./g,""),t=t.replace(".","$#$").replace(/\./g,"").replace("$#$","."),t=t.replace(/^(\-)*(\d+)\.(\d\d).*$/,"$1$2.$3"),t}function Go(e){let t=e.replace(/(^\s*)|(\s*$)/g,"");return t=t.replace(/[\.]*/g,""),t=t.replace(/(^0[\d]*)$/g,"0"),t=t.replace(/^0\d$/g,"0"),t=t.replace(/[^\d]/g,""),t}function qo(e){let t=e.replace(/[\u4e00-\u9fa5\s]+/g,"");return t=t.replace(/(^\s*)|(\s*$)/g,""),t}function Xo(e){let t=e.replace(/[a-zA-Z]+/g,"");return t=t.replace(/(^\s*)|(\s*$)/g,""),t}function Vo(e){return e.replace(/(^\s*)|(\s*$)/g,"")}function Zo(e){let t=Ho(e);return t=t.toString().split("."),t[0]=t[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),t=t.join("."),t}function Ko(e,t="",n="red"){return t.replace(new RegExp(e,"gi"),`<span style='color: ${n}'>${e}</span>`)}function Yo(e,t="仟佰拾亿仟佰拾万仟佰拾元角分",n=""){let r=(e+="00").indexOf(".");r>=0&&(e=e.substring(0,r)+e.substr(r+1,2)),t=t.substr(t.length-e.length);for(let i=0;i<e.length;i++)n+="零壹贰叁肆伍陆柒捌玖".substr(e.substr(i,1),1)+t.substr(i,1);return n.replace(/零角零分$/,"整").replace(/零[仟佰拾]/g,"零").replace(/零{2,}/g,"零").replace(/零([亿|万])/g,"$1").replace(/零+元/,"元").replace(/亿零{0,3}万/,"亿").replace(/^元/,"零元")}function Jo(e){return!!/^((12[0-9])|(13[0-9])|(14[5|7])|(15([0-3]|[5-9]))|(18[0|1,5-9]))\d{8}$/.test(e)}function Qo(e){return!!/\d{3}-\d{8}|\d{4}-\d{7}/.test(e)}function es(e){return!!/^[a-zA-Z][a-zA-Z0-9_]{4,15}$/.test(e)}function ts(e){return!!/^[a-zA-Z]\w{5,15}$/.test(e)}function ns(e){return!!/^(?![a-zA-z]+$)(?!\d+$)(?![!@#$%^&\.*]+$)(?![a-zA-z\d]+$)(?![a-zA-z!@#$%^&\.*]+$)(?![\d!@#$%^&\.*]+$)[a-zA-Z\d!@#$%^&\.*]{6,16}$/.test(e)}function rs(e){let t="";return/^(?:\d+|[a-zA-Z]+|[!@#$%^&\.*]+){6,16}$/.test(e)&&(t="弱"),/^(?![a-zA-z]+$)(?!\d+$)(?![!@#$%^&\.*]+$)[a-zA-Z\d!@#$%^&\.*]{6,16}$/.test(e)&&(t="中"),/^(?![a-zA-z]+$)(?!\d+$)(?![!@#$%^&\.*]+$)(?![a-zA-z\d]+$)(?![a-zA-z!@#$%^&\.*]+$)(?![\d!@#$%^&\.*]+$)[a-zA-Z\d!@#$%^&\.*]{6,16}$/.test(e)&&(t="强"),t}function is(e){return!!/^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/.test(e)}function os(e){return!!/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)}function ss(e){return!!/^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/.test(e)}function as(e){return!!/^[\u4e00-\u9fa5]{1,6}(·[\u4e00-\u9fa5]{1,6}){0,2}$/.test(e)}function ls(e){return!!/^[1-9][0-9]{5}$/.test(e)}function cs(e){return!!/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(e)}function us(e){return!!/^(([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-Z](([0-9]{5}[DF])|([DF]([A-HJ-NP-Z0-9])[0-9]{4})))|([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-Z][A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳使领]))$/.test(e)}function hs(e){e&&ue.EventBus.emit(re.ModalContainerWidget_LoadModal,e)}function fs(e){ue.EventBus.emit(re.ModalContainerWidget_CloseModal,e)}let ds=[];const ps=()=>{setTimeout((async()=>{const e=await async function(){const e=await async function(e){const t=/<script.*src=["'](?<src>[^"']+)/gm,n=[];let r;for(;r=t.exec(e);)n.push(r.groups?.src??"");return n}(await fetch("/").then((e=>e.text())));if(!ds.length)return ds=e,!1;if(e.length!==ds.length)return ds=e,!0;for(let t=0;t<ds.length;t++)if(ds[t]!==e[t])return ds=e,!0;return!1}();e?confirm("页面有更新,点击确定刷新页面?")&&location.reload():ps()}),5e3)};function gs(e,t=bo.INDEXEDDB){return bo.createInstance({name:e,driver:t})}function ms(e){bo.dropInstance({name:e})}async function vs(e){const t=await fetch(e),n=t.body?.getReader();if(!n)return;let r=0;const i=[];for(;;){const{done:e,value:t}=await n.read();if(e)break;i.push(t),r+=t.length,console.log(`已接收: ${(r/1024/1024).toFixed(2)}MB`)}const o=new Uint8Array(r);let s=0;for(let a of i)o.set(a,s),s+=a.length;return i.length=0,o}async function ys(e){const t=await vs(e);if(t)return new TextDecoder("utf-8").decode(t)}async function ws(e,t="application/octet-stream"){const n=await vs(e);if(n)return new Blob([n],{type:t})}async function bs(e,t="/upload",n){const r=e.stream();let i=0;const o=new TransformStream({transform(t,r){i+=t.length;const o=(i/e.size*100).toFixed(2);console.log(`上传进度: ${o}%`),n&&n(o),r.enqueue(t)}}),s=r.pipeThrough(o);return(await fetch(t,{method:"POST",body:s})).json()}async function Ss(e,t,n=128){const r=await fetch(t),i=r.body?.getReader();if(!i)return;const o=e.width,s=e.height,a=e.getContext("2d");let l=0,c=[];const u=1024*n;for(;;){const{done:e,value:t}=await i.read();if(e)break;c.push(t),l+=t.length,l>u&&(await Cs(a,o,s,c),l=0)}await Cs(a,o,s,c,!0)}async function Cs(e,t,n,r,i=!1){const o=new Blob(r,{type:"image/jpeg"}),s=URL.createObjectURL(o);return new Promise((r=>{const i=new Image;i.onload=()=>{e.clearRect(0,0,t,n),e.drawImage(i,0,0),URL.revokeObjectURL(s),r(!0)},i.src=s}))}const Es=new Map,xs=t(new Map);class ks{static ZIndexMax=1;static addWindowPanel(e){Es.set(e.id,e)}static removeWindowPanel(e){Es.has(e)&&(Es.delete(e),xs.value.delete(e))}static minimizeWindowPanel(e){Es.has(e)&&xs.value.set(e,-1)}static openWindowPanel(e){Es.has(e)&&xs.value.set(e,1)}}const Ms={width:1024,height:1024,body:'<path fill="currentColor" fill-rule="evenodd" d="M799.855 166.312c.023.007.043.018.084.059l57.69 57.69c.041.041.052.06.059.084a.118.118 0 0 1 0 .069c-.007.023-.018.042-.059.083L569.926 512l287.703 287.703c.041.04.052.06.059.083a.118.118 0 0 1 0 .07c-.007.022-.018.042-.059.083l-57.69 57.69c-.041.041-.06.052-.084.059a.118.118 0 0 1-.069 0c-.023-.007-.042-.018-.083-.059L512 569.926L224.297 857.629c-.04.041-.06.052-.083.059a.118.118 0 0 1-.07 0c-.022-.007-.042-.018-.083-.059l-57.69-57.69c-.041-.041-.052-.06-.059-.084a.118.118 0 0 1 0-.069c.007-.023.018-.042.059-.083L454.073 512L166.371 224.297c-.041-.04-.052-.06-.059-.083a.118.118 0 0 1 0-.07c.007-.022.018-.042.059-.083l57.69-57.69c.041-.041.06-.052.084-.059a.118.118 0 0 1 .069 0c.023.007.042.018.083.059L512 454.073l287.703-287.702c.04-.041.06-.052.083-.059a.118.118 0 0 1 .07 0Z"/>'},Ts={width:1024,height:1024,body:'<path fill="currentColor" d="M872 474H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h720c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"/>'},zs={width:1024,height:1024,body:'<path fill="currentColor" d="M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"/>'},As={width:1024,height:1024,body:'<path fill="currentColor" d="M326 664H104c-8.8 0-16 7.2-16 16v48c0 8.8 7.2 16 16 16h174v176c0 8.8 7.2 16 16 16h48c8.8 0 16-7.2 16-16V696c0-17.7-14.3-32-32-32zm16-576h-48c-8.8 0-16 7.2-16 16v176H104c-8.8 0-16 7.2-16 16v48c0 8.8 7.2 16 16 16h222c17.7 0 32-14.3 32-32V104c0-8.8-7.2-16-16-16zm578 576H698c-17.7 0-32 14.3-32 32v224c0 8.8 7.2 16 16 16h48c8.8 0 16-7.2 16-16V744h174c8.8 0 16-7.2 16-16v-48c0-8.8-7.2-16-16-16zm0-384H746V104c0-8.8-7.2-16-16-16h-48c-8.8 0-16 7.2-16 16v224c0 17.7 14.3 32 32 32h222c8.8 0 16-7.2 16-16v-48c0-8.8-7.2-16-16-16z"/>'},_s=["src"],Ls={key:1,class:"paneltitle"},Rs={class:"dragPanelBar"},Is={class:"dragPanelContent"},Ds={class:"drag-pointer-group"},Ps=fe(e({__name:"XWindow",props:{top:{type:[String,Number],default:0},left:{type:[String,Number],default:0},nWidth:{type:[String,Number],default:"300px"},nHeight:{type:[String,Number],default:"400px"},icon:{type:String,default:""},title:{type:String,default:""},titleHeight:{type:[String,Number],default:"40px"},hasMin:{type:Boolean,default:!1},hasMax:{type:Boolean,default:!1},hasClose:{type:Boolean,default:!0},isDark:{type:Boolean,default:!1},pid:{type:String,default:""},tag:{type:[String,Array,Object,Number],default:""},right:{type:[String,Number],default:"unset"},bottom:{type:[String,Number],default:"unset"}},emits:["close","open","loaded","minimize"],setup(e,{expose:n,emit:o}){const l=mt(),h=e,f=o,p=t(),g=t(),m=b((()=>h.isDark)),v=t({x:0,y:0}),y=t({width:0,height:0}),k=e=>{p.value&&(p.value.style.left=`${e.x}px`,p.value.style.top=`${e.y}px`)};w((()=>v.value),(e=>{k(e)}));const M=e=>{p.value&&(p.value.style.width=`${e.width}px`,p.value.style.height=`${e.height}px`)};w((()=>y.value),(e=>{M(e)}));const z={eventListenerController:null,startingEdges:null,newEdges:null,clickStart:null,mount:()=>{Object.entries(z.refs).forEach((([e,t])=>{t.value&&t.value.addEventListener("mousedown",(t=>{z.mouseDown(t,e)}))}))},mouseDown:(e,t)=>{0==e.button&&(e.preventDefault(),z.startingEdges={left:v.value.x,top:v.value.y,right:v.value.x+y.value.width,bottom:v.value.y+y.value.height},z.newEdges={...z.startingEdges},z.clickStart={x:e.clientX,y:e.clientY},z.eventListenerController=new AbortController,document.addEventListener("mousemove",(e=>{z.mouseMove(e,t)}),{signal:z.eventListenerController.signal}),document.addEventListener("mouseup",(e=>{z.mouseUp(e,t)}),{signal:z.eventListenerController.signal}))},mouseMove:(e,t)=>{if(null!=z.startingEdges&&null!=z.newEdges&&null!=z.clickStart&&z.refs[t].value){if(e.preventDefault(),console.log("mouseMove",t),t.toLowerCase().includes("north")){z.newEdges.top=Math.max(z.startingEdges.top+e.clientY-z.clickStart.y,0);const t=z.newEdges.bottom-z.newEdges.top-100;t<0&&(z.newEdges.top+=t)}else t.toLowerCase().includes("south")&&(z.newEdges.bottom=Math.min(z.startingEdges.bottom+e.clientY-z.clickStart.y,document.body.clientHeight));if(t.toLowerCase().includes("west")){z.newEdges.left=Math.max(z.startingEdges.left+e.clientX-z.clickStart.x,0);const t=z.newEdges.right-z.newEdges.left-250;t<0&&(z.newEdges.left+=t)}else t.toLowerCase().includes("east")&&(z.newEdges.right=Math.min(z.startingEdges.right+e.clientX-z.clickStart.x,document.body.clientWidth));z.update()}},update:()=>{null!=z.newEdges&&null!=z.startingEdges&&(v.value={x:Math.max(z.newEdges.left,0),y:Math.max(z.newEdges.top,0)},y.value={width:Math.min(Math.max(z.newEdges.right-z.newEdges.left,250),document.body.clientWidth),height:Math.min(Math.max(z.newEdges.bottom-z.newEdges.top,100),document.body.clientHeight)})},mouseUp:(e,t)=>{0==e.button&&null!=z.startingEdges&&(console.log("mouseUp",t),e.preventDefault(),z.startingEdges=null,z.newEdges=null,z.clickStart=null,z.eventListenerController&&(z.eventListenerController.abort(),z.eventListenerController=null))},refs:{northWest:t(null),north:t(null),northEast:t(null),west:t(null),east:t(null),southWest:t(null),south:t(null),southEast:t(null)}},A={startingMouse:null,startingPosition:null,mouseDown:e=>{0==e.button&&(e.preventDefault(),console.log("mouseDown"),A.startingMouse={x:e.clientX,y:e.clientY},A.startingPosition=v.value,document.addEventListener("mousemove",A.mouseMove),document.addEventListener("mouseup",A.mouseUp))},mouseMove:e=>{A.startingMouse&&A.startingPosition&&(e.preventDefault(),v.value={x:Math.min(Math.max(A.startingPosition.x+e.clientX-A.startingMouse.x,0),document.body.clientWidth-y.value.width),y:Math.max(A.startingPosition.y+e.clientY-A.startingMouse.y,0)})},mouseUp:e=>{0==e.button&&A.startingMouse&&A.startingPosition&&(e.preventDefault(),A.startingMouse=null,A.startingPosition=null,console.log("mouseUp"),document.removeEventListener("mousemove",A.mouseMove),document.removeEventListener("mouseup",A.mouseUp))}};function P(e){return{id:l,icon:h.icon,title:h.title,pid:h.pid,data:e??h.tag}}const N=t(1),O=b((()=>!(-1===xs.value.get(l)))),B=t(!1),F=t(!0),W=b((()=>"z-index:"+N.value));function U(){N.value<=ks.ZIndexMax&&(ks.ZIndexMax+=1,N.value=ks.ZIndexMax)}function j(){f("minimize",P()),ks.minimizeWindowPanel(l)}function $(){B.value=!B.value}function H(){f("close",P(!1)),ks.removeWindowPanel(l),F.value=!1}const G=b((()=>B.value?As:zs)),q={id:l,isShow:O,close:H,open:function(){f("open",P(!0)),F.value=!0},showHidePanel:j,updatePosition:k};function X(e,t=document.body.clientWidth){if(Fe(e))return e;{const n=Number(e);if(n==n)return n;if(e.endsWith("px")){const t=e.substring(0,e.length-2);return Number(t)}if(e.endsWith("%")){const n=e.substring(0,e.length-1);return Number(n)/100*t}return 300}}function Z(e,t){if(!p.value)return void console.warn("dragPanelRef.value当前窗体html元素为空!");let n=e??document.body.clientWidth,r=t??document.body.clientHeight,i=X(h.left,n),o=X(h.top,r);"unset"==h.bottom&&"unset"==h.right||("unset"!=h.right&&(i=n-X(h.right,n)-y.value.width),"unset"!=h.bottom&&(o=r-X(h.bottom,r)-y.value.height)),v.value.x=i,v.value.y=o,k(v.value)}function K(){if(Y&&("unset"!=h.bottom||"unset"!=h.right)){const e=Y.getBoundingClientRect();Z(e.width,e.height)}}let Y;return n(q),S((()=>{!function(){let e=96;if(h.hasMin||(e-=32),h.hasMax||(e-=32),h.hasClose||(e-=32),at.setCssVar("--right-bar-width",e+"px",g.value),!g.value)return;const t=Fe(h.titleHeight)?h.titleHeight+"px":h.titleHeight;g.value.style.height=t,g.value.style.lineHeight=t}(),function(){const e=P(q);ks.addWindowPanel(e),f("loaded",e)}();const{parentElement:e,clientWidth:t,clientHeight:n}=function(e){if(!(e instanceof HTMLElement))throw new Error("参数必须是有效的 DOM 元素");let t=e.parentElement;for(;t&&"static"===globalThis.getComputedStyle(t).position;)t=t.parentElement,t||(t=document.documentElement);const n=t?.clientWidth,r=t?.clientHeight;return{clientWidth:n,clientHeight:r,parentElement:t}}(p.value);Y=e,y.value={width:X(h.nWidth,t),height:X(h.nHeight,n)},M(y.value),Z(t,n),z.mount(),at.windowResizeHandler(K)})),C((()=>{at.offWindowResizeHandler(K),ks.removeWindowPanel(l)})),(t,n)=>(a(),i(_,{appear:"","enter-active-class":"animated zoomIn","leave-active-class":"animated zoomOut"},{default:c((()=>[F.value?L((a(),E("div",{key:0,ref_key:"dragPanelRef",ref:p,class:T(["dragWindowPanel",{maxPanel:B.value,dragWindowPanel_dark:m.value}]),style:x(W.value)},[u("div",{class:"dragPanelTitle",ref_key:"dragPanelTitleRef",ref:g,onMousedown:n[0]||(n[0]=(...e)=>A.mouseDown&&A.mouseDown(...e)),onClick:R(U,["stop"])},[r(t.$slots,"title",{},(()=>[h.icon?(a(),E("img",{key:0,src:h.icon,width:"24",height:"24"},null,8,_s)):d("",!0),h.title?(a(),E("span",Ls,s(h.title),1)):d("",!0)]),!0),u("div",Rs,[e.hasMin?(a(),i(I(V),{key:0,icon:I(Ts),onClick:R(j,["stop"])},null,8,["icon"])):d("",!0),e.hasMax?(a(),i(I(V),{key:1,icon:G.value,onClick:R($,["stop"])},null,8,["icon"])):d("",!0),e.hasClose?(a(),i(I(V),{key:2,icon:I(Ms),onClick:R(H,["stop"])},null,8,["icon"])):d("",!0)])],544),u("div",Is,[r(t.$slots,"default",{},void 0,!0)]),u("div",Ds,[u("div",{class:"cursor-nw-resize",ref:z.refs.northWest},null,512),u("div",{class:"cursor-n-resize",ref:z.refs.north},null,512),u("div",{class:"cursor-ne-resize",ref:z.refs.northEast},null,512),u("div",{class:"cursor-w-resize",ref:z.refs.west},null,512),n[1]||(n[1]=u("span",{style:{"pointer-events":"all",visibility:"hidden"}},null,-1)),u("div",{class:"cursor-e-resize",ref:z.refs.east},null,512),u("div",{class:"cursor-sw-resize",ref:z.refs.southWest},null,512),u("div",{class:"cursor-s-resize",ref:z.refs.south},null,512),u("div",{class:"cursor-se-resize",ref:z.refs.southEast},null,512)])],6)),[[D,O.value]]):d("",!0)])),_:3}))}}),[["__scopeId","data-v-d0d67b92"]]),Ns={class:"adivider"},Os={class:"contentText"},Bs=fe(e({__name:"ADivider",props:{align:{type:String,default:"left"},color:{type:String,default:"#888"}},setup(e){P((e=>({v1dc34ba7:n.value})));const t=e,n=b((()=>Ei(t.color)||bi(t.color)?t.color:"#888")),i=b((()=>"left"!=t.align?"flex:1;":"width:40px;")),o=b((()=>"right"!=t.align?"flex:1;":"width:40px;"));return(e,t)=>(a(),E("div",Ns,[u("div",{class:"line",style:x(i.value)},null,4),u("div",Os,[r(e.$slots,"default",{},void 0,!0)]),u("div",{class:"line",style:x(o.value)},null,4)]))}}),[["__scopeId","data-v-133ad44f"]]),Fs={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((e=>({min:e.min,max:e.max,size:e.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(((e,r)=>(e.size=r===t?e.max:e.min,r!==t&&(n+=e.min),e))),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:r}="ontouchstart"in window&&e.touches?e.touches[0]:e;return{x:n-t.left,y:r-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 r=0+(this.pushOtherPanes?0:n.prevPanesSize),i=100-(this.pushOtherPanes?0:n.nextPanesSize),o=Math.max(Math.min(this.getCurrentDragPercentage(e),i),r);let s=[t,t+1],a=this.panes[s[0]]||null,l=this.panes[s[1]]||null;const c=a.max<100&&o>=a.max+n.prevPanesSize,u=l.max<100&&o<=100-(l.max+this.sumNextPanesSize(t+1));if(c||u)c?(a.size=a.max,l.size=Math.max(100-a.max-n.prevPanesSize-n.nextPanesSize,0)):(a.size=Math.max(100-l.max-n.prevPanesSize-this.sumNextPanesSize(t+1),0),l.size=l.max);else{if(this.pushOtherPanes){const e=this.doPushOtherPanes(n,o);if(!e)return;({sums:n,panesToResize:s}=e),a=this.panes[s[0]]||null,l=this.panes[s[1]]||null}null!==a&&(a.size=Math.min(Math.max(o-n.prevPanesSize-n.prevReachedMinPanes,a.min),a.max)),null!==l&&(l.size=Math.min(Math.max(100-o-n.nextPanesSize-n.nextReachedMinPanes,l.min),l.max))}},doPushOtherPanes(e,t){const n=this.touch.activeSplitter,r=[n,n+1];return t<e.prevPanesSize+this.panes[r[0]].min&&(r[0]=this.findPrevExpandedPane(n).index,e.prevReachedMinPanes=0,r[0]<n&&this.panes.forEach(((t,i)=>{i>r[0]&&i<=n&&(t.size=t.min,e.prevReachedMinPanes+=t.min)})),e.prevPanesSize=this.sumPrevPanesSize(r[0]),void 0===r[0])?(e.prevReachedMinPanes=0,this.panes[0].size=this.panes[0].min,this.panes.forEach(((t,r)=>{r>0&&r<=n&&(t.size=t.min,e.prevReachedMinPanes+=t.min)})),this.panes[r[1]].size=100-e.prevReachedMinPanes-this.panes[0].min-e.prevPanesSize-e.nextPanesSize,null):t>100-e.nextPanesSize-this.panes[r[1]].min&&(r[1]=this.findNextExpandedPane(n).index,e.nextReachedMinPanes=0,r[1]>n+1&&this.panes.forEach(((t,i)=>{i>n&&i<r[1]&&(t.size=t.min,e.nextReachedMinPanes+=t.min)})),e.nextPanesSize=this.sumNextPanesSize(r[1]-1),void 0===r[1])?(e.nextReachedMinPanes=0,this.panes[this.panesCount-1].size=this.panes[this.panesCount-1].min,this.panes.forEach(((t,r)=>{r<this.panesCount-1&&r>=n+1&&(t.size=t.min,e.nextReachedMinPanes+=t.min)})),this.panes[r[0]].size=100-e.prevPanesSize-e.nextReachedMinPanes-this.panes[this.panesCount-1].min-e.nextPanesSize,null):{sums:e,panesToResize:r}},sumPrevPanesSize(e){return this.panes.reduce(((t,n,r)=>t+(r<e?n.size:0)),0)},sumNextPanesSize(e){return this.panes.reduce(((t,n,r)=>t+(r>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 r=e-1,i=document.createElement("div");i.classList.add("splitpanes__splitter"),n||(i.onmousedown=e=>this.onMouseDown(e,r),"undefined"!=typeof window&&"ontouchstart"in window&&(i.ontouchstart=e=>this.onMouseDown(e,r)),i.onclick=e=>this.onSplitterClick(e,r+1)),this.dblClickSplitter&&(i.ondblclick=e=>this.onSplitterDblClick(e,r+1)),t.parentNode.insertBefore(i,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((e=>{e.className.includes("splitpanes__splitter")&&this.removeSplitter(e)}));let t=0;e.forEach((e=>{e.className.includes("splitpanes__pane")&&(!t&&this.firstSplitter?this.addSplitter(t,e,!0):t&&this.addSplitter(t,e),t++)}))},requestUpdate({target:e,...t}){const n=this.indexedPanes[e._.uid];Object.entries(t).forEach((([e,t])=>n[e]=t))},onPaneAdd(e){let t=-1;Array.from(e.$el.parentNode.children).some((n=>(n.className.includes("splitpanes__pane")&&t++,n===e.$el)));const n=parseFloat(e.minSize),r=parseFloat(e.maxSize);this.panes.splice(t,0,{id:e._.uid,index:t,min:isNaN(n)?0:n,max:isNaN(r)?100:r,size:null===e.size?null:parseFloat(e.size),givenSize:e.size,update:e.update}),this.panes.forEach(((e,t)=>e.index=t)),this.ready&&this.$nextTick((()=>{this.redoSplitters(),this.resetPaneSizes({addedPane:this.panes[t]}),this.$emit("pane-add",{index:t,panes:this.panes.map((e=>({min:e.min,max:e.max,size:e.size})))})}))},onPaneRemove(e){const t=this.panes.findIndex((t=>t.id===e._.uid)),n=this.panes.splice(t,1)[0];this.panes.forEach(((e,t)=>e.index=t)),this.$nextTick((()=>{this.redoSplitters(),this.resetPaneSizes({removedPane:{...n,index:t}}),this.$emit("pane-remove",{removed:n,panes:this.panes.map((e=>({min:e.min,max:e.max,size:e.size})))})}))},resetPaneSizes(e={}){e.addedPane||e.removedPane?this.panes.some((e=>null!==e.givenSize||e.min||e.max<100))?this.equalizeAfterAddOrRemove(e):this.equalize():this.initialPanesSizing(),this.ready&&this.$emit("resized",this.panes.map((e=>({min:e.min,max:e.max,size:e.size}))))},equalize(){const e=100/this.panesCount;let t=0;const n=[],r=[];this.panes.forEach((i=>{i.size=Math.max(Math.min(e,i.max),i.min),t-=i.size,i.size>=i.max&&n.push(i.id),i.size<=i.min&&r.push(i.id)})),t>.1&&this.readjustSizes(t,n,r)},initialPanesSizing(){let e=100;const t=[],n=[];let r=0;this.panes.forEach((i=>{e-=i.size,null!==i.size&&r++,i.size>=i.max&&t.push(i.id),i.size<=i.min&&n.push(i.id)}));let i=100;e>.1&&(this.panes.forEach((t=>{null===t.size&&(t.size=Math.max(Math.min(e/(this.panesCount-r),t.max),t.min)),i-=t.size})),i>.1&&this.readjustSizes(e,t,n))},equalizeAfterAddOrRemove({addedPane:e}={}){let t=100/this.panesCount,n=0;const r=[],i=[];e&&null!==e.givenSize&&(t=(100-e.givenSize)/(this.panesCount-1)),this.panes.forEach((e=>{n-=e.size,e.size>=e.max&&r.push(e.id),e.size<=e.min&&i.push(e.id)})),Math.abs(n)<.1||(this.panes.forEach((o=>{e&&null!==e.givenSize&&e.id===o.id||(o.size=Math.max(Math.min(t,o.max),o.min)),n-=o.size,o.size>=o.max&&r.push(o.id),o.size<=o.min&&i.push(o.id)})),n>.1&&this.readjustSizes(n,r,i))},readjustSizes(e,t,n){let r;r=e>0?e/(this.panesCount-t.length):e/(this.panesCount-n.length),this.panes.forEach((i=>{if(e>0&&!t.includes(i.id)){const t=Math.max(Math.min(i.size+r,i.max),i.min),n=t-i.size;e-=n,i.size=t}else if(!n.includes(i.id)){const t=Math.max(Math.min(i.size+r,i.max),i.min),n=t-i.size;e-=n,i.size=t}i.update({[this.horizontal?"height":"width"]:`${this.indexedPanes[i.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?e=>this.onSplitterDblClick(e,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 N("div",{ref:"container",class:["splitpanes","splitpanes--"+(this.horizontal?"horizontal":"vertical"),{"splitpanes--dragging":this.touch.dragging}]},this.$slots.default())}},Ws={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||0===this.size?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})}}},Us=fe(Ws,[["render",function(e,t,n,i,o,s){return a(),E("div",{class:"splitpanes__pane",onClick:t[0]||(t[0]=t=>s.onPaneClick(t,e._.uid)),style:x(e.style)},[r(e.$slots,"default")],4)}]]);function js(e){const t=new U(new W);return t.serialize(e),t.stream.toString()}function $s(e){return null==e||""===e?e:new j(new W(e)).deserialize()}class Hs{debug=!1;simple=!1;utc=!1;longType="number";dictType="object";nullType=void 0;static Instance=new Hs;textEncoder=new TextEncoder;textDecoder=new TextDecoder;constructor(){}encodeResponse(e,t={}){var n=new W,r=new U(n,this.simple,this.utc),i=t;this.simple;var o=0;for(var s in i)o++;o>0&&(n.writeByte(72),r.serialize(i),r.reset()),e instanceof Error?(n.writeByte(69),r.serialize(this.debug&&e.stack?e.stack:e.message)):(n.writeByte(82),r.serialize(e)),n.writeByte(122);const a=n.takeBytes();return this.textDecoder.decode(a)}decodeRequest(e,t={}){const n=this.textEncoder.encode(e);if(0===n.length)return["~",[]];var r=new W(n),i=new j(r,!1);i.longType=this.longType,i.dictType=this.dictType;var o=r.readByte();if(console.log("tag",o),72===o){var s=i.deserialize(this.nullType);for(var a in s)t[a]=s[a];i.reset(),o=r.readByte()}switch(o){case 67:return[i.deserialize(String),this.decodeArguments(i)];case 122:return["~",[]];default:throw new Error("Invalid request:\r\n"+r.toString())}}decodeArguments(e){var t=e.stream;let n=[];if(97===t.readByte()){e.reset();var r=$.readCount(t);const o=new Array(r).fill(this.nullType);n=new Array(r),e.addReference(n);for(var i=0;i<r;++i)n[i]=e.deserialize(o[i]);t.readByte()}return n}encodeRequest(e,t,n={}){var r=new W,i=new U(r,this.simple,this.utc),o=n;this.simple&&(o.simple=!0);var s=0;for(var a in o)s++;s>0&&(r.writeByte(72),i.serialize(o),i.reset()),r.writeByte(67),i.serialize(e),t.length>0&&(i.reset(),i.serialize(t)),r.writeByte(122);const l=r.takeBytes();return this.textDecoder.decode(l)}decodeResponse(e,t={}){const n=this.textEncoder.encode(e);var r=new W(n),i=new j(r,!1);i.longType=this.longType,i.dictType=this.dictType;var o=r.readByte();if(72===o){var s=i.deserialize();for(var a in s)t[a]=s[a];i.reset(),o=r.readByte()}switch(o){case 82:return t.simple&&(i.simple=!0),console.log(o,"9999999999"),i.deserialize();case 69:throw new Error(i.deserialize(String));case 122:return;default:throw new Error("Invalid response:\r\n"+r.toString())}}}const Gs=new Map,qs=new Map;let Xs;const Vs={getDefaultClient(){if(Xs||(Xs=new xe(SysConfig?.ServiceURL.DefaultHproseAPI)),!Xs)throw Error("HproseProxy对象为空");return Xs},registerHprose(e,t){const n=qs.get(e);if(!n){const n=new xe(t);Gs.set(e,n)}return n},getHprose:e=>qs?.get(e),getProxyHprose:e=>Gs.get(e),unregisterHprose(e){Gs.get(e)&&(qs.delete(e),Gs.delete(e))}},Zs=5e3,Ks=36e5,Ys={Login:"/api/User/Login",ChangeMyPwd:"/api/User/ChangeMyPwd",Logout:"/api/Check/ExitLogin",RefreshToken:"/api/Check/RefreshToken",CheckToken:"/api/Check/CheckToken",GetSystemRights:"/api/System/GetSystem"},Js="access_token",Qs=ue?.Config?.ServiceURL.LoginAuthURL;function ea(){const e=Ee();e&&Ni(Ys.RefreshToken,Qs,{refreshToken:e}).then((e=>{na(e.data)}))}function ta(){const e=be.getJsonObject(Js);if(!e)return;const t=(new Date).getTime(),n=new Date(e.expire).getTime()-t;n>0&&(n<=Zs?ea():setTimeout(ea,n-Zs))}function na(e){const t=(new Date).getTime();let n=new Date(e.accessToken.expires).getTime()-t;if(n>=Ks?(n=18e5,console.warn("客户端时间与服务器不一致:过去时间!")):n<-6e5&&(n=18e5,console.warn("客户端时间与服务器不一致:未来时间!")),n>0){let t=Se();t?(t.token=e.accessToken.tokenContent,t.expire=e.accessToken.expires,t.refresh=e.refreshToken.tokenContent):t={token:e.accessToken.tokenContent,expire:e.accessToken.expires,refresh:e.refreshToken.tokenContent},be.set(Js,t,n/1e3),ta()}else be.remove(Js)}const ra="Wm314243",ia=ue?.Config?.ServiceURL.LoginAuthURL;async function oa(e){const t={username:e.username,pwd:Sr.encryptToString(e.pwd,ra)},n=await Ni(Ys.Login,ia,t),r=n?.data;return r&&(na(r.doubletoken),co(!1)),r}function sa(e){const t={oldpwd:Sr.encryptToString(e.oldpwd,ra),newpwd:Sr.encryptToString(e.newpwd,ra)};return Ni(Ys.ChangeMyPwd,ia,t)}function aa(e){return Sr.encryptToString(e,ra)}function la(){const e=Se();e&&(Fi(Ys.Logout,ia,{token:e.token,reftoken:e.refresh}),Ce())}function ca(e){return Ni(Ys.CheckToken,ia,{token:e})}var ua=(e=>(e[e.Widget=0]="Widget",e[e.Route=1]="Route",e[e.URL=2]="URL",e[e.Action=3]="Action",e))(ua||{});const ha="ROLE_SYSTEM_RIGHT",fa=new ve("",globalThis.sessionStorage);function da(){return fa.get(ha)}function pa(e){fa.set(ha,e)}function ga(){fa.remove(ha)}function ma(e){if(e)for(let t=0;t<e.length;t++){const n=e[t];n.children&&n.children.length>0?(ma(n.children),0===n.children.length&&(e.splice(t,1),t--)):n.selected||(e.splice(t,1),t--)}}function va(e,t,n="name"){e&&t&&e.forEach((e=>{const r=t.find((t=>t[n]===e[n]));r&&(e.children?r.children&&va(e.children,r.children,n):r.children&&0!==r.children.length||r.selected&&(e.selected=r.selected))}))}function ya(e,t,n="name"){e&&t&&e.forEach((e=>{const r=t.find((t=>t[n]===e[n]));r&&(e.children?r.children&&ya(e.children,r.children,n):r.children&&0!==r.children.length||r.selected&&(e.selected=r.selected))}))}function wa(e,t,n,r="name"){const i=e[n],o=t[n];i?o&&ya(i,o,r):o&&(e[n]=o)}function ba(e){if(e&&e.length>0){const t=e.length;let n,r=!1;if(t>0){r=Oe(e[0]);const i=r?e[0]:JSON.parse(e[0]);if(t>1)for(let t=1;t<e.length;t++){const n=e[t],o=r?n:JSON.parse(n);wa(i,o,"routes","name"),wa(i,o,"widgetMenu","name"),wa(i,o,"widgets","id"),wa(i,o,"functions","id")}n=i}return n&&(ma(n.routes),ma(n.widgetMenu),ma(n.widgets),ma(n.functions)),n}}const Sa=[],Ca=[],Ea=[];function xa(){return da()}async function ka(e,t=!1){ga();const n=Ys.GetSystemRights,r=ue?.Config?.ServiceURL.LoginAuthURL,i=await Ni(n,r,{systemid:e});if(!i||!i.data)return void ue.Message?.warn("无法获取功能授权列表!");const o=i.data;if(o&&o.length>0){if(t){const e=JSON.parse(o[0]);return pa(e),e}{const e=ba(o);return pa(e),e}}}function Ma(e,t){const n={...e};return n.meta||(n.meta={}),null!=t.index&&(n.meta.index=t.index),null!=t.title&&(n.meta.title=t.title),e.children&&(n.children=[],t.children&&t.children.forEach((t=>{const r=e.children?.find((e=>e.path===t.path));if(r){const e=Ma(r,t);e&&n.children?.push(e)}}))),n}function Ta(e,t=2){if(0===t)return e;const n=xa();return n&&n.routes?(Ea.length>0||e.forEach((e=>{const t=n.routes?.find((t=>t.name===e.name));if(t){const n=Ma(e,t);n&&Ea.push(n)}})),Ea):void 0}function za(e,t){const n={...e};return null!=t.index&&(n.index=t.index),e.children&&(n.children=[],t.children&&t.children.forEach((t=>{const r=e.children?.find((e=>e.name===t.name));if(r){const e=za(r,t);e&&n.children?.push(e)}}))),n}function Aa(e,t=2){if(0===t)return e;const n=xa();return n&&n.widgetMenu?(Ca.length>0||e.forEach((e=>{const t=n.widgetMenu?.find((t=>t.name===e.name));if(t){const n=za(e,t);n&&Ca.push(n)}})),Ca):void 0}function _a(e,t=2){if(0===t)return e;const n=xa();return n&&n.widgets?(Sa.length>0||e?.forEach((e=>{const t=n.widgets?.find((t=>t.id===e.id));t&&Sa.push(e)})),Sa):void 0}function La(e,t=2){if(0===t&&(ue.RightWidgetConfigMap=e,ue.RightWidgetConfigMap&&ue.RightWidgetConfigMap.size>0))return ue.RightWidgetConfigMap;const n=xa();if(n&&n.widgets){const t=new Map;if(n.widgets.forEach((e=>{const n=e.layoutID;if(n){let r;t.has(n)&&(r=t.get(n)),r||(r=new Array,t.set(n,r)),r&&r.push(e)}})),n.widgets.length=0,t.size>0){const n=new Map;for(const[r,i]of t){const t=e.get(r);if(t){const e=new Array;t.forEach((t=>{i.findIndex((e=>e.id===t.id))>=0&&e.push(t)})),e.length>0&&n.set(r,e),t.length=0}}return t.clear(),ue.RightWidgetConfigMap=n,n}}else;}function Ra(e,t=2){if(0===t)return e;const n=xa();return n?n.functions:void 0}const Ia={mounted(e,t){const n=t.value,r=n&&n.container&&document.querySelector(n.container)||document.querySelector("#map3dContainer")||document.body,i=n&&n.selector&&e.querySelector(n.selector)||e.querySelector(".drag-el")||e;i!==e&&i.classList.add("ls-draggable"),i.onmousedown=function(t){e.style.transition="none";const n=t.clientX-e.offsetLeft,i=t.clientY-e.offsetTop,o=r.offsetWidth,s=r.offsetHeight,a=e.offsetWidth,l=e.offsetHeight;"100"!==e.style.zIndex&&(e.style.zIndex=100),r.onmousemove=function(t){let r=t.clientX-n,c=t.clientY-i;r<0&&(r=0),c<0&&(c=0),r>o-a&&(r=o-a),c>s-l&&(c=s-l),e.style.left=r+"px",e.style.top=c+"px"},r.onmouseup=function(t){r.onmousemove=r.onmouseup=null,e.style.transition="all 0.3s"}}}};function Da(e){e.directive("drag",Ia)}const Pa={beforeMount(e,t){let n=null,r=0;const i=()=>t?.value(),o=()=>{Date.now()-r<100&&i(),n&&clearInterval(n),n=null};ao.on(e,"mousedown",(e=>{0===e.button&&(r=Date.now(),ao.once(document,"mouseup",o),n&&clearInterval(n),n=setInterval(i,100))}))}};function Na(e){e.directive("repeatClick",Pa)}const Oa={mounted(e,t){const n=t.value;e.style.visibility="hidden",e.style["animation-name"]="none";const r=function(e,t){if(function(e){const t=globalThis.scrollY||globalThis.pageYOffset||document.documentElement.scrollTop||e.parentNode.scrollTop,n=t+(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)?document.documentElement.scrollHeight>document.documentElement.clientHeight?globalThis.innerHeight:document.documentElement.clientHeight:Math.min(document.documentElement.clientHeight,globalThis.innerHeight)),r=function(e){let t;for(;void 0===e.offsetTop;)e=e.parentNode;for(t=e.offsetTop;e=e.offsetParent;)t+=e.offsetTop;return t}(e),i=r+e.clientHeight;return r<n&&i>=t}(e)){e.style.visibility="visible";for(const n in t)e.style[n]=t[n];"none"!=e.style["animation-name"]&&(e.style["animation-duration"]||(e.style["animation-duration"]="1s")),e.parentNode.removeEventListener("scroll",o)}};let i=Date.now();const o=function(){Date.now()-i>=100&&(r(e,n),i=Date.now())};setTimeout((function(){r(e,n)}),1),e.parentNode.addEventListener("scroll",o)}};function Ba(e){e.directive("wow",Oa)}
8
8
  /**
9
9
  * @license
10
10
  * Copyright 2019 Google LLC
11
11
  * SPDX-License-Identifier: Apache-2.0
12
- */const La=Symbol("Comlink.proxy"),Ia=Symbol("Comlink.endpoint"),Da=Symbol("Comlink.releaseProxy"),Na=Symbol("Comlink.finalizer"),Pa=Symbol("Comlink.thrown"),Oa=e=>"object"==typeof e&&null!==e||"function"==typeof e,Ba=new Map([["proxy",{canHandle:e=>Oa(e)&&e[La],serialize(e){const{port1:t,port2:n}=new MessageChannel;return Fa(e,t),[n,[n]]},deserialize:e=>(e.start(),Ua(e))}],["throw",{canHandle:e=>Oa(e)&&Pa in e,serialize({value:e}){let t;return t=e instanceof Error?{isError:!0,value:{message:e.message,name:e.name,stack:e.stack}}:{isError:!1,value:e},[t,[]]},deserialize(e){if(e.isError)throw Object.assign(new Error(e.value.message),e.value);throw e.value}}]]);function Fa(e,t=globalThis,n=["*"]){t.addEventListener("message",(function r(i){if(!i||!i.data)return;if(!function(e,t){for(const n of e){if(t===n||"*"===n)return!0;if(n instanceof RegExp&&n.test(t))return!0}return!1}(n,i.origin))return void console.warn(`Invalid origin '${i.origin}' for comlink proxy`);const{id:o,type:s,path:a}=Object.assign({path:[]},i.data),l=(i.data.argumentList||[]).map(Ya);let c;try{const t=a.slice(0,-1).reduce(((e,t)=>e[t]),e),n=a.reduce(((e,t)=>e[t]),e);switch(s){case"GET":c=n;break;case"SET":t[a.slice(-1)[0]]=Ya(i.data.value),c=!0;break;case"APPLY":c=n.apply(t,l);break;case"CONSTRUCT":c=function(e){return Object.assign(e,{[La]:!0})}(new n(...l));break;case"ENDPOINT":{const{port1:t,port2:n}=new MessageChannel;Fa(e,n),c=function(e,t){return Va.set(e,t),e}(t,[t])}break;case"RELEASE":c=void 0;break;default:return}}catch(e){c={value:e,[Pa]:0}}Promise.resolve(c).catch((e=>({value:e,[Pa]:0}))).then((n=>{const[i,a]=Ka(n);t.postMessage(Object.assign(Object.assign({},i),{id:o}),a),"RELEASE"===s&&(t.removeEventListener("message",r),Wa(t),Na in e&&"function"==typeof e[Na]&&e[Na]())})).catch((e=>{const[n,r]=Ka({value:new TypeError("Unserializable return value"),[Pa]:0});t.postMessage(Object.assign(Object.assign({},n),{id:o}),r)}))})),t.start&&t.start()}function Wa(e){(function(e){return"MessagePort"===e.constructor.name})(e)&&e.close()}function Ua(e,t){const n=new Map;return e.addEventListener("message",(function(e){const{data:t}=e;if(!t||!t.id)return;const r=n.get(t.id);if(r)try{r(t)}finally{n.delete(t.id)}})),qa(e,n,[],t)}function ja(e){if(e)throw new Error("Proxy has been released and is not useable")}function $a(e){return Za(e,new Map,{type:"RELEASE"}).then((()=>{Wa(e)}))}const Ha=new WeakMap,Ga="FinalizationRegistry"in globalThis&&new FinalizationRegistry((e=>{const t=(Ha.get(e)||0)-1;Ha.set(e,t),0===t&&$a(e)}));function qa(e,t,n=[],r=function(){}){let i=!1;const o=new Proxy(r,{get(r,s){if(ja(i),s===Da)return()=>{!function(e){Ga&&Ga.unregister(e)}(o),$a(e),t.clear(),i=!0};if("then"===s){if(0===n.length)return{then:()=>o};const r=Za(e,t,{type:"GET",path:n.map((e=>e.toString()))}).then(Ya);return r.then.bind(r)}return qa(e,t,[...n,s])},set(r,o,s){ja(i);const[a,l]=Ka(s);return Za(e,t,{type:"SET",path:[...n,o].map((e=>e.toString())),value:a},l).then(Ya)},apply(r,o,s){ja(i);const a=n[n.length-1];if(a===Ia)return Za(e,t,{type:"ENDPOINT"}).then(Ya);if("bind"===a)return qa(e,t,n.slice(0,-1));const[l,c]=Xa(s);return Za(e,t,{type:"APPLY",path:n.map((e=>e.toString())),argumentList:l},c).then(Ya)},construct(r,o){ja(i);const[s,a]=Xa(o);return Za(e,t,{type:"CONSTRUCT",path:n.map((e=>e.toString())),argumentList:s},a).then(Ya)}});return function(e,t){const n=(Ha.get(t)||0)+1;Ha.set(t,n),Ga&&Ga.register(e,t,e)}(o,e),o}function Xa(e){const t=e.map(Ka);return[t.map((e=>e[0])),(n=t.map((e=>e[1])),Array.prototype.concat.apply([],n))];var n}const Va=new WeakMap;function Ka(e){for(const[t,n]of Ba)if(n.canHandle(e)){const[r,i]=n.serialize(e);return[{type:"HANDLER",name:t,value:r},i]}return[{type:"RAW",value:e},Va.get(e)||[]]}function Ya(e){switch(e.type){case"HANDLER":return Ba.get(e.name).deserialize(e.value);case"RAW":return e.value}}function Za(e,t,n,r){return new Promise((i=>{const o=new Array(4).fill(0).map((()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16))).join("-");t.set(o,i),e.start&&e.start(),e.postMessage(Object.assign({id:o},n),r)}))}var Ja=Symbol("getEndpoint"),Qa=e=>{const t=Ua(e);return new Proxy(t,{get:(t,n,r)=>n===Ja?e:Reflect.get(t,n,r)})};const el=Qa(new Worker(new URL("/assets/worker-iconv-BsNle8M5.js",import.meta.url),{type:"module"})),tl=Qa(new Worker(new URL("/assets/worker-xmath-AxRk6MsK.js",import.meta.url),{type:"module"})),nl=Qa(new Worker(new URL("/assets/worker-webcache-Csuv6kAg.js",import.meta.url),{type:"module"})),rl=V();function il(e){e.addEventListener("message",(({data:e})=>{rl.emit(e.reqID,e)}))}async function ol(e,t,n){return new Promise(((r,i)=>{const o=String(Date.now())+String(Math.random());e.postMessage({reqID:o,op:t,args:n}),rl.on(o,(e=>{"ok"===e.status?r(e.result):i(e.result)}))}))}function sl(e,t){const n={};for(const r in e){const i=e[r];if(i)for(const e in i){const r=""+e;n[e]=(...e)=>ol(t,r,e)}}return n}class al{static batteryStatusCallback;static _battery;static batteryStatusChange(e){const t=this._battery;t&&(console.log("电量: "+100*t.level+"%"),console.log("充电状态: "+t.charging),this.batteryStatusCallback&&this.batteryStatusCallback(t))}static async OnBatteryStatusHandler(e){this.batteryStatusCallback=e;const t=navigator,n=await t.getBattery();n&&(this._battery=n,this.batteryStatusCallback&&this.batteryStatusCallback(n),n.onlevelchange=this.batteryStatusChange.bind(this),n.onchargingchange=this.batteryStatusChange.bind(this),n.ondischargingtimechange=this.batteryStatusChange.bind(this))}static OffBatteryStatusHandler(){this._battery=void 0}static onlineChangeCallback;static networkStatusChange(){const e=this.isOnline(),t=e?"设备已联网":"设备未联网";console.log(t),this.onlineChangeCallback&&this.onlineChangeCallback(e)}static isOnline(){return navigator.onLine}static OnNetworkHandle(e){this.onlineChangeCallback=e,this.networkStatusChange(),window.addEventListener("online",this.networkStatusChange.bind(this)),window.addEventListener("offline",this.networkStatusChange.bind(this))}static OffNetworkHandle(){window.removeEventListener("online",this.networkStatusChange.bind(this)),window.removeEventListener("offline",this.networkStatusChange.bind(this))}static downloadSpead(e){const t=navigator,n=t.connection||t.mozConnection||t.webkitConnection;return n?(console.log("下行带宽:",n.downlink+" Mbps"),n.addEventListener("change",(()=>{console.log("网络状态变化:",n.effectiveType),e&&e(n.downlink)})),n.downlink):-1}static async vibrate(e=300){const t=navigator,n=t.vibrate||t.webkitVibrate||t.mozVibrate||t.msVibrate;n&&n(e)}static defaultSpeakOption={text:"",lang:"zh-CN",rate:1,pitch:1,volume:.2,voice:0};static changeSpeakOptions(e=.2,t=1,n=1,r=0){e>=0&&e<=1&&(this.defaultSpeakOption.volume=e),t>=.1&&t<=2&&(this.defaultSpeakOption.rate=t),n>=0&&n<=2&&(this.defaultSpeakOption.pitch=n),this.defaultSpeakOption.voice=r}static getSupportedVoices(){return window.speechSynthesis.getVoices().map((e=>e.name))}static getSupportedLanguages(){return navigator.languages}static async speak(e,t="zh-CN"){if(!e)return;const n=window.speechSynthesis;n.speaking&&n.cancel();const r=new SpeechSynthesisUtterance;r.lang=t,r.text=e,r.rate=this.defaultSpeakOption.rate,r.pitch=this.defaultSpeakOption.pitch,r.volume=this.defaultSpeakOption.volume;const i=this.defaultSpeakOption.voice;if(i>0){const e=n.getVoices();i<e.length&&(r.voice=e[i])}n.speak(r)}static async speakEnglish(e){this.speak(e,"en-US")}static stopSpeak(){const e=window.speechSynthesis;e.speaking&&e.cancel()}static openNotification(e,t,n,r,i){"Notification"in window||console.log("浏览器不支持桌面通知!");let o=n;if(t)o=o??{},o.body=t;else if("granted"===Notification.permission){const t=new Notification(e,o);t.onclick=e=>{i&&i(e.target)},t.onclose=e=>{r&&r(e.target)}}else"denied"!==Notification.permission&&Notification.requestPermission((t=>{if("granted"===t){const t=new Notification(e,o);t.onclick=e=>{i&&i(e.target)},t.onclose=e=>{r&&r(e.target)}}}))}static isPageVisible(){return!document.hidden}static onPageVisibleChange(e){document.addEventListener("visibilitychange",(()=>{e&&e(!document.hidden)}))}static async copyText(e){return await navigator.clipboard.writeText(e)}static async readText(){return await navigator.clipboard.readText()}static viewTransition(e){if(e){if(!document.startViewTransition)return void e();document.startViewTransition((()=>e()))}}}export{Rs as ADivider,Eo as BigFileDownload,pi as CommonTool,lr as DayjsTool,tr as Download,yi as EnumColor,io as FileUpload,xr as GetSignalRClient,ce as Global,Us as GlobalHprose,K as GlobalMitt,ar as GzipTool,st as H5Tool,Ge as HproseClient,Os as HproseRPCCodec,ir as HttpDownload,rr as JsonDownload,ft as LayoutContainer,ue as LayoutContainerEnum,ht as LayoutManager,wo as LocalForage,ao as LockState,ra as MenuItemEnum,vs as MinWindowMap,al as NavigatorPlugin,xo as ObjToUrlParams,To as OpenRouterURL,Ds as Pane,Qe as ProxyClient,fe as RouterTransition,pt as RouterTransitionAnimate,nr as SaveAs,or as SaveToSelectedFile,Ls as Splitpanes,qe as Storage,He as StringUtils,de as SuspenseWithError,ne as SysEvents,js as TOKEN_REFRESH_TIME,$s as TOKEN_VALID_TIMESPAN,Hs as USER_TOKEN_API,Qr as WarGridTool,Cr as WaterMark,Jr as WebCacheTool,ms as WindowsMap,Ms as XWindow,ys as XWindowManager,br as XXTEA,sr as ZipTool,fs as autoRefresh,ri as base64ToBlob,ii as blobToDataURL,_i as calculateBestTextColor,Qs as changeMyPWD,Ao as checkAddDefaultRoute,Vs as checkDoRefreshToken,na as checkToken,Ze as clearLocalToken,la as clearRight,ki as colorIsDark,ai as convertDecimalism,ci as convertDecimalismData,li as convertDecimalismSpacing,ui as convertToDecimalism,hi as convertToDecimalismByString,di as convertToDecimalismByString2,ps as createDB,oo as createFileUpload,Ti as darken,ko as deepMerge,Ii as delay,gs as deleteDB,Ps as deserialize,hs as doCloseModal,us as doLoadModal,Xs as doRefreshToken,lo as doSetLock,Ta as dragDirective,Po as exportSystemRights,ei as filterObj,er as findStringPrefix,Fi as get,Jn as getCommonFileBase,va as getCurrentSystemRight,Ui as getData,$i as getDownload,ea as getEncryptPWD,Xn as getFileBase,Vn as getFileExtension,ka as getFunctions,gi as getHexColor,Ye as getLocalToken,co as getLockState,vi as getLongHexColor,Kn as getPathBase,ct as getProxyClient,mi as getRGBColor,bi as getRGBColorFromHSLA,ti as getRandomInt,ni as getRandomItem,Je as getRefreshToken,sa as getRight,Mo as getRouteURL,ba as getRoutes,ya as getSystemRoleRight,No as getTabRouteData,zo as getVueURL,Ea as getWidgetConfig,xa as getWidgetConfigMap,Ca as getWidgetMenus,Do as globFilterLayoutWidgetConfig,Ro as globFilterObjects,Lo as globFilterObjectsOld,ca as handleNodes,xi as hexToRGB,el as iconvWorker,lt as init,ut as initDefaultProxyClient,il as initWorker,ge as is,Ae as isArray,ke as isAsyncFunction,Me as isBoolean,_e as isClient,Ee as isDate,ve as isDef,Le as isElement,Ne as isEmpty,wi as isEnumColor,Pe as isError,me as isFunction,Ci as isHexColor,De as isImageDom,We as isMap,we as isNull,be as isNullAndUnDef,Se as isNullOrUnDef,xe as isNumber,Ce as isObjectX,Te as isPromise,Ie as isServer,ze as isString,je as isStringLikeJson,$e as isStringLikeKml,Fe as isSymbol,ye as isUnDef,Ue as isValidURL,Be as isWeakMap,Oe as isWeakSet,Re as isWindow,so as jquery,zi as lighten,Js as login,ta as logout,fa as mergeFilterRoleSysRight,Qn as mergeNames,ua as mergeNodes,da as mergeNodesAll,V as mitt,mt as newGuid,fo as onLockListener,qn as parseLocalPath,Wi as post,_o as recursiveRoutes,sl as registerWorkerSerivces,Ma as repeatDirective,oi as replaceAll,Yn as replaceFileExtension,Ni as requestGet,Oi as requestPost,Bi as requestPostBody,si as reserveDecimal,Ei as rgbToHex,Ns as serialize,Ks as setLocalToken,aa as setRight,za as setupDragDirective,Aa as setupRepeatDirective,Ra as setupWowDirective,Li as sleep,Xe as storage,Ke as storageHelper,Zn as toLowerCaseExtension,fi as traverseXYArrayFromInsideOut,po as unLockListener,gt as uuid,Ho as verifiyNumberInteger,Qo as verifyAccount,Xo as verifyAndSpace,cs as verifyCarNum,Go as verifyCnAndSpace,is as verifyEmail,qo as verifyEnAndSpace,ss as verifyFullName,rs as verifyIPAddress,os as verifyIdCard,Yo as verifyNumberCnUppercase,Vo as verifyNumberComma,$o as verifyNumberIntegerAndFloat,Uo as verifyNumberPercentage,jo as verifyNumberPercentageFloat,es as verifyPassword,ts as verifyPasswordPowerful,ns as verifyPasswordStrength,Zo as verifyPhone,as as verifyPostalCode,Jo as verifyTelPhone,Ko as verifyTextColor,ls as verifyUrl,nl as webCacheWorker,_a as wowDirective,Fo as writeIconifyList,Wo as writeSysRoleRight,tl as xmathWorker};
12
+ */const Fa=Symbol("Comlink.proxy"),Wa=Symbol("Comlink.endpoint"),Ua=Symbol("Comlink.releaseProxy"),ja=Symbol("Comlink.finalizer"),$a=Symbol("Comlink.thrown"),Ha=e=>"object"==typeof e&&null!==e||"function"==typeof e,Ga=new Map([["proxy",{canHandle:e=>Ha(e)&&e[Fa],serialize(e){const{port1:t,port2:n}=new MessageChannel;return qa(e,t),[n,[n]]},deserialize:e=>(e.start(),Va(e))}],["throw",{canHandle:e=>Ha(e)&&$a in e,serialize({value:e}){let t;return t=e instanceof Error?{isError:!0,value:{message:e.message,name:e.name,stack:e.stack}}:{isError:!1,value:e},[t,[]]},deserialize(e){if(e.isError)throw Object.assign(new Error(e.value.message),e.value);throw e.value}}]]);function qa(e,t=globalThis,n=["*"]){t.addEventListener("message",(function r(i){if(!i||!i.data)return;if(!function(e,t){for(const n of e){if(t===n||"*"===n)return!0;if(n instanceof RegExp&&n.test(t))return!0}return!1}(n,i.origin))return void console.warn(`Invalid origin '${i.origin}' for comlink proxy`);const{id:o,type:s,path:a}=Object.assign({path:[]},i.data),l=(i.data.argumentList||[]).map(rl);let c;try{const t=a.slice(0,-1).reduce(((e,t)=>e[t]),e),n=a.reduce(((e,t)=>e[t]),e);switch(s){case"GET":c=n;break;case"SET":t[a.slice(-1)[0]]=rl(i.data.value),c=!0;break;case"APPLY":c=n.apply(t,l);break;case"CONSTRUCT":c=function(e){return Object.assign(e,{[Fa]:!0})}(new n(...l));break;case"ENDPOINT":{const{port1:t,port2:n}=new MessageChannel;qa(e,n),c=function(e,t){return tl.set(e,t),e}(t,[t])}break;case"RELEASE":c=void 0;break;default:return}}catch(e){c={value:e,[$a]:0}}Promise.resolve(c).catch((e=>({value:e,[$a]:0}))).then((n=>{const[i,a]=nl(n);t.postMessage(Object.assign(Object.assign({},i),{id:o}),a),"RELEASE"===s&&(t.removeEventListener("message",r),Xa(t),ja in e&&"function"==typeof e[ja]&&e[ja]())})).catch((e=>{const[n,r]=nl({value:new TypeError("Unserializable return value"),[$a]:0});t.postMessage(Object.assign(Object.assign({},n),{id:o}),r)}))})),t.start&&t.start()}function Xa(e){(function(e){return"MessagePort"===e.constructor.name})(e)&&e.close()}function Va(e,t){const n=new Map;return e.addEventListener("message",(function(e){const{data:t}=e;if(!t||!t.id)return;const r=n.get(t.id);if(r)try{r(t)}finally{n.delete(t.id)}})),Qa(e,n,[],t)}function Za(e){if(e)throw new Error("Proxy has been released and is not useable")}function Ka(e){return il(e,new Map,{type:"RELEASE"}).then((()=>{Xa(e)}))}const Ya=new WeakMap,Ja="FinalizationRegistry"in globalThis&&new FinalizationRegistry((e=>{const t=(Ya.get(e)||0)-1;Ya.set(e,t),0===t&&Ka(e)}));function Qa(e,t,n=[],r=function(){}){let i=!1;const o=new Proxy(r,{get(r,s){if(Za(i),s===Ua)return()=>{!function(e){Ja&&Ja.unregister(e)}(o),Ka(e),t.clear(),i=!0};if("then"===s){if(0===n.length)return{then:()=>o};const r=il(e,t,{type:"GET",path:n.map((e=>e.toString()))}).then(rl);return r.then.bind(r)}return Qa(e,t,[...n,s])},set(r,o,s){Za(i);const[a,l]=nl(s);return il(e,t,{type:"SET",path:[...n,o].map((e=>e.toString())),value:a},l).then(rl)},apply(r,o,s){Za(i);const a=n[n.length-1];if(a===Wa)return il(e,t,{type:"ENDPOINT"}).then(rl);if("bind"===a)return Qa(e,t,n.slice(0,-1));const[l,c]=el(s);return il(e,t,{type:"APPLY",path:n.map((e=>e.toString())),argumentList:l},c).then(rl)},construct(r,o){Za(i);const[s,a]=el(o);return il(e,t,{type:"CONSTRUCT",path:n.map((e=>e.toString())),argumentList:s},a).then(rl)}});return function(e,t){const n=(Ya.get(t)||0)+1;Ya.set(t,n),Ja&&Ja.register(e,t,e)}(o,e),o}function el(e){const t=e.map(nl);return[t.map((e=>e[0])),(n=t.map((e=>e[1])),Array.prototype.concat.apply([],n))];var n}const tl=new WeakMap;function nl(e){for(const[t,n]of Ga)if(n.canHandle(e)){const[r,i]=n.serialize(e);return[{type:"HANDLER",name:t,value:r},i]}return[{type:"RAW",value:e},tl.get(e)||[]]}function rl(e){switch(e.type){case"HANDLER":return Ga.get(e.name).deserialize(e.value);case"RAW":return e.value}}function il(e,t,n,r){return new Promise((i=>{const o=new Array(4).fill(0).map((()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16))).join("-");t.set(o,i),e.start&&e.start(),e.postMessage(Object.assign({id:o},n),r)}))}var ol=Symbol("getEndpoint"),sl=e=>{const t=Va(e);return new Proxy(t,{get:(t,n,r)=>n===ol?e:Reflect.get(t,n,r)})};const al=sl(new Worker(new URL("/assets/worker-iconv-BsNle8M5.js",import.meta.url),{type:"module"})),ll=sl(new Worker(new URL("/assets/worker-xmath-AxRk6MsK.js",import.meta.url),{type:"module"})),cl=sl(new Worker(new URL("/assets/worker-webcache-CkCFZE0-.js",import.meta.url),{type:"module"})),ul=Z();function hl(e){e.addEventListener("message",(({data:e})=>{ul.emit(e.reqID,e)}))}async function fl(e,t,n){return new Promise(((r,i)=>{const o=String(Date.now())+String(Math.random());e.postMessage({reqID:o,op:t,args:n}),ul.on(o,(e=>{"ok"===e.status?r(e.result):i(e.result)}))}))}function dl(e,t){const n={};for(const r in e){const i=e[r];if(i)for(const e in i){const r=""+e;n[e]=(...e)=>fl(t,r,e)}}return n}class pl{static batteryStatusCallback;static _battery;static batteryStatusChange(e){const t=this._battery;t&&(console.log("电量: "+100*t.level+"%"),console.log("充电状态: "+t.charging),this.batteryStatusCallback&&this.batteryStatusCallback(t))}static async OnBatteryStatusHandler(e){this.batteryStatusCallback=e;const t=navigator,n=await t.getBattery();n&&(this._battery=n,this.batteryStatusCallback&&this.batteryStatusCallback(n),n.onlevelchange=this.batteryStatusChange.bind(this),n.onchargingchange=this.batteryStatusChange.bind(this),n.ondischargingtimechange=this.batteryStatusChange.bind(this))}static OffBatteryStatusHandler(){this._battery=void 0}static onlineChangeCallback;static networkStatusChange(){const e=this.isOnline(),t=e?"设备已联网":"设备未联网";console.log(t),this.onlineChangeCallback&&this.onlineChangeCallback(e)}static isOnline(){return navigator.onLine}static OnNetworkHandle(e){this.onlineChangeCallback=e,this.networkStatusChange(),window.addEventListener("online",this.networkStatusChange.bind(this)),window.addEventListener("offline",this.networkStatusChange.bind(this))}static OffNetworkHandle(){window.removeEventListener("online",this.networkStatusChange.bind(this)),window.removeEventListener("offline",this.networkStatusChange.bind(this))}static downloadSpead(e){const t=navigator,n=t.connection||t.mozConnection||t.webkitConnection;return n?(console.log("下行带宽:",n.downlink+" Mbps"),n.addEventListener("change",(()=>{console.log("网络状态变化:",n.effectiveType),e&&e(n.downlink)})),n.downlink):-1}static async vibrate(e=300){const t=navigator,n=t.vibrate||t.webkitVibrate||t.mozVibrate||t.msVibrate;n&&n(e)}static defaultSpeakOption={text:"",lang:"zh-CN",rate:1,pitch:1,volume:.2,voice:0};static changeSpeakOptions(e=.2,t=1,n=1,r=0){e>=0&&e<=1&&(this.defaultSpeakOption.volume=e),t>=.1&&t<=2&&(this.defaultSpeakOption.rate=t),n>=0&&n<=2&&(this.defaultSpeakOption.pitch=n),this.defaultSpeakOption.voice=r}static getSupportedVoices(){return window.speechSynthesis.getVoices().map((e=>e.name))}static getSupportedLanguages(){return navigator.languages}static async speak(e,t="zh-CN"){if(!e)return;const n=window.speechSynthesis;n.speaking&&n.cancel();const r=new SpeechSynthesisUtterance;r.lang=t,r.text=e,r.rate=this.defaultSpeakOption.rate,r.pitch=this.defaultSpeakOption.pitch,r.volume=this.defaultSpeakOption.volume;const i=this.defaultSpeakOption.voice;if(i>0){const e=n.getVoices();i<e.length&&(r.voice=e[i])}n.speak(r)}static async speakEnglish(e){this.speak(e,"en-US")}static stopSpeak(){const e=window.speechSynthesis;e.speaking&&e.cancel()}static openNotification(e,t,n,r,i){"Notification"in window||console.log("浏览器不支持桌面通知!");let o=n;if(t)o=o??{},o.body=t;else if("granted"===Notification.permission){const t=new Notification(e,o);t.onclick=e=>{i&&i(e.target)},t.onclose=e=>{r&&r(e.target)}}else"denied"!==Notification.permission&&Notification.requestPermission((t=>{if("granted"===t){const t=new Notification(e,o);t.onclick=e=>{i&&i(e.target)},t.onclose=e=>{r&&r(e.target)}}}))}static isPageVisible(){return!document.hidden}static onPageVisibleChange(e){document.addEventListener("visibilitychange",(()=>{e&&e(!document.hidden)}))}static async copyText(e){return await navigator.clipboard.writeText(e)}static async readText(){return await navigator.clipboard.readText()}static viewTransition(e){if(e){if(!document.startViewTransition)return void e();document.startViewTransition((()=>e()))}}}export{Bs as ADivider,xo as BigFileDownload,gi as CommonTool,cr as DayjsTool,nr as Download,wi as EnumColor,oo as FileUpload,kr as GetSignalRClient,ue as Global,Vs as GlobalHprose,K as GlobalMitt,lr as GzipTool,at as H5Tool,me as HproseClient,Hs as HproseRPCCodec,or as HttpDownload,ir as JsonDownload,pt as LayoutContainer,he as LayoutContainerEnum,ft as LayoutManager,bo as LocalForage,lo as LockState,ua as MenuItemEnum,xs as MinWindowMap,pl as NavigatorPlugin,ko as ObjToUrlParams,To as OpenRouterURL,Us as Pane,xe as ProxyClient,pe as RouterTransition,gt as RouterTransitionAnimate,rr as SaveAs,sr as SaveToSelectedFile,Fs as Splitpanes,ve as Storage,ge as StringUtils,de as SuspenseWithError,re as SysEvents,Zs as TOKEN_REFRESH_TIME,Ks as TOKEN_VALID_TIMESPAN,Ys as USER_TOKEN_API,ei as WarGridTool,Er as WaterMark,Qr as WebCacheTool,Es as WindowsMap,Ps as XWindow,ks as XWindowManager,Sr as XXTEA,ar as ZipTool,ps as autoRefresh,ii as base64ToBlob,oi as blobToDataURL,Li as calculateBestTextColor,sa as changeMyPWD,_o as checkAddDefaultRoute,ta as checkDoRefreshToken,ca as checkToken,Ce as clearLocalToken,ga as clearRight,Mi as colorIsDark,li as convertDecimalism,ui as convertDecimalismData,ci as convertDecimalismSpacing,hi as convertToDecimalism,fi as convertToDecimalismByString,di as convertToDecimalismByString2,gs as createDB,so as createFileUpload,Ti as darken,Mo as deepMerge,Di as delay,ms as deleteDB,$s as deserialize,fs as doCloseModal,hs as doLoadModal,ea as doRefreshToken,co as doSetLock,Ia as dragDirective,Oo as exportSystemRights,ti as filterObj,tr as findStringPrefix,Wi as get,Qn as getCommonFileBase,xa as getCurrentSystemRight,ji as getData,Hi as getDownload,aa as getEncryptPWD,Vn as getFileBase,Zn as getFileExtension,Ra as getFunctions,mi as getHexColor,Se as getLocalToken,uo as getLockState,yi as getLongHexColor,Kn as getPathBase,ut as getProxyClient,vi as getRGBColor,Si as getRGBColorFromHSLA,ni as getRandomInt,ri as getRandomItem,Ee as getRefreshToken,da as getRight,Ao as getRouteURL,Ta as getRoutes,ka as getSystemRoleRight,No as getTabRouteData,zo as getVueURL,_a as getWidgetConfig,La as getWidgetConfigMap,Aa as getWidgetMenus,Po as globFilterLayoutWidgetConfig,Ro as globFilterObjects,Io as globFilterObjectsOld,ma as handleNodes,ki as hexToRGB,al as iconvWorker,ct as init,ht as initDefaultProxyClient,hl as initWorker,_e as is,He as isArray,We as isAsyncFunction,$e as isBoolean,Ge as isClient,Be as isDate,Re as isDef,Xe as isElement,Ke as isEmpty,bi as isEnumColor,Ye as isError,Le as isFunction,Ei as isHexColor,Ze as isImageDom,tt as isMap,De as isNull,Pe as isNullAndUnDef,Ne as isNullOrUnDef,Fe as isNumber,Oe as isObjectX,Ue as isPromise,Ve as isServer,je as isString,rt as isStringLikeJson,it as isStringLikeKml,et as isSymbol,Ie as isUnDef,nt as isValidURL,Qe as isWeakMap,Je as isWeakSet,qe as isWindow,ao as jquery,zi as lighten,oa as login,la as logout,ba as mergeFilterRoleSysRight,er as mergeNames,va as mergeNodes,wa as mergeNodesAll,Z as mitt,vt as newGuid,po as onLockListener,Xn as parseLocalPath,Ui as post,Lo as recursiveRoutes,dl as registerWorkerSerivces,Pa as repeatDirective,si as replaceAll,Yn as replaceFileExtension,Ni as requestGet,Bi as requestPost,Fi as requestPostBody,ai as reserveDecimal,xi as rgbToHex,js as serialize,na as setLocalToken,pa as setRight,Da as setupDragDirective,Na as setupRepeatDirective,Ba as setupWowDirective,Ii as sleep,ye as storage,be as storageHelper,vs as streamFetch,ws as streamFetchBlob,Ss as streamFetchLoadImage,ys as streamFetchText,bs as streamFetchUploadFile,Jn as toLowerCaseExtension,pi as traverseXYArrayFromInsideOut,go as unLockListener,mt as uuid,Go as verifiyNumberInteger,es as verifyAccount,Vo as verifyAndSpace,us as verifyCarNum,qo as verifyCnAndSpace,os as verifyEmail,Xo as verifyEnAndSpace,as as verifyFullName,is as verifyIPAddress,ss as verifyIdCard,Yo as verifyNumberCnUppercase,Zo as verifyNumberComma,Ho as verifyNumberIntegerAndFloat,jo as verifyNumberPercentage,$o as verifyNumberPercentageFloat,ts as verifyPassword,ns as verifyPasswordPowerful,rs as verifyPasswordStrength,Jo as verifyPhone,ls as verifyPostalCode,Qo as verifyTelPhone,Ko as verifyTextColor,cs as verifyUrl,cl as webCacheWorker,Oa as wowDirective,Wo as writeIconifyList,Uo as writeSysRoleRight,ll as xmathWorker};