function getREQS(){var t=location.search;if(-1!=t.indexOf("?")){var e=t.substr(1);REQS=e.split("&")}}function _gSet(t,e){Object.defineProperty(window,t,{value:e,writable:!1,enumerable:!0,configurable:!1})}function _hSet(t,e){Object.defineProperty(HTMLElement.prototype,t,{value:e,writable:!1,enumerable:!0,configurable:!1})}window._VIXJSVER=5,window.REQS=[],getREQS();for(var i=3;i<9;i++)_gSet("_C"+i,String.fromCharCode(i));_gSet("_RSOB",new ResizeObserver((t=>{for(let e of t){const{width:t,height:n}=e.contentRect;e.target._resizeFun&&e.target._resizeFun(t,n)}})));var vixConst={playIcon:`url(data:image/svg+xml,${encodeURIComponent('')})`,svgTxt:`url(data:image/svg+xml,${encodeURIComponent('')})`,headHelper:`url(data:image/svg+xml,${encodeURIComponent('')})`};window.vixBus={map:{},on(t,e){(this.map[t]=this.map[t]||[]).push(e)},send(t,e){(this.map[t]||[]).forEach((t=>t(e)))}},Array.prototype.shuffle=function(){for(var t,e,n=this,i=n.length;i;)e=Math.floor(Math.random()*i--),t=n[i],n[i]=n[e],n[e]=t;return n},$conLog=function(t,e){var n=document.body.son("div",{position:"absolute",width:"100%",height:"100%",textAlign:"center",backgroundColor:"rgba(0,0,0,0.5)",zIndex:3e6,display:"flex",alignItems:"center",justifyContent:"center",textAlign:"justify",left:0,top:0,opacity:0,transition:"opacity 0.7s ease"});n.tab=n.son("table",{width:"300px",margin:"auto",maxHeight:"800px",borderRadius:"5px 5px 5px 5px",backgroundColor:"rgba(255,255,255,1)"}),n.tab.insertRow(-1).insertCell().css({textAlign:"center",minHeight:"62px",height:"62px",borderBottom:"1px solid #f1f1f1"},{innerHTML:t,colSpan:2});var i=n.tab.insertRow(-1),o=i.insertCell(),r=i.insertCell();o.css({textAlign:"center",height:"42px",borderRight:"1px solid #f1f1f1"},{innerHTML:"取消",onclick:function(){_backRun()}}),r.css({textAlign:"center",height:"42px",color:"#1989fa"},{innerHTML:"确认",onclick:function(){e&&e(),_backRun()}}),n.close=function(){document.body.removeChild(n)},n.tab.onclick=function(){event.stopPropagation()},n.tab.Fly({SS:0}),n.tab.Fly({SS:1,d:800}),setTimeout((function(){n.style.opacity=1}),5),_backKey((function(){n.close()}))};class MOM{constructor(t,e={},n){this.targets=new Set,this.observer=new MutationObserver(n);this.config={attributes:!0,childList:!0,subtree:!1,attributeOldValue:!0,...e};const i=Array.isArray(t)?t:[t];this.add(...i)}add(...t){t.forEach((t=>{this.targets.has(t)||(this.targets.add(t),this.observer.observe(t,this.config))}))}removeTarget(t){this.targets.has(t)&&(this.targets.delete(t),this.observer.unobserve(t))}disconnect(){this.observer.disconnect(),this.targets.clear()}}window.thattsvg=svgToDataUri(''),window.thatfsvg=svgToDataUri('');class PeriodicRequester{constructor(t,e,n,i){this.url=t,this.interval=e,this.action=n,this.ection=i,this.currentController=null,this.timer=null}start(){if(null!==this.timer)return;const t=()=>{this.currentController&&this.currentController.abort(),this.currentController=new AbortController;const t=this.currentController.signal;fetch(this.url,{signal:t}).then((t=>{if(!t.ok)throw new Error("Network response was not ok");return t.json()})).then((t=>{this.action(t)})).catch((t=>{"AbortError"===t.name?console.log("Request was aborted"):this.ection(t)}))};t(),this.timer=setInterval(t,this.interval)}stop(){null!==this.timer&&(clearInterval(this.timer),this.timer=null),this.currentController&&this.currentController.abort()}}class touchPad{constructor(t,e,n=100){this.element=t,this.startX=0,this.startY=0,this.accumulatedDx=0,this.accumulatedDy=0,this.isDragging=!1,this.externalMoveBy=e,this.element.addEventListener("touchstart",this.onTouchStart.bind(this)),this.element.addEventListener("touchmove",this.onTouchMove.bind(this)),this.element.addEventListener("touchend",this.onTouchEnd.bind(this)),this.element.addEventListener("mousedown",this.onMouseDown.bind(this)),document.addEventListener("mousemove",this.onMouseMove.bind(this)),document.addEventListener("mouseup",this.onMouseUp.bind(this)),this.element.addEventListener("wheel",this.onWheel.bind(this)),this.throttledMoveBy=this.throttle(this._moveBy.bind(this),n)}onTouchStart(t){const e=t.touches[0];this.startX=e.clientX,this.startY=e.clientY}onTouchMove(t){t.preventDefault();const e=t.touches[0],n=e.clientX-this.startX,i=4*(e.clientY-this.startY);this.startX=e.clientX,this.startY=e.clientY,this.accumulatedDx+=n,this.accumulatedDy+=i,this.throttledMoveBy()}onTouchEnd(t){this.accumulatedDx=0,this.accumulatedDy=0,console.log("Touch ended, reset accumulated dx/dy")}onMouseDown(t){this.startX=t.clientX,this.startY=t.clientY,this.isDragging=!0}onMouseMove(t){if(!this.isDragging)return;const e=t.clientX-this.startX,n=t.clientY-this.startY;this.startX=t.clientX,this.startY=t.clientY,this.accumulatedDx+=e,this.accumulatedDy+=n,this.throttledMoveBy()}onMouseUp(t){this.isDragging&&(this.accumulatedDx=0,this.accumulatedDy=0,this.isDragging=!1,console.log("Mouse drag ended, reset accumulated dx/dy"))}onWheel(t){const e=t.deltaX,n=.25*t.deltaY;this.accumulatedDx+=e,this.accumulatedDy+=n,this.throttledMoveBy()}_moveBy(){this.externalMoveBy(this.accumulatedDx,this.accumulatedDy),this.accumulatedDx=0,this.accumulatedDy=0}throttle(t,e){let n=0;return function(...i){const o=Date.now();o-n>=e&&(t(...i),n=o)}}}class SplitterPane{constructor(t,e){this.container=t,this.layout=e,this.splitter=t.son("div",{left:t.offsetWidth/2-10,top:t.offsetHeight/2-10,width:20,height:20,position:"absolute",backgroundColor:"rgba(20, 20, 20, 0.3)",borderRadius:"20px",cursor:"move",zIndex:10}),this.panes=[],this.isDragging=!1,this.startX=0,this.startY=0,this.resizex=null,this.initialize(),t.addEventListener("click",(e=>{if(e.ctrlKey){const n=t.getBoundingClientRect();this.splitter.css({left:e.clientX-n.left-10,top:e.clientY-n.top-10}),this.updatePanes()}}))}initialize(){let t=0;switch(this.layout){case"S4P":t=4;break;case"S3T":case"S3U":case"S81":case"S18":t=3;break;default:return void console.error("Unknown layout type")}for(let e=0;e{t.preventDefault(),this.isDragging=!0,this.splitter.style.cursor="move",this.startX=t.clientX,this.startY=t.clientY})),document.addEventListener("mousemove",(t=>{if(!this.isDragging)return;t.preventDefault();const e=this.container.getBoundingClientRect();let n=this.splitter.offsetLeft+t.clientX-this.startX,i=this.splitter.offsetTop+t.clientY-this.startY;n=Math.max(0,Math.min(n,e.width-this.splitter.offsetWidth)),i=Math.max(0,Math.min(i,e.height-this.splitter.offsetHeight)),this.splitter.style.left=`${n}px`,this.splitter.style.top=`${i}px`,this.updatePanes(),this.startX=t.clientX,this.startY=t.clientY})),document.addEventListener("mouseup",(()=>{this.isDragging&&(this.isDragging=!1,this.splitter.style.cursor="move")}))}initSplitterPosition(){this.updatePanes()}updatePanes(){const t=this.container.getBoundingClientRect(),e=this.splitter.getBoundingClientRect();switch(this.layout){case"S4P":this.updatePanesS4P(t,e);break;case"S3T":this.updatePanesS3T(t,e);break;case"S3U":this.updatePanesS3U(t,e);break;case"S81":this.updatePanesS81(t,e);break;case"S18":this.updatePanesS18(t,e);break;default:console.error("Unknown layout type")}this.resizex&&this.resizex()}updatePanesS4P(t,e){this.panes[0].css({top:0,left:0,width:e.left-t.left+10,height:e.top-t.top+10}),this.panes[1].css({top:0,left:e.right-t.left-10,width:t.right-e.right+10,height:e.top-t.top+10}),this.panes[2].css({top:e.bottom-t.top-10,left:e.right-t.left-10,width:t.right-e.right+10,height:t.bottom-e.bottom+10}),this.panes[3].css({top:e.bottom-t.top-10,left:0,width:e.left-t.left+10,height:t.bottom-e.bottom+10})}updatePanesS3T(t,e){this.panes[0].css({top:0,left:0,width:t.width,height:e.top-t.top+10}),this.panes[1].css({top:e.top-t.top+10,left:0,width:e.left-t.left+10,height:t.bottom-e.top-10}),this.panes[2].css({top:e.top-t.top+10,left:e.right-t.left-10,width:t.right-e.right+10,height:t.bottom-e.top-10})}updatePanesS3U(t,e){this.panes[0].css({top:0,left:0,width:e.left-t.left+10,height:e.top-t.top+10}),this.panes[1].css({top:0,left:e.right-t.left-10,width:t.right-e.right+10,height:e.top-t.top+10}),this.panes[2].css({top:e.top-t.top+10,left:0,width:t.width,height:t.bottom-e.top-10})}updatePanesS81(t,e){this.panes[0].css({top:0,left:0,width:e.left-t.left+10,height:e.top-t.top+10}),this.panes[1].css({top:e.top-t.top+10,left:0,width:e.left-t.left+10,height:t.bottom-e.top-10}),this.panes[2].css({top:0,left:e.right-t.left-10,width:t.right-e.right+10,height:t.bottom-t.top})}updatePanesS18(t,e){this.panes[0].css({top:0,left:0,width:e.left-t.left+10,height:t.bottom-t.top}),this.panes[1].css({top:0,left:e.right-t.left-10,width:t.right-e.right+10,height:e.top-t.top+10}),this.panes[2].css({top:e.bottom-t.top-10,left:e.right-t.left-10,width:t.right-e.right+10,height:t.bottom-e.bottom+10})}}var w20796=!1;function $ilog(t,e){var n=e||3e3;w20796||(w20796=document.body.son("table",{position:"absolute",maxWidth:"60%",opacity:1,top:5,fontSize:16,right:"10%",zIndex:3e4})),w20796.show();var i=w20796.insertRow(-1);u=i.insertCell(),u.css({border:"1px solid #e1f3d8",backgroundColor:n>0?"#f0f9eb":"#F00",borderRadius:"8px",color:"#67C23A",fontWeight:"bold",padding:10}),u.innerText=t,n>0?setTimeout((function(){$cle(i),0==w20796.rows.length&&w20796.hide()}),n):u.onclick=function(){$cle(this.parentElement),0==w20796.rows.length&&w20796.hide()}}$clog=$ilog;var w20797=!1;function $elog(t,e){var n=e||3e3;w20797||(w20797=document.body.son("table",{position:"absolute",maxWidth:"60%",opacity:1,top:5,fontSize:16,right:"10%",zIndex:3e4})),w20797.show();var i=w20797.insertRow(-1);u=i.insertCell(),u.css({border:"1px solid #e1f3d8",backgroundColor:n>0?"#fef0f0":"#F00",borderRadius:"8px",color:"#F56C6C",fontWeight:"bold",padding:10}),u.innerText=t,n>0?setTimeout((function(){$cle(i),0==w20797.rows.length&&w20797.hide()}),n):u.onclick=function(){$cle(this.parentElement),0==w20797.rows.length&&w20797.hide()}}function videoCanvasPan(t,e,n={}){n=OPlus({autoplay:!1,loop:!1,controls:!1,muted:!0,poster:"",buttonOpacity:.5},n),t.clc();let i=t.son("div",{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden",background:"none"}).son("div",{background:"#fff",border:"0px solid #000",boxSizing:"border-box"});const o=t.son("video",{position:"absolute",left:0,top:0,width:10,height:10,opacity:.01,pointerEvents:"none"});o.src=e,o.setAttribute("playsinline","playsinline"),o.setAttribute("webkit-playsinline","webkit-playsinline"),o.setAttribute("muted","muted"),o.muted=!0,n.autoplay&&o.setAttribute("autoplay","autoplay"),n.loop&&o.setAttribute("loop","loop"),n.poster&&(o.poster=n.poster);const r=t.son("canvas",{position:"absolute",left:0,top:0,zIndex:10});let s={scale:1,offsetX:0,offsetY:0,dragging:!1,lastX:0,lastY:0,boxW:0,boxH:0,rotate:!1,scale0:1};function a(t,e){return t>=e?"x":"y"}function l(){const e=t.clientWidth,n=t.clientHeight,l=o.videoWidth,c=o.videoHeight;if(!l||!c)return;const d=a(e,n)!==a(l,c);let h=d?c:l,u=d?l:c,p=Math.min(e/h,n/u),f=h*p,g=u*p;i.css({width:f+"px",height:g+"px"});let L=i.getBoundingClientRect(),v=t.getBoundingClientRect(),b=L.left-v.left,m=L.top-v.top;r.width=i.offsetWidth,r.height=i.offsetHeight,r.style.left=b+"px",r.style.top=m+"px",s.boxW=h,s.boxH=u,s.rotate=d,s.scale0=p,s.scale=1,s.offsetX=0,s.offsetY=0}function c(){s.scale=1,s.offsetX=0,s.offsetY=0}function d(t,e){if(!s.rotate)return{x:t,y:e};let n=r.width/2,i=r.height/2;return{x:n-(e-i),y:i+(t-n)}}r.onwheel=t=>{t.preventDefault();let e=r.getBoundingClientRect(),n=t.clientX-e.left,i=t.clientY-e.top,{x:o,y:a}=d(n,i),l=s.scale,c=t.deltaY<0?1.1:.9,h=Math.max(.1,Math.min(10,l*c));console.log("[zoom]",{px:n,py:i,mx:o,my:a,before:{scale:l,offsetX:s.offsetX,offsetY:s.offsetY}}),s.offsetX=o-(o-s.offsetX)*(l/h),s.offsetY=a-(a-s.offsetY)*(l/h),s.scale=h,console.log("[zoom result]",{after:{scale:h,offsetX:s.offsetX,offsetY:s.offsetY}})};r.onmousedown=t=>{let e=r.getBoundingClientRect(),n=t.clientX-e.left,i=t.clientY-e.top,{x:o,y:a}=d(n,i);s.dragging=!0,s.lastX=o,s.lastY=a,console.log("[mousedown]",{px:n,py:i,x:o,y:a,offsetX:s.offsetX,offsetY:s.offsetY})},window.addEventListener("mousemove",(t=>{if(s.dragging){let e=r.getBoundingClientRect(),n=t.clientX-e.left,i=t.clientY-e.top,{x:o,y:a}=d(n,i);s.offsetX+=o-s.lastX,s.offsetY+=a-s.lastY,s.lastX=o,s.lastY=a,console.log("[drag]",{px:n,py:i,x:o,y:a,offsetX:s.offsetX,offsetY:s.offsetY})}})),window.addEventListener("mouseup",(t=>{s.dragging=!1}));let h=0,u=1,p={x:0,y:0},f={x:0,y:0};r.ontouchstart=function(t){if(1===t.touches.length){let e=t.touches[0],n=r.getBoundingClientRect(),i=e.clientX-n.left,o=e.clientY-n.top,{x:a,y:l}=d(i,o);s.dragging=!0,s.lastX=a,s.lastY=l,console.log("[touchstart]",{tx:i,ty:o,x:a,y:l,offsetX:s.offsetX,offsetY:s.offsetY})}else if(2===t.touches.length){s.dragging=!1;const e=t.touches[0],n=t.touches[1];let i=r.getBoundingClientRect(),o=e.clientX-i.left,a=e.clientY-i.top,l=n.clientX-i.left,c=n.clientY-i.top,g=d(o,a),L=d(l,c);h=Math.hypot(L.x-g.x,L.y-g.y),u=s.scale,p={x:(g.x+L.x)/2,y:(g.y+L.y)/2},f={x:s.offsetX,y:s.offsetY},console.log("[pinchstart]",{x1:o,y1:a,x2:l,y2:c,p1:g,p2:L,pinchStartMid:p,pinchStartScale:u,pinchStartOffset:f})}},r.ontouchmove=function(t){if(1===t.touches.length&&s.dragging){let e=t.touches[0],n=r.getBoundingClientRect(),i=e.clientX-n.left,o=e.clientY-n.top,{x:a,y:l}=d(i,o);s.offsetX+=a-s.lastX,s.offsetY+=l-s.lastY,s.lastX=a,s.lastY=l,console.log("[touchdrag]",{tx:i,ty:o,x:a,y:l,offsetX:s.offsetX,offsetY:s.offsetY})}else if(2===t.touches.length){const e=t.touches[0],n=t.touches[1];let i=r.getBoundingClientRect(),o=e.clientX-i.left,a=e.clientY-i.top,l=n.clientX-i.left,c=n.clientY-i.top,g=d(o,a),L=d(l,c);const v=Math.hypot(L.x-g.x,L.y-g.y);let b=u,m=Math.max(.1,Math.min(10,b*(v/h))),y=p,x={x:(g.x+L.x)/2,y:(g.y+L.y)/2},w=f;s.scale=m,s.offsetX=x.x-(y.x-w.x)*(b/m),s.offsetY=x.y-(y.y-w.y)*(b/m),console.log("[pinchmove]",{x1:o,y1:a,x2:l,y2:c,p1:g,p2:L,mid:x,mid0:y,offset0:w,S0:b,S1:m,offsetX:s.offsetX,offsetY:s.offsetY}),t.preventDefault()}},r.ontouchend=function(t){s.dragging=!1},r.ontouchcancel=function(t){s.dragging=!1},r.ondblclick=function(t){c()};let g=t.son("div",{position:"absolute",right:"24px",bottom:"24px",width:"54px",height:"54px",borderRadius:"50%",background:"#1ec01e",opacity:n.buttonOpacity,cursor:"pointer",zIndex:30,userSelect:"none",boxShadow:"0 2px 8px rgba(0,0,0,0.2)",transition:"background 0.2s, opacity 0.2s"});function L(){g.style.background=o.paused?"#1ec01e":"#e52b24",g.title=o.paused?"播放":"暂停"}if(o.addEventListener("play",L),o.addEventListener("pause",L),g.onclick=function(t){t.stopPropagation(),o.paused?(o.muted=!1,o.removeAttribute("muted"),o.volume=1,o.currentTime+=.01,o.play().catch((()=>{}))):o.pause()},L(),o.addEventListener("loadedmetadata",l),o.addEventListener("loadeddata",l),window.addEventListener("resize",l),window.ResizeObserver){new ResizeObserver(l).observe(t)}return setTimeout(l,80),requestAnimationFrame((function t(){const e=r.getContext("2d");if(e.clearRect(0,0,r.width,r.height),!o.videoWidth||!o.videoHeight)return requestAnimationFrame(t);let n=s.boxW/s.scale,i=s.boxH/s.scale,a=-s.offsetX/s.scale,l=-s.offsetY/s.scale;e.save(),s.rotate?(e.translate(r.width/2,r.height/2),e.rotate(Math.PI/2),e.translate(-r.height/2,-r.width/2),e.drawImage(o,a,l,i,n,0,0,r.height,r.width)):e.drawImage(o,a,l,n,i,0,0,r.width,r.height),e.restore(),requestAnimationFrame(t)})),{video:o,canvas:r,fitbox:i,state:s,unmute:function(){o.muted=!1,o.removeAttribute("muted"),o.volume=1,o.currentTime+=.01,o.play().catch((()=>{}))},fitOrg:c}}function videoPan(t,e,n={}){n=Object.assign({autoplay:!1,loop:!1,controls:!0,muted:!1,poster:""},n),t.clc();let i=t.son("div",{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden",background:"none"}).son("div",{background:"#fff",border:"4px solid #000",boxSizing:"border-box"});const o=t.son("video",{position:"absolute",left:0,top:0,background:"none"});o.src=e,o.setAttribute("playsinline","playsinline");for(let t in n)n[t]?o.setAttribute(t,n[t]):o.removeAttribute(t);function r(t,e){return t>=e?"x":"y"}function s(){const e=t.clientWidth,n=t.clientHeight,s=o.videoWidth,a=o.videoHeight;if(!s||!a)return;const l=r(e,n)!==r(s,a);let c=l?a:s,d=l?s:a,h=Math.min(e/c,n/d),u=c*h,p=d*h;i.css({width:u+"px",height:p+"px"});let f=i.getBoundingClientRect(),g=t.getBoundingClientRect(),L=f.left-g.left+i.offsetWidth/2,v=f.top-g.top+i.offsetHeight/2,b=l?i.offsetHeight:i.offsetWidth,m=l?i.offsetWidth:i.offsetHeight;o.style.width=b+"px",o.style.height=m+"px",o.style.left=L+"px",o.style.top=v+"px",o.style.transformOrigin="center center",o.style.transform=l?"translate(-50%,-50%) rotate(90deg)":"translate(-50%,-50%)"}return n.poster&&(o.poster=n.poster),o.addEventListener("loadedmetadata",s),o.addEventListener("loadeddata",s),window.addEventListener("resize",s),setTimeout(s,50),o}function DateDiff(t,e){var n,i,o;return n=t.split("-"),i=new Date(n[1]+"-"+n[2]+"-"+n[0]),n=e.split("-"),o=new Date(n[1]+"-"+n[2]+"-"+n[0]),parseInt(Math.abs(i-o)/1e3/60/60/24)}function GetDateDiff(t,e){var n=new Date(Date.parse(t.replace(/-/g,"/"))).getTime(),i=new Date(Date.parse(e.replace(/-/g,"/"))).getTime();return Math.abs(n-i)/864e5}function getNowFormatDate(){var t=new Date,e=t.getMonth()+1,n=t.getDate();return e>=1&&e<=9&&(e="0"+e),n>=0&&n<=9&&(n="0"+n),t.getFullYear()+"-"+e+"-"+n+" "+t.getHours()+":"+t.getMinutes()+":"+t.getSeconds()}function calculateTimeDifference(t){const e=new Date(t),n=new Date-e;let i=Math.floor(n/864e5);const o=Math.floor(n%864e5/36e5),r=Math.floor(n%36e5/6e4),s=Math.floor(n%6e4/1e3);i=i||"";return`${i} ${o.toString().padStart(2,"0")}:${r.toString().padStart(2,"0")}:${s.toString().padStart(2,"0")}`}function formatNumber(t,e,n){var i;return!isNaN(parseFloat(t))&&isFinite(t)?(t=Number(t),(i=(t=(void 0!==e?t.toFixed(e):t).toString()).split("."))[0]=i[0].toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+(n||",")),i.join(".")):NaN}function checkItems(t,e){var n=t.split(","),i=[];return n.forEach((function(t){i.push({type:"checkbox",name:t,label:t}),t==e&&i.push({type:"newcolumn"})})),i}function getLenPx(t,e){return t.replace(/[^\x00-\xff]/gi,"aa").length*e/2}function myStrParse(t){const e=t.match(/([^{()\[\]]*)(\(([^()]+)\))?(\{([^{}]+)\})?(\[([^\[\]]+)\])?/);let[n,i,o,r,s,a,l,c]=e;i=i.trim();let d=!1;return"^"===i.charAt(0)&&(d=!0,i=i.substring(1)),{str:i.trim(),c:r?r.trim():null,vs:a?a.trim():null,v:c?c.trim():null,d:d}}function generateUniqueString(){let t=Date.now().toString(36),e=Math.random().toString(36).substring(2,8);return t.slice(-4)+e.slice(0,4)}Date.prototype.fmt=function(t){null!=t&&""!=t||(t="y-m-d");var e=this.getFullYear(),n=this.getMonth()+1,i=this.getDate(),o=t.replace(/y+/gi,e);return o=(o=o.replace(/m+/gi,(n<10?"0":"")+n)).replace(/d+/gi,(i<10?"0":"")+i)},Date.prototype.Format=function(t){var e={"M+":this.getMonth()+1,"d+":this.getDate(),"h+":this.getHours(),"m+":this.getMinutes(),"s+":this.getSeconds(),"q+":Math.floor((this.getMonth()+3)/3),S:this.getMilliseconds()};for(var n in/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(this.getFullYear()+"").substr(4-RegExp.$1.length))),e)new RegExp("("+n+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?e[n]:("00"+e[n]).substr((""+e[n]).length)));return t},String.prototype.right=function(t){var e=this.length-t;return e<0&&(e=0),this.substring(this.length-t,this.length)},_C4=String.fromCharCode(4),_C3=String.fromCharCode(3),_C5=String.fromCharCode(5),_a_="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",String.prototype.xor=function(t){for(var e="",n=0;n127||94==this.charCodeAt(e)?t+=2:t++;return t},String.prototype.format=function(){var t=arguments;return this.replace(/\{(\d+)\}/g,(function(e,n){return t[n]}))},String.prototype.$=function(){var t=this.replaceAll(_C3,"\r");return t=this.replaceAll(_C4,"\n"),unescape(t)},String.prototype._=function(){var t=this.replaceAll("\n","");return t=(t=(t=(t=t.replaceAll(":",":")).replaceAll("\r","")).replaceAll(",",",")).replaceAll(" ","")},ustring=function(t){var e=String.fromCharCode(4);r=t[0];for(var n=1;n{"function"!=typeof this[t]&&(r[t]=this[t])}));const s={};i.forEach((n=>{if("function"==typeof this[n]){const i=Object.getOwnPropertyNames(HTMLElement.prototype).includes(n);!t&&(e.has(n)||i||n.startsWith("on"))||(s[n]=this[n])}}));return{tag:`${this.tagName.toLowerCase()}${this.id?`#${this.id}`:""}${this.className?`.${this.className.trim().split(/\s+/).join(".")}`:""}`,props:r,methods:s}},HTMLElement.prototype.$css=function(t,e){var n,i;for(n in t)t.hasOwnProperty(n)&&null!==(i=pfx(n))&&(this.style[i]=t[n]);if(e)for(var o in e)o.startsWith("___")?this.setAttribute(o.substring(3),e[o]):this[o]=e[o];return this.init&&this.init(),this.iPos&&this.Fly(this.iPos),this},HTMLElement.prototype.css=function(t,e){var n,i;for(n in t)t.hasOwnProperty(n)&&null!==(i=pfx(n))&&(this.style[i]=t[n]);if(e)for(var o in e)o.startsWith("___")?this.setAttribute(o.substring(3),e[o]):this[o]=e[o];return this.iPos&&this.Fly(this.iPos),this},HTMLElement.prototype.addBackImg=function(t,e,n,i){var o=this;let r=t+", "+getComputedStyle(o).backgroundImage,s=e+", "+getComputedStyle(o).backgroundPosition,a=n+", "+getComputedStyle(o).backgroundSize;return o.style.backgroundImage=r,o.style.backgroundPosition=s,o.style.backgroundSize=a,o},HTMLElement.prototype.removeBackImg=function(t){var e=this;let n=getComputedStyle(e).backgroundImage.split(", "),i=getComputedStyle(e).backgroundPosition.split(", "),o=getComputedStyle(e).backgroundSize.split(", "),r=n.findIndex((e=>e.includes(t)));return-1!==r&&(n.splice(r,1),i.splice(r,1),o.splice(r,1)),e.style.backgroundImage=n.join(", "),e.style.backgroundPosition=i.join(", "),e.style.backgroundSize=o.join(", "),e},HTMLElement.prototype.scrollbarWidth=function(){return this.offsetWidth-this.clientWidth},HTMLElement.prototype.rED=function(t,e,n,i=!1){function o(){event.stopPropagation()}this.oncontextmenu=function(){return!1},this.onmousedown=function(){2==event.button&&(this._bgc=this.style.backgroundColor,this._c=this.style.color,this._btxt=this.innerText,this.innerText==this.ph&&(this.innerText=""),this.contentEditable=!0,this.style.backgroundColor="#FFA",this.style.color="#000",this.addEventListener("mouseup",o,!1),this.addEventListener("mousedown",o,!1),this.addEventListener("click",o,!1),i||this.addEventListener("keydown",(function(t){"Enter"===t.key&&(t.preventDefault(),this.blur())}),!1),t&&t(this),this.onblur=function(){this.contentEditable=!1,this.style.backgroundColor=this._bgc,this.style.color=this._c,e&&e(this),this.removeEventListener("mouseup",o),this.removeEventListener("mousedown",o),this.removeEventListener("click",o),i||this.removeEventListener("keydown",o)})},this.addEventListener("paste",(function(t){n?n(event):function(t){var e=t||window.event;e.preventDefault();var n=(e.originalEvent||e).clipboardData.getData("text/plain")||prompt("在这里输入文本");document.execCommand("insertText",!1,n)}(t)}))},_hSet("DF",(function(t){var e=this;function n(n){var i=n.name.split(".").pop().toLowerCase(),o=new FileReader;switch(i){case"svg":case"txt":case"html":o.readAsText(n);break;case"png":case"mp3":case"jpg":case"mp4":case"gif":case"pdf":case"wav":case"docx":case"xlsx":case"webp":o.readAsDataURL(n)}o.onload=function(){t.call(e,this.result,i,"f",n)}}document.body.ondragover=function(t){t.preventDefault()},document.body.ondrop=function(t){t.preventDefault()},e.ondragover=function(t){t.preventDefault()},e.ondrop=function(i){i.preventDefault();var o=i.dataTransfer.files;if(o.length>0)for(var r=0;rt.preventDefault(),document.body.ondrop=t=>t.preventDefault(),t.ondragenter=function(e){e.preventDefault(),t.css({outline:"2px dashed #3af",backgroundColor:"rgba(0,150,255,0.05)"})},t.ondragleave=function(e){e.preventDefault(),t.css({outline:"",backgroundColor:""})},t.ondragover=function(t){t.preventDefault()},t.ondrop=function(n){n.preventDefault(),t.css({outline:"",backgroundColor:""});const i=n.dataTransfer,o=i.files;if(o&&o.length>0)for(let t=0;t=0&&e.left>=0&&e.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&e.right<=(window.innerWidth||document.documentElement.clientWidth)},HTMLElement.prototype.LRSwipe=function(t,e,n){var i,o,r=e||100;this.__gesture=!1;var s=this;this.onmousedown=function(t){s.__gesture=!0,i=t.clientX,o=t.clientY},this.onmouseup=function(e){s.__gesture=!1,i=e.clientX-i,o=e.clientY-o,t&&Math.abs(i)>=r?t.call(s,i):Math.abs(o)>=r&&n&&n.call(s,o)},this.ontouchstart=function(t){s.__gesture=!0,i=t.touches[0].clientX,o=t.touches[0].clientY},this.ontouchend=function(e){s.__gesture=!1,i=e.changedTouches[0].clientX-i,o=e.changedTouches[0].clientY-o,t&&Math.abs(i)>=r?t.call(s,i):Math.abs(o)>=r&&n&&n.call(s,o)}},HTMLElement.prototype.toJpg=function(t,e){const n=this,i=document.createElement("canvas"),o=i.getContext("2d");i.width=n.offsetWidth,i.height=n.offsetHeight,o.fillStyle="white",o.fillRect(0,0,i.width,i.height);const r=n.cloneNode(!0).outerHTML,s=`\n `,a=new Image;a.onload=()=>{o.drawImage(a,0,0,i.width,i.height);const n=i.toDataURL("image/jpeg",t);e&&e(n)},a.onerror=()=>{console.error("Failed to load image")},a.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(s)},HTMLElement.prototype.p2j=function(t,e){const n=Object.getOwnPropertyNames(this),i={};for(const t of n)i[t]=this[t];return i},HTMLElement.prototype.hasPointerEventsNone=function(){for(var t=this;t&&t!==document;){if("none"===window.getComputedStyle(t).pointerEvents)return!0;t=t.parentNode}return!1},HTMLElement.prototype._ltrb=function(){const t=this,e=t.offsetParent;if(!e)return null;const n=e.offsetWidth,i=e.offsetHeight,o=t.offsetLeft,r=t.offsetTop,s=n-o-t.offsetWidth,a=i-r-t.offsetHeight,l=t.offsetHeight,c=t.offsetWidth;return this.LTRB={w:c,h:l,l:o,t:r,r:s,b:a},{w:c,h:l,l:o,t:r,r:s,b:a}};var index20635=2021;function T(){return(new Date).getTime()}function _TT(){return parseInt(T()/6e4-23869797)}function $floor(t){return Math.floor(Math.random()*t)}function isEmptyObj(t){return 0===Object.keys(t).length&&t.constructor===Object}function Oplus(...t){const e={};for(const n of t)n&&"object"==typeof n&&Object.assign(e,n);return e}function getVs(keys){const keyArr=keys.split(",");for(let i=0;i{var i=document.createElement("script");i.type="module",i.src=t,i.onload=e,i.onerror=n,document.head.appendChild(i)}))}function loadjsmod(t,e,n){var i=document.createElement("script");i.type="module",i.src=t,i.onload=function(){"function"==typeof e&&e()},i.onerror=function(t){"function"==typeof n&&n(t)},document.head.appendChild(i)}function loadLink(t){const e=document.createElement("link");e.rel="manifest",e.href=t,document.head.appendChild(e)}function loadJLink(t){const e=new Blob([t],{type:"application/json"}),n=URL.createObjectURL(e),i=document.createElement("link");i.rel="manifest",i.href=n,document.head.appendChild(i)}function ex_0(t){if(t.startsWith("(")&&t.endsWith(")")){let e=0,n=!0;for(let i=1;i{if("object"==typeof n&&null!==n){if(e.has(n))return;e.add(n)}return n instanceof HTMLElement?void 0:n}));return JSON.parse(n)}function _TTS(t,e=0,n="zh-CN"){function i(){var i=window.speechSynthesis.getVoices(),o=new SpeechSynthesisUtterance(t);i.length>0&&e>=0&&e{i(),window.speechSynthesis.onvoiceschanged=null}:i()}function mySVGTXT(t,e=20,n="#a00",i="transparent",o=.7){const r=((t,e,n,i)=>{let o=0,r=0;for(const e of t)e.match(/[\u4e00-\u9fa5]/)?r++:o++;return{width:o*e*n+r*e*i,height:e}})(t,e,.6,1);return`\n \n `}function extractMethods(t){const e={};for(const n in t)if("function"==typeof t[n]){const i=t[n].toString().match(/\(([^)]*)\)/),o=i?i[1].split(",").map((t=>t.trim())):[];e[n]=o}return e}function calcAge(t){const e=new Date,n=new Date(t);let i=e.getFullYear()-n.getFullYear();const o=e.getMonth()-n.getMonth(),r=e.getDate()-n.getDate();return(o<0||0===o&&r<0)&&i--,i}function setVerticalRange(t){const e=t.parentElement,n=e.clientWidth,i=e.clientHeight;t.style.width=`${i}px`,t.style.height=`${n}px`,t.style.transform="rotate(-90deg)",t.style.transformOrigin="center center",t.style.display="block",t.style.margin="0 auto"}function generateRoomNo(){return`${Date.now().toString(36).substring(6)}${Math.random().toString(36).substr(2,6)+"_"+wx.user.id}`}function filePost(t,e,n,i,o){const r=new XMLHttpRequest;r.open("POST",e+encodeURI(t.name),!0),r.upload.onprogress=function(t){if(t.lengthComputable){const e=t.loaded/t.total*100;n(e)}},r.onload=function(){200===this.status?i():o(this.statusText)},r.onerror=function(){$clog("XHR错误:",r.statusText),o(r.statusText)};const s=new FileReader;s.readAsArrayBuffer(t),s.onload=()=>{r.send(s.result)},s.onerror=t=>{$clog("文件读错误:",t),o(t)}}function throttle(t,e){let n;return function(){const i=arguments,o=this;n||(t.apply(o,i),n=!0,setTimeout((()=>n=!1),e))}}function debounce0(t,e){let n;return function(){const i=this,o=arguments;clearTimeout(n),n=setTimeout((()=>{t.apply(i,o)}),e)}}function isInViewport(t,e){var n=t.offsetTop-e.offsetTop,i=n-e.scrollTop,o=e.scrollTop+e.clientHeight-4-n;return i<0?1:o<0?-1:0}function image2array(t,e,n){return new Promise(((i,o)=>{const r=new Image;r.crossOrigin="Anonymous",r.src=t,r.onload=()=>{const t=document.createElement("canvas"),o=t.getContext("2d"),s=r.width,a=r.height,l=s/n,c=a/e;t.width=l,t.height=c;const d=[];for(let i=0;i{o(t)}}))}async function camList(){try{return(await navigator.mediaDevices.enumerateDevices()).filter((t=>"videoinput"===t.kind))}catch(t){return console.error("枚举摄像头时发生错误:",t),[]}}function Monaco(t,e){return new Promise(((n,i)=>{const o=Object.assign({},{containerId:"",value:'// Some initial code\nconsole.log("Hello, world!")',language:"javascript",theme:"vs-dark",lineNumbersMinChars:4,lineDecorationsWidth:0},e);if(null===document.getElementById("monaco-loader-script")){var r=document.createElement("script");r.id="monaco-loader-script",r.src="/monaco-editor/vs/loader.js",r.onload=function(){window.require.config({paths:{vs:"/monaco-editor/vs"}}),window.require(["vs/editor/editor.main"],(function(){const e=monaco.editor.create(t,{value:o.value,language:o.language,theme:o.theme,lineNumbersMinChars:o.lineNumbersMinChars});n(e)}))},r.onerror=i,document.head.appendChild(r)}else window.require(["vs/editor/editor.main"],(function(){const e=monaco.editor.create(t,{value:o.value,language:o.language,theme:o.theme,lineNumbersMinChars:o.lineNumbersMinChars});n(e)}))}))}function uploadFile(t,e,n,i,o){const r=new XMLHttpRequest;r.open("POST",e,!0),r.upload.onprogress=function(t){if(t.lengthComputable){const e=t.loaded/t.total*100;o&&o(e)}},r.onload=function(){200===r.status?n&&n(r.responseText):i&&i(r.status,r.statusText)},r.onerror=function(){i&&i(r.status,r.statusText)};const s=new FileReader;s.readAsArrayBuffer(t),s.onload=()=>{r.send(s.result)},s.onerror=function(t){i&&i(0,t.toString())}}function scaleSvg(t,e){const n=t.width.baseVal.value/e,i=t.height.baseVal.value/e;t.setAttribute("viewBox",`0 0 ${n} ${i}`)}function pieIt(t,e="#F00",n){t.css({},{}),t.myHTML(' '.replace("#F00",e));var i=t.children[0];if(i.setAttribute("preserveAspectRatio","none"),i.setAttribute("width",t.offsetWidth),i.setAttribute("height",t.offsetHeight),t.___v=0,n){var o=n/100*502.4;t._ev.pie.setAttribute("stroke-dasharray",`${o}, 502.4`),t.___v=n}Object.defineProperty(t,"v",{get:function(){return this.___v},set:function(e){this.___v=e;var n=2*Math.PI*65,i=n*(e/100);t._ev.pie.setAttribute("stroke-dasharray",`${i}, ${n}`)}})}function fixSvgViewBox(t){let e=t.match(/width=["'](\d+)(px)?["']/),n=t.match(/height=["'](\d+)(px)?["']/),i=t.includes("viewBox=");if(e&&n&&!i){const i=e[1],o=n[1];t=t.replace(/