pandorafms/pandora_console/include/visual-console-client/vc.main.min.js

2 lines
121 KiB
JavaScript

(function(){"use strict";var __webpack_modules__={630:function(e,t,n){n.r(t),n.d(t,{FormContainer:function(){return a},InputGroup:function(){return s}});var r=n(510),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},i.apply(this,arguments)},o=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},s=function(){function e(e,t){this._name="",this.currentData={},this.dataRequestedEventManager=new r.Z,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-".concat(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){void 0===t&&(t=[]),void 0===n&&(n=[]);var i=this;this.inputGroupsByName={},this.enabledInputGroupNames=[],this.submitEventManager=new r.Z,this.itemDataRequestedEventManager=new r.Z,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(o([],this.enabledInputGroupNames,!0),n.filter((function(e){return null!=i.inputGroupsByName[e]})),!0))}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,!0):t>=this.enabledInputGroupNames.length?this.enabledInputGroupNames=o(o([],this.enabledInputGroupNames,!0),[e.name],!1):this.enabledInputGroupNames=o(o(o([],this.enabledInputGroupNames.slice(0,t),!0),[e.name],!1),this.enabledInputGroupNames.slice(t),!0):this.enabledInputGroupNames=o(o([],this.enabledInputGroupNames,!0),[e.name],!1),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}()},478:function(e,t,n){n.d(t,{TB:function(){return l}});var r=n(541),i=n(510),o=n(630),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},s.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:(0,r.JW)(e.label,null),labelPosition:a(e.labelPosition),isLinkEnabled:(0,r.gx)(e.isLinkEnabled),link:(0,r.JW)(e.link,null),isOnTop:(0,r.gx)(e.isOnTop),parentId:(0,r.I1)(e.parentId,null),aclGroupId:(0,r.I1)(e.aclGroupId,null),cacheExpiration:(0,r.I1)(e.cacheExpiration,null),colorStatus:(0,r.JW)(e.colorStatus,"#CCC"),cellId:(0,r.I1)(e.cellId,null),alertOutline:(0,r.gx)(e.alertOutline)},(0,r.HY)(e)),(0,r.oF)(e))}var c=function(){function e(e,t,n){void 0===n&&(n=!1);var o=this;this.elementRef=document.createElement("div"),this.labelElementRef=document.createElement("div"),this.childElementRef=document.createElement("div"),this.clickEventManager=new i.Z,this.dblClickEventManager=new i.Z,this.movedEventManager=new i.Z,this.movementFinishedEventManager=new i.Z,this.resizedEventManager=new i.Z,this.resizeFinishedEventManager=new i.Z,this.removeEventManager=new i.Z,this.selectionChangedEventManager=new i.Z,this.disposables=[],this.debouncedMovementSave=(0,r.Ds)(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=(0,r.Ds)(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=(0,r.Dw)(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=(0,r.Aq)(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="".concat(this.props.x,"px"),e.style.top="".concat(this.props.y,"px"),this.props.alertOutline&&e.classList.add("is-alert-triggered"),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="".concat(this.props.width,"px"),n.style.height="");break;case"left":case"right":this.props.height>0&&(n.style.width="",n.style.height="".concat(this.props.height,"px"))}e.appendChild(n)}return e},e.prototype.getLabelWithMacrosReplaced=function(){var e=this.props;return(0,r.No)([{macro:"_date_",value:(0,r.rN)(new Date)},{macro:"_time_",value:(0,r.bc)(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.updateDomElement(this.childElementRef),e&&!this.positionChanged(e,this.props)||(this.moveElement(this.props.x,this.props.y),e&&13!=e.type&&21!=e.type&&this.updateDomElement(this.childElementRef)),e&&!this.sizeChanged(e,this.props)||(this.resizeElement(this.props.width,this.props.height),e&&13!=e.type&&21!=e.type&&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-alert-triggered")):(this.elementRef.classList.remove("is-editing"),this.props.alertOutline&&this.elementRef.classList.add("is-alert-triggered"))),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.setAttribute("id","item-selected-move")):(this.elementRef.classList.remove("is-selected"),this.elementRef.removeAttribute("id")))},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;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="".concat(this.props.width,"px"),n.style.height="");break;case"left":case"right":this.props.height>0&&(n.style.width="",n.style.height="".concat(this.props.height,"px"))}},e.prototype.moveElement=function(e,t){this.elementRef.style.left="".concat(e,"px"),this.elementRef.style.top="".concat(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?"".concat(e,"px"):"",this.childElementRef.style.height=t>0?"".concat(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?"".concat(e,"px"):"";break;case"left":case"right":r.style.height=t>0?"".concat(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=(0,r.t)("Static image");break;case 1:t=(0,r.t)("Module graph");break;case 2:case 6:case 7:case 8:t=(0,r.t)("Simple value");break;case 3:case 9:case 15:case 16:t=(0,r.t)("Percentile item");break;case 4:t=(0,r.t)("Label");break;case 5:t=(0,r.t)("Icon");break;case 10:t=(0,r.t)("Service");break;case 11:t=(0,r.t)("Group");break;case 12:t=(0,r.t)("Box");break;case 13:t=(0,r.t)("Line");break;case 14:t=(0,r.t)("Event history graph");break;case 17:t=(0,r.t)("Serialized pie graph");break;case 18:t=(0,r.t)("Bars graph");break;case 19:t=(0,r.t)("Clock");break;case 20:t=(0,r.t)("Color cloud");break;case 21:t=(0,r.t)("Network link");break;case 22:t=(0,r.t)("Odometer");break;case 23:t=(0,r.t)("Basic chart");break;default:t=(0,r.t)("Item")}return t}(e.type):(0,r.t)("Item");return new o.FormContainer(t,[],[])},e}();t.ZP=c},709:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{K:function(){return barsGraphPropsDecoder}});var _lib__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(541),_Item__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(478),__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)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},extendStatics(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");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},__assign.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((0,_lib__WEBPACK_IMPORTED_MODULE_0__.VJ)(e.html)&&(0,_lib__WEBPACK_IMPORTED_MODULE_0__.VJ)(e.encodedHtml))throw new TypeError("missing html content.");return __assign(__assign(__assign({},(0,_Item__WEBPACK_IMPORTED_MODULE_1__.TB)(e)),{type:18,html:(0,_lib__WEBPACK_IMPORTED_MODULE_0__.VJ)(e.html)?(0,_lib__WEBPACK_IMPORTED_MODULE_0__.NV)(e.encodedHtml):e.html,backgroundColor:parseBarsGraphProps(e.backgroundColor),typeGraph:parseTypeGraph(e.typeGraph),gridColor:(0,_lib__WEBPACK_IMPORTED_MODULE_0__.VJ)(e.gridColor)?"#000000":e.gridColor}),(0,_lib__WEBPACK_IMPORTED_MODULE_0__.MH)(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__.ZP);__webpack_exports__.Z=BarsGraph},880:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{u:function(){return basicChartPropsDecoder}});var _lib__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(541),_Item__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(478),__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)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},extendStatics(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");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},__assign.apply(this,arguments)};function basicChartPropsDecoder(e){if((0,_lib__WEBPACK_IMPORTED_MODULE_0__.VJ)(e.html)&&(0,_lib__WEBPACK_IMPORTED_MODULE_0__.VJ)(e.encodedHtml))throw new TypeError("missing html content.");return __assign(__assign(__assign(__assign({},(0,_Item__WEBPACK_IMPORTED_MODULE_1__.TB)(e)),{type:23,html:(0,_lib__WEBPACK_IMPORTED_MODULE_0__.VJ)(e.html)?(0,_lib__WEBPACK_IMPORTED_MODULE_0__.NV)(e.encodedHtml):e.html,period:(0,_lib__WEBPACK_IMPORTED_MODULE_0__.I1)(e.period,null),value:parseFloat(e.value),status:(0,_lib__WEBPACK_IMPORTED_MODULE_0__.VJ)(e.status)?"#B2B2B2":e.status,moduleNameColor:(0,_lib__WEBPACK_IMPORTED_MODULE_0__.VJ)(e.moduleNameColor)?"#3f3f3f":e.moduleNameColor}),(0,_lib__WEBPACK_IMPORTED_MODULE_0__.MH)(e)),(0,_lib__WEBPACK_IMPORTED_MODULE_0__.bs)(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="".concat(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="".concat(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="".concat(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="".concat(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){if(i=void 0!==i?i:1e3,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__.ZP);__webpack_exports__.Z=BasicChart},369:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{p:function(){return donutGraphPropsDecoder}});var _lib__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(541),_Item__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(478),__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)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},extendStatics(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");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},__assign.apply(this,arguments)};function donutGraphPropsDecoder(e){if((0,_lib__WEBPACK_IMPORTED_MODULE_0__.VJ)(e.html)&&(0,_lib__WEBPACK_IMPORTED_MODULE_0__.VJ)(e.encodedHtml))throw new TypeError("missing html content.");return __assign(__assign(__assign(__assign({},(0,_Item__WEBPACK_IMPORTED_MODULE_1__.TB)(e)),{type:17,html:(0,_lib__WEBPACK_IMPORTED_MODULE_0__.VJ)(e.html)?(0,_lib__WEBPACK_IMPORTED_MODULE_0__.NV)(e.encodedHtml):e.html,legendBackgroundColor:(0,_lib__WEBPACK_IMPORTED_MODULE_0__.VJ)(e.legendBackgroundColor)?"#ffffff":e.legendBackgroundColor}),(0,_lib__WEBPACK_IMPORTED_MODULE_0__.MH)(e)),(0,_lib__WEBPACK_IMPORTED_MODULE_0__.bs)(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,element.style.backgroundColor=this.props.legendBackgroundColor,!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},DonutGraph.prototype.updateDomElement=function(element){element.innerHTML=this.props.html,element.style.backgroundColor=this.props.legendBackgroundColor,!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())},DonutGraph}(_Item__WEBPACK_IMPORTED_MODULE_1__.ZP);__webpack_exports__.Z=DonutGraph},280:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{o:function(){return eventsHistoryPropsDecoder}});var _lib__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(541),_Item__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(478),__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)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},extendStatics(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");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},__assign.apply(this,arguments)};function eventsHistoryPropsDecoder(e){if((0,_lib__WEBPACK_IMPORTED_MODULE_0__.VJ)(e.html)&&(0,_lib__WEBPACK_IMPORTED_MODULE_0__.VJ)(e.encodedHtml))throw new TypeError("missing html content.");return __assign(__assign(__assign({},(0,_Item__WEBPACK_IMPORTED_MODULE_1__.TB)(e)),{type:14,maxTime:(0,_lib__WEBPACK_IMPORTED_MODULE_0__.I1)(e.maxTime,null),legendColor:e.legendColor,html:(0,_lib__WEBPACK_IMPORTED_MODULE_0__.VJ)(e.html)?(0,_lib__WEBPACK_IMPORTED_MODULE_0__.NV)(e.encodedHtml):e.html}),(0,_lib__WEBPACK_IMPORTED_MODULE_0__.MH)(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__.ZP);__webpack_exports__.Z=EventsHistory},600:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{C:function(){return moduleGraphPropsDecoder}});var _lib__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(541),_Item__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(478),__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)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},extendStatics(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");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},__assign.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((0,_lib__WEBPACK_IMPORTED_MODULE_0__.VJ)(e.html)&&(0,_lib__WEBPACK_IMPORTED_MODULE_0__.VJ)(e.encodedHtml))throw new TypeError("missing html content.");return __assign(__assign(__assign(__assign({},(0,_Item__WEBPACK_IMPORTED_MODULE_1__.TB)(e)),{type:1,html:(0,_lib__WEBPACK_IMPORTED_MODULE_0__.VJ)(e.html)?(0,_lib__WEBPACK_IMPORTED_MODULE_0__.NV)(e.encodedHtml):e.html,backgroundType:parseBackgroundType(e.backgroundType),period:(0,_lib__WEBPACK_IMPORTED_MODULE_0__.I1)(e.period,null),graphType:parseGraphType(e.graphType),customGraphId:(0,_lib__WEBPACK_IMPORTED_MODULE_0__.I1)(e.customGraphId,null)}),(0,_lib__WEBPACK_IMPORTED_MODULE_0__.MH)(e)),(0,_lib__WEBPACK_IMPORTED_MODULE_0__.bs)(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__.ZP);__webpack_exports__.Z=ModuleGraph},830:function(e,t){var n="http://www.w3.org/2000/svg";t.Z=function(e,t,r){var i=void 0===r?{}:r,o=i.size,s=i.color,a=i.spin,l=i.pulse,c=document.createElement("figure");c.title=t,c.className="fa fa-".concat(e.iconName),o&&c.classList.add("fa-".concat(o)),a?c.classList.add("fa-spin"):l&&c.classList.add("fa-pulse");var p=document.createElementNS(n,"svg");p.setAttribute("viewBox","0 0 ".concat(e.icon[0]," ").concat(e.icon[1])),s&&p.setAttribute("fill",s);var u=document.createElementNS(n,"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}},510:function(e,t){t.Z=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)}))}}},541:function(e,t,n){n.d(t,{Dw:function(){return M},Aq:function(){return x},Ds:function(){return E},NV:function(){return _},fk:function(){return k},rN:function(){return y},bc:function(){return v},SM:function(){return m},bs:function(){return h},MH:function(){return d},JW:function(){return a},gx:function(){return l},xn:function(){return o},I1:function(){return i},oF:function(){return p},OR:function(){return f},No:function(){return g},HY:function(){return u},VJ:function(){return s},t:function(){return C}});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},r.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="".concat(e)),"number"==typeof n&&(n="".concat(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"".concat(n).concat(e);if(r<n.length)return"".concat(n.substring(0,r)).concat(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?"".concat(s).concat(e):"".concat(s).concat(n.substring(0,o)).concat(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=(null,(t=e.receivedAt)instanceof Date?t:"number"==typeof t?new Date(1e3*t):"string"!=typeof t||Number.isNaN(new Date(t).getTime())?null:new Date(t));if(null===n)throw new TypeError("invalid meta structure");var r=null;return e.error instanceof Error?r=e.error:"string"==typeof e.error&&(r=new Error(e.error)),{receivedAt:n,error:r,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="".concat(e,": ").concat(t,";");return["-webkit-".concat(n),"-moz-".concat(n),"-ms-".concat(n),"-o-".concat(n),"".concat(n)]}function _(e){return decodeURIComponent(escape(window.atob(e)))}function y(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);var n=c(e.getDate(),2,0),r=c(e.getMonth()+1,2,0),i=c(e.getFullYear(),4,0);return"".concat(n,"/").concat(r,"/").concat(i)}function v(e){var t=c(e.getHours(),2,0),n=c(e.getMinutes(),2,0),r=c(e.getSeconds(),2,0);return"".concat(t,":").concat(n,":").concat(r)}function g(e,t){return e.reduce((function(e,t){var n=t.macro,r=t.value;return e.replace(n,r)}),t)}function b(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 w(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 M(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=w(r),h=d.top,m=h+u.height,f=d.left,_=f+u.width,y=e.getBoundingClientRect(),v=window.getComputedStyle(e).borderWidth||"0",g=2*Number.parseInt(v),M=E(32,t),x=b(16,t),C=function(e){var t=0,n=0,r=e.pageX,i=e.pageY,d=r-a,v=i-l,b=u.width-y.width+g,E=u.height-y.height+g,w=r<f||0===o&&d>0&&r<f+c,C=r>_||d+o+y.width-g>u.width||o===b&&d<0&&r>f+b+c,k=i<h||0===s&&v>0&&i<h+p,P=i>m||v+s+y.height-g>u.height||s===E&&v<0&&i>h+E+p;(t=w?0:C?b:d+o)<0&&(t=0),(n=k?0:P?E:v+s)<0&&(n=0),a=r,l=i,t===o&&n===s||(x(t,n),M(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"},P=function(t){if(2!==t.button){t.stopPropagation(),e.draggable=!1,e.setAttribute("ondragstart","return false;"),e.setAttribute("draggable","false");var n=w(e,r);o=n.left,s=n.top,a=t.pageX,l=t.pageY,c=t.offsetX,p=t.offsetY,u=r.getBoundingClientRect(),d=w(r),h=d.top,m=h+u.height,f=d.left,_=f+u.width,y=e.getBoundingClientRect(),v=window.getComputedStyle(e).borderWidth||"0",g=2*Number.parseInt(v),document.addEventListener("mousemove",C),document.addEventListener("mouseup",k),document.body.style.userSelect="none"}};return e.addEventListener("mousedown",P),function(){e.removeEventListener("mousedown",P),k()}}function x(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=w(r),d=u.top,h=d+p.height,m=u.left,f=m+p.width,_=w(e),y=_.top,v=_.left,g=window.getComputedStyle(e).borderWidth||"0",M=Number.parseInt(g),x=E(32,t),C=b(16,t),k=function(e){var t=o+(e.pageX-a),n=s+(e.pageY-l);t===o&&n===s||t<o&&e.pageX>v+(o-c)||(t<15?t=15:t+v-M/2>=f&&(t=f-v),n<15?n=15:n+y-M/2>=h&&(n=h-y),C(t,n),x(t,n),o=t,s=n,a=e.pageX,l=e.pageY)},P=function(){o=0,s=0,a=0,l=0,c=0,document.removeEventListener("mousemove",k),document.removeEventListener("mouseup",P),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,g=n.height;o=i,s=g,a=t.pageX,l=t.pageY,c=t.offsetX,t.offsetY,p=r.getBoundingClientRect(),u=w(r),d=u.top,h=d+p.height,m=u.left,f=m+p.width,_=w(e),y=_.top,v=_.left,document.addEventListener("mousemove",k),document.addEventListener("mouseup",P),document.body.style.userSelect="none"})),function(){n.remove(),P()}}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}}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var n=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](n,n.exports,__webpack_require__),n.exports}__webpack_require__.d=function(e,t){for(var n in t)__webpack_require__.o(t,n)&&!__webpack_require__.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};!function(){var e,t=__webpack_require__(541),n=__webpack_require__(478),r=(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)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}),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},i.apply(this,arguments)},o=function(e){switch(e){case"default":case"enabled":case"disabled":return e;default:return"default"}};function s(e){if("string"!=typeof e.imageSrc||0===e.imageSrc.length)throw new TypeError("invalid image src.");return i(i(i(i({},(0,n.TB)(e)),{type:0,imageSrc:e.imageSrc,showLastValueTooltip:o(e.showLastValueTooltip),statusImageSrc:(0,t.JW)(e.statusImageSrc,null),lastValue:(0,t.JW)(e.lastValue,null)}),(0,t.MH)(e)),(0,t.bs)(e))}var a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(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(".concat(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(".concat(t,")")},t}(n.ZP),l=a,c=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)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),p=function(){return p=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},p.apply(this,arguments)};function u(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 p(p(p({},(0,n.TB)(e)),{type:5,image:e.image,imageSrc:e.imageSrc}),(0,t.bs)(e))}var d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return c(t,e),t.prototype.createDomElement=function(){var e=document.createElement("div");return e.className="icon "+this.props.image,e.style.backgroundImage="url(".concat(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(".concat(this.props.imageSrc,")")},t}(n.ZP),h=d,m=__webpack_require__(630),f=__webpack_require__(830),_={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"]},y={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"]},v=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)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");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},g.apply(this,arguments)},b=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))};function E(e){if("string"!=typeof e.color||0===e.color.length)throw new TypeError("invalid color.");return g(g(g(g({},(0,n.TB)(e)),{type:20,color:e.color,defaultColor:e.defaultColor,colorRanges:e.colorRanges}),(0,t.MH)(e)),(0,t.bs)(e))}var w=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return v(n,e),n.prototype.createContent=function(){var e=this,n=document.createElement("div");n.className="div-input-group";var r=document.createElement("label");r.textContent=(0,t.t)("Default color"),n.appendChild(r);var i=document.createElement("input");return i.type="color",i.required=!0,i.value="".concat(this.currentData.defaultColor||this.initialData.defaultColor||"#000000"),i.addEventListener("change",(function(t){e.updateData({defaultColor:t.target.value})})),n.appendChild(i),n},n}(m.InputGroup),M=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return v(n,e),n.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:b(b(b([],r.slice(0,t),!0),[n],!1),r.slice(t+1),!0)})}}(n),function(t){return function(){var n=e.currentData.colorRanges||e.initialData.colorRanges||[],r=b(b([],n.slice(0,t),!0),n.slice(t+1),!0);e.updateData({colorRanges:r}),o(r)}}(n)))}))},o(s),r.appendChild(this.initialRangeContainer((function(t){var n=e.currentData.colorRanges||e.initialData.colorRanges||[],r=b(b([],n,!0),[t],!1);e.updateData({colorRanges:r}),o(r)}))),t},n.prototype.initialRangeContainer=function(e){var n={color:"#ffffff"},r=g({},n),i=document.createElement("div"),o=document.createElement("div"),s=this.createLabel("From Value"),a=this.createInputNumber(null,(function(e){r.fromValue=e}));o.appendChild(s),o.appendChild(a),i.appendChild(o);var l=document.createElement("div"),c=this.createLabel("To Value"),p=this.createInputNumber(null,(function(e){r.toValue=e}));o.appendChild(c),o.appendChild(p),i.appendChild(l);var u=document.createElement("div"),d=this.createLabel("Color"),h=this.createInputColor(n.color,(function(e){r.color=e}));o.appendChild(d),o.appendChild(h),i.appendChild(u);var m=document.createElement("a");return m.appendChild((0,f.Z)(_,(0,t.t)("Create color range"),{size:"small",color:"#565656"})),m.addEventListener("click",(function(){var t;void 0!==(t=r).color&&void 0!==t.toValue&&void 0!==t.fromValue&&e(r),r=n,a.value="".concat(r.fromValue||""),p.value="".concat(r.toValue||""),h.value="".concat(r.color)})),i.appendChild(m),i},n.prototype.rangeContainer=function(e,n,r){var i=g({},e),o=document.createElement("div"),s=document.createElement("div"),a=this.createLabel("From Value"),l=this.createInputNumber(e.fromValue,(function(e){i.fromValue=e,n(g({},i))}));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){i.toValue=e,n(g({},i))}));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){i.color=e,n(g({},i))}));s.appendChild(h),s.appendChild(m),o.appendChild(d);var _=document.createElement("a");return _.appendChild((0,f.Z)(y,(0,t.t)("Delete color range"),{size:"small",color:"#565656"})),_.addEventListener("click",r),o.appendChild(_),o},n.prototype.createLabel=function(e){var n=document.createElement("label");return n.textContent=(0,t.t)(e),n},n.prototype.createInputNumber=function(e,t){var n=document.createElement("input");return n.type="number",null!==e&&(n.value="".concat(e)),n.addEventListener("change",(function(e){var n=parseInt(e.target.value);isNaN(n)||t(n)})),n},n.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},n}(m.InputGroup),x="http://www.w3.org/2000/svg",C=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return v(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_".concat(this.props.id),t=document.createElementNS(x,"svg");t.setAttribute("viewBox","0 0 100 100");var n=document.createElementNS(x,"defs"),r=document.createElementNS(x,"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(x,"stop");i.setAttribute("offset","0%"),i.setAttribute("style","stop-color:".concat(this.props.color,";stop-opacity:0.9"));var o=document.createElementNS(x,"stop");o.setAttribute("offset","100%"),o.setAttribute("style","stop-color:".concat(this.props.color,";stop-opacity:0"));var s=document.createElementNS(x,"circle");return s.setAttribute("fill","url(#".concat(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 w("color-cloud",t),3),n.addInputGroup(new M("ranges-cloud",t),4),n},t}(n.ZP),k=C,P=__webpack_require__(510),I=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)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");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},A.apply(this,arguments)};function T(e){var r=A(A({},(0,n.TB)(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:(0,t.I1)(e.startX,0),y:(0,t.I1)(e.startY,0)},endPosition:{x:(0,t.I1)(e.endX,0),y:(0,t.I1)(e.endY,0)},lineWidth:(0,t.I1)(e.lineWidth||e.borderWidth,1),color:(0,t.JW)(e.borderColor||e.color,null),viewportOffsetX:0,viewportOffsetY:0,labelEnd:(0,t.JW)(e.labelEnd,""),labelEndWidth:(0,t.I1)(e.labelEndWidth,0),linkedEnd:e.linkedEnd,linkedStart:e.linkedStart,labelEndHeight:(0,t.I1)(e.labelEndHeight,0),labelStart:(0,t.JW)(e.labelStart,""),labelStartWidth:(0,t.I1)(e.labelStartWidth,0),labelStartHeight:(0,t.I1)(e.labelStartHeight,0)});return A(A({},r),S.extractBoxSizeAndPosition(r.startPosition,r.endPosition))}var O="http://www.w3.org/2000/svg",S=function(e){function n(r,i){var o=e.call(this,A(A({},r),n.extractBoxSizeAndPosition(r.startPosition,r.endPosition)),A({},i),!0)||this;return o.circleRadius=8,o.moveMode=!1,o.isMoving=!1,o.lineMovedEventManager=new P.Z,o.lineMovedEventDisposables=[],o.debouncedStartPositionMovementSave=(0,t.Ds)(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=(0,t.Ds)(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=i.editMode,o.init(),e.prototype.resizeElement.call(o,Math.max(r.width,r.viewportOffsetX),Math.max(r.height,r.viewportOffsetY)),o}return I(n,e),n.prototype.initStartPositionMovementListener=function(e,n){var r=this;this.removeStartPositionMovement=(0,t.Dw)(e,(function(e,t){var n={x:e+=r.circleRadius-r.props.viewportOffsetX/2,y:t+=r.circleRadius-r.props.viewportOffsetY/2};r.isMoving=!0,r.props=A(A({},r.props),{startPosition:n}),r.debouncedStartPositionMovementSave(e,t)}),n)},n.prototype.stopStartPositionMovementListener=function(){this.removeStartPositionMovement&&(this.removeStartPositionMovement(),this.removeStartPositionMovement=null)},n.prototype.initEndPositionMovementListener=function(e,n){var r=this;this.removeEndPositionMovement=(0,t.Dw)(e,(function(e,t){e+=r.circleRadius-r.props.viewportOffsetX/2,t+=r.circleRadius-r.props.viewportOffsetY/2,r.isMoving=!0,r.props=A(A({},r.props),{endPosition:{x:e,y:t}}),r.debouncedEndPositionMovementSave(e,t)}),n)},n.prototype.stopEndPositionMovementListener=function(){this.removeEndPositionMovement&&(this.removeEndPositionMovement(),this.removeEndPositionMovement=null)},n.prototype.setProps=function(t){e.prototype.setProps.call(this,A(A({},t),n.extractBoxSizeAndPosition(t.startPosition,t.endPosition)))},n.prototype.setMeta=function(t){this.moveMode=t.editMode,e.prototype.setMeta.call(this,A(A({},t),{lineMode:!0}))},n.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,_=document.createElementNS(O,"svg");_.setAttribute("width","".concat(i+s)),_.setAttribute("height","".concat(o+s));var y=document.createElementNS(O,"line");return y.setAttribute("x1","".concat(d)),y.setAttribute("y1","".concat(h)),y.setAttribute("x2","".concat(m)),y.setAttribute("y2","".concat(f)),y.setAttribute("stroke",u||"black"),y.setAttribute("stroke-width","".concat(s)),_.append(y),e.append(_),e},n.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,_=e.getElementsByTagName("svg");if(_.length>0){var y=_.item(0);if(null!=y){y.setAttribute("width","".concat(i+s)),y.setAttribute("height","".concat(o+s));var v=y.getElementsByTagNameNS(O,"line");if(v.length>0){var g=v.item(0);null!=g&&(g.setAttribute("x1","".concat(d)),g.setAttribute("y1","".concat(h)),g.setAttribute("x2","".concat(m)),g.setAttribute("y2","".concat(f)),g.setAttribute("stroke",u||"black"),g.setAttribute("stroke-width","".concat(s)))}}}if(this.moveMode){var b=document.createElement("div"),E=document.createElement("div");if(this.isMoving){var w=e.getElementsByClassName("visual-console-item-line-circle-start");w.length>0&&(C=w.item(0))&&(b=C);var M=e.getElementsByClassName("visual-console-item-line-circle-end");M.length>0&&(C=M.item(0))&&(E=C)}if(b.classList.add("visual-console-item-line-circle","visual-console-item-line-circle-start"),b.style.width="".concat(2*this.circleRadius,"px"),b.style.height="".concat(2*this.circleRadius,"px"),b.style.borderRadius="50%",b.style.backgroundColor="".concat(u),b.style.position="absolute",b.style.left="".concat(d-this.circleRadius,"px"),b.style.top="".concat(h-this.circleRadius,"px"),b.style.cursor="move",E.classList.add("visual-console-item-line-circle","visual-console-item-line-circle-end"),E.style.width="".concat(2*this.circleRadius,"px"),E.style.height="".concat(2*this.circleRadius,"px"),E.style.borderRadius="50%",E.style.backgroundColor="".concat(u),E.style.position="absolute",E.style.left="".concat(m-this.circleRadius,"px"),E.style.top="".concat(f-this.circleRadius,"px"),E.style.cursor="move",null!==e.parentElement){for(var x=e.parentElement.getElementsByClassName("visual-console-item-line-circle");x.length>0;)(C=x.item(0))&&C.remove();e.parentElement.appendChild(b),e.parentElement.appendChild(E)}this.initStartPositionMovementListener(b,this.elementRef.parentElement),this.initEndPositionMovementListener(E,this.elementRef.parentElement)}else if(this.moveMode)this.stopStartPositionMovementListener();else if(this.stopStartPositionMovementListener(),null!==e.parentElement)for(x=e.parentElement.getElementsByClassName("visual-console-item-line-circle");x.length>0;){var C;(C=x.item(0))&&C.remove()}},n.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)}},n.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})},n.prototype.remove=function(){this.stopStartPositionMovementListener(),e.prototype.remove.call(this)},n.prototype.onLineMovementFinished=function(e){var t=this.lineMovedEventManager.on(e);return this.lineMovedEventDisposables.push(t),t},n}(n.ZP),L=S,D=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)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),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},R.apply(this,arguments)},N="http://www.w3.org/2000/svg";function B(e){return R(R({},T(e)),{type:21,viewportOffsetX:0,viewportOffsetY:0,labelEnd:(0,t.JW)(e.labelEnd,""),labelEndWidth:(0,t.I1)(e.labelEndWidth,0),labelEndHeight:(0,t.I1)(e.labelEndHeight,0),labelStart:(0,t.JW)(e.labelStart,""),labelStartWidth:(0,t.I1)(e.labelStartWidth,0),labelStartHeight:(0,t.I1)(e.labelStartHeight,0)})}var z=function(e){function n(n,r){var i=e.call(this,R({},n),R({},r))||this;return i.debouncedStartPositionMovementSave=(0,t.Ds)(50,(function(e,t){i.isMoving=!1;var n={x:e,y:t};i.render(),i.lineMovedEventManager.emit({item:i,startPosition:n,endPosition:i.props.endPosition})})),i.debouncedEndPositionMovementSave=(0,t.Ds)(50,(function(e,t){i.isMoving=!1;var n={x:e,y:t};i.render(),i.lineMovedEventManager.emit({item:i,endPosition:n,startPosition:i.props.startPosition})})),i.render(),i}return D(n,e),n.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,_=i.labelEndHeight,y=i.labelStartWidth,v=i.labelStartHeight,g=t.getElementsByTagName("svg");if(g.length>0){if(null!=(r=g.item(0))){for(var b=r.getElementsByTagNameNS(N,"line"),E=r.getElementsByTagNameNS(N,"g");E.length>0;)E[0].remove();b.length>0&&(n=b.item(0))}if(null!=r&&null!=n){var w=25,M=p.x-o+a/2+l/2,x=p.y-s+a/2+c/2,C=u.x-o+a/2+l/2,k=u.y-s+a/2+c/2,P=p.x-o+a/2+l/2,I=p.y-s+a/2+c/2,A=u.x-o+a/2+l/2,T=u.y-s+a/2+c/2,O=180*Math.atan2(k-x,C-M)/Math.PI;if(y<=0&&(b=m.split("<br>"),y=0,b.forEach((function(e){e.length>y&&(y=10*e.length)})),v<=0&&(v=25*b.length)),f<=0&&(b=h.split("<br>"),f=0,b.forEach((function(e){e.length>f&&(f=10*e.length)})),_<=0&&(_=25*b.length)),P<A&&(P+=w,A-=w+f),P>A&&(P-=w+y,A+=w),I<T&&(I+=w,T-=w+_),I>T&&(I-=w+v,T+=w),void 0===d&&(d="#000"),null!==t.parentElement){for(var S=t.parentElement.getElementsByClassName("vc-item-nl-label");S.length>0;){var L=S.item(0);L&&L.remove()}for(var D=t.parentElement.getElementsByClassName("vc-item-nl-arrow");D.length>0;){var R=D.item(0);R&&R.remove()}}var B=2*a,z=M+(C-M)/2-B,W=x+(k-x)/2-B,j=document.createElement("div");j.classList.add("vc-item-nl-arrow"),j.style.position="absolute",j.style.border="".concat(B,"px solid transparent"),j.style.borderBottom="".concat(B,"px solid ").concat(d),j.style.left="".concat(z,"px"),j.style.top="".concat(W,"px"),j.style.transform="rotate(".concat(90+O,"deg)");var H=document.createElement("div");if(H.classList.add("vc-item-nl-arrow"),H.style.position="absolute",H.style.border="".concat(B,"px solid transparent"),H.style.borderBottom="".concat(B,"px solid ").concat(d),H.style.left="".concat(z,"px"),H.style.top="".concat(W,"px"),H.style.transform="rotate(".concat(270+O,"deg)"),null!==t.parentElement&&(t.parentElement.appendChild(j),t.parentElement.appendChild(H)),""!=m){var V=document.createElement("div");try{V.innerHTML=m,V.style.position="absolute",V.style.left="".concat(P,"px"),V.style.top="".concat(I,"px"),V.style.width="".concat(y,"px"),V.style.border="2px solid ".concat(d),V.classList.add("vc-item-nl-label","label-start")}catch(e){console.error(e)}null!==t.parentElement&&t.parentElement.appendChild(V)}if(""!=h){var G=document.createElement("div");try{G.innerHTML=h,G.style.position="absolute",G.style.left="".concat(A,"px"),G.style.top="".concat(T,"px"),G.style.width="".concat(f,"px"),G.style.border="2px solid ".concat(d),G.classList.add("vc-item-nl-label","label-end")}catch(e){console.error(e)}null!==t.parentElement&&t.parentElement.appendChild(G)}}}},n}(L),W=z,j=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)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),H=function(){return H=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},H.apply(this,arguments)};function V(e){if(("string"!=typeof e.imageSrc||0===e.imageSrc.length)&&null===e.encodedHtml)throw new TypeError("invalid image src.");if(null===(0,t.I1)(e.groupId,null))throw new TypeError("invalid group Id.");var r=(0,t.gx)(e.showStatistics),i=r?function(e){return(0,t.VJ)(e.html)?(0,t.VJ)(e.encodedHtml)?null:(0,t.NV)(e.encodedHtml):e.html}(e):null;return H(H(H({},(0,n.TB)(e)),{type:11,groupId:parseInt(e.groupId),imageSrc:(0,t.JW)(e.imageSrc,null),statusImageSrc:(0,t.JW)(e.statusImageSrc,null),showStatistics:r,html:i}),(0,t.bs)(e))}var G=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return j(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(".concat(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(".concat(this.props.statusImageSrc,")"),e.style.backgroundRepeat="no-repeat",e.style.backgroundSize="contain",e.style.backgroundPosition="center",e.innerHTML="")},t}(n.ZP),U=G,K=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)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),F=function(){return F=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},F.apply(this,arguments)},Z=function(e){switch(e){case"analogic":case"digital":return e;default:return"analogic"}},q=function(e){switch(e){case"datetime":case"time":return e;default:return"datetime"}};function J(e){if("string"!=typeof e.clockTimezone||0===e.clockTimezone.length)throw new TypeError("invalid timezone.");return F(F(F({},(0,n.TB)(e)),{type:19,clockType:Z(e.clockType),clockFormat:q(e.clockFormat),clockTimezone:e.clockTimezone,clockTimezoneOffset:(0,t.I1)(e.clockTimezoneOffset,0),showClockTimezone:(0,t.gx)(e.showClockTimezone),color:(0,t.JW)(e.color,null)}),(0,t.bs)(e))}var Y=function(e){function n(t,r){var i=e.call(this,t,r)||this;return i.intervalRef=null,i.startTick((function(){i.childElementRef.innerHTML=i.createClock().innerHTML}),"analogic"===i.props.clockType?2e4:n.TICK_INTERVAL),i}return K(n,e),n.prototype.stopTick=function(){null!==this.intervalRef&&(window.clearInterval(this.intervalRef),this.intervalRef=null)},n.prototype.startTick=function(e,t){void 0===t&&(t=n.TICK_INTERVAL),this.stopTick(),this.intervalRef=window.setInterval(e,t)},n.prototype.createDomElement=function(){return this.createClock()},n.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},n.prototype.remove=function(){this.stopTick(),e.prototype.remove.call(this)},n.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)},n.prototype.createClock=function(){switch(this.props.clockType){case"analogic":return this.createAnalogicClock();case"digital":return this.createDigitalClock();default:throw new Error("invalid clock type.")}},n.prototype.createAnalogicClock=function(){var e="http://www.w3.org/2000/svg",n="#FFFFF0",r="#242124",i="#242124",o="#525252",s="#DC143C",a=this.getElementSize(),l=a.width,c=a.height,p=10*l/100,u=document.createElement("div");u.className="analogic-clock",u.style.width="".concat(l,"px"),u.style.height="".concat(c,"px");var d=document.createElementNS(e,"svg");d.setAttribute("viewBox","0 0 100 100");var h=document.createElementNS(e,"g");h.setAttribute("class","clockface");var m=document.createElementNS(e,"circle");m.setAttribute("cx","50"),m.setAttribute("cy","50"),m.setAttribute("r","48"),m.setAttribute("fill",n),m.setAttribute("stroke","#242124"),m.setAttribute("stroke-width","2"),m.setAttribute("stroke-linecap","round"),h.append(m);var f=this.getHumanTimezone();if(f.length>0){var _=document.createElementNS(e,"text");_.setAttribute("text-anchor","middle"),_.setAttribute("font-size","8"),_.setAttribute("transform","translate(30 50) rotate(90)"),_.setAttribute("fill",r),_.textContent=f,h.append(_)}var y=document.createElementNS(e,"g");y.setAttribute("class","marks");var v=document.createElementNS(e,"g");v.setAttribute("class","mark"),v.setAttribute("transform","translate(50 50)");var g=document.createElementNS(e,"line");g.setAttribute("x1","36"),g.setAttribute("y1","0"),g.setAttribute("x2","46"),g.setAttribute("y2","0"),g.setAttribute("stroke",r),g.setAttribute("stroke-width","5");var b=document.createElementNS(e,"line");b.setAttribute("x1","36"),b.setAttribute("y1","0"),b.setAttribute("x2","46"),b.setAttribute("y2","0"),b.setAttribute("stroke",n),b.setAttribute("stroke-width","1"),v.append(g,b),y.append(v);for(var E=1;E<60;E++){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(".concat(6*E,")")),E%5==0?(w.setAttribute("x1","38"),w.setAttribute("x2","46"),w.setAttribute("stroke-width",E%15==0?"2":"1")):(w.setAttribute("x1","42"),w.setAttribute("x2","46"),w.setAttribute("stroke-width","0.5")),y.append(w)}var M=document.createElementNS(e,"g");M.setAttribute("class","hour-hand"),M.setAttribute("transform","translate(50 50)");var x=document.createElementNS(e,"line");x.setAttribute("class","hour-hand-a"),x.setAttribute("x1","0"),x.setAttribute("y1","0"),x.setAttribute("x2","30"),x.setAttribute("y2","0"),x.setAttribute("stroke",o),x.setAttribute("stroke-width","4"),x.setAttribute("stroke-linecap","round");var C=document.createElementNS(e,"line");C.setAttribute("class","hour-hand-b"),C.setAttribute("x1","0"),C.setAttribute("y1","0"),C.setAttribute("x2","29.9"),C.setAttribute("y2","0"),C.setAttribute("stroke",i),C.setAttribute("stroke-width","3.1"),C.setAttribute("stroke-linecap","round"),M.append(x,C);var k=document.createElementNS(e,"g");k.setAttribute("class","minute-hand"),k.setAttribute("transform","translate(50 50)");var P=document.createElementNS(e,"line");P.setAttribute("class","minute-hand-a"),P.setAttribute("x1","0"),P.setAttribute("y1","0"),P.setAttribute("x2","40"),P.setAttribute("y2","0"),P.setAttribute("stroke",o),P.setAttribute("stroke-width","2"),P.setAttribute("stroke-linecap","round");var I=document.createElementNS(e,"line");I.setAttribute("class","minute-hand-b"),I.setAttribute("x1","0"),I.setAttribute("y1","0"),I.setAttribute("x2","39.9"),I.setAttribute("y2","0"),I.setAttribute("stroke",i),I.setAttribute("stroke-width","1.5"),I.setAttribute("stroke-linecap","round");var A=document.createElementNS(e,"circle");A.setAttribute("r","3"),A.setAttribute("fill",i),k.append(P,I,A);var T=document.createElementNS(e,"g");T.setAttribute("class","second-hand"),T.setAttribute("transform","translate(50 50)");var O=document.createElementNS(e,"line");O.setAttribute("x1","0"),O.setAttribute("y1","0"),O.setAttribute("x2","46"),O.setAttribute("y2","0"),O.setAttribute("stroke",s),O.setAttribute("stroke-width","1"),O.setAttribute("stroke-linecap","round");var S=document.createElementNS(e,"circle");S.setAttribute("r","2"),S.setAttribute("fill",s),T.append(O,S);var L=document.createElementNS(e,"circle");L.setAttribute("cx","50"),L.setAttribute("cy","50"),L.setAttribute("r","0.3"),L.setAttribute("fill",i);var D=this.getOriginDate(),R=D.getSeconds(),N=D.getMinutes(),B=6*R,z=6*N+R/60*6,W=30*D.getHours()+N/60*30;if(M.setAttribute("transform","translate(50 50) rotate(".concat(W,")")),k.setAttribute("transform","translate(50 50) rotate(".concat(z,")")),T.setAttribute("transform","translate(50 50) rotate(".concat(B,")")),d.append(h,y,M,k,T,L),d.setAttribute("transform","rotate(-90)"),u.innerHTML="\n <style>\n @keyframes rotate-hour {\n from {\n ".concat((0,t.OR)("transform","translate(50px, 50px) rotate(".concat(W,"deg)")).join("\n"),"\n }\n to {\n ").concat((0,t.OR)("transform","translate(50px, 50px) rotate(".concat(W+360,"deg)")).join("\n"),"\n }\n }\n @keyframes rotate-minute {\n from {\n ").concat((0,t.OR)("transform","translate(50px, 50px) rotate(".concat(z,"deg)")).join("\n"),"\n }\n to {\n ").concat((0,t.OR)("transform","translate(50px, 50px) rotate(".concat(z+360,"deg)")).join("\n"),"\n }\n }\n @keyframes rotate-second {\n from {\n ").concat((0,t.OR)("transform","translate(50px, 50px) rotate(".concat(B,"deg)")).join("\n"),"\n }\n to {\n ").concat((0,t.OR)("transform","translate(50px, 50px) rotate(".concat(B+360,"deg)")).join("\n"),"\n }\n }\n </style>\n "),u.append(d),"datetime"===this.props.clockFormat){var j=document.createElement("span");j.className="date",j.textContent=(0,t.rN)(D,"default"),j.style.fontSize="".concat(p,"px"),this.props.color&&(j.style.color=this.props.color),u.append(j)}return u},n.prototype.createDigitalClock=function(){var e=document.createElement("div");e.className="digital-clock";var n=this.getElementSize(),r=n.width,i=n.height,o=r;i<r&&(o=i);var s=6/this.props.clockTimezone.length,a=35*o/100,l=17.5*o/100,c=Math.min(35*s*o/100,r/100*10),p=this.getOriginDate();if("datetime"===this.props.clockFormat){var u=document.createElement("span");u.className="date",u.textContent=(0,t.rN)(p,"default"),u.style.fontSize="".concat(l,"px"),this.props.color&&(u.style.color=this.props.color),e.append(u)}var d=document.createElement("span");d.className="time",d.textContent=(0,t.bc)(p),d.style.fontSize="".concat(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="".concat(c,"px"),this.props.color&&(m.style.color=this.props.color),e.append(m)}return e},n.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)},n.prototype.getHumanTimezone=function(e){void 0===e&&(e=this.props.clockTimezone);var t=e.split("/")[1];return(void 0===t?"":t).replace("_"," ")},n.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.")}},n.TICK_INTERVAL=1e3,n}(n.ZP),X=Y,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)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),$=function(){return $=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 ee(e){return $($({},(0,n.TB)(e)),{type:12,label:null,isLinkEnabled:!1,parentId:null,aclGroupId:null,borderWidth:(0,t.I1)(e.borderWidth,0),borderColor:(0,t.JW)(e.borderColor,null),fillColor:(0,t.JW)(e.fillColor,null),fillTransparent:e.fillTransparent})}var te=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="".concat(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="".concat(n,"px"),this.props.borderColor&&(e.style.borderColor=this.props.borderColor)}},t}(n.ZP),ne=te,re=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)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ie=function(){return ie=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},ie.apply(this,arguments)};function oe(e){return ie(ie(ie({},(0,n.TB)(e)),{type:4}),(0,t.bs)(e))}var se=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return re(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}(n.ZP),ae=se,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)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ce=function(){return ce=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},ce.apply(this,arguments)},pe=function(e){switch(e){case"string":case"image":return e;default:return"string"}};function ue(e){if("string"!=typeof e.value||0===e.value.length)throw new TypeError("invalid value");var r=function(e){switch(e){case"none":case"avg":case"max":case"min":return e;default:return"none"}}(e.processValue);return ce(ce(ce(ce(ce({},(0,n.TB)(e)),{type:2,valueType:pe(e.valueType),value:e.value}),"none"===r?{processValue:r}:{processValue:r,period:(0,t.I1)(e.period,0)}),(0,t.MH)(e)),(0,t.bs)(e))}var de=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return le(n,e),n.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 n=document.createElement("img");n.src=this.props.value,e.append(n)}else{var r=this.props.value,i=this.getLabelWithMacrosReplaced();i.length>0&&(r=(0,t.No)([{macro:/\(?_VALUE_\)?/i,value:r}],i)),e.innerHTML=r}return e},n.prototype.createLabelDomElement=function(){var e=document.createElement("div");return e.className="visual-console-item-label",e},n}(n.ZP),he=de,me=__webpack_require__(280),fe=Math.PI,_e=2*fe,ye=1e-6,ve=_e-ye;function ge(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function be(){return new ge}ge.prototype=be.prototype={constructor:ge,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>ye)if(Math.abs(p*a-l*c)>ye&&i){var d=n-o,h=r-s,m=a*a+l*l,f=d*d+h*h,_=Math.sqrt(m),y=Math.sqrt(u),v=i*Math.tan((fe-Math.acos((m+u-f)/(2*_*y)))/2),g=v/y,b=v/_;Math.abs(g-1)>ye&&(this._+="L"+(e+g*c)+","+(t+g*p)),this._+="A"+i+","+i+",0,0,"+ +(p*d>c*h)+","+(this._x1=e+b*a)+","+(this._y1=t+b*l)}else this._+="L"+(this._x1=e)+","+(this._y1=t)},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)>ye||Math.abs(this._y1-c)>ye)&&(this._+="L"+l+","+c),n&&(u<0&&(u=u%_e+_e),u>ve?this._+="A"+n+","+n+",0,1,"+p+","+(e-s)+","+(t-a)+"A"+n+","+n+",0,1,"+p+","+(this._x1=l)+","+(this._y1=c):u>ye&&(this._+="A"+n+","+n+",0,"+ +(u>=fe)+","+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 Ee=be;function we(e){return function(){return e}}var Me=Math.abs,xe=Math.atan2,Ce=Math.cos,ke=Math.max,Pe=Math.min,Ie=Math.sin,Ae=Math.sqrt,Te=1e-12,Oe=Math.PI,Se=Oe/2,Le=2*Oe;function De(e){return e>1?0:e<-1?Oe:Math.acos(e)}function Re(e){return e>=1?Se:e<=-1?-Se:Math.asin(e)}function Ne(e){return e.innerRadius}function Be(e){return e.outerRadius}function ze(e){return e.startAngle}function We(e){return e.endAngle}function je(e){return e&&e.padAngle}function He(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<Te))return[e+(d=(p*(t-o)-u*(e-i))/d)*l,t+d*c]}function Ve(e,t,n,r,i,o,s){var a=e-n,l=t-r,c=(s?o:-o)/Ae(a*a+l*l),p=c*l,u=-c*a,d=e+p,h=t+u,m=n+p,f=r+u,_=(d+m)/2,y=(h+f)/2,v=m-d,g=f-h,b=v*v+g*g,E=i-o,w=d*f-m*h,M=(g<0?-1:1)*Ae(ke(0,E*E*b-w*w)),x=(w*g-v*M)/b,C=(-w*v-g*M)/b,k=(w*g+v*M)/b,P=(-w*v+g*M)/b,I=x-_,A=C-y,T=k-_,O=P-y;return I*I+A*A>T*T+O*O&&(x=k,C=P),{cx:x,cy:C,x01:-p,y01:-u,x11:x*(i/E-1),y11:C*(i/E-1)}}var Ge=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)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ue=function(){return Ue=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},Ue.apply(this,arguments)};function Ke(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 Fe(e){switch(e){case"percent":case"value":return e;default:return"percent"}}function Ze(e){return Ue(Ue(Ue(Ue({},(0,n.TB)(e)),{type:3,percentileType:Ke(e.percentileType||e.type),valueType:Fe(e.valueType),minValue:(0,t.I1)(e.minValue,null),maxValue:(0,t.I1)(e.maxValue,null),color:(0,t.JW)(e.color,null),labelColor:(0,t.JW)(e.labelColor,null),value:(0,t.xn)(e.value,null),unit:(0,t.JW)(e.unit,null)}),(0,t.MH)(e)),(0,t.bs)(e))}var qe="http://www.w3.org/2000/svg",Je=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ge(t,e),t.prototype.createDomElement=function(){var e,t={background:"#000000",progress:this.props.color||"#000000",text:this.props.labelColor||"#bcbcbc"},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(qe,"svg");switch(this.props.percentileType){case"progress-bar":var o=document.createElementNS(qe,"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(qe,"rect");s.setAttribute("fill",t.progress),s.setAttribute("fill-opacity","1"),s.setAttribute("width","".concat(n,"%")),s.setAttribute("height","100%"),s.setAttribute("rx","5"),s.setAttribute("ry","5"),(u=document.createElementNS(qe,"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("text-anchor","middle"),u.setAttribute("alignment-baseline","middle"),u.setAttribute("x","50%"),u.setAttribute("y","50%"),u.setAttribute("fill",t.text),"value"===this.props.valueType?(u.style.fontSize="6pt",u.textContent=this.props.unit?"".concat(e," ").concat(this.props.unit):"".concat(e)):u.textContent="".concat(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(qe,"circle")).setAttribute("transform","translate(50 50)"),a.setAttribute("fill",t.background),a.setAttribute("fill-opacity","0.5"),a.setAttribute("r","50"),(l=document.createElementNS(qe,"circle")).setAttribute("transform","translate(50 50)"),l.setAttribute("fill",t.progress),l.setAttribute("fill-opacity","1"),l.setAttribute("r","".concat(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=Ne,t=Be,n=we(0),r=null,i=ze,o=We,s=je,a=null;function l(){var l,c,p=+e.apply(this,arguments),u=+t.apply(this,arguments),d=i.apply(this,arguments)-Se,h=o.apply(this,arguments)-Se,m=Me(h-d),f=h>d;if(a||(a=l=Ee()),u<p&&(c=u,u=p,p=c),u>Te)if(m>Le-Te)a.moveTo(u*Ce(d),u*Ie(d)),a.arc(0,0,u,d,h,!f),p>Te&&(a.moveTo(p*Ce(h),p*Ie(h)),a.arc(0,0,p,h,d,f));else{var _,y,v=d,g=h,b=d,E=h,w=m,M=m,x=s.apply(this,arguments)/2,C=x>Te&&(r?+r.apply(this,arguments):Ae(p*p+u*u)),k=Pe(Me(u-p)/2,+n.apply(this,arguments)),P=k,I=k;if(C>Te){var A=Re(C/p*Ie(x)),T=Re(C/u*Ie(x));(w-=2*A)>Te?(b+=A*=f?1:-1,E-=A):(w=0,b=E=(d+h)/2),(M-=2*T)>Te?(v+=T*=f?1:-1,g-=T):(M=0,v=g=(d+h)/2)}var O=u*Ce(v),S=u*Ie(v),L=p*Ce(E),D=p*Ie(E);if(k>Te){var R,N=u*Ce(g),B=u*Ie(g),z=p*Ce(b),W=p*Ie(b);if(m<Oe&&(R=He(O,S,z,W,N,B,L,D))){var j=O-R[0],H=S-R[1],V=N-R[0],G=B-R[1],U=1/Ie(De((j*V+H*G)/(Ae(j*j+H*H)*Ae(V*V+G*G)))/2),K=Ae(R[0]*R[0]+R[1]*R[1]);P=Pe(k,(p-K)/(U-1)),I=Pe(k,(u-K)/(U+1))}}M>Te?I>Te?(_=Ve(z,W,O,S,u,I,f),y=Ve(N,B,L,D,u,I,f),a.moveTo(_.cx+_.x01,_.cy+_.y01),I<k?a.arc(_.cx,_.cy,I,xe(_.y01,_.x01),xe(y.y01,y.x01),!f):(a.arc(_.cx,_.cy,I,xe(_.y01,_.x01),xe(_.y11,_.x11),!f),a.arc(0,0,u,xe(_.cy+_.y11,_.cx+_.x11),xe(y.cy+y.y11,y.cx+y.x11),!f),a.arc(y.cx,y.cy,I,xe(y.y11,y.x11),xe(y.y01,y.x01),!f))):(a.moveTo(O,S),a.arc(0,0,u,v,g,!f)):a.moveTo(O,S),p>Te&&w>Te?P>Te?(_=Ve(L,D,N,B,p,-P,f),y=Ve(O,S,z,W,p,-P,f),a.lineTo(_.cx+_.x01,_.cy+_.y01),P<k?a.arc(_.cx,_.cy,P,xe(_.y01,_.x01),xe(y.y01,y.x01),!f):(a.arc(_.cx,_.cy,P,xe(_.y01,_.x01),xe(_.y11,_.x11),!f),a.arc(0,0,p,xe(_.cy+_.y11,_.cx+_.x11),xe(y.cy+y.y11,y.cx+y.x11),f),a.arc(y.cx,y.cy,P,xe(y.y11,y.x11),xe(y.y01,y.x01),!f))):a.arc(0,0,p,E,b,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-Oe/2;return[Ce(r)*n,Ie(r)*n]},l.innerRadius=function(t){return arguments.length?(e="function"==typeof t?t:we(+t),l):e},l.outerRadius=function(e){return arguments.length?(t="function"==typeof e?e:we(+e),l):t},l.cornerRadius=function(e){return arguments.length?(n="function"==typeof e?e:we(+e),l):n},l.padRadius=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:we(+e),l):r},l.startAngle=function(e){return arguments.length?(i="function"==typeof e?e:we(+e),l):i},l.endAngle=function(e){return arguments.length?(o="function"==typeof e?e:we(+e),l):o},l.padAngle=function(e){return arguments.length?(s="function"==typeof e?e:we(+e),l):s},l.context=function(e){return arguments.length?(a=null==e?null:e,l):a},l}();(a=document.createElementNS(qe,"path")).setAttribute("transform","translate(50 50)"),a.setAttribute("fill",t.background),a.setAttribute("fill-opacity","0.5"),a.setAttribute("d","".concat(p(c))),(l=document.createElementNS(qe,"path")).setAttribute("transform","translate(50 50)"),l.setAttribute("fill",t.progress),l.setAttribute("fill-opacity","1"),l.setAttribute("d","".concat(p(Ue(Ue({},c),{endAngle:c.endAngle*(n/100)})))),i.append(a,l)}var u;if((u=document.createElementNS(qe,"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(qe,"tspan");d.setAttribute("x","0"),d.setAttribute("dy","1em"),d.textContent="".concat(e),d.style.fontSize="8pt";var h=document.createElementNS(qe,"tspan");h.setAttribute("x","0"),h.setAttribute("dy","1em"),h.textContent="".concat(this.props.unit),h.style.fontSize="8pt",u.append(d,h),u.setAttribute("transform","translate(50 33)")}else u.textContent="".concat(e),u.style.fontSize="8pt",u.setAttribute("transform","translate(50 50)");else u.textContent="".concat(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,Ue(Ue({},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}(n.ZP),Ye=Je,Xe=__webpack_require__(369),Qe=__webpack_require__(709),$e=__webpack_require__(600),et=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)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),tt=function(){return tt=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},tt.apply(this,arguments)};function nt(e){if(null!==e.imageSrc){if("string"!=typeof e.statusImageSrc||0===e.imageSrc.statusImageSrc)throw new TypeError("invalid status image src.")}else if((0,t.VJ)(e.encodedTitle))throw new TypeError("missing encode tittle content.");if(null===(0,t.I1)(e.serviceId,null))throw new TypeError("invalid service id.");return tt(tt({},(0,n.TB)(e)),{type:10,serviceId:e.serviceId,imageSrc:(0,t.JW)(e.imageSrc,null),statusImageSrc:(0,t.JW)(e.statusImageSrc,null),encodedTitle:(0,t.JW)(e.encodedTitle,null)})}var rt=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return et(n,e),n.prototype.createDomElement=function(){var e=document.createElement("div");return e.className="service",null!==this.props.statusImageSrc?(e.style.background="url(".concat(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",(0,t.NV)(this.props.encodedTitle)))):null!==this.props.encodedTitle&&(e.innerHTML=(0,t.NV)(this.props.encodedTitle)),e},n.prototype.updateDomElement=function(e){null!==this.props.statusImageSrc?(e.style.background="url(".concat(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",(0,t.NV)(this.props.encodedTitle))),e.innerHTML=""):null!==this.props.encodedTitle&&(e.innerHTML=(0,t.NV)(this.props.encodedTitle))},n}(n.ZP),it=rt,ot=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)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),st=function(){return st=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},st.apply(this,arguments)};function at(e){return st(st(st({},(0,n.TB)(e)),{type:22,value:(0,t.I1)(e.value,0),status:(0,t.VJ)(e.status)?"#B2B2B2":e.status,titleColor:(0,t.VJ)(e.titleColor)?"#3f3f3f":e.titleColor,title:(0,t.VJ)(e.title)?"":e.title,titleModule:(0,t.VJ)(e.titleModule)?"":e.titleModule,thresholds:(0,t.VJ)(e.thresholds)?"":e.thresholds,minMaxValue:(0,t.VJ)(e.minMaxValue)?"":e.minMaxValue,odometerType:(0,t.VJ)(e.odometerType)?"percent":e.odometerType}),(0,t.MH)(e))}var lt,ct=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ot(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-".concat(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="".concat(c.style.backgroundColor);var m=document.createElement("div");m.className="odometer-b",m.id="odometerB-".concat(this.props.id),m.style.backgroundColor="".concat(this.props.status);var f=document.createElement("div");f.className="odometer-c";var _=document.createElement("div");_.className="odometer-d";var y="http://www.w3.org/2000/svg";if(""!=e){var v=document.createElementNS(y,"svg");v.setAttributeNS(null,"width","100%"),v.setAttributeNS(null,"height","100%"),v.setAttributeNS(null,"style","position:absolute;z-index:1");var g=document.createElementNS(y,"path");g.setAttributeNS(null,"id","svgWarning-".concat(this.props.id)),g.setAttributeNS(null,"d","M".concat(this.props.width/2,",").concat(this.props.width/2,"L").concat(e,"A").concat(this.props.width/2,",").concat(this.props.width/2,",0,0,1,").concat(t,"Z")),g.setAttributeNS(null,"class","svg_warning"),v.appendChild(g),d.appendChild(v)}if(""!=n){var b=document.createElementNS(y,"svg");b.setAttributeNS(null,"width","100%"),b.setAttributeNS(null,"height","100%"),b.setAttributeNS(null,"style","position:absolute;z-index:2");var E=document.createElementNS(y,"path");E.setAttributeNS(null,"id","svgCritical-".concat(this.props.id)),E.setAttributeNS(null,"d","M".concat(this.props.width/2,",").concat(this.props.width/2,"L").concat(n,"A").concat(this.props.width/2,",").concat(this.props.width/2,",0,0,1,").concat(r,"Z")),E.setAttributeNS(null,"fill","#E63C52"),b.appendChild(E),d.appendChild(b)}var w=document.createElement("h1");w.innerText=o+s,w.style.fontSize="".concat(.17*p,"px"),w.style.color="".concat(this.props.status),w.style.lineHeight="0";var M=document.createElement("h2");""==this.props.title?M.textContent=this.truncateTitle(this.props.moduleName):M.textContent=this.truncateTitle(this.props.title),M.title=this.props.titleModule,M.setAttribute("title",this.props.titleModule),M.style.fontSize="".concat(.06*p,"px"),M.style.color="".concat(this.props.titleColor),M.style.lineHeight="0";var x=document.createElement("script");x.type="text/javascript",x.onload=function(){m.style.transform="rotate(".concat(l,"turn)")};var C=window.location.pathname.split("/")[1];return x.src="".concat(document.dir,"/").concat(C,"/include/javascript/pandora_alerts.js"),h.appendChild(w),h.appendChild(M),d.appendChild(m),d.appendChild(f),d.appendChild(_),d.appendChild(h),d.appendChild(x),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-".concat(this.props.id));null!=r&&(r.style.display="none");var i=document.getElementById("svgCritical-".concat(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-".concat(t.props.id));e&&(e.style.transform="rotate(".concat(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){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}}e=180-1.8*e;var i=t+Math.cos(e*Math.PI/180)*t,o=t-Math.sin(e*Math.PI/180)*t;return"".concat(i,",").concat(o)},t.prototype.truncateTitle=function(e){if(null!=e&&e.length>22){var t=e.length/2,n=t-9,r=e.substr(0,t-n),i=e.substr(t+n);return"".concat(r,"...").concat(i)}return e},t}(n.ZP),pt=ct,ut=__webpack_require__(880),dt=function(){return dt=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},dt.apply(this,arguments)};function ht(e){var n=(0,t.I1)(e.type,null);if(null==n)throw new TypeError("missing item type.");switch(n){case 0:return s(e);case 1:return(0,$e.C)(e);case 2:case 6:case 7:case 8:return ue(e);case 3:case 9:case 15:case 16:return Ze(e);case 4:return oe(e);case 5:return u(e);case 10:return nt(e);case 11:return V(e);case 12:return ee(e);case 13:return T(e);case 14:return(0,me.o)(e);case 17:return(0,Xe.p)(e);case 18:return(0,Qe.K)(e);case 19:return J(e);case 20:return E(e);case 21:return B(e);case 22:return at(e);case 23:return(0,ut.u)(e);default:throw new TypeError("decoder not found")}}var mt=function(){function e(e,n,r){var i=this;this.elementsById={},this.elementIds=[],this.relations={},this.lineLinks={},this.lines={},this.clickEventManager=new P.Z,this.dblClickEventManager=new P.Z,this.movedEventManager=new P.Z,this.lineMovedEventManager=new P.Z,this.resizedEventManager=new P.Z,this.selectionChangedEventManager=new P.Z,this.disposables=[],this.handleElementClick=function(e){i.clickEventManager.emit(e)},this.handleElementDblClick=function(e){i.dblClickEventManager.emit(e)},this.handleElementMovement=function(e){var t=e.item.itemProps.type;if(13===t||21===t||void 0!==i.props.gridSelected&&!1!==i.props.gridSelected||i.elements.forEach((function(t){if(!0===t.meta.isSelected&&e.item.itemProps.id!==t.itemProps.id&&13!==t.props.type&&21!==t.props.type){var n=e.newPosition.x-e.item.props.x,r=e.newPosition.y-e.item.props.y,o=t.props.x+n,s=t.props.y+r;o>i.props.width?o=i.props.width:o<=0&&(o=0),s>i.props.height?s=i.props.height:s<=0&&(s=0),t.moveElement(o,s),t.debouncedMovementSave(o,s)}})),13!==t&&21!==t&&!0===i.props.gridSelected){var n=i.props.gridSize,r=e.newPosition.x,o=e.newPosition.y;if(r%n!=0||o%n!=0){var s=Math.floor(r/n)*n,a=Math.floor(o/n)*n;return void document.getElementById("item-selected-move").setAttribute("style","top:"+a+"px !important; left:"+s+"px !important")}}var l=e.item.props.id;i.getItemRelations(l).forEach((function(t){t.parentId===l?t.line.props=dt(dt({},t.line.props),{startPosition:i.getVisualCenter(e.newPosition,e.item)}):t.childId===l&&(t.line.props=dt(dt({},t.line.props),{endPosition:i.getVisualCenter(e.newPosition,e.item)}))})),i.updateLinesConnected(e.item.props,e.newPosition,!1)},this.handleElementMovementFinished=function(e){i.movedEventManager.emit(e),i.updateLinesConnected(e.item.props,e.newPosition,!0)},this.handleLineElementMovementFinished=function(e){i.refreshLink(e.item),i.lineMovedEventManager.emit(e)},this.handleElementResizement=function(e){13===e.item.props.type||21===e.item.props.type||void 0!==i.props.gridSelected&&!1!==i.props.gridSelected||i.elements.forEach((function(t){!0===t.meta.isSelected&&e.item.itemProps.id!==t.itemProps.id&&13!==t.props.type&&21!==t.props.type&&(t.setMeta({isUpdating:!0}),t.resizeElement(e.newSize.width,e.newSize.height),t.debouncedResizementSave(e.newSize.width,e.newSize.height))}));var t=e.item,n=t.props,r=n.id,o=i.getItemRelations(r),s={x:n.x,y:n.y},a=i.elementsById[r].meta;i.elementsById[r].meta=dt(dt({},a),{isUpdating:!0}),o.forEach((function(e){e.parentId===r?e.line.props=dt(dt({},e.line.props),{startPosition:i.getVisualCenter(s,t)}):e.childId===r&&(e.line.props=dt(dt({},e.line.props),{endPosition:i.getVisualCenter(s,t)}))}))},this.handleElementResizementFinished=function(e){i.resizedEventManager.emit(e)},this.handleElementRemove=function(e){i.elementIds=i.elementIds.filter((function(t){return t!==e.item.props.id})),delete i.elementsById[e.item.props.id],i.clearRelations(e.item.props.id)},this.handleElementSelectionChanged=function(e){i.elements.filter((function(e){return 1==e.meta.isSelected})).length>0?e.selected=!0:e.selected=!1,i.selectionChangedEventManager.emit(e)},this.handleContainerClick=function(){i.unSelectItems()},this.containerRef=e,this._props=function(e){var n=e.id,r=e.name,i=e.groupId,o=e.backgroundURL,s=e.backgroundColor,a=e.isFavorite,l=e.relationLineWidth,c=e.maintenanceMode,p=e.gridSize;if(e.gridSelected,null==n||isNaN(parseInt(n)))throw new TypeError("invalid Id.");if("string"!=typeof r||0===r.length)throw new TypeError("invalid name.");if(null==i||isNaN(parseInt(i)))throw new TypeError("invalid group Id.");return dt({id:parseInt(n),name:r,groupId:parseInt(i),backgroundURL:(0,t.JW)(o,null),backgroundColor:(0,t.JW)(s,null),isFavorite:(0,t.gx)(a),relationLineWidth:(0,t.I1)(l,0),maintenanceMode:c,gridSize:(0,t.I1)(p,10),gridSelected:!1},(0,t.HY)(e))}(n),this.render(),(r=r.sort((function(e,t){return null==e.id||null==t.id?0:e.id>t.id?1:-1}))).forEach((function(e){return i.addElement(e,i)})),this.buildRelations(),this.elements.forEach((function(e){e instanceof L&&i.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]),(this.lineLinks[i][t].start!=n&&this.lineLinks[i][t].end==r||this.lineLinks[i][t].start==n&&this.lineLinks[i][t].end!=r)&&(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,n,r){var i=this;null!=this.lineLinks[e.id]&&(Object.keys(this.lineLinks[e.id]).forEach((function(o){var s=parseInt(o);if(-1!==i.elementIds.indexOf(s)){var a=i.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;e.id==i.lineLinks[e.id][s].start&&(l=n.x+e.width/2,c=n.y+e.height/2),e.id==i.lineLinks[e.id][s].end&&(p=n.x+e.width/2,u=n.y+e.height/2),i.updateElement(dt(dt({},a.props),{startX:l,startY:c,endX:p,endY:u})),r&&(0,t.Ds)(500,(function(e){i.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,n.x+e.width/2,n.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,n){void 0===n&&(n=this);try{var r=function(e){var n=(0,t.I1)(e.type,null);if(null==n)throw new TypeError("missing item type.");var r=(0,t.SM)(e);switch(n){case 0:return new l(s(e),r);case 1:return new $e.Z((0,$e.C)(e),r);case 2:case 6:case 7:case 8:return new he(ue(e),r);case 3:case 9:case 15:case 16:return new Ye(Ze(e),r);case 4:return new ae(oe(e),r);case 5:return new h(u(e),r);case 10:return new it(nt(e),r);case 11:return new U(V(e),r);case 12:return new ne(ee(e),r);case 13:return new L(T(e),r);case 14:return new me.Z((0,me.o)(e),r);case 17:return new Xe.Z((0,Xe.p)(e),r);case 18:return new Qe.Z((0,Qe.K)(e),r);case 19:return new X(J(e),r);case 20:return new k(E(e),r);case 21:return new W(B(e),r);case 22:return new pt(at(e),r);case 23:return new ut.Z((0,ut.u)(e),r);default:throw new TypeError("item not found")}}(e);return n.elementsById[r.props.id]=r,n.elementIds.push(r.props.id),r.onRemove(n.handleElementRemove),r.onSelectionChanged(n.handleElementSelectionChanged),r.onClick(n.handleElementClick),r.onDblClick(n.handleElementDblClick),r instanceof L?(r.onLineMovementFinished(n.handleLineElementMovementFinished),this.refreshLink(r)):(r.onMoved(n.handleElementMovement),r.onMovementFinished(n.handleElementMovementFinished),r.onResized(n.handleElementResizement),r.onResizeFinished(n.handleElementResizementFinished)),n.containerRef.append(r.elementRef),r}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=ht(e)}catch(e){console.error("Error updating an element:",e.message)}})),this.buildRelations()},e.prototype.updateElement=function(e){try{this.elementsById[e.id].props=dt({},ht(e))}catch(e){console.error("Error updating element:",e.message)}this.buildRelations()},Object.defineProperty(e.prototype,"props",{get:function(){return dt({},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(".concat(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(".concat(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="".concat(e,"px"),this.containerRef.style.height="".concat(t,"px")},e.prototype.resize=function(e,t){this.props=dt(dt({},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="".concat(e,"|").concat(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,n,r,i,o,s){var a="".concat(e.props.id,"|").concat(n.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(n.props,n),d=u.x,h=u.y;null!=r&&(c=r),null!=i&&(p=i),null!=o&&(d=o),null!=s&&(h=s);var m=new L(T({id:0,type:13,startX:c,startY:p,endX:d,endY:h,width:0,height:0,lineWidth:this.props.relationLineWidth,color:(0,t.JW)(n.props.colorStatus,"#CCC")}),(0,t.SM)({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=dt(dt({},e.meta),{editMode:!0})})),this.containerRef.classList.add("is-editing")},e.prototype.disableEditMode=function(){this.elements.forEach((function(e){e.meta=dt(dt({},e.meta),{editMode:!1})})),this.containerRef.classList.remove("is-editing")},e.prototype.enableMaintenanceMode=function(){this.elements.forEach((function(e){e.meta=dt(dt({},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=dt(dt({},e.meta),{maintenanceMode:!1})})),this.containerRef.classList.remove("is-maintenance"),this.containerRef.classList.add("is-editing")},e.prototype.updateGridSize=function(e){this._props.gridSize=parseInt(e),this.props.gridSize=parseInt(e)},e.prototype.updateGridSelected=function(e){this._props.gridSelected=e,this.props.gridSelected=e},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 n;switch(e.props.type){case 0:n="".concat((0,t.t)("Static graph")," - ").concat(e.props.imageSrc);break;case 1:n=(0,t.t)("Module graph");break;case 19:n=(0,t.t)("Clock");break;case 18:n=(0,t.t)("Bars graph");break;case 14:n=(0,t.t)("Event history graph");break;case 3:n=(0,t.t)("Percentile bar");break;case 15:n=(0,t.t)("Circular progress bar");break;case 16:n=(0,t.t)("Circular progress bar (interior)");break;case 2:n=(0,t.t)("Simple Value");break;case 4:n=(0,t.t)("Label");break;case 11:n=(0,t.t)("Group");break;case 20:n=(0,t.t)("Color cloud");break;case 5:n="".concat((0,t.t)("Icon")," - ").concat(e.props.imageSrc);break;case 22:n=(0,t.t)("Odometer");break;case 23:n=(0,t.t)("BasicChart");break;default:n=(0,t.t)("Item")}var r=e.props;return null!=r.agentAlias&&null!=r.moduleName?n+=" (".concat((0,t.fk)(r.agentAlias,18)," - ").concat((0,t.fk)(r.moduleName,25),")"):null!=r.agentAlias&&(n+=" (".concat((0,t.fk)(r.agentAlias,25),")")),n},e.items=((lt={})[0]=l,lt[1]=$e.Z,lt[2]=he,lt[6]=he,lt[7]=he,lt[8]=he,lt[3]=Ye,lt[9]=Ye,lt[15]=Ye,lt[16]=Ye,lt[4]=ae,lt[5]=h,lt[10]=it,lt[11]=U,lt[12]=ne,lt[13]=L,lt[14]=me.Z,lt[17]=Xe.Z,lt[18]=Qe.Z,lt[19]=X,lt[20]=k,lt[21]=W,lt[22]=pt,lt[23]=ut.Z,lt),e}(),ft=function(){function e(e){this.cancellable={cancel:function(){}},this._status="waiting",this.statusChangeEventManager=new P.Z,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}(),_t=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 ft((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 ft(t),n):new ft(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=mt,window.VisualConsole.Form=m,window.AsyncTaskManager=_t}()})();
//# sourceMappingURL=vc.main.min.js.map