7 lines
118 KiB
JavaScript
7 lines
118 KiB
JavaScript
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=16)}([function(e,t,n){"use strict";n.d(t,"n",(function(){return i})),n.d(t,"m",(function(){return o})),n.d(t,"s",(function(){return s})),n.d(t,"k",(function(){return a})),n.d(t,"l",(function(){return l})),n.d(t,"o",(function(){return p})),n.d(t,"r",(function(){return u})),n.d(t,"j",(function(){return d})),n.d(t,"i",(function(){return h})),n.d(t,"h",(function(){return m})),n.d(t,"p",(function(){return f})),n.d(t,"d",(function(){return b})),n.d(t,"f",(function(){return v})),n.d(t,"g",(function(){return g})),n.d(t,"q",(function(){return y})),n.d(t,"c",(function(){return E})),n.d(t,"a",(function(){return w})),n.d(t,"b",(function(){return M})),n.d(t,"t",(function(){return C})),n.d(t,"e",(function(){return k}));n(11),n(4),n(5),n(14);var r=function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function i(e,t){return"number"==typeof e?e:"string"==typeof e&&e.length>0&&!isNaN(parseInt(e))?parseInt(e):t}function o(e,t){return"number"==typeof e?e:"string"==typeof e&&e.length>0&&!isNaN(parseFloat(e))?parseFloat(e):t}function s(e){return null==e||0===e.length}function a(e,t){return"string"==typeof e&&e.length>0?e:t}function l(e){return"boolean"==typeof e?e:"number"==typeof e?e>0:"string"==typeof e&&("1"===e||"true"===e)}function c(e,t,n){void 0===n&&(n=" "),"number"==typeof e&&(e=""+e),"number"==typeof n&&(n=""+n);var r=t-e.length;if(0===r)return e;if(r<0)return e.substr(Math.abs(r));if(r===n.length)return""+n+e;if(r<n.length)return""+n.substring(0,r)+e;for(var i=Math.floor(r/n.length),o=r-n.length*i,s="",a=0;a<i;a++)s+=n;return 0===o?""+s+e:""+s+n.substring(0,o)+e}function p(e){return{x:i(e.x,0),y:i(e.y,0)}}function u(e){if(null==e.width||isNaN(parseInt(e.width))||null==e.height||isNaN(parseInt(e.height)))throw new TypeError("invalid size.");return{width:parseInt(e.width),height:parseInt(e.height)}}function d(e){return r({moduleId:i(e.moduleId,null),moduleName:a(e.moduleName,null),moduleDescription:a(e.moduleDescription,null),moduleDisabled:l(e.moduleDisabled)},function(e){var t={agentId:i(e.agentId,null),agentName:a(e.agentName,null),agentAlias:a(e.agentAlias,null),agentDescription:a(e.agentDescription,null),agentAddress:a(e.agentAddress,null),agentDisabled:l(e.agentDisabled)};return null!=e.metaconsoleId?r({metaconsoleId:e.metaconsoleId},t):t}(e))}function h(e){var t={linkedLayoutStatusType:"default"};switch(e.linkedLayoutStatusType){case"weight":var n=i(e.linkedLayoutStatusTypeWeight,null);if(null==n)throw new TypeError("invalid status calculation properties.");e.linkedLayoutStatusTypeWeight&&(t={linkedLayoutStatusType:"weight",linkedLayoutStatusTypeWeight:n});break;case"service":var o=i(e.linkedLayoutStatusTypeWarningThreshold,null),s=i(e.linkedLayoutStatusTypeCriticalThreshold,null);if(null==o||null==s)throw new TypeError("invalid status calculation properties.");t={linkedLayoutStatusType:"service",linkedLayoutStatusTypeWarningThreshold:o,linkedLayoutStatusTypeCriticalThreshold:s}}return r({linkedLayoutId:i(e.linkedLayoutId,null),linkedLayoutNodeId:i(e.linkedLayoutNodeId,null)},t)}function m(e){var t,n,r=(t=e.receivedAt,n=null,t instanceof Date?t:"number"==typeof t?new Date(1e3*t):"string"!=typeof t||Number.isNaN(new Date(t).getTime())?n:new Date(t));if(null===r)throw new TypeError("invalid meta structure");var i=null;return e.error instanceof Error?i=e.error:"string"==typeof e.error&&(i=new Error(e.error)),{receivedAt:r,error:i,editMode:l(e.editMode),maintenanceMode:l(e.maintenanceMode),isFromCache:l(e.isFromCache),isFetching:!1,isUpdating:!1,isBeingMoved:!1,isBeingResized:!1,isSelected:!1,lineMode:!1}}function f(e,t){var n=e+": "+t+";";return["-webkit-"+n,"-moz-"+n,"-ms-"+n,"-o-"+n,""+n]}function b(e){return decodeURIComponent(escape(window.atob(e)))}function v(e,t){if(void 0===t&&(t=null),t&&Intl&&Intl.DateTimeFormat){return Intl.DateTimeFormat(t,{day:"2-digit",month:"2-digit",year:"numeric"}).format(e)}return c(e.getDate(),2,0)+"/"+c(e.getMonth()+1,2,0)+"/"+c(e.getFullYear(),4,0)}function g(e){return c(e.getHours(),2,0)+":"+c(e.getMinutes(),2,0)+":"+c(e.getSeconds(),2,0)}function y(e,t){return e.reduce((function(e,t){var n=t.macro,r=t.value;return e.replace(n,r)}),t)}function _(e,t){var n=0;return function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var o=Date.now();if(!(o-n<e))return n=o,t.apply(void 0,r)}}function E(e,t){var n=null;return function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];null!==n&&window.clearTimeout(n),n=window.setTimeout((function(){t.apply(void 0,r),n=null}),e)}}function O(e,t){for(var n=0,r=0;e&&!Number.isNaN(e.offsetLeft)&&!Number.isNaN(e.offsetTop)&&e!==t;)n+=e.offsetLeft-e.scrollLeft,r+=e.offsetTop-e.scrollTop,e=e.offsetParent;return{top:r,left:n}}function w(e,t,n){var r=n||e.parentElement,i=e.draggable,o=0,s=0,a=0,l=0,c=0,p=0,u=r.getBoundingClientRect(),d=O(r),h=d.top,m=h+u.height,f=d.left,b=f+u.width,v=e.getBoundingClientRect(),g=window.getComputedStyle(e).borderWidth||"0",y=2*Number.parseInt(g),w=E(32,t),M=_(16,t),C=function(e){var t=0,n=0,r=e.pageX,i=e.pageY,d=r-a,g=i-l,_=u.width-v.width+y,E=u.height-v.height+y,O=r<f||0===o&&d>0&&r<f+c,C=r>b||d+o+v.width-y>u.width||o===_&&d<0&&r>f+_+c,k=i<h||0===s&&g>0&&i<h+p,x=i>m||g+s+v.height-y>u.height||s===E&&g<0&&i>h+E+p;(t=O?0:C?_:d+o)<0&&(t=0),(n=k?0:x?E:g+s)<0&&(n=0),a=r,l=i,t===o&&n===s||(M(t,n),w(t,n),o=t,s=n)},k=function(){o=0,s=0,a=0,l=0,document.removeEventListener("mousemove",C),document.removeEventListener("mouseup",k),e.draggable=i,document.body.style.userSelect="auto"},x=function(t){if(2!==t.button){t.stopPropagation(),e.draggable=!1,e.setAttribute("ondragstart","return false;"),e.setAttribute("draggable","false");var n=O(e,r);o=n.left,s=n.top,a=t.pageX,l=t.pageY,c=t.offsetX,p=t.offsetY,u=r.getBoundingClientRect(),d=O(r),h=d.top,m=h+u.height,f=d.left,b=f+u.width,v=e.getBoundingClientRect(),g=window.getComputedStyle(e).borderWidth||"0",y=2*Number.parseInt(g),document.addEventListener("mousemove",C),document.addEventListener("mouseup",k),document.body.style.userSelect="none"}};return e.addEventListener("mousedown",x),function(){e.removeEventListener("mousedown",x),k()}}function M(e,t){var n=document.createElement("div");n.className="resize-draggable",e.appendChild(n);var r=e.parentElement,i=e.draggable,o=0,s=0,a=0,l=0,c=0,p=r.getBoundingClientRect(),u=O(r),d=u.top,h=d+p.height,m=u.left,f=m+p.width,b=O(e),v=b.top,g=b.left,y=window.getComputedStyle(e).borderWidth||"0",w=Number.parseInt(y),M=E(32,t),C=_(16,t),k=function(e){var t=o+(e.pageX-a),n=s+(e.pageY-l);t===o&&n===s||t<o&&e.pageX>g+(o-c)||(t<15?t=15:t+g-w/2>=f&&(t=f-g),n<15?n=15:n+v-w/2>=h&&(n=h-v),C(t,n),M(t,n),o=t,s=n,a=e.pageX,l=e.pageY)},x=function(){o=0,s=0,a=0,l=0,c=0,0,document.removeEventListener("mousemove",k),document.removeEventListener("mouseup",x),e.draggable=i,document.body.style.userSelect="auto"};return n.addEventListener("mousedown",(function(t){t.stopPropagation(),e.draggable=!1;var n=e.getBoundingClientRect(),i=n.width,y=n.height;o=i,s=y,a=t.pageX,l=t.pageY,c=t.offsetX,t.offsetY,p=r.getBoundingClientRect(),u=O(r),d=u.top,h=d+p.height,m=u.left,f=m+p.width,b=O(e),v=b.top,g=b.left,document.addEventListener("mousemove",k),document.addEventListener("mouseup",x),document.body.style.userSelect="none"})),function(){n.remove(),x()}}function C(e){return e}function k(e,t,n){return void 0===t&&(t=140),void 0===n&&(n="…"),e.trim().length>t?e.substr(0,t).trim()+n:e}},function(e,t,n){"use strict";n.d(t,"b",(function(){return l}));var r=n(0),i=n(2),o=n(3),s=function(){return(s=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},a=function(e){switch(e){case"up":case"right":case"down":case"left":return e;default:return"down"}};function l(e){if(null==e.id||isNaN(parseInt(e.id)))throw new TypeError("invalid id.");if(null==e.type||isNaN(parseInt(e.type)))throw new TypeError("invalid type.");return s(s({id:parseInt(e.id),type:parseInt(e.type),label:Object(r.k)(e.label,null),labelPosition:a(e.labelPosition),isLinkEnabled:Object(r.l)(e.isLinkEnabled),link:Object(r.k)(e.link,null),isOnTop:Object(r.l)(e.isOnTop),parentId:Object(r.n)(e.parentId,null),aclGroupId:Object(r.n)(e.aclGroupId,null),cacheExpiration:Object(r.n)(e.cacheExpiration,null),colorStatus:Object(r.k)(e.colorStatus,"#CCC"),cellId:Object(r.n)(e.cellId,null)},Object(r.r)(e)),Object(r.o)(e))}var c=function(){function e(e,t,n){var o=this;void 0===n&&(n=!1),this.elementRef=document.createElement("div"),this.labelElementRef=document.createElement("div"),this.childElementRef=document.createElement("div"),this.clickEventManager=new i.a,this.dblClickEventManager=new i.a,this.movedEventManager=new i.a,this.movementFinishedEventManager=new i.a,this.resizedEventManager=new i.a,this.resizeFinishedEventManager=new i.a,this.removeEventManager=new i.a,this.selectionChangedEventManager=new i.a,this.disposables=[],this.debouncedMovementSave=Object(r.c)(500,(function(e,t){o._metadata.isBeingMoved=!1;var n={x:o.props.x,y:o.props.y},r={x:e,y:t};o.positionChanged(n,r)&&(o.move(e,t),o.movementFinishedEventManager.emit({item:o,prevPosition:n,newPosition:r}))})),this.removeMovement=null,this.debouncedResizementSave=Object(r.c)(500,(function(e,t){o._metadata.isBeingResized=!1;var n={width:o.props.width,height:o.props.height},r={width:e,height:t};o.sizeChanged(n,r)&&(o.resize(e,t),o.resizeFinishedEventManager.emit({item:o,prevSize:n,newSize:r}))})),this.removeResizement=null,this.itemProps=e,this._metadata=t,n||this.init()}return e.prototype.initMovementListener=function(e){var t=this;13!=this.props.type&&21!=this.props.type&&(this.removeMovement=Object(r.a)(e,(function(e,n){var r={x:t.props.x,y:t.props.y},i={x:e,y:n};t.meta=s(s({},t.meta),{isSelected:!0}),t.positionChanged(r,i)&&(t._metadata.isBeingMoved=!0,t.moveElement(e,n),t.movedEventManager.emit({item:t,prevPosition:r,newPosition:i}),t.debouncedMovementSave(e,n))})))},e.prototype.stopMovementListener=function(){this.removeMovement&&(this.removeMovement(),this.removeMovement=null)},e.prototype.initResizementListener=function(e){var t=this;13!=this.props.type&&21!=this.props.type&&(this.removeResizement=Object(r.b)(e,(function(e,n){if(t._metadata.isBeingResized=!0,t.props.label&&t.props.label.length>0){var r=t.labelElementRef.getBoundingClientRect(),i=r.width,o=r.height;switch(t.props.labelPosition){case"up":case"down":n-=o;break;case"left":case"right":e-=i}}var s={width:t.props.width,height:t.props.height},a={width:e,height:n};t.sizeChanged(s,a)&&(t.resizeElement(e,n),t.resizedEventManager.emit({item:t,prevSize:s,newSize:a}),t.debouncedResizementSave(e,n))})))},e.prototype.stopResizementListener=function(){this.removeResizement&&(this.removeResizement(),this.removeResizement=null)},e.prototype.init=function(){this.elementRef=this.createContainerDomElement(),this.labelElementRef=this.createLabelDomElement(),this.childElementRef=this.createDomElement(),this.elementRef.appendChild(this.childElementRef),this.elementRef.appendChild(this.labelElementRef),this.resizeElement(this.itemProps.width,this.itemProps.height),this.changeLabelPosition(this.itemProps.labelPosition)},e.prototype.createContainerDomElement=function(){var e,t=this;return this.props.isLinkEnabled?(e=document.createElement("a"),this.props.link?e.href=this.props.link:e.className="textDecorationNone"):(e=document.createElement("div")).className="textDecorationNone",e.classList.add("visual-console-item"),this.props.isOnTop&&e.classList.add("is-on-top"),e.style.left=this.props.x+"px",e.style.top=this.props.y+"px",e.addEventListener("dblclick",(function(e){t.meta.isBeingMoved||t.meta.isBeingResized||(t.unSelectItem(),t.selectItem(),t.dblClickEventManager.emit({item:t,nativeEvent:e}))})),e.addEventListener("click",(function(e){if(t.meta.editMode)e.preventDefault(),e.stopPropagation();else if(t.itemProps.isLinkEnabled&&null!=t.itemProps.link){var n=document.createElement("div");n.className="div-visual-console-spinner";var r=document.createElement("div");r.className="visual-console-spinner",n.appendChild(r);for(var i=e.composedPath(),o="visual-console-container",s=0;s<i.length;s++){var a=i[s];if(null!=a.id&&null!=a.id&&""!=a.id&&!0===a.id.includes(o)){o=a.id;break}}var l=document.getElementById(o);null!=l&&(l.classList.add("is-updating"),l.appendChild(n))}t.meta.isBeingMoved||t.meta.isBeingResized||t.clickEventManager.emit({item:t,nativeEvent:e})})),this.meta.maintenanceMode&&e.classList.add("is-maintenance"),this.meta.editMode&&e.classList.add("is-editing"),this.meta.isFetching&&e.classList.add("is-fetching"),this.meta.isUpdating&&e.classList.add("is-updating"),this.meta.isSelected&&e.classList.add("is-selected"),e},e.prototype.createLabelDomElement=function(){var e=document.createElement("div");e.className="visual-console-item-label";var t=this.getLabelWithMacrosReplaced();if(t.length>0){var n=document.createElement("table"),r=document.createElement("tr"),i=document.createElement("tr"),o=document.createElement("tr"),s=document.createElement("td");switch(s.innerHTML=t,r.appendChild(s),n.appendChild(i),n.appendChild(r),n.appendChild(o),n.style.textAlign="center",this.props.labelPosition){case"up":case"down":this.props.width>0&&(n.style.width=this.props.width+"px",n.style.height="");break;case"left":case"right":this.props.height>0&&(n.style.width="",n.style.height=this.props.height+"px")}e.appendChild(n)}return e},e.prototype.getLabelWithMacrosReplaced=function(){var e=this.props;return Object(r.q)([{macro:"_date_",value:Object(r.f)(new Date)},{macro:"_time_",value:Object(r.g)(new Date)},{macro:"_agent_",value:null!=e.agentAlias?e.agentAlias:""},{macro:"_agentdescription_",value:null!=e.agentDescription?e.agentDescription:""},{macro:"_address_",value:null!=e.agentAddress?e.agentAddress:""},{macro:"_module_",value:null!=e.moduleName?e.moduleName:""},{macro:"_moduledescription_",value:null!=e.moduleDescription?e.moduleDescription:""}],this.props.label||"")},e.prototype.updateDomElement=function(e){e.innerHTML=this.createDomElement().innerHTML},Object.defineProperty(e.prototype,"props",{get:function(){return s({},this.itemProps)},set:function(e){this.setProps(e)},enumerable:!1,configurable:!0}),e.prototype.setProps=function(e){var t=this.props;this.itemProps=e,this.shouldBeUpdated(t,e)&&this.render(t,this._metadata)},Object.defineProperty(e.prototype,"meta",{get:function(){return s({},this._metadata)},set:function(e){this.setMeta(e)},enumerable:!1,configurable:!0}),e.prototype.setMeta=function(e){var t=this._metadata;this._metadata=s(s({},t),e),void 0!==e.isSelected&&t.isSelected!==e.isSelected&&this.selectionChangedEventManager.emit({selected:e.isSelected}),this.render(this.itemProps,t)},e.prototype.shouldBeUpdated=function(e,t){return e!==t},e.prototype.render=function(e,t){void 0===e&&(e=null),void 0===t&&(t=null),e&&!this.positionChanged(e,this.props)||(this.moveElement(this.props.x,this.props.y),this.updateDomElement(this.childElementRef)),e&&!this.sizeChanged(e,this.props)||(this.resizeElement(this.props.width,this.props.height),this.updateDomElement(this.childElementRef));var n=this.labelElementRef.innerHTML,r=this.createLabelDomElement().innerHTML;if(n!==r&&(this.labelElementRef.innerHTML=r),e&&e.labelPosition===this.props.labelPosition||this.changeLabelPosition(this.props.labelPosition),e&&e.isOnTop===this.props.isOnTop||(this.props.isOnTop?this.elementRef.classList.add("is-on-top"):this.elementRef.classList.remove("is-on-top")),e&&e.isLinkEnabled!==this.props.isLinkEnabled){var i=this.createContainerDomElement();i.innerHTML=this.elementRef.innerHTML;for(var o=this.elementRef.attributes,s=0;s<o.length;s++)if("id"!==o[s].nodeName){var a=this.elementRef.getAttributeNode(o[s].nodeName);null!==a&&i.setAttributeNode(a.cloneNode())}null!==this.elementRef.parentNode&&this.elementRef.parentNode.replaceChild(i,this.elementRef),this.elementRef=i}if(e&&this.props.isLinkEnabled&&e.link!==this.props.link&&null!==this.props.link&&this.elementRef.setAttribute("href",this.props.link),t&&t.editMode===this.meta.editMode&&t.maintenanceMode===this.meta.maintenanceMode||(this.meta.editMode&&!1===this.meta.maintenanceMode?this.elementRef.classList.add("is-editing"):this.elementRef.classList.remove("is-editing")),t&&t.isFetching===this.meta.isFetching||(this.meta.isFetching?this.elementRef.classList.add("is-fetching"):this.elementRef.classList.remove("is-fetching")),!t||t.isUpdating!==this.meta.isUpdating){if(this.meta.isUpdating){this.elementRef.classList.add("is-updating");var l=document.createElement("div");l.className="div-visual-console-spinner";var c=document.createElement("div");c.className="visual-console-spinner",l.appendChild(c),this.elementRef.appendChild(l)}else{this.elementRef.classList.remove("is-updating");var p=this.elementRef.querySelector(".div-visual-console-spinner");if(null!==p){var u=p.parentElement;null!==u&&u.removeChild(p)}}this.updateDomElement(this.childElementRef)}t&&t.isSelected===this.meta.isSelected||(this.meta.isSelected?this.elementRef.classList.add("is-selected"):this.elementRef.classList.remove("is-selected"))},e.prototype.remove=function(){this.removeEventManager.emit({item:this}),this.disposables.forEach((function(e){try{e.dispose()}catch(e){}})),this.elementRef.remove()},e.prototype.positionChanged=function(e,t){return e.x!==t.x||e.y!==t.y},e.prototype.changeLabelPosition=function(e){switch(e){case"up":this.elementRef.style.flexDirection="column-reverse";break;case"left":this.elementRef.style.flexDirection="row-reverse";break;case"right":this.elementRef.style.flexDirection="row";break;case"down":default:this.elementRef.style.flexDirection="column"}var t=this.labelElementRef.getElementsByTagName("table"),n=t.length>0?t.item(0):null;if(n)switch(this.props.labelPosition){case"up":case"down":this.props.width>0&&(n.style.width=this.props.width+"px",n.style.height="");break;case"left":case"right":this.props.height>0&&(n.style.width="",n.style.height=this.props.height+"px")}},e.prototype.moveElement=function(e,t){this.elementRef.style.left=e+"px",this.elementRef.style.top=t+"px"},e.prototype.move=function(e,t){this.moveElement(e,t),this.itemProps=s(s({},this.props),{x:e,y:t})},e.prototype.sizeChanged=function(e,t){return e.width!==t.width||e.height!==t.height},e.prototype.resizeElement=function(e,t){if(13!=this.props.type&&21!=this.props.type&&(this.childElementRef.style.width=e>0?e+"px":"",this.childElementRef.style.height=t>0?t+"px":""),this.props.label&&this.props.label.length>0){var n=this.labelElementRef.getElementsByTagName("table"),r=n.length>0?n.item(0):null;if(r)switch(this.props.labelPosition){case"up":case"down":r.style.width=e>0?e+"px":"";break;case"left":case"right":r.style.height=t>0?t+"px":""}}},e.prototype.resize=function(e,t){this.resizeElement(e,t),this.itemProps=s(s({},this.props),{width:e,height:t})},e.prototype.onClick=function(e){var t=this.clickEventManager.on(e);return this.disposables.push(t),t},e.prototype.onDblClick=function(e){var t=this.dblClickEventManager.on(e);return this.disposables.push(t),t},e.prototype.onMoved=function(e){var t=this.movedEventManager.on(e);return this.disposables.push(t),t},e.prototype.onMovementFinished=function(e){var t=this.movementFinishedEventManager.on(e);return this.disposables.push(t),t},e.prototype.onResized=function(e){var t=this.resizedEventManager.on(e);return this.disposables.push(t),t},e.prototype.onResizeFinished=function(e){var t=this.resizeFinishedEventManager.on(e);return this.disposables.push(t),t},e.prototype.onRemove=function(e){var t=this.removeEventManager.on(e);return this.disposables.push(t),t},e.prototype.onSelectionChanged=function(e){var t=this.selectionChangedEventManager.on(e);return this.disposables.push(t),t},e.prototype.selectItem=function(){this.meta=s(s({},this.meta),{isSelected:!0}),this.initMovementListener(this.elementRef),13!==this.props.type&&21!==this.props.type&&this.initResizementListener(this.elementRef)},e.prototype.unSelectItem=function(){this.meta=s(s({},this.meta),{isSelected:!1}),this.stopMovementListener(),13!==this.props.type&&this.stopResizementListener()},e.prototype.getFormContainer=function(){return e.getFormContainer(this.props)},e.getFormContainer=function(e){var t=e.type?function(e){var t="";switch(e){case 0:t=Object(r.t)("Static image");break;case 1:t=Object(r.t)("Module graph");break;case 2:t=Object(r.t)("Simple value");break;case 3:t=Object(r.t)("Percentile item");break;case 4:t=Object(r.t)("Label");break;case 5:t=Object(r.t)("Icon");break;case 6:case 7:case 8:t=Object(r.t)("Simple value");break;case 9:t=Object(r.t)("Percentile item");break;case 10:t=Object(r.t)("Service");break;case 11:t=Object(r.t)("Group");break;case 12:t=Object(r.t)("Box");break;case 13:t=Object(r.t)("Line");break;case 14:t=Object(r.t)("Event history graph");break;case 15:case 16:t=Object(r.t)("Percentile item");break;case 17:t=Object(r.t)("Serialized pie graph");break;case 18:t=Object(r.t)("Bars graph");break;case 19:t=Object(r.t)("Clock");break;case 20:t=Object(r.t)("Color cloud");break;case 21:t=Object(r.t)("Network link");break;case 22:t=Object(r.t)("Odometer");break;case 23:t=Object(r.t)("Basic chart");break;default:t=Object(r.t)("Item")}return t}(e.type):Object(r.t)("Item");return new o.FormContainer(t,[],[])},e}();t.a=c},function(e,t,n){"use strict";var r=function(){var e=this;this.listeners=[],this.listenersOncer=[],this.on=function(t){return e.listeners.push(t),{dispose:function(){return e.off(t)}}},this.once=function(t){e.listenersOncer.push(t)},this.off=function(t){var n=e.listeners.indexOf(t);n>-1&&e.listeners.splice(n,1)},this.emit=function(t){e.listeners.forEach((function(e){return e(t)})),e.listenersOncer.forEach((function(e){return e(t)})),e.listenersOncer=[]},this.pipe=function(t){return e.on((function(e){return t.emit(e)}))}};t.a=r},function(e,t,n){"use strict";n.r(t),n.d(t,"InputGroup",(function(){return s})),n.d(t,"FormContainer",(function(){return a}));var r=n(2),i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},o=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)r[i]=o[s];return r},s=function(){function e(e,t){this._name="",this.currentData={},this.dataRequestedEventManager=new r.a,this.name=e,this.initialData=t}return Object.defineProperty(e.prototype,"name",{get:function(){return this._name},set:function(e){if(0===e.length)throw new RangeError("empty name");this._name=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"data",{get:function(){return i({},this.currentData)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"element",{get:function(){if(null==this._element){var e=document.createElement("div");e.className="input-group input-group-"+this.name;var t=this.createContent();t instanceof Array?t.forEach(e.appendChild):e.appendChild(t),this._element=e}return this._element},enumerable:!1,configurable:!0}),e.prototype.reset=function(){this.currentData={}},e.prototype.updateData=function(e){this.currentData=i(i({},this.currentData),e)},e.prototype.requestData=function(e,t,n){this.dataRequestedEventManager.emit({identifier:e,params:t,done:n})},e.prototype.onDataRequested=function(e){return this.dataRequestedEventManager.on(e)},e}(),a=function(){function e(e,t,n){var i=this;void 0===t&&(t=[]),void 0===n&&(n=[]),this.inputGroupsByName={},this.enabledInputGroupNames=[],this.submitEventManager=new r.a,this.itemDataRequestedEventManager=new r.a,this.handleItemDataRequested=this.itemDataRequestedEventManager.emit,this.title=e,t.length>0&&(this.inputGroupsByName=t.reduce((function(e,t){return t.onDataRequested(i.handleItemDataRequested),e[t.name]=t,e}),this.inputGroupsByName)),n.length>0&&(this.enabledInputGroupNames=o(this.enabledInputGroupNames,n.filter((function(e){return null!=i.inputGroupsByName[e]}))))}return e.prototype.getInputGroup=function(e){return this.inputGroupsByName[e]||null},e.prototype.addInputGroup=function(e,t){return void 0===t&&(t=null),e.onDataRequested(this.handleItemDataRequested),this.inputGroupsByName[e.name]=e,this.enabledInputGroupNames=this.enabledInputGroupNames.filter((function(t){return t!==e.name})),null!==t?t<=0?this.enabledInputGroupNames=o([e.name],this.enabledInputGroupNames):t>=this.enabledInputGroupNames.length?this.enabledInputGroupNames=o(this.enabledInputGroupNames,[e.name]):this.enabledInputGroupNames=o(this.enabledInputGroupNames.slice(0,t),[e.name],this.enabledInputGroupNames.slice(t)):this.enabledInputGroupNames=o(this.enabledInputGroupNames,[e.name]),this},e.prototype.removeInputGroup=function(e){return delete this.inputGroupsByName[e],this.enabledInputGroupNames=this.enabledInputGroupNames.filter((function(t){return t!==e})),this},e.prototype.getFormElement=function(e){var t=this;void 0===e&&(e="update");var n=document.createElement("form");n.id="visual-console-item-edition",n.className="visual-console-item-edition",n.addEventListener("submit",(function(e){e.preventDefault(),t.submitEventManager.emit({nativeEvent:e,data:t.enabledInputGroupNames.reduce((function(e,n){return t.inputGroupsByName[n]&&(e=i(i({},e),t.inputGroupsByName[n].data)),e}),{})})}));var r=document.createElement("div");return r.className="input-groups",this.enabledInputGroupNames.forEach((function(e){t.inputGroupsByName[e]&&r.appendChild(t.inputGroupsByName[e].element)})),n.appendChild(r),n},e.prototype.reset=function(){var e=this;this.enabledInputGroupNames.forEach((function(t){e.inputGroupsByName[t]&&e.inputGroupsByName[t].reset()}))},e.prototype.onSubmit=function(e){return this.submitEventManager.on(e)},e.prototype.onInputGroupDataRequested=function(e){return this.itemDataRequestedEventManager.on(e)},e}()},function(e,t,n){"use strict";n(13);var r="http://www.w3.org/2000/svg";t.a=function(e,t,n){var i=void 0===n?{}:n,o=i.size,s=i.color,a=i.spin,l=i.pulse,c=document.createElement("figure");c.title=t,c.className="fa fa-"+e.iconName,o&&c.classList.add("fa-"+o),a?c.classList.add("fa-spin"):l&&c.classList.add("fa-pulse");var p=document.createElementNS(r,"svg");p.setAttribute("viewBox","0 0 "+e.icon[0]+" "+e.icon[1]),s&&p.setAttribute("fill",s);var u=document.createElementNS(r,"path"),d="string"==typeof e.icon[4]?e.icon[4]:e.icon[4][0];return u.setAttribute("d",d),p.appendChild(u),c.appendChild(p),c}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return o})),n.d(t,"d",(function(){return s}));
|
|
/*!
|
|
* Font Awesome Free 5.15.3 by @fontawesome - https://fontawesome.com
|
|
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
|
|
*/
|
|
var r={prefix:"fas",iconName:"list-alt",icon:[512,512,[],"f022","M464 480H48c-26.51 0-48-21.49-48-48V80c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v352c0 26.51-21.49 48-48 48zM128 120c-22.091 0-40 17.909-40 40s17.909 40 40 40 40-17.909 40-40-17.909-40-40-40zm0 96c-22.091 0-40 17.909-40 40s17.909 40 40 40 40-17.909 40-40-17.909-40-40-40zm0 96c-22.091 0-40 17.909-40 40s17.909 40 40 40 40-17.909 40-40-17.909-40-40-40zm288-136v-32c0-6.627-5.373-12-12-12H204c-6.627 0-12 5.373-12 12v32c0 6.627 5.373 12 12 12h200c6.627 0 12-5.373 12-12zm0 96v-32c0-6.627-5.373-12-12-12H204c-6.627 0-12 5.373-12 12v32c0 6.627 5.373 12 12 12h200c6.627 0 12-5.373 12-12zm0 96v-32c0-6.627-5.373-12-12-12H204c-6.627 0-12 5.373-12 12v32c0 6.627 5.373 12 12 12h200c6.627 0 12-5.373 12-12z"]},i={prefix:"fas",iconName:"pencil-alt",icon:[512,512,[],"f303","M497.9 142.1l-46.1 46.1c-4.7 4.7-12.3 4.7-17 0l-111-111c-4.7-4.7-4.7-12.3 0-17l46.1-46.1c18.7-18.7 49.1-18.7 67.9 0l60.1 60.1c18.8 18.7 18.8 49.1 0 67.9zM284.2 99.8L21.6 362.4.4 483.9c-2.9 16.4 11.4 30.6 27.8 27.8l121.5-21.3 262.6-262.6c4.7-4.7 4.7-12.3 0-17l-111-111c-4.8-4.7-12.4-4.7-17.1 0zM124.1 339.9c-5.5-5.5-5.5-14.3 0-19.8l154-154c5.5-5.5 14.3-5.5 19.8 0s5.5 14.3 0 19.8l-154 154c-5.5 5.5-14.3 5.5-19.8 0zM88 424h48v36.3l-64.5 11.3-31.1-31.1L51.7 376H88v48z"]},o={prefix:"fas",iconName:"plus-circle",icon:[512,512,[],"f055","M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm144 276c0 6.6-5.4 12-12 12h-92v92c0 6.6-5.4 12-12 12h-56c-6.6 0-12-5.4-12-12v-92h-92c-6.6 0-12-5.4-12-12v-56c0-6.6 5.4-12 12-12h92v-92c0-6.6 5.4-12 12-12h56c6.6 0 12 5.4 12 12v92h92c6.6 0 12 5.4 12 12v56z"]},s={prefix:"fas",iconName:"trash-alt",icon:[448,512,[],"f2ed","M32 464a48 48 0 0 0 48 48h288a48 48 0 0 0 48-48V128H32zm272-256a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zM432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16z"]}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"b",(function(){return eventsHistoryPropsDecoder}));var _lib__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(0),_Item__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(1),__extends=(extendStatics=function(e,t){return(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}extendStatics(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),extendStatics,__assign=function(){return(__assign=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function eventsHistoryPropsDecoder(e){if(Object(_lib__WEBPACK_IMPORTED_MODULE_0__.s)(e.html)&&Object(_lib__WEBPACK_IMPORTED_MODULE_0__.s)(e.encodedHtml))throw new TypeError("missing html content.");return __assign(__assign(__assign({},Object(_Item__WEBPACK_IMPORTED_MODULE_1__.b)(e)),{type:14,maxTime:Object(_lib__WEBPACK_IMPORTED_MODULE_0__.n)(e.maxTime,null),legendColor:e.legendColor,html:Object(_lib__WEBPACK_IMPORTED_MODULE_0__.s)(e.html)?Object(_lib__WEBPACK_IMPORTED_MODULE_0__.d)(e.encodedHtml):e.html}),Object(_lib__WEBPACK_IMPORTED_MODULE_0__.j)(e))}var EventsHistory=function(_super){function EventsHistory(){return null!==_super&&_super.apply(this,arguments)||this}return __extends(EventsHistory,_super),EventsHistory.prototype.createDomElement=function(){var element=document.createElement("div");element.className="events-history",element.innerHTML=this.props.html,!0!==this.props.agentDisabled&&!0!==this.props.moduleDisabled||(element.style.opacity="0.2");for(var scripts=element.getElementsByTagName("script"),_loop_1=function(i){0===scripts[i].src.length&&setTimeout((function(){try{eval(scripts[i].innerHTML.trim())}catch(e){}}),0)},i=0;i<scripts.length;i++)_loop_1(i);var flotText=element.getElementsByClassName("noresizevc");return flotText[0].style.color=this.props.legendColor,element},EventsHistory.prototype.updateDomElement=function(element){element.innerHTML=this.props.html;var aux=document.createElement("div");aux.innerHTML=this.props.html;for(var scripts=aux.getElementsByTagName("script"),i=0;i<scripts.length;i++)0===scripts[i].src.length&&eval(scripts[i].innerHTML.trim());var flotText=element.getElementsByClassName("noresizevc");flotText[0].style.color=this.props.legendColor},EventsHistory}(_Item__WEBPACK_IMPORTED_MODULE_1__.a);__webpack_exports__.a=EventsHistory},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"b",(function(){return donutGraphPropsDecoder}));var _lib__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(0),_Item__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(1),__extends=(extendStatics=function(e,t){return(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}extendStatics(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),extendStatics,__assign=function(){return(__assign=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function donutGraphPropsDecoder(e){if(Object(_lib__WEBPACK_IMPORTED_MODULE_0__.s)(e.html)&&Object(_lib__WEBPACK_IMPORTED_MODULE_0__.s)(e.encodedHtml))throw new TypeError("missing html content.");return __assign(__assign(__assign(__assign({},Object(_Item__WEBPACK_IMPORTED_MODULE_1__.b)(e)),{type:17,html:Object(_lib__WEBPACK_IMPORTED_MODULE_0__.s)(e.html)?Object(_lib__WEBPACK_IMPORTED_MODULE_0__.d)(e.encodedHtml):e.html,legendBackgroundColor:Object(_lib__WEBPACK_IMPORTED_MODULE_0__.s)(e.legendBackgroundColor)?"#000000":e.legendBackgroundColor}),Object(_lib__WEBPACK_IMPORTED_MODULE_0__.j)(e)),Object(_lib__WEBPACK_IMPORTED_MODULE_0__.i)(e))}var DonutGraph=function(_super){function DonutGraph(){return null!==_super&&_super.apply(this,arguments)||this}return __extends(DonutGraph,_super),DonutGraph.prototype.createDomElement=function(){var element=document.createElement("div");element.className="donut-graph",element.innerHTML=this.props.html,!0!==this.props.agentDisabled&&!0!==this.props.moduleDisabled||(element.style.opacity="0.2");for(var scripts=element.getElementsByTagName("script"),_loop_1=function(i){setTimeout((function(){0===scripts[i].src.length&&eval(scripts[i].innerHTML.trim())}),0)},i=0;i<scripts.length;i++)_loop_1(i);return element},DonutGraph.prototype.updateDomElement=function(element){element.innerHTML=this.props.html;var aux=document.createElement("div");aux.innerHTML=this.props.html;for(var scripts=aux.getElementsByTagName("script"),i=0;i<scripts.length;i++)0===scripts[i].src.length&&eval(scripts[i].innerHTML.trim())},DonutGraph}(_Item__WEBPACK_IMPORTED_MODULE_1__.a);__webpack_exports__.a=DonutGraph},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",(function(){return barsGraphPropsDecoder}));var _lib__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(0),_Item__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(1),__extends=(extendStatics=function(e,t){return(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}extendStatics(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),extendStatics,__assign=function(){return(__assign=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},parseBarsGraphProps=function(e){switch(e){case"white":case"black":case"transparent":return e;default:return"transparent"}},parseTypeGraph=function(e){switch(e){case"horizontal":case"vertical":return e;default:return"vertical"}};function barsGraphPropsDecoder(e){if(Object(_lib__WEBPACK_IMPORTED_MODULE_0__.s)(e.html)&&Object(_lib__WEBPACK_IMPORTED_MODULE_0__.s)(e.encodedHtml))throw new TypeError("missing html content.");return __assign(__assign(__assign({},Object(_Item__WEBPACK_IMPORTED_MODULE_1__.b)(e)),{type:18,html:Object(_lib__WEBPACK_IMPORTED_MODULE_0__.s)(e.html)?Object(_lib__WEBPACK_IMPORTED_MODULE_0__.d)(e.encodedHtml):e.html,backgroundColor:parseBarsGraphProps(e.backgroundColor),typeGraph:parseTypeGraph(e.typeGraph),gridColor:Object(_lib__WEBPACK_IMPORTED_MODULE_0__.s)(e.gridColor)?"#000000":e.gridColor}),Object(_lib__WEBPACK_IMPORTED_MODULE_0__.j)(e))}var BarsGraph=function(_super){function BarsGraph(){return null!==_super&&_super.apply(this,arguments)||this}return __extends(BarsGraph,_super),BarsGraph.prototype.createDomElement=function(){var element=document.createElement("div");element.innerHTML=this.props.html,element.className="bars-graph",!0!==this.props.agentDisabled&&!0!==this.props.moduleDisabled||(element.style.opacity="0.2");for(var scripts=element.getElementsByTagName("script"),_loop_1=function(i){0===scripts[i].src.length&&setTimeout((function(){try{eval(scripts[i].innerHTML.trim())}catch(e){}}),0)},i=0;i<scripts.length;i++)_loop_1(i);return element},BarsGraph.prototype.updateDomElement=function(element){element.innerHTML=this.props.html,!0!==this.props.agentDisabled&&!0!==this.props.moduleDisabled||(element.style.opacity="0.2");for(var scripts=element.getElementsByTagName("script"),i=0;i<scripts.length;i++)0===scripts[i].src.length&&eval(scripts[i].innerHTML.trim())},BarsGraph}(_Item__WEBPACK_IMPORTED_MODULE_1__.a);__webpack_exports__.b=BarsGraph},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"b",(function(){return moduleGraphPropsDecoder}));var _lib__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(0),_Item__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(1),__extends=(extendStatics=function(e,t){return(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}extendStatics(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),extendStatics,__assign=function(){return(__assign=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},parseBackgroundType=function(e){switch(e){case"white":case"black":case"transparent":return e;default:return"transparent"}},parseGraphType=function(e){switch(e){case"line":case"area":return e;default:return"line"}};function moduleGraphPropsDecoder(e){if(Object(_lib__WEBPACK_IMPORTED_MODULE_0__.s)(e.html)&&Object(_lib__WEBPACK_IMPORTED_MODULE_0__.s)(e.encodedHtml))throw new TypeError("missing html content.");return __assign(__assign(__assign(__assign({},Object(_Item__WEBPACK_IMPORTED_MODULE_1__.b)(e)),{type:1,html:Object(_lib__WEBPACK_IMPORTED_MODULE_0__.s)(e.html)?Object(_lib__WEBPACK_IMPORTED_MODULE_0__.d)(e.encodedHtml):e.html,backgroundType:parseBackgroundType(e.backgroundType),period:Object(_lib__WEBPACK_IMPORTED_MODULE_0__.n)(e.period,null),graphType:parseGraphType(e.graphType),customGraphId:Object(_lib__WEBPACK_IMPORTED_MODULE_0__.n)(e.customGraphId,null)}),Object(_lib__WEBPACK_IMPORTED_MODULE_0__.j)(e)),Object(_lib__WEBPACK_IMPORTED_MODULE_0__.i)(e))}var ModuleGraph=function(_super){function ModuleGraph(){return null!==_super&&_super.apply(this,arguments)||this}return __extends(ModuleGraph,_super),ModuleGraph.prototype.createDomElement=function(){var element=document.createElement("div");element.innerHTML=this.props.html,element.className="module-graph",!0!==this.props.agentDisabled&&!0!==this.props.moduleDisabled||(element.style.opacity="0.2");for(var scripts=element.getElementsByTagName("script"),_loop_1=function(i){0===scripts[i].src.length&&setTimeout((function(){try{eval(scripts[i].innerHTML.trim())}catch(e){}}),0)},i=0;i<scripts.length;i++)_loop_1(i);return element},ModuleGraph.prototype.updateDomElement=function(element){element.innerHTML=this.props.html,!0!==this.props.agentDisabled&&!0!==this.props.moduleDisabled||(element.style.opacity="0.2");for(var scripts=element.getElementsByTagName("script"),i=0;i<scripts.length;i++)0===scripts[i].src.length&&eval(scripts[i].innerHTML.trim())},ModuleGraph}(_Item__WEBPACK_IMPORTED_MODULE_1__.a);__webpack_exports__.a=ModuleGraph},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",(function(){return basicChartPropsDecoder}));var _lib__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(0),_Item__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(1),__extends=(extendStatics=function(e,t){return(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}extendStatics(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),extendStatics,__assign=function(){return(__assign=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function basicChartPropsDecoder(e){if(Object(_lib__WEBPACK_IMPORTED_MODULE_0__.s)(e.html)&&Object(_lib__WEBPACK_IMPORTED_MODULE_0__.s)(e.encodedHtml))throw new TypeError("missing html content.");return __assign(__assign(__assign(__assign({},Object(_Item__WEBPACK_IMPORTED_MODULE_1__.b)(e)),{type:23,html:Object(_lib__WEBPACK_IMPORTED_MODULE_0__.s)(e.html)?Object(_lib__WEBPACK_IMPORTED_MODULE_0__.d)(e.encodedHtml):e.html,period:Object(_lib__WEBPACK_IMPORTED_MODULE_0__.n)(e.period,null),value:parseFloat(e.value),status:Object(_lib__WEBPACK_IMPORTED_MODULE_0__.s)(e.status)?"#B2B2B2":e.status,moduleNameColor:Object(_lib__WEBPACK_IMPORTED_MODULE_0__.s)(e.moduleNameColor)?"#3f3f3f":e.moduleNameColor}),Object(_lib__WEBPACK_IMPORTED_MODULE_0__.j)(e)),Object(_lib__WEBPACK_IMPORTED_MODULE_0__.i)(e))}var BasicChart=function(_super){function BasicChart(){return null!==_super&&_super.apply(this,arguments)||this}return __extends(BasicChart,_super),BasicChart.prototype.createDomElement=function(){var element=document.createElement("div"),header=document.createElement("div");header.className="basic-chart-header";var moduleName=document.createElement("h2");moduleName.className="basic-chart-header-name",moduleName.textContent=this.props.moduleName,moduleName.style.color=""+this.props.moduleNameColor,header.appendChild(moduleName);var value="";null!==this.props.value&&(value=this.number_format(this.props.value,!1,"",2,1e3));var moduleValue=document.createElement("h2");moduleValue.className="basic-chart-header-value",moduleValue.textContent=""+value,moduleValue.style.color=this.props.status,header.appendChild(moduleValue),element.innerHTML=this.props.html,element.className="basic-chart",!0!==this.props.agentDisabled&&!0!==this.props.moduleDisabled||(element.style.opacity="0.2");for(var legendP=element.getElementsByTagName("p"),i=0;i<legendP.length;i++)legendP[i].style.margin="0px";for(var overviewGraphs=element.getElementsByClassName("overview_graph"),i=0;i<overviewGraphs.length;i++)overviewGraphs[i].remove();for(var scripts=element.getElementsByTagName("script"),_loop_1=function(i){0===scripts[i].src.length&&setTimeout((function(){try{eval(scripts[i].innerHTML.trim())}catch(e){}}),0)},i=0;i<scripts.length;i++)_loop_1(i);return element.innerHTML=this.props.html,element.insertBefore(header,element.firstChild),element},BasicChart.prototype.updateDomElement=function(element){var header=document.createElement("div");header.className="basic-chart-header";var moduleName=document.createElement("h2");moduleName.className="basic-chart-header-name",moduleName.textContent=this.props.moduleName,moduleName.style.color=""+this.props.moduleNameColor,header.appendChild(moduleName);var value="";null!==this.props.value&&(value=this.number_format(this.props.value,!1,"",2,1e3));var moduleValue=document.createElement("h2");moduleValue.className="basic-chart-header-value",moduleValue.textContent=""+value,moduleValue.style.color=this.props.status,header.appendChild(moduleValue),element.innerHTML=this.props.html,element.insertBefore(header,element.firstChild);for(var legendP=element.getElementsByTagName("p"),i=0;i<legendP.length;i++)legendP[i].style.margin="0px";for(var overviewGraphs=element.getElementsByClassName("overview_graph"),i=0;i<overviewGraphs.length;i++)overviewGraphs[i].remove();for(var scripts=element.getElementsByTagName("script"),i=0;i<scripts.length;i++)0===scripts[i].src.length&&eval(scripts[i].innerHTML.trim())},BasicChart.prototype.number_format=function(e,t,n,r,i){i=void 0!==i?i:1e3;if(r||(r=99),t){if(Math.round(e)!=e)return""}else{r++;var o=this.pad("1",r,0);e=Math.round(e*Number.parseInt(o))/Number.parseInt(o)}for(var s=0;Math.abs(e)>=i;)s++,e/=i;return e=i?Math.round(2*e)/2:Math.round(2*e),isNaN(e)&&(e=0),e+" "+["","K","M","G","T","P","E","Z","Y"][s]+n},BasicChart.prototype.pad=function(e,t,n){var r=e+"";return t<=r.length?r:this.pad(r+n,t,n)},BasicChart}(_Item__WEBPACK_IMPORTED_MODULE_1__.a);__webpack_exports__.b=BasicChart},function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAARpJREFUeNqUU8ENwjAMTCsGyAiwAIIN2hdfmACYgLIACBYAJgA26JcXbABigo7QEbhDFxSFEIlIp7Sxz/Y5jjGJtb30B0TKJ4uQCmwLYByYauC8Gj1r/zAPyEdsV6AFhnDOCH4DDXCkD2C/KhCZWUuQHr8kMQiDwWfyqQAGEmchmedA5f5lI7HA+cyXsAY2kcxT2YwXhFIO7jyXHpZ2CktWmb2Imj3QpaRcZBc51FxJWhiYTWa1tmPSyyZsretBo2zW/LeKdwCV3kQGJzWhlNWCe3O3cGZXf1TRBmSrGziEg3TXZ6kmxTKTvFPj337+KJfa7xqs2Bu5SvvcJckiGSo9JqOrMspoNStLv8Is0ajCdRrrxmAxaS8BBgA1e3UUTVCKKgAAAABJRU5ErkJggg=="},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";n.r(t);n(12);var r,i=n(0),o=n(1),s=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=function(){return(a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},l=function(e){switch(e){case"default":case"enabled":case"disabled":return e;default:return"default"}};function c(e){if("string"!=typeof e.imageSrc||0===e.imageSrc.length)throw new TypeError("invalid image src.");return a(a(a(a({},Object(o.b)(e)),{type:0,imageSrc:e.imageSrc,showLastValueTooltip:l(e.showLastValueTooltip),statusImageSrc:Object(i.k)(e.statusImageSrc,null),lastValue:Object(i.k)(e.lastValue,null)}),Object(i.j)(e)),Object(i.i)(e))}var p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return s(t,e),t.prototype.createDomElement=function(){var e=this.props.statusImageSrc||this.props.imageSrc,t=document.createElement("div");return t.className="static-graph",t.setAttribute("ondragstart","return false;"),t.setAttribute("draggable","false"),t.style.backgroundImage="url("+e+")",t.style.backgroundRepeat="no-repeat",t.style.backgroundSize="contain",t.style.backgroundPosition="center",!0!==this.props.agentDisabled&&!0!==this.props.moduleDisabled||(t.style.opacity="0.2"),null!==this.props.lastValue&&"disabled"!==this.props.showLastValueTooltip&&(t.className="static-graph image forced_title",t.setAttribute("data-use_title_for_force_title","1"),t.setAttribute("data-title",this.props.lastValue)),t},t.prototype.updateDomElement=function(e){var t=this.props.statusImageSrc||this.props.imageSrc;e.style.backgroundImage="url("+t+")"},t}(o.a),u=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),d=function(){return(d=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function h(e){if("string"!=typeof e.imageSrc||0===e.imageSrc.length)throw new TypeError("invalid image src.");if("string"!=typeof e.image||0===e.image.length)throw new TypeError("invalid image.");return d(d(d({},Object(o.b)(e)),{type:5,image:e.image,imageSrc:e.imageSrc}),Object(i.i)(e))}var m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return u(t,e),t.prototype.createDomElement=function(){var e=document.createElement("div");return e.className="icon "+this.props.image,e.style.backgroundImage="url("+this.props.imageSrc+")",e.style.backgroundRepeat="no-repeat",e.style.backgroundSize="contain",e.style.backgroundPosition="center",e},t.prototype.updateDomElement=function(e){e.style.backgroundImage="url("+this.props.imageSrc+")"},t}(o.a),f=n(3),b=n(4),v=n(5),g=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),y=function(){return(y=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},_=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)r[i]=o[s];return r};function E(e){if("string"!=typeof e.color||0===e.color.length)throw new TypeError("invalid color.");return y(y(y(y({},Object(o.b)(e)),{type:20,color:e.color,defaultColor:e.defaultColor,colorRanges:e.colorRanges}),Object(i.j)(e)),Object(i.i)(e))}var O=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return g(t,e),t.prototype.createContent=function(){var e=this,t=document.createElement("div");t.className="div-input-group";var n=document.createElement("label");n.textContent=Object(i.t)("Default color"),t.appendChild(n);var r=document.createElement("input");return r.type="color",r.required=!0,r.value=""+(this.currentData.defaultColor||this.initialData.defaultColor||"#000000"),r.addEventListener("change",(function(t){e.updateData({defaultColor:t.target.value})})),t.appendChild(r),t},t}(f.InputGroup),w=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return g(t,e),t.prototype.createContent=function(){var e=this,t=document.createElement("div");t.className="div-input-group div-ranges-input-group";var n=this.createLabel("Ranges");t.appendChild(n);var r=document.createElement("div"),i=document.createElement("div");t.appendChild(i),t.appendChild(r);var o,s=this.currentData.colorRanges||this.initialData.colorRanges||[];return(o=function(t){i.innerHTML="",t.forEach((function(t,n){return i.appendChild(e.rangeContainer(t,function(t){return function(n){var r=e.currentData.colorRanges||e.initialData.colorRanges||[];e.updateData({colorRanges:_(r.slice(0,t),[n],r.slice(t+1))})}}(n),function(t){return function(){var n=e.currentData.colorRanges||e.initialData.colorRanges||[],r=_(n.slice(0,t),n.slice(t+1));e.updateData({colorRanges:r}),o(r)}}(n)))}))})(s),r.appendChild(this.initialRangeContainer((function(t){var n=e.currentData.colorRanges||e.initialData.colorRanges||[],r=_(n,[t]);e.updateData({colorRanges:r}),o(r)}))),t},t.prototype.initialRangeContainer=function(e){var t={color:"#ffffff"},n=y({},t),r=document.createElement("div"),o=document.createElement("div"),s=this.createLabel("From Value"),a=this.createInputNumber(null,(function(e){n.fromValue=e}));o.appendChild(s),o.appendChild(a),r.appendChild(o);var l=document.createElement("div"),c=this.createLabel("To Value"),p=this.createInputNumber(null,(function(e){n.toValue=e}));o.appendChild(c),o.appendChild(p),r.appendChild(l);var u=document.createElement("div"),d=this.createLabel("Color"),h=this.createInputColor(t.color,(function(e){n.color=e}));o.appendChild(d),o.appendChild(h),r.appendChild(u);var m=document.createElement("a");m.appendChild(Object(b.a)(v.c,Object(i.t)("Create color range"),{size:"small",color:"#565656"}));return m.addEventListener("click",(function(){var r;void 0!==(r=n).color&&void 0!==r.toValue&&void 0!==r.fromValue&&e(n),n=t,a.value=""+(n.fromValue||""),p.value=""+(n.toValue||""),h.value=""+n.color})),r.appendChild(m),r},t.prototype.rangeContainer=function(e,t,n){var r=y({},e),o=document.createElement("div"),s=document.createElement("div"),a=this.createLabel("From Value"),l=this.createInputNumber(e.fromValue,(function(e){r.fromValue=e,t(y({},r))}));s.appendChild(a),s.appendChild(l),o.appendChild(s);var c=document.createElement("div"),p=this.createLabel("To Value"),u=this.createInputNumber(e.toValue,(function(e){r.toValue=e,t(y({},r))}));s.appendChild(p),s.appendChild(u),o.appendChild(c);var d=document.createElement("div"),h=this.createLabel("Color"),m=this.createInputColor(e.color,(function(e){r.color=e,t(y({},r))}));s.appendChild(h),s.appendChild(m),o.appendChild(d);var f=document.createElement("a");return f.appendChild(Object(b.a)(v.d,Object(i.t)("Delete color range"),{size:"small",color:"#565656"})),f.addEventListener("click",n),o.appendChild(f),o},t.prototype.createLabel=function(e){var t=document.createElement("label");return t.textContent=Object(i.t)(e),t},t.prototype.createInputNumber=function(e,t){var n=document.createElement("input");return n.type="number",null!==e&&(n.value=""+e),n.addEventListener("change",(function(e){var n=parseInt(e.target.value);isNaN(n)||t(n)})),n},t.prototype.createInputColor=function(e,t){var n=document.createElement("input");return n.type="color",null!==e&&(n.value=e),n.addEventListener("change",(function(e){return t(e.target.value)})),n},t}(f.InputGroup),M="http://www.w3.org/2000/svg",C=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return g(t,e),t.prototype.createDomElement=function(){var e=document.createElement("div");return e.className="color-cloud",e.append(this.createSvgElement()),e},t.prototype.resizeElement=function(t){e.prototype.resizeElement.call(this,t,t)},t.prototype.createSvgElement=function(){var e="grad_"+this.props.id,t=document.createElementNS(M,"svg");t.setAttribute("viewBox","0 0 100 100");var n=document.createElementNS(M,"defs"),r=document.createElementNS(M,"radialGradient");r.setAttribute("id",e),r.setAttribute("cx","50%"),r.setAttribute("cy","50%"),r.setAttribute("r","50%"),r.setAttribute("fx","50%"),r.setAttribute("fy","50%");var i=document.createElementNS(M,"stop");i.setAttribute("offset","0%"),i.setAttribute("style","stop-color:"+this.props.color+";stop-opacity:0.9");var o=document.createElementNS(M,"stop");o.setAttribute("offset","100%"),o.setAttribute("style","stop-color:"+this.props.color+";stop-opacity:0");var s=document.createElementNS(M,"circle");return s.setAttribute("fill","url(#"+e+")"),s.setAttribute("cx","50%"),s.setAttribute("cy","50%"),s.setAttribute("r","50%"),r.append(i,o),n.append(r),t.append(n,s),!0!==this.props.agentDisabled&&!0!==this.props.moduleDisabled||t.setAttribute("opacity","0.2"),t},t.prototype.getFormContainer=function(){return t.getFormContainer(this.props)},t.getFormContainer=function(t){var n=e.getFormContainer.call(this,t);return n.removeInputGroup("label"),n.addInputGroup(new O("color-cloud",t),3),n.addInputGroup(new w("ranges-cloud",t),4),n},t}(o.a),k=n(2),x=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),A=function(){return(A=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function j(e){var t=A(A({},Object(o.b)(A(A({},e),{width:1,height:1}))),{type:13,label:null,isLinkEnabled:!1,parentId:null,aclGroupId:null,x:0,y:0,width:0,height:0,startPosition:{x:Object(i.n)(e.startX,0),y:Object(i.n)(e.startY,0)},endPosition:{x:Object(i.n)(e.endX,0),y:Object(i.n)(e.endY,0)},lineWidth:Object(i.n)(e.lineWidth||e.borderWidth,1),color:Object(i.k)(e.borderColor||e.color,null),viewportOffsetX:0,viewportOffsetY:0,labelEnd:Object(i.k)(e.labelEnd,""),labelEndWidth:Object(i.n)(e.labelEndWidth,0),linkedEnd:e.linkedEnd,linkedStart:e.linkedStart,labelEndHeight:Object(i.n)(e.labelEndHeight,0),labelStart:Object(i.k)(e.labelStart,""),labelStartWidth:Object(i.n)(e.labelStartWidth,0),labelStartHeight:Object(i.n)(e.labelStartHeight,0)});return A(A({},t),I.extractBoxSizeAndPosition(t.startPosition,t.endPosition))}var P="http://www.w3.org/2000/svg",I=function(e){function t(n,r){var o=e.call(this,A(A({},n),t.extractBoxSizeAndPosition(n.startPosition,n.endPosition)),A({},r),!0)||this;return o.circleRadius=8,o.moveMode=!1,o.isMoving=!1,o.lineMovedEventManager=new k.a,o.lineMovedEventDisposables=[],o.debouncedStartPositionMovementSave=Object(i.c)(500,(function(e,t){o.isMoving=!1;var n={x:e,y:t};o.lineMovedEventManager.emit({item:o,startPosition:n,endPosition:o.props.endPosition})})),o.removeStartPositionMovement=null,o.debouncedEndPositionMovementSave=Object(i.c)(500,(function(e,t){o.isMoving=!1;var n={x:e,y:t};o.lineMovedEventManager.emit({item:o,endPosition:n,startPosition:o.props.startPosition})})),o.removeEndPositionMovement=null,o.moveMode=r.editMode,o.init(),e.prototype.resizeElement.call(o,Math.max(n.width,n.viewportOffsetX),Math.max(n.height,n.viewportOffsetY)),o}return x(t,e),t.prototype.initStartPositionMovementListener=function(e,t){var n=this;this.removeStartPositionMovement=Object(i.a)(e,(function(e,t){var r={x:e+=n.circleRadius-n.props.viewportOffsetX/2,y:t+=n.circleRadius-n.props.viewportOffsetY/2};n.isMoving=!0,n.props=A(A({},n.props),{startPosition:r}),n.debouncedStartPositionMovementSave(e,t)}),t)},t.prototype.stopStartPositionMovementListener=function(){this.removeStartPositionMovement&&(this.removeStartPositionMovement(),this.removeStartPositionMovement=null)},t.prototype.initEndPositionMovementListener=function(e,t){var n=this;this.removeEndPositionMovement=Object(i.a)(e,(function(e,t){e+=n.circleRadius-n.props.viewportOffsetX/2,t+=n.circleRadius-n.props.viewportOffsetY/2,n.isMoving=!0,n.props=A(A({},n.props),{endPosition:{x:e,y:t}}),n.debouncedEndPositionMovementSave(e,t)}),t)},t.prototype.stopEndPositionMovementListener=function(){this.removeEndPositionMovement&&(this.removeEndPositionMovement(),this.removeEndPositionMovement=null)},t.prototype.setProps=function(n){e.prototype.setProps.call(this,A(A({},n),t.extractBoxSizeAndPosition(n.startPosition,n.endPosition)))},t.prototype.setMeta=function(t){this.moveMode=t.editMode,e.prototype.setMeta.call(this,A(A({},t),{lineMode:!0}))},t.prototype.createDomElement=function(){var e=document.createElement("div");e.className="line";var t=this.props,n=t.x,r=t.y,i=t.width,o=t.height,s=t.lineWidth,a=t.viewportOffsetX,l=t.viewportOffsetY,c=t.startPosition,p=t.endPosition,u=t.color;i+=a,o+=l;var d=c.x-n+s/2+a/2,h=c.y-r+s/2+l/2,m=p.x-n+s/2+a/2,f=p.y-r+s/2+l/2,b=document.createElementNS(P,"svg");b.setAttribute("width",""+(i+s)),b.setAttribute("height",""+(o+s));var v=document.createElementNS(P,"line");return v.setAttribute("x1",""+d),v.setAttribute("y1",""+h),v.setAttribute("x2",""+m),v.setAttribute("y2",""+f),v.setAttribute("stroke",u||"black"),v.setAttribute("stroke-width",""+s),b.append(v),e.append(b),e},t.prototype.updateDomElement=function(e){null!=e.parentElement&&(e.parentElement.style.cursor="default");var t=this.props,n=t.x,r=t.y,i=t.width,o=t.height,s=t.lineWidth,a=t.viewportOffsetX,l=t.viewportOffsetY,c=t.startPosition,p=t.endPosition,u=t.color;i+=a,o+=l;var d=c.x-n+s/2+a/2,h=c.y-r+s/2+l/2,m=p.x-n+s/2+a/2,f=p.y-r+s/2+l/2,b=e.getElementsByTagName("svg");if(b.length>0){var v=b.item(0);if(null!=v){v.setAttribute("width",""+(i+s)),v.setAttribute("height",""+(o+s));var g=v.getElementsByTagNameNS(P,"line");if(g.length>0){var y=g.item(0);null!=y&&(y.setAttribute("x1",""+d),y.setAttribute("y1",""+h),y.setAttribute("x2",""+m),y.setAttribute("y2",""+f),y.setAttribute("stroke",u||"black"),y.setAttribute("stroke-width",""+s))}}}if(this.moveMode){var _=document.createElement("div"),E=document.createElement("div");if(this.isMoving){var O=e.getElementsByClassName("visual-console-item-line-circle-start");if(O.length>0)(C=O.item(0))&&(_=C);var w=e.getElementsByClassName("visual-console-item-line-circle-end");if(w.length>0)(C=w.item(0))&&(E=C)}if(_.classList.add("visual-console-item-line-circle","visual-console-item-line-circle-start"),_.style.width=2*this.circleRadius+"px",_.style.height=2*this.circleRadius+"px",_.style.borderRadius="50%",_.style.backgroundColor=""+u,_.style.position="absolute",_.style.left=d-this.circleRadius+"px",_.style.top=h-this.circleRadius+"px",_.style.cursor="move",E.classList.add("visual-console-item-line-circle","visual-console-item-line-circle-end"),E.style.width=2*this.circleRadius+"px",E.style.height=2*this.circleRadius+"px",E.style.borderRadius="50%",E.style.backgroundColor=""+u,E.style.position="absolute",E.style.left=m-this.circleRadius+"px",E.style.top=f-this.circleRadius+"px",E.style.cursor="move",null!==e.parentElement){for(var M=e.parentElement.getElementsByClassName("visual-console-item-line-circle");M.length>0;){(C=M.item(0))&&C.remove()}e.parentElement.appendChild(_),e.parentElement.appendChild(E)}this.initStartPositionMovementListener(_,this.elementRef.parentElement),this.initEndPositionMovementListener(E,this.elementRef.parentElement)}else if(this.moveMode)this.stopStartPositionMovementListener();else if(this.stopStartPositionMovementListener(),null!==e.parentElement)for(M=e.parentElement.getElementsByClassName("visual-console-item-line-circle");M.length>0;){var C;(C=M.item(0))&&C.remove()}},t.extractBoxSizeAndPosition=function(e,t){return{width:Math.abs(e.x-t.x),height:Math.abs(e.y-t.y),x:Math.min(e.x,t.x),y:Math.min(e.y,t.y)}},t.prototype.move=function(t,n){e.prototype.moveElement.call(this,t,n);var r=this.props.startPosition.x-this.props.endPosition.x<=0,i=this.props.startPosition.y-this.props.endPosition.y<=0,o={x:r?t:this.props.width+t,y:i?n:this.props.height+n},s={x:r?this.props.width+t:t,y:i?this.props.height+n:n};this.props=A(A({},this.props),{startPosition:o,endPosition:s})},t.prototype.remove=function(){this.stopStartPositionMovementListener(),e.prototype.remove.call(this)},t.prototype.onLineMovementFinished=function(e){var t=this.lineMovedEventManager.on(e);return this.lineMovedEventDisposables.push(t),t},t}(o.a),T=I,L=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),D=function(){return(D=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function R(e){return D(D({},j(e)),{type:21,viewportOffsetX:0,viewportOffsetY:0,labelEnd:Object(i.k)(e.labelEnd,""),labelEndWidth:Object(i.n)(e.labelEndWidth,0),labelEndHeight:Object(i.n)(e.labelEndHeight,0),labelStart:Object(i.k)(e.labelStart,""),labelStartWidth:Object(i.n)(e.labelStartWidth,0),labelStartHeight:Object(i.n)(e.labelStartHeight,0)})}var S=function(e){function t(t,n){var r=e.call(this,D({},t),D({},n))||this;return r.debouncedStartPositionMovementSave=Object(i.c)(50,(function(e,t){r.isMoving=!1;var n={x:e,y:t};r.render(),r.lineMovedEventManager.emit({item:r,startPosition:n,endPosition:r.props.endPosition})})),r.debouncedEndPositionMovementSave=Object(i.c)(50,(function(e,t){r.isMoving=!1;var n={x:e,y:t};r.render(),r.lineMovedEventManager.emit({item:r,endPosition:n,startPosition:r.props.startPosition})})),r.render(),r}return L(t,e),t.prototype.updateDomElement=function(t){e.prototype.updateDomElement.call(this,t);var n,r,i=this.props,o=i.x,s=i.y,a=i.lineWidth,l=i.viewportOffsetX,c=i.viewportOffsetY,p=i.startPosition,u=i.endPosition,d=i.color,h=i.labelEnd,m=i.labelStart,f=i.labelEndWidth,b=i.labelEndHeight,v=i.labelStartWidth,g=i.labelStartHeight,y=t.getElementsByTagName("svg");if(y.length>0){if(null!=(r=y.item(0))){for(var _=r.getElementsByTagNameNS("http://www.w3.org/2000/svg","line"),E=r.getElementsByTagNameNS("http://www.w3.org/2000/svg","g");E.length>0;)E[0].remove();_.length>0&&(n=_.item(0))}if(null!=r&&null!=n){var O=p.x-o+a/2+l/2,w=p.y-s+a/2+c/2,M=u.x-o+a/2+l/2,C=u.y-s+a/2+c/2,k=p.x-o+a/2+l/2,x=p.y-s+a/2+c/2,A=u.x-o+a/2+l/2,j=u.y-s+a/2+c/2,P=180*Math.atan2(C-w,M-O)/Math.PI;if(v<=0){_=m.split("<br>");v=0,_.forEach((function(e){e.length>v&&(v=10*e.length)})),g<=0&&(g=25*_.length)}if(f<=0){_=h.split("<br>");f=0,_.forEach((function(e){e.length>f&&(f=10*e.length)})),b<=0&&(b=25*_.length)}if(k<A&&(k+=25,A-=25+f),k>A&&(k-=25+v,A+=25),x<j&&(x+=25,j-=25+b),x>j&&(x-=25+g,j+=25),void 0===d&&(d="#000"),null!==t.parentElement){for(var I=t.parentElement.getElementsByClassName("vc-item-nl-label");I.length>0;){var T=I.item(0);T&&T.remove()}for(var L=t.parentElement.getElementsByClassName("vc-item-nl-arrow");L.length>0;){var D=L.item(0);D&&D.remove()}}var R=2*a,S=O+(M-O)/2-R,N=w+(C-w)/2-R,B=document.createElement("div");B.classList.add("vc-item-nl-arrow"),B.style.position="absolute",B.style.border=R+"px solid transparent",B.style.borderBottom=R+"px solid "+d,B.style.left=S+"px",B.style.top=N+"px",B.style.transform="rotate("+(90+P)+"deg)";var z=document.createElement("div");if(z.classList.add("vc-item-nl-arrow"),z.style.position="absolute",z.style.border=R+"px solid transparent",z.style.borderBottom=R+"px solid "+d,z.style.left=S+"px",z.style.top=N+"px",z.style.transform="rotate("+(270+P)+"deg)",null!==t.parentElement&&(t.parentElement.appendChild(B),t.parentElement.appendChild(z)),""!=m){var W=document.createElement("div");try{W.innerHTML=m,W.style.position="absolute",W.style.left=k+"px",W.style.top=x+"px",W.style.width=v+"px",W.style.border="2px solid "+d,W.classList.add("vc-item-nl-label","label-start")}catch(e){console.error(e)}null!==t.parentElement&&t.parentElement.appendChild(W)}if(""!=h){var H=document.createElement("div");try{H.innerHTML=h,H.style.position="absolute",H.style.left=A+"px",H.style.top=j+"px",H.style.width=f+"px",H.style.border="2px solid "+d,H.classList.add("vc-item-nl-label","label-end")}catch(e){console.error(e)}null!==t.parentElement&&t.parentElement.appendChild(H)}}}},t}(T),N=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),B=function(){return(B=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function z(e){if(("string"!=typeof e.imageSrc||0===e.imageSrc.length)&&null===e.encodedHtml)throw new TypeError("invalid image src.");if(null===Object(i.n)(e.groupId,null))throw new TypeError("invalid group Id.");var t=Object(i.l)(e.showStatistics),n=t?function(e){return Object(i.s)(e.html)?Object(i.s)(e.encodedHtml)?null:Object(i.d)(e.encodedHtml):e.html}(e):null;return B(B(B({},Object(o.b)(e)),{type:11,groupId:parseInt(e.groupId),imageSrc:Object(i.k)(e.imageSrc,null),statusImageSrc:Object(i.k)(e.statusImageSrc,null),showStatistics:t,html:n}),Object(i.i)(e))}var W=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return N(t,e),t.prototype.createDomElement=function(){var e=document.createElement("div");return e.className="group",this.props.showStatistics||null===this.props.statusImageSrc?this.props.showStatistics&&null!=this.props.html&&(e.style.backgroundImage="none",e.innerHTML=this.props.html):(e.style.backgroundImage="url("+this.props.statusImageSrc+")",e.style.backgroundRepeat="no-repeat",e.style.backgroundSize="contain",e.style.backgroundPosition="center"),e},t.prototype.updateDomElement=function(e){this.props.showStatistics||null===this.props.statusImageSrc?this.props.showStatistics&&null!=this.props.html&&(e.style.backgroundImage="none",e.innerHTML=this.props.html):(e.style.backgroundImage="url("+this.props.statusImageSrc+")",e.style.backgroundRepeat="no-repeat",e.style.backgroundSize="contain",e.style.backgroundPosition="center",e.innerHTML="")},t}(o.a),H=(n(15),function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),G=function(){return(G=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},U=function(e){switch(e){case"analogic":case"digital":return e;default:return"analogic"}},F=function(e){switch(e){case"datetime":case"time":return e;default:return"datetime"}};function V(e){if("string"!=typeof e.clockTimezone||0===e.clockTimezone.length)throw new TypeError("invalid timezone.");return G(G(G({},Object(o.b)(e)),{type:19,clockType:U(e.clockType),clockFormat:F(e.clockFormat),clockTimezone:e.clockTimezone,clockTimezoneOffset:Object(i.n)(e.clockTimezoneOffset,0),showClockTimezone:Object(i.l)(e.showClockTimezone),color:Object(i.k)(e.color,null)}),Object(i.i)(e))}var K=function(e){function t(n,r){var i=e.call(this,n,r)||this;return i.intervalRef=null,i.startTick((function(){i.childElementRef.innerHTML=i.createClock().innerHTML}),"analogic"===i.props.clockType?2e4:t.TICK_INTERVAL),i}return H(t,e),t.prototype.stopTick=function(){null!==this.intervalRef&&(window.clearInterval(this.intervalRef),this.intervalRef=null)},t.prototype.startTick=function(e,n){void 0===n&&(n=t.TICK_INTERVAL),this.stopTick(),this.intervalRef=window.setInterval(e,n)},t.prototype.createDomElement=function(){return this.createClock()},t.prototype.updateDomElement=function(t){var n=this.getElementSize(this.props.width,this.props.height),r=n.width,i=n.height;"digital"===this.props.clockType?(!1===this.meta.isBeingResized&&e.prototype.resizeElement.call(this,this.props.width,this.props.height),t.classList.replace("analogic-clock","digital-clock")):(!1===this.meta.isBeingResized&&e.prototype.resizeElement.call(this,r,i),t.classList.replace("digital-clock","analogic-clock")),t.innerHTML=this.createDomElement().innerHTML},t.prototype.remove=function(){this.stopTick(),e.prototype.remove.call(this)},t.prototype.resizeElement=function(t,n){var r=this.getElementSize(t,n),i=r.width,o=r.height;"digital"===this.props.clockType?e.prototype.resizeElement.call(this,t,n):e.prototype.resizeElement.call(this,i,o)},t.prototype.createClock=function(){switch(this.props.clockType){case"analogic":return this.createAnalogicClock();case"digital":return this.createDigitalClock();default:throw new Error("invalid clock type.")}},t.prototype.createAnalogicClock=function(){var e="http://www.w3.org/2000/svg",t="#FFFFF0",n="#242124",r="#242124",o="#242124",s="#525252",a="#DC143C",l=this.getElementSize(),c=l.width,p=l.height,u=10*c/100,d=document.createElement("div");d.className="analogic-clock",d.style.width=c+"px",d.style.height=p+"px";var h=document.createElementNS(e,"svg");h.setAttribute("viewBox","0 0 100 100");var m=document.createElementNS(e,"g");m.setAttribute("class","clockface");var f=document.createElementNS(e,"circle");f.setAttribute("cx","50"),f.setAttribute("cy","50"),f.setAttribute("r","48"),f.setAttribute("fill",t),f.setAttribute("stroke",n),f.setAttribute("stroke-width","2"),f.setAttribute("stroke-linecap","round"),m.append(f);var b=this.getHumanTimezone();if(b.length>0){var v=document.createElementNS(e,"text");v.setAttribute("text-anchor","middle"),v.setAttribute("font-size","8"),v.setAttribute("transform","translate(30 50) rotate(90)"),v.setAttribute("fill",r),v.textContent=b,m.append(v)}var g=document.createElementNS(e,"g");g.setAttribute("class","marks");var y=document.createElementNS(e,"g");y.setAttribute("class","mark"),y.setAttribute("transform","translate(50 50)");var _=document.createElementNS(e,"line");_.setAttribute("x1","36"),_.setAttribute("y1","0"),_.setAttribute("x2","46"),_.setAttribute("y2","0"),_.setAttribute("stroke",r),_.setAttribute("stroke-width","5");var E=document.createElementNS(e,"line");E.setAttribute("x1","36"),E.setAttribute("y1","0"),E.setAttribute("x2","46"),E.setAttribute("y2","0"),E.setAttribute("stroke",t),E.setAttribute("stroke-width","1"),y.append(_,E),g.append(y);for(var O=1;O<60;O++){var w=document.createElementNS(e,"line");w.setAttribute("y1","0"),w.setAttribute("y2","0"),w.setAttribute("stroke",r),w.setAttribute("transform","translate(50 50) rotate("+6*O+")"),O%5==0?(w.setAttribute("x1","38"),w.setAttribute("x2","46"),w.setAttribute("stroke-width",O%15==0?"2":"1")):(w.setAttribute("x1","42"),w.setAttribute("x2","46"),w.setAttribute("stroke-width","0.5")),g.append(w)}var M=document.createElementNS(e,"g");M.setAttribute("class","hour-hand"),M.setAttribute("transform","translate(50 50)");var C=document.createElementNS(e,"line");C.setAttribute("class","hour-hand-a"),C.setAttribute("x1","0"),C.setAttribute("y1","0"),C.setAttribute("x2","30"),C.setAttribute("y2","0"),C.setAttribute("stroke",s),C.setAttribute("stroke-width","4"),C.setAttribute("stroke-linecap","round");var k=document.createElementNS(e,"line");k.setAttribute("class","hour-hand-b"),k.setAttribute("x1","0"),k.setAttribute("y1","0"),k.setAttribute("x2","29.9"),k.setAttribute("y2","0"),k.setAttribute("stroke",o),k.setAttribute("stroke-width","3.1"),k.setAttribute("stroke-linecap","round"),M.append(C,k);var x=document.createElementNS(e,"g");x.setAttribute("class","minute-hand"),x.setAttribute("transform","translate(50 50)");var A=document.createElementNS(e,"line");A.setAttribute("class","minute-hand-a"),A.setAttribute("x1","0"),A.setAttribute("y1","0"),A.setAttribute("x2","40"),A.setAttribute("y2","0"),A.setAttribute("stroke",s),A.setAttribute("stroke-width","2"),A.setAttribute("stroke-linecap","round");var j=document.createElementNS(e,"line");j.setAttribute("class","minute-hand-b"),j.setAttribute("x1","0"),j.setAttribute("y1","0"),j.setAttribute("x2","39.9"),j.setAttribute("y2","0"),j.setAttribute("stroke",o),j.setAttribute("stroke-width","1.5"),j.setAttribute("stroke-linecap","round");var P=document.createElementNS(e,"circle");P.setAttribute("r","3"),P.setAttribute("fill",o),x.append(A,j,P);var I=document.createElementNS(e,"g");I.setAttribute("class","second-hand"),I.setAttribute("transform","translate(50 50)");var T=document.createElementNS(e,"line");T.setAttribute("x1","0"),T.setAttribute("y1","0"),T.setAttribute("x2","46"),T.setAttribute("y2","0"),T.setAttribute("stroke",a),T.setAttribute("stroke-width","1"),T.setAttribute("stroke-linecap","round");var L=document.createElementNS(e,"circle");L.setAttribute("r","2"),L.setAttribute("fill",a),I.append(T,L);var D=document.createElementNS(e,"circle");D.setAttribute("cx","50"),D.setAttribute("cy","50"),D.setAttribute("r","0.3"),D.setAttribute("fill",o);var R=this.getOriginDate(),S=R.getSeconds(),N=R.getMinutes(),B=6*S,z=6*N+S/60*6,W=30*R.getHours()+N/60*30;if(M.setAttribute("transform","translate(50 50) rotate("+W+")"),x.setAttribute("transform","translate(50 50) rotate("+z+")"),I.setAttribute("transform","translate(50 50) rotate("+B+")"),h.append(m,g,M,x,I,D),h.setAttribute("transform","rotate(-90)"),d.innerHTML="\n <style>\n @keyframes rotate-hour {\n from {\n "+Object(i.p)("transform","translate(50px, 50px) rotate("+W+"deg)").join("\n")+"\n }\n to {\n "+Object(i.p)("transform","translate(50px, 50px) rotate("+(W+360)+"deg)").join("\n")+"\n }\n }\n @keyframes rotate-minute {\n from {\n "+Object(i.p)("transform","translate(50px, 50px) rotate("+z+"deg)").join("\n")+"\n }\n to {\n "+Object(i.p)("transform","translate(50px, 50px) rotate("+(z+360)+"deg)").join("\n")+"\n }\n }\n @keyframes rotate-second {\n from {\n "+Object(i.p)("transform","translate(50px, 50px) rotate("+B+"deg)").join("\n")+"\n }\n to {\n "+Object(i.p)("transform","translate(50px, 50px) rotate("+(B+360)+"deg)").join("\n")+"\n }\n }\n </style>\n ",d.append(h),"datetime"===this.props.clockFormat){var H=document.createElement("span");H.className="date",H.textContent=Object(i.f)(R,"default"),H.style.fontSize=u+"px",this.props.color&&(H.style.color=this.props.color),d.append(H)}return d},t.prototype.createDigitalClock=function(){var e=document.createElement("div");e.className="digital-clock";var t=this.getElementSize(),n=t.width,r=t.height,o=n;r<n&&(o=r);var s=6/this.props.clockTimezone.length,a=35*o/100,l=17.5*o/100,c=Math.min(35*s*o/100,n/100*10),p=this.getOriginDate();if("datetime"===this.props.clockFormat){var u=document.createElement("span");u.className="date",u.textContent=Object(i.f)(p,"default"),u.style.fontSize=l+"px",this.props.color&&(u.style.color=this.props.color),e.append(u)}var d=document.createElement("span");d.className="time",d.textContent=Object(i.g)(p),d.style.fontSize=a+"px",this.props.color&&(d.style.color=this.props.color),e.append(d);var h=this.getHumanTimezone();if(h.length>0){var m=document.createElement("span");m.className="timezone",m.textContent=h,m.style.fontSize=c+"px",this.props.color&&(m.style.color=this.props.color),e.append(m)}return e},t.prototype.getOriginDate=function(e){void 0===e&&(e=null);var t=e||new Date,n=1e3*this.props.clockTimezoneOffset,r=60*t.getTimezoneOffset()*1e3,i=t.getTime()+n+r;return new Date(i)},t.prototype.getHumanTimezone=function(e){void 0===e&&(e=this.props.clockTimezone);var t=e.split("/")[1];return(void 0===t?"":t).replace("_"," ")},t.prototype.getElementSize=function(e,t){switch(void 0===e&&(e=this.props.width),void 0===t&&(t=this.props.height),this.props.clockType){case"analogic":var n=100;e>0&&t>0?n=Math.min(e,t):e>0?n=e:t>0&&(n=t);var r=0;return"datetime"===this.props.clockFormat&&(r=t/8),{width:n,height:n+r};case"digital":return e>0&&t>0?t=e/2<t?e/2:t:e>0?t=e/2:t>0?e=2*t:(e=100,t=50),{width:e,height:t};default:throw new Error("invalid clock type.")}},t.TICK_INTERVAL=1e3,t}(o.a),q=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Y=function(){return(Y=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function X(e){return Y(Y({},Object(o.b)(e)),{type:12,label:null,isLinkEnabled:!1,parentId:null,aclGroupId:null,borderWidth:Object(i.n)(e.borderWidth,0),borderColor:Object(i.k)(e.borderColor,null),fillColor:Object(i.k)(e.fillColor,null),fillTransparent:e.fillTransparent})}var J=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return q(t,e),t.prototype.createDomElement=function(){var e=document.createElement("div");if(e.className="box",e.style.boxSizing="border-box",this.props.fillTransparent?e.style.backgroundColor="transparent":this.props.fillColor&&(e.style.backgroundColor=this.props.fillColor),this.props.borderWidth>0){e.style.borderStyle="solid";var t=Math.min(this.props.width,this.props.height)/2,n=Math.min(this.props.borderWidth,t);e.style.borderWidth=n+"px",this.props.borderColor&&(e.style.borderColor=this.props.borderColor)}return e},t.prototype.updateDomElement=function(e){if(this.props.fillTransparent?e.style.backgroundColor="transparent":this.props.fillColor&&(e.style.backgroundColor=this.props.fillColor),this.props.borderWidth>0){e.style.borderStyle="solid";var t=Math.min(this.props.width,this.props.height)/2,n=Math.min(this.props.borderWidth,t);e.style.borderWidth=n+"px",this.props.borderColor&&(e.style.borderColor=this.props.borderColor)}},t}(o.a),Z=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Q=function(){return(Q=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function $(e){return Q(Q(Q({},Object(o.b)(e)),{type:4}),Object(i.i)(e))}var ee=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Z(t,e),t.prototype.createDomElement=function(){var e=document.createElement("div");return e.className="label",e.innerHTML=this.getLabelWithMacrosReplaced(),e},t.prototype.createLabelDomElement=function(){var e=document.createElement("div");return e.className="visual-console-item-label",e},t}(o.a),te=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ne=function(){return(ne=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},re=function(e){switch(e){case"string":case"image":return e;default:return"string"}};function ie(e){if("string"!=typeof e.value||0===e.value.length)throw new TypeError("invalid value");var t=function(e){switch(e){case"none":case"avg":case"max":case"min":return e;default:return"none"}}(e.processValue);return ne(ne(ne(ne(ne({},Object(o.b)(e)),{type:2,valueType:re(e.valueType),value:e.value}),"none"===t?{processValue:t}:{processValue:t,period:Object(i.n)(e.period,0)}),Object(i.j)(e)),Object(i.i)(e))}var oe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return te(t,e),t.prototype.createDomElement=function(){var e=document.createElement("div");if(e.className="simple-value",!0!==this.props.agentDisabled&&!0!==this.props.moduleDisabled||(e.style.opacity="0.2"),"image"===this.props.valueType){var t=document.createElement("img");t.src=this.props.value,e.append(t)}else{var n=this.props.value,r=this.getLabelWithMacrosReplaced();r.length>0&&(n=Object(i.q)([{macro:/\(?_VALUE_\)?/i,value:n}],r)),e.innerHTML=n}return e},t.prototype.createLabelDomElement=function(){var e=document.createElement("div");return e.className="visual-console-item-label",e},t}(o.a),se=n(6),ae=Math.PI,le=2*ae,ce=le-1e-6;function pe(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function ue(){return new pe}pe.prototype=ue.prototype={constructor:pe,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,n,r){this._+="Q"+ +e+","+ +t+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(e,t,n,r,i,o){this._+="C"+ +e+","+ +t+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(e,t,n,r,i){e=+e,t=+t,n=+n,r=+r,i=+i;var o=this._x1,s=this._y1,a=n-e,l=r-t,c=o-e,p=s-t,u=c*c+p*p;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(u>1e-6)if(Math.abs(p*a-l*c)>1e-6&&i){var d=n-o,h=r-s,m=a*a+l*l,f=d*d+h*h,b=Math.sqrt(m),v=Math.sqrt(u),g=i*Math.tan((ae-Math.acos((m+u-f)/(2*b*v)))/2),y=g/v,_=g/b;Math.abs(y-1)>1e-6&&(this._+="L"+(e+y*c)+","+(t+y*p)),this._+="A"+i+","+i+",0,0,"+ +(p*d>c*h)+","+(this._x1=e+_*a)+","+(this._y1=t+_*l)}else this._+="L"+(this._x1=e)+","+(this._y1=t);else;},arc:function(e,t,n,r,i,o){e=+e,t=+t,o=!!o;var s=(n=+n)*Math.cos(r),a=n*Math.sin(r),l=e+s,c=t+a,p=1^o,u=o?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+l+","+c:(Math.abs(this._x1-l)>1e-6||Math.abs(this._y1-c)>1e-6)&&(this._+="L"+l+","+c),n&&(u<0&&(u=u%le+le),u>ce?this._+="A"+n+","+n+",0,1,"+p+","+(e-s)+","+(t-a)+"A"+n+","+n+",0,1,"+p+","+(this._x1=l)+","+(this._y1=c):u>1e-6&&(this._+="A"+n+","+n+",0,"+ +(u>=ae)+","+p+","+(this._x1=e+n*Math.cos(i))+","+(this._y1=t+n*Math.sin(i))))},rect:function(e,t,n,r){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};var de=ue,he=function(e){return function(){return e}},me=Math.abs,fe=Math.atan2,be=Math.cos,ve=Math.max,ge=Math.min,ye=Math.sin,_e=Math.sqrt,Ee=Math.PI,Oe=Ee/2,we=2*Ee;function Me(e){return e>1?0:e<-1?Ee:Math.acos(e)}function Ce(e){return e>=1?Oe:e<=-1?-Oe:Math.asin(e)}function ke(e){return e.innerRadius}function xe(e){return e.outerRadius}function Ae(e){return e.startAngle}function je(e){return e.endAngle}function Pe(e){return e&&e.padAngle}function Ie(e,t,n,r,i,o,s,a){var l=n-e,c=r-t,p=s-i,u=a-o,d=u*l-p*c;if(!(d*d<1e-12))return[e+(d=(p*(t-o)-u*(e-i))/d)*l,t+d*c]}function Te(e,t,n,r,i,o,s){var a=e-n,l=t-r,c=(s?o:-o)/_e(a*a+l*l),p=c*l,u=-c*a,d=e+p,h=t+u,m=n+p,f=r+u,b=(d+m)/2,v=(h+f)/2,g=m-d,y=f-h,_=g*g+y*y,E=i-o,O=d*f-m*h,w=(y<0?-1:1)*_e(ve(0,E*E*_-O*O)),M=(O*y-g*w)/_,C=(-O*g-y*w)/_,k=(O*y+g*w)/_,x=(-O*g+y*w)/_,A=M-b,j=C-v,P=k-b,I=x-v;return A*A+j*j>P*P+I*I&&(M=k,C=x),{cx:M,cy:C,x01:-p,y01:-u,x11:M*(i/E-1),y11:C*(i/E-1)}}var Le=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),De=function(){return(De=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function Re(e){switch(e){case"progress-bar":case"bubble":case"circular-progress-bar":case"circular-progress-bar-alt":return e;default:case 3:return"progress-bar";case 9:return"bubble";case 15:return"circular-progress-bar";case 16:return"circular-progress-bar-alt"}}function Se(e){switch(e){case"percent":case"value":return e;default:return"percent"}}function Ne(e){return De(De(De(De({},Object(o.b)(e)),{type:3,percentileType:Re(e.percentileType||e.type),valueType:Se(e.valueType),minValue:Object(i.n)(e.minValue,null),maxValue:Object(i.n)(e.maxValue,null),color:Object(i.k)(e.color,null),labelColor:Object(i.k)(e.labelColor,null),value:Object(i.m)(e.value,null),unit:Object(i.k)(e.unit,null)}),Object(i.j)(e)),Object(i.i)(e))}var Be="http://www.w3.org/2000/svg",ze=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Le(t,e),t.prototype.createDomElement=function(){var e,t={background:"#000000",progress:this.props.color||"#F0F0F0",text:this.props.labelColor||"#444444"},n=this.getProgress(),r=document.createElement("div");null!=this.props.value&&(e=Intl?Intl.NumberFormat("en-EN").format(this.props.value):this.props.value);var i=document.createElementNS(Be,"svg");switch(this.props.percentileType){case"progress-bar":var o=document.createElementNS(Be,"rect");o.setAttribute("fill",t.background),o.setAttribute("fill-opacity","0.5"),o.setAttribute("width","100%"),o.setAttribute("height","100%"),o.setAttribute("rx","5"),o.setAttribute("ry","5");var s=document.createElementNS(Be,"rect");s.setAttribute("fill",t.progress),s.setAttribute("fill-opacity","1"),s.setAttribute("width",n+"%"),s.setAttribute("height","100%"),s.setAttribute("rx","5"),s.setAttribute("ry","5"),(u=document.createElementNS(Be,"text")).setAttribute("text-anchor","middle"),u.setAttribute("alignment-baseline","middle"),u.setAttribute("font-size","15"),u.setAttribute("font-family","lato"),u.setAttribute("font-weight","bold"),u.setAttribute("transform","translate("+this.props.width/2+", 17.5)"),u.setAttribute("fill",t.text),"value"===this.props.valueType?(u.style.fontSize="6pt",u.textContent=this.props.unit?e+" "+this.props.unit:""+e):u.textContent=n+"%",i.setAttribute("width","100%"),i.setAttribute("height","100%"),i.append(o,s,u);break;case"bubble":case"circular-progress-bar":case"circular-progress-bar-alt":if(i.setAttribute("viewBox","0 0 100 100"),"bubble"===this.props.percentileType){(a=document.createElementNS(Be,"circle")).setAttribute("transform","translate(50 50)"),a.setAttribute("fill",t.background),a.setAttribute("fill-opacity","0.5"),a.setAttribute("r","50"),(l=document.createElementNS(Be,"circle")).setAttribute("transform","translate(50 50)"),l.setAttribute("fill",t.progress),l.setAttribute("fill-opacity","1"),l.setAttribute("r",""+n/2),i.append(a,l)}else{var a,l,c={innerRadius:"circular-progress-bar"===this.props.percentileType?30:0,outerRadius:50,startAngle:0,endAngle:2*Math.PI},p=function(){var e=ke,t=xe,n=he(0),r=null,i=Ae,o=je,s=Pe,a=null;function l(){var l,c,p=+e.apply(this,arguments),u=+t.apply(this,arguments),d=i.apply(this,arguments)-Oe,h=o.apply(this,arguments)-Oe,m=me(h-d),f=h>d;if(a||(a=l=de()),u<p&&(c=u,u=p,p=c),u>1e-12)if(m>we-1e-12)a.moveTo(u*be(d),u*ye(d)),a.arc(0,0,u,d,h,!f),p>1e-12&&(a.moveTo(p*be(h),p*ye(h)),a.arc(0,0,p,h,d,f));else{var b,v,g=d,y=h,_=d,E=h,O=m,w=m,M=s.apply(this,arguments)/2,C=M>1e-12&&(r?+r.apply(this,arguments):_e(p*p+u*u)),k=ge(me(u-p)/2,+n.apply(this,arguments)),x=k,A=k;if(C>1e-12){var j=Ce(C/p*ye(M)),P=Ce(C/u*ye(M));(O-=2*j)>1e-12?(_+=j*=f?1:-1,E-=j):(O=0,_=E=(d+h)/2),(w-=2*P)>1e-12?(g+=P*=f?1:-1,y-=P):(w=0,g=y=(d+h)/2)}var I=u*be(g),T=u*ye(g),L=p*be(E),D=p*ye(E);if(k>1e-12){var R,S=u*be(y),N=u*ye(y),B=p*be(_),z=p*ye(_);if(m<Ee&&(R=Ie(I,T,B,z,S,N,L,D))){var W=I-R[0],H=T-R[1],G=S-R[0],U=N-R[1],F=1/ye(Me((W*G+H*U)/(_e(W*W+H*H)*_e(G*G+U*U)))/2),V=_e(R[0]*R[0]+R[1]*R[1]);x=ge(k,(p-V)/(F-1)),A=ge(k,(u-V)/(F+1))}}w>1e-12?A>1e-12?(b=Te(B,z,I,T,u,A,f),v=Te(S,N,L,D,u,A,f),a.moveTo(b.cx+b.x01,b.cy+b.y01),A<k?a.arc(b.cx,b.cy,A,fe(b.y01,b.x01),fe(v.y01,v.x01),!f):(a.arc(b.cx,b.cy,A,fe(b.y01,b.x01),fe(b.y11,b.x11),!f),a.arc(0,0,u,fe(b.cy+b.y11,b.cx+b.x11),fe(v.cy+v.y11,v.cx+v.x11),!f),a.arc(v.cx,v.cy,A,fe(v.y11,v.x11),fe(v.y01,v.x01),!f))):(a.moveTo(I,T),a.arc(0,0,u,g,y,!f)):a.moveTo(I,T),p>1e-12&&O>1e-12?x>1e-12?(b=Te(L,D,S,N,p,-x,f),v=Te(I,T,B,z,p,-x,f),a.lineTo(b.cx+b.x01,b.cy+b.y01),x<k?a.arc(b.cx,b.cy,x,fe(b.y01,b.x01),fe(v.y01,v.x01),!f):(a.arc(b.cx,b.cy,x,fe(b.y01,b.x01),fe(b.y11,b.x11),!f),a.arc(0,0,p,fe(b.cy+b.y11,b.cx+b.x11),fe(v.cy+v.y11,v.cx+v.x11),f),a.arc(v.cx,v.cy,x,fe(v.y11,v.x11),fe(v.y01,v.x01),!f))):a.arc(0,0,p,E,_,f):a.lineTo(L,D)}else a.moveTo(0,0);if(a.closePath(),l)return a=null,l+""||null}return l.centroid=function(){var n=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-Ee/2;return[be(r)*n,ye(r)*n]},l.innerRadius=function(t){return arguments.length?(e="function"==typeof t?t:he(+t),l):e},l.outerRadius=function(e){return arguments.length?(t="function"==typeof e?e:he(+e),l):t},l.cornerRadius=function(e){return arguments.length?(n="function"==typeof e?e:he(+e),l):n},l.padRadius=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:he(+e),l):r},l.startAngle=function(e){return arguments.length?(i="function"==typeof e?e:he(+e),l):i},l.endAngle=function(e){return arguments.length?(o="function"==typeof e?e:he(+e),l):o},l.padAngle=function(e){return arguments.length?(s="function"==typeof e?e:he(+e),l):s},l.context=function(e){return arguments.length?(a=null==e?null:e,l):a},l}();(a=document.createElementNS(Be,"path")).setAttribute("transform","translate(50 50)"),a.setAttribute("fill",t.background),a.setAttribute("fill-opacity","0.5"),a.setAttribute("d",""+p(c)),(l=document.createElementNS(Be,"path")).setAttribute("transform","translate(50 50)"),l.setAttribute("fill",t.progress),l.setAttribute("fill-opacity","1"),l.setAttribute("d",""+p(De(De({},c),{endAngle:c.endAngle*(n/100)}))),i.append(a,l)}var u;if((u=document.createElementNS(Be,"text")).setAttribute("text-anchor","middle"),u.setAttribute("alignment-baseline","middle"),u.setAttribute("font-size","16"),u.setAttribute("font-family","lato"),u.setAttribute("font-weight","bold"),u.setAttribute("fill",t.text),"value"===this.props.valueType&&null!=this.props.value)if(this.props.unit&&this.props.unit.length>0){var d=document.createElementNS(Be,"tspan");d.setAttribute("x","0"),d.setAttribute("dy","1em"),d.textContent=""+e,d.style.fontSize="8pt";var h=document.createElementNS(Be,"tspan");h.setAttribute("x","0"),h.setAttribute("dy","1em"),h.textContent=""+this.props.unit,h.style.fontSize="8pt",u.append(d,h),u.setAttribute("transform","translate(50 33)")}else u.textContent=""+e,u.style.fontSize="8pt",u.setAttribute("transform","translate(50 50)");else u.textContent=n+"%",u.setAttribute("transform","translate(50 50)");i.append(u)}return!0!==this.props.agentDisabled&&!0!==this.props.moduleDisabled||i.setAttribute("opacity","0.2"),null!==i&&r.append(i),r},t.prototype.updateDomElement=function(e){!1===this.meta.isBeingResized&&this.resizeElement(this.props.width,this.props.height),e.innerHTML=this.createDomElement().innerHTML},t.prototype.resizeElement=function(t,n){"progress-bar"===this.props.percentileType?e.prototype.resizeElement.call(this,t,35):e.prototype.resizeElement.call(this,t,t)},t.prototype.resize=function(t){this.resizeElement(t,t);var n=this.props.maxValue||0;"progress-bar"===this.props.percentileType&&(n=35),e.prototype.setProps.call(this,De(De({},this.props),{width:t,height:n}))},t.prototype.getProgress=function(){var e=this.props.minValue||0,t=this.props.maxValue||100,n=null==this.props.value?0:this.props.value;return n<=e?0:n>=t?100:Math.trunc((n-e)/(t-e)*100)},t}(o.a),We=n(7),He=n(8),Ge=n(9),Ue=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Fe=function(){return(Fe=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function Ve(e){if(null!==e.imageSrc){if("string"!=typeof e.statusImageSrc||0===e.imageSrc.statusImageSrc)throw new TypeError("invalid status image src.")}else if(Object(i.s)(e.encodedTitle))throw new TypeError("missing encode tittle content.");if(null===Object(i.n)(e.serviceId,null))throw new TypeError("invalid service id.");return Fe(Fe({},Object(o.b)(e)),{type:10,serviceId:e.serviceId,imageSrc:Object(i.k)(e.imageSrc,null),statusImageSrc:Object(i.k)(e.statusImageSrc,null),encodedTitle:Object(i.k)(e.encodedTitle,null)})}var Ke=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ue(t,e),t.prototype.createDomElement=function(){var e=document.createElement("div");return e.className="service",null!==this.props.statusImageSrc?(e.style.background="url("+this.props.statusImageSrc+") no-repeat",e.style.backgroundSize="contain",e.style.backgroundPosition="center",null!==this.props.encodedTitle&&(e.className="service image forced_title",e.setAttribute("data-use_title_for_force_title","1"),e.setAttribute("data-title",Object(i.d)(this.props.encodedTitle)))):null!==this.props.encodedTitle&&(e.innerHTML=Object(i.d)(this.props.encodedTitle)),e},t.prototype.updateDomElement=function(e){null!==this.props.statusImageSrc?(e.style.background="url("+this.props.statusImageSrc+") no-repeat",e.style.backgroundSize="contain",e.style.backgroundPosition="center",null!==this.props.encodedTitle&&(e.className="service image forced_title",e.setAttribute("data-use_title_for_force_title","1"),e.setAttribute("data-title",Object(i.d)(this.props.encodedTitle))),e.innerHTML=""):null!==this.props.encodedTitle&&(e.innerHTML=Object(i.d)(this.props.encodedTitle))},t}(o.a),qe=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ye=function(){return(Ye=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function Xe(e){return Ye(Ye(Ye({},Object(o.b)(e)),{type:22,value:Object(i.n)(e.value,0),status:Object(i.s)(e.status)?"#B2B2B2":e.status,titleColor:Object(i.s)(e.titleColor)?"#3f3f3f":e.titleColor,title:Object(i.s)(e.title)?"":e.title,titleModule:Object(i.s)(e.titleModule)?"":e.titleModule,thresholds:Object(i.s)(e.thresholds)?"":e.thresholds,minMaxValue:Object(i.s)(e.minMaxValue)?"":e.minMaxValue,odometerType:Object(i.s)(e.odometerType)?"percent":e.odometerType}),Object(i.j)(e))}var Je,Ze=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return qe(t,e),t.prototype.createDomElement=function(){var e="",t="",n="",r="";if(""!==this.props.thresholds){var i=JSON.parse(this.props.thresholds);null!==i&&(0==i.min_warning&&0==i.max_warning||(e=this.getCoords(i.min_warning,this.props.width/2),t=0==i.max_warning?this.getCoords(100,this.props.width/2):this.getCoords(i.max_warning,this.props.width/2)),0==i.min_critical&&0==i.max_critical||(n=this.getCoords(i.min_critical,this.props.width/2),r=0==i.max_critical?this.getCoords(100,this.props.width/2):this.getCoords(i.max_critical,this.props.width/2)))}var o,s="";Number(this.props.value)===this.props.value&&this.props.value%1!=0?o=this.props.value.toFixed(1):(s=""===this.props.minMaxValue?" %":this.getSubfix(this.props.value),o=new Intl.NumberFormat("es",{maximumSignificantDigits:4,maximumFractionDigits:3}).format(this.props.value));var a=o.match(/\d*\.\d/);null!==a&&(o=a[0]);var l=this.getRotate(this.props.value),c=document.getElementById("visual-console-container");null===c&&(c=document.getElementById("visual-console-container-"+this.props.cellId)),""==c.style.backgroundColor&&(c.style.backgroundColor="#fff");var p=.7*this.props.width,u=document.createElement("div");u.className="odometer",!0!==this.props.agentDisabled&&!0!==this.props.moduleDisabled||(u.style.opacity="0.2");var d=document.createElement("div");d.className="odometer-container";var h=document.createElement("div");h.className="odometer-a",h.style.backgroundColor=""+c.style.backgroundColor;var m=document.createElement("div");m.className="odometer-b",m.id="odometerB-"+this.props.id,m.style.backgroundColor=""+this.props.status;var f=document.createElement("div");f.className="odometer-c";var b=document.createElement("div");b.className="odometer-d";var v="http://www.w3.org/2000/svg";if(""!=e){var g=document.createElementNS(v,"svg");g.setAttributeNS(null,"width","100%"),g.setAttributeNS(null,"height","100%"),g.setAttributeNS(null,"style","position:absolute;z-index:1");var y=document.createElementNS(v,"path");y.setAttributeNS(null,"id","svgWarning-"+this.props.id),y.setAttributeNS(null,"d","M"+this.props.width/2+","+this.props.width/2+"L"+e+"A"+this.props.width/2+","+this.props.width/2+",0,0,1,"+t+"Z"),y.setAttributeNS(null,"class","svg_warning"),g.appendChild(y),d.appendChild(g)}if(""!=n){var _=document.createElementNS(v,"svg");_.setAttributeNS(null,"width","100%"),_.setAttributeNS(null,"height","100%"),_.setAttributeNS(null,"style","position:absolute;z-index:2");var E=document.createElementNS(v,"path");E.setAttributeNS(null,"id","svgCritical-"+this.props.id),E.setAttributeNS(null,"d","M"+this.props.width/2+","+this.props.width/2+"L"+n+"A"+this.props.width/2+","+this.props.width/2+",0,0,1,"+r+"Z"),E.setAttributeNS(null,"fill","#E63C52"),_.appendChild(E),d.appendChild(_)}var O=document.createElement("h1");O.innerText=o+s,O.style.fontSize=.17*p+"px",O.style.color=""+this.props.status,O.style.lineHeight="0";var w=document.createElement("h2");""==this.props.title?w.textContent=this.truncateTitle(this.props.moduleName):w.textContent=this.truncateTitle(this.props.title),w.title=this.props.titleModule,w.setAttribute("title",this.props.titleModule),w.style.fontSize=.06*p+"px",w.style.color=""+this.props.titleColor,w.style.lineHeight="0";var M=document.createElement("script");return M.type="text/javascript",M.onload=function(){m.style.transform="rotate("+l+"turn)"},void 0!==this.props.metaconsoleId?M.src="./../../include/javascript/pandora_alerts.js":M.src="./include/javascript/pandora_alerts.js",h.appendChild(O),h.appendChild(w),d.appendChild(m),d.appendChild(f),d.appendChild(b),d.appendChild(h),d.appendChild(M),u.appendChild(d),u},t.prototype.updateDomElement=function(e){var t=this;e.innerHTML=this.createDomElement().innerHTML;var n=this.getRotate(this.props.value),r=document.getElementById("svgWarning-"+this.props.id);null!=r&&(r.style.display="none");var i=document.getElementById("svgCritical-"+this.props.id);null!=i&&(i.style.display="none"),setTimeout((function(){null!=r&&(r.style.display="block"),null!=i&&(i.style.display="block");var e=document.getElementById("odometerB-"+t.props.id);e&&(e.style.transform="rotate("+n+"turn)")}),500)},t.prototype.resizeElement=function(t){e.prototype.resizeElement.call(this,t,t/2)},t.prototype.resize=function(e){this.resizeElement(this.props.width)},t.prototype.getRotate=function(e){var t=0;if(""===this.props.minMaxValue)t=e/2/100;else{var n=JSON.parse(this.props.minMaxValue);if(n.min===e)t=0;else if(n.max===e)t=.5;else{var r=n.max-n.min;t=(100-100*(n.max-e)/r)/100/2}}return t},t.prototype.getSubfix=function(e){var t="",n=(e+"").length;return n>3&&n<=6?t=" K":n>6&&n<=9?t=" M":n>9&&n<=12?t=" G":n>12&&n<=15&&(t=" T"),t},t.prototype.getCoords=function(e,t){if(""===this.props.minMaxValue)e=e;else{var n=JSON.parse(this.props.minMaxValue);if(n.min===e)e=0;else if(n.max===e||100===e)e=100;else{var r=n.max-n.min;e=100-100*(n.max-e)/r}}return e=180-1.8*e,t+Math.cos(e*Math.PI/180)*t+","+(t-Math.sin(e*Math.PI/180)*t)},t.prototype.truncateTitle=function(e){if(null!=e&&e.length>22){var t=e.length/2,n=t-9;return e.substr(0,t-n)+"..."+e.substr(t+n)}return e},t}(o.a),Qe=n(10),$e=function(){return($e=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function et(e){var t=Object(i.n)(e.type,null);if(null==t)throw new TypeError("missing item type.");switch(t){case 0:return c(e);case 1:return Object(Ge.b)(e);case 2:case 6:case 7:case 8:return ie(e);case 3:case 9:case 15:case 16:return Ne(e);case 4:return $(e);case 5:return h(e);case 10:return Ve(e);case 11:return z(e);case 12:return X(e);case 13:return j(e);case 14:return Object(se.b)(e);case 17:return Object(We.b)(e);case 18:return Object(He.a)(e);case 19:return V(e);case 20:return E(e);case 21:return R(e);case 22:return Xe(e);case 23:return Object(Qe.a)(e);default:throw new TypeError("decoder not found")}}var tt=function(){function e(e,t,n){var r=this;this.elementsById={},this.elementIds=[],this.relations={},this.lineLinks={},this.lines={},this.clickEventManager=new k.a,this.dblClickEventManager=new k.a,this.movedEventManager=new k.a,this.lineMovedEventManager=new k.a,this.resizedEventManager=new k.a,this.selectionChangedEventManager=new k.a,this.disposables=[],this.handleElementClick=function(e){r.clickEventManager.emit(e)},this.handleElementDblClick=function(e){r.dblClickEventManager.emit(e)},this.handleElementMovement=function(e){var t=e.item.props.id;r.getItemRelations(t).forEach((function(n){n.parentId===t?n.line.props=$e($e({},n.line.props),{startPosition:r.getVisualCenter(e.newPosition,e.item)}):n.childId===t&&(n.line.props=$e($e({},n.line.props),{endPosition:r.getVisualCenter(e.newPosition,e.item)}))})),r.updateLinesConnected(e.item.props,e.newPosition,!1)},this.handleElementMovementFinished=function(e){r.movedEventManager.emit(e),r.updateLinesConnected(e.item.props,e.newPosition,!0)},this.handleLineElementMovementFinished=function(e){r.refreshLink(e.item),r.lineMovedEventManager.emit(e)},this.handleElementResizement=function(e){var t=e.item,n=t.props,i=n.id,o=r.getItemRelations(i),s={x:n.x,y:n.y},a=r.elementsById[i].meta;r.elementsById[i].meta=$e($e({},a),{isUpdating:!0}),o.forEach((function(e){e.parentId===i?e.line.props=$e($e({},e.line.props),{startPosition:r.getVisualCenter(s,t)}):e.childId===i&&(e.line.props=$e($e({},e.line.props),{endPosition:r.getVisualCenter(s,t)}))}))},this.handleElementResizementFinished=function(e){r.resizedEventManager.emit(e)},this.handleElementRemove=function(e){r.elementIds=r.elementIds.filter((function(t){return t!==e.item.props.id})),delete r.elementsById[e.item.props.id],r.clearRelations(e.item.props.id)},this.handleElementSelectionChanged=function(e){r.elements.filter((function(e){return 1==e.meta.isSelected})).length>0?e.selected=!0:e.selected=!1,r.selectionChangedEventManager.emit(e)},this.handleContainerClick=function(){r.unSelectItems()},this.containerRef=e,this._props=function(e){var t=e.id,n=e.name,r=e.groupId,o=e.backgroundURL,s=e.backgroundColor,a=e.isFavorite,l=e.relationLineWidth,c=e.maintenanceMode;if(null==t||isNaN(parseInt(t)))throw new TypeError("invalid Id.");if("string"!=typeof n||0===n.length)throw new TypeError("invalid name.");if(null==r||isNaN(parseInt(r)))throw new TypeError("invalid group Id.");return $e({id:parseInt(t),name:n,groupId:parseInt(r),backgroundURL:Object(i.k)(o,null),backgroundColor:Object(i.k)(s,null),isFavorite:Object(i.l)(a),relationLineWidth:Object(i.n)(l,0),maintenanceMode:c},Object(i.r)(e))}(t),this.render(),(n=n.sort((function(e,t){return null==e.id||null==t.id?0:e.id>t.id?1:-1}))).forEach((function(e){return r.addElement(e,r)})),this.buildRelations(),this.elements.forEach((function(e){e instanceof T&&r.refreshLink(e)})),this.containerRef.addEventListener("click",this.handleContainerClick)}return e.prototype.coordinatesInItem=function(e,t,n){return 13!=n.type&&21!=n.type&&(e>n.x&&e<n.x+n.width&&t>n.y&&t<n.y+n.height)},e.prototype.refreshLink=function(e){var t=e.props.id,n=0,r=0;try{for(var i in this.elementsById)this.coordinatesInItem(e.props.startPosition.x,e.props.startPosition.y,this.elementsById[i].props)&&(n=parseInt(i)),this.coordinatesInItem(e.props.endPosition.x,e.props.endPosition.y,this.elementsById[i].props)&&(r=parseInt(i));for(var i in null==this.lineLinks&&(this.lineLinks={}),null==this.lines&&(this.lines={}),n==t&&(n=0),r==t&&(r=0),null==this.lines[t]&&(this.lines[t]={start:n,end:r}),n>0?(null==this.lineLinks[n]&&(this.lineLinks[n]={}),this.lineLinks[n][t]={start:n,end:r}):this.lines[t].start>0&&(this.lineLinks[this.lines[t].start][t].start=0,this.lines[t].start=0),r>0?(null==this.lineLinks[r]&&(this.lineLinks[r]={}),this.lineLinks[r][t]={start:n,end:r}):this.lines[t].end>0&&(this.lineLinks[this.lines[t].end][t].end=0,this.lines[t].end=0),this.lines[t]={start:n,end:r},this.lineLinks)this.lineLinks[i][t]&&0==this.lineLinks[i][t].start&&0==this.lineLinks[i][t].end&&(delete this.lineLinks[i][t],0===Object.keys(this.lineLinks[i]).length&&delete this.lineLinks[i])}catch(e){console.error(e)}},e.prototype.updateLinesConnected=function(e,t,n){var r=this;null!=this.lineLinks[e.id]&&(Object.keys(this.lineLinks[e.id]).forEach((function(o){var s=parseInt(o);if(-1!==r.elementIds.indexOf(s)){var a=r.elementsById[s];if(a.props){var l=a.props.startPosition.x,c=a.props.startPosition.y,p=a.props.endPosition.x,u=a.props.endPosition.y;if(e.id==r.lineLinks[e.id][s].start&&(l=t.x+e.width/2,c=t.y+e.height/2),e.id==r.lineLinks[e.id][s].end&&(p=t.x+e.width/2,u=t.y+e.height/2),r.updateElement($e($e({},a.props),{startX:l,startY:c,endX:p,endY:u})),n)Object(i.c)(500,(function(e){r.lineMovedEventManager.emit({item:e.line,startPosition:{x:e.startX,y:e.startY},endPosition:{x:e.endX,y:e.endY}})}))({line:a,startX:l,startY:c,endX:p,endY:u})}}})),this.buildRelations(e.id,t.x+e.width/2,t.y+e.height/2))},Object.defineProperty(e.prototype,"elements",{get:function(){var e=this;return this.elementIds.map((function(t){return e.elementsById[t]})).filter((function(e){return null!=e}))},enumerable:!1,configurable:!0}),e.prototype.addElement=function(e,t){void 0===t&&(t=this);try{var n=function(e){var t=Object(i.n)(e.type,null);if(null==t)throw new TypeError("missing item type.");var n=Object(i.h)(e);switch(t){case 0:return new p(c(e),n);case 1:return new Ge.a(Object(Ge.b)(e),n);case 2:case 6:case 7:case 8:return new oe(ie(e),n);case 3:case 9:case 15:case 16:return new ze(Ne(e),n);case 4:return new ee($(e),n);case 5:return new m(h(e),n);case 10:return new Ke(Ve(e),n);case 11:return new W(z(e),n);case 12:return new J(X(e),n);case 13:return new T(j(e),n);case 14:return new se.a(Object(se.b)(e),n);case 17:return new We.a(Object(We.b)(e),n);case 18:return new He.b(Object(He.a)(e),n);case 19:return new K(V(e),n);case 20:return new C(E(e),n);case 21:return new S(R(e),n);case 22:return new Ze(Xe(e),n);case 23:return new Qe.b(Object(Qe.a)(e),n);default:throw new TypeError("item not found")}}(e);return t.elementsById[n.props.id]=n,t.elementIds.push(n.props.id),n.onRemove(t.handleElementRemove),n.onSelectionChanged(t.handleElementSelectionChanged),n.onClick(t.handleElementClick),n.onDblClick(t.handleElementDblClick),n instanceof T?(n.onLineMovementFinished(t.handleLineElementMovementFinished),this.refreshLink(n)):(n.onMoved(t.handleElementMovement),n.onMovementFinished(t.handleElementMovementFinished),n.onResized(t.handleElementResizement),n.onResizeFinished(t.handleElementResizementFinished)),t.containerRef.append(n.elementRef),n}catch(e){console.error("Error creating a new element:",e.message)}},e.prototype.updateElements=function(e){var t=this,n=e.map((function(e){return e.id||null})).filter((function(e){return null!=e}));this.elementIds.filter((function(e){return n.indexOf(e)<0})).forEach((function(e){null!=t.elementsById[e]&&(t.elementsById[e].remove(),delete t.elementsById[e])})),this.elementIds=n,e.forEach((function(e){if(e.id)if(null==t.elementsById[e.id])t.addElement(e);else try{t.elementsById[e.id].props=et(e)}catch(e){console.error("Error updating an element:",e.message)}})),this.buildRelations()},e.prototype.updateElement=function(e){try{this.elementsById[e.id].props=$e({},et(e))}catch(e){console.error("Error updating element:",e.message)}this.buildRelations()},Object.defineProperty(e.prototype,"props",{get:function(){return $e({},this._props)},set:function(e){var t=this.props;this._props=e,this.render(t)},enumerable:!1,configurable:!0}),e.prototype.render=function(e){void 0===e&&(e=null),e?(e.backgroundURL!==this.props.backgroundURL&&(this.containerRef.style.backgroundImage=null!==this.props.backgroundURL?"url("+this.props.backgroundURL+")":""),null!=this.props.backgroundColor&&e.backgroundColor!==this.props.backgroundColor&&(this.containerRef.style.backgroundColor=this.props.backgroundColor),this.sizeChanged(e,this.props)&&this.resizeElement(this.props.width,this.props.height)):(this.props.backgroundURL&&(this.containerRef.style.backgroundImage=null!==this.props.backgroundURL?"url("+this.props.backgroundURL+")":""),this.props.backgroundColor&&(this.containerRef.style.backgroundColor=this.props.backgroundColor),this.resizeElement(this.props.width,this.props.height))},e.prototype.sizeChanged=function(e,t){return e.width!==t.width||e.height!==t.height},e.prototype.resizeElement=function(e,t){this.containerRef.style.width=e+"px",this.containerRef.style.height=t+"px"},e.prototype.resize=function(e,t){this.props=$e($e({},this.props),{width:e,height:t})},e.prototype.remove=function(){this.disposables.forEach((function(e){return e.dispose()})),this.elements.forEach((function(e){return e.remove()})),this.elementsById={},this.elementIds=[],this.clearRelations(),this.containerRef.removeEventListener("click",this.handleContainerClick),this.containerRef.innerHTML=""},e.prototype.buildRelations=function(e,t,n){var r=this;this.clearRelations(),this.elements.forEach((function(i){if(null!==i.props.parentId){var o=r.elementsById[i.props.parentId],s=r.elementsById[i.props.id];o&&s&&(null!=e?i.props.parentId==e?r.addRelationLine(o,s,t,n):i.props.id==e?r.addRelationLine(o,s,void 0,void 0,t,n):r.addRelationLine(o,s):r.addRelationLine(o,s))}}))},e.prototype.clearRelations=function(e){if(null!=e)for(var t in this.relations){var n=t.split("|"),r=Number.parseInt(n[0]),i=Number.parseInt(n[1]);e!==r&&e!==i||(this.relations[t].remove(),delete this.relations[t])}else for(var t in this.relations)this.relations[t].remove(),delete this.relations[t]},e.prototype.getRelationLine=function(e,t){var n=e+"|"+t;return this.relations[n]||null},e.prototype.getItemRelations=function(e){var t=[];for(var n in this.relations){var r=n.split("|"),i=Number.parseInt(r[0]),o=Number.parseInt(r[1]);e!==i&&e!==o||t.push({parentId:i,childId:o,line:this.relations[n]})}return t},e.prototype.getVisualCenter=function(e,t){var n=e.x+t.elementRef.clientWidth/2,r=e.y+t.elementRef.clientHeight/2;if(void 0!==t.props.label||""!==t.props.label||null!==t.props.label)switch(t.props.labelPosition){case"up":r=e.y+(t.elementRef.clientHeight+t.labelElementRef.clientHeight)/2;break;case"down":r=e.y+(t.elementRef.clientHeight-t.labelElementRef.clientHeight)/2;break;case"right":n=e.x+(t.elementRef.clientWidth-t.labelElementRef.clientWidth)/2;break;case"left":n=e.x+(t.elementRef.clientWidth+t.labelElementRef.clientWidth)/2}return{x:n,y:r}},e.prototype.addRelationLine=function(e,t,n,r,o,s){var a=e.props.id+"|"+t.props.id;null!=this.relations[a]&&this.relations[a].remove();var l=this.getVisualCenter(e.props,e),c=l.x,p=l.y,u=this.getVisualCenter(t.props,t),d=u.x,h=u.y;null!=n&&(c=n),null!=r&&(p=r),null!=o&&(d=o),null!=s&&(h=s);var m=new T(j({id:0,type:13,startX:c,startY:p,endX:d,endY:h,width:0,height:0,lineWidth:this.props.relationLineWidth,color:Object(i.k)(t.props.colorStatus,"#CCC")}),Object(i.h)({receivedAt:new Date}));return this.relations[a]=m,m.elementRef.style.zIndex="0",this.containerRef.append(m.elementRef),m},e.prototype.onItemClick=function(e){var t=this.clickEventManager.on(e);return this.disposables.push(t),t},e.prototype.onItemDblClick=function(e){var t=this.dblClickEventManager.on(e);return this.disposables.push(t),t},e.prototype.onItemMoved=function(e){var t=this.movedEventManager.on(e);return this.disposables.push(t),t},e.prototype.onLineMoved=function(e){var t=this.lineMovedEventManager.on(e);return this.disposables.push(t),t},e.prototype.onItemResized=function(e){var t=this.resizedEventManager.on(e);return this.disposables.push(t),t},e.prototype.onItemSelectionChanged=function(e){var t=this.selectionChangedEventManager.on(e);return this.disposables.push(t),t},e.prototype.enableEditMode=function(){this.elements.forEach((function(e){e.meta=$e($e({},e.meta),{editMode:!0})})),this.containerRef.classList.add("is-editing")},e.prototype.disableEditMode=function(){this.elements.forEach((function(e){e.meta=$e($e({},e.meta),{editMode:!1})})),this.containerRef.classList.remove("is-editing")},e.prototype.enableMaintenanceMode=function(){this.elements.forEach((function(e){e.meta=$e($e({},e.meta),{maintenanceMode:!0})})),this.containerRef.classList.add("is-maintenance"),this.containerRef.classList.remove("is-editing")},e.prototype.disableMaintenanceMode=function(){this.elements.forEach((function(e){e.meta=$e($e({},e.meta),{maintenanceMode:!1})})),this.containerRef.classList.remove("is-maintenance"),this.containerRef.classList.add("is-editing")},e.prototype.selectItem=function(e,t){var n=this;void 0===t&&(t=!1),t?this.elementIds.forEach((function(t){var r=n.elementsById[t].meta;t!==e&&r.isSelected?n.elementsById[t].unSelectItem():t!==e||r.isSelected||n.elementsById[t].selectItem()})):this.elementsById[e]&&this.elementsById[e].selectItem()},e.prototype.unSelectItem=function(e){this.elementsById[e]&&(this.elementsById[e].meta.isSelected&&this.elementsById[e].unSelectItem())},e.prototype.unSelectItems=function(){var e=this;this.elementIds.forEach((function(t){e.elementsById[t]&&e.elementsById[t].unSelectItem()}))},e.itemDescriptiveName=function(e){var t;switch(e.props.type){case 0:t=Object(i.t)("Static graph")+" - "+e.props.imageSrc;break;case 1:t=Object(i.t)("Module graph");break;case 19:t=Object(i.t)("Clock");break;case 18:t=Object(i.t)("Bars graph");break;case 14:t=Object(i.t)("Event history graph");break;case 3:t=Object(i.t)("Percentile bar");break;case 15:t=Object(i.t)("Circular progress bar");break;case 16:t=Object(i.t)("Circular progress bar (interior)");break;case 2:t=Object(i.t)("Simple Value");break;case 4:t=Object(i.t)("Label");break;case 11:t=Object(i.t)("Group");break;case 20:t=Object(i.t)("Color cloud");break;case 5:t=Object(i.t)("Icon")+" - "+e.props.imageSrc;break;case 22:t=Object(i.t)("Odometer");break;case 23:t=Object(i.t)("BasicChart");break;default:t=Object(i.t)("Item")}var n=e.props;return null!=n.agentAlias&&null!=n.moduleName?t+=" ("+Object(i.e)(n.agentAlias,18)+" - "+Object(i.e)(n.moduleName,25)+")":null!=n.agentAlias&&(t+=" ("+Object(i.e)(n.agentAlias,25)+")"),t},e.items=((Je={})[0]=p,Je[1]=Ge.a,Je[2]=oe,Je[6]=oe,Je[7]=oe,Je[8]=oe,Je[3]=ze,Je[9]=ze,Je[15]=ze,Je[16]=ze,Je[4]=ee,Je[5]=m,Je[10]=Ke,Je[11]=W,Je[12]=J,Je[13]=T,Je[14]=se.a,Je[17]=We.a,Je[18]=He.b,Je[19]=K,Je[20]=C,Je[21]=S,Je[22]=Ze,Je[23]=Qe.b,Je),e}(),nt=function(){function e(e){this.cancellable={cancel:function(){}},this._status="waiting",this.statusChangeEventManager=new k.a,this.disposables=[],this.taskInitiator=e}return Object.defineProperty(e.prototype,"status",{get:function(){return this._status},set:function(e){this._status=e,this.statusChangeEventManager.emit(e)},enumerable:!1,configurable:!0}),e.prototype.init=function(){var e=this;this.cancellable=this.taskInitiator((function(){e.status="finished"})),this.status="started"},e.prototype.cancel=function(){this.cancellable.cancel(),this.status="cancelled"},e.prototype.onStatusChange=function(e){var t=this.statusChangeEventManager.on(e);return this.disposables.push(t),t},e}();var rt=function(){function e(){this.tasks={}}return e.prototype.add=function(e,t,n){void 0===n&&(n=0),this.tasks[e]&&"started"===this.tasks[e].status&&this.tasks[e].cancel();var r=n>0?function(e,t){return new nt((function(){var n=null;return e.onStatusChange((function(r){"finished"===r&&(n=window.setTimeout((function(){e.init()}),t))})),e.init(),{cancel:function(){n&&clearTimeout(n),e.cancel()}}}))}(new nt(t),n):new nt(t);return this.tasks[e]=r,this.tasks[e]},e.prototype.init=function(e){!this.tasks[e]||"waiting"!==this.tasks[e].status&&"cancelled"!==this.tasks[e].status&&"finished"!==this.tasks[e].status||this.tasks[e].init()},e.prototype.cancel=function(e){this.tasks[e]&&"started"===this.tasks[e].status&&this.tasks[e].cancel()},e}();window.VisualConsole=tt,window.VisualConsole.Form=f,window.AsyncTaskManager=rt}]);
|
|
//# sourceMappingURL=vc.main.min.js.map
|