/* name: qf_web_ui version: V1.160-extend-1.098 */ !function(e){var t={};function i(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(n,r,function(t){return e[t]}.bind(null,r));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=0)}([function(e,t,i){e.exports=i(1)},function(e,t,i){!function(e){document;var t=document.body;window;new function(){var n=this,r={},s={getRegistStyle:function(e){return{loader:[{i:0,k:"@keyframes loader-a1",v:"0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}"},{i:1,k:"@keyframes loader-a2",v:"0%{transform:rotate(0deg)}100%{transform:rotate(-360deg)}"},{i:2,k:".kim-loader:before,.kim-loader:after",v:'content:"";position:absolute;border-radius:50%;border:4px solid #1276E3;'},{i:3,k:".kim-loader:before",v:"height:60px;width:60px;border-left-color:transparent;border-bottom:0;animation:loader-a1 1s cubic-bezier(.42, .61, .58, .41) infinite;"},{i:4,k:".kim-loader:after",v:"height:40px;width:40px;border-top-color:transparent;border-right:0;animation:loader-a2 1s cubic-bezier(.42, .61, .58, .41) infinite;"}]}[e]},createStyleElement:function(e,t){var i=document.createElement("style");return i.type="text/css",i.id=e||"kmb-popmd-e3d8-style",t?t.appendChild(i):document.head.appendChild(i),i},getStyleSheet:function(e,t){return(document.getElementById(e||"kmb-popmd-e3d8-style")||this.createStyleElement(e,t)).sheet},setStyleSheet:function(e,t,i,n){var r=n||this.getStyleSheet();r&&(r.insertRule?r.insertRule(e+"{"+t+"}",i):r.addRule(e,t,i))},setStyleSheets:function(e){var t=this.getStyleSheet();if(!t.rules[e[0].i])for(var i of e){var n=i.k,r=i.v,s=i.i;t.insertRule?t.insertRule(n+"{"+r+"}",s):t.addRule(n,r,s)}}};let o=function(e){var t=e.zIndex||2023,i=e.baselayerClass?" "+e.baselayerClass:"",n=e.backgroundColor||"rgba(0,0,0,.5)",r=document.getElementById(e.id||"kmbBaseLayer_e3d8")||document.createElement("div");r.id=e.id||"kmbBaseLayer_e3d8",r.className="kmb-basepopuplayer"+i;var s=e.coverFull?"width:100%;justify-content:center;":"";return r.style.cssText="position:fixed;top:0;left:0;width:0;height:100%;"+s+"z-index:"+t+";background-color:"+n+";display:flex;align-items:center;",r},a=function(t,i){if("Object"===i.constructor.name&&i.show){var n=e.extend.call({size:12,point:"top",x:0,y:0,borderColor:"#3EB7EA",background:"rgba(0,0,0,.9)"},i||{}),r=n.size||12,s=n.point||"top",o=n.x||0,a=n.y||0,l=n.borderColor||"#3EB7EA",c=n.background||"rgba(0,0,0,.9)",d=0-r/2,u=~~Math.sqrt(r*r*2)-r-1,h="left",m="top",f=u,p=d,v=45;"left"===s||"right"===s?(f=d,p=u,v="right"===s?(h="right")&&135:-45):"bottom"===s&&(m="bottom",v=225);var g=~~(r+2)+"px",y='content:"";position:absolute;'+(m+":"+(p+a)+"px")+";"+(h+":"+(f+o)+"px")+";height:"+r+"px;width:"+r+"px;",b="border-color:"+l+" transparent transparent "+l+";",x=document.createElement("i");x.style.cssText=y+"background-color:"+c+";border-style:solid;border-width:1px;"+b+"transform:rotate("+v+"deg);clip-path:polygon(0% 0, "+g+" 0, 0% "+g+");",t.appendChild(x)}},l=function(e,t){var i=(t="Object"===t.constructor.name?t:{horizontal:"right",vertical:"top"}).vertical||"top",n=t.horizontal||"right",r=document.createElement("i");r.innerText="+",r.className="close",r.style.cssText="position:absolute;"+i+":-.13rem;"+n+":-.13rem;height:.26rem;width:.26rem;font-style:normal;font-size:.30rem;font-weight:100;border:1px solid #3EB7EA;display:flex;justify-content:center;align-items:center;border-radius:.20rem;transform:rotate(45deg);background:rgba(0,0,0,.5);cursor:pointer;color:#3EB7EA;user-select:none;z-index:1002;",e.appendChild(r)};e.extend.call(this,{popupLayer:function(e){var t=e.title&&(e.title.indexOf("<")>-1?e.title:"<span>"+e.title+"</span>")||"",i=e.closeBtnColor?"color:"+e.closeBtnColor:"",n=t?'<div class="qfui-message-box el-message-box__header"><div class="el-message-box__title">'+t+"</div></div>":"",r=e.confirm,s="[object Function]"===Object.prototype.toString.call(r)?'<div class="el-message-box__btns"><button type="button" aria-label="Confirm" class="el-button el-button--default el-button--small el-button--primary">确定</button></div>':"",o='<div class="kmb-message-box custom-alert">'+n+'<div class="el-message-box__content" style="min-width:300px;width:'+e.width+'"><div class="alert-ctbox">'+(e.html||"")+"</div></div>"+s+'<button class="el-message-box__headerbtn el-icon-close" aria-label="Close" style="'+i+'"></button></div>',a=document.createElement("div");a.id="culayer",a.className="el-message-box__wrapper "+(e.className||""),a.style.cssText="z-index:2001;background-color:rgba(0,0,0,.5);",a.innerHTML=o,document.body.appendChild(a);var l=a.querySelector(".alert-ctbox");e.onload&&e.onload(l),a.onclick=function(t){var i=t.target||t.srcElement;"BUTTON"===i.nodeName&&("Confirm"===i.getAttribute("aria-label")?(document.body.removeChild(a),e.confirm&&e.confirm(l)):"Close"===i.getAttribute("aria-label")&&(document.body.removeChild(a),e.close&&e.close()))}},scrollingPreview:function(t){var i=0,n=function(t){var n=this;this.box=t,this.init(),e.resize((function(){this.rTimer&&clearTimeout(this.rTimer),delete this.rTimer;var e=n.boundary.dist,r=e?e/(n.boundary=n.getBoundary()).dist:1;t.scrollTop=i/=r,this.rTimer=setTimeout(()=>{!n.animId&&n.start()},1500)}))};return n.prototype={init:function(){var e=this;this.flag=this.getPointer(),this.box.onmousedown=function(){e.cancel()},this.box.onmouseup=function(t){t.target.className.match("scrolling4")&&(i=t.target.scrollTop),e.start()},e.start()},getBoundary:function(){var e=this.box.scrollHeight-this.box.offsetHeight;return{dist:e,apex:e*((this.flag+1)/2)}},getPointer:function(){return Math.abs(this.box.scrollTop-1)-this.box.scrollTop},getItemHeight:function(e){return(e.children.length>2?e.lastElementChild:{}).offsetHeight||30},start:function(){this.boundary=this.getBoundary(),this.childHeight=this.getItemHeight(this.box),this.boundary.dist>this.childHeight&&this.animloop()},animloop:function(){this.box.scrollTop*this.flag>=this.boundary.apex?(this.flag=this.getPointer(),this.boundary=this.getBoundary(),this.boundary.dist>this.childHeight?this.animloop():this.cancel()):(this.box.scrollTop=i,t.scrollHeight-t.offsetHeight<i&&(this.flag=this.getPointer(),this.boundary=this.getBoundary()),i+=.3333*this.flag,this.animId=window.requestAnimationFrame(this.animloop.bind(this)))},cancel:function(){this.animId&&cancelAnimationFrame(this.animId),delete this.animId},update:function(){this.cancel(),this.start()}},{update:function(){new n(t).update()}}},Notify:function(i){var n=this,r={close:!0},s=(i=i||{}).duration||2e4,o=i.title||"提示",a=i.type||"warning",l=i.message||"提示内容!",c=i.zIndex||2e3;return position=i.position||"bottom",this.__proto__={open:function(d){d=d||{},r.ctn=r.ctn||document.createElement("div"),r.ctn.className="el-notification right el-notification-fade-enter el-notification-fade-leave-active",r.ctn.style=position+":16px;z-index:"+c+";",r.ctn.innerHTML='<i class="el-notification__icon el-icon-'+a+'"></i><div class="el-notification__group is-with-icon"><h2 class="el-notification__title">'+(d.title||o)+'</h2><div class="el-notification__content">'+(d.content||l)+'</div><div class="el-notification__closeBtn el-icon-close"></div></div>',t.appendChild(r.ctn),setTimeout((function(){r.ctn.classList.remove("el-notification-fade-enter","el-notification-fade-leave-active")}),100),r.timer=e.Async.timeout((function(){n.close()}),s),r.ctn.onclick=function(e){var t=e.target||e.srcElement;t.classList.contains("el-icon-close")?n.close():i.onClick&&i.onClick(t)},r.ctn.addEventListener("mouseenter",(function(){!r.await&&r.timer.pause()}),!1),r.ctn.addEventListener("mouseleave",(function(){!r.await&&r.timer.continued()}),!1)},close:function(e){r.close&&(r.await=!0,r.ctn.classList.add("el-notification-fade-leave-active"),r.timer.clear(),setTimeout((function(){t.removeChild(r.ctn),!e&&i.onClose&&i.onClose()}),200),delete r.close)},pause:function(){r.await=!0,r.timer.pause()},recover:function(){r.timer.continued(),r.await=!1}},i.autoOpen&&this.open(),this},baseLayer:function(e){var t=e.html||'<div class="kmbbase-wrap"></div>',n=e.moudelClass?" "+e.moudelClass:"",r=e.container||document.body,s=e.name||"",a=e.id||i.Guid("k");return function(){var i,l,c=(i=r,(l=function(){var r,l,c=this.Wrap=(r=document.createElement("div"),l="k"+a+n,r.className="kmb-popmd-e3d8 "+l,r.style.cssText="position:absolute;display:none;",r.innerHTML=t,r),d=e.cover?this.parent=o(e).appendChild(c).parentNode:c;i.appendChild(d),this.el=this.Wrap.firstElementChild||this.Wrap,this.container=d,this.parent=this.parent||i,this.id=a,this.name=s,d.onclick=function(t){t.target||t.srcElement,e.click&&e.click(t)},this.open()}).prototype={open:function(){this.Wrap.style.display="block",this.show=!0},close:function(){this.Wrap.style.display="none",this.show=!1,e.close&&e.close()},remove:function(t){this.Wrap.remove(),this.show=!1,i!==this.parent&&!this.parent.firstElementChild&&i.removeChild(this.parent),e.close&&e.close(t)},setStyle:function(e,t){Object.assign((e||this.Wrap).style,t)}},new l);return this.prototype={},e.onload&&e.onload(c),c}.call((function(){}))},popWindow:function(e){e=e||{};var t=this.baseLayer(e);e.pointer&&a(t.Wrap,e.pointer),e.closeButton&&(e.closeEvent=!0)&&l(t.Wrap,e.closeButton);var i=e.click;return e.click=function(n){var r=n.target||n.srcElement;i&&i(r),e.closeEvent&&r.classList.contains("close")&&t.remove(n)},t},checkListRender:function(e){var t=(e=e||{}).list||[],n=e.select||[],r=e.type||"radio",s="radio"===r?'name="'+i.Guid("k")+'" ':"",o="",a=(document.createElement("div"),function(e){for(var t of n)return e===t});for(var l of t){var c=l[e.name||"name"],d=l[e.value||"value"];o+='<dd><label style="display:flex;user-select:none;cursor:pointer;"><span style="display:flex;"><input type="'+r+'" '+(a(d)?'checked="true"':"")+' value="'+d+'" '+s+' data-name="'+c+'"></span><span class="el-'+r+'__label"><span>'+c+"</span></span></label></dd>"}return'<div class="kmb-checkbox" style="position:relative;height:100%;"><dl class="scrolling4">'+o+"</dl></div>"},selectRender:function(e,t,i){for(var n=t.length,r="",s=0;s<n;s++){var o=t[s];r+='<option value="'+o[i.value||"value"]+'" data-index="'+s+'">'+o[i.name||"name"]+"</option>"}return i.onchange&&(e.onchange=function(e){var t=(e.target||e.srcElement).selectedOptions[0];i.onchange(t.value,t)}),e.innerHTML=r,i.onload&&i.onload(e.options[0]&&e.options[0].value),e},progressBar:function(t){t=t||{};var i=this;return e.UI.popWindow({name:"div_1",html:'<div class="progress" style="width:7rem;"><div class="progress-bar" style="width:0%">0</div></div>',onload:function(e){var n=s.getStyleSheet("progressStyle",e.Wrap);s.setStyleSheet(".progress","position:relative;height:15px;line-height:14px;border-radius:20px;box-sizing:content-box;color:#fff;font-size:12px;text-align:center;user-select:none;",0,n),s.setStyleSheet(".progress .progress-bar","animation:reverse progress-bar-stripes 0.80s linear infinite,animate-positive 1s;border-radius:20px;background-color:#5bc0de;background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-size:40px 40px;height:100%;transition:width .3s ease;",1,n),s.setStyleSheet("@keyframes progress-bar-stripes","from{background-position:40px 0}to{background-position:0 0}",2,n),s.setStyleSheet("@keyframes animate-positive","0%{width:0}",3,n),e.setStyle(e.Wrap,t);var r=e.el.firstElementChild;e.setValue=function(e){r.innerText=e+"%",r.style.width=e+"%"},i.model=e}}),i.model},loading:function(e){var t=(e=e||{}).timer||0,n=e.zIndex||1e3,o=e.container||document.body,a=o.dataset.loaderid||i.Guid(),l="loadingUI_"+a+(e.id||""),c=r[l];return c?(c.clearTimer(),t&&c.timeout(t),c.res):(o.dataset.loaderid=a,s.setStyleSheets(s.getRegistStyle("loader")),c=r[l]={id:l,layer:this.baseLayer({closeEvent:!0,container:o,html:'<div class="kim-loader" style="position:absolute;top:50%;left:50%;height:80px;width:80px;margin:-40px 0 0 -40px;display:flex;justify-content:center;align-items:center;"></div>',onload:function(e){e.setStyle(e.Wrap,{top:0,left:0,height:"100%",width:"100%",backgroundColor:"rgba(0,0,0, .5)",zIndex:n})}}),timeout:function(e){this.timerId=setTimeout(()=>{this.layer.remove(),delete r[l]},e)},clearTimer:function(e){delete r[l],this.timerId&&clearTimeout(this.timerId)}},t&&c.timeout(t),c.res={close:function(){c.clearTimer(),c.layer.remove()}})},pointCharts:function(t){var i=function(t){var i=t.chartsBox;return this.pictureArea=i.firstElementChild,this.pointsLayer=i.lastElementChild,this.pointsCtn=this.pointsLayer.firstElementChild,this.itemClick=t.itemClick,this.pointsCtn.innerHTML="",this.layoutWidth=e.parseWpx(t.width),this.layoutHeight=e.parseWpx(t.height),this.isRelieveAlarm=t.isRelieveAlarm||!1,this};return i.prototype={init:function(e,t,i){this.setBackground(i).then(()=>{}),this.createPoints(t,e)},setBackground:function(e){return new Promise((t,i)=>{if(e){var n=this.pictureArea.firstElementChild;n.src=e,n.style.cssText="height:100%;width:100%;",this.pictureArea.classList.add("show"),this.pointsLayer.classList.add("show"),n.onload=function(){t()}}else this.pictureArea.classList.remove("show"),this.pointsLayer.classList.remove("show")})},createPoint:function(t,i){var n=i.height,r=i.width,s=this.layoutWidth/r,o=this.layoutHeight/n,a=t.name||"",l=t.infoseat||"up",c=document.createElement("li"),d=t.guid||e.getGuid();c.className=t.type,c.dataset.id=d,c.style.diesplay="none",c.style.top=e.parseRem(t.y*o)+"rem",c.style.left=e.parseRem(t.x*s)+"rem",c.style.width=e.parseRem(t.width)+"rem",c.style.height=e.parseRem(t.height)+"rem",c.innerHTML='<i style="transform:rotate('+~~t.angle+'deg)"></i><div class="'+l+'"><div class="text"><h4>'+a+"</h4><dl></dl></div></div>",this.pointsCtn.appendChild(c),t.guid=d;var u={config:t,element:c};this.setBindAttr(u,c.lastElementChild),u.items=t.items||[]},createPoints:function(e,t){for(var i of e)this.createPoint(i,t)},switchActive:function(e){var t=this.mouseInfo;t.target&&t.target.classList.remove("active"),e.classList.add("active"),t.target=e;var i=e.dataset.id;n.focusPoint=this.pointList[i],n.form2.monitorValues=n.focusPoint.values||[]},cancelActive:function(){var e=this.mouseInfo;e.target&&e.target.classList.remove("active"),n.focusPoint={},n.form2.monitorValues=[]},setBindAttr:function(e,t){var i=this,n=t.firstElementChild.lastElementChild;Object.defineProperty(e,"items",{set:function(t){var r="",s=[];for(var o of t){var a=i.getAlarmlevel(o.alarmlevel),l=o.state?"offline":"online",c=a.icon||(o.state?"el-icon-remove-outline":"el-icon-check"),d=(a.level||l)+" "+c,u=o.id||o.value,h=o.alarmlevel&&i.isRelieveAlarm?'<a class="relieve el-icon-close-notification"></a>':"";r+='<dd class="'+d+'" data-id="'+u+'" style="animation:'+a.level+" "+a.freq+'ms infinite;">'+o.name+h+"</dd>",s.push(u)}n.innerHTML=r,e.values=s}}),n.onclick=function(e){var t=e.target||e.srcElement;t.classList.contains("relieve")&&i.itemClick&&i.itemClick(t.parentNode.dataset.id)}},getAlarmlevel:function(e){var t="",i="",n=0;switch(e){case 1:t="red",i="el-icon-info",n=2e3;break;case 2:t="orange",i="el-icon-info",n=2500;break;case 3:t="yellow",i="el-icon-info",n=3e3;break;case 4:t="blue",i="el-icon-info",n=3500}return{level:t,icon:i,freq:n}}},new i(t)},singleViewSeamlessScroll:function(t,i){if(!(t="string"==typeof t?document.getElementById(t):t))return console.log("%c sliderPlate Error Element is a invalid param! ","color:red");var n=function(t){var i=t.firstElementChild.firstElementChild,n=0,r=this.list=i.children,s=this.listnum=r.length;r[n].className="is-animating scroll-in";var o=new e.Async.timerCtrl(5e3,"timerA");s>1&&o((function(){var e=n,t=++n,i=e?e-1:s-1;n=t%s;var o,a=r[e],l=r[i],c=r[n];l&&l.classList.contains("is-animating")&&(l.classList.remove("scroll-in"),l.classList.add("scroll-out"),o=l,setTimeout(()=>{o.className=""},800)),a.classList.add("scroll-in"),setTimeout(()=>{c.classList.add("is-animating")},1e3)}))};return n.prototype={update:function(){}},new n(t)},timeAxis:function(t,n){var r=document.getElementById("canvas"),s=r.getContext("2d"),o=this.ctnWidth=t.offsetWidth,a=2*o;r.width=a,r.height=132,r.style.width=o+"px",r.style.height="66px";var l=a,c=l-60+30;s.lineHeight=2,s.font="normal 18px Arial";var d=function(){var e=this;this.dpr=2,this.cacheX=0,this.destX=0,this.mediaAxisHeight=40,this.playMark=0,this.spareDist=108,this.ctxWidth=l,s.clearRect(0,0,l,2),this.duration=86400,this.timestamp=(new Date).getTime()-1e3*this.duration,this.drawReferLine(l),this.registerEvent(),setTimeout((function(){n.onload&&n.onload.call(e)}),30)};return d.prototype={init:function(e){var t=n.setZoomValue&&n.setZoomValue()||600,i=24*this.duration/2/t;this.timeRange=2*i,this.markSumWidth=this.timeRange+this.spareDist,this.zoomValue=t,this.rulerDist=t/24,this.ruler=this.getRulerGrade(t),this.mediaLineWidth=Math.ceil(this.ruler.dist/t),this.draw(e,!0),n.onresize&&n.onresize(this,l);var r=this;window.onresize=function(){r.setCtxWidth()}},setData:function(e){if(e){var t=e.param.dist;this.axis=e.axis,this.axisDev=e.param.dev,this.duration=t%2?t+1:t,this.timestamp=1e3*e.param.startstamp,this.init(this.cacheX)}},clearData:function(){this.removePlayMark(),delete this.axis,this.draw()},drawReferLine:function(e){s.beginPath(),s.moveTo(0,0),s.lineTo(e,0),s.lineWidth=4,s.strokeStyle="#8b8b8b",s.stroke()},getRulerGrade:function(e){var t=n.setSuitedSpan&&n.setSuitedSpan(e,e)||8;return{minMark:12,maxMark:24,unitNum:t,spanDist:24*t,dist:24}},setRulerGrade:function(e){this.init(this.cacheX)},setCtxWidth:function(){var e=2*t.offsetWidth;this.ctxWidth!==e&&(l=e,r.width=l,r.style.width=t.offsetWidth+"px",c=l-60+30,s.clearRect(0,0,l,r.height),this.drawReferLine(l),this.setRulerGrade(),this.ctxWidth=l)},getTextWidth:function(e){return s.measureText(e).width},drawRulerText:function(e,t,n,r,o,a){r=r||18,s.font="normal "+r+"px Arial",s.fillStyle=o||"red";var l=a?"yyyy-":"",c=n*this.rulerDist*1e3+this.timestamp,d=i.Dates(new Date(c)).format(l+"MM-dd HH:mm:ss"),u=e-this.getTextWidth(d)/2;s.fillText(d,u,2*t)},setPlayMark:function(e){this.playMark=e},removePlayMark:function(){this.playMark=0},startPlay:function(e,t){var r=~~(e/(this.ruler.dist/this.zoomValue)),s=this.axis;if(s&&s[r]){this.setPlayMark(e);for(var o=this.timestamp+1e3*r,a=i.Dates(new Date(o)).format("yyyy-MM-dd HH:mm:ss");s[r];)r++;var l=this.timestamp+1e3*r;n.onFilePlay&&n.onFilePlay(o/1e3,l,a,t)}},draw:function(e,t){e=~~e;var i=this.markSumWidth,o=Math.abs(this.timeRange-(0-e));s.clearRect(0,1,l,r.height),this.drawMediaLiner(c);var a=0;e<0?(a=e<-60?-e-60-30:0,i=o>c?c-e:o-e):i=o>c?c-e:this.timeRange-e;for(var d=this.ruler,u=d.dist/this.zoomValue,h=a;h<i+1;h++){var m=h+60+e;if(h%d.dist==0){var f,p=(b=m+0)+0;h%(d.unitNum*d.dist)==0?(f=d.maxMark,this.drawRulerText(p,22,h,0,"#D6D6D6")):f=d.minMark,s.beginPath(),s.moveTo(p,4),s.lineTo(p,f),s.lineWidth=2,s.strokeStyle="#C7C7C7",s.stroke()}var v=this.mediaLineWidth;if(h%v==0&&h<i-2){var g=(u<1?1:v)/u,y=this.axis;if(y&&y[~~(h*g/v)]){var b=m+v/2;s.beginPath(),s.moveTo(b,80),s.lineTo(b,80+this.mediaAxisHeight),s.lineWidth=v,s.strokeStyle="green",s.stroke()}}}var x=this.playMark;x&&x>a&&x<i&&this.drawPlayMark(x+60+e),n.onscrollmove&&!t&&n.onscrollmove(e)},drawMediaLiner:function(e){s.beginPath(),s.moveTo(0,100),s.lineTo(e+60,100),s.lineWidth=this.mediaAxisHeight,s.strokeStyle="#3b4558",s.stroke()},drawPlayMark:function(e){s.beginPath(),s.moveTo(e,80),s.lineTo(e,120),s.lineWidth=2,s.strokeStyle="#26A7CB",s.stroke()},eventTrigger:function(e,t,i){t=2*(t-3);var n=(e*=2)-this.cacheX-60;t>80&&t<80+this.mediaAxisHeight&&n>-1&&n<this.timeRange&&(this.startPlay(n,i),this.draw(this.cacheX))},registerEvent:function(){var t=this,i=!1,o=e.Event.eventRegister({eventEl:r,disc:"x",event:!0,start:function(e){i=!0,t.destX=0},move:function(e){if(i){if(t.destX=2*e.destX,(n=~~(t.cacheX+t.destX))>0)o.sX=e.pageX,t.cacheX=t.destX=n=0;else if(n-t.ctxWidth<=-t.markSumWidth)return t.destX=0,o.sX=e.pageX,t.cacheX=-t.markSumWidth+t.ctxWidth;t.draw(n)}else{var n,r=2*(e.offsetY-3),a=(n=2*e.offsetX)-t.cacheX-60;s.clearRect(0,55,t.ctxWidth,20),r>80&&r<80+t.mediaAxisHeight&&a>-1&&a<t.timeRange&&t.drawRulerText(n,35,a,18,"#F3F3F3",!0)}},end:function(e){i&&(i=!1,t.cacheX+=t.destX)},dblclick:function(e){t.eventTrigger(e.offsetX,e.offsetY,2)},click:function(e){t.eventTrigger(e.offsetX,e.offsetY,1)}});r.onmousewheel=function(e){var t=e.wheelDelta/Math.abs(e.wheelDelta);n.onmousewheel&&n.onmousewheel(t)}}},new d}}),e.UI=this},new function(){var t=e.Async||this;t.__proto__={intervalLoop:function(e,t,i){var n=function(e,t,i){t&&t(),this.timer=setInterval((function(){i?i():t()}),e||3e3)};return n.prototype={clear:function(){clearInterval(this.timer)}},"function"==typeof t?new n(e,t,i):console.log("intervalLoop param must contain function")},timeout:function(e,t){return t=t||3e3,new function(){var i,n,r;return this.__proto__={start:function(t){n=(new Date).getTime(),i=setTimeout((function(){t=n=r=0,e&&e()}),t)},pause:function(){ //!pauseTime && (pauseTime = new Date().getTime());this.clear() r=(new Date).getTime(),this.clear()},continued:function(e){t-=r-n,r&&t>0&&this.start(e||t)},clear:function(){clearTimeout(i)}},this.start(t),this}},randomRuntimer:function(t,i){if("randomRuntimer"!==this.constructor.name)return Error("Please instance this object first");let n={getDefaultTime:function(){return 1e3*(4+~~(6*Math.random()+1))},nowCallback:!1,firstTimer:null},r=(i=i||n).firstTimer||n.getDefaultTime(),s=e.Async.timeoutFilter(5e3),o=new e.Async.timerCtrl(r,"timerA");return o((function(){o.stop();let e=n.getDefaultTime(),i=t&&t(e);!1!==i&&o.setTime(i||e)})),i.nowCallback&&o.start(!0),this.run=function(){o.stop(),s((function(){o.setTime(getDefaultTime())}))},this}}},new function(){var t=e.Vue||this;t.__proto__={onEventInfos:function(e){var t=this.toString.$state._vm,i=t.$root.constructor;i.config.errorHandler=function(n,r){t.$nextTick(()=>{var t=r.$el._prevClass,i=[];if(t.match("el-select"))if(r.selected[0])for(var n of r.selected)i.push({name:n.label,value:n.value});else i={name:r.selectedLabel,value:r.value};else if(t.match("el-radio-group")){var s=r.$children;for(var o of s)o.$el.ariaChecked&&(i={name:o.$el.innerText,value:r.value})}else if(t.match("el-checkbox-group")){s=r.$children;for(var o of s)o.isChecked&&i.push({name:o.$el.innerText,value:o.label})}e&&e.call(this,r.value,i,r.hoverIndex)}),i.config.errorHandler=null}.bind(this);var n=new Promise((function(e,t){}));return n.catch=function(e,t,i){e(Error)},n},renderTo:function(e){var t=window.__VUE_HOT_MAP__,i=(this.toString.$state||{})._vm||this;return new(i&&i.$root?i.$root.constructor:t[Object.keys(t)[0]].Ctor.super)({el:e.el,data:e.data,render:function(t){var i=this,n=i._self._c,r=e.attrs;r="function"==typeof r?r.call(i._self):Object.assign({},r);var s={style:e.style,attrs:r,on:{change:e.change||""},model:{value:i._self[e.datakey||e.value],callback:function(t){i.$set(i._self,e.value,t)}}};return n(e.name,s)}})}},e.Vue=t},new function(){var t=e.Event||this;t.__proto__={eventRegister:function(e){var t,i,n,r=e.eventEl,s=!e.event,o=function(e,t){r.addEventListener(e,t,!1)},a=function(e,t){r.removeEventListener(e,t,!1)},l=function(){this.eventHandler=function(e){return this.eventTrigger=function(){o("mousemove",e),o("mouseup",e),o("mouseleave",e)},this.eventRemove=function(){a("mousemove",e),a("mouseup",e),a("mouseleave",e)},this.addEvent=function(){o("mousedown",e)},this.removeEvent=function(){a("mousedown",e)},this}.call({},this),this.eventHandler.addEvent(),e.event&&this.eventHandler.eventTrigger()};return l.prototype={handleEvent:function(e){switch(e.type){case"mousedown":this.start(e);break;case"mousemove":this.move(e);break;case"mouseup":this.up(e);break;case"mouseout":case"mouseover":case"mouseleave":this.end(e)}},start:function(r){t=r.pageX,i=r.pageY,r.timeStamp-n<280&&this.sX===t&&this.sY===i?(this.isDb=!this.isDb,clearTimeout(this.timeout),e.dblclick&&e.dblclick(r)):e.start&&e.start(r),this.sX=t,this.sY=i,n=r.timeStamp,!e.event&&this.eventHandler.eventTrigger()||(s=!0)},move:function(t){s&&(e.disc?"y"===e.disc?t.destY=t.pageY-this.sY:t.destX=t.pageX-this.sX:(t.destX=t.pageX-this.sX,t.destY=t.pageY-this.sY)),e.move&&e.move(t)},end:function(t){e.end&&e.end(t),!e.event&&this.eventHandler.eventRemove()||(s=!1)},up:function(t){var i=this;!(e.mouseup&&e.mouseup(t))&&this.end(t),e.click&&"mouseup"===t.type&&t.timeStamp-n<180&&this.sX===t.pageX&&this.sY===t.pageY&&(clearTimeout(this.timeout),this.timeout=setTimeout((function(){i.isDb?i.isDb=!i.isDb:e.click(t)}),150))}},new l}},e.Event=t};const i=new function(){var t=e.Utils||this;return t.__proto__={generateMixed:function(e){for(var t=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],i="",n=0;n<e;n++){i+=t[Math.ceil(35*Math.random())]}return i},Dates:function(e){return{format:function(t){var i=e?new Date(e):new Date,n={"M+":i.getMonth()+1,"d+":i.getDate(),"h+":i.getHours()%12==0?12:i.getHours()%12,"H+":i.getHours(),"m+":i.getMinutes(),"s+":i.getSeconds(),"q+":Math.floor((i.getMonth()+3)/3),S:i.getMilliseconds()};for(var r in/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(i.getFullYear()+"").substr(4-RegExp.$1.length))),/(E+)/.test(t)&&(t=t.replace(RegExp.$1,(RegExp.$1.length>1?RegExp.$1.length>2?"星期":"周":"")+{0:"日",1:"一",2:"二",3:"三",4:"四",5:"五",6:"六"}[i.getDay()+""])),n)new RegExp("("+r+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?n[r]:("00"+n[r]).substr((""+n[r]).length)));return t},getDayStamp:function(){return{start:new Date((new Date).toLocaleDateString()).getTime()/1e3,end:~~((new Date).getTime()/1e3)}}}},arrayToJsonDict:function(e,t,i){var n={};if(e[0]&&e.push)for(var r of e)n[r[t||"id"]]=i&&r[i]||r;return n},imageToBase64:function(e,t,i){var n=function(e,t){var i=new Image;i.src=e,i.crossOrigin="*",i.onerror=function(){new Error("图片加载失败")},i.onload=function(){var e=i.width,n=i.height;return t(function(e,t,i){var n=document.createElement("canvas");n.width=t,n.height=i;var r=n.getContext("2d");r.fillStyle="transparent",r.fillRect(0,0,t,i),r.drawImage(e,0,0,t,i);var s={};return s.base64=n.toDataURL("image/jpeg",.7),s.base64Len=s.base64.length,n=null,s}(i,e,n),i=null)}},r=e&&e.files[0];return new Promise((i,s)=>{if(!(r.name.indexOf(".jpg")>0||r.name.indexOf(".png")>0))return e.value="",s({type:4,msg:"图片文件类型不正确!"});var o="string"==typeof r?r:URL.createObjectURL(r);n(o,(function(e){return e.base64Len?t&&t(e)||i(e):s(e)}))})},strAverageCut:function(e,t){for(var i=e.length,n=~~(i/(t=(t>i?i:t)||1)),r=i%t,s=[],o=0,a=0;a<t;a++){var l=n+~~(a<r);s[a]=e.substr(o,l),o+=l}return s},getRandomColor:function(e){for(var t=this.strAverageCut(e,3),i=0,n=t.length;i<n;i++)t[i]=(parseInt(t[i],16)>>16&255)/255;return t}},t}}(qf)}]);