xframelib
Version:
积累的前端开发基础库,来源于项目和服务于项目。
1 lines • 195 kB
JavaScript
import{defineComponent as e,ref as t,createElementBlock as n,openBlock as r,withModifiers as i,normalizeStyle as o,renderSlot as s,reactive as a,getCurrentInstance as c,computed as l,watch as u,onMounted as d,onBeforeUnmount as h,nextTick as f,resolveComponent as p,createBlock as m,Transition as g,withCtx as v,withDirectives as y,createElementVNode as w,createCommentVNode as b,Fragment as S,createTextVNode as x,toDisplayString as C,vShow as E,markRaw as k,onErrorCaptured as z,Suspense as M,createVNode as A,KeepAlive as I,resolveDynamicComponent as L,renderList as R,unref as _,normalizeClass as T,TransitionGroup as D,onUnmounted as P,useCssVars as B,h as N}from"vue";import $ from"iconv-lite";export{default as iconv}from"iconv-lite";import*as U from"@microsoft/signalr";import O from"axios";import W from"qs";import{addAPIProvider as j,Icon as F}from"@iconify/vue";import{Client as H,ClientContext as q}from"@hprose/rpc-core";import{ByteStream as X,Writer as Y,Reader as G,ValueReader as V}from"@hprose/io";import{HttpTransport as Z}from"@hprose/rpc-html5";function K(e){return window.TouchEvent&&e instanceof TouchEvent}class J{e;constructor(e){this.e=e}stopPropagation(){this.e.stopPropagation()}preventDefault(){this.e.preventDefault()}get clientX(){return K(this.e)?("touchend"===this.e.type?this.e.changedTouches:this.e.touches).item(0).clientX:this.e.clientX}get clientY(){return K(this.e)?("touchend"===this.e.type?this.e.changedTouches:this.e.touches).item(0).clientY:this.e.clientY}get clientCoord(){return new Q(this.clientX,this.clientY)}static bindDown(e,t,n,r=!1){const i=e=>{t(new J(e))},o=e=>{1===e.touches.length&&t(new J(e)),e.touches.length>1&&n&&n(new J(e))};return e.addEventListener("mousedown",i,r),e.addEventListener("touchstart",o,r),()=>{e.removeEventListener("mousedown",i,r),e.removeEventListener("touchstart",o,r)}}static bindMove(e,t,n=!1){const r=e=>{t(new J(e))},i=e=>{1===e.touches.length&&t(new J(e))};return e.addEventListener("mousemove",r,n),e.addEventListener("touchmove",i,n),()=>{e.removeEventListener("mousemove",r,n),e.removeEventListener("touchmove",i,n)}}static bindUp(e,t,n=!1){const r=e=>{t(new J(e))},i=e=>{0===e.touches.length&&t(new J(e))};return e.addEventListener("mouseup",r,n),e.addEventListener("touchend",i,n),()=>{e.removeEventListener("mouseup",r,n),e.removeEventListener("touchend",i,n)}}originalEvent({mouse:e,touch:t}){K(this.e)?t&&t(this.e):e&&e(this.e)}}class Q{x;y;constructor(e,t){this.x=e,this.y=t}clone(){return new Q(this.x,this.y)}}class ee{handle;container;options;unbindDown;unbindMove;unbindUp;constructor(e,t,n={}){this.handle=e,this.container=t,this.options=n,e&&(this.unbindDown=J.bindDown(e,this.mousedown),e.classList.add("draggable-handle"))}teardown(){this.handle?.classList.remove("draggable-handle"),this.unbindDown&&this.unbindDown(),this.unbindUp&&this.unbindUp(),this.unbindMove&&this.unbindMove()}offsetX;offsetY;mousedown=e=>{e.preventDefault(),this.handle&&(this.offsetX=e.clientX,this.offsetY=e.clientY),this.options.onMoveStart&&this.options.onMoveStart(),this.unbindMove=J.bindMove(document,this.mousemove),this.unbindUp=J.bindUp(document,this.mouseup)};mousemove=e=>{this.container&&(this.container.style.left=`calc(${e.clientX-this.offsetX}px + ${this.container.style.left})`,this.container.style.top=`calc(${e.clientY-this.offsetY}px + ${this.container.style.top})`,this.offsetX=e.clientX,this.offsetY=e.clientY),this.options.onMove&&this.options.onMove()};mouseup=e=>{this.options.onMoveEnd&&this.options.onMoveEnd(),this.unbindUp(),this.unbindMove(),this.unbindUp=this.unbindMove=void 0}}class te{_group;onChange;zIndex;constructor(e,t){this._group=e,this.onChange=t,this.a((e=>e.push(this)))}set group(e){this._group=e;const t=ie(this._group),n=ie(e);t.splice(t.indexOf(this),1),n.push(this),se()}get group(){return this._group}unregister(){this.a((e=>e.splice(e.indexOf(this),1)))}raise(){this.a((e=>{e.splice(e.indexOf(this),1),e.push(this)}))}a(e){e(ie(this._group)),se()}}const ne=new Map,re=0;function ie(e){return ne.has(e)||ne.set(e,[]),ne.get(e)}function oe(e,t){return e>t?-oe(t,e):e<0&&t>=0?1:e-t}function se(){let e=re;for(const t of function(e){const t=[];return e.forEach(((e,n)=>t.push(n))),t}(ne).sort(oe))for(const n of ie(t))e!=n.zIndex&&(n.zIndex=e,n.onChange(e)),e++}function ae(e){if(e){const{width:t,height:n}=e.style;e.style.width="auto",e.style.height="auto";const r=ce(e);return e.style.width=t,e.style.height=n,r}return{width:0,height:0,top:0,left:0,bottom:0,right:0}}function ce(e){const t=e.getBoundingClientRect(),n=t.width,r=t.height,i=t.top,o=t.left;return{width:n,height:r,top:i,left:o,bottom:i+r,right:o+n}}class le{container;options;handles;constructor(e,t){if(this.container=e,this.options=t,e&&t){this.handles=ue.map((t=>new t(e,this)));const{width:n,height:r}=ae(e),i=t.maxWidth||window.innerWidth,o=t.maxHeight||window.innerHeight;let s=!1;(n<t.minWidth||n>i)&&(e.style.width=`${he(n,t.minWidth,i)}px`,s=!0),(r<t.minHeight||r>o)&&(e.style.height=`${he(r,t.minHeight,o)}px`,s=!0),s&&t.onResize&&t.onResize()}}teardown(){this.handles?.forEach((e=>e.teardown()))}}const ue=[];class de{container;helper;handle;handleSize=8;unbindDown;unbindMove;unbindUp;constructor(e,t){this.container=e,this.helper=t,this.handle=this.createHandleElement(),this.unbindDown=J.bindDown(this.handle,this.mousedown)}teardown(){this.unbindDown(),this.unbindUp&&this.unbindUp(),this.unbindMove&&this.unbindMove(),this.handle.parentElement.removeChild(this.handle)}x0;y0;left0;top0;width0;height0;mousedown=e=>{e.preventDefault(),e.stopPropagation();const{left:t,top:n,width:r,height:i}=ce(this.container);this.x0=e.clientX,this.y0=e.clientY,this.left0=t,this.top0=n,this.width0=r,this.height0=i,this.calcSafeBoundaries(),this.helper.options&&this.helper.options.onResizeStart&&this.helper.options.onResizeStart(),this.unbindMove=J.bindMove(document,this.mousemove),this.unbindUp=J.bindUp(document,this.mouseup)};minLeft;maxLeft;minRight;maxRight;minTop;maxTop;minBottom;maxBottom;calcSafeBoundaries(){if(!this.helper.options)return;const{left:e,top:t,right:n,bottom:r}=ce(this.container),i=this.helper.options,o=i.maxWidth||window.innerWidth,s=i.maxHeight||window.innerHeight;this.minLeft=Math.max(n-o,0),this.maxLeft=n-i.minWidth,this.minRight=e+i.minWidth,this.maxRight=Math.min(e+o,window.innerWidth),this.minTop=Math.max(r-s,0),this.maxTop=r-i.minHeight,this.minBottom=t+i.minHeight,this.maxBottom=Math.min(t+s,window.innerHeight)}mousemove=e=>{e.preventDefault(),e.stopPropagation(),this.setPosition(e),this.fixPosition(),this.helper.options&&this.helper.options.onResize&&this.helper.options.onResize()};fixPosition(){const{width:e,height:t,left:n,top:r,right:i,bottom:o}=ce(this.container),s=this.helper.options;s&&(n<this.minLeft?(this.container.style.width=e+n-this.minLeft+"px",this.container.style.left=`${this.minLeft}px`):n>this.maxLeft?(this.container.style.width=`${s.minWidth}px`,this.container.style.left=`${this.maxLeft}px`):i<this.minRight?this.container.style.width=`${s.minWidth}px`:i>this.maxRight&&(this.container.style.width=this.maxRight-n+"px"),r<this.minTop?(this.container.style.height=t+r-this.minTop+"px",this.container.style.top=`${this.minTop}px`):r>this.maxTop?(this.container.style.height=`${s.minHeight}px`,this.container.style.top=`${this.maxTop}px`):o<this.minBottom?this.container.style.height=`${s.minHeight}px`:o>this.maxBottom&&(this.container.style.height=this.maxBottom-r+"px"))}mouseup=e=>{e.preventDefault(),e.stopPropagation(),this.helper.options&&this.helper.options.onResizeEnd&&this.helper.options.onResizeEnd(),this.unbindUp(),this.unbindMove(),this.unbindUp=this.unbindMove=void 0};createHandleElement(){const e=document.createElement("div"),t=e.style;return t.position="absolute",this.applyStyle(t),this.container.appendChild(e),e}}function he(e,t,n){return e<t?t:e>n?n:e}ue.push(class extends de{setPosition(e){this.container.style.width=this.width0+e.clientX-this.x0+"px",this.container.style.height=this.height0+e.clientY-this.y0+"px"}applyStyle(e){e.width=2*this.handleSize+"px",e.height=2*this.handleSize+"px",e.right=-this.handleSize+"px",e.bottom=-this.handleSize+"px",e.cursor="nwse-resize"}},class extends de{setPosition(e){this.container.style.height=this.height0+e.clientY-this.y0+"px"}applyStyle(e){e.right=`${this.handleSize}px`,e.left=`${this.handleSize}px`,e.height=2*this.handleSize+"px",e.bottom=-this.handleSize+"px",e.cursor="ns-resize"}},class extends de{setPosition(e){this.container.style.left=this.left0+e.clientX-this.x0+"px",this.container.style.width=this.width0-(e.clientX-this.x0)+"px",this.container.style.height=this.height0+e.clientY-this.y0+"px"}applyStyle(e){e.left=-this.handleSize+"px",e.bottom=-this.handleSize+"px",e.width=2*this.handleSize+"px",e.height=2*this.handleSize+"px",e.cursor="nesw-resize"}},class extends de{setPosition(e){this.container.style.left=this.left0+e.clientX-this.x0+"px",this.container.style.width=this.width0-(e.clientX-this.x0)+"px"}applyStyle(e){e.left=-this.handleSize+"px",e.bottom=`${this.handleSize}px`,e.width=2*this.handleSize+"px",e.top=`${this.handleSize}px`,e.cursor="ew-resize"}},class extends de{setPosition(e){this.container.style.left=this.left0+e.clientX-this.x0+"px",this.container.style.width=this.width0-(e.clientX-this.x0)+"px",this.container.style.top=this.top0+e.clientY-this.y0+"px",this.container.style.height=this.height0-(e.clientY-this.y0)+"px"}applyStyle(e){e.left=-this.handleSize+"px",e.top=-this.handleSize+"px",e.width=2*this.handleSize+"px",e.height=2*this.handleSize+"px",e.cursor="nwse-resize"}},class extends de{setPosition(e){this.container.style.top=this.top0+e.clientY-this.y0+"px",this.container.style.height=this.height0-(e.clientY-this.y0)+"px"}applyStyle(e){e.left=`${this.handleSize}px`,e.right=`${this.handleSize}px`,e.height=2*this.handleSize+"px",e.top=-this.handleSize+"px",e.cursor="ns-resize"}},class extends de{setPosition(e){this.container.style.top=this.top0+e.clientY-this.y0+"px",this.container.style.height=this.height0-(e.clientY-this.y0)+"px",this.container.style.width=this.width0+e.clientX-this.x0+"px"}applyStyle(e){e.right=-this.handleSize+"px",e.top=-this.handleSize+"px",e.height=2*this.handleSize+"px",e.width=2*this.handleSize+"px",e.cursor="nesw-resize"}},class extends de{setPosition(e){this.container.style.width=this.width0+e.clientX-this.x0+"px"}applyStyle(e){e.right=-this.handleSize+"px",e.top=`${this.handleSize}px`,e.bottom=`${this.handleSize}px`,e.width=2*this.handleSize+"px",e.cursor="ew-resize"}});const fe=e({name:"",props:{disabled:{type:Boolean,default:!1},windowStyle:{type:Object,required:!0}},components:{},setup(e){const n=t(!1),r=t(!1);return{hover:n,active:r,style:function(){let t=e.windowStyle.button;return n.value&&(t={...t,...this.windowStyle.buttonHover}),r.value&&(t={...t,...this.windowStyle.buttonActive}),t},mouseup:function(e){this.active&&this.$emit("click")},mousedown:function(e){e.preventDefault(),r.value=!0;const t=J.bindUp(document,(()=>{r.value=!1,t()}))}}}}),pe=(e,t)=>{const n=e.__vccOpts||e;for(const[e,r]of t)n[e]=r;return n},me=["disabled"];const ge=pe(fe,[["render",function(e,t,a,c,l,u){return r(),n("div",{class:"btn",style:o(e.style()),onMouseenter:t[0]||(t[0]=t=>e.hover=!0),onMouseleave:t[1]||(t[1]=t=>e.hover=!1),onMousedown:t[2]||(t[2]=i(((...t)=>e.mousedown&&e.mousedown(...t)),["stop"])),onTouchstart:t[3]||(t[3]=i(((...t)=>e.mousedown&&e.mousedown(...t)),["stop"])),onMouseup:t[4]||(t[4]=(...t)=>e.mouseup&&e.mouseup(...t)),onTouchend:t[5]||(t[5]=(...t)=>e.mouseup&&e.mouseup(...t)),disabled:e.disabled},[s(e.$slots,"default",{},void 0,!0)],44,me)}],["__scopeId","data-v-2231c0f9"]]);var ve="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function ye(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var we,be={exports:{}};var Se=(we||(we=1,be.exports=function(e){var t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function n(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 r(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 i(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 o(e){var t,i,o,s,a,c,l=e.length,u=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=l;t+=64)n(u,r(e.substring(t-64,t)));for(i=(e=e.substring(t-64)).length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t<i;t+=1)o[t>>2]|=e.charCodeAt(t)<<(t%4<<3);if(o[t>>2]|=128<<(t%4<<3),t>55)for(n(u,o),t=0;t<16;t+=1)o[t]=0;return s=(s=8*l).toString(16).match(/(.*?)(.{0,8})$/),a=parseInt(s[2],16),c=parseInt(s[1],16)||0,o[14]=a,o[15]=c,n(u,o),u}function s(e){var t,r,o,s,a,c,l=e.length,u=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=l;t+=64)n(u,i(e.subarray(t-64,t)));for(r=(e=t-64<l?e.subarray(t-64):new Uint8Array(0)).length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t<r;t+=1)o[t>>2]|=e[t]<<(t%4<<3);if(o[t>>2]|=128<<(t%4<<3),t>55)for(n(u,o),t=0;t<16;t+=1)o[t]=0;return s=(s=8*l).toString(16).match(/(.*?)(.{0,8})$/),a=parseInt(s[2],16),c=parseInt(s[1],16)||0,o[14]=a,o[15]=c,n(u,o),u}function a(e){var n,r="";for(n=0;n<4;n+=1)r+=t[e>>8*n+4&15]+t[e>>8*n&15];return r}function c(e){var t;for(t=0;t<e.length;t+=1)e[t]=a(e[t]);return e.join("")}function l(e){return/[\u0080-\uFFFF]/.test(e)&&(e=unescape(encodeURIComponent(e))),e}function u(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}function d(e){return String.fromCharCode.apply(null,new Uint8Array(e))}function h(e,t,n){var r=new Uint8Array(e.byteLength+t.byteLength);return r.set(new Uint8Array(e)),r.set(new Uint8Array(t),e.byteLength),r}function f(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 p(){this.reset()}return c(o("hello")),"undefined"==typeof ArrayBuffer||ArrayBuffer.prototype.slice||function(){function t(e,t){return(e=0|e||0)<0?Math.max(e+t,0):Math.min(e,t)}ArrayBuffer.prototype.slice=function(n,r){var i,o,s,a,c=this.byteLength,l=t(n,c),u=c;return r!==e&&(u=t(r,c)),l>u?new ArrayBuffer(0):(i=u-l,o=new ArrayBuffer(i),s=new Uint8Array(o),a=new Uint8Array(this,l,i),s.set(a),o)}}(),p.prototype.append=function(e){return this.appendBinary(l(e)),this},p.prototype.appendBinary=function(e){this._buff+=e,this._length+=e.length;var t,i=this._buff.length;for(t=64;t<=i;t+=64)n(this._hash,r(this._buff.substring(t-64,t)));return this._buff=this._buff.substring(t-64),this},p.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=c(this._hash),e&&(n=f(n)),this.reset(),n},p.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},p.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},p.prototype.setState=function(e){return this._buff=e.buff,this._length=e.length,this._hash=e.hash,this},p.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},p.prototype._finish=function(e,t){var r,i,o,s=t;if(e[s>>2]|=128<<(s%4<<3),s>55)for(n(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,n(this._hash,e)},p.hash=function(e,t){return p.hashBinary(l(e),t)},p.hashBinary=function(e,t){var n=c(o(e));return t?f(n):n},p.ArrayBuffer=function(){this.reset()},p.ArrayBuffer.prototype.append=function(e){var t,r=h(this._buff.buffer,e),o=r.length;for(this._length+=e.byteLength,t=64;t<=o;t+=64)n(this._hash,i(r.subarray(t-64,t)));return this._buff=t-64<o?new Uint8Array(r.buffer.slice(t-64)):new Uint8Array(0),this},p.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=c(this._hash),e&&(n=f(n)),this.reset(),n},p.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},p.ArrayBuffer.prototype.getState=function(){var e=p.prototype.getState.call(this);return e.buff=d(e.buff),e},p.ArrayBuffer.prototype.setState=function(e){return e.buff=u(e.buff,!0),p.prototype.setState.call(this,e)},p.ArrayBuffer.prototype.destroy=p.prototype.destroy,p.ArrayBuffer.prototype._finish=p.prototype._finish,p.ArrayBuffer.hash=function(e,t){var n=c(s(new Uint8Array(e)));return t?f(n):n},p}()),be.exports);const xe=ye(Se),Ce=Object.prototype.toString;function Ee(e,t){return Ce.call(e)===`[object ${t}]`}function ke(e){return Ee(e,"Function")}const ze=e=>void 0!==e,Me=e=>!ze(e);function Ae(e){return null===e}function Ie(e){return Me(e)&&Ae(e)}function Le(e){return Me(e)||Ae(e)}const Re=e=>null!=e&&null!==e&&Ee(e,"Object");function _e(e){return Ee(e,"Date")}function Te(e){return Ee(e,"Number")}function De(e){return Ee(e,"AsyncFunction")}function Pe(e){return Ee(e,"Promise")&&Re(e)&&ke(e.then)&&ke(e.catch)}function Be(e){return Ee(e,"String")}function Ne(e){return!0===e||!1===e||Ee(e,"Boolean")}function $e(e){return e&&Array.isArray(e)}const Ue=()=>"undefined"!=typeof window,Oe=e=>"undefined"!=typeof window&&Ee(e,"Window"),We=e=>Ce.call(e).startsWith("[object HTML")&&!!e.tagName,je="undefined"==typeof window;function Fe(e){return e&&["IMAGE","IMG"].includes(e.tagName)}function He(e){return null==e||(Be(e)||$e(e)?0===e.length:!!Re(e)&&"{}"===JSON.stringify(e))}function qe(e){return Ee(e,"Error")}function Xe(e){return Ee(e,"WeakSet")}function Ye(e){return Ee(e,"WeakMap")}function Ge(e){return Ee(e,"Symbol")}function Ve(e){return Ee(e,"Map")}const Ze=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 Ke(e){return/^\s*[{[]/.test(String(e))}function Je(e){return e.includes("<kml ")&&e.includes('xmlns="http://www.opengis.net/kml/')}const Qe=[];let et;class tt{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){tt.addHandler(window,"resize",e)}static offWindowResizeHandler(e){tt.removeHandler(window,"resize",e)}static fullscreenEnabled(){const e=window.document;return document.fullscreenEnabled||window.fullScreen||e.mozFullscreenEnabled||e.webkitIsFullScreen}static fullScreen(e,t){if(t){const e=window.document;let t=window.document.exitFullscreen||e.msExitFullscreen||e.mozCancelFullScreen||e.webkitCancelFullScreen;if(void 0!==t&&t)t.call(window.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=window.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=window.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=window.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 window.document.fullscreenElement||window.document.webkitFullscreenElement||window.document.mozFullscreenElement||window.document.msFullscreenElement}static isFullScreen(){return!!tt.fullScreenElement()}static onFullScreenChanged(e){let t;"onfullscreenchange"in window.document?t="fullscreenchange":"onwebkitfullscreenchange"in window.document?t="webkitfullscreenchange":"onmozfullscreenchange"in window.document&&(t="mozfullscreenchange"),t?document.addEventListener(t,(function(){const t=tt.isFullScreen();e(t)})):document.addEventListener("MSFullscreenChange",(function(){const t=tt.isFullScreen();e(t)}))}static stringifyCircularHandler(e,t){if("object"==typeof t&&null!==t){if(-1!==Qe.indexOf(t))return;Qe.push(t)}return t}static jsonStringify(e){if(!e)return"";const t=JSON.stringify(e,tt.stringifyCircularHandler);return Qe.length=0,t}static jsonParse(e){const t=tt.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!=window.URL?t=window.URL.createObjectURL(e):null!=window.webkitURL&&(t=window.webkitURL.createObjectURL(e)),t}static getFileShortMD5(e,t){const n=File.prototype,r=n.slice||n.mozSlice||n.webkitSlice,i=e;const o=new xe.ArrayBuffer,s=new FileReader;s.onload=function(e){o.append(e.target?.result);const n=o.end();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 c=new xe.ArrayBuffer,l=new FileReader;function u(){const e=a*o,t=e+o>=i.size?i.size:e+o;l.readAsArrayBuffer(r.call(i,e,t))}l.onload=function(e){if(c.append(e.target?.result),a++,a<s)u();else{const e=c.end();t({isOK:!0,data:e})}},l.onerror=function(){const e=`${i.name}:计算文件简单摘要错误!`;console.warn(e),t({isOK:!1,data:e})},u()}static MD5(e,t=!1){return xe.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})):tt.copyTextByCommand(e);static copyElementTextByCommand(e){const t=document.createRange();t.selectNode(document.getElementById(e));const n=window.getSelection();n.rangeCount>0&&n.removeAllRanges(),n.addRange(t);try{document.execCommand("copy");return n.removeRange(t),!0}catch(e){return n.removeRange(t),console.error("Command复制文本错误",e),!1}}static copyElementText(e){if(!navigator.clipboard)return tt.copyElementTextByCommand(e);const t=document.createRange();t.selectNode(document.getElementById(e));const n=window.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){tt.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");window.dispatchEvent(e)}static dispatchElementEvent(e,t="click",n){let r;if(r=Be(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 function(){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(Be(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(!We(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){tt.blockEvent(e),t(e.dataTransfer.files)}),!1))}static getInputElement(){var e=document.activeElement;return!e||"INPUT"!=e.tagName&&"true"!=e.contentEditable?null:e}static guessPasteTextToFileName(e,t){let n,r=t;return Be(e)?r=(Ke(e)?"json":Je(e)&&"kml")||"text":(Re(e)&&e.type||$e(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(Ze(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){const t=this;et=n=>{t.pasteEventHanlder(n,e)},tt.addHandler(document,"paste",et)}static offPasteHandler(){et&&tt.removeHandler(document,"paste",et)}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)}}class nt{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 rt{prefixKey;storage;constructor(e="",t=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 it=new rt("",localStorage);function ot(){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 st(){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 at={},ct=Uint8Array,lt=Uint16Array,ut=Int32Array,dt=new ct([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]),ht=new ct([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]),ft=new ct([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),pt=function(e,t){for(var n=new lt(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];var i=new ut(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=pt(dt,2),gt=mt.b,vt=mt.r;gt[28]=258,vt[258]=28;for(var yt=pt(ht,0),wt=yt.b,bt=yt.r,St=new lt(32768),xt=0;xt<32768;++xt){var Ct=(43690&xt)>>1|(21845&xt)<<1;Ct=(61680&(Ct=(52428&Ct)>>2|(13107&Ct)<<2))>>4|(3855&Ct)<<4,St[xt]=((65280&Ct)>>8|(255&Ct)<<8)>>1}var Et=function(e,t,n){for(var r=e.length,i=0,o=new lt(t);i<r;++i)e[i]&&++o[e[i]-1];var s,a=new lt(t);for(i=1;i<t;++i)a[i]=a[i-1]+o[i-1]<<1;if(n){s=new lt(1<<t);var c=15-t;for(i=0;i<r;++i)if(e[i])for(var l=i<<4|e[i],u=t-e[i],d=a[e[i]-1]++<<u,h=d|(1<<u)-1;d<=h;++d)s[St[d]>>c]=l}else for(s=new lt(r),i=0;i<r;++i)e[i]&&(s[i]=St[a[e[i]-1]++]>>15-e[i]);return s},kt=new ct(288);for(xt=0;xt<144;++xt)kt[xt]=8;for(xt=144;xt<256;++xt)kt[xt]=9;for(xt=256;xt<280;++xt)kt[xt]=7;for(xt=280;xt<288;++xt)kt[xt]=8;var zt=new ct(32);for(xt=0;xt<32;++xt)zt[xt]=5;var Mt=Et(kt,9,0),At=Et(kt,9,1),It=Et(zt,5,0),Lt=Et(zt,5,1),Rt=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},Tt=function(e,t){var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(7&t)},Dt=function(e){return(e+7)/8|0},Pt=function(e,t,n){return(null==t||t<0)&&(t=0),(null==n||n>e.length)&&(n=e.length),new ct(e.subarray(t,n))},Bt=["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"],Nt=function(e,t,n){var r=new Error(t||Bt[e]);if(r.code=e,Error.captureStackTrace&&Error.captureStackTrace(r,Nt),!n)throw r;return r},$t=function(e,t,n,r){var i=e.length,o=r?r.length:0;if(!i||t.f&&!t.l)return n||new ct(0);var s=!n,a=s||2!=t.i,c=t.i;s&&(n=new ct(3*i));var l=function(e){var t=n.length;if(e>t){var r=new ct(Math.max(2*t,e));r.set(n),n=r}},u=t.f||0,d=t.p||0,h=t.b||0,f=t.l,p=t.d,m=t.m,g=t.n,v=8*i;do{if(!f){u=_t(e,d,1);var y=_t(e,d+1,3);if(d+=3,!y){var w=e[(L=Dt(d)+4)-4]|e[L-3]<<8,b=L+w;if(b>i){c&&Nt(0);break}a&&l(h+w),n.set(e.subarray(L,b),h),t.b=h+=w,t.p=d=8*b,t.f=u;continue}if(1==y)f=At,p=Lt,m=9,g=5;else if(2==y){var S=_t(e,d,31)+257,x=_t(e,d+10,15)+4,C=S+_t(e,d+5,31)+1;d+=14;for(var E=new ct(C),k=new ct(19),z=0;z<x;++z)k[ft[z]]=_t(e,d+3*z,7);d+=3*x;var M=Rt(k),A=(1<<M)-1,I=Et(k,M,1);for(z=0;z<C;){var L,R=I[_t(e,d,A)];if(d+=15&R,(L=R>>4)<16)E[z++]=L;else{var _=0,T=0;for(16==L?(T=3+_t(e,d,3),d+=2,_=E[z-1]):17==L?(T=3+_t(e,d,7),d+=3):18==L&&(T=11+_t(e,d,127),d+=7);T--;)E[z++]=_}}var D=E.subarray(0,S),P=E.subarray(S);m=Rt(D),g=Rt(P),f=Et(D,m,1),p=Et(P,g,1)}else Nt(1);if(d>v){c&&Nt(0);break}}a&&l(h+131072);for(var B=(1<<m)-1,N=(1<<g)-1,$=d;;$=d){var U=(_=f[Tt(e,d)&B])>>4;if((d+=15&_)>v){c&&Nt(0);break}if(_||Nt(2),U<256)n[h++]=U;else{if(256==U){$=d,f=null;break}var O=U-254;if(U>264){var W=dt[z=U-257];O=_t(e,d,(1<<W)-1)+gt[z],d+=W}var j=p[Tt(e,d)&N],F=j>>4;j||Nt(3),d+=15&j;P=wt[F];if(F>3){W=ht[F];P+=Tt(e,d)&(1<<W)-1,d+=W}if(d>v){c&&Nt(0);break}a&&l(h+131072);var H=h+O;if(h<P){var q=o-P,X=Math.min(P,H);for(q+h<0&&Nt(3);h<X;++h)n[h]=r[q+h]}for(;h<H;++h)n[h]=n[h-P]}}t.l=f,t.p=$,t.b=h,t.f=u,f&&(u=1,t.m=m,t.d=p,t.n=g)}while(!u);return h!=n.length&&s?Pt(n,0,h):n.subarray(0,h)},Ut=function(e,t,n){n<<=7&t;var r=t/8|0;e[r]|=n,e[r+1]|=n>>8},Ot=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},Wt=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:Gt,l:0};if(1==i){var s=new ct(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],c=n[1],l=0,u=1,d=2;for(n[0]={s:-1,f:a.f+c.f,l:a,r:c};u!=i-1;)a=n[n[l].f<n[d].f?l++:d++],c=n[l!=u&&n[l].f<n[d].f?l++:d++],n[u++]={s:-1,f:a.f+c.f,l:a,r:c};var h=o[0].s;for(r=1;r<i;++r)o[r].s>h&&(h=o[r].s);var f=new lt(h+1),p=jt(n[u-1],f,0);if(p>t){r=0;var m=0,g=p-t,v=1<<g;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;m+=v-(1<<p-f[y]),f[y]=t}for(m>>=g;m>0;){var w=o[r].s;f[w]<t?m-=1<<t-f[w]++-1:++r}for(;r>=0&&m;--r){var b=o[r].s;f[b]==t&&(--f[b],++m)}p=t}return{t:new ct(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},Ft=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new lt(++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}},Ht=function(e,t){for(var n=0,r=0;r<t.length;++r)n+=e[r]*t[r];return n},qt=function(e,t,n){var r=n.length,i=Dt(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)},Xt=function(e,t,n,r,i,o,s,a,c,l,u){Ut(t,u++,n),++i[256];for(var d=Wt(i,15),h=d.t,f=d.l,p=Wt(o,15),m=p.t,g=p.l,v=Ft(h),y=v.c,w=v.n,b=Ft(m),S=b.c,x=b.n,C=new lt(19),E=0;E<y.length;++E)++C[31&y[E]];for(E=0;E<S.length;++E)++C[31&S[E]];for(var k=Wt(C,7),z=k.t,M=k.l,A=19;A>4&&!z[ft[A-1]];--A);var I,L,R,_,T=l+5<<3,D=Ht(i,kt)+Ht(o,zt)+s,P=Ht(i,h)+Ht(o,m)+s+14+3*A+Ht(C,z)+2*C[16]+3*C[17]+7*C[18];if(c>=0&&T<=D&&T<=P)return qt(t,u,e.subarray(c,c+l));if(Ut(t,u,1+(P<D)),u+=2,P<D){I=Et(h,f,0),L=h,R=Et(m,g,0),_=m;var B=Et(z,M,0);Ut(t,u,w-257),Ut(t,u+5,x-1),Ut(t,u+10,A-4),u+=14;for(E=0;E<A;++E)Ut(t,u+3*E,z[ft[E]]);u+=3*A;for(var N=[y,S],$=0;$<2;++$){var U=N[$];for(E=0;E<U.length;++E){var O=31&U[E];Ut(t,u,B[O]),u+=z[O],O>15&&(Ut(t,u,U[E]>>5&127),u+=U[E]>>12)}}}else I=Mt,L=kt,R=It,_=zt;for(E=0;E<a;++E){var W=r[E];if(W>255){Ot(t,u,I[(O=W>>18&31)+257]),u+=L[O+257],O>7&&(Ut(t,u,W>>23&31),u+=dt[O]);var j=31&W;Ot(t,u,R[j]),u+=_[j],j>3&&(Ot(t,u,W>>5&8191),u+=ht[j])}else Ot(t,u,I[W]),u+=L[W]}return Ot(t,u,I[256]),u+L[256]},Yt=new ut([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Gt=new ct(0),Vt=function(e,t,n,r,i,o){var s=o.z||e.length,a=new ct(r+s+5*(1+Math.ceil(s/7e3))+i),c=a.subarray(r,a.length-i),l=o.l,u=7&(o.r||0);if(t){u&&(c[0]=o.r>>3);for(var d=Yt[t-1],h=d>>13,f=8191&d,p=(1<<n)-1,m=o.p||new lt(32768),g=o.h||new lt(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 ut(25e3),S=new lt(288),x=new lt(32),C=0,E=0,k=o.i||0,z=0,M=o.w||0,A=0;k+2<s;++k){var I=w(k),L=32767&k,R=g[I];if(m[L]=R,g[I]=L,M<=k){var _=s-k;if((C>7e3||z>24576)&&(_>423||!l)){u=Xt(e,c,0,b,S,x,E,z,A,k-A,u),z=C=E=0,A=k;for(var T=0;T<286;++T)S[T]=0;for(T=0;T<30;++T)x[T]=0}var D=2,P=0,B=f,N=L-R&32767;if(_>2&&I==w(k-N))for(var $=Math.min(h,_)-1,U=Math.min(32767,k),O=Math.min(258,_);N<=U&&--B&&L!=R;){if(e[k+D]==e[k+D-N]){for(var W=0;W<O&&e[k+W]==e[k+W-N];++W);if(W>D){if(D=W,P=N,W>$)break;var j=Math.min(N,W-2),F=0;for(T=0;T<j;++T){var H=k-N+T&32767,q=H-m[H]&32767;q>F&&(F=q,R=H)}}}N+=(L=R)-(R=m[L])&32767}if(P){b[z++]=268435456|vt[D]<<18|bt[P];var X=31&vt[D],Y=31&bt[P];E+=dt[X]+ht[Y],++S[257+X],++x[Y],M=k+D,++C}else b[z++]=e[k],++S[e[k]]}}for(k=Math.max(k,M);k<s;++k)b[z++]=e[k],++S[e[k]];u=Xt(e,c,l,b,S,x,E,z,A,k-A,u),l||(o.r=7&u|c[u/8|0]<<3,u-=7,o.h=g,o.p=m,o.i=k,o.w=M)}else{for(k=o.w||0;k<s+l;k+=65535){var G=k+65535;G>=s&&(c[u/8|0]=l,G=s),u=qt(c,u+1,e.subarray(k,G))}o.i=s}return Pt(a,0,r+Dt(u)+i)},Zt=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}(),Kt=function(){var e=-1;return{p:function(t){for(var n=e,r=0;r<t.length;++r)n=Zt[255&n^t[r]]^n>>>8;e=n},d:function(){return~e}}},Jt=function(e,t,n,r,i){if(!i&&(i={l:1},t.dictionary)){var o=t.dictionary.subarray(-32768),s=new ct(o.length+e.length);s.set(o),s.set(e,o.length),e=s,i.w=o.length}return Vt(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)},Qt=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},en=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],c=o[s];if("function"==typeof a){t+=";"+c+"=";var l=a.toString();if(a.prototype)if(-1!=l.indexOf("[native code]")){var u=l.indexOf(" ",8)+1;t+=l.slice(u,l.indexOf("(",u))}else for(var d in t+=l,a.prototype)t+=";"+c+".prototype."+d+"="+a.prototype[d].toString();else t+=l}else n[c]=a}return t},tn=[],nn=function(e,t,n,r){if(!tn[n]){for(var i="",o={},s=e.length-1,a=0;a<s;++a)i=en(e[a],i,o);tn[n]={c:en(e[s],i,o),e:o}}var c=Qt({},tn[n].e);return function(e,t,n,r,i){var o=new Worker(at[t]||(at[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}(tn[n].c+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+t.toString()+"}",n,c,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}(c),r)},rn=function(){return[ct,lt,ut,dt,ht,ft,gt,wt,At,Lt,St,Bt,Et,Rt,_t,Tt,Dt,Pt,Nt,$t,bn,cn,ln]},on=function(){return[ct,lt,ut,dt,ht,ft,vt,bt,Mt,kt,It,zt,St,Yt,Gt,Et,Ut,Ot,Wt,jt,Ft,Ht,qt,Xt,Dt,Pt,Vt,Jt,wn,cn]},sn=function(){return[mn,yn,pn,Kt,Zt]},an=function(){return[gn,vn]},cn=function(e){return postMessage(e,[e.buffer])},ln=function(e){return e&&{out:e.size&&new ct(e.size),dictionary:e.dictionary}},un=function(e,t,n,r,i,o){var s=nn(n,r,i,(function(e,t){s.terminate(),o(e,t)}));return s.postMessage([e,t],t.consume?[e.buffer]:[]),function(){s.terminate()}},dn=function(e,t){return e[t]|e[t+1]<<8},hn=function(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0},fn=function(e,t){return hn(e,t)+4294967296*hn(e,t+4)},pn=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8},mn=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&&pn(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)}},gn=function(e){31==e[0]&&139==e[1]&&8==e[2]||Nt(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)},vn=function(e){var t=e.length;return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0},yn=function(e){return 10+(e.filename?e.filename.length+1:0)};function wn(e,t){return Jt(e,t||{},0,0)}function bn(e,t){return $t(e,{i:2},t&&t.out,t&&t.dictionary)}function Sn(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&Nt(7),un(e,t,[on,sn,function(){return[xn]}],(function(e){return cn(xn(e.data[0],e.data[1]))}),2,n)}function xn(e,t){t||(t={});var n=Kt(),r=e.length;n.p(e);var i=Jt(e,t,yn(t),8),o=i.length;return mn(i,t),pn(i,o-8,n.d()),pn(i,o-4,r),i}function Cn(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&Nt(7),un(e,t,[rn,an,function(){return[En]}],(function(e){return cn(En(e.data[0],e.data[1]))}),3,n)}function En(e,t){var n=gn(e);return n+8>e.length&&Nt(6,"invalid gzip data"),$t(e.subarray(n,-8),{i:2},t&&t.out||new ct(vn(e)),t&&t.dictionary)}var kn=function(e,t,n,r){for(var i in e){var o=e[i],s=t+i,a=r;Array.isArray(o)&&(a=Qt(r,o[1]),o=o[0]),o instanceof ct?n[s]=[o,a]:(n[s+="/"]=[new ct(0),a],kn(o,s,n,r))}},zn="undefined"!=typeof TextEncoder&&new TextEncoder,Mn="undefined"!=typeof TextDecoder&&new TextDecoder;try{Mn.decode(Gt,{stream:!0})}catch(e){}function An(e,t){if(zn)return zn.encode(e);for(var n=e.length,r=new ct(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 ct(i+8+(n-s<<1));a.set(r),r=a}var c=e.charCodeAt(s);c<128||t?o(c):c<2048?(o(192|c>>6),o(128|63&c)):c>55295&&c<57344?(o(240|(c=65536+(1047552&c)|1023&e.charCodeAt(++s))>>18),o(128|c>>12&63),o(128|c>>6&63),o(128|63&c)):(o(224|c>>12),o(128|c>>6&63),o(128|63&c))}return Pt(r,0,i)}function In(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(Mn)return Mn.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:Pt(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&&Nt(8),o}var Ln=function(e,t){return t+30+dn(e,t+26)+dn(e,t+28)},Rn=function(e,t,n){var r=dn(e,t+28),i=In(e.subarray(t+46,t+46+r),!(2048&dn(e,t+8))),o=t+46+r,s=hn(e,t+20),a=n&&4294967295==s?_n(e,o):[s,hn(e,t+24),hn(e,t+42)],c=a[0],l=a[1],u=a[2];return[dn(e,t+10),c,l,i,o+dn(e,t+30)+dn(e,t+32),u]},_n=function(e,t){for(;1!=dn(e,t);t+=4+dn(e,t+2));return[fn(e,t+12),fn(e,t+4),fn(e,t+20)]},Tn=function(e){var t=0;if(e)for(var n in e){var r=e[n].length;r>65535&&Nt(9),t+=r+4}return t},Dn=function(e,t,n,r,i,o,s,a){var c=r.length,l=n.extra,u=a&&a.length,d=Tn(l);pn(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 h=new Date(null==n.mtime?Date.now():n.mtime),f=h.getFullYear()-1980;if((f<0||f>119)&&Nt(10),pn(e,t,f<<25|h.getMonth()+1<<21|h.getDate()<<16|h.getHours()<<11|h.getMinutes()<<5|h.getSeconds()>>1),t+=4,-1!=o&&(pn(e,t,n.crc),pn(e,t+4,o<0?-o-2:o),pn(e,t+8,n.size)),pn(e,t+12,c),pn(e,t+14,d),t+=16,null!=s&&(pn(e,t,u),pn(e,t+6,n.attrs),pn(e,t+10,s),t+=14),e.set(r,t),t+=c,d)for(var p in l){var m=l[p],g=m.length;pn(e,t,+p),pn(e,t+2,g),e.set(m,t+4),t+=4+g}return u&&(e.set(a,t),t+=u),t},Pn=function(e,t,n,r,i){pn(e,t,101010256),pn(e,t+8,n),pn(e,t+10,n),pn(e,t+12,r),pn(e,t+16,i)};function Bn(e,t,n){n||(n=t,t={}),"function"!=typeof n&&Nt(7);var r={};kn(e,"",r,t);var i=Object.keys(r),o=i.length,s=0,a=0,c=o,l=new Array(o),u=[],d=function(){for(var e=0;e<u.length;++e)u[e]()},h=function(e,t){Nn((function(){n(e,t)}))};Nn((function(){h=n}));var f=function(){var e=new ct(a+22),t=s,n=a-s;a=0;for(var r=0;r<c;++r){var i=l[r];try{var o=i.c.length;Dn(e,a,i,i.f,i.u,o);var u=30+i.f.length+Tn(i.extra),d=a+u;e.set(i.c,d),Dn(e,s,i,i.f,i.u,o,a,i.m),s+=16+u+(i.m?i.m.length:0),a=d+o}catch(e){return h(e,null)}}Pn(e,s,l.length,n,t),h(null,e)};o||f();for(var p=function(e){var t=i[e],n=r[t],c=n[0],p=n[1],m=Kt(),g=c.length;m.p(c);var v=An(t),y=v.length,w=p.comment,b=w&&An(w),S=b&&b.length,x=Tn(p.extra),C=0==p.level?0:8,E=function(n,r){if(n)d(),h(n,null);else{var i=r.length;l[e]=Qt(p,{size:g,crc:m.d(),c:r,f:v,m:b,u:y!=t.length||b&&w.length!=S,compression:C}),s+=30+y+x+i,a+=76+2*(y+x)+(S||0)+i,--o||f()}};if(y>65535&&E(Nt(11,0,1),null),C)if(g<16e4)try{E(null,wn(c,p))}catch(e){E(e,null)}else u.pu